commit
This commit is contained in:
+9
-4
@@ -210,11 +210,16 @@ public class ClubApplyInController {
|
||||
@RequiresAuthentication
|
||||
public Object getCount() {
|
||||
int hasJoinCount = dao.count("sys_club", Cnd.NEW().and("isjs", "=", false)
|
||||
.and("state", "=", ClubRegistAuditState.SCHOOL_PASS)
|
||||
.and("id in (SELECT clubid from sys_club_user WHERE isNormal = true and userid = '" + ShiroUtil.getPrincipalProperty("id") + "') and 1", "=", 1));
|
||||
.and(new Static("id in (SELECT clubid from sys_club_user WHERE isNormal = true and status in (1,3,5) and userid = '%s')".formatted(ShiroUtil.getUserId()))));
|
||||
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.and("state", "=", ClubRegistAuditState.SCHOOL_PASS);
|
||||
group.or(new Static("id in (select clubid from sys_club_user where userid = '%s' and invite = true and status in (6, 7))"
|
||||
.formatted(ShiroUtil.getPlatformUid())));
|
||||
|
||||
int noJoinCount = dao.count("sys_club", Cnd.NEW().and("isjs", "=", false)
|
||||
.and("state", "=", ClubRegistAuditState.SCHOOL_PASS)
|
||||
.and("id not in (SELECT clubid from sys_club_user WHERE isNormal = true and userid = '" + ShiroUtil.getPrincipalProperty("id") + "' and status not in (2, 4) ) and 1", "=", 1));
|
||||
.and(group)
|
||||
.and(new Static("id not in (SELECT clubid from sys_club_user WHERE isNormal = true and userid = '%s' and status not in (2, 4, 6, 7) )".formatted(ShiroUtil.getUserId()))));
|
||||
return new NutMap().setv("hasJoinCount", hasJoinCount).setv("noJoinCount", noJoinCount);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user