From ac6a07af9baba0e0fc8d181aae904da679ae8f5a Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 06 七月 2023 10:04:07 +0800
Subject: [PATCH] 更新部分功能接口

---
 cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java |   81 ++++++++++++++++++++++++++--------------
 1 files changed, 52 insertions(+), 29 deletions(-)

diff --git a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java
index 515f5bc..17ea0eb 100644
--- a/cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java
+++ b/cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java
@@ -7,21 +7,17 @@
 import com.dsh.account.feignclient.activity.IntroduceRewardsClient;
 import com.dsh.account.feignclient.activity.UserConponClient;
 import com.dsh.account.feignclient.competition.DeductionCompetitionsClient;
+import com.dsh.account.feignclient.competition.model.GetStuSourseList;
 import com.dsh.account.feignclient.competition.model.PurchaseRecordVo;
 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.model.StuSessionDetailsVo;
-import com.dsh.account.feignclient.course.model.StuWithCoursesListVo;
-import com.dsh.account.feignclient.course.model.StudentOfCourseVo;
+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.StoreClient;
-import com.dsh.account.feignclient.other.model.StoreDetailOfCourse;
-import com.dsh.account.feignclient.other.model.StoreInfo;
-import com.dsh.account.feignclient.other.model.StoreLonLatList;
-import com.dsh.account.feignclient.other.model.SysNotice;
+import com.dsh.account.feignclient.other.model.*;
 import com.dsh.account.mapper.TAppUserMapper;
 import com.dsh.account.mapper.TStudentMapper;
 import com.dsh.account.model.vo.classDetails.classInsVo.ClassDetailsInsVo;
