|
@@ -7,27 +7,35 @@
|
|
|
<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="groupName" column="group_name"/>
|
|
|
+ <result property="flowInNum" column="flow_in_num"/>
|
|
|
+ <result property="noRepeatInNum" column="no_repeat_in_num"/>
|
|
|
+ <result property="flowOutNum" column="flow_out_num"/>
|
|
|
+ <result property="noRepeatOutNum" column="no_repeat_out_num"/>
|
|
|
<result property="holdValue" column="hold_value"/>
|
|
|
- <result property="allEnter" column="all_enter"/>
|
|
|
- <result property="allExit" column="all_exit"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="netValue" column="net_value"/>
|
|
|
+ <result property="statTime" column="start_time"/>
|
|
|
+ <result property="passShopNumber" column="pass_shop_number"/>
|
|
|
+ <result property="insertTime" column="insert_time"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectZhjqPassengerFlowVo">
|
|
|
select id,
|
|
|
group_id,
|
|
|
- region_id,
|
|
|
- statistics_time,
|
|
|
- enter,
|
|
|
- exit,
|
|
|
- pass,
|
|
|
+ group_name,
|
|
|
+ flow_in_num,
|
|
|
+ no_repeat_in_num,
|
|
|
+ flow_out_num,
|
|
|
+ no_repeat_out_num,
|
|
|
hold_value,
|
|
|
- all_enter,
|
|
|
- all_exit
|
|
|
+ create_time,
|
|
|
+ update_time,
|
|
|
+ net_value,
|
|
|
+ start_time,
|
|
|
+ pass_shop_number,
|
|
|
+ insert_time
|
|
|
from zhjq_passenger_flow
|
|
|
</sql>
|
|
|
|
|
@@ -37,29 +45,32 @@
|
|
|
<if test="groupId != null and groupId != ''">
|
|
|
and group_id = #{groupId}
|
|
|
</if>
|
|
|
- <if test="regionId != null and regionId != ''">
|
|
|
- and region_id = #{regionId}
|
|
|
+ <if test="groupName != null and groupName != ''">
|
|
|
+ and group_name like concat('%', #{groupName}, '%')
|
|
|
</if>
|
|
|
- <if test="statisticsTime != null ">
|
|
|
- and statistics_time = #{statisticsTime}
|
|
|
+ <if test="flowInNum != null ">
|
|
|
+ and flow_in_num = #{flowInNum}
|
|
|
</if>
|
|
|
- <if test="enter != null ">
|
|
|
- and enter = #{enter}
|
|
|
+ <if test="noRepeatInNum != null ">
|
|
|
+ and no_repeat_in_num = #{noRepeatInNum}
|
|
|
</if>
|
|
|
- <if test="exit != null ">
|
|
|
- and exit = #{exit}
|
|
|
+ <if test="flowOutNum != null ">
|
|
|
+ and flow_out_num = #{flowOutNum}
|
|
|
</if>
|
|
|
- <if test="pass != null ">
|
|
|
- and pass = #{pass}
|
|
|
+ <if test="noRepeatOutNum != null ">
|
|
|
+ and no_repeat_out_num = #{noRepeatOutNum}
|
|
|
</if>
|
|
|
<if test="holdValue != null ">
|
|
|
and hold_value = #{holdValue}
|
|
|
</if>
|
|
|
- <if test="allEnter != null ">
|
|
|
- and all_enter = #{allEnter}
|
|
|
+ <if test="netValue != null and netValue != ''">
|
|
|
+ and net_value = #{netValue}
|
|
|
</if>
|
|
|
- <if test="allExit != null ">
|
|
|
- and all_exit = #{allExit}
|
|
|
+ <if test="statTime != null ">
|
|
|
+ and start_time = #{statTime}
|
|
|
+ </if>
|
|
|
+ <if test="passShopNumber != null ">
|
|
|
+ and pass_shop_number = #{passShopNumber}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
@@ -76,41 +87,53 @@
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="groupId != null">group_id,
|
|
|
</if>
|
|
|
- <if test="regionId != null">region_id,
|
|
|
+ <if test="groupName != null">group_name,
|
|
|
</if>
|
|
|
- <if test="statisticsTime != null">statistics_time,
|
|
|
+ <if test="flowInNum != null">flow_in_num,
|
|
|
</if>
|
|
|
- <if test="enter != null">enter,
|
|
|
+ <if test="noRepeatInNum != null">no_repeat_in_num,
|
|
|
</if>
|
|
|
- <if test="exit != null">exit,
|
|
|
+ <if test="flowOutNum != null">flow_out_num,
|
|
|
</if>
|
|
|
- <if test="pass != null">pass,
|
|
|
+ <if test="noRepeatOutNum != null">no_repeat_out_num,
|
|
|
</if>
|
|
|
<if test="holdValue != null">hold_value,
|
|
|
</if>
|
|
|
- <if test="allEnter != null">all_enter,
|
|
|
+ <if test="createTime != null">create_time,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">update_time,
|
|
|
+ </if>
|
|
|
+ <if test="netValue != null">net_value,
|
|
|
</if>
|
|
|
- <if test="allExit != null">all_exit,
|
|
|
+ <if test="statTime != null">start_time,
|
|
|
+ </if>
|
|
|
+ <if test="passShopNumber != null">pass_shop_number,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="groupId != null">#{groupId},
|
|
|
</if>
|
|
|
- <if test="regionId != null">#{regionId},
|
|
|
+ <if test="groupName != null">#{groupName},
|
|
|
</if>
|
|
|
- <if test="statisticsTime != null">#{statisticsTime},
|
|
|
+ <if test="flowInNum != null">#{flowInNum},
|
|
|
</if>
|
|
|
- <if test="enter != null">#{enter},
|
|
|
+ <if test="noRepeatInNum != null">#{noRepeatInNum},
|
|
|
</if>
|
|
|
- <if test="exit != null">#{exit},
|
|
|
+ <if test="flowOutNum != null">#{flowOutNum},
|
|
|
</if>
|
|
|
- <if test="pass != null">#{pass},
|
|
|
+ <if test="noRepeatOutNum != null">#{noRepeatOutNum},
|
|
|
</if>
|
|
|
<if test="holdValue != null">#{holdValue},
|
|
|
</if>
|
|
|
- <if test="allEnter != null">#{allEnter},
|
|
|
+ <if test="createTime != null">#{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">#{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="netValue != null">#{netValue},
|
|
|
</if>
|
|
|
- <if test="allExit != null">#{allExit},
|
|
|
+ <if test="statTime != null">#{statTime},
|
|
|
+ </if>
|
|
|
+ <if test="passShopNumber != null">#{passShopNumber},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
@@ -121,29 +144,38 @@
|
|
|
<if test="groupId != null">group_id =
|
|
|
#{groupId},
|
|
|
</if>
|
|
|
- <if test="regionId != null">region_id =
|
|
|
- #{regionId},
|
|
|
+ <if test="groupName != null">group_name =
|
|
|
+ #{groupName},
|
|
|
</if>
|
|
|
- <if test="statisticsTime != null">statistics_time =
|
|
|
- #{statisticsTime},
|
|
|
+ <if test="flowInNum != null">flow_in_num =
|
|
|
+ #{flowInNum},
|
|
|
</if>
|
|
|
- <if test="enter != null">enter =
|
|
|
- #{enter},
|
|
|
+ <if test="noRepeatInNum != null">no_repeat_in_num =
|
|
|
+ #{noRepeatInNum},
|
|
|
</if>
|
|
|
- <if test="exit != null">exit =
|
|
|
- #{exit},
|
|
|
+ <if test="flowOutNum != null">flow_out_num =
|
|
|
+ #{flowOutNum},
|
|
|
</if>
|
|
|
- <if test="pass != null">pass =
|
|
|
- #{pass},
|
|
|
+ <if test="noRepeatOutNum != null">no_repeat_out_num =
|
|
|
+ #{noRepeatOutNum},
|
|
|
</if>
|
|
|
<if test="holdValue != null">hold_value =
|
|
|
#{holdValue},
|
|
|
</if>
|
|
|
- <if test="allEnter != null">all_enter =
|
|
|
- #{allEnter},
|
|
|
+ <if test="createTime != null">create_time =
|
|
|
+ #{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">update_time =
|
|
|
+ #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="netValue != null">net_value =
|
|
|
+ #{netValue},
|
|
|
</if>
|
|
|
- <if test="allExit != null">all_exit =
|
|
|
- #{allExit},
|
|
|
+ <if test="statTime != null">start_time =
|
|
|
+ #{statTime},
|
|
|
+ </if>
|
|
|
+ <if test="passShopNumber != null">pass_shop_number =
|
|
|
+ #{passShopNumber},
|
|
|
</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
@@ -161,11 +193,34 @@
|
|
|
#{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})
|
|
|
+ insert into zhjq_passenger_flow (group_id,
|
|
|
+ group_name,
|
|
|
+ flow_in_num,
|
|
|
+ no_repeat_in_num,
|
|
|
+ flow_out_num,
|
|
|
+ no_repeat_out_num,
|
|
|
+ hold_value,
|
|
|
+ create_time,
|
|
|
+ update_time,
|
|
|
+ net_value,
|
|
|
+ stat_time,
|
|
|
+ pass_shop_number,
|
|
|
+ insert_time) values
|
|
|
+ <foreach item="item" collection="list" separator=",">
|
|
|
+ (#{item.groupId},
|
|
|
+ #{item.groupName},
|
|
|
+ #{item.flowInNum},
|
|
|
+ #{item.noRepeatInNum},
|
|
|
+ #{item.flowOutNum},
|
|
|
+ #{item.noRepeatOutNum},
|
|
|
+ #{item.holdValue},
|
|
|
+ #{item.createTime},
|
|
|
+ #{item.updateTime},
|
|
|
+ #{item.netValue},
|
|
|
+ #{item.statTime},
|
|
|
+ #{item.passShopNumber},
|
|
|
+ now())
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
</mapper>
|