|
@@ -0,0 +1,133 @@
|
|
|
+<?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.jeeplus.test.cw.workClientInfo.mapper.CwWorkClientBaseMapper">
|
|
|
+
|
|
|
+ <resultMap id="BaseResultMap" type="com.jeeplus.test.cw.workClientInfo.service.dto.CwWorkClientBaseDTO">
|
|
|
+ <id property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
|
|
|
+ <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="delFlag" column="del_flag" jdbcType="INTEGER"/>
|
|
|
+ <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
|
|
|
+ <result property="no" column="no" jdbcType="VARCHAR"/>
|
|
|
+ <result property="name" column="name" jdbcType="VARCHAR"/>
|
|
|
+ <result property="abbreviation" column="abbreviation" jdbcType="VARCHAR"/>
|
|
|
+ <result property="englishName" column="english_name" jdbcType="VARCHAR"/>
|
|
|
+ <result property="type" column="type" jdbcType="VARCHAR"/>
|
|
|
+ <result property="uscCode" column="usc_code" jdbcType="VARCHAR"/>
|
|
|
+ <result property="scType" column="sc_type" jdbcType="VARCHAR"/>
|
|
|
+ <result property="manageLevelType" column="manage_level_type" jdbcType="VARCHAR"/>
|
|
|
+ <result property="oneUpCompany" column="one_up_company" jdbcType="VARCHAR"/>
|
|
|
+ <result property="companyLevel" column="company_level" jdbcType="VARCHAR"/>
|
|
|
+ <result property="businessScope" column="business_scope" jdbcType="VARCHAR"/>
|
|
|
+ <result property="keyResponsibilities" column="key_responsibilities" jdbcType="VARCHAR"/>
|
|
|
+ <result property="industry" column="industry" jdbcType="VARCHAR"/>
|
|
|
+ <result property="affiliation" column="affiliation" jdbcType="VARCHAR"/>
|
|
|
+ <result property="organizationType" column="organization_type" jdbcType="VARCHAR"/>
|
|
|
+ <result property="reportType" column="report_type" jdbcType="VARCHAR"/>
|
|
|
+ <result property="oneUpOffice" column="one_up_office" jdbcType="VARCHAR"/>
|
|
|
+ <result property="registrationCert" column="registration_cert" jdbcType="VARCHAR"/>
|
|
|
+ <result property="approvingBodies" column="approving_bodies" jdbcType="VARCHAR"/>
|
|
|
+ <result property="officeId" column="office_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="procInsId" column="proc_ins_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="processDefinitionId" column="process_definition_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="status" column="status" jdbcType="VARCHAR"/>
|
|
|
+ <result property="agreeDate" column="agree_date" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="agreeUserId" column="agree_user_id" jdbcType="VARCHAR"/>
|
|
|
+ <collection property="workAttachmentDtoList" ofType="com.jeeplus.test.workContract.service.dto.WorkAttachmentDto" column="id" select="getFileList"></collection>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <resultMap id="AttachmentMap" type="com.jeeplus.test.workContract.service.dto.WorkAttachmentDto">
|
|
|
+ <id property="id" column="id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createBy.id" column="create_by" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createDate" column="create_date" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="updateBy.id" column="update_by" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createBy.name" column="create_name" jdbcType="VARCHAR"/>
|
|
|
+ <result property="updateDate" column="update_date" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
|
|
|
+ <result property="url" column="url" jdbcType="VARCHAR"/>
|
|
|
+ <result property="name" column="attachment_name" jdbcType="VARCHAR"/>
|
|
|
+ <result property="size" column="file_size" jdbcType="VARCHAR"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ cw_wcb.id,
|
|
|
+ cw_wcb.create_by,
|
|
|
+ cw_wcb.create_date,
|
|
|
+ cw_wcb.update_by,
|
|
|
+ cw_wcb.update_date,
|
|
|
+ cw_wcb.del_flag,
|
|
|
+ cw_wcb.remarks,
|
|
|
+ cw_wcb.no,
|
|
|
+ cw_wcb.name,
|
|
|
+ cw_wcb.abbreviation,
|
|
|
+ cw_wcb.english_name,
|
|
|
+ cw_wcb.type,
|
|
|
+ cw_wcb.usc_code,
|
|
|
+ cw_wcb.sc_type,
|
|
|
+ cw_wcb.manage_level_type,
|
|
|
+ cw_wcb.one_up_company,
|
|
|
+ cw_wcb.company_level,
|
|
|
+ cw_wcb.business_scope,
|
|
|
+ cw_wcb.key_responsibilities,
|
|
|
+ cw_wcb.industry,
|
|
|
+ cw_wcb.affiliation,
|
|
|
+ cw_wcb.organization_type,
|
|
|
+ cw_wcb.report_type,
|
|
|
+ cw_wcb.one_up_office,
|
|
|
+ cw_wcb.registration_cert,
|
|
|
+ cw_wcb.approving_bodies,
|
|
|
+ cw_wcb.office_id,
|
|
|
+ cw_wcb.proc_ins_id,
|
|
|
+ cw_wcb.process_definition_id,
|
|
|
+ cw_wcb.status,
|
|
|
+ cw_wcb.agree_date,
|
|
|
+ cw_wcb.agree_user_id
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <sql id="File_Column_List">
|
|
|
+ wa.id,
|
|
|
+ wa.create_by,
|
|
|
+ wa.create_date,
|
|
|
+ wa.update_by,
|
|
|
+ wa.update_date,
|
|
|
+ wa.remarks,
|
|
|
+ wa.del_flag,
|
|
|
+ wa.url,
|
|
|
+ wa.type,
|
|
|
+ wa.attachment_id,
|
|
|
+ wa.attachment_name,
|
|
|
+ wa.attachment_flag,
|
|
|
+ wa.module_type,
|
|
|
+ wa.attachment_type,
|
|
|
+ wa.file_size,
|
|
|
+ wa.sort,
|
|
|
+ wa.description
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="getFileList" resultMap="AttachmentMap">
|
|
|
+ select
|
|
|
+ <include refid="File_Column_List"></include>,
|
|
|
+ su.name as create_name
|
|
|
+ from work_attachment wa
|
|
|
+ left join sys_user su on su.id = wa.create_by and su.del_flag = '0'
|
|
|
+ where wa.del_flag = '0' and wa.attachment_id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findList" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"></include>
|
|
|
+ from cw_work_client_base cw_wcb
|
|
|
+ ${ew.customSqlSegment}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="queryById" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"></include>
|
|
|
+ from cw_work_client_base cw_wcb
|
|
|
+ where cw_wcb.del_flag = '0' and cw_wcb.id = ${id}
|
|
|
+ </select>
|
|
|
+</mapper>
|