|
|
@@ -0,0 +1,455 @@
|
|
|
+<?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.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 Tue Jun 01 11:29:31 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="user_name" jdbcType="VARCHAR" property="userName" />
|
|
|
+ <result column="longitude" jdbcType="VARCHAR" property="longitude" />
|
|
|
+ <result column="latitude" jdbcType="VARCHAR" property="latitude" />
|
|
|
+ <result column="status" jdbcType="INTEGER" property="status" />
|
|
|
+ <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="pid" jdbcType="VARCHAR" property="pid" />
|
|
|
+ <result column="pname" jdbcType="VARCHAR" property="pname" />
|
|
|
+ </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 Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ -->
|
|
|
+ <result column="annex_url" jdbcType="LONGVARCHAR" property="annexUrl" />
|
|
|
+ <result column="photo_url" jdbcType="LONGVARCHAR" property="photoUrl" />
|
|
|
+ </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 Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ -->
|
|
|
+ id, `uid`, aid, release_start, release_end, remarks, user_name, longitude, latitude,
|
|
|
+ `status`, create_time, clock_in, clock_in_time, pid, pname
|
|
|
+ </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 Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ -->
|
|
|
+ annex_url, photo_url
|
|
|
+ </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 Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ -->
|
|
|
+ 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 Tue Jun 01 11:29:31 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 Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ -->
|
|
|
+ insert into public_release (id, `uid`, aid,
|
|
|
+ release_start, release_end, remarks,
|
|
|
+ user_name, longitude, latitude,
|
|
|
+ `status`, create_time, clock_in,
|
|
|
+ clock_in_time, pid, pname,
|
|
|
+ annex_url, photo_url)
|
|
|
+ values (#{id,jdbcType=INTEGER}, #{uid,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR},
|
|
|
+ #{releaseStart,jdbcType=TIMESTAMP}, #{releaseEnd,jdbcType=TIMESTAMP}, #{remarks,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},
|
|
|
+ #{annexUrl,jdbcType=LONGVARCHAR}, #{photoUrl,jdbcType=LONGVARCHAR})
|
|
|
+ </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 Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ -->
|
|
|
+ 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="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="annexUrl != null">
|
|
|
+ #{annexUrl,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="photoUrl != null">
|
|
|
+ #{photoUrl,jdbcType=LONGVARCHAR},
|
|
|
+ </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 Tue Jun 01 11:29:31 CST 2021.
|
|
|
+ -->
|
|
|
+ update public_release
|
|
|
+ <set>
|
|
|
+ <if test="uid != null">
|
|
|
+ `uid` = #{uid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="releaseStart != null">
|
|
|
+ release_start = #{releaseStart,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="releaseEnd != null">
|
|
|
+ release_end = #{releaseEnd,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="remarks != null">
|
|
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="userName != null">
|
|
|
+ user_name = #{userName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="longitude != null">
|
|
|
+ longitude = #{longitude,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="latitude != null">
|
|
|
+ latitude = #{latitude,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ `status` = #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="clockIn != null">
|
|
|
+ clock_in = #{clockIn,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="clockInTime != null">
|
|
|
+ clock_in_time = #{clockInTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="pid != null">
|
|
|
+ pid = #{pid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pname != null">
|
|
|
+ pname = #{pname,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="annexUrl != null">
|
|
|
+ annex_url = #{annexUrl,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="photoUrl != null">
|
|
|
+ photo_url = #{photoUrl,jdbcType=LONGVARCHAR},
|
|
|
+ </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 Tue Jun 01 11:29:31 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},
|
|
|
+ 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 Tue Jun 01 11:29:31 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}
|
|
|
+ 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="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="annexUrl != null">
|
|
|
+ #{annexUrl,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="photoUrl != null">
|
|
|
+ #{photoUrl,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <selectKey keyProperty="id" order="AFTER" resultType="int">
|
|
|
+ SELECT LAST_INSERT_ID()
|
|
|
+ </selectKey>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <select id="listPublicRelease" resultType="com.goafanti.admin.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
|
|
|
+ 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}
|
|
|
+ </if>
|
|
|
+ <if test="type==1">
|
|
|
+ and c.superior_id = #{aid}
|
|
|
+ </if>
|
|
|
+ order by 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 admin c on a.aid =c.id
|
|
|
+ where 1=1
|
|
|
+ <if test="type==0">
|
|
|
+ and a.aid= #{aid}
|
|
|
+ </if>
|
|
|
+ <if test="type==1">
|
|
|
+ and c.superior_id = #{aid}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+</mapper>
|