|
|
@ -100,18 +100,20 @@ public class NoticeManageImpl implements NoticeManage {
|
|
|
|
notice.put("create_time", date);
|
|
|
|
notice.put("create_time", date);
|
|
|
|
notice.put("create_id", manager.getString("manager_id"));
|
|
|
|
notice.put("create_id", manager.getString("manager_id"));
|
|
|
|
notice.put("create_name", manager.getString("display_name"));
|
|
|
|
notice.put("create_name", manager.getString("display_name"));
|
|
|
|
|
|
|
|
if (!notice.getBoolean("merchants_type")){
|
|
|
|
noticeManageMapper.createNotice(notice);
|
|
|
|
String sendClients = "";
|
|
|
|
if (noticeInfo.getStatus() != null && noticeInfo.getStatus().equals("1")) {
|
|
|
|
List<JSONObject> clients = clientMapper.listValidClient();
|
|
|
|
List<JSONObject> clients = clientMapper.listClients();
|
|
|
|
clients.forEach(c -> {
|
|
|
|
if (!clients.isEmpty()) {
|
|
|
|
String p = c+",";
|
|
|
|
for (JSONObject client : clients) {
|
|
|
|
sendClients.concat(p);
|
|
|
|
client.put("create_time", date);
|
|
|
|
});
|
|
|
|
client.put("notice_id", notice.getString("notice_id"));
|
|
|
|
if (sendClients.length()>0){
|
|
|
|
noticePartnerMapper.save(client);
|
|
|
|
sendClients.substring(0,sendClients.length()-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
notice.put("send_clients",sendClients);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
noticeManageMapper.createNotice(notice);
|
|
|
|
|
|
|
|
|
|
|
|
return notice;
|
|
|
|
return notice;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -134,6 +136,21 @@ public class NoticeManageImpl implements NoticeManage {
|
|
|
|
notice.put("send_id", manager.getString("manager_id"));
|
|
|
|
notice.put("send_id", manager.getString("manager_id"));
|
|
|
|
notice.put("send_name", manager.getString("display_name"));
|
|
|
|
notice.put("send_name", manager.getString("display_name"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!notice.getBoolean("merchants_type")){
|
|
|
|
|
|
|
|
StringBuilder sendClients = new StringBuilder();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<JSONObject> clients = clientMapper.listValidClient();
|
|
|
|
|
|
|
|
clients.forEach(c -> {
|
|
|
|
|
|
|
|
if (c.getInteger("parent_client_id")==null || c.getInteger("parent_client_id")!=9){
|
|
|
|
|
|
|
|
String p = c.getString("client_moniker")+",";
|
|
|
|
|
|
|
|
sendClients.append(p);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
if (sendClients.length()>0){
|
|
|
|
|
|
|
|
notice.put("send_clients",sendClients.substring(0,sendClients.length()-1));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
noticeManageMapper.updateNotice(notice);
|
|
|
|
noticeManageMapper.updateNotice(notice);
|
|
|
|
if (info.getStatus() != null && info.getSend_clients() != null) {
|
|
|
|
if (info.getStatus() != null && info.getSend_clients() != null) {
|
|
|
|
if (info.getStatus().equals("1") && noticeInfo.getString("status").equals("0") && !info.getSend_clients().isEmpty()) {
|
|
|
|
if (info.getStatus().equals("1") && noticeInfo.getString("status").equals("0") && !info.getSend_clients().isEmpty()) {
|
|
|
|