|
@@ -138,10 +138,25 @@ public class UserController extends AbstractApiController {
|
|
|
Integer inviteNextNum = userService.countByCondition(c);
|
|
|
bo.setTeamNum(inviteNum + inviteNextNum);
|
|
|
// 付款过的订单
|
|
|
+// c = new Condition(Flow.class);
|
|
|
+// c.createCriteria().andIn("bizType", CollUtil.newArrayList(BizTypeEnum.OPEN_GROUP_PAY.getKey(), BizTypeEnum.JOIN_GROUP_PAY.getKey()));
|
|
|
+// Integer payNum = flowService.countByCondition(c);
|
|
|
+// bo.setSuccessGroupNum(payNum);
|
|
|
+
|
|
|
c = new Condition(Flow.class);
|
|
|
- c.createCriteria().andIn("bizType", CollUtil.newArrayList(BizTypeEnum.OPEN_GROUP_PAY.getKey(), BizTypeEnum.JOIN_GROUP_PAY.getKey()));
|
|
|
+ c.createCriteria().andEqualTo("userId", u.getId()).andIn("bizType", CollUtil.newArrayList(BizTypeEnum.OPEN_GROUP_PAY.getKey(), BizTypeEnum.JOIN_GROUP_PAY.getKey()));
|
|
|
Integer payNum = flowService.countByCondition(c);
|
|
|
- bo.setSuccessGroupNum(payNum);
|
|
|
+ if (payNum == null) {
|
|
|
+ payNum = 0;
|
|
|
+ }
|
|
|
+ c = new Condition(Flow.class);
|
|
|
+ c.createCriteria().andEqualTo("userId", u.getId()).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);
|
|
|
bo.setWalletBalance(wallet.getBalance());
|