xiaoyong931011
2021-07-16 c7ed6d6981471efacce56f72866bfbf8d9cd5109
202107016
2 files modified
20 ■■■■ changed files
gc-user/src/main/java/com/xzx/gc/user/vo/UserHeadInfoVo.java 7 ●●●● patch | view | raw | blame | history
gc-user/src/main/resources/mapper/user/AccountMapper.xml 13 ●●●●● patch | view | raw | blame | history
gc-user/src/main/java/com/xzx/gc/user/vo/UserHeadInfoVo.java
@@ -19,12 +19,15 @@
    @ApiModelProperty(value="绑定时间")
    private String createTime;
    @ApiModelProperty(value="累计金额")
    @ApiModelProperty(value="累计金额收益")
    private BigDecimal amount;
    @ApiModelProperty(value="累计积分")
    @ApiModelProperty(value="累计积分收益")
    private BigDecimal score;
    @ApiModelProperty(value="累计积分")
    private BigDecimal orderScore;
    @ApiModelProperty(value="累计单数")
    private Integer orderCnt;
gc-user/src/main/resources/mapper/user/AccountMapper.xml
@@ -228,7 +228,18 @@
            a.CREATED_TIME createTime,
            (select IFNULL(count(1), 0) from xzx_user_head_details where user_id = a.user_id and head_user_id = #{id}) orderCnt,
            (select IFNULL(sum(amount), 0) from xzx_user_head_details where user_id = a.user_id and head_user_id = #{id}) amount,
            (select IFNULL(sum(score), 0) from xzx_user_head_details where user_id = a.user_id and head_user_id = #{id}) score
            (select IFNULL(sum(score), 0) from xzx_user_head_details where user_id = a.user_id and head_user_id = #{id}) score,
            (SELECT
                IFNULL(SUM(score),0) as kg
            FROM
                xzx_jhy_order_items WHERE order_id in ( SELECT
                        id
                    FROM
                        xzx_jhy_order WHERE order_no in ( SELECT
                                order_no
                            FROM
                                xzx_user_head_details WHERE
                                user_id = a.user_id and head_user_id = #{id} ) )) orderScore
        FROM
            xzx_user_head_relate a
                LEFT JOIN xzx_user_info b on a.user_id = b.user_id