| | |
| | | package com.ruoyi.system.controller; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | |
| | | import io.seata.spring.annotation.GlobalTransactional; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | @RestController |
| | | @RequestMapping("/user") |
| | | @Api(tags = "用户信息") |
| | | @Slf4j |
| | | public class SysUserController extends BaseController { |
| | | @Resource |
| | | private ISysUserService userService; |
| | |
| | | if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user)) { |
| | | return error("手机号已开通账号"); |
| | | } |
| | | if (StringUtils.isNotEmpty(user.getUserName()) && !userService.checkUserNameUnique(user)) { |
| | | |
| | | if (StringUtils.isNotEmpty(user.getNickName()) && !userService.checkNickNameUnique(user)) { |
| | | return error("登录账号重复"); |
| | | } |
| | | //门店员工添加数据,需要判断账号是否存在,共用同一个账号 |
| | |
| | | if (ArrayUtils.contains(userIds, SecurityUtils.getUserId())) { |
| | | return error("当前用户不能删除"); |
| | | } |
| | | return toAjax(userService.deleteUserByIds(userIds)); |
| | | userService.deleteUserByIds(userIds); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |