You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
3.2 KiB

8 months ago
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.gaotao.modules.grid.dao.GridTableUserDao">
  4. <resultMap id="BaseResultMap" type="com.gaotao.modules.grid.entity.GridTableUser">
  5. <result column="user_id" jdbcType="VARCHAR" property="userId"/>
  6. <result column="function_id" jdbcType="VARCHAR" property="functionId"/>
  7. <result column="table_id" jdbcType="VARCHAR" property="tableId"/>
  8. <result column="table_name" jdbcType="VARCHAR" property="tableName"/>
  9. <result column="column_prop" jdbcType="VARCHAR" property="columnProp"/>
  10. <result column="column_label" jdbcType="VARCHAR" property="columnLabel"/>
  11. <result column="column_hidden" jdbcType="INTEGER" property="columnHidden"/>
  12. <result column="column_image" jdbcType="INTEGER" property="columnImage"/>
  13. <result column="column_sortable" jdbcType="INTEGER" property="columnSortable"/>
  14. <result column="column_width" jdbcType="INTEGER" property="columnWidth"/>
  15. <result column="format" jdbcType="VARCHAR" property="format"/>
  16. <result column="sort_lv" jdbcType="INTEGER" property="sortLv"/>
  17. </resultMap>
  18. <select id="getTableUserListLanguage" resultType="com.gaotao.modules.grid.entity.GridTableUser"
  19. parameterType="com.gaotao.modules.grid.query.GridTableUserQuery">
  20. SELECT
  21. gtd.user_id,
  22. gtd.table_id,
  23. gtd.column_prop,
  24. ISNULL( gtl.language_value, gtd.column_label ) AS column_label,
  25. gtd.column_hidden,
  26. gtd.column_image,
  27. gtd.column_sortable,
  28. gtd.column_width,
  29. gtd.fixed,
  30. gtd.sort_lv,
  31. gtd.status,
  32. gtd.table_name,
  33. gtd.function_id,
  34. gtd.column_type,
  35. gtd.align,
  36. gtd.header_align
  37. FROM
  38. grid_table_user gtd
  39. LEFT JOIN sys_object_language_others gtl ON ( gtd.table_id = gtl.table_id AND gtd.column_prop = gtl.object_id
  40. AND gtd.function_id = gtl.function_id )
  41. <where>
  42. gtl.object_type='table' AND gtl.language_code = #{languageCode}
  43. <if test="tableId != null and tableId != ''">
  44. and gtd.table_id = #{tableId,jdbcType=VARCHAR}
  45. </if>
  46. <if test="objectType != null and objectType != ''">
  47. and gtl.object_type = #{objectType,jdbcType=VARCHAR}
  48. </if>
  49. <if test="userId != null and userId != ''">
  50. and gtd.user_id = #{userId,jdbcType=VARCHAR}
  51. </if>
  52. <if test="status != null and status != ''">
  53. and gtd.status = #{status,jdbcType=BOOLEAN}
  54. </if>
  55. <if test="functionId != null and functionId != ''">
  56. and gtd.function_id = #{functionId,jdbcType=VARCHAR}
  57. </if>
  58. </where>
  59. ORDER BY gtd.status desc , gtd.sort_lv asc
  60. </select>
  61. <select id="getCurrentMenuNameByCon" resultType="java.lang.String"
  62. parameterType="com.gaotao.modules.grid.query.GridTableUserQuery">
  63. SELECT language_value FROM sys_object_language_menu
  64. WHERE language_code = #{languageCode,jdbcType=VARCHAR} AND menu_id = #{functionId,jdbcType=VARCHAR}
  65. </select>
  66. </mapper>