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