记得上下班打卡 | git大法好,push需谨慎

Commit 699431b4 authored by 胡佳晨's avatar 胡佳晨

admin

parent 6a35bb92
......@@ -55,7 +55,7 @@ public class StoneLogsController extends BaseController {
@PostMapping("list")
@ResponseBody
public TableDataInfo list(StoneScoreListParam listParam) {
startPage();
// startPage();
List<StoneScoreListDto> result = iScoreService.list(listParam);
return this.getDataTable(result);
}
......
......@@ -13,45 +13,32 @@
</resultMap>
<select id="list" parameterType="java.util.Map" resultMap="StoneScoreListDtoResult">
select aut.uid,
aut.mobile,
aut.nickname,
ssut.status,
ssut.score_all,
ssut.score_use
from (
select au.uid, au.mobile, aui.nickname
from adam_user au
select hu.*,
(case when score <![CDATA[>]]> 0 then sum(score) else 0 END) as 'score_all',
(case when score <![CDATA[<]]> 0 then sum(score) else 0 END) as 'score_use',
('score_all' - 'score_use') as 'score_rest'
from (select nickname,
mobile,
au.uid,
IFNULL(ssu.status,1) as 'status'
from adam_user as au
inner join adam_user_info aui on au.uid = aui.uid
where au.state = 1
left join stone_score_user ssu on ssu.uid = aui.uid
<where>
<if test="mobile!=''">
AND au.mobile LIKE concat('%', #{mobile}, '%')
AND mobile LIKE concat('%', #{mobile}, '%')
</if>
</where>
) aut
left join (
select ssu.uid,
IFNULL(ssu.status, 1) as `status`,
ssls.score_all,
ssls.score_use
from stone_score_user ssu
inner join (
select uid,
sum(case when score <![CDATA[>]]> 0 then score else 0 end) score_all,
sum(case when score <![CDATA[<]]> 0 then score else 0 end) score_use
from stone_score_logs
group by uid
) ssls
) ssut on ssut.uid = aut.uid
<where>
<if test="status!=''">
AND ssut.status = #{status} OR ssut.status is null
AND status = #{status} OR status is null
</if>
<if test="uid!=-999">
AND ssut.uid =#{uid} OR ssut.status is null
<if test="uid!='-999'">
AND au.uid = #{uid}
</if>
</where>
limit 50
) as hu
left join stone_score_logs sslog on sslog.uid = hu.uid
group by hu.uid;
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment