InventoryMapper.xml
2.69 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?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.InventoryMapper">
<insert id="insert" parameterType="com.ruoyi.service.domain.Inventory">
insert into inventory(
<if test="depotId != null and depotId != ''">depotId,</if>
<if test="archivesLevel != null and archivesLevel != ''">archivesLevel,</if>
<if test="factor != null and factor != ''">factor,</if>
<if test="mark != null and mark != ''">mark,</if>
<if test="sysCount != null and sysCount != ''">sysCount,</if>
<if test="count != null and count != ''">count,</if>
<if test="remark != null and remark != ''">remark,</if>
createTime
)values(
<if test="depotId != null and depotId != ''">#{depotId},</if>
<if test="archivesLevel != null and archivesLevel != ''">#{archivesLevel},</if>
<if test="factor != null and factor != ''">#{factor},</if>
<if test="mark != null and mark != ''">#{mark},</if>
<if test="sysCount != null and sysCount != ''">#{sysCount},</if>
<if test="count != null and count != ''">#{count},</if>
<if test="remark != null and remark != ''">#{remark},</if>
sysdate()
)
</insert>
<update id="update" parameterType="com.ruoyi.service.domain.Inventory">
update inventory
<set>
<if test="archivesLevel != null and archivesLevel != ''">archivesLevel = #{archivesLevel},</if>
<if test="factor != null and factor != ''">factor = #{factor},</if>
<if test="mark != null">mark = #{mark},</if>
<if test="sysCount != null and sysCount != ''">sysCount = #{sysCount},</if>
<if test="count != null and count != ''">count = #{count},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
updateTime = sysdate()
</set>
where id = #{id}
</update>
<delete id="delete" parameterType="Long">
delete from inventory where id in
<foreach collection="array" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<select id="selectList" resultType="com.ruoyi.service.domain.Inventory" parameterType="com.ruoyi.service.domain.Inventory">
select a.*,b.depotName from inventory a,depot b
where a.depotId=b.id
<if test="archivesLevel != null and archivesLevel != ''">
AND a.archivesLevel =#{archivesLevel}
</if>
<if test="factor != null and factor != ''">
AND b.factor =#{factor}
</if>
<if test="mark != null and mark != ''">
AND b.mark =#{mark}
</if>
<if test="sysCount != null and sysCount != ''">
AND b.sysCount =#{sysCount}
</if>
<if test="count != null and count != ''">
AND b.count =#{count}
</if>
<if test="remark != null and remark != ''">
AND b.remark =#{remark}
</if>
</select>
</mapper>