去掉参数绑定校验
This commit is contained in:
parent
f44af281f6
commit
d7eb466c61
|
@ -79,7 +79,7 @@ public class CmsArticleController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
||||
public String add(@Valid CmsArticle cmsArticle, Model model) {
|
||||
public String add(CmsArticle cmsArticle, Model model) {
|
||||
long time = System.currentTimeMillis();
|
||||
cmsArticle.setCtime(time);
|
||||
cmsArticle.setOrders(time);
|
||||
|
@ -123,7 +123,7 @@ public class CmsArticleController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
public String update(@PathVariable("id") int id, @Valid CmsArticle cmsArticle, Model model) {
|
||||
public String update(@PathVariable("id") int id, CmsArticle cmsArticle, Model model) {
|
||||
int count = cmsArticleService.getMapper().updateByPrimaryKeySelective(cmsArticle);
|
||||
model.addAttribute("count", count);
|
||||
model.addAttribute("id", id);
|
||||
|
|
|
@ -79,7 +79,7 @@ public class CmsCategoryController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
||||
public String add(@Valid CmsCategory cmsCategory, Model model) {
|
||||
public String add(CmsCategory cmsCategory, Model model) {
|
||||
long time = System.currentTimeMillis();
|
||||
cmsCategory.setCtime(time);
|
||||
cmsCategory.setOrders(time);
|
||||
|
@ -123,7 +123,7 @@ public class CmsCategoryController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
public String update(@PathVariable("id") int id, @Valid CmsCategory cmsCategory, Model model) {
|
||||
public String update(@PathVariable("id") int id, CmsCategory cmsCategory, Model model) {
|
||||
int count = cmsCategoryService.getMapper().updateByPrimaryKeySelective(cmsCategory);
|
||||
model.addAttribute("count", count);
|
||||
model.addAttribute("id", id);
|
||||
|
|
|
@ -81,7 +81,7 @@ public class CmsCommentController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
||||
public String add(@Valid CmsComment cmsComment, Model model) {
|
||||
public String add(CmsComment cmsComment, Model model) {
|
||||
cmsComment.setCtime(System.currentTimeMillis());
|
||||
int count = cmsCommentService.getMapper().insertSelective(cmsComment);
|
||||
model.addAttribute("count", count);
|
||||
|
@ -123,7 +123,7 @@ public class CmsCommentController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
public String update(@PathVariable("id") int id, @Valid CmsComment cmsComment, Model model) {
|
||||
public String update(@PathVariable("id") int id, CmsComment cmsComment, Model model) {
|
||||
int count = cmsCommentService.getMapper().updateByPrimaryKeySelective(cmsComment);
|
||||
model.addAttribute("count", count);
|
||||
model.addAttribute("id", id);
|
||||
|
|
|
@ -79,7 +79,7 @@ public class CmsTagController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/add", method = RequestMethod.POST)
|
||||
public String add(@Valid CmsTag cmsTag, Model model) {
|
||||
public String add(CmsTag cmsTag, Model model) {
|
||||
long time = System.currentTimeMillis();
|
||||
cmsTag.setCtime(time);
|
||||
cmsTag.setOrders(time);
|
||||
|
@ -123,7 +123,7 @@ public class CmsTagController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
public String update(@PathVariable("id") int id, @Valid CmsTag cmsTag, Model model) {
|
||||
public String update(@PathVariable("id") int id, CmsTag cmsTag, Model model) {
|
||||
int count = cmsTagService.getMapper().updateByPrimaryKeySelective(cmsTag);
|
||||
model.addAttribute("count", count);
|
||||
model.addAttribute("id", id);
|
||||
|
|
Loading…
Reference in New Issue