|
@@ -33,22 +33,27 @@
|
|
|
|
|
|
<select id="selectAllByPageMoney" resultMap="BaseResultMap">
|
|
|
select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- from t_customer_recharge
|
|
|
+ a.id,
|
|
|
+ a.customer_name,
|
|
|
+ a.companyName,
|
|
|
+ a.before_money,
|
|
|
+ a.recharge_mony,
|
|
|
+ a.recharge_time
|
|
|
+ from t_customer_recharge a left join t_customer b on a.customer_name = b.customer_name
|
|
|
<where>
|
|
|
1 = 1
|
|
|
<if test="customerRecharge.customerName != null and customerRecharge.customerName != ''">
|
|
|
- and customer_name = BINARY #{customerRecharge.customerName}
|
|
|
+ and a.customer_name = BINARY #{customerRecharge.customerName}
|
|
|
</if>
|
|
|
<if test="customerRecharge.companyName != null and customerRecharge.companyName != ''">
|
|
|
- and companyName LIKE BINARY CONCAT('%',#{customerRecharge.companyName},'%')
|
|
|
+ and a.companyName LIKE BINARY CONCAT('%',#{customerRecharge.companyName},'%')
|
|
|
</if>
|
|
|
<if test="customerRecharge.rechargeMony != null and customerRecharge.rechargeMony != ''">
|
|
|
- and recharge_mony = #{rechargeMony,jdbcType=DOUBLE}
|
|
|
+ and a.recharge_mony = #{rechargeMony,jdbcType=DOUBLE}
|
|
|
</if>
|
|
|
- and recharge_mony <![CDATA[ > ]]> 0
|
|
|
+ and IF(b.bussiness_type != 2, a.recharge_mony <![CDATA[ > ]]> 0,1 = 1)
|
|
|
</where>
|
|
|
- order by recharge_time desc
|
|
|
+ order by a.recharge_time desc
|
|
|
</select>
|
|
|
|
|
|
|