|
@@ -44,12 +44,10 @@ public class TFareSettingServiceImpl extends ServiceImpl<TFareSettingMapper, TFa
|
|
|
LambdaQueryWrapper<TFareSetting> tFareSettingLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
tFareSettingLambdaQueryWrapper.eq(TFareSetting::getDeptId, tFareSetting.getDeptId())
|
|
|
.eq(TFareSetting::getEnable, MassageConstants.INTEGER_ONE);
|
|
|
+ //该部门已启用的
|
|
|
List<TFareSetting> fareSettings = this.list(tFareSettingLambdaQueryWrapper);
|
|
|
if (!Collections.isEmpty(fareSettings)) {
|
|
|
- List<TFareSetting> collect = fareSettings.stream().filter(i -> i.getId().equals(tFareSetting.getId())).collect(Collectors.toList());
|
|
|
- if (Collections.isEmpty(collect)) {
|
|
|
- throw new ServiceException("该部门已有启用的设置");
|
|
|
- }
|
|
|
+ throw new ServiceException("该部门已有启用的设置");
|
|
|
}
|
|
|
}
|
|
|
this.updateById(tFareSetting);
|