| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <?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="cn.com.goldenwater.dcproj.dao.BisInspTravelPlanPolylineDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspTravelPlanPolyline" id="bisInspTravelPlanPolylineResultMap">
- <result property="id" column="ID"/>
- <result property="planDayId" column="PLAN_DAY_ID"/>
- <result property="instruction" column="INSTRUCTION"/>
- <result property="distance" column="DISTANCE"/>
- <result property="polyline" column="POLYLINE"/>
- <result property="action" column="ACTION"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="ordr" column="ORDR"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- PLAN_DAY_ID,
- INSTRUCTION,
- DISTANCE,
- POLYLINE,
- ACTION,
- INTM,
- UPTM,
- DATA_STAT,
- ORDR
- </sql>
- <sql id="entity_properties">
- #{id},
- #{planDayId},
- #{instruction},
- #{distance},
- #{polyline},
- #{action},
- #{intm},
- #{uptm},
- #{dataStat},
- #{ordr}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="planDayId != null and planDayId != ''">and PLAN_DAY_ID = #{planDayId}</if>
- <if test="instruction != null and instruction != ''">and INSTRUCTION = #{instruction}</if>
- <if test="distance != null and distance != ''">and DISTANCE = #{distance}</if>
- <if test="polyline != null and polyline != ''">and POLYLINE = #{polyline}</if>
- <if test="action != null and action != ''">and ACTION = #{action}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="ordr != null and ordr != ''">and ORDR = #{ordr}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspTravelPlanPolylineResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_TRAVEL_PLAN_POLYLINE where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspTravelPlanPolylineResultMap">
- select <include refid="table_columns" /> from BIS_INSP_TRAVEL_PLAN_POLYLINE <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspTravelPlanPolylineResultMap">
- select <include refid="table_columns" /> from BIS_INSP_TRAVEL_PLAN_POLYLINE
- </select>
- <select id="findList" resultMap="bisInspTravelPlanPolylineResultMap">
- select <include refid="table_columns" /> from BIS_INSP_TRAVEL_PLAN_POLYLINE <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_TRAVEL_PLAN_POLYLINE <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspTravelPlanPolyline">
- insert into BIS_INSP_TRAVEL_PLAN_POLYLINE( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from BIS_INSP_TRAVEL_PLAN_POLYLINE where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspTravelPlanPolyline">
- delete from BIS_INSP_TRAVEL_PLAN_POLYLINE <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_TRAVEL_PLAN_POLYLINE set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspTravelPlanPolyline">
- update BIS_INSP_TRAVEL_PLAN_POLYLINE
- <trim prefix="set" suffixOverrides=",">
- <if test="planDayId != null and planDayId != ''">PLAN_DAY_ID = #{planDayId},</if>
- <if test="instruction != null and instruction != ''">INSTRUCTION = #{instruction},</if>
- <if test="distance != null and distance != ''">DISTANCE = #{distance},</if>
- <if test="polyline != null and polyline != ''">POLYLINE = #{polyline},</if>
- <if test="action != null and action != ''">ACTION = #{action},</if>
- <if test="ordr != null and ordr != ''">ORDR = #{ordr},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspTravelPlanPolyline">
- update BIS_INSP_TRAVEL_PLAN_POLYLINE
- <trim prefix="set" suffixOverrides=",">
- <if test="planDayId != null and planDayId != ''">PLAN_DAY_ID = #{planDayId},</if>
- <if test="instruction != null and instruction != ''">INSTRUCTION = #{instruction},</if>
- <if test="distance != null and distance != ''">DISTANCE = #{distance},</if>
- <if test="polyline != null and polyline != ''">POLYLINE = #{polyline},</if>
- <if test="action != null and action != ''">ACTION = #{action},</if>
- <if test="ordr != null and ordr != ''">ORDR = #{ordr},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- <!-- 其他自定义SQL -->
- <select id="getPolylineByDayId" resultType="cn.com.goldenwater.dcproj.dto.BisInspTravelPlanPolylineDto">
- select t.*,t.rowid from bis_insp_travel_plan_polyline t where DATA_STAT='0' AND plan_day_id=#{dayId} order by ORDR
- </select>
- <select id="getMaxOne" resultType="java.lang.Integer">
- select max(ORDR) from bis_insp_travel_plan_polyline t where DATA_STAT='0' AND plan_day_id=#{dayId}
- </select>
- </mapper>
|