diff --git a/backend/src/main/java/com/budwk/app/client/module/activity/controller/ClientGroupController.java b/backend/src/main/java/com/budwk/app/client/module/activity/controller/ClientGroupController.java
index 68c8ce5..5a91c4f 100644
--- a/backend/src/main/java/com/budwk/app/client/module/activity/controller/ClientGroupController.java
+++ b/backend/src/main/java/com/budwk/app/client/module/activity/controller/ClientGroupController.java
@@ -1,6 +1,7 @@
package com.budwk.app.client.module.activity.controller;
import cn.dev33.satoken.annotation.SaCheckLogin;
+import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.result.Result;
import com.budwk.app.client.module.activity.service.ClientActivityService;
import com.budwk.app.module.activity.models.ActGroup;
@@ -89,6 +90,11 @@ public class ClientGroupController {
Sql sql = Sqls.create("select * from act_group where id=@id and isOpen = 1").setParam("id", groupUser.getGroupId());
sql.setCallback(Sqls.callback.map());
NutMap map = (NutMap) dao.execute(sql).getResult();
+
+ if (Lang.isEmpty(map)) {
+ map = NutMap.NEW();
+ }
+
Sql sqlGroupUser = Sqls.create("""
SELECT
t1.*,
@@ -120,7 +126,11 @@ public class ClientGroupController {
@At("/apply-leader/?")
@AdaptBy(type = JsonAdaptor.class)
@SaCheckLogin(type = StpClientUtil.TYPE)
- public synchronized Result applyLeader(Long groupId) {
+ public synchronized Result applyLeader(String groupId) {
+ if (StrUtil.isNotBlank(groupId)) {
+ return Result.error("未获取到团队信息");
+ }
+
int count = clientActivityService.dao().count(ActGroupUser.class, Cnd.where(ActGroupUser::getGroupId, "=", groupId)
.and(ActGroupUser::getIsLeader, "=", 1));
if (count > 0){
diff --git a/backend/src/main/java/com/budwk/app/module/activity/controller/ActGroupController.java b/backend/src/main/java/com/budwk/app/module/activity/controller/ActGroupController.java
index 6ea95ac..f25d847 100644
--- a/backend/src/main/java/com/budwk/app/module/activity/controller/ActGroupController.java
+++ b/backend/src/main/java/com/budwk/app/module/activity/controller/ActGroupController.java
@@ -290,4 +290,13 @@ public class ActGroupController {
return Result.success();
}
+ @At
+ @SaCheckPermission("activity.group")
+ @SLog(tag = "活动分组", msg = "发布分组结果")
+ public Result unReleaseGroupResult(@Valid String activityId){
+ dao.update(ActGroup.class, Chain.make("isOpen", false),
+ Cnd.where(ActGroup::getActivityId, "=", activityId));
+ return Result.success();
+ }
+
}
diff --git a/backend/src/main/resources/views/platform/activity/group/index.html b/backend/src/main/resources/views/platform/activity/group/index.html
index 454454a..db1a1b0 100644
--- a/backend/src/main/resources/views/platform/activity/group/index.html
+++ b/backend/src/main/resources/views/platform/activity/group/index.html
@@ -75,6 +75,7 @@ layout("/layouts/platform_1.html"){
发布分组结果
+ 取消分组结果
@@ -167,6 +168,23 @@ layout("/layouts/platform_1.html"){
}
})
},
+ unReleaseGroupResult() {
+ this.$confirm('确定要取消发布分组结果吗?', '提示', {
+ type: 'warning',
+ confirmButtonText: '确定',
+ cancelButtonText: '取消'
+ }).then(async ()=> {
+ const resp = await $.post('/platform/activity/group/unReleaseGroupResult', {
+ activityId: this.pageForm.activityId
+ })
+ if (resp.code === 0) {
+ this.$message.success(resp.msg)
+ await this.pageData()
+ } else {
+ this.$message.error(resp.msg)
+ }
+ })
+ },
async doRemove(row) {
this.$confirm('此操作将会删除与该小队相关的所有信息,确定要删除吗?', '提示', {
type: 'warning',
diff --git a/backend/src/main/resources/views/platform/activity/user/index.html b/backend/src/main/resources/views/platform/activity/user/index.html
index a00313c..4e9404f 100644
--- a/backend/src/main/resources/views/platform/activity/user/index.html
+++ b/backend/src/main/resources/views/platform/activity/user/index.html
@@ -83,7 +83,7 @@ layout("/layouts/platform_1.html"){
-
+
@@ -102,11 +102,11 @@ layout("/layouts/platform_1.html"){
-
-
-
-
-
+
+
+
+
+
{{row.isParty ? '是':''}}
@@ -182,12 +182,12 @@ layout("/layouts/platform_1.html"){
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 住宿
+ 不住宿
+
+
+
+
+
+
+
+ 参加
+ 不参加
+
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+
+
+
+
+
+
+