Newer
Older
huludao / src / main / resources / mapper / RiverManage / PatrolManageLawBaseMapper.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.newfiber.api.pc.dao.RiverManage.PatrolManageLawBaseMapper">

     <!-- 通用映射列 -->
    <resultMap id="BaseResultMap" type="com.newfiber.api.pc.model.River.PatrolManageLawBase">
                    <result column="id"  property="id"/>
                    <result column="event_desc"  property="eventDesc"/>
                    <result column="other_task_num"  property="otherTaskNum"/>
                    <result column="address"  property="address"/>
                    <result column="coordinate_x"  property="coordinateX"/>
                    <result column="coordinate_y"  property="coordinateY"/>
                    <result column="lontitude"  property="lontitude"/>
                    <result column="latitude"  property="latitude"/>
                    <result column="event_src_iD"  property="eventSrcId"/>
                    <result column="district_code"  property="districtCode"/>
                    <result column="district_name"  property="districtName"/>
                    <result column="street_code"  property="streetCode"/>
                    <result column="street_name"  property="streetName"/>
                    <result column="community_code"  property="communityCode"/>
                    <result column="community_name"  property="communityName"/>
                    <result column="rec_type_iD"  property="recTypeId"/>
                    <result column="event_level_iD"  property="eventLevelId"/>
                    <result column="event_type_code"  property="eventTypeCode"/>
                    <result column="main_type_code"  property="mainTypeCode"/>
                    <result column="sub_type_code"  property="subTypeCode"/>
                    <result column="third_type_code"  property="thirdTypeCode"/>
                    <result column="media_num"  property="mediaNum"/>
                    <result column="human_name"  property="humanName"/>
                    <result column="cellphone"  property="cellphone"/>
                    <result column="deadline_time"  property="deadlineTime"/>
                    <result column="newInst_cond_iD"  property="newinstCondId"/>
                    <result column="newInst_cond_name"  property="newinstCondName"/>
                    <result column="time_area_iD"  property="timeAreaId"/>
                    <result column="time_area_name"  property="timeAreaName"/>
                    <result column="opinion"  property="opinion"/>
                    <result column="part_code"  property="partCode"/>
                    <result column="urgent_flag"  property="urgentFlag"/>
                    <result column="max_type_event_code"  property="maxTypeEventCode"/>
                    <result column="part_type"  property="partType"/>
                    <result column="part_iD"  property="partId"/>
                    <result column="cretae_time"  property="cretaeTime"/>
                    <result column="update_time"  property="updateTime"/>
                    <result column="rec_process"  property="recProcess"/>
                    <result column="task_state"  property="taskState"/>
                    <result column="task_state_desc"  property="taskStateDesc"/>
            </resultMap>

    <!-- 通用数据库列 -->
    <sql id="Base_Column_List">
              id,
              event_desc,
              other_task_num,
              address,
              coordinate_x,
              coordinate_y,
              event_src_iD,
              district_code,
              district_name,
              street_code,
              street_name,
              community_code,
              community_name,
              rec_type_iD,
              event_level_iD,
              event_type_code,
              main_type_code,
              sub_type_code,

              deadline_time,

              time_area_iD,
              time_area_name,
              opinion,
              part_code,
              urgent_flag,

              part_type,
              part_iD,
              update_time,
              rec_process,
              task_state,
              task_state_desc
          </sql>


    <select id="selectByTaskNum" resultType="com.newfiber.api.pc.model.River.PatrolManageLawBase">
        select
        <include refid="Base_Column_List"/>
        from patrol_manage_law_base pmlb
        where 1=1
        <if test="taskNum != null ">
            and pmlb.task_num = #{taskNum}
        </if>
        limit 1
    </select>

</mapper>