| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231 |
- <?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"/>
- <result property="actualDuration" column="actual_duration" jdbcType="NUMERIC"/>
- <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"/>
- <result property="maxType" column="max_type" jdbcType="INTEGER"/>
- <result property="maxStatus" column="max_status" jdbcType="INTEGER"/>
- </resultMap>
- <sql id="TOrderPublicReleaseCountAllSql">
- id, order_no, actual_duration, people_count, frequency, create_time, max_duration, max_process, max_type, max_status
- </sql>
- <!--查询单个-->
- <select id="queryById" resultMap="TOrderPublicReleaseCountMap">
- select
- <include refid="TOrderPublicReleaseCountAllSql"/>
- from t_order_public_release_count
- where id = #{id}
- </select>
- <!--查询指定行数据-->
- <select id="findTOrderPublicReleaseCountList" resultMap="TOrderPublicReleaseCountMap">
- select
- <include refid="TOrderPublicReleaseCountAllSql"/>
- from t_order_public_release_count
- <where>
- <if test="id != null">
- and id = #{id}
- </if>
- <if test="orderNo != null and orderNo != ''">
- and order_no = #{orderNo}
- </if>
- <if test="actualDuration != null">
- and actual_duration = #{actualDuration}
- </if>
- <if test="peopleCount != null">
- and people_count = #{peopleCount}
- </if>
- <if test="frequency != null">
- and frequency = #{frequency}
- </if>
- <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>
- <if test="maxType != null">
- and max_type = #{maxType}
- </if>
- <if test="maxStatus != null">
- and max_status = #{maxStatus}
- </if>
- </where>
- <if test="page_sql != null">
- ${page_sql}
- </if>
- </select>
- <!--统计总行数-->
- <select id="findTOrderPublicReleaseCountCount" resultType="java.lang.Integer">
- select count(1)
- from t_order_public_release_count
- <where>
- <if test="id != null">
- and id = #{id}
- </if>
- <if test="orderNo != null and orderNo != ''">
- and order_no = #{orderNo}
- </if>
- <if test="actualDuration != null">
- and actual_duration = #{actualDuration}
- </if>
- <if test="peopleCount != null">
- and people_count = #{peopleCount}
- </if>
- <if test="frequency != null">
- and frequency = #{frequency}
- </if>
- <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>
- <if test="maxType != null">
- and max_type = #{maxType}
- </if>
- <if test="maxStatus != null">
- and max_status = #{maxStatus}
- </if>
- </where>
- </select>
- <!--新增所有列-->
- <insert id="insert" keyProperty="id" useGeneratedKeys="true">
- insert into t_order_public_release_count(order_no, actual_duration, people_count, frequency, create_time,
- max_duration, max_process, max_type, max_status)
- values (#{orderNo}, #{actualDuration}, #{peopleCount}, #{frequency}, #{createTime}, #{maxDuration},
- #{maxProcess}, #{maxType}, #{maxStatus})
- </insert>
- <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
- insert into t_order_public_release_count(order_no, actual_duration, people_count, frequency, create_time,
- max_duration, max_process, max_type, max_status)
- values
- <foreach collection="entities" item="entity" separator=",">
- (#{entity.orderNo}, #{entity.actualDuration}, #{entity.peopleCount}, #{entity.frequency},
- #{entity.createTime}, #{entity.maxDuration}, #{entity.maxProcess}, #{entity.maxType}, #{entity.maxStatus})
- </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,
- max_duration, max_process, max_type, max_status)
- values
- <foreach collection="entities" item="entity" separator=",">
- (#{entity.orderNo}, #{entity.actualDuration}, #{entity.peopleCount}, #{entity.frequency},
- #{entity.createTime}, #{entity.maxDuration}, #{entity.maxProcess}, #{entity.maxType}, #{entity.maxStatus})
- </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),
- max_duration = values(max_duration),
- max_process = values(max_process),
- max_type = values(max_type),
- max_status = values(max_status)
- </insert>
- <!--通过主键修改数据-->
- <update id="update">
- update t_order_public_release_count
- <set>
- <if test="orderNo != null and orderNo != ''">
- order_no = #{orderNo},
- </if>
- <if test="actualDuration != null">
- actual_duration = #{actualDuration},
- </if>
- <if test="peopleCount != null">
- people_count = #{peopleCount},
- </if>
- <if test="frequency != null">
- frequency = #{frequency},
- </if>
- <if test="createTime != null">
- create_time = #{createTime},
- </if>
- <if test="maxDuration != null">
- max_duration = #{maxDuration},
- </if>
- <if test="maxProcess != null">
- max_process = #{maxProcess},
- </if>
- <if test="maxType != null">
- max_type = #{maxType},
- </if>
- <if test="maxStatus != null">
- max_status = #{maxStatus},
- </if>
- </set>
- where id = #{id}
- </update>
- <!--通过主键删除-->
- <delete id="deleteById">
- delete
- from t_order_public_release_count
- where id = #{id}
- </delete>
- <update id="updateByOrderNo">
- update t_order_public_release_count
- <set>
- <if test="actualDuration != null">
- actual_duration = #{actualDuration},
- </if>
- <if test="peopleCount != null">
- people_count = #{peopleCount},
- </if>
- <if test="frequency != null">
- frequency = #{frequency},
- </if>
- <if test="createTime != null">
- create_time = #{createTime},
- </if>
- <if test="maxDuration != null">
- max_duration = #{maxDuration},
- </if>
- <if test="maxProcess != null">
- max_process = #{maxProcess},
- </if>
- <if test="maxType != null">
- max_type = #{maxType},
- </if>
- <if test="maxStatus != null">
- max_status = #{maxStatus},
- </if>
- </set>
- where order_no = #{orderNo,jdbcType=VARCHAR}
- </update>
- <select id="selectByOrderNo" resultMap="TOrderPublicReleaseCountMap">
- select
- <include refid="TOrderPublicReleaseCountAllSql"/>
- from t_order_public_release_count
- where order_no = #{orderNo,jdbcType=VARCHAR}
- </select>
- </mapper>
|