67 lines
1.2 KiB
Java
67 lines
1.2 KiB
Java
package com.tenwa.customer.controller.group;
|
|
|
|
import java.text.DateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
import com.amarsoft.are.jbo.JBOTransaction;
|
|
import com.tenwa.reckon.util.Conn;
|
|
|
|
public class CheckMessageSend {
|
|
|
|
private String channelNo;//渠道编号
|
|
private String msgType;//短息类型
|
|
private String id;
|
|
|
|
|
|
public String getChannelNo() {
|
|
return channelNo;
|
|
}
|
|
|
|
|
|
public void setChannelNo(String channelNo) {
|
|
this.channelNo = channelNo;
|
|
}
|
|
|
|
|
|
public String getMsgType() {
|
|
return msgType;
|
|
}
|
|
|
|
|
|
public void setMsgType(String msgType) {
|
|
this.msgType = msgType;
|
|
}
|
|
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
|
|
//校验发送短信设置经销商是否重复
|
|
public String checkMessageSend(JBOTransaction tx) throws Exception{
|
|
Conn conn = new Conn(tx);
|
|
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 "该经销商已存在!!!";
|
|
}else if (id != null ){
|
|
for (Map<String, String> map : results) {
|
|
if(!id.equals(map.get("id"))){
|
|
return "该经销商已存在!!!";
|
|
}
|
|
}
|
|
}
|
|
return "true";
|
|
|
|
}
|
|
}
|