From f1edf4a05127859c8e952d7b70cc37d83dfd267f Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 06 七月 2023 10:11:10 +0800
Subject: [PATCH] 合并代码

---
 cloud-server-account/src/main/java/com/dsh/account/service/impl/TStudentServiceImpl.java |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 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 17ea0eb..8e4636e 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
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dsh.account.entity.Coach;
 import com.dsh.account.entity.TAppUser;
 import com.dsh.account.entity.TStudent;
 import com.dsh.account.feignclient.activity.IntroduceRewardsClient;
@@ -18,8 +19,10 @@
 import com.dsh.account.feignclient.other.QuestionClient;
 import com.dsh.account.feignclient.other.StoreClient;
 import com.dsh.account.feignclient.other.model.*;
+import com.dsh.account.mapper.CoachMapper;
 import com.dsh.account.mapper.TAppUserMapper;
 import com.dsh.account.mapper.TStudentMapper;
+import com.dsh.account.model.vo.classDetails.ClasspaymentRequest;
 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;
@@ -33,6 +36,7 @@
 import com.dsh.account.service.TStudentService;
 import com.dsh.account.util.DateTimeHelper;
 import com.dsh.account.util.DateUtil;
+import com.dsh.account.util.ResultUtil;
 import com.dsh.account.util.ToolUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -87,6 +91,9 @@
 
     @Resource
     private TAppUserMapper tauMapper;
+
+    @Resource
+    private CoachMapper coachMapper;
 
     @Override
     public void addStuOfAppUser(StuDetailsReq stu,Integer appUserId) {
@@ -206,9 +213,27 @@
         getStudentCourse.setStuId(stuId);
         getStudentCourse.setAppUserId(appUserId);
         StudentOfCourseVo studentCourse = couPayClient.getStudentCourse(getStudentCourse);
+        resp.setCoursePackageId(studentCourse.getCoursePackageId());
+        resp.setStuId(stuId);
+        resp.setPackageImg(studentCourse.getPackageImg());
+        resp.setCourseName(studentCourse.getCourseName());
+        Coach coach = coachMapper.selectById(studentCourse.getCoachId());
+        resp.setTeacherName(coach.getName());
+        resp.setCourseWeek(studentCourse.getCourseWeek());
+        resp.setCourseTime(studentCourse.getCourseTime());
 
         StoreDetailOfCourse courseOfStore = storeClient.getCourseOfStore(studentCourse.getStoreId());
+        resp.setStoreName(courseOfStore.getStoreName());
+        resp.setStoreAddr(courseOfStore.getStoreAddr());
 
+        resp.setTypeList(studentCourse.getTypeList());
+        TStudent tStudent = this.baseMapper.selectById(stuId);
+        resp.setStuName(tStudent.getName());
+        resp.setStuPhone(tStudent.getPhone());
+        resp.setStuAge(DateUtil.age(tStudent.getBirthday()));
+        resp.setAmount(studentCourse.getAmount());
+        resp.setVipAmount(studentCourse.getVipAmount());
+        resp.setWpGold(studentCourse.getWpGold());
         return resp;
     }
 
@@ -301,4 +326,37 @@
         return purchaseRecords;
     }
 
+    @Override
+    public ResultUtil renewClassPayment(Integer userIdFormRedis, ClasspaymentRequest request) {
+        // TODO: 2023/7/5
+        switch (request.getPayType()){
+            case 1:
+                WeChatPayment();
+                break;
+            case 2:
+                AlipayPayment();
+                break;
+            case 3:
+                PlaypaiGoldPayment();
+                break;
+            default:
+                break;
+        }
+        return ResultUtil.success();
+    }
+
+
+    public void WeChatPayment(){
+
+    }
+
+    public void AlipayPayment(){
+
+    }
+
+    public void PlaypaiGoldPayment(){
+
+    }
+
+
 }

--
Gitblit v1.7.1