diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java index ecf7a730..c08bb049 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java +++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/controller/ZyGoodsController.java @@ -124,6 +124,14 @@ public class ZyGoodsController extends JeecgController @ApiOperation(value="商品表-添加", notes="商品表-添加") @PostMapping(value = "/add") public Result add(@RequestBody ZyGoods zyGoods,HttpServletRequest req) { + ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(zyGoods.getStyleId()); + zyGoods.setSpecification(zyClothsStyle.getSpecification()); + zyGoods.setProductOverview(zyClothsStyle.getProductOverview()); + zyGoods.setStructure(zyClothsStyle.getStructure()); + zyGoods.setCharacteristic(zyClothsStyle.getCharacteristic()); + zyGoods.setFoldingPackaging(zyClothsStyle.getFoldingPackaging()); + zyGoods.setAccLogos(zyClothsStyle.getAccLogos()); + zyGoods.setSewingForm(zyClothsStyle.getSewingForm()); zyGoodsService.save(zyGoods); ZyStyleModule zyStyleModule = new ZyStyleModule(); QueryWrapper queryWrapperzsm = QueryGenerator.initQueryWrapper(zyStyleModule, req.getParameterMap()); @@ -172,6 +180,14 @@ public class ZyGoodsController extends JeecgController @ApiOperation(value="商品表-编辑", notes="商品表-编辑") @PutMapping(value = "/edit") public Result edit(@RequestBody ZyGoods zyGoods,HttpServletRequest req) { + ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(zyGoods.getStyleId()); + zyGoods.setSpecification(zyClothsStyle.getSpecification()); + zyGoods.setProductOverview(zyClothsStyle.getProductOverview()); + zyGoods.setStructure(zyClothsStyle.getStructure()); + zyGoods.setCharacteristic(zyClothsStyle.getCharacteristic()); + zyGoods.setFoldingPackaging(zyClothsStyle.getFoldingPackaging()); + zyGoods.setAccLogos(zyClothsStyle.getAccLogos()); + zyGoods.setSewingForm(zyClothsStyle.getSewingForm()); zyGoodsService.updateById(zyGoods); GoodsModule goodsModule = new GoodsModule(); QueryWrapper queryWrappergm = QueryGenerator.initQueryWrapper(goodsModule, req.getParameterMap());