Merge branch 'mark' of e.coding.net:rosydev/jx-callback into mark

This commit is contained in:
gazebo
2019-12-17 11:25:44 +08:00
5 changed files with 11 additions and 1 deletions

View File

@@ -172,6 +172,7 @@ var (
"deliveryRangeType": 1,
"deliveryRange": 1,
"status": 1,
"promoteInfo": 1,
}
WatchVendorStoreTimeList = []string{
@@ -836,6 +837,10 @@ func UpdateStore(ctx *jxcontext.Context, storeID int, payload map[string]interfa
}
}
if valid["promoteInfo"] != nil {
valid["promoteInfo"] = strings.ReplaceAll(valid["promoteInfo"].(string), "{phone}", store.Tel1)
}
for k, _ := range valid {
if roleMap[k] != "" {
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {

View File

@@ -326,6 +326,7 @@ type Store struct {
OperatorPhone2 string `orm:"size(16)" json:"operatorPhone2"` // 非京东运营人电话
OperatorRole2 string `orm:"size(32)" json:"operatorRole2"` // 非京东运营人组(角色)
PromoteInfo string `orm:"size(255)" json:"promoteInfo"` //门店公告(所有平台统一的公告)
}
func (*Store) TableUnique() [][]string {

View File

@@ -193,6 +193,9 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
}
params := genStoreMapFromStore(store)
if err = api.EbaiAPI.ShopUpdate(params); err == nil {
if store.PromoteInfo != "" {
err = api.EbaiAPI.ShopAnnouncementSet("", utils.Str2Int64(store.VendorStoreID), store.PromoteInfo)
}
}
}
}

View File

@@ -170,7 +170,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
storeParams.City = storeParams.County
storeParams.County = specialDistrictMap[storeParams.County]
}
storeParams.StoreNotice = store.PromoteInfo
modifyCloseStatus := false
if store.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagDeletedMask|model.SyncFlagStoreStatus) != 0 {
modifyCloseStatus = true

View File

@@ -127,6 +127,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
"open_level": remoteStoreInfo.OpenLevel,
"is_online": remoteStoreInfo.IsOnline,
"third_tag_name": remoteStoreInfo.ThirdTagName,
"promotion_info": storeDetail.PromoteInfo,
}
// globals.SugarLogger.Debug(utils.Format4Output(params, false))
if globals.EnableMtwmStoreWrite {