46 lines
1.2 KiB
Java
46 lines
1.2 KiB
Java
package com.tenwa.app.wechat;
|
|
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import com.amarsoft.are.jbo.JBOException;
|
|
import com.amarsoft.are.jbo.JBOTransaction;
|
|
import com.tenwa.comm.util.jboutil.DataOperatorUtil;
|
|
|
|
public class WechatPublicAccountInfoVerify {
|
|
private String subject_name;
|
|
private String id;
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
public String getSubject_name() {
|
|
return subject_name;
|
|
}
|
|
public void setSubject_name(String subject_name) {
|
|
this.subject_name = subject_name;
|
|
}
|
|
|
|
/**
|
|
* 1: 新增主体对公账户信息时, 对启用状态的数据进行校验, 已存在该主体启用账户信息不允许新增.
|
|
* @param tx
|
|
* @return
|
|
* @throws Exception
|
|
*/
|
|
public String soleVerify(JBOTransaction tx) throws Exception {
|
|
String returns="true";
|
|
try {
|
|
String sql="SELECT SUBJECT_NAME FROM LB_MANY_SUBJECT WHERE SUBJECT_NAME='"+subject_name+"' AND IS_ENABLE='Y' AND ID <> '"+id+"'";
|
|
List<Map<String,String>> dataList=DataOperatorUtil.getDataBySql(tx, sql, null);
|
|
if(dataList.size()>0) {
|
|
returns="false";
|
|
}
|
|
return returns;
|
|
} catch (JBOException e) {
|
|
e.printStackTrace();
|
|
return returns;
|
|
}
|
|
}
|
|
}
|