后台服务
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

133 righe
5.2 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.PersonMouldMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.sm.PersonMould">
  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="video_type" jdbcType="INTEGER" property="videoType"/>
  9. <result column="cover_img" jdbcType="VARCHAR" property="coverImg"/>
  10. <result column="cover_picture" jdbcType="VARCHAR" property="coverPicture"/>
  11. <result column="detail_picture" jdbcType="VARCHAR" property="detailPicture"/>
  12. <result column="title" jdbcType="VARCHAR" property="title"/>
  13. <result column="sub_title" jdbcType="VARCHAR" property="subTitle"/>
  14. <result column="sex" jdbcType="INTEGER" property="sex"/>
  15. <result column="age" jdbcType="INTEGER" property="age"/>
  16. <result column="colour" jdbcType="INTEGER" property="colour"/>
  17. <result column="scene_sign" jdbcType="VARCHAR" property="sceneSign"/>
  18. <result column="sale_price" jdbcType="INTEGER" property="salePrice"/>
  19. <result column="price" jdbcType="INTEGER" property="price"/>
  20. <result column="send_type" jdbcType="INTEGER" property="sendType"/>
  21. <result column="detail" jdbcType="VARCHAR" property="detail"/>
  22. <result column="remark" jdbcType="VARCHAR" property="remark"/>
  23. <result column="mould_sm_id" jdbcType="VARCHAR" property="mouldSmId"/>
  24. <result column="material" jdbcType="VARCHAR" property="material"/>
  25. <result column="status" jdbcType="INTEGER" property="status"/>
  26. <result column="puton_date" jdbcType="TIMESTAMP" property="putonDate"/>
  27. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  28. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  29. </resultMap>
  30. <sql id="allColumns">
  31. `id`, `tenant_id`, `parent_tenant_id`, `video_type`, `cover_img`, `cover_picture`, `detail_picture`,
  32. `title`, `sub_title`, `sex`, `age`, `colour`, `scene_sign`, `sale_price`, `price`,
  33. `send_type`, `detail`, `remark`, `mould_sm_id`,`material`, `status`, `puton_date`, `create_date`, `update_date`
  34. </sql>
  35. <sql id="dynamicWhereConditions">
  36. where `is_del` = 0
  37. <if test=" null != id ">
  38. and `id` = #{id}
  39. </if>
  40. <if test=" null != tenantId and '' != tenantId">
  41. and `tenant_id` = #{tenantId}
  42. </if>
  43. <if test=" null != parentTenantId and '' != parentTenantId">
  44. and `parent_tenant_id` = #{parentTenantId}
  45. </if>
  46. <if test=" null != videoType ">
  47. and `video_type` = #{videoType}
  48. </if>
  49. <if test=" null != title and ''!=title">
  50. and `title` like concat('%', #{title},'%')
  51. </if>
  52. <if test=" null != subTitle ">
  53. and `sub_title` like concat('%', #{subTitle},'%')
  54. </if>
  55. <if test=" null != sex ">
  56. and `sex` = #{sex}
  57. </if>
  58. <if test=" null != age ">
  59. and `age` = #{age}
  60. </if>
  61. <if test=" null != colour ">
  62. and `colour` = #{colour}
  63. </if>
  64. <if test=" null != sceneSign and '' != sceneSign">
  65. and JSON_CONTAINS(scene_sign,json_array(#{sceneSign}))
  66. </if>
  67. <if test=" null != salePrice ">
  68. and `sale_price` = #{salePrice}
  69. </if>
  70. <if test=" null != sendType ">
  71. and `send_type` = #{sendType}
  72. </if>
  73. <if test=" null != price ">
  74. and `price` = #{price}
  75. </if>
  76. <if test=" null != status">
  77. and `status` = #{status}
  78. </if>
  79. <if test=" null != startDate ">
  80. and create_date &gt;= #{startDate}
  81. </if>
  82. <if test=" null != endDate">
  83. and create_date &lt; #{endDate}
  84. </if>
  85. <if test=" null != ids ">
  86. and id in
  87. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  88. #{idItem}
  89. </foreach>
  90. </if>
  91. <if test=" null != sortColumns">order by ${sortColumns}</if>
  92. </sql>
  93. <select id="findList" parameterType="com.iformall.domain.po.sm.PersonMould" resultMap="BaseResultMap">
  94. select
  95. <include refid="allColumns"/>
  96. from person_mould
  97. <include refid="dynamicWhereConditions"/>
  98. </select>
  99. <delete id="deleteById" parameterType="java.util.HashMap">
  100. update person_mould set is_del = 1,update_date = now() where id = #{id}
  101. </delete>
  102. <select id="findCList" parameterType="com.iformall.domain.po.sm.PersonMould" resultMap="BaseResultMap">
  103. select
  104. `id`, `video_type`, `cover_img`, `cover_picture`,
  105. `title`, `sub_title`, `sex`, `age`, `colour`, `scene_sign`, `sale_price`, `price`,
  106. `send_type`, `mould_sm_id`,`material`, `status`, `create_date`, `update_date`
  107. from person_mould
  108. <include refid="dynamicWhereConditions"/>
  109. </select>
  110. </mapper>