xiaoyong931011
2021-07-15 2f2006691270d2788e32ca3eeae5a3b2faed0fc1
202107015
2 files modified
15 ■■■■■ changed files
gc-user/src/main/java/com/xzx/gc/user/service/DistribService.java 5 ●●●●● patch | view | raw | blame | history
gc-user/src/main/resources/mapper/user/AccountMapper.xml 10 ●●●● patch | view | raw | blame | history
gc-user/src/main/java/com/xzx/gc/user/service/DistribService.java
@@ -262,6 +262,11 @@
    public ViewDistribInfoVo viewDistribInfo(String id) {
        //获取团长基本信息
        ViewDistribInfoVo viewDistribInfoVo = accountMapper.selectDistribByAccountId(id);
        if(StrUtil.isNotEmpty(viewDistribInfoVo.getNickname())){
            String decode = StringUtils.decode(viewDistribInfoVo.getNickname());
            viewDistribInfoVo.setNickname(decode);
        }
        return accountMapper.selectDistribByAccountId(id);
    }
gc-user/src/main/resources/mapper/user/AccountMapper.xml
@@ -240,13 +240,13 @@
            a.order_no orderNo,
            a.score scoreReward,
            a.amount amountReward,
            sum(c.score) score,
            sum(c.score/40) amount
            (select sum(score) from xzx_jhy_order_items where b.id = order_id) score,
            (select sum(score/ 40) from xzx_jhy_order_items where b.id = order_id) amount
        FROM
            xzx_user_head_details a
                LEFT JOIN xzx_jhy_order b on a.order_no = b.order_no
                LEFT JOIN xzx_jhy_order_items c on b.id=c.order_id
        where a.head_user_id = #{userId}
                LEFT JOIN xzx_jhy_order b ON a.order_no = b.order_no
        WHERE
            a.head_user_id = #{userId}
    </select>