Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rop-dj-pad
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 2a46bafa
authored
Apr 01, 2026
by
林冲
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v5.7.0' into 'master'
上线合并 See merge request
!5
2 parents
7c59288f
6d24f81f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
0 deletions
pom.xml
src/main/java/cn/com/glsx/dj/pad/config/DubboConfig.java
src/main/java/cn/com/glsx/dj/pad/controller/learningcenter/LearningCenterController.java
src/main/java/cn/com/glsx/dj/pad/convert/LearningCenterConvert.java
src/main/java/cn/com/glsx/dj/pad/response/learningcenter/LearningCenterMyselfCourseCountResponse.java
pom.xml
View file @
2a46baf
...
...
@@ -13,6 +13,11 @@
<packaging>
war
</packaging>
<dependencies>
<dependency>
<groupId>
cn.com.glsx.dj
</groupId>
<artifactId>
rpc-dj-supervisor-api
</artifactId>
<version>
1.0.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
cn.com.glsx
</groupId>
<artifactId>
rpc-dj-mindworkplate-api
</artifactId>
<version>
5.6.0-SNAPSHOT
</version>
...
...
src/main/java/cn/com/glsx/dj/pad/config/DubboConfig.java
View file @
2a46baf
...
...
@@ -11,6 +11,7 @@ import cn.com.glsx.dj.riskmanage.remote.LearningCenterCourseCategoryRemote;
import
cn.com.glsx.dj.riskmanage.remote.LearningCenterCourseRemote
;
import
cn.com.glsx.dj.smartcarlife.remote.*
;
import
cn.com.glsx.dj.strategy.remote.StrategyInfoRemote
;
import
cn.com.glsx.dj.supervisor.remote.PersonCourseRecommendationRemote
;
import
cn.com.glsx.merchants.remote.MerchantStaffRemote
;
import
com.rop.config.InterceptorHolder
;
import
org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory
;
...
...
@@ -142,4 +143,9 @@ public class DubboConfig {
public
StrategyInfoRemote
getStrategyInfoRemote
()
{
return
factory
.
builder
(
StrategyInfoRemote
.
class
).
check
(
false
).
timeout
(
30000
).
version
(
"1.0.0"
).
build
();
}
@Bean
public
PersonCourseRecommendationRemote
personCourseRecommendationRemote
()
{
return
factory
.
builder
(
PersonCourseRecommendationRemote
.
class
).
check
(
false
).
version
(
"1.0.0"
).
timeout
(
30000
).
build
();
}
}
src/main/java/cn/com/glsx/dj/pad/controller/learningcenter/LearningCenterController.java
View file @
2a46baf
...
...
@@ -16,6 +16,9 @@ import cn.com.glsx.dj.riskmanage.remote.learningcenter.PadLearningCenterRemote;
import
cn.com.glsx.dj.smartcarlife.dto.study.StaffStudyDTO
;
import
cn.com.glsx.dj.smartcarlife.enums.study.StaffPunishStatusEnum
;
import
cn.com.glsx.dj.smartcarlife.remote.ContentManagerTaskRemote
;
import
cn.com.glsx.dj.supervisor.dto.MyselfCourseRecommendDTO
;
import
cn.com.glsx.dj.supervisor.remote.PersonCourseRecommendationRemote
;
import
cn.com.glsx.dj.supervisor.remote.SupervisorLearningCenterRemote
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.enums.DefaultErrorEnum
;
...
...
@@ -55,6 +58,7 @@ public class LearningCenterController {
private
final
LearningCenterConvert
learningCenterConvert
;
private
final
PadLearningCenterRemote
padLearningCenterRemote
;
private
final
ContentManagerTaskRemote
contentManagerTaskRemote
;
private
final
PersonCourseRecommendationRemote
personCourseRecommendationRemote
;
@ApiOperation
(
"学习中心-开始测评弹窗"
)
@ServiceMethod
(
method
=
"dj.api.pad.learning.center.level.exam"
,
needInSession
=
NeedInSessionType
.
YES
)
...
...
@@ -111,6 +115,33 @@ public class LearningCenterController {
}
}
@ApiOperation
(
"学习中心-我的课程-推荐学习"
)
@ServiceMethod
(
method
=
"dj.api.pad.learning.center.myself.course.recommend"
,
needInSession
=
NeedInSessionType
.
YES
)
public
RopResponse
<
RpcPagination
<
LearningCenterMyselfCourseResponse
>>
learningCenterMyselfCourseRecommend
(
LearningCenterMyselfCourseRequest
request
)
{
try
{
String
phone
=
Optional
.
ofNullable
(
CommonUtil
.
getLoginUserInfo
()).
map
(
LoginUserInfoResponse:
:
getPhone
)
.
orElseThrow
(()
->
new
RpcServiceException
(
RopErrorEnum
.
SCL_WORKWECHAT_GET_LOGIN_EXPIRE
));
RpcPagination
<
MyselfCourseRecommendDTO
>
rpcPagination
=
CommonUtil
.
getRpcPagination
(
MyselfCourseRecommendDTO
.
class
);
MyselfCourseRecommendDTO
learningCenterMyselfCourseDTO
=
BeanUtil
.
copyProperties
(
request
,
MyselfCourseRecommendDTO
.
class
);
learningCenterMyselfCourseDTO
.
setPhone
(
phone
);
rpcPagination
.
setCondition
(
learningCenterMyselfCourseDTO
);
RpcResponse
<
RpcPagination
<
MyselfCourseRecommendDTO
>>
response
=
personCourseRecommendationRemote
.
getPersonCourseRecommendPage
(
rpcPagination
);
RpcPagination
<
MyselfCourseRecommendDTO
>
result
=
response
.
getResult
();
if
(
response
.
isFailed
())
{
throw
new
RpcServiceException
(
response
.
getError
(),
response
.
getMessage
());
}
return
RopResponse
.
success
(
learningCenterConvert
.
myselfCourseRecommendDTOPage2ResponsePage
(
result
));
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"dj.api.pad.learning.center.myself.course.recommend!"
,
e
);
return
RopResponse
.
error
(
e
);
}
catch
(
Exception
e
)
{
log
.
info
(
"dj.api.pad.learning.center.myself.course.recommend!"
,
e
);
return
RopResponse
.
result
(
DefaultErrorEnum
.
SERVICE_ERROR
);
}
}
@ApiOperation
(
"学习中心-我的课程-查询各页签数据量"
)
@ServiceMethod
(
method
=
"dj.api.pad.learning.center.myself.course.count"
,
needInSession
=
NeedInSessionType
.
YES
)
public
RopResponse
<
LearningCenterMyselfCourseCountResponse
>
learningCenterMyselfCourseCount
(
AbstractRopRequest
request
)
{
...
...
@@ -126,6 +157,20 @@ public class LearningCenterController {
LearningCenterMyselfCourseCountRespDTO
result
=
rpcResponse
.
getResult
();
LearningCenterMyselfCourseCountResponse
response
=
BeanUtil
.
copyProperties
(
result
,
LearningCenterMyselfCourseCountResponse
.
class
);
// 查询推荐课程总数
RpcPagination
<
MyselfCourseRecommendDTO
>
recommendPagination
=
new
RpcPagination
<>();
MyselfCourseRecommendDTO
recommendCondition
=
new
MyselfCourseRecommendDTO
();
recommendCondition
.
setPhone
(
phone
);
recommendPagination
.
setCondition
(
recommendCondition
);
recommendPagination
.
setPageNum
(
1
);
recommendPagination
.
setPageSize
(
1
);
RpcResponse
<
RpcPagination
<
MyselfCourseRecommendDTO
>>
recommendResponse
=
personCourseRecommendationRemote
.
getPersonCourseRecommendPage
(
recommendPagination
);
if
(
recommendResponse
!=
null
&&
recommendResponse
.
hasResult
()
&&
recommendResponse
.
getResult
()
!=
null
)
{
response
.
setRecommendCount
(
recommendResponse
.
getResult
().
getTotal
());
}
else
{
response
.
setRecommendCount
(
0L
);
}
return
RopResponse
.
success
(
response
);
}
catch
(
RpcServiceException
e
)
{
log
.
info
(
"dj.api.pad.learning.center.myself.course.count error reason!"
,
e
);
...
...
src/main/java/cn/com/glsx/dj/pad/convert/LearningCenterConvert.java
View file @
2a46baf
...
...
@@ -2,6 +2,7 @@ package cn.com.glsx.dj.pad.convert;
import
cn.com.glsx.dj.pad.response.learningcenter.LearningCenterMyselfCourseResponse
;
import
cn.com.glsx.dj.riskmanage.dto.learningcenter.LearningCenterMyselfCourseDTO
;
import
cn.com.glsx.dj.supervisor.dto.MyselfCourseRecommendDTO
;
import
cn.com.glsx.framework.core.beans.rpc.RpcPagination
;
import
org.mapstruct.Mapper
;
...
...
@@ -16,4 +17,6 @@ public interface LearningCenterConvert {
RpcPagination
<
LearningCenterMyselfCourseResponse
>
myselfCourseDTOPage2ResponsePage
(
RpcPagination
<
LearningCenterMyselfCourseDTO
>
page
);
RpcPagination
<
LearningCenterMyselfCourseResponse
>
myselfCourseRecommendDTOPage2ResponsePage
(
RpcPagination
<
MyselfCourseRecommendDTO
>
page
);
}
src/main/java/cn/com/glsx/dj/pad/response/learningcenter/LearningCenterMyselfCourseCountResponse.java
View file @
2a46baf
...
...
@@ -38,4 +38,11 @@ public class LearningCenterMyselfCourseCountResponse implements Serializable {
example
=
"4"
)
private
Integer
completedCount
;
@ApiModelProperty
(
name
=
"recommendCount"
,
notes
=
"推荐课程总数"
,
example
=
"5"
)
private
Long
recommendCount
;
}
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