修改案例相关功能

master
xiaoCJ 5 months ago
parent 84b4f72d33
commit 7ff5d6b917

@ -0,0 +1,29 @@
⠀⠀⠀⠰⢷⢿⠄
⠀⠀⠀⠀⠀⣼⣷⣄
⠀⠀⣤⣿⣇⣿⣿⣧⣿⡄
⢴⠾⠋⠀⠀⠻⣿⣷⣿⣿⡀
○ ⠀⢀⣿⣿⡿⢿⠈⣿
⠀⠀⠀⢠⣿⡿⠁⠀⡊⠀⠙
⠀⠀⠀⢿⣿⠀⠀⠹⣿
⠀⠀⠀⠀⠹⣷⡀⠀⣿⡄
⠀⠀⠀⠀⣀⣼⣿⠀⢈⣧.
⠀⠀⠰⢷⢿⠄
⠀⠀⠀⠀⠀⣼⣷⣄
⠀⠀⣤⣿⣇⣿⣿⣧⣿⡄
⢴⠾⠋⠀⠀⠻⣿⣷⣿⣿⡀
○ ⠀⢀⣿⣿⡿⢿⠈⣿
⠀⠀⠀⢠⣿⡿⠁⠀⡊⠀⠙
⠀⠀⠀⢿⣿⠀⠀⠹⣿
⠀⠀⠀⠀⠹⣷⡀⠀⣿⡄
⠀⠀⠀⠀⣀⣼⣿⠀⢈⣧.
⠀⠀⠰⢷⢿⠄
⠀⠀⠀⠀⠀⣼⣷⣄
⠀⠀⣤⣿⣇⣿⣿⣧⣿⡄
⢴⠾⠋⠀⠀⠻⣿⣷⣿⣿⡀
○ ⠀⢀⣿⣿⡿⢿⠈⣿
⠀⠀⠀⢠⣿⡿⠁⠀⡊⠀⠙
⠀⠀⠀⢿⣿⠀⠀⠹⣿
⠀⠀⠀⠀⠹⣷⡀⠀⣿⡄
⠀⠀⠀⠀⣀⣼⣿⠀⢈⣧.

