From 887b44e2eeeaf4792582553182a92f48d0865d66 Mon Sep 17 00:00:00 2001 From: chuyan <1047381936@qq.com> Date: Sat, 14 Mar 2020 13:16:24 +0800 Subject: [PATCH] =?UTF-8?q?activity=20controller=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ase/controller/ActivityController.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/main/java/com/codesdream/ase/controller/ActivityController.java b/src/main/java/com/codesdream/ase/controller/ActivityController.java index dff7f0f..6dac269 100644 --- a/src/main/java/com/codesdream/ase/controller/ActivityController.java +++ b/src/main/java/com/codesdream/ase/controller/ActivityController.java @@ -2,6 +2,7 @@ package com.codesdream.ase.controller; import com.alibaba.fastjson.JSONObject; import com.codesdream.ase.component.ASESpringUtil; +import com.codesdream.ase.component.activity.NullValueAttributes; import com.codesdream.ase.component.datamanager.JSONParameter; import com.codesdream.ase.configure.ActivityFormConfigure; import com.codesdream.ase.exception.InvalidFormFormatException; @@ -32,6 +33,8 @@ public class ActivityController { @Resource JSONParameter jsonParameter; + + @RequestMapping(value = "/activity_creator") String activityCreatorView(Model model){return "activity_creator";} @@ -49,6 +52,24 @@ public class ActivityController { Activity activity = jsonObject.toJavaObject(Activity.class); NullValueValidator nullValueValidator = aseSpringUtil.getBean(NullValueValidator.class); List nullValues = nullValueValidator.checkNullValues(activity); + NullValueAttributes nullValueAttributes = aseSpringUtil.getBean(NullValueAttributes.class); + for (String str : nullValues){ + if(str.equals("title")){ + nullValueAttributes.getNullValueAttributes().add("title"); + } + else if(str.equals("creator")){ + nullValueAttributes.getNullValueAttributes().add("creator"); + } + else if(str.equals("type")){ + nullValueAttributes.getNullValueAttributes().add("type"); + } + else if(str.equals("planPeriod")){ + nullValueAttributes.getNullValueAttributes().add("planPeriod"); + } + else if(str.equals("chiefManager")){ + nullValueAttributes.getNullValueAttributes().add("chiefManager"); + } + } return "act_created"; }