后台服务
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.

WxPressBatchMapper.xml 3.3 KiB

преди 2 години
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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.WxPressBatchMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPressBatch">
  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="status" jdbcType="INTEGER" property="status"/>
  10. <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
  11. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
  12. <result column="promoter_limit_rule" jdbcType="INTEGER" property="promoterLimitRule"/>
  13. <result column="promoter_allow_count" jdbcType="INTEGER" property="promoterAllowCount"/>
  14. <result column="bargainer_allow_same" jdbcType="INTEGER" property="bargainerAllowSame"/>
  15. <result column="bargainer_allow_count" jdbcType="INTEGER" property="bargainerAllowCount"/>
  16. </resultMap>
  17. <sql id="allColumns">
  18. `id`, `tenant_id`, `parent_tenant_id`, `name`, `status`, `create_date`,`update_date`,`promoter_limit_rule`,`promoter_allow_count`, `bargainer_allow_same`, `bargainer_allow_count`
  19. </sql>
  20. <sql id="dynamicWhereConditions">
  21. where `tenant_id` = #{tenantId}
  22. <if test=" null != id ">
  23. and `id` = #{id}
  24. </if>
  25. <if test=" null != parentTenantId and '' != parentTenantId">
  26. and `parent_tenant_id` = #{parentTenantId}
  27. </if>
  28. <if test=" null != status">
  29. and `status` = #{status}
  30. </if>
  31. <if test=" null != name and '' != name">
  32. and `name` like concat('%', #{name},'%')
  33. </if>
  34. <if test=" null != promoterLimitRule">
  35. and `promoter_limit_rule` = #{promoterLimitRule}
  36. </if>
  37. <if test=" null != bargainerAllowSame">
  38. and `bargainer_allow_same` = #{bargainerAllowSame}
  39. </if>
  40. <if test=" null != ids ">
  41. and `id` in
  42. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  43. #{idItem}
  44. </foreach>
  45. </if>
  46. </sql>
  47. <select id="findList" parameterType="com.iformall.domain.po.WxPressBatch" resultMap="BaseResultMap">
  48. select
  49. <include refid="allColumns"/>
  50. from wx_press_batch
  51. <include refid="dynamicWhereConditions"/>
  52. <if test=" null != sortColumns">order by ${sortColumns}</if>
  53. </select>
  54. <select id="getById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  55. select <include refid="allColumns"/> from wx_press_batch where `id` = #{id} and tenant_id=#{tenantId}
  56. </select>
  57. <update id="updateWxPressBatchStatus" parameterType="com.iformall.domain.po.WxPressBatch" >
  58. update wx_press_batch set status = #{status} where `id` = #{id} and tenant_id=#{tenantId}
  59. </update>
  60. <delete id="deleteById" parameterType="java.util.HashMap" >
  61. delete from wx_press_batch where `id` = #{id} and tenant_id=#{tenantId}
  62. </delete>
  63. </mapper>