Эх сурвалжийг харах

fix 过滤不参与分销的平台;未配置规格比例提示

zoujiajian 2 жил өмнө
parent
commit
db248d2bc8

+ 13 - 0
netflix-dao/src/main/java/com/cyksj/mapper/DistributeGoodsSkuAlertMapper.java

@@ -0,0 +1,13 @@
+package com.cyksj.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.cyksj.model.entity.DistributeGoodsSkuAlert;
+
+/**
+ * 项目名: yhlxj
+ * 文件名: DistributeGoodsSkuAlertMapper
+ * 创建者: JavaZou
+ * 创建时间:2023/11/8 14:10
+ */
+public interface DistributeGoodsSkuAlertMapper extends BaseMapper<DistributeGoodsSkuAlert> {
+}

+ 18 - 0
netflix-dao/src/main/java/com/cyksj/model/entity/DistributeGoodsSkuAlert.java

@@ -0,0 +1,18 @@
+package com.cyksj.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 项目名: yhlxj
+ * 文件名: DistributeGoodsSkuAlert
+ * 创建者: JavaZou
+ * 创建时间:2023/11/8 14:08
+ */
+@Getter
+@Setter
+public class DistributeGoodsSkuAlert extends BaseEntity {
+	private Long goodsId;
+
+	private Long skuId;
+}

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

@@ -14,7 +14,7 @@ import lombok.Setter;
 @Getter
 @Setter
 @SearchBean(tables = "goods_don g left join business_distribute_default_rate_config bc on g.id = bc.goods_id",
-		where = "g.deleted is true and g.status is true",
+		where = "g.deleted is true and g.status is true and g.is_distribute is true",
 		orderBy = "g.id")
 public class BusinessDistributeRateView {
 	@DbField("bc.id")

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

@@ -13,8 +13,8 @@ import lombok.Setter;
  */
 @Getter
 @Setter
-@SearchBean(tables = "user_business_default_rate_config uc left join goods_don g on g.id = uc.goods_id"
-		, where = "g.deleted is true and g.status is true")
+@SearchBean(tables = "goods_don g left join user_business_default_rate_config uc on g.id = uc.goods_id"
+		, where = "g.deleted is true and g.status is true and g.is_distribute is true")
 public class UserBusinessDefaultRateConfigView {
 	@DbField("uc.id")
 	private Long id;

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

@@ -16,7 +16,7 @@ import lombok.Setter;
 @Setter
 @SearchBean(tables = "goods_don g left join goods_don_sku gdk on gdk.goods_id = g.id" +
 		" left join user_distribute_business_rate ur on ur.sku_id = gdk.id :business_id:",
-		where = "g.deleted is true and g.status is true")
+		where = "g.deleted is true and g.status is true and g.is_distribute is true")
 public class UserDistributeBusinessRateRecordView {
 	@DbField("ur.id")
 	private Long id;

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

@@ -16,7 +16,7 @@ import lombok.Setter;
 @SearchBean(tables = "goods_don g left join goods_don_category_relate gcr on gcr.goods_id = g.id" +
 		" left join goods_don_category gc on gc.id = gcr.category" +
 		" left join user_plat_distribute_rate upr on upr.goods_id = g.id :distribute_id:",
-		where = "g.type = 1 and g.deleted is true and g.status is true and upr.rate > 0")
+		where = "g.type = 1 and g.deleted is true and g.status is true and g.is_distribute is true and upr.rate > 0")
 public class UserDistributeRateView {
 
 	@DbField("gcr.category")

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

@@ -15,7 +15,7 @@ import lombok.Setter;
 @Getter
 @Setter
 @SearchBean(tables = "user_plat_distribute_rate up left join goods_don gd on gd.id = up.goods_id",
-		where = "gd.deleted is true and gd.status is true")
+		where = "gd.deleted is true and gd.status is true and gd.is_distribute is true")
 public class UserDistributeView {
 	@DbField("up.id")
 	private Long id;

+ 5 - 1
netflix-web/src/main/java/com/cyksj/web/controller/manage/distribute/DistributeController.java

@@ -239,7 +239,11 @@ public class DistributeController {
 	 */
 	@GetMapping("/get/plat")
 	public Result<List<GoodsDon>> getGoodsDistributeRate() {
-		return GatewayResponse.SUCCESS.newBuilder().toResult(goodsDonMapper.selectList(Wrappers.lambdaQuery(GoodsDon.class).in(GoodsDon::getType, Constant.dsGoodsIds).eq(GoodsDon::getDeleted, true).eq(GoodsDon::getStatus, true).orderByAsc(GoodsDon::getType).orderByAsc(GoodsDon::getId).select(GoodsDon::getId, GoodsDon::getType, GoodsDon::getTitle, GoodsDon::getRate, GoodsDon::getSecondRate)));
+		return GatewayResponse.SUCCESS.newBuilder().toResult(goodsDonMapper.selectList(Wrappers.lambdaQuery(GoodsDon.class).in(GoodsDon::getType, Constant.dsGoodsIds).eq(GoodsDon::getDeleted, true)
+				.eq(GoodsDon::getStatus, true).orderByAsc(GoodsDon::getType)
+				.eq(GoodsDon::getIsDistribute, true)
+				.orderByAsc(GoodsDon::getId)
+				.select(GoodsDon::getId, GoodsDon::getType, GoodsDon::getTitle, GoodsDon::getRate, GoodsDon::getSecondRate)));
 	}
 
 	/**