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
<?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.mapper.StandardMapper">
<resultMap id="BaseResultMap" type="com.ruoyi.domain.Standard">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="name" column="name" jdbcType="VARCHAR"/>
<result property="standardNo" column="standard_no" jdbcType="VARCHAR"/>
<result property="file" column="file" jdbcType="VARCHAR"/>
<result property="standardType" column="standard_type" jdbcType="VARCHAR"/>
<result property="standardStatus" column="standard_status" jdbcType="VARCHAR"/>
<result property="releaseDate" column="release_date" jdbcType="TIMESTAMP"/>
<result property="implementationDate" column="implementation_date" jdbcType="TIMESTAMP"/>
<result property="status" column="status" jdbcType="BIGINT"/>
</resultMap>
<select id="findList" parameterType="com.ruoyi.web.request.StandardListRequest" resultMap="BaseResultMap">
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date,status
FROM t_standard
<where>
<if test="standardType != null and standardType != ''">
standard_type = #{standardType}
</if>
<if test="standardNo != null and standardNo != ''">
and standard_no like concat('%', #{standardNo}, '%')
</if>
<if test="name != null and name != ''">
and name like concat('%', #{name}, '%')
</if>
<if test="standardStatus != null and standardStatus != ''">
and standard_status = #{standardStatus}
</if>
</where>
</select>
<select id="findListById" resultMap="BaseResultMap">
SELECT id, name, standard_no, file
FROM t_standard WHERE id = #{id}
</select>
<select id="selectListAll" resultMap="BaseResultMap">
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date,status FROM t_standard
</select>
<select id="findStandardList" resultType="com.ruoyi.domain.Standard">
SELECT id, name, standard_no, file,standard_type,standard_status,release_date,implementation_date,status
FROM t_standard
<where>
and status = 1
<if test="standardType != null and standardType != ''">
and standard_type = #{standardType}
</if>
<if test="standardNo != null and standardNo != ''">
and standard_no like concat('%', #{standardNo}, '%')
</if>
<if test="name != null and name != ''">
and name like concat('%', #{name}, '%')
</if>
<if test="standardStatus != null and standardStatus != ''">
and standard_status = #{standardStatus}
</if>
</where>
</select>
</mapper>