| | |
| | | } |
| | | |
| | | @Override |
| | | public BillingDetailsVo queryUserBillingDetails(String yearMonth, Integer recordId, Integer appUserId) { |
| | | BillingDetailsVo vo = new BillingDetailsVo(); |
| | | List<BillingDetailsVo.ConsumeDetail> details = new ArrayList<>(); |
| | | public List<ConsumeDetail> queryUserBillingDetails(String yearMonth, Integer recordId, Integer appUserId) { |
| | | List<ConsumeDetail> details = new ArrayList<>(); |
| | | |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM-dd HH:mm"); |
| | | Date monthStart = null; |
| | |
| | | List<PaymentCompetition> allCompetitionPayRecord = deducClient.getAllCompetitionPayRecord(appUserId); |
| | | if (allCompetitionPayRecord.size() > 0 ){ |
| | | for (PaymentCompetition paymentCompetition : allCompetitionPayRecord) { |
| | | BillingDetailsVo.ConsumeDetail consumeDetail = new BillingDetailsVo.ConsumeDetail(); |
| | | ConsumeDetail consumeDetail = new ConsumeDetail(); |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.EVENT_REGISTRATION.getMsg()); |
| | | consumeDetail.setConsumeTime(simpleDateFormat.format(paymentCompetition.getInsertTime())); |
| | | consumeDetail.setConsumeAmount("-" + paymentCompetition.getAmount()); |
| | |
| | | List<PaymentCompetition> cancelOrderOfUserPayRecord = deducClient.getCancelOrderOfUserPayRecord(appUserId); |
| | | if (cancelOrderOfUserPayRecord.size() > 0 ){ |
| | | for (PaymentCompetition paymentCompetition : cancelOrderOfUserPayRecord) { |
| | | BillingDetailsVo.ConsumeDetail consumeDetail = new BillingDetailsVo.ConsumeDetail(); |
| | | ConsumeDetail consumeDetail = new ConsumeDetail(); |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.CANCEL_EVENT_REGISTRATION.getMsg()); |
| | | consumeDetail.setConsumeTime(simpleDateFormat.format(paymentCompetition.getInsertTime())); |
| | | consumeDetail.setConsumeAmount("+" + paymentCompetition.getAmount()); |
| | |
| | | List<TCoursePackagePayment> amountPayRecord = paymentClient.getAmountPayRecord(appUserId); |
| | | if (amountPayRecord.size() > 0 ){ |
| | | for (TCoursePackagePayment coursePackagePayment : amountPayRecord) { |
| | | BillingDetailsVo.ConsumeDetail consumeDetail = new BillingDetailsVo.ConsumeDetail(); |
| | | ConsumeDetail consumeDetail = new ConsumeDetail(); |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.COURSE_PACKAGE_PURCHASE.getMsg()); |
| | | consumeDetail.setConsumeTime(simpleDateFormat.format(coursePackagePayment.getInsertTime())); |
| | | consumeDetail.setConsumeAmount("-" + coursePackagePayment.getCashPayment()); |
| | |
| | | List<SiteBooking> allSiteBookingList = stClient.getAllSiteBookingList(appUserId); |
| | | if (allSiteBookingList.size() > 0){ |
| | | for (SiteBooking booking : allSiteBookingList) { |
| | | BillingDetailsVo.ConsumeDetail consumeDetail = new BillingDetailsVo.ConsumeDetail(); |
| | | ConsumeDetail consumeDetail = new ConsumeDetail(); |
| | | if (booking.getStatus() != 5){ |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.VENUE_RESERVATION.getMsg()); |
| | | consumeDetail.setConsumeAmount("-" + booking.getPayMoney()); |
| | |
| | | .between("insertTime", monthStart, monthEnd)); |
| | | if (vipPayments.size() > 0) { |
| | | for (VipPayment vipPayment : vipPayments) { |
| | | BillingDetailsVo.ConsumeDetail consumeDetail = new BillingDetailsVo.ConsumeDetail(); |
| | | ConsumeDetail consumeDetail = new ConsumeDetail(); |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.ANNUAL_MEMBERSHIP.getMsg()); |
| | | consumeDetail.setConsumeTime(simpleDateFormat.format(vipPayment.getInsertTime())); |
| | | consumeDetail.setConsumeAmount("-" + vipPayment.getAmount()); |
| | |
| | | .between("insertTime", monthStart, monthEnd)); |
| | | if (rechargeRecords.size() > 0) { |
| | | for (RechargeRecords rechargeRecord : rechargeRecords) { |
| | | BillingDetailsVo.ConsumeDetail consumeDetail = new BillingDetailsVo.ConsumeDetail(); |
| | | ConsumeDetail consumeDetail = new ConsumeDetail(); |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.RECHARGE.getMsg() + ":" + rechargeRecord.getPlayPaiCoins()); |
| | | consumeDetail.setConsumeTime(simpleDateFormat.format(rechargeRecord.getInsertTime())); |
| | | consumeDetail.setConsumeAmount("-" + rechargeRecord.getAmount()); |
| | |
| | | } |
| | | } |
| | | if (details.size() > 0 ){ |
| | | Collections.sort(details, new Comparator<BillingDetailsVo.ConsumeDetail>() { |
| | | Collections.sort(details, new Comparator<ConsumeDetail>() { |
| | | @Override |
| | | public int compare(BillingDetailsVo.ConsumeDetail record1, BillingDetailsVo.ConsumeDetail record2) { |
| | | public int compare(ConsumeDetail record1, ConsumeDetail record2) { |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd HH:mm"); |
| | | Date date1 = null; |
| | | Date date2 = null; |
| | |
| | | } |
| | | }); |
| | | } |
| | | vo.setDetails(details); |
| | | return vo; |
| | | return details; |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (rechargeConfig.size() > 0 ){ |
| | | for (Map<String, Object> stringObjectMap : rechargeConfig) { |
| | | RechargeCentVo vo = new RechargeCentVo(); |
| | | vo.setChargeId((Integer) stringObjectMap.get("money")); |
| | | vo.setAmount(""+stringObjectMap.get("money")); |
| | | if (tAppUser.getIsVip() == 1){ |
| | | vo.setWpGold(stringObjectMap.get("MemberCoins")+""); |