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
908cdcf3
Commit
908cdcf3
authored
Feb 04, 2021
by
张亚辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
私募产品
parent
377a6cc5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1528 additions
and
10 deletions
+1528
-10
ProductApi.java
src/main/java/com/tanpu/fund/api/ProductApi.java
+7
-6
ProductController.java
...ain/java/com/tanpu/fund/controller/ProductController.java
+5
-0
FundDistribution.java
...ava/com/tanpu/fund/entity/generator/FundDistribution.java
+49
-0
FundDistributionExample.java
.../tanpu/fund/entity/generator/FundDistributionExample.java
+869
-0
FundDistributionMapper.java
...m/tanpu/fund/mapper/generator/FundDistributionMapper.java
+70
-0
ProductService.java
src/main/java/com/tanpu/fund/service/ProductService.java
+2
-2
ProductServiceImpl.java
.../java/com/tanpu/fund/service/impl/ProductServiceImpl.java
+27
-2
FundDistributionMapper.xml
...in/resources/mybatis/generator/FundDistributionMapper.xml
+499
-0
No files found.
src/main/java/com/tanpu/fund/api/ProductApi.java
View file @
908cdcf3
...
...
@@ -3,11 +3,9 @@ package com.tanpu.fund.api;
import
com.tanpu.common.model.Page
;
import
com.tanpu.common.model.Pageable
;
import
com.tanpu.common.model.product.req.ProductListReq
;
import
com.tanpu.common.model.product.resp.
*
;
import
com.tanpu.common.model.
user.resp.SysConstantResp
;
import
com.tanpu.common.model.product.resp.
DynamicRetreatVO
;
import
com.tanpu.common.model.
product.resp.ProductInfoVO
;
import
com.tanpu.common.resp.CommonResp
;
import
com.tanpu.fund.api.model.req.FundQaAskReq
;
import
com.tanpu.fund.api.model.req.FundQaListReq
;
import
com.tanpu.fund.api.model.req.NetReq
;
import
com.tanpu.fund.api.model.req.ProductInfoReq
;
import
com.tanpu.fund.api.model.resp.*
;
...
...
@@ -19,8 +17,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotEmpty
;
import
java.util.List
;
@Api
(
tags
=
"产品服务"
)
...
...
@@ -58,6 +54,11 @@ public interface ProductApi {
@PostMapping
(
"/get/net/list"
)
CommonResp
<
Page
<
NetVO
>>
getNetListInfo
(
@ApiParam
(
"净值列表筛选对象"
)
@RequestBody
NetReq
req
);
@ApiOperation
(
"分红配送"
)
@GetMapping
(
"/bonus/ratio"
)
CommonResp
<
List
<
BonusRatioVO
>>
getBonusRatioInfo
(
@ApiParam
(
"产品id"
)
@RequestParam
(
"id"
)
String
id
);
@ApiOperation
(
"历史业绩"
)
@GetMapping
(
"/track/record"
)
CommonResp
<
List
<
TrackRecordVO
>>
getTrackRecordInfo
(
@ApiParam
(
"产品id"
)
@RequestParam
(
"id"
)
String
id
);
...
...
src/main/java/com/tanpu/fund/controller/ProductController.java
View file @
908cdcf3
...
...
@@ -53,6 +53,11 @@ public class ProductController implements ProductApi {
return
CommonResp
.
success
(
this
.
productService
.
getNetList
(
req
));
}
@Override
public
CommonResp
<
List
<
BonusRatioVO
>>
getBonusRatioInfo
(
String
id
)
{
return
CommonResp
.
success
(
this
.
productService
.
getBonusRatio
(
id
));
}
@Override
public
CommonResp
<
List
<
TrackRecordVO
>>
getTrackRecordInfo
(
String
id
)
{
return
CommonResp
.
success
(
this
.
productService
.
getTrackRecord
(
id
));
...
...
src/main/java/com/tanpu/fund/entity/generator/FundDistribution.java
0 → 100644
View file @
908cdcf3
package
com
.
tanpu
.
fund
.
entity
.
generator
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* 基金分红
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public
class
FundDistribution
{
private
String
id
;
/**
* 基金Id
*/
private
String
fundId
;
/**
* 分配日期
*/
private
Date
distributeDate
;
/**
* 基金分配类型标志:-1-其他,1-分红,2-拆分 3-业绩报酬 -1-其他
*/
private
Integer
distributeType
;
/**
* 分红/拆分比例
*/
private
BigDecimal
distribution
;
private
String
createBy
;
private
Date
createTime
;
private
String
updateBy
;
private
Date
updateTime
;
private
Integer
deleteTag
;
}
\ No newline at end of file
src/main/java/com/tanpu/fund/entity/generator/FundDistributionExample.java
0 → 100644
View file @
908cdcf3
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
FundDistributionExample
{
protected
String
orderByClause
;
protected
boolean
distinct
;
protected
List
<
Criteria
>
oredCriteria
;
public
FundDistributionExample
()
{
oredCriteria
=
new
ArrayList
<>();
}
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
<>();
}
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
<>();
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
(
String
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
String
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
String
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
String
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLike
(
String
value
)
{
addCriterion
(
"id like"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotLike
(
String
value
)
{
addCriterion
(
"id not like"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
String
value1
,
String
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
andDistributeDateIsNull
()
{
addCriterion
(
"distribute_date is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeDateIsNotNull
()
{
addCriterion
(
"distribute_date is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeDateEqualTo
(
Date
value
)
{
addCriterionForJDBCDate
(
"distribute_date ="
,
value
,
"distributeDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeDateNotEqualTo
(
Date
value
)
{
addCriterionForJDBCDate
(
"distribute_date <>"
,
value
,
"distributeDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeDateGreaterThan
(
Date
value
)
{
addCriterionForJDBCDate
(
"distribute_date >"
,
value
,
"distributeDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeDateGreaterThanOrEqualTo
(
Date
value
)
{
addCriterionForJDBCDate
(
"distribute_date >="
,
value
,
"distributeDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeDateLessThan
(
Date
value
)
{
addCriterionForJDBCDate
(
"distribute_date <"
,
value
,
"distributeDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeDateLessThanOrEqualTo
(
Date
value
)
{
addCriterionForJDBCDate
(
"distribute_date <="
,
value
,
"distributeDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeDateIn
(
List
<
Date
>
values
)
{
addCriterionForJDBCDate
(
"distribute_date in"
,
values
,
"distributeDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeDateNotIn
(
List
<
Date
>
values
)
{
addCriterionForJDBCDate
(
"distribute_date not in"
,
values
,
"distributeDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeDateBetween
(
Date
value1
,
Date
value2
)
{
addCriterionForJDBCDate
(
"distribute_date between"
,
value1
,
value2
,
"distributeDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeDateNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterionForJDBCDate
(
"distribute_date not between"
,
value1
,
value2
,
"distributeDate"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeTypeIsNull
()
{
addCriterion
(
"distribute_type is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeTypeIsNotNull
()
{
addCriterion
(
"distribute_type is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeTypeEqualTo
(
Integer
value
)
{
addCriterion
(
"distribute_type ="
,
value
,
"distributeType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeTypeNotEqualTo
(
Integer
value
)
{
addCriterion
(
"distribute_type <>"
,
value
,
"distributeType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeTypeGreaterThan
(
Integer
value
)
{
addCriterion
(
"distribute_type >"
,
value
,
"distributeType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeTypeGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"distribute_type >="
,
value
,
"distributeType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeTypeLessThan
(
Integer
value
)
{
addCriterion
(
"distribute_type <"
,
value
,
"distributeType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeTypeLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"distribute_type <="
,
value
,
"distributeType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeTypeIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"distribute_type in"
,
values
,
"distributeType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeTypeNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"distribute_type not in"
,
values
,
"distributeType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeTypeBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"distribute_type between"
,
value1
,
value2
,
"distributeType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributeTypeNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"distribute_type not between"
,
value1
,
value2
,
"distributeType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionIsNull
()
{
addCriterion
(
"distribution is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionIsNotNull
()
{
addCriterion
(
"distribution is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"distribution ="
,
value
,
"distribution"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionNotEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"distribution <>"
,
value
,
"distribution"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionGreaterThan
(
BigDecimal
value
)
{
addCriterion
(
"distribution >"
,
value
,
"distribution"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionGreaterThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"distribution >="
,
value
,
"distribution"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionLessThan
(
BigDecimal
value
)
{
addCriterion
(
"distribution <"
,
value
,
"distribution"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionLessThanOrEqualTo
(
BigDecimal
value
)
{
addCriterion
(
"distribution <="
,
value
,
"distribution"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"distribution in"
,
values
,
"distribution"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionNotIn
(
List
<
BigDecimal
>
values
)
{
addCriterion
(
"distribution not in"
,
values
,
"distribution"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"distribution between"
,
value1
,
value2
,
"distribution"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDistributionNotBetween
(
BigDecimal
value1
,
BigDecimal
value2
)
{
addCriterion
(
"distribution not between"
,
value1
,
value2
,
"distribution"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIsNull
()
{
addCriterion
(
"create_by is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIsNotNull
()
{
addCriterion
(
"create_by is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByEqualTo
(
String
value
)
{
addCriterion
(
"create_by ="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotEqualTo
(
String
value
)
{
addCriterion
(
"create_by <>"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByGreaterThan
(
String
value
)
{
addCriterion
(
"create_by >"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"create_by >="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLessThan
(
String
value
)
{
addCriterion
(
"create_by <"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"create_by <="
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByLike
(
String
value
)
{
addCriterion
(
"create_by like"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotLike
(
String
value
)
{
addCriterion
(
"create_by not like"
,
value
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByIn
(
List
<
String
>
values
)
{
addCriterion
(
"create_by in"
,
values
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"create_by not in"
,
values
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"create_by between"
,
value1
,
value2
,
"createBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateByNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"create_by not between"
,
value1
,
value2
,
"createBy"
);
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
andUpdateByIsNull
()
{
addCriterion
(
"update_by is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByIsNotNull
()
{
addCriterion
(
"update_by is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByEqualTo
(
String
value
)
{
addCriterion
(
"update_by ="
,
value
,
"updateBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByNotEqualTo
(
String
value
)
{
addCriterion
(
"update_by <>"
,
value
,
"updateBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByGreaterThan
(
String
value
)
{
addCriterion
(
"update_by >"
,
value
,
"updateBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"update_by >="
,
value
,
"updateBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByLessThan
(
String
value
)
{
addCriterion
(
"update_by <"
,
value
,
"updateBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"update_by <="
,
value
,
"updateBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByLike
(
String
value
)
{
addCriterion
(
"update_by like"
,
value
,
"updateBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByNotLike
(
String
value
)
{
addCriterion
(
"update_by not like"
,
value
,
"updateBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByIn
(
List
<
String
>
values
)
{
addCriterion
(
"update_by in"
,
values
,
"updateBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"update_by not in"
,
values
,
"updateBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"update_by between"
,
value1
,
value2
,
"updateBy"
);
return
(
Criteria
)
this
;
}
public
Criteria
andUpdateByNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"update_by not between"
,
value1
,
value2
,
"updateBy"
);
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
Criteria
andDeleteTagIsNull
()
{
addCriterion
(
"delete_tag is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteTagIsNotNull
()
{
addCriterion
(
"delete_tag is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteTagEqualTo
(
Integer
value
)
{
addCriterion
(
"delete_tag ="
,
value
,
"deleteTag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteTagNotEqualTo
(
Integer
value
)
{
addCriterion
(
"delete_tag <>"
,
value
,
"deleteTag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteTagGreaterThan
(
Integer
value
)
{
addCriterion
(
"delete_tag >"
,
value
,
"deleteTag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteTagGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"delete_tag >="
,
value
,
"deleteTag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteTagLessThan
(
Integer
value
)
{
addCriterion
(
"delete_tag <"
,
value
,
"deleteTag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteTagLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"delete_tag <="
,
value
,
"deleteTag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteTagIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"delete_tag in"
,
values
,
"deleteTag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteTagNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"delete_tag not in"
,
values
,
"deleteTag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteTagBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"delete_tag between"
,
value1
,
value2
,
"deleteTag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteTagNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"delete_tag not between"
,
value1
,
value2
,
"deleteTag"
);
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/mapper/generator/FundDistributionMapper.java
0 → 100644
View file @
908cdcf3
package
com
.
tanpu
.
fund
.
mapper
.
generator
;
import
com.tanpu.fund.entity.generator.FundDistribution
;
import
com.tanpu.fund.entity.generator.FundDistributionExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
FundDistributionMapper
{
long
countByExample
(
FundDistributionExample
example
);
int
deleteByExample
(
FundDistributionExample
example
);
/**
* delete by primary key
* @param id primaryKey
* @return deleteCount
*/
int
deleteByPrimaryKey
(
String
id
);
/**
* insert record to table
* @param record the record
* @return insert count
*/
int
insert
(
FundDistribution
record
);
int
insertOrUpdate
(
FundDistribution
record
);
int
insertOrUpdateSelective
(
FundDistribution
record
);
/**
* insert record to table selective
* @param record the record
* @return insert count
*/
int
insertSelective
(
FundDistribution
record
);
List
<
FundDistribution
>
selectByExample
(
FundDistributionExample
example
);
/**
* select by primary key
* @param id primary key
* @return object by primary key
*/
FundDistribution
selectByPrimaryKey
(
String
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
FundDistribution
record
,
@Param
(
"example"
)
FundDistributionExample
example
);
int
updateByExample
(
@Param
(
"record"
)
FundDistribution
record
,
@Param
(
"example"
)
FundDistributionExample
example
);
/**
* update record selective
* @param record the updated record
* @return update count
*/
int
updateByPrimaryKeySelective
(
FundDistribution
record
);
/**
* update record
* @param record the updated record
* @return update count
*/
int
updateByPrimaryKey
(
FundDistribution
record
);
int
updateBatch
(
List
<
FundDistribution
>
list
);
int
batchInsert
(
@Param
(
"list"
)
List
<
FundDistribution
>
list
);
}
\ No newline at end of file
src/main/java/com/tanpu/fund/service/ProductService.java
View file @
908cdcf3
...
...
@@ -3,9 +3,7 @@ package com.tanpu.fund.service;
import
com.tanpu.common.model.Page
;
import
com.tanpu.common.model.Pageable
;
import
com.tanpu.common.model.product.req.ProductListReq
;
import
com.tanpu.common.model.product.resp.AttachmentInfoVO
;
import
com.tanpu.common.model.product.resp.DynamicRetreatVO
;
import
com.tanpu.common.model.product.resp.FundDateResp
;
import
com.tanpu.common.model.product.resp.ProductInfoVO
;
import
com.tanpu.fund.api.model.req.NetReq
;
import
com.tanpu.fund.api.model.req.ProductInfoReq
;
...
...
@@ -30,6 +28,8 @@ public interface ProductService {
Page
<
NetVO
>
getNetList
(
NetReq
req
);
List
<
BonusRatioVO
>
getBonusRatio
(
String
id
);
List
<
TrackRecordVO
>
getTrackRecord
(
String
id
);
Page
<
TrackNetVO
>
getTrackNetList
(
String
id
,
Pageable
page
);
...
...
src/main/java/com/tanpu/fund/service/impl/ProductServiceImpl.java
View file @
908cdcf3
...
...
@@ -8,7 +8,9 @@ import com.tanpu.common.enums.Constant;
import
com.tanpu.common.model.Page
;
import
com.tanpu.common.model.Pageable
;
import
com.tanpu.common.model.product.req.ProductListReq
;
import
com.tanpu.common.model.product.resp.*
;
import
com.tanpu.common.model.product.resp.DynamicRetreatVO
;
import
com.tanpu.common.model.product.resp.Net
;
import
com.tanpu.common.model.product.resp.ProductInfoVO
;
import
com.tanpu.common.utils.BigDecimalUtil
;
import
com.tanpu.fund.api.model.FundInfoVO
;
import
com.tanpu.fund.api.model.req.NetReq
;
...
...
@@ -27,6 +29,7 @@ import org.springframework.beans.factory.annotation.Value;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -78,6 +81,9 @@ public class ProductServiceImpl implements ProductService, Constant {
@Resource
private
FundRateMappingMapper
fundRateMappingMapper
;
@Resource
private
FundDistributionMapper
fundDistributionMapper
;
@Override
public
Page
<
ProductInfoVO
>
getProductList
(
ProductInfoReq
req
)
{
...
...
@@ -430,6 +436,25 @@ public class ProductServiceImpl implements ProductService, Constant {
fundCounts
.
stream
().
map
(
f
->
getNetVO
(
infoMap
,
f
)).
collect
(
Collectors
.
toList
()));
}
@Override
public
List
<
BonusRatioVO
>
getBonusRatio
(
String
id
)
{
FundDistributionExample
example
=
new
FundDistributionExample
();
example
.
createCriteria
().
andFundIdEqualTo
(
id
).
andDeleteTagEqualTo
(
ZERO_NUM
);
example
.
setOrderByClause
(
"distribute_date desc"
);
List
<
FundDistribution
>
list
=
this
.
fundDistributionMapper
.
selectByExample
(
example
);
return
list
.
stream
().
filter
(
l
->
l
.
getDistributeDate
()
!=
null
&&
(
l
.
getDistributeType
()
==
1
||
l
.
getDistributeType
()
==
2
))
.
map
(
l
->
{
BonusRatioVO
vo
=
new
BonusRatioVO
();
vo
.
setType
(
l
.
getDistributeType
());
vo
.
setTime
(
l
.
getDistributeDate
().
getTime
());
if
(
l
.
getDistribution
()
!=
null
)
{
vo
.
setDistribution
(
l
.
getDistribution
().
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toString
());
}
return
vo
;
}).
collect
(
Collectors
.
toList
());
}
private
NetVO
getNetVO
(
Map
<
String
,
FundInfo
>
infoMap
,
FundCount
f
)
{
NetVO
netVO
=
new
NetVO
();
netVO
.
setProductId
(
f
.
getFundId
());
...
...
@@ -1010,7 +1035,7 @@ public class ProductServiceImpl implements ProductService, Constant {
// 查询研报信息是否有研报
Map
<
String
,
Object
>
fundInfoReport
=
getFundReport
(
Lists
.
newArrayList
(
fundInfoMap
.
keySet
()));
return
fundCounts
.
stream
().
map
(
p
->
getProductInfoVO
(
fundInfoMap
,
rateMappingMap
,
p
,
fundInfoReport
.
keySet
()))
return
fundCounts
.
stream
().
map
(
p
->
getProductInfoVO
(
fundInfoMap
,
rateMappingMap
,
p
,
fundInfoReport
.
keySet
()))
.
collect
(
Collectors
.
toList
());
}
...
...
src/main/resources/mybatis/generator/FundDistributionMapper.xml
0 → 100644
View file @
908cdcf3
<?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.FundDistributionMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.tanpu.fund.entity.generator.FundDistribution"
>
<!--@mbg.generated-->
<!--@Table fund_distribution-->
<id
column=
"id"
jdbcType=
"VARCHAR"
property=
"id"
/>
<result
column=
"fund_id"
jdbcType=
"VARCHAR"
property=
"fundId"
/>
<result
column=
"distribute_date"
jdbcType=
"DATE"
property=
"distributeDate"
/>
<result
column=
"distribute_type"
jdbcType=
"INTEGER"
property=
"distributeType"
/>
<result
column=
"distribution"
jdbcType=
"DECIMAL"
property=
"distribution"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"delete_tag"
jdbcType=
"INTEGER"
property=
"deleteTag"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--@mbg.generated-->
<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"
>
<!--@mbg.generated-->
<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"
>
<!--@mbg.generated-->
id, fund_id, distribute_date, distribute_type, distribution, create_by, create_time,
update_by, update_time, delete_tag
</sql>
<select
id=
"selectByExample"
parameterType=
"com.tanpu.fund.entity.generator.FundDistributionExample"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from fund_distribution
<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.String"
resultMap=
"BaseResultMap"
>
<!--@mbg.generated-->
select
<include
refid=
"Base_Column_List"
/>
from fund_distribution
where id = #{id,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
<!--@mbg.generated-->
delete from fund_distribution
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.tanpu.fund.entity.generator.FundDistributionExample"
>
<!--@mbg.generated-->
delete from fund_distribution
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.tanpu.fund.entity.generator.FundDistribution"
>
<!--@mbg.generated-->
insert into fund_distribution (id, fund_id, distribute_date,
distribute_type, distribution, create_by,
create_time, update_by, update_time,
delete_tag)
values (#{id,jdbcType=VARCHAR}, #{fundId,jdbcType=VARCHAR}, #{distributeDate,jdbcType=DATE},
#{distributeType,jdbcType=INTEGER}, #{distribution,jdbcType=DECIMAL}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{deleteTag,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.tanpu.fund.entity.generator.FundDistribution"
>
<!--@mbg.generated-->
insert into fund_distribution
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"fundId != null"
>
fund_id,
</if>
<if
test=
"distributeDate != null"
>
distribute_date,
</if>
<if
test=
"distributeType != null"
>
distribute_type,
</if>
<if
test=
"distribution != null"
>
distribution,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"deleteTag != null"
>
delete_tag,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=VARCHAR},
</if>
<if
test=
"fundId != null"
>
#{fundId,jdbcType=VARCHAR},
</if>
<if
test=
"distributeDate != null"
>
#{distributeDate,jdbcType=DATE},
</if>
<if
test=
"distributeType != null"
>
#{distributeType,jdbcType=INTEGER},
</if>
<if
test=
"distribution != null"
>
#{distribution,jdbcType=DECIMAL},
</if>
<if
test=
"createBy != null"
>
#{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateBy != null"
>
#{updateBy,jdbcType=VARCHAR},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"deleteTag != null"
>
#{deleteTag,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.tanpu.fund.entity.generator.FundDistributionExample"
resultType=
"java.lang.Long"
>
<!--@mbg.generated-->
select count(*) from fund_distribution
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--@mbg.generated-->
update fund_distribution
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=VARCHAR},
</if>
<if
test=
"record.fundId != null"
>
fund_id = #{record.fundId,jdbcType=VARCHAR},
</if>
<if
test=
"record.distributeDate != null"
>
distribute_date = #{record.distributeDate,jdbcType=DATE},
</if>
<if
test=
"record.distributeType != null"
>
distribute_type = #{record.distributeType,jdbcType=INTEGER},
</if>
<if
test=
"record.distribution != null"
>
distribution = #{record.distribution,jdbcType=DECIMAL},
</if>
<if
test=
"record.createBy != null"
>
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.updateBy != null"
>
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.deleteTag != null"
>
delete_tag = #{record.deleteTag,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--@mbg.generated-->
update fund_distribution
set id = #{record.id,jdbcType=VARCHAR},
fund_id = #{record.fundId,jdbcType=VARCHAR},
distribute_date = #{record.distributeDate,jdbcType=DATE},
distribute_type = #{record.distributeType,jdbcType=INTEGER},
distribution = #{record.distribution,jdbcType=DECIMAL},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
delete_tag = #{record.deleteTag,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.tanpu.fund.entity.generator.FundDistribution"
>
<!--@mbg.generated-->
update fund_distribution
<set>
<if
test=
"fundId != null"
>
fund_id = #{fundId,jdbcType=VARCHAR},
</if>
<if
test=
"distributeDate != null"
>
distribute_date = #{distributeDate,jdbcType=DATE},
</if>
<if
test=
"distributeType != null"
>
distribute_type = #{distributeType,jdbcType=INTEGER},
</if>
<if
test=
"distribution != null"
>
distribution = #{distribution,jdbcType=DECIMAL},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"deleteTag != null"
>
delete_tag = #{deleteTag,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.tanpu.fund.entity.generator.FundDistribution"
>
<!--@mbg.generated-->
update fund_distribution
set fund_id = #{fundId,jdbcType=VARCHAR},
distribute_date = #{distributeDate,jdbcType=DATE},
distribute_type = #{distributeType,jdbcType=INTEGER},
distribution = #{distribution,jdbcType=DECIMAL},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
delete_tag = #{deleteTag,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR}
</update>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
update fund_distribution
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"fund_id = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=VARCHAR} then #{item.fundId,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"distribute_date = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=VARCHAR} then #{item.distributeDate,jdbcType=DATE}
</foreach>
</trim>
<trim
prefix=
"distribute_type = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=VARCHAR} then #{item.distributeType,jdbcType=INTEGER}
</foreach>
</trim>
<trim
prefix=
"distribution = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=VARCHAR} then #{item.distribution,jdbcType=DECIMAL}
</foreach>
</trim>
<trim
prefix=
"create_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=VARCHAR} then #{item.createBy,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"create_time = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"update_by = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=VARCHAR} then #{item.updateBy,jdbcType=VARCHAR}
</foreach>
</trim>
<trim
prefix=
"update_time = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
</foreach>
</trim>
<trim
prefix=
"delete_tag = case"
suffix=
"end,"
>
<foreach
collection=
"list"
index=
"index"
item=
"item"
>
when id = #{item.id,jdbcType=VARCHAR} then #{item.deleteTag,jdbcType=INTEGER}
</foreach>
</trim>
</trim>
where id in
<foreach
close=
")"
collection=
"list"
item=
"item"
open=
"("
separator=
", "
>
#{item.id,jdbcType=VARCHAR}
</foreach>
</update>
<insert
id=
"batchInsert"
parameterType=
"map"
>
<!--@mbg.generated-->
insert into fund_distribution
(id, fund_id, distribute_date, distribute_type, distribution, create_by, create_time,
update_by, update_time, delete_tag)
values
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.id,jdbcType=VARCHAR}, #{item.fundId,jdbcType=VARCHAR}, #{item.distributeDate,jdbcType=DATE},
#{item.distributeType,jdbcType=INTEGER}, #{item.distribution,jdbcType=DECIMAL},
#{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.deleteTag,jdbcType=INTEGER})
</foreach>
</insert>
<insert
id=
"insertOrUpdate"
parameterType=
"com.tanpu.fund.entity.generator.FundDistribution"
>
<!--@mbg.generated-->
insert into fund_distribution
(id, fund_id, distribute_date, distribute_type, distribution, create_by, create_time,
update_by, update_time, delete_tag)
values
(#{id,jdbcType=VARCHAR}, #{fundId,jdbcType=VARCHAR}, #{distributeDate,jdbcType=DATE},
#{distributeType,jdbcType=INTEGER}, #{distribution,jdbcType=DECIMAL}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{deleteTag,jdbcType=INTEGER})
on duplicate key update
id = #{id,jdbcType=VARCHAR},
fund_id = #{fundId,jdbcType=VARCHAR},
distribute_date = #{distributeDate,jdbcType=DATE},
distribute_type = #{distributeType,jdbcType=INTEGER},
distribution = #{distribution,jdbcType=DECIMAL},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
delete_tag = #{deleteTag,jdbcType=INTEGER}
</insert>
<insert
id=
"insertOrUpdateSelective"
parameterType=
"com.tanpu.fund.entity.generator.FundDistribution"
>
<!--@mbg.generated-->
insert into fund_distribution
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"fundId != null"
>
fund_id,
</if>
<if
test=
"distributeDate != null"
>
distribute_date,
</if>
<if
test=
"distributeType != null"
>
distribute_type,
</if>
<if
test=
"distribution != null"
>
distribution,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"deleteTag != null"
>
delete_tag,
</if>
</trim>
values
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=VARCHAR},
</if>
<if
test=
"fundId != null"
>
#{fundId,jdbcType=VARCHAR},
</if>
<if
test=
"distributeDate != null"
>
#{distributeDate,jdbcType=DATE},
</if>
<if
test=
"distributeType != null"
>
#{distributeType,jdbcType=INTEGER},
</if>
<if
test=
"distribution != null"
>
#{distribution,jdbcType=DECIMAL},
</if>
<if
test=
"createBy != null"
>
#{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateBy != null"
>
#{updateBy,jdbcType=VARCHAR},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"deleteTag != null"
>
#{deleteTag,jdbcType=INTEGER},
</if>
</trim>
on duplicate key update
<trim
suffixOverrides=
","
>
<if
test=
"id != null"
>
id = #{id,jdbcType=VARCHAR},
</if>
<if
test=
"fundId != null"
>
fund_id = #{fundId,jdbcType=VARCHAR},
</if>
<if
test=
"distributeDate != null"
>
distribute_date = #{distributeDate,jdbcType=DATE},
</if>
<if
test=
"distributeType != null"
>
distribute_type = #{distributeType,jdbcType=INTEGER},
</if>
<if
test=
"distribution != null"
>
distribution = #{distribution,jdbcType=DECIMAL},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"deleteTag != null"
>
delete_tag = #{deleteTag,jdbcType=INTEGER},
</if>
</trim>
</insert>
</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