旭捷内部项目管理系统
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.

104 lines
4.3 KiB

10 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.language.dao.SysObjectLanguageOthersDao">
  4. <select id="searchSysLanguagePackList"
  5. parameterType="com.gaotao.modules.language.query.QuerySysLanguagePack"
  6. resultType="com.gaotao.modules.language.entity.vo.SysLanguagePackVo">
  7. SELECT solb.function_id,
  8. solb.object_id as object_id_key,
  9. (CASE WHEN solb.object_type = 'table' THEN '表格'
  10. WHEN solb.object_type = 'button' THEN '按钮'
  11. WHEN solb.object_type = 'label' THEN '标签'
  12. END) as object_type,
  13. (CASE WHEN solb.object_type = 'table' THEN 't_'
  14. WHEN solb.object_type = 'button' THEN 'b_'
  15. WHEN solb.object_type = 'label' THEN 'l_'
  16. END) + object_id as object_id,
  17. solb.language_value,
  18. solb.table_id,
  19. fb.name as fun_desc
  20. FROM sys_object_language_base solb
  21. LEFT JOIN sys_menu fb ON (solb.function_id = fb.menu_id)
  22. <where>
  23. <if test="query.key != null and query.key != ''">
  24. solb.function_id like #{query.key}
  25. </if>
  26. <if test="query.key != null and query.key != ''">
  27. OR fb.name like '%'+#{query.key}+'%'
  28. </if>
  29. </where>
  30. order by solb.function_id
  31. </select>
  32. <select id="searchSysLanguageParam"
  33. parameterType="com.gaotao.modules.language.query.QuerySysLanguagePack"
  34. resultType="com.gaotao.modules.language.entity.SysObjectLanguageOthers">
  35. SELECT object_id,min(language_value) as language_value
  36. FROM sys_object_language_others
  37. <where>
  38. <if test="languageCode != null and languageCode != ''">
  39. language_code = #{languageCode}
  40. </if>
  41. <if test="objectType != null and objectType != ''">
  42. and object_type = #{objectType}
  43. </if>
  44. </where>
  45. GROUP BY
  46. object_id
  47. </select>
  48. <select id="searchLanguageListByLanguageCode"
  49. parameterType="com.gaotao.modules.language.query.QuerySysLanguagePack"
  50. resultType="com.gaotao.modules.language.entity.vo.LanguageOthersVo">
  51. SELECT
  52. solb.object_type,
  53. solb.function_id,
  54. fb.name as fun_desc,
  55. solb.object_id,
  56. solb.table_id,
  57. sll.language_code,
  58. solo.language_value,
  59. solb.language_value baseName
  60. FROM
  61. sys_object_language_base solb
  62. LEFT JOIN sys_language_list sll ON ( 1 = 1 )
  63. LEFT JOIN sys_menu fb ON (fb.menu_id = solb.function_id)
  64. LEFT JOIN sys_object_language_others solo ON ( sll.language_code = solo.language_code and
  65. solb.function_id = solo.function_id and solb.table_id = solo.table_id and solb.object_id = solo.object_id
  66. and solb.object_type = solo.object_type
  67. )
  68. <where>
  69. <if test="languageCode != null and languageCode != ''">
  70. sll.language_code = #{languageCode}
  71. </if>
  72. <if test="functionId != null and functionId != ''">
  73. and (solb.function_id = #{functionId} OR fb.name like '%'+#{functionId}+'%')
  74. </if>
  75. </where>
  76. order by solb.function_id
  77. </select>
  78. <select id="searchFunctionButtonList"
  79. resultType="com.gaotao.modules.language.entity.SysObjectLanguageOthers">
  80. SELECT b.object_id,o.language_code,CASE
  81. WHEN o.language_value is NULL THEN b.language_value
  82. ELSE o.language_value
  83. END as language_value
  84. FROM sys_object_language_base b
  85. LEFT JOIN sys_object_language_others o ON (b.function_id = o.function_id and b.table_id = o.table_id AND
  86. b.object_id = o.object_id AND o.language_code = #{languageCode})
  87. <where>
  88. b.function_id = #{functionId}
  89. <if test="tableId !=null and tableId != ''">
  90. AND b.table_id = #{tableId}
  91. </if>
  92. <if test="objectId !=null and objectId != ''">
  93. and b.object_id = #{objectId}
  94. </if>
  95. <if test="objectType !=null and objectType != ''">
  96. and b.object_type = #{objectType}
  97. </if>
  98. </where>
  99. </select>
  100. </mapper>