hmp 4 лет назад
Родитель
Сommit
a34776618f

+ 0 - 2
ldt-core/src/main/java/org/springblade/gateway/common_gateway/controller/AppActivityController.java

@@ -75,7 +75,6 @@ public class AppActivityController {
 	public R<IPage<ActivityVO>> getCanJoinActivity(Activity activity, Query query) {
 		Assert.notNull(activity.getLaunchType(), "launchType不能为空");
 		Assert.notNull(activity.getLaunchId(), "launchId不能为空");
-		Assert.notNull(activity.getMallId(), "mallId不能为空");
 
 		//获取已参加的活动id
 		List<Long> joinListId = joinRecordService.list(Condition.getQueryWrapper(new JoinRecord()).lambda()
@@ -83,7 +82,6 @@ public class AppActivityController {
 			.eq(JoinRecord::getJoinId, activity.getLaunchId())).stream().map(JoinRecord::getActivityId).collect(Collectors.toList());
 		//筛选已参加的活动
 		IPage<Activity> pages = activityService.page(Condition.getPage(query), Condition.getQueryWrapper(new Activity()).lambda()
-			.eq(Activity::getMallId,activity.getMallId())
 			.eq(Activity::getAuditStatus, ActivityEnum.PASS.name())
 			.orderByDesc(Activity::getCreateTime)
 			.notIn(CollUtil.isNotEmpty(joinListId),Activity::getId, joinListId));

+ 8 - 6
ldt-core/src/main/java/org/springblade/gateway/shop_gateway/controller/AppShopController.java

@@ -108,9 +108,11 @@ public class AppShopController {
 		//店铺会员总数
 		int allMembers = getTotalMembers(shopId);
 
-		//店铺总资产
+		BalanceAccountInfoVO balanceAccountInfoVO = appShopService.queryBalance(shopId);
+		//店铺总收益
 		Shop shop = shopService.getById(shopId);
-		BigDecimal totalValue = shop.getBalance().add(shop.getCharge()).add(shop.getPoint());
+		//店铺总收益=现金收益+未核销的渠道积分+已核销的渠道积分+总余额收益
+		BigDecimal totalValue = shop.getTotalBalance().add(shop.getCharge()).add(shop.getWithdrawCharge()).add(shop.getTotalPoint());
 
 		//积分总价值
 		BigDecimal pointsTotalValue = shop.getTotalValue();
@@ -125,7 +127,6 @@ public class AppShopController {
 				.eq(Bills::getPayStatus, AppConstant.BillPayStatus.已完结.name())));
 
 
-		BalanceAccountInfoVO balanceAccountInfoVO = appShopService.queryBalance(shopId);
 		//今日现金收益
 		BigDecimal todayBalance = Convert.toBigDecimal(balanceAccountInfoVO.getTodayNum());
 		//今日积分收益
@@ -195,13 +196,14 @@ public class AppShopController {
 		BigDecimal totalCharge = Optional.ofNullable(shop.getCharge()).orElse(BigDecimal.ZERO).add(shop.getWithdrawCharge());
 		//总收益
 		BigDecimal totalRevenue = Optional.ofNullable(shop.getTotalBalance()).orElse(BigDecimal.ZERO).add(shop.getTotalPoint()).add(totalCharge);
-		//总资产
-		BigDecimal totalAssets = shop.getBalance().add(shop.getCharge()).add(shop.getPoint());
+		//总资产 = 可提现余额 + 未核销积分 + 可提现积分
+		BigDecimal availableNum = Convert.toBigDecimal(balanceAccountInfoVO.getAvailableNum());
+		BigDecimal totalAssets = availableNum.add(shop.getCharge()).add(shop.getPoint());
 
 		ShopBillsInfoVO shopBillsInfoVO = ShopBillsInfoVO
 			.builder()
 			//后端null值返回到前端却是-1
-			.balance(Convert.toBigDecimal(balanceAccountInfoVO.getAvailableNum()))
+			.balance(availableNum)
 			.totalBalance(Convert.toBigDecimal(balanceAccountInfoVO.getTotalNum()))
 			.todayBalance(Optional.ofNullable(todayBalance).orElse(BigDecimal.ZERO))
 			.point(Optional.ofNullable(shop.getPoint()).orElse(BigDecimal.ZERO))

+ 3 - 2
ldt-core/src/main/java/org/springblade/payment/callback/trade/UserPayCS.java

@@ -283,8 +283,9 @@ public class UserPayCS {
 			);
 			shop.setTotalBalance(shop.getTotalBalance().add(ypSettleAmount));
 			shop.setCharge(shop.getCharge().add(bills.getPointNum()));
-			shop.setPoint(shop.getPoint().add(Optional.ofNullable(bills.getBalanceNum()).orElse(BigDecimal.ZERO)));
-			shop.setTotalPoint(shop.getPoint());
+			BigDecimal _value = shop.getPoint().add(Optional.ofNullable(bills.getBalanceNum()).orElse(BigDecimal.ZERO));
+			shop.setPoint(_value);
+			shop.setTotalPoint(_value.add(shop.getTotalPoint()));
 		}
 		return shop;
 	}