用户信息相关
This commit is contained in:
@@ -31,15 +31,26 @@
|
||||
</if>
|
||||
</select>
|
||||
<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.type='+' and b.biz_code in ('cashIn', 'wechatIn', 'alipayIn')
|
||||
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.type='+' and b.biz_code in ('cashIn', 'wechatIn',
|
||||
'alipayIn')
|
||||
where a.shop_id = #{shopId}
|
||||
<if test="isVip !=null">
|
||||
and a.is_vip=#{isVip}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectVipCard" resultType="com.czg.account.dto.shopuser.ShopUserVipCardDTO">
|
||||
select b.logo, b.shop_name shopName, a.amount, a.shop_id shopId from tb_shop_user as a left join tb_shop_info as b on a.shop_id=b.id
|
||||
where a.user_id=#{userInfoId}
|
||||
select b.logo, b.shop_name shopName, a.amount, a.shop_id shopId
|
||||
from tb_shop_user as a
|
||||
left join tb_shop_info as b on a.shop_id = b.id
|
||||
where a.user_id = #{userInfoId}
|
||||
</select>
|
||||
<select id="selectAssetsSummary" resultType="com.czg.account.dto.user.userinfo.UserInfoAssetsSummaryDTO">
|
||||
select sum(IFNULL(b.amount, 0)) amount, sum(IFNULL(b.account_points, 0)) points, sum(IFNULL(c.over_num, 0)) 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}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user