| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.constant.HttpStatus; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.smartor.mapper.SysUserDeptMapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | user.setPageNum(null); |
| | | user.setPageSize(null); |
| | | List<SysUser> total = userService.getUserList(user); |
| | | rspData.put("total", total.size()); |
| | | |
| | | if (CollectionUtils.isNotEmpty(total)) rspData.put("total", total.size()); |
| | | else rspData.put("total", 0); |
| | | return rspData; |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:user:add')") |
| | | @Log(title = "用户管理", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@Validated @RequestBody SysUser user) { |
| | | if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user))) { |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('system:user:edit')") |
| | | @Log(title = "用户管理", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@Validated @RequestBody SysUser user) { |
| | | userService.checkUserAllowed(user); |