|
|
|
@@ -17,10 +17,12 @@ |
|
|
|
<result column="business_id" jdbcType="BIGINT" property="businessId" /> |
|
|
|
<result column="spend" jdbcType="INTEGER" property="spend" /> |
|
|
|
<result column="change_purpose" jdbcType="VARCHAR" property="changePurpose" /> |
|
|
|
<result column="ticket_number" jdbcType="VARCHAR" property="ticketNumber"/> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
`id`,`tenant_id`,`c_user_id`,`credit_amount`,`credit_num`,`credit_type`,`create_date`,`receipt_url`,`operator_type`,`operator_id`,`merchant_id`,`coupon_id`,`business_id`,`spend`,`change_purpose` |
|
|
|
`id`,`tenant_id`,`c_user_id`,`credit_amount`,`credit_num`,`credit_type`,`create_date`,`receipt_url`,`operator_type`,`operator_id`,`merchant_id`,`coupon_id`,`business_id`,`spend`,`change_purpose`,`ticket_number` |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions"> |
|
|
|
@@ -64,6 +66,9 @@ |
|
|
|
<if test=" null != changePurpose "> |
|
|
|
and `change_purpose` = #{changePurpose} |
|
|
|
</if> |
|
|
|
<if test=" null != ticketNumber and ''!=ticketNumber "> |
|
|
|
and ticket_number like concat('%', #{ticketNumber},'%') |
|
|
|
</if> |
|
|
|
<if test=" null != ids "> |
|
|
|
and id in |
|
|
|
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> |
|
|
|
@@ -108,6 +113,9 @@ |
|
|
|
<if test=" null != merchantName and ''!=merchantName "> |
|
|
|
and merchant.name like concat('%', #{merchantName},'%') |
|
|
|
</if> |
|
|
|
<if test=" null != ticketNumber and ''!=ticketNumber "> |
|
|
|
and credit.ticket_number like concat('%', #{ticketNumber},'%') |
|
|
|
</if> |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="findList" parameterType="com.iformall.domain.po.WxCreditHistory" resultMap="BaseResultMap"> |
|
|
|
@@ -131,7 +139,8 @@ |
|
|
|
credit.operator_type operatorType, |
|
|
|
credit.operator_id operatorId, |
|
|
|
merchant.NAME merchantName, |
|
|
|
credit.merchant_id merchantId |
|
|
|
credit.merchant_id merchantId, |
|
|
|
credit.ticket_number ticketNumber |
|
|
|
FROM |
|
|
|
wx_c_user_basic_info basic |
|
|
|
INNER JOIN wx_credit_history credit ON basic.id = credit.c_user_id |
|
|
|
|