mirror of
https://gitee.com/orangeform/orange-admin.git
synced 2026-01-17 18:46:36 +08:00
commit:VO支持以及bug修复
This commit is contained in:
@@ -5,9 +5,8 @@ import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.util.MyModelUtil;
|
||||
import com.orange.demo.common.core.object.MyQueryParam;
|
||||
import com.orange.demo.common.core.object.ResponseResult;
|
||||
import com.orange.demo.courseclassinterface.dto.AreaCodeDto;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.courseclassinterface.vo.AreaCodeVo;
|
||||
import com.orange.demo.courseclassservice.model.AreaCode;
|
||||
import com.orange.demo.courseclassservice.service.AreaCodeService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -25,13 +24,13 @@ import java.util.*;
|
||||
@Api(tags = "行政区划数据访问接口")
|
||||
@RestController
|
||||
@RequestMapping("/areaCode")
|
||||
public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Long> {
|
||||
public class AreaCodeController extends BaseController<AreaCode, AreaCodeVo, Long> {
|
||||
|
||||
@Autowired
|
||||
private AreaCodeService areaCodeService;
|
||||
|
||||
@Override
|
||||
protected BaseService<AreaCode, AreaCodeDto, Long> service() {
|
||||
protected BaseService<AreaCode, Long> service() {
|
||||
return areaCodeService;
|
||||
}
|
||||
|
||||
@@ -70,9 +69,9 @@ public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Lo
|
||||
* @return 应答结果的Data对象中,将包含行政区划对象。
|
||||
*/
|
||||
@GetMapping("/view")
|
||||
public ResponseResult<AreaCodeDto> view(@RequestParam Long areaId) {
|
||||
public ResponseResult<AreaCodeVo> view(@RequestParam Long areaId) {
|
||||
AreaCode areaCode = areaCodeService.getById(areaId);
|
||||
return ResponseResult.success(MyModelUtil.copyTo(areaCode, AreaCodeDto.class));
|
||||
return ResponseResult.success(MyModelUtil.copyTo(areaCode, AreaCodeVo.class));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,7 +82,7 @@ public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Lo
|
||||
* @return 符合主键(in list)的数据集合。
|
||||
*/
|
||||
@PostMapping("/listByIds")
|
||||
public ResponseResult<List<AreaCodeDto>> listByIds(
|
||||
public ResponseResult<List<AreaCodeVo>> listByIds(
|
||||
@RequestParam Set<Long> areaCodeIds, @RequestParam Boolean withDict) {
|
||||
return super.baseListByIds(areaCodeIds, withDict, null);
|
||||
}
|
||||
@@ -96,7 +95,7 @@ public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Lo
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@GetMapping("/getById")
|
||||
public ResponseResult<AreaCodeDto> getById(@RequestParam Long areaId, @RequestParam Boolean withDict) {
|
||||
public ResponseResult<AreaCodeVo> getById(@RequestParam Long areaId, @RequestParam Boolean withDict) {
|
||||
return super.baseGetById(areaId, withDict, null);
|
||||
}
|
||||
|
||||
@@ -129,7 +128,7 @@ public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Lo
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@PostMapping("/listBy")
|
||||
public ResponseResult<List<AreaCodeDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<MyPageData<AreaCodeVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListBy(queryParam, null);
|
||||
}
|
||||
|
||||
@@ -140,7 +139,7 @@ public class AreaCodeController extends BaseController<AreaCode, AreaCodeDto, Lo
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@PostMapping("/getBy")
|
||||
public ResponseResult<AreaCodeDto> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<AreaCodeVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseGetBy(queryParam, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@ import com.orange.demo.common.core.upload.BaseUpDownloader;
|
||||
import com.orange.demo.common.core.upload.UpDownloaderFactory;
|
||||
import com.orange.demo.common.core.upload.UploadResponseInfo;
|
||||
import com.orange.demo.common.core.upload.UploadStoreInfo;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.courseclassinterface.vo.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
@@ -42,7 +42,7 @@ import java.util.*;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/course")
|
||||
public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
public class CourseController extends BaseController<Course, CourseVo, Long> {
|
||||
|
||||
@Autowired
|
||||
private CourseService courseService;
|
||||
@@ -54,7 +54,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
private UpDownloaderFactory upDownloaderFactory;
|
||||
|
||||
@Override
|
||||
protected BaseService<Course, CourseDto, Long> service() {
|
||||
protected BaseService<Course, Long> service() {
|
||||
return courseService;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||
}
|
||||
Course course = Course.INSTANCE.toModel(courseDto);
|
||||
Course course = MyModelUtil.copyTo(courseDto, Course.class);
|
||||
// 验证关联Id的数据合法性
|
||||
CallResult callResult = courseService.verifyRelatedData(course, null);
|
||||
if (!callResult.isSuccess()) {
|
||||
@@ -108,7 +108,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||
}
|
||||
Course course = Course.INSTANCE.toModel(courseDto);
|
||||
Course course = MyModelUtil.copyTo(courseDto, Course.class);
|
||||
Course originalCourse = courseService.getById(course.getCourseId());
|
||||
if (originalCourse == null) {
|
||||
// NOTE: 修改下面方括号中的话述
|
||||
@@ -162,25 +162,18 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
* @return 应答结果对象,包含查询结果集。
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public ResponseResult<MyPageData<CourseDto>> list(
|
||||
public ResponseResult<MyPageData<CourseVo>> list(
|
||||
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@MyRequestBody MyPageParam pageParam) {
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
Course courseFilter = Course.INSTANCE.toModel(courseDtoFilter);
|
||||
Course courseFilter = MyModelUtil.copyTo(courseDtoFilter, Course.class);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
|
||||
List<Course> courseList =
|
||||
courseService.getCourseListWithRelation(courseFilter, orderBy);
|
||||
long totalCount = 0L;
|
||||
if (courseList instanceof Page) {
|
||||
totalCount = ((Page<Course>) courseList).getTotal();
|
||||
}
|
||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
||||
Tuple2<List<CourseDto>, Long> responseData =
|
||||
new Tuple2<>(Course.INSTANCE.fromModelList(courseList), totalCount);
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(courseList, Course.INSTANCE));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -190,7 +183,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
* @return 应答结果对象,包含对象详情。
|
||||
*/
|
||||
@GetMapping("/view")
|
||||
public ResponseResult<CourseDto> view(@RequestParam Long courseId) {
|
||||
public ResponseResult<CourseVo> view(@RequestParam Long courseId) {
|
||||
if (MyCommonUtil.existBlankArgument(courseId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
@@ -199,8 +192,8 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
if (course == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
CourseDto courseDto = Course.INSTANCE.fromModel(course);
|
||||
return ResponseResult.success(courseDto);
|
||||
CourseVo courseVo = Course.INSTANCE.fromModel(course);
|
||||
return ResponseResult.success(courseVo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -319,7 +312,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listByIds")
|
||||
@PostMapping("/listByIds")
|
||||
public ResponseResult<List<CourseDto>> listByIds(
|
||||
public ResponseResult<List<CourseVo>> listByIds(
|
||||
@RequestParam Set<Long> courseIds, @RequestParam Boolean withDict) {
|
||||
return super.baseListByIds(courseIds, withDict, Course.INSTANCE);
|
||||
}
|
||||
@@ -333,7 +326,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getById")
|
||||
@PostMapping("/getById")
|
||||
public ResponseResult<CourseDto> getById(
|
||||
public ResponseResult<CourseVo> getById(
|
||||
@RequestParam Long courseId, @RequestParam Boolean withDict) {
|
||||
return super.baseGetById(courseId, withDict, Course.INSTANCE);
|
||||
}
|
||||
@@ -371,30 +364,30 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
@ApiOperation(hidden = true, value = "deleteBy")
|
||||
@PostMapping("/deleteBy")
|
||||
public ResponseResult<Integer> deleteBy(@RequestBody CourseDto filter) throws Exception {
|
||||
return super.baseDeleteBy(filter, Course.INSTANCE);
|
||||
return super.baseDeleteBy(MyModelUtil.copyTo(filter, Course.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listBy")
|
||||
@PostMapping("/listBy")
|
||||
public ResponseResult<List<CourseDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<MyPageData<CourseVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListBy(queryParam, Course.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listMapBy")
|
||||
@PostMapping("/listMapBy")
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListMapBy(queryParam, Course.INSTANCE);
|
||||
}
|
||||
|
||||
@@ -406,7 +399,7 @@ public class CourseController extends BaseController<Course, CourseDto, Long> {
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getBy")
|
||||
@PostMapping("/getBy")
|
||||
public ResponseResult<CourseDto> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<CourseVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseGetBy(queryParam, Course.INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseDictService;
|
||||
import com.orange.demo.common.core.constant.ErrorCodeEnum;
|
||||
import com.orange.demo.common.core.object.MyQueryParam;
|
||||
import com.orange.demo.common.core.object.ResponseResult;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.MyModelUtil;
|
||||
import com.orange.demo.common.core.util.MyCommonUtil;
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
||||
import com.orange.demo.courseclassinterface.vo.GradeVo;
|
||||
import com.orange.demo.courseclassservice.model.Grade;
|
||||
import com.orange.demo.courseclassservice.service.GradeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -33,13 +33,13 @@ import java.util.*;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/grade")
|
||||
public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
||||
public class GradeController extends BaseController<Grade, GradeVo, Integer> {
|
||||
|
||||
@Autowired
|
||||
private GradeService gradeService;
|
||||
|
||||
@Override
|
||||
protected BaseDictService<Grade, GradeDto, Integer> service() {
|
||||
protected BaseDictService<Grade, Integer> service() {
|
||||
return gradeService;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
||||
* @return 应答结果对象,包含对象详情。
|
||||
*/
|
||||
@GetMapping("/view")
|
||||
public ResponseResult<GradeDto> view(@RequestParam Integer gradeId) {
|
||||
public ResponseResult<GradeVo> view(@RequestParam Integer gradeId) {
|
||||
if (MyCommonUtil.existBlankArgument(gradeId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
@@ -116,8 +116,8 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
||||
if (grade == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
GradeDto gradeDto = MyModelUtil.copyTo(grade, GradeDto.class);
|
||||
return ResponseResult.success(gradeDto);
|
||||
GradeVo gradeVo = MyModelUtil.copyTo(grade, GradeVo.class);
|
||||
return ResponseResult.success(gradeVo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,7 +142,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listByIds")
|
||||
@PostMapping("/listByIds")
|
||||
public ResponseResult<List<GradeDto>> listByIds(
|
||||
public ResponseResult<List<GradeVo>> listByIds(
|
||||
@RequestParam Set<Integer> gradeIds, @RequestParam Boolean withDict) {
|
||||
return super.baseListByIds(gradeIds, withDict, null);
|
||||
}
|
||||
@@ -156,7 +156,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getById")
|
||||
@PostMapping("/getById")
|
||||
public ResponseResult<GradeDto> getById(
|
||||
public ResponseResult<GradeVo> getById(
|
||||
@RequestParam Integer gradeId, @RequestParam Boolean withDict) {
|
||||
return super.baseGetById(gradeId, withDict, null);
|
||||
}
|
||||
@@ -194,7 +194,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
||||
@ApiOperation(hidden = true, value = "deleteBy")
|
||||
@PostMapping("/deleteBy")
|
||||
public ResponseResult<Integer> deleteBy(@RequestBody GradeDto filter) throws Exception {
|
||||
return super.baseDeleteBy(filter, null);
|
||||
return super.baseDeleteBy(MyModelUtil.copyTo(filter, Grade.class));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -205,7 +205,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listBy")
|
||||
@PostMapping("/listBy")
|
||||
public ResponseResult<List<GradeDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<MyPageData<GradeVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListBy(queryParam, null);
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ public class GradeController extends BaseController<Grade, GradeDto, Integer> {
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getBy")
|
||||
@PostMapping("/getBy")
|
||||
public ResponseResult<GradeDto> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<GradeVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseGetBy(queryParam, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.orange.demo.courseclassservice.controller;
|
||||
|
||||
import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.courseclassinterface.vo.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
@@ -33,13 +33,13 @@ import java.util.*;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/schoolInfo")
|
||||
public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoDto, Long> {
|
||||
public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoVo, Long> {
|
||||
|
||||
@Autowired
|
||||
private SchoolInfoService schoolInfoService;
|
||||
|
||||
@Override
|
||||
protected BaseService<SchoolInfo, SchoolInfoDto, Long> service() {
|
||||
protected BaseService<SchoolInfo, Long> service() {
|
||||
return schoolInfoService;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||
}
|
||||
SchoolInfo schoolInfo = SchoolInfo.INSTANCE.toModel(schoolInfoDto);
|
||||
SchoolInfo schoolInfo = MyModelUtil.copyTo(schoolInfoDto, SchoolInfo.class);
|
||||
// 验证关联Id的数据合法性
|
||||
CallResult callResult = schoolInfoService.verifyRelatedData(schoolInfo, null);
|
||||
if (!callResult.isSuccess()) {
|
||||
@@ -79,7 +79,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||
}
|
||||
SchoolInfo schoolInfo = SchoolInfo.INSTANCE.toModel(schoolInfoDto);
|
||||
SchoolInfo schoolInfo = MyModelUtil.copyTo(schoolInfoDto, SchoolInfo.class);
|
||||
SchoolInfo originalSchoolInfo = schoolInfoService.getById(schoolInfo.getSchoolId());
|
||||
if (originalSchoolInfo == null) {
|
||||
// NOTE: 修改下面方括号中的话述
|
||||
@@ -133,25 +133,18 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
||||
* @return 应答结果对象,包含查询结果集。
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public ResponseResult<MyPageData<SchoolInfoDto>> list(
|
||||
public ResponseResult<MyPageData<SchoolInfoVo>> list(
|
||||
@MyRequestBody("schoolInfoFilter") SchoolInfoDto schoolInfoDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@MyRequestBody MyPageParam pageParam) {
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
SchoolInfo schoolInfoFilter = SchoolInfo.INSTANCE.toModel(schoolInfoDtoFilter);
|
||||
SchoolInfo schoolInfoFilter = MyModelUtil.copyTo(schoolInfoDtoFilter, SchoolInfo.class);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, SchoolInfo.class);
|
||||
List<SchoolInfo> schoolInfoList =
|
||||
schoolInfoService.getSchoolInfoListWithRelation(schoolInfoFilter, orderBy);
|
||||
long totalCount = 0L;
|
||||
if (schoolInfoList instanceof Page) {
|
||||
totalCount = ((Page<SchoolInfo>) schoolInfoList).getTotal();
|
||||
}
|
||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
||||
Tuple2<List<SchoolInfoDto>, Long> responseData =
|
||||
new Tuple2<>(SchoolInfo.INSTANCE.fromModelList(schoolInfoList), totalCount);
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(schoolInfoList, SchoolInfo.INSTANCE));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -161,7 +154,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
||||
* @return 应答结果对象,包含对象详情。
|
||||
*/
|
||||
@GetMapping("/view")
|
||||
public ResponseResult<SchoolInfoDto> view(@RequestParam Long schoolId) {
|
||||
public ResponseResult<SchoolInfoVo> view(@RequestParam Long schoolId) {
|
||||
if (MyCommonUtil.existBlankArgument(schoolId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
@@ -170,8 +163,8 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
||||
if (schoolInfo == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
SchoolInfoDto schoolInfoDto = SchoolInfo.INSTANCE.fromModel(schoolInfo);
|
||||
return ResponseResult.success(schoolInfoDto);
|
||||
SchoolInfoVo schoolInfoVo = SchoolInfo.INSTANCE.fromModel(schoolInfo);
|
||||
return ResponseResult.success(schoolInfoVo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -197,7 +190,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listByIds")
|
||||
@PostMapping("/listByIds")
|
||||
public ResponseResult<List<SchoolInfoDto>> listByIds(
|
||||
public ResponseResult<List<SchoolInfoVo>> listByIds(
|
||||
@RequestParam Set<Long> schoolIds, @RequestParam Boolean withDict) {
|
||||
return super.baseListByIds(schoolIds, withDict, SchoolInfo.INSTANCE);
|
||||
}
|
||||
@@ -211,7 +204,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getById")
|
||||
@PostMapping("/getById")
|
||||
public ResponseResult<SchoolInfoDto> getById(
|
||||
public ResponseResult<SchoolInfoVo> getById(
|
||||
@RequestParam Long schoolId, @RequestParam Boolean withDict) {
|
||||
return super.baseGetById(schoolId, withDict, SchoolInfo.INSTANCE);
|
||||
}
|
||||
@@ -249,30 +242,30 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
||||
@ApiOperation(hidden = true, value = "deleteBy")
|
||||
@PostMapping("/deleteBy")
|
||||
public ResponseResult<Integer> deleteBy(@RequestBody SchoolInfoDto filter) throws Exception {
|
||||
return super.baseDeleteBy(filter, SchoolInfo.INSTANCE);
|
||||
return super.baseDeleteBy(MyModelUtil.copyTo(filter, SchoolInfo.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listBy")
|
||||
@PostMapping("/listBy")
|
||||
public ResponseResult<List<SchoolInfoDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<MyPageData<SchoolInfoVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListBy(queryParam, SchoolInfo.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listMapBy")
|
||||
@PostMapping("/listMapBy")
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListMapBy(queryParam, SchoolInfo.INSTANCE);
|
||||
}
|
||||
|
||||
@@ -284,7 +277,7 @@ public class SchoolInfoController extends BaseController<SchoolInfo, SchoolInfoD
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getBy")
|
||||
@PostMapping("/getBy")
|
||||
public ResponseResult<SchoolInfoDto> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<SchoolInfoVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseGetBy(queryParam, SchoolInfo.INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.orange.demo.courseclassservice.controller;
|
||||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.courseclassinterface.vo.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
@@ -33,7 +33,7 @@ import java.util.stream.Collectors;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/studentClass")
|
||||
public class StudentClassController extends BaseController<StudentClass, StudentClassDto, Long> {
|
||||
public class StudentClassController extends BaseController<StudentClass, StudentClassVo, Long> {
|
||||
|
||||
@Autowired
|
||||
private StudentClassService studentClassService;
|
||||
@@ -43,7 +43,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
private StudentService studentService;
|
||||
|
||||
@Override
|
||||
protected BaseService<StudentClass, StudentClassDto, Long> service() {
|
||||
protected BaseService<StudentClass, Long> service() {
|
||||
return studentClassService;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||
}
|
||||
StudentClass studentClass = StudentClass.INSTANCE.toModel(studentClassDto);
|
||||
StudentClass studentClass = MyModelUtil.copyTo(studentClassDto, StudentClass.class);
|
||||
// 验证关联Id的数据合法性
|
||||
CallResult callResult = studentClassService.verifyRelatedData(studentClass, null);
|
||||
if (!callResult.isSuccess()) {
|
||||
@@ -83,7 +83,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||
}
|
||||
StudentClass studentClass = StudentClass.INSTANCE.toModel(studentClassDto);
|
||||
StudentClass studentClass = MyModelUtil.copyTo(studentClassDto, StudentClass.class);
|
||||
StudentClass originalStudentClass = studentClassService.getById(studentClass.getClassId());
|
||||
if (originalStudentClass == null) {
|
||||
// NOTE: 修改下面方括号中的话述
|
||||
@@ -137,25 +137,18 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
* @return 应答结果对象,包含查询结果集。
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public ResponseResult<MyPageData<StudentClassDto>> list(
|
||||
public ResponseResult<MyPageData<StudentClassVo>> list(
|
||||
@MyRequestBody("studentClassFilter") StudentClassDto studentClassDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@MyRequestBody MyPageParam pageParam) {
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
StudentClass studentClassFilter = StudentClass.INSTANCE.toModel(studentClassDtoFilter);
|
||||
StudentClass studentClassFilter = MyModelUtil.copyTo(studentClassDtoFilter, StudentClass.class);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, StudentClass.class);
|
||||
List<StudentClass> studentClassList =
|
||||
studentClassService.getStudentClassListWithRelation(studentClassFilter, orderBy);
|
||||
long totalCount = 0L;
|
||||
if (studentClassList instanceof Page) {
|
||||
totalCount = ((Page<StudentClass>) studentClassList).getTotal();
|
||||
}
|
||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
||||
Tuple2<List<StudentClassDto>, Long> responseData =
|
||||
new Tuple2<>(StudentClass.INSTANCE.fromModelList(studentClassList), totalCount);
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(studentClassList, StudentClass.INSTANCE));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -165,7 +158,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
* @return 应答结果对象,包含对象详情。
|
||||
*/
|
||||
@GetMapping("/view")
|
||||
public ResponseResult<StudentClassDto> view(@RequestParam Long classId) {
|
||||
public ResponseResult<StudentClassVo> view(@RequestParam Long classId) {
|
||||
if (MyCommonUtil.existBlankArgument(classId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
@@ -174,8 +167,8 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
if (studentClass == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
StudentClassDto studentClassDto = StudentClass.INSTANCE.fromModel(studentClass);
|
||||
return ResponseResult.success(studentClassDto);
|
||||
StudentClassVo studentClassVo = StudentClass.INSTANCE.fromModel(studentClass);
|
||||
return ResponseResult.success(studentClassVo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -189,7 +182,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
* @return 应答结果对象,返回符合条件的数据列表。
|
||||
*/
|
||||
@PostMapping("/listNotInClassCourse")
|
||||
public ResponseResult<MyPageData<CourseDto>> listNotInClassCourse(
|
||||
public ResponseResult<MyPageData<CourseVo>> listNotInClassCourse(
|
||||
@MyRequestBody Long classId,
|
||||
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@@ -203,7 +196,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
Course filter = Course.INSTANCE.toModel(courseDtoFilter);
|
||||
Course filter = MyModelUtil.copyTo(courseDtoFilter, Course.class);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
|
||||
List<Course> courseList =
|
||||
courseService.getNotInCourseListByClassId(classId, filter, orderBy);
|
||||
@@ -220,7 +213,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
* @return 应答结果对象,返回符合条件的数据列表。
|
||||
*/
|
||||
@PostMapping("/listClassCourse")
|
||||
public ResponseResult<MyPageData<CourseDto>> listClassCourse(
|
||||
public ResponseResult<MyPageData<CourseVo>> listClassCourse(
|
||||
@MyRequestBody Long classId,
|
||||
@MyRequestBody("courseFilter") CourseDto courseDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@@ -234,7 +227,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
Course filter = Course.INSTANCE.toModel(courseDtoFilter);
|
||||
Course filter = MyModelUtil.copyTo(courseDtoFilter, Course.class);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Course.class);
|
||||
List<Course> courseList =
|
||||
courseService.getCourseListByClassId(classId, filter, orderBy);
|
||||
@@ -301,7 +294,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
* @return 应答结果对象,包括中间表详情。
|
||||
*/
|
||||
@GetMapping("/viewClassCourse")
|
||||
public ResponseResult<ClassCourseDto> viewClassCourse(
|
||||
public ResponseResult<ClassCourseVo> viewClassCourse(
|
||||
@RequestParam Long classId, @RequestParam Long courseId) {
|
||||
if (MyCommonUtil.existBlankArgument(classId, courseId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
@@ -310,8 +303,8 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
if (classCourse == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
ClassCourseDto classCourseDto = MyModelUtil.copyTo(classCourse, ClassCourseDto.class);
|
||||
return ResponseResult.success(classCourseDto);
|
||||
ClassCourseVo classCourseVo = MyModelUtil.copyTo(classCourse, ClassCourseVo.class);
|
||||
return ResponseResult.success(classCourseVo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -344,7 +337,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
* @return 应答结果对象,返回符合条件的数据列表。
|
||||
*/
|
||||
@PostMapping("/listNotInClassStudent")
|
||||
public ResponseResult<MyPageData<StudentDto>> listNotInClassStudent(
|
||||
public ResponseResult<MyPageData<StudentVo>> listNotInClassStudent(
|
||||
@MyRequestBody Long classId,
|
||||
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@@ -358,7 +351,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
Student filter = Student.INSTANCE.toModel(studentDtoFilter);
|
||||
Student filter = MyModelUtil.copyTo(studentDtoFilter, Student.class);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
|
||||
List<Student> studentList =
|
||||
studentService.getNotInStudentListByClassId(classId, filter, orderBy);
|
||||
@@ -375,7 +368,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
* @return 应答结果对象,返回符合条件的数据列表。
|
||||
*/
|
||||
@PostMapping("/listClassStudent")
|
||||
public ResponseResult<MyPageData<StudentDto>> listClassStudent(
|
||||
public ResponseResult<MyPageData<StudentVo>> listClassStudent(
|
||||
@MyRequestBody Long classId,
|
||||
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@@ -389,7 +382,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
Student filter = Student.INSTANCE.toModel(studentDtoFilter);
|
||||
Student filter = MyModelUtil.copyTo(studentDtoFilter, Student.class);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
|
||||
List<Student> studentList =
|
||||
studentService.getStudentListByClassId(classId, filter, orderBy);
|
||||
@@ -456,7 +449,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listByIds")
|
||||
@PostMapping("/listByIds")
|
||||
public ResponseResult<List<StudentClassDto>> listByIds(
|
||||
public ResponseResult<List<StudentClassVo>> listByIds(
|
||||
@RequestParam Set<Long> classIds, @RequestParam Boolean withDict) {
|
||||
return super.baseListByIds(classIds, withDict, StudentClass.INSTANCE);
|
||||
}
|
||||
@@ -470,7 +463,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getById")
|
||||
@PostMapping("/getById")
|
||||
public ResponseResult<StudentClassDto> getById(
|
||||
public ResponseResult<StudentClassVo> getById(
|
||||
@RequestParam Long classId, @RequestParam Boolean withDict) {
|
||||
return super.baseGetById(classId, withDict, StudentClass.INSTANCE);
|
||||
}
|
||||
@@ -508,30 +501,30 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
@ApiOperation(hidden = true, value = "deleteBy")
|
||||
@PostMapping("/deleteBy")
|
||||
public ResponseResult<Integer> deleteBy(@RequestBody StudentClassDto filter) throws Exception {
|
||||
return super.baseDeleteBy(filter, StudentClass.INSTANCE);
|
||||
return super.baseDeleteBy(MyModelUtil.copyTo(filter, StudentClass.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listBy")
|
||||
@PostMapping("/listBy")
|
||||
public ResponseResult<List<StudentClassDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<MyPageData<StudentClassVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListBy(queryParam, StudentClass.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listMapBy")
|
||||
@PostMapping("/listMapBy")
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListMapBy(queryParam, StudentClass.INSTANCE);
|
||||
}
|
||||
|
||||
@@ -543,7 +536,7 @@ public class StudentClassController extends BaseController<StudentClass, Student
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getBy")
|
||||
@PostMapping("/getBy")
|
||||
public ResponseResult<StudentClassDto> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<StudentClassVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseGetBy(queryParam, StudentClass.INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.orange.demo.courseclassservice.controller;
|
||||
|
||||
import cn.jimmyshi.beanquery.BeanQuery;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.page.PageMethod;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassservice.service.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.courseclassinterface.vo.*;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.constant.*;
|
||||
@@ -33,13 +33,13 @@ import java.util.*;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/student")
|
||||
public class StudentController extends BaseController<Student, StudentDto, Long> {
|
||||
public class StudentController extends BaseController<Student, StudentVo, Long> {
|
||||
|
||||
@Autowired
|
||||
private StudentService studentService;
|
||||
|
||||
@Override
|
||||
protected BaseService<Student, StudentDto, Long> service() {
|
||||
protected BaseService<Student, Long> service() {
|
||||
return studentService;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||
}
|
||||
Student student = Student.INSTANCE.toModel(studentDto);
|
||||
Student student = MyModelUtil.copyTo(studentDto, Student.class);
|
||||
// 验证关联Id的数据合法性
|
||||
CallResult callResult = studentService.verifyRelatedData(student, null);
|
||||
if (!callResult.isSuccess()) {
|
||||
@@ -91,7 +91,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
||||
if (errorMessage != null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
|
||||
}
|
||||
Student student = Student.INSTANCE.toModel(studentDto);
|
||||
Student student = MyModelUtil.copyTo(studentDto, Student.class);
|
||||
Student originalStudent = studentService.getById(student.getStudentId());
|
||||
if (originalStudent == null) {
|
||||
// NOTE: 修改下面方括号中的话述
|
||||
@@ -145,25 +145,18 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
||||
* @return 应答结果对象,包含查询结果集。
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
public ResponseResult<MyPageData<StudentDto>> list(
|
||||
public ResponseResult<MyPageData<StudentVo>> list(
|
||||
@MyRequestBody("studentFilter") StudentDto studentDtoFilter,
|
||||
@MyRequestBody MyOrderParam orderParam,
|
||||
@MyRequestBody MyPageParam pageParam) {
|
||||
if (pageParam != null) {
|
||||
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
|
||||
}
|
||||
Student studentFilter = Student.INSTANCE.toModel(studentDtoFilter);
|
||||
Student studentFilter = MyModelUtil.copyTo(studentDtoFilter, Student.class);
|
||||
String orderBy = MyOrderParam.buildOrderBy(orderParam, Student.class);
|
||||
List<Student> studentList =
|
||||
studentService.getStudentListWithRelation(studentFilter, orderBy);
|
||||
long totalCount = 0L;
|
||||
if (studentList instanceof Page) {
|
||||
totalCount = ((Page<Student>) studentList).getTotal();
|
||||
}
|
||||
// 分页连同对象数据转换copy工作,下面的方法一并完成。
|
||||
Tuple2<List<StudentDto>, Long> responseData =
|
||||
new Tuple2<>(Student.INSTANCE.fromModelList(studentList), totalCount);
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
|
||||
return ResponseResult.success(MyPageUtil.makeResponseData(studentList, Student.INSTANCE));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -173,7 +166,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
||||
* @return 应答结果对象,包含对象详情。
|
||||
*/
|
||||
@GetMapping("/view")
|
||||
public ResponseResult<StudentDto> view(@RequestParam Long studentId) {
|
||||
public ResponseResult<StudentVo> view(@RequestParam Long studentId) {
|
||||
if (MyCommonUtil.existBlankArgument(studentId)) {
|
||||
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
|
||||
}
|
||||
@@ -182,8 +175,8 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
||||
if (student == null) {
|
||||
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
|
||||
}
|
||||
StudentDto studentDto = Student.INSTANCE.fromModel(student);
|
||||
return ResponseResult.success(studentDto);
|
||||
StudentVo studentVo = Student.INSTANCE.fromModel(student);
|
||||
return ResponseResult.success(studentVo);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,7 +202,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listByIds")
|
||||
@PostMapping("/listByIds")
|
||||
public ResponseResult<List<StudentDto>> listByIds(
|
||||
public ResponseResult<List<StudentVo>> listByIds(
|
||||
@RequestParam Set<Long> studentIds, @RequestParam Boolean withDict) {
|
||||
return super.baseListByIds(studentIds, withDict, Student.INSTANCE);
|
||||
}
|
||||
@@ -223,7 +216,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getById")
|
||||
@PostMapping("/getById")
|
||||
public ResponseResult<StudentDto> getById(
|
||||
public ResponseResult<StudentVo> getById(
|
||||
@RequestParam Long studentId, @RequestParam Boolean withDict) {
|
||||
return super.baseGetById(studentId, withDict, Student.INSTANCE);
|
||||
}
|
||||
@@ -261,30 +254,30 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
||||
@ApiOperation(hidden = true, value = "deleteBy")
|
||||
@PostMapping("/deleteBy")
|
||||
public ResponseResult<Integer> deleteBy(@RequestBody StudentDto filter) throws Exception {
|
||||
return super.baseDeleteBy(filter, Student.INSTANCE);
|
||||
return super.baseDeleteBy(MyModelUtil.copyTo(filter, Student.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listBy")
|
||||
@PostMapping("/listBy")
|
||||
public ResponseResult<List<StudentDto>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<MyPageData<StudentVo>> listBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListBy(queryParam, Student.INSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分组和排序等。主要用于微服务间远程过程调用。
|
||||
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分页和排序等。主要用于微服务间远程过程调用。
|
||||
*
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空,则不会执行分页操作,只是基于MyPageData对象返回数据结果。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "listMapBy")
|
||||
@PostMapping("/listMapBy")
|
||||
public ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseListMapBy(queryParam, Student.INSTANCE);
|
||||
}
|
||||
|
||||
@@ -296,7 +289,7 @@ public class StudentController extends BaseController<Student, StudentDto, Long>
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "getBy")
|
||||
@PostMapping("/getBy")
|
||||
public ResponseResult<StudentDto> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
public ResponseResult<StudentVo> getBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseGetBy(queryParam, Student.INSTANCE);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,13 @@
|
||||
<association property="classCourse" column="course_id" foreignColumn="course_id"
|
||||
notNullColumn="course_id" resultMap="com.orange.demo.courseclassservice.dao.ClassCourseMapper.BaseResultMap" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||
<sql id="filterRef">
|
||||
<!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
|
||||
<include refid="com.orange.demo.courseclassservice.dao.CourseMapper.inputFilterRef"/>
|
||||
</sql>
|
||||
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
|
||||
<sql id="inputFilterRef">
|
||||
<if test="courseFilter != null">
|
||||
<if test="courseFilter.courseName != null and courseFilter.courseName != ''">
|
||||
<bind name = "safeCourseName" value = "'%' + courseFilter.courseName + '%'" />
|
||||
|
||||
@@ -7,8 +7,13 @@
|
||||
<result column="province_id" jdbcType="BIGINT" property="provinceId"/>
|
||||
<result column="city_id" jdbcType="BIGINT" property="cityId"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||
<sql id="filterRef">
|
||||
<!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
|
||||
<include refid="com.orange.demo.courseclassservice.dao.SchoolInfoMapper.inputFilterRef"/>
|
||||
</sql>
|
||||
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
|
||||
<sql id="inputFilterRef">
|
||||
<if test="schoolInfoFilter != null">
|
||||
<if test="schoolInfoFilter.schoolName != null and schoolInfoFilter.schoolName != ''">
|
||||
<bind name = "safeSchoolName" value = "'%' + schoolInfoFilter.schoolName + '%'" />
|
||||
|
||||
@@ -12,8 +12,14 @@
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="status" jdbcType="TINYINT" property="status"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||
<sql id="filterRef">
|
||||
<!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
|
||||
<include refid="com.orange.demo.courseclassservice.dao.StudentClassMapper.inputFilterRef"/>
|
||||
AND zz_class.status = ${@com.orange.demo.common.core.constant.GlobalDeletedFlag@NORMAL}
|
||||
</sql>
|
||||
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
|
||||
<sql id="inputFilterRef">
|
||||
<if test="studentClassFilter != null">
|
||||
<if test="studentClassFilter.className != null and studentClassFilter.className != ''">
|
||||
AND zz_class.class_name = #{studentClassFilter.className}
|
||||
|
||||
@@ -18,8 +18,13 @@
|
||||
<result column="register_time" jdbcType="TIMESTAMP" property="registerTime"/>
|
||||
<result column="status" jdbcType="TINYINT" property="status"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
|
||||
<sql id="filterRef">
|
||||
<!-- 这里必须加上全包名,否则当filterRef被其他Mapper.xml包含引用的时候,就会调用Mapper.xml中的该SQL片段 -->
|
||||
<include refid="com.orange.demo.courseclassservice.dao.StudentMapper.inputFilterRef"/>
|
||||
</sql>
|
||||
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
|
||||
<sql id="inputFilterRef">
|
||||
<if test="studentFilter != null">
|
||||
<if test="studentFilter.provinceId != null">
|
||||
AND zz_student.province_id = #{studentFilter.provinceId}
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.orange.demo.common.core.annotation.RelationDict;
|
||||
import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.courseclassinterface.dto.CourseDto;
|
||||
import com.orange.demo.courseclassinterface.vo.CourseVo;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
@@ -174,25 +174,25 @@ public class Course {
|
||||
private Map<String, Object> subjectIdDictMap;
|
||||
|
||||
@Mapper
|
||||
public interface CourseModelMapper extends BaseModelMapper<CourseDto, Course> {
|
||||
public interface CourseModelMapper extends BaseModelMapper<CourseVo, Course> {
|
||||
/**
|
||||
* 转换Dto对象到实体对象。
|
||||
* 转换Vo对象到实体对象。
|
||||
*
|
||||
* @param courseDto 域对象。
|
||||
* @param courseVo 域对象。
|
||||
* @return 实体对象。
|
||||
*/
|
||||
@Mapping(target = "classCourse", expression = "java(mapToBean(courseDto.getClassCourse(), com.orange.demo.courseclassservice.model.ClassCourse.class))")
|
||||
@Mapping(target = "classCourse", expression = "java(mapToBean(courseVo.getClassCourse(), com.orange.demo.courseclassservice.model.ClassCourse.class))")
|
||||
@Override
|
||||
Course toModel(CourseDto courseDto);
|
||||
Course toModel(CourseVo courseVo);
|
||||
/**
|
||||
* 转换实体对象到Dto对象。
|
||||
* 转换实体对象到VO对象。
|
||||
*
|
||||
* @param course 实体对象。
|
||||
* @return 域对象。
|
||||
*/
|
||||
@Mapping(target = "classCourse", expression = "java(beanToMap(course.getClassCourse(), false))")
|
||||
@Override
|
||||
CourseDto fromModel(Course course);
|
||||
CourseVo fromModel(Course course);
|
||||
}
|
||||
public static final CourseModelMapper INSTANCE = Mappers.getMapper(CourseModelMapper.class);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.orange.demo.courseclassservice.model;
|
||||
|
||||
import com.orange.demo.common.core.annotation.RelationDict;
|
||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||
import com.orange.demo.courseclassinterface.dto.SchoolInfoDto;
|
||||
import com.orange.demo.courseclassinterface.vo.SchoolInfoVo;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
@@ -69,23 +69,23 @@ public class SchoolInfo {
|
||||
private Map<String, Object> cityIdDictMap;
|
||||
|
||||
@Mapper
|
||||
public interface SchoolInfoModelMapper extends BaseModelMapper<SchoolInfoDto, SchoolInfo> {
|
||||
public interface SchoolInfoModelMapper extends BaseModelMapper<SchoolInfoVo, SchoolInfo> {
|
||||
/**
|
||||
* 转换Dto对象到实体对象。
|
||||
* 转换Vo对象到实体对象。
|
||||
*
|
||||
* @param schoolInfoDto 域对象。
|
||||
* @param schoolInfoVo 域对象。
|
||||
* @return 实体对象。
|
||||
*/
|
||||
@Override
|
||||
SchoolInfo toModel(SchoolInfoDto schoolInfoDto);
|
||||
SchoolInfo toModel(SchoolInfoVo schoolInfoVo);
|
||||
/**
|
||||
* 转换实体对象到Dto对象。
|
||||
* 转换实体对象到VO对象。
|
||||
*
|
||||
* @param schoolInfo 实体对象。
|
||||
* @return 域对象。
|
||||
*/
|
||||
@Override
|
||||
SchoolInfoDto fromModel(SchoolInfo schoolInfo);
|
||||
SchoolInfoVo fromModel(SchoolInfo schoolInfo);
|
||||
}
|
||||
public static final SchoolInfoModelMapper INSTANCE = Mappers.getMapper(SchoolInfoModelMapper.class);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.orange.demo.common.core.annotation.RelationDict;
|
||||
import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.courseclassinterface.dto.StudentDto;
|
||||
import com.orange.demo.courseclassinterface.vo.StudentVo;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
@@ -226,23 +226,23 @@ public class Student {
|
||||
private Map<String, Object> statusDictMap;
|
||||
|
||||
@Mapper
|
||||
public interface StudentModelMapper extends BaseModelMapper<StudentDto, Student> {
|
||||
public interface StudentModelMapper extends BaseModelMapper<StudentVo, Student> {
|
||||
/**
|
||||
* 转换Dto对象到实体对象。
|
||||
* 转换Vo对象到实体对象。
|
||||
*
|
||||
* @param studentDto 域对象。
|
||||
* @param studentVo 域对象。
|
||||
* @return 实体对象。
|
||||
*/
|
||||
@Override
|
||||
Student toModel(StudentDto studentDto);
|
||||
Student toModel(StudentVo studentVo);
|
||||
/**
|
||||
* 转换实体对象到Dto对象。
|
||||
* 转换实体对象到VO对象。
|
||||
*
|
||||
* @param student 实体对象。
|
||||
* @return 域对象。
|
||||
*/
|
||||
@Override
|
||||
StudentDto fromModel(Student student);
|
||||
StudentVo fromModel(Student student);
|
||||
}
|
||||
public static final StudentModelMapper INSTANCE = Mappers.getMapper(StudentModelMapper.class);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.orange.demo.common.core.annotation.RelationConstDict;
|
||||
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
|
||||
import com.orange.demo.common.core.annotation.DeletedFlagColumn;
|
||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.courseclassinterface.dto.StudentClassDto;
|
||||
import com.orange.demo.courseclassinterface.vo.StudentClassVo;
|
||||
import lombok.Data;
|
||||
import org.mapstruct.*;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
@@ -115,23 +115,23 @@ public class StudentClass {
|
||||
private Map<String, Object> classLevelDictMap;
|
||||
|
||||
@Mapper
|
||||
public interface StudentClassModelMapper extends BaseModelMapper<StudentClassDto, StudentClass> {
|
||||
public interface StudentClassModelMapper extends BaseModelMapper<StudentClassVo, StudentClass> {
|
||||
/**
|
||||
* 转换Dto对象到实体对象。
|
||||
* 转换Vo对象到实体对象。
|
||||
*
|
||||
* @param studentClassDto 域对象。
|
||||
* @param studentClassVo 域对象。
|
||||
* @return 实体对象。
|
||||
*/
|
||||
@Override
|
||||
StudentClass toModel(StudentClassDto studentClassDto);
|
||||
StudentClass toModel(StudentClassVo studentClassVo);
|
||||
/**
|
||||
* 转换实体对象到Dto对象。
|
||||
* 转换实体对象到VO对象。
|
||||
*
|
||||
* @param studentClass 实体对象。
|
||||
* @return 域对象。
|
||||
*/
|
||||
@Override
|
||||
StudentClassDto fromModel(StudentClass studentClass);
|
||||
StudentClassVo fromModel(StudentClass studentClass);
|
||||
}
|
||||
public static final StudentClassModelMapper INSTANCE = Mappers.getMapper(StudentClassModelMapper.class);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.orange.demo.courseclassservice.service;
|
||||
|
||||
import com.orange.demo.courseclassinterface.dto.AreaCodeDto;
|
||||
import com.orange.demo.courseclassservice.dao.AreaCodeMapper;
|
||||
import com.orange.demo.courseclassservice.model.AreaCode;
|
||||
import com.orange.demo.common.core.cache.MapTreeDictionaryCache;
|
||||
@@ -20,7 +19,7 @@ import java.util.List;
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Service
|
||||
public class AreaCodeService extends BaseDictService<AreaCode, AreaCodeDto, Long> {
|
||||
public class AreaCodeService extends BaseDictService<AreaCode, Long> {
|
||||
|
||||
@Autowired
|
||||
private AreaCodeMapper areaCodeMapper;
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.orange.demo.courseclassservice.service;
|
||||
|
||||
import com.orange.demo.courseclassservice.dao.*;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.object.MyRelationParam;
|
||||
import com.orange.demo.common.core.object.CallResult;
|
||||
@@ -24,7 +23,7 @@ import java.util.*;
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Service
|
||||
public class CourseService extends BaseService<Course, CourseDto, Long> {
|
||||
public class CourseService extends BaseService<Course, Long> {
|
||||
|
||||
@Autowired
|
||||
private CourseMapper courseMapper;
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.orange.demo.common.core.base.dao.BaseDaoMapper;
|
||||
import com.orange.demo.common.core.constant.GlobalDeletedFlag;
|
||||
import com.orange.demo.courseclassservice.dao.GradeMapper;
|
||||
import com.orange.demo.courseclassservice.model.Grade;
|
||||
import com.orange.demo.courseclassinterface.dto.GradeDto;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -21,7 +20,7 @@ import javax.annotation.PostConstruct;
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Service
|
||||
public class GradeService extends BaseDictService<Grade, GradeDto, Integer> {
|
||||
public class GradeService extends BaseDictService<Grade, Integer> {
|
||||
|
||||
@Autowired
|
||||
private GradeMapper gradeMapper;
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.orange.demo.courseclassservice.service;
|
||||
|
||||
import com.orange.demo.courseclassservice.dao.*;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.object.MyRelationParam;
|
||||
import com.orange.demo.common.core.object.CallResult;
|
||||
@@ -23,7 +22,7 @@ import java.util.*;
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Service
|
||||
public class SchoolInfoService extends BaseService<SchoolInfo, SchoolInfoDto, Long> {
|
||||
public class SchoolInfoService extends BaseService<SchoolInfo, Long> {
|
||||
|
||||
@Autowired
|
||||
private SchoolInfoMapper schoolInfoMapper;
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.orange.demo.courseclassservice.service;
|
||||
|
||||
import com.orange.demo.courseclassservice.dao.*;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.object.MyRelationParam;
|
||||
import com.orange.demo.common.core.object.CallResult;
|
||||
@@ -26,7 +25,7 @@ import java.util.*;
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Service
|
||||
public class StudentClassService extends BaseService<StudentClass, StudentClassDto, Long> {
|
||||
public class StudentClassService extends BaseService<StudentClass, Long> {
|
||||
|
||||
@Autowired
|
||||
private StudentClassMapper studentClassMapper;
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.orange.demo.courseclassservice.service;
|
||||
import com.orange.demo.application.common.constant.StudentStatus;
|
||||
import com.orange.demo.courseclassservice.dao.*;
|
||||
import com.orange.demo.courseclassservice.model.*;
|
||||
import com.orange.demo.courseclassinterface.dto.*;
|
||||
import com.orange.demo.common.core.util.*;
|
||||
import com.orange.demo.common.core.object.MyRelationParam;
|
||||
import com.orange.demo.common.core.object.CallResult;
|
||||
@@ -24,7 +23,7 @@ import java.util.*;
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Service
|
||||
public class StudentService extends BaseService<Student, StudentDto, Long> {
|
||||
public class StudentService extends BaseService<Student, Long> {
|
||||
|
||||
@Autowired
|
||||
private StudentMapper studentMapper;
|
||||
|
||||
Reference in New Issue
Block a user