This commit is contained in:
邹宗楠
2025-08-29 15:20:05 +08:00
parent 6d1a0d8ee4
commit 6ab49beafe
6 changed files with 34 additions and 22 deletions

View File

@@ -22,7 +22,8 @@ func ApplyContract(callback *lakala.ApplyContractCallBack) error {
return err
}
merchantInfo.ContractStatus = callback.EcStatus
merchantInfo.ContractStatus = callback.AuditStatus
merchantInfo.Desc = callback.AuditDesc
_, err = dao.UpdateEntity(db, merchantInfo, "ContractStatus")
if err != nil {
return err
@@ -43,6 +44,7 @@ func ApplyContractByPeople(callback *lakala.ApplyContractByPeopleCallBack) error
}
merchantInfo.ContractStatus = callback.RespData.AuditStatus
merchantInfo.Desc = callback.RespData.AuditDesc
_, err = dao.UpdateEntity(db, merchantInfo, "ContractStatus")
if err != nil {
return err

View File

@@ -35,6 +35,7 @@ func LaKaLaApplyContract(ctx *jxcontext.Context, apply *lakala.ApplyContractPara
ContractApplyId: utils.Int64ToStr(contractObj.RespData.EcApplyId),
ContractStatus: "WAIT_AUDIT ",
ApplyType: apply.EcTypeCode,
Desc: "申请中",
}
dao.WrapAddIDCULEntity(incomingObj, ctx.GetUserName())
if err = dao.CreateEntity(db, incomingObj); err != nil {
@@ -62,6 +63,7 @@ func LaKaLaApplyContractByPeople(storeId int, apply *lakala.ApplyContractByPeopl
}
contract.ContractStatus = "people"
contract.Desc = "申请人工审核"
dao.UpdateEntity(dao.GetDB(), contract, "ContractStatus")
return "", nil
}
@@ -79,6 +81,7 @@ func QueryElectronicContract(orderNo string, orgId int, ecApplyId string, storeI
return nil, err
}
merchantInfo.ContractStatus = contractObj.AuditStatus
merchantInfo.Desc = contractObj.AuditDesc
dao.UpdateEntity(db, merchantInfo, "ContractStatus")
return contractObj, nil

View File

@@ -44,6 +44,7 @@ type LakalaContract struct {
ContractStatus string `orm:"column(contract_status);size(20)" json:"ContractStatus"` // 合同状态
StoreId int `orm:"column(store_id);size(16)" json:"storeId"` // 京西门店ID
ApplyType string `orm:"column(apply_type);size(16)" json:"applyType"` // 申请类型
Desc string `orm:"column(desc);size(512)" json:"desc"` // 说明
}
func (o *LakalaContract) TableUnique() [][]string {

View File

@@ -140,6 +140,11 @@ func (p *PurchaseHandler) GetOrder4PartRefund(vendorOrderID string) (order *mode
for _, os := range order.Skus {
if _, OK := refundSkuMap[os.VendorSkuID]; !OK {
skuHave = append(skuHave, os)
} else {
if refundSkuMap[os.VendorSkuID].Count != os.Count {
os.Count = os.Count - refundSkuMap[os.VendorSkuID].Count
skuHave = append(skuHave, os)
}
}
}
}

View File

@@ -51,7 +51,7 @@ func (c *PurchaseHandler) isAfsMsg(msg *ebaiapi.CallbackMsg) bool {
switch msg.Cmd {
case ebaiapi.CmdOrderPartRefund:
msgType := int(utils.MustInterface2Int64(msg.Body["type"]))
return msgType == ebaiapi.OrderPartRefuncTypeCustomer || msgType == ebaiapi.OrderPartRefuncTypeCS
return msgType == ebaiapi.OrderPartRefuncTypeCustomer || msgType == ebaiapi.OrderPartRefuncTypeCS || msgType == ebaiapi.OrderPartRefuncTypeMerchant
case ebaiapi.CmdOrderUserCancel:
// 1表示订单完成前用户全单取消申请流程 2表示订单完成后用户全单退款申请流程
cancelType := int(utils.MustInterface2Int64(msg.Body["cancel_type"]))

View File

@@ -35,26 +35,27 @@ func (c *LaKaLaCallbackController) ApplyContract() {
return
}
// ApplyContractByPeople 合同申请人工审核回调
func (c *LaKaLaCallbackController) ApplyContractByPeople() {
body, err := ioutil.ReadAll(c.Ctx.Request.Body)
if err != nil {
c.Data["json"] = lakala.CallBackResultInfo(err)
c.ServeJSON()
return
}
globals.SugarLogger.Debugf("-----applyContractByPeople := %s", string(body))
apply := &lakala.ApplyContractByPeopleCallBack{}
if err = json.Unmarshal(body, apply); err != nil {
c.Data["json"] = lakala.CallBackResultInfo(err)
c.ServeJSON()
return
}
c.Data["json"] = lakala.CallBackResultInfo(lakalaServer.ApplyContractByPeople(apply))
c.ServeJSON()
return
}
//
//// ApplyContractByPeople 合同申请人工审核回调
//func (c *LaKaLaCallbackController) ApplyContractByPeople() {
// body, err := ioutil.ReadAll(c.Ctx.Request.Body)
// if err != nil {
// c.Data["json"] = lakala.CallBackResultInfo(err)
// c.ServeJSON()
// return
// }
// globals.SugarLogger.Debugf("-----applyContractByPeople := %s", string(body))
// apply := &lakala.ApplyContractByPeopleCallBack{}
// if err = json.Unmarshal(body, apply); err != nil {
// c.Data["json"] = lakala.CallBackResultInfo(err)
// c.ServeJSON()
// return
// }
//
// c.Data["json"] = lakala.CallBackResultInfo(lakalaServer.ApplyContractByPeople(apply))
// c.ServeJSON()
// return
//}
// SeparateMsg 商户开通/修改分账业务回调
func (c *LaKaLaCallbackController) SeparateMsg() {