No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 

80 líneas
3.6 KiB

  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.iformall.mapper.WxVtwoActivityGrantMapper">
  6. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxVtwoActivityGrant">
  7. <id property="id" column="id" jdbcType="BIGINT"/>
  8. <result property="tenantId" column="tenant_id" jdbcType="VARCHAR"/>
  9. <result property="parentTenantId" column="parent_tenant_id" jdbcType="VARCHAR"/>
  10. <result property="activityId" column="activity_id" jdbcType="BIGINT"/>
  11. <result property="activityName" column="activity_name" jdbcType="VARCHAR"/>
  12. <result property="orderMoneySum" column="order_money_sum" jdbcType="DECIMAL"/>
  13. <result property="orderCount" column="order_count" jdbcType="INTEGER"/>
  14. <result property="cusName" column="cus_name" jdbcType="VARCHAR"/>
  15. <result property="cusPhone" column="cus_phone" jdbcType="VARCHAR"/>
  16. <result property="lotteryNum" column="lottery_num" jdbcType="VARCHAR"/>
  17. <result property="lotteryCount" column="lottery_count" jdbcType="INTEGER"/>
  18. <result property="anniversaryLotteryNum" column="anniversary_lottery_num" jdbcType="VARCHAR"/>
  19. <result property="realName" column="real_name" jdbcType="VARCHAR"/>
  20. <result property="realCard" column="real_card" jdbcType="VARCHAR"/>
  21. <result property="remark" column="remark" jdbcType="VARCHAR"/>
  22. <result property="signImg" column="sign_img" jdbcType="VARCHAR"/>
  23. <result property="status" column="status" jdbcType="SMALLINT"/>
  24. <result property="createBy" column="create_by" jdbcType="BIGINT"/>
  25. <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
  26. <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
  27. </resultMap>
  28. <sql id="allColumns">
  29. id,tenant_id,parent_tenant_id,
  30. activity_id,activity_name,order_money_sum,
  31. order_count,cus_name,cus_phone,
  32. lottery_num,lottery_count,anniversary_lottery_num,
  33. real_name,real_card,remark,sign_img,
  34. status,create_by,create_date,
  35. update_date
  36. </sql>
  37. <sql id="dynamicWhereConditions">
  38. where 1 = 1
  39. <if test=" null != id ">
  40. and `id` = #{id}
  41. </if>
  42. <if test=" null != tenantId and '' != tenantId">
  43. and `tenant_id` = #{tenantId}
  44. </if>
  45. <if test=" null != parentTenantId and '' != parentTenantId">
  46. and `parent_tenant_id` = #{parentTenantId}
  47. </if>
  48. <if test=" null != activityId ">
  49. and `activity_id` = #{activityId}
  50. </if>
  51. <if test=" null != status ">
  52. and `status` = #{status}
  53. </if>
  54. <if test=" null != ids ">
  55. and id in
  56. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  57. #{idItem}
  58. </foreach>
  59. </if>
  60. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  61. </sql>
  62. <select id="findList" parameterType="com.iformall.domain.po.WxVtwoActivityGrant" resultMap="BaseResultMap">
  63. select <include refid="allColumns" /> from wx_vtwo_activity_grant
  64. <include refid="dynamicWhereConditions" />
  65. </select>
  66. <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  67. select <include refid="allColumns" /> from wx_vtwo_activity_grant
  68. where id = #{id} and tenant_id=#{tenantId}
  69. </select>
  70. </mapper>