1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.fire.dist.mapper.CustomerProductMapper">
- <resultMap type="com.fire.dto.CustomerProduct" id="CustomerProductMap">
- <result property="customerProductId" column="customer_product_id" jdbcType="INTEGER"/>
- <result property="customerId" column="customer_id" jdbcType="INTEGER"/>
- <result property="packageId" column="package_id" jdbcType="VARCHAR"/>
- <result property="type" column="type" jdbcType="INTEGER"/>
- <result property="price" column="price" jdbcType="NUMERIC"/>
- <result property="facePrice" column="face_price" jdbcType="NUMERIC"/>
- <result property="isEffective" column="is_effective" jdbcType="INTEGER"/>
- <result property="areaName" column="area_name" jdbcType="VARCHAR"/>
- <result property="operator" column="operator" jdbcType="INTEGER"/>
- <result property="areaNum" column="area_num" jdbcType="VARCHAR"/>
- </resultMap>
- <!--查询单个-->
- <select id="queryAll" resultMap="CustomerProductMap">
- select a.customer_product_id,
- a.customer_id,
- a.package_id,
- a.type,
- a.price,
- a.face_price,
- a.is_effective,
- b.area_name,
- b.operator,
- b.area_num,
- b.product_id
- from customer_product a
- left join flow_product_info b on a.package_id = b.package_id
- </select>
- <sql id="baseSql">
- select a.customer_product_id,
- a.customer_id,
- a.package_id,
- a.type,
- a.price,
- a.face_price,
- a.is_effective
- from customer_product a
- </sql>
- </mapper>
|