查询邀请人数 bug

This commit is contained in:
GYJ
2024-12-28 14:37:20 +08:00
parent f11c80b895
commit 70404d83e8
4 changed files with 12 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ public interface InviteDao extends BaseMapper<Invite> {
IPage<Invite> selectInviteList(Page<Map<String,Object>> page, @Param("state") Integer state, @Param("userId") Long userId);
Integer selectInviteCount(@Param("state") Integer state, @Param("userId") Long userId);
Integer selectInviteCount2(@Param("code") String code);
Integer selectInviteSignCount(@Param("code") String code);
Double selectInviteSum(@Param("state") Integer state, @Param("userId") Long userId);

View File

@@ -15,6 +15,7 @@ public interface InviteService {
PageUtils selectInviteList(int page, int limit, Integer state, Long userId);
Integer selectInviteCount(Integer state,Long userId);
Integer selectInviteCount2(String code);
Integer selectInviteSignCount(String code);
Double selectInviteSum(Integer state,Long userId);

View File

@@ -112,6 +112,11 @@ public class InviteServiceImpl extends ServiceImpl<InviteDao, Invite> implements
return inviteDao.selectInviteCount(state, userId);
}
@Override
public Integer selectInviteCount2(String code) {
return inviteDao.selectInviteCount2(code);
}
@Override
public Integer selectInviteSignCount(String code) {
return inviteDao.selectInviteSignCount(code);

View File

@@ -51,6 +51,11 @@
</if>
</select>
<select id="selectInviteCount2" resultType="Integer">
select count(*) from tb_user tu
where tu.inviter_code = #{code}
</select>
<select id="selectInviteSignCount" resultType="Integer">
SELECT
count(*)