Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tamp_fund
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周鹏
tamp_fund
Commits
ed28d3ee
Commit
ed28d3ee
authored
Mar 16, 2021
by
张亚辉
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2.0.0' into dev
parents
cda0277d
1d459cdc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
642 additions
and
192 deletions
+642
-192
.gitignore
.gitignore
+5
-1
pom.xml
pom.xml
+11
-6
ProductApi.java
src/main/java/com/tanpu/fund/api/ProductApi.java
+24
-0
ProductController.java
...ain/java/com/tanpu/fund/controller/ProductController.java
+24
-0
IfaImportedFundNav.java
...a/com/tanpu/fund/entity/generator/IfaImportedFundNav.java
+24
-1
IfaImportedFundNavExample.java
...anpu/fund/entity/generator/IfaImportedFundNavExample.java
+135
-20
IfaImportedFundNavMapper.java
...tanpu/fund/mapper/generator/IfaImportedFundNavMapper.java
+23
-39
FundInfoCustomMapper.java
...pu/fund/mapper/generator/custom/FundInfoCustomMapper.java
+7
-0
ProductPrivateService.java
...in/java/com/tanpu/fund/service/ProductPrivateService.java
+3
-14
ProductService.java
src/main/java/com/tanpu/fund/service/ProductService.java
+11
-0
ProductPrivateServiceImpl.java
...om/tanpu/fund/service/impl/ProductPrivateServiceImpl.java
+8
-0
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+242
-28
IfaImportedFundNavMapper.xml
.../resources/mybatis/generator/IfaImportedFundNavMapper.xml
+125
-38
BaseTest.java
src/test/java/com/tanpu/fund/BaseTest.java
+0
-16
NetExcel.java
src/test/java/com/tanpu/fund/excel/NetExcel.java
+0
-29
No files found.
.gitignore
View file @
ed28d3ee
...
...
@@ -73,7 +73,11 @@ gen
# maven
target
.classpath
.factorypath
.project
.settings/
.vscode/
src/main/java/pm/Generator.java
prod-fz.sh
...
...
pom.xml
View file @
ed28d3ee
...
...
@@ -197,17 +197,22 @@
<version>
3.0.6
</version>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-collections4
</artifactId>
<version>
4.0
</version>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<version>
5.3.9
</version>
</dependency>
<dependency>
<groupId>
org.apache.poi
</groupId>
<artifactId>
poi-ooxml
</artifactId>
<version>
4.1.2
</version>
</dependency>
<dependency>
<groupId>
commons-validator
</groupId>
<artifactId>
commons-validator
</artifactId>
<version>
1.7
</version>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
...
...
src/main/java/com/tanpu/fund/api/ProductApi.java
View file @
ed28d3ee
package
com
.
tanpu
.
fund
.
api
;
import
com.tanpu.common.auth.mapping.TanpuInterfaceLoginAuth
;
import
com.tanpu.common.model.Page
;
import
com.tanpu.common.model.Pageable
;
import
com.tanpu.common.model.adm.req.IfaNetImportReq
;
import
com.tanpu.common.model.privatefund.resp.FundNavMessage
;
import
com.tanpu.common.model.product.req.NetReq
;
import
com.tanpu.common.model.product.req.ProductInfoReq
;
import
com.tanpu.common.model.product.req.ProductListReq
;
import
com.tanpu.common.model.product.resp.*
;
import
com.tanpu.common.model.tanpuroom.Type
;
import
com.tanpu.common.resp.CommonResp
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.validation.constraints.NotEmpty
;
import
java.util.List
;
@Api
(
tags
=
"产品服务"
)
...
...
@@ -93,6 +100,10 @@ public interface ProductApi {
@GetMapping
(
"/dynamic/retreat"
)
CommonResp
<
DynamicRetreatVO
>
getDynamicRetreatInfo
(
@RequestParam
(
"id"
)
String
id
);
@ApiOperation
(
"获取产品列表(只返回产品名称)"
)
@GetMapping
(
"/get/fund/info/simple"
)
CommonResp
<
List
<
Type
>>
getSimpleFundList
(
@RequestParam
(
"list"
)
List
<
String
>
list
);
//**********************************************************私有基金start**********************************************************
@ApiOperation
(
"私有基金详情 - 私有基金"
)
@GetMapping
(
"/privatefund/detail"
)
...
...
@@ -137,6 +148,10 @@ public interface ProductApi {
@GetMapping
(
"/private/bonus/ratio"
)
CommonResp
<
List
<
BonusRatioVO
>>
getPrivateBonusRatioInfo
(
@ApiParam
(
"产品id"
)
@RequestParam
(
"id"
)
String
id
);
@ApiOperation
(
"获取产品列表(只返回产品名称)"
)
@GetMapping
(
"/private/get/fund/info/simple"
)
CommonResp
<
List
<
Type
>>
getSimplePrivateFundList
(
@RequestParam
(
"list"
)
List
<
String
>
list
);
//**********************************************************私有基金 end**********************************************************
@ApiOperation
(
value
=
"根据Id查询私募产品基本信息"
)
...
...
@@ -150,4 +165,13 @@ public interface ProductApi {
@ApiOperation
(
"查询同类基金"
)
@GetMapping
(
"/query/samefund"
)
CommonResp
<
List
<
FundSameResp
>>
querySamefund
(
@RequestParam
(
"fundId"
)
String
fundId
);
@ApiOperation
(
"理财师净值导入"
)
@GetMapping
(
"/ifa/net/import"
)
CommonResp
<
List
<
FundNavMessage
>>
importNetInfo
(
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
"fundId"
)
@Validated
@NotEmpty
String
fundId
);
@ApiOperation
(
"理财师净值导入"
)
@PostMapping
(
"/ifa/net/import/check/save"
)
CommonResp
<
List
<
FundNavMessage
>>
importNetCheckSaveInfo
(
@RequestBody
IfaNetImportReq
req
);
}
src/main/java/com/tanpu/fund/controller/ProductController.java
View file @
ed28d3ee
...
...
@@ -3,10 +3,13 @@ package com.tanpu.fund.controller;
import
com.tanpu.common.auth.mapping.TanpuInterfaceLoginAuth
;
import
com.tanpu.common.model.Page
;
import
com.tanpu.common.model.Pageable
;
import
com.tanpu.common.model.adm.req.IfaNetImportReq
;
import
com.tanpu.common.model.privatefund.resp.FundNavMessage
;
import
com.tanpu.common.model.product.req.NetReq
;
import
com.tanpu.common.model.product.req.ProductInfoReq
;
import
com.tanpu.common.model.product.req.ProductListReq
;
import
com.tanpu.common.model.product.resp.*
;
import
com.tanpu.common.model.tanpuroom.Type
;
import
com.tanpu.common.resp.CommonResp
;
import
com.tanpu.fund.api.ProductApi
;
import
com.tanpu.fund.feign.publicfund.FeignClientForPublicfund
;
...
...
@@ -15,6 +18,7 @@ import com.tanpu.fund.service.ProductService;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
java.util.List
;
...
...
@@ -112,6 +116,11 @@ public class ProductController implements ProductApi {
return
CommonResp
.
success
(
this
.
productService
.
getDynamicRetreat
(
id
));
}
@Override
public
CommonResp
<
List
<
Type
>>
getSimpleFundList
(
List
<
String
>
list
)
{
return
CommonResp
.
success
(
this
.
productService
.
getSimpleFundList
(
list
));
}
@Override
public
CommonResp
<
ProductInfoVO
>
getPrivateDetail
(
String
id
)
{
if
(
StringUtils
.
isEmpty
(
id
))
{
...
...
@@ -178,6 +187,11 @@ public class ProductController implements ProductApi {
return
CommonResp
.
success
(
this
.
productPrivateService
.
getBonusRatio
(
id
));
}
@Override
public
CommonResp
<
List
<
Type
>>
getSimplePrivateFundList
(
List
<
String
>
list
)
{
return
CommonResp
.
success
(
this
.
productPrivateService
.
getSimplePrivateFundList
(
list
));
}
@Override
public
CommonResp
<
List
<
FundManagerVO
>>
getPrivateFundManagerInfo
(
String
id
,
String
ifaId
)
{
return
CommonResp
.
success
(
this
.
productPrivateService
.
getFundManager
(
id
,
ifaId
));
...
...
@@ -197,4 +211,14 @@ public class ProductController implements ProductApi {
}
return
CommonResp
.
success
(
this
.
productService
.
querySamefund
(
fundId
));
}
@Override
public
CommonResp
<
List
<
FundNavMessage
>>
importNetInfo
(
MultipartFile
file
,
String
fundId
)
{
return
this
.
productService
.
importNet
(
file
,
fundId
);
}
@Override
public
CommonResp
<
List
<
FundNavMessage
>>
importNetCheckSaveInfo
(
IfaNetImportReq
req
)
{
return
this
.
productService
.
importNetCheckSave
(
req
);
}
}
src/main/java/com/tanpu/fund/entity/generator/IfaImportedFundNav.java
View file @
ed28d3ee
...
...
@@ -7,12 +7,30 @@ import lombok.Builder;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
IfaImportedFundNav
{
private
Integer
id
;
private
Long
id
;
/**
* 基金id
...
...
@@ -35,4 +53,9 @@ public class IfaImportedFundNav {
private
BigDecimal
cumulativeNav
;
private
Integer
deleteTag
;
/**
* 机构id
*/
private
String
orgId
;
}
\ No newline at end of file
src/main/java/com/tanpu/fund/entity/generator/IfaImportedFundNavExample.java
View file @
ed28d3ee
...
...
@@ -3,8 +3,27 @@ package com.tanpu.fund.entity.generator;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Iterator
;
import
java.util.List
;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
public
class
IfaImportedFundNavExample
{
protected
String
orderByClause
;
...
...
@@ -106,6 +125,32 @@ public class IfaImportedFundNavExample {
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
protected
void
addCriterionForJDBCDate
(
String
condition
,
Date
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
addCriterion
(
condition
,
new
java
.
sql
.
Date
(
value
.
getTime
()),
property
);
}
protected
void
addCriterionForJDBCDate
(
String
condition
,
List
<
Date
>
values
,
String
property
)
{
if
(
values
==
null
||
values
.
size
()
==
0
)
{
throw
new
RuntimeException
(
"Value list for "
+
property
+
" cannot be null or empty"
);
}
List
<
java
.
sql
.
Date
>
dateList
=
new
ArrayList
<>();
Iterator
<
Date
>
iter
=
values
.
iterator
();
while
(
iter
.
hasNext
())
{
dateList
.
add
(
new
java
.
sql
.
Date
(
iter
.
next
().
getTime
()));
}
addCriterion
(
condition
,
dateList
,
property
);
}
protected
void
addCriterionForJDBCDate
(
String
condition
,
Date
value1
,
Date
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
addCriterion
(
condition
,
new
java
.
sql
.
Date
(
value1
.
getTime
()),
new
java
.
sql
.
Date
(
value2
.
getTime
()),
property
);
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
...
...
@@ -116,52 +161,52 @@ public class IfaImportedFundNavExample {
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Integer
value
)
{
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Integer
value
)
{
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Integer
value
)
{
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Integer
value
)
{
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Integer
>
values
)
{
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Integer
>
values
)
{
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
...
...
@@ -247,52 +292,52 @@ public class IfaImportedFundNavExample {
}
public
Criteria
andPriceDateEqualTo
(
Date
value
)
{
addCriterion
(
"price_date ="
,
value
,
"priceDate"
);
addCriterion
ForJDBCDate
(
"price_date ="
,
value
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateNotEqualTo
(
Date
value
)
{
addCriterion
(
"price_date <>"
,
value
,
"priceDate"
);
addCriterion
ForJDBCDate
(
"price_date <>"
,
value
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateGreaterThan
(
Date
value
)
{
addCriterion
(
"price_date >"
,
value
,
"priceDate"
);
addCriterion
ForJDBCDate
(
"price_date >"
,
value
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"price_date >="
,
value
,
"priceDate"
);
addCriterion
ForJDBCDate
(
"price_date >="
,
value
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateLessThan
(
Date
value
)
{
addCriterion
(
"price_date <"
,
value
,
"priceDate"
);
addCriterion
ForJDBCDate
(
"price_date <"
,
value
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"price_date <="
,
value
,
"priceDate"
);
addCriterion
ForJDBCDate
(
"price_date <="
,
value
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateIn
(
List
<
Date
>
values
)
{
addCriterion
(
"price_date in"
,
values
,
"priceDate"
);
addCriterion
ForJDBCDate
(
"price_date in"
,
values
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"price_date not in"
,
values
,
"priceDate"
);
addCriterion
ForJDBCDate
(
"price_date not in"
,
values
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"price_date between"
,
value1
,
value2
,
"priceDate"
);
addCriterion
ForJDBCDate
(
"price_date between"
,
value1
,
value2
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"price_date not between"
,
value1
,
value2
,
"priceDate"
);
addCriterion
ForJDBCDate
(
"price_date not between"
,
value1
,
value2
,
"priceDate"
);
return
(
Criteria
)
this
;
}
...
...
@@ -475,6 +520,76 @@ public class IfaImportedFundNavExample {
addCriterion
(
"delete_tag not between"
,
value1
,
value2
,
"deleteTag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdIsNull
()
{
addCriterion
(
"org_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdIsNotNull
()
{
addCriterion
(
"org_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdEqualTo
(
String
value
)
{
addCriterion
(
"org_id ="
,
value
,
"orgId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdNotEqualTo
(
String
value
)
{
addCriterion
(
"org_id <>"
,
value
,
"orgId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdGreaterThan
(
String
value
)
{
addCriterion
(
"org_id >"
,
value
,
"orgId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"org_id >="
,
value
,
"orgId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdLessThan
(
String
value
)
{
addCriterion
(
"org_id <"
,
value
,
"orgId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"org_id <="
,
value
,
"orgId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdLike
(
String
value
)
{
addCriterion
(
"org_id like"
,
value
,
"orgId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdNotLike
(
String
value
)
{
addCriterion
(
"org_id not like"
,
value
,
"orgId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"org_id in"
,
values
,
"orgId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"org_id not in"
,
values
,
"orgId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"org_id between"
,
value1
,
value2
,
"orgId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andOrgIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"org_id not between"
,
value1
,
value2
,
"orgId"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
src/main/java/com/tanpu/fund/mapper/generator/IfaImportedFundNavMapper.java
View file @
ed28d3ee
...
...
@@ -6,71 +6,55 @@ import java.util.List;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
@Mapper
public
interface
IfaImportedFundNavMapper
{
long
countByExample
(
IfaImportedFundNavExample
example
);
int
deleteByExample
(
IfaImportedFundNavExample
example
);
/**
* delete by primary key
*
* @param id primaryKey
* @return deleteCount
*/
int
deleteByPrimaryKey
(
Integer
id
);
/**
* insert record to table
*
* @param record the record
* @return insert count
*/
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
IfaImportedFundNav
record
);
int
insertOrUpdate
(
IfaImportedFundNav
record
);
int
insertOrUpdateSelective
(
IfaImportedFundNav
record
);
/**
* insert record to table selective
*
* @param record the record
* @return insert count
*/
int
insertSelective
(
IfaImportedFundNav
record
);
List
<
IfaImportedFundNav
>
selectByExample
(
IfaImportedFundNavExample
example
);
/**
* select by primary key
*
* @param id primary key
* @return object by primary key
*/
IfaImportedFundNav
selectByPrimaryKey
(
Integer
id
);
IfaImportedFundNav
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
IfaImportedFundNav
record
,
@Param
(
"example"
)
IfaImportedFundNavExample
example
);
int
updateByExample
(
@Param
(
"record"
)
IfaImportedFundNav
record
,
@Param
(
"example"
)
IfaImportedFundNavExample
example
);
/**
* update record selective
*
* @param record the updated record
* @return update count
*/
int
updateByPrimaryKeySelective
(
IfaImportedFundNav
record
);
/**
* update record
*
* @param record the updated record
* @return update count
*/
int
updateByPrimaryKey
(
IfaImportedFundNav
record
);
int
updateBatch
(
List
<
IfaImportedFundNav
>
list
);
int
updateBatchSelective
(
List
<
IfaImportedFundNav
>
list
);
int
batchInsert
(
@Param
(
"list"
)
List
<
IfaImportedFundNav
>
list
);
}
\ No newline at end of file
src/main/java/com/tanpu/fund/mapper/generator/custom/FundInfoCustomMapper.java
View file @
ed28d3ee
package
com
.
tanpu
.
fund
.
mapper
.
generator
.
custom
;
import
com.tanpu.common.model.product.resp.FilePreviewResp
;
import
com.tanpu.common.model.tanpuroom.Type
;
import
com.tanpu.fund.entity.generator.FundNav
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -47,4 +48,10 @@ public interface FundInfoCustomMapper {
@Select
(
"select t.id as fileId,t.logical_path as previewUrl from fund_file_record t where t.id in(${list})"
)
List
<
FilePreviewResp
>
getFilePreviewUrl
(
@Param
(
"list"
)
String
list
);
@Select
(
"select t.id as id, t.fund_short_name as `value` from fund_info t where t.id in(${list})"
)
List
<
Type
>
getSimpleFundList
(
@Param
(
"list"
)
String
list
);
@Select
(
"select t.id as id, t.fund_name as `value` from ifa_imported_fund_info t where t.id in(${list})"
)
List
<
Type
>
getSimplePrivateFundList
(
@Param
(
"list"
)
String
list
);
}
src/main/java/com/tanpu/fund/service/ProductPrivateService.java
View file @
ed28d3ee
...
...
@@ -5,20 +5,8 @@ import com.tanpu.common.model.Pageable;
import
com.tanpu.common.model.product.req.NetReq
;
import
com.tanpu.common.model.product.req.ProductInfoReq
;
import
com.tanpu.common.model.product.req.ProductListReq
;
import
com.tanpu.common.model.product.resp.BonusRatioVO
;
import
com.tanpu.common.model.product.resp.DynamicRetreatVO
;
import
com.tanpu.common.model.product.resp.FundCompanyVO
;
import
com.tanpu.common.model.product.resp.FundInfoSimpleListResp
;
import
com.tanpu.common.model.product.resp.FundManagerVO
;
import
com.tanpu.common.model.product.resp.FundRecordVO
;
import
com.tanpu.common.model.product.resp.FundSameResp
;
import
com.tanpu.common.model.product.resp.NetVO
;
import
com.tanpu.common.model.product.resp.ProductInfoVO
;
import
com.tanpu.common.model.product.resp.RiskRatingVO
;
import
com.tanpu.common.model.product.resp.TrackNetVO
;
import
com.tanpu.common.model.product.resp.TrackRecordVO
;
import
com.tanpu.common.model.product.resp.TradeNotesResp
;
import
com.tanpu.common.model.product.resp.UnitNetVO
;
import
com.tanpu.common.model.product.resp.*
;
import
com.tanpu.common.model.tanpuroom.Type
;
import
java.util.List
;
...
...
@@ -81,4 +69,5 @@ public interface ProductPrivateService {
List
<
FundSameResp
>
getRemmendPrivateFundList
();
List
<
Type
>
getSimplePrivateFundList
(
List
<
String
>
list
);
}
src/main/java/com/tanpu/fund/service/ProductService.java
View file @
ed28d3ee
...
...
@@ -2,6 +2,8 @@ package com.tanpu.fund.service;
import
com.tanpu.common.model.Page
;
import
com.tanpu.common.model.Pageable
;
import
com.tanpu.common.model.adm.req.IfaNetImportReq
;
import
com.tanpu.common.model.privatefund.resp.FundNavMessage
;
import
com.tanpu.common.model.product.req.ProductListReq
;
import
com.tanpu.common.model.product.resp.DynamicRetreatVO
;
import
com.tanpu.common.model.product.resp.FundInfoSimpleListResp
;
...
...
@@ -9,6 +11,9 @@ import com.tanpu.common.model.product.resp.ProductInfoVO;
import
com.tanpu.common.model.product.req.NetReq
;
import
com.tanpu.common.model.product.req.ProductInfoReq
;
import
com.tanpu.common.model.product.resp.*
;
import
com.tanpu.common.resp.CommonResp
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.tanpu.common.model.tanpuroom.Type
;
import
java.util.List
;
...
...
@@ -68,4 +73,10 @@ public interface ProductService {
List
<
FundSameResp
>
querySamefund
(
String
fundId
);
List
<
FundSameResp
>
getRemmendPrivateFundList
(
String
fundId
);
CommonResp
<
List
<
FundNavMessage
>>
importNet
(
MultipartFile
file
,
String
fundId
);
List
<
Type
>
getSimpleFundList
(
List
<
String
>
list
);
CommonResp
<
List
<
FundNavMessage
>>
importNetCheckSave
(
IfaNetImportReq
req
);
}
src/main/java/com/tanpu/fund/service/impl/ProductPrivateServiceImpl.java
View file @
ed28d3ee
...
...
@@ -20,6 +20,7 @@ import com.tanpu.fund.entity.generator.*;
import
com.tanpu.fund.enums.ProTypeEnums
;
import
com.tanpu.fund.feign.diagnose.FeignClientForDiagnose
;
import
com.tanpu.fund.mapper.generator.*
;
import
com.tanpu.fund.mapper.generator.custom.FundInfoCustomMapper
;
import
com.tanpu.fund.service.ProductPrivateService
;
import
com.tanpu.fund.utils.LongUtil
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -86,6 +87,9 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
@Resource
private
FeignClientForDiagnose
diagnose
;
@Resource
private
FundInfoCustomMapper
fundInfoCustomMapper
;
@Override
public
Page
<
ProductInfoVO
>
getProductList
(
ProductInfoReq
req
)
{
return
null
;
...
...
@@ -519,4 +523,8 @@ public class ProductPrivateServiceImpl implements ProductPrivateService, Constan
return
null
;
}
@Override
public
List
<
Type
>
getSimplePrivateFundList
(
List
<
String
>
list
)
{
return
fundInfoCustomMapper
.
getSimplePrivateFundList
(
list
.
stream
().
collect
(
Collectors
.
joining
(
"','"
,
"'"
,
"'"
)));
}
}
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
ed28d3ee
This diff is collapsed.
Click to expand it.
src/main/resources/mybatis/generator/IfaImportedFundNavMapper.xml
View file @
ed28d3ee
This diff is collapsed.
Click to expand it.
src/test/java/com/tanpu/fund/BaseTest.java
deleted
100644 → 0
View file @
cda0277d
package
com
.
tanpu
.
fund
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.ActiveProfiles
;
import
org.springframework.test.context.junit4.SpringRunner
;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
FundApplication
.
class
)
@ActiveProfiles
(
"dev"
)
public
class
BaseTest
{
}
src/test/java/com/tanpu/fund/excel/NetExcel.java
deleted
100644 → 0
View file @
cda0277d
package
com
.
tanpu
.
fund
.
excel
;
import
cn.hutool.poi.excel.ExcelReader
;
import
cn.hutool.poi.excel.ExcelUtil
;
import
com.tanpu.fund.BaseTest
;
import
org.junit.Test
;
import
java.util.List
;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
public
class
NetExcel
extends
BaseTest
{
public
static
final
String
URL
=
"https://mylolis-my.sharepoint.com/personal/f3101_365up_site/Documents/工作簿2.xlsx"
;
@Test
public
void
productNetAnalysis
()
{
ExcelReader
reader
=
ExcelUtil
.
getReader
(
URL
);
List
<
List
<
Object
>>
read
=
reader
.
read
();
System
.
out
.
println
(
read
);
}
}
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