This commit is contained in:
邹宗楠
2025-08-06 10:32:29 +08:00
parent 16dad3d9d8
commit 8c7a3ee765
2 changed files with 9 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ import (
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/business/partner"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/globals/api"
"time"
)
@@ -514,11 +515,13 @@ func Separate(ctx *jxcontext.Context, param *lakala.OrderSeparateReq, vendorOrde
}
param.NotifyUrl = lakala.CallbackLaKaLaSeparateUrl
globals.SugarLogger.Debugf("------Separate param--:%s", utils.Format4Output(param, false))
resp, err := api.LaKaLaApi.Separate(param)
if err != nil {
return nil, err
}
globals.SugarLogger.Debugf("------Separate resp--:%s", utils.Format4Output(resp, false))
recv, _ := json.Marshal(param.RecvDatas)
separateObj.OutSeparateNo = resp.RespData.OutSeparateNo
separateObj.SeparateNo = resp.RespData.SeparateNo
@@ -532,7 +535,9 @@ func Separate(ctx *jxcontext.Context, param *lakala.OrderSeparateReq, vendorOrde
t = time.Now()
}
separateObj.LogDate = t
dao.UpdateEntity(dao.GetDB(), &separateObj)
globals.SugarLogger.Debugf("------Separate separateObj--:%s", utils.Format4Output(separateObj, false))
_, err = dao.UpdateEntity(dao.GetDB(), separateObj)
globals.SugarLogger.Debugf("------Separate err--:%v", err)
return resp, err
}

View File

@@ -142,13 +142,11 @@ type LakalaSeparateAmt struct {
Remark string `orm:"column(remark);size(256)" json:"remark"` // 备注说明记录订单流程变化
}
func (o *LakalaSeparateAmt) TableUnique() [][]string {
return [][]string{
[]string{"MerchantNo"},
}
}
func (o *LakalaSeparateAmt) TableIndex() [][]string {
return [][]string{
[]string{"MerchantNo"},
[]string{"VendorOrderID"},
[]string{"LogNo"},
[]string{"CreatedAt"},
}
}