到家商城的订单发通知消息

+Store.LinkStoreID
This commit is contained in:
gazebo
2020-02-04 16:20:09 +08:00
parent b76404d31d
commit f118cd8331
14 changed files with 249 additions and 185 deletions

View File

@@ -5,6 +5,7 @@ import (
"time"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxutils"
"git.rosy.net.cn/jx-callback/business/model"
"git.rosy.net.cn/jx-callback/globals"
)
@@ -664,3 +665,20 @@ func SetStoreMapSyncStatus(db *DaoDB, vendorIDs, storeIDs []int, syncStatus int)
}
return ExecuteSQL(db, sql, sqlParams...)
}
func GetOrderNotifyPhones(db *DaoDB, storeID int) (phoneList []string) {
store := &model.Store{}
store.ID = storeID
if err := GetEntity(db, store); err == nil {
if store.SMSNotify != 0 {
telMap := make(map[string]int)
for _, v := range []string{store.Tel1, store.Tel2} {
if v != "" {
telMap[v] = 1
}
}
phoneList = jxutils.StringMap2List(telMap)
}
}
return phoneList
}