This commit is contained in:
2025-10-28 15:09:12 +08:00
parent 9fe5a3d25a
commit e99125725f
2 changed files with 6 additions and 6 deletions

View File

@@ -149,7 +149,8 @@ public class AShopUserServiceImpl implements AShopUserService {
@Override
public ShopUserSummaryDTO getSummary(Long shopId, Integer isVip) {
return shopUserMapper.selectUserSummary(shopId, isVip);
Long mainId = shopInfoService.getMainIdByShopId(shopId);
return shopUserMapper.selectUserSummary(mainId, isVip);
}
@Override

View File

@@ -24,7 +24,7 @@
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',
'alipayIn')
where a.shop_id = #{shopId}
where a.main_shop_id = #{shopId}
<if test="isVip !=null">
and a.is_vip=#{isVip}
</if>
@@ -33,7 +33,7 @@
<select id="selectVipCard" resultType="com.czg.account.dto.shopuser.ShopUserVipCardDTO">
select tb_shop_info.logo, tb_shop_info.shop_name shopName, tb_shop_user.amount, tb_shop_user.shop_id shopId
from tb_shop_user
left join tb_shop_info on tb_shop_user.shop_id = tb_shop_info.id
left join tb_shop_info on tb_shop_user.main_shop_id = tb_shop_info.id
${qwSql}
limit ${pageOffset}, ${pageSize}
</select>
@@ -44,8 +44,7 @@
COUNT(DISTINCT c.id) AS couponNum
FROM tb_shop_user AS b
LEFT JOIN mk_shop_coupon_record AS c
ON c.shop_id = b.shop_id
AND c.shop_user_id = b.id
ON c.shop_user_id = b.id
AND c.`status` = 1
AND c.use_start_time &lt; NOW()
AND c.use_end_time > NOW()
@@ -112,7 +111,7 @@
<select id="selectVipCard_COUNT" resultType="java.lang.Long">
select count(1)
from tb_shop_user
left join tb_shop_info on tb_shop_user.shop_id = tb_shop_info.id
left join tb_shop_info on tb_shop_user.main_shop_id = tb_shop_info.id
${qwSql}
</select>