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

}
最近下载更多
h G24741  LV2 3月12日
shuangfu  LV24 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日
酒酒清欢  LV8 2023年5月21日
lol4571826  LV1 2023年5月10日
微信网友_6437957483614208  LV1 2023年4月18日
最近浏览更多
wdfgta 前天
暂无贡献等级
sohfow 4月14日
暂无贡献等级
h G24741  LV2 3月12日
yhf123 2月22日
暂无贡献等级
18872848584 2023年12月7日
暂无贡献等级
uni-code_0123  LV1 2023年11月27日
fff2003  LV6 2023年11月18日
Colorado 2023年9月21日
暂无贡献等级
shuangfu  LV24 2023年9月6日
莉莉姆  LV1 2023年8月31日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友