Browse Source

酷乐秀优化

zouxuan 1 day ago
parent
commit
03180db4de

+ 9 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherHomeController.java

@@ -7,6 +7,8 @@ import com.yonge.cooleshow.biz.dal.wrapper.TeacherIndexWrapper;
 import com.yonge.cooleshow.biz.dal.wrapper.teacher.TeacherHomeWrapper;
 import com.yonge.cooleshow.common.controller.BaseController;
 import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import com.yonge.toolset.base.page.PageInfo;
+import com.yonge.toolset.mybatis.support.PageUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
@@ -127,4 +129,11 @@ public class TeacherHomeController extends BaseController {
         return succeed(result);
     }
 
+    @ApiOperation(value = "老师首页预计收入列表")
+    @PostMapping("/teacherIncomeList")
+    public HttpResponseResult<PageInfo<TeacherIndexWrapper.TeacherIncome>> teacherIncomeList(@RequestBody TeacherIndexWrapper.CourseExposureSearch query) {
+        query.setTeacherId(sysUserService.getUserId());
+        return succeed(homeService.teacherIncomeList(PageUtil.getPage(query),query));
+    }
+
 }

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/HomeService.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.yonge.cooleshow.biz.dal.dto.SubjectHomeSearch;
 import com.yonge.cooleshow.biz.dal.dto.req.TotalReq;
 import com.yonge.cooleshow.biz.dal.vo.CourseHomeVo;
+import com.yonge.cooleshow.biz.dal.vo.StudentVo;
 import com.yonge.cooleshow.biz.dal.vo.SubjectHomeVo;
 import com.yonge.cooleshow.biz.dal.vo.res.HomeTotalStudent;
 import com.yonge.cooleshow.biz.dal.vo.res.HomeTotalTeacher;
@@ -90,4 +91,6 @@ public interface HomeService {
     List<TeacherIndexWrapper.CourseExposureTotal> courseExposureTotal(TeacherIndexWrapper.CourseExposureSearch query);
 
     List<TeacherIndexWrapper.CourseExposureTotal> courseBuyTotal(TeacherIndexWrapper.CourseExposureSearch query);
+
+    PageInfo<TeacherIndexWrapper.TeacherIncome> teacherIncomeList(IPage<TeacherIndexWrapper.TeacherIncome> page,TeacherIndexWrapper.CourseExposureSearch query);
 }

+ 5 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/HomeServiceImpl.java

@@ -554,4 +554,9 @@ public class HomeServiceImpl implements HomeService {
         return finalResult;
     }
 
+    @Override
+    public PageInfo<TeacherIndexWrapper.TeacherIncome> teacherIncomeList(IPage<TeacherIndexWrapper.TeacherIncome> page,TeacherIndexWrapper.CourseExposureSearch query) {
+        return null;
+    }
+
 }

+ 30 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/TeacherIndexWrapper.java

@@ -1,5 +1,6 @@
 package com.yonge.cooleshow.biz.dal.wrapper;
 
+import com.yonge.toolset.base.page.QueryInfo;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
@@ -141,10 +142,38 @@ public class TeacherIndexWrapper {
     }
 
     @Data
+    public static class TeacherIncome{
+
+        @ApiModelProperty("下单时间")
+        private Date orderTime;
+
+        @ApiModelProperty("学员姓名")
+        private String userName;
+
+        @ApiModelProperty("学员头像")
+        private String userAvatar;
+
+        @ApiModelProperty("学员编号")
+        private Long userId;
+
+        @ApiModelProperty("声部")
+        private String subjectName;
+
+        @ApiModelProperty("数量")
+        private Integer bizQuantity;
+
+        @ApiModelProperty("业务名称")
+        private String bizName;
+
+        @ApiModelProperty("金额")
+        private BigDecimal amount;
+    }
+
+    @Data
     @Builder
     @NoArgsConstructor
     @AllArgsConstructor
-    public static class CourseExposureSearch{
+    public static class CourseExposureSearch extends QueryInfo {
 
         @ApiModelProperty("开始时间")
         private String startTime;