|
@@ -0,0 +1,171 @@
|
|
|
+<?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.zhjq.mapper.ZhjqPassengerFlowMapper">
|
|
|
+
|
|
|
+ <resultMap type="ZhjqPassengerFlow" id="ZhjqPassengerFlowResult">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="groupId" column="group_id"/>
|
|
|
+ <result property="regionId" column="region_id"/>
|
|
|
+ <result property="statisticsTime" column="statistics_time"/>
|
|
|
+ <result property="enter" column="enter"/>
|
|
|
+ <result property="exit" column="exit"/>
|
|
|
+ <result property="pass" column="pass"/>
|
|
|
+ <result property="holdValue" column="hold_value"/>
|
|
|
+ <result property="allEnter" column="all_enter"/>
|
|
|
+ <result property="allExit" column="all_exit"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectZhjqPassengerFlowVo">
|
|
|
+ select id,
|
|
|
+ group_id,
|
|
|
+ region_id,
|
|
|
+ statistics_time,
|
|
|
+ enter,
|
|
|
+ exit,
|
|
|
+ pass,
|
|
|
+ hold_value,
|
|
|
+ all_enter,
|
|
|
+ all_exit
|
|
|
+ from zhjq_passenger_flow
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectZhjqPassengerFlowList" parameterType="ZhjqPassengerFlow" resultMap="ZhjqPassengerFlowResult">
|
|
|
+ <include refid="selectZhjqPassengerFlowVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="groupId != null and groupId != ''">
|
|
|
+ and group_id = #{groupId}
|
|
|
+ </if>
|
|
|
+ <if test="regionId != null and regionId != ''">
|
|
|
+ and region_id = #{regionId}
|
|
|
+ </if>
|
|
|
+ <if test="statisticsTime != null ">
|
|
|
+ and statistics_time = #{statisticsTime}
|
|
|
+ </if>
|
|
|
+ <if test="enter != null ">
|
|
|
+ and enter = #{enter}
|
|
|
+ </if>
|
|
|
+ <if test="exit != null ">
|
|
|
+ and exit = #{exit}
|
|
|
+ </if>
|
|
|
+ <if test="pass != null ">
|
|
|
+ and pass = #{pass}
|
|
|
+ </if>
|
|
|
+ <if test="holdValue != null ">
|
|
|
+ and hold_value = #{holdValue}
|
|
|
+ </if>
|
|
|
+ <if test="allEnter != null ">
|
|
|
+ and all_enter = #{allEnter}
|
|
|
+ </if>
|
|
|
+ <if test="allExit != null ">
|
|
|
+ and all_exit = #{allExit}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectZhjqPassengerFlowById" parameterType="Long"
|
|
|
+ resultMap="ZhjqPassengerFlowResult">
|
|
|
+ <include refid="selectZhjqPassengerFlowVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertZhjqPassengerFlow" parameterType="ZhjqPassengerFlow" useGeneratedKeys="true"
|
|
|
+ keyProperty="id">
|
|
|
+ insert into zhjq_passenger_flow
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="groupId != null">group_id,
|
|
|
+ </if>
|
|
|
+ <if test="regionId != null">region_id,
|
|
|
+ </if>
|
|
|
+ <if test="statisticsTime != null">statistics_time,
|
|
|
+ </if>
|
|
|
+ <if test="enter != null">enter,
|
|
|
+ </if>
|
|
|
+ <if test="exit != null">exit,
|
|
|
+ </if>
|
|
|
+ <if test="pass != null">pass,
|
|
|
+ </if>
|
|
|
+ <if test="holdValue != null">hold_value,
|
|
|
+ </if>
|
|
|
+ <if test="allEnter != null">all_enter,
|
|
|
+ </if>
|
|
|
+ <if test="allExit != null">all_exit,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="groupId != null">#{groupId},
|
|
|
+ </if>
|
|
|
+ <if test="regionId != null">#{regionId},
|
|
|
+ </if>
|
|
|
+ <if test="statisticsTime != null">#{statisticsTime},
|
|
|
+ </if>
|
|
|
+ <if test="enter != null">#{enter},
|
|
|
+ </if>
|
|
|
+ <if test="exit != null">#{exit},
|
|
|
+ </if>
|
|
|
+ <if test="pass != null">#{pass},
|
|
|
+ </if>
|
|
|
+ <if test="holdValue != null">#{holdValue},
|
|
|
+ </if>
|
|
|
+ <if test="allEnter != null">#{allEnter},
|
|
|
+ </if>
|
|
|
+ <if test="allExit != null">#{allExit},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateZhjqPassengerFlow" parameterType="ZhjqPassengerFlow">
|
|
|
+ update zhjq_passenger_flow
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="groupId != null">group_id =
|
|
|
+ #{groupId},
|
|
|
+ </if>
|
|
|
+ <if test="regionId != null">region_id =
|
|
|
+ #{regionId},
|
|
|
+ </if>
|
|
|
+ <if test="statisticsTime != null">statistics_time =
|
|
|
+ #{statisticsTime},
|
|
|
+ </if>
|
|
|
+ <if test="enter != null">enter =
|
|
|
+ #{enter},
|
|
|
+ </if>
|
|
|
+ <if test="exit != null">exit =
|
|
|
+ #{exit},
|
|
|
+ </if>
|
|
|
+ <if test="pass != null">pass =
|
|
|
+ #{pass},
|
|
|
+ </if>
|
|
|
+ <if test="holdValue != null">hold_value =
|
|
|
+ #{holdValue},
|
|
|
+ </if>
|
|
|
+ <if test="allEnter != null">all_enter =
|
|
|
+ #{allEnter},
|
|
|
+ </if>
|
|
|
+ <if test="allExit != null">all_exit =
|
|
|
+ #{allExit},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteZhjqPassengerFlowById" parameterType="Long">
|
|
|
+ delete
|
|
|
+ from zhjq_passenger_flow
|
|
|
+ where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteZhjqPassengerFlowByIds" parameterType="String">
|
|
|
+ delete from zhjq_passenger_flow where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <insert id="insertBatch" parameterType="java.lang.Integer">
|
|
|
+ insert into zhjq_passenger_flow (group_id, region_id, statistics_time, enter, `exit`, pass, hold_value, all_enter, all_exit) values
|
|
|
+ <foreach collection="list" item="item" separator="," index="index">
|
|
|
+ (#{item.groupId}, #{item.regionId}, #{item.statisticsTime}, #{item.enter}, #{item.exit}, #{item.pass}, #{item.holdValue}, #{item.allEnter}, #{item.allExit})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+</mapper>
|