| | |
| | | return appUserMapper.groupCityInfo(dto); |
| | | } |
| | | @Override |
| | | public ClassInfoVo queryUserOfStus(Integer id) { |
| | | TAppUser tAppUser = this.baseMapper.selectById(id); |
| | | public ClassInfoVo queryUserOfStus(Integer id,Integer uid) { |
| | | TAppUser tAppUser = this.baseMapper.selectById(uid); |
| | | ClassInfoVo classInfoVo = new ClassInfoVo(); |
| | | if (ToolUtil.isNotEmpty(tAppUser)){ |
| | | List<TStudent> tStudents = tsmapper.selectList(new QueryWrapper<TStudent>() |
| | | // if (ToolUtil.isNotEmpty(tAppUser)){ |
| | | |
| | | // |
| | | |
| | | List<TStudent> tStudents = new ArrayList<>(); |
| | | if (id!=null) { |
| | | tStudents = tsmapper.selectList(new QueryWrapper<TStudent>() |
| | | .eq("id", id).eq("state", 1)); |
| | | |
| | | if (tStudents.size() == 0) { |
| | | tStudents = tsmapper.selectList(new QueryWrapper<TStudent>() |
| | | .eq("appUserId", tAppUser.getId()) |
| | | .eq("state", 1)); |
| | | } |
| | | }else { |
| | | tStudents = tsmapper.selectList(new QueryWrapper<TStudent>() |
| | | .eq("appUserId",tAppUser.getId()) |
| | | .eq("state",1) |
| | | .eq("isDefault",1)); |
| | | if (tStudents==null){ |
| | | tStudents = tsmapper.selectList(new QueryWrapper<TStudent>() |
| | | .eq("appUserId",tAppUser.getId()) |
| | | .eq("state",1)) |
| | | ; |
| | | } |
| | | } |
| | | if (tStudents.size() > 0 ){ |
| | | TStudent tStudent = tStudents.get(0); |
| | | classInfoVo.setStuId(tStudent.getId()); |
| | |
| | | course.setDeductedNums(ToolUtil.isEmpty(tCoursePackagePayment.getDeductionNums()) ? 0 : tCoursePackagePayment.getDeductionNums()); |
| | | course.setRemainingNums(ToolUtil.isEmpty(tCoursePackagePayment.getResidueNums())? 0 : tCoursePackagePayment.getResidueNums()); |
| | | course.setPeriodOfValidity(tCoursePackagePayment.getPeriodOfValidity()); |
| | | course.setIsAble(tCoursePackagePayment.getIsAble()); |
| | | courseList.add(course); |
| | | } |
| | | } |
| | | classInfoVo.setCourseList(courseList); |
| | | // List<ExerciseVideo> stuCourseOfVideoList = voclClient.getStuCourseOfVideoList(coursePackIds); |
| | | List<ExerciseVideo> query = voclClient.query(id); |
| | | System.out.println("======queryqueryqueryquery=================="+query); |
| | | List<ExerciseVideo> query = voclClient.query(tStudent.getId()); |
| | | classInfoVo.setExerciseVideoList(query); |
| | | |
| | | }else { |
| | | classInfoVo.setIsThere(2); |
| | | List<TImgConfig> tImgConfigs = configClient.getNoneStuImgs(); |
| | |
| | | classInfoVo.setImgs(tImgConfigs.get(0).getContent()); |
| | | } |
| | | } |
| | | } |
| | | // } |
| | | return classInfoVo; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | // 3.课包购买 |
| | | BillingRequestVo amountPayRecord = paymentClient.getAmountPayRecord(requestVo); |
| | | if (ToolUtil.isNotEmpty(amountPayRecord.getRequests())){ |
| | | for (BillingRequest coursePackagePayment : amountPayRecord.getRequests()) { |
| | | ConsumeDetail consumeDetail = new ConsumeDetail(); |
| | | consumeDetail.setConsumeName(RechargeRecordEnum.COURSE_PACKAGE_PURCHASE.getMsg()); |
| | | consumeDetail.setConsumeTime(coursePackagePayment.getTime()); |
| | | consumeDetail.setConsumeAmount("-" + coursePackagePayment.getAmount()); |
| | | consumeDetail.setType(2); |
| | | details.add(consumeDetail); |
| | | } |
| | | } |
| | | // BillingRequestVo amountPayRecord = paymentClient.getAmountPayRecord(requestVo); |
| | | // if (ToolUtil.isNotEmpty(amountPayRecord.getRequests())){ |
| | | // for (BillingRequest coursePackagePayment : amountPayRecord.getRequests()) { |
| | | // ConsumeDetail consumeDetail = new ConsumeDetail(); |
| | | // consumeDetail.setConsumeName(RechargeRecordEnum.COURSE_PACKAGE_PURCHASE.getMsg()); |
| | | // consumeDetail.setConsumeTime(coursePackagePayment.getTime()); |
| | | // consumeDetail.setConsumeAmount("-" + coursePackagePayment.getAmount()); |
| | | // consumeDetail.setType(2); |
| | | // details.add(consumeDetail); |
| | | // } |
| | | // } |
| | | |
| | | //2.0 |
| | | List<CourseCounsum> courseCounsums = paymentClient.getConsumes(requestVo); |
| | |
| | | consumeDetail2.setConsumeName(RechargeRecordEnum.VENUE_RESERVATION.getMsg()); |
| | | consumeDetail2.setConsumeAmount("-" + booking.getAmount()); |
| | | consumeDetail2.setConsumeTime(booking.getTime1()); |
| | | consumeDetail2.setType(1); |
| | | consumeDetail2.setType(2); |
| | | details.add(consumeDetail2); |
| | | |
| | | } |
| | |
| | | } |
| | | commodity.setBelongsType(vicinityGood.getUserPopulation()); |
| | | commodity.setGoodsType(1); |
| | | commodity.setUseScope(vicinityGood.getUseScope()); |
| | | commodity.setNums(mcClient.getRedeemedQuantity(vicinityGood.getId())); |
| | | List<Integer> integers = mcsClient.queryPointMerStoreIds(vicinityGood.getId()); |
| | | commodity.setShopIds(integers); |
| | |
| | | } |
| | | commodity.setBelongsType(vicinityGood.getUserPopulation()); |
| | | commodity.setGoodsType(2); |
| | | commodity.setUseScope(vicinityGood.getUseScope()); |
| | | |
| | | commodity.setNums(mcClient.getRedeemedQuantity(vicinityGood.getId())); |
| | | commodity.setShopIds(mcsClient.queryPointMerStoreIds(vicinityGood.getId())); |
| | | break; |
| | |
| | | commodity.setGoodId(vicinityGood.getId()); |
| | | commodity.setGoodName(vicinityGood.getName()); |
| | | commodity.setGoodImg(vicinityGood.getCover()); |
| | | commodity.setUseScope(vicinityGood.getUseScope()); |
| | | |
| | | commodity.setCondition(vicinityGood.getRedemptionMethod()); |
| | | if (vicinityGood.getRedemptionMethod() == 1) { |
| | | commodity.setIntegral(vicinityGood.getIntegral().intValue()); |
| | |
| | | if (allCoupon.getRedemptionMethod() == 1) { |
| | | commodity.setIntegral(allCoupon.getIntegral().intValue()); |
| | | } else { |
| | | if (allCoupon.getIntegral()!=null) { |
| | | commodity.setIntegral(allCoupon.getIntegral().intValue()); |
| | | } |
| | | commodity.setAmount(allCoupon.getCash()); |
| | | } |
| | | commodity.setBelongsType(allCoupon.getUserPopulation()); |
| | |
| | | if (request.getShopId()!=null){ |
| | | if (goods.size() > 0 ){ |
| | | goods = goods.stream() |
| | | .filter( merchandise ->(merchandise.getGoodsType() == 4&&merchandise.getUseScope() == 2)||(merchandise.getGoodsType() == 4&&merchandise.getUseScope() == 1)||merchandise.getShopIds().contains(request.getShopId())) |
| | | .filter( merchandise ->(merchandise.getGoodsType() == 1&&merchandise.getUseScope() == 2)||(merchandise.getGoodsType() == 1&&merchandise.getUseScope() == 1)||(merchandise.getGoodsType() == 4&&merchandise.getUseScope() == 2)||(merchandise.getGoodsType() == 4&&merchandise.getUseScope() == 1)||merchandise.getShopIds().contains(request.getShopId())) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | TAppUser user = appUserService.getById(userIdFormRedis); |
| | | if (merchandise.getIntegral()!=null) { |
| | | if (user.getIntegral()<merchandise.getIntegral().intValue()*goodsNums){ |
| | | return new ResultUtil<>(0,"当前用户积分不足"); |
| | | } |
| | | |
| | | } |
| | | |
| | | AppUserGoodResp goodResp = new AppUserGoodResp(); |
| | | goodResp.setAppUserId(userIdFormRedis); |
| | |
| | | UserPointsMerchandise pointsMerchandise = new UserPointsMerchandise(); |
| | | pointsMerchandise.setPointsMerchandiseId(exchangeType.getGoodId()); |
| | | pointsMerchandise.setUserId(userIdFormRedis); |
| | | if (exchangeType.getGoodsType()==2){ |
| | | pointsMerchandise.setStatus(2); |
| | | pointsMerchandise.setVerificationTime(new Date()); |
| | | }else { |
| | | pointsMerchandise.setStatus(1); |
| | | } |
| | | pointsMerchandise.setState(1); |
| | | if (exchangeType.getExchangeType()==1) { |
| | | pointsMerchandise.setPayStatus(2); |