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
7b7395a1
Commit
7b7395a1
authored
Feb 18, 2022
by
钱坤
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
私募基金模糊查询里优化最新净值的获取
parent
4545a249
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1443 additions
and
1 deletion
+1443
-1
pom.xml
pom.xml
+19
-0
FundLatestNav.java
...n/java/com/tanpu/fund/entity/generator/FundLatestNav.java
+106
-0
FundLatestNavExample.java
...com/tanpu/fund/entity/generator/FundLatestNavExample.java
+839
-0
FundLatestNavJob.java
src/main/java/com/tanpu/fund/job/FundLatestNavJob.java
+38
-0
FundLatestNavMapper.java
.../com/tanpu/fund/mapper/generator/FundLatestNavMapper.java
+30
-0
FundInfoCustomMapper.java
...pu/fund/mapper/generator/custom/FundInfoCustomMapper.java
+9
-0
FundLatestNavService.java
...ava/com/tanpu/fund/service/impl/FundLatestNavService.java
+87
-0
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+5
-1
FundInfoCustomMapper.xml
...main/resources/mybatis/customize/FundInfoCustomMapper.xml
+19
-0
FundLatestNavMapper.xml
src/main/resources/mybatis/generator/FundLatestNavMapper.xml
+291
-0
No files found.
pom.xml
View file @
7b7395a1
...
...
@@ -352,6 +352,25 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
org.mybatis.generator
</groupId>
<artifactId>
mybatis-generator-maven-plugin
</artifactId>
<version>
1.3.5
</version>
<configuration>
<!--允许移动生成的文件 -->
<verbose>
true
</verbose>
<!-- 是否覆盖 -->
<overwrite>
true
</overwrite>
</configuration>
<dependencies>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.47
</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
...
...
src/main/java/com/tanpu/fund/entity/generator/FundLatestNav.java
0 → 100644
View file @
7b7395a1
package
com
.
tanpu
.
fund
.
entity
.
generator
;
import
java.math.BigDecimal
;
import
java.util.Date
;
public
class
FundLatestNav
{
private
Long
id
;
private
String
fundId
;
private
Date
priceDate
;
private
BigDecimal
nav
;
private
BigDecimal
cumulativeNav
;
private
BigDecimal
cumulativeNavWithdrawal
;
private
Integer
ishighOrLow
;
private
BigDecimal
tohighNavRatio
;
private
Date
createTime
;
private
Date
updateTime
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getFundId
()
{
return
fundId
;
}
public
void
setFundId
(
String
fundId
)
{
this
.
fundId
=
fundId
==
null
?
null
:
fundId
.
trim
();
}
public
Date
getPriceDate
()
{
return
priceDate
;
}
public
void
setPriceDate
(
Date
priceDate
)
{
this
.
priceDate
=
priceDate
;
}
public
BigDecimal
getNav
()
{
return
nav
;
}
public
void
setNav
(
BigDecimal
nav
)
{
this
.
nav
=
nav
;
}
public
BigDecimal
getCumulativeNav
()
{
return
cumulativeNav
;
}
public
void
setCumulativeNav
(
BigDecimal
cumulativeNav
)
{
this
.
cumulativeNav
=
cumulativeNav
;
}
public
BigDecimal
getCumulativeNavWithdrawal
()
{
return
cumulativeNavWithdrawal
;
}
public
void
setCumulativeNavWithdrawal
(
BigDecimal
cumulativeNavWithdrawal
)
{
this
.
cumulativeNavWithdrawal
=
cumulativeNavWithdrawal
;
}
public
Integer
getIshighOrLow
()
{
return
ishighOrLow
;
}
public
void
setIshighOrLow
(
Integer
ishighOrLow
)
{
this
.
ishighOrLow
=
ishighOrLow
;
}
public
BigDecimal
getTohighNavRatio
()
{
return
tohighNavRatio
;
}
public
void
setTohighNavRatio
(
BigDecimal
tohighNavRatio
)
{
this
.
tohighNavRatio
=
tohighNavRatio
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
src/main/java/com/tanpu/fund/entity/generator/FundLatestNavExample.java
0 → 100644
View file @
7b7395a1
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
;
public
class
FundLatestNavExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
FundLatestNavExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
public
String
getOrderByClause
()
{
return
orderByClause
;
}
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
public
boolean
isDistinct
()
{
return
distinct
;
}
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
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
<
java
.
sql
.
Date
>();
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
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdIsNull
()
{
addCriterion
(
"fund_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdIsNotNull
()
{
addCriterion
(
"fund_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdEqualTo
(
String
value
)
{
addCriterion
(
"fund_id ="
,
value
,
"fundId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdNotEqualTo
(
String
value
)
{
addCriterion
(
"fund_id <>"
,
value
,
"fundId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdGreaterThan
(
String
value
)
{
addCriterion
(
"fund_id >"
,
value
,
"fundId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"fund_id >="
,
value
,
"fundId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdLessThan
(
String
value
)
{
addCriterion
(
"fund_id <"
,
value
,
"fundId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"fund_id <="
,
value
,
"fundId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdLike
(
String
value
)
{
addCriterion
(
"fund_id like"
,
value
,
"fundId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdNotLike
(
String
value
)
{
addCriterion
(
"fund_id not like"
,
value
,
"fundId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"fund_id in"
,
values
,
"fundId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"fund_id not in"
,
values
,
"fundId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"fund_id between"
,
value1
,
value2
,
"fundId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFundIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"fund_id not between"
,
value1
,
value2
,
"fundId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateIsNull
()
{
addCriterion
(
"price_date is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateIsNotNull
()
{
addCriterion
(
"price_date is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateEqualTo
(
Date
value
)
{
addCriterionForJDBCDate
(
"price_date ="
,
value
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateNotEqualTo
(
Date
value
)
{
addCriterionForJDBCDate
(
"price_date <>"
,
value
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateGreaterThan
(
Date
value
)
{
addCriterionForJDBCDate
(
"price_date >"
,
value
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateGreaterThanOrEqualTo
(
Date
value
)
{
addCriterionForJDBCDate
(
"price_date >="
,
value
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateLessThan
(
Date
value
)
{
addCriterionForJDBCDate
(
"price_date <"
,
value
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateLessThanOrEqualTo
(
Date
value
)
{
addCriterionForJDBCDate
(
"price_date <="
,
value
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateIn
(
List
<
Date
>
values
)
{
addCriterionForJDBCDate
(
"price_date in"
,
values
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateNotIn
(
List
<
Date
>
values
)
{
addCriterionForJDBCDate
(
"price_date not in"
,
values
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateBetween
(
Date
value1
,
Date
value2
)
{
addCriterionForJDBCDate
(
"price_date between"
,
value1
,
value2
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPriceDateNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterionForJDBCDate
(
"price_date not between"
,
value1
,
value2
,
"priceDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNavIsNull
()
{
addCriterion
(
"nav is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNavIsNotNull
()
{
addCriterion
(
"nav is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNavEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"nav ="
,
value
,
"nav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNavNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"nav <>"
,
value
,
"nav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNavGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"nav >"
,
value
,
"nav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNavGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"nav >="
,
value
,
"nav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNavLessThan
(
BigDecimal
value
)
{
addCriterion
(
"nav <"
,
value
,
"nav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNavLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"nav <="
,
value
,
"nav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNavIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"nav in"
,
values
,
"nav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNavNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"nav not in"
,
values
,
"nav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNavBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"nav between"
,
value1
,
value2
,
"nav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andNavNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"nav not between"
,
value1
,
value2
,
"nav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavIsNull
()
{
addCriterion
(
"cumulative_nav is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavIsNotNull
()
{
addCriterion
(
"cumulative_nav is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"cumulative_nav ="
,
value
,
"cumulativeNav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"cumulative_nav <>"
,
value
,
"cumulativeNav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"cumulative_nav >"
,
value
,
"cumulativeNav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"cumulative_nav >="
,
value
,
"cumulativeNav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavLessThan
(
BigDecimal
value
)
{
addCriterion
(
"cumulative_nav <"
,
value
,
"cumulativeNav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"cumulative_nav <="
,
value
,
"cumulativeNav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"cumulative_nav in"
,
values
,
"cumulativeNav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"cumulative_nav not in"
,
values
,
"cumulativeNav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"cumulative_nav between"
,
value1
,
value2
,
"cumulativeNav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"cumulative_nav not between"
,
value1
,
value2
,
"cumulativeNav"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavWithdrawalIsNull
()
{
addCriterion
(
"cumulative_nav_withdrawal is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavWithdrawalIsNotNull
()
{
addCriterion
(
"cumulative_nav_withdrawal is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavWithdrawalEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"cumulative_nav_withdrawal ="
,
value
,
"cumulativeNavWithdrawal"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavWithdrawalNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"cumulative_nav_withdrawal <>"
,
value
,
"cumulativeNavWithdrawal"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavWithdrawalGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"cumulative_nav_withdrawal >"
,
value
,
"cumulativeNavWithdrawal"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavWithdrawalGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"cumulative_nav_withdrawal >="
,
value
,
"cumulativeNavWithdrawal"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavWithdrawalLessThan
(
BigDecimal
value
)
{
addCriterion
(
"cumulative_nav_withdrawal <"
,
value
,
"cumulativeNavWithdrawal"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavWithdrawalLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"cumulative_nav_withdrawal <="
,
value
,
"cumulativeNavWithdrawal"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavWithdrawalIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"cumulative_nav_withdrawal in"
,
values
,
"cumulativeNavWithdrawal"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavWithdrawalNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"cumulative_nav_withdrawal not in"
,
values
,
"cumulativeNavWithdrawal"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavWithdrawalBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"cumulative_nav_withdrawal between"
,
value1
,
value2
,
"cumulativeNavWithdrawal"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCumulativeNavWithdrawalNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"cumulative_nav_withdrawal not between"
,
value1
,
value2
,
"cumulativeNavWithdrawal"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIshighOrLowIsNull
()
{
addCriterion
(
"ishigh_or_low is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIshighOrLowIsNotNull
()
{
addCriterion
(
"ishigh_or_low is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIshighOrLowEqualTo
(
Integer
value
)
{
addCriterion
(
"ishigh_or_low ="
,
value
,
"ishighOrLow"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIshighOrLowNotEqualTo
(
Integer
value
)
{
addCriterion
(
"ishigh_or_low <>"
,
value
,
"ishighOrLow"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIshighOrLowGreaterThan
(
Integer
value
)
{
addCriterion
(
"ishigh_or_low >"
,
value
,
"ishighOrLow"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIshighOrLowGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"ishigh_or_low >="
,
value
,
"ishighOrLow"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIshighOrLowLessThan
(
Integer
value
)
{
addCriterion
(
"ishigh_or_low <"
,
value
,
"ishighOrLow"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIshighOrLowLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"ishigh_or_low <="
,
value
,
"ishighOrLow"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIshighOrLowIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"ishigh_or_low in"
,
values
,
"ishighOrLow"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIshighOrLowNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"ishigh_or_low not in"
,
values
,
"ishighOrLow"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIshighOrLowBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"ishigh_or_low between"
,
value1
,
value2
,
"ishighOrLow"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIshighOrLowNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"ishigh_or_low not between"
,
value1
,
value2
,
"ishighOrLow"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTohighNavRatioIsNull
()
{
addCriterion
(
"tohigh_nav_ratio is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTohighNavRatioIsNotNull
()
{
addCriterion
(
"tohigh_nav_ratio is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTohighNavRatioEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"tohigh_nav_ratio ="
,
value
,
"tohighNavRatio"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTohighNavRatioNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"tohigh_nav_ratio <>"
,
value
,
"tohighNavRatio"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTohighNavRatioGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"tohigh_nav_ratio >"
,
value
,
"tohighNavRatio"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTohighNavRatioGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"tohigh_nav_ratio >="
,
value
,
"tohighNavRatio"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTohighNavRatioLessThan
(
BigDecimal
value
)
{
addCriterion
(
"tohigh_nav_ratio <"
,
value
,
"tohighNavRatio"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTohighNavRatioLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"tohigh_nav_ratio <="
,
value
,
"tohighNavRatio"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTohighNavRatioIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"tohigh_nav_ratio in"
,
values
,
"tohighNavRatio"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTohighNavRatioNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"tohigh_nav_ratio not in"
,
values
,
"tohighNavRatio"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTohighNavRatioBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"tohigh_nav_ratio between"
,
value1
,
value2
,
"tohighNavRatio"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTohighNavRatioNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"tohigh_nav_ratio not between"
,
value1
,
value2
,
"tohighNavRatio"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNull
()
{
addCriterion
(
"create_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIsNotNull
()
{
addCriterion
(
"create_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"create_time ="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <>"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"create_time >"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time >="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThan
(
Date
value
)
{
addCriterion
(
"create_time <"
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"create_time <="
,
value
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"create_time not in"
,
values
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNull
()
{
addCriterion
(
"update_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIsNotNull
()
{
addCriterion
(
"update_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"update_time ="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"update_time <>"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"update_time >"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"update_time >="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThan
(
Date
value
)
{
addCriterion
(
"update_time <"
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"update_time <="
,
value
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"update_time in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"update_time not in"
,
values
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"update_time between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
src/main/java/com/tanpu/fund/job/FundLatestNavJob.java
0 → 100644
View file @
7b7395a1
package
com
.
tanpu
.
fund
.
job
;
import
com.tanpu.common.utils.RedisUtils
;
import
com.tanpu.fund.service.impl.FundLatestNavService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
javax.annotation.Resource
;
/**
* @author: zyh
* <p>
*/
@Slf4j
public
class
FundLatestNavJob
{
@Resource
private
FundLatestNavService
fundLatestNavService
;
@Resource
private
RedisUtils
redisUtils
;
@Scheduled
(
cron
=
"5 4/10 * * * ?"
)
public
void
execute
()
{
long
start
=
System
.
currentTimeMillis
();
try
{
log
.
info
(
"私募基金最新净值更新job开始"
);
redisUtils
.
lockAndExecute
(
""
+
this
.
getClass
().
getSimpleName
(),
1
,
200
,
()
->
{
fundLatestNavService
.
sync
();
return
1
;
});
}
catch
(
RedisUtils
.
LockUnacquiredException
ee
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
""
,
e
);
}
finally
{
log
.
info
(
"私募基金最新净值更新job结束, 耗时: {}ms"
,
System
.
currentTimeMillis
()
-
start
);
}
}
}
src/main/java/com/tanpu/fund/mapper/generator/FundLatestNavMapper.java
0 → 100644
View file @
7b7395a1
package
com
.
tanpu
.
fund
.
mapper
.
generator
;
import
com.tanpu.fund.entity.generator.FundLatestNav
;
import
com.tanpu.fund.entity.generator.FundLatestNavExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
public
interface
FundLatestNavMapper
{
long
countByExample
(
FundLatestNavExample
example
);
int
deleteByExample
(
FundLatestNavExample
example
);
int
deleteByPrimaryKey
(
Long
id
);
int
insert
(
FundLatestNav
record
);
int
insertSelective
(
FundLatestNav
record
);
List
<
FundLatestNav
>
selectByExample
(
FundLatestNavExample
example
);
FundLatestNav
selectByPrimaryKey
(
Long
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
FundLatestNav
record
,
@Param
(
"example"
)
FundLatestNavExample
example
);
int
updateByExample
(
@Param
(
"record"
)
FundLatestNav
record
,
@Param
(
"example"
)
FundLatestNavExample
example
);
int
updateByPrimaryKeySelective
(
FundLatestNav
record
);
int
updateByPrimaryKey
(
FundLatestNav
record
);
}
\ No newline at end of file
src/main/java/com/tanpu/fund/mapper/generator/custom/FundInfoCustomMapper.java
View file @
7b7395a1
...
...
@@ -2,12 +2,14 @@ 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.FundLatestNav
;
import
com.tanpu.fund.entity.generator.FundNav
;
import
org.apache.ibatis.annotations.MapKey
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -57,4 +59,11 @@ public interface FundInfoCustomMapper {
@Select
(
"select t.id as id,t.fund_short_name as value from fund_info t where t.fund_short_name like #{productName} and t.delete_tag=0"
)
List
<
Type
>
getFundInfoLikeName
(
@Param
(
"productName"
)
String
productName
);
/**
* 获取*私募*基金最新净值
*
* @return
*/
List
<
FundLatestNav
>
getFundLatestNet
(
@Param
(
"start"
)
Date
start
);
}
src/main/java/com/tanpu/fund/service/impl/FundLatestNavService.java
0 → 100644
View file @
7b7395a1
package
com
.
tanpu
.
fund
.
service
.
impl
;
import
com.tanpu.common.utils.DateUtils
;
import
com.tanpu.fund.entity.generator.FundLatestNav
;
import
com.tanpu.fund.entity.generator.FundLatestNavExample
;
import
com.tanpu.fund.entity.generator.FundNav
;
import
com.tanpu.fund.mapper.generator.FundLatestNavMapper
;
import
com.tanpu.fund.mapper.generator.custom.FundInfoCustomMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@Service
@Slf4j
public
class
FundLatestNavService
{
@Resource
private
FundLatestNavMapper
fundLatestNavMapper
;
@Resource
private
FundInfoCustomMapper
fundInfoCustomMapper
;
public
List
<
FundNav
>
getLatestNavBy
(
List
<
String
>
fundIdList
)
{
if
(
CollectionUtils
.
isEmpty
(
fundIdList
))
{
return
new
ArrayList
<>();
}
FundLatestNavExample
example
=
new
FundLatestNavExample
();
example
.
createCriteria
().
andFundIdIn
(
fundIdList
);
List
<
FundLatestNav
>
navList
=
fundLatestNavMapper
.
selectByExample
(
example
);
return
navList
.
stream
().
map
(
p
->
{
FundNav
target
=
new
FundNav
();
BeanUtils
.
copyProperties
(
p
,
target
);
return
target
;
}).
collect
(
Collectors
.
toList
());
}
public
void
sync
(){
FundLatestNavExample
example
=
new
FundLatestNavExample
();
example
.
createCriteria
().
andFundIdEqualTo
(
"DF17000000110"
);
List
<
FundLatestNav
>
list
=
fundLatestNavMapper
.
selectByExample
(
example
);
Date
startTime
=
list
.
get
(
0
).
getCreateTime
();
List
<
FundLatestNav
>
latestList
=
fundInfoCustomMapper
.
getFundLatestNet
(
startTime
);
log
.
info
(
"私募新净值统计, count: {}, start: {}"
,
latestList
.
size
(),
DateUtils
.
format
(
startTime
));
if
(
CollectionUtils
.
isEmpty
(
latestList
))
{
log
.
info
(
"私募没有新净值数据,结束"
);
return
;
}
int
p
=
0
;
while
(
p
<
latestList
.
size
())
{
List
<
FundLatestNav
>
batchList
=
latestList
.
subList
(
p
,
Math
.
min
(
latestList
.
size
(),
p
+
200
));
if
(
CollectionUtils
.
isEmpty
(
batchList
))
{
break
;
}
List
<
String
>
idList
=
batchList
.
stream
().
map
(
FundLatestNav:
:
getFundId
).
collect
(
Collectors
.
toList
());
FundLatestNavExample
latestNavExample
=
new
FundLatestNavExample
();
latestNavExample
.
createCriteria
().
andFundIdIn
(
idList
);
Map
<
String
,
List
<
FundLatestNav
>>
existMap
=
fundLatestNavMapper
.
selectByExample
(
latestNavExample
)
.
stream
().
collect
(
Collectors
.
groupingBy
(
FundLatestNav:
:
getFundId
));
for
(
FundLatestNav
latestNav
:
batchList
)
{
latestNav
.
setUpdateTime
(
null
);
if
(
existMap
.
containsKey
(
latestNav
.
getFundId
()))
{
// update
latestNav
.
setId
(
existMap
.
get
(
latestNav
.
getFundId
()).
get
(
0
).
getId
());
fundLatestNavMapper
.
updateByPrimaryKeySelective
(
latestNav
);
}
else
{
// insert
fundLatestNavMapper
.
insertSelective
(
latestNav
);
}
}
p
+=
200
;
}
Date
newStartTime
=
latestList
.
stream
().
map
(
FundLatestNav:
:
getCreateTime
).
max
(
Date:
:
compareTo
).
get
();
FundLatestNav
target
=
new
FundLatestNav
();
target
.
setCreateTime
(
newStartTime
);
int
c
=
fundLatestNavMapper
.
updateByExampleSelective
(
target
,
example
);
log
.
info
(
"私募新净值更新起始时间,affected: {}, start: {}"
,
c
,
DateUtils
.
format
(
newStartTime
));
}
}
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
7b7395a1
...
...
@@ -124,6 +124,8 @@ public class ProductServiceImpl implements ProductService, Constant {
@Resource
private
FeignForProduct
product
;
@Resource
private
FundLatestNavService
fundLatestNavService
;
@Override
public
Page
<
ProductInfoVO
>
getProductList
(
ProductInfoReq
req
)
{
...
...
@@ -2503,7 +2505,9 @@ public class ProductServiceImpl implements ProductService, Constant {
}
// 查询基金最新净值
List
<
FundNav
>
fundInfoNewNet
=
fundInfoCustomMapper
.
getFundInfoNewNet
(
fundInfoList
.
stream
().
map
(
Type:
:
getId
).
collect
(
Collectors
.
toList
()));
List
<
FundNav
>
fundInfoNewNet
=
fundLatestNavService
.
getLatestNavBy
(
fundInfoList
.
stream
().
map
(
Type:
:
getId
).
collect
(
Collectors
.
toList
()));
// 下面这个sql太慢了,换个新方案
// List<FundNav> fundInfoNewNet = fundInfoCustomMapper.getFundInfoNewNet(fundInfoList.stream().map(Type::getId).collect(Collectors.toList()));
Map
<
String
,
FundNav
>
fundNavMap
=
null
;
if
(
CollectionUtils
.
isNotEmpty
(
fundInfoNewNet
))
{
fundNavMap
=
fundInfoNewNet
.
stream
().
collect
(
Collectors
.
toMap
(
FundNav:
:
getFundId
,
c
->
c
));
...
...
src/main/resources/mybatis/customize/FundInfoCustomMapper.xml
View file @
7b7395a1
...
...
@@ -64,4 +64,23 @@
left join ifa_imported_fund_nav res on t.fund_id = res.fund_id and t.price_date = res.price_date
</select>
<select
id=
"getFundLatestNet"
resultType=
"com.tanpu.fund.entity.generator.FundLatestNav"
>
select
res.fund_id as fundId,
res.fund_code as fundCode,
res.price_date as priceDate,
res.nav as nav,
res.cumulative_nav as cumulativeNav,
res.cumulative_nav_withdrawal as cumulativeNavWithdrawal,
res.ishigh_or_low as ishighOrLow,
res.tohigh_nav_ratio as tohighNavRatio,
res.create_time as createTime
from
(SELECT fund_id, max(price_date) as price_date FROM fund_nav WHERE
create_time
<![CDATA[ >]]>
#{start, jdbcType=TIMESTAMP} and delete_tag = 0
and nav is not null and cumulative_nav is not null
GROUP by fund_id) t
left join fund_nav res on t.fund_id = res.fund_id and t.price_date = res.price_date
</select>
</mapper>
src/main/resources/mybatis/generator/FundLatestNavMapper.xml
0 → 100644
View file @
7b7395a1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.tanpu.fund.mapper.generator.FundLatestNavMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.fund.entity.generator.FundLatestNav"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"fund_id"
jdbcType=
"VARCHAR"
property=
"fundId"
/>
<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=
"cumulative_nav_withdrawal"
jdbcType=
"DECIMAL"
property=
"cumulativeNavWithdrawal"
/>
<result
column=
"ishigh_or_low"
jdbcType=
"INTEGER"
property=
"ishighOrLow"
/>
<result
column=
"tohigh_nav_ratio"
jdbcType=
"DECIMAL"
property=
"tohighNavRatio"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, fund_id, price_date, nav, cumulative_nav, cumulative_nav_withdrawal, ishigh_or_low,
tohigh_nav_ratio, create_time, update_time
</sql>
<select
id=
"selectByExample"
parameterType=
"com.tanpu.fund.entity.generator.FundLatestNavExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from fund_latest_nav
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from fund_latest_nav
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete from fund_latest_nav
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.tanpu.fund.entity.generator.FundLatestNavExample"
>
delete from fund_latest_nav
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.tanpu.fund.entity.generator.FundLatestNav"
>
insert into fund_latest_nav (id, fund_id, price_date,
nav, cumulative_nav, cumulative_nav_withdrawal,
ishigh_or_low, tohigh_nav_ratio, create_time,
update_time)
values (#{id,jdbcType=BIGINT}, #{fundId,jdbcType=VARCHAR}, #{priceDate,jdbcType=DATE},
#{nav,jdbcType=DECIMAL}, #{cumulativeNav,jdbcType=DECIMAL}, #{cumulativeNavWithdrawal,jdbcType=DECIMAL},
#{ishighOrLow,jdbcType=INTEGER}, #{tohighNavRatio,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.tanpu.fund.entity.generator.FundLatestNav"
>
insert into fund_latest_nav
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"fundId != null"
>
fund_id,
</if>
<if
test=
"priceDate != null"
>
price_date,
</if>
<if
test=
"nav != null"
>
nav,
</if>
<if
test=
"cumulativeNav != null"
>
cumulative_nav,
</if>
<if
test=
"cumulativeNavWithdrawal != null"
>
cumulative_nav_withdrawal,
</if>
<if
test=
"ishighOrLow != null"
>
ishigh_or_low,
</if>
<if
test=
"tohighNavRatio != null"
>
tohigh_nav_ratio,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"fundId != null"
>
#{fundId,jdbcType=VARCHAR},
</if>
<if
test=
"priceDate != null"
>
#{priceDate,jdbcType=DATE},
</if>
<if
test=
"nav != null"
>
#{nav,jdbcType=DECIMAL},
</if>
<if
test=
"cumulativeNav != null"
>
#{cumulativeNav,jdbcType=DECIMAL},
</if>
<if
test=
"cumulativeNavWithdrawal != null"
>
#{cumulativeNavWithdrawal,jdbcType=DECIMAL},
</if>
<if
test=
"ishighOrLow != null"
>
#{ishighOrLow,jdbcType=INTEGER},
</if>
<if
test=
"tohighNavRatio != null"
>
#{tohighNavRatio,jdbcType=DECIMAL},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.tanpu.fund.entity.generator.FundLatestNavExample"
resultType=
"java.lang.Long"
>
select count(*) from fund_latest_nav
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update fund_latest_nav
<set>
<if
test=
"record.id != null"
>
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=DATE},
</if>
<if
test=
"record.nav != null"
>
nav = #{record.nav,jdbcType=DECIMAL},
</if>
<if
test=
"record.cumulativeNav != null"
>
cumulative_nav = #{record.cumulativeNav,jdbcType=DECIMAL},
</if>
<if
test=
"record.cumulativeNavWithdrawal != null"
>
cumulative_nav_withdrawal = #{record.cumulativeNavWithdrawal,jdbcType=DECIMAL},
</if>
<if
test=
"record.ishighOrLow != null"
>
ishigh_or_low = #{record.ishighOrLow,jdbcType=INTEGER},
</if>
<if
test=
"record.tohighNavRatio != null"
>
tohigh_nav_ratio = #{record.tohighNavRatio,jdbcType=DECIMAL},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update fund_latest_nav
set id = #{record.id,jdbcType=BIGINT},
fund_id = #{record.fundId,jdbcType=VARCHAR},
price_date = #{record.priceDate,jdbcType=DATE},
nav = #{record.nav,jdbcType=DECIMAL},
cumulative_nav = #{record.cumulativeNav,jdbcType=DECIMAL},
cumulative_nav_withdrawal = #{record.cumulativeNavWithdrawal,jdbcType=DECIMAL},
ishigh_or_low = #{record.ishighOrLow,jdbcType=INTEGER},
tohigh_nav_ratio = #{record.tohighNavRatio,jdbcType=DECIMAL},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.tanpu.fund.entity.generator.FundLatestNav"
>
update fund_latest_nav
<set>
<if
test=
"fundId != null"
>
fund_id = #{fundId,jdbcType=VARCHAR},
</if>
<if
test=
"priceDate != null"
>
price_date = #{priceDate,jdbcType=DATE},
</if>
<if
test=
"nav != null"
>
nav = #{nav,jdbcType=DECIMAL},
</if>
<if
test=
"cumulativeNav != null"
>
cumulative_nav = #{cumulativeNav,jdbcType=DECIMAL},
</if>
<if
test=
"cumulativeNavWithdrawal != null"
>
cumulative_nav_withdrawal = #{cumulativeNavWithdrawal,jdbcType=DECIMAL},
</if>
<if
test=
"ishighOrLow != null"
>
ishigh_or_low = #{ishighOrLow,jdbcType=INTEGER},
</if>
<if
test=
"tohighNavRatio != null"
>
tohigh_nav_ratio = #{tohighNavRatio,jdbcType=DECIMAL},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.tanpu.fund.entity.generator.FundLatestNav"
>
update fund_latest_nav
set fund_id = #{fundId,jdbcType=VARCHAR},
price_date = #{priceDate,jdbcType=DATE},
nav = #{nav,jdbcType=DECIMAL},
cumulative_nav = #{cumulativeNav,jdbcType=DECIMAL},
cumulative_nav_withdrawal = #{cumulativeNavWithdrawal,jdbcType=DECIMAL},
ishigh_or_low = #{ishighOrLow,jdbcType=INTEGER},
tohigh_nav_ratio = #{tohighNavRatio,jdbcType=DECIMAL},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
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