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

master
xiaoCJ 5 months ago
parent 18db2791f3
commit c60826d9c1

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

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

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

@ -466,8 +466,9 @@
<select id="getObjectiveByType" resultMap="ResultMapWithBLOBs">
select * from objective_question
<where>
chapter_id = #{chapterId}
<if test="type !=null">
type = #{type}
and type = #{type}
</if>
<if test="content !=null and content !=''">
and content like CONCAT ('%', #{content},'%')
@ -478,9 +479,9 @@
<if test="subClass !=null and subClass !=''">
and subclass = #{subClass}
</if>
<if test="schoolId !=null and schoolId!=''">
and source in ('999999999',#{schoolId})
</if>
<if test="schoolId !=null and schoolId!=''">
and source in ('999999999',#{schoolId})
</if>
</where>
</select>
@ -509,7 +510,7 @@
</foreach>
</delete>
<!--批量导入时可能为空的字段必需添加jdbcType=-->
<!--批量导入时可能为空的字段必需添加jdbcType=-->
<insert id="insertBatch" parameterType="java.util.List">
insert into objective_question (objective_id, chapter_id, chapter_name,
source, type, score,content,

Loading…
Cancel
Save