Browse Source
Merge remote-tracking branch 'origin/master'
Merge remote-tracking branch 'origin/master'
# Conflicts: # src/main/resources/application-dev.yml # src/main/resources/mapper/grid/GridTableDefaultDao.xml # src/main/resources/mapper/grid/GridTableUserDao.xmlmaster
3 changed files with 109 additions and 0 deletions
-
2README.md
-
50src/main/resources/mapper/grid/GridTableDefaultDao.xml
-
57src/main/resources/mapper/grid/GridTableUserDao.xml
@ -0,0 +1,50 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.gaotao.modules.grid.dao.GridTableDefaultDao"> |
||||
|
<resultMap id="BaseResultMap" type="com.gaotao.modules.grid.entity.GridTableDefault"> |
||||
|
<result column="table_id" jdbcType="VARCHAR" property="tableId"/> |
||||
|
<result column="table_name" jdbcType="VARCHAR" property="tableName"/> |
||||
|
<result column="column_prop" jdbcType="VARCHAR" property="columnProp"/> |
||||
|
<result column="column_label" jdbcType="VARCHAR" property="columnLabel"/> |
||||
|
<result column="column_hidden" jdbcType="INTEGER" property="columnHidden"/> |
||||
|
<result column="column_image" jdbcType="INTEGER" property="columnImage"/> |
||||
|
<result column="column_sortable" jdbcType="INTEGER" property="columnSortable"/> |
||||
|
<result column="column_width" jdbcType="INTEGER" property="columnWidth"/> |
||||
|
<result column="format" jdbcType="VARCHAR" property="format"/> |
||||
|
</resultMap> |
||||
|
<select id="getTableDefaultListLanguage" resultType="com.gaotao.modules.grid.entity.GridTableDefault" |
||||
|
parameterType="com.gaotao.modules.grid.query.GridTableDefaultQuery"> |
||||
|
SELECT gtd.table_id, |
||||
|
gtd.column_prop, |
||||
|
ISNULL(gtl.language_value, gtd.column_label) AS column_label, |
||||
|
gtd.column_hidden, |
||||
|
gtd.column_image, |
||||
|
gtd.column_sortable, |
||||
|
gtd.column_width, |
||||
|
gtd.fixed, |
||||
|
gtd.sort_lv, |
||||
|
gtd.status, |
||||
|
gtd.table_name, |
||||
|
gtd.function_id |
||||
|
FROM grid_table_default gtd |
||||
|
LEFT JOIN sys_object_language_others gtl |
||||
|
ON (gtd.table_id = gtl.table_id AND gtd.column_prop = gtl.object_id |
||||
|
AND gtd.function_id = gtl.function_id AND gtl.language_code = #{languageCode}) |
||||
|
|
||||
|
|
||||
|
<where> |
||||
|
<if test="tableId != null and tableId != ''"> |
||||
|
gtd.table_id = #{tableId} |
||||
|
</if> |
||||
|
<if test="status != null and status != ''"> |
||||
|
and gtd.status = #{status} |
||||
|
</if> |
||||
|
<if test="functionId != null and functionId != ''"> |
||||
|
and gtd.function_id = #{functionId} |
||||
|
</if> |
||||
|
</where> |
||||
|
ORDER BY gtd.sort_lv ASC |
||||
|
|
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,57 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.gaotao.modules.grid.dao.GridTableUserDao"> |
||||
|
<resultMap id="BaseResultMap" type="com.gaotao.modules.grid.entity.GridTableUser"> |
||||
|
<result column="user_id" jdbcType="VARCHAR" property="userId"/> |
||||
|
<result column="function_id" jdbcType="VARCHAR" property="functionId"/> |
||||
|
<result column="table_id" jdbcType="VARCHAR" property="tableId"/> |
||||
|
<result column="table_name" jdbcType="VARCHAR" property="tableName"/> |
||||
|
<result column="column_prop" jdbcType="VARCHAR" property="columnProp"/> |
||||
|
<result column="column_label" jdbcType="VARCHAR" property="columnLabel"/> |
||||
|
<result column="column_hidden" jdbcType="INTEGER" property="columnHidden"/> |
||||
|
<result column="column_image" jdbcType="INTEGER" property="columnImage"/> |
||||
|
<result column="column_sortable" jdbcType="INTEGER" property="columnSortable"/> |
||||
|
<result column="column_width" jdbcType="INTEGER" property="columnWidth"/> |
||||
|
<result column="format" jdbcType="VARCHAR" property="format"/> |
||||
|
<result column="sort_lv" jdbcType="INTEGER" property="sortLv"/> |
||||
|
</resultMap> |
||||
|
<select id="getTableUserListLanguage" resultType="com.gaotao.modules.grid.entity.GridTableUser" |
||||
|
parameterType="com.gaotao.modules.grid.query.GridTableUserQuery"> |
||||
|
SELECT |
||||
|
gtd.user_id, |
||||
|
gtd.table_id, |
||||
|
gtd.column_prop, |
||||
|
ISNULL( gtl.language_value, gtd.column_label ) AS column_label, |
||||
|
gtd.column_hidden, |
||||
|
gtd.column_image, |
||||
|
gtd.column_sortable, |
||||
|
gtd.column_width, |
||||
|
gtd.fixed, |
||||
|
gtd.sort_lv, |
||||
|
gtd.status, |
||||
|
gtd.table_name, |
||||
|
gtd.function_id |
||||
|
FROM |
||||
|
grid_table_user gtd |
||||
|
LEFT JOIN sys_object_language_others gtl ON ( gtd.table_id = gtl.table_id AND gtd.column_prop = gtl.object_id |
||||
|
AND gtd.function_id = gtl.function_id AND gtl.language_code = #{languageCode} ) |
||||
|
|
||||
|
<where> |
||||
|
<if test="tableId != null and tableId != ''"> |
||||
|
gtd.table_id = #{tableId} |
||||
|
</if> |
||||
|
<if test="userId != null and userId != ''"> |
||||
|
and gtd.user_id = #{userId} |
||||
|
</if> |
||||
|
<if test="status != null and status != ''"> |
||||
|
and gtd.status = #{status} |
||||
|
</if> |
||||
|
<if test="functionId != null and functionId != ''"> |
||||
|
and gtd.function_id = #{functionId} |
||||
|
</if> |
||||
|
</where> |
||||
|
ORDER BY gtd.sort_lv ASC |
||||
|
|
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue