CustomerProductMapper.xml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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.fire.dist.mapper.CustomerProductMapper">
  4. <resultMap type="com.fire.dto.CustomerProduct" id="CustomerProductMap">
  5. <result property="customerProductId" column="customer_product_id" jdbcType="INTEGER"/>
  6. <result property="customerId" column="customer_id" jdbcType="INTEGER"/>
  7. <result property="packageId" column="package_id" jdbcType="VARCHAR"/>
  8. <result property="type" column="type" jdbcType="INTEGER"/>
  9. <result property="price" column="price" jdbcType="NUMERIC"/>
  10. <result property="facePrice" column="face_price" jdbcType="NUMERIC"/>
  11. <result property="isEffective" column="is_effective" jdbcType="INTEGER"/>
  12. <result property="areaName" column="area_name" jdbcType="VARCHAR"/>
  13. <result property="operator" column="operator" jdbcType="INTEGER"/>
  14. <result property="areaNum" column="area_num" jdbcType="VARCHAR"/>
  15. </resultMap>
  16. <!--查询单个-->
  17. <select id="queryAll" resultMap="CustomerProductMap">
  18. select a.customer_product_id,
  19. a.customer_id,
  20. a.package_id,
  21. a.type,
  22. a.price,
  23. a.face_price,
  24. a.is_effective,
  25. b.area_name,
  26. b.operator,
  27. b.area_num,
  28. b.product_id
  29. from customer_product a
  30. left join flow_product_info b on a.package_id = b.package_id
  31. </select>
  32. <sql id="baseSql">
  33. select a.customer_product_id,
  34. a.customer_id,
  35. a.package_id,
  36. a.type,
  37. a.price,
  38. a.face_price,
  39. a.is_effective
  40. from customer_product a
  41. </sql>
  42. </mapper>