|
@@ -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);
|