Ver Fonte

Merge branch 'feature/1128_tenant' into online

liujc há 11 meses atrás
pai
commit
b5f8da45a8

+ 10 - 0
cooleshow-app/src/main/java/com/yonge/cooleshow/tenant/controller/StudentController.java

@@ -17,6 +17,7 @@ import com.yonge.cooleshow.biz.dal.service.TeacherService;
 import com.yonge.cooleshow.biz.dal.service.TenantActivationCodeService;
 import com.yonge.cooleshow.biz.dal.service.TenantGroupService;
 import com.yonge.cooleshow.biz.dal.service.TenantInfoService;
+import com.yonge.cooleshow.biz.dal.vo.StudentHomeVo;
 import com.yonge.cooleshow.biz.dal.vo.StudentVo;
 import com.yonge.cooleshow.biz.dal.wrapper.OssFileWrapper;
 import com.yonge.cooleshow.biz.dal.wrapper.StudentWrapper;
@@ -263,4 +264,13 @@ public class StudentController extends BaseController {
         }
         return tenantInfo;
     }
+    @ApiOperation(value = "查询学员基本信息")
+    @GetMapping("/queryUserInfo")
+    public HttpResponseResult<StudentHomeVo> queryUserInfo(Long userId) throws Exception {
+        SysUser user = sysUserFeignService.queryUserById(userId);
+        if (user == null || null == user.getId()) {
+            return failed(500, "参数错误");
+        }
+        return succeed(studentService.queryUserInfo(user));
+    }
 }

+ 12 - 4
cooleshow-app/src/main/java/com/yonge/cooleshow/tenant/controller/SysMusicCompareRecordController.java

@@ -10,10 +10,8 @@ import com.yonge.toolset.base.page.PageInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
 
 @Api(tags = "学生端训练记录")
 @RequestMapping("${app-config.url.tenant:}/studentMusicCompareRecord")
@@ -73,5 +71,15 @@ public class SysMusicCompareRecordController extends BaseController {
         queryInfo.setUserId(sysUser.getId());
         return succeed(sysMusicCompareRecordService.studentTrainData(queryInfo));
     }
+    @ApiOperation("学员训练数据统计每周")
+    @GetMapping("studentTrainDataByWeek")
+    public HttpResponseResult studentTrainDataByWeek(SysMusicCompareRecordQueryInfo.TeacherCompareRecordQueryInfo queryInfo){
+
+        if (StringUtils.isEmpty(queryInfo.getStartTime())) {
+            return failed("时间不能为空");
+        }
+        queryInfo.setClientId("student");
+        return succeed(sysMusicCompareRecordService.studentTrainData(queryInfo));
+    }
 
 }