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 === '日常办公') } })