From cf148cae4937f807347e56d94b2dc96c9f258c59 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Wed, 14 Jul 2021 15:04:48 +0800 Subject: [PATCH] Merge branch 'score-shop' of http://120.27.238.55:7000/r/xzx into score-shop --- gc-user/src/main/resources/mapper/user/UserHeadRelateMapper.xml | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/gc-user/src/main/resources/mapper/user/UserHeadRelateMapper.xml b/gc-user/src/main/resources/mapper/user/UserHeadRelateMapper.xml index 3715898..0b0db58 100644 --- a/gc-user/src/main/resources/mapper/user/UserHeadRelateMapper.xml +++ b/gc-user/src/main/resources/mapper/user/UserHeadRelateMapper.xml @@ -5,4 +5,15 @@ <select id="selectMemberByUserId" resultType="com.xzx.gc.entity.UserHeadRelate"> select * from xzx_user_head_relate where user_id=#{userId} </select> + + + <select id="selectHeadStatisticsData" resultType="com.xzx.gc.user.vo.HeadInfoVo"> + select + IFNULL(sum(a.score), 0) score, + IFNULL(sum(a.amount), 0) amount, + IFNULL(count(1), 0) cnt + from xzx_user_head_relate a + where a.head_user_id=#{userId} + group by a.head_user_id + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.1