|
@@ -42,16 +42,18 @@
|
|
|
|
|
|
<!--发放方式,优惠劵信息-->
|
|
<!--发放方式,优惠劵信息-->
|
|
<resultMap id="CouponIssueBaseResultMap" type="com.platform.yijia.pojo.CouponIssue">
|
|
<resultMap id="CouponIssueBaseResultMap" type="com.platform.yijia.pojo.CouponIssue">
|
|
- <result column="id" jdbcType="INTEGER" property="id" />
|
|
|
|
|
|
+ <result column="coupon_issue_id" jdbcType="INTEGER" property="couponIssueId" />
|
|
<result column="issue_type" jdbcType="VARCHAR" property="issueType" />
|
|
<result column="issue_type" jdbcType="VARCHAR" property="issueType" />
|
|
|
|
+ <result column="issue_name" jdbcType="VARCHAR" property="issueName" />
|
|
<result column="discount_threshold_amt" jdbcType="DECIMAL" property="discountThresholdAmt" />
|
|
<result column="discount_threshold_amt" jdbcType="DECIMAL" property="discountThresholdAmt" />
|
|
- <result column="status" jdbcType="VARCHAR" property="status" />
|
|
|
|
|
|
+ <result column="status" jdbcType="VARCHAR" property="status" />
|
|
<result column="station_id" jdbcType="INTEGER" property="stationId" />
|
|
<result column="station_id" jdbcType="INTEGER" property="stationId" />
|
|
- <result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
|
|
|
|
+ <result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
- <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
|
|
|
|
|
+ <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
- <result column="show_id" jdbcType="VARCHAR" property="showId" />
|
|
|
|
|
|
+ <result column="show_id" jdbcType="VARCHAR" property="showId" />
|
|
|
|
+<!-- <collection property="couponInfoList" resultMap="BaseResultMap"/>-->
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<!--用户优惠券-->
|
|
<!--用户优惠券-->
|
|
@@ -94,14 +96,24 @@
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<!--获取油站所分发的加油券-->
|
|
<!--获取油站所分发的加油券-->
|
|
- <select id="selectStaGrantCouponList" parameterType="com.platform.yijia.pojo.Coupon" resultMap="BaseResultMap">
|
|
|
|
|
|
+ <select id="selectStaGrantCouponList" parameterType="com.platform.yijia.pojo.Coupon" resultMap="CouponIssueBaseResultMap">
|
|
SELECT
|
|
SELECT
|
|
- <include refid="Base_Column_List"/>
|
|
|
|
- FROM
|
|
|
|
- coupon_info
|
|
|
|
|
|
+ T1.id AS coupon_issue_id,
|
|
|
|
+ T1.issue_name,
|
|
|
|
+ T1.issue_type,
|
|
|
|
+ T1.discount_threshold_amt,
|
|
|
|
+ T3.coupon_amt,
|
|
|
|
+ T3.oil_name
|
|
|
|
+ FROM coupon_issue AS T1
|
|
|
|
+ LEFT JOIN coupon_issue_relation AS T2 ON T1.id = T2.issue_id
|
|
|
|
+ LEFT JOIN coupon_info AS T3 ON T2.coupon_id = T3.id
|
|
<where>
|
|
<where>
|
|
|
|
+ T1.status = "1"
|
|
<if test="stationId !=null">
|
|
<if test="stationId !=null">
|
|
- station_id = #{stationId}
|
|
|
|
|
|
+ AND T1.station_id = #{stationId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="issueType !=null and issueType !=''">
|
|
|
|
+ AND T1.issue_type = #{issueType}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|