首页>代码>spring mvc+mybatis+mysql+maven+bootstrap-table整合实现增删查改简单实例>/demo-bstable/src/main/java/com/xe/demo/controller/UserController.java
package com.xe.demo.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.xe.demo.common.pojo.AjaxResult;
import com.xe.demo.common.pojo.PageAjax;
import com.xe.demo.model.AuthUser;
import com.xe.demo.service.UserService;
@Controller
public class UserController {
@Autowired
private UserService userService;
@ResponseBody
@RequestMapping("/queryPage")
public PageAjax<AuthUser> queryPage(){
return userService.findPage("UserMapper.queryPage", null);
}
@ResponseBody
@RequestMapping("/addUser")
public AjaxResult addUser(AuthUser user){
return userService.save("UserMapper.addUser", null);
}
@ResponseBody
@RequestMapping("/delUser")
public AjaxResult delUser(Integer[] ids){
return userService.batchDelete("UserMapper.delUsers", ids);
}
@ResponseBody
@RequestMapping("/updateUser")
public AjaxResult updateUser(AuthUser user){
return userService.update("UserMapper.updateUser", null);
}
}
最近下载更多
最近浏览更多
微信网友_7824017348743168
12月23日
暂无贡献等级
左明垚
7月27日
暂无贡献等级
taoshen95 LV16
4月6日
hezhihui
1月9日
暂无贡献等级
xiaoaitx LV8
1月2日
Ella0902
2024年12月18日
暂无贡献等级
fff团团长 LV1
2024年9月7日
xingxiu LV1
2024年6月8日
rudyfather
2024年6月4日
暂无贡献等级
yangzhou11
2024年5月18日
暂无贡献等级

