Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asset-distribution
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data-spider
asset-distribution
Commits
5b633179
Commit
5b633179
authored
Jun 08, 2020
by
liwenbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资方列表获取切换到C库
parent
3e177b16
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
1 deletion
+60
-1
FundModuleController.java
...p/asset/distribution/controller/FundModuleController.java
+1
-1
FundInfo.java
...tgroup/asset/distribution/model/entity/fund/FundInfo.java
+11
-0
IFundModuleService.java
...sset/distribution/service/funding/IFundModuleService.java
+8
-0
FundModuleServiceImpl.java
...tribution/service/funding/impl/FundModuleServiceImpl.java
+40
-0
No files found.
src/main/java/com/quantgroup/asset/distribution/controller/FundModuleController.java
View file @
5b633179
...
@@ -37,7 +37,7 @@ public class FundModuleController {
...
@@ -37,7 +37,7 @@ public class FundModuleController {
@RequestMapping
(
"/get_all_funds"
)
@RequestMapping
(
"/get_all_funds"
)
public
GlobalResponse
getAllFunds
()
{
public
GlobalResponse
getAllFunds
()
{
Stopwatch
stopwatch
=
Stopwatch
.
createStarted
();
Stopwatch
stopwatch
=
Stopwatch
.
createStarted
();
GlobalResponse
response
=
fundModuleService
.
getAllFundsInfo
();
GlobalResponse
response
=
fundModuleService
.
get
MiddleOffice
AllFundsInfo
();
log
.
info
(
"资方模块接口, 获取所有资方信息完成, 耗时 : {}, response : {}"
,
stopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
),
JSON
.
toJSONString
(
response
));
log
.
info
(
"资方模块接口, 获取所有资方信息完成, 耗时 : {}, response : {}"
,
stopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
),
JSON
.
toJSONString
(
response
));
return
response
;
return
response
;
}
}
...
...
src/main/java/com/quantgroup/asset/distribution/model/entity/fund/FundInfo.java
View file @
5b633179
package
com
.
quantgroup
.
asset
.
distribution
.
model
.
entity
.
fund
;
package
com
.
quantgroup
.
asset
.
distribution
.
model
.
entity
.
fund
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.List
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -19,6 +20,8 @@ public class FundInfo implements Serializable{
...
@@ -19,6 +20,8 @@ public class FundInfo implements Serializable{
// 资方Id
// 资方Id
private
Long
fundId
;
private
Long
fundId
;
private
List
<
FundProductInfo
>
fundProductList
;
// 资方名称
// 资方名称
private
String
fundName
;
private
String
fundName
;
...
@@ -28,4 +31,12 @@ public class FundInfo implements Serializable{
...
@@ -28,4 +31,12 @@ public class FundInfo implements Serializable{
// 注意事项
// 注意事项
private
String
remarks
;
private
String
remarks
;
@Data
public
static
class
FundProductInfo
{
private
Long
fundProductId
;
private
String
fundProductRemark
;
}
}
}
src/main/java/com/quantgroup/asset/distribution/service/funding/IFundModuleService.java
View file @
5b633179
...
@@ -14,10 +14,18 @@ import java.util.List;
...
@@ -14,10 +14,18 @@ import java.util.List;
public
interface
IFundModuleService
{
public
interface
IFundModuleService
{
/**
/**
* 2020-6-8切换到中台新接口,C库,包含所有的资方列表
* 获取所有资方信息
* 获取所有资方信息
* @return
* @return
*/
*/
@Deprecated
public
GlobalResponse
getAllFundsInfo
();
public
GlobalResponse
getAllFundsInfo
();
/**
* 中台新接口,获取资方列表相关信息
* @return
*/
public
GlobalResponse
getMiddleOfficeAllFundsInfo
();
/**
/**
* 获取资方配置所有条件类型, 以及对应的code
* 获取资方配置所有条件类型, 以及对应的code
...
...
src/main/java/com/quantgroup/asset/distribution/service/funding/impl/FundModuleServiceImpl.java
View file @
5b633179
...
@@ -75,6 +75,8 @@ public class FundModuleServiceImpl implements IFundModuleService{
...
@@ -75,6 +75,8 @@ public class FundModuleServiceImpl implements IFundModuleService{
private
IRuleService
ruleService
;
private
IRuleService
ruleService
;
@Value
(
"${clotho.url}"
)
@Value
(
"${clotho.url}"
)
private
String
clothoURL
;
private
String
clothoURL
;
@Value
(
"${mo-config.url}"
)
private
String
moConfigURL
;
@HandleException
@HandleException
@Override
@Override
...
@@ -99,6 +101,44 @@ public class FundModuleServiceImpl implements IFundModuleService{
...
@@ -99,6 +101,44 @@ public class FundModuleServiceImpl implements IFundModuleService{
return
GlobalResponse
.
create
(
FundModuleResponse
.
SUCCESS
,
fundInfoList
);
return
GlobalResponse
.
create
(
FundModuleResponse
.
SUCCESS
,
fundInfoList
);
}
}
@HandleException
@Override
public
GlobalResponse
getMiddleOfficeAllFundsInfo
()
{
Stopwatch
stopwatch
=
Stopwatch
.
createStarted
();
String
text
=
httpService
.
get
(
moConfigURL
+
"/finance/fund_product"
);
log
.
info
(
"拉取xyqb所有资方信息完成, 耗时 : {}, 结果 : {}"
,
stopwatch
.
stop
().
elapsed
(
TimeUnit
.
MILLISECONDS
),
text
);
QGPreconditions
.
checkArgument
(
StringUtils
.
isNotEmpty
(
text
),
QGExceptionType
.
GET_ALL_FUNDS_INFO_ERROR
,
text
);
JSONObject
data
=
JSONObject
.
parseObject
(
text
);
QGPreconditions
.
checkArgument
(
data
!=
null
&&
"0"
.
equals
(
data
.
getString
(
"code"
)),
QGExceptionType
.
GET_ALL_FUNDS_INFO_ERROR
,
text
);
List
<
FundInfo
>
fundInfoList
=
new
ArrayList
<>();
JSONArray
fundsArray
=
data
.
getJSONArray
(
"data"
);
for
(
int
i
=
0
,
len
=
fundsArray
.
size
();
i
<
len
;
++
i
)
{
JSONObject
fundInfoJSON
=
fundsArray
.
getJSONObject
(
i
);
FundInfo
fundInfo
=
new
FundInfo
();
fundInfo
.
setFundId
(
fundInfoJSON
.
getLong
(
"fundCorpId"
));
fundInfo
.
setFundName
(
fundInfoJSON
.
getString
(
"fundCorpName"
));
fundInfo
.
setStrategyName
(
fundInfoJSON
.
getString
(
"fundCorpStrategyName"
));
// 该资方产品id
List
<
FundInfo
.
FundProductInfo
>
fundProductInfoList
=
new
ArrayList
<>();
JSONArray
fundProductArray
=
fundInfoJSON
.
getJSONArray
(
"fundProductList"
);
if
(
fundProductArray
!=
null
&&
fundProductArray
.
size
()
!=
0
)
{
for
(
int
j
=
0
,
lenP
=
fundProductArray
.
size
();
j
<
lenP
;
++
j
)
{
JSONObject
fundProductJSON
=
fundProductArray
.
getJSONObject
(
j
);
FundInfo
.
FundProductInfo
fundProductInfo
=
new
FundInfo
.
FundProductInfo
();
fundProductInfo
.
setFundProductId
(
fundProductJSON
.
getLong
(
"fundProductId"
));
fundProductInfo
.
setFundProductRemark
(
fundProductJSON
.
getString
(
"fundProductRemark"
));
fundProductInfoList
.
add
(
fundProductInfo
);
}
}
fundInfo
.
setFundProductList
(
fundProductInfoList
);
fundInfoList
.
add
(
fundInfo
);
}
return
GlobalResponse
.
create
(
FundModuleResponse
.
SUCCESS
,
fundInfoList
);
}
@HandleException
@HandleException
@Override
@Override
public
GlobalResponse
getAllLimitType
()
{
public
GlobalResponse
getAllLimitType
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment