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
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
...
...
@@ -2,6 +2,9 @@ package com.tanpu.fund.service.impl;
import
cn.hutool.core.date.DatePattern
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.NumberUtil
;
import
cn.hutool.poi.excel.ExcelReader
;
import
cn.hutool.poi.excel.ExcelUtil
;
import
com.github.pagehelper.page.PageMethod
;
import
com.google.common.collect.Lists
;
import
com.tanpu.common.auth.UserInfoThreadLocalHolder
;
...
...
@@ -11,11 +14,14 @@ import com.tanpu.common.enums.SysConstEnums;
import
com.tanpu.common.enums.product.ProductEnums
;
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.FundInfoVO
;
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.model.user.resp.SysConstantResp
;
import
com.tanpu.common.resp.CommonResp
;
import
com.tanpu.common.utils.BigDecimalUtil
;
...
...
@@ -25,21 +31,27 @@ import com.tanpu.fund.feign.diagnose.FeignClientForDiagnose;
import
com.tanpu.fund.feign.user.FeignClientForFatools
;
import
com.tanpu.fund.mapper.generator.*
;
import
com.tanpu.fund.mapper.generator.custom.FundInfoCustomMapper
;
import
com.tanpu.fund.service.ProductCommonService
;
import
com.tanpu.fund.service.ProductService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.validator.routines.BigDecimalValidator
;
import
org.jetbrains.annotations.NotNull
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.stream.Collectors
;
import
static
com
.
tanpu
.
common
.
utils
.
BigDecimalUtil
.
multiply100
;
import
static
com
.
tanpu
.
common
.
utils
.
BigDecimalUtil
.
subtract
;
import
static
com
.
tanpu
.
common
.
utils
.
BigDecimalUtil
.
subtractAbs
;
import
static
com
.
tanpu
.
fund
.
enums
.
FilterTypeEnum
.
SINCE_ESTABLISHED
;
import
static
com
.
tanpu
.
fund
.
utils
.
LongUtil
.
timeLong
;
...
...
@@ -97,9 +109,6 @@ public class ProductServiceImpl implements ProductService, Constant {
@Resource
private
IfaImportedFundNavMapper
ifaImportedFundNavMapper
;
@Resource
private
ProductCommonService
productCommonService
;
@Resource
private
FeignClientForFatools
fatools
;
...
...
@@ -119,7 +128,7 @@ public class ProductServiceImpl implements ProductService, Constant {
List
<
ProductInfoVO
>
vos
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
vos
=
getProductInfoVOS
(
fundCounts
,
list
,
1
);
vos
=
getProductInfoVOS
(
fundCounts
,
list
);
}
return
new
Page
<>(
req
.
getPage
(),
page
.
getTotal
(),
vos
);
...
...
@@ -144,7 +153,6 @@ public class ProductServiceImpl implements ProductService, Constant {
vo
.
setProductName
(
fundInfo
.
getFundShortName
());
vo
.
setDesc
(
fundInfo
.
getDescInfo
());
List
<
String
>
ls
=
Lists
.
newArrayList
(
fundInfo
.
getPrimaryBenchmarkId
());
/*// 产品编码
Map<String, List<IndexesProfile>> indexIdMap = getIndexIdMap(ls);
getProductCode(indexIdMap, vo, fundInfo);*/
...
...
@@ -206,10 +214,10 @@ public class ProductServiceImpl implements ProductService, Constant {
if
(
vo
.
getSubstrategy
()
!=
null
)
{
CommonResp
<
List
<
SysConstantResp
>>
listCommonResp
=
this
.
fatools
.
queryLabels
(
SysConstEnums
.
TAMPSUBSTRATEGY
.
getConstantGroup
());
if
(
listCommonResp
.
isSuccess
())
{
SysConstantResp
sysConstantResp
=
listCommonResp
.
getAttributes
().
stream
().
filter
(
item
->
StringUtils
.
equals
(
String
.
valueOf
(
vo
.
getSubstrategy
()),
item
.
getConstantCode
())).
findFirst
().
orElse
(
null
);
if
(
sysConstantResp
!=
null
)
{
vo
.
setStrategyName
(
sysConstantResp
.
getConstantName
());
}
listCommonResp
.
getAttributes
().
stream
()
.
filter
(
item
->
StringUtils
.
equals
(
String
.
valueOf
(
vo
.
getSubstrategy
()),
item
.
getConstantCode
()))
.
findFirst
()
.
ifPresent
(
sysConstantResp
->
vo
.
setStrategyName
(
sysConstantResp
.
getConstantName
()));
}
}
...
...
@@ -779,7 +787,7 @@ public class ProductServiceImpl implements ProductService, Constant {
if
(
i
<
fundNavs
.
size
()
-
1
)
{
FundNav
pre
=
fundNavs
.
get
(
i
+
1
);
if
(
pre
.
getNav
().
compareTo
(
BigDecimal
.
ZERO
)
==
1
)
{
if
(
pre
.
getNav
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
BigDecimal
dailyIncrease
=
f
.
getNav
().
subtract
(
pre
.
getNav
()).
divide
(
pre
.
getNav
(),
4
,
BigDecimal
.
ROUND_HALF_UP
);
vo
.
setDailyIncrease
(
BigDecimalUtil
.
multiply100
(
dailyIncrease
));
}
...
...
@@ -1016,7 +1024,7 @@ public class ProductServiceImpl implements ProductService, Constant {
List
<
ProductInfoVO
>
vos
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
req
.
getFundIds
()))
{
vos
=
getProductInfoVOS
(
fundCounts
,
req
.
getFundIds
()
,
1
);
vos
=
getProductInfoVOS
(
fundCounts
,
req
.
getFundIds
());
}
return
vos
;
...
...
@@ -1153,7 +1161,7 @@ public class ProductServiceImpl implements ProductService, Constant {
}).
collect
(
Collectors
.
toList
());
}
private
List
<
ProductInfoVO
>
getProductInfoVOS
(
List
<
FundCount
>
fundCounts
,
List
<
String
>
list
,
Integer
productType
)
{
private
List
<
ProductInfoVO
>
getProductInfoVOS
(
List
<
FundCount
>
fundCounts
,
List
<
String
>
list
)
{
FundInfoExample
example
=
new
FundInfoExample
();
example
.
createCriteria
().
andIdIn
(
list
).
andDeleteTagEqualTo
(
ZERO_NUM
);
example
.
setOrderByClause
(
"create_time desc"
);
...
...
@@ -1185,7 +1193,7 @@ public class ProductServiceImpl implements ProductService, Constant {
}
}
return
fundInfos
.
stream
().
map
(
p
->
getProductInfoVO
(
fundCountMap
,
rateMappingMap
,
p
,
null
,
productType
,
fundNavMap
))
return
fundInfos
.
stream
().
map
(
p
->
getProductInfoVO
(
fundCountMap
,
rateMappingMap
,
p
,
fundNavMap
))
.
collect
(
Collectors
.
toList
());
}
...
...
@@ -1196,7 +1204,7 @@ public class ProductServiceImpl implements ProductService, Constant {
private
ProductInfoVO
getProductInfoVO
(
Map
<
String
,
FundCount
>
fundCountMap
,
Map
<
String
,
FundRateMapping
>
rateMappingMap
,
FundInfo
fundInfo
,
Set
<
String
>
fundInfoReports
,
Integer
productType
,
Map
<
String
,
FundNav
>
fundNavMap
)
{
Map
<
String
,
FundNav
>
fundNavMap
)
{
ProductInfoVO
vo
=
new
ProductInfoVO
();
if
(
fundCountMap
.
containsKey
(
fundInfo
.
getId
()))
{
FundCount
fundCount
=
fundCountMap
.
get
(
fundInfo
.
getId
());
...
...
@@ -1207,7 +1215,7 @@ public class ProductServiceImpl implements ProductService, Constant {
vo
.
setRetIncep
(
multiply100
(
fundCount
.
getRetIncep
()));
vo
.
setCumulativeProfit
(
BigDecimalUtil
.
toString
(
fundCount
.
getCumulativeNav
()));
}
vo
.
setProductType
(
productType
);
vo
.
setProductType
(
1
);
String
fundId
=
fundInfo
.
getId
();
vo
.
setFundId
(
fundId
);
...
...
@@ -1221,11 +1229,7 @@ public class ProductServiceImpl implements ProductService, Constant {
// 风险等级
vo
.
setRiskLevel
(
fundInfo
.
getRiskLevel
());
if
(
fundInfoReports
!=
null
&&
fundInfoReports
.
contains
(
fundId
))
{
vo
.
setIsReport
(
1
);
}
else
{
vo
.
setIsReport
(
0
);
}
vo
.
setIsReport
(
0
);
vo
.
setIsAppoint
(
fundInfo
.
getType
());
// 最新净值
...
...
@@ -1420,10 +1424,10 @@ public class ProductServiceImpl implements ProductService, Constant {
if
(
detailResp
.
getSubstrategy
()
!=
null
)
{
CommonResp
<
List
<
SysConstantResp
>>
listCommonResp
=
this
.
fatools
.
queryLabels
(
SysConstEnums
.
TAMPSUBSTRATEGY
.
getConstantGroup
());
if
(
listCommonResp
.
isSuccess
())
{
SysConstantResp
sysConstantResp
=
listCommonResp
.
getAttributes
().
stream
().
filter
(
item
->
StringUtils
.
equals
(
String
.
valueOf
(
detailResp
.
getSubstrategy
()),
item
.
getConstantCode
())).
findFirst
().
orElse
(
null
);
if
(
sysConstantResp
!=
null
)
{
detailResp
.
setStrategyName
(
sysConstantResp
.
getConstantName
());
}
listCommonResp
.
getAttributes
().
stream
()
.
filter
(
item
->
StringUtils
.
equals
(
String
.
valueOf
(
detailResp
.
getSubstrategy
()),
item
.
getConstantCode
())).
findFirst
()
.
ifPresent
(
sysConstantResp
->
detailResp
.
setStrategyName
(
sysConstantResp
.
getConstantName
()));
}
}
...
...
@@ -1646,7 +1650,7 @@ public class ProductServiceImpl implements ProductService, Constant {
List
<
String
>
checkFundIdList
=
feignClientForDiagnose
.
getFundCollectInfo
(
fundIdList
).
getAttributes
();
importedFundInfoList
.
stream
().
map
(
item
->
{
importedFundInfoList
.
forEach
(
item
->
{
FundSameResp
p
=
FundSameResp
.
builder
()
.
fundId
(
item
.
getId
())
.
fundName
(
item
.
getFundName
())
...
...
@@ -1656,11 +1660,221 @@ public class ProductServiceImpl implements ProductService, Constant {
if
(
fundCountMap
!=
null
&&
fundCountMap
.
containsKey
(
item
.
getId
()))
{
p
.
setRet1y
(
BigDecimalUtil
.
toString
(
fundCountMap
.
get
(
item
.
getId
()).
getRet1y
(),
2
));
}
});
return
new
ArrayList
<>(
0
);
}
return
p
;
@Override
public
List
<
Type
>
getSimpleFundList
(
List
<
String
>
list
)
{
return
fundInfoCustomMapper
.
getSimpleFundList
(
list
.
stream
().
collect
(
Collectors
.
joining
(
"','"
,
"'"
,
"'"
)));
}
@Override
public
CommonResp
<
List
<
FundNavMessage
>>
importNetCheckSave
(
IfaNetImportReq
req
)
{
Map
<
Long
,
IfaImportedFundNav
>
ifaNavMap
=
getIfaNavMap
(
req
.
getFundId
());
List
<
FundNavMessage
>
resultMessage
=
new
ArrayList
<>(
req
.
getFundNavMessages
().
size
()
*
2
);
AtomicBoolean
errorStatus
=
new
AtomicBoolean
(
false
);
List
<
List
<
Object
>>
read
=
req
.
getFundNavMessages
().
stream
().
map
(
ls
->
{
List
<
Object
>
linkedList
=
new
LinkedList
<>();
linkedList
.
add
(
ls
.
getPriceDate
()
!=
null
?
ls
.
getPriceDate
().
getTime
()
:
""
);
linkedList
.
add
(
ls
.
getNav
());
linkedList
.
add
(
ls
.
getCumulativeNav
());
return
linkedList
;
}).
collect
(
Collectors
.
toList
());
return
new
ArrayList
<>(
0
);
return
getListCommonResp
(
ifaNavMap
,
resultMessage
,
errorStatus
,
read
);
}
@NotNull
private
CommonResp
<
List
<
FundNavMessage
>>
getListCommonResp
(
Map
<
Long
,
IfaImportedFundNav
>
ifaNavMap
,
List
<
FundNavMessage
>
resultMessage
,
AtomicBoolean
errorStatus
,
List
<
List
<
Object
>>
read
)
{
List
<
FundNavMessage
>
newResultMessage
=
handlerNetImportCheck
(
ifaNavMap
,
resultMessage
,
errorStatus
,
read
);
if
(
errorStatus
.
get
())
{
this
.
ifaImportedFundNavMapper
.
batchInsert
(
resultMessage
.
stream
().
map
(
ls
->
{
IfaImportedFundNav
nav
=
new
IfaImportedFundNav
();
BeanUtils
.
copyProperties
(
ls
,
nav
);
return
nav
;
}).
collect
(
Collectors
.
toList
()));
return
CommonResp
.
success
();
}
newResultMessage
.
sort
(
Comparator
.
comparing
(
FundNavMessage:
:
getPriceDate
).
reversed
());
return
CommonResp
.
error
(
"9999"
,
"数据错误,请您重新核对"
,
newResultMessage
);
}
private
static
final
BigDecimal
compare02
=
new
BigDecimal
(
"0.2"
);
@Override
public
CommonResp
<
List
<
FundNavMessage
>>
importNet
(
MultipartFile
file
,
String
fundId
)
{
FundInfo
fundInfo
=
this
.
fundInfoMapper
.
selectByPrimaryKey
(
fundId
);
if
(
fundInfo
==
null
)
{
return
CommonResp
.
error
(
"获取不到基金信息"
);
}
Map
<
Long
,
IfaImportedFundNav
>
ifaNavMap
=
getIfaNavMap
(
fundId
);
try
(
InputStream
inputStream
=
file
.
getInputStream
())
{
ExcelReader
reader
=
ExcelUtil
.
getReader
(
inputStream
);
int
size
=
reader
.
readAll
().
size
();
List
<
FundNavMessage
>
resultMessage
=
new
ArrayList
<>(
size
*
2
);
AtomicBoolean
errorStatus
=
new
AtomicBoolean
(
false
);
List
<
List
<
Object
>>
read
=
reader
.
read
(
2
,
size
-
1
);
return
getListCommonResp
(
ifaNavMap
,
resultMessage
,
errorStatus
,
read
);
}
catch
(
IOException
e
)
{
return
CommonResp
.
error
(
"文件格式错误,无法读取,请您重新下载导入模板"
);
}
}
@NotNull
private
Map
<
Long
,
IfaImportedFundNav
>
getIfaNavMap
(
String
fundId
)
{
IfaImportedFundNavExample
example
=
new
IfaImportedFundNavExample
();
example
.
createCriteria
().
andFundIdEqualTo
(
fundId
);
List
<
IfaImportedFundNav
>
ifaImportedFundNavs
=
this
.
ifaImportedFundNavMapper
.
selectByExample
(
example
);
Map
<
Long
,
IfaImportedFundNav
>
ifaNavMap
;
if
(
CollectionUtils
.
isEmpty
(
ifaImportedFundNavs
))
{
ifaNavMap
=
new
HashMap
<>(
0
);
}
else
{
ifaNavMap
=
ifaImportedFundNavs
.
stream
().
collect
(
Collectors
.
toMap
(
ls
->
ls
.
getPriceDate
().
getTime
(),
ls
->
ls
,
(
newValue
,
oldValue
)
->
newValue
));
}
return
ifaNavMap
;
}
private
List
<
FundNavMessage
>
handlerNetImportCheck
(
Map
<
Long
,
IfaImportedFundNav
>
ifaNavMap
,
List
<
FundNavMessage
>
resultMessage
,
AtomicBoolean
errorStatus
,
List
<
List
<
Object
>>
read
)
{
checkParam
(
ifaNavMap
,
resultMessage
,
errorStatus
,
read
);
duplicateCheck
(
resultMessage
,
errorStatus
);
resultMessage
.
sort
(
Comparator
.
comparing
(
FundNavMessage:
:
getPriceDate
).
reversed
());
return
differCheck
(
resultMessage
);
}
private
void
checkParam
(
Map
<
Long
,
IfaImportedFundNav
>
ifaNavMap
,
List
<
FundNavMessage
>
resultMessage
,
AtomicBoolean
errorStatus
,
List
<
List
<
Object
>>
read
)
{
read
.
forEach
(
ls
->
{
boolean
errorRow
=
false
;
FundNavMessage
message
=
new
FundNavMessage
();
String
row1
=
(
ls
.
get
(
0
)
+
""
).
trim
();
if
(
NumberUtil
.
isNumber
(
row1
))
{
errorRow
=
true
;
message
.
setMessage
(
"[日期格式错误]"
);
}
else
{
message
.
setPriceDate
(
DateUtil
.
date
(
Long
.
parseLong
(
row1
)));
}
String
row2
=
(
ls
.
get
(
1
)
+
""
).
trim
();
if
(!
BigDecimalValidator
.
getInstance
().
isValid
(
row2
))
{
errorRow
=
true
;
if
(
StringUtils
.
isEmpty
(
message
.
getMessage
()))
{
message
.
setMessage
(
"[单位净值为空或格式错误]"
);
}
else
{
message
.
setMessage
(
message
.
getMessage
()
+
",[单位净值为空或格式错误]"
);
}
}
else
{
message
.
setNav
(
new
BigDecimal
(
row2
));
}
String
row3
=
(
ls
.
get
(
2
)
+
""
).
trim
();
if
(!
BigDecimalValidator
.
getInstance
().
isValid
(
row3
))
{
errorRow
=
true
;
if
(
StringUtils
.
isEmpty
(
message
.
getMessage
()))
{
message
.
setMessage
(
"[累计分红再投净值为空或格式错误]"
);
}
else
{
message
.
setMessage
(
message
.
getMessage
()
+
",[累计分红再投净值为空或格式错误]"
);
}
}
else
{
message
.
setCumulativeNav
(
new
BigDecimal
(
row3
));
}
if
(
errorRow
)
{
message
.
setConfirmStatus
(
3
);
errorStatus
.
set
(
true
);
}
else
if
(
StringUtils
.
isNotEmpty
(
row1
)
&&
ifaNavMap
.
containsKey
(
Long
.
parseLong
(
row1
)))
{
message
.
setConfirmStatus
(
3
);
errorStatus
.
set
(
true
);
if
(
StringUtils
.
isEmpty
(
message
.
getMessage
()))
{
message
.
setMessage
(
"[相同日期存在重复数据]"
);
}
else
{
message
.
setMessage
(
message
.
getMessage
()
+
",[累计分红再投净值为空或格式错误]"
);
}
FundNavMessage
messageCopy
=
new
FundNavMessage
();
BeanUtils
.
copyProperties
(
ifaNavMap
.
get
(
Long
.
parseLong
(
row1
)),
messageCopy
);
messageCopy
.
setConfirmStatus
(
3
);
resultMessage
.
add
(
messageCopy
);
}
resultMessage
.
add
(
message
);
});
}
private
List
<
FundNavMessage
>
differCheck
(
List
<
FundNavMessage
>
resultMessage
)
{
int
length
=
resultMessage
.
size
();
List
<
FundNavMessage
>
newResultMessage
=
new
ArrayList
<>(
length
);
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
FundNavMessage
message
=
resultMessage
.
get
(
i
);
if
(
message
.
getConfirmStatus
()
==
1
&&
(
i
+
1
)
<
length
)
{
FundNavMessage
messageAdd
=
resultMessage
.
get
(
i
+
1
);
if
(
resultMessage
.
get
(
i
+
1
).
getConfirmStatus
()
==
1
)
{
BigDecimal
navSubtract
=
subtractAbs
(
message
.
getNav
(),
messageAdd
.
getNav
());
if
(
compare02
.
compareTo
(
navSubtract
)
<
0
)
{
message
.
setConfirmStatus
(
2
);
message
.
setMessage
(
"[单位净值]与上次对比相差超过20%"
);
}
BigDecimal
cumSubtract
=
subtractAbs
(
message
.
getCumulativeNav
(),
messageAdd
.
getCumulativeNav
());
if
(
compare02
.
compareTo
(
cumSubtract
)
<
0
)
{
message
.
setConfirmStatus
(
2
);
if
(
StringUtils
.
isNotEmpty
(
message
.
getMessage
()))
{
message
.
setMessage
(
",[累计分红再投净值]与上次对比相差超过20%"
);
}
else
{
message
.
setMessage
(
"[累计分红再投净值]与上次对比相差超过20%"
);
}
}
}
else
{
i
++;
}
newResultMessage
.
add
(
message
);
}
newResultMessage
.
add
(
message
);
}
return
newResultMessage
;
}
private
void
duplicateCheck
(
List
<
FundNavMessage
>
resultMessage
,
AtomicBoolean
errorStatus
)
{
Map
<
Long
,
Long
>
priceDateCountMap
=
resultMessage
.
stream
()
.
filter
(
message
->
!
message
.
getConfirmStatus
().
equals
(
3
))
.
collect
(
Collectors
.
groupingBy
(
ls
->
ls
.
getPriceDate
().
getTime
(),
Collectors
.
counting
()));
Set
<
Long
>
duplicateSet
=
new
HashSet
<>(
priceDateCountMap
.
size
()
>>
1
);
priceDateCountMap
.
forEach
((
key
,
value
)
->
{
if
(
value
>
1
)
{
duplicateSet
.
add
(
key
);
}
});
resultMessage
.
forEach
(
message
->
{
Date
priceDate
=
message
.
getPriceDate
();
if
(
priceDate
!=
null
&&
duplicateSet
.
contains
(
priceDate
.
getTime
()))
{
errorStatus
.
set
(
true
);
message
.
setConfirmStatus
(
3
);
if
(
StringUtils
.
isEmpty
(
message
.
getMessage
()))
{
message
.
setMessage
(
"[相同日期存在重复数据]"
);
}
else
{
message
.
setMessage
(
message
.
getMessage
()
+
",[累计分红再投净值为空或格式错误]"
);
}
}
});
}
private
ArrayList
<
TrackRecordVO
>
getPrivateFundTrackRecordVOS
(
IfaImportedFundCount
fundCount
)
{
...
...
src/main/resources/mybatis/generator/IfaImportedFundNavMapper.xml
View file @
ed28d3ee
...
...
@@ -4,12 +4,13 @@
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.fund.entity.generator.IfaImportedFundNav"
>
<!--@mbg.generated-->
<!--@Table ifa_imported_fund_nav-->
<id
column=
"id"
jdbcType=
"
INTEGER
"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"
BIGINT
"
property=
"id"
/>
<result
column=
"fund_id"
jdbcType=
"VARCHAR"
property=
"fundId"
/>
<result
column=
"price_date"
jdbcType=
"
TIMESTAMP
"
property=
"priceDate"
/>
<result
column=
"price_date"
jdbcType=
"
DATE
"
property=
"priceDate"
/>
<result
column=
"nav"
jdbcType=
"DECIMAL"
property=
"nav"
/>
<result
column=
"cumulative_nav"
jdbcType=
"DECIMAL"
property=
"cumulativeNav"
/>
<result
column=
"delete_tag"
jdbcType=
"INTEGER"
property=
"deleteTag"
/>
<result
column=
"org_id"
jdbcType=
"VARCHAR"
property=
"orgId"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--@mbg.generated-->
...
...
@@ -73,7 +74,7 @@
</sql>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
id, fund_id, price_date, nav, cumulative_nav, delete_tag
id, fund_id, price_date, nav, cumulative_nav, delete_tag
, org_id
</sql>
<select
id=
"selectByExample"
parameterType=
"com.tanpu.fund.entity.generator.IfaImportedFundNavExample"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
...
...
@@ -90,17 +91,17 @@
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Integer
"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.
Long
"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
select
<include
refid=
"Base_Column_List"
/>
from ifa_imported_fund_nav
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Integer
"
>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.
Long
"
>
<!--@mbg.generated-->
delete from ifa_imported_fund_nav
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.tanpu.fund.entity.generator.IfaImportedFundNavExample"
>
<!--@mbg.generated-->
...
...
@@ -112,9 +113,11 @@
<insert
id=
"insert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.tanpu.fund.entity.generator.IfaImportedFundNav"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ifa_imported_fund_nav (fund_id, price_date, nav,
cumulative_nav, delete_tag)
values (#{fundId,jdbcType=VARCHAR}, #{priceDate,jdbcType=TIMESTAMP}, #{nav,jdbcType=DECIMAL},
#{cumulativeNav,jdbcType=DECIMAL}, #{deleteTag,jdbcType=INTEGER})
cumulative_nav, delete_tag, org_id
)
values (#{fundId,jdbcType=VARCHAR}, #{priceDate,jdbcType=DATE}, #{nav,jdbcType=DECIMAL},
#{cumulativeNav,jdbcType=DECIMAL}, #{deleteTag,jdbcType=INTEGER}, #{orgId,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.tanpu.fund.entity.generator.IfaImportedFundNav"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
...
...
@@ -135,13 +138,16 @@
<if
test=
"deleteTag != null"
>
delete_tag,
</if>
<if
test=
"orgId != null"
>
org_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fundId != null"
>
#{fundId,jdbcType=VARCHAR},
</if>
<if
test=
"priceDate != null"
>
#{priceDate,jdbcType=
TIMESTAMP
},
#{priceDate,jdbcType=
DATE
},
</if>
<if
test=
"nav != null"
>
#{nav,jdbcType=DECIMAL},
...
...
@@ -152,6 +158,9 @@
<if
test=
"deleteTag != null"
>
#{deleteTag,jdbcType=INTEGER},
</if>
<if
test=
"orgId != null"
>
#{orgId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.tanpu.fund.entity.generator.IfaImportedFundNavExample"
resultType=
"java.lang.Long"
>
...
...
@@ -166,13 +175,13 @@
update ifa_imported_fund_nav
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=
INTEGER
},
id = #{record.id,jdbcType=
BIGINT
},
</if>
<if
test=
"record.fundId != null"
>
fund_id = #{record.fundId,jdbcType=VARCHAR},
</if>
<if
test=
"record.priceDate != null"
>
price_date = #{record.priceDate,jdbcType=
TIMESTAMP
},
price_date = #{record.priceDate,jdbcType=
DATE
},
</if>
<if
test=
"record.nav != null"
>
nav = #{record.nav,jdbcType=DECIMAL},
...
...
@@ -183,6 +192,9 @@
<if
test=
"record.deleteTag != null"
>
delete_tag = #{record.deleteTag,jdbcType=INTEGER},
</if>
<if
test=
"record.orgId != null"
>
org_id = #{record.orgId,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -191,12 +203,13 @@
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--@mbg.generated-->
update ifa_imported_fund_nav
set id = #{record.id,jdbcType=
INTEGER
},
set id = #{record.id,jdbcType=
BIGINT
},
fund_id = #{record.fundId,jdbcType=VARCHAR},
price_date = #{record.priceDate,jdbcType=
TIMESTAMP
},
price_date = #{record.priceDate,jdbcType=
DATE
},
nav = #{record.nav,jdbcType=DECIMAL},
cumulative_nav = #{record.cumulativeNav,jdbcType=DECIMAL},
delete_tag = #{record.deleteTag,jdbcType=INTEGER}
delete_tag = #{record.deleteTag,jdbcType=INTEGER},
org_id = #{record.orgId,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -209,7 +222,7 @@
fund_id = #{fundId,jdbcType=VARCHAR},
</if>
<if
test=
"priceDate != null"
>
price_date = #{priceDate,jdbcType=
TIMESTAMP
},
price_date = #{priceDate,jdbcType=
DATE
},
</if>
<if
test=
"nav != null"
>
nav = #{nav,jdbcType=DECIMAL},
...
...
@@ -220,18 +233,22 @@
<if
test=
"deleteTag != null"
>
delete_tag = #{deleteTag,jdbcType=INTEGER},
</if>
<if
test=
"orgId != null"
>
org_id = #{orgId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=
INTEGER
}
where id = #{id,jdbcType=
BIGINT
}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.tanpu.fund.entity.generator.IfaImportedFundNav"
>
<!--@mbg.generated-->
update ifa_imported_fund_nav
set fund_id = #{fundId,jdbcType=VARCHAR},
price_date = #{priceDate,jdbcType=
TIMESTAMP
},
price_date = #{priceDate,jdbcType=
DATE
},
nav = #{nav,jdbcType=DECIMAL},
cumulative_nav = #{cumulativeNav,jdbcType=DECIMAL},
delete_tag = #{deleteTag,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
delete_tag = #{deleteTag,jdbcType=INTEGER},
org_id = #{orgId,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
...
...
@@ -239,43 +256,101 @@
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"fund_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=INTEGER} then #{item.fundId,jdbcType=VARCHAR}
when id = #{item.id,jdbcType=BIGINT} then #{item.fundId,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"price_date = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.priceDate,jdbcType=DATE}
</foreach>
</trim>
<trim
prefix=
"nav = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.nav,jdbcType=DECIMAL}
</foreach>
</trim>
<trim
prefix=
"cumulative_nav = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.cumulativeNav,jdbcType=DECIMAL}
</foreach>
</trim>
<trim
prefix=
"delete_tag = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.deleteTag,jdbcType=INTEGER}
</foreach>
</trim>
<trim
prefix=
"org_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.orgId,jdbcType=VARCHAR}
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<update
id=
"updateBatchSelective"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update ifa_imported_fund_nav
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"fund_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.fundId != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.fundId,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim
prefix=
"price_date = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=INTEGER} then #{item.priceDate,jdbcType=TIMESTAMP}
<if
test=
"item.priceDate != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.priceDate,jdbcType=DATE}
</if>
</foreach>
</trim>
<trim
prefix=
"nav = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=INTEGER} then #{item.nav,jdbcType=DECIMAL}
<if
test=
"item.nav != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.nav,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim
prefix=
"cumulative_nav = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=INTEGER} then #{item.cumulativeNav,jdbcType=DECIMAL}
<if
test=
"item.cumulativeNav != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.cumulativeNav,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim
prefix=
"delete_tag = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=INTEGER} then #{item.deleteTag,jdbcType=INTEGER}
<if
test=
"item.deleteTag != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.deleteTag,jdbcType=INTEGER}
</if>
</foreach>
</trim>
<trim
prefix=
"org_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
<if
test=
"item.orgId != null"
>
when id = #{item.id,jdbcType=BIGINT} then #{item.orgId,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=
INTEGER
}
#{item.id,jdbcType=
BIGINT
}
</foreach>
</update>
<insert
id=
"batchInsert"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"map"
useGeneratedKeys=
"true"
>
<!--@mbg.generated-->
insert into ifa_imported_fund_nav
(fund_id, price_date, nav, cumulative_nav, delete_tag)
(fund_id, price_date, nav, cumulative_nav, delete_tag
, org_id
)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.fundId,jdbcType=VARCHAR}, #{item.priceDate,jdbcType=TIMESTAMP}, #{item.nav,jdbcType=DECIMAL},
#{item.cumulativeNav,jdbcType=DECIMAL}, #{item.deleteTag,jdbcType=INTEGER})
(#{item.fundId,jdbcType=VARCHAR}, #{item.priceDate,jdbcType=DATE}, #{item.nav,jdbcType=DECIMAL},
#{item.cumulativeNav,jdbcType=DECIMAL}, #{item.deleteTag,jdbcType=INTEGER}, #{item.orgId,jdbcType=VARCHAR}
)
</foreach>
</insert>
<insert
id=
"insertOrUpdate"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.tanpu.fund.entity.generator.IfaImportedFundNav"
useGeneratedKeys=
"true"
>
...
...
@@ -290,28 +365,31 @@
nav,
cumulative_nav,
delete_tag,
org_id,
</trim>
values
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=
INTEGER
},
#{id,jdbcType=
BIGINT
},
</if>
#{fundId,jdbcType=VARCHAR},
#{priceDate,jdbcType=
TIMESTAMP
},
#{priceDate,jdbcType=
DATE
},
#{nav,jdbcType=DECIMAL},
#{cumulativeNav,jdbcType=DECIMAL},
#{deleteTag,jdbcType=INTEGER},
#{orgId,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim
suffixOverrides=
","
>
<if
test=
"id != null"
>
id = #{id,jdbcType=
INTEGER
},
id = #{id,jdbcType=
BIGINT
},
</if>
fund_id = #{fundId,jdbcType=VARCHAR},
price_date = #{priceDate,jdbcType=
TIMESTAMP
},
price_date = #{priceDate,jdbcType=
DATE
},
nav = #{nav,jdbcType=DECIMAL},
cumulative_nav = #{cumulativeNav,jdbcType=DECIMAL},
delete_tag = #{deleteTag,jdbcType=INTEGER},
org_id = #{orgId,jdbcType=VARCHAR},
</trim>
</insert>
<insert
id=
"insertOrUpdateSelective"
keyColumn=
"id"
keyProperty=
"id"
parameterType=
"com.tanpu.fund.entity.generator.IfaImportedFundNav"
useGeneratedKeys=
"true"
>
...
...
@@ -336,17 +414,20 @@
<if
test=
"deleteTag != null"
>
delete_tag,
</if>
<if
test=
"orgId != null"
>
org_id,
</if>
</trim>
values
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=
INTEGER
},
#{id,jdbcType=
BIGINT
},
</if>
<if
test=
"fundId != null"
>
#{fundId,jdbcType=VARCHAR},
</if>
<if
test=
"priceDate != null"
>
#{priceDate,jdbcType=
TIMESTAMP
},
#{priceDate,jdbcType=
DATE
},
</if>
<if
test=
"nav != null"
>
#{nav,jdbcType=DECIMAL},
...
...
@@ -357,17 +438,20 @@
<if
test=
"deleteTag != null"
>
#{deleteTag,jdbcType=INTEGER},
</if>
<if
test=
"orgId != null"
>
#{orgId,jdbcType=VARCHAR},
</if>
</trim>
on duplicate key update
<trim
suffixOverrides=
","
>
<if
test=
"id != null"
>
id = #{id,jdbcType=
INTEGER
},
id = #{id,jdbcType=
BIGINT
},
</if>
<if
test=
"fundId != null"
>
fund_id = #{fundId,jdbcType=VARCHAR},
</if>
<if
test=
"priceDate != null"
>
price_date = #{priceDate,jdbcType=
TIMESTAMP
},
price_date = #{priceDate,jdbcType=
DATE
},
</if>
<if
test=
"nav != null"
>
nav = #{nav,jdbcType=DECIMAL},
...
...
@@ -378,6 +462,9 @@
<if
test=
"deleteTag != null"
>
delete_tag = #{deleteTag,jdbcType=INTEGER},
</if>
<if
test=
"orgId != null"
>
org_id = #{orgId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
</mapper>
\ No newline at end of file
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