|
|
@@ -1,7 +1,6 @@
|
|
|
<?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.goafanti.common.dao.TOrderPublicReleaseCountMapper">
|
|
|
-
|
|
|
<resultMap type="com.goafanti.common.model.TOrderPublicReleaseCount" id="TOrderPublicReleaseCountMap">
|
|
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
|
|
<result property="orderNo" column="order_no" jdbcType="VARCHAR"/>
|
|
|
@@ -9,16 +8,18 @@
|
|
|
<result property="peopleCount" column="people_count" jdbcType="INTEGER"/>
|
|
|
<result property="frequency" column="frequency" jdbcType="INTEGER"/>
|
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="maxDuration" column="max_duration" jdbcType="NUMERIC"/>
|
|
|
+ <result property="maxProcess" column="max_process" jdbcType="INTEGER"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <sql id="TOrderPublicReleaseCountAllSql">
|
|
|
+ id, order_no, actual_duration, people_count, frequency, create_time, max_duration, max_process
|
|
|
+ </sql>
|
|
|
+
|
|
|
<!--查询单个-->
|
|
|
<select id="queryById" resultMap="TOrderPublicReleaseCountMap">
|
|
|
- select id,
|
|
|
- order_no,
|
|
|
- actual_duration,
|
|
|
- people_count,
|
|
|
- frequency,
|
|
|
- create_time
|
|
|
+ select
|
|
|
+ <include refid="TOrderPublicReleaseCountAllSql"/>
|
|
|
from t_order_public_release_count
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
@@ -26,7 +27,8 @@
|
|
|
<!--查询指定行数据-->
|
|
|
<select id="findTOrderPublicReleaseCountList" resultMap="TOrderPublicReleaseCountMap">
|
|
|
select
|
|
|
- id, order_no, actual_duration, people_count, frequency, create_time
|
|
|
+ <include refid="TOrderPublicReleaseCountAllSql"/>
|
|
|
+
|
|
|
from t_order_public_release_count
|
|
|
<where>
|
|
|
<if test="id != null">
|
|
|
@@ -47,8 +49,16 @@
|
|
|
<if test="createTime != null">
|
|
|
and create_time = #{createTime}
|
|
|
</if>
|
|
|
+ <if test="maxDuration != null">
|
|
|
+ and max_duration = #{maxDuration}
|
|
|
+ </if>
|
|
|
+ <if test="maxProcess != null">
|
|
|
+ and max_process = #{maxProcess}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
- limit #{pageable.offset}, #{pageable.pageSize}
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
<!--统计总行数-->
|
|
|
@@ -74,37 +84,49 @@
|
|
|
<if test="createTime != null">
|
|
|
and create_time = #{createTime}
|
|
|
</if>
|
|
|
+ <if test="maxDuration != null">
|
|
|
+ and max_duration = #{maxDuration}
|
|
|
+ </if>
|
|
|
+ <if test="maxProcess != null">
|
|
|
+ and max_process = #{maxProcess}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
<!--新增所有列-->
|
|
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into t_order_public_release_count(order_no, actual_duration, people_count, frequency)
|
|
|
- values (#{orderNo}, #{actualDuration}, #{peopleCount}, #{frequency})
|
|
|
+ insert into t_order_public_release_count(order_no, actual_duration, people_count, frequency, create_time,
|
|
|
+ max_duration, max_process)
|
|
|
+ values (#{orderNo}, #{actualDuration}, #{peopleCount}, #{frequency}, #{createTime}, #{maxDuration},
|
|
|
+ #{maxProcess})
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into t_order_public_release_count(order_no, actual_duration, people_count, frequency, create_time)
|
|
|
+ insert into t_order_public_release_count(order_no, actual_duration, people_count, frequency, create_time,
|
|
|
+ max_duration, max_process)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
(#{entity.orderNo}, #{entity.actualDuration}, #{entity.peopleCount}, #{entity.frequency},
|
|
|
- #{entity.createTime})
|
|
|
+ #{entity.createTime}, #{entity.maxDuration}, #{entity.maxProcess})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
- insert into t_order_public_release_count(order_no, actual_duration, people_count, frequency, create_time)
|
|
|
+ insert into t_order_public_release_count(order_no, actual_duration, people_count, frequency, create_time,
|
|
|
+ max_duration, max_process)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
(#{entity.orderNo}, #{entity.actualDuration}, #{entity.peopleCount}, #{entity.frequency},
|
|
|
- #{entity.createTime})
|
|
|
+ #{entity.createTime}, #{entity.maxDuration}, #{entity.maxProcess})
|
|
|
</foreach>
|
|
|
on duplicate key update
|
|
|
order_no = values(order_no),
|
|
|
actual_duration = values(actual_duration),
|
|
|
people_count = values(people_count),
|
|
|
frequency = values(frequency),
|
|
|
- create_time = values(create_time)
|
|
|
+ create_time = values(create_time),
|
|
|
+ max_duration = values(max_duration),
|
|
|
+ max_process = values(max_process)
|
|
|
</insert>
|
|
|
|
|
|
<!--通过主键修改数据-->
|
|
|
@@ -126,6 +148,12 @@
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime},
|
|
|
</if>
|
|
|
+ <if test="maxDuration != null">
|
|
|
+ max_duration = #{maxDuration},
|
|
|
+ </if>
|
|
|
+ <if test="maxProcess != null">
|
|
|
+ max_process = #{maxProcess},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
@@ -143,13 +171,15 @@
|
|
|
set
|
|
|
actual_duration = #{actualDuration,jdbcType=DOUBLE},
|
|
|
people_count = #{peopleCount,jdbcType=INTEGER},
|
|
|
- frequency = #{frequency,jdbcType=INTEGER}
|
|
|
+ frequency = #{frequency,jdbcType=INTEGER},
|
|
|
+ max_duration = #{maxDuration},
|
|
|
+ max_process = #{maxProcess}
|
|
|
where order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
|
|
|
<select id="selectByOrderNo" resultMap="TOrderPublicReleaseCountMap">
|
|
|
select
|
|
|
- id, order_no, actual_duration, people_count, frequency, create_time
|
|
|
+ id, order_no, actual_duration, people_count, frequency, create_time,max_duration, max_process
|
|
|
from t_order_public_release_count
|
|
|
where order_no = #{orderNo,jdbcType=VARCHAR}
|
|
|
</select>
|