30 lines
587 B
Go
30 lines
587 B
Go
package freight
|
|
|
|
import (
|
|
"context"
|
|
|
|
pb "bsm/full/module/ec/mall/pb"
|
|
"git.apinb.com/bsm-sdk/core/service"
|
|
)
|
|
|
|
// Freight 运费模板列表
|
|
func Fetch(ctx context.Context, in *pb.MallFetchRequest) (reply *pb.FreightReply, err error) {
|
|
// parse authorization meta.
|
|
_, err = service.ParseMetaCtx(ctx, &service.ParseOptions{RoleValue: "Mall_Admin"})
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
// valildate request page_no,page_size.
|
|
if in.GetPageNo() < 1 {
|
|
in.PageNo = 1
|
|
}
|
|
if in.GetPageSize() < 10 {
|
|
in.PageSize = 50
|
|
}
|
|
|
|
// TODO: add your logic code & delete this line.
|
|
|
|
return
|
|
}
|