commit:VO支持以及bug修复

This commit is contained in:
Jerry
2020-12-18 22:52:35 +08:00
parent ecec5ae30a
commit d86ae86f1c
558 changed files with 8019 additions and 10785 deletions

View File

@@ -1,10 +1,10 @@
package com.orange.demo.statsservice.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.orange.demo.statsservice.model.*;
import com.orange.demo.statsservice.service.*;
import com.orange.demo.statsinterface.dto.*;
import com.orange.demo.statsinterface.vo.*;
import com.orange.demo.common.core.object.*;
import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
@@ -29,13 +29,13 @@ import java.util.*;
@Slf4j
@RestController
@RequestMapping("/courseTransStats")
public class CourseTransStatsController extends BaseController<CourseTransStats, CourseTransStatsDto, Long> {
public class CourseTransStatsController extends BaseController<CourseTransStats, CourseTransStatsVo, Long> {
@Autowired
private CourseTransStatsService courseTransStatsService;
@Override
protected BaseService<CourseTransStats, CourseTransStatsDto, Long> service() {
protected BaseService<CourseTransStats, Long> service() {
return courseTransStatsService;
}
@@ -48,25 +48,18 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
* @return 应答结果对象,包含查询结果集。
*/
@PostMapping("/list")
public ResponseResult<MyPageData<CourseTransStatsDto>> list(
public ResponseResult<MyPageData<CourseTransStatsVo>> list(
@MyRequestBody("courseTransStatsFilter") CourseTransStatsDto courseTransStatsDtoFilter,
@MyRequestBody MyOrderParam orderParam,
@MyRequestBody MyPageParam pageParam) {
if (pageParam != null) {
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
}
CourseTransStats courseTransStatsFilter = CourseTransStats.INSTANCE.toModel(courseTransStatsDtoFilter);
CourseTransStats courseTransStatsFilter = MyModelUtil.copyTo(courseTransStatsDtoFilter, CourseTransStats.class);
String orderBy = MyOrderParam.buildOrderBy(orderParam, CourseTransStats.class);
List<CourseTransStats> courseTransStatsList =
courseTransStatsService.getCourseTransStatsListWithRelation(courseTransStatsFilter, orderBy);
long totalCount = 0L;
if (courseTransStatsList instanceof Page) {
totalCount = ((Page<CourseTransStats>) courseTransStatsList).getTotal();
}
// 分页连同对象数据转换copy工作下面的方法一并完成。
Tuple2<List<CourseTransStatsDto>, Long> responseData =
new Tuple2<>(CourseTransStats.INSTANCE.fromModelList(courseTransStatsList), totalCount);
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
return ResponseResult.success(MyPageUtil.makeResponseData(courseTransStatsList, CourseTransStats.INSTANCE));
}
/**
@@ -79,7 +72,7 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
* @return 应答结果对象,包含查询结果集。
*/
@PostMapping("/listWithGroup")
public ResponseResult<MyPageData<CourseTransStatsDto>> listWithGroup(
public ResponseResult<MyPageData<CourseTransStatsVo>> listWithGroup(
@MyRequestBody("courseTransStatsFilter") CourseTransStatsDto courseTransStatsDtoFilter,
@MyRequestBody(required = true) MyGroupParam groupParam,
@MyRequestBody MyOrderParam orderParam,
@@ -93,7 +86,7 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
if (pageParam != null) {
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
}
CourseTransStats filter = CourseTransStats.INSTANCE.toModel(courseTransStatsDtoFilter);
CourseTransStats filter = MyModelUtil.copyTo(courseTransStatsDtoFilter, CourseTransStats.class);
MyGroupCriteria criteria = groupParam.getGroupCriteria();
List<CourseTransStats> resultList = courseTransStatsService.getGroupedCourseTransStatsListWithRelation(
filter, criteria.getGroupSelect(), criteria.getGroupBy(), orderBy);
@@ -108,7 +101,7 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
* @return 应答结果对象,包含对象详情。
*/
@GetMapping("/view")
public ResponseResult<CourseTransStatsDto> view(@RequestParam Long statsId) {
public ResponseResult<CourseTransStatsVo> view(@RequestParam Long statsId) {
if (MyCommonUtil.existBlankArgument(statsId)) {
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
}
@@ -117,8 +110,8 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
if (courseTransStats == null) {
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
}
CourseTransStatsDto courseTransStatsDto = CourseTransStats.INSTANCE.fromModel(courseTransStats);
return ResponseResult.success(courseTransStatsDto);
CourseTransStatsVo courseTransStatsVo = CourseTransStats.INSTANCE.fromModel(courseTransStats);
return ResponseResult.success(courseTransStatsVo);
}
/**
@@ -130,7 +123,7 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
*/
@ApiOperation(hidden = true, value = "listByIds")
@PostMapping("/listByIds")
public ResponseResult<List<CourseTransStatsDto>> listByIds(
public ResponseResult<List<CourseTransStatsVo>> listByIds(
@RequestParam Set<Long> statsIds, @RequestParam Boolean withDict) {
return super.baseListByIds(statsIds, withDict, CourseTransStats.INSTANCE);
}
@@ -144,7 +137,7 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
*/
@ApiOperation(hidden = true, value = "getById")
@PostMapping("/getById")
public ResponseResult<CourseTransStatsDto> getById(
public ResponseResult<CourseTransStatsVo> getById(
@RequestParam Long statsId, @RequestParam Boolean withDict) {
return super.baseGetById(statsId, withDict, CourseTransStats.INSTANCE);
}
@@ -182,30 +175,30 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
@ApiOperation(hidden = true, value = "deleteBy")
@PostMapping("/deleteBy")
public ResponseResult<Integer> deleteBy(@RequestBody CourseTransStatsDto filter) throws Exception {
return super.baseDeleteBy(filter, CourseTransStats.INSTANCE);
return super.baseDeleteBy(MyModelUtil.copyTo(filter, CourseTransStats.class));
}
/**
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分和排序等。主要用于微服务间远程过程调用。
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分和排序等。主要用于微服务间远程过程调用。
*
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空则不会执行分页操作只是基于MyPageData对象返回数据结果。
*/
@ApiOperation(hidden = true, value = "listBy")
@PostMapping("/listBy")
public ResponseResult<List<CourseTransStatsDto>> listBy(@RequestBody MyQueryParam queryParam) {
public ResponseResult<MyPageData<CourseTransStatsVo>> listBy(@RequestBody MyQueryParam queryParam) {
return super.baseListBy(queryParam, CourseTransStats.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, CourseTransStats.INSTANCE);
}
@@ -217,7 +210,7 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
*/
@ApiOperation(hidden = true, value = "getBy")
@PostMapping("/getBy")
public ResponseResult<CourseTransStatsDto> getBy(@RequestBody MyQueryParam queryParam) {
public ResponseResult<CourseTransStatsVo> getBy(@RequestBody MyQueryParam queryParam) {
return super.baseGetBy(queryParam, CourseTransStats.INSTANCE);
}

View File

@@ -1,10 +1,10 @@
package com.orange.demo.statsservice.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.orange.demo.statsservice.model.*;
import com.orange.demo.statsservice.service.*;
import com.orange.demo.statsinterface.dto.*;
import com.orange.demo.statsinterface.vo.*;
import com.orange.demo.common.core.object.*;
import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
@@ -29,13 +29,13 @@ import java.util.*;
@Slf4j
@RestController
@RequestMapping("/studentActionStats")
public class StudentActionStatsController extends BaseController<StudentActionStats, StudentActionStatsDto, Long> {
public class StudentActionStatsController extends BaseController<StudentActionStats, StudentActionStatsVo, Long> {
@Autowired
private StudentActionStatsService studentActionStatsService;
@Override
protected BaseService<StudentActionStats, StudentActionStatsDto, Long> service() {
protected BaseService<StudentActionStats, Long> service() {
return studentActionStatsService;
}
@@ -48,25 +48,18 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
* @return 应答结果对象,包含查询结果集。
*/
@PostMapping("/list")
public ResponseResult<MyPageData<StudentActionStatsDto>> list(
public ResponseResult<MyPageData<StudentActionStatsVo>> list(
@MyRequestBody("studentActionStatsFilter") StudentActionStatsDto studentActionStatsDtoFilter,
@MyRequestBody MyOrderParam orderParam,
@MyRequestBody MyPageParam pageParam) {
if (pageParam != null) {
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
}
StudentActionStats studentActionStatsFilter = StudentActionStats.INSTANCE.toModel(studentActionStatsDtoFilter);
StudentActionStats studentActionStatsFilter = MyModelUtil.copyTo(studentActionStatsDtoFilter, StudentActionStats.class);
String orderBy = MyOrderParam.buildOrderBy(orderParam, StudentActionStats.class);
List<StudentActionStats> studentActionStatsList =
studentActionStatsService.getStudentActionStatsListWithRelation(studentActionStatsFilter, orderBy);
long totalCount = 0L;
if (studentActionStatsList instanceof Page) {
totalCount = ((Page<StudentActionStats>) studentActionStatsList).getTotal();
}
// 分页连同对象数据转换copy工作下面的方法一并完成。
Tuple2<List<StudentActionStatsDto>, Long> responseData =
new Tuple2<>(StudentActionStats.INSTANCE.fromModelList(studentActionStatsList), totalCount);
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
return ResponseResult.success(MyPageUtil.makeResponseData(studentActionStatsList, StudentActionStats.INSTANCE));
}
/**
@@ -79,7 +72,7 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
* @return 应答结果对象,包含查询结果集。
*/
@PostMapping("/listWithGroup")
public ResponseResult<MyPageData<StudentActionStatsDto>> listWithGroup(
public ResponseResult<MyPageData<StudentActionStatsVo>> listWithGroup(
@MyRequestBody("studentActionStatsFilter") StudentActionStatsDto studentActionStatsDtoFilter,
@MyRequestBody(required = true) MyGroupParam groupParam,
@MyRequestBody MyOrderParam orderParam,
@@ -93,7 +86,7 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
if (pageParam != null) {
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
}
StudentActionStats filter = StudentActionStats.INSTANCE.toModel(studentActionStatsDtoFilter);
StudentActionStats filter = MyModelUtil.copyTo(studentActionStatsDtoFilter, StudentActionStats.class);
MyGroupCriteria criteria = groupParam.getGroupCriteria();
List<StudentActionStats> resultList = studentActionStatsService.getGroupedStudentActionStatsListWithRelation(
filter, criteria.getGroupSelect(), criteria.getGroupBy(), orderBy);
@@ -108,7 +101,7 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
* @return 应答结果对象,包含对象详情。
*/
@GetMapping("/view")
public ResponseResult<StudentActionStatsDto> view(@RequestParam Long statsId) {
public ResponseResult<StudentActionStatsVo> view(@RequestParam Long statsId) {
if (MyCommonUtil.existBlankArgument(statsId)) {
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
}
@@ -117,8 +110,8 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
if (studentActionStats == null) {
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
}
StudentActionStatsDto studentActionStatsDto = StudentActionStats.INSTANCE.fromModel(studentActionStats);
return ResponseResult.success(studentActionStatsDto);
StudentActionStatsVo studentActionStatsVo = StudentActionStats.INSTANCE.fromModel(studentActionStats);
return ResponseResult.success(studentActionStatsVo);
}
/**
@@ -130,7 +123,7 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
*/
@ApiOperation(hidden = true, value = "listByIds")
@PostMapping("/listByIds")
public ResponseResult<List<StudentActionStatsDto>> listByIds(
public ResponseResult<List<StudentActionStatsVo>> listByIds(
@RequestParam Set<Long> statsIds, @RequestParam Boolean withDict) {
return super.baseListByIds(statsIds, withDict, StudentActionStats.INSTANCE);
}
@@ -144,7 +137,7 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
*/
@ApiOperation(hidden = true, value = "getById")
@PostMapping("/getById")
public ResponseResult<StudentActionStatsDto> getById(
public ResponseResult<StudentActionStatsVo> getById(
@RequestParam Long statsId, @RequestParam Boolean withDict) {
return super.baseGetById(statsId, withDict, StudentActionStats.INSTANCE);
}
@@ -182,30 +175,30 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
@ApiOperation(hidden = true, value = "deleteBy")
@PostMapping("/deleteBy")
public ResponseResult<Integer> deleteBy(@RequestBody StudentActionStatsDto filter) throws Exception {
return super.baseDeleteBy(filter, StudentActionStats.INSTANCE);
return super.baseDeleteBy(MyModelUtil.copyTo(filter, StudentActionStats.class));
}
/**
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分和排序等。主要用于微服务间远程过程调用。
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分和排序等。主要用于微服务间远程过程调用。
*
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空则不会执行分页操作只是基于MyPageData对象返回数据结果。
*/
@ApiOperation(hidden = true, value = "listBy")
@PostMapping("/listBy")
public ResponseResult<List<StudentActionStatsDto>> listBy(@RequestBody MyQueryParam queryParam) {
public ResponseResult<MyPageData<StudentActionStatsVo>> listBy(@RequestBody MyQueryParam queryParam) {
return super.baseListBy(queryParam, StudentActionStats.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, StudentActionStats.INSTANCE);
}
@@ -217,7 +210,7 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
*/
@ApiOperation(hidden = true, value = "getBy")
@PostMapping("/getBy")
public ResponseResult<StudentActionStatsDto> getBy(@RequestBody MyQueryParam queryParam) {
public ResponseResult<StudentActionStatsVo> getBy(@RequestBody MyQueryParam queryParam) {
return super.baseGetBy(queryParam, StudentActionStats.INSTANCE);
}

View File

@@ -1,10 +1,10 @@
package com.orange.demo.statsservice.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.orange.demo.statsservice.model.*;
import com.orange.demo.statsservice.service.*;
import com.orange.demo.statsinterface.dto.*;
import com.orange.demo.statsinterface.vo.*;
import com.orange.demo.common.core.object.*;
import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
@@ -32,13 +32,13 @@ import java.util.*;
@Slf4j
@RestController
@RequestMapping("/studentActionTrans")
public class StudentActionTransController extends BaseController<StudentActionTrans, StudentActionTransDto, Long> {
public class StudentActionTransController extends BaseController<StudentActionTrans, StudentActionTransVo, Long> {
@Autowired
private StudentActionTransService studentActionTransService;
@Override
protected BaseService<StudentActionTrans, StudentActionTransDto, Long> service() {
protected BaseService<StudentActionTrans, Long> service() {
return studentActionTransService;
}
@@ -58,7 +58,7 @@ public class StudentActionTransController extends BaseController<StudentActionTr
if (errorMessage != null) {
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
}
StudentActionTrans studentActionTrans = StudentActionTrans.INSTANCE.toModel(studentActionTransDto);
StudentActionTrans studentActionTrans = MyModelUtil.copyTo(studentActionTransDto, StudentActionTrans.class);
// 验证远程服务关联Id的数据合法性
CallResult remoteCallResult = studentActionTransService.verifyRemoteRelatedData(studentActionTrans, null);
if (!remoteCallResult.isSuccess()) {
@@ -84,7 +84,7 @@ public class StudentActionTransController extends BaseController<StudentActionTr
if (errorMessage != null) {
return ResponseResult.error(ErrorCodeEnum.DATA_VALIDATED_FAILED, errorMessage);
}
StudentActionTrans studentActionTrans = StudentActionTrans.INSTANCE.toModel(studentActionTransDto);
StudentActionTrans studentActionTrans = MyModelUtil.copyTo(studentActionTransDto, StudentActionTrans.class);
StudentActionTrans originalStudentActionTrans = studentActionTransService.getById(studentActionTrans.getTransId());
if (originalStudentActionTrans == null) {
// NOTE: 修改下面方括号中的话述
@@ -138,25 +138,18 @@ public class StudentActionTransController extends BaseController<StudentActionTr
* @return 应答结果对象,包含查询结果集。
*/
@PostMapping("/list")
public ResponseResult<MyPageData<StudentActionTransDto>> list(
public ResponseResult<MyPageData<StudentActionTransVo>> list(
@MyRequestBody("studentActionTransFilter") StudentActionTransDto studentActionTransDtoFilter,
@MyRequestBody MyOrderParam orderParam,
@MyRequestBody MyPageParam pageParam) {
if (pageParam != null) {
PageMethod.startPage(pageParam.getPageNum(), pageParam.getPageSize());
}
StudentActionTrans studentActionTransFilter = StudentActionTrans.INSTANCE.toModel(studentActionTransDtoFilter);
StudentActionTrans studentActionTransFilter = MyModelUtil.copyTo(studentActionTransDtoFilter, StudentActionTrans.class);
String orderBy = MyOrderParam.buildOrderBy(orderParam, StudentActionTrans.class);
List<StudentActionTrans> studentActionTransList =
studentActionTransService.getStudentActionTransListWithRelation(studentActionTransFilter, orderBy);
long totalCount = 0L;
if (studentActionTransList instanceof Page) {
totalCount = ((Page<StudentActionTrans>) studentActionTransList).getTotal();
}
// 分页连同对象数据转换copy工作下面的方法一并完成。
Tuple2<List<StudentActionTransDto>, Long> responseData =
new Tuple2<>(StudentActionTrans.INSTANCE.fromModelList(studentActionTransList), totalCount);
return ResponseResult.success(MyPageUtil.makeResponseData(responseData));
return ResponseResult.success(MyPageUtil.makeResponseData(studentActionTransList, StudentActionTrans.INSTANCE));
}
/**
@@ -166,7 +159,7 @@ public class StudentActionTransController extends BaseController<StudentActionTr
* @return 应答结果对象,包含对象详情。
*/
@GetMapping("/view")
public ResponseResult<StudentActionTransDto> view(@RequestParam Long transId) {
public ResponseResult<StudentActionTransVo> view(@RequestParam Long transId) {
if (MyCommonUtil.existBlankArgument(transId)) {
return ResponseResult.error(ErrorCodeEnum.ARGUMENT_NULL_EXIST);
}
@@ -175,8 +168,8 @@ public class StudentActionTransController extends BaseController<StudentActionTr
if (studentActionTrans == null) {
return ResponseResult.error(ErrorCodeEnum.DATA_NOT_EXIST);
}
StudentActionTransDto studentActionTransDto = StudentActionTrans.INSTANCE.fromModel(studentActionTrans);
return ResponseResult.success(studentActionTransDto);
StudentActionTransVo studentActionTransVo = StudentActionTrans.INSTANCE.fromModel(studentActionTrans);
return ResponseResult.success(studentActionTransVo);
}
/**
@@ -188,7 +181,7 @@ public class StudentActionTransController extends BaseController<StudentActionTr
*/
@ApiOperation(hidden = true, value = "listByIds")
@PostMapping("/listByIds")
public ResponseResult<List<StudentActionTransDto>> listByIds(
public ResponseResult<List<StudentActionTransVo>> listByIds(
@RequestParam Set<Long> transIds, @RequestParam Boolean withDict) {
return super.baseListByIds(transIds, withDict, StudentActionTrans.INSTANCE);
}
@@ -202,7 +195,7 @@ public class StudentActionTransController extends BaseController<StudentActionTr
*/
@ApiOperation(hidden = true, value = "getById")
@PostMapping("/getById")
public ResponseResult<StudentActionTransDto> getById(
public ResponseResult<StudentActionTransVo> getById(
@RequestParam Long transId, @RequestParam Boolean withDict) {
return super.baseGetById(transId, withDict, StudentActionTrans.INSTANCE);
}
@@ -240,30 +233,30 @@ public class StudentActionTransController extends BaseController<StudentActionTr
@ApiOperation(hidden = true, value = "deleteBy")
@PostMapping("/deleteBy")
public ResponseResult<Integer> deleteBy(@RequestBody StudentActionTransDto filter) throws Exception {
return super.baseDeleteBy(filter, StudentActionTrans.INSTANCE);
return super.baseDeleteBy(MyModelUtil.copyTo(filter, StudentActionTrans.class));
}
/**
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分和排序等。主要用于微服务间远程过程调用。
* 复杂的查询调用,包括(in list)过滤,对象条件过滤,分和排序等。主要用于微服务间远程过程调用。
*
* @param queryParam 查询参数。
* @return 应答结果对象,包含符合查询过滤条件的对象结果
* @return 分页数据集合对象。如MyQueryParam参数的分页属性为空则不会执行分页操作只是基于MyPageData对象返回数据结果。
*/
@ApiOperation(hidden = true, value = "listBy")
@PostMapping("/listBy")
public ResponseResult<List<StudentActionTransDto>> listBy(@RequestBody MyQueryParam queryParam) {
public ResponseResult<MyPageData<StudentActionTransVo>> listBy(@RequestBody MyQueryParam queryParam) {
return super.baseListBy(queryParam, StudentActionTrans.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, StudentActionTrans.INSTANCE);
}
@@ -275,7 +268,7 @@ public class StudentActionTransController extends BaseController<StudentActionTr
*/
@ApiOperation(hidden = true, value = "getBy")
@PostMapping("/getBy")
public ResponseResult<StudentActionTransDto> getBy(@RequestBody MyQueryParam queryParam) {
public ResponseResult<StudentActionTransVo> getBy(@RequestBody MyQueryParam queryParam) {
return super.baseGetBy(queryParam, StudentActionTrans.INSTANCE);
}

View File

@@ -13,8 +13,13 @@
<result column="student_flower_amount" jdbcType="INTEGER" property="studentFlowerAmount"/>
<result column="student_flower_count" jdbcType="INTEGER" property="studentFlowerCount"/>
</resultMap>
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
<sql id="filterRef">
<!-- 这里必须加上全包名否则当filterRef被其他Mapper.xml包含引用的时候就会调用Mapper.xml中的该SQL片段 -->
<include refid="com.orange.demo.statsservice.dao.CourseTransStatsMapper.inputFilterRef"/>
</sql>
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
<sql id="inputFilterRef">
<if test="courseTransStatsFilter != null">
<if test="courseTransStatsFilter.statsDateStart != null and courseTransStatsFilter.statsDateStart != ''">
AND zz_course_trans_stats.stats_date &gt;= #{courseTransStatsFilter.statsDateStart}

View File

@@ -24,8 +24,13 @@
<result column="do_exercise_count" jdbcType="INTEGER" property="doExerciseCount"/>
<result column="do_exercise_correct_count" jdbcType="INTEGER" property="doExerciseCorrectCount"/>
</resultMap>
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
<sql id="filterRef">
<!-- 这里必须加上全包名否则当filterRef被其他Mapper.xml包含引用的时候就会调用Mapper.xml中的该SQL片段 -->
<include refid="com.orange.demo.statsservice.dao.StudentActionStatsMapper.inputFilterRef"/>
</sql>
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
<sql id="inputFilterRef">
<if test="studentActionStatsFilter != null">
<if test="studentActionStatsFilter.statsDateStart != null and studentActionStatsFilter.statsDateStart != ''">
AND zz_student_action_stats.stats_date &gt;= #{studentActionStatsFilter.statsDateStart}

View File

@@ -18,8 +18,13 @@
<result column="exercise_correct_flag" jdbcType="TINYINT" property="exerciseCorrectFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
</resultMap>
<!-- 如果有逻辑删除字段过滤,请写到这里 -->
<sql id="filterRef">
<!-- 这里必须加上全包名否则当filterRef被其他Mapper.xml包含引用的时候就会调用Mapper.xml中的该SQL片段 -->
<include refid="com.orange.demo.statsservice.dao.StudentActionTransMapper.inputFilterRef"/>
</sql>
<!-- 这里仅包含调用接口输入的主表过滤条件 -->
<sql id="inputFilterRef">
<if test="studentActionTransFilter != null">
<if test="studentActionTransFilter.studentId != null">
AND zz_student_action_trans.student_id = #{studentActionTransFilter.studentId}

View File

@@ -1,15 +1,15 @@
package com.orange.demo.statsservice.model;
import com.orange.demo.courseclassinterface.client.GradeClient;
import com.orange.demo.courseclassinterface.dto.GradeDto;
import com.orange.demo.courseclassinterface.client.CourseClient;
import com.orange.demo.courseclassinterface.dto.CourseDto;
import com.orange.demo.courseclassinterface.vo.CourseVo;
import com.orange.demo.courseclassinterface.vo.GradeVo;
import com.orange.demo.application.common.constant.Subject;
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.statsinterface.dto.CourseTransStatsDto;
import com.orange.demo.statsinterface.vo.CourseTransStatsVo;
import lombok.Data;
import org.mapstruct.*;
import org.mapstruct.factory.Mappers;
@@ -115,7 +115,7 @@ public class CourseTransStats {
@RelationDict(
masterIdField = "gradeId",
slaveClientClass = GradeClient.class,
slaveModelClass = GradeDto.class,
slaveModelClass = GradeVo.class,
slaveIdField = "gradeId",
slaveNameField = "gradeName")
@Transient
@@ -124,7 +124,7 @@ public class CourseTransStats {
@RelationDict(
masterIdField = "courseId",
slaveClientClass = CourseClient.class,
slaveModelClass = CourseDto.class,
slaveModelClass = CourseVo.class,
slaveIdField = "courseId",
slaveNameField = "courseName")
@Transient
@@ -137,23 +137,23 @@ public class CourseTransStats {
private Map<String, Object> subjectIdDictMap;
@Mapper
public interface CourseTransStatsModelMapper extends BaseModelMapper<CourseTransStatsDto, CourseTransStats> {
public interface CourseTransStatsModelMapper extends BaseModelMapper<CourseTransStatsVo, CourseTransStats> {
/**
* 转换Dto对象到实体对象。
* 转换Vo对象到实体对象。
*
* @param courseTransStatsDto 域对象。
* @param courseTransStatsVo 域对象。
* @return 实体对象。
*/
@Override
CourseTransStats toModel(CourseTransStatsDto courseTransStatsDto);
CourseTransStats toModel(CourseTransStatsVo courseTransStatsVo);
/**
* 转换实体对象到Dto对象。
* 转换实体对象到VO对象。
*
* @param courseTransStats 实体对象。
* @return 域对象。
*/
@Override
CourseTransStatsDto fromModel(CourseTransStats courseTransStats);
CourseTransStatsVo fromModel(CourseTransStats courseTransStats);
}
public static final CourseTransStatsModelMapper INSTANCE = Mappers.getMapper(CourseTransStatsModelMapper.class);
}

View File

@@ -1,12 +1,12 @@
package com.orange.demo.statsservice.model;
import com.orange.demo.courseclassinterface.vo.AreaCodeVo;
import com.orange.demo.courseclassinterface.client.GradeClient;
import com.orange.demo.courseclassinterface.dto.GradeDto;
import com.orange.demo.courseclassinterface.client.AreaCodeClient;
import com.orange.demo.courseclassinterface.dto.AreaCodeDto;
import com.orange.demo.courseclassinterface.vo.GradeVo;
import com.orange.demo.common.core.annotation.RelationDict;
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
import com.orange.demo.statsinterface.dto.StudentActionStatsDto;
import com.orange.demo.statsinterface.vo.StudentActionStatsVo;
import lombok.Data;
import org.mapstruct.*;
import org.mapstruct.factory.Mappers;
@@ -188,7 +188,7 @@ public class StudentActionStats {
@RelationDict(
masterIdField = "gradeId",
slaveClientClass = GradeClient.class,
slaveModelClass = GradeDto.class,
slaveModelClass = GradeVo.class,
slaveIdField = "gradeId",
slaveNameField = "gradeName")
@Transient
@@ -197,7 +197,7 @@ public class StudentActionStats {
@RelationDict(
masterIdField = "provinceId",
slaveClientClass = AreaCodeClient.class,
slaveModelClass = AreaCodeDto.class,
slaveModelClass = AreaCodeVo.class,
slaveIdField = "areaId",
slaveNameField = "areaName")
@Transient
@@ -206,30 +206,30 @@ public class StudentActionStats {
@RelationDict(
masterIdField = "cityId",
slaveClientClass = AreaCodeClient.class,
slaveModelClass = AreaCodeDto.class,
slaveModelClass = AreaCodeVo.class,
slaveIdField = "areaId",
slaveNameField = "areaName")
@Transient
private Map<String, Object> cityIdDictMap;
@Mapper
public interface StudentActionStatsModelMapper extends BaseModelMapper<StudentActionStatsDto, StudentActionStats> {
public interface StudentActionStatsModelMapper extends BaseModelMapper<StudentActionStatsVo, StudentActionStats> {
/**
* 转换Dto对象到实体对象。
* 转换Vo对象到实体对象。
*
* @param studentActionStatsDto 域对象。
* @param studentActionStatsVo 域对象。
* @return 实体对象。
*/
@Override
StudentActionStats toModel(StudentActionStatsDto studentActionStatsDto);
StudentActionStats toModel(StudentActionStatsVo studentActionStatsVo);
/**
* 转换实体对象到Dto对象。
* 转换实体对象到VO对象。
*
* @param studentActionStats 实体对象。
* @return 域对象。
*/
@Override
StudentActionStatsDto fromModel(StudentActionStats studentActionStats);
StudentActionStatsVo fromModel(StudentActionStats studentActionStats);
}
public static final StudentActionStatsModelMapper INSTANCE = Mappers.getMapper(StudentActionStatsModelMapper.class);
}

View File

@@ -1,16 +1,16 @@
package com.orange.demo.statsservice.model;
import com.orange.demo.courseclassinterface.dto.SchoolInfoDto;
import com.orange.demo.courseclassinterface.client.GradeClient;
import com.orange.demo.courseclassinterface.dto.GradeDto;
import com.orange.demo.courseclassinterface.client.SchoolInfoClient;
import com.orange.demo.courseclassinterface.vo.SchoolInfoVo;
import com.orange.demo.courseclassinterface.vo.GradeVo;
import com.orange.demo.application.common.constant.StudentActionType;
import com.orange.demo.application.common.constant.DeviceType;
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.statsinterface.dto.StudentActionTransDto;
import com.orange.demo.statsinterface.vo.StudentActionTransVo;
import lombok.Data;
import org.mapstruct.*;
import org.mapstruct.factory.Mappers;
@@ -146,7 +146,7 @@ public class StudentActionTrans {
@RelationDict(
masterIdField = "schoolId",
slaveClientClass = SchoolInfoClient.class,
slaveModelClass = SchoolInfoDto.class,
slaveModelClass = SchoolInfoVo.class,
slaveIdField = "schoolId",
slaveNameField = "schoolName")
@Transient
@@ -155,7 +155,7 @@ public class StudentActionTrans {
@RelationDict(
masterIdField = "gradeId",
slaveClientClass = GradeClient.class,
slaveModelClass = GradeDto.class,
slaveModelClass = GradeVo.class,
slaveIdField = "gradeId",
slaveNameField = "gradeName")
@Transient
@@ -174,23 +174,23 @@ public class StudentActionTrans {
private Map<String, Object> deviceTypeDictMap;
@Mapper
public interface StudentActionTransModelMapper extends BaseModelMapper<StudentActionTransDto, StudentActionTrans> {
public interface StudentActionTransModelMapper extends BaseModelMapper<StudentActionTransVo, StudentActionTrans> {
/**
* 转换Dto对象到实体对象。
* 转换Vo对象到实体对象。
*
* @param studentActionTransDto 域对象。
* @param studentActionTransVo 域对象。
* @return 实体对象。
*/
@Override
StudentActionTrans toModel(StudentActionTransDto studentActionTransDto);
StudentActionTrans toModel(StudentActionTransVo studentActionTransVo);
/**
* 转换实体对象到Dto对象。
* 转换实体对象到VO对象。
*
* @param studentActionTrans 实体对象。
* @return 域对象。
*/
@Override
StudentActionTransDto fromModel(StudentActionTrans studentActionTrans);
StudentActionTransVo fromModel(StudentActionTrans studentActionTrans);
}
public static final StudentActionTransModelMapper INSTANCE = Mappers.getMapper(StudentActionTransModelMapper.class);
}

View File

@@ -2,7 +2,6 @@ package com.orange.demo.statsservice.service;
import com.orange.demo.statsservice.dao.*;
import com.orange.demo.statsservice.model.*;
import com.orange.demo.statsinterface.dto.*;
import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.object.MyRelationParam;
import com.orange.demo.common.core.object.MyWhereCriteria;
@@ -20,7 +19,7 @@ import java.util.*;
* @date 2020-08-08
*/
@Service
public class CourseTransStatsService extends BaseService<CourseTransStats, CourseTransStatsDto, Long> {
public class CourseTransStatsService extends BaseService<CourseTransStats, Long> {
@Autowired
private CourseTransStatsMapper courseTransStatsMapper;

View File

@@ -2,7 +2,6 @@ package com.orange.demo.statsservice.service;
import com.orange.demo.statsservice.dao.*;
import com.orange.demo.statsservice.model.*;
import com.orange.demo.statsinterface.dto.*;
import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.object.MyRelationParam;
import com.orange.demo.common.core.object.MyWhereCriteria;
@@ -20,7 +19,7 @@ import java.util.*;
* @date 2020-08-08
*/
@Service
public class StudentActionStatsService extends BaseService<StudentActionStats, StudentActionStatsDto, Long> {
public class StudentActionStatsService extends BaseService<StudentActionStats, Long> {
@Autowired
private StudentActionStatsMapper studentActionStatsMapper;

View File

@@ -2,7 +2,6 @@ package com.orange.demo.statsservice.service;
import com.orange.demo.statsservice.dao.*;
import com.orange.demo.statsservice.model.*;
import com.orange.demo.statsinterface.dto.*;
import com.orange.demo.courseclassinterface.client.*;
import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.object.MyRelationParam;
@@ -25,7 +24,7 @@ import java.util.*;
* @date 2020-08-08
*/
@Service
public class StudentActionTransService extends BaseService<StudentActionTrans, StudentActionTransDto, Long> {
public class StudentActionTransService extends BaseService<StudentActionTrans, Long> {
@Autowired
private StudentActionTransMapper studentActionTransMapper;