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

+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
}

View File

@@ -272,10 +272,11 @@ type Store struct {
DeliveryRangeType int8 `json:"deliveryRangeType"` // 参见相关常量定义
DeliveryRange string `orm:"type(text)" json:"deliveryRange"` // 如果DeliveryRangeType为DeliveryRangeTypePolygon则为逗号分隔坐标分号分隔的坐标点坐标与Lng和Lat一样都是整数比如 121361504,31189308;121420555,31150238。否则为半径单位为米
Status int `json:"status"`
AutoEnableAt *time.Time `orm:"type(datetime);null" json:"autoEnableAt"` // 自动营业时间(临时休息用)
ChangePriceType int8 `json:"changePriceType"` // 修改价格类型,即是否需要审核
SMSNotify int8 `orm:"column(sms_notify);" json:"smsNotify"` // 是否通过短信接收订单消息
AutoReplyType int8 `json:"autoReplyType"` // 订单评价自动回复类型
AutoEnableAt *time.Time `orm:"type(datetime);null" json:"autoEnableAt"` // 自动营业时间(临时休息用)
ChangePriceType int8 `json:"changePriceType"` // 修改价格类型,即是否需要审核
SMSNotify int8 `orm:"column(sms_notify);" json:"smsNotify"` // 是否通过短信接收订单消息
AutoReplyType int8 `json:"autoReplyType"` // 订单评价自动回复类型
LinkStoreID int `orm:"column(link_store_id);default(0)" json:"linkStoreID"` // 关联门店ID
PrinterDisabled int8 `orm:"default(0)" json:"printerDisabled"` // 是否禁用网络打印机
PrinterFontSize int8 `orm:"default(0)" json:"printerFontSize"` // 打印字体-10正常1