tangzy
2021-08-31 9b583c3ae9f78328368b2eda8899f80204ed796f
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
<?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="org.springblade.modules.member.mapper.MemberMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="memberResultMap" type="org.springblade.modules.member.entity.Member">
        <id column="id" property="id"/>
        <result column="name" property="name"/>
        <result column="post" property="post"/>
        <result column="cardid" property="cardid"/>
        <result column="cell" property="cell"/>
        <result column="shareholdingratio" property="shareholdingratio"/>
        <result column="creditCode" property="creditcode"/>
        <result column="rtime" property="rtime"/>
    </resultMap>
 
 
    <select id="selectMemberPage" resultMap="memberResultMap">
        select * from sys_member where is_deleted = 0
    </select>
 
    <select id="selectMemberInfo" resultMap="memberResultMap">
        select * from sys_member
        where
        1=1
        <if test="member.creditcode!=null and member.creditcode!=''" >
            and creditCode=#{member.creditcode}
        </if>
        <if test="member.name!=null and member.name!=''" >
            and name like concat ('%',#{member.name},'%')
        </if>
        <if test="member.post!=null and member.post!=''" >
            and post like concat ('%',#{member.post},'%')
        </if>
 
    </select>
 
</mapper>