|
@@ -22,6 +22,8 @@ import org.springblade.core.mp.support.Condition;
|
|
import org.springblade.core.mp.support.Query;
|
|
import org.springblade.core.mp.support.Query;
|
|
import org.springblade.core.tool.api.R;
|
|
import org.springblade.core.tool.api.R;
|
|
import org.springblade.modules.api.request.GoodsListRequest;
|
|
import org.springblade.modules.api.request.GoodsListRequest;
|
|
|
|
+import org.springblade.modules.business.entity.FacilityCargoWay;
|
|
|
|
+import org.springblade.modules.business.service.IFacilityCargoWayService;
|
|
import org.springblade.modules.business.service.IFacilityService;
|
|
import org.springblade.modules.business.service.IFacilityService;
|
|
import org.springblade.modules.mall.entity.CategoryInfo;
|
|
import org.springblade.modules.mall.entity.CategoryInfo;
|
|
import org.springblade.modules.mall.entity.GoodsInfo;
|
|
import org.springblade.modules.mall.entity.GoodsInfo;
|
|
@@ -50,6 +52,7 @@ public class ApiGoodsController extends BladeController {
|
|
private final ICategoryInfoService categoryInfoService;
|
|
private final ICategoryInfoService categoryInfoService;
|
|
private final IGoodsInfoService goodsInfoService;
|
|
private final IGoodsInfoService goodsInfoService;
|
|
private final IFacilityService iFacilityService;
|
|
private final IFacilityService iFacilityService;
|
|
|
|
+ private final IFacilityCargoWayService iFacilityCargoWayService;
|
|
|
|
|
|
@GetMapping("/category/list")
|
|
@GetMapping("/category/list")
|
|
@ApiOperationSupport(order = 1)
|
|
@ApiOperationSupport(order = 1)
|
|
@@ -108,8 +111,11 @@ public class ApiGoodsController extends BladeController {
|
|
@GetMapping("/goods/detail")
|
|
@GetMapping("/goods/detail")
|
|
@ApiOperationSupport(order = 4)
|
|
@ApiOperationSupport(order = 4)
|
|
@ApiOperation(value = "商品详情", notes = "传入goodsInfo")
|
|
@ApiOperation(value = "商品详情", notes = "传入goodsInfo")
|
|
- public R<GoodsInfoVO> detail(GoodsInfo goodsInfo) {
|
|
|
|
|
|
+ public R<GoodsInfoVO> detail(GoodsInfoVO goodsInfo) {
|
|
GoodsInfo detail = goodsInfoService.detail(goodsInfo.getId());
|
|
GoodsInfo detail = goodsInfoService.detail(goodsInfo.getId());
|
|
|
|
+ FacilityCargoWay cargoWay = iFacilityCargoWayService.getById(goodsInfo.getCargoWayId());
|
|
|
|
+ Assert.notNull(cargoWay, "未查询到货道信息");
|
|
|
|
+ detail.setSalePrice(cargoWay.getSalePrice());
|
|
return R.data(GoodsInfoWrapper.build().entityVO(detail));
|
|
return R.data(GoodsInfoWrapper.build().entityVO(detail));
|
|
}
|
|
}
|
|
|
|
|