commit:1.5多应用版本

This commit is contained in:
Jerry
2021-03-31 09:43:36 +08:00
parent 060cb450be
commit 71d07cefb3
1343 changed files with 11695 additions and 71470 deletions

View File

@@ -18,7 +18,7 @@ import javax.sql.DataSource;
*/
@Configuration
@EnableTransactionManagement
@MapperScan(value = {"com.orange.demo.*.dao"})
@MapperScan(value = {"com.orange.demo.*.dao", "com.orange.demo.common.*.dao"})
public class DataSourceConfig {
@Bean(initMethod = "init", destroyMethod = "close")

View File

@@ -3,8 +3,8 @@ package com.orange.demo.statsservice.controller;
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.statsapi.dto.*;
import com.orange.demo.statsapi.vo.*;
import com.orange.demo.common.core.object.*;
import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
@@ -165,6 +165,20 @@ public class CourseTransStatsController extends BaseController<CourseTransStats,
return super.baseExistId(statsId);
}
/**
* 根据主键Id删除数据。
*
* @param statsId 主键Id。
* @return 删除数量。
*/
@ApiOperation(hidden = true, value = "deleteById")
@PostMapping("/deleteById")
public ResponseResult<Integer> deleteById(@RequestParam Long statsId) throws Exception {
CourseTransStats filter = new CourseTransStats();
filter.setStatsId(statsId);
return super.baseDeleteBy(filter);
}
/**
* 删除符合过滤条件的数据。
*

View File

@@ -3,8 +3,8 @@ package com.orange.demo.statsservice.controller;
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.statsapi.dto.*;
import com.orange.demo.statsapi.vo.*;
import com.orange.demo.common.core.object.*;
import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
@@ -165,6 +165,20 @@ public class StudentActionStatsController extends BaseController<StudentActionSt
return super.baseExistId(statsId);
}
/**
* 根据主键Id删除数据。
*
* @param statsId 主键Id。
* @return 删除数量。
*/
@ApiOperation(hidden = true, value = "deleteById")
@PostMapping("/deleteById")
public ResponseResult<Integer> deleteById(@RequestParam Long statsId) throws Exception {
StudentActionStats filter = new StudentActionStats();
filter.setStatsId(statsId);
return super.baseDeleteBy(filter);
}
/**
* 删除符合过滤条件的数据。
*

View File

@@ -3,8 +3,8 @@ package com.orange.demo.statsservice.controller;
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.statsapi.dto.*;
import com.orange.demo.statsapi.vo.*;
import com.orange.demo.common.core.object.*;
import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.constant.*;
@@ -223,6 +223,20 @@ public class StudentActionTransController extends BaseController<StudentActionTr
return super.baseExistId(transId);
}
/**
* 根据主键Id删除数据。
*
* @param transId 主键Id。
* @return 删除数量。
*/
@ApiOperation(hidden = true, value = "deleteById")
@PostMapping("/deleteById")
public ResponseResult<Integer> deleteById(@RequestParam Long transId) throws Exception {
StudentActionTrans filter = new StudentActionTrans();
filter.setTransId(transId);
return super.baseDeleteBy(filter);
}
/**
* 删除符合过滤条件的数据。
*

View File

@@ -13,11 +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">

View File

@@ -24,11 +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">

View File

@@ -18,11 +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">

View File

@@ -1,14 +1,14 @@
package com.orange.demo.statsservice.model;
import com.orange.demo.courseclassinterface.client.GradeClient;
import com.orange.demo.courseclassinterface.client.CourseClient;
import com.orange.demo.courseclassinterface.vo.CourseVo;
import com.orange.demo.courseclassinterface.vo.GradeVo;
import com.orange.demo.statsapi.vo.CourseTransStatsVo;
import com.orange.demo.courseclassapi.vo.CourseVo;
import com.orange.demo.courseclassapi.client.CourseClient;
import com.orange.demo.courseclassapi.vo.GradeVo;
import com.orange.demo.courseclassapi.client.GradeClient;
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.statsinterface.vo.CourseTransStatsVo;
import lombok.Data;
import org.mapstruct.*;
import org.mapstruct.factory.Mappers;

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.client.AreaCodeClient;
import com.orange.demo.courseclassinterface.vo.GradeVo;
import com.orange.demo.statsapi.vo.StudentActionStatsVo;
import com.orange.demo.courseclassapi.vo.AreaCodeVo;
import com.orange.demo.courseclassapi.vo.GradeVo;
import com.orange.demo.courseclassapi.client.AreaCodeClient;
import com.orange.demo.courseclassapi.client.GradeClient;
import com.orange.demo.common.core.annotation.RelationDict;
import com.orange.demo.common.core.base.mapper.BaseModelMapper;
import com.orange.demo.statsinterface.vo.StudentActionStatsVo;
import lombok.Data;
import org.mapstruct.*;
import org.mapstruct.factory.Mappers;

View File

@@ -1,15 +1,15 @@
package com.orange.demo.statsservice.model;
import com.orange.demo.courseclassinterface.client.GradeClient;
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.statsapi.vo.StudentActionTransVo;
import com.orange.demo.courseclassapi.client.SchoolInfoClient;
import com.orange.demo.courseclassapi.vo.SchoolInfoVo;
import com.orange.demo.courseclassapi.vo.GradeVo;
import com.orange.demo.courseclassapi.client.GradeClient;
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.statsinterface.vo.StudentActionTransVo;
import lombok.Data;
import org.mapstruct.*;
import org.mapstruct.factory.Mappers;

View File

@@ -7,6 +7,7 @@ import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.object.MyRelationParam;
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
import com.orange.demo.common.core.base.service.BaseService;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -77,7 +78,8 @@ public class CourseTransStatsServiceImpl extends BaseService<CourseTransStats, L
@Override
public List<CourseTransStats> getCourseTransStatsListWithRelation(CourseTransStats filter, String orderBy) {
List<CourseTransStats> resultList = courseTransStatsMapper.getCourseTransStatsList(null, null, filter, orderBy);
this.buildRelationForDataList(resultList, MyRelationParam.normal());
int batchSize = resultList instanceof Page ? 0 : 1000;
this.buildRelationForDataList(resultList, MyRelationParam.normal(), batchSize);
return resultList;
}
@@ -97,7 +99,8 @@ public class CourseTransStatsServiceImpl extends BaseService<CourseTransStats, L
String inFilterField, Set<M> inFilterValues, CourseTransStats filter, String orderBy) {
List<CourseTransStats> resultList =
courseTransStatsMapper.getCourseTransStatsList(inFilterField, inFilterValues, filter, orderBy);
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly());
int batchSize = resultList instanceof Page ? 0 : 1000;
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), batchSize);
return resultList;
}
@@ -115,9 +118,10 @@ public class CourseTransStatsServiceImpl extends BaseService<CourseTransStats, L
CourseTransStats filter, String groupSelect, String groupBy, String orderBy) {
List<CourseTransStats> resultList =
courseTransStatsMapper.getGroupedCourseTransStatsList(filter, groupSelect, groupBy, orderBy);
int batchSize = resultList instanceof Page ? 0 : 1000;
// NOTE: 这里只是包含了本地关联数据和远程关联数据,本地聚合计算数据和远程聚合计算数据没有包含。
// 主要原因是由于聚合字段通常被视为普通字段使用不会在group by的从句中出现语义上也不会在此关联。
this.buildRelationForDataList(resultList, MyRelationParam.normal());
this.buildRelationForDataList(resultList, MyRelationParam.normal(), batchSize);
return resultList;
}
}

View File

@@ -7,6 +7,7 @@ import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.object.MyRelationParam;
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
import com.orange.demo.common.core.base.service.BaseService;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -77,7 +78,8 @@ public class StudentActionStatsServiceImpl extends BaseService<StudentActionStat
@Override
public List<StudentActionStats> getStudentActionStatsListWithRelation(StudentActionStats filter, String orderBy) {
List<StudentActionStats> resultList = studentActionStatsMapper.getStudentActionStatsList(null, null, filter, orderBy);
this.buildRelationForDataList(resultList, MyRelationParam.normal());
int batchSize = resultList instanceof Page ? 0 : 1000;
this.buildRelationForDataList(resultList, MyRelationParam.normal(), batchSize);
return resultList;
}
@@ -97,7 +99,8 @@ public class StudentActionStatsServiceImpl extends BaseService<StudentActionStat
String inFilterField, Set<M> inFilterValues, StudentActionStats filter, String orderBy) {
List<StudentActionStats> resultList =
studentActionStatsMapper.getStudentActionStatsList(inFilterField, inFilterValues, filter, orderBy);
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly());
int batchSize = resultList instanceof Page ? 0 : 1000;
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), batchSize);
return resultList;
}
@@ -115,9 +118,10 @@ public class StudentActionStatsServiceImpl extends BaseService<StudentActionStat
StudentActionStats filter, String groupSelect, String groupBy, String orderBy) {
List<StudentActionStats> resultList =
studentActionStatsMapper.getGroupedStudentActionStatsList(filter, groupSelect, groupBy, orderBy);
int batchSize = resultList instanceof Page ? 0 : 1000;
// NOTE: 这里只是包含了本地关联数据和远程关联数据,本地聚合计算数据和远程聚合计算数据没有包含。
// 主要原因是由于聚合字段通常被视为普通字段使用不会在group by的从句中出现语义上也不会在此关联。
this.buildRelationForDataList(resultList, MyRelationParam.normal());
this.buildRelationForDataList(resultList, MyRelationParam.normal(), batchSize);
return resultList;
}
}

View File

@@ -3,7 +3,7 @@ package com.orange.demo.statsservice.service.impl;
import com.orange.demo.statsservice.service.*;
import com.orange.demo.statsservice.dao.*;
import com.orange.demo.statsservice.model.*;
import com.orange.demo.courseclassinterface.client.*;
import com.orange.demo.courseclassapi.client.*;
import com.orange.demo.common.core.util.*;
import com.orange.demo.common.core.object.MyRelationParam;
import com.orange.demo.common.core.object.ResponseResult;
@@ -11,6 +11,7 @@ import com.orange.demo.common.core.object.CallResult;
import com.orange.demo.common.core.base.dao.BaseDaoMapper;
import com.orange.demo.common.core.base.service.BaseService;
import com.orange.demo.common.sequence.wrapper.IdGeneratorWrapper;
import com.github.pagehelper.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -131,7 +132,8 @@ public class StudentActionTransServiceImpl extends BaseService<StudentActionTran
@Override
public List<StudentActionTrans> getStudentActionTransListWithRelation(StudentActionTrans filter, String orderBy) {
List<StudentActionTrans> resultList = studentActionTransMapper.getStudentActionTransList(null, null, filter, orderBy);
this.buildRelationForDataList(resultList, MyRelationParam.normal());
int batchSize = resultList instanceof Page ? 0 : 1000;
this.buildRelationForDataList(resultList, MyRelationParam.normal(), batchSize);
return resultList;
}
@@ -151,7 +153,8 @@ public class StudentActionTransServiceImpl extends BaseService<StudentActionTran
String inFilterField, Set<M> inFilterValues, StudentActionTrans filter, String orderBy) {
List<StudentActionTrans> resultList =
studentActionTransMapper.getStudentActionTransList(inFilterField, inFilterValues, filter, orderBy);
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly());
int batchSize = resultList instanceof Page ? 0 : 1000;
this.buildRelationForDataList(resultList, MyRelationParam.dictOnly(), batchSize);
return resultList;
}

View File

@@ -23,7 +23,7 @@
</property>
<property name="LOG_PATTERN_EX">
<!-- 下面注释中 %X{PtxId}, SpanId: %X{PspanId} 为PinPoint 中的traceid -->
[%-5p] [%d{YYYY-MM-dd HH:mm:ss}] 请求Id[%X{traceId}] [%t] ==> [TxId: %X{PtxId}, SpanId: %X{PspanId}] %msg%n
[%-5p] [%d{YYYY-MM-dd HH:mm:ss}] T:[%X{traceId}] S:[%X{sessionId}] U:[%X{userId}] [%t] ==> [TxId: %X{PtxId}, SpanId: %X{PspanId}] %msg%n
</property>
<!-- 日志保留天数 -->
<property name="EVERY_FILE_COUNT">31</property>