Commit a466113c authored by 李健华's avatar 李健华

修改过滤user_id为空值

parent ef1e9ccb
...@@ -149,7 +149,7 @@ public class WechatFollowServiceImpl implements IWechatFollowService { ...@@ -149,7 +149,7 @@ public class WechatFollowServiceImpl implements IWechatFollowService {
String openIdStrs = String.join("\',\'", openIds); String openIdStrs = String.join("\',\'", openIds);
openIdStrs = "\'" + openIdStrs + "\'"; openIdStrs = "\'" + openIdStrs + "\'";
// 添加公众号数据 // 添加公众号数据
String sql = String.format("INSERT INTO wechat_info_relation(`user_id`, `open_id`, `union_id`, `type`, `task_period`) SELECT `user_id`, `open_id`, `union_id`, '%s', %s from wechat_userinfo where app_name='%s' and `open_id` IN (%s)", WECHAT_ACCOUNT, period, WECHAT_XYQB, openIdStrs); String sql = String.format("INSERT INTO wechat_info_relation(`user_id`, `open_id`, `union_id`, `type`, `task_period`) SELECT `user_id`, `open_id`, `union_id`, '%s', %s from wechat_userinfo where app_name='%s' and user_id is not null and `open_id` IN (%s)", WECHAT_ACCOUNT, period, WECHAT_XYQB, openIdStrs);
jdbcTemplate.update(sql); jdbcTemplate.update(sql);
} }
if (nextOpenId != "") { if (nextOpenId != "") {
...@@ -231,7 +231,7 @@ public class WechatFollowServiceImpl implements IWechatFollowService { ...@@ -231,7 +231,7 @@ public class WechatFollowServiceImpl implements IWechatFollowService {
String unionIdStrs = String.join("\',\'", unionIds); String unionIdStrs = String.join("\',\'", unionIds);
unionIdStrs = "\'" + unionIdStrs + "\'"; unionIdStrs = "\'" + unionIdStrs + "\'";
// String sql = String.format("INSERT INTO wechat_enterprise(`unionid`) values ('%s')", String.join(",", unionIdAll)); // String sql = String.format("INSERT INTO wechat_enterprise(`unionid`) values ('%s')", String.join(",", unionIdAll));
String sql = String.format("INSERT INTO wechat_info_relation(`user_id`, `open_id`, `union_id`, `type`, `task_period`) SELECT `user_id`, `open_id`, `union_id`, '%s', %s from wechat_userinfo where `union_id` IN (%s)", ENTERPRISE_WECHAT, period, unionIdStrs); String sql = String.format("INSERT INTO wechat_info_relation(`user_id`, `open_id`, `union_id`, `type`, `task_period`) SELECT `user_id`, `open_id`, `union_id`, '%s', %s from wechat_userinfo where user_id is no null and `union_id` IN (%s)", ENTERPRISE_WECHAT, period, unionIdStrs);
jdbcTemplate.update(sql); jdbcTemplate.update(sql);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment