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.

66 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.GridTableDefaultDao">
  4. <resultMap id="BaseResultMap" type="com.gaotao.modules.grid.entity.GridTableDefault">
  5. <result column="table_id" jdbcType="VARCHAR" property="tableId"/>
  6. <result column="table_name" jdbcType="VARCHAR" property="tableName"/>
  7. <result column="column_prop" jdbcType="VARCHAR" property="columnProp"/>
  8. <result column="column_label" jdbcType="VARCHAR" property="columnLabel"/>
  9. <result column="column_hidden" jdbcType="INTEGER" property="columnHidden"/>
  10. <result column="column_image" jdbcType="INTEGER" property="columnImage"/>
  11. <result column="column_sortable" jdbcType="INTEGER" property="columnSortable"/>
  12. <result column="column_width" jdbcType="INTEGER" property="columnWidth"/>
  13. <result column="format" jdbcType="VARCHAR" property="format"/>
  14. </resultMap>
  15. <select id="getTableDefaultListLanguage" resultType="com.gaotao.modules.grid.entity.GridTableDefault"
  16. parameterType="com.gaotao.modules.grid.query.GridTableDefaultQuery">
  17. SELECT gtd.table_id,
  18. gtd.column_prop,
  19. ISNULL(gtl.language_value, gtd.column_label) AS column_label,
  20. gtd.column_hidden,
  21. gtd.column_image,
  22. gtd.column_sortable,
  23. gtd.column_width,
  24. gtd.fixed,
  25. gtd.sort_lv,
  26. gtd.status,
  27. gtd.table_name,
  28. gtd.function_id,
  29. gtd.column_type,
  30. gtd.align,
  31. gtd.header_align
  32. FROM grid_table_default gtd
  33. LEFT JOIN sys_object_language_others gtl
  34. ON (gtd.table_id = gtl.table_id AND gtd.column_prop = gtl.object_id
  35. AND gtd.function_id = gtl.function_id)
  36. <where>
  37. gtl.object_type='table' AND gtl.language_code = #{languageCode}
  38. <if test="tableId != null and tableId != ''">
  39. and gtd.table_id = #{tableId,jdbcType=VARCHAR}
  40. </if>
  41. <if test="objectType != null and objectType != ''">
  42. and gtl.object_type = #{objectType,jdbcType=VARCHAR}
  43. </if>
  44. <if test="status != null and status != ''">
  45. and gtd.status = #{status,jdbcType=BOOLEAN}
  46. </if>
  47. <if test="functionId != null and functionId != ''">
  48. and gtd.function_id = #{functionId,jdbcType=VARCHAR}
  49. </if>
  50. </where>
  51. ORDER BY gtd.sort_lv ASC
  52. </select>
  53. <select id="getMenuTableList" resultType="com.gaotao.modules.grid.entity.GridTableDefault">
  54. SELECT gtd.table_id,Max(gtd.table_name) table_name,gtd.function_id
  55. FROM grid_table_default gtd
  56. WHERE gtd.function_id = #{functionId}
  57. GROUP BY gtd.function_id,gtd.table_id
  58. </select>
  59. <select id="getCurrentMenuNameByCon" resultType="java.lang.String"
  60. parameterType="com.gaotao.modules.grid.query.GridTableDefaultQuery">
  61. SELECT language_value FROM sys_object_language_menu
  62. WHERE language_code = #{languageCode,jdbcType=VARCHAR} AND menu_id = #{functionId,jdbcType=VARCHAR}
  63. </select>
  64. </mapper>