|
@@ -14,9 +14,11 @@ import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
|
import com.zhongzheng.modules.grade.vo.*;
|
|
|
import com.zhongzheng.modules.user.bo.SubjectStudyRecordQueryBo;
|
|
|
import com.zhongzheng.modules.user.bo.UserQueryBo;
|
|
|
+import com.zhongzheng.modules.user.service.IUserService;
|
|
|
import com.zhongzheng.modules.user.service.IUserStudyRecordService;
|
|
|
import com.zhongzheng.modules.user.vo.GoodsStudyRecordVo;
|
|
|
import com.zhongzheng.modules.user.vo.SubjectStudyRecordVo;
|
|
|
+import com.zhongzheng.modules.user.vo.UserVo;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -24,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -48,6 +51,30 @@ public class ClassStudentController extends BaseController {
|
|
|
|
|
|
private final IUserStudyRecordService iUserStudyRecordService;
|
|
|
|
|
|
+ private final IUserService iUserService;
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询學員用户列表
|
|
|
+ */
|
|
|
+ @ApiOperation("查询學員用户列表")
|
|
|
+ @PreAuthorize("@ss.hasPermi('app:user:list')")
|
|
|
+ @GetMapping("/listStudent")
|
|
|
+ public TableDataInfo<UserVo> listStudent(UserQueryBo bo) {
|
|
|
+ startPage();
|
|
|
+ List<UserVo> list = iUserService.selectList(bo);
|
|
|
+ for (UserVo userVo : list) {
|
|
|
+ ClassGradeUserQueryBo classGradeUserQueryBo = new ClassGradeUserQueryBo();
|
|
|
+ classGradeUserQueryBo.setUserId(userVo.getUserId());
|
|
|
+ List<Integer> status = new ArrayList<>();
|
|
|
+ status.add(1);
|
|
|
+ classGradeUserQueryBo.setStatus(status);
|
|
|
+ List<ClassGradeUserGoodsVo> classGradeUserGoodsVos = iClassGradeUserService.listUser(classGradeUserQueryBo);
|
|
|
+ userVo.setClassGradeUserGoodsVoList(classGradeUserGoodsVos);
|
|
|
+ }
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 查询学员商品学习记录
|
|
|
*/
|