用户接口报错修复
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<select id="selectUserSummary" resultType="com.czg.account.dto.shopuser.ShopUserSummaryDTO">
|
||||
select count(a.id) userTotal, sum(IFNULL(a.amount, 0)) balanceTotal,sum(IFNULL(b.amount,0)) chargeTotal from
|
||||
tb_shop_user as a
|
||||
left join tb_shop_user_flow as b on a.id=b.user_id and b.biz_code in ('cashIn', 'wechatIn',
|
||||
left join tb_shop_user_flow as b on a.id=b.user_id and b.biz_code in ('cashIn', 'wechatIn',
|
||||
'alipayIn')
|
||||
where a.shop_id = #{shopId}
|
||||
<if test="isVip !=null">
|
||||
@@ -37,18 +37,24 @@
|
||||
where a.user_id = #{userInfoId}
|
||||
</select>
|
||||
<select id="selectAssetsSummary" resultType="com.czg.account.dto.user.userinfo.UserInfoAssetsSummaryDTO">
|
||||
select sum(IFNULL(b.amount, 0)) as amount, sum(IFNULL(b.account_points, 0)) as points, sum(IFNULL(c.over_num, 0)) as couponNum
|
||||
select sum(IFNULL(b.amount, 0)) as amount,
|
||||
sum(IFNULL(b.account_points, 0)) as points,
|
||||
sum(IFNULL(c.over_num, 0)) as couponNum
|
||||
from tb_user_info as a
|
||||
left join tb_shop_user as b on a.id = b.user_id
|
||||
left join tb_shop_activate_in_record as c on c.shop_id = b.shop_id
|
||||
where a.id=#{userId}
|
||||
left join tb_shop_activate_coupon_record as c
|
||||
on c.shop_id = b.shop_id and c.vip_user_id = b.id and c.`status` = 'used'
|
||||
where a.id = #{userId}
|
||||
</select>
|
||||
<select id="selectPageByKeyAndIsVip" resultType="com.czg.account.entity.ShopUser">
|
||||
select tb_shop_user.* from tb_user_info
|
||||
left join tb_shop_user on tb_user_info.id=tb_shop_user.user_id ${qwSql} limit ${pageOffset}, ${pageSize}
|
||||
select tb_shop_user.*
|
||||
from tb_user_info
|
||||
left join tb_shop_user on tb_user_info.id = tb_shop_user.user_id ${qwSql}
|
||||
limit ${pageOffset}, ${pageSize}
|
||||
</select>
|
||||
<select id="selectPageByKeyAndIsVip_COUNT" resultType="java.lang.Long">
|
||||
select count(1) from tb_user_info
|
||||
left join tb_shop_user on tb_user_info.id=tb_shop_user.user_id ${qwSql}
|
||||
select count(1)
|
||||
from tb_user_info
|
||||
left join tb_shop_user on tb_user_info.id = tb_shop_user.user_id ${qwSql}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user