Merge branch 'develop'

# Conflicts:
#	pom.xml
master
taylor.dang 5 years ago
commit 908f44352a

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.0.24</version>
<version>1.0.25</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

@ -26,6 +26,8 @@ public interface ClientMapper {
List<JSONObject> listValidClient();
List<JSONObject> listValidClientFor30Days();
List<JSONObject> listGreenChannel(JSONObject params);
@AutoSql(type = SqlType.SELECT)

@ -108,7 +108,7 @@ public class NoticeManageImpl implements NoticeManage {
notice.put("create_name", manager.getString("display_name"));
if (!notice.getBoolean("merchants_type")){
StringBuilder sendClients = new StringBuilder();
List<JSONObject> clients = clientMapper.listValidClient();
List<JSONObject> clients = clientMapper.listValidClientFor30Days();
clients.forEach(c -> {
if (c.getInteger("parent_client_id")==null || c.getInteger("parent_client_id")!=9){
String p = c.getString("client_moniker")+",";
@ -146,7 +146,7 @@ public class NoticeManageImpl implements NoticeManage {
if (!notice.getBoolean("merchants_type")){
StringBuilder sendClients = new StringBuilder();
List<JSONObject> clients = clientMapper.listValidClient();
List<JSONObject> clients = clientMapper.listValidClientFor30Days();
clients.forEach(c -> {
if (c.getInteger("parent_client_id")==null || c.getInteger("parent_client_id")!=9){
String p = c.getString("client_moniker")+",";
@ -292,8 +292,7 @@ public class NoticeManageImpl implements NoticeManage {
public int listNoticeClients(String noticeId) {
JSONObject params = new JSONObject();
params.put("notice_id", noticeId);
int clients = noticePartnerMapper.countClientsByNoticeId(params);
return clients;
return noticePartnerMapper.countClientsByNoticeId(params);
}

@ -5,6 +5,17 @@
SELECT client_id,client_moniker,parent_client_id FROM sys_clients
WHERE is_valid=1 and (approve_result = 1 or approve_result = 2)
</select>
<select id="listValidClientFor30Days" resultType="com.alibaba.fastjson.JSONObject">
SELECT
DISTINCT
sc.client_id,
sc.client_moniker,
sc.parent_client_id
FROM statistics_customer_order sco,
sys_clients sc
WHERE sco.date >= DATE_SUB(CURDATE(), INTERVAL 30 DAY)
AND sco.client_id = sc.client_id
</select>
<select id="listGreenChannel" resultType="com.alibaba.fastjson.JSONObject">
select m.manager_id manager_id,m.display_name display_name, m.wx_openid wx_openid , c.client_moniker
client_moniker

Loading…
Cancel
Save