Merge branch 'master' of git.oa00.com:supply-chain/service

finance
黄伟 2 years ago
commit 36901c58f2

@ -1,5 +1,32 @@
package service
import (
"context"
"git.oa00.com/supply-chain/service/client"
)
type Service struct {
Audit audit
}
type ArgsServiceLists struct {
CustomerId uint
Status uint
}
type ReplyServiceLists struct {
ServiceId uint `json:"serviceId"`
ServiceName string `json:"serviceName"`
EndTime int64 `json:"endTime"`
AuditStatus uint `json:"auditStatus"`
}
// All @Title 全部服务
func (s *Service) All(ctx context.Context, customerId uint) (reply []ReplyServiceLists, err error) {
xClient, err := client.GetClient(s)
if err != nil {
return
}
err = xClient.Call(ctx, "All", customerId, &reply)
return
}

@ -6,17 +6,21 @@ const (
ErrorSystem Error = 11001 // 系统错误
ErrorOrderRepeat Error = 11002 // 重复下单
ErrorOrderFreightFee Error = 11003 // 运费获取失败
ErrorOrderFreightFee Error = 11003 // 运费错误
ErrorOrderSubmit Error = 11004 // 下单失败
ErrorOrderShipment Error = 11005 // 无法配送
ErrorOrderSkuPrice Error = 11006 // 商品价格错误
ErrorOrderAmount Error = 11007 // 订单金额错误
)
var ErrorCodes = map[Error]string{
ErrorSystem: "系统错误",
ErrorOrderRepeat: "重复下单",
ErrorOrderFreightFee: "运费获取失败",
ErrorOrderFreightFee: "运费错误",
ErrorOrderSubmit: "下单失败",
ErrorOrderShipment: "无法配送",
ErrorOrderSkuPrice: "商品价格错误",
ErrorOrderAmount: "订单金额错误",
}
func (e Error) Error() string {

@ -41,15 +41,26 @@ func (o *order) FreightFee(ctx context.Context, channelId string, args ArgsOrder
return
}
type SkuOrderItem struct {
SkuId uint // skuId
Price decimal.Decimal // 单价
Quantity uint // 数量
}
type ArgsOrderSubmit struct {
ChannelOrderSn string // 渠道订单编号
Address string // 地址
Skus []SkuFreightFeeItem // sku信息
Skus []SkuOrderItem // sku信息
Receiver Receiver // 收件信息
OrderFee decimal.Decimal // 订单金额-不含运费
FreightFee decimal.Decimal // 运费
FreightFees []OrderFreightFee // 运费
UserIp string // 下单用户ip
}
type OrderFreightFee struct {
SkuIds []uint `json:"skuIds"`
FreightFee decimal.Decimal `json:"freightFee"`
}
type Receiver struct {
Name string // 姓名
Mobile string // 手机号
@ -58,6 +69,8 @@ type Receiver struct {
}
type ReplyOrderSubmit struct {
OrderSn string
ChannelOrderSn string
}
// Submit @Title 下单

@ -26,6 +26,7 @@ type ArgsOrderSubmit struct {
OrderSn uint64 // 订单号
Skus []OrderFreightFeeSkuItem // 商品信息
Address string // 地址
FreightFee decimal.Decimal // 运费
Receiver OrderReceiver // 收件信息
UserIp string // 用户ip
}

Loading…
Cancel
Save