diff --git a/admin-pc/dist.zip b/admin-pc/dist.zip index 84f4476..7555961 100644 Binary files a/admin-pc/dist.zip and b/admin-pc/dist.zip differ diff --git a/module-common/src/main/java/org/jeecg/api/service/impl/AppletMoneyLogServiceImpl.java b/module-common/src/main/java/org/jeecg/api/service/impl/AppletMoneyLogServiceImpl.java index 39494a3..173fee5 100644 --- a/module-common/src/main/java/org/jeecg/api/service/impl/AppletMoneyLogServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/api/service/impl/AppletMoneyLogServiceImpl.java @@ -268,7 +268,6 @@ public class AppletMoneyLogServiceImpl implements AppletMoneyLogService { .lambdaQuery() .eq(CommonMoneyLog::getUserId,hanHaiMember.getId()) .eq(CommonMoneyLog::getIsBrokerage, "Y")//佣金 - .eq(CommonMoneyLog::getState, 1)//已到账 .orderByDesc(CommonMoneyLog::getCreateTime) .page(page); diff --git a/module-common/src/main/java/org/jeecg/api/service/impl/AppletOrderServiceImpl.java b/module-common/src/main/java/org/jeecg/api/service/impl/AppletOrderServiceImpl.java index 4a32288..bb43e4f 100644 --- a/module-common/src/main/java/org/jeecg/api/service/impl/AppletOrderServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/api/service/impl/AppletOrderServiceImpl.java @@ -24,6 +24,7 @@ import org.jeecg.modules.commonText.entity.CommonText; import org.jeecg.modules.commonText.service.ICommonTextService; import org.jeecg.modules.commonVip.entity.CommonVip; import org.jeecg.modules.commonVip.service.ICommonVipService; +import org.jeecg.modules.common_reasons.entity.CommonReasons; import org.jeecg.modules.common_reasons.service.ICommonReasonsService; import org.jeecg.modules.commonCity.entity.CommonCity; import org.jeecg.modules.commonCity.service.ICommonCityService; @@ -378,8 +379,8 @@ public class AppletOrderServiceImpl implements AppletOrderService { } return Result.ok(commonReasonsService.lambdaQuery() -// .in(CommonReasons::getClassId, classId) -// .eq(CommonReasons::getType, type) + .in(CommonReasons::getClassId, classId) + .eq(CommonReasons::getType, type) .list() ); } diff --git a/module-common/src/main/java/org/jeecg/api/service/impl/AppletOrderTeamServiceImpl.java b/module-common/src/main/java/org/jeecg/api/service/impl/AppletOrderTeamServiceImpl.java index e903fbf..4c7b68c 100644 --- a/module-common/src/main/java/org/jeecg/api/service/impl/AppletOrderTeamServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/api/service/impl/AppletOrderTeamServiceImpl.java @@ -490,7 +490,7 @@ public class AppletOrderTeamServiceImpl implements AppletOrderTeamService { for (CommonOrder orderReq : list) { - priceSum.add(orderReq.getPrice()); + priceSum = priceSum.add(orderReq.getPrice()); qualifiedNumSum += orderReq.getQualifiedNum(); noQualifiedNumSum += orderReq.getNoQualifiedNum(); unrecyclableSum += orderReq.getUnrecyclable(); diff --git a/module-common/src/main/java/org/jeecg/api/service/impl/AppletPromotionServiceImpl.java b/module-common/src/main/java/org/jeecg/api/service/impl/AppletPromotionServiceImpl.java index 3581316..0b5408c 100644 --- a/module-common/src/main/java/org/jeecg/api/service/impl/AppletPromotionServiceImpl.java +++ b/module-common/src/main/java/org/jeecg/api/service/impl/AppletPromotionServiceImpl.java @@ -17,6 +17,8 @@ import org.jeecg.modules.commonConfig.entity.CommonConfig; import org.jeecg.modules.commonConfig.service.ICommonConfigService; import org.jeecg.modules.commonDistributionRatio.entity.CommonDistributionRatio; import org.jeecg.modules.commonDistributionRatio.service.ICommonDistributionRatioService; +import org.jeecg.modules.commonMoneyLog.entity.CommonMoneyLog; +import org.jeecg.modules.commonMoneyLog.service.ICommonMoneyLogService; import org.jeecg.modules.commonOrder.entity.CommonOrder; import org.jeecg.modules.commonOrder.service.ICommonOrderService; import org.jeecg.modules.commonPromotion.entity.CommonPromotion; @@ -64,6 +66,9 @@ public class AppletPromotionServiceImpl implements AppletPromotionService { @Autowired private WxHttpUtils wxHttpUtils; + @Autowired + private ICommonMoneyLogService commonMoneyLogService; + //获取推广排行榜单带分页 @Override public Result getRankList(PageBean pageBean){ @@ -253,9 +258,8 @@ public class AppletPromotionServiceImpl implements AppletPromotionService { @Override public Result getHanHaiMemberUser(String token,Integer state,PageBean pageBean){ HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); - Page page = new Page(pageBean.getPageNo(), pageBean.getPageSize()); + Page page = new Page(pageBean.getPageNo(), Integer.MAX_VALUE); Page pageList = hanHaiMemberService.lambdaQuery() - .eq(HanHaiMember::getShareId,hanHaiMember.getId()) .eq(state == 0, HanHaiMember::getShareId,hanHaiMember.getId()) .eq(state != 0, HanHaiMember::getVid,hanHaiMember.getId()) .page(page); @@ -273,14 +277,32 @@ public class AppletPromotionServiceImpl implements AppletPromotionService { fansPageBean1.setNickName(item.getNickName()); //查询该用户的订单数量,count中的state>0 - int count = commonOrderService.lambdaQuery() - .in(CommonOrder::getState,1,2) - .eq(CommonOrder::getUserId,item.getId()) - .count().intValue(); +// int count = commonOrderService.lambdaQuery() +// .in(CommonOrder::getState,1,2) +// .eq(CommonOrder::getUserId,item.getId()) +// .count().intValue(); +// +// fansPageBean1.setOrderNum(count); + + //查询贡献的佣金 + List list = commonMoneyLogService.lambdaQuery() + .eq(CommonMoneyLog::getUserId, hanHaiMember.getId()) + .eq(CommonMoneyLog::getFormUserId, item.getId()) + .select(CommonMoneyLog::getMoney) + .list(); + + BigDecimal price = BigDecimal.ZERO; + + for (CommonMoneyLog log : list) { + price = price.add(log.getMoney()); + } + fansPageBean1.setCommission(price); + + fansPageBean1.setOrderNum(list.size()); + - fansPageBean1.setOrderNum(count); + //fansPageBean1.setCommission(item.getPrice()); - fansPageBean1.setCommission(item.getPrice()); fansPageBean1.setCreateTime(item.getCreateTime()); pageListFans.getRecords().add(fansPageBean1);