艾金辉
2023-07-21 e3de6abd10702b84cc995dcc3c9426baf4377e18
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
<?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.sy.mapper.SysParaMapper" >
  <resultMap id="BaseResultMap" type="com.ruoyi.sy.domain.SysPara" >
    <id column="sys_id" property="sysId" jdbcType="VARCHAR" />
    <result column="sys_name" property="sysName" jdbcType="VARCHAR" />
    <result column="sys_type" property="sysType" jdbcType="VARCHAR" />
    <result column="sys_content" property="sysContent" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Example_Where_Clause" >
    <where >
      <foreach collection="oredCriteria" item="criteria" separator="or" >
        <if test="criteria.valid" >
          <trim prefix="(" suffix=")" prefixOverrides="and" >
            <foreach collection="criteria.criteria" item="criterion" >
              <choose >
                <when test="criterion.noValue" >
                  and ${criterion.condition}
                </when>
                <when test="criterion.singleValue" >
                  and ${criterion.condition} #{criterion.value}
                </when>
                <when test="criterion.betweenValue" >
                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
                </when>
                <when test="criterion.listValue" >
                  and ${criterion.condition}
                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
                    #{listItem}
                  </foreach>
                </when>
              </choose>
            </foreach>
          </trim>
        </if>
      </foreach>
    </where>
  </sql>
  <sql id="Base_Column_List" >
    sys_id, sys_name, sys_type, sys_content
  </sql>
  <select id="selectByExample" parameterType="String"  resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from sys_para
    where sys_type = #{sys_type}
  </select>
 
</mapper>