测试支付
This commit is contained in:
@@ -357,6 +357,7 @@ func Pay4User(ctx *jxcontext.Context, thingID, payType int, vendorPayType string
|
|||||||
switch payType {
|
switch payType {
|
||||||
case model.PayTypeTL_DiscountCard:
|
case model.PayTypeTL_DiscountCard:
|
||||||
if configList, err := dao.QueryConfigs(db, "会员折扣卡", model.ConfigTypeDiscountCard, ""); err == nil {
|
if configList, err := dao.QueryConfigs(db, "会员折扣卡", model.ConfigTypeDiscountCard, ""); err == nil {
|
||||||
|
fmt.Println("test11111111111111111111111111111111111111")
|
||||||
err = jxutils.Strings2Objs(configList[0], &dicountCards)
|
err = jxutils.Strings2Objs(configList[0], &dicountCards)
|
||||||
discountCard := findDiscountCard(dicountCards, thingID)
|
discountCard := findDiscountCard(dicountCards, thingID)
|
||||||
vendorOrderID = utils.Int64ToStr(GenOrderNo(ctx))
|
vendorOrderID = utils.Int64ToStr(GenOrderNo(ctx))
|
||||||
@@ -379,6 +380,8 @@ func Pay4User(ctx *jxcontext.Context, thingID, payType int, vendorPayType string
|
|||||||
}
|
}
|
||||||
dao.WrapAddIDCULDEntity(userMember, ctx.GetUserName())
|
dao.WrapAddIDCULDEntity(userMember, ctx.GetUserName())
|
||||||
dao.CreateEntity(db, userMember)
|
dao.CreateEntity(db, userMember)
|
||||||
|
} else {
|
||||||
|
fmt.Println("eeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", err)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
err = fmt.Errorf("支付方式:%d当前不支持", payType)
|
err = fmt.Errorf("支付方式:%d当前不支持", payType)
|
||||||
@@ -913,6 +916,18 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
|
|||||||
if IsDeliverySelf {
|
if IsDeliverySelf {
|
||||||
outJxOrder.FreightPrice = 0
|
outJxOrder.FreightPrice = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//判断用户是否是会员
|
||||||
|
// var tuserID string
|
||||||
|
// if userID == "" {
|
||||||
|
// tuserID = deliveryAddress.UserID
|
||||||
|
// } else {
|
||||||
|
// tuserID = userID
|
||||||
|
// }
|
||||||
|
// userMembers, err := dao.GetUserMember(db, tuserID, "")
|
||||||
|
// if err == nil {
|
||||||
|
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
if err == nil {
|
if err == nil {
|
||||||
outJxOrder.TotalPrice = outJxOrder.OrderPrice + outJxOrder.FreightPrice
|
outJxOrder.TotalPrice = outJxOrder.OrderPrice + outJxOrder.FreightPrice
|
||||||
|
|||||||
Reference in New Issue
Block a user