commit
This commit is contained in:
+2
-1
@@ -130,7 +130,8 @@ public class ActivityCultureServiceImpl extends BaseServiceImpl<ActivityTissue>
|
|||||||
RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||||
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||||
group.or("tissue.unionId", "=", SecurityUtil.getUnionId());
|
group.or("tissue.unionId", "=", SecurityUtil.getUnionId());
|
||||||
} else if (AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())) {
|
}
|
||||||
|
if (AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())) {
|
||||||
List<SysClub> myManageClub = sysClubService.getMyManageClub();
|
List<SysClub> myManageClub = sysClubService.getMyManageClub();
|
||||||
List<String> clubIds = myManageClub.stream().map(SysClub::getId).collect(Collectors.toList());
|
List<String> clubIds = myManageClub.stream().map(SysClub::getId).collect(Collectors.toList());
|
||||||
group.or("tissue.clubId", "in", clubIds);
|
group.or("tissue.clubId", "in", clubIds);
|
||||||
|
|||||||
+19
-4
@@ -18,6 +18,8 @@ import com.budwk.app.zhgh.activity.sports.param.ActivitySportsApplyUserPageParam
|
|||||||
import com.budwk.app.zhgh.activity.sports.service.ActivitySportsApplyUserService;
|
import com.budwk.app.zhgh.activity.sports.service.ActivitySportsApplyUserService;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
import org.nutz.dao.Dao;
|
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.Inject;
|
||||||
import org.nutz.ioc.loader.annotation.IocBean;
|
import org.nutz.ioc.loader.annotation.IocBean;
|
||||||
import org.nutz.lang.Lang;
|
import org.nutz.lang.Lang;
|
||||||
@@ -201,10 +203,23 @@ public class H5ActivitySportsApplyUserController {
|
|||||||
@At
|
@At
|
||||||
@SaCheckPermission("h5.activity.sports.applyUser")
|
@SaCheckPermission("h5.activity.sports.applyUser")
|
||||||
public Result cancelApply(@Valid String activityId, @Valid String eventId, @Valid String schoolEventId) {
|
public Result cancelApply(@Valid String activityId, @Valid String eventId, @Valid String schoolEventId) {
|
||||||
int count = dao.count(ActivitySchoolApply.class,
|
Sql sql = Sqls.create("""
|
||||||
Cnd.where(ActivitySchoolApply::getUserId, "=", SecurityUtil.getUserId())
|
SELECT
|
||||||
.and(ActivitySchoolApply::getActivityId, "=", activityId)
|
COUNT(*)
|
||||||
.and(ActivitySchoolApply::getEventId, "=", eventId).and(ActivitySchoolApply::getStatus, "=", 2));
|
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) {
|
if (count > 0) {
|
||||||
return Result.error("您已报名成功无法取消,请联系管理员取消!");
|
return Result.error("您已报名成功无法取消,请联系管理员取消!");
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -201,14 +201,14 @@ public class ClubInfoManageController {
|
|||||||
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
||||||
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_PRESIDENT.name()))));
|
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_PRESIDENT.name()))));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Result.error("会长只能有一位");
|
// return Result.error("会长只能有一位");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_SECRETARY.name())) {
|
if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_SECRETARY.name())) {
|
||||||
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
||||||
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_SECRETARY.name()))));
|
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_SECRETARY.name()))));
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Result.error("秘书长只能有一位");
|
// return Result.error("秘书长只能有一位");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ const CLUB_INFO_MANAGE_TEMPLATE = {
|
|||||||
<el-checkbox label="CLUB_SECRETARY">协会秘书长</el-checkbox>
|
<el-checkbox label="CLUB_SECRETARY">协会秘书长</el-checkbox>
|
||||||
<el-checkbox label="CLUB_VICE_SECRETARY">协会副秘书长</el-checkbox>
|
<el-checkbox label="CLUB_VICE_SECRETARY">协会副秘书长</el-checkbox>
|
||||||
<el-checkbox label="CLUB_OPERATOR">协会操作员</el-checkbox>
|
<el-checkbox label="CLUB_OPERATOR">协会操作员</el-checkbox>
|
||||||
|
<el-checkbox label="CLUB_REIMBURSEMENT_MANAGER">协会报销负责人</el-checkbox>
|
||||||
<el-checkbox label="CLUB_MEMBER">协会会员</el-checkbox>
|
<el-checkbox label="CLUB_MEMBER">协会会员</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ layout("/layouts/platform.html"){
|
|||||||
<el-table-column label="结束时间" prop="endTime" sortable></el-table-column>
|
<el-table-column label="结束时间" prop="endTime" sortable></el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" width="450px">
|
<el-table-column label="操作" fixed="right" width="450px">
|
||||||
<template scope="{row}">
|
<template scope="{row}">
|
||||||
<el-button size="mini" type="primary" @click="openQrCode(row.id)">二维码</el-button>
|
<el-button size="mini" type="primary" @click="openQrCode(row)">二维码</el-button>
|
||||||
<el-button size="mini" type="primary" @click="openEdit(row)">编辑</el-button>
|
<el-button size="mini" type="primary" @click="openEdit(row)">编辑</el-button>
|
||||||
<el-button size="mini" type="primary" @click="openSubject(row.id)">题目设置</el-button>
|
<el-button size="mini" type="primary" @click="openSubject(row.id)">题目设置</el-button>
|
||||||
<el-button size="mini" type="danger" @click="onDelete(row.id)">删除</el-button>
|
<el-button size="mini" type="danger" @click="onDelete(row.id)">删除</el-button>
|
||||||
@@ -77,8 +77,13 @@ layout("/layouts/platform.html"){
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 打开二维码
|
// 打开二维码
|
||||||
openQrCode(id) {
|
openQrCode(row) {
|
||||||
this.signatureAddress = '?id=' + id
|
const { id,category}=row
|
||||||
|
if (category==='SURVEY'){
|
||||||
|
this.signatureAddress = window.location.origin+"/platform/h5/qsv/survey?id=" + id
|
||||||
|
}else{
|
||||||
|
this.signatureAddress = window.location.origin+"/platform/h5/qsv/quiz?id=" + id
|
||||||
|
}
|
||||||
this.$refs.qrCodePlusRef.openDialog()
|
this.$refs.qrCodePlusRef.openDialog()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user