From 6b6b5c23ec5c21cd585baf4aea4f251a088e2e86 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Mon, 4 Dec 2023 17:09:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA=E6=97=B6?= =?UTF-8?q?=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95=E8=B5=84?= =?UTF-8?q?=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FoundProjectController.java | 2 +- .../controller/FundraisingController.java | 5 +- .../InvestmentReportController.java | 100 ++ .../ProfitManagementController.java | 6 +- .../controller/ProjectDueDiligence.java | 2 +- .../controller/TopicController.java | 3 +- .../controller/tea/ClassScoreController.java | 2 +- .../tea/TeaTopicManageController.java | 12 +- .../fund_investment/entity/ExitTime.java | 131 +++ .../entity/ExitTimeExample.java | 890 ++++++++++++++++++ .../entity/ProfitManagement.java | 24 +- .../entity/ProfitManagementExample.java | 130 --- .../entity/TrainingReport.java | 5 + .../mapper/ExitTimeMapper.java | 32 + .../mapper/ProfitManagementMapper.java | 4 +- .../fund_investment/mapper/TopicsMapper.java | 4 + .../service/InvestmentReportService.java | 19 + .../InvestmentReportServiceImpl.java | 109 +++ .../tea/TeaTopicManageServiceImpl.java | 51 +- src/main/resources/generatorConfig.xml | 7 +- src/main/resources/mappers/ExitTimeMapper.xml | 306 ++++++ .../mappers/ProfitManagementMapper.xml | 42 +- src/main/resources/mappers/TopicsMapper.xml | 864 +++++++++-------- 23 files changed, 2104 insertions(+), 646 deletions(-) create mode 100644 src/main/java/com/sztzjy/fund_investment/controller/InvestmentReportController.java create mode 100644 src/main/java/com/sztzjy/fund_investment/entity/ExitTime.java create mode 100644 src/main/java/com/sztzjy/fund_investment/entity/ExitTimeExample.java create mode 100644 src/main/java/com/sztzjy/fund_investment/mapper/ExitTimeMapper.java create mode 100644 src/main/java/com/sztzjy/fund_investment/service/InvestmentReportService.java create mode 100644 src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InvestmentReportServiceImpl.java create mode 100644 src/main/resources/mappers/ExitTimeMapper.xml diff --git a/src/main/java/com/sztzjy/fund_investment/controller/FoundProjectController.java b/src/main/java/com/sztzjy/fund_investment/controller/FoundProjectController.java index 77412d8..2ee1435 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/FoundProjectController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/FoundProjectController.java @@ -24,7 +24,7 @@ import java.nio.file.Paths; @RestController -@RequestMapping("/foundProjectController") +@RequestMapping("/stu/foundProjectController") @Api(tags = "学生端--寻找项目") public class FoundProjectController { @Autowired diff --git a/src/main/java/com/sztzjy/fund_investment/controller/FundraisingController.java b/src/main/java/com/sztzjy/fund_investment/controller/FundraisingController.java index 0fcac87..d37c06c 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/FundraisingController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/FundraisingController.java @@ -1,6 +1,5 @@ package com.sztzjy.fund_investment.controller; -import com.sztzjy.fund_investment.annotation.AnonymousAccess; import com.sztzjy.fund_investment.entity.Fundraising; import com.sztzjy.fund_investment.mapper.FundraisingMapper; import com.sztzjy.fund_investment.service.ISysFundraisingService; @@ -19,7 +18,7 @@ import java.math.BigDecimal; import java.util.UUID; @RestController -@RequestMapping("/fundraisingController") +@RequestMapping("/stu/fundraisingController") @Api(tags = "学生端--资金募资") public class FundraisingController { @Autowired @@ -27,7 +26,6 @@ public class FundraisingController { @Autowired FundraisingMapper fundraisingMapper; - @AnonymousAccess @GetMapping("getFundraising") @ApiOperation("资金募资回显") public ResultEntity getFundraising(@ApiParam("流程id") @RequestParam String flowId) { @@ -35,7 +33,6 @@ public class FundraisingController { return new ResultEntity(HttpStatus.OK,"资金募资回显成功",fundraising); } - @AnonymousAccess @GetMapping("insertFundraising") @ApiOperation("新增基金募资") public ResultEntity insertFundraising(@ApiParam("流程id") @RequestParam String flowId, diff --git a/src/main/java/com/sztzjy/fund_investment/controller/InvestmentReportController.java b/src/main/java/com/sztzjy/fund_investment/controller/InvestmentReportController.java new file mode 100644 index 0000000..179d5cc --- /dev/null +++ b/src/main/java/com/sztzjy/fund_investment/controller/InvestmentReportController.java @@ -0,0 +1,100 @@ +package com.sztzjy.fund_investment.controller; + +import com.sztzjy.fund_investment.annotation.AnonymousAccess; +import com.sztzjy.fund_investment.entity.ExitTime; +import com.sztzjy.fund_investment.entity.ProfitManagement; +import com.sztzjy.fund_investment.entity.ProfitManagementExample; +import com.sztzjy.fund_investment.entity.TrainingReport; +import com.sztzjy.fund_investment.mapper.ExitTimeMapper; +import com.sztzjy.fund_investment.mapper.ProfitManagementMapper; +import com.sztzjy.fund_investment.service.InvestmentReportService; +import com.sztzjy.fund_investment.util.ResultEntity; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.*; + + +@RestController +@RequestMapping("/stu/report") +@Api(tags = "学生端--投资报告") +public class InvestmentReportController { + @Autowired + private InvestmentReportService investmentReportService; + @Autowired + private ExitTimeMapper exitTimeMapper; + @Autowired + ProfitManagementMapper profitManagementMapper; + + @AnonymousAccess + @GetMapping("getProjectPoolList") + @ApiOperation("股权投资收益率") + public ResultEntity> getFundraising(@RequestParam String flowId) { + ProfitManagementExample profitManagementExample = new ProfitManagementExample(); + profitManagementExample.createCriteria().andFlowIdEqualTo(flowId); + profitManagementExample.setOrderByClause("market_time ASC"); + List profitManagementList = profitManagementMapper.selectByExample(profitManagementExample); + Map map = new LinkedHashMap<>(); + for (ProfitManagement profitManagement : profitManagementList) { + if (profitManagement.getFundEarnings() != null && profitManagement.getFundEarnings().compareTo(BigDecimal.ZERO) != 0 + && profitManagement.getInvestmentAmount() != null && profitManagement.getInvestmentAmount().compareTo(BigDecimal.ZERO) != 0) { + BigDecimal fundEarnings = profitManagement.getFundEarnings(); // 基金收益 + BigDecimal investmentAmount = profitManagement.getInvestmentAmount(); // 投资金额 + + // 基金收益/投资金额=投资收益率 + BigDecimal bigDecimal = fundEarnings.divide(investmentAmount,6,RoundingMode.HALF_UP); + map.put(profitManagement.getMarketTime(), bigDecimal); + } + } + return new ResultEntity>(map); + } + + + @AnonymousAccess + @GetMapping("getExitData") + @ApiOperation("左侧退出时数据") + public ResultEntity getExitData(@RequestParam String flowId) { + return new ResultEntity(exitTimeMapper.selectByPrimaryKey(flowId)); + } + + + @AnonymousAccess + @PostMapping("commitExperience") + @ApiOperation("提交心得") + public ResultEntity commitExperience(@ApiParam("传三个ID、experience、uploadTime") @RequestBody TrainingReport trainingReport) { + return investmentReportService.commitExperience(trainingReport); + } + + @AnonymousAccess + @PostMapping("getExperience") + @ApiOperation("心得回显") + public ResultEntity getExperience(@RequestBody String flowId) { + List trainingReports = investmentReportService.getTrainingReports(flowId); + if (trainingReports.isEmpty()) { + return null; + } + TrainingReport trainingReport = trainingReports.get(0); + if (StringUtils.isBlank(trainingReport.getExperience())) { + return null; + } + return new ResultEntity<>(trainingReport.getExperience()); + } + + @AnonymousAccess + @PostMapping("uploadReport") + @ApiOperation("上传报告") + public ResultEntity uploadReport(@RequestParam("file") @RequestPart(name = "file") MultipartFile file, + @ApiParam("文件名称") @RequestParam String fileName, + @RequestParam String flowId, + @RequestParam String schoolId) { + return investmentReportService.uploadReport(file, fileName, flowId, schoolId); + } + +} diff --git a/src/main/java/com/sztzjy/fund_investment/controller/ProfitManagementController.java b/src/main/java/com/sztzjy/fund_investment/controller/ProfitManagementController.java index b00a83d..4a23810 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/ProfitManagementController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/ProfitManagementController.java @@ -20,7 +20,7 @@ import java.util.List; * @Date 2023/11/23 */ @RestController -@RequestMapping("/profitManagement") +@RequestMapping("/stu/profitManagement") @Api(tags = "学生端--收益管理相关接口") public class ProfitManagementController { @Autowired @@ -42,11 +42,12 @@ public class ProfitManagementController { @ApiOperation("退出时机弹窗") @AnonymousAccess - @GetMapping("/getExitTime") + @GetMapping("/getExitTime") //todo 基金收益 / 投资金额 = 退出时收益率 public ResultEntity getExitTime(@RequestParam String flowId) { return null; } + @ApiOperation("显示股票相关信息弹窗") @AnonymousAccess @GetMapping("/getStockInfo") @@ -54,6 +55,7 @@ public class ProfitManagementController { return null; } + @ApiOperation("判断市值和基金收益对错") @AnonymousAccess @GetMapping("/getRightMarketValueAndFundEarnings") diff --git a/src/main/java/com/sztzjy/fund_investment/controller/ProjectDueDiligence.java b/src/main/java/com/sztzjy/fund_investment/controller/ProjectDueDiligence.java index b49b7f9..b540f94 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/ProjectDueDiligence.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/ProjectDueDiligence.java @@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; @RestController -@RequestMapping("/projectDueDiligenceController") +@RequestMapping("/stu/projectDueDiligenceController") @Api(tags = "学生端--项目尽调") public class ProjectDueDiligence { @Autowired diff --git a/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java index 5740bbb..0b391cc 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java @@ -21,12 +21,13 @@ import java.math.BigDecimal; import java.util.Date; import java.util.List; + /** * @Author xcj * @Date 2023/11/14 */ @RestController -@RequestMapping("/topics") +@RequestMapping("/stu/topics") @Api(tags = "学生端--答题视频相关接口") public class TopicController { @Autowired diff --git a/src/main/java/com/sztzjy/fund_investment/controller/tea/ClassScoreController.java b/src/main/java/com/sztzjy/fund_investment/controller/tea/ClassScoreController.java index 24d84f9..d5c8569 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/tea/ClassScoreController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/tea/ClassScoreController.java @@ -99,7 +99,7 @@ public class ClassScoreController { @AnonymousAccess @GetMapping("/getStuTrainingScore") - @ApiOperation("成绩详情/实训成绩/展示") + @ApiOperation("成绩详情&投资报告/实训成绩展示") public ResultEntity getStuTrainingScore(@ApiParam("页面返回的得分ID") @RequestParam String performanceScoreId) { return new ResultEntity<>(classScoreService.getStuTrainingScore(performanceScoreId)); } diff --git a/src/main/java/com/sztzjy/fund_investment/controller/tea/TeaTopicManageController.java b/src/main/java/com/sztzjy/fund_investment/controller/tea/TeaTopicManageController.java index 52b7064..a4a744f 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/tea/TeaTopicManageController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/tea/TeaTopicManageController.java @@ -12,6 +12,7 @@ import com.sztzjy.fund_investment.util.ResultEntity; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; @@ -34,9 +35,10 @@ public class TeaTopicManageController { @AnonymousAccess - @GetMapping("/insertTopics") + @PostMapping("/insertTopics") @ApiOperation("试题管理/新增试题") - public ResultEntity insertTopics(@ApiParam("topicId给字符串uuid,analysis,userAnswer,选项CDE允许为空,其他必填,source固定为【自增】,module值同导入功能模块") + public ResultEntity insertTopics(@ApiParam("topicId给字符串uuid,analysis,userAnswer,选项CDE允许为空,其他必填," + + "source固定为【自增】,module值同导入功能模块,判断答案为A/B,多选为A,B,C英文逗号隔开") @RequestBody TopicsWithBLOBs topics) { return teaTopicManageService.insertTopics(topics); } @@ -91,8 +93,8 @@ public class TeaTopicManageController { public ResultEntity deleteByTopicId(@ApiParam("展示接口中的id字段") @RequestParam String questionId, @ApiParam("回复内容") String content) { QuestionAnswerWithBLOBs questionAnswerWithBLOBs = questionAnswerMapper.selectByPrimaryKey(questionId); - if (questionAnswerWithBLOBs == null) { - return new ResultEntity(HttpStatus.INTERNAL_SERVER_ERROR, "数据不存在!"); + if (StringUtils.isBlank(content)){ + return new ResultEntity(HttpStatus.BAD_REQUEST, "请输入回复内容!"); } questionAnswerWithBLOBs.setReplyContent(content); questionAnswerMapper.updateByPrimaryKey(questionAnswerWithBLOBs); @@ -102,7 +104,7 @@ public class TeaTopicManageController { @AnonymousAccess @GetMapping("/getQuestionById") - @ApiOperation("互动答疑/回复问题") + @ApiOperation("互动答疑/获取单挑互动数据") public ResultEntity getQuestionById(@ApiParam("展示接口中的id字段") @RequestParam String questionId) { return new ResultEntity(questionAnswerMapper.selectByPrimaryKey(questionId)); } diff --git a/src/main/java/com/sztzjy/fund_investment/entity/ExitTime.java b/src/main/java/com/sztzjy/fund_investment/entity/ExitTime.java new file mode 100644 index 0000000..d7635db --- /dev/null +++ b/src/main/java/com/sztzjy/fund_investment/entity/ExitTime.java @@ -0,0 +1,131 @@ +package com.sztzjy.fund_investment.entity; + +import java.math.BigDecimal; + +import io.swagger.annotations.ApiModelProperty; +/** + * + * @author xcj + * exit_time + */ +public class ExitTime { + private String flowId; + + @ApiModelProperty("投资项目") + private String porjectName; + + @ApiModelProperty("投资金额") + private BigDecimal investmentAmount; + + @ApiModelProperty("持股比例") + private BigDecimal shareRatio; + + @ApiModelProperty("总股本") + private BigDecimal totalEquity; + + @ApiModelProperty("持股数量") + private BigDecimal shareCount; + + @ApiModelProperty("退出时市值") + private BigDecimal exitMarketValue; + + @ApiModelProperty("退出时收益率") + private BigDecimal exitYield; + + @ApiModelProperty("退出时基金收益") + private BigDecimal exitFundEarnings; + + @ApiModelProperty("退出时机") + private String exitTiming; + + @ApiModelProperty("退出股价") + private BigDecimal exitStockPrice; + + public String getFlowId() { + return flowId; + } + + public void setFlowId(String flowId) { + this.flowId = flowId == null ? null : flowId.trim(); + } + + public String getPorjectName() { + return porjectName; + } + + public void setPorjectName(String porjectName) { + this.porjectName = porjectName == null ? null : porjectName.trim(); + } + + public BigDecimal getInvestmentAmount() { + return investmentAmount; + } + + public void setInvestmentAmount(BigDecimal investmentAmount) { + this.investmentAmount = investmentAmount; + } + + public BigDecimal getShareRatio() { + return shareRatio; + } + + public void setShareRatio(BigDecimal shareRatio) { + this.shareRatio = shareRatio; + } + + public BigDecimal getTotalEquity() { + return totalEquity; + } + + public void setTotalEquity(BigDecimal totalEquity) { + this.totalEquity = totalEquity; + } + + public BigDecimal getShareCount() { + return shareCount; + } + + public void setShareCount(BigDecimal shareCount) { + this.shareCount = shareCount; + } + + public BigDecimal getExitMarketValue() { + return exitMarketValue; + } + + public void setExitMarketValue(BigDecimal exitMarketValue) { + this.exitMarketValue = exitMarketValue; + } + + public BigDecimal getExitYield() { + return exitYield; + } + + public void setExitYield(BigDecimal exitYield) { + this.exitYield = exitYield; + } + + public BigDecimal getExitFundEarnings() { + return exitFundEarnings; + } + + public void setExitFundEarnings(BigDecimal exitFundEarnings) { + this.exitFundEarnings = exitFundEarnings; + } + + public String getExitTiming() { + return exitTiming; + } + + public void setExitTiming(String exitTiming) { + this.exitTiming = exitTiming == null ? null : exitTiming.trim(); + } + + public BigDecimal getExitStockPrice() { + return exitStockPrice; + } + + public void setExitStockPrice(BigDecimal exitStockPrice) { + this.exitStockPrice = exitStockPrice; + } +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/fund_investment/entity/ExitTimeExample.java b/src/main/java/com/sztzjy/fund_investment/entity/ExitTimeExample.java new file mode 100644 index 0000000..7f6432a --- /dev/null +++ b/src/main/java/com/sztzjy/fund_investment/entity/ExitTimeExample.java @@ -0,0 +1,890 @@ +package com.sztzjy.fund_investment.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +public class ExitTimeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ExitTimeExample() { + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList<>(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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)); + } + + public Criteria andFlowIdIsNull() { + addCriterion("flow_id is null"); + return (Criteria) this; + } + + public Criteria andFlowIdIsNotNull() { + addCriterion("flow_id is not null"); + return (Criteria) this; + } + + public Criteria andFlowIdEqualTo(String value) { + addCriterion("flow_id =", value, "flowId"); + return (Criteria) this; + } + + public Criteria andFlowIdNotEqualTo(String value) { + addCriterion("flow_id <>", value, "flowId"); + return (Criteria) this; + } + + public Criteria andFlowIdGreaterThan(String value) { + addCriterion("flow_id >", value, "flowId"); + return (Criteria) this; + } + + public Criteria andFlowIdGreaterThanOrEqualTo(String value) { + addCriterion("flow_id >=", value, "flowId"); + return (Criteria) this; + } + + public Criteria andFlowIdLessThan(String value) { + addCriterion("flow_id <", value, "flowId"); + return (Criteria) this; + } + + public Criteria andFlowIdLessThanOrEqualTo(String value) { + addCriterion("flow_id <=", value, "flowId"); + return (Criteria) this; + } + + public Criteria andFlowIdLike(String value) { + addCriterion("flow_id like", value, "flowId"); + return (Criteria) this; + } + + public Criteria andFlowIdNotLike(String value) { + addCriterion("flow_id not like", value, "flowId"); + return (Criteria) this; + } + + public Criteria andFlowIdIn(List values) { + addCriterion("flow_id in", values, "flowId"); + return (Criteria) this; + } + + public Criteria andFlowIdNotIn(List values) { + addCriterion("flow_id not in", values, "flowId"); + return (Criteria) this; + } + + public Criteria andFlowIdBetween(String value1, String value2) { + addCriterion("flow_id between", value1, value2, "flowId"); + return (Criteria) this; + } + + public Criteria andFlowIdNotBetween(String value1, String value2) { + addCriterion("flow_id not between", value1, value2, "flowId"); + return (Criteria) this; + } + + public Criteria andPorjectNameIsNull() { + addCriterion("porject_name is null"); + return (Criteria) this; + } + + public Criteria andPorjectNameIsNotNull() { + addCriterion("porject_name is not null"); + return (Criteria) this; + } + + public Criteria andPorjectNameEqualTo(String value) { + addCriterion("porject_name =", value, "porjectName"); + return (Criteria) this; + } + + public Criteria andPorjectNameNotEqualTo(String value) { + addCriterion("porject_name <>", value, "porjectName"); + return (Criteria) this; + } + + public Criteria andPorjectNameGreaterThan(String value) { + addCriterion("porject_name >", value, "porjectName"); + return (Criteria) this; + } + + public Criteria andPorjectNameGreaterThanOrEqualTo(String value) { + addCriterion("porject_name >=", value, "porjectName"); + return (Criteria) this; + } + + public Criteria andPorjectNameLessThan(String value) { + addCriterion("porject_name <", value, "porjectName"); + return (Criteria) this; + } + + public Criteria andPorjectNameLessThanOrEqualTo(String value) { + addCriterion("porject_name <=", value, "porjectName"); + return (Criteria) this; + } + + public Criteria andPorjectNameLike(String value) { + addCriterion("porject_name like", value, "porjectName"); + return (Criteria) this; + } + + public Criteria andPorjectNameNotLike(String value) { + addCriterion("porject_name not like", value, "porjectName"); + return (Criteria) this; + } + + public Criteria andPorjectNameIn(List values) { + addCriterion("porject_name in", values, "porjectName"); + return (Criteria) this; + } + + public Criteria andPorjectNameNotIn(List values) { + addCriterion("porject_name not in", values, "porjectName"); + return (Criteria) this; + } + + public Criteria andPorjectNameBetween(String value1, String value2) { + addCriterion("porject_name between", value1, value2, "porjectName"); + return (Criteria) this; + } + + public Criteria andPorjectNameNotBetween(String value1, String value2) { + addCriterion("porject_name not between", value1, value2, "porjectName"); + return (Criteria) this; + } + + public Criteria andInvestmentAmountIsNull() { + addCriterion("investment_amount is null"); + return (Criteria) this; + } + + public Criteria andInvestmentAmountIsNotNull() { + addCriterion("investment_amount is not null"); + return (Criteria) this; + } + + public Criteria andInvestmentAmountEqualTo(BigDecimal value) { + addCriterion("investment_amount =", value, "investmentAmount"); + return (Criteria) this; + } + + public Criteria andInvestmentAmountNotEqualTo(BigDecimal value) { + addCriterion("investment_amount <>", value, "investmentAmount"); + return (Criteria) this; + } + + public Criteria andInvestmentAmountGreaterThan(BigDecimal value) { + addCriterion("investment_amount >", value, "investmentAmount"); + return (Criteria) this; + } + + public Criteria andInvestmentAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("investment_amount >=", value, "investmentAmount"); + return (Criteria) this; + } + + public Criteria andInvestmentAmountLessThan(BigDecimal value) { + addCriterion("investment_amount <", value, "investmentAmount"); + return (Criteria) this; + } + + public Criteria andInvestmentAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("investment_amount <=", value, "investmentAmount"); + return (Criteria) this; + } + + public Criteria andInvestmentAmountIn(List values) { + addCriterion("investment_amount in", values, "investmentAmount"); + return (Criteria) this; + } + + public Criteria andInvestmentAmountNotIn(List values) { + addCriterion("investment_amount not in", values, "investmentAmount"); + return (Criteria) this; + } + + public Criteria andInvestmentAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("investment_amount between", value1, value2, "investmentAmount"); + return (Criteria) this; + } + + public Criteria andInvestmentAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("investment_amount not between", value1, value2, "investmentAmount"); + return (Criteria) this; + } + + public Criteria andShareRatioIsNull() { + addCriterion("share_ratio is null"); + return (Criteria) this; + } + + public Criteria andShareRatioIsNotNull() { + addCriterion("share_ratio is not null"); + return (Criteria) this; + } + + public Criteria andShareRatioEqualTo(BigDecimal value) { + addCriterion("share_ratio =", value, "shareRatio"); + return (Criteria) this; + } + + public Criteria andShareRatioNotEqualTo(BigDecimal value) { + addCriterion("share_ratio <>", value, "shareRatio"); + return (Criteria) this; + } + + public Criteria andShareRatioGreaterThan(BigDecimal value) { + addCriterion("share_ratio >", value, "shareRatio"); + return (Criteria) this; + } + + public Criteria andShareRatioGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("share_ratio >=", value, "shareRatio"); + return (Criteria) this; + } + + public Criteria andShareRatioLessThan(BigDecimal value) { + addCriterion("share_ratio <", value, "shareRatio"); + return (Criteria) this; + } + + public Criteria andShareRatioLessThanOrEqualTo(BigDecimal value) { + addCriterion("share_ratio <=", value, "shareRatio"); + return (Criteria) this; + } + + public Criteria andShareRatioIn(List values) { + addCriterion("share_ratio in", values, "shareRatio"); + return (Criteria) this; + } + + public Criteria andShareRatioNotIn(List values) { + addCriterion("share_ratio not in", values, "shareRatio"); + return (Criteria) this; + } + + public Criteria andShareRatioBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("share_ratio between", value1, value2, "shareRatio"); + return (Criteria) this; + } + + public Criteria andShareRatioNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("share_ratio not between", value1, value2, "shareRatio"); + return (Criteria) this; + } + + public Criteria andTotalEquityIsNull() { + addCriterion("total_equity is null"); + return (Criteria) this; + } + + public Criteria andTotalEquityIsNotNull() { + addCriterion("total_equity is not null"); + return (Criteria) this; + } + + public Criteria andTotalEquityEqualTo(BigDecimal value) { + addCriterion("total_equity =", value, "totalEquity"); + return (Criteria) this; + } + + public Criteria andTotalEquityNotEqualTo(BigDecimal value) { + addCriterion("total_equity <>", value, "totalEquity"); + return (Criteria) this; + } + + public Criteria andTotalEquityGreaterThan(BigDecimal value) { + addCriterion("total_equity >", value, "totalEquity"); + return (Criteria) this; + } + + public Criteria andTotalEquityGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("total_equity >=", value, "totalEquity"); + return (Criteria) this; + } + + public Criteria andTotalEquityLessThan(BigDecimal value) { + addCriterion("total_equity <", value, "totalEquity"); + return (Criteria) this; + } + + public Criteria andTotalEquityLessThanOrEqualTo(BigDecimal value) { + addCriterion("total_equity <=", value, "totalEquity"); + return (Criteria) this; + } + + public Criteria andTotalEquityIn(List values) { + addCriterion("total_equity in", values, "totalEquity"); + return (Criteria) this; + } + + public Criteria andTotalEquityNotIn(List values) { + addCriterion("total_equity not in", values, "totalEquity"); + return (Criteria) this; + } + + public Criteria andTotalEquityBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("total_equity between", value1, value2, "totalEquity"); + return (Criteria) this; + } + + public Criteria andTotalEquityNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("total_equity not between", value1, value2, "totalEquity"); + return (Criteria) this; + } + + public Criteria andShareCountIsNull() { + addCriterion("share_count is null"); + return (Criteria) this; + } + + public Criteria andShareCountIsNotNull() { + addCriterion("share_count is not null"); + return (Criteria) this; + } + + public Criteria andShareCountEqualTo(BigDecimal value) { + addCriterion("share_count =", value, "shareCount"); + return (Criteria) this; + } + + public Criteria andShareCountNotEqualTo(BigDecimal value) { + addCriterion("share_count <>", value, "shareCount"); + return (Criteria) this; + } + + public Criteria andShareCountGreaterThan(BigDecimal value) { + addCriterion("share_count >", value, "shareCount"); + return (Criteria) this; + } + + public Criteria andShareCountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("share_count >=", value, "shareCount"); + return (Criteria) this; + } + + public Criteria andShareCountLessThan(BigDecimal value) { + addCriterion("share_count <", value, "shareCount"); + return (Criteria) this; + } + + public Criteria andShareCountLessThanOrEqualTo(BigDecimal value) { + addCriterion("share_count <=", value, "shareCount"); + return (Criteria) this; + } + + public Criteria andShareCountIn(List values) { + addCriterion("share_count in", values, "shareCount"); + return (Criteria) this; + } + + public Criteria andShareCountNotIn(List values) { + addCriterion("share_count not in", values, "shareCount"); + return (Criteria) this; + } + + public Criteria andShareCountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("share_count between", value1, value2, "shareCount"); + return (Criteria) this; + } + + public Criteria andShareCountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("share_count not between", value1, value2, "shareCount"); + return (Criteria) this; + } + + public Criteria andExitMarketValueIsNull() { + addCriterion("exit_market_value is null"); + return (Criteria) this; + } + + public Criteria andExitMarketValueIsNotNull() { + addCriterion("exit_market_value is not null"); + return (Criteria) this; + } + + public Criteria andExitMarketValueEqualTo(BigDecimal value) { + addCriterion("exit_market_value =", value, "exitMarketValue"); + return (Criteria) this; + } + + public Criteria andExitMarketValueNotEqualTo(BigDecimal value) { + addCriterion("exit_market_value <>", value, "exitMarketValue"); + return (Criteria) this; + } + + public Criteria andExitMarketValueGreaterThan(BigDecimal value) { + addCriterion("exit_market_value >", value, "exitMarketValue"); + return (Criteria) this; + } + + public Criteria andExitMarketValueGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("exit_market_value >=", value, "exitMarketValue"); + return (Criteria) this; + } + + public Criteria andExitMarketValueLessThan(BigDecimal value) { + addCriterion("exit_market_value <", value, "exitMarketValue"); + return (Criteria) this; + } + + public Criteria andExitMarketValueLessThanOrEqualTo(BigDecimal value) { + addCriterion("exit_market_value <=", value, "exitMarketValue"); + return (Criteria) this; + } + + public Criteria andExitMarketValueIn(List values) { + addCriterion("exit_market_value in", values, "exitMarketValue"); + return (Criteria) this; + } + + public Criteria andExitMarketValueNotIn(List values) { + addCriterion("exit_market_value not in", values, "exitMarketValue"); + return (Criteria) this; + } + + public Criteria andExitMarketValueBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("exit_market_value between", value1, value2, "exitMarketValue"); + return (Criteria) this; + } + + public Criteria andExitMarketValueNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("exit_market_value not between", value1, value2, "exitMarketValue"); + return (Criteria) this; + } + + public Criteria andExitYieldIsNull() { + addCriterion("exit_yield is null"); + return (Criteria) this; + } + + public Criteria andExitYieldIsNotNull() { + addCriterion("exit_yield is not null"); + return (Criteria) this; + } + + public Criteria andExitYieldEqualTo(BigDecimal value) { + addCriterion("exit_yield =", value, "exitYield"); + return (Criteria) this; + } + + public Criteria andExitYieldNotEqualTo(BigDecimal value) { + addCriterion("exit_yield <>", value, "exitYield"); + return (Criteria) this; + } + + public Criteria andExitYieldGreaterThan(BigDecimal value) { + addCriterion("exit_yield >", value, "exitYield"); + return (Criteria) this; + } + + public Criteria andExitYieldGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("exit_yield >=", value, "exitYield"); + return (Criteria) this; + } + + public Criteria andExitYieldLessThan(BigDecimal value) { + addCriterion("exit_yield <", value, "exitYield"); + return (Criteria) this; + } + + public Criteria andExitYieldLessThanOrEqualTo(BigDecimal value) { + addCriterion("exit_yield <=", value, "exitYield"); + return (Criteria) this; + } + + public Criteria andExitYieldIn(List values) { + addCriterion("exit_yield in", values, "exitYield"); + return (Criteria) this; + } + + public Criteria andExitYieldNotIn(List values) { + addCriterion("exit_yield not in", values, "exitYield"); + return (Criteria) this; + } + + public Criteria andExitYieldBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("exit_yield between", value1, value2, "exitYield"); + return (Criteria) this; + } + + public Criteria andExitYieldNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("exit_yield not between", value1, value2, "exitYield"); + return (Criteria) this; + } + + public Criteria andExitFundEarningsIsNull() { + addCriterion("exit_fund_earnings is null"); + return (Criteria) this; + } + + public Criteria andExitFundEarningsIsNotNull() { + addCriterion("exit_fund_earnings is not null"); + return (Criteria) this; + } + + public Criteria andExitFundEarningsEqualTo(BigDecimal value) { + addCriterion("exit_fund_earnings =", value, "exitFundEarnings"); + return (Criteria) this; + } + + public Criteria andExitFundEarningsNotEqualTo(BigDecimal value) { + addCriterion("exit_fund_earnings <>", value, "exitFundEarnings"); + return (Criteria) this; + } + + public Criteria andExitFundEarningsGreaterThan(BigDecimal value) { + addCriterion("exit_fund_earnings >", value, "exitFundEarnings"); + return (Criteria) this; + } + + public Criteria andExitFundEarningsGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("exit_fund_earnings >=", value, "exitFundEarnings"); + return (Criteria) this; + } + + public Criteria andExitFundEarningsLessThan(BigDecimal value) { + addCriterion("exit_fund_earnings <", value, "exitFundEarnings"); + return (Criteria) this; + } + + public Criteria andExitFundEarningsLessThanOrEqualTo(BigDecimal value) { + addCriterion("exit_fund_earnings <=", value, "exitFundEarnings"); + return (Criteria) this; + } + + public Criteria andExitFundEarningsIn(List values) { + addCriterion("exit_fund_earnings in", values, "exitFundEarnings"); + return (Criteria) this; + } + + public Criteria andExitFundEarningsNotIn(List values) { + addCriterion("exit_fund_earnings not in", values, "exitFundEarnings"); + return (Criteria) this; + } + + public Criteria andExitFundEarningsBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("exit_fund_earnings between", value1, value2, "exitFundEarnings"); + return (Criteria) this; + } + + public Criteria andExitFundEarningsNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("exit_fund_earnings not between", value1, value2, "exitFundEarnings"); + return (Criteria) this; + } + + public Criteria andExitTimingIsNull() { + addCriterion("exit_timing is null"); + return (Criteria) this; + } + + public Criteria andExitTimingIsNotNull() { + addCriterion("exit_timing is not null"); + return (Criteria) this; + } + + public Criteria andExitTimingEqualTo(String value) { + addCriterion("exit_timing =", value, "exitTiming"); + return (Criteria) this; + } + + public Criteria andExitTimingNotEqualTo(String value) { + addCriterion("exit_timing <>", value, "exitTiming"); + return (Criteria) this; + } + + public Criteria andExitTimingGreaterThan(String value) { + addCriterion("exit_timing >", value, "exitTiming"); + return (Criteria) this; + } + + public Criteria andExitTimingGreaterThanOrEqualTo(String value) { + addCriterion("exit_timing >=", value, "exitTiming"); + return (Criteria) this; + } + + public Criteria andExitTimingLessThan(String value) { + addCriterion("exit_timing <", value, "exitTiming"); + return (Criteria) this; + } + + public Criteria andExitTimingLessThanOrEqualTo(String value) { + addCriterion("exit_timing <=", value, "exitTiming"); + return (Criteria) this; + } + + public Criteria andExitTimingLike(String value) { + addCriterion("exit_timing like", value, "exitTiming"); + return (Criteria) this; + } + + public Criteria andExitTimingNotLike(String value) { + addCriterion("exit_timing not like", value, "exitTiming"); + return (Criteria) this; + } + + public Criteria andExitTimingIn(List values) { + addCriterion("exit_timing in", values, "exitTiming"); + return (Criteria) this; + } + + public Criteria andExitTimingNotIn(List values) { + addCriterion("exit_timing not in", values, "exitTiming"); + return (Criteria) this; + } + + public Criteria andExitTimingBetween(String value1, String value2) { + addCriterion("exit_timing between", value1, value2, "exitTiming"); + return (Criteria) this; + } + + public Criteria andExitTimingNotBetween(String value1, String value2) { + addCriterion("exit_timing not between", value1, value2, "exitTiming"); + return (Criteria) this; + } + + public Criteria andExitStockPriceIsNull() { + addCriterion("exit_stock_price is null"); + return (Criteria) this; + } + + public Criteria andExitStockPriceIsNotNull() { + addCriterion("exit_stock_price is not null"); + return (Criteria) this; + } + + public Criteria andExitStockPriceEqualTo(BigDecimal value) { + addCriterion("exit_stock_price =", value, "exitStockPrice"); + return (Criteria) this; + } + + public Criteria andExitStockPriceNotEqualTo(BigDecimal value) { + addCriterion("exit_stock_price <>", value, "exitStockPrice"); + return (Criteria) this; + } + + public Criteria andExitStockPriceGreaterThan(BigDecimal value) { + addCriterion("exit_stock_price >", value, "exitStockPrice"); + return (Criteria) this; + } + + public Criteria andExitStockPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("exit_stock_price >=", value, "exitStockPrice"); + return (Criteria) this; + } + + public Criteria andExitStockPriceLessThan(BigDecimal value) { + addCriterion("exit_stock_price <", value, "exitStockPrice"); + return (Criteria) this; + } + + public Criteria andExitStockPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("exit_stock_price <=", value, "exitStockPrice"); + return (Criteria) this; + } + + public Criteria andExitStockPriceIn(List values) { + addCriterion("exit_stock_price in", values, "exitStockPrice"); + return (Criteria) this; + } + + public Criteria andExitStockPriceNotIn(List values) { + addCriterion("exit_stock_price not in", values, "exitStockPrice"); + return (Criteria) this; + } + + public Criteria andExitStockPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("exit_stock_price between", value1, value2, "exitStockPrice"); + return (Criteria) this; + } + + public Criteria andExitStockPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("exit_stock_price not between", value1, value2, "exitStockPrice"); + 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 diff --git a/src/main/java/com/sztzjy/fund_investment/entity/ProfitManagement.java b/src/main/java/com/sztzjy/fund_investment/entity/ProfitManagement.java index b9d3312..c7a3a4a 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/ProfitManagement.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/ProfitManagement.java @@ -27,7 +27,7 @@ public class ProfitManagement { @ApiModelProperty("持股数量") private BigDecimal shareCount; - @ApiModelProperty("上市时间") + @ApiModelProperty("上市时间/数据库存的是以日为单位的数字/一个月为30") private Integer marketTime; @ApiModelProperty("股票价格") @@ -39,12 +39,6 @@ public class ProfitManagement { @ApiModelProperty("基金收益") private BigDecimal fundEarnings; - @ApiModelProperty("退出时机") - private String exitTiming; - - @ApiModelProperty("退出股价") - private BigDecimal exitStockPrice; - public String getId() { return id; } @@ -124,20 +118,4 @@ public class ProfitManagement { public void setFundEarnings(BigDecimal fundEarnings) { this.fundEarnings = fundEarnings; } - - public String getExitTiming() { - return exitTiming; - } - - public void setExitTiming(String exitTiming) { - this.exitTiming = exitTiming == null ? null : exitTiming.trim(); - } - - public BigDecimal getExitStockPrice() { - return exitStockPrice; - } - - public void setExitStockPrice(BigDecimal exitStockPrice) { - this.exitStockPrice = exitStockPrice; - } } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/fund_investment/entity/ProfitManagementExample.java b/src/main/java/com/sztzjy/fund_investment/entity/ProfitManagementExample.java index 1cdd975..bd142c8 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/ProfitManagementExample.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/ProfitManagementExample.java @@ -724,136 +724,6 @@ public class ProfitManagementExample { addCriterion("fund_earnings not between", value1, value2, "fundEarnings"); return (Criteria) this; } - - public Criteria andExitTimingIsNull() { - addCriterion("exit_timing is null"); - return (Criteria) this; - } - - public Criteria andExitTimingIsNotNull() { - addCriterion("exit_timing is not null"); - return (Criteria) this; - } - - public Criteria andExitTimingEqualTo(String value) { - addCriterion("exit_timing =", value, "exitTiming"); - return (Criteria) this; - } - - public Criteria andExitTimingNotEqualTo(String value) { - addCriterion("exit_timing <>", value, "exitTiming"); - return (Criteria) this; - } - - public Criteria andExitTimingGreaterThan(String value) { - addCriterion("exit_timing >", value, "exitTiming"); - return (Criteria) this; - } - - public Criteria andExitTimingGreaterThanOrEqualTo(String value) { - addCriterion("exit_timing >=", value, "exitTiming"); - return (Criteria) this; - } - - public Criteria andExitTimingLessThan(String value) { - addCriterion("exit_timing <", value, "exitTiming"); - return (Criteria) this; - } - - public Criteria andExitTimingLessThanOrEqualTo(String value) { - addCriterion("exit_timing <=", value, "exitTiming"); - return (Criteria) this; - } - - public Criteria andExitTimingLike(String value) { - addCriterion("exit_timing like", value, "exitTiming"); - return (Criteria) this; - } - - public Criteria andExitTimingNotLike(String value) { - addCriterion("exit_timing not like", value, "exitTiming"); - return (Criteria) this; - } - - public Criteria andExitTimingIn(List values) { - addCriterion("exit_timing in", values, "exitTiming"); - return (Criteria) this; - } - - public Criteria andExitTimingNotIn(List values) { - addCriterion("exit_timing not in", values, "exitTiming"); - return (Criteria) this; - } - - public Criteria andExitTimingBetween(String value1, String value2) { - addCriterion("exit_timing between", value1, value2, "exitTiming"); - return (Criteria) this; - } - - public Criteria andExitTimingNotBetween(String value1, String value2) { - addCriterion("exit_timing not between", value1, value2, "exitTiming"); - return (Criteria) this; - } - - public Criteria andExitStockPriceIsNull() { - addCriterion("exit_stock_price is null"); - return (Criteria) this; - } - - public Criteria andExitStockPriceIsNotNull() { - addCriterion("exit_stock_price is not null"); - return (Criteria) this; - } - - public Criteria andExitStockPriceEqualTo(BigDecimal value) { - addCriterion("exit_stock_price =", value, "exitStockPrice"); - return (Criteria) this; - } - - public Criteria andExitStockPriceNotEqualTo(BigDecimal value) { - addCriterion("exit_stock_price <>", value, "exitStockPrice"); - return (Criteria) this; - } - - public Criteria andExitStockPriceGreaterThan(BigDecimal value) { - addCriterion("exit_stock_price >", value, "exitStockPrice"); - return (Criteria) this; - } - - public Criteria andExitStockPriceGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("exit_stock_price >=", value, "exitStockPrice"); - return (Criteria) this; - } - - public Criteria andExitStockPriceLessThan(BigDecimal value) { - addCriterion("exit_stock_price <", value, "exitStockPrice"); - return (Criteria) this; - } - - public Criteria andExitStockPriceLessThanOrEqualTo(BigDecimal value) { - addCriterion("exit_stock_price <=", value, "exitStockPrice"); - return (Criteria) this; - } - - public Criteria andExitStockPriceIn(List values) { - addCriterion("exit_stock_price in", values, "exitStockPrice"); - return (Criteria) this; - } - - public Criteria andExitStockPriceNotIn(List values) { - addCriterion("exit_stock_price not in", values, "exitStockPrice"); - return (Criteria) this; - } - - public Criteria andExitStockPriceBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("exit_stock_price between", value1, value2, "exitStockPrice"); - return (Criteria) this; - } - - public Criteria andExitStockPriceNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("exit_stock_price not between", value1, value2, "exitStockPrice"); - return (Criteria) this; - } } public static class Criteria extends GeneratedCriteria { diff --git a/src/main/java/com/sztzjy/fund_investment/entity/TrainingReport.java b/src/main/java/com/sztzjy/fund_investment/entity/TrainingReport.java index 81ac897..b03cea0 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/TrainingReport.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/TrainingReport.java @@ -3,7 +3,10 @@ package com.sztzjy.fund_investment.entity; import java.math.BigDecimal; import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; +import org.springframework.format.annotation.DateTimeFormat; + /** * * @author xcj @@ -33,6 +36,8 @@ public class TrainingReport { @ApiModelProperty("心得分数") private BigDecimal experienceScore; + @DateTimeFormat(pattern = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @ApiModelProperty("上传时间") private Date uploadtime; diff --git a/src/main/java/com/sztzjy/fund_investment/mapper/ExitTimeMapper.java b/src/main/java/com/sztzjy/fund_investment/mapper/ExitTimeMapper.java new file mode 100644 index 0000000..a15e062 --- /dev/null +++ b/src/main/java/com/sztzjy/fund_investment/mapper/ExitTimeMapper.java @@ -0,0 +1,32 @@ +package com.sztzjy.fund_investment.mapper; + +import com.sztzjy.fund_investment.entity.ExitTime; +import com.sztzjy.fund_investment.entity.ExitTimeExample; +import java.util.List; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface ExitTimeMapper { + long countByExample(ExitTimeExample example); + + int deleteByExample(ExitTimeExample example); + + int deleteByPrimaryKey(String flowId); + + int insert(ExitTime record); + + int insertSelective(ExitTime record); + + List selectByExample(ExitTimeExample example); + + ExitTime selectByPrimaryKey(String flowId); + + int updateByExampleSelective(@Param("record") ExitTime record, @Param("example") ExitTimeExample example); + + int updateByExample(@Param("record") ExitTime record, @Param("example") ExitTimeExample example); + + int updateByPrimaryKeySelective(ExitTime record); + + int updateByPrimaryKey(ExitTime record); +} \ No newline at end of file diff --git a/src/main/java/com/sztzjy/fund_investment/mapper/ProfitManagementMapper.java b/src/main/java/com/sztzjy/fund_investment/mapper/ProfitManagementMapper.java index e1a8013..ca387f5 100644 --- a/src/main/java/com/sztzjy/fund_investment/mapper/ProfitManagementMapper.java +++ b/src/main/java/com/sztzjy/fund_investment/mapper/ProfitManagementMapper.java @@ -2,10 +2,10 @@ package com.sztzjy.fund_investment.mapper; import com.sztzjy.fund_investment.entity.ProfitManagement; import com.sztzjy.fund_investment.entity.ProfitManagementExample; +import java.util.List; + import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; - -import java.util.List; @Mapper public interface ProfitManagementMapper { long countByExample(ProfitManagementExample example); diff --git a/src/main/java/com/sztzjy/fund_investment/mapper/TopicsMapper.java b/src/main/java/com/sztzjy/fund_investment/mapper/TopicsMapper.java index 6a97993..e04699e 100644 --- a/src/main/java/com/sztzjy/fund_investment/mapper/TopicsMapper.java +++ b/src/main/java/com/sztzjy/fund_investment/mapper/TopicsMapper.java @@ -3,10 +3,12 @@ package com.sztzjy.fund_investment.mapper; import com.sztzjy.fund_investment.entity.Topics; import com.sztzjy.fund_investment.entity.TopicsExample; import com.sztzjy.fund_investment.entity.TopicsWithBLOBs; + import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; + @Mapper public interface TopicsMapper { long countByExample(TopicsExample example); @@ -38,4 +40,6 @@ public interface TopicsMapper { int updateByPrimaryKey(Topics record); void insertBatch(List list); + + List getTopicsByCondition(@Param("schoolId") String schoolId, @Param("module") String module, @Param("topicContent") String topicContent); } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/fund_investment/service/InvestmentReportService.java b/src/main/java/com/sztzjy/fund_investment/service/InvestmentReportService.java new file mode 100644 index 0000000..24eb249 --- /dev/null +++ b/src/main/java/com/sztzjy/fund_investment/service/InvestmentReportService.java @@ -0,0 +1,19 @@ +package com.sztzjy.fund_investment.service; + +import com.sztzjy.fund_investment.entity.TrainingReport; +import com.sztzjy.fund_investment.util.ResultEntity; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + * @Author xcj + * @Date 2023/12/4 + */ +public interface InvestmentReportService { + ResultEntity uploadReport(MultipartFile file, String fileName, String flowId, String schoolId); + + List getTrainingReports(String flowId); + + ResultEntity commitExperience(TrainingReport trainingReport); +} diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InvestmentReportServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InvestmentReportServiceImpl.java new file mode 100644 index 0000000..ec95c81 --- /dev/null +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InvestmentReportServiceImpl.java @@ -0,0 +1,109 @@ +package com.sztzjy.fund_investment.service.serviceImpl; + +import com.sztzjy.fund_investment.entity.TrainingReport; +import com.sztzjy.fund_investment.entity.TrainingReportExample; +import com.sztzjy.fund_investment.mapper.TrainingReportMapper; +import com.sztzjy.fund_investment.service.InvestmentReportService; +import com.sztzjy.fund_investment.util.ResultEntity; +import com.sztzjy.fund_investment.util.file.IFileUtil; +import org.apache.commons.lang3.StringUtils; +import org.apache.xmlbeans.impl.xb.xsdschema.Public; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import java.util.Date; +import java.util.List; +import java.util.UUID; + +/** + * @Author xcj + * @Date 2023/12/4 + */ +@Service +public class InvestmentReportServiceImpl implements InvestmentReportService { + @Autowired + private IFileUtil fileUtil; + @Autowired + TrainingReportMapper trainingReportMapper; + + + /**报告提交 + * @author xcj + * @Date 2023/12/4 + */ + @Override + public ResultEntity uploadReport(MultipartFile file, String fileName, String flowId, String schoolId) { + String filePath = fileUtil.upload(file); + String originalFilename = file.getOriginalFilename(); + String fileExtension = originalFilename.substring(originalFilename.lastIndexOf(".")).toLowerCase(); + if (!fileExtension.equals(".pdf") && !fileExtension.equals(".doc") && !fileExtension.equals(".docx")) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "文件必须为word或pdf!"); + } + List trainingReports = getTrainingReports(flowId); + + //只允许提交一次,判断是否只提交了心得没提交报告 + if (!trainingReports.isEmpty()) { + TrainingReport trainingReport = trainingReports.get(0); + if (StringUtils.isNotBlank(trainingReport.getReportName())) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "不允许重复提交!"); + } else { + trainingReport.setUrl(filePath); + trainingReport.setReportName(fileName); + trainingReport.setUploadtime(new Date()); + trainingReport.setStep("投资报告"); + trainingReportMapper.updateByPrimaryKey(trainingReport); + return new ResultEntity<>(HttpStatus.OK, "报告上传成功!"); + } + } else { //没上传报告没提交心得的情况 + TrainingReport trainingReport = new TrainingReport(); + trainingReport.setId(UUID.randomUUID().toString()); + trainingReport.setFlowId(flowId); + trainingReport.setSchoolId(schoolId); + trainingReport.setUrl(filePath); + trainingReport.setReportName(fileName); + trainingReport.setUploadtime(new Date()); + trainingReport.setStep("投资报告"); + trainingReportMapper.insert(trainingReport); + return new ResultEntity<>(HttpStatus.OK, "报告上传成功!"); + } + } + + + @Override + public List getTrainingReports(String flowId) { + TrainingReportExample trainingReportExample = new TrainingReportExample(); + trainingReportExample.createCriteria().andFlowIdEqualTo(flowId); + return trainingReportMapper.selectByExample(trainingReportExample); + } + + + /* 提交心得 + * @author xcj + * @Date 2023/12/4 + */ + @Override + public ResultEntity commitExperience(TrainingReport trainingReport) { + if (StringUtils.isBlank(trainingReport.getExperience())) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请先填写心得再提交!"); + } + if (StringUtils.isBlank(trainingReport.getId()) || StringUtils.isBlank(trainingReport.getFlowId()) || StringUtils.isBlank(trainingReport.getSchoolId())) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "提交失败!缺少所需的ID!"); + } + List trainingReports = getTrainingReports(trainingReport.getFlowId()); + if (!trainingReports.isEmpty()) { + TrainingReport dataTrainingReport = trainingReports.get(0); + if (StringUtils.isNotBlank(dataTrainingReport.getExperience())){ + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "不允许重复提交!"); + }else { //提交了报告没提交心得 + trainingReport.setExperience(trainingReport.getExperience()); + trainingReport.setUploadtime(new Date()); + trainingReportMapper.updateByPrimaryKey(trainingReport); + } + } else { //为空新增 + trainingReportMapper.insert(trainingReport); + } + return new ResultEntity<>(HttpStatus.OK, "提交成功!"); + } +} diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java index 05dc3fb..17c77db 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java @@ -1,6 +1,5 @@ package com.sztzjy.fund_investment.service.serviceImpl.tea; -import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.sztzjy.fund_investment.entity.*; import com.sztzjy.fund_investment.entity.dto.QuestionAnswerDto; @@ -18,6 +17,7 @@ import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; /** @@ -26,7 +26,6 @@ import java.util.List; */ @Service public class TeaTopicManageServiceImpl implements TeaTopicManageService { - @Autowired private TopicsMapper topicsMapper; @Autowired @@ -39,18 +38,37 @@ public class TeaTopicManageServiceImpl implements TeaTopicManageService { @Override public ResultEntity insertTopics(TopicsWithBLOBs topics) { - if (StringUtils.isNotBlank(topics.getTopicContent())) { + if (StringUtils.isBlank(topics.getTopicContent())) { return new ResultEntity<>(HttpStatus.BAD_REQUEST, "题干不能为空!"); } - if (StringUtils.isNotBlank(topics.getChoicesa()) || StringUtils.isNotBlank(topics.getChoicesb())) { + if (StringUtils.isBlank(topics.getChoicesa()) || StringUtils.isBlank(topics.getChoicesb().trim())) { return new ResultEntity<>(HttpStatus.BAD_REQUEST, "选项不能为空!"); } - if (StringUtils.isNotBlank(topics.getTopicType())) { + if (StringUtils.isBlank(topics.getTopicType())) { return new ResultEntity<>(HttpStatus.BAD_REQUEST, "题型不能为空!"); } - if (StringUtils.isNotBlank(topics.getAnswer())) { + if (StringUtils.isBlank(topics.getAnswer())) { return new ResultEntity<>(HttpStatus.BAD_REQUEST, "答案不能为空!"); } + if (topics.getTopicType().equals("判断题")) { + if (!topics.getAnswer().equals("A") && !topics.getAnswer().equals("B")) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "判断题答案必须为A或者B!"); + } + } + if (topics.getTopicType().equals("单选题")) { + if (!topics.getAnswer().matches("[ABCDE]")) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "单选题答案必须为ABCDE中的一个!"); + } + } + if (topics.getTopicType().equals("多选题")) { + if (!topics.getAnswer().matches("^[A-E](,[A-E]){1,}$")) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "多选题答案格式不正确!答案应为大写字母A到E,用英文逗号隔开,并至少选择两个选项。"); + } + List list = Arrays.asList(topics.getChoicesa(), topics.getChoicesb(), topics.getChoicesc()); + if (list.stream().anyMatch(StringUtils::isBlank)) { + return new ResultEntity<>(HttpStatus.BAD_REQUEST, "多选题最少需要A,B,C三个选项!"); + } + } if (topics.getScore() == null || topics.getScore() == 0) { return new ResultEntity<>(HttpStatus.BAD_REQUEST, "分值不能为空!"); } @@ -65,20 +83,15 @@ public class TeaTopicManageServiceImpl implements TeaTopicManageService { */ @Override public PageInfo getTopicsBySchoolId(Integer index, Integer size, String schoolId, String module, String topicContent) { - PageHelper.startPage(index, size); - TopicsExample topicsExample = new TopicsExample(); - TopicsExample.Criteria criteria = topicsExample.createCriteria(); - criteria.andSchoolIdEqualTo(schoolId).andModuleEqualTo(module); - if (!("").equals(topicContent) && topicContent != null) { - topicContent = "%" + topicContent + "%"; - criteria.andTopicIdEqualTo(topicContent); - } - List topicsWithBLOBs = topicsMapper.selectByExampleWithBLOBs(topicsExample); - return new PageInfo<>(topicsWithBLOBs); + List topics = topicsMapper.getTopicsByCondition(schoolId, module, topicContent); + PageInfo pageInfo = PageUtil.pageHelper(topics, index, size); + return pageInfo; } - /** 互动答疑查询展示 + /** + * 互动答疑查询展示 + * * @author xcj * @Date 2023/12/1 */ @@ -91,10 +104,10 @@ public class TeaTopicManageServiceImpl implements TeaTopicManageService { UserTableExample.Criteria criteria = userTableExample.createCriteria(); UserTableExample.Criteria or = userTableExample.createCriteria(); criteria.andSchoolIdEqualTo(schoolId); - if (StringUtils.isNotBlank(className)){ + if (StringUtils.isNotBlank(className)) { criteria.andClassNameEqualTo(className); } - if (StringUtils.isNotBlank(keyWord)){ + if (StringUtils.isNotBlank(keyWord)) { criteria.andStudentIdEqualTo(keyWord); or.andNameEqualTo(keyWord); } diff --git a/src/main/resources/generatorConfig.xml b/src/main/resources/generatorConfig.xml index 237e5bc..949468c 100644 --- a/src/main/resources/generatorConfig.xml +++ b/src/main/resources/generatorConfig.xml @@ -46,9 +46,10 @@ - - - +
+ + + diff --git a/src/main/resources/mappers/ExitTimeMapper.xml b/src/main/resources/mappers/ExitTimeMapper.xml new file mode 100644 index 0000000..97c275b --- /dev/null +++ b/src/main/resources/mappers/ExitTimeMapper.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + flow_id, porject_name, investment_amount, share_ratio, total_equity, share_count, + exit_market_value, exit_yield, exit_fund_earnings, exit_timing, exit_stock_price + + + + + delete from exit_time + where flow_id = #{flowId,jdbcType=VARCHAR} + + + delete from exit_time + + + + + + insert into exit_time (flow_id, porject_name, investment_amount, + share_ratio, total_equity, share_count, + exit_market_value, exit_yield, exit_fund_earnings, + exit_timing, exit_stock_price) + values (#{flowId,jdbcType=VARCHAR}, #{porjectName,jdbcType=VARCHAR}, #{investmentAmount,jdbcType=DECIMAL}, + #{shareRatio,jdbcType=DECIMAL}, #{totalEquity,jdbcType=DECIMAL}, #{shareCount,jdbcType=DECIMAL}, + #{exitMarketValue,jdbcType=DECIMAL}, #{exitYield,jdbcType=DECIMAL}, #{exitFundEarnings,jdbcType=DECIMAL}, + #{exitTiming,jdbcType=VARCHAR}, #{exitStockPrice,jdbcType=DECIMAL}) + + + insert into exit_time + + + flow_id, + + + porject_name, + + + investment_amount, + + + share_ratio, + + + total_equity, + + + share_count, + + + exit_market_value, + + + exit_yield, + + + exit_fund_earnings, + + + exit_timing, + + + exit_stock_price, + + + + + #{flowId,jdbcType=VARCHAR}, + + + #{porjectName,jdbcType=VARCHAR}, + + + #{investmentAmount,jdbcType=DECIMAL}, + + + #{shareRatio,jdbcType=DECIMAL}, + + + #{totalEquity,jdbcType=DECIMAL}, + + + #{shareCount,jdbcType=DECIMAL}, + + + #{exitMarketValue,jdbcType=DECIMAL}, + + + #{exitYield,jdbcType=DECIMAL}, + + + #{exitFundEarnings,jdbcType=DECIMAL}, + + + #{exitTiming,jdbcType=VARCHAR}, + + + #{exitStockPrice,jdbcType=DECIMAL}, + + + + + + update exit_time + + + flow_id = #{record.flowId,jdbcType=VARCHAR}, + + + porject_name = #{record.porjectName,jdbcType=VARCHAR}, + + + investment_amount = #{record.investmentAmount,jdbcType=DECIMAL}, + + + share_ratio = #{record.shareRatio,jdbcType=DECIMAL}, + + + total_equity = #{record.totalEquity,jdbcType=DECIMAL}, + + + share_count = #{record.shareCount,jdbcType=DECIMAL}, + + + exit_market_value = #{record.exitMarketValue,jdbcType=DECIMAL}, + + + exit_yield = #{record.exitYield,jdbcType=DECIMAL}, + + + exit_fund_earnings = #{record.exitFundEarnings,jdbcType=DECIMAL}, + + + exit_timing = #{record.exitTiming,jdbcType=VARCHAR}, + + + exit_stock_price = #{record.exitStockPrice,jdbcType=DECIMAL}, + + + + + + + + update exit_time + set flow_id = #{record.flowId,jdbcType=VARCHAR}, + porject_name = #{record.porjectName,jdbcType=VARCHAR}, + investment_amount = #{record.investmentAmount,jdbcType=DECIMAL}, + share_ratio = #{record.shareRatio,jdbcType=DECIMAL}, + total_equity = #{record.totalEquity,jdbcType=DECIMAL}, + share_count = #{record.shareCount,jdbcType=DECIMAL}, + exit_market_value = #{record.exitMarketValue,jdbcType=DECIMAL}, + exit_yield = #{record.exitYield,jdbcType=DECIMAL}, + exit_fund_earnings = #{record.exitFundEarnings,jdbcType=DECIMAL}, + exit_timing = #{record.exitTiming,jdbcType=VARCHAR}, + exit_stock_price = #{record.exitStockPrice,jdbcType=DECIMAL} + + + + + + update exit_time + + + porject_name = #{porjectName,jdbcType=VARCHAR}, + + + investment_amount = #{investmentAmount,jdbcType=DECIMAL}, + + + share_ratio = #{shareRatio,jdbcType=DECIMAL}, + + + total_equity = #{totalEquity,jdbcType=DECIMAL}, + + + share_count = #{shareCount,jdbcType=DECIMAL}, + + + exit_market_value = #{exitMarketValue,jdbcType=DECIMAL}, + + + exit_yield = #{exitYield,jdbcType=DECIMAL}, + + + exit_fund_earnings = #{exitFundEarnings,jdbcType=DECIMAL}, + + + exit_timing = #{exitTiming,jdbcType=VARCHAR}, + + + exit_stock_price = #{exitStockPrice,jdbcType=DECIMAL}, + + + where flow_id = #{flowId,jdbcType=VARCHAR} + + + update exit_time + set porject_name = #{porjectName,jdbcType=VARCHAR}, + investment_amount = #{investmentAmount,jdbcType=DECIMAL}, + share_ratio = #{shareRatio,jdbcType=DECIMAL}, + total_equity = #{totalEquity,jdbcType=DECIMAL}, + share_count = #{shareCount,jdbcType=DECIMAL}, + exit_market_value = #{exitMarketValue,jdbcType=DECIMAL}, + exit_yield = #{exitYield,jdbcType=DECIMAL}, + exit_fund_earnings = #{exitFundEarnings,jdbcType=DECIMAL}, + exit_timing = #{exitTiming,jdbcType=VARCHAR}, + exit_stock_price = #{exitStockPrice,jdbcType=DECIMAL} + where flow_id = #{flowId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/src/main/resources/mappers/ProfitManagementMapper.xml b/src/main/resources/mappers/ProfitManagementMapper.xml index 6ef44bd..416c986 100644 --- a/src/main/resources/mappers/ProfitManagementMapper.xml +++ b/src/main/resources/mappers/ProfitManagementMapper.xml @@ -12,8 +12,6 @@ - - @@ -75,7 +73,7 @@ id, flow_id, investment_amount, share_ratio, total_equity, share_count, market_time, - stock_price, market_value, fund_earnings, exit_timing, exit_stock_price + stock_price, market_value, fund_earnings @@ -237,12 +221,6 @@ fund_earnings = #{record.fundEarnings,jdbcType=DECIMAL}, - - exit_timing = #{record.exitTiming,jdbcType=VARCHAR}, - - - exit_stock_price = #{record.exitStockPrice,jdbcType=DECIMAL}, - @@ -259,9 +237,7 @@ market_time = #{record.marketTime,jdbcType=INTEGER}, stock_price = #{record.stockPrice,jdbcType=DECIMAL}, market_value = #{record.marketValue,jdbcType=DECIMAL}, - fund_earnings = #{record.fundEarnings,jdbcType=DECIMAL}, - exit_timing = #{record.exitTiming,jdbcType=VARCHAR}, - exit_stock_price = #{record.exitStockPrice,jdbcType=DECIMAL} + fund_earnings = #{record.fundEarnings,jdbcType=DECIMAL} @@ -296,12 +272,6 @@ fund_earnings = #{fundEarnings,jdbcType=DECIMAL}, - - exit_timing = #{exitTiming,jdbcType=VARCHAR}, - - - exit_stock_price = #{exitStockPrice,jdbcType=DECIMAL}, - where id = #{id,jdbcType=VARCHAR} @@ -315,9 +285,7 @@ market_time = #{marketTime,jdbcType=INTEGER}, stock_price = #{stockPrice,jdbcType=DECIMAL}, market_value = #{marketValue,jdbcType=DECIMAL}, - fund_earnings = #{fundEarnings,jdbcType=DECIMAL}, - exit_timing = #{exitTiming,jdbcType=VARCHAR}, - exit_stock_price = #{exitStockPrice,jdbcType=DECIMAL} + fund_earnings = #{fundEarnings,jdbcType=DECIMAL} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/src/main/resources/mappers/TopicsMapper.xml b/src/main/resources/mappers/TopicsMapper.xml index c6a1651..567aa6e 100644 --- a/src/main/resources/mappers/TopicsMapper.xml +++ b/src/main/resources/mappers/TopicsMapper.xml @@ -1,439 +1,469 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + - - - - - - - topic_id, choicesA, choicesB, choicesC, choicesD, choicesE, topic_type, source, module, + + + + topic_id + , choicesA, choicesB, choicesC, choicesD, choicesE, topic_type, source, module, answer, user_answer, score, school_id - - - topic_content, analysis - - - - - - delete from sys_topics - where topic_id = #{topicId,jdbcType=VARCHAR} - - - delete from sys_topics - - - - - - insert into sys_topics (topic_id, choicesA, choicesB, - choicesC, choicesD, choicesE, - topic_type, source, module, - answer, user_answer, score, - school_id, topic_content, analysis - ) - values (#{topicId,jdbcType=VARCHAR}, #{choicesa,jdbcType=VARCHAR}, #{choicesb,jdbcType=VARCHAR}, - #{choicesc,jdbcType=VARCHAR}, #{choicesd,jdbcType=VARCHAR}, #{choicese,jdbcType=VARCHAR}, - #{topicType,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{module,jdbcType=VARCHAR}, - #{answer,jdbcType=VARCHAR}, #{userAnswer,jdbcType=VARCHAR}, #{score,jdbcType=INTEGER}, - #{schoolId,jdbcType=VARCHAR}, #{topicContent,jdbcType=LONGVARCHAR}, #{analysis,jdbcType=LONGVARCHAR} - ) - - - insert into sys_topics - - - topic_id, - - - choicesA, - - - choicesB, - - - choicesC, - - - choicesD, - - - choicesE, - - - topic_type, - - - source, - - - module, - - - answer, - - - user_answer, - - - score, - - - school_id, - - - topic_content, - - - analysis, - - - - - #{topicId,jdbcType=VARCHAR}, - - - #{choicesa,jdbcType=VARCHAR}, - - - #{choicesb,jdbcType=VARCHAR}, - - - #{choicesc,jdbcType=VARCHAR}, - - - #{choicesd,jdbcType=VARCHAR}, - - - #{choicese,jdbcType=VARCHAR}, - - - #{topicType,jdbcType=VARCHAR}, - - - #{source,jdbcType=VARCHAR}, - - - #{module,jdbcType=VARCHAR}, - - - #{answer,jdbcType=VARCHAR}, - - - #{userAnswer,jdbcType=VARCHAR}, - - - #{score,jdbcType=INTEGER}, - - - #{schoolId,jdbcType=VARCHAR}, - - - #{topicContent,jdbcType=LONGVARCHAR}, - - - #{analysis,jdbcType=LONGVARCHAR}, - - - + + + topic_content + , analysis + + + + + + + + + + + + delete + from sys_topics + where topic_id = #{topicId,jdbcType=VARCHAR} + + + delete from sys_topics + + + + + + insert into sys_topics (topic_id, choicesA, choicesB, + choicesC, choicesD, choicesE, + topic_type, source, module, + answer, user_answer, score, + school_id, topic_content, analysis) + values (#{topicId,jdbcType=VARCHAR}, #{choicesa,jdbcType=VARCHAR}, #{choicesb,jdbcType=VARCHAR}, + #{choicesc,jdbcType=VARCHAR}, #{choicesd,jdbcType=VARCHAR}, #{choicese,jdbcType=VARCHAR}, + #{topicType,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, #{module,jdbcType=VARCHAR}, + #{answer,jdbcType=VARCHAR}, #{userAnswer,jdbcType=VARCHAR}, #{score,jdbcType=INTEGER}, + #{schoolId,jdbcType=VARCHAR}, #{topicContent,jdbcType=LONGVARCHAR}, #{analysis,jdbcType=LONGVARCHAR}) + + + insert into sys_topics + + + topic_id, + + + choicesA, + + + choicesB, + + + choicesC, + + + choicesD, + + + choicesE, + + + topic_type, + + + source, + + + module, + + + answer, + + + user_answer, + + + score, + + + school_id, + + + topic_content, + + + analysis, + + + + + #{topicId,jdbcType=VARCHAR}, + + + #{choicesa,jdbcType=VARCHAR}, + + + #{choicesb,jdbcType=VARCHAR}, + + + #{choicesc,jdbcType=VARCHAR}, + + + #{choicesd,jdbcType=VARCHAR}, + + + #{choicese,jdbcType=VARCHAR}, + + + #{topicType,jdbcType=VARCHAR}, + + + #{source,jdbcType=VARCHAR}, + + + #{module,jdbcType=VARCHAR}, + + + #{answer,jdbcType=VARCHAR}, + + + #{userAnswer,jdbcType=VARCHAR}, + + + #{score,jdbcType=INTEGER}, + + + #{schoolId,jdbcType=VARCHAR}, + + + #{topicContent,jdbcType=LONGVARCHAR}, + + + #{analysis,jdbcType=LONGVARCHAR}, + + + - - INSERT INTO sys_topics (topic_id, topic_content, choicesA, choicesB, choicesC, choicesD, choicesE, topic_type, source, module, answer, score, analysis, school_id) - VALUES - - (#{topic.topicId},#{topic.topicContent}, #{topic.choicesa}, #{topic.choicesb}, #{topic.choicesc}, - #{topic.choicesd}, #{topic.choicese}, #{topic.topicType}, #{topic.source}, - #{topic.module}, #{topic.answer}, #{topic.score}, #{topic.analysis}, #{topic.schoolId}) - - + + INSERT INTO sys_topics (topic_id, topic_content, choicesA, choicesB, choicesC, choicesD, choicesE, topic_type, + source, module, answer, score, analysis, school_id) + VALUES + + (#{topic.topicId},#{topic.topicContent}, #{topic.choicesa}, #{topic.choicesb}, #{topic.choicesc}, + #{topic.choicesd}, #{topic.choicese}, #{topic.topicType}, #{topic.source}, + #{topic.module}, #{topic.answer}, #{topic.score}, #{topic.analysis}, #{topic.schoolId}) + + - - - update sys_topics - - - topic_id = #{record.topicId,jdbcType=VARCHAR}, - - + + + update sys_topics + + + topic_id = #{record.topicId,jdbcType=VARCHAR}, + + + choicesA = #{record.choicesa,jdbcType=VARCHAR}, + + + choicesB = #{record.choicesb,jdbcType=VARCHAR}, + + + choicesC = #{record.choicesc,jdbcType=VARCHAR}, + + + choicesD = #{record.choicesd,jdbcType=VARCHAR}, + + + choicesE = #{record.choicese,jdbcType=VARCHAR}, + + + topic_type = #{record.topicType,jdbcType=VARCHAR}, + + + source = #{record.source,jdbcType=VARCHAR}, + + + module = #{record.module,jdbcType=VARCHAR}, + + + answer = #{record.answer,jdbcType=VARCHAR}, + + + user_answer = #{record.userAnswer,jdbcType=VARCHAR}, + + + score = #{record.score,jdbcType=INTEGER}, + + + school_id = #{record.schoolId,jdbcType=VARCHAR}, + + + topic_content = #{record.topicContent,jdbcType=LONGVARCHAR}, + + + analysis = #{record.analysis,jdbcType=LONGVARCHAR}, + + + + + + + + update sys_topics + set topic_id = #{record.topicId,jdbcType=VARCHAR}, choicesA = #{record.choicesa,jdbcType=VARCHAR}, - - choicesB = #{record.choicesb,jdbcType=VARCHAR}, - - choicesC = #{record.choicesc,jdbcType=VARCHAR}, - - choicesD = #{record.choicesd,jdbcType=VARCHAR}, - - choicesE = #{record.choicese,jdbcType=VARCHAR}, - - topic_type = #{record.topicType,jdbcType=VARCHAR}, - - source = #{record.source,jdbcType=VARCHAR}, - - module = #{record.module,jdbcType=VARCHAR}, - - answer = #{record.answer,jdbcType=VARCHAR}, - - user_answer = #{record.userAnswer,jdbcType=VARCHAR}, - - score = #{record.score,jdbcType=INTEGER}, - - school_id = #{record.schoolId,jdbcType=VARCHAR}, - - topic_content = #{record.topicContent,jdbcType=LONGVARCHAR}, - - - analysis = #{record.analysis,jdbcType=LONGVARCHAR}, - - - - - - - - update sys_topics - set topic_id = #{record.topicId,jdbcType=VARCHAR}, - choicesA = #{record.choicesa,jdbcType=VARCHAR}, - choicesB = #{record.choicesb,jdbcType=VARCHAR}, - choicesC = #{record.choicesc,jdbcType=VARCHAR}, - choicesD = #{record.choicesd,jdbcType=VARCHAR}, - choicesE = #{record.choicese,jdbcType=VARCHAR}, - topic_type = #{record.topicType,jdbcType=VARCHAR}, - source = #{record.source,jdbcType=VARCHAR}, - module = #{record.module,jdbcType=VARCHAR}, - answer = #{record.answer,jdbcType=VARCHAR}, - user_answer = #{record.userAnswer,jdbcType=VARCHAR}, - score = #{record.score,jdbcType=INTEGER}, - school_id = #{record.schoolId,jdbcType=VARCHAR}, - topic_content = #{record.topicContent,jdbcType=LONGVARCHAR}, - analysis = #{record.analysis,jdbcType=LONGVARCHAR} - - - - - - update sys_topics - set topic_id = #{record.topicId,jdbcType=VARCHAR}, - choicesA = #{record.choicesa,jdbcType=VARCHAR}, - choicesB = #{record.choicesb,jdbcType=VARCHAR}, - choicesC = #{record.choicesc,jdbcType=VARCHAR}, - choicesD = #{record.choicesd,jdbcType=VARCHAR}, - choicesE = #{record.choicese,jdbcType=VARCHAR}, - topic_type = #{record.topicType,jdbcType=VARCHAR}, - source = #{record.source,jdbcType=VARCHAR}, - module = #{record.module,jdbcType=VARCHAR}, - answer = #{record.answer,jdbcType=VARCHAR}, - user_answer = #{record.userAnswer,jdbcType=VARCHAR}, - score = #{record.score,jdbcType=INTEGER}, - school_id = #{record.schoolId,jdbcType=VARCHAR} - - - - - - update sys_topics - - - choicesA = #{choicesa,jdbcType=VARCHAR}, - - - choicesB = #{choicesb,jdbcType=VARCHAR}, - - - choicesC = #{choicesc,jdbcType=VARCHAR}, - - - choicesD = #{choicesd,jdbcType=VARCHAR}, - - - choicesE = #{choicese,jdbcType=VARCHAR}, - - - topic_type = #{topicType,jdbcType=VARCHAR}, - - - source = #{source,jdbcType=VARCHAR}, - - - module = #{module,jdbcType=VARCHAR}, - - - answer = #{answer,jdbcType=VARCHAR}, - - - user_answer = #{userAnswer,jdbcType=VARCHAR}, - - - score = #{score,jdbcType=INTEGER}, - - - school_id = #{schoolId,jdbcType=VARCHAR}, - - - topic_content = #{topicContent,jdbcType=LONGVARCHAR}, - - - analysis = #{analysis,jdbcType=LONGVARCHAR}, - - - where topic_id = #{topicId,jdbcType=VARCHAR} - - - update sys_topics - set choicesA = #{choicesa,jdbcType=VARCHAR}, - choicesB = #{choicesb,jdbcType=VARCHAR}, - choicesC = #{choicesc,jdbcType=VARCHAR}, - choicesD = #{choicesd,jdbcType=VARCHAR}, - choicesE = #{choicese,jdbcType=VARCHAR}, - topic_type = #{topicType,jdbcType=VARCHAR}, - source = #{source,jdbcType=VARCHAR}, - module = #{module,jdbcType=VARCHAR}, - answer = #{answer,jdbcType=VARCHAR}, - user_answer = #{userAnswer,jdbcType=VARCHAR}, - score = #{score,jdbcType=INTEGER}, - school_id = #{schoolId,jdbcType=VARCHAR}, - topic_content = #{topicContent,jdbcType=LONGVARCHAR}, - analysis = #{analysis,jdbcType=LONGVARCHAR} - where topic_id = #{topicId,jdbcType=VARCHAR} - - - update sys_topics - set choicesA = #{choicesa,jdbcType=VARCHAR}, - choicesB = #{choicesb,jdbcType=VARCHAR}, - choicesC = #{choicesc,jdbcType=VARCHAR}, - choicesD = #{choicesd,jdbcType=VARCHAR}, - choicesE = #{choicese,jdbcType=VARCHAR}, - topic_type = #{topicType,jdbcType=VARCHAR}, - source = #{source,jdbcType=VARCHAR}, - module = #{module,jdbcType=VARCHAR}, - answer = #{answer,jdbcType=VARCHAR}, - user_answer = #{userAnswer,jdbcType=VARCHAR}, - score = #{score,jdbcType=INTEGER}, - school_id = #{schoolId,jdbcType=VARCHAR} - where topic_id = #{topicId,jdbcType=VARCHAR} - + analysis = #{record.analysis,jdbcType=LONGVARCHAR} + + + + + + update sys_topics + set topic_id = #{record.topicId,jdbcType=VARCHAR}, + choicesA = #{record.choicesa,jdbcType=VARCHAR}, + choicesB = #{record.choicesb,jdbcType=VARCHAR}, + choicesC = #{record.choicesc,jdbcType=VARCHAR}, + choicesD = #{record.choicesd,jdbcType=VARCHAR}, + choicesE = #{record.choicese,jdbcType=VARCHAR}, + topic_type = #{record.topicType,jdbcType=VARCHAR}, + source = #{record.source,jdbcType=VARCHAR}, + module = #{record.module,jdbcType=VARCHAR}, + answer = #{record.answer,jdbcType=VARCHAR}, + user_answer = #{record.userAnswer,jdbcType=VARCHAR}, + score = #{record.score,jdbcType=INTEGER}, + school_id = #{record.schoolId,jdbcType=VARCHAR} + + + + + + update sys_topics + + + choicesA = #{choicesa,jdbcType=VARCHAR}, + + + choicesB = #{choicesb,jdbcType=VARCHAR}, + + + choicesC = #{choicesc,jdbcType=VARCHAR}, + + + choicesD = #{choicesd,jdbcType=VARCHAR}, + + + choicesE = #{choicese,jdbcType=VARCHAR}, + + + topic_type = #{topicType,jdbcType=VARCHAR}, + + + source = #{source,jdbcType=VARCHAR}, + + + module = #{module,jdbcType=VARCHAR}, + + + answer = #{answer,jdbcType=VARCHAR}, + + + user_answer = #{userAnswer,jdbcType=VARCHAR}, + + + score = #{score,jdbcType=INTEGER}, + + + school_id = #{schoolId,jdbcType=VARCHAR}, + + + topic_content = #{topicContent,jdbcType=LONGVARCHAR}, + + + analysis = #{analysis,jdbcType=LONGVARCHAR}, + + + where topic_id = #{topicId,jdbcType=VARCHAR} + + + update sys_topics + set choicesA = #{choicesa,jdbcType=VARCHAR}, + choicesB = #{choicesb,jdbcType=VARCHAR}, + choicesC = #{choicesc,jdbcType=VARCHAR}, + choicesD = #{choicesd,jdbcType=VARCHAR}, + choicesE = #{choicese,jdbcType=VARCHAR}, + topic_type = #{topicType,jdbcType=VARCHAR}, + source = #{source,jdbcType=VARCHAR}, + module = #{module,jdbcType=VARCHAR}, + answer = #{answer,jdbcType=VARCHAR}, + user_answer = #{userAnswer,jdbcType=VARCHAR}, + score = #{score,jdbcType=INTEGER}, + school_id = #{schoolId,jdbcType=VARCHAR}, + topic_content = #{topicContent,jdbcType=LONGVARCHAR}, + analysis = #{analysis,jdbcType=LONGVARCHAR} + where topic_id = #{topicId,jdbcType=VARCHAR} + + + update sys_topics + set choicesA = #{choicesa,jdbcType=VARCHAR}, + choicesB = #{choicesb,jdbcType=VARCHAR}, + choicesC = #{choicesc,jdbcType=VARCHAR}, + choicesD = #{choicesd,jdbcType=VARCHAR}, + choicesE = #{choicese,jdbcType=VARCHAR}, + topic_type = #{topicType,jdbcType=VARCHAR}, + source = #{source,jdbcType=VARCHAR}, + module = #{module,jdbcType=VARCHAR}, + answer = #{answer,jdbcType=VARCHAR}, + user_answer = #{userAnswer,jdbcType=VARCHAR}, + score = #{score,jdbcType=INTEGER}, + school_id = #{schoolId,jdbcType=VARCHAR} + where topic_id = #{topicId,jdbcType=VARCHAR} + \ No newline at end of file