|
@@ -232,9 +232,13 @@ public class PatrolInspectionPersonnelServiceImpl extends AbstractCrudService<Pa
|
|
|
*/
|
|
|
public PatrolInspectionPersonnel getStatus(){
|
|
|
LambdaQueryWrapper<PatrolInspectionPersonnel> wrapper = Wrappers.lambdaQuery();
|
|
|
- wrapper.eq(PatrolInspectionPersonnel::getUserId,SecurityUtils.getUserId())
|
|
|
- .last("LIMIT 1");
|
|
|
+ wrapper.eq(PatrolInspectionPersonnel::getUserId,SecurityUtils.getUserId());
|
|
|
+ if (baseMapper.selectOne(wrapper)==null) {
|
|
|
+ throw new BusinessException("您不是巡检人员,无法进行此操作!");
|
|
|
+ }else {
|
|
|
+ wrapper.last("LIMIT 1");
|
|
|
return baseMapper.selectOne(wrapper);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|