|
|
@@ -6,12 +6,12 @@
|
|
|
<!-- 通用查询列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
use_id, cp_id, send_id, coupon_id, use_valid_days, receive_date, use_date, coupon_status, receive_user,
|
|
|
- flg_valid,use_staff
|
|
|
+ flg_valid,use_staff,discount
|
|
|
</sql>
|
|
|
<!-- 通用查询列Response -->
|
|
|
<sql id="Base_Column_List_Response">
|
|
|
tmcu.use_id, tmcu.cp_id, tmcu.send_id, tmcu.coupon_id, tmcu.use_valid_days, tmcu.receive_date, tmcu.use_date,
|
|
|
- tmcu.coupon_status, tmcu.receive_user, tmcu.flg_valid,tmcu.use_staff
|
|
|
+ tmcu.coupon_status, tmcu.receive_user, tmcu.flg_valid,tmcu.use_staff,tmcu.discount
|
|
|
</sql>
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
@@ -27,6 +27,7 @@
|
|
|
<result column="receive_user" property="receiveUser" typeHandler="UuidTypeHandler"/>
|
|
|
<result column="flg_valid" property="flgValid"/>
|
|
|
<result column="use_staff" property="useStaff"/>
|
|
|
+ <result column="discount" property="discount"/>
|
|
|
|
|
|
</resultMap>
|
|
|
<!-- 通用查询映射结果Response -->
|
|
|
@@ -44,6 +45,8 @@
|
|
|
<result column="coupon_status" property="couponStatus"/>
|
|
|
<result column="receive_user" property="receiveUser" typeHandler="UuidTypeHandler"/>
|
|
|
<result column="flg_valid" property="flgValid"/>
|
|
|
+ <result column="staff_name" property="useCouponUser"/>
|
|
|
+ <result column="trade_type" property="tradeType" />
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
@@ -99,11 +102,15 @@
|
|
|
SELECT
|
|
|
<include refid="Base_Column_List_Response"/>
|
|
|
,tmc.coupon_name
|
|
|
- ,tmc.discount
|
|
|
+ ,tmcu.discount
|
|
|
,tac.cp_name
|
|
|
+ ,tct.staff_name
|
|
|
+ ,sys.f_get_name_i18n(tdk.kind_name_i18n, #{i18n}) as "trade_type"
|
|
|
FROM dkic_a.t_mst_coupon_use tmcu
|
|
|
left join dkic_a.t_mst_coupon tmc on tmc.coupon_id = tmcu.coupon_id
|
|
|
left join dkic_a.t_a_company tac on tac.cp_id = tmcu.cp_id
|
|
|
+ left join dkic_a.t_cp_trade tct on tct.coupon_use_id = tmcu.use_id
|
|
|
+ left join sys.t_data_kind tdk ON tct.trade_type = tdk.kind_code
|
|
|
<include refid="Condition"/>
|
|
|
<if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
limit #{end} offset #{start}
|