| | |
| | | import com.dsh.account.feignclient.course.CoursePaymentClient; |
| | | import com.dsh.account.feignclient.course.model.TCoursePackagePayment; |
| | | import com.dsh.account.feignclient.other.RechargeConfigClient; |
| | | import com.dsh.account.feignclient.other.SiteClient; |
| | | import com.dsh.account.feignclient.other.model.SiteBooking; |
| | | import com.dsh.account.mapper.RechargeRecordsMapper; |
| | | import com.dsh.account.mapper.TAppUserMapper; |
| | | import com.dsh.account.model.vo.userBenefitDetail.RechargeDetailsVo; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @Autowired |
| | | private PayMoneyUtil payMoneyUtil; |
| | | |
| | | @Resource |
| | | private SiteClient stClient; |
| | | |
| | | |
| | | @Resource |
| | |
| | | } |
| | | } |
| | | // 3.场地预约 |
| | | // TODO: 2023/7/14 充值明细的场地预约查询 |
| | | |
| | | List<SiteBooking> siteBookings = stClient.wanpaiGoldSiteBookingList(appUserId); |
| | | if (siteBookings.size() > 0 ){ |
| | | for (SiteBooking booking : siteBookings) { |
| | | RechargeDetailsVo.RechargesDetail consumeDetail = new RechargeDetailsVo.RechargesDetail(); |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.VENUE_RESERVATION.name()); |
| | | consumeDetail.setConsumeTime(simpleDateFormat.format(booking.getInsertTime())); |
| | | consumeDetail.setConsumeAmount("-" + booking.getPayMoney()); |
| | | details.add(consumeDetail); |
| | | } |
| | | } |
| | | // 4.智慧球场 |
| | | |
| | | // 5.充值 |
| | |
| | | consumeDetail.setConsumeAmount("+" + rechargeRecord.getAmount()); |
| | | details.add(consumeDetail); |
| | | } |
| | | } |
| | | if (details.size() > 0 ){ |
| | | Collections.sort(details, new Comparator<RechargeDetailsVo.RechargesDetail>() { |
| | | @Override |
| | | public int compare(RechargeDetailsVo.RechargesDetail o1, RechargeDetailsVo.RechargesDetail o2) { |
| | | try { |
| | | Date date1 = simpleDateFormat.parse(o1.getConsumeTime()); |
| | | Date date2 = simpleDateFormat.parse(o2.getConsumeTime()); |
| | | return date2.compareTo(date1); // 降序排序 |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | }); |
| | | } |
| | | vo.setDetailList(details); |
| | | return vo; |
| | |
| | | |
| | | |
| | | private ResultUtil AlipayPayment(String code,BigDecimal amount) { |
| | | ResultUtil alipay = payMoneyUtil.alipay("玩湃币充值", "", "", code, amount.toString(), |
| | | ResultUtil alipay = payMoneyUtil.alipay("玩湃币充值", "玩湃币充值", "", code, amount.toString(), |
| | | "/base/recharge/alipayRechargeCallback"); |
| | | if(alipay.getCode() == 200){ |
| | | new Thread(new Runnable() { |