diff --git a/src/main/java/com/budwk/app/zhgh/activity/culture/service/impl/ActivityCultureServiceImpl.java b/src/main/java/com/budwk/app/zhgh/activity/culture/service/impl/ActivityCultureServiceImpl.java index 60a048b..8d59a9e 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/culture/service/impl/ActivityCultureServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/activity/culture/service/impl/ActivityCultureServiceImpl.java @@ -130,7 +130,8 @@ public class ActivityCultureServiceImpl extends BaseServiceImpl RoleConstant.SCHOOL_UNION_ADMIN.name())) { if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) { group.or("tissue.unionId", "=", SecurityUtil.getUnionId()); - } else if (AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())) { + } + if (AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())) { List myManageClub = sysClubService.getMyManageClub(); List clubIds = myManageClub.stream().map(SysClub::getId).collect(Collectors.toList()); group.or("tissue.clubId", "in", clubIds); diff --git a/src/main/java/com/budwk/app/zhgh/activity/sports/h5Controller/H5ActivitySportsApplyUserController.java b/src/main/java/com/budwk/app/zhgh/activity/sports/h5Controller/H5ActivitySportsApplyUserController.java index 9480e49..b730e2d 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/sports/h5Controller/H5ActivitySportsApplyUserController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/sports/h5Controller/H5ActivitySportsApplyUserController.java @@ -18,6 +18,8 @@ import com.budwk.app.zhgh.activity.sports.param.ActivitySportsApplyUserPageParam import com.budwk.app.zhgh.activity.sports.service.ActivitySportsApplyUserService; import org.nutz.dao.Cnd; import org.nutz.dao.Dao; +import org.nutz.dao.Sqls; +import org.nutz.dao.sql.Sql; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.lang.Lang; @@ -201,10 +203,23 @@ public class H5ActivitySportsApplyUserController { @At @SaCheckPermission("h5.activity.sports.applyUser") public Result cancelApply(@Valid String activityId, @Valid String eventId, @Valid String schoolEventId) { - int count = dao.count(ActivitySchoolApply.class, - Cnd.where(ActivitySchoolApply::getUserId, "=", SecurityUtil.getUserId()) - .and(ActivitySchoolApply::getActivityId, "=", activityId) - .and(ActivitySchoolApply::getEventId, "=", eventId).and(ActivitySchoolApply::getStatus, "=", 2)); + Sql sql = Sqls.create(""" + SELECT + COUNT(*) + FROM + activity_school_apply asa + LEFT JOIN activity_school act ON act.id = asa.activityId + WHERE + asa.userId = @userId + AND asa.activityId = @activityId + AND asa.eventId = @eventId + AND STATUS = 2 + AND JSON_CONTAINS(act.applyWay, '[1,2]') + """) + .setParam("userId", SecurityUtil.getUserId()) + .setParam("activityId", activityId) + .setParam("eventId", eventId); + int count = activitySportsApplyUserService.count(sql); if (count > 0) { return Result.error("您已报名成功无法取消,请联系管理员取消!"); } diff --git a/src/main/java/com/budwk/app/zhgh/club/controller/infoManage/ClubInfoManageController.java b/src/main/java/com/budwk/app/zhgh/club/controller/infoManage/ClubInfoManageController.java index c6436bb..442dc25 100644 --- a/src/main/java/com/budwk/app/zhgh/club/controller/infoManage/ClubInfoManageController.java +++ b/src/main/java/com/budwk/app/zhgh/club/controller/infoManage/ClubInfoManageController.java @@ -201,14 +201,14 @@ public class ClubInfoManageController { int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId) .and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_PRESIDENT.name())))); if (count > 0) { - return Result.error("会长只能有一位"); +// return Result.error("会长只能有一位"); } } if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_SECRETARY.name())) { int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId) .and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_SECRETARY.name())))); if (count > 0) { - return Result.error("秘书长只能有一位"); +// return Result.error("秘书长只能有一位"); } } diff --git a/src/main/resources/views/platform/zhgh/club/infoManage/manage/clubInfoManage.js b/src/main/resources/views/platform/zhgh/club/infoManage/manage/clubInfoManage.js index 733ed21..2ad767a 100644 --- a/src/main/resources/views/platform/zhgh/club/infoManage/manage/clubInfoManage.js +++ b/src/main/resources/views/platform/zhgh/club/infoManage/manage/clubInfoManage.js @@ -132,6 +132,7 @@ const CLUB_INFO_MANAGE_TEMPLATE = { 协会秘书长 协会副秘书长 协会操作员 + 协会报销负责人 协会会员 diff --git a/src/main/resources/views/platform/zhgh/dayofficework/qsv/activity/index.html b/src/main/resources/views/platform/zhgh/dayofficework/qsv/activity/index.html index d202d83..7c0ab1a 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/qsv/activity/index.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/qsv/activity/index.html @@ -33,7 +33,7 @@ layout("/layouts/platform.html"){