| | |
| | | import com.dsh.account.feignclient.course.CoursePaymentClient; |
| | | import com.dsh.account.feignclient.course.VideoOfCourseListClient; |
| | | import com.dsh.account.feignclient.course.model.*; |
| | | import com.dsh.account.feignclient.other.ImgConfigClient; |
| | | import com.dsh.account.feignclient.other.RechargeConfigClient; |
| | | import com.dsh.account.feignclient.other.SiteClient; |
| | | import com.dsh.account.feignclient.other.StoreClient; |
| | | import com.dsh.account.feignclient.other.model.Store; |
| | | import com.dsh.account.feignclient.other.model.StoreDetailOfCourse; |
| | | import com.dsh.account.feignclient.other.model.TImgConfig; |
| | | import com.dsh.account.feignclient.other.*; |
| | | import com.dsh.account.feignclient.other.model.*; |
| | | import com.dsh.account.mapper.*; |
| | | import com.dsh.account.model.*; |
| | | import com.dsh.account.model.AppUserByNameAndPhoneDTO; |
| | |
| | | |
| | | @Autowired |
| | | private UserIntegralChangesService userIntegralChangesService; |
| | | |
| | | @Resource |
| | | private GameRecordClient gameRecordClient; |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | // 5.智慧球场 |
| | | GetTGameRecord getTGameRecord = new GetTGameRecord(); |
| | | getTGameRecord.setAppUserId(appUserId); |
| | | getTGameRecord.setStartTiem(monthStart); |
| | | getTGameRecord.setEndTime(monthEnd); |
| | | List<TGameRecord> tGameRecord = gameRecordClient.getTGameRecord(getTGameRecord); |
| | | for (TGameRecord gameRecord : tGameRecord) { |
| | | ConsumeDetail consumeDetail = new ConsumeDetail(); |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.SMART_STADIUM.getMsg()); |
| | | consumeDetail.setConsumeTime(simpleDateFormat.format(gameRecord.getTime())); |
| | | consumeDetail.setConsumeAmount("-" + gameRecord.getMoney()); |
| | | consumeDetail.setType(2); |
| | | consumeDetail.setDateTime(gameRecord.getTime().getTime()); |
| | | details.add(consumeDetail); |
| | | } |
| | | |
| | | // 6.年度会员 |
| | | List<VipPayment> vipPayments = vipPaymentMapper.selectList(new QueryWrapper<VipPayment>() |
| | | .eq("payStatus", 2) |
| | |
| | | details.add(consumeDetail); |
| | | } |
| | | } |
| | | |
| | | |
| | | if (details.size() > 0) { |
| | | Collections.sort(details, new Comparator<ConsumeDetail>() { |
| | |
| | | pointsMerchandise.setCode(code); |
| | | pointsMerchandise.setInsertTime(new Date()); |
| | | pointsMerchandise.setPayType(exchangeType.getExchangeType()); |
| | | pointsMerchandise.setIntegral(merchandise.getIntegral() * goodsNums); |
| | | if(null != merchandise.getIntegral()){ |
| | | pointsMerchandise.setIntegral(merchandise.getIntegral() * goodsNums); |
| | | } |
| | | if(exchangeType.getExchangeType() == 2){ |
| | | pointsMerchandise.setCash(merchandise.getCash()); |
| | | pointsMerchandise.setCashPayType(exchangeType.getPayType()); |
| | | } |
| | | |
| | | Double m = new BigDecimal((merchandise.getIntegral() == null ? 0 : merchandise.getIntegral())).add((merchandise.getCash() == null ? BigDecimal.ZERO : merchandise.getCash())).doubleValue(); |
| | | if((m * goodsNums) == 0) { |
| | | pointsMerchandise.setPayStatus(2); |
| | | pointsMerchandise.setPaymentTime(new Date()); |
| | | } |
| | | returnId = mcClient.saveDetailsUserPointMercase(pointsMerchandise); |
| | | |
| | | if((m * goodsNums) == 0 && pointsMerchandise.getPayStatus() == 2){ |
| | | returnModel.setReturnId(returnId); |
| | | return ResultUtil.success(returnModel); |
| | | } |
| | | |
| | | switch (exchangeType.getExchangeType()) { |
| | | // 积分 |
| | |
| | | if ("TRADE_SUCCESS".equals(tradeStatus)) { |
| | | for (UserPointsMerchandise userPointsMerchandise : userPointsMerchandises) { |
| | | userPointsMerchandise.setPayStatus(2); |
| | | userPointsMerchandise.setPaymentTime(new Date()); |
| | | userPointsMerchandise.setOrderNumber(tradeNo); |
| | | userPointsMerchandise.setPayType(2); |
| | | userPointsMerchandise.setCashPayType(2); |
| | | userPointsMerchandise.setInsertTime(null); |
| | | userPointsMerchandise.setUserId(null); |
| | | mcClient.updateDetailsUserPointMercase(userPointsMerchandise); |
| | |
| | | } |
| | | if ("SUCCESS".equals(s)) { |
| | | userPointsMerchandise.setPayStatus(2); |
| | | userPointsMerchandise.setPaymentTime(new Date()); |
| | | userPointsMerchandise.setOrderNumber(transaction_id); |
| | | userPointsMerchandise.setPayType(1); |
| | | userPointsMerchandise.setCashPayType(1); |
| | | mcClient.updateDetailsUserPointMercase(userPointsMerchandise); |
| | | |
| | | TAppUser tAppUser = baseMapper.selectById(userPointsMerchandise.getUserId()); |