aa
This commit is contained in:
@@ -18,10 +18,12 @@ const (
|
||||
|
||||
var (
|
||||
auditStatusMap = map[int]int{
|
||||
mtpsapi.ShopStatusAuditCreated: model.StoreAuditStatusCreated,
|
||||
mtpsapi.ShopStatusAuditRejected: model.StoreAuditStatusRejected,
|
||||
mtpsapi.ShopStatusAuditPassed: model.StoreAuditStatusCreated,
|
||||
mtpsapi.ShopStatusAuditOnline: model.StoreAuditStatusOnline,
|
||||
mtpsapi.ShopStatusAuditCreated: model.StoreAuditStatusCreated,
|
||||
mtpsapi.ShopStatusAuditRejected: model.StoreAuditStatusRejected,
|
||||
mtpsapi.ShopStatusAuditPassed: model.StoreAuditStatusCreated,
|
||||
mtpsapi.ShopStatusAuditOnline: model.StoreAuditStatusOnline,
|
||||
mtpsapi.ShopStatusAuditUpdatePassed: model.StoreAuditStatusUpdated,
|
||||
mtpsapi.ShopStatusAuditUpdateRejected: model.StoreAuditStatusRejected,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -38,7 +40,7 @@ func OnStoreStatus(msg *mtpsapi.CallbackShopStatusMsg) (retVal *mtpsapi.Callback
|
||||
|
||||
func (c *DeliveryHandler) OnStoreStatus(msg *mtpsapi.CallbackShopStatusMsg) (retVal *mtpsapi.CallbackResponse) {
|
||||
globals.SugarLogger.Debugf("mtps OnStoreStatus, msg:%s", utils.Format4Output(msg, true))
|
||||
err := partner.CurStoreManager.OnCourierStoreStatusChanged(jxcontext.AdminCtx, msg.ShopID, model.VendorIDMTPS, getAuditStatus(msg.Status))
|
||||
err := partner.CurStoreManager.OnCourierStoreStatusChanged(jxcontext.AdminCtx, msg.ShopID, model.VendorIDMTPS, getAuditStatus(msg.Status), msg.RejectMessage)
|
||||
retVal = mtpsapi.Err2CallbackResponse(err, "mtps OnStoreStatus")
|
||||
return retVal
|
||||
}
|
||||
@@ -134,8 +136,17 @@ func (c *DeliveryHandler) IsErrStoreExist(err error) bool {
|
||||
}
|
||||
|
||||
func (c *DeliveryHandler) UpdateStore(ctx *jxcontext.Context, storeDetail *dao.StoreDetail2) (err error) {
|
||||
// if globals.EnableStoreWrite {
|
||||
// err = api.MtpsAPI.PagePoiUpdate(storeDetail.VendorStoreID, storeDetail.PayeeName, storeDetail.Tel1, fakeContactEmail)
|
||||
// }
|
||||
if globals.EnableStoreWrite {
|
||||
// err = api.MtpsAPI.PagePoiUpdate(storeDetail.VendorStoreID, storeDetail.PayeeName, storeDetail.Tel1, fakeContactEmail)
|
||||
shopInfo := &mtpsapi.ShopInfo{
|
||||
ShopID: utils.Int2Str(storeDetail.ID),
|
||||
ContactName: storeDetail.PayeeName,
|
||||
ContactPhone: storeDetail.Tel1,
|
||||
ShopAddress: storeDetail.Address,
|
||||
ShopLat: storeDetail.Lat,
|
||||
ShopLng: storeDetail.Lng,
|
||||
}
|
||||
_, err = api.MtpsAPI.ShopUpdate(shopInfo)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user