From 5a3359ef0866d0bec2519a2e3bfb12ae0a92717c Mon Sep 17 00:00:00 2001 From: zhangyh <zhangyahui@wealthgrow.cn> Date: Sat, 13 Mar 2021 17:40:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E5=87=80=E5=80=BC=E5=9F=BA=E9=87=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/tanpu/fund/api/IfaFundApi.java | 29 ++ .../fund/controller/IfaFundController.java | 55 +++ .../entity/generator/IfaImportedFundInfo.java | 44 +- .../generator/IfaImportedFundInfoExample.java | 370 +++++++++++++++ .../feign/user/FeignClientForFatools.java | 11 + .../fund/feign/user/FeignbackForFatools.java | 17 + .../generator/IfaImportedFundInfoMapper.java | 13 +- .../tanpu/fund/service/IfaFundService.java | 17 + .../fund/service/impl/IfaFundServieImpl.java | 114 +++++ .../generator/IfaImportedFundInfoMapper.xml | 437 +++++++++++++++++- 10 files changed, 1084 insertions(+), 23 deletions(-) create mode 100644 src/main/java/com/tanpu/fund/api/IfaFundApi.java create mode 100644 src/main/java/com/tanpu/fund/controller/IfaFundController.java create mode 100644 src/main/java/com/tanpu/fund/service/IfaFundService.java create mode 100644 src/main/java/com/tanpu/fund/service/impl/IfaFundServieImpl.java diff --git a/src/main/java/com/tanpu/fund/api/IfaFundApi.java b/src/main/java/com/tanpu/fund/api/IfaFundApi.java new file mode 100644 index 0000000..8d869e1 --- /dev/null +++ b/src/main/java/com/tanpu/fund/api/IfaFundApi.java @@ -0,0 +1,29 @@ +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); +} diff --git a/src/main/java/com/tanpu/fund/controller/IfaFundController.java b/src/main/java/com/tanpu/fund/controller/IfaFundController.java new file mode 100644 index 0000000..26d75e1 --- /dev/null +++ b/src/main/java/com/tanpu/fund/controller/IfaFundController.java @@ -0,0 +1,55 @@ +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)); + } + +} diff --git a/src/main/java/com/tanpu/fund/entity/generator/IfaImportedFundInfo.java b/src/main/java/com/tanpu/fund/entity/generator/IfaImportedFundInfo.java index 34e0dc8..5aab8f2 100644 --- a/src/main/java/com/tanpu/fund/entity/generator/IfaImportedFundInfo.java +++ b/src/main/java/com/tanpu/fund/entity/generator/IfaImportedFundInfo.java @@ -1,12 +1,13 @@ 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; +import java.math.BigDecimal; +import java.util.Date; + @Data @Builder @AllArgsConstructor @@ -96,6 +97,8 @@ public class IfaImportedFundInfo { */ private String ifaId; + private Integer hasNav; + private Date createTime; private String createBy; @@ -105,4 +108,39 @@ public class IfaImportedFundInfo { private String updateBy; private Integer deleteTag; -} \ No newline at end of file + + /** + * 净值更新周期 + */ + private Integer navFrequency; + + /** + * 机构id + */ + private String orgId; + + /** + * 募集开始时间 + */ + private Date raiseStarttime; + + /** + * å‹Ÿé›†ç»“æŸæ—¶é—´ + */ + private Date raiseEndtime; + + /** + * 产å“类型 0ï¼šæ— å‡€å€¼äº§å“ 1ï¼šæœ‰å‡€å€¼äº§å“ + */ + private Integer proSubType; + + /** + * äº§å“æ‘˜è¦ + */ + private String proAbstract; + + /** + * 产å“详情 + */ + private String proInfoDesc; +} diff --git a/src/main/java/com/tanpu/fund/entity/generator/IfaImportedFundInfoExample.java b/src/main/java/com/tanpu/fund/entity/generator/IfaImportedFundInfoExample.java index 8645962..7bdf180 100644 --- a/src/main/java/com/tanpu/fund/entity/generator/IfaImportedFundInfoExample.java +++ b/src/main/java/com/tanpu/fund/entity/generator/IfaImportedFundInfoExample.java @@ -1276,6 +1276,66 @@ public class IfaImportedFundInfoExample { return (Criteria) this; } + public Criteria andHasNavIsNull() { + addCriterion("has_nav is null"); + return (Criteria) this; + } + + public Criteria andHasNavIsNotNull() { + addCriterion("has_nav is not null"); + return (Criteria) this; + } + + public Criteria andHasNavEqualTo(Integer value) { + addCriterion("has_nav =", value, "hasNav"); + return (Criteria) this; + } + + public Criteria andHasNavNotEqualTo(Integer value) { + addCriterion("has_nav <>", value, "hasNav"); + return (Criteria) this; + } + + public Criteria andHasNavGreaterThan(Integer value) { + addCriterion("has_nav >", value, "hasNav"); + return (Criteria) this; + } + + public Criteria andHasNavGreaterThanOrEqualTo(Integer value) { + addCriterion("has_nav >=", value, "hasNav"); + return (Criteria) this; + } + + public Criteria andHasNavLessThan(Integer value) { + addCriterion("has_nav <", value, "hasNav"); + return (Criteria) this; + } + + public Criteria andHasNavLessThanOrEqualTo(Integer value) { + addCriterion("has_nav <=", value, "hasNav"); + return (Criteria) this; + } + + public Criteria andHasNavIn(List<Integer> values) { + addCriterion("has_nav in", values, "hasNav"); + return (Criteria) this; + } + + public Criteria andHasNavNotIn(List<Integer> values) { + addCriterion("has_nav not in", values, "hasNav"); + return (Criteria) this; + } + + public Criteria andHasNavBetween(Integer value1, Integer value2) { + addCriterion("has_nav between", value1, value2, "hasNav"); + return (Criteria) this; + } + + public Criteria andHasNavNotBetween(Integer value1, Integer value2) { + addCriterion("has_nav not between", value1, value2, "hasNav"); + return (Criteria) this; + } + public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; @@ -1595,6 +1655,316 @@ public class IfaImportedFundInfoExample { addCriterion("delete_tag not between", value1, value2, "deleteTag"); return (Criteria) this; } + + public Criteria andNavFrequencyIsNull() { + addCriterion("nav_frequency is null"); + return (Criteria) this; + } + + public Criteria andNavFrequencyIsNotNull() { + addCriterion("nav_frequency is not null"); + return (Criteria) this; + } + + public Criteria andNavFrequencyEqualTo(Integer value) { + addCriterion("nav_frequency =", value, "navFrequency"); + return (Criteria) this; + } + + public Criteria andNavFrequencyNotEqualTo(Integer value) { + addCriterion("nav_frequency <>", value, "navFrequency"); + return (Criteria) this; + } + + public Criteria andNavFrequencyGreaterThan(Integer value) { + addCriterion("nav_frequency >", value, "navFrequency"); + return (Criteria) this; + } + + public Criteria andNavFrequencyGreaterThanOrEqualTo(Integer value) { + addCriterion("nav_frequency >=", value, "navFrequency"); + return (Criteria) this; + } + + public Criteria andNavFrequencyLessThan(Integer value) { + addCriterion("nav_frequency <", value, "navFrequency"); + return (Criteria) this; + } + + public Criteria andNavFrequencyLessThanOrEqualTo(Integer value) { + addCriterion("nav_frequency <=", value, "navFrequency"); + return (Criteria) this; + } + + public Criteria andNavFrequencyIn(List<Integer> values) { + addCriterion("nav_frequency in", values, "navFrequency"); + return (Criteria) this; + } + + public Criteria andNavFrequencyNotIn(List<Integer> values) { + addCriterion("nav_frequency not in", values, "navFrequency"); + return (Criteria) this; + } + + public Criteria andNavFrequencyBetween(Integer value1, Integer value2) { + addCriterion("nav_frequency between", value1, value2, "navFrequency"); + return (Criteria) this; + } + + public Criteria andNavFrequencyNotBetween(Integer value1, Integer value2) { + addCriterion("nav_frequency not between", value1, value2, "navFrequency"); + return (Criteria) this; + } + + public Criteria andOrgIdIsNull() { + addCriterion("org_id is null"); + return (Criteria) this; + } + + public Criteria andOrgIdIsNotNull() { + addCriterion("org_id is not null"); + return (Criteria) this; + } + + public Criteria andOrgIdEqualTo(String value) { + addCriterion("org_id =", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdNotEqualTo(String value) { + addCriterion("org_id <>", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdGreaterThan(String value) { + addCriterion("org_id >", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdGreaterThanOrEqualTo(String value) { + addCriterion("org_id >=", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdLessThan(String value) { + addCriterion("org_id <", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdLessThanOrEqualTo(String value) { + addCriterion("org_id <=", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdLike(String value) { + addCriterion("org_id like", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdNotLike(String value) { + addCriterion("org_id not like", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdIn(List<String> values) { + addCriterion("org_id in", values, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdNotIn(List<String> values) { + addCriterion("org_id not in", values, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdBetween(String value1, String value2) { + addCriterion("org_id between", value1, value2, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdNotBetween(String value1, String value2) { + addCriterion("org_id not between", value1, value2, "orgId"); + return (Criteria) this; + } + + public 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 { diff --git a/src/main/java/com/tanpu/fund/feign/user/FeignClientForFatools.java b/src/main/java/com/tanpu/fund/feign/user/FeignClientForFatools.java index 2d1f182..028d066 100644 --- a/src/main/java/com/tanpu/fund/feign/user/FeignClientForFatools.java +++ b/src/main/java/com/tanpu/fund/feign/user/FeignClientForFatools.java @@ -1,5 +1,8 @@ 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); } diff --git a/src/main/java/com/tanpu/fund/feign/user/FeignbackForFatools.java b/src/main/java/com/tanpu/fund/feign/user/FeignbackForFatools.java index 9d46133..8aa0b60 100644 --- a/src/main/java/com/tanpu/fund/feign/user/FeignbackForFatools.java +++ b/src/main/java/com/tanpu/fund/feign/user/FeignbackForFatools.java @@ -1,6 +1,9 @@ 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; + } }; } diff --git a/src/main/java/com/tanpu/fund/mapper/generator/IfaImportedFundInfoMapper.java b/src/main/java/com/tanpu/fund/mapper/generator/IfaImportedFundInfoMapper.java index 34b1a06..a356f06 100644 --- a/src/main/java/com/tanpu/fund/mapper/generator/IfaImportedFundInfoMapper.java +++ b/src/main/java/com/tanpu/fund/mapper/generator/IfaImportedFundInfoMapper.java @@ -2,10 +2,11 @@ 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; +import java.util.List; + @Mapper public interface IfaImportedFundInfoMapper { long countByExample(IfaImportedFundInfoExample example); @@ -32,6 +33,8 @@ public interface IfaImportedFundInfoMapper { int insertOrUpdateSelective(IfaImportedFundInfo record); + int insertOrUpdateWithBLOBs(IfaImportedFundInfo record); + /** * insert record to table selective * @@ -40,6 +43,8 @@ public interface IfaImportedFundInfoMapper { */ int insertSelective(IfaImportedFundInfo record); + List<IfaImportedFundInfo> selectByExampleWithBLOBs(IfaImportedFundInfoExample example); + List<IfaImportedFundInfo> selectByExample(IfaImportedFundInfoExample example); /** @@ -52,6 +57,8 @@ public interface IfaImportedFundInfoMapper { 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); /** @@ -62,6 +69,8 @@ public interface IfaImportedFundInfoMapper { */ int updateByPrimaryKeySelective(IfaImportedFundInfo record); + int updateByPrimaryKeyWithBLOBs(IfaImportedFundInfo record); + /** * update record * @@ -73,4 +82,4 @@ public interface IfaImportedFundInfoMapper { int updateBatch(List<IfaImportedFundInfo> list); int batchInsert(@Param("list") List<IfaImportedFundInfo> list); -} \ No newline at end of file +} diff --git a/src/main/java/com/tanpu/fund/service/IfaFundService.java b/src/main/java/com/tanpu/fund/service/IfaFundService.java new file mode 100644 index 0000000..10ac485 --- /dev/null +++ b/src/main/java/com/tanpu/fund/service/IfaFundService.java @@ -0,0 +1,17 @@ +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); +} diff --git a/src/main/java/com/tanpu/fund/service/impl/IfaFundServieImpl.java b/src/main/java/com/tanpu/fund/service/impl/IfaFundServieImpl.java new file mode 100644 index 0000000..898742d --- /dev/null +++ b/src/main/java/com/tanpu/fund/service/impl/IfaFundServieImpl.java @@ -0,0 +1,114 @@ +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; + } + +} diff --git a/src/main/resources/mybatis/generator/IfaImportedFundInfoMapper.xml b/src/main/resources/mybatis/generator/IfaImportedFundInfoMapper.xml index 13e4f8d..7b5f05c 100644 --- a/src/main/resources/mybatis/generator/IfaImportedFundInfoMapper.xml +++ b/src/main/resources/mybatis/generator/IfaImportedFundInfoMapper.xml @@ -22,11 +22,23 @@ <result column="performance_fee" jdbcType="DECIMAL" property="performanceFee" /> <result column="performance_calculate_method" jdbcType="VARCHAR" property="performanceCalculateMethod" /> <result column="ifa_id" jdbcType="VARCHAR" property="ifaId" /> + <result column="has_nav" jdbcType="INTEGER" property="hasNav" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_by" jdbcType="VARCHAR" property="createBy" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_by" jdbcType="VARCHAR" property="updateBy" /> <result column="delete_tag" jdbcType="INTEGER" property="deleteTag" /> + <result column="nav_frequency" jdbcType="INTEGER" property="navFrequency" /> + <result column="org_id" jdbcType="VARCHAR" property="orgId" /> + <result column="raise_starttime" jdbcType="TIMESTAMP" property="raiseStarttime" /> + <result column="raise_endtime" jdbcType="TIMESTAMP" property="raiseEndtime" /> + <result column="pro_sub_type" jdbcType="INTEGER" property="proSubType" /> + </resultMap> + <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tanpu.fund.entity.generator.IfaImportedFundInfo"> + <!--@mbg.generated--> + <!--@Table ifa_imported_fund_info--> + <result column="pro_abstract" jdbcType="LONGVARCHAR" property="proAbstract" /> + <result column="pro_info_desc" jdbcType="LONGVARCHAR" property="proInfoDesc" /> </resultMap> <sql id="Example_Where_Clause"> <!--@mbg.generated--> @@ -93,8 +105,30 @@ id, fund_name, company_name, substrategy, strategy, manage_name, risk_level, inception_date, register_number, open_day, min_investment_share, subsequent_investment_share, subscription_fee, redemption_fee, management_fee, performance_fee, performance_calculate_method, ifa_id, - create_time, create_by, update_time, update_by, delete_tag + has_nav, create_time, create_by, update_time, update_by, delete_tag, nav_frequency, + org_id, raise_starttime, raise_endtime, pro_sub_type </sql> + <sql id="Blob_Column_List"> + <!--@mbg.generated--> + pro_abstract, pro_info_desc + </sql> + <select id="selectByExampleWithBLOBs" parameterType="com.tanpu.fund.entity.generator.IfaImportedFundInfoExample" resultMap="ResultMapWithBLOBs"> + <!--@mbg.generated--> + select + <if test="distinct"> + distinct + </if> + <include refid="Base_Column_List" /> + , + <include refid="Blob_Column_List" /> + from ifa_imported_fund_info + <if test="_parameter != null"> + <include refid="Example_Where_Clause" /> + </if> + <if test="orderByClause != null"> + order by ${orderByClause} + </if> + </select> <select id="selectByExample" parameterType="com.tanpu.fund.entity.generator.IfaImportedFundInfoExample" resultMap="BaseResultMap"> <!--@mbg.generated--> select @@ -110,10 +144,12 @@ order by ${orderByClause} </if> </select> - <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> + <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs"> <!--@mbg.generated--> select <include refid="Base_Column_List" /> + , + <include refid="Blob_Column_List" /> from ifa_imported_fund_info where id = #{id,jdbcType=VARCHAR} </select> @@ -137,18 +173,22 @@ open_day, min_investment_share, subsequent_investment_share, subscription_fee, redemption_fee, management_fee, performance_fee, performance_calculate_method, - ifa_id, create_time, create_by, - update_time, update_by, delete_tag - ) + ifa_id, has_nav, create_time, + create_by, update_time, update_by, + delete_tag, nav_frequency, org_id, + raise_starttime, raise_endtime, pro_sub_type, + pro_abstract, pro_info_desc) values (#{id,jdbcType=VARCHAR}, #{fundName,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{substrategy,jdbcType=INTEGER}, #{strategy,jdbcType=INTEGER}, #{manageName,jdbcType=VARCHAR}, #{riskLevel,jdbcType=VARCHAR}, #{inceptionDate,jdbcType=TIMESTAMP}, #{registerNumber,jdbcType=VARCHAR}, #{openDay,jdbcType=VARCHAR}, #{minInvestmentShare,jdbcType=DECIMAL}, #{subsequentInvestmentShare,jdbcType=DECIMAL}, #{subscriptionFee,jdbcType=DECIMAL}, #{redemptionFee,jdbcType=DECIMAL}, #{managementFee,jdbcType=DECIMAL}, #{performanceFee,jdbcType=DECIMAL}, #{performanceCalculateMethod,jdbcType=VARCHAR}, - #{ifaId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, - #{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{deleteTag,jdbcType=INTEGER} - ) + #{ifaId,jdbcType=VARCHAR}, #{hasNav,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, + #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, + #{deleteTag,jdbcType=INTEGER}, #{navFrequency,jdbcType=INTEGER}, #{orgId,jdbcType=VARCHAR}, + #{raiseStarttime,jdbcType=TIMESTAMP}, #{raiseEndtime,jdbcType=TIMESTAMP}, #{proSubType,jdbcType=INTEGER}, + #{proAbstract,jdbcType=LONGVARCHAR}, #{proInfoDesc,jdbcType=LONGVARCHAR}) </insert> <insert id="insertSelective" parameterType="com.tanpu.fund.entity.generator.IfaImportedFundInfo"> <!--@mbg.generated--> @@ -208,6 +248,9 @@ <if test="ifaId != null"> ifa_id, </if> + <if test="hasNav != null"> + has_nav, + </if> <if test="createTime != null"> create_time, </if> @@ -223,6 +266,27 @@ <if test="deleteTag != null"> delete_tag, </if> + <if test="navFrequency != null"> + nav_frequency, + </if> + <if test="orgId != null"> + org_id, + </if> + <if test="raiseStarttime != null"> + raise_starttime, + </if> + <if test="raiseEndtime != null"> + raise_endtime, + </if> + <if test="proSubType != null"> + pro_sub_type, + </if> + <if test="proAbstract != null"> + pro_abstract, + </if> + <if test="proInfoDesc != null"> + pro_info_desc, + </if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="id != null"> @@ -279,6 +343,9 @@ <if test="ifaId != null"> #{ifaId,jdbcType=VARCHAR}, </if> + <if test="hasNav != null"> + #{hasNav,jdbcType=INTEGER}, + </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> @@ -294,6 +361,27 @@ <if test="deleteTag != null"> #{deleteTag,jdbcType=INTEGER}, </if> + <if test="navFrequency != null"> + #{navFrequency,jdbcType=INTEGER}, + </if> + <if test="orgId != null"> + #{orgId,jdbcType=VARCHAR}, + </if> + <if test="raiseStarttime != null"> + #{raiseStarttime,jdbcType=TIMESTAMP}, + </if> + <if test="raiseEndtime != null"> + #{raiseEndtime,jdbcType=TIMESTAMP}, + </if> + <if test="proSubType != null"> + #{proSubType,jdbcType=INTEGER}, + </if> + <if test="proAbstract != null"> + #{proAbstract,jdbcType=LONGVARCHAR}, + </if> + <if test="proInfoDesc != null"> + #{proInfoDesc,jdbcType=LONGVARCHAR}, + </if> </trim> </insert> <select id="countByExample" parameterType="com.tanpu.fund.entity.generator.IfaImportedFundInfoExample" resultType="java.lang.Long"> @@ -361,6 +449,9 @@ <if test="record.ifaId != null"> ifa_id = #{record.ifaId,jdbcType=VARCHAR}, </if> + <if test="record.hasNav != null"> + has_nav = #{record.hasNav,jdbcType=INTEGER}, + </if> <if test="record.createTime != null"> create_time = #{record.createTime,jdbcType=TIMESTAMP}, </if> @@ -376,11 +467,70 @@ <if test="record.deleteTag != null"> delete_tag = #{record.deleteTag,jdbcType=INTEGER}, </if> + <if test="record.navFrequency != null"> + nav_frequency = #{record.navFrequency,jdbcType=INTEGER}, + </if> + <if test="record.orgId != null"> + org_id = #{record.orgId,jdbcType=VARCHAR}, + </if> + <if test="record.raiseStarttime != null"> + raise_starttime = #{record.raiseStarttime,jdbcType=TIMESTAMP}, + </if> + <if test="record.raiseEndtime != null"> + raise_endtime = #{record.raiseEndtime,jdbcType=TIMESTAMP}, + </if> + <if test="record.proSubType != null"> + pro_sub_type = #{record.proSubType,jdbcType=INTEGER}, + </if> + <if test="record.proAbstract != null"> + pro_abstract = #{record.proAbstract,jdbcType=LONGVARCHAR}, + </if> + <if test="record.proInfoDesc != null"> + pro_info_desc = #{record.proInfoDesc,jdbcType=LONGVARCHAR}, + </if> </set> <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> </update> + <update id="updateByExampleWithBLOBs" parameterType="map"> + <!--@mbg.generated--> + update ifa_imported_fund_info + set id = #{record.id,jdbcType=VARCHAR}, + fund_name = #{record.fundName,jdbcType=VARCHAR}, + company_name = #{record.companyName,jdbcType=VARCHAR}, + substrategy = #{record.substrategy,jdbcType=INTEGER}, + strategy = #{record.strategy,jdbcType=INTEGER}, + manage_name = #{record.manageName,jdbcType=VARCHAR}, + risk_level = #{record.riskLevel,jdbcType=VARCHAR}, + inception_date = #{record.inceptionDate,jdbcType=TIMESTAMP}, + register_number = #{record.registerNumber,jdbcType=VARCHAR}, + open_day = #{record.openDay,jdbcType=VARCHAR}, + min_investment_share = #{record.minInvestmentShare,jdbcType=DECIMAL}, + subsequent_investment_share = #{record.subsequentInvestmentShare,jdbcType=DECIMAL}, + subscription_fee = #{record.subscriptionFee,jdbcType=DECIMAL}, + redemption_fee = #{record.redemptionFee,jdbcType=DECIMAL}, + management_fee = #{record.managementFee,jdbcType=DECIMAL}, + performance_fee = #{record.performanceFee,jdbcType=DECIMAL}, + performance_calculate_method = #{record.performanceCalculateMethod,jdbcType=VARCHAR}, + ifa_id = #{record.ifaId,jdbcType=VARCHAR}, + has_nav = #{record.hasNav,jdbcType=INTEGER}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + delete_tag = #{record.deleteTag,jdbcType=INTEGER}, + nav_frequency = #{record.navFrequency,jdbcType=INTEGER}, + org_id = #{record.orgId,jdbcType=VARCHAR}, + raise_starttime = #{record.raiseStarttime,jdbcType=TIMESTAMP}, + raise_endtime = #{record.raiseEndtime,jdbcType=TIMESTAMP}, + pro_sub_type = #{record.proSubType,jdbcType=INTEGER}, + pro_abstract = #{record.proAbstract,jdbcType=LONGVARCHAR}, + pro_info_desc = #{record.proInfoDesc,jdbcType=LONGVARCHAR} + <if test="_parameter != null"> + <include refid="Update_By_Example_Where_Clause" /> + </if> + </update> <update id="updateByExample" parameterType="map"> <!--@mbg.generated--> update ifa_imported_fund_info @@ -402,11 +552,17 @@ performance_fee = #{record.performanceFee,jdbcType=DECIMAL}, performance_calculate_method = #{record.performanceCalculateMethod,jdbcType=VARCHAR}, ifa_id = #{record.ifaId,jdbcType=VARCHAR}, + has_nav = #{record.hasNav,jdbcType=INTEGER}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_by = #{record.createBy,jdbcType=VARCHAR}, update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_by = #{record.updateBy,jdbcType=VARCHAR}, - delete_tag = #{record.deleteTag,jdbcType=INTEGER} + delete_tag = #{record.deleteTag,jdbcType=INTEGER}, + nav_frequency = #{record.navFrequency,jdbcType=INTEGER}, + org_id = #{record.orgId,jdbcType=VARCHAR}, + raise_starttime = #{record.raiseStarttime,jdbcType=TIMESTAMP}, + raise_endtime = #{record.raiseEndtime,jdbcType=TIMESTAMP}, + pro_sub_type = #{record.proSubType,jdbcType=INTEGER} <if test="_parameter != null"> <include refid="Update_By_Example_Where_Clause" /> </if> @@ -466,6 +622,9 @@ <if test="ifaId != null"> ifa_id = #{ifaId,jdbcType=VARCHAR}, </if> + <if test="hasNav != null"> + has_nav = #{hasNav,jdbcType=INTEGER}, + </if> <if test="createTime != null"> create_time = #{createTime,jdbcType=TIMESTAMP}, </if> @@ -481,9 +640,65 @@ <if test="deleteTag != null"> delete_tag = #{deleteTag,jdbcType=INTEGER}, </if> + <if test="navFrequency != null"> + nav_frequency = #{navFrequency,jdbcType=INTEGER}, + </if> + <if test="orgId != null"> + org_id = #{orgId,jdbcType=VARCHAR}, + </if> + <if test="raiseStarttime != null"> + raise_starttime = #{raiseStarttime,jdbcType=TIMESTAMP}, + </if> + <if test="raiseEndtime != null"> + raise_endtime = #{raiseEndtime,jdbcType=TIMESTAMP}, + </if> + <if test="proSubType != null"> + pro_sub_type = #{proSubType,jdbcType=INTEGER}, + </if> + <if test="proAbstract != null"> + pro_abstract = #{proAbstract,jdbcType=LONGVARCHAR}, + </if> + <if test="proInfoDesc != null"> + pro_info_desc = #{proInfoDesc,jdbcType=LONGVARCHAR}, + </if> </set> where id = #{id,jdbcType=VARCHAR} </update> + <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.tanpu.fund.entity.generator.IfaImportedFundInfo"> + <!--@mbg.generated--> + update ifa_imported_fund_info + set fund_name = #{fundName,jdbcType=VARCHAR}, + company_name = #{companyName,jdbcType=VARCHAR}, + substrategy = #{substrategy,jdbcType=INTEGER}, + strategy = #{strategy,jdbcType=INTEGER}, + manage_name = #{manageName,jdbcType=VARCHAR}, + risk_level = #{riskLevel,jdbcType=VARCHAR}, + inception_date = #{inceptionDate,jdbcType=TIMESTAMP}, + register_number = #{registerNumber,jdbcType=VARCHAR}, + open_day = #{openDay,jdbcType=VARCHAR}, + min_investment_share = #{minInvestmentShare,jdbcType=DECIMAL}, + subsequent_investment_share = #{subsequentInvestmentShare,jdbcType=DECIMAL}, + subscription_fee = #{subscriptionFee,jdbcType=DECIMAL}, + redemption_fee = #{redemptionFee,jdbcType=DECIMAL}, + management_fee = #{managementFee,jdbcType=DECIMAL}, + performance_fee = #{performanceFee,jdbcType=DECIMAL}, + performance_calculate_method = #{performanceCalculateMethod,jdbcType=VARCHAR}, + ifa_id = #{ifaId,jdbcType=VARCHAR}, + has_nav = #{hasNav,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + delete_tag = #{deleteTag,jdbcType=INTEGER}, + nav_frequency = #{navFrequency,jdbcType=INTEGER}, + org_id = #{orgId,jdbcType=VARCHAR}, + raise_starttime = #{raiseStarttime,jdbcType=TIMESTAMP}, + raise_endtime = #{raiseEndtime,jdbcType=TIMESTAMP}, + pro_sub_type = #{proSubType,jdbcType=INTEGER}, + pro_abstract = #{proAbstract,jdbcType=LONGVARCHAR}, + pro_info_desc = #{proInfoDesc,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + </update> <update id="updateByPrimaryKey" parameterType="com.tanpu.fund.entity.generator.IfaImportedFundInfo"> <!--@mbg.generated--> update ifa_imported_fund_info @@ -504,11 +719,17 @@ performance_fee = #{performanceFee,jdbcType=DECIMAL}, performance_calculate_method = #{performanceCalculateMethod,jdbcType=VARCHAR}, ifa_id = #{ifaId,jdbcType=VARCHAR}, + has_nav = #{hasNav,jdbcType=INTEGER}, create_time = #{createTime,jdbcType=TIMESTAMP}, create_by = #{createBy,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, - delete_tag = #{deleteTag,jdbcType=INTEGER} + delete_tag = #{deleteTag,jdbcType=INTEGER}, + nav_frequency = #{navFrequency,jdbcType=INTEGER}, + org_id = #{orgId,jdbcType=VARCHAR}, + raise_starttime = #{raiseStarttime,jdbcType=TIMESTAMP}, + raise_endtime = #{raiseEndtime,jdbcType=TIMESTAMP}, + pro_sub_type = #{proSubType,jdbcType=INTEGER} where id = #{id,jdbcType=VARCHAR} </update> <update id="updateBatch" parameterType="java.util.List"> @@ -600,6 +821,11 @@ when id = #{item.id,jdbcType=VARCHAR} then #{item.ifaId,jdbcType=VARCHAR} </foreach> </trim> + <trim prefix="has_nav = case" suffix="end,"> + <foreach collection="list" index="index" item="item"> + when id = #{item.id,jdbcType=VARCHAR} then #{item.hasNav,jdbcType=INTEGER} + </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} @@ -625,6 +851,41 @@ when id = #{item.id,jdbcType=VARCHAR} then #{item.deleteTag,jdbcType=INTEGER} </foreach> </trim> + <trim prefix="nav_frequency = case" suffix="end,"> + <foreach collection="list" index="index" item="item"> + when id = #{item.id,jdbcType=VARCHAR} then #{item.navFrequency,jdbcType=INTEGER} + </foreach> + </trim> + <trim prefix="org_id = case" suffix="end,"> + <foreach collection="list" index="index" item="item"> + when id = #{item.id,jdbcType=VARCHAR} then #{item.orgId,jdbcType=VARCHAR} + </foreach> + </trim> + <trim prefix="raise_starttime = case" suffix="end,"> + <foreach collection="list" index="index" item="item"> + when id = #{item.id,jdbcType=VARCHAR} then #{item.raiseStarttime,jdbcType=TIMESTAMP} + </foreach> + </trim> + <trim prefix="raise_endtime = case" suffix="end,"> + <foreach collection="list" index="index" item="item"> + when id = #{item.id,jdbcType=VARCHAR} then #{item.raiseEndtime,jdbcType=TIMESTAMP} + </foreach> + </trim> + <trim prefix="pro_sub_type = case" suffix="end,"> + <foreach collection="list" index="index" item="item"> + when id = #{item.id,jdbcType=VARCHAR} then #{item.proSubType,jdbcType=INTEGER} + </foreach> + </trim> + <trim prefix="pro_abstract = case" suffix="end,"> + <foreach collection="list" index="index" item="item"> + when id = #{item.id,jdbcType=VARCHAR} then #{item.proAbstract,jdbcType=LONGVARCHAR} + </foreach> + </trim> + <trim prefix="pro_info_desc = case" suffix="end,"> + <foreach collection="list" index="index" item="item"> + when id = #{item.id,jdbcType=VARCHAR} then #{item.proInfoDesc,jdbcType=LONGVARCHAR} + </foreach> + </trim> </trim> where id in <foreach close=")" collection="list" item="item" open="(" separator=", "> @@ -637,7 +898,9 @@ (id, fund_name, company_name, substrategy, strategy, manage_name, risk_level, inception_date, register_number, open_day, min_investment_share, subsequent_investment_share, subscription_fee, redemption_fee, management_fee, performance_fee, performance_calculate_method, - ifa_id, create_time, create_by, update_time, update_by, delete_tag) + ifa_id, has_nav, create_time, create_by, update_time, update_by, delete_tag, nav_frequency, + org_id, raise_starttime, raise_endtime, pro_sub_type, pro_abstract, pro_info_desc + ) values <foreach collection="list" item="item" separator=","> (#{item.id,jdbcType=VARCHAR}, #{item.fundName,jdbcType=VARCHAR}, #{item.companyName,jdbcType=VARCHAR}, @@ -647,9 +910,12 @@ #{item.subsequentInvestmentShare,jdbcType=DECIMAL}, #{item.subscriptionFee,jdbcType=DECIMAL}, #{item.redemptionFee,jdbcType=DECIMAL}, #{item.managementFee,jdbcType=DECIMAL}, #{item.performanceFee,jdbcType=DECIMAL}, #{item.performanceCalculateMethod,jdbcType=VARCHAR}, - #{item.ifaId,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.createBy,jdbcType=VARCHAR}, - #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR}, #{item.deleteTag,jdbcType=INTEGER} - ) + #{item.ifaId,jdbcType=VARCHAR}, #{item.hasNav,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, + #{item.createBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR}, + #{item.deleteTag,jdbcType=INTEGER}, #{item.navFrequency,jdbcType=INTEGER}, #{item.orgId,jdbcType=VARCHAR}, + #{item.raiseStarttime,jdbcType=TIMESTAMP}, #{item.raiseEndtime,jdbcType=TIMESTAMP}, + #{item.proSubType,jdbcType=INTEGER}, #{item.proAbstract,jdbcType=LONGVARCHAR}, + #{item.proInfoDesc,jdbcType=LONGVARCHAR}) </foreach> </insert> <insert id="insertOrUpdate" parameterType="com.tanpu.fund.entity.generator.IfaImportedFundInfo"> @@ -658,7 +924,8 @@ (id, fund_name, company_name, substrategy, strategy, manage_name, risk_level, inception_date, register_number, open_day, min_investment_share, subsequent_investment_share, subscription_fee, redemption_fee, management_fee, performance_fee, performance_calculate_method, - ifa_id, create_time, create_by, update_time, update_by, delete_tag) + ifa_id, has_nav, create_time, create_by, update_time, update_by, delete_tag, nav_frequency, + org_id, raise_starttime, raise_endtime, pro_sub_type) values (#{id,jdbcType=VARCHAR}, #{fundName,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{substrategy,jdbcType=INTEGER}, #{strategy,jdbcType=INTEGER}, #{manageName,jdbcType=VARCHAR}, @@ -666,9 +933,63 @@ #{openDay,jdbcType=VARCHAR}, #{minInvestmentShare,jdbcType=DECIMAL}, #{subsequentInvestmentShare,jdbcType=DECIMAL}, #{subscriptionFee,jdbcType=DECIMAL}, #{redemptionFee,jdbcType=DECIMAL}, #{managementFee,jdbcType=DECIMAL}, #{performanceFee,jdbcType=DECIMAL}, #{performanceCalculateMethod,jdbcType=VARCHAR}, - #{ifaId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, - #{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{deleteTag,jdbcType=INTEGER} + #{ifaId,jdbcType=VARCHAR}, #{hasNav,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, + #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, + #{deleteTag,jdbcType=INTEGER}, #{navFrequency,jdbcType=INTEGER}, #{orgId,jdbcType=VARCHAR}, + #{raiseStarttime,jdbcType=TIMESTAMP}, #{raiseEndtime,jdbcType=TIMESTAMP}, #{proSubType,jdbcType=INTEGER} + ) + on duplicate key update + id = #{id,jdbcType=VARCHAR}, + fund_name = #{fundName,jdbcType=VARCHAR}, + company_name = #{companyName,jdbcType=VARCHAR}, + substrategy = #{substrategy,jdbcType=INTEGER}, + strategy = #{strategy,jdbcType=INTEGER}, + manage_name = #{manageName,jdbcType=VARCHAR}, + risk_level = #{riskLevel,jdbcType=VARCHAR}, + inception_date = #{inceptionDate,jdbcType=TIMESTAMP}, + register_number = #{registerNumber,jdbcType=VARCHAR}, + open_day = #{openDay,jdbcType=VARCHAR}, + min_investment_share = #{minInvestmentShare,jdbcType=DECIMAL}, + subsequent_investment_share = #{subsequentInvestmentShare,jdbcType=DECIMAL}, + subscription_fee = #{subscriptionFee,jdbcType=DECIMAL}, + redemption_fee = #{redemptionFee,jdbcType=DECIMAL}, + management_fee = #{managementFee,jdbcType=DECIMAL}, + performance_fee = #{performanceFee,jdbcType=DECIMAL}, + performance_calculate_method = #{performanceCalculateMethod,jdbcType=VARCHAR}, + ifa_id = #{ifaId,jdbcType=VARCHAR}, + has_nav = #{hasNav,jdbcType=INTEGER}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + delete_tag = #{deleteTag,jdbcType=INTEGER}, + nav_frequency = #{navFrequency,jdbcType=INTEGER}, + org_id = #{orgId,jdbcType=VARCHAR}, + raise_starttime = #{raiseStarttime,jdbcType=TIMESTAMP}, + raise_endtime = #{raiseEndtime,jdbcType=TIMESTAMP}, + pro_sub_type = #{proSubType,jdbcType=INTEGER} + </insert> + <insert id="insertOrUpdateWithBLOBs" parameterType="com.tanpu.fund.entity.generator.IfaImportedFundInfo"> + <!--@mbg.generated--> + insert into ifa_imported_fund_info + (id, fund_name, company_name, substrategy, strategy, manage_name, risk_level, inception_date, + register_number, open_day, min_investment_share, subsequent_investment_share, subscription_fee, + redemption_fee, management_fee, performance_fee, performance_calculate_method, + ifa_id, has_nav, create_time, create_by, update_time, update_by, delete_tag, nav_frequency, + org_id, raise_starttime, raise_endtime, pro_sub_type, pro_abstract, pro_info_desc ) + values + (#{id,jdbcType=VARCHAR}, #{fundName,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, + #{substrategy,jdbcType=INTEGER}, #{strategy,jdbcType=INTEGER}, #{manageName,jdbcType=VARCHAR}, + #{riskLevel,jdbcType=VARCHAR}, #{inceptionDate,jdbcType=TIMESTAMP}, #{registerNumber,jdbcType=VARCHAR}, + #{openDay,jdbcType=VARCHAR}, #{minInvestmentShare,jdbcType=DECIMAL}, #{subsequentInvestmentShare,jdbcType=DECIMAL}, + #{subscriptionFee,jdbcType=DECIMAL}, #{redemptionFee,jdbcType=DECIMAL}, #{managementFee,jdbcType=DECIMAL}, + #{performanceFee,jdbcType=DECIMAL}, #{performanceCalculateMethod,jdbcType=VARCHAR}, + #{ifaId,jdbcType=VARCHAR}, #{hasNav,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, + #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, + #{deleteTag,jdbcType=INTEGER}, #{navFrequency,jdbcType=INTEGER}, #{orgId,jdbcType=VARCHAR}, + #{raiseStarttime,jdbcType=TIMESTAMP}, #{raiseEndtime,jdbcType=TIMESTAMP}, #{proSubType,jdbcType=INTEGER}, + #{proAbstract,jdbcType=LONGVARCHAR}, #{proInfoDesc,jdbcType=LONGVARCHAR}) on duplicate key update id = #{id,jdbcType=VARCHAR}, fund_name = #{fundName,jdbcType=VARCHAR}, @@ -688,11 +1009,19 @@ performance_fee = #{performanceFee,jdbcType=DECIMAL}, performance_calculate_method = #{performanceCalculateMethod,jdbcType=VARCHAR}, ifa_id = #{ifaId,jdbcType=VARCHAR}, + has_nav = #{hasNav,jdbcType=INTEGER}, create_time = #{createTime,jdbcType=TIMESTAMP}, create_by = #{createBy,jdbcType=VARCHAR}, update_time = #{updateTime,jdbcType=TIMESTAMP}, update_by = #{updateBy,jdbcType=VARCHAR}, - delete_tag = #{deleteTag,jdbcType=INTEGER} + delete_tag = #{deleteTag,jdbcType=INTEGER}, + nav_frequency = #{navFrequency,jdbcType=INTEGER}, + org_id = #{orgId,jdbcType=VARCHAR}, + raise_starttime = #{raiseStarttime,jdbcType=TIMESTAMP}, + raise_endtime = #{raiseEndtime,jdbcType=TIMESTAMP}, + pro_sub_type = #{proSubType,jdbcType=INTEGER}, + pro_abstract = #{proAbstract,jdbcType=LONGVARCHAR}, + pro_info_desc = #{proInfoDesc,jdbcType=LONGVARCHAR} </insert> <insert id="insertOrUpdateSelective" parameterType="com.tanpu.fund.entity.generator.IfaImportedFundInfo"> <!--@mbg.generated--> @@ -752,6 +1081,9 @@ <if test="ifaId != null"> ifa_id, </if> + <if test="hasNav != null"> + has_nav, + </if> <if test="createTime != null"> create_time, </if> @@ -767,6 +1099,27 @@ <if test="deleteTag != null"> delete_tag, </if> + <if test="navFrequency != null"> + nav_frequency, + </if> + <if test="orgId != null"> + org_id, + </if> + <if test="raiseStarttime != null"> + raise_starttime, + </if> + <if test="raiseEndtime != null"> + raise_endtime, + </if> + <if test="proSubType != null"> + pro_sub_type, + </if> + <if test="proAbstract != null"> + pro_abstract, + </if> + <if test="proInfoDesc != null"> + pro_info_desc, + </if> </trim> values <trim prefix="(" suffix=")" suffixOverrides=","> @@ -824,6 +1177,9 @@ <if test="ifaId != null"> #{ifaId,jdbcType=VARCHAR}, </if> + <if test="hasNav != null"> + #{hasNav,jdbcType=INTEGER}, + </if> <if test="createTime != null"> #{createTime,jdbcType=TIMESTAMP}, </if> @@ -839,6 +1195,27 @@ <if test="deleteTag != null"> #{deleteTag,jdbcType=INTEGER}, </if> + <if test="navFrequency != null"> + #{navFrequency,jdbcType=INTEGER}, + </if> + <if test="orgId != null"> + #{orgId,jdbcType=VARCHAR}, + </if> + <if test="raiseStarttime != null"> + #{raiseStarttime,jdbcType=TIMESTAMP}, + </if> + <if test="raiseEndtime != null"> + #{raiseEndtime,jdbcType=TIMESTAMP}, + </if> + <if test="proSubType != null"> + #{proSubType,jdbcType=INTEGER}, + </if> + <if test="proAbstract != null"> + #{proAbstract,jdbcType=LONGVARCHAR}, + </if> + <if test="proInfoDesc != null"> + #{proInfoDesc,jdbcType=LONGVARCHAR}, + </if> </trim> on duplicate key update <trim suffixOverrides=","> @@ -896,6 +1273,9 @@ <if test="ifaId != null"> ifa_id = #{ifaId,jdbcType=VARCHAR}, </if> + <if test="hasNav != null"> + has_nav = #{hasNav,jdbcType=INTEGER}, + </if> <if test="createTime != null"> create_time = #{createTime,jdbcType=TIMESTAMP}, </if> @@ -911,6 +1291,27 @@ <if test="deleteTag != null"> delete_tag = #{deleteTag,jdbcType=INTEGER}, </if> + <if test="navFrequency != null"> + nav_frequency = #{navFrequency,jdbcType=INTEGER}, + </if> + <if test="orgId != null"> + org_id = #{orgId,jdbcType=VARCHAR}, + </if> + <if test="raiseStarttime != null"> + raise_starttime = #{raiseStarttime,jdbcType=TIMESTAMP}, + </if> + <if test="raiseEndtime != null"> + raise_endtime = #{raiseEndtime,jdbcType=TIMESTAMP}, + </if> + <if test="proSubType != null"> + pro_sub_type = #{proSubType,jdbcType=INTEGER}, + </if> + <if test="proAbstract != null"> + pro_abstract = #{proAbstract,jdbcType=LONGVARCHAR}, + </if> + <if test="proInfoDesc != null"> + pro_info_desc = #{proInfoDesc,jdbcType=LONGVARCHAR}, + </if> </trim> </insert> </mapper> \ No newline at end of file -- 2.18.1