|
|
@@ -0,0 +1,140 @@
|
|
|
+<?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.OrderPublicReleaseLogMapper">
|
|
|
+ <resultMap type="com.goafanti.common.model.OrderPublicReleaseLog" id="OrderPublicReleaseLogMap">
|
|
|
+ <result property="id" column="id" jdbcType="INTEGER"/>
|
|
|
+ <result property="orderNo" column="order_no" jdbcType="INTEGER"/>
|
|
|
+ <result property="processStatus" column="process_status" jdbcType="INTEGER"/>
|
|
|
+ <result property="remarks" column="remarks" jdbcType="VARCHAR"/>
|
|
|
+ <result property="auditor" column="auditor" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="OrderPublicReleaseLogAllSql">
|
|
|
+ id, order_no, process_status, remarks, auditor, create_time
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <!--查询单个-->
|
|
|
+ <select id="queryById" resultMap="OrderPublicReleaseLogMap">
|
|
|
+ select
|
|
|
+ <include refid="OrderPublicReleaseLogAllSql"/>
|
|
|
+ from order_public_release_log
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--查询指定行数据-->
|
|
|
+ <select id="findOrderPublicReleaseLogList" resultMap="OrderPublicReleaseLogMap">
|
|
|
+ select
|
|
|
+ <include refid="OrderPublicReleaseLogAllSql"/>
|
|
|
+
|
|
|
+ from order_public_release_log
|
|
|
+ <where>
|
|
|
+ <if test="id != null">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ and order_no = #{orderNo}
|
|
|
+ </if>
|
|
|
+ <if test="processStatus != null">
|
|
|
+ and process_status = #{processStatus}
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null and remarks != ''">
|
|
|
+ and remarks = #{remarks}
|
|
|
+ </if>
|
|
|
+ <if test="auditor != null and auditor != ''">
|
|
|
+ and auditor = #{auditor}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ and create_time = #{createTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--统计总行数-->
|
|
|
+ <select id="findOrderPublicReleaseLogCount" resultType="java.lang.Integer">
|
|
|
+ select count(1)
|
|
|
+ from order_public_release_log
|
|
|
+ <where>
|
|
|
+ <if test="id != null">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ and order_no = #{orderNo}
|
|
|
+ </if>
|
|
|
+ <if test="processStatus != null">
|
|
|
+ and process_status = #{processStatus}
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null and remarks != ''">
|
|
|
+ and remarks = #{remarks}
|
|
|
+ </if>
|
|
|
+ <if test="auditor != null and auditor != ''">
|
|
|
+ and auditor = #{auditor}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ and create_time = #{createTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--新增所有列-->
|
|
|
+ <insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into order_public_release_log(order_no, process_status, remarks, auditor, create_time)
|
|
|
+ values (#{orderNo}, #{processStatus}, #{remarks}, #{auditor}, #{createTime})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into order_public_release_log(order_no, process_status, remarks, auditor, create_time)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.orderNo}, #{entity.processStatus}, #{entity.remarks}, #{entity.auditor}, #{entity.createTime})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into order_public_release_log(order_no, process_status, remarks, auditor, create_time)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.orderNo}, #{entity.processStatus}, #{entity.remarks}, #{entity.auditor}, #{entity.createTime})
|
|
|
+ </foreach>
|
|
|
+ on duplicate key update
|
|
|
+ order_no = values(order_no),
|
|
|
+ process_status = values(process_status),
|
|
|
+ remarks = values(remarks),
|
|
|
+ auditor = values(auditor),
|
|
|
+ create_time = values(create_time)
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!--通过主键修改数据-->
|
|
|
+ <update id="update">
|
|
|
+ update order_public_release_log
|
|
|
+ <set>
|
|
|
+ <if test="orderNo != null">
|
|
|
+ order_no = #{orderNo},
|
|
|
+ </if>
|
|
|
+ <if test="processStatus != null">
|
|
|
+ process_status = #{processStatus},
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null and remarks != ''">
|
|
|
+ remarks = #{remarks},
|
|
|
+ </if>
|
|
|
+ <if test="auditor != null and auditor != ''">
|
|
|
+ auditor = #{auditor},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!--通过主键删除-->
|
|
|
+ <delete id="deleteById">
|
|
|
+ delete
|
|
|
+ from order_public_release_log
|
|
|
+ where id = #{id}
|
|
|
+ </delete>
|
|
|
+</mapper>
|
|
|
+
|