This commit is contained in:
邹宗楠
2024-03-19 16:38:24 +08:00
parent 9225c22503
commit 10761fef9d

View File

@@ -10,8 +10,6 @@ import (
"strings"
"time"
"github.com/astaxie/beego/client/orm"
"git.rosy.net.cn/jx-callback/business/model/dao"
"git.rosy.net.cn/jx-callback/business/partner"
@@ -202,7 +200,9 @@ func ReadMsgFromVendor(vendorID int, elmAppID string, msg []byte) error {
if len(string(msg)) == 0 {
errList.AddErr(fmt.Errorf("读取平台数据为空,请检查"))
}
if vendorID == VendorIDMT {
switch vendorID {
case VendorIDMT:
var PushContentReq = mtwmapi.PushContentReq{}
err = json.Unmarshal(msg, &PushContentReq)
if len(PushContentReq.MsgContent) != 0 || PushContentReq.MsgContent != "" {
@@ -226,9 +226,7 @@ func ReadMsgFromVendor(vendorID int, elmAppID string, msg []byte) error {
if PushContentReq.OrderID != 0 {
userList.OrderID = utils.Int2Str(PushContentReq.OrderID)
}
}
if vendorID == VendorIDELM {
case VendorIDELM:
var ElmData = ebaiapi.ImMessageSend{}
err = json.Unmarshal(msg, &ElmData)
jxMsg = &JXMsg{
@@ -960,14 +958,14 @@ func GetDefaultTemplate(appID, vendorStoreID string, vendorID int) (string, erro
t string
)
store, err := dao.GetStoreDetailByVendorStoreID(dao.GetDB(), vendorStoreID, vendorID, "")
if err != nil && err != orm.ErrNoRows {
if err != nil {
return "", err
}
globals.SugarLogger.Debugf("==============err := %v", err)
globals.SugarLogger.Debugf("==============store := %v", store)
if (err != nil && err == orm.ErrNoRows) || store.Tel1 == "" {
t = BasePhoneNum
}
//if err != nil && err == orm.ErrNoRows {
// t = BasePhoneNum
//}
if len(store.Tel1) > 0 {
t = store.Tel1
}