校验短信发送配置

This commit is contained in:
tangfutang 2019-12-26 10:37:52 +08:00
parent 4fc08e2328
commit f5a0c30dec

View File

@ -49,14 +49,14 @@ public class CheckMessageSend {
//校验发送短信设置经销商是否重复
public String checkMessageSend(JBOTransaction tx) throws Exception{
Conn conn = new Conn(tx);
String sql = "select id from SEND_TEXT_MMESSAGE where channel_no=? and msg_type=?";
List<Map<String, String>> results = conn.executeQuery(sql, channelNo,msgType);
String sql = "select id from SEND_TEXT_MMESSAGE where channel_no=? ";
List<Map<String, String>> results = conn.executeQuery(sql, channelNo);
if(id==null&&results.size()>0){
return "该经销商下的短信类型已存在!!!";
return "该经销商已存在!!!";
}else if (id != null ){
for (Map<String, String> map : results) {
if(!id.equals(map.get("id"))){
return "该经销商下的短信类型已存在!!!";
return "该经销商已存在!!!";
}
}
}