|
@@ -171,7 +171,16 @@ public class UserController extends AbstractApiController {
|
|
c = new Condition(Flow.class);
|
|
c = new Condition(Flow.class);
|
|
c.createCriteria().andIn("bizType", CollUtil.newArrayList(BizTypeEnum.OPEN_GROUP_PAY.getKey(),BizTypeEnum.JOIN_GROUP_PAY.getKey()));
|
|
c.createCriteria().andIn("bizType", CollUtil.newArrayList(BizTypeEnum.OPEN_GROUP_PAY.getKey(),BizTypeEnum.JOIN_GROUP_PAY.getKey()));
|
|
Integer payNum = flowService.countByCondition(c);
|
|
Integer payNum = flowService.countByCondition(c);
|
|
- bo.setSuccessGroupNum(payNum);
|
|
|
|
|
|
+ if (payNum == null){
|
|
|
|
+ payNum = 0;
|
|
|
|
+ }
|
|
|
|
+ c = new Condition(Flow.class);
|
|
|
|
+ c.createCriteria().andEqualTo("bizType", BizTypeEnum.FAIL_GROUP_REFUND.getKey());
|
|
|
|
+ Integer unpayNum = flowService.countByCondition(c);
|
|
|
|
+ if (unpayNum == null){
|
|
|
|
+ unpayNum = 0;
|
|
|
|
+ }
|
|
|
|
+ bo.setSuccessGroupNum(payNum-unpayNum);
|
|
//钱包余额
|
|
//钱包余额
|
|
Account wallet = accountService.getAccount(u.getId(), 1);
|
|
Account wallet = accountService.getAccount(u.getId(), 1);
|
|
bo.setWalletBalance(wallet.getBalance());
|
|
bo.setWalletBalance(wallet.getBalance());
|
|
@@ -183,6 +192,23 @@ public class UserController extends AbstractApiController {
|
|
bo.setGroupNum(member.getJoinedGroupsNo());
|
|
bo.setGroupNum(member.getJoinedGroupsNo());
|
|
BigDecimal totalEarnings = redEnvelopeService.sumWithDay(null, u.getId(), 3);
|
|
BigDecimal totalEarnings = redEnvelopeService.sumWithDay(null, u.getId(), 3);
|
|
bo.setTotalEarnings(totalEarnings);
|
|
bo.setTotalEarnings(totalEarnings);
|
|
|
|
+
|
|
|
|
+ c = new Condition(Flow.class);
|
|
|
|
+ c.createCriteria().andGreaterThanOrEqualTo("createTime",DateUtil.today())
|
|
|
|
+ .andIn("bizType", CollUtil.newArrayList(BizTypeEnum.OPEN_GROUP_PAY.getKey(),BizTypeEnum.JOIN_GROUP_PAY.getKey()));
|
|
|
|
+ Integer payNumToday = flowService.countByCondition(c);
|
|
|
|
+ if (payNumToday == null){
|
|
|
|
+ payNumToday = 0;
|
|
|
|
+ }
|
|
|
|
+ c = new Condition(Flow.class);
|
|
|
|
+ c.createCriteria().andEqualTo("bizType", BizTypeEnum.FAIL_GROUP_REFUND.getKey())
|
|
|
|
+ .andGreaterThanOrEqualTo("createTime",DateUtil.today())
|
|
|
|
+ ;
|
|
|
|
+ Integer unpayNumToday = flowService.countByCondition(c);
|
|
|
|
+ if (unpayNumToday == null){
|
|
|
|
+ unpayNumToday = 0;
|
|
|
|
+ }
|
|
|
|
+ bo.setOpenGroupNum(payNumToday-unpayNumToday);
|
|
//已结算金额
|
|
//已结算金额
|
|
bo.setSettledEarnings(earnings.getTotalInamount());
|
|
bo.setSettledEarnings(earnings.getTotalInamount());
|
|
//充值总金额
|
|
//充值总金额
|