|
|
@@ -2,17 +2,13 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.goafanti.common.dao.PublicReleaseMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.goafanti.common.model.PublicRelease">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 10 15:22:12 CST 2021.
|
|
|
- -->
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
<result column="uid" jdbcType="VARCHAR" property="uid" />
|
|
|
<result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
<result column="release_start" jdbcType="TIMESTAMP" property="releaseStart" />
|
|
|
<result column="release_end" jdbcType="TIMESTAMP" property="releaseEnd" />
|
|
|
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
|
|
+ <result column="annex_url" jdbcType="VARCHAR" property="annexUrl" />
|
|
|
<result column="user_name" jdbcType="VARCHAR" property="userName" />
|
|
|
<result column="longitude" jdbcType="VARCHAR" property="longitude" />
|
|
|
<result column="latitude" jdbcType="VARCHAR" property="latitude" />
|
|
|
@@ -20,92 +16,56 @@
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
<result column="clock_in" jdbcType="INTEGER" property="clockIn" />
|
|
|
<result column="clock_in_time" jdbcType="TIMESTAMP" property="clockInTime" />
|
|
|
+ <result column="photo_url" jdbcType="VARCHAR" property="photoUrl" />
|
|
|
<result column="pid" jdbcType="VARCHAR" property="pid" />
|
|
|
<result column="pname" jdbcType="VARCHAR" property="pname" />
|
|
|
<result column="ufid" jdbcType="VARCHAR" property="ufid" />
|
|
|
<result column="duration" jdbcType="DOUBLE" property="duration" />
|
|
|
<result column="valid_date" jdbcType="VARCHAR" property="validDate" />
|
|
|
- </resultMap>
|
|
|
- <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.PublicRelease">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 10 15:22:12 CST 2021.
|
|
|
- -->
|
|
|
- <result column="annex_url" jdbcType="LONGVARCHAR" property="annexUrl" />
|
|
|
- <result column="photo_url" jdbcType="LONGVARCHAR" property="photoUrl" />
|
|
|
+ <result column="new_user" jdbcType="INTEGER" property="newUser" />
|
|
|
+ <result column="sign_sum" jdbcType="INTEGER" property="signSum" />
|
|
|
+ <result column="main_status" jdbcType="INTEGER" property="mainStatus" />
|
|
|
+ <result column="supplement" jdbcType="VARCHAR" property="supplement" />
|
|
|
+ <result column="audit_info" jdbcType="VARCHAR" property="auditInfo" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 10 15:22:12 CST 2021.
|
|
|
- -->
|
|
|
- id, `uid`, aid, release_start, release_end, remarks, user_name, longitude, latitude,
|
|
|
- `status`, create_time, clock_in, clock_in_time, pid, pname, ufid, duration, valid_date
|
|
|
- </sql>
|
|
|
- <sql id="Blob_Column_List">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 10 15:22:12 CST 2021.
|
|
|
- -->
|
|
|
- annex_url, photo_url
|
|
|
+ id, `uid`, aid, release_start, release_end, remarks, annex_url, user_name, longitude,
|
|
|
+ latitude, `status`, create_time, clock_in, clock_in_time, photo_url, pid, pname,
|
|
|
+ ufid, duration, valid_date, new_user, sign_sum, main_status, supplement, audit_info
|
|
|
</sql>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 10 15:22:12 CST 2021.
|
|
|
- -->
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
- ,
|
|
|
- <include refid="Blob_Column_List" />
|
|
|
from public_release
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 10 15:22:12 CST 2021.
|
|
|
- -->
|
|
|
delete from public_release
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</delete>
|
|
|
- <insert id="insert" parameterType="com.goafanti.common.model.PublicRelease">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 10 15:22:12 CST 2021.
|
|
|
- -->
|
|
|
- insert into public_release (id, `uid`, aid,
|
|
|
- release_start, release_end, remarks,
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
|
|
|
+ insert into public_release (`uid`, aid, release_start,
|
|
|
+ release_end, remarks, annex_url,
|
|
|
user_name, longitude, latitude,
|
|
|
`status`, create_time, clock_in,
|
|
|
- clock_in_time, pid, pname,
|
|
|
- ufid, duration, valid_date,
|
|
|
- annex_url, photo_url)
|
|
|
- values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
|
|
|
- #{releaseStart,jdbcType=TIMESTAMP}, #{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR},
|
|
|
+ clock_in_time, photo_url, pid,
|
|
|
+ pname, ufid, duration,
|
|
|
+ valid_date, new_user, sign_sum,
|
|
|
+ main_status, supplement, audit_info
|
|
|
+ )
|
|
|
+ values (#{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{releaseStart,jdbcType=TIMESTAMP},
|
|
|
+ #{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{annexUrl,jdbcType=VARCHAR},
|
|
|
#{userName,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR},
|
|
|
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{clockIn,jdbcType=INTEGER},
|
|
|
- #{clockInTime,jdbcType=TIMESTAMP}, #{pid,jdbcType=VARCHAR}, #{pname,jdbcType=VARCHAR},
|
|
|
- #{ufid,jdbcType=VARCHAR}, #{duration,jdbcType=DOUBLE}, #{validDate,jdbcType=VARCHAR},
|
|
|
- #{annexUrl,jdbcType=LONGVARCHAR}, #{photoUrl,jdbcType=LONGVARCHAR})
|
|
|
+ #{clockInTime,jdbcType=TIMESTAMP}, #{photoUrl,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
|
|
|
+ #{pname,jdbcType=VARCHAR}, #{ufid,jdbcType=VARCHAR}, #{duration,jdbcType=DOUBLE},
|
|
|
+ #{validDate,jdbcType=VARCHAR}, #{newUser,jdbcType=INTEGER}, #{signSum,jdbcType=INTEGER},
|
|
|
+ #{mainStatus,jdbcType=INTEGER}, #{supplement,jdbcType=VARCHAR}, #{auditInfo,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
</insert>
|
|
|
- <insert id="insertSelective" parameterType="com.goafanti.common.model.PublicRelease">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 10 15:22:12 CST 2021.
|
|
|
- -->
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
|
|
|
insert into public_release
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- id,
|
|
|
- </if>
|
|
|
<if test="uid != null">
|
|
|
`uid`,
|
|
|
</if>
|
|
|
@@ -121,6 +81,9 @@
|
|
|
<if test="remarks != null">
|
|
|
remarks,
|
|
|
</if>
|
|
|
+ <if test="annexUrl != null">
|
|
|
+ annex_url,
|
|
|
+ </if>
|
|
|
<if test="userName != null">
|
|
|
user_name,
|
|
|
</if>
|
|
|
@@ -142,6 +105,9 @@
|
|
|
<if test="clockInTime != null">
|
|
|
clock_in_time,
|
|
|
</if>
|
|
|
+ <if test="photoUrl != null">
|
|
|
+ photo_url,
|
|
|
+ </if>
|
|
|
<if test="pid != null">
|
|
|
pid,
|
|
|
</if>
|
|
|
@@ -157,17 +123,23 @@
|
|
|
<if test="validDate != null">
|
|
|
valid_date,
|
|
|
</if>
|
|
|
- <if test="annexUrl != null">
|
|
|
- annex_url,
|
|
|
+ <if test="newUser != null">
|
|
|
+ new_user,
|
|
|
</if>
|
|
|
- <if test="photoUrl != null">
|
|
|
- photo_url,
|
|
|
+ <if test="signSum != null">
|
|
|
+ sign_sum,
|
|
|
+ </if>
|
|
|
+ <if test="mainStatus != null">
|
|
|
+ main_status,
|
|
|
+ </if>
|
|
|
+ <if test="supplement != null">
|
|
|
+ supplement,
|
|
|
+ </if>
|
|
|
+ <if test="auditInfo != null">
|
|
|
+ audit_info,
|
|
|
</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- #{id,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
<if test="uid != null">
|
|
|
#{uid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -183,6 +155,9 @@
|
|
|
<if test="remarks != null">
|
|
|
#{remarks,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="annexUrl != null">
|
|
|
+ #{annexUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="userName != null">
|
|
|
#{userName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -204,6 +179,9 @@
|
|
|
<if test="clockInTime != null">
|
|
|
#{clockInTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="photoUrl != null">
|
|
|
+ #{photoUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="pid != null">
|
|
|
#{pid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -219,20 +197,24 @@
|
|
|
<if test="validDate != null">
|
|
|
#{validDate,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="annexUrl != null">
|
|
|
- #{annexUrl,jdbcType=LONGVARCHAR},
|
|
|
+ <if test="newUser != null">
|
|
|
+ #{newUser,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="photoUrl != null">
|
|
|
- #{photoUrl,jdbcType=LONGVARCHAR},
|
|
|
+ <if test="signSum != null">
|
|
|
+ #{signSum,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="mainStatus != null">
|
|
|
+ #{mainStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="supplement != null">
|
|
|
+ #{supplement,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="auditInfo != null">
|
|
|
+ #{auditInfo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.PublicRelease">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 10 15:22:12 CST 2021.
|
|
|
- -->
|
|
|
update public_release
|
|
|
<set>
|
|
|
<if test="uid != null">
|
|
|
@@ -250,6 +232,9 @@
|
|
|
<if test="remarks != null">
|
|
|
remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="annexUrl != null">
|
|
|
+ annex_url = #{annexUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="userName != null">
|
|
|
user_name = #{userName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -271,6 +256,9 @@
|
|
|
<if test="clockInTime != null">
|
|
|
clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
+ <if test="photoUrl != null">
|
|
|
+ photo_url = #{photoUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="pid != null">
|
|
|
pid = #{pid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
@@ -286,55 +274,32 @@
|
|
|
<if test="validDate != null">
|
|
|
valid_date = #{validDate,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="annexUrl != null">
|
|
|
- annex_url = #{annexUrl,jdbcType=LONGVARCHAR},
|
|
|
+ <if test="newUser != null">
|
|
|
+ new_user = #{newUser,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="photoUrl != null">
|
|
|
- photo_url = #{photoUrl,jdbcType=LONGVARCHAR},
|
|
|
+ <if test="signSum != null">
|
|
|
+ sign_sum = #{signSum,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="mainStatus != null">
|
|
|
+ main_status = #{mainStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="supplement != null">
|
|
|
+ supplement = #{supplement,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="auditInfo != null">
|
|
|
+ audit_info = #{auditInfo,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
- <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.PublicRelease">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 10 15:22:12 CST 2021.
|
|
|
- -->
|
|
|
- update public_release
|
|
|
- set `uid` = #{uid,jdbcType=VARCHAR},
|
|
|
- aid = #{aid,jdbcType=VARCHAR},
|
|
|
- release_start = #{releaseStart,jdbcType=TIMESTAMP},
|
|
|
- release_end = #{releaseEnd,jdbcType=TIMESTAMP},
|
|
|
- remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
- user_name = #{userName,jdbcType=VARCHAR},
|
|
|
- longitude = #{longitude,jdbcType=VARCHAR},
|
|
|
- latitude = #{latitude,jdbcType=VARCHAR},
|
|
|
- `status` = #{status,jdbcType=INTEGER},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- clock_in = #{clockIn,jdbcType=INTEGER},
|
|
|
- clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
|
|
|
- pid = #{pid,jdbcType=VARCHAR},
|
|
|
- pname = #{pname,jdbcType=VARCHAR},
|
|
|
- ufid = #{ufid,jdbcType=VARCHAR},
|
|
|
- duration = #{duration,jdbcType=DOUBLE},
|
|
|
- valid_date = #{validDate,jdbcType=VARCHAR},
|
|
|
- annex_url = #{annexUrl,jdbcType=LONGVARCHAR},
|
|
|
- photo_url = #{photoUrl,jdbcType=LONGVARCHAR}
|
|
|
- where id = #{id,jdbcType=INTEGER}
|
|
|
- </update>
|
|
|
<update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.PublicRelease">
|
|
|
- <!--
|
|
|
- WARNING - @mbg.generated
|
|
|
- This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
- This element was generated on Thu Jun 10 15:22:12 CST 2021.
|
|
|
- -->
|
|
|
update public_release
|
|
|
set `uid` = #{uid,jdbcType=VARCHAR},
|
|
|
aid = #{aid,jdbcType=VARCHAR},
|
|
|
release_start = #{releaseStart,jdbcType=TIMESTAMP},
|
|
|
release_end = #{releaseEnd,jdbcType=TIMESTAMP},
|
|
|
remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
+ annex_url = #{annexUrl,jdbcType=VARCHAR},
|
|
|
user_name = #{userName,jdbcType=VARCHAR},
|
|
|
longitude = #{longitude,jdbcType=VARCHAR},
|
|
|
latitude = #{latitude,jdbcType=VARCHAR},
|
|
|
@@ -342,153 +307,183 @@
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
clock_in = #{clockIn,jdbcType=INTEGER},
|
|
|
clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
|
|
|
+ photo_url = #{photoUrl,jdbcType=VARCHAR},
|
|
|
pid = #{pid,jdbcType=VARCHAR},
|
|
|
pname = #{pname,jdbcType=VARCHAR},
|
|
|
ufid = #{ufid,jdbcType=VARCHAR},
|
|
|
duration = #{duration,jdbcType=DOUBLE},
|
|
|
- valid_date = #{validDate,jdbcType=VARCHAR}
|
|
|
+ valid_date = #{validDate,jdbcType=VARCHAR},
|
|
|
+ new_user = #{newUser,jdbcType=INTEGER},
|
|
|
+ sign_sum = #{signSum,jdbcType=INTEGER},
|
|
|
+ main_status = #{mainStatus,jdbcType=INTEGER},
|
|
|
+ supplement = #{supplement,jdbcType=VARCHAR},
|
|
|
+ audit_info = #{auditInfo,jdbcType=VARCHAR}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
-
|
|
|
+
|
|
|
<insert id="insertSelectiveGetId" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.PublicRelease" useGeneratedKeys="true">
|
|
|
- insert into public_release
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- id,
|
|
|
- </if>
|
|
|
- <if test="uid != null">
|
|
|
- `uid`,
|
|
|
- </if>
|
|
|
- <if test="aid != null">
|
|
|
- aid,
|
|
|
- </if>
|
|
|
- <if test="releaseStart != null">
|
|
|
- release_start,
|
|
|
- </if>
|
|
|
- <if test="releaseEnd != null">
|
|
|
- release_end,
|
|
|
- </if>
|
|
|
- <if test="remarks != null">
|
|
|
- remarks,
|
|
|
- </if>
|
|
|
- <if test="userName != null">
|
|
|
- user_name,
|
|
|
- </if>
|
|
|
- <if test="longitude != null">
|
|
|
- longitude,
|
|
|
- </if>
|
|
|
- <if test="latitude != null">
|
|
|
- latitude,
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- `status`,
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time,
|
|
|
- </if>
|
|
|
- <if test="clockIn != null">
|
|
|
- clock_in,
|
|
|
- </if>
|
|
|
- <if test="clockInTime != null">
|
|
|
- clock_in_time,
|
|
|
- </if>
|
|
|
- <if test="pid != null">
|
|
|
- pid,
|
|
|
- </if>
|
|
|
- <if test="pname != null">
|
|
|
- pname,
|
|
|
- </if>
|
|
|
- <if test="ufid != null">
|
|
|
- ufid,
|
|
|
- </if>
|
|
|
- <if test="duration != null">
|
|
|
- duration,
|
|
|
- </if>
|
|
|
- <if test="validDate != null">
|
|
|
- valid_date,
|
|
|
- </if>
|
|
|
- <if test="annexUrl != null">
|
|
|
- annex_url,
|
|
|
- </if>
|
|
|
- <if test="photoUrl != null">
|
|
|
- photo_url,
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="id != null">
|
|
|
- #{id,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="uid != null">
|
|
|
- #{uid,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="aid != null">
|
|
|
- #{aid,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="releaseStart != null">
|
|
|
- #{releaseStart,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="releaseEnd != null">
|
|
|
- #{releaseEnd,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="remarks != null">
|
|
|
- #{remarks,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="userName != null">
|
|
|
- #{userName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="longitude != null">
|
|
|
- #{longitude,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="latitude != null">
|
|
|
- #{latitude,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="status != null">
|
|
|
- #{status,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- #{createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="clockIn != null">
|
|
|
- #{clockIn,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="clockInTime != null">
|
|
|
- #{clockInTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="pid != null">
|
|
|
- #{pid,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="pname != null">
|
|
|
- #{pname,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="ufid != null">
|
|
|
- #{ufid,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="duration != null">
|
|
|
- #{duration,jdbcType=DOUBLE},
|
|
|
- </if>
|
|
|
- <if test="validDate != null">
|
|
|
- #{validDate,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="annexUrl != null">
|
|
|
- #{annexUrl,jdbcType=LONGVARCHAR},
|
|
|
- </if>
|
|
|
- <if test="photoUrl != null">
|
|
|
- #{photoUrl,jdbcType=LONGVARCHAR},
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
+ insert into public_release
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="uid != null">
|
|
|
+ `uid`,
|
|
|
+ </if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid,
|
|
|
+ </if>
|
|
|
+ <if test="releaseStart != null">
|
|
|
+ release_start,
|
|
|
+ </if>
|
|
|
+ <if test="releaseEnd != null">
|
|
|
+ release_end,
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null">
|
|
|
+ remarks,
|
|
|
+ </if>
|
|
|
+ <if test="annexUrl != null">
|
|
|
+ annex_url,
|
|
|
+ </if>
|
|
|
+ <if test="userName != null">
|
|
|
+ user_name,
|
|
|
+ </if>
|
|
|
+ <if test="longitude != null">
|
|
|
+ longitude,
|
|
|
+ </if>
|
|
|
+ <if test="latitude != null">
|
|
|
+ latitude,
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ `status`,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="clockIn != null">
|
|
|
+ clock_in,
|
|
|
+ </if>
|
|
|
+ <if test="clockInTime != null">
|
|
|
+ clock_in_time,
|
|
|
+ </if>
|
|
|
+ <if test="photoUrl != null">
|
|
|
+ photo_url,
|
|
|
+ </if>
|
|
|
+ <if test="pid != null">
|
|
|
+ pid,
|
|
|
+ </if>
|
|
|
+ <if test="pname != null">
|
|
|
+ pname,
|
|
|
+ </if>
|
|
|
+ <if test="ufid != null">
|
|
|
+ ufid,
|
|
|
+ </if>
|
|
|
+ <if test="duration != null">
|
|
|
+ duration,
|
|
|
+ </if>
|
|
|
+ <if test="validDate != null">
|
|
|
+ valid_date,
|
|
|
+ </if>
|
|
|
+ <if test="newUser != null">
|
|
|
+ new_user,
|
|
|
+ </if>
|
|
|
+ <if test="signSum != null">
|
|
|
+ sign_sum,
|
|
|
+ </if>
|
|
|
+ <if test="mainStatus != null">
|
|
|
+ main_status,
|
|
|
+ </if>
|
|
|
+ <if test="supplement != null">
|
|
|
+ supplement,
|
|
|
+ </if>
|
|
|
+ <if test="auditInfo != null">
|
|
|
+ audit_info,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="uid != null">
|
|
|
+ #{uid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="aid != null">
|
|
|
+ #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="releaseStart != null">
|
|
|
+ #{releaseStart,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="releaseEnd != null">
|
|
|
+ #{releaseEnd,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null">
|
|
|
+ #{remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="annexUrl != null">
|
|
|
+ #{annexUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="userName != null">
|
|
|
+ #{userName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="longitude != null">
|
|
|
+ #{longitude,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="latitude != null">
|
|
|
+ #{latitude,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="clockIn != null">
|
|
|
+ #{clockIn,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="clockInTime != null">
|
|
|
+ #{clockInTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="photoUrl != null">
|
|
|
+ #{photoUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pid != null">
|
|
|
+ #{pid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pname != null">
|
|
|
+ #{pname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ufid != null">
|
|
|
+ #{ufid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="duration != null">
|
|
|
+ #{duration,jdbcType=DOUBLE},
|
|
|
+ </if>
|
|
|
+ <if test="validDate != null">
|
|
|
+ #{validDate,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="newUser != null">
|
|
|
+ #{newUser,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="signSum != null">
|
|
|
+ #{signSum,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="mainStatus != null">
|
|
|
+ #{mainStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="supplement != null">
|
|
|
+ #{supplement,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="auditInfo != null">
|
|
|
+ #{auditInfo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
<selectKey keyProperty="id" order="AFTER" resultType="int">
|
|
|
SELECT LAST_INSERT_ID()
|
|
|
</selectKey>
|
|
|
</insert>
|
|
|
-
|
|
|
+
|
|
|
<select id="listPublicRelease" resultType="com.goafanti.weChat.bo.OutPublicReleaseList">
|
|
|
select a.id,b.nickname ,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,
|
|
|
date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,
|
|
|
-a.latitude ,a.longitude ,a.clock_in clockIn
|
|
|
+a.latitude ,a.longitude ,a.clock_in clockIn
|
|
|
from public_release a left join `user` b on a.uid =b.id left join admin c on a.aid =c.id
|
|
|
where 1=1
|
|
|
<if test="type==0">
|
|
|
- and a.aid= #{aid}
|
|
|
+ and a.aid= #{aid}
|
|
|
</if>
|
|
|
<if test="type==1">
|
|
|
and c.superior_id = #{aid}
|
|
|
@@ -508,18 +503,18 @@ from public_release a left join `user` b on a.uid =b.id left join admin c on a.a
|
|
|
<if test="clockIn !=null">
|
|
|
and a.clock_in = #{clockIn}
|
|
|
</if>
|
|
|
- ORDER BY (case when a.status=1 then 1 else 2 end),a.status ,a.create_time
|
|
|
+ ORDER BY (case when a.status=1 then 1 else 2 end),a.status ,a.create_time
|
|
|
<if test="page_sql!=null">
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
<select id="countPublicRelease" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
- from public_release a left join `user` b on a.uid =b.id
|
|
|
+ from public_release a left join `user` b on a.uid =b.id
|
|
|
left join admin c on a.aid =c.id
|
|
|
where 1=1
|
|
|
<if test="type==0">
|
|
|
- and a.aid= #{aid}
|
|
|
+ and a.aid= #{aid}
|
|
|
</if>
|
|
|
<if test="type==1">
|
|
|
and c.superior_id = #{aid}
|
|
|
@@ -540,7 +535,7 @@ from public_release a left join `user` b on a.uid =b.id left join admin c on a.a
|
|
|
and a.clock_in = #{clockIn}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="selectDtails" resultType="com.goafanti.weChat.bo.OutPublicRelease">
|
|
|
select a.id,b.nickname ,c.name aname,date_format(a.release_start,'%Y-%m-%d %H:%i:%S') releaseStarts,a.user_name userName,
|
|
|
date_format(a.release_end ,'%Y-%m-%d %H:%i:%S') releaseEnds,date_format(a.create_time ,'%Y-%m-%d %H:%i:%S') createTimes,a.status,
|
|
|
@@ -553,12 +548,12 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
|
|
|
<if test="ufid !=null">
|
|
|
and a.ufid= #{ufid}
|
|
|
</if>
|
|
|
-
|
|
|
+
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="listPublicStatistics" resultType="com.goafanti.weChat.bo.OutPublicStatistics">
|
|
|
- select y.aid,y.bh,y.dk,y.wsh,y.tg,y.duration,c.name from(select x.aid ,sum(x.bh)bh,sum(x.wsh)wsh,sum(x.tg)tg,sum(x.dk)dk,sum(x.duration)duration
|
|
|
- from (select if(a.status=0,1,0)bh ,if(a.status=1,1,0)wsh,if(a.status=2,1,0)tg,if(a.clock_in=1,1,0) dk,a.aid
|
|
|
+ select y.aid,y.bh,y.dk,y.wsh,y.tg,y.duration,c.name from(select x.aid ,sum(x.bh)bh,sum(x.wsh)wsh,sum(x.tg)tg,sum(x.dk)dk,sum(x.duration)duration
|
|
|
+ from (select if(a.status=0,1,0)bh ,if(a.status=1,1,0)wsh,if(a.status=2,1,0)tg,if(a.clock_in=1,1,0) dk,a.aid
|
|
|
,if(a.status=2,a.duration,0)duration from public_release a left join admin b on a.aid=b.id
|
|
|
where 1=1
|
|
|
<if test="aid != null">
|
|
|
@@ -578,8 +573,8 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
<select id="countPublicStatistics" resultType="java.lang.Integer">
|
|
|
select count(*) from (select aid from public_release a left join admin b on a.aid=b.id
|
|
|
where 1=1
|
|
|
@@ -597,7 +592,7 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
|
|
|
</if>
|
|
|
group by aid)x
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="listPublicDtails" resultType="com.goafanti.weChat.bo.OutPublicDtails">
|
|
|
select b.nickname ,a.user_name userName,c.name aname,a.duration ,a.status,a.annex_url annexUrl,a.photo_url photoUrl,
|
|
|
date_format(a.clock_in_time ,'%Y-%m-%d %H:%i:%S') clockInTimes,a.clock_in clockIn,
|
|
|
@@ -624,7 +619,7 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
|
|
|
${page_sql}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="countPublicDtails" resultType="java.lang.Integer">
|
|
|
select count(*)
|
|
|
from public_release a left join `user` b on a.uid=b.id left join admin c on a.aid =c.id
|
|
|
@@ -645,12 +640,12 @@ a.annex_url annexUrl ,a.remarks,a.duration ,a.valid_date validDate ,a.latitude ,
|
|
|
and a.clock_in= #{clockIn}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="checkTime" resultType="java.lang.Integer">
|
|
|
select count(*) from public_release where aid=#{aid} and status in (0,1,2)
|
|
|
and ( (release_start >= #{start} and release_start < #{end})
|
|
|
or (release_start < #{start} and release_end > #{start})
|
|
|
or (release_start < #{end} and release_end > #{end}))
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
</mapper>
|