bug修改
This commit is contained in:
parent
70d5cb8b67
commit
a8970bb5c5
|
|
@ -178,6 +178,11 @@ public class TbPeopleServiceImpl implements TbPeopleService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult deleteById(Long id) {
|
public AjaxResult deleteById(Long id) {
|
||||||
|
//通过id查询人员是否绑定班组,绑定则不能删除
|
||||||
|
TbPeople tbPeople = tbPeopleDao.queryById(id);
|
||||||
|
if (tbPeople.getTeamId() != null) {
|
||||||
|
return AjaxResult.error("该人员还绑定相关班组,无法删除");
|
||||||
|
}
|
||||||
int result = tbPeopleDao.deleteById(id);
|
int result = tbPeopleDao.deleteById(id);
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
return AjaxResult.success(ExceptionEnum.SUCCESS.getMsg(), result);
|
return AjaxResult.success(ExceptionEnum.SUCCESS.getMsg(), result);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue