Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
laodaming 2023-11-27 11:18:58 +08:00
commit 49a915a7a2
4 changed files with 29 additions and 23 deletions

View File

@ -23,8 +23,8 @@ type ExchangeRateUnit interface{}
type PayMethods string type PayMethods string
const ( const (
PAY_METHOD_CARD PayMethods = "CARD" PAY_METHOD_CARD PayMethods = "CARD" //card
PAY_METHOD_VISA PayMethods = "VISA" PAY_METHOD_VISA PayMethods = "VISA" //visa
) )
// 支付状态 // 支付状态

View File

@ -114,7 +114,11 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us
MysqlConn: l.svcCtx.MysqlConn, MysqlConn: l.svcCtx.MysqlConn,
AwsSession: l.svcCtx.AwsSession, AwsSession: l.svcCtx.AwsSession,
} }
var resourceId string = hash.JsonHashKey(req.FileKey) var hashKeyMap = make(map[string]interface{}, 2)
hashKeyMap["fileKey"] = req.FileKey
hashKeyMap["userId"] = userId
var resourceId string = hash.JsonHashKey(hashKeyMap)
uploadRes, err := upload.UploadFileByByte(&file.UploadBaseReq{ uploadRes, err := upload.UploadFileByByte(&file.UploadBaseReq{
FileHash: resourceId, FileHash: resourceId,
FileByte: ioData, FileByte: ioData,
@ -123,6 +127,8 @@ func (l *UploadLogoLogic) UploadLogo(req *types.UploadLogoReq, userinfo *auth.Us
UserId: userId, UserId: userId,
GuestId: guestId, GuestId: guestId,
Source: "upload-logo", Source: "upload-logo",
ResourceId: resourceId,
Refresh: 1,
}) })
var logoUrl string var logoUrl string

View File

@ -163,8 +163,6 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq
} }
// 根据hash 查询数据资源 // 根据hash 查询数据资源
var hashKeyData = *in var hashKeyData = *in
hashKeyData.GuestId = 0
hashKeyData.UserId = 0
hashKeyData.LogoUrl = in.LogoUrl hashKeyData.LogoUrl = in.LogoUrl
var hashKeyDataMap map[string]interface{} var hashKeyDataMap map[string]interface{}
hashKeyDataB, _ := json.Marshal(hashKeyData) hashKeyDataB, _ := json.Marshal(hashKeyData)
@ -319,6 +317,8 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq
ApiType: 2, ApiType: 2,
UserId: in.UserId, UserId: in.UserId,
GuestId: in.GuestId, GuestId: in.GuestId,
ResourceId: resourceId,
Refresh: 1,
}) })
// logc.Infof(ctx, "合图--上传文件--结束时间:%v", time.Now().UTC()) // logc.Infof(ctx, "合图--上传文件--结束时间:%v", time.Now().UTC())
endTimeUploadFile := time.Now().UnixMilli() //合图--处理--开始时间 endTimeUploadFile := time.Now().UnixMilli() //合图--处理--开始时间

View File

@ -152,14 +152,14 @@ type (
Currency string `json:"currency"` Currency string `json:"currency"`
Country string `json:"country"` Country string `json:"country"`
UserId int64 `json:"user_id"` UserId int64 `json:"user_id"`
OrderSn string `json:"order_sn"` OrderSn string `json:"order_sn"` // 订单编号
DeliveryMethod int64 `json:"delivery_method"` DeliveryMethod int64 `json:"delivery_method"` // 收货类型
DeliveryAddress *OrderAddress `json:"delivery_address"` DeliveryAddress *OrderAddress `json:"delivery_address"` // 订单收货地址
} }
CreatePrePaymentByDepositRes struct { CreatePrePaymentByDepositRes struct {
ErrorCode basic.StatusResponse ErrorCode basic.StatusResponse
OrderDetail gmodel.OrderDetail OrderDetail gmodel.OrderDetail // 订单详情
OrderPay OrderPay OrderPay OrderPay // 支付详情
} }
/* 预支付--定金 */ /* 预支付--定金 */
@ -173,8 +173,8 @@ type (
} }
CreatePrePaymentByBalanceRes struct { CreatePrePaymentByBalanceRes struct {
ErrorCode basic.StatusResponse ErrorCode basic.StatusResponse
OrderDetail gmodel.OrderDetail OrderDetail gmodel.OrderDetail // 订单详情
OrderPay OrderPay OrderPay OrderPay // 支付详情
} }
/* 预支付--尾款 */ /* 预支付--尾款 */
@ -186,7 +186,7 @@ type (
OriginalCurrency string `json:"original_currency"` // 原始货币 OriginalCurrency string `json:"original_currency"` // 原始货币
UserId int64 `json:"user_id"` UserId int64 `json:"user_id"`
CartIds []int64 `json:"cart_ids"` CartIds []int64 `json:"cart_ids"`
DeliveryMethod int64 `json:"delivery_method"` DeliveryMethod int64 `json:"delivery_method"` // 收货类型
DeliveryAddress *OrderAddress `json:"delivery_address"` // 收货地址 DeliveryAddress *OrderAddress `json:"delivery_address"` // 收货地址
} }
CreateRes struct { CreateRes struct {
@ -202,18 +202,18 @@ type (
} }
DetailRes struct { DetailRes struct {
ErrorCode basic.StatusResponse ErrorCode basic.StatusResponse
OrderDetail gmodel.OrderDetail OrderDetail gmodel.OrderDetail // 订单详情
OrderDetailOriginal OrderDetailOriginal OrderDetailOriginal OrderDetailOriginal // 订单详情--原始数据
} }
OrderDetailOriginal struct { OrderDetailOriginal struct {
Status *gmodel.OrderStatus Status *gmodel.OrderStatus // 订单状态
OrderAmount *gmodel.OrderAmount OrderAmount *gmodel.OrderAmount // 订单金额
OrderAddress *gmodel.OrderAddress OrderAddress *gmodel.OrderAddress // 订单收货地址
OrderProduct []gmodel.OrderProductInter OrderProduct []gmodel.OrderProductInter // 订单商品
ShoppingCartSnapshot []gmodel.FsShoppingCart ShoppingCartSnapshot []gmodel.FsShoppingCart // 订单购物车快照
ShoppingProductSnapshot []gmodel.RelaFsProduct ShoppingProductSnapshot []gmodel.RelaFsProduct // 订单商品快照
StatusLink []gmodel.OrderStatus StatusLink []gmodel.OrderStatus // 订单状态链路
PayStatusLink []gmodel.PayStatus PayStatusLink []gmodel.PayStatus // 订单支付状态链路
} }
/* 详情 */ /* 详情 */