|
@@ -2,8 +2,8 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.platform.yijia.dao.ElectronicMembershipCardMapper">
|
|
|
<!--储蓄卡返回结果-->
|
|
|
- <resultMap id="BaseResultMap" type="com.platform.yijia.pojo.CustomerElectronicCard">
|
|
|
- <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <resultMap id="CardBaseResultMap" type="com.platform.yijia.pojo.CustomerElectronicCard">
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="union_id" jdbcType="VARCHAR" property="unionId" />
|
|
|
<result column="blog_openid" jdbcType="VARCHAR" property="blogOpenid" />
|
|
|
<result column="customer_no" jdbcType="VARCHAR" property="customerNo" />
|
|
@@ -16,8 +16,55 @@
|
|
|
<result column="recently_time" jdbcType="TIMESTAMP" property="recentlyTime" />
|
|
|
</resultMap>
|
|
|
|
|
|
+ <!--储蓄卡使用记录返回结果-->
|
|
|
+ <resultMap id="CardRecordBaseResultMap" type="com.platform.yijia.pojo.CustomerCardUseRecord">
|
|
|
+ <id column="id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
+ <result column="union_id" jdbcType="VARCHAR" property="unionId" />
|
|
|
+ <result column="customer_name" jdbcType="VARCHAR" property="customerName" />
|
|
|
+ <result column="usage_type" jdbcType="VARCHAR" property="usageType" />
|
|
|
+ <result column="type" jdbcType="VARCHAR" property="type" />
|
|
|
+ <result column="oils_type" jdbcType="VARCHAR" property="oilsType" />
|
|
|
+ <result column="amt" jdbcType="DECIMAL" property="amt" />
|
|
|
+ <result column="present_amt" jdbcType="DECIMAL" property="presentAmt" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="station_id" jdbcType="INTEGER" property="stationId" />
|
|
|
+ <result column="station_name" jdbcType="VARCHAR" property="stationName" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <!--查询客户电子会员卡的使用记录-->
|
|
|
+ <select id="getCardUseRecordList" resultMap="CardRecordBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerCardUseRecord">
|
|
|
+ SELECT
|
|
|
+ id,
|
|
|
+ order_no,
|
|
|
+ union_id,
|
|
|
+ customer_name,
|
|
|
+ usage_type,
|
|
|
+ type,
|
|
|
+ oils_type,
|
|
|
+ amt,
|
|
|
+ present_amt,
|
|
|
+ create_time,
|
|
|
+ station_id,
|
|
|
+ station_name
|
|
|
+ FROM
|
|
|
+ customer_card_use_record
|
|
|
+ <where>
|
|
|
+ <if test=" usageType !=null and usageType !=''">
|
|
|
+ usage_type = #{usageType}
|
|
|
+ </if>
|
|
|
+ <if test="stationId !=null and stationId !=''">
|
|
|
+ AND station_id = #{stationId}
|
|
|
+ </if>
|
|
|
+ <if test="unionId !=null and unionId !=''">
|
|
|
+ AND union_id = #{unionId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
<!--查询用户储蓄卡-->
|
|
|
- <select id="getElectronicCardList" resultMap="BaseResultMap" parameterType="com.platform.yijia.pojo.CustomerElectronicCard">
|
|
|
+ <select id="getElectronicCardList" resultMap="CardBaseResultMap" parameterType="com.platform.yijia.pojo.CustomerElectronicCard">
|
|
|
SELECT
|
|
|
id,
|
|
|
union_id,
|