@@ -41,6 +37,7 @@
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
@@ -58,37 +55,37 @@
 @Service
 public class TStudentServiceImpl extends ServiceImpl<TStudentMapper, TStudent> implements TStudentService {
 
-    @Autowired
+    @Resource
     private CourseSessionNameClient sessionNameClient;
 
-    @Autowired
+    @Resource
     private DeductionCompetitionsClient dcttClient;
 
-    @Autowired
+    @Resource
     private CancelListClient cancelcClient;
 
-    @Autowired
+    @Resource
     private IntroduceRewardsClient idrClient;
 
-    @Autowired
+    @Resource
     private CourseRecordClient crClient;
 
-    @Autowired
+    @Resource
     private CoursePaymentClient couPayClient;
 
-    @Autowired
+    @Resource
     private UserConponClient userCClient;
 
-    @Autowired
+    @Resource
     private StoreClient storeClient;
 
-    @Autowired
+    @Resource
     private NoticeClient noClient;
 
-    @Autowired
+    @Resource
     private QuestionClient quesClient;
 
-    @Autowired
+    @Resource
     private TAppUserMapper tauMapper;
 
     @Override
@@ -117,7 +114,12 @@
         ClassDetailsInsVo insVo = new ClassDetailsInsVo();
         Date localMonthStart = DateTimeHelper.getCurrentMouthStart();
         Date localMonthEnd = DateTimeHelper.getCurrentMouthEnd();
-        List<StuSessionDetailsVo> stuSessionList = sessionNameClient.getStuSessionList(localMonthStart,localMonthEnd,stuId,userIdFormRedis);
+        GetStuSessionList getStuSessionList = new GetStuSessionList();
+        getStuSessionList.setStartTime(localMonthStart);
+        getStuSessionList.setEndTime(localMonthEnd);
+        getStuSessionList.setStuId(stuId);
+        getStuSessionList.setAppUserId(userIdFormRedis);
+        List<StuSessionDetailsVo> stuSessionList = sessionNameClient.getStuSessionList(getStuSessionList);
         TStudent tStudent = this.baseMapper.selectById(stuId);
         if (ToolUtil.isNotEmpty(tStudent)){
             insVo.setStuId(tStudent.getId());
@@ -125,12 +127,15 @@
             insVo.setStuImage(tStudent.getHeadImg());
 
             List<PurchaseRecordVo> purchaseRecordVoList = new ArrayList<>();
-
-            List<PurchaseRecordVo> stuSourseList = dcttClient.getStuSourseList(localMonthStart,localMonthEnd,userIdFormRedis);
+            GetStuSourseList getStuSourseList = new GetStuSourseList();
+            getStuSourseList.setStartTime(localMonthStart);
+            getStuSourseList.setEndTime(localMonthEnd);
+            getStuSourseList.setAppUserId(userIdFormRedis);
+            List<PurchaseRecordVo> stuSourseList = dcttClient.getStuSourseList(getStuSourseList);
             purchaseRecordVoList.addAll(stuSourseList);
             List<PurchaseRecordVo> cancelCourseList = cancelcClient.getCancelCourseList(localMonthStart,localMonthEnd,stuId,userIdFormRedis);
             purchaseRecordVoList.addAll(cancelCourseList);
-            List<PurchaseRecordVo> purchaseRecordVos = sessionNameClient.queryCourseDetails(localMonthStart,localMonthEnd,stuId,userIdFormRedis);
+            List<PurchaseRecordVo> purchaseRecordVos = sessionNameClient.queryCourseDetails(getStuSessionList);
             purchaseRecordVoList.addAll(purchaseRecordVos);
             List<TAppUser> tAppUsers = tauMapper.selectList(new QueryWrapper<TAppUser>()
                     .eq("referralUserId",userIdFormRedis )
@@ -140,7 +145,10 @@
             purchaseRecordVoList.addAll(purchaseRecordVos1);
             insVo.setSessionNames(stuSessionList);
             insVo.setDetails(dealDataOfTime(purchaseRecordVoList));
-            StuWithCoursesListVo stuOfCoursesDetails = couPayClient.getStuOfCoursesDetails(stuId, userIdFormRedis);
+            GetStuOfCoursesDetails getStuOfCoursesDetails = new GetStuOfCoursesDetails();
+            getStuOfCoursesDetails.setStuId(stuId);
+            getStuOfCoursesDetails.setAppUserId(userIdFormRedis);
+            StuWithCoursesListVo stuOfCoursesDetails = couPayClient.getStuOfCoursesDetails(getStuOfCoursesDetails);
             insVo.setTotalNums(stuOfCoursesDetails.getTotalNums());
             insVo.setDeductedNums(stuOfCoursesDetails.getDeductedNums());
             insVo.setRemainingNums(stuOfCoursesDetails.getRemainingNums());
@@ -156,12 +164,20 @@
         List<PurchaseRecordVo> purchaseRecordVoList = new ArrayList<>();
         Date startTime = DateTimeHelper.getCurrentIdetMouthStart(timeRequest.getStartTime());
         Date endTime = DateTimeHelper.getCurrentIdeaMouthEnd(timeRequest.getEndTime());
-
-        List<PurchaseRecordVo> stuSourseList = dcttClient.getStuSourseList(startTime,endTime,appUserId);
+        GetStuSourseList getStuSourseList = new GetStuSourseList();
+        getStuSourseList.setStartTime(startTime);
+        getStuSourseList.setEndTime(endTime);
+        getStuSourseList.setAppUserId(appUserId);
+        List<PurchaseRecordVo> stuSourseList = dcttClient.getStuSourseList(getStuSourseList);
         purchaseRecordVoList.addAll(stuSourseList);
         List<PurchaseRecordVo> cancelCourseList = cancelcClient.getCancelCourseList(startTime,endTime,timeRequest.getStuId(),appUserId);
         purchaseRecordVoList.addAll(cancelCourseList);
-        List<PurchaseRecordVo> purchaseRecordVos = sessionNameClient.queryCourseDetails(startTime,endTime,timeRequest.getStuId(),appUserId);
+        GetStuSessionList getStuSessionList = new GetStuSessionList();
+        getStuSessionList.setStartTime(startTime);
+        getStuSessionList.setEndTime(endTime);
+        getStuSessionList.setStuId(timeRequest.getStuId());
+        getStuSessionList.setAppUserId(appUserId);
+        List<PurchaseRecordVo> purchaseRecordVos = sessionNameClient.queryCourseDetails(getStuSessionList);
         purchaseRecordVoList.addAll(purchaseRecordVos);
         List<TAppUser> tAppUsers = tauMapper.selectList(new QueryWrapper<TAppUser>()
                 .eq("referralUserId",appUserId )
@@ -185,7 +201,11 @@
     public CourseDetailsOfContinuationResp queryStuOfCourseDetails(Integer lessonId, Integer stuId, Integer appUserId) {
         CourseDetailsOfContinuationResp resp = new CourseDetailsOfContinuationResp();
 
-        StudentOfCourseVo studentCourse = couPayClient.getStudentCourse(lessonId,stuId,appUserId);
+        GetStudentCourse getStudentCourse = new GetStudentCourse();
+        getStudentCourse.setCourseId(lessonId);
+        getStudentCourse.setStuId(stuId);
+        getStudentCourse.setAppUserId(appUserId);
+        StudentOfCourseVo studentCourse = couPayClient.getStudentCourse(getStudentCourse);
 
         StoreDetailOfCourse courseOfStore = storeClient.getCourseOfStore(studentCourse.getStoreId());
 
@@ -220,8 +240,11 @@
     @Override
     public ExploreDatasVo queryIndexOfExplores(LonLatRequest llrequest) {
         ExploreDatasVo datasVo = new ExploreDatasVo();
-        List<StoreInfo> allNearbyStoreList = storeClient.getAllNearbyStoreList(llrequest.getLongitude(),llrequest.getLatitude());
-        List<StoreLonLatList> allStoreLonLats = storeClient.getAllStoreLonLats(llrequest.getLongitude(), llrequest.getLatitude());
+        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;

--
Gitblit v1.7.1