Search in sources :

Example 1 with AgileSysDictData

use of com.jeeagile.system.entity.AgileSysDictData 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);
}
Also used : AgileSysDictData(com.jeeagile.system.entity.AgileSysDictData) UpdateWrapper(com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper) LambdaUpdateWrapper(com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper) AgileSysDictType(com.jeeagile.system.entity.AgileSysDictType)

Aggregations

LambdaUpdateWrapper (com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper)1 UpdateWrapper (com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper)1 AgileSysDictData (com.jeeagile.system.entity.AgileSysDictData)1 AgileSysDictType (com.jeeagile.system.entity.AgileSysDictType)1