@ -105,9 +105,9 @@ public class CaseController {
return new ResultEntity<>(typeList);
}
@AnonymousAccess
@PostMapping("/getExamPoint")
@ApiOperation("展示考核点信息/老师端/学生实验实训")
@AnonymousAccess
private ResultEntity<Object> getExamPoint(@RequestParam String caseID,
@ApiParam("老师端不传") @RequestParam(required = false) String userId,
@ApiParam("学生答案/题目答案") @RequestParam String isAnswer,
@ -119,7 +119,8 @@ public class CaseController {
@ApiOperation("展示单个案例客户信息")
@AnonymousAccess
private ResultEntity<CaseInfo> getCaseInfoById(@RequestParam String caseID) {
return new ResultEntity<CaseInfo>(caseInfoMapper.selectByPrimaryKey(caseID));
CaseInfo caseInfo = caseInfoMapper.selectByPrimaryKey(caseID);
return new ResultEntity<CaseInfo>(caseInfo);
}
@GetMapping("/getCaseListByAdmin")

@ -147,7 +147,7 @@ public class CaseServiceImpl implements CaseService {
public ResultEntity<HttpStatus> insertComprehensivePlanCase(StuCaseDto stuCaseDto) {
CaseInfo caseInfo = stuCaseDto.getCaseInfo();
//新增 综合规划表 和 客户案例信息表 包含修改
adminOrTeaInsert("master", caseInfo);
String caseId = adminOrTeaInsert("master", caseInfo);
//财务分析现金流量表
CaseCashFlow caseCashFlow = new CaseCashFlow();
@ -155,8 +155,8 @@ public class CaseServiceImpl implements CaseService {
caseCashFlow = stuCaseDto.getCaseCashFlow();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseCashFlow.getCaseCashFlowId())) {
caseCashFlow.setCaseid(IdUtil.randomUUID());
if (StringUtils.isBlank(caseCashFlow.getCaseid())) {
caseCashFlow.setCaseid(caseId);
caseCashFlow.setCaseCashFlowId(IdUtil.randomUUID());
caseCashFlowMapper.insert(caseCashFlow);
} else {
@ -169,8 +169,8 @@ public class CaseServiceImpl implements CaseService {
caseCashPlan = stuCaseDto.getCaseCashPlan();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseCashPlan.getCaseCashPlanId())) {
caseCashPlan.setCaseid(IdUtil.randomUUID());
if (StringUtils.isBlank(caseCashPlan.getCaseid())) {
caseCashPlan.setCaseid(caseId);
caseCashPlan.setCaseCashPlanId(IdUtil.randomUUID());
caseCashPlanMapper.insert(caseCashPlan);
} else {
@ -183,8 +183,8 @@ public class CaseServiceImpl implements CaseService {
caseConsumptionPlan = stuCaseDto.getCaseConsumptionPlan();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseConsumptionPlan.getCaseConsumptionPlanId())) {
caseConsumptionPlan.setCaseId(IdUtil.randomUUID());
if (StringUtils.isBlank(caseConsumptionPlan.getCaseId())) {
caseConsumptionPlan.setCaseId(caseId);
caseConsumptionPlan.setCaseConsumptionPlanId(IdUtil.randomUUID());
caseConsumptionPlanMapper.insert(caseConsumptionPlan);
} else {
@ -197,8 +197,8 @@ public class CaseServiceImpl implements CaseService {
caseDistributionOfProperty = stuCaseDto.getCaseDistributionOfProperty();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseDistributionOfProperty.getCaseDistributionOfPropertyId())) {
caseDistributionOfProperty.setCaseid(IdUtil.randomUUID());
if (StringUtils.isBlank(caseDistributionOfProperty.getCaseid())) {
caseDistributionOfProperty.setCaseid(caseId);
caseDistributionOfProperty.setCaseDistributionOfPropertyId(IdUtil.randomUUID());
caseDistributionOfPropertyMapper.insert(caseDistributionOfProperty);
} else {
@ -211,8 +211,8 @@ public class CaseServiceImpl implements CaseService {
caseFinanceLiability = stuCaseDto.getCaseFinanceLiability();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseFinanceLiability.getCaseFinanceLiabilityId())) {
caseFinanceLiability.setCaseId(IdUtil.randomUUID());
if (StringUtils.isBlank(caseFinanceLiability.getCaseId())) {
caseFinanceLiability.setCaseId(caseId);
caseFinanceLiability.setCaseFinanceLiabilityId(IdUtil.randomUUID());
caseFinanceLiabilityMapper.insert(caseFinanceLiability);
} else {
@ -225,9 +225,9 @@ public class CaseServiceImpl implements CaseService {
caseFinancialRatios = stuCaseDto.getCaseFinancialRatios();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseFinancialRatios.getCaseFinancialRatiosId())) {
if (StringUtils.isBlank(caseFinancialRatios.getCaseid())) {
caseFinancialRatios.setCaseFinancialRatiosId(IdUtil.randomUUID());
caseFinancialRatios.setCaseid(IdUtil.randomUUID());
caseFinancialRatios.setCaseid(caseId);
caseFinancialRatiosMapper.insert(caseFinancialRatios);
} else {
caseFinancialRatiosMapper.updateByPrimaryKeySelective(caseFinancialRatios);
@ -239,9 +239,9 @@ public class CaseServiceImpl implements CaseService {
caseHeritage = stuCaseDto.getCaseHeritage();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseHeritage.getCaseHeritageId())) {
if (StringUtils.isBlank(caseHeritage.getCaseid())) {
caseHeritage.setCaseHeritageId(IdUtil.randomUUID());
caseHeritage.setCaseid(IdUtil.randomUUID());
caseHeritage.setCaseid(caseId);
caseHeritageMapper.insert(caseHeritage);
} else {
caseHeritageMapper.updateByPrimaryKeySelective(caseHeritage);
@ -253,9 +253,9 @@ public class CaseServiceImpl implements CaseService {
caseIncomeAndExpenses = stuCaseDto.getCaseIncomeAndExpenses();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseIncomeAndExpenses.getCaseIncomeAndExpensesId())) {
if (StringUtils.isBlank(caseIncomeAndExpenses.getCaseid())) {
caseIncomeAndExpenses.setCaseIncomeAndExpensesId(IdUtil.randomUUID());
caseIncomeAndExpenses.setCaseid(IdUtil.randomUUID());
caseIncomeAndExpenses.setCaseid(caseId);
caseIncomeAndExpensesMapper.insert(caseIncomeAndExpenses);
} else {
caseIncomeAndExpensesMapper.updateByPrimaryKeySelective(caseIncomeAndExpenses);
@ -267,9 +267,9 @@ public class CaseServiceImpl implements CaseService {
caseInvestmentPlan = stuCaseDto.getCaseInvestmentPlan();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseInvestmentPlan.getCaseInvestmentPlanId())) {
if (StringUtils.isBlank(caseInvestmentPlan.getCaseId())) {
caseInvestmentPlan.setCaseInvestmentPlanId(IdUtil.randomUUID());
caseInvestmentPlan.setCaseId(IdUtil.randomUUID());
caseInvestmentPlan.setCaseId(caseId);
investmentPlanMapper.insert(caseInvestmentPlan);
} else {
investmentPlanMapper.updateByPrimaryKeySelective(caseInvestmentPlan);
@ -281,9 +281,9 @@ public class CaseServiceImpl implements CaseService {
caseInsurancePlan = stuCaseDto.getCaseInsurancePlan();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseInsurancePlan.getCaseInsurancePlanId())) {
if (StringUtils.isBlank(caseInsurancePlan.getCaseid())) {
caseInsurancePlan.setCaseInsurancePlanId(IdUtil.randomUUID());
caseInsurancePlan.setCaseid(IdUtil.randomUUID());
caseInsurancePlan.setCaseid(caseId);
caseInsurancePlanMapper.insert(caseInsurancePlan);
} else {
caseInsurancePlanMapper.updateByPrimaryKeySelective(caseInsurancePlan);
@ -295,9 +295,9 @@ public class CaseServiceImpl implements CaseService {
caseLifeEducationPlan = stuCaseDto.getCaseLifeEducationPlan();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseLifeEducationPlan.getCaseLifeEducationPlanId())) {
if (StringUtils.isBlank(caseLifeEducationPlan.getCaseid())) {
caseLifeEducationPlan.setCaseLifeEducationPlanId(IdUtil.randomUUID());
caseLifeEducationPlan.setCaseid(IdUtil.randomUUID());
caseLifeEducationPlan.setCaseid(caseId);
caseLifeEducationPlanMapper.insert(caseLifeEducationPlan);
} else {
caseLifeEducationPlanMapper.updateByPrimaryKeySelective(caseLifeEducationPlan);
@ -309,9 +309,9 @@ public class CaseServiceImpl implements CaseService {
caseRetirementPlan = stuCaseDto.getCaseRetirementPlan();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseRetirementPlan.getCaseRetirementPlanId())) {
if (StringUtils.isBlank(caseRetirementPlan.getCaseid())) {
caseRetirementPlan.setCaseRetirementPlanId(IdUtil.randomUUID());
caseRetirementPlan.setCaseid(IdUtil.randomUUID());
caseRetirementPlan.setCaseid(caseId);
caseRetirementPlanMapper.insert(caseRetirementPlan);
} else {
caseRetirementPlanMapper.updateByPrimaryKeySelective(caseRetirementPlan);
@ -323,9 +323,9 @@ public class CaseServiceImpl implements CaseService {
caseRiskIndex = stuCaseDto.getCaseRiskIndex();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseRiskIndex.getCaseRiskIndexId())) {
if (StringUtils.isBlank(caseRiskIndex.getCaseid())) {
caseRiskIndex.setCaseRiskIndexId(IdUtil.randomUUID());
caseRiskIndex.setCaseid(IdUtil.randomUUID());
caseRiskIndex.setCaseid(caseId);
caseRiskIndexMapper.insert(caseRiskIndex);
} else {
caseRiskIndexMapper.updateByPrimaryKeySelective(caseRiskIndex);
@ -337,9 +337,9 @@ public class CaseServiceImpl implements CaseService {
caseStartAnUndertakingPlan = stuCaseDto.getCaseStartAnUndertakingPlan();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseStartAnUndertakingPlan.getCaseStartAnUndertakingPlanId())) {
if (StringUtils.isBlank(caseStartAnUndertakingPlan.getCaseid())) {
caseStartAnUndertakingPlan.setCaseStartAnUndertakingPlanId(IdUtil.randomUUID());
caseStartAnUndertakingPlan.setCaseid(IdUtil.randomUUID());
caseStartAnUndertakingPlan.setCaseid(caseId);
caseStartAnUndertakingPlanMapper.insert(caseStartAnUndertakingPlan);
} else {
caseStartAnUndertakingPlanMapper.updateByPrimaryKeySelective(caseStartAnUndertakingPlan);
@ -351,9 +351,9 @@ public class CaseServiceImpl implements CaseService {
caseTaxPlan = stuCaseDto.getCaseTaxPlan();
}
//ID为空新增不为空编辑
if (StringUtils.isBlank(caseTaxPlan.getCaseTaxPlanId())) {
if (StringUtils.isBlank(caseTaxPlan.getCaseid())) {
caseTaxPlan.setCaseTaxPlanId(IdUtil.randomUUID());
caseTaxPlan.setCaseid(IdUtil.randomUUID());
caseTaxPlan.setCaseid(caseId);
caseTaxPlanMapper.insert(caseTaxPlan);
} else {
caseTaxPlanMapper.updateByPrimaryKeySelective(caseTaxPlan);
@ -381,7 +381,7 @@ public class CaseServiceImpl implements CaseService {
return addCorrelationTable(type, json, gson, operator);
}
private void adminOrTeaInsert(String operator, CaseInfo newCase) {
private String adminOrTeaInsert(String operator, CaseInfo newCase) {
//老师或者管理员才操作 新增或编辑案例时
if (operator.equals("master")) {
CaseInfoExample example = new CaseInfoExample();
@ -403,6 +403,7 @@ public class CaseServiceImpl implements CaseService {
comCaseMapper.insert(comCase);
}
insertSynthesisPlanClient(newCase);
return newCase.getCaseid();
} else {
//修改案例信息表
caseInfoMapper.updateByPrimaryKeySelective(newCase);
@ -414,8 +415,10 @@ public class CaseServiceImpl implements CaseService {
synthesisPlanClient.setManageMoneyMattersType(newCase.getManageMoneyMattersType());
synthesisPlanClient.setAge(newCase.getAge());
synthesisPlanClientMapper.updateByPrimaryKeySelective(synthesisPlanClient);
return newCase.getCaseid();
}
}
return null;
}
@ -2215,6 +2218,10 @@ public class CaseServiceImpl implements CaseService {
CaseDistributionOfPropertyFamilyDto dto = new CaseDistributionOfPropertyFamilyDto();
BeanUtils.copyProperties(caseDistributionOfPropertyWithBLOB, dto);
if (isAnswer.equals("题目答案")) {
return dto;
}
CaseDistributionOfPropertyFamilyRecordsExample propertyFamilyRecordsExample = new CaseDistributionOfPropertyFamilyRecordsExample();
propertyFamilyRecordsExample.createCriteria().andCaseDistributionOfPropertyIdEqualTo(caseDistributionOfPropertyWithBLOB.getCaseDistributionOfPropertyId())
.andUserIdEqualTo(userId);
@ -2328,8 +2335,7 @@ public class CaseServiceImpl implements CaseService {
return caseCashPlans.get(0);
}
private CaseFinancialRatiosWithBLOBs getCaseFinancialRatiosWithBLOBs(String caseID, String userId, String
isAnswer) {
private CaseFinancialRatiosWithBLOBs getCaseFinancialRatiosWithBLOBs(String caseID, String userId, String isAnswer) {
CaseFinancialRatiosExample example = new CaseFinancialRatiosExample();
CaseFinancialRatiosExample.Criteria criteria = example.createCriteria().andCaseidEqualTo(caseID).andIsAnswerEqualTo(isAnswer);
if (StringUtils.isBlank(userId)) {

@ -1,327 +1,306 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.money_management.mapper.CaseDistributionOfPropertyFamilyRecordsMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecords">
<id column="case_distribution_of_property_family_records_id" jdbcType="VARCHAR"
property="caseDistributionOfPropertyFamilyRecordsId"/>
<result column="caseid" jdbcType="VARCHAR" property="caseid"/>
<result column="case_distribution_of_property_id" jdbcType="VARCHAR" property="caseDistributionOfPropertyId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="age" jdbcType="INTEGER" property="age"/>
<result column="customer_relationship" jdbcType="VARCHAR" property="customerRelationship"/>
<result column="annual_income" jdbcType="DECIMAL" property="annualIncome"/>
<result column="sort" jdbcType="INTEGER" property="sort"/>
<result column="user_id" jdbcType="VARCHAR" property="userId"/>
<result column="is_answer" jdbcType="VARCHAR" property="isAnswer"/>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
<resultMap id="BaseResultMap" type="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecords">
<id column="case_distribution_of_property_family_records_id" jdbcType="VARCHAR" property="caseDistributionOfPropertyFamilyRecordsId" />
<result column="caseid" jdbcType="VARCHAR" property="caseid" />
<result column="case_distribution_of_property_id" jdbcType="VARCHAR" property="caseDistributionOfPropertyId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="age" jdbcType="INTEGER" property="age" />
<result column="customer_relationship" jdbcType="VARCHAR" property="customerRelationship" />
<result column="annual_income" jdbcType="DECIMAL" property="annualIncome" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="is_answer" jdbcType="VARCHAR" property="isAnswer" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
case_distribution_of_property_family_records_id
, caseid, case_distribution_of_property_id,
name, age, customer_relationship, annual_income, sort, user_id, is_answer
</sql>
<select id="selectByExample"
parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecordsExample"
resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List"/>
from case_distribution_of_property_family_records
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from case_distribution_of_property_family_records
where case_distribution_of_property_family_records_id =
#{caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete
from case_distribution_of_property_family_records
where case_distribution_of_property_family_records_id =
#{caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample"
parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecordsExample">
delete from case_distribution_of_property_family_records
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecords">
insert into case_distribution_of_property_family_records (case_distribution_of_property_family_records_id,
caseid,
case_distribution_of_property_id, name, age,
customer_relationship, annual_income, sort,
user_id, is_answer)
values (#{caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR}, #{caseid,jdbcType=VARCHAR},
#{caseDistributionOfPropertyId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER},
#{customerRelationship,jdbcType=VARCHAR}, #{annualIncome,jdbcType=DECIMAL}, #{sort,jdbcType=INTEGER},
#{userId,jdbcType=VARCHAR}, #{isAnswer,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective"
parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecords">
insert into case_distribution_of_property_family_records
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="caseDistributionOfPropertyFamilyRecordsId != null">
case_distribution_of_property_family_records_id,
</if>
<if test="caseid != null">
caseid,
</if>
<if test="caseDistributionOfPropertyId != null">
case_distribution_of_property_id,
</if>
<if test="name != null">
name,
</if>
<if test="age != null">
age,
</if>
<if test="customerRelationship != null">
customer_relationship,
</if>
<if test="annualIncome != null">
annual_income,
</if>
<if test="sort != null">
sort,
</if>
<if test="userId != null">
user_id,
</if>
<if test="isAnswer != null">
is_answer,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="caseDistributionOfPropertyFamilyRecordsId != null">
#{caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR},
</if>
<if test="caseid != null">
#{caseid,jdbcType=VARCHAR},
</if>
<if test="caseDistributionOfPropertyId != null">
#{caseDistributionOfPropertyId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="age != null">
#{age,jdbcType=INTEGER},
</if>
<if test="customerRelationship != null">
#{customerRelationship,jdbcType=VARCHAR},
</if>
<if test="annualIncome != null">
#{annualIncome,jdbcType=DECIMAL},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="isAnswer != null">
#{isAnswer,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample"
parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecordsExample"
resultType="java.lang.Long">
select count(*) from case_distribution_of_property_family_records
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</trim>
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update case_distribution_of_property_family_records
<set>
<if test="record.caseDistributionOfPropertyFamilyRecordsId != null">
case_distribution_of_property_family_records_id =
#{record.caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR},
</if>
<if test="record.caseid != null">
caseid = #{record.caseid,jdbcType=VARCHAR},
</if>
<if test="record.caseDistributionOfPropertyId != null">
case_distribution_of_property_id = #{record.caseDistributionOfPropertyId,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.age != null">
age = #{record.age,jdbcType=INTEGER},
</if>
<if test="record.customerRelationship != null">
customer_relationship = #{record.customerRelationship,jdbcType=VARCHAR},
</if>
<if test="record.annualIncome != null">
annual_income = #{record.annualIncome,jdbcType=DECIMAL},
</if>
<if test="record.sort != null">
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
<if test="record.isAnswer != null">
is_answer = #{record.isAnswer,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</update>
<update id="updateByExample" parameterType="map">
update case_distribution_of_property_family_records
set case_distribution_of_property_family_records_id =
#{record.caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR},
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
case_distribution_of_property_family_records_id, caseid, case_distribution_of_property_id,
name, age, customer_relationship, annual_income, create_time, user_id, is_answer
</sql>
<select id="selectByExample" parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecordsExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from case_distribution_of_property_family_records
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from case_distribution_of_property_family_records
where case_distribution_of_property_family_records_id = #{caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from case_distribution_of_property_family_records
where case_distribution_of_property_family_records_id = #{caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecordsExample">
delete from case_distribution_of_property_family_records
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecords">
insert into case_distribution_of_property_family_records (case_distribution_of_property_family_records_id, caseid,
case_distribution_of_property_id, name, age,
customer_relationship, annual_income, create_time,
user_id, is_answer)
values (#{caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR}, #{caseid,jdbcType=VARCHAR},
#{caseDistributionOfPropertyId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER},
#{customerRelationship,jdbcType=VARCHAR}, #{annualIncome,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP},
#{userId,jdbcType=VARCHAR}, #{isAnswer,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecords">
insert into case_distribution_of_property_family_records
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="caseDistributionOfPropertyFamilyRecordsId != null">
case_distribution_of_property_family_records_id,
</if>
<if test="caseid != null">
caseid,
</if>
<if test="caseDistributionOfPropertyId != null">
case_distribution_of_property_id,
</if>
<if test="name != null">
name,
</if>
<if test="age != null">
age,
</if>
<if test="customerRelationship != null">
customer_relationship,
</if>
<if test="annualIncome != null">
annual_income,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="userId != null">
user_id,
</if>
<if test="isAnswer != null">
is_answer,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="caseDistributionOfPropertyFamilyRecordsId != null">
#{caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR},
</if>
<if test="caseid != null">
#{caseid,jdbcType=VARCHAR},
</if>
<if test="caseDistributionOfPropertyId != null">
#{caseDistributionOfPropertyId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="age != null">
#{age,jdbcType=INTEGER},
</if>
<if test="customerRelationship != null">
#{customerRelationship,jdbcType=VARCHAR},
</if>
<if test="annualIncome != null">
#{annualIncome,jdbcType=DECIMAL},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="isAnswer != null">
#{isAnswer,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecordsExample" resultType="java.lang.Long">
select count(*) from case_distribution_of_property_family_records
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update case_distribution_of_property_family_records
<set>
<if test="record.caseDistributionOfPropertyFamilyRecordsId != null">
case_distribution_of_property_family_records_id = #{record.caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR},
</if>
<if test="record.caseid != null">
caseid = #{record.caseid,jdbcType=VARCHAR},
</if>
<if test="record.caseDistributionOfPropertyId != null">
case_distribution_of_property_id = #{record.caseDistributionOfPropertyId,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.age != null">
age = #{record.age,jdbcType=INTEGER},
</if>
<if test="record.customerRelationship != null">
customer_relationship = #{record.customerRelationship,jdbcType=VARCHAR},
</if>
<if test="record.annualIncome != null">
annual_income = #{record.annualIncome,jdbcType=DECIMAL},
sort = #{record.sort,jdbcType=INTEGER},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
is_answer = #{record.isAnswer,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByPrimaryKeySelective"
parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecords">
update case_distribution_of_property_family_records
<set>
<if test="caseid != null">
caseid = #{caseid,jdbcType=VARCHAR},
</if>
<if test="caseDistributionOfPropertyId != null">
case_distribution_of_property_id = #{caseDistributionOfPropertyId,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="age != null">
age = #{age,jdbcType=INTEGER},
</if>
<if test="customerRelationship != null">
customer_relationship = #{customerRelationship,jdbcType=VARCHAR},
</if>
<if test="annualIncome != null">
annual_income = #{annualIncome,jdbcType=DECIMAL},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="isAnswer != null">
is_answer = #{isAnswer,jdbcType=VARCHAR},
</if>
</set>
where case_distribution_of_property_family_records_id =
#{caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey"
parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecords">
update case_distribution_of_property_family_records
set caseid = #{caseid,jdbcType=VARCHAR},
case_distribution_of_property_id = #{caseDistributionOfPropertyId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
age = #{age,jdbcType=INTEGER},
customer_relationship = #{customerRelationship,jdbcType=VARCHAR},
annual_income = #{annualIncome,jdbcType=DECIMAL},
sort = #{sort,jdbcType=INTEGER},
user_id = #{userId,jdbcType=VARCHAR},
is_answer = #{isAnswer,jdbcType=VARCHAR}
where case_distribution_of_property_family_records_id =
#{caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR}
</update>
<insert id="batchInsert">
insert into case_distribution_of_property_family_records (case_distribution_of_property_family_records_id,
caseid,
case_distribution_of_property_id, name, age,
customer_relationship, annual_income, sort,
user_id, is_answer)
values
<foreach collection="list" item="item" separator=",">
(#{item.caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR}, #{item.caseid,jdbcType=VARCHAR},
#{item.caseDistributionOfPropertyId,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.age,jdbcType=INTEGER},
#{item.customerRelationship,jdbcType=VARCHAR}, #{item.annualIncome,jdbcType=DECIMAL}, #{item.sort,jdbcType=INTEGER},
#{item.userId,jdbcType=VARCHAR}, #{item.isAnswer,jdbcType=VARCHAR})
</foreach>
</insert>
</if>
<if test="record.isAnswer != null">
is_answer = #{record.isAnswer,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update case_distribution_of_property_family_records
set case_distribution_of_property_family_records_id = #{record.caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR},
caseid = #{record.caseid,jdbcType=VARCHAR},
case_distribution_of_property_id = #{record.caseDistributionOfPropertyId,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
age = #{record.age,jdbcType=INTEGER},
customer_relationship = #{record.customerRelationship,jdbcType=VARCHAR},
annual_income = #{record.annualIncome,jdbcType=DECIMAL},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
user_id = #{record.userId,jdbcType=VARCHAR},
is_answer = #{record.isAnswer,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecords">
update case_distribution_of_property_family_records
<set>
<if test="caseid != null">
caseid = #{caseid,jdbcType=VARCHAR},
</if>
<if test="caseDistributionOfPropertyId != null">
case_distribution_of_property_id = #{caseDistributionOfPropertyId,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="age != null">
age = #{age,jdbcType=INTEGER},
</if>
<if test="customerRelationship != null">
customer_relationship = #{customerRelationship,jdbcType=VARCHAR},
</if>
<if test="annualIncome != null">
annual_income = #{annualIncome,jdbcType=DECIMAL},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="isAnswer != null">
is_answer = #{isAnswer,jdbcType=VARCHAR},
</if>
</set>
where case_distribution_of_property_family_records_id = #{caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.money_management.entity.CaseDistributionOfPropertyFamilyRecords">
update case_distribution_of_property_family_records
set caseid = #{caseid,jdbcType=VARCHAR},
case_distribution_of_property_id = #{caseDistributionOfPropertyId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
age = #{age,jdbcType=INTEGER},
customer_relationship = #{customerRelationship,jdbcType=VARCHAR},
annual_income = #{annualIncome,jdbcType=DECIMAL},
create_time = #{createTime,jdbcType=TIMESTAMP},
user_id = #{userId,jdbcType=VARCHAR},
is_answer = #{isAnswer,jdbcType=VARCHAR}
where case_distribution_of_property_family_records_id = #{caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR}
</update>
<insert id="batchInsert">
insert into case_distribution_of_property_family_records (case_distribution_of_property_family_records_id,
caseid,
case_distribution_of_property_id, name, age,
customer_relationship, annual_income, sort,
user_id, is_answer)
values
<foreach collection="list" item="item" separator=",">
(#{item.caseDistributionOfPropertyFamilyRecordsId,jdbcType=VARCHAR}, #{item.caseid,jdbcType=VARCHAR},
#{item.caseDistributionOfPropertyId,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR}, #{item.age,jdbcType=INTEGER},
#{item.customerRelationship,jdbcType=VARCHAR}, #{item.annualIncome,jdbcType=DECIMAL}, #{item.sort,jdbcType=INTEGER},
#{item.userId,jdbcType=VARCHAR}, #{item.isAnswer,jdbcType=VARCHAR})
</foreach>
</insert>
</mapper>
Loading…
Cancel
Save