1
This commit is contained in:
@@ -51,7 +51,7 @@ const (
|
||||
minute2Schedule3rdCarrier4Ebai = 30 // 饿百的最少转自配送需要的时间(分钟)
|
||||
minMinute2Schedule3rdCarrier = 5 // 转三方配送最少等待时间(分钟)
|
||||
|
||||
time2AutoPickupMin = 6 * time.Minute // 自动拣货等待时间,这个只有在没有PickDeadline信息才有用,否则会根据PickDeadline设置
|
||||
time2AutoPickupMin = 9 * time.Minute // 自动拣货等待时间,这个只有在没有PickDeadline信息才有用,否则会根据PickDeadline设置
|
||||
second2AutoPickupGap = 60 //随机60秒
|
||||
time2AutoPickupAhead = 120 * time.Second // 有最后拣货时间的提前值
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
@@ -24,6 +25,7 @@ type MtwmController struct {
|
||||
}
|
||||
|
||||
var MTWMVendorStoreIDMap = new(sync.Map)
|
||||
var MTWMVendorStoreIDDontHaveMap = new(sync.Map)
|
||||
|
||||
func (c *MtwmController) onCallbackMsg(msgType string) {
|
||||
msg, callbackResponse := api.MtwmAPI.GetCallbackMsg(c.Ctx.Request)
|
||||
@@ -41,6 +43,7 @@ func (c *MtwmController) onCallbackMsg(msgType string) {
|
||||
if _, have := MTWMVendorStoreIDMap.Load(vendorStoreId); vendorStoreId != "" && !have {
|
||||
storeDetail, _ := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), vendorStoreId, model.VendorIDMTWM, "")
|
||||
if storeDetail == nil {
|
||||
MTWMVendorStoreIDDontHaveMap.Store(vendorStoreId, "2")
|
||||
switch web.BConfig.RunMode {
|
||||
case model.ServerTypeVegetable, "dev":
|
||||
callbackResponse = pushMTWMOrder2GY(msg.FormData, msgType, model.ServerTypeFruits)
|
||||
@@ -48,7 +51,9 @@ func (c *MtwmController) onCallbackMsg(msgType string) {
|
||||
callbackResponse = pushMTWMOrder2GY(msg.FormData, msgType, model.ServerTypePet)
|
||||
case model.ServerTypePet:
|
||||
callbackResponse = mtwmapi.Err2CallbackResponse(nil, "") // mtwmapi.Err2CallbackResponse(fmt.Errorf("美团菜市推果园,果园退超市未找到门店cmd:%s,storeId:%s", msgType, vendorStoreId), "")
|
||||
return
|
||||
}
|
||||
if time.Now().Hour() > 9 && time.Now().Hour() < 10 {
|
||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "2452A93EEB9111EC9B06525400E86DC0", "淘鲜达token过期", utils.Format4Output(MTWMVendorStoreIDDontHaveMap, false))
|
||||
}
|
||||
//c.Data["json"] = callbackResponse
|
||||
c.Data["json"] = mtwmapi.Err2CallbackResponse(nil, "")
|
||||
|
||||
Reference in New Issue
Block a user