Commit cc7e00be authored by unset's avatar unset

修改车辆信息

parent ad59aaa9
......@@ -70,15 +70,20 @@ public class VehicleCommonPriceInfoBiz extends BaseBiz<VehicleCommonPriceInfoMap
vehicleList.parallelStream().forEach(vehicleInfo -> {
if (vehicleInfo != null) {
VehicleCommonPriceInfo oldValue = getByVehicleId(vehicleInfo.getId());
vehicleCommonPriceInfo.setVehicleId(vehicleInfo.getId());
vehicleCommonPriceInfo.setCompanyId(vehicleInfo.getSubordinateBranch());
vehicleCommonPriceInfo.setModelId(vehicleInfo.getModelId());
vehicleCommonPriceInfo.setId(null);
if (oldValue == null) {
insertSelectiveRe(vehicleCommonPriceInfo);
oldValue = new VehicleCommonPriceInfo();
BeanUtil.copyProperties(vehicleCommonPriceInfo, oldValue, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
oldValue.setVehicleId(vehicleInfo.getId());
oldValue.setCompanyId(vehicleInfo.getSubordinateBranch());
oldValue.setModelId(vehicleInfo.getModelId());
oldValue.setId(null);
insertSelectiveRe(oldValue);
} else {
BeanUtil.copyProperties(vehicleCommonPriceInfo, oldValue, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
updateSelectiveByIdRe(oldValue);
oldValue.setVehicleId(vehicleInfo.getId());
oldValue.setCompanyId(vehicleInfo.getSubordinateBranch());
oldValue.setModelId(vehicleInfo.getModelId());
mapper.updateByPrimaryKeySelective(oldValue);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment