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