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