zoujiajian 2 лет назад
Родитель
Сommit
d72b56e950

+ 2 - 2
netflix-dao/src/main/java/com/cyksj/model/views/YhShopGoodsFrontView.java

@@ -19,9 +19,9 @@ import java.util.List;
  */
 @Getter
 @Setter
-@SearchBean(tables = "(select ys.goods_id,min(ys.price) as price from yh_shop_goods_sku ys left join goods_don_sku sku on sku.id = ys.sku_id where sku.status is true and ys.status is true and ys.deleted is true :condition: group by ys.goods_id) yg" +
+@SearchBean(tables = "(select ys.goods_id,min(ys.price) as price from yh_shop_goods_sku ys where ys.status is true and ys.deleted is true :condition: group by ys.goods_id) yg" +
 		" inner join goods_don g on g.id = yg.goods_id",
-		where = "g.deleted is true and g.status is true and g.type = 1",
+		where = "g.deleted is true and g.status is true",
 		orderBy = "g.sort_by asc, g.id")
 @JsonInclude(JsonInclude.Include.NON_NULL)
 public class YhShopGoodsFrontView {

+ 1 - 1
netflix-dao/src/main/java/com/cyksj/model/views/YhShopGoodsSkuFrontView.java

@@ -18,7 +18,7 @@ import java.util.List;
  */
 @Getter
 @Setter
-@SearchBean(tables = "(select * from yh_shop_goods_sku where status is true and deleted is true :condition:) ygs inner join goods_don_sku sku on sku.id = ygs.sku_id",
+@SearchBean(tables = "(select * from yh_shop_goods_sku ys where status is true and deleted is true :condition:) ygs inner join goods_don_sku sku on sku.id = ygs.sku_id",
 		where = "sku.status is true")
 public class YhShopGoodsSkuFrontView {
 	@DbField("sku.id")

+ 2 - 2
netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserBusinessDefaultRateConfigView.java

@@ -19,7 +19,7 @@ public class YhShopUserBusinessDefaultRateConfigView {
 	@DbField("uc.id")
 	private Long id;
 
-	@DbField("uc.goods_id")
+	@DbField("g.id")
 	private Long goodsId;
 
 	@DbField("g.type")
@@ -29,7 +29,7 @@ public class YhShopUserBusinessDefaultRateConfigView {
 	private String goodsName;
 
 	@DbField("uc.rate")
-	private Integer rate;
+	private Integer rate = 0;
 
 	@DbField("uc.max_rate")
 	private Integer maxRate;

+ 2 - 2
netflix-web/src/main/java/com/cyksj/web/controller/goods/GoodsDonController.java

@@ -293,7 +293,7 @@ public class GoodsDonController {
     @GetMapping("/get/{id}")
     public Result<? extends Object> getDetail(@PathVariable Long id, String customId) {
         if (StrUtil.isNotBlank(customId)) {
-            Result<YhShopGoodsFrontView> yhShopGoodsDetail = getGoodsDetailByYhsId(id, yhShopFrontService.getYhsIdByCustomId(customId));
+            Result<YhShopGoodsFrontView> yhShopGoodsDetail = getGoodsDetailByYhsId(yhShopFrontService.getYhsIdByCustomId(customId), id);
             return yhShopGoodsDetail;
         }
         Long fUid = StpUserUtil.getUserIdAfterLogin();
@@ -576,7 +576,7 @@ public class GoodsDonController {
     @GetMapping("/get/shop/goods/detail/{yhsId}/{goodsId}")
     public Result<YhShopGoodsFrontView> getGoodsDetailByYhsId(@PathVariable Long yhsId, @PathVariable Long goodsId) {
         MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
-        String condition = String.format("and yhs_id = %s and goods_id = %s", yhsId, goodsId);
+        String condition = String.format("and yhs_id = %s and ys.goods_id = %s", yhsId, goodsId);
         builder.put("condition", condition);
         YhShopGoodsFrontView goodsDetailView = beanSearcher.searchFirst(YhShopGoodsFrontView.class, builder.build());