订单提醒统计

This commit is contained in:
suyl
2021-08-27 11:28:23 +08:00
parent fdf09c0f29
commit 0f0f8948cc
2 changed files with 10 additions and 2 deletions

View File

@@ -2,6 +2,7 @@ package smsmsg
import ( import (
"fmt" "fmt"
"git.rosy.net.cn/jx-callback/business/partner"
aliyunsmsclient "github.com/KenmyZhang/aliyun-communicate" aliyunsmsclient "github.com/KenmyZhang/aliyun-communicate"
dyvmsapiclient "github.com/alibabacloud-go/dyvmsapi-20170525-2.0.2/client" dyvmsapiclient "github.com/alibabacloud-go/dyvmsapi-20170525-2.0.2/client"
"github.com/alibabacloud-go/tea/tea" "github.com/alibabacloud-go/tea/tea"
@@ -124,9 +125,9 @@ func NotifyPickOrder(order *model.GoodsOrder) (err error) {
} }
if store.SMSNotify != 0 && store.IsOrder == model.NO && store.ID != model.MatterStoreID && store.ID != model.JdShopMainStoreID && len(mobileList) > 0 { if store.SMSNotify != 0 && store.IsOrder == model.NO && store.ID != model.MatterStoreID && store.ID != model.JdShopMainStoreID && len(mobileList) > 0 {
switch store.SMSNotify { switch store.SMSNotify {
case 1: case model.NotifyTypeSMS:
err = SendSMSMsg(mobileList, globals.SMSSignName, globals.SMSPickOrderTemplate, nil, order) err = SendSMSMsg(mobileList, globals.SMSSignName, globals.SMSPickOrderTemplate, nil, order)
case 2: case model.NotifyTypeVoice:
if store.MarketManPhone == "" { if store.MarketManPhone == "" {
store.MarketManPhone = "18048531223" store.MarketManPhone = "18048531223"
} }
@@ -135,6 +136,10 @@ func NotifyPickOrder(order *model.GoodsOrder) (err error) {
}) })
} }
} }
if err == nil {
order.NotifyType = int(store.SMSNotify)
partner.CurOrderManager.UpdateOrderFields(order, []string{"NotifyType"})
}
//} //}
return err return err
} }

View File

@@ -29,6 +29,9 @@ const (
EarningTypeQuote = 1 //报价模式 EarningTypeQuote = 1 //报价模式
EarningTypePoints = 2 //扣点模式 EarningTypePoints = 2 //扣点模式
NotifyTypeSMS = 1 //短信提醒
NotifyTypeVoice = 2 //语音提醒
) )
const ( const (