1
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"]))
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user