Newer
Older
huludao / src / main / resources / mapper / project / ProjectAdditionalInfoMapper.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" >
<mapper namespace="com.xf.huludao.project.dao.ProjectAdditionalInfoMapper">

    <resultMap id="projectAdditionalInfoMap" type="com.xf.huludao.project.entity.ProjectAdditionalInfo">
        <id column="info_serial"  property="infoSerial"/>
        <result column="city_no" property="cityNo"/>
        <result column="province_no"  property="provinceNo"/>
        <result column="town_name"  property="townName"/>
        <result column="project_name"  property="projectName"/>
        <result column="build_type" property="buildType"/>
        <result column="project_drainage_zoning"  property="projectDrainageZoning"/>
        <result column="commence_date" property="commenceDate"/>
        <result column="completion_date"  property="completionDate"/>
        <result column="planning_conditions" property="planningConditions"/>
        <result column="design_parameters"  property="designParameters"/>
        <result column="projec_quantities"  property="projecQuantities"/>
        <result column="build_state_no"  property="buildStateNo"/>
        <result column="build_state_name"  property="buildStateName"/>
        <result column="project_schedule"  property="projectSchedule"/>
        <result column="design_company" property="designCompany"/>
        <result column="construction_company"  property="constructionCompany"/>
        <result column="devops_company"  property="devopsCompany"/>
        <result column="project_text"  property="projectText"/>
        <result column="project_invest"  property="projectInvest"/>

        <result column="project_name" property="projectName"/>
        <result column="project_type" property="projectType"/>
        <result column="project_type_name" property="projectTypeName"/>
        <result column="duty_person" property="dutyPerson"/>
        <result column="duty_dept" property="dutyDept"/>
        <result column="principal_phone" property="principalPhone"/>

        <result column="approval_documents" property="approvalDocuments"/>
        <result column="project_total_money" property="projectTotalMoney"/>
        <result column="project_government_money" property="projectGovernmentMoney"/>
        <result column="project_society_money" property="projectSocietyMoney"/>
        <result column="project_operation_mode" property="projectOperationMode"/>
        <result column="project_sponge_money" property="projectSpongeMoney"/>

    </resultMap>

    <select id="findInfoByProjectNo" resultMap="projectAdditionalInfoMap" parameterType="string">
        SELECT pai.*,
               p.project_name,
               p.project_type,
               p.project_type_name,
               p.duty_person,
               p.duty_dept,
               p.principal_phone
        FROM project_additional_info pai
                 LEFT JOIN
             project p
             ON
                 pai.project_no = p.project_no
        WHERE pai.project_no = #{projectNo}
    </select>


</mapper>