1
This commit is contained in:
@@ -564,6 +564,10 @@ func CheckAndReply(req *JXMsg, elmAppID string) (err error) {
|
||||
temp := mt
|
||||
//获取自定义回复模板
|
||||
if template := GetCustomTemplate(utils.Int2Str(mt.AppID), mt.AppPoiCode); len(template.Template) > 0 {
|
||||
// 关闭自动回复
|
||||
if template.Template == "3ASOkN9WiU3AUae2tYGChA==" {
|
||||
return nil
|
||||
}
|
||||
temp.MsgContent = template.Template
|
||||
} else {
|
||||
temp.MsgContent, err = GetDefaultTemplate(utils.Int2Str(mt.AppID), mt.AppPoiCode, VendorIDMT)
|
||||
@@ -930,7 +934,7 @@ func GetCustomTemplate(appID, vendorStoreID string) (storeTemplate StoreTemplate
|
||||
|
||||
// AddCustomReply 增加门店自定义回复模板
|
||||
func AddCustomReply(appID, vendorStoreID, replyTemplate string) (storeTemplate string, err error) {
|
||||
if len(appID) == 0 || len(vendorStoreID) == 0 || len(replyTemplate) == 0 {
|
||||
if len(appID) == 0 || len(vendorStoreID) == 0 {
|
||||
return "", errors.New("参数错误请检查!")
|
||||
}
|
||||
|
||||
@@ -942,7 +946,7 @@ func AddCustomReply(appID, vendorStoreID, replyTemplate string) (storeTemplate s
|
||||
data, _ := json.Marshal(template)
|
||||
|
||||
err = rdb.Del(key)
|
||||
if err == nil {
|
||||
if err == nil && replyTemplate != "" {
|
||||
err = rdb.RPush(key, data)
|
||||
//err = rdb.Set(key, replyTemplate, 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user