| | |
| | | import com.dsh.course.feignclient.account.AppUserClient; |
| | | import com.dsh.course.feignclient.account.CoachClient; |
| | | import com.dsh.course.feignclient.account.StudentClient; |
| | | import com.dsh.course.feignclient.account.model.AppUser; |
| | | import com.dsh.course.feignclient.account.model.Coach; |
| | | import com.dsh.course.feignclient.account.model.Student; |
| | | import com.dsh.course.feignclient.account.model.TCourseInfoRecord; |
| | | import com.dsh.course.feignclient.account.UserIntegralChangesClient; |
| | | import com.dsh.course.feignclient.account.model.*; |
| | | import com.dsh.course.feignclient.activity.BenefitVideoClient; |
| | | import com.dsh.course.feignclient.activity.CouponClient; |
| | | import com.dsh.course.feignclient.activity.model.BenefitsVideos; |
| | |
| | | @Autowired |
| | | private ICoursePackageSchedulingService coursePackageSchedulingService; |
| | | |
| | | |
| | | @Autowired |
| | | private RestTemplate internalRestTemplate; |
| | | |
| | | @Resource |
| | | private UserIntegralChangesClient userIntegralChangesClient; |
| | | |
| | | |
| | | @Override |
| | |
| | | @Override |
| | | public CourseOfVideoResponse queryVideoDetails(CourseWithDetailsRequest detailsRequest, Integer appUserId) { |
| | | CourseOfVideoResponse response = new CourseOfVideoResponse(); |
| | | // BenefitsVideos videosWithIds = bfvoClient.getVideosWithIds(detailsRequest.getVideoId()); |
| | | TCourse byId = courseService.getById(detailsRequest.getVideoId()); |
| | | TCoursePackage coursePackage = tcpmapper.selectById(detailsRequest.getCoursePackageId()); |
| | | CoursePackageScheduling byId1 = new CoursePackageScheduling(); |
| | |
| | | userVideoDetails.setState(2); |
| | | userVideoDetails.setUpdateTime(new Date()); |
| | | uvdmapper.updateById(userVideoDetails); |
| | | |
| | | CoursePackageScheduling coursePackageScheduling = coursePackageSchedulingService.getById(detailsRequest.getScId()); |
| | | //添加积分 |
| | | AppUser appUser = appuClient.queryAppUser(coursePackageScheduling.getAppUserId()); |
| | | appUser.setIntegral((null == appUser.getIntegral() ? 0 : appUser.getIntegral()) + (null == coursePackageScheduling.getIntegral() ? 0 : coursePackageScheduling.getIntegral())); |
| | | appuClient.updateAppUser(appUser); |
| | | SaveUserIntegralChangesVo vo = new SaveUserIntegralChangesVo(); |
| | | vo.setAppUserId(coursePackageScheduling.getAppUserId()); |
| | | vo.setIntegral(coursePackageScheduling.getIntegral()); |
| | | vo.setType(4); |
| | | userIntegralChangesClient.saveUserIntegralChanges(vo); |
| | | return "SUCCESS"; |
| | | } |
| | | return "ERROR"; |
| | |
| | | } |
| | | Store store = storeClient.queryStoreById(coursePackage.getStoreId()); |
| | | response.setStoreName(store.getName()); |
| | | response.setStoreAddress(store.getAddress()); |
| | | |
| | | if (ToolUtil.isNotEmpty(lon) && ToolUtil.isNotEmpty(lat)) { |
| | | Map<String, Double> distance = GeodesyUtil.getDistance(lon + "," + lat, store.getLon() + "," + store.getLat()); |