ArchivesDepotMapper.xml
1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?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.ruoyi.service.mapper.ArchivesDepotMapper">
<insert id="insert" parameterType="com.ruoyi.service.domain.ArchivesDepot">
insert into archives_depot(
<if test="archivesId != null and archivesId != ''">archivesId,</if>
<if test="depotNodeId != null and depotNodeId != ''">depotNodeId,</if>
<if test="status != null and status != ''">status,</if>
createTime
)values(
<if test="archivesId != null and archivesId != ''">#{archivesId},</if>
<if test="depotNodeId != null and depotNodeId != ''">#{depotNodeId},</if>
<if test="status != null and status != ''">#{status},</if>
sysdate()
)
</insert>
<update id="shelveDown" parameterType="String">
update archives_depot set
status = '2',
updateTime = sysdate()
where status ='1' and archivesId in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<select id="selectCountBox" parameterType="Long" resultType="int">
SELECT count(*) FROM archives_collect_box where box_id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
and borrow_status='0'
</select>
</mapper>