diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 062e39cfe..5055de6f5 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1286,13 +1286,14 @@ func SendAlarmVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, p func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { mobile := batchItemList[0].(string) var dataList []map[string]interface{} - captionList := []string{"京西门店ID", "门店名"} + captionList := []string{"京西门店ID", "门店名", "城市"} isFirstRow := true for storeID := range userMap[mobile] { prevSnapshotMap := alarmMap[storeID] data := map[string]interface{}{ "京西门店ID": storeID, "门店名": storeDetailMap[storeID].Store.Name, + "城市": storeDetailMap[storeID].CityName, } for _, vendorID := range []int{model.VendorIDJD, model.VendorIDEBAI, model.VendorIDMTWM} { if isFirstRow { diff --git a/business/jxutils/msg/msg.go b/business/jxutils/msg/msg.go index e0e11e44d..32b9358bd 100644 --- a/business/jxutils/msg/msg.go +++ b/business/jxutils/msg/msg.go @@ -15,6 +15,9 @@ func SendUserMessage(userID, title, content string) (err error) { authList, err := auth2.GetUserBindAuthInfo(userID) findOneMethod := false if err == nil { + if title != "" { + content = title + "\n" + content + } for _, auth := range authList { if auth.Type == dingding.AuthTypeStaff { findOneMethod = true diff --git a/business/model/dao/store.go b/business/model/dao/store.go index a31438515..a98fcfaf0 100644 --- a/business/model/dao/store.go +++ b/business/model/dao/store.go @@ -23,6 +23,8 @@ type StoreDetail struct { model.Place // district info DistrictName string `json:"-"` + + CityName string } type StoreDetail2 struct { @@ -38,10 +40,13 @@ func getStoreDetail(db *DaoDB, storeID, vendorID int, vendorStoreID string) (sto SELECT t1.*, t2.vendor_store_id, t2.status vendor_status, t2.delivery_fee, t2.sync_status, t2.price_percentage, t2.auto_pickup, t2.delivery_type, t2.delivery_competition, t2.is_sync, - district.code, district.name district_name, district.parent_code, district.level, district.tel_code, district.jd_code, district.ebai_code, district.enabled, district.mtps_price + district.code, district.name district_name, district.parent_code, district.level, district.tel_code, + district.jd_code, district.ebai_code, district.enabled, district.mtps_price, + city.name city_name FROM store t1 JOIN store_map t2 ON t1.id = t2.store_id AND t2.vendor_id = ? AND t2.deleted_at = ? - LEFT JOIN place district ON t1.district_code = district.code + LEFT JOIN place city ON city.code = t1.city_code + LEFT JOIN place district ON district.code = t1.district_code WHERE t1.deleted_at = ? ` sqlParams := []interface{}{