Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rpc-dj-strategy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3f7c4c28
authored
Jan 24, 2026
by
谢海旭
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
v5.6.0版本 策略中心:学习类详情接口实现
1 parent
8e0877ee
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
10 deletions
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/StrategyInfoService.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/StrategyStaffMessageService.java
rpc-dj-strategy/src/main/resources/META-INF/orm/StrategyCourseRelMapper.xml
rpc-dj-strategy/src/main/resources/META-INF/orm/StrategyStaffRelMapper.xml
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/StrategyInfoService.java
View file @
3f7c4c2
...
@@ -35,8 +35,6 @@ import cn.hutool.core.util.ObjectUtil;
...
@@ -35,8 +35,6 @@ import cn.hutool.core.util.ObjectUtil;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.oreframework.boot.env.OrePropertyConfigurer
;
import
org.oreframework.boot.env.OrePropertyConfigurer
;
import
org.oreframework.distribute.lock.annotation.GlsxDistributeLockable
;
import
org.oreframework.distribute.lock.annotation.GlsxDistributeLockable
;
...
@@ -301,6 +299,7 @@ public class StrategyInfoService {
...
@@ -301,6 +299,7 @@ public class StrategyInfoService {
/**
/**
* 使用分布式锁处理策略推送
* 使用分布式锁处理策略推送
* @param strategyStaffRel 策略人员关联信息
* @param strategyStaffRel 策略人员关联信息
* @param reminderType 提醒类型 ReminderTypeEnums
*/
*/
@GlsxDistributeLockable
(
name
=
"'StrategyInfoService_processStrategyPush_' + #strategyStaffRel.id"
,
@GlsxDistributeLockable
(
name
=
"'StrategyInfoService_processStrategyPush_' + #strategyStaffRel.id"
,
time
=
5
,
timeUnit
=
TimeUnit
.
MINUTES
,
timeoutException
=
RpcServiceException
.
class
time
=
5
,
timeUnit
=
TimeUnit
.
MINUTES
,
timeoutException
=
RpcServiceException
.
class
...
...
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/StrategyStaffMessageService.java
View file @
3f7c4c2
...
@@ -98,7 +98,7 @@ public class StrategyStaffMessageService {
...
@@ -98,7 +98,7 @@ public class StrategyStaffMessageService {
Map
<
Integer
,
LearningRecord
>
learningRecordMap
=
new
HashMap
<>();
Map
<
Integer
,
LearningRecord
>
learningRecordMap
=
new
HashMap
<>();
List
<
LearningRecord
>
learningRecords
=
learningRecordMapper
.
queryLearningRecordList
(
recordIdList
,
Collections
.
singletonList
(
staffMessage
.
getUuid
()));
List
<
LearningRecord
>
learningRecords
=
learningRecordMapper
.
queryLearningRecordList
(
recordIdList
,
Collections
.
singletonList
(
staffMessage
.
getUuid
()));
if
(
CollectionUtils
.
isNotEmpty
(
learningRecords
))
{
if
(
CollectionUtils
.
isNotEmpty
(
learningRecords
))
{
learningRecords
.
stream
().
map
(
learningRecord
->
learningRecordMap
.
put
(
Integer
.
valueOf
(
learningRecord
.
getRecordingId
()),
learningRecord
));
learningRecords
.
forEach
(
learningRecord
->
learningRecordMap
.
put
(
Integer
.
valueOf
(
learningRecord
.
getRecordingId
()),
learningRecord
));
}
}
LearningEffectAnalysisRequest
condition
=
new
LearningEffectAnalysisRequest
();
LearningEffectAnalysisRequest
condition
=
new
LearningEffectAnalysisRequest
();
...
@@ -139,14 +139,14 @@ public class StrategyStaffMessageService {
...
@@ -139,14 +139,14 @@ public class StrategyStaffMessageService {
Map
<
String
,
BeiSenCourseStaff
>
beisenCourseStaffMap
=
new
HashMap
<>();
Map
<
String
,
BeiSenCourseStaff
>
beisenCourseStaffMap
=
new
HashMap
<>();
List
<
BeiSenCourseStaff
>
beisenCourseStaffs
=
strategyCourseRelService
.
queryCourseLearnSituation
(
strategyStaffRel
.
getBeisenUserId
(),
courseIdList
);
List
<
BeiSenCourseStaff
>
beisenCourseStaffs
=
strategyCourseRelService
.
queryCourseLearnSituation
(
strategyStaffRel
.
getBeisenUserId
(),
courseIdList
);
if
(
CollectionUtils
.
isNotEmpty
(
beisenCourseStaffs
))
{
if
(
CollectionUtils
.
isNotEmpty
(
beisenCourseStaffs
))
{
beisenCourseStaffs
.
stream
().
map
(
beisenCourseStaff
->
beisenCourseStaffMap
.
put
(
beisenCourseStaff
.
getCourseId
(),
beisenCourseStaff
));
beisenCourseStaffs
.
forEach
(
beisenCourseStaff
->
beisenCourseStaffMap
.
put
(
beisenCourseStaff
.
getCourseId
(),
beisenCourseStaff
));
}
}
// 查询课程详情
// 查询课程详情
Map
<
String
,
BeiSenCourse
>
courseMap
=
new
HashMap
<>();
Map
<
String
,
BeiSenCourse
>
courseMap
=
new
HashMap
<>();
List
<
BeiSenCourse
>
courseDetails
=
strategyCourseRelService
.
queryCourseDetail
(
courseIdList
);
List
<
BeiSenCourse
>
courseDetails
=
strategyCourseRelService
.
queryCourseDetail
(
courseIdList
);
if
(
CollectionUtils
.
isNotEmpty
(
courseDetails
))
{
if
(
CollectionUtils
.
isNotEmpty
(
courseDetails
))
{
courseDetails
.
stream
().
map
(
courseDetail
->
courseMap
.
put
(
courseDetail
.
getId
(),
courseDetail
));
courseDetails
.
forEach
(
courseDetail
->
courseMap
.
put
(
courseDetail
.
getId
(),
courseDetail
));
}
}
// 封装数据返回
// 封装数据返回
...
...
rpc-dj-strategy/src/main/resources/META-INF/orm/StrategyCourseRelMapper.xml
View file @
3f7c4c2
...
@@ -15,6 +15,67 @@
...
@@ -15,6 +15,67 @@
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
</resultMap>
</resultMap>
<resultMap
id=
"beiSenCourseStaffResultMap"
type=
"cn.com.glsx.dj.riskmanage.model.course.BeiSenCourseStaff"
autoMapping=
"true"
>
<id
column=
"id"
property=
"id"
jdbcType=
"VARCHAR"
/>
<result
column=
"user_id"
property=
"userId"
jdbcType=
"INTEGER"
/>
<result
column=
"course_id"
property=
"courseId"
jdbcType=
"VARCHAR"
/>
<result
column=
"required_or_optional"
property=
"requiredOrOptional"
jdbcType=
"VARCHAR"
/>
<result
column=
"learn_status"
property=
"learnStatus"
jdbcType=
"VARCHAR"
/>
<result
column=
"process"
property=
"process"
jdbcType=
"DECIMAL"
/>
<result
column=
"learn_duration"
property=
"learnDuration"
jdbcType=
"DECIMAL"
/>
<result
column=
"earned_credit"
property=
"earnedCredit"
jdbcType=
"DECIMAL"
/>
<result
column=
"is_marked_finish"
property=
"isMarkedFinish"
jdbcType=
"BOOLEAN"
/>
<result
column=
"learn_certificate_get_status"
property=
"learnCertificateGetStatus"
jdbcType=
"BOOLEAN"
/>
<result
column=
"get_medal"
property=
"getMedal"
jdbcType=
"BOOLEAN"
/>
<result
column=
"learn_start_time"
property=
"learnStartTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"learn_end_time"
property=
"learnEndTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"total_score"
property=
"totalScore"
jdbcType=
"DECIMAL"
/>
<result
column=
"modified_time"
property=
"modifiedTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"beisen_created_time"
property=
"beisenCreatedTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"beisen_created_by"
property=
"beisenCreatedBy"
jdbcType=
"INTEGER"
/>
<result
column=
"ext_fields"
property=
"extFields"
jdbcType=
"LONGVARCHAR"
/>
<result
column=
"created_time"
property=
"createdTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"created_by"
property=
"createdBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"updated_time"
property=
"updatedTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_by"
property=
"updatedBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
</resultMap>
<resultMap
id=
"beiSenCourseResultMap"
type=
"cn.com.glsx.dj.riskmanage.model.course.BeiSenCourse"
autoMapping=
"true"
>
<id
column=
"id"
property=
"id"
jdbcType=
"VARCHAR"
/>
<result
column=
"title"
property=
"title"
jdbcType=
"VARCHAR"
/>
<result
column=
"catalog"
property=
"catalog"
jdbcType=
"VARCHAR"
/>
<result
column=
"organization"
property=
"organization"
jdbcType=
"INTEGER"
/>
<result
column=
"course_sources"
property=
"courseSources"
jdbcType=
"VARCHAR"
/>
<result
column=
"common_course"
property=
"commonCourse"
jdbcType=
"VARCHAR"
/>
<result
column=
"is_enable_hangup"
property=
"isEnableHangup"
jdbcType=
"BOOLEAN"
/>
<result
column=
"is_open"
property=
"isOpen"
jdbcType=
"VARCHAR"
/>
<result
column=
"share_type"
property=
"shareType"
jdbcType=
"VARCHAR"
/>
<result
column=
"total_chapter"
property=
"totalChapter"
jdbcType=
"INTEGER"
/>
<result
column=
"total_credit"
property=
"totalCredit"
jdbcType=
"DECIMAL"
/>
<result
column=
"total_duration"
property=
"totalDuration"
jdbcType=
"DECIMAL"
/>
<result
column=
"total_duration_second"
property=
"totalDurationSecond"
jdbcType=
"DECIMAL"
/>
<result
column=
"total_star"
property=
"totalStar"
jdbcType=
"DECIMAL"
/>
<result
column=
"learn_total"
property=
"learnTotal"
jdbcType=
"INTEGER"
/>
<result
column=
"learn_count"
property=
"learnCount"
jdbcType=
"INTEGER"
/>
<result
column=
"page_view"
property=
"pageView"
jdbcType=
"INTEGER"
/>
<result
column=
"course_status"
property=
"courseStatus"
jdbcType=
"VARCHAR"
/>
<result
column=
"course_file_type"
property=
"courseFileType"
jdbcType=
"VARCHAR"
/>
<result
column=
"recommend_status"
property=
"recommendStatus"
jdbcType=
"VARCHAR"
/>
<result
column=
"lecturer"
property=
"lecturer"
jdbcType=
"VARCHAR"
/>
<result
column=
"recommend_time"
property=
"recommendTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"modified_time"
property=
"modifiedTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"publish_time"
property=
"publishTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"beisen_created_time"
property=
"beisenCreatedTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"beisen_created_by"
property=
"beisenCreatedBy"
jdbcType=
"INTEGER"
/>
<result
column=
"created_time"
property=
"createdTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"created_by"
property=
"createdBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"updated_time"
property=
"updatedTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_by"
property=
"updatedBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
...
@@ -38,7 +99,7 @@
...
@@ -38,7 +99,7 @@
WHERE cr.strategy_id = #{strategyId,jdbcType=INTEGER}
WHERE cr.strategy_id = #{strategyId,jdbcType=INTEGER}
AND cr.deleted_flag = 'N'
AND cr.deleted_flag = 'N'
</select>
</select>
<select
id=
"queryCourseLearnSituation"
result
Type=
"cn.com.glsx.dj.riskmanage.model.course.BeiSenCourseStaff
"
>
<select
id=
"queryCourseLearnSituation"
result
Map=
"beiSenCourseStaffResultMap
"
>
SELECT
SELECT
*
*
FROM dj_beisen_course_staff
FROM dj_beisen_course_staff
...
@@ -50,7 +111,7 @@
...
@@ -50,7 +111,7 @@
</foreach>
</foreach>
</select>
</select>
<select
id=
"queryCourseDetail"
result
Type=
"cn.com.glsx.dj.riskmanage.model.course.BeiSenCourse
"
>
<select
id=
"queryCourseDetail"
result
Map=
"beiSenCourseResultMap
"
>
SELECT
SELECT
*
*
FROM dj_beisen_course
FROM dj_beisen_course
...
...
rpc-dj-strategy/src/main/resources/META-INF/orm/StrategyStaffRelMapper.xml
View file @
3f7c4c2
...
@@ -9,18 +9,21 @@
...
@@ -9,18 +9,21 @@
<result
column=
"strategy_id"
property=
"strategyId"
jdbcType=
"INTEGER"
/>
<result
column=
"strategy_id"
property=
"strategyId"
jdbcType=
"INTEGER"
/>
<result
column=
"user_uuid"
property=
"userUuid"
jdbcType=
"VARCHAR"
/>
<result
column=
"user_uuid"
property=
"userUuid"
jdbcType=
"VARCHAR"
/>
<result
column=
"user_name"
property=
"userName"
jdbcType=
"VARCHAR"
/>
<result
column=
"user_name"
property=
"userName"
jdbcType=
"VARCHAR"
/>
<result
column=
"user_phone"
property=
"userPhone"
jdbcType=
"VARCHAR"
/>
<result
column=
"created_by"
property=
"createdBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"created_by"
property=
"createdBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"created_date"
property=
"createdDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"created_date"
property=
"createdDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_by"
property=
"updatedBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"updated_by"
property=
"updatedBy"
jdbcType=
"VARCHAR"
/>
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"updated_date"
property=
"updatedDate"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
<result
column=
"deleted_flag"
property=
"deletedFlag"
jdbcType=
"CHAR"
/>
<result
column=
"user_position"
property=
"userPosition"
jdbcType=
"CHAR"
/>
<result
column=
"beisen_userid"
property=
"beisenUserId"
jdbcType=
"CHAR"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--
<!--
WARNING - @mbg.generated
WARNING - @mbg.generated
-->
-->
id, strategy_id, user_uuid, user_name,
created_by, created_date, updated_by, updated_date,
id, strategy_id, user_uuid, user_name,
user_phone, created_by, created_date, updated_by, updated_date,
deleted_flag
deleted_flag
, user_position, beisen_userid
</sql>
</sql>
<select
id=
"selectByStrategyId"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByStrategyId"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
...
@@ -30,7 +33,7 @@
...
@@ -30,7 +33,7 @@
WHERE strategy_id = #{strategyId,jdbcType=INTEGER}
WHERE strategy_id = #{strategyId,jdbcType=INTEGER}
AND deleted_flag = 'N'
AND deleted_flag = 'N'
</select>
</select>
<select
id=
"selectByStrategyIdAndStaffId"
result
Type=
"cn.com.glsx.dj.strategy.model.StrategyStaffRel
"
>
<select
id=
"selectByStrategyIdAndStaffId"
result
Map=
"BaseResultMap
"
>
SELECT
SELECT
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
FROM dj_car_life_strategy_staff_rel
FROM dj_car_life_strategy_staff_rel
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment