Skip to content

Commit

Permalink
细节优化;mysql代码生成,去掉自动转大写。
Browse files Browse the repository at this point in the history
  • Loading branch information
think-gem committed Oct 2, 2016
1 parent ec17266 commit e23e2c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,14 @@ public Void execute(CommandContext commandContext) {
execution.setActivity(activity);
execution.performOperation(AtomicOperation.TRANSITION_CREATE_SCOPE);

//删除当前的任务,不能删除当前正在执行的任务,所以要先清除掉关联
if (variables != null) {
if (currentTaskEntity.getExecutionId() != null) {
currentTaskEntity.setExecutionVariables(variables);
} else {
currentTaskEntity.setVariables(variables);
}
}

//删除当前的任务,不能删除当前正在执行的任务,所以要先清除掉关联
Context.getCommandContext().getTaskEntityManager().deleteTask(currentTaskEntity, TaskEntity.DELETE_REASON_DELETED, false);
}
return null;
Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/mappings/modules/gen/GenDataBaseDictDao.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
FROM sys.objects t LEFT JOIN sys.extended_properties b ON b.major_id=t.object_id and b.minor_id=0 and b.class=1 AND b.name='MS_Description'
WHERE t.type='U'
<if test="name != null and name != ''">
AND t.name = upper(#{name})
AND t.name = (#{name})
</if>
ORDER BY t.name
</if>
Expand All @@ -28,7 +28,7 @@
FROM information_schema.`TABLES` t
WHERE t.TABLE_SCHEMA = (select database())
<if test="name != null and name != ''">
AND t.TABLE_NAME = upper(#{name})
AND t.TABLE_NAME = (#{name})
</if>
ORDER BY t.TABLE_NAME
</if>
Expand Down Expand Up @@ -73,7 +73,7 @@
AND t.ORDINAL_POSITION = g.minor_id AND g.name='MS_Description'
WHERE t.TABLE_SCHEMA = (SCHEMA_NAME())
<if test="name != null and name != ''">
AND t.TABLE_NAME = upper(#{name})
AND t.TABLE_NAME = (#{name})
</if>
ORDER BY t.ORDINAL_POSITION
</if>
Expand All @@ -83,7 +83,7 @@
FROM information_schema.`COLUMNS` t
WHERE t.TABLE_SCHEMA = (select database())
<if test="name != null and name != ''">
AND t.TABLE_NAME = upper(#{name})
AND t.TABLE_NAME = (#{name})
</if>
ORDER BY t.ORDINAL_POSITION
</if>
Expand All @@ -100,14 +100,14 @@
<if test="dbName == 'mssql'">
SELECT lower(au.COLUMN_NAME) AS columnName
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE au
WHERE au.TABLE_NAME = upper(#{name})
WHERE au.TABLE_NAME = (#{name})
AND au.TABLE_SCHEMA = (SCHEMA_NAME())
</if>
<if test="dbName == 'mysql'">
SELECT lower(au.COLUMN_NAME) AS columnName
FROM information_schema.`COLUMNS` au
WHERE au.TABLE_SCHEMA = (select database())
AND au.COLUMN_KEY='PRI' AND au.TABLE_NAME = upper(#{name})
AND au.COLUMN_KEY='PRI' AND au.TABLE_NAME = (#{name})
</if>
</select>

Expand Down
1 change: 0 additions & 1 deletion src/main/webapp/WEB-INF/views/modules/sys/officeForm.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
<form:select path="useable">
<form:options items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
<span class="help-inline">“是”代表此账号允许登陆,“否”则表示此账号不允许登陆</span>
</div>
</div>
<div class="control-group">
Expand Down

0 comments on commit e23e2c5

Please sign in to comment.