From 414f91c50a178ff7c3612a83bfd2c329e16b3b92 Mon Sep 17 00:00:00 2001 From: Paidax Date: Tue, 24 Dec 2024 15:55:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=8F=E5=88=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../welfare/controller/WelfareProjectMangeController.java | 4 ++++ .../java/io/v/nutz/zhgh/welfare/model/WelfareProject.java | 2 +- src/main/resources/views/mobile/home.html | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/v/nutz/zhgh/welfare/controller/WelfareProjectMangeController.java b/src/main/java/io/v/nutz/zhgh/welfare/controller/WelfareProjectMangeController.java index f2f33e9..f9c5d97 100644 --- a/src/main/java/io/v/nutz/zhgh/welfare/controller/WelfareProjectMangeController.java +++ b/src/main/java/io/v/nutz/zhgh/welfare/controller/WelfareProjectMangeController.java @@ -125,6 +125,7 @@ public class WelfareProjectMangeController { Trans.exec(() -> { project.setYear(DateUtil.thisYear()); + project.setIsDisabled(false); if (project.getConditionStructure() != null) { project.setConditionStructureId(matchConditionStructureService.save(project.getConditionStructure()).getId()); } @@ -244,6 +245,7 @@ public class WelfareProjectMangeController { } Sys_home_activity sysHomeActivity = project.covertToSysHomeActivity(); + sysHomeActivity.setEnable(true); dao.insertOrUpdate(sysHomeActivity); }); return null; @@ -328,9 +330,11 @@ public class WelfareProjectMangeController { */ @At @ViReturn + @Aop(TransAop.READ_COMMITTED) @RequiresPermissions("welfare.list.mange") public Object projectStatusChange(String id, boolean val) { dao.update(WelfareProject.class, Chain.make("isDisabled", !val), Cnd.where("id", "=", id)); + dao.update(Sys_home_activity.class, Chain.make("enable", val), Cnd.where("id", "=", id)); return null; } diff --git a/src/main/java/io/v/nutz/zhgh/welfare/model/WelfareProject.java b/src/main/java/io/v/nutz/zhgh/welfare/model/WelfareProject.java index b5e363a..e5582c5 100644 --- a/src/main/java/io/v/nutz/zhgh/welfare/model/WelfareProject.java +++ b/src/main/java/io/v/nutz/zhgh/welfare/model/WelfareProject.java @@ -224,7 +224,7 @@ public class WelfareProject extends BaseModel implements Serializable, SysHomeCo sysHomeActivity.setName(this.getName()); sysHomeActivity.setCover(this.getCover()); sysHomeActivity.setUrl("/platform/welfare/userChoose"); - sysHomeActivity.setH5Url("/mobile/welfare/list/index"); + sysHomeActivity.setH5Url("/mobile/welfare/list/receive?projectId=" + this.getId()); sysHomeActivity.setStartDate(this.getChoiceTimeStart()); sysHomeActivity.setEndDate(this.getChoiceTimeEnd()); sysHomeActivity.setAllowUserSql("select userId from welfare_list where projectId = '" + this.getId() + "' and userId = @userId"); diff --git a/src/main/resources/views/mobile/home.html b/src/main/resources/views/mobile/home.html index bacc32b..cf44926 100644 --- a/src/main/resources/views/mobile/home.html +++ b/src/main/resources/views/mobile/home.html @@ -710,8 +710,8 @@ layout("/mobile/platform.html"){ const active = sessionStorage.getItem("zhgh-mobile-home-active") this.active = active ? parseInt(active) : 0 - this.clickIndex = 2 - this.clickMenu = this.moduleMenus.find(o => o.moduleName === '日常办公') + // this.clickIndex = 2 + // this.clickMenu = this.moduleMenus.find(o => o.moduleName === '日常办公') } })