Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj
/
rop-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 b7c6e199
authored
Jan 07, 2026
by
春觉晓
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
添加示例
1 parent
919ec091
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
src/main/java/cn/com/glsx/dj/strategy/controller/StrategyInfoController.java
src/main/java/cn/com/glsx/dj/strategy/controller/StrategyInfoController.java
View file @
b7c6e19
package
cn
.
com
.
glsx
.
dj
.
strategy
.
controller
;
import
cn.com.glsx.dj.strategy.model.StrategyInfo
;
import
cn.com.glsx.dj.strategy.remote.StrategyInfoRemote
;
import
cn.com.glsx.dj.strategy.uitl.CommonUtil
;
import
cn.com.glsx.framework.core.beans.rpc.RpcResponse
;
import
cn.com.glsx.framework.core.exception.RpcServiceException
;
import
cn.com.glsx.framework.rop.response.RopResponse
;
import
com.rop.AbstractRopRequest
;
...
...
@@ -13,6 +15,8 @@ import io.swagger.annotations.ApiOperation;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.List
;
@Slf4j
@ServiceMethodBean
(
version
=
"1.0.0"
,
needInSession
=
NeedInSessionType
.
YES
)
@Api
(
"策略中心-策略信息"
)
...
...
@@ -22,11 +26,16 @@ public class StrategyInfoController {
private
StrategyInfoRemote
strategyInfoRemote
;
@ApiOperation
(
"创建策略"
)
@ServiceMethod
(
method
=
"dj.api.strategy.info.create"
)
public
RopResponse
<
Boolean
>
create
(
AbstractRopRequest
request
)
{
public
RopResponse
<
List
<
StrategyInfo
>
>
create
(
AbstractRopRequest
request
)
{
String
accountName
=
CommonUtil
.
getAccountName
();
try
{
log
.
info
(
"=====创建策略 accountName:{}"
,
accountName
);
return
RopResponse
.
success
(
true
);
RpcResponse
<
List
<
StrategyInfo
>>
response
=
strategyInfoRemote
.
getStrategyInfoById
(
1
);
if
(
response
.
hasError
())
{
log
.
error
(
"=====查询策略失败 error:{}"
,
response
.
getError
());
return
RopResponse
.
error
(
response
.
getError
(),
response
.
getMessage
());
}
return
RopResponse
.
success
(
response
.
getResult
());
}
catch
(
RpcServiceException
e
)
{
log
.
error
(
"=====AI助理-账号管理-新建账号 rpcServiceException:{}"
,
e
.
getMessage
());
return
RopResponse
.
error
(
e
);
...
...
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