|
@@ -1,23 +1,21 @@
|
|
|
package com.xjrsoft.module.student.controller;
|
|
package com.xjrsoft.module.student.controller;
|
|
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
-import cn.dev33.satoken.stp.StpUtil;
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import com.github.yulichang.toolkit.MPJWrappers;
|
|
|
|
|
import com.xjrsoft.common.model.result.RT;
|
|
import com.xjrsoft.common.model.result.RT;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
|
-import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
|
|
-import com.xjrsoft.module.base.entity.BaseClass;
|
|
|
|
|
import com.xjrsoft.module.base.mapper.BaseClassMapper;
|
|
import com.xjrsoft.module.base.mapper.BaseClassMapper;
|
|
|
import com.xjrsoft.module.student.dto.AddBaseStudentBehaviorManageDto;
|
|
import com.xjrsoft.module.student.dto.AddBaseStudentBehaviorManageDto;
|
|
|
|
|
+import com.xjrsoft.module.student.dto.BaseStudentBehaviorManageMobilePageDto;
|
|
|
import com.xjrsoft.module.student.dto.BaseStudentBehaviorManagePageDto;
|
|
import com.xjrsoft.module.student.dto.BaseStudentBehaviorManagePageDto;
|
|
|
import com.xjrsoft.module.student.dto.UpdateBaseStudentBehaviorManageDto;
|
|
import com.xjrsoft.module.student.dto.UpdateBaseStudentBehaviorManageDto;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudentBehaviorManage;
|
|
import com.xjrsoft.module.student.entity.BaseStudentBehaviorManage;
|
|
|
import com.xjrsoft.module.student.mapper.BaseStudentBehaviorClassRelationMapper;
|
|
import com.xjrsoft.module.student.mapper.BaseStudentBehaviorClassRelationMapper;
|
|
|
import com.xjrsoft.module.student.mapper.BaseStudentBehaviorStudentRelationMapper;
|
|
import com.xjrsoft.module.student.mapper.BaseStudentBehaviorStudentRelationMapper;
|
|
|
import com.xjrsoft.module.student.service.IBaseStudentBehaviorManageService;
|
|
import com.xjrsoft.module.student.service.IBaseStudentBehaviorManageService;
|
|
|
|
|
+import com.xjrsoft.module.student.vo.BaseStudentBehaviorManageMobilePageVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentBehaviorManagePageVo;
|
|
import com.xjrsoft.module.student.vo.BaseStudentBehaviorManagePageVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentBehaviorManageVo;
|
|
import com.xjrsoft.module.student.vo.BaseStudentBehaviorManageVo;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@@ -33,7 +31,6 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
|
-import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -65,18 +62,9 @@ public class BaseStudentBehaviorManageController {
|
|
|
@GetMapping(value = "/miblie-page")
|
|
@GetMapping(value = "/miblie-page")
|
|
|
@ApiOperation(value="学生操行分记录管理列表(移动端)")
|
|
@ApiOperation(value="学生操行分记录管理列表(移动端)")
|
|
|
@SaCheckPermission("basestudentbehaviormanage:detail")
|
|
@SaCheckPermission("basestudentbehaviormanage:detail")
|
|
|
- public RT<PageOutput<BaseStudentBehaviorManagePageVo>> mibliePage(@Valid BaseStudentBehaviorManagePageDto dto){
|
|
|
|
|
-
|
|
|
|
|
- List<BaseClass> classList = baseClassMapper.selectList(
|
|
|
|
|
- MPJWrappers.<BaseClass>lambdaJoin()
|
|
|
|
|
- .eq(BaseClass::getTeacherId, StpUtil.getLoginIdAsLong())
|
|
|
|
|
- .select(BaseClass.class, x -> VoToColumnUtil.fieldsToColumns(BaseClass.class).contains(x.getProperty()))
|
|
|
|
|
- );
|
|
|
|
|
- List<Long> classIds = new ArrayList<>();
|
|
|
|
|
- for (BaseClass baseClass : classList) {
|
|
|
|
|
- classIds.add(baseClass.getId());
|
|
|
|
|
- }
|
|
|
|
|
- return RT.ok(getData(dto));
|
|
|
|
|
|
|
+ public RT<PageOutput<BaseStudentBehaviorManageMobilePageVo>> mibliePage(@Valid BaseStudentBehaviorManageMobilePageDto dto){
|
|
|
|
|
+ Page<BaseStudentBehaviorManageMobilePageVo> page = baseStudentBehaviorManageService.getMobilePage(new Page<>(dto.getLimit(), dto.getSize()), dto);
|
|
|
|
|
+ return RT.ok(ConventPage.getPageOutput(page, BaseStudentBehaviorManageMobilePageVo.class));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
PageOutput<BaseStudentBehaviorManagePageVo> getData(BaseStudentBehaviorManagePageDto dto){
|
|
PageOutput<BaseStudentBehaviorManagePageVo> getData(BaseStudentBehaviorManagePageDto dto){
|