This commit is contained in:
邹宗楠
2024-01-17 10:11:47 +08:00
parent 1fe0ca13b0
commit 0c8c438f0e
8 changed files with 48 additions and 33 deletions

View File

@@ -2,6 +2,8 @@ package jd
import (
"git.rosy.net.cn/baseapi/platformapi/jdapi"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
)
func OnOrderMsg(msg *jdapi.CallbackOrderMsg, a *jdapi.API) (retVal *jdapi.CallbackResponse) {
@@ -21,6 +23,7 @@ func OnWaybillMsg(msg *jdapi.CallbackDeliveryStatusMsg) (retVal *jdapi.CallbackR
func OnStoreMsg(msg *jdapi.CallbackOrderMsg) (retVal *jdapi.CallbackResponse) {
if CurPurchaseHandler != nil {
retVal = CurPurchaseHandler.OnStoreMsg(AppKey2OrgCode(msg.AppKey), msg)
globals.SugarLogger.Debugf("retVal========= %s", utils.Format4Output(retVal, false))
}
return retVal
}

View File

@@ -142,12 +142,10 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
if err = dao.GetRows(db, &stores, sql, model.VendorIDJD, utils.DefaultTimeValue, storeID); err == nil {
for _, store := range stores {
a := getAPI(store.VendorOrgCode)
// phone := ""
// if store.MarketManPhone != "" {
// phone = store.MarketManPhone
// } else {
// phone = model.VendorStoreTel
// }
if store.Status == model.StoreStatusDisabled {
continue
}
storeParams := &jdapi.OpStoreParams{
StationNo: store.VendorStoreID,
Operator: userName,
@@ -339,6 +337,7 @@ func (p *PurchaseHandler) GetStoreStatus(ctx *jxcontext.Context, vendorOrgCode s
// 当前京东的storeCrud消息不会在门店状态改变时发送所以意义不大先放在这里
func (c *PurchaseHandler) OnStoreMsg(vendorOrgCode string, msg *jdapi.CallbackOrderMsg) (response *jdapi.CallbackResponse) {
globals.SugarLogger.Debugf("OnStoreMsg========= %s", utils.Format4Output(msg, false))
var err error
if msg.StatusID == jdapi.StatusIDUpdateStore {
var storeStatus int