修改编辑逻辑,修改题目查询逻辑

master
xiaoCJ 5 months ago
parent 18db2791f3
commit c60826d9c1

@ -145,9 +145,10 @@ public class TopicController {
@ApiParam("普通题库/金融智能/银行从业") @RequestParam String outLine, @ApiParam("普通题库/金融智能/银行从业") @RequestParam String outLine,
@ApiParam("理论知识/专业能力公共基础/个人理财/风险管理/公司信贷/个人贷款") @RequestParam(required = false) String subClass, @ApiParam("理论知识/专业能力公共基础/个人理财/风险管理/公司信贷/个人贷款") @RequestParam(required = false) String subClass,
@RequestParam(required = false) String content, @RequestParam(required = false) String content,
@RequestParam(required = false) String schoolId) { @RequestParam(required = false) String schoolId,
@RequestParam String chapterId) {
PageHelper.startPage(index, size); PageHelper.startPage(index, size);
List<ObjectiveQuestionWithBLOBs> list = objectiveQuestionMapper.getObjectiveByType(type, outLine, subClass, content,schoolId); List<ObjectiveQuestionWithBLOBs> list = objectiveQuestionMapper.getObjectiveByType(type, outLine, subClass, content,schoolId,chapterId);
PageInfo pageInfo = new PageInfo(list); PageInfo pageInfo = new PageInfo(list);
return new ResultEntity<PageInfo<ObjectiveQuestionWithBLOBs>>(pageInfo); return new ResultEntity<PageInfo<ObjectiveQuestionWithBLOBs>>(pageInfo);
} }

@ -47,7 +47,8 @@ public interface ObjectiveQuestionMapper {
@Param("outLine") String outLine, @Param("outLine") String outLine,
@Param("subClass") String subClass, @Param("subClass") String subClass,
@Param("content") String content, @Param("content") String content,
@Param("schoolId") String schoolId); @Param("schoolId") String schoolId,
@Param("chapterId") String chapterId);
int batchDelete(@Param("list") List<String> objectiveQuestionId); int batchDelete(@Param("list") List<String> objectiveQuestionId);

