| | |
| | | public Result <String> save(@Valid @RequestBody RobotDTO robotDTO) { |
| | | String password = robotDTO.getPassword(); |
| | | if(StringUtils.isEmptyString(password)){ |
| | | throw new YamiShopBindException("密码不能为空"); |
| | | throw new YamiShopBindException("Password cannot be empty"); |
| | | } |
| | | |
| | | Robot robot = robotWrapper.toEntity(robotDTO); |
| | |
| | | //用户存在,并且不是机器人 |
| | | Robot robot1 = robotService.getOne(new LambdaQueryWrapper<Robot>().eq(Robot::getUser, user.getUserId())); |
| | | if(robot1 == null){ |
| | | throw new YamiShopBindException("账号已存在"); |
| | | throw new YamiShopBindException("Account already exists"); |
| | | } |
| | | // robotService.getOne(robot); |
| | | // robot.getUser(user.getUserId()); |