diff --git a/src_tenwa/com/tenwa/customer/controller/group/CheckMessageSend.java b/src_tenwa/com/tenwa/customer/controller/group/CheckMessageSend.java new file mode 100644 index 000000000..9dd3b250f --- /dev/null +++ b/src_tenwa/com/tenwa/customer/controller/group/CheckMessageSend.java @@ -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> results = conn.executeQuery(sql, channelNo,msgType); + if(id==null&&results.size()>0){ + return "该经销商下的短信类型已存在!!!"; + }else if (id != null ){ + for (Map map : results) { + if(!id.equals(map.get("id"))){ + return "该经销商下的短信类型已存在!!!"; + } + } + } + return "true"; + + } +}