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.
 
 
 
 
 

84 lines
3.0 KiB

  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.iformall.mapper.WxMsgModelMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMsgModel">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
  8. <result column="name" jdbcType="VARCHAR" property="name"/>
  9. <result column="signature" jdbcType="VARCHAR" property="signature"/>
  10. <result column="content" jdbcType="VARCHAR" property="content"/>
  11. <result column="createtime" jdbcType="TIMESTAMP" property="createtime"/>
  12. <result column="status" jdbcType="INTEGER" property="status"/>
  13. <result column="reason" jdbcType="INTEGER" property="reason"/>
  14. <result column="template_type" jdbcType="INTEGER" property="templateType"/>
  15. <result column="model_code" jdbcType="VARCHAR" property="modelCode"/>
  16. </resultMap>
  17. <sql id="allColumns">
  18. `id`,`tenant_id`,`parent_tenant_id`,`name`,`signature`,`content`,`createtime`,`status`,`reason`,`template_type`,`model_code`
  19. </sql>
  20. <sql id="dynamicWhereConditions">
  21. where 1 = 1
  22. <if test=" null != id ">
  23. and `id` = #{id}
  24. </if>
  25. <if test=" null != tenantId and '' != tenantId">
  26. and `tenant_id` = #{tenantId}
  27. </if>
  28. <if test=" null != parentTenantId and '' != parentTenantId">
  29. and `parent_tenant_id` = #{parentTenantId}
  30. </if>
  31. <if test=" null != name and ''!= name">
  32. and `name` = #{name}
  33. </if>
  34. <if test=" null != signature ">
  35. and `signature` = #{signature}
  36. </if>
  37. <if test=" null != content ">
  38. and `content` = #{content}
  39. </if>
  40. <if test=" null != createtime ">
  41. and `createtime` = #{createtime}
  42. </if>
  43. <if test=" null != status ">
  44. and `status` = #{status}
  45. </if>
  46. <if test=" null != templateType">
  47. and `template_type` = #{templateType}
  48. </if>
  49. <if test=" null != modelCode">
  50. and `model_code` = #{modelCode}
  51. </if>
  52. <if test=" null != ids ">
  53. and id in
  54. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  55. #{idItem}
  56. </foreach>
  57. </if>
  58. <if test=" null != sortColumns">order by ${sortColumns}</if>
  59. </sql>
  60. <select id="findList" parameterType="com.iformall.domain.po.WxMsgModel" resultMap="BaseResultMap">
  61. select
  62. <include refid="allColumns"/>
  63. from wx_msg_model
  64. <include refid="dynamicWhereConditions"/>
  65. </select>
  66. <update id="updateByCode" parameterType="com.iformall.domain.po.WxMsgModel">
  67. update wx_msg_model set status=#{status},reason=#{reason} where `model_code` = #{modelCode}
  68. </update>
  69. </mapper>