瀏覽代碼

产品库允许修改币种字段

yzc 1 年之前
父節點
當前提交
865e5a208f
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      hx-item/src/main/java/com/fjhx/item/service/product/impl/ProductInfoServiceImpl.java

+ 4 - 0
hx-item/src/main/java/com/fjhx/item/service/product/impl/ProductInfoServiceImpl.java

@@ -348,10 +348,14 @@ public class ProductInfoServiceImpl extends ServiceImpl<ProductInfoMapper, Produ
         if (ObjectUtil.isEmpty(productInfo)) {
             throw new ServiceException("无法查询到改产品的产品信息,产品id" + productInfoDto.getId());
         }
+        //限制只能改以下字段
         ProductInfoEhsdJson productInfoEhsdJson = JSONObject.parseObject(productInfo.getEhsdJson(), ProductInfoEhsdJson.class);
         productInfoEhsdJson.setPrice(newProductInfoEhsdJson.getPrice());//销售指导价
+        productInfoEhsdJson.setCurrency(newProductInfoEhsdJson.getCurrency());//指导价币种
         productInfoEhsdJson.setCostPrice(newProductInfoEhsdJson.getCostPrice());//成本价
+        productInfoEhsdJson.setCostCurrency(newProductInfoEhsdJson.getCostCurrency());//成本币种
         productInfoEhsdJson.setNetWeight(newProductInfoEhsdJson.getNetWeight());//净重
+
         productInfo.setRemark(productInfoDto.getRemark());//备注
         productInfo.setEhsdJson(JSONObject.toJSONString(productInfoEhsdJson,JSONWriter.Feature.WriteLongAsString));
         this.updateById(productInfo);