我们发布啦
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zbkj.crmeb.finance.dao.UserFundsMonitorDao">
|
||||
<select id="getFundsMonitor" resultType="com.zbkj.crmeb.finance.model.UserFundsMonitor" parameterType="map">
|
||||
SELECT u.uid, u.nickname, u.now_money, u.brokerage_price AS brokerage,
|
||||
IF(( Sum(b.number) ) IS NULL, 0.00, Sum(b.number)) AS total_brokerage,
|
||||
IF(( Sum(e.extract_price) ) IS NULL, 0.00, Sum(e.extract_price)) AS total_extract FROM eb_user AS u
|
||||
LEFT JOIN eb_user_bill AS b ON u.uid = b.uid AND b.pm = 1 AND b.`type` = 'brokerage'
|
||||
LEFT JOIN eb_user_extract AS e ON u.`uid` = e.uid AND e.STATUS = 1
|
||||
where 1 = 1
|
||||
<if test="keywords != '' and keywords != null ">
|
||||
and ( u.uid like #{keywords, jdbcType=VARCHAR} or u.nickname like #{keywords, jdbcType=VARCHAR})
|
||||
</if>
|
||||
<if test="max != null and max > 0">
|
||||
and #{max, jdbcType=DECIMAL} >= now_money
|
||||
</if>
|
||||
<if test="min != null and min > 0">
|
||||
and now_money >= #{min, jdbcType=DECIMAL}
|
||||
</if>
|
||||
GROUP BY u.uid
|
||||
order by total_brokerage ${sort}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user