|
@@ -3,15 +3,21 @@
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.sooka.apply.mapper.IntRecordMapper">
|
|
<mapper namespace="com.sooka.apply.mapper.IntRecordMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="IntRecord" id="IntRecordResult">
|
|
<resultMap type="IntRecord" id="IntRecordResult">
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
- <result property="applyOid" column="apply_oid" />
|
|
|
|
- <result property="applyName" column="apply_name" />
|
|
|
|
- <result property="orgId" column="org_id" />
|
|
|
|
- <result property="orgName" column="org_name" />
|
|
|
|
|
|
+ <result property="applyDeptId" column="apply_dept_id" />
|
|
|
|
+ <result property="applyDeptName" column="apply_dept_name" />
|
|
|
|
+ <result property="applyUserId" column="apply_user_id" />
|
|
|
|
+ <result property="applyUserName" column="apply_user_name" />
|
|
|
|
+ <result property="tel" column="tel" />
|
|
|
|
+ <result property="ip" column="ip" />
|
|
|
|
+ <result property="provideDeptId" column="provide_dept_id" />
|
|
|
|
+ <result property="provideDeptName" column="provide_dept_name" />
|
|
<result property="applyTime" column="apply_time" />
|
|
<result property="applyTime" column="apply_time" />
|
|
- <result property="intNumbers" column="int_numbers" />
|
|
|
|
|
|
+ <result property="frequency" column="frequency" />
|
|
|
|
+ <result property="startTime" column="start_time" />
|
|
|
|
+ <result property="endTime" column="end_time" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="IntRecordIntDetailedResult" type="IntRecord" extends="IntRecordResult">
|
|
<resultMap id="IntRecordIntDetailedResult" type="IntRecord" extends="IntRecordResult">
|
|
@@ -32,20 +38,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<sql id="selectIntRecordVo">
|
|
<sql id="selectIntRecordVo">
|
|
SELECT
|
|
SELECT
|
|
- i.id,
|
|
|
|
- i.apply_oid,
|
|
|
|
- d1.dept_name apply_name,
|
|
|
|
- i.org_id,
|
|
|
|
- d2.dept_name org_name,
|
|
|
|
- i.apply_time,
|
|
|
|
- i.int_numbers
|
|
|
|
|
|
+ id,
|
|
|
|
+ apply_dept_id,
|
|
|
|
+ apply_dept_name,
|
|
|
|
+ apply_user_id,
|
|
|
|
+ apply_user_name,
|
|
|
|
+ tel,
|
|
|
|
+ ip,
|
|
|
|
+ provide_dept_id,
|
|
|
|
+ provide_dept_name,
|
|
|
|
+ apply_time,
|
|
|
|
+ frequency,
|
|
|
|
+ start_time,
|
|
|
|
+ end_time
|
|
FROM
|
|
FROM
|
|
- int_record i,
|
|
|
|
- sys_dept d1,
|
|
|
|
- sys_dept d2
|
|
|
|
- WHERE
|
|
|
|
- d1.dept_id = i.apply_oid
|
|
|
|
- AND d2.dept_id = i.org_id
|
|
|
|
|
|
+ int_record
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<sql id="selectIntDetailedVo">
|
|
<sql id="selectIntDetailedVo">
|
|
@@ -68,13 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectIntRecordList" parameterType="IntRecord" resultMap="IntRecordResult">
|
|
<select id="selectIntRecordList" parameterType="IntRecord" resultMap="IntRecordResult">
|
|
<include refid="selectIntRecordVo"/>
|
|
<include refid="selectIntRecordVo"/>
|
|
- <where>
|
|
|
|
- <if test="applyOid != null "> and apply_oid = #{applyOid}</if>
|
|
|
|
- <if test="orgId != null "> and org_id = #{orgId}</if>
|
|
|
|
- <if test="applyTime != null "> and apply_time = #{applyTime}</if>
|
|
|
|
- <if test="intNumbers != null "> and int_numbers = #{intNumbers}</if>
|
|
|
|
- </where>
|
|
|
|
- ORDER BY i.apply_time DESC
|
|
|
|
|
|
+ ORDER BY apply_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectIntDetailedList" parameterType="IntDetailed" resultMap="IntDetailedResult">
|
|
<select id="selectIntDetailedList" parameterType="IntDetailed" resultMap="IntDetailedResult">
|
|
@@ -82,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="recordId != null "> and b.record_id = #{recordId}</if>
|
|
<if test="recordId != null "> and b.record_id = #{recordId}</if>
|
|
order by b.int_code
|
|
order by b.int_code
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="selectIntRecordById" parameterType="String" resultMap="IntRecordIntDetailedResult">
|
|
<select id="selectIntRecordById" parameterType="String" resultMap="IntRecordIntDetailedResult">
|
|
select a.id, a.apply_oid, a.org_id, a.apply_time, a.int_numbers,
|
|
select a.id, a.apply_oid, a.org_id, a.apply_time, a.int_numbers,
|
|
b.id, b.record_id, b.int_id, b.str_at, b.end_at, b.secret_key, b.status
|
|
b.id, b.record_id, b.int_id, b.str_at, b.end_at, b.secret_key, b.status
|
|
@@ -90,22 +91,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
left join int_detailed b on b.record_id = a.id
|
|
left join int_detailed b on b.record_id = a.id
|
|
where a.id = #{id}
|
|
where a.id = #{id}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insertIntRecord" parameterType="IntRecord">
|
|
<insert id="insertIntRecord" parameterType="IntRecord">
|
|
insert into int_record
|
|
insert into int_record
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
- <if test="id != null">id,</if>
|
|
|
|
- <if test="applyOid != null">apply_oid,</if>
|
|
|
|
- <if test="orgId != null">org_id,</if>
|
|
|
|
|
|
+ <if test="applyDeptId != null">apply_dept_id,</if>
|
|
|
|
+ <if test="applyDeptName != null">apply_dept_name,</if>
|
|
|
|
+ <if test="applyUserId != null">apply_user_id,</if>
|
|
|
|
+ <if test="applyUserName != null">apply_user_name,</if>
|
|
|
|
+ <if test="tel != null">tel,</if>
|
|
|
|
+ <if test="ip != null">ip,</if>
|
|
|
|
+ <if test="provideDeptId != null">provide_dept_id,</if>
|
|
|
|
+ <if test="provideDeptName != null">provide_dept_name,</if>
|
|
<if test="applyTime != null">apply_time,</if>
|
|
<if test="applyTime != null">apply_time,</if>
|
|
- <if test="intNumbers != null">int_numbers,</if>
|
|
|
|
|
|
+ <if test="frequency != null">frequency,</if>
|
|
|
|
+ <if test="startTime != null">startTime,</if>
|
|
|
|
+ <if test="endTime != null">endTime,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
- <if test="id != null">#{id},</if>
|
|
|
|
- <if test="applyOid != null">#{applyOid},</if>
|
|
|
|
- <if test="orgId != null">#{orgId},</if>
|
|
|
|
|
|
+ <if test="applyDeptId != null">#{applyDeptId},</if>
|
|
|
|
+ <if test="applyDeptName != null">#{applyDeptName},</if>
|
|
|
|
+ <if test="applyUserId != null">#{applyUserId},</if>
|
|
|
|
+ <if test="applyUserName != null">#{applyUserName},</if>
|
|
|
|
+ <if test="tel != null">#{tel},</if>
|
|
|
|
+ <if test="ip != null">#{ip},</if>
|
|
|
|
+ <if test="provideDeptId != null">#{provideDeptId},</if>
|
|
|
|
+ <if test="provideDeptName != null">#{provideDeptName},</if>
|
|
<if test="applyTime != null">#{applyTime},</if>
|
|
<if test="applyTime != null">#{applyTime},</if>
|
|
- <if test="intNumbers != null">#{intNumbers},</if>
|
|
|
|
|
|
+ <if test="frequency != null">#{frequency},</if>
|
|
|
|
+ <if test="startTime != null">#{startTime},</if>
|
|
|
|
+ <if test="endTime != null">#{endTime},</if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -122,14 +137,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<delete id="deleteIntRecordByIds" parameterType="String">
|
|
<delete id="deleteIntRecordByIds" parameterType="String">
|
|
- delete from int_record where id in
|
|
|
|
|
|
+ delete from int_record where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
-
|
|
|
|
|
|
+
|
|
<delete id="deleteIntDetailedByRecordIds" parameterType="String">
|
|
<delete id="deleteIntDetailedByRecordIds" parameterType="String">
|
|
- delete from int_detailed where record_id in
|
|
|
|
|
|
+ delete from int_detailed where record_id in
|
|
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
|
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
|
#{recordId}
|
|
#{recordId}
|
|
</foreach>
|
|
</foreach>
|
|
@@ -142,4 +157,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</foreach>
|
|
</foreach>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
-</mapper>
|
|
|
|
|
|
+</mapper>
|