|
@@ -4,6 +4,7 @@ import java.util.List;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
@@ -71,7 +72,7 @@ public class UseGuideController extends BaseController
|
|
|
*/
|
|
|
@Log(title = "使用指南", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
- public AjaxResult add(@RequestBody UseGuide useGuide)
|
|
|
+ public AjaxResult add(@Validated @RequestBody UseGuide useGuide)
|
|
|
{
|
|
|
return toAjax(useGuideService.insertUseGuide(useGuide));
|
|
|
}
|
|
@@ -81,7 +82,7 @@ public class UseGuideController extends BaseController
|
|
|
*/
|
|
|
@Log(title = "使用指南", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
- public AjaxResult edit(@RequestBody UseGuide useGuide)
|
|
|
+ public AjaxResult edit(@Validated @RequestBody UseGuide useGuide)
|
|
|
{
|
|
|
return toAjax(useGuideService.updateUseGuide(useGuide));
|
|
|
}
|