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 a72d41d1
authored
Jan 16, 2026
by
zhouhaibao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]策略中心逻辑提交
1 parent
79f3199f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
1 deletions
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/model/StrategyStaffRel.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/remote/StrategyInfoRemote.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/remote/StrategyInfoRemoteImpl.java
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/LearningRecordService.java
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/model/StrategyStaffRel.java
View file @
a72d41d
...
...
@@ -82,6 +82,7 @@ public class StrategyStaffRel implements Serializable {
* 学习进度 1.未开始 2.学习中 3.已完成
*/
@Transient
@ApiModelProperty
(
notes
=
"学习进度 1.未开始 2.学习中 3.已完成"
)
private
Integer
progressStatus
;
/**
...
...
@@ -91,6 +92,7 @@ public class StrategyStaffRel implements Serializable {
* 这里以通用分数为例
*/
@Transient
@ApiModelProperty
(
notes
=
"成绩(可为分数、等级或百分制)"
)
private
Double
score
;
/**
...
...
@@ -98,5 +100,6 @@ public class StrategyStaffRel implements Serializable {
* 使用 java.time.LocalDateTime(推荐)或 Date
*/
@Transient
@ApiModelProperty
(
notes
=
"完成时间(任务/课程完成的具体时间)"
)
private
Date
completionTime
;
}
\ No newline at end of file
rpc-dj-strategy-api/src/main/java/cn/com/glsx/dj/strategy/remote/StrategyInfoRemote.java
View file @
a72d41d
package
cn
.
com
.
glsx
.
dj
.
strategy
.
remote
;
import
cn.com.glsx.dj.strategy.dto.*
;
import
cn.com.glsx.dj.strategy.model.LearningRecord
;
import
cn.com.glsx.dj.strategy.model.StrategyInfo
;
import
cn.com.glsx.framework.core.annotation.ApiMethod
;
import
cn.com.glsx.framework.core.annotation.ApiParam
;
...
...
@@ -41,4 +42,11 @@ public interface StrategyInfoRemote {
@ApiMethod
(
"查询驻店员工时长"
)
RpcResponse
<
StaffSummaryDTO
>
summaryStaffDuration
(
SceneMerchantBaseParam
request
);
@ApiMethod
(
"查询策略信息"
)
RpcResponse
<
StrategyInfo
>
queryStrategyInfoById
(
Integer
id
);
@ApiMethod
(
"新增或更新学习记录"
)
RpcResponse
<
Boolean
>
insertOrUpdateLearningRecord
(
LearningRecord
learningRecord
);
}
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/remote/StrategyInfoRemoteImpl.java
View file @
a72d41d
package
cn
.
com
.
glsx
.
dj
.
strategy
.
remote
;
import
cn.com.glsx.dj.strategy.dto.*
;
import
cn.com.glsx.dj.strategy.model.LearningRecord
;
import
cn.com.glsx.dj.strategy.model.StrategyInfo
;
import
cn.com.glsx.dj.strategy.service.LearningRecordService
;
import
cn.com.glsx.dj.strategy.service.StrategyInfoService
;
import
cn.com.glsx.dj.strategy.service.StrategyMerchantTimelineService
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
...
...
@@ -22,6 +24,9 @@ public class StrategyInfoRemoteImpl implements StrategyInfoRemote {
@Autowired
private
StrategyMerchantTimelineService
strategyMerchantTimelineService
;
@Autowired
public
LearningRecordService
learningRecordService
;
@Override
...
...
@@ -101,4 +106,31 @@ public class StrategyInfoRemoteImpl implements StrategyInfoRemote {
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVICE_ERROR
,
e
.
getMessage
());
}
}
@Override
public
RpcResponse
<
StrategyInfo
>
queryStrategyInfoById
(
Integer
id
)
{
try
{
return
RpcResponse
.
success
(
strategyInfoService
.
queryStrategyInfoById
(
id
));
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
RpcResponse
.
error
(
e
.
getError
(),
e
.
getMessage
());
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVICE_ERROR
,
e
.
getMessage
());
}
}
@Override
public
RpcResponse
<
Boolean
>
insertOrUpdateLearningRecord
(
LearningRecord
learningRecord
)
{
try
{
learningRecordService
.
insertOrUpdateLearningRecord
(
learningRecord
);
return
RpcResponse
.
success
(
true
);
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
RpcResponse
.
error
(
e
.
getError
(),
e
.
getMessage
());
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
RpcResponse
.
error
(
DefaultErrorEnum
.
SERVICE_ERROR
,
e
.
getMessage
());
}
}
}
rpc-dj-strategy/src/main/java/cn/com/glsx/dj/strategy/service/LearningRecordService.java
View file @
a72d41d
...
...
@@ -31,7 +31,7 @@ public class LearningRecordService {
*/
@GlsxDistributeLockable
(
name
=
"'LearningRecordService_insertOrUpdate_' + #learningRecord.recordingId"
+
"'_' + #learningRecord.userUuid"
,
time
=
5
,
timeUnit
=
TimeUnit
.
MINUTES
,
timeoutException
=
RpcServiceException
.
class
)
public
void
insertOrUpdate
(
LearningRecord
learningRecord
)
{
public
void
insertOrUpdate
LearningRecord
(
LearningRecord
learningRecord
)
{
String
recordingId
=
learningRecord
.
getRecordingId
();
String
userUuid
=
learningRecord
.
getUserUuid
();
LearningRecord
record
=
learningRecordMapper
.
selectOne
(
recordingId
,
userUuid
);
...
...
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