| | |
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.redpack.RedPackExchange;
|
| | | import com.yeshi.fanli.exception.redpack.RedPackBalanceException;
|
| | | import com.yeshi.fanli.exception.redpack.RedPackExchangeException;
|
| | | import com.yeshi.fanli.service.AdminUserService;
|
| | | import com.yeshi.fanli.service.inter.redpack.RedPackBalanceService;
|
| | |
| | | return;
|
| | | }
|
| | | Long uid = exchange.getUid();
|
| | | BigDecimal balance = redPackBalanceService.getBalance(uid);
|
| | | BigDecimal balance;
|
| | | try {
|
| | | balance = redPackBalanceService.getBalance(uid);
|
| | | } catch (RedPackBalanceException e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("该用户红包功能已被封禁"));
|
| | | return;
|
| | | }
|
| | | UserInfo userInfo = userInfoService.selectByPKey(uid);
|
| | | List<Long> listCount = redPackExchangeService.countState(uid);
|
| | | List<BigDecimal> listMoney = redPackExchangeService.countMoneyState(uid);
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("exchange", exchange);
|
| | | data.put("userInfo", userInfo);
|
| | |
|
| | | data.put("countInit", listCount.get(0));
|
| | | data.put("countSucceed", listCount.get(1));
|
| | | data.put("countReject", listCount.get(2));
|
| | | data.put("countInit", redPackExchangeService.countByUidAndState(uid, RedPackExchange.STATE_INIT));
|
| | | data.put("countSucceed", redPackExchangeService.countByUidAndState(uid, RedPackExchange.STATE_SUCCESS));
|
| | | data.put("countReject", redPackExchangeService.countByUidAndState(uid, RedPackExchange.STATE_REJECT));
|
| | |
|
| | | data.put("balance", balance);
|
| | | data.put("moneyInit", listMoney.get(0));
|
| | | data.put("moneySucceed", listMoney.get(1));
|
| | | data.put("moneyReject", listMoney.get(2));
|
| | | data.put("moneyInit", redPackExchangeService.countMoneyByUidAndState(uid,RedPackExchange.STATE_INIT));
|
| | | data.put("moneySucceed", redPackExchangeService.countMoneyByUidAndState(uid,RedPackExchange.STATE_SUCCESS));
|
| | | data.put("moneyReject", redPackExchangeService.countMoneyByUidAndState(uid,RedPackExchange.STATE_REJECT));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|