建模索引修改判断逻辑
This commit is contained in:
parent
df063e5589
commit
3a7582940a
@ -4106,13 +4106,26 @@ public class DesignerRelationShapeWeb extends ActionWeb {
|
||||
*/
|
||||
public String checkUserFirstCreateModel(String methodId,String type) {
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
String sql = "SELECT COUNT(1) FROM APP_ACT_COE_PAL_REPOSITORY WHERE CREATEUSER=? AND PLMETHODID=?";
|
||||
String sql = "SELECT COUNT(1) FROM APP_ACT_COE_PAL_REPOSITORY WHERE CREATEUSER=? AND PLMETHODID=? ";
|
||||
String uid = _uc.getUID();
|
||||
int anInt = DBSql.getInt(sql, new Object[]{uid, methodId});
|
||||
System.out.println("是否第一次新建模型>>>>>"+anInt);
|
||||
//只有一条记录的时候判断是否第一次创建对应模型
|
||||
if (type.equals("0")) {
|
||||
if (anInt > 1) {
|
||||
if (anInt == 1) {
|
||||
String getCreateDateSql = "SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE CREATEUSER='" + uid + "' AND PLMETHODID='" + methodId + "'";
|
||||
String getID = DBSql.getString(getCreateDateSql);
|
||||
String isfirstSql = "SELECT ISFIRSTCREATE FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID = '"+getID+"'";
|
||||
String isfirst= DBSql.getString(isfirstSql);
|
||||
System.out.println("isfirst>>>>>>>>"+isfirst);
|
||||
if (isfirst==null||isfirst==""){
|
||||
DBSql.update("UPDATE APP_ACT_COE_PAL_REPOSITORY SET ISFIRSTCREATE = 1 WHERE ID = '"+getID+"'");
|
||||
ro.put("isFirst", true);
|
||||
}else if (isfirst.equals("1")){
|
||||
ro.put("isFirst", false);
|
||||
}
|
||||
|
||||
} else if (anInt > 1) {
|
||||
ro.put("isFirst", false);
|
||||
} else {
|
||||
ro.put("isFirst", true);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user