群发邮件,获取活跃商户时间改为90天

master
dalong306 3 years ago
parent 51d8e1eb36
commit 6a3a214708

@ -29,7 +29,7 @@ public interface ClientMapper {
List<JSONObject> listValidClient();
List<JSONObject> listValidClientFor30Days(JSONObject params);
List<JSONObject> listValidClientFor90Days(JSONObject params);
List<JSONObject> listGreenChannel(JSONObject params);

@ -119,7 +119,7 @@ public class NoticeManageImpl implements NoticeManage {
notice.put("create_name", manager.getString("display_name"));
if (notice.getInteger("merchants_type") != 1){
StringBuilder sendClients = new StringBuilder();
List<JSONObject> clients = clientMapper.listValidClientFor30Days(notice);
List<JSONObject> clients = clientMapper.listValidClientFor90Days(notice);
clients.forEach(c -> {
if (c.getInteger("parent_client_id")==null || c.getInteger("parent_client_id")!=9){
String p = c.getString("client_moniker")+",";
@ -180,7 +180,7 @@ public class NoticeManageImpl implements NoticeManage {
if (notice.getInteger("merchants_type") != 1){
StringBuilder sendClients = new StringBuilder();
List<JSONObject> clients = clientMapper.listValidClientFor30Days(notice);
List<JSONObject> clients = clientMapper.listValidClientFor90Days(notice);
clients.forEach(c -> {
if (c.getInteger("parent_client_id")==null || c.getInteger("parent_client_id")!=9){
String p = c.getString("client_moniker")+",";

@ -7,14 +7,14 @@
WHERE is_valid = 1
and (approve_result = 1 or approve_result = 2)
</select>
<select id="listValidClientFor30Days" resultType="com.alibaba.fastjson.JSONObject">
<select id="listValidClientFor90Days" 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,
sys_client_config cc
WHERE sco.date >= DATE_SUB(CURDATE(), INTERVAL 30 DAY)
WHERE sco.date >= DATE_SUB(CURDATE(), INTERVAL 90 DAY)
AND sco.client_id = sc.client_id
AND sc.client_id = cc.client_id
<if test="merchants_type == 2">

Loading…
Cancel
Save