fix(user-machine): 修复用户机台配置重复检查和错误处理

This commit is contained in:
zxy 2026-04-16 09:50:59 +08:00
parent 1d0ea38706
commit eb103439b9
2 changed files with 3 additions and 3 deletions

View File

@ -106,7 +106,7 @@ public class UserMachineServiceImpl extends ServiceImpl<UserMachineMapper, UserM
.eq(UserMachineEntity::getUserId, userMachineForm.getUserId())
.eq(UserMachineEntity::getDeleteMark, 0));
if (existingEntity != null) {
throw new Exception("该人员已配置机台班组,不能重复配置");
throw new Exception("该人员已配置,请确认!");
}
entity = new UserMachineEntity();
BeanUtils.copyProperties(userMachineForm, entity);

View File

@ -83,7 +83,7 @@ public class UserMachineController {
userMachineService.saveOrUpdate(userMachineForm, "", true);
return ActionResult.success("新建成功");
} catch (Exception e) {
return ActionResult.fail("新建数据失败:" + e.getMessage());
return ActionResult.fail(e.getMessage());
}
}