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:
@@ -26,11 +26,5 @@
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
<!-- knife4j 接口文档框架 -->
|
||||
<dependency>
|
||||
<groupId>com.orange.demo</groupId>
|
||||
<artifactId>common-swagger</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.orange.demo.common.core.config.FeignConfig;
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.statsinterface.dto.CourseTransStatsDto;
|
||||
import com.orange.demo.statsinterface.vo.CourseTransStatsVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -22,7 +23,7 @@ import java.util.*;
|
||||
name = "stats",
|
||||
configuration = FeignConfig.class,
|
||||
fallbackFactory = CourseTransStatsClient.CourseTransStatsClientFallbackFactory.class)
|
||||
public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto, Long> {
|
||||
public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto, CourseTransStatsVo, Long> {
|
||||
|
||||
/**
|
||||
* 基于主键的(In-list)条件获取远程数据接口。
|
||||
@@ -33,7 +34,7 @@ public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto,
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/listByIds")
|
||||
ResponseResult<List<CourseTransStatsDto>> listByIds(
|
||||
ResponseResult<List<CourseTransStatsVo>> listByIds(
|
||||
@RequestParam("statsIds") Set<Long> statsIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
@@ -46,7 +47,7 @@ public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto,
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/getById")
|
||||
ResponseResult<CourseTransStatsDto> getById(
|
||||
ResponseResult<CourseTransStatsVo> getById(
|
||||
@RequestParam("statsId") Long statsId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
@@ -98,7 +99,7 @@ public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto,
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/listBy")
|
||||
ResponseResult<List<CourseTransStatsDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
ResponseResult<MyPageData<CourseTransStatsVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
@@ -108,7 +109,7 @@ public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto,
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/getBy")
|
||||
ResponseResult<CourseTransStatsDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
ResponseResult<CourseTransStatsVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
@@ -119,7 +120,7 @@ public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto,
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/courseTransStats/listMapBy")
|
||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。
|
||||
@@ -144,7 +145,7 @@ public interface CourseTransStatsClient extends BaseClient<CourseTransStatsDto,
|
||||
@Component("StatsCourseTransStatsClientFallbackFactory")
|
||||
@Slf4j
|
||||
class CourseTransStatsClientFallbackFactory
|
||||
extends BaseFallbackFactory<CourseTransStatsDto, Long, CourseTransStatsClient> implements CourseTransStatsClient {
|
||||
extends BaseFallbackFactory<CourseTransStatsDto, CourseTransStatsVo, Long, CourseTransStatsClient> implements CourseTransStatsClient {
|
||||
|
||||
@Override
|
||||
public CourseTransStatsClient create(Throwable throwable) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.orange.demo.common.core.config.FeignConfig;
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.statsinterface.dto.StudentActionStatsDto;
|
||||
import com.orange.demo.statsinterface.vo.StudentActionStatsVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -22,7 +23,7 @@ import java.util.*;
|
||||
name = "stats",
|
||||
configuration = FeignConfig.class,
|
||||
fallbackFactory = StudentActionStatsClient.StudentActionStatsClientFallbackFactory.class)
|
||||
public interface StudentActionStatsClient extends BaseClient<StudentActionStatsDto, Long> {
|
||||
public interface StudentActionStatsClient extends BaseClient<StudentActionStatsDto, StudentActionStatsVo, Long> {
|
||||
|
||||
/**
|
||||
* 基于主键的(In-list)条件获取远程数据接口。
|
||||
@@ -33,7 +34,7 @@ public interface StudentActionStatsClient extends BaseClient<StudentActionStatsD
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/listByIds")
|
||||
ResponseResult<List<StudentActionStatsDto>> listByIds(
|
||||
ResponseResult<List<StudentActionStatsVo>> listByIds(
|
||||
@RequestParam("statsIds") Set<Long> statsIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
@@ -46,7 +47,7 @@ public interface StudentActionStatsClient extends BaseClient<StudentActionStatsD
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/getById")
|
||||
ResponseResult<StudentActionStatsDto> getById(
|
||||
ResponseResult<StudentActionStatsVo> getById(
|
||||
@RequestParam("statsId") Long statsId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
@@ -98,7 +99,7 @@ public interface StudentActionStatsClient extends BaseClient<StudentActionStatsD
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/listBy")
|
||||
ResponseResult<List<StudentActionStatsDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
ResponseResult<MyPageData<StudentActionStatsVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
@@ -108,7 +109,7 @@ public interface StudentActionStatsClient extends BaseClient<StudentActionStatsD
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/getBy")
|
||||
ResponseResult<StudentActionStatsDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
ResponseResult<StudentActionStatsVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
@@ -119,7 +120,7 @@ public interface StudentActionStatsClient extends BaseClient<StudentActionStatsD
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionStats/listMapBy")
|
||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。
|
||||
@@ -144,7 +145,7 @@ public interface StudentActionStatsClient extends BaseClient<StudentActionStatsD
|
||||
@Component("StatsStudentActionStatsClientFallbackFactory")
|
||||
@Slf4j
|
||||
class StudentActionStatsClientFallbackFactory
|
||||
extends BaseFallbackFactory<StudentActionStatsDto, Long, StudentActionStatsClient> implements StudentActionStatsClient {
|
||||
extends BaseFallbackFactory<StudentActionStatsDto, StudentActionStatsVo, Long, StudentActionStatsClient> implements StudentActionStatsClient {
|
||||
|
||||
@Override
|
||||
public StudentActionStatsClient create(Throwable throwable) {
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.orange.demo.common.core.config.FeignConfig;
|
||||
import com.orange.demo.common.core.base.client.BaseClient;
|
||||
import com.orange.demo.common.core.object.*;
|
||||
import com.orange.demo.statsinterface.dto.StudentActionTransDto;
|
||||
import com.orange.demo.statsinterface.vo.StudentActionTransVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -22,7 +23,7 @@ import java.util.*;
|
||||
name = "stats",
|
||||
configuration = FeignConfig.class,
|
||||
fallbackFactory = StudentActionTransClient.StudentActionTransClientFallbackFactory.class)
|
||||
public interface StudentActionTransClient extends BaseClient<StudentActionTransDto, Long> {
|
||||
public interface StudentActionTransClient extends BaseClient<StudentActionTransDto, StudentActionTransVo, Long> {
|
||||
|
||||
/**
|
||||
* 基于主键的(In-list)条件获取远程数据接口。
|
||||
@@ -33,7 +34,7 @@ public interface StudentActionTransClient extends BaseClient<StudentActionTransD
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/listByIds")
|
||||
ResponseResult<List<StudentActionTransDto>> listByIds(
|
||||
ResponseResult<List<StudentActionTransVo>> listByIds(
|
||||
@RequestParam("transIds") Set<Long> transIds,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
@@ -46,7 +47,7 @@ public interface StudentActionTransClient extends BaseClient<StudentActionTransD
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/getById")
|
||||
ResponseResult<StudentActionTransDto> getById(
|
||||
ResponseResult<StudentActionTransVo> getById(
|
||||
@RequestParam("transId") Long transId,
|
||||
@RequestParam("withDict") Boolean withDict);
|
||||
|
||||
@@ -98,7 +99,7 @@ public interface StudentActionTransClient extends BaseClient<StudentActionTransD
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/listBy")
|
||||
ResponseResult<List<StudentActionTransDto>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
ResponseResult<MyPageData<StudentActionTransVo>> listBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的单条数据对象。
|
||||
@@ -108,7 +109,7 @@ public interface StudentActionTransClient extends BaseClient<StudentActionTransD
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/getBy")
|
||||
ResponseResult<StudentActionTransDto> getBy(@RequestBody MyQueryParam queryParam);
|
||||
ResponseResult<StudentActionTransVo> getBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据列表。
|
||||
@@ -119,7 +120,7 @@ public interface StudentActionTransClient extends BaseClient<StudentActionTransD
|
||||
*/
|
||||
@Override
|
||||
@PostMapping("/studentActionTrans/listMapBy")
|
||||
ResponseResult<List<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
ResponseResult<MyPageData<Map<String, Object>>> listMapBy(@RequestBody MyQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 获取远程主对象中符合查询条件的数据数量。
|
||||
@@ -144,7 +145,7 @@ public interface StudentActionTransClient extends BaseClient<StudentActionTransD
|
||||
@Component("StatsStudentActionTransClientFallbackFactory")
|
||||
@Slf4j
|
||||
class StudentActionTransClientFallbackFactory
|
||||
extends BaseFallbackFactory<StudentActionTransDto, Long, StudentActionTransClient> implements StudentActionTransClient {
|
||||
extends BaseFallbackFactory<StudentActionTransDto, StudentActionTransVo, Long, StudentActionTransClient> implements StudentActionTransClient {
|
||||
|
||||
@Override
|
||||
public StudentActionTransClient create(Throwable throwable) {
|
||||
|
||||
@@ -4,14 +4,11 @@ import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.application.common.constant.Subject;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* CourseTransStatsDto对象。
|
||||
@@ -19,28 +16,24 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@ApiModel("CourseTransStatsDto实体对象")
|
||||
@Data
|
||||
public class CourseTransStatsDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id", required = true)
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long statsId;
|
||||
|
||||
/**
|
||||
* 统计日期。
|
||||
*/
|
||||
@ApiModelProperty(value = "统计日期", required = true)
|
||||
@NotNull(message = "数据验证失败,统计日期不能为空!")
|
||||
private Date statsDate;
|
||||
|
||||
/**
|
||||
* 科目Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "科目Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所属科目不能为空!")
|
||||
@ConstDictRef(constDictClass = Subject.class, message = "数据验证失败,所属科目为无效值!")
|
||||
private Integer subjectId;
|
||||
@@ -48,77 +41,50 @@ public class CourseTransStatsDto {
|
||||
/**
|
||||
* 年级Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "年级Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 年级名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "年级名称")
|
||||
private String gradeName;
|
||||
|
||||
/**
|
||||
* 课程Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "课程Id", required = true)
|
||||
@NotNull(message = "数据验证失败,课程ID不能为空!")
|
||||
private Long courseId;
|
||||
|
||||
/**
|
||||
* 课程名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
private String courseName;
|
||||
|
||||
/**
|
||||
* 学生上课次数。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生上课次数", required = true)
|
||||
@NotNull(message = "数据验证失败,上课次数不能为空!")
|
||||
private Integer studentAttendCount;
|
||||
|
||||
/**
|
||||
* 学生献花数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生献花数量", required = true)
|
||||
@NotNull(message = "数据验证失败,献花数量不能为空!")
|
||||
private Integer studentFlowerAmount;
|
||||
|
||||
/**
|
||||
* 学生献花次数。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生献花次数", required = true)
|
||||
@NotNull(message = "数据验证失败,献花次数不能为空!")
|
||||
private Integer studentFlowerCount;
|
||||
|
||||
/**
|
||||
* statsDate 范围过滤起始值(>=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "statsDate 范围过滤起始值(>=)")
|
||||
private String statsDateStart;
|
||||
|
||||
/**
|
||||
* statsDate 范围过滤结束值(<=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "statsDate 范围过滤结束值(<=)")
|
||||
private String statsDateEnd;
|
||||
|
||||
/**
|
||||
* gradeId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> gradeIdDictMap;
|
||||
|
||||
/**
|
||||
* courseId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> courseIdDictMap;
|
||||
|
||||
/**
|
||||
* subjectId 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> subjectIdDictMap;
|
||||
}
|
||||
|
||||
@@ -2,14 +2,11 @@ package com.orange.demo.statsinterface.dto;
|
||||
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* StudentActionStatsDto对象。
|
||||
@@ -17,183 +14,141 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@ApiModel("StudentActionStatsDto实体对象")
|
||||
@Data
|
||||
public class StudentActionStatsDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id", required = true)
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long statsId;
|
||||
|
||||
/**
|
||||
* 统计日期。
|
||||
*/
|
||||
@ApiModelProperty(value = "统计日期", required = true)
|
||||
@NotNull(message = "数据验证失败,统计日期不能为空!")
|
||||
private Date statsDate;
|
||||
|
||||
/**
|
||||
* 统计小时。
|
||||
*/
|
||||
@ApiModelProperty(value = "统计小时")
|
||||
private Date statsMonth;
|
||||
|
||||
/**
|
||||
* 年级Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "年级Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 学生所在省Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生所在省Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所在省份不能为空!")
|
||||
private Long provinceId;
|
||||
|
||||
/**
|
||||
* 学生所在城市Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生所在城市Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所在城市不能为空!")
|
||||
private Long cityId;
|
||||
|
||||
/**
|
||||
* 购课学币数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "购课学币数量", required = true)
|
||||
@NotNull(message = "数据验证失败,购课学币数量不能为空!")
|
||||
private Integer buyCourseAmount;
|
||||
|
||||
/**
|
||||
* 购买课程次数。
|
||||
*/
|
||||
@ApiModelProperty(value = "购买课程次数", required = true)
|
||||
@NotNull(message = "数据验证失败,购买课程次数不能为空!")
|
||||
private Integer buyCourseCount;
|
||||
|
||||
/**
|
||||
* 购买视频学币数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "购买视频学币数量", required = true)
|
||||
@NotNull(message = "数据验证失败,购买视频学币数量不能为空!")
|
||||
private Integer buyVideoAmount;
|
||||
|
||||
/**
|
||||
* 购买视频次数。
|
||||
*/
|
||||
@ApiModelProperty(value = "购买视频次数", required = true)
|
||||
@NotNull(message = "数据验证失败,购买视频次数不能为空!")
|
||||
private Integer buyVideoCount;
|
||||
|
||||
/**
|
||||
* 购买作业学币数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "购买作业学币数量", required = true)
|
||||
@NotNull(message = "数据验证失败,购买作业学币数量不能为空!")
|
||||
private Integer buyPaperAmount;
|
||||
|
||||
/**
|
||||
* 购买作业次数。
|
||||
*/
|
||||
@ApiModelProperty(value = "购买作业次数", required = true)
|
||||
@NotNull(message = "数据验证失败,购买作业次数不能为空!")
|
||||
private Integer buyPaperCount;
|
||||
|
||||
/**
|
||||
* 购买献花数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "购买献花数量", required = true)
|
||||
@NotNull(message = "数据验证失败,购买献花数量不能为空!")
|
||||
private Integer buyFlowerAmount;
|
||||
|
||||
/**
|
||||
* 购买献花次数。
|
||||
*/
|
||||
@ApiModelProperty(value = "购买献花次数", required = true)
|
||||
@NotNull(message = "数据验证失败,购买献花次数不能为空!")
|
||||
private Integer buyFlowerCount;
|
||||
|
||||
/**
|
||||
* 充值学币数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "充值学币数量", required = true)
|
||||
@NotNull(message = "数据验证失败,充值学币数量不能为空!")
|
||||
private Integer rechargeCoinAmount;
|
||||
|
||||
/**
|
||||
* 充值学币次数。
|
||||
*/
|
||||
@ApiModelProperty(value = "充值学币次数", required = true)
|
||||
@NotNull(message = "数据验证失败,充值学币次数不能为空!")
|
||||
private Integer rechargeCoinCount;
|
||||
|
||||
/**
|
||||
* 线下课程上课次数。
|
||||
*/
|
||||
@ApiModelProperty(value = "线下课程上课次数", required = true)
|
||||
@NotNull(message = "数据验证失败,线下课程上课次数不能为空!")
|
||||
private Integer doCourseCount;
|
||||
|
||||
/**
|
||||
* 观看视频次数。
|
||||
*/
|
||||
@ApiModelProperty(value = "观看视频次数", required = true)
|
||||
@NotNull(message = "数据验证失败,观看视频次数不能为空!")
|
||||
private Integer watchVideoCount;
|
||||
|
||||
/**
|
||||
* 购买献花消费学币数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "购买献花消费学币数量", required = true)
|
||||
@NotNull(message = "数据验证失败,购买献花消费学币数量不能为空!")
|
||||
private Integer watchVideoTotalSecond;
|
||||
|
||||
/**
|
||||
* 做题数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "做题数量", required = true)
|
||||
@NotNull(message = "数据验证失败,做题数量不能为空!")
|
||||
private Integer doExerciseCount;
|
||||
|
||||
/**
|
||||
* 做题正确的数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "做题正确的数量", required = true)
|
||||
@NotNull(message = "数据验证失败,做题正确的数量不能为空!")
|
||||
private Integer doExerciseCorrectCount;
|
||||
|
||||
/**
|
||||
* statsDate 范围过滤起始值(>=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "statsDate 范围过滤起始值(>=)")
|
||||
private String statsDateStart;
|
||||
|
||||
/**
|
||||
* statsDate 范围过滤结束值(<=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "statsDate 范围过滤结束值(<=)")
|
||||
private String statsDateEnd;
|
||||
|
||||
/**
|
||||
* gradeId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> gradeIdDictMap;
|
||||
|
||||
/**
|
||||
* provinceId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> provinceIdDictMap;
|
||||
|
||||
/**
|
||||
* cityId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> cityIdDictMap;
|
||||
}
|
||||
|
||||
@@ -5,14 +5,11 @@ import com.orange.demo.common.core.validator.ConstDictRef;
|
||||
import com.orange.demo.application.common.constant.StudentActionType;
|
||||
import com.orange.demo.application.common.constant.DeviceType;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* StudentActionTransDto对象。
|
||||
@@ -20,49 +17,42 @@ import java.util.Map;
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@ApiModel("StudentActionTransDto实体对象")
|
||||
@Data
|
||||
public class StudentActionTransDto {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "主键Id", required = true)
|
||||
@NotNull(message = "数据验证失败,主键Id不能为空!", groups = {UpdateGroup.class})
|
||||
private Long transId;
|
||||
|
||||
/**
|
||||
* 学生Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生Id", required = true)
|
||||
@NotNull(message = "数据验证失败,学生Id不能为空!")
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学生名称。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生名称", required = true)
|
||||
@NotBlank(message = "数据验证失败,学生名称不能为空!")
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 学生校区。
|
||||
*/
|
||||
@ApiModelProperty(value = "学生校区", required = true)
|
||||
@NotNull(message = "数据验证失败,学生校区不能为空!")
|
||||
private Long schoolId;
|
||||
|
||||
/**
|
||||
* 年级Id。
|
||||
*/
|
||||
@ApiModelProperty(value = "年级Id", required = true)
|
||||
@NotNull(message = "数据验证失败,所属年级不能为空!")
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 行为类型(0: 充值 1: 购课 2: 上课签到 3: 上课签退 4: 看视频课 5: 做作业 6: 刷题 7: 献花)。
|
||||
*/
|
||||
@ApiModelProperty(value = "行为类型(0: 充值 1: 购课 2: 上课签到 3: 上课签退 4: 看视频课 5: 做作业 6: 刷题 7: 献花)", required = true)
|
||||
@NotNull(message = "数据验证失败,行为类型不能为空!")
|
||||
@ConstDictRef(constDictClass = StudentActionType.class, message = "数据验证失败,行为类型为无效值!")
|
||||
private Integer actionType;
|
||||
@@ -70,7 +60,6 @@ public class StudentActionTransDto {
|
||||
/**
|
||||
* 设备类型(0: iOS 1: Android 2: PC)。
|
||||
*/
|
||||
@ApiModelProperty(value = "设备类型(0: iOS 1: Android 2: PC)", required = true)
|
||||
@NotNull(message = "数据验证失败,设备类型不能为空!")
|
||||
@ConstDictRef(constDictClass = DeviceType.class, message = "数据验证失败,设备类型为无效值!")
|
||||
private Integer deviceType;
|
||||
@@ -78,85 +67,51 @@ public class StudentActionTransDto {
|
||||
/**
|
||||
* 看视频秒数。
|
||||
*/
|
||||
@ApiModelProperty(value = "看视频秒数")
|
||||
private Integer watchVideoSeconds;
|
||||
|
||||
/**
|
||||
* 购买献花数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "购买献花数量")
|
||||
private Integer flowerCount;
|
||||
|
||||
/**
|
||||
* 购买作业数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "购买作业数量")
|
||||
private Integer paperCount;
|
||||
|
||||
/**
|
||||
* 购买视频数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "购买视频数量")
|
||||
private Integer videoCount;
|
||||
|
||||
/**
|
||||
* 购买课程数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "购买课程数量")
|
||||
private Integer courseCount;
|
||||
|
||||
/**
|
||||
* 充值学币数量。
|
||||
*/
|
||||
@ApiModelProperty(value = "充值学币数量")
|
||||
private Integer coinCount;
|
||||
|
||||
/**
|
||||
* 做题是否正确标记。
|
||||
*/
|
||||
@ApiModelProperty(value = "做题是否正确标记")
|
||||
private Integer exerciseCorrectFlag;
|
||||
|
||||
/**
|
||||
* 发生时间。
|
||||
*/
|
||||
@ApiModelProperty(value = "发生时间", required = true)
|
||||
@NotNull(message = "数据验证失败,发生时间不能为空!")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* createTime 范围过滤起始值(>=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "createTime 范围过滤起始值(>=)")
|
||||
private String createTimeStart;
|
||||
|
||||
/**
|
||||
* createTime 范围过滤结束值(<=)。
|
||||
*/
|
||||
@ApiModelProperty(value = "createTime 范围过滤结束值(<=)")
|
||||
private String createTimeEnd;
|
||||
|
||||
/**
|
||||
* schoolId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> schoolIdDictMap;
|
||||
|
||||
/**
|
||||
* gradeId 字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> gradeIdDictMap;
|
||||
|
||||
/**
|
||||
* actionType 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> actionTypeDictMap;
|
||||
|
||||
/**
|
||||
* deviceType 常量字典关联数据。
|
||||
*/
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Map<String, Object> deviceTypeDictMap;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.orange.demo.statsinterface.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* CourseTransStatsVO对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
public class CourseTransStatsVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
private Long statsId;
|
||||
|
||||
/**
|
||||
* 统计日期。
|
||||
*/
|
||||
private Date statsDate;
|
||||
|
||||
/**
|
||||
* 科目Id。
|
||||
*/
|
||||
private Integer subjectId;
|
||||
|
||||
/**
|
||||
* 年级Id。
|
||||
*/
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 年级名称。
|
||||
*/
|
||||
private String gradeName;
|
||||
|
||||
/**
|
||||
* 课程Id。
|
||||
*/
|
||||
private Long courseId;
|
||||
|
||||
/**
|
||||
* 课程名称。
|
||||
*/
|
||||
private String courseName;
|
||||
|
||||
/**
|
||||
* 学生上课次数。
|
||||
*/
|
||||
private Integer studentAttendCount;
|
||||
|
||||
/**
|
||||
* 学生献花数量。
|
||||
*/
|
||||
private Integer studentFlowerAmount;
|
||||
|
||||
/**
|
||||
* 学生献花次数。
|
||||
*/
|
||||
private Integer studentFlowerCount;
|
||||
|
||||
/**
|
||||
* gradeId 字典关联数据。
|
||||
*/
|
||||
private Map<String, Object> gradeIdDictMap;
|
||||
|
||||
/**
|
||||
* courseId 字典关联数据。
|
||||
*/
|
||||
private Map<String, Object> courseIdDictMap;
|
||||
|
||||
/**
|
||||
* subjectId 常量字典关联数据。
|
||||
*/
|
||||
private Map<String, Object> subjectIdDictMap;
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.orange.demo.statsinterface.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* StudentActionStatsVO对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
public class StudentActionStatsVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
private Long statsId;
|
||||
|
||||
/**
|
||||
* 统计日期。
|
||||
*/
|
||||
private Date statsDate;
|
||||
|
||||
/**
|
||||
* 统计小时。
|
||||
*/
|
||||
private Date statsMonth;
|
||||
|
||||
/**
|
||||
* 年级Id。
|
||||
*/
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 学生所在省Id。
|
||||
*/
|
||||
private Long provinceId;
|
||||
|
||||
/**
|
||||
* 学生所在城市Id。
|
||||
*/
|
||||
private Long cityId;
|
||||
|
||||
/**
|
||||
* 购课学币数量。
|
||||
*/
|
||||
private Integer buyCourseAmount;
|
||||
|
||||
/**
|
||||
* 购买课程次数。
|
||||
*/
|
||||
private Integer buyCourseCount;
|
||||
|
||||
/**
|
||||
* 购买视频学币数量。
|
||||
*/
|
||||
private Integer buyVideoAmount;
|
||||
|
||||
/**
|
||||
* 购买视频次数。
|
||||
*/
|
||||
private Integer buyVideoCount;
|
||||
|
||||
/**
|
||||
* 购买作业学币数量。
|
||||
*/
|
||||
private Integer buyPaperAmount;
|
||||
|
||||
/**
|
||||
* 购买作业次数。
|
||||
*/
|
||||
private Integer buyPaperCount;
|
||||
|
||||
/**
|
||||
* 购买献花数量。
|
||||
*/
|
||||
private Integer buyFlowerAmount;
|
||||
|
||||
/**
|
||||
* 购买献花次数。
|
||||
*/
|
||||
private Integer buyFlowerCount;
|
||||
|
||||
/**
|
||||
* 充值学币数量。
|
||||
*/
|
||||
private Integer rechargeCoinAmount;
|
||||
|
||||
/**
|
||||
* 充值学币次数。
|
||||
*/
|
||||
private Integer rechargeCoinCount;
|
||||
|
||||
/**
|
||||
* 线下课程上课次数。
|
||||
*/
|
||||
private Integer doCourseCount;
|
||||
|
||||
/**
|
||||
* 观看视频次数。
|
||||
*/
|
||||
private Integer watchVideoCount;
|
||||
|
||||
/**
|
||||
* 购买献花消费学币数量。
|
||||
*/
|
||||
private Integer watchVideoTotalSecond;
|
||||
|
||||
/**
|
||||
* 做题数量。
|
||||
*/
|
||||
private Integer doExerciseCount;
|
||||
|
||||
/**
|
||||
* 做题正确的数量。
|
||||
*/
|
||||
private Integer doExerciseCorrectCount;
|
||||
|
||||
/**
|
||||
* gradeId 字典关联数据。
|
||||
*/
|
||||
private Map<String, Object> gradeIdDictMap;
|
||||
|
||||
/**
|
||||
* provinceId 字典关联数据。
|
||||
*/
|
||||
private Map<String, Object> provinceIdDictMap;
|
||||
|
||||
/**
|
||||
* cityId 字典关联数据。
|
||||
*/
|
||||
private Map<String, Object> cityIdDictMap;
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.orange.demo.statsinterface.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* StudentActionTransVO对象。
|
||||
*
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Data
|
||||
public class StudentActionTransVo {
|
||||
|
||||
/**
|
||||
* 主键Id。
|
||||
*/
|
||||
private Long transId;
|
||||
|
||||
/**
|
||||
* 学生Id。
|
||||
*/
|
||||
private Long studentId;
|
||||
|
||||
/**
|
||||
* 学生名称。
|
||||
*/
|
||||
private String studentName;
|
||||
|
||||
/**
|
||||
* 学生校区。
|
||||
*/
|
||||
private Long schoolId;
|
||||
|
||||
/**
|
||||
* 年级Id。
|
||||
*/
|
||||
private Integer gradeId;
|
||||
|
||||
/**
|
||||
* 行为类型(0: 充值 1: 购课 2: 上课签到 3: 上课签退 4: 看视频课 5: 做作业 6: 刷题 7: 献花)。
|
||||
*/
|
||||
private Integer actionType;
|
||||
|
||||
/**
|
||||
* 设备类型(0: iOS 1: Android 2: PC)。
|
||||
*/
|
||||
private Integer deviceType;
|
||||
|
||||
/**
|
||||
* 看视频秒数。
|
||||
*/
|
||||
private Integer watchVideoSeconds;
|
||||
|
||||
/**
|
||||
* 购买献花数量。
|
||||
*/
|
||||
private Integer flowerCount;
|
||||
|
||||
/**
|
||||
* 购买作业数量。
|
||||
*/
|
||||
private Integer paperCount;
|
||||
|
||||
/**
|
||||
* 购买视频数量。
|
||||
*/
|
||||
private Integer videoCount;
|
||||
|
||||
/**
|
||||
* 购买课程数量。
|
||||
*/
|
||||
private Integer courseCount;
|
||||
|
||||
/**
|
||||
* 充值学币数量。
|
||||
*/
|
||||
private Integer coinCount;
|
||||
|
||||
/**
|
||||
* 做题是否正确标记。
|
||||
*/
|
||||
private Integer exerciseCorrectFlag;
|
||||
|
||||
/**
|
||||
* 发生时间。
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* schoolId 字典关联数据。
|
||||
*/
|
||||
private Map<String, Object> schoolIdDictMap;
|
||||
|
||||
/**
|
||||
* gradeId 字典关联数据。
|
||||
*/
|
||||
private Map<String, Object> gradeIdDictMap;
|
||||
|
||||
/**
|
||||
* actionType 常量字典关联数据。
|
||||
*/
|
||||
private Map<String, Object> actionTypeDictMap;
|
||||
|
||||
/**
|
||||
* deviceType 常量字典关联数据。
|
||||
*/
|
||||
private Map<String, Object> deviceTypeDictMap;
|
||||
}
|
||||
@@ -91,24 +91,6 @@
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||
<orderEntry type="module" module-name="common-swagger" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-micro-spring-boot-starter:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-autoconfigure:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-annotations:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-core:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.25.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.2.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.2.1" level="project" />
|
||||
@@ -265,7 +247,7 @@
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
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.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -25,17 +23,16 @@ import java.util.*;
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Api(tags = "课程统计管理接口")
|
||||
@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 +45,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 +69,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 +83,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 +98,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 +107,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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -128,9 +118,8 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
@@ -142,9 +131,8 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
@@ -155,7 +143,6 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
||||
* @param statsIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existIds")
|
||||
@PostMapping("/existIds")
|
||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> statsIds) {
|
||||
return super.baseExistIds(statsIds);
|
||||
@@ -167,7 +154,6 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
||||
* @param statsId 主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existId")
|
||||
@PostMapping("/existId")
|
||||
public ResponseResult<Boolean> existId(@RequestParam Long statsId) {
|
||||
return super.baseExistId(statsId);
|
||||
@@ -179,33 +165,30 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
||||
* @param filter 过滤对象。
|
||||
* @return 删除数量。
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -215,9 +198,8 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -227,7 +209,6 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "countBy")
|
||||
@PostMapping("/countBy")
|
||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseCountBy(queryParam);
|
||||
@@ -239,7 +220,6 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
||||
@PostMapping("/aggregateBy")
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||
return super.baseAggregateBy(aggregationParam);
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
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.*;
|
||||
import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -25,17 +23,16 @@ import java.util.*;
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Api(tags = "学生行为统计管理接口")
|
||||
@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 +45,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 +69,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 +83,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 +98,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 +107,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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -128,9 +118,8 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
@@ -142,9 +131,8 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
@@ -155,7 +143,6 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
||||
* @param statsIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existIds")
|
||||
@PostMapping("/existIds")
|
||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> statsIds) {
|
||||
return super.baseExistIds(statsIds);
|
||||
@@ -167,7 +154,6 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
||||
* @param statsId 主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existId")
|
||||
@PostMapping("/existId")
|
||||
public ResponseResult<Boolean> existId(@RequestParam Long statsId) {
|
||||
return super.baseExistId(statsId);
|
||||
@@ -179,33 +165,30 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
||||
* @param filter 过滤对象。
|
||||
* @return 删除数量。
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -215,9 +198,8 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -227,7 +209,6 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "countBy")
|
||||
@PostMapping("/countBy")
|
||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseCountBy(queryParam);
|
||||
@@ -239,7 +220,6 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
||||
@PostMapping("/aggregateBy")
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||
return super.baseAggregateBy(aggregationParam);
|
||||
|
||||
@@ -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.*;
|
||||
@@ -12,9 +12,6 @@ import com.orange.demo.common.core.base.controller.BaseController;
|
||||
import com.orange.demo.common.core.base.service.BaseService;
|
||||
import com.orange.demo.common.core.annotation.MyRequestBody;
|
||||
import com.orange.demo.common.core.validator.UpdateGroup;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -28,17 +25,16 @@ import java.util.*;
|
||||
* @author Jerry
|
||||
* @date 2020-08-08
|
||||
*/
|
||||
@Api(tags = "学生行为流水管理接口")
|
||||
@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;
|
||||
}
|
||||
|
||||
@@ -48,17 +44,13 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
||||
* @param studentActionTransDto 新增对象。
|
||||
* @return 应答结果对象,包含新增对象主键Id。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {
|
||||
"studentActionTrans.transId",
|
||||
"studentActionTrans.createTimeStart",
|
||||
"studentActionTrans.createTimeEnd"})
|
||||
@PostMapping("/add")
|
||||
public ResponseResult<Long> add(@MyRequestBody("studentActionTrans") StudentActionTransDto studentActionTransDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(studentActionTransDto);
|
||||
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()) {
|
||||
@@ -75,16 +67,13 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
||||
* @param studentActionTransDto 更新对象。
|
||||
* @return 应答结果对象。
|
||||
*/
|
||||
@ApiOperationSupport(ignoreParameters = {
|
||||
"studentActionTrans.createTimeStart",
|
||||
"studentActionTrans.createTimeEnd"})
|
||||
@PostMapping("/update")
|
||||
public ResponseResult<Void> update(@MyRequestBody("studentActionTrans") StudentActionTransDto studentActionTransDto) {
|
||||
String errorMessage = MyCommonUtil.getModelValidationError(studentActionTransDto, Default.class, UpdateGroup.class);
|
||||
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 +127,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 +148,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 +157,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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -186,9 +168,8 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象集合。
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
@@ -200,9 +181,8 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
||||
* @param withDict 是否包含字典关联。
|
||||
* @return 应答结果对象,包含主对象数据。
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
@@ -213,7 +193,6 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
||||
* @param transIds 主键Id集合。
|
||||
* @return 应答结果对象,包含true全部存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existIds")
|
||||
@PostMapping("/existIds")
|
||||
public ResponseResult<Boolean> existIds(@RequestParam Set<Long> transIds) {
|
||||
return super.baseExistIds(transIds);
|
||||
@@ -225,7 +204,6 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
||||
* @param transId 主键Id。
|
||||
* @return 应答结果对象,包含true表示存在,否则false。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "existId")
|
||||
@PostMapping("/existId")
|
||||
public ResponseResult<Boolean> existId(@RequestParam Long transId) {
|
||||
return super.baseExistId(transId);
|
||||
@@ -237,33 +215,30 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
||||
* @param filter 过滤对象。
|
||||
* @return 删除数量。
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -273,9 +248,8 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含符合查询过滤条件的对象结果集。
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -285,7 +259,6 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
||||
* @param queryParam 查询参数。
|
||||
* @return 应答结果对象,包含结果数量。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "countBy")
|
||||
@PostMapping("/countBy")
|
||||
public ResponseResult<Integer> countBy(@RequestBody MyQueryParam queryParam) {
|
||||
return super.baseCountBy(queryParam);
|
||||
@@ -297,7 +270,6 @@ public class StudentActionTransController extends BaseController<StudentActionTr
|
||||
* @param aggregationParam 聚合参数。
|
||||
* @return 应该结果对象,包含聚合计算后的分组Map列表。
|
||||
*/
|
||||
@ApiOperation(hidden = true, value = "aggregateBy")
|
||||
@PostMapping("/aggregateBy")
|
||||
public ResponseResult<List<Map<String, Object>>> aggregateBy(@RequestBody MyAggregationParam aggregationParam) {
|
||||
return super.baseAggregateBy(aggregationParam);
|
||||
|
||||
@@ -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 >= #{courseTransStatsFilter.statsDateStart}
|
||||
|
||||
@@ -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 >= #{studentActionStatsFilter.statsDateStart}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -59,9 +59,6 @@
|
||||
<Root level="${OUTPUT_LOG_LEVEL}">
|
||||
<AppenderRef ref="console"/>
|
||||
</Root>
|
||||
<Logger name="springfox.documentation" additivity="false" level="error">
|
||||
<AppenderRef ref="console"/>
|
||||
</Logger>
|
||||
<!-- AsyncLogger 是基于Disruptor的全量异步队列,性能极高,队列默认大小4096。-->
|
||||
<!-- 队列默认值可通过JVM参数设置,参考博客:https://www.jianshu.com/p/82469047acbf -->
|
||||
<AsyncLogger name="com.orange.demo" additivity="false" level="info">
|
||||
|
||||
@@ -89,23 +89,6 @@
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||
<orderEntry type="module" module-name="common-swagger" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-micro-spring-boot-starter:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring-boot-autoconfigure:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-spring:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-annotations:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.xiaoymin:knife4j-core:2.0.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.22" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.9.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.9.2" level="project" />
|
||||
<orderEntry type="module" module-name="course-class-interface" />
|
||||
<orderEntry type="module" module-name="common-redis" />
|
||||
<orderEntry type="library" name="Maven: redis.clients:jedis:3.1.0" level="project" />
|
||||
|
||||
Reference in New Issue
Block a user