授权文件id过长
This commit is contained in:
parent
d5977c053b
commit
1d32b4b015
|
|
@ -18,30 +18,33 @@ public class InitListener implements AbstractResourceModelListener {
|
|||
BaseBean bb = new BaseBean();
|
||||
String cId = new License().getCId();
|
||||
String defaultCloseNonStandard149 = bb.getPropValue("hrmSalary", "defaultCloseNonStandard149");
|
||||
if(StringUtils.isNotBlank(cId) && "true".equals(defaultCloseNonStandard149)) {
|
||||
if (StringUtils.isNotBlank(cId) && "true".equals(defaultCloseNonStandard149)) {
|
||||
if (cId.length() > 7) {
|
||||
cId = cId.substring(cId.length() - 7);
|
||||
}
|
||||
int cid = Integer.parseInt(cId);
|
||||
if(!hasMenuInfo(cid, "left", menuid)) {
|
||||
if (!hasMenuInfo(cid, "left", menuid)) {
|
||||
bb.writeLog("149新薪酬管理 添加默认菜单控制");
|
||||
insertMenuInfo(cid, "left", menuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void insertMenuInfo(int cid,String type,int id){
|
||||
private void insertMenuInfo(int cid, String type, int id) {
|
||||
RecordSet rs = new RecordSet();
|
||||
BaseBean bb = new BaseBean();
|
||||
bb.writeLog("FunctionUpgradeUtil.getMenuId(cid,id):" + FunctionUpgradeUtil.getMenuId(cid,id));
|
||||
String sql ="INSERT INTO menucontrollist (type,menuid,isopen) VALUES('"+type+"','"+FunctionUpgradeUtil.getMenuId(cid,id)+"','"+FunctionUpgradeUtil.getMenuStatus(id,-1,cid)+"')";
|
||||
bb.writeLog("FunctionUpgradeUtil.getMenuId(cid,id):" + FunctionUpgradeUtil.getMenuId(cid, id));
|
||||
String sql = "INSERT INTO menucontrollist (type,menuid,isopen) VALUES('" + type + "','" + FunctionUpgradeUtil.getMenuId(cid, id) + "','" + FunctionUpgradeUtil.getMenuStatus(id, -1, cid) + "')";
|
||||
rs.execute(sql);
|
||||
}
|
||||
|
||||
private boolean hasMenuInfo(int cid, String type, int id) {
|
||||
RecordSet rs = new RecordSet();
|
||||
String sql = "select count(1) as count from menucontrollist where type = ? and menuid = ?";
|
||||
rs.executeQuery(sql,type, FunctionUpgradeUtil.getMenuId(cid,id));
|
||||
if(rs.next()) {
|
||||
rs.executeQuery(sql, type, FunctionUpgradeUtil.getMenuId(cid, id));
|
||||
if (rs.next()) {
|
||||
int count = rs.getInt("count");
|
||||
if(count > 0) {
|
||||
if (count > 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue