客户建议发送内容修改

This commit is contained in:
苏尹岚
2020-05-21 14:57:16 +08:00
parent 13825af092
commit 18128e9433
2 changed files with 12 additions and 8 deletions

View File

@@ -57,9 +57,9 @@ var (
// "周扬",
},
SendMsgTypeSuggestRequest: []string{
"石锋",
// "石锋",
// "x",
// "周扬",
"周扬",
},
}
needConfirmRequestMap = map[string]int{
@@ -237,9 +237,9 @@ func SendMsg2Somebody(ctx *jxcontext.Context, mobileNum, verifyCode, msgType, ms
vendorOrderID string
)
sql := `
SELECT * FROM store WHERE tel1 = ? OR tel2 = ?
SELECT * FROM store WHERE (tel1 = ? OR tel2 = ?) AND deleted_at = ?
`
sqlParams := []interface{}{mobileNum}
sqlParams := []interface{}{mobileNum, utils.DefaultTimeValue}
err = dao.GetRows(db, &stores, sql, sqlParams)
if len(stores) > 0 {
storeName = stores[0].Name
@@ -256,7 +256,7 @@ func SendMsg2Somebody(ctx *jxcontext.Context, mobileNum, verifyCode, msgType, ms
if len(authBinds) > 0 {
user, _ := dao.GetUserByID(db, "user_id", authBinds[0].UserID)
mobileNum = *user.Mobile
sqlParams4 := []interface{}{mobileNum}
sqlParams4 := []interface{}{mobileNum, utils.DefaultTimeValue}
err = dao.GetRows(db, &stores, sql, sqlParams4)
if len(stores) > 0 {
storeName = stores[0].Name
@@ -277,6 +277,9 @@ func SendMsg2Somebody(ctx *jxcontext.Context, mobileNum, verifyCode, msgType, ms
if order != nil {
vendorOrderID = order.VendorOrderID
}
if storeID == 0 {
vendorOrderID = ""
}
msgContent = msgContent + " 门店名称:" + storeName + " 门店ID" + utils.Int2Str(storeID) + " 最新订单号:" + vendorOrderID
for _, v := range receiveMsgUsersMap[msgType] {
user, err2 := dao.GetUserByID(db, "name", v)

View File

@@ -1101,7 +1101,7 @@ func (v *VendorSync) SyncJdsStoresSkus(ctx *jxcontext.Context, storeIDs []int, v
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
storeMap := batchItemList[0].(*model.StoreMap)
if storeMap.Status > model.StoreStatusDisabled && storeMap.StoreID != model.JdShopMainStoreID && storeMap.SyncRule != 0 {
err = syncJdsStoresSkus(ctx, db, storeMap)
err = syncJdsStoresSkus(ctx, db, task, storeMap)
}
return nil, err
}, loopMapInfo.StoreMapList)
@@ -1113,7 +1113,7 @@ func (v *VendorSync) SyncJdsStoresSkus(ctx *jxcontext.Context, storeIDs []int, v
return hint, err
}
func syncJdsStoresSkus(ctx *jxcontext.Context, db *dao.DaoDB, storeMap *model.StoreMap) (err error) {
func syncJdsStoresSkus(ctx *jxcontext.Context, db *dao.DaoDB, parentTask tasksch.ITask, storeMap *model.StoreMap) (err error) {
var (
mainSkusMap = make(map[int]*model.StoreSkuBind)
)
@@ -1126,10 +1126,11 @@ func syncJdsStoresSkus(ctx *jxcontext.Context, db *dao.DaoDB, storeMap *model.St
if mainSkusMap[v.SkuID] != nil {
} else {
if storeMap.SyncRule == 1 {
if storeMap.SyncRule == 2 {
}
}
}
return err
}