Переглянути джерело

fix 去掉无用表类;店铺最大提成比例

zoujiajian 2 роки тому
батько
коміт
5e346046cd
15 змінених файлів з 26 додано та 349 видалено
  1. 0 13
      netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopUserBusinessDefaultRateConfigMapper.java
  2. 0 13
      netflix-dao/src/main/java/com/cyksj/mapper/shop/YhShopUserDistributeBusinessRateMapper.java
  3. 0 31
      netflix-dao/src/main/java/com/cyksj/model/entity/YhShopUserBusinessDefaultRateConfig.java
  4. 0 43
      netflix-dao/src/main/java/com/cyksj/model/entity/YhShopUserDistributeBusinessRate.java
  5. 2 3
      netflix-dao/src/main/java/com/cyksj/model/entity/YhShopUserPlatDistributeRate.java
  6. 1 1
      netflix-dao/src/main/java/com/cyksj/model/views/UserBusinessDefaultRateConfigView.java
  7. 0 39
      netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserBusinessDefaultRateConfigView.java
  8. 0 61
      netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserDistributeBusinessRateRecordView.java
  9. 2 3
      netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserDistributeRateView.java
  10. 0 14
      netflix-dao/src/main/resources/mapper/YhShopGeneralGoodsRateMapper.xml
  11. 16 7
      netflix-service/src/main/java/com/cyksj/service/distribute/impl/DistributeServiceImpl.java
  12. 0 5
      netflix-service/src/main/java/com/cyksj/service/mange/CmsYhShopCommonService.java
  13. 4 72
      netflix-service/src/main/java/com/cyksj/service/mange/goods/CmsYhShopCommonServiceImpl.java
  14. 0 43
      netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/shop/CmsYhShopGoodsController.java
  15. 1 1
      netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/shop/YhShopUserController.java

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

@@ -1,13 +0,0 @@
-package com.cyksj.mapper.shop;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.cyksj.model.entity.YhShopUserBusinessDefaultRateConfig;
-
-/*
- *项目名: yhlxj
- *文件名: YhShopUserBusinessDefaultRateConfigMapper
- *创建者: JavaZou
- *创建时间:2023/9/18 17:05
- */
-public interface YhShopUserBusinessDefaultRateConfigMapper extends BaseMapper<YhShopUserBusinessDefaultRateConfig> {
-}

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

@@ -1,13 +0,0 @@
-package com.cyksj.mapper.shop;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.cyksj.model.entity.YhShopUserDistributeBusinessRate;
-
-/*
- *项目名: yhlxj
- *文件名: YhShopUserDistributeBusinessRateMapper
- *创建者: JavaZou
- *创建时间:2023/9/18 17:29
- */
-public interface YhShopUserDistributeBusinessRateMapper extends BaseMapper<YhShopUserDistributeBusinessRate> {
-}

+ 0 - 31
netflix-dao/src/main/java/com/cyksj/model/entity/YhShopUserBusinessDefaultRateConfig.java

@@ -1,31 +0,0 @@
-package com.cyksj.model.entity;
-
-import lombok.Getter;
-import lombok.Setter;
-
-/*
- *项目名: yhlxj
- *文件名: YhShopUserBusinessDefaultRateConfig
- *创建者: JavaZou
- *创建时间:2023/9/18 17:05
- */
-@Getter
-@Setter
-public class YhShopUserBusinessDefaultRateConfig extends BaseEntity {
-	private Long goodsId;
-
-	/**
-	 * 标准配置分销者比例
-	 */
-	private Integer rate;
-
-	/**
-	 * 最高可配置分销者比例
-	 */
-	private Integer maxRate;
-
-	/**
-	 * 超过配置最高分销者比例是否平台承担
-	 */
-	private Boolean isPlatPay;
-}

+ 0 - 43
netflix-dao/src/main/java/com/cyksj/model/entity/YhShopUserDistributeBusinessRate.java

