Browse Source

修改消息推送

wanghui 8 years ago
parent
commit
f392f555ee

+ 1 - 7
src/main/java/com/goafanti/message/service/impl/MessageServiceImpl.java

@@ -48,13 +48,7 @@ public class MessageServiceImpl  extends BaseMybatisDao<MessageFromSystemMapper>
 		}else if(selectMap.containsKey(ConsumerType.USER_RETAIL.getTypeCode())){
 			return selectMap.get(ConsumerType.USER_RETAIL.getTypeCode()); //用户散户
 		}else if(selectMap.containsKey(ConsumerType.SOCIETY_TAG.getTypeCode())){ // 社会标签
-			String sql  = "select group_concat(id) from user where";
-			StringBuffer tmp = new StringBuffer();
-			String[] societys = selectMap.get(ConsumerType.SOCIETY_TAG.getTypeCode()).split(",");
-			for(String s:societys){
-				tmp.append(" or society_tag like "+s);
-			}
-			if(tmp.length()>0) sql = sql + "(" +tmp.substring(3) + ")" +" and a.source=0 and status != 2";
+			String sql  = "select group_concat(id) from user where source=0 and status != 2 and society_tag in("+ selectMap.get(ConsumerType.SOCIETY_TAG.getTypeCode()) +")";		
 			return messageFromSystemMapper.selectSendTarget(sql);
 		}else if(selectMap.containsKey(ConsumerType.LOCATION.getTypeCode())){ //用户地区
 			String sql = "";