|
@@ -160,7 +160,7 @@ func FormatTag(data map[string]interface{}, count int) {
|
|
|
keyStr := ""
|
|
|
phoneRegexp := regexp.MustCompile(`^1[0-9]{10}$`)
|
|
|
keyMap := map[string]bool{}
|
|
|
- matchArr := Base.SelectBySql(`select name from socialize_keyword where mold=0 and state=0 and FIND_IN_SET(2,group) `)
|
|
|
+ matchArr := Base.SelectBySql(`select aa.name from socialize_keyword aa where aa.mold=0 and aa.state=0 and FIND_IN_SET(2,aa.group) `)
|
|
|
sqls := fmt.Sprintf(`select b.content from socialize_message_mailbox a LEFT JOIN socialize_message b on b.id = a.messag_id where a.type in (4,5,7) and a.own_type = 2 and a.own_id = %d and b.title = "文本" and a.send_user_type = 2 and a.create_time >= "%s"`, base_user_id, time.Now().AddDate(0, 0, -30).Format("2006-01-02 15:04:05"))
|
|
|
mData := Base.SelectBySql(sqls)
|
|
|
if mData != nil && *mData != nil && len(*mData) > 0 {
|
|
@@ -319,7 +319,7 @@ func messageSync() {
|
|
|
for _, v := range *data {
|
|
|
isOk := false
|
|
|
content := common.ObjToString(v["content"])
|
|
|
- matchArr := Base.SelectBySql(`select name from socialize_keyword where mold=0 and state=0 and FIND_IN_SET(2,group) `)
|
|
|
+ matchArr := Base.SelectBySql(`select aa.name from socialize_keyword aa where aa.mold=0 and aa.state=0 and FIND_IN_SET(2,aa.group) `)
|
|
|
for _, vv := range *matchArr {
|
|
|
key := gconv.String(vv["name"])
|
|
|
if strings.Contains(strings.ToUpper(content), strings.ToUpper(key)) || phoneRegexp.MatchString(content) {
|
|
@@ -359,7 +359,7 @@ func customerButton() {
|
|
|
for _, v := range *data {
|
|
|
isOk := false
|
|
|
content := common.ObjToString(v["content"])
|
|
|
- matchArr := Base.SelectBySql(`select name from socialize_keyword where mold=0 and state=1 and FIND_IN_SET(2,group) `)
|
|
|
+ matchArr := Base.SelectBySql(`select aa.name from socialize_keyword aa where aa.mold=1 and aa.state=1 and FIND_IN_SET(2,aa.group) `)
|
|
|
for _, vv := range *matchArr {
|
|
|
key := gconv.String(vv["name"])
|
|
|
if strings.Contains(strings.ToUpper(content), strings.ToUpper(key)) {
|