订单管理所有模块以及商品管理BUG修改

zhc4dev
Gitea 2 years ago
parent 235b634e21
commit 4b5d77d3fe
  1. 16
      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<ZyGoods, IZyGoodsService>
@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<ZyStyleModule> queryWrapperzsm = QueryGenerator.initQueryWrapper(zyStyleModule, req.getParameterMap());
@ -172,6 +180,14 @@ public class ZyGoodsController extends JeecgController<ZyGoods, IZyGoodsService>
@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<GoodsModule> queryWrappergm = QueryGenerator.initQueryWrapper(goodsModule, req.getParameterMap());

Loading…
Cancel
Save