| | |
| | | import com.dsh.account.feignclient.competition.model.GetStuSourseList; |
| | | import com.dsh.account.feignclient.competition.model.PurchaseRecordVo; |
| | | import com.dsh.account.feignclient.competition.model.SaveParticipant; |
| | | import com.dsh.account.feignclient.course.CancelListClient; |
| | | import com.dsh.account.feignclient.course.CoursePaymentClient; |
| | | import com.dsh.account.feignclient.course.CourseRecordClient; |
| | | import com.dsh.account.feignclient.course.CourseSessionNameClient; |
| | | import com.dsh.account.feignclient.course.*; |
| | | import com.dsh.account.feignclient.course.model.*; |
| | | import com.dsh.account.feignclient.other.NoticeClient; |
| | | import com.dsh.account.feignclient.other.QuestionClient; |
| | | import com.dsh.account.feignclient.other.SiteClient; |
| | | import com.dsh.account.feignclient.other.StoreClient; |
| | | import com.dsh.account.feignclient.other.model.*; |
| | | import com.dsh.account.mapper.CoachMapper; |
| | |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.ClassDetailsInsVo; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.StuDetailsReq; |
| | | import com.dsh.account.model.vo.classDetails.classInsVo.StuListVo; |
| | | import com.dsh.account.model.vo.exploreDetail.ExploreDatasVo; |
| | | import com.dsh.account.model.vo.exploreDetail.LonLatRequest; |
| | | import com.dsh.account.model.vo.exploreDetails.QuestionDetailsVo; |
| | | import com.dsh.account.model.vo.exploreDetails.QuestionIns; |
| | | import com.dsh.account.model.vo.exploreDetail.QuestionIns; |
| | | import com.dsh.account.model.vo.exploreDetail.StoreDetailsVo; |
| | | import com.dsh.account.model.vo.sourceDetail.CouponStuAvailableVo; |
| | | import com.dsh.account.model.vo.sourceDetail.CourseDetailsOfContinuationResp; |
| | | import com.dsh.account.model.vo.sourceDetail.RecordTimeRequest; |
| | |
| | | @Autowired |
| | | private PayMoneyUtil payMoneyUtil; |
| | | |
| | | |
| | | @Resource |
| | | private SiteClient steClient; |
| | | |
| | | @Resource |
| | | private CourseListClient culisClient; |
| | | |
| | | |
| | | |
| | |
| | | List<PurchaseRecordVo> purchaseRecordVos1 = idrClient.queryAppUsersofIntroduce(request); |
| | | purchaseRecordVoList.addAll(purchaseRecordVos1); |
| | | |
| | | if (purchaseRecordVoList.size() > 0 ){ |
| | | purchaseRecordVoList = purchaseRecordVoList.stream() |
| | | .filter(record -> { |
| | | String fieldValue = record.getPurchaseAmount(); |
| | | if (ToolUtil.isNotEmpty(timeRequest.getType())){ |
| | | switch (timeRequest.getType()){ |
| | | case 1: |
| | | return fieldValue != null && !fieldValue.isEmpty() && fieldValue.charAt(0) == '-'; |
| | | case 2: |
| | | return fieldValue != null && !fieldValue.isEmpty() && fieldValue.charAt(0) == '+'; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | return false; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | |
| | | purchaseRecordVoList = dealDataOfTime(purchaseRecordVoList); |
| | | return purchaseRecordVoList; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public QuestionDetailsVo queryQuestionData() { |
| | | public List<QuestionIns> queryQuestionData() { |
| | | return quesClient.getSysQuestionDetails(); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ExploreDatasVo queryIndexOfExplores(LonLatRequest llrequest) { |
| | | ExploreDatasVo datasVo = new ExploreDatasVo(); |
| | | public List<StoreInfo> queryIndexOfExplores(LonLatRequest llrequest) { |
| | | GetAllNearbyStoreList getAllNearbyStoreList = new GetAllNearbyStoreList(); |
| | | getAllNearbyStoreList.setLongitude(llrequest.getLongitude()); |
| | | getAllNearbyStoreList.setLatitude(llrequest.getLatitude()); |
| | | List<StoreInfo> allNearbyStoreList = storeClient.getAllNearbyStoreList(getAllNearbyStoreList); |
| | | List<StoreLonLatList> allStoreLonLats = storeClient.getAllStoreLonLats(getAllNearbyStoreList); |
| | | datasVo.setStoreLists(allNearbyStoreList); |
| | | datasVo.setLonLatLists(allStoreLonLats); |
| | | return datasVo; |
| | | return storeClient.getAllNearbyStoreList(getAllNearbyStoreList); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public AppointmentRecordVo getAppointmentRecords(Integer stuId, Integer appUserId) { |
| | | public AppointmentRecordVo getAppointmentRecords(Integer stuId, Integer appUserId,Integer appointStatus,Integer timeType,String search) { |
| | | AppointmentRecordVo recordVo = new AppointmentRecordVo(); |
| | | TStudent tStudent = this.baseMapper.selectOne(new QueryWrapper<TStudent>() |
| | | .eq("id",stuId ) |
| | |
| | | if (ToolUtil.isNotEmpty(tStudent)){ |
| | | recordVo.setStuId(tStudent.getId()); |
| | | recordVo.setStuName(tStudent.getName()); |
| | | recordVo.setAppointList(couPayClient.obtainStudentClassDetailsData(stuId)); |
| | | List<RecordAppoint> recordAppoints = couPayClient.obtainStudentClassDetailsData(stuId); |
| | | if (ToolUtil.isEmpty(appointStatus)){ |
| | | recordVo.setAppointStatus(0); |
| | | }else { |
| | | recordVo.setAppointStatus(appointStatus); |
| | | recordAppoints = recordAppoints.stream() |
| | | .filter(record -> record.getStatus().equals(appointStatus)) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | if (ToolUtil.isNotEmpty(search)){ |
| | | recordVo.setAppointStatus(appointStatus); |
| | | recordAppoints = recordAppoints.stream() |
| | | .filter(record -> record.getCoursePackageName().contains(search)) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | if (ToolUtil.isNotEmpty(timeType)){ |
| | | Date lastOfDate = DateUtil.getLastOfDate(); |
| | | switch (timeType){ |
| | | case 1: |
| | | Date lastWeekStartDate = DateUtil.getLastWeekStartDate(); |
| | | recordAppoints = recordAppoints.stream() |
| | | .filter(record -> { |
| | | try { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | Date time = sdf.parse(record.getTimeFrame().substring(11)); |
| | | return !time.before(lastWeekStartDate) && !time.after(lastOfDate); |
| | | } catch (ParseException e) { |
| | | return false; |
| | | } |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | break; |
| | | case 2: |
| | | Date lastMonthStartDate = DateUtil.getLastMonthStartDate(); |
| | | recordAppoints = recordAppoints.stream() |
| | | .filter(record -> { |
| | | try { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | Date time = sdf.parse(record.getTimeFrame().substring(11)); |
| | | return !time.before(lastMonthStartDate) && !time.after(lastOfDate); |
| | | } catch (ParseException e) { |
| | | return false; |
| | | } |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | break; |
| | | case 3: |
| | | Date lastYearStartDate = DateUtil.getLastYearStartDate(); |
| | | recordAppoints = recordAppoints.stream() |
| | | .filter(record -> { |
| | | try { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | Date time = sdf.parse(record.getTimeFrame().substring(11)); |
| | | return !time.before(lastYearStartDate) && !time.after(lastOfDate); |
| | | } catch (ParseException e) { |
| | | return false; |
| | | } |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | break; |
| | | default: |
| | | break; |
| | | |
| | | } |
| | | } |
| | | recordVo.setAppointList(recordAppoints); |
| | | } |
| | | return recordVo; |
| | | } |
| | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public List<StoreDetailList> queryStoreList(Integer space,String cityCode,String latitude,String longitude) { |
| | | StoreOfCitycodeResp citycodeResp = new StoreOfCitycodeResp(); |
| | | citycodeResp.setSpace(space); |
| | | citycodeResp.setCityCode(cityCode); |
| | | citycodeResp.setLongitude(latitude); |
| | | citycodeResp.setLatitude(longitude); |
| | | return storeClient.getQueryStoreList(citycodeResp); |
| | | } |
| | | |
| | | @Override |
| | | public StoreDetailsVo getStoreDetail(Integer storeId) { |
| | | Store store = storeClient.queryStoreById(storeId); |
| | | StoreDetailsVo detailsVo = new StoreDetailsVo(); |
| | | String realPicture = store.getRealPicture(); |
| | | String[] split = realPicture.split(","); |
| | | detailsVo.setImages(Arrays.asList(split)); |
| | | detailsVo.setStoreId(store.getId()); |
| | | detailsVo.setStoreName(store.getName()); |
| | | detailsVo.setStoreAddress(store.getAddress()); |
| | | detailsVo.setStoreTime(store.getStartTime() + "至" +store.getEndTime()); |
| | | detailsVo.setStoreInfo(store.getIntroduce()); |
| | | detailsVo.setLon(store.getLon()); |
| | | detailsVo.setLat(store.getLat()); |
| | | detailsVo.setPhone(store.getPhone()); |
| | | detailsVo.setVenueList(steClient.getAppUserSiteList()); |
| | | detailsVo.setCourseVoList(culisClient.getStoreOfCourseList(storeId)); |
| | | return detailsVo; |
| | | } |
| | | |
| | | |
| | | } |