THelpCenterInfoMapper.xml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.bussiness.mapper.THelpCenterInfoMapper">
  6. <resultMap type="com.ruoyi.bussiness.domain.THelpCenterInfo" id="THelpCenterInfoResult">
  7. <result property="id" column="id" />
  8. <result property="helpCenterId" column="help_center_id" />
  9. <result property="question" column="question" />
  10. <result property="content" column="content" />
  11. <result property="language" column="language" />
  12. <result property="enable" column="enable" />
  13. <result property="delFlag" column="del_flag" />
  14. <result property="createTime" column="create_time" />
  15. <result property="createBy" column="create_by" />
  16. <result property="updateTime" column="update_time" />
  17. <result property="updateBy" column="update_by" />
  18. <result property="remark" column="remark" />
  19. <result property="showSymbol" column="show_symbol" />
  20. </resultMap>
  21. <sql id="selectTHelpCenterInfoVo">
  22. select id, help_center_id, question, content, language, enable, del_flag, create_time, create_by, update_time, update_by, remark, show_symbol from t_help_center_info
  23. </sql>
  24. <select id="selectTHelpCenterInfoList" parameterType="THelpCenterInfo" resultMap="THelpCenterInfoResult">
  25. <include refid="selectTHelpCenterInfoVo"/>
  26. <where>
  27. and del_flag = '0'
  28. <if test="helpCenterId != null "> and help_center_id = #{helpCenterId}</if>
  29. <if test="question != null and question != ''"> and question = #{question}</if>
  30. <if test="content != null and content != ''"> and content = #{content}</if>
  31. <if test="language != null and language != ''"> and language = #{language}</if>
  32. <if test="enable != null and enable != ''"> and enable = #{enable}</if>
  33. <if test="showSymbol != null and showSymbol != ''"> and show_symbol = #{showSymbol}</if>
  34. </where>
  35. </select>
  36. <select id="selectTHelpCenterInfoById" parameterType="Long" resultMap="THelpCenterInfoResult">
  37. <include refid="selectTHelpCenterInfoVo"/>
  38. where id = #{id}
  39. </select>
  40. <insert id="insertTHelpCenterInfo" parameterType="THelpCenterInfo">
  41. insert into t_help_center_info
  42. <trim prefix="(" suffix=")" suffixOverrides=",">
  43. <if test="id != null">id,</if>
  44. <if test="helpCenterId != null">help_center_id,</if>
  45. <if test="question != null">question,</if>
  46. <if test="content != null">content,</if>
  47. <if test="language != null">language,</if>
  48. <if test="enable != null">enable,</if>
  49. <if test="delFlag != null">del_flag,</if>
  50. <if test="createTime != null">create_time,</if>
  51. <if test="createBy != null">create_by,</if>
  52. <if test="updateTime != null">update_time,</if>
  53. <if test="updateBy != null">update_by,</if>
  54. <if test="remark != null">remark,</if>
  55. <if test="showSymbol != null">show_symbol,</if>
  56. </trim>
  57. <trim prefix="values (" suffix=")" suffixOverrides=",">
  58. <if test="id != null">#{id},</if>
  59. <if test="helpCenterId != null">#{helpCenterId},</if>
  60. <if test="question != null">#{question},</if>
  61. <if test="content != null">#{content},</if>
  62. <if test="language != null">#{language},</if>
  63. <if test="enable != null">#{enable},</if>
  64. <if test="delFlag != null">#{delFlag},</if>
  65. <if test="createTime != null">#{createTime},</if>
  66. <if test="createBy != null">#{createBy},</if>
  67. <if test="updateTime != null">#{updateTime},</if>
  68. <if test="updateBy != null">#{updateBy},</if>
  69. <if test="remark != null">#{remark},</if>
  70. <if test="showSymbol != null">#{showSymbol},</if>
  71. </trim>
  72. </insert>
  73. <update id="updateTHelpCenterInfo" parameterType="THelpCenterInfo">
  74. update t_help_center_info
  75. <trim prefix="SET" suffixOverrides=",">
  76. <if test="helpCenterId != null">help_center_id = #{helpCenterId},</if>
  77. <if test="question != null">question = #{question},</if>
  78. <if test="content != null">content = #{content},</if>
  79. <if test="language != null">language = #{language},</if>
  80. <if test="enable != null">enable = #{enable},</if>
  81. <if test="delFlag != null">del_flag = #{delFlag},</if>
  82. <if test="createTime != null">create_time = #{createTime},</if>
  83. <if test="createBy != null">create_by = #{createBy},</if>
  84. <if test="updateTime != null">update_time = #{updateTime},</if>
  85. <if test="updateBy != null">update_by = #{updateBy},</if>
  86. <if test="remark != null">remark = #{remark},</if>
  87. <if test="showSymbol != null">show_symbol = #{showSymbol},</if>
  88. </trim>
  89. where id = #{id}
  90. </update>
  91. <delete id="deleteTHelpCenterInfoById" parameterType="Long">
  92. delete from t_help_center_info where id = #{id}
  93. </delete>
  94. <delete id="deleteTHelpCenterInfoByIds" parameterType="String">
  95. update t_help_center_info set del_flag = '1' where id in
  96. <foreach item="id" collection="array" open="(" separator="," close=")">
  97. #{id}
  98. </foreach>
  99. </delete>
  100. </mapper>