This commit is contained in:
Paidax
2024-12-24 15:55:26 +08:00
parent 9886b06c4a
commit 414f91c50a
3 changed files with 7 additions and 3 deletions
@@ -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;
}
@@ -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");