Browse Source

feat: 商品进销存

Joburgess 4 years ago
parent
commit
231a798dce

+ 1 - 1
mec-student/src/main/java/com/ym/mec/student/controller/GoodsController.java

@@ -39,7 +39,7 @@ public class GoodsController extends BaseController {
     public Object get(@ApiParam(value = "商品(教材、辅件)编号", required = true) @PathVariable("id") Integer id){
         Goods goods = goodsService.get(id);
         if(Objects.nonNull(goods.getGoodsCategoryId())){
-            GoodsCategory goodsCategory = goodsCategoryService.get(goods.getId());
+            GoodsCategory goodsCategory = goodsCategoryService.get(goods.getGoodsCategoryId());
             goods.setGoodsCategoryName(goodsCategory.getName());
         }
         return succeed(goods);

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/GoodsController.java

@@ -97,7 +97,7 @@ public class GoodsController extends BaseController {
     public Object get(@ApiParam(value = "商品(教材、辅件)编号", required = true) @PathVariable("id") Integer id){
         Goods goods = goodsService.get(id);
         if(Objects.nonNull(goods.getGoodsCategoryId())){
-            GoodsCategory goodsCategory = goodsCategoryService.get(goods.getId());
+            GoodsCategory goodsCategory = goodsCategoryService.get(goods.getGoodsCategoryId());
             goods.setGoodsCategoryName(goodsCategory.getName());
         }
         return succeed(goods);