修改拉卡拉卡分账
This commit is contained in:
@@ -22,7 +22,8 @@ import (
|
||||
)
|
||||
|
||||
func pay4OrderByLaKaLa(ctx *jxcontext.Context, order *model.GoodsOrder, payType int, vendorPayType, subAppID, code, source string) (orderPay *model.OrderPay, err error) {
|
||||
merchantObj, err := dao.GetStoreInfoByMerchantID(dao.GetDB(), "", order.JxStoreID, "", "")
|
||||
var db = dao.GetDB()
|
||||
merchantObj, err := dao.GetStoreInfoByMerchantID(db, "", order.JxStoreID, "", "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -101,9 +102,31 @@ func pay4OrderByLaKaLa(ctx *jxcontext.Context, order *model.GoodsOrder, payType
|
||||
fields, _ := json.Marshal(result.AccRespFields)
|
||||
orderPay.CodeURL = utils.LimitUTF8StringLen(string(fields), 3200)
|
||||
}
|
||||
|
||||
separate := &model.LakalaSeparateAmt{
|
||||
MerchantNo: merchantObj.MerchantNo2,
|
||||
VendorOrderID: order.VendorOrderID,
|
||||
StoreId: order.JxStoreID,
|
||||
CmdType: lakala.SeparateType_SEPATRATE,
|
||||
Status: "1",
|
||||
LogNo: result.LogNo,
|
||||
LogDate: time.Now(),
|
||||
OutSeparateNo: "",
|
||||
SeparateNo: "",
|
||||
CalType: "",
|
||||
FinishDate: "",
|
||||
TotalAmt: "",
|
||||
ActualSeparateAmt: "",
|
||||
TotalFeeAmt: "",
|
||||
FinalStatus: "",
|
||||
DetailData: "",
|
||||
Remark: "聚合主扫订单",
|
||||
}
|
||||
dao.WrapAddIDCULEntity(separate, ctx.GetUserName())
|
||||
dao.CreateEntity(db, separate)
|
||||
}
|
||||
order.VendorOrderID2 = result.LogNo
|
||||
dao.UpdateEntity(dao.GetDB(), order, "VendorOrderID2")
|
||||
dao.UpdateEntity(db, order, "VendorOrderID2")
|
||||
|
||||
return orderPay, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user