copy from dyh-service/dyh-mediate/src/main/java/cn/huge/module/assist/dao/mapper/xml/CaseAssistApplyMapper.xml
copy to dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseReturnMapper.xml
File was copied from dyh-service/dyh-mediate/src/main/java/cn/huge/module/assist/dao/mapper/xml/CaseAssistApplyMapper.xml |
| | |
| | | <?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"> |
| | | <!-- |
| | | * @title: 联合处置申请信息表 |
| | | * @title: 纠纷回退信息表 |
| | | * @description: 自定义sql,请自行实现业务逻辑 |
| | | * @company: hugeinfo |
| | | * @author: wangwh |
| | | * @time:2024-09-05 17:25:04 |
| | | * @author: liyj |
| | | * @time:2024-09-07 00:06:20 |
| | | * @version 1.0.0 |
| | | --> |
| | | <mapper namespace="cn.huge.module.assist.dao.mapper.CaseAssistApplyMapper"> |
| | | <mapper namespace="cn.huge.module.cases.dao.mapper.CaseReturnMapper"> |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.assist.domain.po.CaseAssistApply"> |
| | | <resultMap id="dataResult" type="cn.huge.module.cases.domain.po.CaseReturn"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="applyUnitId" column="apply_unit_id"/> |
| | | <result property="applyUnitName" column="apply_unit_name"/> |
| | | <result property="applyUserId" column="apply_user_id"/> |
| | | <result property="applyUserName" column="apply_user_name"/> |
| | | <result property="applyAssistUnitId" column="apply_assist_unit_id"/> |
| | | <result property="applyAssistUnitName" column="apply_assist_unit_name"/> |
| | | <result property="applyContent" column="apply_content"/> |
| | | <result property="applyTime" column="apply_time"/> |
| | | <result property="applyStatus" column="apply_status"/> |
| | | <result property="returnUnitId" column="return_unit_id"/> |
| | | <result property="returnUnitName" column="return_unit_name"/> |
| | | <result property="returnUserId" column="return_user_id"/> |
| | | <result property="returnUserName" column="return_user_name"/> |
| | | <result property="returnContent" column="return_content"/> |
| | | <result property="returnTime" column="return_time"/> |
| | | <result property="returnStatus" column="return_status"/> |
| | | <result property="caseTaskId" column="case_task_id"/> |
| | | <result property="auditUnitId" column="audit_unit_id"/> |
| | | <result property="auditUnitName" column="audit_unit_name"/> |
| | | <result property="auditUserId" column="audit_user_id"/> |
| | |
| | | <result property="updateTime" column="update_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_case_assist_apply</sql> |
| | | <sql id='table-name'>dyh_case_return</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | apply_unit_id, |
| | | apply_unit_name, |
| | | apply_user_id, |
| | | apply_user_name, |
| | | apply_assist_unit_id, |
| | | apply_assist_unit_name, |
| | | apply_content, |
| | | apply_time, |
| | | apply_status, |
| | | return_unit_id, |
| | | return_unit_name, |
| | | return_user_id, |
| | | return_user_name, |
| | | return_content, |
| | | return_time, |
| | | return_status, |
| | | case_task_id, |
| | | audit_unit_id, |
| | | audit_unit_name, |
| | | audit_user_id, |
| | |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.caseId != null">case_id = #{entity.caseId},</if> |
| | | <if test="entity.applyUnitId != null">apply_unit_id = #{entity.applyUnitId},</if> |
| | | <if test="entity.applyUnitName != null">apply_unit_name = #{entity.applyUnitName},</if> |
| | | <if test="entity.applyUserId != null">apply_user_id = #{entity.applyUserId},</if> |
| | | <if test="entity.applyUserName != null">apply_user_name = #{entity.applyUserName},</if> |
| | | <if test="entity.applyAssistUnitId != null">apply_assist_unit_id = #{entity.applyAssistUnitId},</if> |
| | | <if test="entity.applyAssistUnitName != null">apply_assist_unit_name = #{entity.applyAssistUnitName},</if> |
| | | <if test="entity.applyContent != null">apply_content = #{entity.applyContent},</if> |
| | | <if test="entity.applyTime != null">apply_time = #{entity.applyTime},</if> |
| | | <if test="entity.applyStatus != null">apply_status = #{entity.applyStatus},</if> |
| | | <if test="entity.returnUnitId != null">return_unit_id = #{entity.returnUnitId},</if> |
| | | <if test="entity.returnUnitName != null">return_unit_name = #{entity.returnUnitName},</if> |
| | | <if test="entity.returnUserId != null">return_user_id = #{entity.returnUserId},</if> |
| | | <if test="entity.returnUserName != null">return_user_name = #{entity.returnUserName},</if> |
| | | <if test="entity.returnContent != null">return_content = #{entity.returnContent},</if> |
| | | <if test="entity.returnTime != null">return_time = #{entity.returnTime},</if> |
| | | <if test="entity.returnStatus != null">return_status = #{entity.returnStatus},</if> |
| | | <if test="entity.caseTaskId != null">case_task_id = #{entity.caseTaskId},</if> |
| | | <if test="entity.auditUnitId != null">audit_unit_id = #{entity.auditUnitId},</if> |
| | | <if test="entity.auditUnitName != null">audit_unit_name = #{entity.auditUnitName},</if> |
| | | <if test="entity.auditUserId != null">audit_user_id = #{entity.auditUserId},</if> |
| | |
| | | <if test="terms.caseId != null and terms.caseId !=''"> |
| | | and case_id = #{terms.caseId} |
| | | </if> |
| | | <if test="terms.applyUnitId != null and terms.applyUnitId !=''"> |
| | | and apply_unit_id = #{terms.applyUnitId} |
| | | <if test="terms.returnUnitId != null and terms.returnUnitId !=''"> |
| | | and return_unit_id = #{terms.returnUnitId} |
| | | </if> |
| | | <if test="terms.applyUnitName != null and terms.applyUnitName !=''"> |
| | | and apply_unit_name = #{terms.applyUnitName} |
| | | <if test="terms.returnUnitName != null and terms.returnUnitName !=''"> |
| | | and return_unit_name = #{terms.returnUnitName} |
| | | </if> |
| | | <if test="terms.applyUserId != null and terms.applyUserId !=''"> |
| | | and apply_user_id = #{terms.applyUserId} |
| | | <if test="terms.returnUserId != null and terms.returnUserId !=''"> |
| | | and return_user_id = #{terms.returnUserId} |
| | | </if> |
| | | <if test="terms.applyUserName != null and terms.applyUserName !=''"> |
| | | and apply_user_name = #{terms.applyUserName} |
| | | <if test="terms.returnUserName != null and terms.returnUserName !=''"> |
| | | and return_user_name = #{terms.returnUserName} |
| | | </if> |
| | | <if test="terms.applyAssistUnitId != null and terms.applyAssistUnitId !=''"> |
| | | and apply_assist_unit_id = #{terms.applyAssistUnitId} |
| | | <if test="terms.returnContent != null and terms.returnContent !=''"> |
| | | and return_content = #{terms.returnContent} |
| | | </if> |
| | | <if test="terms.applyAssistUnitName != null and terms.applyAssistUnitName !=''"> |
| | | and apply_assist_unit_name = #{terms.applyAssistUnitName} |
| | | <if test="terms.returnTime != null and terms.returnTime !=''"> |
| | | and return_time = #{terms.returnTime} |
| | | </if> |
| | | <if test="terms.applyContent != null and terms.applyContent !=''"> |
| | | and apply_content = #{terms.applyContent} |
| | | <if test="terms.returnStatus != null and terms.returnStatus !=''"> |
| | | and return_status = #{terms.returnStatus} |
| | | </if> |
| | | <if test="terms.applyTime != null and terms.applyTime !=''"> |
| | | and apply_time = #{terms.applyTime} |
| | | </if> |
| | | <if test="terms.applyStatus != null and terms.applyStatus !=''"> |
| | | and apply_status = #{terms.applyStatus} |
| | | <if test="terms.caseTaskId != null and terms.caseTaskId !=''"> |
| | | and case_task_id = #{terms.caseTaskId} |
| | | </if> |
| | | <if test="terms.auditUnitId != null and terms.auditUnitId !=''"> |
| | | and audit_unit_id = #{terms.auditUnitId} |
| | |
| | | </if> |
| | | </sql> |
| | | <!-- 更新对象 --> |
| | | <update id="updateCaseAssistApply"> |
| | | <update id="updateCaseReturn"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | |
| | | </where> |
| | | </update> |
| | | <!-- 条件更新对象 --> |
| | | <update id="updateCaseAssistApplyTerms"> |
| | | <update id="updateCaseReturnTerms"> |
| | | update |
| | | <include refid="table-name"/> |
| | | <set> |
| | |
| | | <include refid="where-part"/> |
| | | </update> |
| | | <!-- 根据编号物理删除 --> |
| | | <delete id="deleteCaseAssistApply"> |
| | | <delete id="deleteCaseReturn"> |
| | | delete from |
| | | <include refid="table-name" /> |
| | | where id = #{id} |