@@ -1,43 +0,0 @@
-package com.cyksj.model.entity;
-
-import lombok.Getter;
-import lombok.Setter;
-
-import javax.validation.constraints.NotNull;
-
-/*
- *项目名: yhlxj
- *文件名: YhShopUserDistributeBusinessRate
- *创建者: JavaZou
- *创建时间:2023/9/18 17:29
- */
-@Getter
-@Setter
-public class YhShopUserDistributeBusinessRate extends BaseEntity {
-	/**
-	 * 商务用户id
-	 */
-	@NotNull
-	private Long businessId;
-
-	/**
-	 * 平台id
-	 */
-	private Long goodsId;
-
-	/**
-	 * 规格id
-	 */
-	private Long skuId;
-
-	/**
-	 * 首单提成比例
-	 */
-	private Integer firstOrderRate;
-
-	/**
-	 * 首单续费提成比例
-	 */
-	private Integer renewOrderRate;
-}
-

+ 2 - 3
netflix-dao/src/main/java/com/cyksj/model/entity/YhShopUserPlatDistributeRate.java

@@ -19,8 +19,7 @@ import java.util.Date;
  */
 @Getter
 @Setter
-@SearchBean(tables = "goods_don g left join yh_shop_user_plat_distribute_rate ydr on g.id = ydr.goods_id :uid:" +
-		" left join yh_shop_general_goods_rate ygr on ygr.goods_id = g.id",
+@SearchBean(tables = "goods_don g left join yh_shop_user_plat_distribute_rate ydr on g.id = ydr.goods_id :uid:",
 		where = "g.type = 1 and g.status is true and g.deleted is true and g.is_distribute is true")
 public class YhShopUserPlatDistributeRate {
 	@TableId(value = "id", type = IdType.AUTO)
@@ -43,7 +42,7 @@ public class YhShopUserPlatDistributeRate {
 	/**
 	 * 分销比例
 	 */
-	@DbField("ifnull(ydr.rate,ygr.rate)")
+	@DbField("ifnull(ydr.rate,g.rate)")
 	private Integer rate = 0;
 
 	/**

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

@@ -19,7 +19,7 @@ public class UserBusinessDefaultRateConfigView {
 	@DbField("uc.id")
 	private Long id;
 
-	@DbField("uc.goods_id")
+	@DbField("g.id")
 	private Long goodsId;
 
 	@DbField("g.type")

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

@@ -1,39 +0,0 @@
-package com.cyksj.model.views;
-
-import com.ejlchina.searcher.bean.DbField;
-import com.ejlchina.searcher.bean.SearchBean;
-import lombok.Getter;
-import lombok.Setter;
-
-/*
- *项目名: yhlxj
- *文件名: YhShopUserBusinessDefaultRateConfigView
- *创建者: JavaZou
- *创建时间:2023/9/18 17:01
- */
-@Getter
-@Setter
-@SearchBean(tables = "goods_don g left join yh_shop_user_business_default_rate_config uc on g.id = uc.goods_id"
-		, where = "g.type = 1 and g.deleted is true and g.status is true and g.is_distribute is true")
-public class YhShopUserBusinessDefaultRateConfigView {
-	@DbField("uc.id")
-	private Long id;
-
-	@DbField("g.id")
-	private Long goodsId;
-
-	@DbField("g.type")
-	private Integer type;
-
-	@DbField("g.title")
-	private String goodsName;
-
-	@DbField("uc.rate")
-	private Integer rate = 0;
-
-	@DbField("uc.max_rate")
-	private Integer maxRate;
-
-	@DbField("uc.is_plat_pay")
-	private Boolean isPlatPay;
-}

+ 0 - 61
netflix-dao/src/main/java/com/cyksj/model/views/YhShopUserDistributeBusinessRateRecordView.java

@@ -1,61 +0,0 @@
-package com.cyksj.model.views;
-
-import com.ejlchina.searcher.bean.DbField;
-import com.ejlchina.searcher.bean.SearchBean;
-import lombok.Getter;
-import lombok.Setter;
-
-/*
- *项目名: yhlxj
- *文件名: YhShopUserDistributeBusinessRateRecordView
- *创建者: JavaZou
- *创建时间:2023/9/18 17:36
- */
-@Getter
-@Setter
-@SearchBean(tables = "goods_don g left join goods_don_sku gdk on gdk.goods_id = g.id" +
-		" left join yh_shop_user_distribute_business_rate ur on ur.sku_id = gdk.id :business_id:",
-		where = "g.type = 1 and g.deleted is true and g.status is true and g.is_distribute is true")
-public class YhShopUserDistributeBusinessRateRecordView {
-	@DbField("ur.id")
-	private Long id;
-
-	/**
-	 * 商务用户id
-	 */
-	@DbField("ifnull(ur.business_id,:bid:)")
-	private Long businessId;
-
-	/**
-	 * 平台id
-	 */
-	@DbField("g.id")
-	private Long goodsId;
-
-	@DbField("g.title")
-	private String goodsName;
-
-	/**
-	 * 规格id
-	 */
-	@DbField("gdk.id")
-	private Long skuId;
-
-	@DbField("gdk.spec_val")
-	private String specVal;
-
-	/**
-	 * 首单提成比例
-	 */
-	@DbField("ifnull(ur.first_order_rate,0)")
-	private Integer firstOrderRate;
-
-	/**
-	 * 首单续费提成比例
-	 */
-	@DbField("ifnull(ur.renew_order_rate,0)")
-	private Integer renewOrderRate;
-
-	@DbField("g.type")
-	private Integer type;
-}

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

@@ -15,8 +15,7 @@ import lombok.Setter;
 @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 yh_shop_user_plat_distribute_rate upr on upr.goods_id = g.id and upr.rate > 0 :uid:" +
-		" left join yh_shop_general_goods_rate ygr on ygr.goods_id = g.id",
+		" left join yh_shop_user_plat_distribute_rate upr on upr.goods_id = g.id :uid:",
 		where = "g.type = 1 and g.deleted is true and g.status is true and g.is_distribute is true")
 public class YhShopUserDistributeRateView {
 
@@ -29,6 +28,6 @@ public class YhShopUserDistributeRateView {
 	@DbField("g.title")
 	private String title;
 
-	@DbField("ifnull(upr.rate,ygr.rate)")
+	@DbField("ifnull(upr.rate,g.rate)")
 	private Integer rate;
 }

+ 0 - 14
netflix-dao/src/main/resources/mapper/YhShopGeneralGoodsRateMapper.xml

@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
-<mapper namespace="com.cyksj.mapper.YhShopGeneralGoodsRateMapper">
-    <insert id="saveOrUpdateBatch">
-        insert into yh_shop_general_goods_rate(`goods_id`,`rate`,`created_time`,`update_time`)
-        values
-        <foreach collection="list" item="entity" separator=",">
-            (#{entity.goodsId},#{entity.rate},now(),now())
-        </foreach>
-        ON DUPLICATE KEY update rate = values(rate),
-        update_time = values(update_time)
-    </insert>
-</mapper>

+ 16 - 7
netflix-service/src/main/java/com/cyksj/service/distribute/impl/DistributeServiceImpl.java

@@ -129,6 +129,9 @@ public class DistributeServiceImpl implements DistributeService {
 			if (rate.getRate() == null) {
 				rate.setRate(0);
 			}
+			if (rate.getSecondRate() == null) {
+				rate.setSecondRate(0);
+			}
 			if (rate.getRate() < 0 || rate.getRate() > 100) {
 				throw new BusinessRuntimeException("比例错误");
 			}
@@ -170,13 +173,19 @@ public class DistributeServiceImpl implements DistributeService {
 					}
 				}
 			} else {
-				userPlatDistributeRateMapper.updateById(rate);
-				if (yhShop != null) {
-					//同步店铺分销比例
-					yhShopUserPlatDistributeRateMapper.update(null, Wrappers.lambdaUpdate(YhShopUserPlatDistributeRate.class)
-							.eq(YhShopUserPlatDistributeRate::getUserId, userDistribute.getUserId())
-							.eq(YhShopUserPlatDistributeRate::getGoodsId, rate.getGoodsId())
-							.set(YhShopUserPlatDistributeRate::getRate, rate.getRate()));
+				UserPlatDistributeRate dbPlateRate = userPlatDistributeRateMapper.selectById(rate.getId());
+				if (dbPlateRate == null) {
+					continue;
+				}
+				if (dbPlateRate.getRate() != rate.getRate() || dbPlateRate.getSecondRate() != rate.getSecondRate()) {
+					userPlatDistributeRateMapper.updateById(rate);
+					if (yhShop != null && dbPlateRate.getRate() != rate.getRate()) {
+						//同步店铺分销比例
+						yhShopUserPlatDistributeRateMapper.update(null, Wrappers.lambdaUpdate(YhShopUserPlatDistributeRate.class)
+								.eq(YhShopUserPlatDistributeRate::getUserId, userDistribute.getUserId())
+								.eq(YhShopUserPlatDistributeRate::getGoodsId, rate.getGoodsId())
+								.set(YhShopUserPlatDistributeRate::getRate, rate.getRate()));
+					}
 				}
 			}
 		}

+ 0 - 5
netflix-service/src/main/java/com/cyksj/service/mange/CmsYhShopCommonService.java

@@ -18,11 +18,6 @@ public interface CmsYhShopCommonService {
 	void setYhShopGoodsRate(List<YhShopUserPlatDistributeRate> yhShopUserPlatDistributeRates, Long businessId, Long userId);
 
 	void setYhShopBusiness(YhShop yhShop);
-
-	void setBusinessDefaultRate(List<YhShopUserBusinessDefaultRateConfig> configs);
-
-	void setBusinessRate(List<UserDistributeBusinessRate> rates);
-
 	void verifyYhShopApplyMoney(DistributeApplyMoneyReq distributeApplyMoneyReq);
 
 	void updateVerifyImg(DistributeApplyMoneyReq distributeApplyMoneyReq);

+ 4 - 72
netflix-service/src/main/java/com/cyksj/service/mange/goods/CmsYhShopCommonServiceImpl.java

@@ -1,27 +1,23 @@
 package com.cyksj.service.mange.goods;
 
-import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.lang.Assert;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.cyksj.common.exception.BusinessRuntimeException;
 import com.cyksj.mapper.GoodsDonMapper;
+import com.cyksj.mapper.manage.distribute.UserBusinessDefaultRateConfigMapper;
 import com.cyksj.mapper.manage.distribute.UserDistributeMapper;
 import com.cyksj.mapper.shop.*;
 import com.cyksj.model.entity.*;
 import com.cyksj.model.request.DistributeApplyMoneyReq;
 import com.cyksj.model.request.YhShopVerifyReq;
-import com.cyksj.model.views.GoodsDonSkuView;
 import com.cyksj.service.mange.CmsYhShopCommonService;
 import com.cyksj.service.mange.business.UserBusinessRateService;
 import com.cyksj.service.shop.YhShopUserPlatDistributeRateService;
 import com.cyksj.service.user.UserBenefitsService;
-import com.ejlchina.searcher.BeanSearcher;
-import com.ejlchina.searcher.util.MapUtils;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.dao.DuplicateKeyException;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -49,17 +45,11 @@ public class CmsYhShopCommonServiceImpl implements CmsYhShopCommonService {
 
 	private final YhShopUserPlatDistributeRateService yhShopUserPlatDistributeRateService;
 
-	private final YhShopUserBusinessDefaultRateConfigMapper yhShopUserBusinessDefaultRateConfigMapper;
-
-	private final YhShopUserDistributeBusinessRateMapper yhShopUserDistributeBusinessRateMapper;
-
 	private final YhShopDistributeMoneyApplyMapper yhShopDistributeMoneyApplyMapper;
 
 	private final UserBenefitsService userBenefitsService;
 
-	private final BeanSearcher beanSearcher;
-
-	private final YhShopUserBusinessDefaultRateConfigMapper defaultRateConfigMapper;
+	private final UserBusinessDefaultRateConfigMapper defaultRateConfigMapper;
 
 	private final UserDistributeMapper userDistributeMapper;
 
@@ -172,64 +162,6 @@ public class CmsYhShopCommonServiceImpl implements CmsYhShopCommonService {
 		yhShopMapper.updateById(dbShop);
 	}
 
-	@Override
-	public void setBusinessDefaultRate(List<YhShopUserBusinessDefaultRateConfig> configs) {
-		configs.forEach(rateConfig -> {
-			Long rateConfigId = rateConfig.getId();
-			YhShopUserBusinessDefaultRateConfig config = Optional.ofNullable(yhShopUserBusinessDefaultRateConfigMapper.selectById(rateConfigId)).orElse(new YhShopUserBusinessDefaultRateConfig());
-			BeanUtil.copyProperties(rateConfig, config);
-			Number number = beanSearcher.searchCount(GoodsDonSkuView.class, MapUtils.builder()
-					.field(GoodsDonSkuView::getGoodsId, rateConfig.getGoodsId())
-					.field(GoodsDonSkuView::getGoodsDonDeleted, true)
-					.build());
-			if (number.intValue() == 0) {
-				yhShopUserBusinessDefaultRateConfigMapper.delete(Wrappers.lambdaQuery(YhShopUserBusinessDefaultRateConfig.class)
-						.eq(YhShopUserBusinessDefaultRateConfig::getGoodsId, rateConfig.getGoodsId()));
-				return;
-			}
-			if (config.getRate() == null || config.getRate() < 0 || config.getRate() > 100) {
-				throw BusinessRuntimeException.getInstance("请输入正确的比例");
-			}
-			if (rateConfig.getId() == null) {
-				try {
-					yhShopUserBusinessDefaultRateConfigMapper.insert(config);
-					return;
-				} catch (DuplicateKeyException e) {
-				}
-			}
-			yhShopUserBusinessDefaultRateConfigMapper.updateById(config);
-		});
-	}
-
-	@Override
-	public void setBusinessRate(List<UserDistributeBusinessRate> rates) {
-		rates.forEach(yhShopUserDistributeBusinessRate -> {
-			Long rateId = yhShopUserDistributeBusinessRate.getId();
-			YhShopUserDistributeBusinessRate businessRate = Optional.ofNullable(yhShopUserDistributeBusinessRateMapper.selectById(rateId)).orElse(new YhShopUserDistributeBusinessRate());
-			BeanUtil.copyProperties(yhShopUserDistributeBusinessRate, businessRate);
-			Number number = beanSearcher.searchCount(GoodsDonSkuView.class, MapUtils.builder()
-					.field(GoodsDonSkuView::getGoodsId, yhShopUserDistributeBusinessRate.getGoodsId())
-					.field(GoodsDonSkuView::getSkuId, yhShopUserDistributeBusinessRate.getSkuId())
-					.field(GoodsDonSkuView::getGoodsDonDeleted, true)
-					.build());
-			if (number.intValue() == 0) {
-				yhShopUserDistributeBusinessRateMapper.delete(Wrappers.lambdaQuery(YhShopUserDistributeBusinessRate.class)
-						.eq(YhShopUserDistributeBusinessRate::getBusinessId, yhShopUserDistributeBusinessRate.getBusinessId())
-						.eq(YhShopUserDistributeBusinessRate::getGoodsId, yhShopUserDistributeBusinessRate.getGoodsId())
-						.eq(YhShopUserDistributeBusinessRate::getSkuId, yhShopUserDistributeBusinessRate.getSkuId()));
-				return;
-			}
-			if (businessRate.getId() == null) {
-				try {
-					yhShopUserDistributeBusinessRateMapper.insert(businessRate);
-				} catch (DuplicateKeyException e) {
-				}
-			} else {
-				yhShopUserDistributeBusinessRateMapper.updateById(businessRate);
-			}
-		});
-	}
-
 	@Override
 	@Transactional(rollbackFor = Throwable.class)
 	public void verifyYhShopApplyMoney(DistributeApplyMoneyReq distributeApplyMoneyReq) {
@@ -285,8 +217,8 @@ public class CmsYhShopCommonServiceImpl implements CmsYhShopCommonService {
 	}
 
 	public void checkDistributorAndBusinessRate(Integer distributeGoodsRate, Long goodsId, String goodsName) {
-		YhShopUserBusinessDefaultRateConfig defaultGoodsRateConfig = defaultRateConfigMapper.selectOne(Wrappers.lambdaQuery(YhShopUserBusinessDefaultRateConfig.class)
-				.eq(YhShopUserBusinessDefaultRateConfig::getGoodsId, goodsId)
+		UserBusinessDefaultRateConfig defaultGoodsRateConfig = defaultRateConfigMapper.selectOne(Wrappers.lambdaQuery(UserBusinessDefaultRateConfig.class)
+				.eq(UserBusinessDefaultRateConfig::getGoodsId, goodsId)
 				.last("limit 1"));
 		Optional.ofNullable(defaultGoodsRateConfig).ifPresent(config -> {
 			if (distributeGoodsRate > config.getMaxRate()) {

+ 0 - 43
netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/shop/CmsYhShopGoodsController.java

@@ -301,49 +301,6 @@ public class CmsYhShopGoodsController {
         return GatewayResponse.SUCCESS.newBuilder().toResult(search);
     }
 
-    /**
-     * 设置店铺商务默认分销比例
-     */
-    @PutMapping("/set/business/default/rate")
-    public Result<String> setBusinessDefaultRate(@RequestBody List<YhShopUserBusinessDefaultRateConfig> configs) {
-        cmsYhShopCommonService.setBusinessDefaultRate(configs);
-        return GatewayResponse.SUCCESS.newBuilder().toResult();
-    }
-
-    /**
-     * 店铺商务默认比例列表展示
-     */
-    @GetMapping("/get/business/default/rate")
-    public Result<List<YhShopUserBusinessDefaultRateConfigView>> setBusinessDefaultRate() {
-        List<YhShopUserBusinessDefaultRateConfigView> search = beanSearcher.searchAll(YhShopUserBusinessDefaultRateConfigView.class, MapUtils.flatBuilder(request.getParameterMap()).build());
-        return GatewayResponse.SUCCESS.newBuilder().toResult(search);
-    }
-
-    /**
-     * 设置店铺商务分销比例
-     */
-    @PutMapping("/set/business/rate")
-    public Result<String> setBusinessRate(@RequestBody @Validated List<UserDistributeBusinessRate> rates) {
-        cmsYhShopCommonService.setBusinessRate(rates);
-        return GatewayResponse.SUCCESS.newBuilder().toResult();
-    }
-
-    /**
-     * 查看店铺 商务分销比例
-     */
-    @GetMapping("/get/business/rate")
-    public Result<List<YhShopUserDistributeBusinessRateRecordView>> getBusinessRate(Long businessId, Integer type) {
-        if (type == null) type = 1;
-        List<YhShopUserDistributeBusinessRateRecordView> yhShopUserDistributeBusinessRateRecordViews = beanSearcher.searchAll(YhShopUserDistributeBusinessRateRecordView.class, MapUtils.builder()
-                .put("business_id", String.format(" and ur.business_id = %s", businessId))
-                .put("bid", businessId)
-                .field(YhShopUserDistributeBusinessRateRecordView::getType, type)
-                .orderBy(YhShopUserDistributeBusinessRateRecordView::getGoodsId).asc()
-                .orderBy(YhShopUserDistributeBusinessRateRecordView::getSkuId).asc()
-                .build());
-        return GatewayResponse.SUCCESS.newBuilder().toResult(yhShopUserDistributeBusinessRateRecordViews);
-    }
-
     /**
      * 商务人员列表 详情
      */

+ 1 - 1
netflix-web/src/main/java/com/cyksj/web/controller/manage/goods/shop/YhShopUserController.java

@@ -155,7 +155,7 @@ public class YhShopUserController {
 				.orderBy(YhShopUserDistributeRateView::getRate).desc()
 				.build());
 		YhShopUserDistributeDetailView detailView = new YhShopUserDistributeDetailView();
-		Map<String, List<YhShopUserDistributeRateView>> collect = rateViews.stream().filter(ct->StrUtil.isNotBlank(ct.getCategoryName())).collect(Collectors.groupingBy(YhShopUserDistributeRateView::getCategoryName));
+		Map<String, List<YhShopUserDistributeRateView>> collect = rateViews.stream().filter(ct -> StrUtil.isNotBlank(ct.getCategoryName()) && ct.getRate() > 0).collect(Collectors.groupingBy(YhShopUserDistributeRateView::getCategoryName));
 		detailView.setRateViews(collect);
 		detailView.setWMoney(BigDecimal.valueOf(wMoneyPoints.doubleValue()).divide(BigDecimal.valueOf(100)));
 		detailView.setReMoney(BigDecimal.valueOf(reMoneyPoints.doubleValue()).divide(BigDecimal.valueOf(100)));