use of com.jeeagile.system.entity.AgileSysDictType in project jeeagile by jeeagile.
the class AgileSysDictTypeServiceImpl method updateModel.
@Override
public boolean updateModel(AgileSysDictType agileSysDictType) {
this.validateData(agileSysDictType);
AgileSysDictType oldAgileSysDictType = this.getById(agileSysDictType.getId());
if (oldAgileSysDictType.getDictType() != agileSysDictType.getDictType()) {
LambdaUpdateWrapper<AgileSysDictData> lambdaUpdateWrapper = new UpdateWrapper().lambda();
lambdaUpdateWrapper.set(AgileSysDictData::getDictType, agileSysDictType.getDictType());
lambdaUpdateWrapper.eq(AgileSysDictData::getDictType, oldAgileSysDictType.getDictType());
agileSysDictDataService.update(lambdaUpdateWrapper);
}
return this.updateById(agileSysDictType);
}
use of com.jeeagile.system.entity.AgileSysDictType in project jeeagile by jeeagile.
the class AgileSysDictTypeServiceImpl method deleteModel.
@Override
public boolean deleteModel(Serializable id) {
AgileSysDictType agileSysDictType = this.getById(id);
if (agileSysDictType.getSystemFlag().equals(AgileFlagEnum.YES.getCode())) {
throw new AgileValidateException("系统内置,不能删除!");
}
this.deleteDictData(agileSysDictType);
return this.removeById(id);
}
Aggregations