From 11e744e6a8a9b952fede2f63af527ae512febb35 Mon Sep 17 00:00:00 2001 From: xiongxiaoyang <773861846@qq.com> Date: Mon, 7 Dec 2020 16:11:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E6=8E=89=E4=B8=8D=E7=9F=A5=E9=81=93?= =?UTF-8?q?=E6=98=AF=E5=95=A5=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/controller/UserController.java" | 135 ---------- .../java/com/java2nb/system/dao/UserDao.java" | 32 --- .../com/java2nb/system/domain/UserDO.java" | 177 -------------- .../java2nb/system/service/UserService.java" | 30 --- .../system/service/impl/UserServiceImpl.java" | 55 ----- .../resources/mybatis/system/UserMapper.xml" | 138 ----------- .../static/js/appjs/system/user/add.js" | 107 -------- .../static/js/appjs/system/user/edit.js" | 103 -------- .../static/js/appjs/system/user/user.js" | 231 ------------------ .../resources/static/sql/system/user/menu.js" | 18 -- .../resources/templates/system/user/add.html" | 113 --------- .../templates/system/user/detail.html" | 110 --------- .../templates/system/user/edit.html" | 115 --------- .../templates/system/user/user.html" | 66 ----- 14 files changed, 1430 deletions(-) delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/controller/UserController.java" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/dao/UserDao.java" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/domain/UserDO.java" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/service/UserService.java" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/service/impl/UserServiceImpl.java" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/resources/mybatis/system/UserMapper.xml" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/js/appjs/system/user/add.js" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/js/appjs/system/user/edit.js" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/js/appjs/system/user/user.js" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/sql/system/user/menu.js" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/add.html" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/detail.html" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/edit.html" delete mode 100644 "D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/user.html" diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/controller/UserController.java" "b/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/controller/UserController.java" deleted file mode 100644 index f88810e..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/controller/UserController.java" +++ /dev/null @@ -1,135 +0,0 @@ -package com.java2nb.system.controller; - -import java.util.List; -import java.util.Map; - -import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.ResponseBody; -import io.swagger.annotations.ApiOperation; - - -import com.java2nb.system.domain.UserDO; -import com.java2nb.system.service.UserService; -import com.java2nb.common.utils.PageBean; -import com.java2nb.common.utils.Query; -import com.java2nb.common.utils.R; - -/** - * - * - * @author xiongxy - * @email 1179705413@qq.com - * @date 2020-12-01 03:46:33 - */ - -@Controller -@RequestMapping("/system/user") -public class UserController { - @Autowired - private UserService userService; - - @GetMapping() - @RequiresPermissions("system:user:user") - String User() { - return "system/user/user"; - } - - @ApiOperation(value = "获取列表", notes = "获取列表") - @ResponseBody - @GetMapping("/list") - @RequiresPermissions("system:user:user") - public R list(@RequestParam Map params) { - //查询列表数据 - Query query = new Query(params); - List userList = userService.list(query); - int total = userService.count(query); - PageBean pageBean = new PageBean(userList, total); - return R.ok().put("data", pageBean); - } - - @ApiOperation(value = "新增页面", notes = "新增页面") - @GetMapping("/add") - @RequiresPermissions("system:user:add") - String add() { - return "system/user/add"; - } - - @ApiOperation(value = "修改页面", notes = "修改页面") - @GetMapping("/edit/{id}") - @RequiresPermissions("system:user:edit") - String edit(@PathVariable("id") Long id, Model model) { - UserDO user = userService.get(id); - model.addAttribute("user", user); - return "system/user/edit"; - } - - @ApiOperation(value = "查看页面", notes = "查看页面") - @GetMapping("/detail/{id}") - @RequiresPermissions("system:user:detail") - String detail(@PathVariable("id") Long id, Model model) { - UserDO user = userService.get(id); - model.addAttribute("user", user); - return "system/user/detail"; - } - - /** - * 保存 - */ - @ApiOperation(value = "新增", notes = "新增") - @ResponseBody - @PostMapping("/save") - @RequiresPermissions("system:user:add") - public R save( UserDO user) { - if (userService.save(user) > 0) { - return R.ok(); - } - return R.error(); - } - - /** - * 修改 - */ - @ApiOperation(value = "修改", notes = "修改") - @ResponseBody - @RequestMapping("/update") - @RequiresPermissions("system:user:edit") - public R update( UserDO user) { - userService.update(user); - return R.ok(); - } - - /** - * 删除 - */ - @ApiOperation(value = "删除", notes = "删除") - @PostMapping("/remove") - @ResponseBody - @RequiresPermissions("system:user:remove") - public R remove( Long id) { - if (userService.remove(id) > 0) { - return R.ok(); - } - return R.error(); - } - - /** - * 删除 - */ - @ApiOperation(value = "批量删除", notes = "批量删除") - @PostMapping("/batchRemove") - @ResponseBody - @RequiresPermissions("system:user:batchRemove") - public R remove(@RequestParam("ids[]") Long[] ids) { - userService.batchRemove(ids); - return R.ok(); - } - -} diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/dao/UserDao.java" "b/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/dao/UserDao.java" deleted file mode 100644 index af50a51..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/dao/UserDao.java" +++ /dev/null @@ -1,32 +0,0 @@ -package com.java2nb.system.dao; - -import com.java2nb.system.domain.UserDO; - -import java.util.List; -import java.util.Map; - -import org.apache.ibatis.annotations.Mapper; - -/** - * - * @author xiongxy - * @email 1179705413@qq.com - * @date 2020-12-01 03:46:33 - */ -@Mapper -public interface UserDao { - - UserDO get(Long id); - - List list(Map map); - - int count(Map map); - - int save(UserDO user); - - int update(UserDO user); - - int remove(Long id); - - int batchRemove(Long[] ids); -} diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/domain/UserDO.java" "b/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/domain/UserDO.java" deleted file mode 100644 index f903dfe..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/domain/UserDO.java" +++ /dev/null @@ -1,177 +0,0 @@ -package com.java2nb.system.domain; - -import java.io.Serializable; - - -import java.math.BigDecimal; - -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.java2nb.common.jsonserializer.LongToStringSerializer; - - -import org.springframework.format.annotation.DateTimeFormat; -import java.util.Date; - - - -/** - * - * - * @author xiongxy - * @email 1179705413@qq.com - * @date 2020-12-01 03:46:33 - */ -public class UserDO implements Serializable { - private static final long serialVersionUID = 1L; - - - //主键 - //java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值) - //所以通过序列化成字符串来解决 - @JsonSerialize(using = LongToStringSerializer.class) - private Long id; - //登录名 - private String username; - //登录密码 - private String password; - //昵称 - private String nickName; - //用户头像 - private String userPhoto; - //用户性别,0:男,1:女 - private Integer userSex; - //账户余额 - //java中的long能表示的范围比js中number大,也就意味着部分数值在js中存不下(变成不准确的值) - //所以通过序列化成字符串来解决 - @JsonSerialize(using = LongToStringSerializer.class) - private Long accountBalance; - //用户状态,0:正常 - private Integer status; - //创建时间 - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - //更新时间 - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - /** - * 设置:主键 - */ - public void setId(Long id) { - this.id = id; - } - /** - * 获取:主键 - */ - public Long getId() { - return id; - } - /** - * 设置:登录名 - */ - public void setUsername(String username) { - this.username = username; - } - /** - * 获取:登录名 - */ - public String getUsername() { - return username; - } - /** - * 设置:登录密码 - */ - public void setPassword(String password) { - this.password = password; - } - /** - * 获取:登录密码 - */ - public String getPassword() { - return password; - } - /** - * 设置:昵称 - */ - public void setNickName(String nickName) { - this.nickName = nickName; - } - /** - * 获取:昵称 - */ - public String getNickName() { - return nickName; - } - /** - * 设置:用户头像 - */ - public void setUserPhoto(String userPhoto) { - this.userPhoto = userPhoto; - } - /** - * 获取:用户头像 - */ - public String getUserPhoto() { - return userPhoto; - } - /** - * 设置:用户性别,0:男,1:女 - */ - public void setUserSex(Integer userSex) { - this.userSex = userSex; - } - /** - * 获取:用户性别,0:男,1:女 - */ - public Integer getUserSex() { - return userSex; - } - /** - * 设置:账户余额 - */ - public void setAccountBalance(Long accountBalance) { - this.accountBalance = accountBalance; - } - /** - * 获取:账户余额 - */ - public Long getAccountBalance() { - return accountBalance; - } - /** - * 设置:用户状态,0:正常 - */ - public void setStatus(Integer status) { - this.status = status; - } - /** - * 获取:用户状态,0:正常 - */ - public Integer getStatus() { - return status; - } - /** - * 设置:创建时间 - */ - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - /** - * 获取:创建时间 - */ - public Date getCreateTime() { - return createTime; - } - /** - * 设置:更新时间 - */ - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - /** - * 获取:更新时间 - */ - public Date getUpdateTime() { - return updateTime; - } -} diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/service/UserService.java" "b/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/service/UserService.java" deleted file mode 100644 index 38c8b51..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/service/UserService.java" +++ /dev/null @@ -1,30 +0,0 @@ -package com.java2nb.system.service; - -import com.java2nb.system.domain.UserDO; - -import java.util.List; -import java.util.Map; - -/** - * - * - * @author xiongxy - * @email 1179705413@qq.com - * @date 2020-12-01 03:46:33 - */ -public interface UserService { - - UserDO get(Long id); - - List list(Map map); - - int count(Map map); - - int save(UserDO user); - - int update(UserDO user); - - int remove(Long id); - - int batchRemove(Long[] ids); -} diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/service/impl/UserServiceImpl.java" "b/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/service/impl/UserServiceImpl.java" deleted file mode 100644 index 53d7d1b..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/java/com/java2nb/system/service/impl/UserServiceImpl.java" +++ /dev/null @@ -1,55 +0,0 @@ -package com.java2nb.system.service.impl; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; -import java.util.Map; - -import com.java2nb.system.dao.UserDao; -import com.java2nb.system.domain.UserDO; -import com.java2nb.system.service.UserService; - - - -@Service -public class UserServiceImpl implements UserService { - @Autowired - private UserDao userDao; - - @Override - public UserDO get(Long id){ - return userDao.get(id); - } - - @Override - public List list(Map map){ - return userDao.list(map); - } - - @Override - public int count(Map map){ - return userDao.count(map); - } - - @Override - public int save(UserDO user){ - return userDao.save(user); - } - - @Override - public int update(UserDO user){ - return userDao.update(user); - } - - @Override - public int remove(Long id){ - return userDao.remove(id); - } - - @Override - public int batchRemove(Long[] ids){ - return userDao.batchRemove(ids); - } - -} diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/mybatis/system/UserMapper.xml" "b/D:\\gitee\\admin-base\\java2nb\\src/main/resources/mybatis/system/UserMapper.xml" deleted file mode 100644 index cbb3d5b..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/mybatis/system/UserMapper.xml" +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - insert into user - ( - `id`, - `username`, - `password`, - `nick_name`, - `user_photo`, - `user_sex`, - `account_balance`, - `status`, - `create_time`, - `update_time` - ) - values - ( - #{id}, - #{username}, - #{password}, - #{nickName}, - #{userPhoto}, - #{userSex}, - #{accountBalance}, - #{status}, - #{createTime}, - #{updateTime} - ) - - - - insert into user - ( - `id`, - `username`, - `password`, - `nick_name`, - `user_photo`, - `user_sex`, - `account_balance`, - `status`, - `create_time`, - `update_time` - ) - values - ( - #{id}, - #{username}, - #{password}, - #{nickName}, - #{userPhoto}, - #{userSex}, - #{accountBalance}, - #{status}, - #{createTime}, - #{updateTime} - ) - - - - update user - - `username` = #{username}, - `password` = #{password}, - `nick_name` = #{nickName}, - `user_photo` = #{userPhoto}, - `user_sex` = #{userSex}, - `account_balance` = #{accountBalance}, - `status` = #{status}, - `create_time` = #{createTime}, - `update_time` = #{updateTime} - - where id = #{id} - - - - delete from user where id = #{value} - - - - delete from user where id in - - #{id} - - - - \ No newline at end of file diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/js/appjs/system/user/add.js" "b/D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/js/appjs/system/user/add.js" deleted file mode 100644 index 790371d..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/js/appjs/system/user/add.js" +++ /dev/null @@ -1,107 +0,0 @@ -var E = window.wangEditor; -$("[id^='contentEditor']").each(function (index, ele) { - var relName = $(ele).attr("id").substring(13); - var editor = new E('#contentEditor' + relName); -// 自定义菜单配置 - editor.customConfig.menus = [ - 'head', // 标题 - 'bold', // 粗体 - 'fontSize', // 字号 - 'fontName', // 字体 - 'italic', // 斜体 - 'underline', // 下划线 - 'strikeThrough', // 删除线 - 'foreColor', // 文字颜色 - //'backColor', // 背景颜色 - //'link', // 插入链接 - 'list', // 列表 - 'justify', // 对齐方式 - 'quote', // 引用 - 'emoticon', // 表情 - 'image', // 插入图片 - //'table', // 表格 - //'video', // 插入视频 - //'code', // 插入代码 - 'undo', // 撤销 - 'redo' // 重复 - ]; - editor.customConfig.onchange = function (html) { - // html 即变化之后的内容 - $("#" + relName).val(html); - } - editor.customConfig.uploadImgShowBase64 = true; - editor.create(); - -}) - -$("[id^='picImage']").each(function (index, ele) { - var relName = $(ele).attr("id").substring(8); - layui.use('upload', function () { - var upload = layui.upload; - //执行实例 - var uploadInst = upload.render({ - elem: '#picImage' + relName, //绑定元素 - url: '/common/sysFile/upload', //上传接口 - size: 1000, - accept: 'file', - done: function (r) { - $("#picImage" + relName).attr("src", r.fileName); - $("#" + relName).val(r.fileName); - }, - error: function (r) { - layer.msg(r.msg); - } - }); - }); - -}); - - - - - - -$().ready(function () { - validateRule(); -}); - -$.validator.setDefaults({ - submitHandler: function () { - save(); - } -}); -function save() { - $.ajax({ - cache: true, - type: "POST", - url: "/system/user/save", - data: $('#signupForm').serialize(),// 你的formid - async: false, - error: function (request) { - parent.layer.alert("Connection error"); - }, - success: function (data) { - if (data.code == 0) { - parent.layer.msg("操作成功"); - parent.reLoad(); - var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引 - parent.layer.close(index); - - } else { - parent.layer.alert(data.msg) - } - - } - }); - -} -function validateRule() { - var icon = " "; - $("#signupForm").validate({ - ignore: "", - rules: { - }, - messages: { - } -}) -} \ No newline at end of file diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/js/appjs/system/user/edit.js" "b/D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/js/appjs/system/user/edit.js" deleted file mode 100644 index fecfb95..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/js/appjs/system/user/edit.js" +++ /dev/null @@ -1,103 +0,0 @@ -var E = window.wangEditor; -$("[id^='contentEditor']").each(function (index, ele) { - var relName = $(ele).attr("id").substring(13); - var editor = new E('#contentEditor' + relName); -// 自定义菜单配置 - editor.customConfig.menus = [ - 'head', // 标题 - 'bold', // 粗体 - 'fontSize', // 字号 - 'fontName', // 字体 - 'italic', // 斜体 - 'underline', // 下划线 - 'strikeThrough', // 删除线 - 'foreColor', // 文字颜色 - //'backColor', // 背景颜色 - //'link', // 插入链接 - 'list', // 列表 - 'justify', // 对齐方式 - 'quote', // 引用 - 'emoticon', // 表情 - 'image', // 插入图片 - //'table', // 表格 - //'video', // 插入视频 - //'code', // 插入代码 - 'undo', // 撤销 - 'redo' // 重复 - ]; - editor.customConfig.onchange = function (html) { - // html 即变化之后的内容 - $("#" + relName).val(html); - } - editor.customConfig.uploadImgShowBase64 = true; - editor.create(); - editor.txt.html($("#" + relName).val()); - -}) - -$("[id^='picImage']").each(function (index, ele) { - var relName = $(ele).attr("id").substring(8); - layui.use('upload', function () { - var upload = layui.upload; - //执行实例 - var uploadInst = upload.render({ - elem: '#picImage' + relName, //绑定元素 - url: '/common/sysFile/upload', //上传接口 - size: 1000, - accept: 'file', - done: function (r) { - $("#picImage" + relName).attr("src", r.fileName); - $("#" + relName).val(r.fileName); - }, - error: function (r) { - layer.msg(r.msg); - } - }); - }); - -}); - -$().ready(function () { - validateRule(); -}); - -$.validator.setDefaults({ - submitHandler: function () { - update(); - } -}); -function update() { - $.ajax({ - cache: true, - type: "POST", - url: "/system/user/update", - data: $('#signupForm').serialize(),// 你的formid - async: false, - error: function (request) { - parent.layer.alert("Connection error"); - }, - success: function (data) { - if (data.code == 0) { - parent.layer.msg("操作成功"); - parent.reLoad(); - var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引 - parent.layer.close(index); - - } else { - parent.layer.alert(data.msg) - } - - } - }); - -} -function validateRule() { - var icon = " "; - $("#signupForm").validate({ - ignore: "", - rules: { - }, - messages: { - } -}) -} \ No newline at end of file diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/js/appjs/system/user/user.js" "b/D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/js/appjs/system/user/user.js" deleted file mode 100644 index 36cd101..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/js/appjs/system/user/user.js" +++ /dev/null @@ -1,231 +0,0 @@ -var prefix = "/system/user" -$(function () { - load(); -}); - -function load() { - $('#exampleTable') - .bootstrapTable( - { - method: 'get', // 服务器数据的请求方式 get or post - url: prefix + "/list", // 服务器数据的加载地址 - // showRefresh : true, - // showToggle : true, - // showColumns : true, - iconSize: 'outline', - toolbar: '#exampleToolbar', - striped: true, // 设置为true会有隔行变色效果 - dataType: "json", // 服务器返回的数据类型 - pagination: true, // 设置为true会在底部显示分页条 - // queryParamsType : "limit", - // //设置为limit则会发送符合RESTFull格式的参数 - singleSelect: false, // 设置为true将禁止多选 - // contentType : "application/x-www-form-urlencoded", - // //发送到服务器的数据编码类型 - pageSize: 10, // 如果设置了分页,每页数据条数 - pageNumber: 1, // 如果设置了分布,首页页码 - //search : true, // 是否显示搜索框 - showColumns: false, // 是否显示内容下拉框(选择显示的列) - sidePagination: "server", // 设置在哪里进行分页,可选值为"client" 或者 "server" - queryParams: function (params) { - //说明:传入后台的参数包括offset开始索引,limit步长,sort排序列,order:desc或者,以及所有列的键值对 - var queryParams = getFormJson("searchForm"); - queryParams.limit = params.limit; - queryParams.offset = params.offset; - return queryParams; - }, - // //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果 - // queryParamsType = 'limit' ,返回参数必须包含 - // limit, offset, search, sort, order 否则, 需要包含: - // pageSize, pageNumber, searchText, sortName, - // sortOrder. - // 返回false将会终止请求 - responseHandler: function (rs) { - - if (rs.code == 0) { - return rs.data; - } else { - parent.layer.alert(rs.msg) - return {total: 0, rows: []}; - } - }, - columns: [ - { - checkbox: true - }, - { - title: '序号', - formatter: function () { - return arguments[2] + 1; - } - }, - { - field: 'id', - title: '主键' - }, - - - { - field: 'username', - title: '登录名' - }, - - - { - field: 'password', - title: '登录密码' - }, - - - { - field: 'nickName', - title: '昵称' - }, - - - { - field: 'userPhoto', - title: '用户头像' - }, - - - { - field: 'userSex', - title: '用户性别,0:男,1:女' - }, - - - { - field: 'accountBalance', - title: '账户余额' - }, - - - { - field: 'status', - title: '用户状态,0:正常' - }, - - - { - field: 'createTime', - title: '创建时间' - }, - - - { - field: 'updateTime', - title: '更新时间' - }, - - - { - title: '操作', - field: 'id', - align: 'center', - formatter: function (value, row, index) { - var d = ' '; - var e = ' '; - var r = ' '; - return d + e + r; - } - }] - }); -} -function reLoad() { - $('#exampleTable').bootstrapTable('refresh'); -} -function add() { - layer.open({ - type: 2, - title: '增加', - maxmin: true, - shadeClose: false, // 点击遮罩关闭层 - area: ['800px', '520px'], - content: prefix + '/add' // iframe的url - }); -} -function detail(id) { - layer.open({ - type: 2, - title: '详情', - maxmin: true, - shadeClose: false, // 点击遮罩关闭层 - area: ['800px', '520px'], - content: prefix + '/detail/' + id // iframe的url - }); -} -function edit(id) { - layer.open({ - type: 2, - title: '编辑', - maxmin: true, - shadeClose: false, // 点击遮罩关闭层 - area: ['800px', '520px'], - content: prefix + '/edit/' + id // iframe的url - }); -} -function remove(id) { - layer.confirm('确定要删除选中的记录?', { - btn: ['确定', '取消'] - }, function () { - $.ajax({ - url: prefix + "/remove", - type: "post", - data: { - 'id': id - }, - success: function (r) { - if (r.code == 0) { - layer.msg(r.msg); - reLoad(); - } else { - layer.msg(r.msg); - } - } - }); - }) -} - -function resetPwd(id) { -} -function batchRemove() { - var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组 - if (rows.length == 0) { - layer.msg("请选择要删除的数据"); - return; - } - layer.confirm("确认要删除选中的'" + rows.length + "'条数据吗?", { - btn: ['确定', '取消'] - // 按钮 - }, function () { - var ids = new Array(); - // 遍历所有选择的行数据,取每条数据对应的ID - $.each(rows, function (i, row) { - ids[i] = row['id']; - }); - $.ajax({ - type: 'POST', - data: { - "ids": ids - }, - url: prefix + '/batchRemove', - success: function (r) { - if (r.code == 0) { - layer.msg(r.msg); - reLoad(); - } else { - layer.msg(r.msg); - } - } - }); - }, function () { - - }); -} \ No newline at end of file diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/sql/system/user/menu.js" "b/D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/sql/system/user/menu.js" deleted file mode 100644 index 5ea286a..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/static/sql/system/user/menu.js" +++ /dev/null @@ -1,18 +0,0 @@ --- 菜单SQL -INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) - VALUES ('1', '', 'system/user', 'system:user:user', '1', 'fa', '6'); - --- 按钮父菜单ID -set @parentId = @@identity; - --- 菜单对应按钮SQL -INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) - SELECT @parentId, '查看', null, 'system:user:detail', '2', null, '6'; -INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) - SELECT @parentId, '新增', null, 'system:user:add', '2', null, '6'; -INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) - SELECT @parentId, '修改', null, 'system:user:edit', '2', null, '6'; -INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) - SELECT @parentId, '删除', null, 'system:user:remove', '2', null, '6'; -INSERT INTO `sys_menu` (`parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) - SELECT @parentId, '批量删除', null, 'system:user:batchRemove', '2', null, '6'; diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/add.html" "b/D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/add.html" deleted file mode 100644 index e8de6ff..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/add.html" +++ /dev/null @@ -1,113 +0,0 @@ - - - - - -
-
-
-
-
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
- -
- - -
-
-
-
- -
-
-
-
-
-
-
-
-
- - - - diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/detail.html" "b/D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/detail.html" deleted file mode 100644 index 8494758..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/detail.html" +++ /dev/null @@ -1,110 +0,0 @@ - - - - - -
-
-
-
-
-
- -
- - -
-
- - - -
-
- - -
-
- - - -
-
- - -
-
- - - -
-
- - -
-
- - - -
-
- - -
-
- - - -
-
- - -
-
- - - -
-
- - -
-
- - - -
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
-
-
-
-
- - diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/edit.html" "b/D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/edit.html" deleted file mode 100644 index f65d479..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/edit.html" +++ /dev/null @@ -1,115 +0,0 @@ - - - - - -
-
-
-
-
-
- -
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
-
-
-
-
-
-
-
-
- - - - diff --git "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/user.html" "b/D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/user.html" deleted file mode 100644 index 577078b..0000000 --- "a/D:\\gitee\\admin-base\\java2nb\\src/main/resources/templates/system/user/user.html" +++ /dev/null @@ -1,66 +0,0 @@ - - - - - -
-
-
-
-
-
- - -
-
- -
- -
-
- -
-
- -
- -
-
-
-
-
- -
- -
-
- -
-
- -
-
- -
-
- - - \ No newline at end of file