TenantProductInfoMapper.xml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.ym.mec.biz.dal.dao.TenantProductInfoDao">
  4. <resultMap id="BaseResultMap" type="com.ym.mec.biz.dal.entity.TenantProductInfo">
  5. <id column="id_" jdbcType="INTEGER" property="id"/>
  6. <result column="tenant_id_" jdbcType="INTEGER" property="tenantId"/>
  7. <result column="serve_id_" jdbcType="INTEGER" property="serveId"/>
  8. <result column="serve_detail_id_" jdbcType="INTEGER" property="serveDetailId"/>
  9. <result column="original_price_" jdbcType="VARCHAR" property="originalPrice"/>
  10. <result column="contract_price_" jdbcType="VARCHAR" property="contractPrice"/>
  11. <result column="pay_amount_" jdbcType="VARCHAR" property="payAmount"/>
  12. <result column="pay_date_" jdbcType="TIMESTAMP" property="payDate"/>
  13. <result column="expiry_count_" jdbcType="INTEGER" property="expiryCount"/>
  14. <result column="expiry_unit_" jdbcType="VARCHAR" property="expiryUnit"/>
  15. <result column="expiry_date_" jdbcType="TIMESTAMP" property="expiryDate"/>
  16. <result column="using_" jdbcType="INTEGER" property="using"/>
  17. </resultMap>
  18. <sql id="Base_Column_List">
  19. id_
  20. , tenant_id_, serve_id_, serve_detail_id_, original_price_, contract_price_, pay_amount_, pay_date_, expiry_count_, expiry_unit_, expiry_date_, using_
  21. </sql>
  22. <update id="updateByTenantId" parameterType="com.ym.mec.biz.dal.entity.TenantProductInfo">
  23. update tenant_product_info
  24. <set>
  25. <if test="serveId != null">
  26. serve_id_ = #{serveId,jdbcType=INTEGER},
  27. </if>
  28. <if test="serveDetailId != null">
  29. serve_detail_id_ = #{serveDetailId,jdbcType=INTEGER},
  30. </if>
  31. <if test="originalPrice != null">
  32. original_price_ = #{originalPrice,jdbcType=VARCHAR},
  33. </if>
  34. <if test="contractPrice != null">
  35. contract_price_ = #{contractPrice,jdbcType=VARCHAR},
  36. </if>
  37. <if test="payAmount != null">
  38. pay_amount_ = #{payAmount,jdbcType=VARCHAR},
  39. </if>
  40. <if test="payDate != null">
  41. pay_date_ = #{payDate,jdbcType=TIMESTAMP},
  42. </if>
  43. <if test="expiryCount != null">
  44. expiry_count_ = #{expiryCount,jdbcType=INTEGER},
  45. </if>
  46. <if test="expiryUnit != null">
  47. expiry_unit_ = #{expiryUnit,jdbcType=VARCHAR},
  48. </if>
  49. <if test="expiryDate != null">
  50. expiry_date_ = #{expiryDate,jdbcType=TIMESTAMP},
  51. </if>
  52. <if test="using != null">
  53. using_ = #{using,jdbcType=INTEGER},
  54. </if>
  55. </set>
  56. where tenant_id_ = #{tenantId,jdbcType=INTEGER} and using_ = 0
  57. </update>
  58. </mapper>