禅道#1439问题修复 & 基础、系统配置非必填字段无法重置问题修复

This commit is contained in:
gaoqr
2025-03-28 17:46:42 +08:00
parent b1006a91f8
commit 3da42cf1e6
@@ -100,28 +100,12 @@ public class PlateManageServiceImpl implements PlateManageService {
throw exception(ErrorCodeConstants.PLATE_NOT_EXISTS);
}
validatePlateExists(updateReqVO.getId(), organId);
PlateGoodDO updateObj = BeanUtils.toBean(updateReqVO, PlateGoodDO.class);
// 校验板材goods_id是否相同
if (plateGoodMapper.isByGoodIDAndId(updateReqVO.getGoodsId(), organId, Long.valueOf(updateReqVO.getId()))) {
throw exception(PLATE_GOODS_ID_NOT_SAME);
}
PlateGoodDO updateObj = PlateGoodDO.builder()
.id(updateReqVO.getId())
.goodsId(updateReqVO.getGoodsId())
.goodsName(updateReqVO.getGoodsName())
.material(updateReqVO.getMaterial())
.color(updateReqVO.getColor())
.texture(ObjectUtil.isNull(updateReqVO.getTexture()) ? false : updateReqVO.getTexture())
.width(getZeroDouble(updateReqVO.getWidth()))
.height(getZeroDouble(updateReqVO.getHeight()))
.thickness(getZeroDouble(updateReqVO.getThickness()))
.price(getZeroDouble(updateReqVO.getPrice()))
.brand(getEmpty(updateReqVO.getBrand()))
.spec(getEmpty(updateReqVO.getSpec()))
.remark(getEmpty(updateReqVO.getRemark()))
.organId(organId)
.build();
plateGoodMapper.updateById(updateObj);
}