短信发送取消设置进行校验
This commit is contained in:
parent
e70beaed23
commit
ff47871346
@ -0,0 +1,66 @@
|
||||
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=? and msg_type=?";
|
||||
List<Map<String, String>> results = conn.executeQuery(sql, channelNo,msgType);
|
||||
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";
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user