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
9c13455c
Commit
9c13455c
authored
Apr 26, 2021
by
张亚辉
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
23c03d44
5a3359ef
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
876 additions
and
322 deletions
+876
-322
IfaFundApi.java
src/main/java/com/tanpu/fund/api/IfaFundApi.java
+29
-0
IfaFundController.java
...ain/java/com/tanpu/fund/controller/IfaFundController.java
+55
-0
IfaImportedFundInfo.java
.../com/tanpu/fund/entity/generator/IfaImportedFundInfo.java
+29
-21
IfaImportedFundInfoExample.java
...npu/fund/entity/generator/IfaImportedFundInfoExample.java
+181
-19
FeignClientForFatools.java
...java/com/tanpu/fund/feign/user/FeignClientForFatools.java
+11
-0
FeignbackForFatools.java
...n/java/com/tanpu/fund/feign/user/FeignbackForFatools.java
+17
-0
IfaImportedFundInfoMapper.java
...anpu/fund/mapper/generator/IfaImportedFundInfoMapper.java
+47
-22
IfaFundService.java
src/main/java/com/tanpu/fund/service/IfaFundService.java
+17
-0
IfaFundServieImpl.java
...n/java/com/tanpu/fund/service/impl/IfaFundServieImpl.java
+114
-0
IfaImportedFundInfoMapper.xml
...resources/mybatis/generator/IfaImportedFundInfoMapper.xml
+376
-260
No files found.
src/main/java/com/tanpu/fund/api/IfaFundApi.java
0 → 100644
View file @
9c13455c
package
com
.
tanpu
.
fund
.
api
;
import
com.tanpu.common.model.fund.req.FundNoNavReq
;
import
com.tanpu.common.model.fund.resq.FundNoNavResp
;
import
com.tanpu.common.resp.CommonResp
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
/**
* @author zyh
* @description 无净值产品
*/
public
interface
IfaFundApi
{
@ApiOperation
(
"新增无净值产品"
)
@PostMapping
(
"/fundnonav/ifa/add"
)
CommonResp
fundnonavAdd
(
@RequestBody
FundNoNavReq
req
);
@ApiOperation
(
"编辑无净值产品"
)
@PostMapping
(
"/fundnonav/ifa/edit"
)
CommonResp
fundnonavEdit
(
@RequestBody
FundNoNavReq
req
);
@ApiOperation
(
"查询无净值产品详情"
)
@GetMapping
(
"/fundnonav/ifa/detail"
)
CommonResp
<
FundNoNavResp
>
fundnonavDetail
(
@RequestParam
(
"id"
)
String
id
);
}
src/main/java/com/tanpu/fund/controller/IfaFundController.java
0 → 100644
View file @
9c13455c
package
com
.
tanpu
.
fund
.
controller
;
import
com.tanpu.common.auth.mapping.TanpuInterfaceLoginAuth
;
import
com.tanpu.common.model.fund.req.FundNoNavReq
;
import
com.tanpu.common.model.fund.resq.FundNoNavResp
;
import
com.tanpu.common.resp.CommonResp
;
import
com.tanpu.fund.api.IfaFundApi
;
import
com.tanpu.fund.service.IfaFundService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @author: zyh
* @date: 2021-03-13 2:44 下午
* @description:
*/
@RestController
public
class
IfaFundController
implements
IfaFundApi
{
@Resource
private
IfaFundService
ifaFundService
;
@TanpuInterfaceLoginAuth
@Override
public
CommonResp
fundnonavAdd
(
FundNoNavReq
req
)
{
if
(
StringUtils
.
isEmpty
(
req
.
getFundName
()))
{
return
CommonResp
.
error
(
CommonResp
.
PARAMETER_INVALID_STATUS_CODE
,
CommonResp
.
PARAMETER_INVALID_MESSAGE
);
}
this
.
ifaFundService
.
fundnonavAdd
(
req
);
return
CommonResp
.
success
();
}
@TanpuInterfaceLoginAuth
@Override
public
CommonResp
fundnonavEdit
(
FundNoNavReq
req
)
{
if
(
StringUtils
.
isEmpty
(
req
.
getId
())
||
StringUtils
.
isEmpty
(
req
.
getFundName
()))
{
return
CommonResp
.
error
(
CommonResp
.
PARAMETER_INVALID_STATUS_CODE
,
CommonResp
.
PARAMETER_INVALID_MESSAGE
);
}
this
.
ifaFundService
.
fundnonavEdit
(
req
);
return
CommonResp
.
success
();
}
@Override
public
CommonResp
<
FundNoNavResp
>
fundnonavDetail
(
String
id
)
{
if
(
StringUtils
.
isEmpty
(
id
))
{
return
CommonResp
.
error
(
CommonResp
.
PARAMETER_INVALID_STATUS_CODE
,
CommonResp
.
PARAMETER_INVALID_MESSAGE
);
}
return
CommonResp
.
success
(
this
.
ifaFundService
.
fundnonavDetail
(
id
));
}
}
src/main/java/com/tanpu/fund/entity/generator/IfaImportedFundInfo.java
View file @
9c13455c
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
;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
@Builder
@AllArgsConstructor
...
...
@@ -135,4 +118,29 @@ public class IfaImportedFundInfo {
* 机构id
*/
private
String
orgId
;
}
\ No newline at end of file
/**
* 募集开始时间
*/
private
Date
raiseStarttime
;
/**
* 募集结束时间
*/
private
Date
raiseEndtime
;
/**
* 产品类型 0:无净值产品 1:有净值产品
*/
private
Integer
proSubType
;
/**
* 产品摘要
*/
private
String
proAbstract
;
/**
* 产品详情
*/
private
String
proInfoDesc
;
}
src/main/java/com/tanpu/fund/entity/generator/IfaImportedFundInfoExample.java
View file @
9c13455c
...
...
@@ -5,24 +5,6 @@ import java.util.ArrayList;
import
java.util.Date
;
import
java.util.List
;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
public
class
IfaImportedFundInfoExample
{
protected
String
orderByClause
;
...
...
@@ -1803,6 +1785,186 @@ public class IfaImportedFundInfoExample {
addCriterion
(
"org_id not between"
,
value1
,
value2
,
"orgId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseStarttimeIsNull
()
{
addCriterion
(
"raise_starttime is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseStarttimeIsNotNull
()
{
addCriterion
(
"raise_starttime is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseStarttimeEqualTo
(
Date
value
)
{
addCriterion
(
"raise_starttime ="
,
value
,
"raiseStarttime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseStarttimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"raise_starttime <>"
,
value
,
"raiseStarttime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseStarttimeGreaterThan
(
Date
value
)
{
addCriterion
(
"raise_starttime >"
,
value
,
"raiseStarttime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseStarttimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"raise_starttime >="
,
value
,
"raiseStarttime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseStarttimeLessThan
(
Date
value
)
{
addCriterion
(
"raise_starttime <"
,
value
,
"raiseStarttime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseStarttimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"raise_starttime <="
,
value
,
"raiseStarttime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseStarttimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"raise_starttime in"
,
values
,
"raiseStarttime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseStarttimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"raise_starttime not in"
,
values
,
"raiseStarttime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseStarttimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"raise_starttime between"
,
value1
,
value2
,
"raiseStarttime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseStarttimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"raise_starttime not between"
,
value1
,
value2
,
"raiseStarttime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseEndtimeIsNull
()
{
addCriterion
(
"raise_endtime is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseEndtimeIsNotNull
()
{
addCriterion
(
"raise_endtime is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseEndtimeEqualTo
(
Date
value
)
{
addCriterion
(
"raise_endtime ="
,
value
,
"raiseEndtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseEndtimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"raise_endtime <>"
,
value
,
"raiseEndtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseEndtimeGreaterThan
(
Date
value
)
{
addCriterion
(
"raise_endtime >"
,
value
,
"raiseEndtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseEndtimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"raise_endtime >="
,
value
,
"raiseEndtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseEndtimeLessThan
(
Date
value
)
{
addCriterion
(
"raise_endtime <"
,
value
,
"raiseEndtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseEndtimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"raise_endtime <="
,
value
,
"raiseEndtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseEndtimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"raise_endtime in"
,
values
,
"raiseEndtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseEndtimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"raise_endtime not in"
,
values
,
"raiseEndtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseEndtimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"raise_endtime between"
,
value1
,
value2
,
"raiseEndtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andRaiseEndtimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"raise_endtime not between"
,
value1
,
value2
,
"raiseEndtime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProSubTypeIsNull
()
{
addCriterion
(
"pro_sub_type is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProSubTypeIsNotNull
()
{
addCriterion
(
"pro_sub_type is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProSubTypeEqualTo
(
Integer
value
)
{
addCriterion
(
"pro_sub_type ="
,
value
,
"proSubType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProSubTypeNotEqualTo
(
Integer
value
)
{
addCriterion
(
"pro_sub_type <>"
,
value
,
"proSubType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProSubTypeGreaterThan
(
Integer
value
)
{
addCriterion
(
"pro_sub_type >"
,
value
,
"proSubType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProSubTypeGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"pro_sub_type >="
,
value
,
"proSubType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProSubTypeLessThan
(
Integer
value
)
{
addCriterion
(
"pro_sub_type <"
,
value
,
"proSubType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProSubTypeLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"pro_sub_type <="
,
value
,
"proSubType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProSubTypeIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"pro_sub_type in"
,
values
,
"proSubType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProSubTypeNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"pro_sub_type not in"
,
values
,
"proSubType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProSubTypeBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"pro_sub_type between"
,
value1
,
value2
,
"proSubType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProSubTypeNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"pro_sub_type not between"
,
value1
,
value2
,
"proSubType"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
@@ -1897,4 +2059,4 @@ public class IfaImportedFundInfoExample {
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
}
src/main/java/com/tanpu/fund/feign/user/FeignClientForFatools.java
View file @
9c13455c
package
com
.
tanpu
.
fund
.
feign
.
user
;
import
com.tanpu.common.model.file.req.FileQueryReq
;
import
com.tanpu.common.model.file.req.FileSaveReq
;
import
com.tanpu.common.model.file.resp.FileQueryResp
;
import
com.tanpu.common.model.product.resp.ProductLabel
;
import
com.tanpu.common.model.product.resp.UserInfoVo
;
import
com.tanpu.common.model.user.resp.ColumnVO
;
...
...
@@ -10,6 +13,7 @@ import io.swagger.annotations.ApiOperation;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.validation.Valid
;
...
...
@@ -39,4 +43,11 @@ public interface FeignClientForFatools {
@GetMapping
(
"/batch/get/label"
)
CommonResp
<
Map
<
String
,
List
<
ProductLabel
>>>
batchGetLabelByIdInfo
(
@RequestParam
(
"list"
)
@Valid
@NotEmpty
List
<
String
>
list
);
@ApiOperation
(
value
=
"保存关联附件"
)
@PostMapping
(
value
=
"/file/save"
,
produces
=
{
"application/json"
})
CommonResp
fileSave
(
@RequestBody
FileSaveReq
req
);
@ApiOperation
(
value
=
"查询附件"
)
@GetMapping
(
value
=
"/file/query"
,
produces
=
{
"application/json"
})
CommonResp
<
List
<
FileQueryResp
>>
fileQuery
(
@RequestBody
FileQueryReq
req
);
}
src/main/java/com/tanpu/fund/feign/user/FeignbackForFatools.java
View file @
9c13455c
package
com
.
tanpu
.
fund
.
feign
.
user
;
import
com.alibaba.fastjson.JSON
;
import
com.tanpu.common.model.file.req.FileQueryReq
;
import
com.tanpu.common.model.file.req.FileSaveReq
;
import
com.tanpu.common.model.file.resp.FileQueryResp
;
import
com.tanpu.common.model.product.resp.ProductLabel
;
import
com.tanpu.common.model.product.resp.UserInfoVo
;
import
com.tanpu.common.model.user.resp.ColumnVO
;
...
...
@@ -57,6 +60,20 @@ public class FeignbackForFatools implements FallbackFactory<FeignClientForFatool
log
.
error
(
"FeignClientForUser.getColumnInfo 查询栏目失败 id:{}"
,
JSON
.
toJSONString
(
list
));
return
null
;
}
@Override
public
CommonResp
fileSave
(
FileSaveReq
req
)
{
log
.
error
(
"请求信息"
,
throwable
);
log
.
error
(
"FeignClientForUser.fileSave 查询栏目失败 id:{}"
,
JSON
.
toJSONString
(
req
));
return
null
;
}
@Override
public
CommonResp
<
List
<
FileQueryResp
>>
fileQuery
(
FileQueryReq
req
)
{
log
.
error
(
"请求信息"
,
throwable
);
log
.
error
(
"FeignClientForUser.fileQuery 查询栏目失败 id:{}"
,
JSON
.
toJSONString
(
req
));
return
null
;
}
};
}
...
...
src/main/java/com/tanpu/fund/mapper/generator/IfaImportedFundInfoMapper.java
View file @
9c13455c
...
...
@@ -2,59 +2,84 @@ package com.tanpu.fund.mapper.generator;
import
com.tanpu.fund.entity.generator.IfaImportedFundInfo
;
import
com.tanpu.fund.entity.generator.IfaImportedFundInfoExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
/**
* @author: zhoupeng
* <p>
* =========================================
* =========================================
* ======== ========
* ======= ========== ======= =======
* ====== ===== == ==== ======
* ===== ===== == === =====
* ===== ===== == === =====
* ===== ===== == === =====
* ====== ========== == ======
* ======= =======
* =========================================
* =========================================
* <p>
* @email: zhoupeng_08@163.com
*/
import
java.util.List
;
@Mapper
public
interface
IfaImportedFundInfoMapper
{
long
countByExample
(
IfaImportedFundInfoExample
example
);
int
deleteByExample
(
IfaImportedFundInfoExample
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
(
IfaImportedFundInfo
record
);
int
insertOrUpdate
(
IfaImportedFundInfo
record
);
int
insertOrUpdateSelective
(
IfaImportedFundInfo
record
);
int
insertOrUpdateWithBLOBs
(
IfaImportedFundInfo
record
);
/**
* insert record to table selective
*
* @param record the record
* @return insert count
*/
int
insertSelective
(
IfaImportedFundInfo
record
);
List
<
IfaImportedFundInfo
>
selectByExampleWithBLOBs
(
IfaImportedFundInfoExample
example
);
List
<
IfaImportedFundInfo
>
selectByExample
(
IfaImportedFundInfoExample
example
);
/**
* select by primary key
*
* @param id primary key
* @return object by primary key
*/
IfaImportedFundInfo
selectByPrimaryKey
(
String
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
IfaImportedFundInfo
record
,
@Param
(
"example"
)
IfaImportedFundInfoExample
example
);
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
IfaImportedFundInfo
record
,
@Param
(
"example"
)
IfaImportedFundInfoExample
example
);
int
updateByExample
(
@Param
(
"record"
)
IfaImportedFundInfo
record
,
@Param
(
"example"
)
IfaImportedFundInfoExample
example
);
/**
* update record selective
*
* @param record the updated record
* @return update count
*/
int
updateByPrimaryKeySelective
(
IfaImportedFundInfo
record
);
int
updateByPrimaryKeyWithBLOBs
(
IfaImportedFundInfo
record
);
/**
* update record
*
* @param record the updated record
* @return update count
*/
int
updateByPrimaryKey
(
IfaImportedFundInfo
record
);
int
updateBatch
(
List
<
IfaImportedFundInfo
>
list
);
int
updateBatchSelective
(
List
<
IfaImportedFundInfo
>
list
);
int
batchInsert
(
@Param
(
"list"
)
List
<
IfaImportedFundInfo
>
list
);
}
\ No newline at end of file
}
src/main/java/com/tanpu/fund/service/IfaFundService.java
0 → 100644
View file @
9c13455c
package
com
.
tanpu
.
fund
.
service
;
import
com.tanpu.common.model.fund.req.FundNoNavReq
;
import
com.tanpu.common.model.fund.resq.FundNoNavResp
;
/**
* @author: zyh
* @date: 2021-03-13 2:45 下午
* @description:
*/
public
interface
IfaFundService
{
void
fundnonavAdd
(
FundNoNavReq
req
);
void
fundnonavEdit
(
FundNoNavReq
req
);
FundNoNavResp
fundnonavDetail
(
String
id
);
}
src/main/java/com/tanpu/fund/service/impl/IfaFundServieImpl.java
0 → 100644
View file @
9c13455c
package
com
.
tanpu
.
fund
.
service
.
impl
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.tanpu.common.auth.UserInfoThreadLocalHolder
;
import
com.tanpu.common.enums.BizEnums
;
import
com.tanpu.common.enums.FileTypeEnums
;
import
com.tanpu.common.model.file.req.FileQueryReq
;
import
com.tanpu.common.model.file.req.FileSaveReq
;
import
com.tanpu.common.model.file.resp.FileQueryResp
;
import
com.tanpu.common.model.fund.req.FundNoNavReq
;
import
com.tanpu.common.model.fund.resq.FundNoNavResp
;
import
com.tanpu.common.resp.CommonResp
;
import
com.tanpu.common.utils.SnowFlakeUtil
;
import
com.tanpu.fund.entity.generator.IfaImportedFundInfo
;
import
com.tanpu.fund.feign.user.FeignClientForFatools
;
import
com.tanpu.fund.mapper.generator.IfaImportedFundInfoMapper
;
import
com.tanpu.fund.service.IfaFundService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author: zyh
* @date: 2021-03-13 2:46 下午
* @description:
*/
@Service
public
class
IfaFundServieImpl
implements
IfaFundService
{
@Resource
private
SnowFlakeUtil
snowFlakeUtil
;
@Resource
private
IfaImportedFundInfoMapper
ifaImportedFundInfoMapper
;
@Resource
private
FeignClientForFatools
feignClientForFatools
;
@Override
public
void
fundnonavAdd
(
FundNoNavReq
req
)
{
IfaImportedFundInfo
p
=
new
IfaImportedFundInfo
();
BeanUtils
.
copyProperties
(
req
,
p
);
p
.
setId
(
snowFlakeUtil
.
uniqueLong
());
p
.
setRaiseStarttime
(
req
.
getRaiseStarttime
());
p
.
setRaiseEndtime
(
req
.
getRaiseEndtime
());
p
.
setIfaId
(
UserInfoThreadLocalHolder
.
getserInfo
().
getId
());
p
.
setCreateBy
(
UserInfoThreadLocalHolder
.
getserInfo
().
getId
());
p
.
setCreateTime
(
new
Date
());
p
.
setDeleteTag
(
BizEnums
.
DeleteTag
.
tag_init
);
ifaImportedFundInfoMapper
.
insertSelective
(
p
);
//保存附件
if
(
CollectionUtil
.
isNotEmpty
(
req
.
getProInfoDescPics
()))
{
feignClientForFatools
.
fileSave
(
FileSaveReq
.
builder
().
refId
(
p
.
getId
()).
fileIds
(
req
.
getProInfoDescPics
()).
build
());
}
if
(
CollectionUtil
.
isNotEmpty
(
req
.
getProFileDatas
()))
{
feignClientForFatools
.
fileSave
(
FileSaveReq
.
builder
().
refId
(
p
.
getId
()).
fileIds
(
req
.
getProFileDatas
()).
build
());
}
}
@Override
public
void
fundnonavEdit
(
FundNoNavReq
req
)
{
IfaImportedFundInfo
p
=
new
IfaImportedFundInfo
();
BeanUtils
.
copyProperties
(
req
,
p
);
p
.
setRaiseStarttime
(
req
.
getRaiseStarttime
());
p
.
setRaiseEndtime
(
req
.
getRaiseEndtime
());
p
.
setIfaId
(
UserInfoThreadLocalHolder
.
getserInfo
().
getId
());
p
.
setUpdateBy
(
UserInfoThreadLocalHolder
.
getserInfo
().
getId
());
p
.
setUpdateTime
(
new
Date
());
p
.
setDeleteTag
(
BizEnums
.
DeleteTag
.
tag_init
);
ifaImportedFundInfoMapper
.
updateByPrimaryKey
(
p
);
//保存附件
if
(
CollectionUtil
.
isNotEmpty
(
req
.
getProInfoDescPics
()))
{
feignClientForFatools
.
fileSave
(
FileSaveReq
.
builder
().
refId
(
p
.
getId
()).
fileIds
(
req
.
getProInfoDescPics
()).
build
());
}
if
(
CollectionUtil
.
isNotEmpty
(
req
.
getProFileDatas
()))
{
feignClientForFatools
.
fileSave
(
FileSaveReq
.
builder
().
refId
(
p
.
getId
()).
fileIds
(
req
.
getProFileDatas
()).
build
());
}
}
@Override
public
FundNoNavResp
fundnonavDetail
(
String
id
)
{
IfaImportedFundInfo
ifaImportedFundInfo
=
ifaImportedFundInfoMapper
.
selectByPrimaryKey
(
id
);
FundNoNavResp
p
=
new
FundNoNavResp
();
BeanUtils
.
copyProperties
(
ifaImportedFundInfo
,
p
);
p
.
setRaiseStarttime
(
ifaImportedFundInfo
.
getRaiseStarttime
()
!=
null
?
ifaImportedFundInfo
.
getRaiseStarttime
().
getTime
()
:
null
);
p
.
setRaiseEndtime
(
ifaImportedFundInfo
.
getRaiseEndtime
()
!=
null
?
ifaImportedFundInfo
.
getRaiseEndtime
().
getTime
()
:
null
);
//详情图片
{
CommonResp
<
List
<
FileQueryResp
>>
commonResp
=
feignClientForFatools
.
fileQuery
(
FileQueryReq
.
builder
().
refId
(
id
)
.
fileType
(
FileTypeEnums
.
fundnonavdetail
.
name
()).
build
());
if
(
commonResp
.
isSuccess
())
{
p
.
setProInfoDescPics
(
commonResp
.
getAttributes
());
}
}
//资料
{
CommonResp
<
List
<
FileQueryResp
>>
commonResp
=
feignClientForFatools
.
fileQuery
(
FileQueryReq
.
builder
().
refId
(
id
)
.
fileType
(
FileTypeEnums
.
fundnonavdatas
.
name
()).
build
());
if
(
commonResp
.
isSuccess
())
{
p
.
setProFileDatas
(
commonResp
.
getAttributes
());
}
}
return
p
;
}
}
src/main/resources/mybatis/generator/IfaImportedFundInfoMapper.xml
View file @
9c13455c
This diff is collapsed.
Click to expand it.
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