This commit is contained in:
苏尹岚
2021-03-17 11:14:08 +08:00
parent 90860121bd
commit f02062d9f4

View File

@@ -1,7 +1,9 @@
package cms
import (
"git.rosy.net.cn/baseapi/platformapi/dingdingapi"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxutils/ddmsg"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/business/model/dao"
@@ -33,6 +35,10 @@ func (s *StoreManager) OnStoreStatusChanged(vendorStoreID string, vendorID int,
storeKV = map[string]interface{}{
"Status": model.StoreStatusOpened,
}
content := "您的门店 [" + storeDetail.Name + "]ID:[" + utils.Int2Str(storeDetail.ID) + "],在[" + model.VendorChineseNames[vendorID] + "] 平台上营业状态和京西不一致!平台状态:【营业】,京西状态:【非营业】"
if user, err := dao.GetUserByID(db, "mobile", storeDetail.MarketManPhone); err == nil {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "平台门店状态变化", content)
}
}
if storeDetail.VendorStatus != model.StoreStatusOpened {
storeMapKV = map[string]interface{}{
@@ -46,6 +52,10 @@ func (s *StoreManager) OnStoreStatusChanged(vendorStoreID string, vendorID int,
"Status": storeStatus,
}
}
content := "您的门店 [" + storeDetail.Name + "]ID:[" + utils.Int2Str(storeDetail.ID) + "],在[" + model.VendorChineseNames[vendorID] + "] 平台上营业状态和京西不一致!平台状态:【非营业】,京西状态:【营业】"
if user, err := dao.GetUserByID(db, "mobile", storeDetail.MarketManPhone); err == nil {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "平台门店状态变化", content)
}
} else if storeDetail.Status <= storeStatus {
if storeDetail.VendorStatus != model.StoreStatusOpened {
storeMapKV = map[string]interface{}{