1
This commit is contained in:
@@ -22,7 +22,8 @@ func ApplyContract(callback *lakala.ApplyContractCallBack) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
merchantInfo.ContractStatus = callback.EcStatus
|
merchantInfo.ContractStatus = callback.AuditStatus
|
||||||
|
merchantInfo.Desc = callback.AuditDesc
|
||||||
_, err = dao.UpdateEntity(db, merchantInfo, "ContractStatus")
|
_, err = dao.UpdateEntity(db, merchantInfo, "ContractStatus")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -43,6 +44,7 @@ func ApplyContractByPeople(callback *lakala.ApplyContractByPeopleCallBack) error
|
|||||||
}
|
}
|
||||||
|
|
||||||
merchantInfo.ContractStatus = callback.RespData.AuditStatus
|
merchantInfo.ContractStatus = callback.RespData.AuditStatus
|
||||||
|
merchantInfo.Desc = callback.RespData.AuditDesc
|
||||||
_, err = dao.UpdateEntity(db, merchantInfo, "ContractStatus")
|
_, err = dao.UpdateEntity(db, merchantInfo, "ContractStatus")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ func LaKaLaApplyContract(ctx *jxcontext.Context, apply *lakala.ApplyContractPara
|
|||||||
ContractApplyId: utils.Int64ToStr(contractObj.RespData.EcApplyId),
|
ContractApplyId: utils.Int64ToStr(contractObj.RespData.EcApplyId),
|
||||||
ContractStatus: "WAIT_AUDIT ",
|
ContractStatus: "WAIT_AUDIT ",
|
||||||
ApplyType: apply.EcTypeCode,
|
ApplyType: apply.EcTypeCode,
|
||||||
|
Desc: "申请中",
|
||||||
}
|
}
|
||||||
dao.WrapAddIDCULEntity(incomingObj, ctx.GetUserName())
|
dao.WrapAddIDCULEntity(incomingObj, ctx.GetUserName())
|
||||||
if err = dao.CreateEntity(db, incomingObj); err != nil {
|
if err = dao.CreateEntity(db, incomingObj); err != nil {
|
||||||
@@ -62,6 +63,7 @@ func LaKaLaApplyContractByPeople(storeId int, apply *lakala.ApplyContractByPeopl
|
|||||||
}
|
}
|
||||||
|
|
||||||
contract.ContractStatus = "people"
|
contract.ContractStatus = "people"
|
||||||
|
contract.Desc = "申请人工审核"
|
||||||
dao.UpdateEntity(dao.GetDB(), contract, "ContractStatus")
|
dao.UpdateEntity(dao.GetDB(), contract, "ContractStatus")
|
||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
@@ -79,6 +81,7 @@ func QueryElectronicContract(orderNo string, orgId int, ecApplyId string, storeI
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
merchantInfo.ContractStatus = contractObj.AuditStatus
|
merchantInfo.ContractStatus = contractObj.AuditStatus
|
||||||
|
merchantInfo.Desc = contractObj.AuditDesc
|
||||||
dao.UpdateEntity(db, merchantInfo, "ContractStatus")
|
dao.UpdateEntity(db, merchantInfo, "ContractStatus")
|
||||||
|
|
||||||
return contractObj, nil
|
return contractObj, nil
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ type LakalaContract struct {
|
|||||||
ContractStatus string `orm:"column(contract_status);size(20)" json:"ContractStatus"` // 合同状态
|
ContractStatus string `orm:"column(contract_status);size(20)" json:"ContractStatus"` // 合同状态
|
||||||
StoreId int `orm:"column(store_id);size(16)" json:"storeId"` // 京西门店ID
|
StoreId int `orm:"column(store_id);size(16)" json:"storeId"` // 京西门店ID
|
||||||
ApplyType string `orm:"column(apply_type);size(16)" json:"applyType"` // 申请类型
|
ApplyType string `orm:"column(apply_type);size(16)" json:"applyType"` // 申请类型
|
||||||
|
Desc string `orm:"column(desc);size(512)" json:"desc"` // 说明
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *LakalaContract) TableUnique() [][]string {
|
func (o *LakalaContract) TableUnique() [][]string {
|
||||||
|
|||||||
@@ -140,6 +140,11 @@ func (p *PurchaseHandler) GetOrder4PartRefund(vendorOrderID string) (order *mode
|
|||||||
for _, os := range order.Skus {
|
for _, os := range order.Skus {
|
||||||
if _, OK := refundSkuMap[os.VendorSkuID]; !OK {
|
if _, OK := refundSkuMap[os.VendorSkuID]; !OK {
|
||||||
skuHave = append(skuHave, os)
|
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 {
|
switch msg.Cmd {
|
||||||
case ebaiapi.CmdOrderPartRefund:
|
case ebaiapi.CmdOrderPartRefund:
|
||||||
msgType := int(utils.MustInterface2Int64(msg.Body["type"]))
|
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:
|
case ebaiapi.CmdOrderUserCancel:
|
||||||
// 1表示订单完成前用户全单取消申请流程, 2表示订单完成后用户全单退款申请流程
|
// 1表示订单完成前用户全单取消申请流程, 2表示订单完成后用户全单退款申请流程
|
||||||
cancelType := int(utils.MustInterface2Int64(msg.Body["cancel_type"]))
|
cancelType := int(utils.MustInterface2Int64(msg.Body["cancel_type"]))
|
||||||
|
|||||||
@@ -35,26 +35,27 @@ func (c *LaKaLaCallbackController) ApplyContract() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// ApplyContractByPeople 合同申请人工审核回调
|
//
|
||||||
func (c *LaKaLaCallbackController) ApplyContractByPeople() {
|
//// ApplyContractByPeople 合同申请人工审核回调
|
||||||
body, err := ioutil.ReadAll(c.Ctx.Request.Body)
|
//func (c *LaKaLaCallbackController) ApplyContractByPeople() {
|
||||||
if err != nil {
|
// body, err := ioutil.ReadAll(c.Ctx.Request.Body)
|
||||||
c.Data["json"] = lakala.CallBackResultInfo(err)
|
// if err != nil {
|
||||||
c.ServeJSON()
|
// c.Data["json"] = lakala.CallBackResultInfo(err)
|
||||||
return
|
// c.ServeJSON()
|
||||||
}
|
// return
|
||||||
globals.SugarLogger.Debugf("-----applyContractByPeople := %s", string(body))
|
// }
|
||||||
apply := &lakala.ApplyContractByPeopleCallBack{}
|
// globals.SugarLogger.Debugf("-----applyContractByPeople := %s", string(body))
|
||||||
if err = json.Unmarshal(body, apply); err != nil {
|
// apply := &lakala.ApplyContractByPeopleCallBack{}
|
||||||
c.Data["json"] = lakala.CallBackResultInfo(err)
|
// if err = json.Unmarshal(body, apply); err != nil {
|
||||||
c.ServeJSON()
|
// c.Data["json"] = lakala.CallBackResultInfo(err)
|
||||||
return
|
// c.ServeJSON()
|
||||||
}
|
// return
|
||||||
|
// }
|
||||||
c.Data["json"] = lakala.CallBackResultInfo(lakalaServer.ApplyContractByPeople(apply))
|
//
|
||||||
c.ServeJSON()
|
// c.Data["json"] = lakala.CallBackResultInfo(lakalaServer.ApplyContractByPeople(apply))
|
||||||
return
|
// c.ServeJSON()
|
||||||
}
|
// return
|
||||||
|
//}
|
||||||
|
|
||||||
// SeparateMsg 商户开通/修改分账业务回调
|
// SeparateMsg 商户开通/修改分账业务回调
|
||||||
func (c *LaKaLaCallbackController) SeparateMsg() {
|
func (c *LaKaLaCallbackController) SeparateMsg() {
|
||||||
|
|||||||
Reference in New Issue
Block a user