| @@ -9,10 +9,8 @@ import org.apache.ibatis.annotations.Param; | |||||
| public interface WxCUserTagsMapper extends CommonMapper<WxCUserTags, String> { | public interface WxCUserTagsMapper extends CommonMapper<WxCUserTags, String> { | ||||
| List<WxCUserTags> findList(WxCUserTags wxCUserTags); | List<WxCUserTags> findList(WxCUserTags wxCUserTags); | ||||
| long findCountByTag(List<Long> tagIds); | |||||
| List<Long> findUserByTag(List<Long> tagIds); | |||||
| List<Long> findUserByTag(@Param("tagIds")String tagIds); | |||||
| long findCountByTags(@Param("tagIds")String tagIds); | long findCountByTags(@Param("tagIds")String tagIds); | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.simple.service.impl; | package com.simple.service.impl; | ||||
| import com.alibaba.fastjson.JSON; | |||||
| import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
| import com.github.pagehelper.PageHelper; | import com.github.pagehelper.PageHelper; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| @@ -122,7 +123,7 @@ public class WxMsgServiceImpl implements WxMsgService { | |||||
| for (int i = 0; i < arys.length; i++) { | for (int i = 0; i < arys.length; i++) { | ||||
| tagids.add(Long.parseLong(arys[i])); | tagids.add(Long.parseLong(arys[i])); | ||||
| } | } | ||||
| List<Long> userIds = wxCUserTagsMapper.findUserByTag(tagids); | |||||
| List<Long> userIds = wxCUserTagsMapper.findUserByTag(JSON.toJSONString(tagids)); | |||||
| if(userIds.size()==0) { | if(userIds.size()==0) { | ||||
| return ""; | return ""; | ||||
| } | } | ||||
| @@ -60,12 +60,8 @@ | |||||
| <include refid="dynamicWhereConditions" /> | <include refid="dynamicWhereConditions" /> | ||||
| </select> | </select> | ||||
| <select id ="findCountByTag" resultType="java.lang.Long"> | |||||
| select count(user_id) from wx_c_user_tags where JSON_CONTAINS(tags,JSON_ARRAY(#{list}) ); | |||||
| </select> | |||||
| <select id ="findUserByTag" resultType="java.lang.Long"> | <select id ="findUserByTag" resultType="java.lang.Long"> | ||||
| select user_id from wx_c_user_tags where JSON_CONTAINS(tags,JSON_ARRAY(#{list}) ); | |||||
| select user_id from wx_c_user_tags where JSON_CONTAINS(tags,#{tagIds} ); | |||||
| </select> | </select> | ||||
| <select id ="findCountByTags" resultType="java.lang.Long"> | <select id ="findCountByTags" resultType="java.lang.Long"> | ||||