wangming 3 周之前
父節點
當前提交
74d74de438

+ 4 - 0
yami-shop-api/src/main/java/com/yami/shop/api/controller/ProdCommController.java

@@ -66,12 +66,16 @@ public class ProdCommController {
     @GetMapping("/commList")
     @ApiOperation(value = "商品详情-查看商品评价(0好评 1中评 2差评 3有图)")
     public ResponseEntity<IPage<ProdComm>> commList(PageParam<ProdComm> page, Long skuId,Long shopId, Integer commStatus,Long channelId) {
+        shopId = shopId == null ? 1 : shopId;
+        channelId = channelId == null ? 1 : channelId;
         return ResponseEntity.ok(prodCommService.commList(page,skuId,shopId,commStatus,channelId));
     }
 
     @GetMapping("/commentCount")
     @ApiOperation(value = "商品详情-评价数量-好评率")
     public ResponseEntity<Map<String, Object>> commentCount(Long skuId,Long shopId,Long channelId) {
+        shopId = shopId == null ? 1 : shopId;
+        channelId = channelId == null ? 1 : channelId;
         return ResponseEntity.ok(prodCommService.commentCount(skuId,shopId,channelId));
     }
 

+ 2 - 0
yami-shop-api/src/main/java/com/yami/shop/api/controller/SkuController.java

@@ -52,6 +52,8 @@ public class SkuController {
     @GetMapping("/buyTogetherOften")
     @ApiOperation(value = "商品详情-经常一起买")
     public ResponseEntity<IPage<SkuBuyTogetherOftenVo>> buyTogetherOften(PageParam<SkuBuyTogetherOftenVo> page, Long skuId,Long shopId,Long channelId) {
+        shopId = shopId == null ? 1 : shopId;
+        channelId = channelId == null ? 1 : channelId;
         return ResponseEntity.ok(skuService.buyTogetherOften(page,skuId,shopId,channelId));
     }
 

+ 3 - 1
yami-shop-security/yami-shop-security-api/src/main/java/com/yami/shop/security/api/config/ResourceServerConfiguration.java

@@ -48,7 +48,9 @@ public class ResourceServerConfiguration extends ResourceServerConfigurerAdapter
                 .authorizeRequests()
                 .antMatchers(
                         "/p/appointment/**",
-                        "/p/order/**"
+                        "/p/order/**",
+                        "/p/prodComm/commList",
+                        "/p/prodComm/commentCount"
                         ).permitAll()
                 .and()