@ -166,7 +166,7 @@ public class CaseServiceImpl implements CaseService {
caseCashFlow.setCaseCashFlowId(IdUtil.randomUUID()); caseCashFlow.setCaseCashFlowId(IdUtil.randomUUID());
caseCashFlowMapper.insert(caseCashFlow); caseCashFlowMapper.insert(caseCashFlow);
} else { } else {
caseCashFlowMapper.updateByPrimaryKeySelective(caseCashFlow); caseCashFlowMapper.updateByPrimaryKey(caseCashFlow);
} }
} }
@ -181,7 +181,7 @@ public class CaseServiceImpl implements CaseService {
caseCashPlan.setCaseCashPlanId(IdUtil.randomUUID()); caseCashPlan.setCaseCashPlanId(IdUtil.randomUUID());
caseCashPlanMapper.insert(caseCashPlan); caseCashPlanMapper.insert(caseCashPlan);
} else { } else {
caseCashPlanMapper.updateByPrimaryKeySelective(caseCashPlan); caseCashPlanMapper.updateByPrimaryKeyWithBLOBs(caseCashPlan);
} }
} }
@ -195,7 +195,7 @@ public class CaseServiceImpl implements CaseService {
caseConsumptionPlan.setCaseConsumptionPlanId(IdUtil.randomUUID()); caseConsumptionPlan.setCaseConsumptionPlanId(IdUtil.randomUUID());
caseConsumptionPlanMapper.insert(caseConsumptionPlan); caseConsumptionPlanMapper.insert(caseConsumptionPlan);
} else { } else {
caseConsumptionPlanMapper.updateByPrimaryKeySelective(caseConsumptionPlan); caseConsumptionPlanMapper.updateByPrimaryKeyWithBLOBs(caseConsumptionPlan);
} }
} }
@ -209,7 +209,7 @@ public class CaseServiceImpl implements CaseService {
caseDistributionOfProperty.setCaseDistributionOfPropertyId(IdUtil.randomUUID()); caseDistributionOfProperty.setCaseDistributionOfPropertyId(IdUtil.randomUUID());
caseDistributionOfPropertyMapper.insert(caseDistributionOfProperty); caseDistributionOfPropertyMapper.insert(caseDistributionOfProperty);
} else { } else {
caseDistributionOfPropertyMapper.updateByPrimaryKeySelective(caseDistributionOfProperty); caseDistributionOfPropertyMapper.updateByPrimaryKeyWithBLOBs(caseDistributionOfProperty);
} }
} }
@ -223,7 +223,7 @@ public class CaseServiceImpl implements CaseService {
caseFinanceLiability.setCaseFinanceLiabilityId(IdUtil.randomUUID()); caseFinanceLiability.setCaseFinanceLiabilityId(IdUtil.randomUUID());
caseFinanceLiabilityMapper.insert(caseFinanceLiability); caseFinanceLiabilityMapper.insert(caseFinanceLiability);
} else { } else {
caseFinanceLiabilityMapper.updateByPrimaryKeySelective(caseFinanceLiability); caseFinanceLiabilityMapper.updateByPrimaryKey(caseFinanceLiability);
} }
} }
@ -237,7 +237,7 @@ public class CaseServiceImpl implements CaseService {
caseFinancialRatios.setCaseid(caseId); caseFinancialRatios.setCaseid(caseId);
caseFinancialRatiosMapper.insert(caseFinancialRatios); caseFinancialRatiosMapper.insert(caseFinancialRatios);
} else { } else {
caseFinancialRatiosMapper.updateByPrimaryKeySelective(caseFinancialRatios); caseFinancialRatiosMapper.updateByPrimaryKeyWithBLOBs(caseFinancialRatios);
} }
} }
@ -251,7 +251,7 @@ public class CaseServiceImpl implements CaseService {
caseHeritage.setCaseid(caseId); caseHeritage.setCaseid(caseId);
caseHeritageMapper.insert(caseHeritage); caseHeritageMapper.insert(caseHeritage);
} else { } else {
caseHeritageMapper.updateByPrimaryKeySelective(caseHeritage); caseHeritageMapper.updateByPrimaryKeyWithBLOBs(caseHeritage);
} }
} }
@ -265,7 +265,7 @@ public class CaseServiceImpl implements CaseService {
caseIncomeAndExpenses.setCaseid(caseId); caseIncomeAndExpenses.setCaseid(caseId);
caseIncomeAndExpensesMapper.insert(caseIncomeAndExpenses); caseIncomeAndExpensesMapper.insert(caseIncomeAndExpenses);
} else { } else {
caseIncomeAndExpensesMapper.updateByPrimaryKeySelective(caseIncomeAndExpenses); caseIncomeAndExpensesMapper.updateByPrimaryKey(caseIncomeAndExpenses);
} }
} }
@ -279,7 +279,7 @@ public class CaseServiceImpl implements CaseService {
caseInvestmentPlan.setCaseId(caseId); caseInvestmentPlan.setCaseId(caseId);
investmentPlanMapper.insert(caseInvestmentPlan); investmentPlanMapper.insert(caseInvestmentPlan);
} else { } else {
investmentPlanMapper.updateByPrimaryKeySelective(caseInvestmentPlan); investmentPlanMapper.updateByPrimaryKeyWithBLOBs(caseInvestmentPlan);
} }
} }
@ -293,7 +293,7 @@ public class CaseServiceImpl implements CaseService {
caseInsurancePlan.setCaseid(caseId); caseInsurancePlan.setCaseid(caseId);
caseInsurancePlanMapper.insert(caseInsurancePlan); caseInsurancePlanMapper.insert(caseInsurancePlan);
} else { } else {
caseInsurancePlanMapper.updateByPrimaryKeySelective(caseInsurancePlan); caseInsurancePlanMapper.updateByPrimaryKeyWithBLOBs(caseInsurancePlan);
} }
} }
@ -307,7 +307,7 @@ public class CaseServiceImpl implements CaseService {
caseLifeEducationPlan.setCaseid(caseId); caseLifeEducationPlan.setCaseid(caseId);
caseLifeEducationPlanMapper.insert(caseLifeEducationPlan); caseLifeEducationPlanMapper.insert(caseLifeEducationPlan);
} else { } else {
caseLifeEducationPlanMapper.updateByPrimaryKeySelective(caseLifeEducationPlan); caseLifeEducationPlanMapper.updateByPrimaryKeyWithBLOBs(caseLifeEducationPlan);
} }
} }
@ -321,7 +321,7 @@ public class CaseServiceImpl implements CaseService {
caseRetirementPlan.setCaseid(caseId); caseRetirementPlan.setCaseid(caseId);
caseRetirementPlanMapper.insert(caseRetirementPlan); caseRetirementPlanMapper.insert(caseRetirementPlan);
} else { } else {
caseRetirementPlanMapper.updateByPrimaryKeySelective(caseRetirementPlan); caseRetirementPlanMapper.updateByPrimaryKeyWithBLOBs(caseRetirementPlan);
} }
} }
@ -336,7 +336,7 @@ public class CaseServiceImpl implements CaseService {
caseRiskIndex.setCaseid(caseId); caseRiskIndex.setCaseid(caseId);
caseRiskIndexMapper.insert(caseRiskIndex); caseRiskIndexMapper.insert(caseRiskIndex);
} else { } else {
caseRiskIndexMapper.updateByPrimaryKeySelective(caseRiskIndex); caseRiskIndexMapper.updateByPrimaryKey(caseRiskIndex);
} }
} }
@ -350,7 +350,7 @@ public class CaseServiceImpl implements CaseService {
caseStartAnUndertakingPlan.setCaseid(caseId); caseStartAnUndertakingPlan.setCaseid(caseId);
caseStartAnUndertakingPlanMapper.insert(caseStartAnUndertakingPlan); caseStartAnUndertakingPlanMapper.insert(caseStartAnUndertakingPlan);
} else { } else {
caseStartAnUndertakingPlanMapper.updateByPrimaryKeySelective(caseStartAnUndertakingPlan); caseStartAnUndertakingPlanMapper.updateByPrimaryKeyWithBLOBs(caseStartAnUndertakingPlan);
} }
} }
@ -364,7 +364,7 @@ public class CaseServiceImpl implements CaseService {
caseTaxPlan.setCaseid(caseId); caseTaxPlan.setCaseid(caseId);
caseTaxPlanMapper.insert(caseTaxPlan); caseTaxPlanMapper.insert(caseTaxPlan);
} else { } else {
caseTaxPlanMapper.updateByPrimaryKeySelective(caseTaxPlan); caseTaxPlanMapper.updateByPrimaryKeyWithBLOBs(caseTaxPlan);
} }
} }

@ -466,8 +466,9 @@
<select id="getObjectiveByType" resultMap="ResultMapWithBLOBs"> <select id="getObjectiveByType" resultMap="ResultMapWithBLOBs">
select * from objective_question select * from objective_question
<where> <where>
chapter_id = #{chapterId}
<if test="type !=null"> <if test="type !=null">
type = #{type} and type = #{type}
</if> </if>
<if test="content !=null and content !=''"> <if test="content !=null and content !=''">
and content like CONCAT ('%', #{content},'%') and content like CONCAT ('%', #{content},'%')

Loading…
Cancel
Save