首页>代码>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);
	}

}
最近下载更多
xiaoaitx  LV8 1月2日
fff团团长  LV1 2024年9月7日
featherteng  LV1 2024年5月3日
h G24741  LV2 2024年3月12日
shuangfu  LV25 2023年9月6日
莉莉姆  LV1 2023年8月31日
279824554  LV2 2023年6月25日
MHB123  LV5 2023年6月3日
Fyx123456  LV1 2023年5月31日
张真狗  LV9 2023年5月22日
最近浏览更多
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日
暂无贡献等级
huigui007 2024年5月16日
暂无贡献等级
featherteng  LV1 2024年5月3日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友