<?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.ruoyi.docking.dao.ProjectMapper">

    <resultMap type="com.ruoyi.docking.entity.Project" id="ProjectMap">
        <result property="projectId" column="project_id" jdbcType="INTEGER"/>
        <result property="projectName" column="project_name" jdbcType="VARCHAR"/>
        <result property="companyId" column="company_id" jdbcType="VARCHAR"/>
        <result property="companyName" column="company_name" jdbcType="VARCHAR"/>
        <result property="companyTime" column="company_time" jdbcType="VARCHAR"/>
        <result property="agentCompanyId" column="agent_company_id" jdbcType="VARCHAR"/>
        <result property="agentCompanyName" column="agent_company_name" jdbcType="VARCHAR"/>
        <result property="contactName" column="contact_name" jdbcType="VARCHAR"/>
        <result property="contactPhone" column="contact_phone" jdbcType="VARCHAR"/>
        <result property="projectType" column="project_type" jdbcType="VARCHAR"/>
        <result property="organizationId" column="organization_id" jdbcType="VARCHAR"/>
        <result property="subOrganizationId" column="sub_organization_id" jdbcType="VARCHAR"/>
        <result property="zsOrganizationId" column="zs_organization_id" jdbcType="VARCHAR"/>
        <result property="typeId" column="type_id" jdbcType="VARCHAR"/>
        <result property="secondTypeId" column="second_type_id" jdbcType="VARCHAR"/>
        <result property="thirdTypeId" column="third_type_id" jdbcType="VARCHAR"/>
        <result property="ssTypeId" column="ss_type_id" jdbcType="VARCHAR"/>
        <result property="areaId" column="area_id" jdbcType="VARCHAR"/>
        <result property="address" column="address" jdbcType="VARCHAR"/>
        <result property="lat" column="lat" jdbcType="VARCHAR"/>
        <result property="lng" column="lng" jdbcType="VARCHAR"/>
        <result property="actualStartTime" column="actual_start_time" jdbcType="VARCHAR"/>
        <result property="actualEndTime" column="actual_end_time" jdbcType="VARCHAR"/>
        <result property="jgysStatus" column="jgys_status" jdbcType="VARCHAR"/>
        <result property="tctyStatus" column="tcty_status" jdbcType="VARCHAR"/>
        <result property="operationTime" column="operation_time" jdbcType="VARCHAR"/>
        <result property="investmentType" column="investment_type" jdbcType="VARCHAR"/>
        <result property="investmentEntity" column="investment_entity" jdbcType="VARCHAR"/>
        <result property="investmentEntityType" column="investment_entity_type" jdbcType="VARCHAR"/>
        <result property="thumbnail" column="thumbnail" jdbcType="VARCHAR"/>
        <result property="remark" column="remark" jdbcType="VARCHAR"/>
        <result property="status" column="status" jdbcType="VARCHAR"/>
        <result property="reviewStep" column="review_step" jdbcType="INTEGER"/>
        <result property="reviewObject" column="review_object" jdbcType="INTEGER"/>
        <result property="reviewResult" column="review_result" jdbcType="INTEGER"/>
        <result property="progressContent" column="progress_content" jdbcType="VARCHAR"/>
        <result property="progressUpdateAt" column="progress_update_at" jdbcType="INTEGER"/>
        <result property="extProjectId" column="ext_project_id" jdbcType="VARCHAR"/>
        <result property="stzProjectId" column="stz_project_id" jdbcType="VARCHAR"/>
        <result property="sgxkProjectId" column="sgxk_project_id" jdbcType="VARCHAR"/>
        <result property="ydghProjectId" column="ydgh_project_id" jdbcType="INTEGER"/>
        <result property="gcghProjectId" column="gcgh_project_id" jdbcType="INTEGER"/>
        <result property="hpProjectId" column="hp_project_id" jdbcType="INTEGER"/>
        <result property="genProjectId" column="gen_project_id" jdbcType="VARCHAR"/>
        <result property="landId" column="land_id" jdbcType="VARCHAR"/>
        <result property="zdxmProjectId" column="zdxm_project_id" jdbcType="VARCHAR"/>
        <result property="ybjbProjectId" column="ybjb_project_id" jdbcType="VARCHAR"/>
        <result property="landingTime" column="landing_time" jdbcType="VARCHAR"/>
        <result property="landing" column="landing" jdbcType="INTEGER"/>
        <result property="dimensionIds" column="dimension_ids" jdbcType="VARCHAR"/>
        <result property="headquarterIds" column="headquarter_ids" jdbcType="VARCHAR"/>
        <result property="jgysbaId" column="jgysba_id" jdbcType="INTEGER"/>
        <result property="npId" column="np_id" jdbcType="INTEGER"/>
        <result property="xfysId" column="xfys_id" jdbcType="INTEGER"/>
        <result property="isDisabled" column="is_disabled" jdbcType="INTEGER"/>
        <result property="isStats" column="is_stats" jdbcType="INTEGER"/>
        <result property="isDraft" column="is_draft" jdbcType="INTEGER"/>
        <result property="createdAt" column="created_at" jdbcType="INTEGER"/>
        <result property="updatedAt" column="updated_at" jdbcType="INTEGER"/>
        <result property="createdBy" column="created_by" jdbcType="VARCHAR"/>
        <result property="isDeleted" column="is_deleted" jdbcType="INTEGER"/>
        <result property="landNo" column="land_no" jdbcType="VARCHAR"/>
        <result property="landUsage" column="land_usage" jdbcType="VARCHAR"/>
        <result property="landArea" column="land_area" jdbcType="VARCHAR"/>
        <result property="landAddress" column="land_address" jdbcType="VARCHAR"/>
        <result property="landStartDate" column="land_start_date" jdbcType="VARCHAR"/>
        <result property="landEndDate" column="land_end_date" jdbcType="VARCHAR"/>
        <result property="landObligeeName" column="land_obligee_name" jdbcType="VARCHAR"/>
        <result property="landApproveTime" column="land_approve_time" jdbcType="VARCHAR"/>
        <result property="homeDisplay" column="home_display" jdbcType="INTEGER"/>
        <result property="installment" column="installment" jdbcType="INTEGER"/>
        <result property="installmentNum" column="installment_num" jdbcType="INTEGER"/>
    </resultMap>

    <!-- 批量插入 -->
    <insert id="insertBatch" keyProperty="projectId" useGeneratedKeys="true">
        insert into gysl.project(project_namecompany_idcompany_namecompany_timeagent_company_idagent_company_namecontact_namecontact_phoneproject_typeorganization_idsub_organization_idzs_organization_idtype_idsecond_type_idthird_type_idss_type_idarea_idaddresslatlngactual_start_timeactual_end_timejgys_statustcty_statusoperation_timeinvestment_typeinvestment_entityinvestment_entity_typethumbnailremarkstatusreview_stepreview_objectreview_resultprogress_contentprogress_update_atext_project_idstz_project_idsgxk_project_idydgh_project_idgcgh_project_idhp_project_idgen_project_idland_idzdxm_project_idybjb_project_idlanding_timelandingdimension_idsheadquarter_idsjgysba_idnp_idxfys_idis_disabledis_statsis_draftcreated_atupdated_atcreated_byis_deletedland_noland_usageland_arealand_addressland_start_dateland_end_dateland_obligee_nameland_approve_timehome_displayinstallmentinstallment_num)
        values
        <foreach collection="entities" item="entity" separator=",">
        (#{entity.projectName}#{entity.companyId}#{entity.companyName}#{entity.companyTime}#{entity.agentCompanyId}#{entity.agentCompanyName}#{entity.contactName}#{entity.contactPhone}#{entity.projectType}#{entity.organizationId}#{entity.subOrganizationId}#{entity.zsOrganizationId}#{entity.typeId}#{entity.secondTypeId}#{entity.thirdTypeId}#{entity.ssTypeId}#{entity.areaId}#{entity.address}#{entity.lat}#{entity.lng}#{entity.actualStartTime}#{entity.actualEndTime}#{entity.jgysStatus}#{entity.tctyStatus}#{entity.operationTime}#{entity.investmentType}#{entity.investmentEntity}#{entity.investmentEntityType}#{entity.thumbnail}#{entity.remark}#{entity.status}#{entity.reviewStep}#{entity.reviewObject}#{entity.reviewResult}#{entity.progressContent}#{entity.progressUpdateAt}#{entity.extProjectId}#{entity.stzProjectId}#{entity.sgxkProjectId}#{entity.ydghProjectId}#{entity.gcghProjectId}#{entity.hpProjectId}#{entity.genProjectId}#{entity.landId}#{entity.zdxmProjectId}#{entity.ybjbProjectId}#{entity.landingTime}#{entity.landing}#{entity.dimensionIds}#{entity.headquarterIds}#{entity.jgysbaId}#{entity.npId}#{entity.xfysId}#{entity.isDisabled}#{entity.isStats}#{entity.isDraft}#{entity.createdAt}#{entity.updatedAt}#{entity.createdBy}#{entity.isDeleted}#{entity.landNo}#{entity.landUsage}#{entity.landArea}#{entity.landAddress}#{entity.landStartDate}#{entity.landEndDate}#{entity.landObligeeName}#{entity.landApproveTime}#{entity.homeDisplay}#{entity.installment}#{entity.installmentNum})
        </foreach>
    </insert>
    <!-- 批量插入或按主键更新 -->
    <insert id="insertOrUpdateBatch" keyProperty="projectId" useGeneratedKeys="true">
        insert into gysl.project(project_namecompany_idcompany_namecompany_timeagent_company_idagent_company_namecontact_namecontact_phoneproject_typeorganization_idsub_organization_idzs_organization_idtype_idsecond_type_idthird_type_idss_type_idarea_idaddresslatlngactual_start_timeactual_end_timejgys_statustcty_statusoperation_timeinvestment_typeinvestment_entityinvestment_entity_typethumbnailremarkstatusreview_stepreview_objectreview_resultprogress_contentprogress_update_atext_project_idstz_project_idsgxk_project_idydgh_project_idgcgh_project_idhp_project_idgen_project_idland_idzdxm_project_idybjb_project_idlanding_timelandingdimension_idsheadquarter_idsjgysba_idnp_idxfys_idis_disabledis_statsis_draftcreated_atupdated_atcreated_byis_deletedland_noland_usageland_arealand_addressland_start_dateland_end_dateland_obligee_nameland_approve_timehome_displayinstallmentinstallment_num)
        values
        <foreach collection="entities" item="entity" separator=",">
            (#{entity.projectName}#{entity.companyId}#{entity.companyName}#{entity.companyTime}#{entity.agentCompanyId}#{entity.agentCompanyName}#{entity.contactName}#{entity.contactPhone}#{entity.projectType}#{entity.organizationId}#{entity.subOrganizationId}#{entity.zsOrganizationId}#{entity.typeId}#{entity.secondTypeId}#{entity.thirdTypeId}#{entity.ssTypeId}#{entity.areaId}#{entity.address}#{entity.lat}#{entity.lng}#{entity.actualStartTime}#{entity.actualEndTime}#{entity.jgysStatus}#{entity.tctyStatus}#{entity.operationTime}#{entity.investmentType}#{entity.investmentEntity}#{entity.investmentEntityType}#{entity.thumbnail}#{entity.remark}#{entity.status}#{entity.reviewStep}#{entity.reviewObject}#{entity.reviewResult}#{entity.progressContent}#{entity.progressUpdateAt}#{entity.extProjectId}#{entity.stzProjectId}#{entity.sgxkProjectId}#{entity.ydghProjectId}#{entity.gcghProjectId}#{entity.hpProjectId}#{entity.genProjectId}#{entity.landId}#{entity.zdxmProjectId}#{entity.ybjbProjectId}#{entity.landingTime}#{entity.landing}#{entity.dimensionIds}#{entity.headquarterIds}#{entity.jgysbaId}#{entity.npId}#{entity.xfysId}#{entity.isDisabled}#{entity.isStats}#{entity.isDraft}#{entity.createdAt}#{entity.updatedAt}#{entity.createdBy}#{entity.isDeleted}#{entity.landNo}#{entity.landUsage}#{entity.landArea}#{entity.landAddress}#{entity.landStartDate}#{entity.landEndDate}#{entity.landObligeeName}#{entity.landApproveTime}#{entity.homeDisplay}#{entity.installment}#{entity.installmentNum})
        </foreach>
        on duplicate key update
project_name = values(project_name) company_id = values(company_id) company_name = values(company_name) company_time = values(company_time) agent_company_id = values(agent_company_id) agent_company_name = values(agent_company_name) contact_name = values(contact_name) contact_phone = values(contact_phone) project_type = values(project_type) organization_id = values(organization_id) sub_organization_id = values(sub_organization_id) zs_organization_id = values(zs_organization_id) type_id = values(type_id) second_type_id = values(second_type_id) third_type_id = values(third_type_id) ss_type_id = values(ss_type_id) area_id = values(area_id) address = values(address) lat = values(lat) lng = values(lng) actual_start_time = values(actual_start_time) actual_end_time = values(actual_end_time) jgys_status = values(jgys_status) tcty_status = values(tcty_status) operation_time = values(operation_time) investment_type = values(investment_type) investment_entity = values(investment_entity) investment_entity_type = values(investment_entity_type) thumbnail = values(thumbnail) remark = values(remark) status = values(status) review_step = values(review_step) review_object = values(review_object) review_result = values(review_result) progress_content = values(progress_content) progress_update_at = values(progress_update_at) ext_project_id = values(ext_project_id) stz_project_id = values(stz_project_id) sgxk_project_id = values(sgxk_project_id) ydgh_project_id = values(ydgh_project_id) gcgh_project_id = values(gcgh_project_id) hp_project_id = values(hp_project_id) gen_project_id = values(gen_project_id) land_id = values(land_id) zdxm_project_id = values(zdxm_project_id) ybjb_project_id = values(ybjb_project_id) landing_time = values(landing_time) landing = values(landing) dimension_ids = values(dimension_ids) headquarter_ids = values(headquarter_ids) jgysba_id = values(jgysba_id) np_id = values(np_id) xfys_id = values(xfys_id) is_disabled = values(is_disabled) is_stats = values(is_stats) is_draft = values(is_draft) created_at = values(created_at) updated_at = values(updated_at) created_by = values(created_by) is_deleted = values(is_deleted) land_no = values(land_no) land_usage = values(land_usage) land_area = values(land_area) land_address = values(land_address) land_start_date = values(land_start_date) land_end_date = values(land_end_date) land_obligee_name = values(land_obligee_name) land_approve_time = values(land_approve_time) home_display = values(home_display) installment = values(installment) installment_num = values(installment_num)     </insert>

</mapper>

