| | |
| | | <!-- 结果集 --> |
| | | <resultMap id="dataResult" type="cn.huge.module.cases.domain.po.CaseInfoUnfold"> |
| | | <result property="id" column="id"/> |
| | | <result property="caseId" column="case_id"/> |
| | | <result property="mediateUnitId" column="mediate_unit_id"/> |
| | | <result property="mediateUnitName" column="mediate_unit_name"/> |
| | | <result property="mediateDeptId" column="mediate_dept_id"/> |
| | |
| | | <result property="custId" column="cust_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="acceptTime" column="accept_time"/> |
| | | <result property="closeTime" column="close_time"/> |
| | | </resultMap> |
| | | <!-- 表 --> |
| | | <sql id='table-name'>dyh_case_info_unfold</sql> |
| | | <!-- 字段 --> |
| | | <sql id="column-part"> |
| | | id, |
| | | case_id, |
| | | mediate_unit_id, |
| | | mediate_unit_name, |
| | | mediate_dept_id, |
| | |
| | | party_joy, |
| | | cust_id, |
| | | create_time, |
| | | update_time |
| | | update_time, |
| | | accept_time, |
| | | close_time |
| | | </sql> |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.caseId != null">case_id = #{entity.caseId},</if> |
| | | <if test="entity.mediateUnitId != null">mediate_unit_id = #{entity.mediateUnitId},</if> |
| | | <if test="entity.mediateUnitName != null">mediate_unit_name = #{entity.mediateUnitName},</if> |
| | | <if test="entity.mediateDeptId != null">mediate_dept_id = #{entity.mediateDeptId},</if> |
| | |
| | | <if test="entity.partyJoy != null">party_joy = #{entity.partyJoy},</if> |
| | | <if test="entity.custId != null">cust_id = #{entity.custId},</if> |
| | | <if test="entity.createTime != null">create_time = #{entity.createTime},</if> |
| | | <if test="entity.updateTime != null">update_time = #{entity.updateTime}</if> |
| | | <if test="entity.updateTime != null">update_time = #{entity.updateTime},</if> |
| | | <if test="entity.acceptTime != null">accept_time = #{entity.acceptTime},</if> |
| | | <if test="entity.closeTime != null">close_time = #{entity.closeTime},</if> |
| | | </sql> |
| | | <!-- 条件 --> |
| | | <sql id="where-part"> |
| | |
| | | <where> |
| | | <if test="terms.id != null and terms.id !=''"> |
| | | and id = #{terms.id} |
| | | </if> |
| | | <if test="terms.caseId != null and terms.caseId !=''"> |
| | | and case_id = #{terms.caseId} |
| | | </if> |
| | | <if test="terms.mediateUnitId != null and terms.mediateUnitId !=''"> |
| | | and mediate_unit_id = #{terms.mediateUnitId} |
| | |
| | | and (DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.updateStart} |
| | | and DATE_FORMAT(update_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.updateEnd}) |
| | | </if> |
| | | <if test="terms.acceptTime != null and terms.acceptTime !=''"> |
| | | and DATE_FORMAT(accept_time,'%Y-%m-%d') = #{terms.acceptTime} |
| | | </if> |
| | | <if test="terms.acceptTimeStart != null and terms.acceptTimeStart !='' and terms.acceptTimeEnd != null and terms.acceptTimeEnd !=''"> |
| | | and (DATE_FORMAT(accept_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.acceptTimeStart} |
| | | and DATE_FORMAT(accept_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.acceptTimeEnd}) |
| | | </if> |
| | | <if test="terms.closeTime != null and terms.closeTime !=''"> |
| | | and DATE_FORMAT(close_time,'%Y-%m-%d') = #{terms.closeTime} |
| | | </if> |
| | | <if test="terms.closeTimeStart != null and terms.closeTimeStart !='' and terms.closeTimeEnd != null and terms.closeTimeEnd !=''"> |
| | | and (DATE_FORMAT(close_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.closeTimeStart} |
| | | and DATE_FORMAT(close_time,'%Y-%m-%d') <![CDATA[ <= ]]> #{terms.closeTimeEnd}) |
| | | </if> |
| | | </where> |
| | | </if> |
| | | </sql> |