智慧保安后台管理-外网-验收版本
tangzy
2021-12-06 cc057177b2fb17aee9a173a6adbabdc578fd74c7
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
<?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.shareholder.mapper.ShareholderMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="shareholderResultMap" type="org.springblade.modules.shareholder.entity.Shareholder">
        <id column="id" property="id"/>
        <result column="shareholder" property="shareholder"/>
        <result column="shareholdingratio" property="shareholdingratio"/>
        <result column="beneficial" property="beneficial"/>
        <result column="capital" property="capital"/>
        <result column="capitalTime" property="capitaltime"/>
        <result column="cardid" property="cardid"/>
        <result column="cell" property="cell"/>
        <result column="creditCode" property="creditcode"/>
    </resultMap>
 
 
    <select id="selectShareholderPage" resultMap="shareholderResultMap">
        select * from sys_shareholder
    </select>
 
 
    <select id="selectShareholderInfo" resultMap="shareholderResultMap">
        select * from sys_shareholder where creditCode = #{shareholder.creditcode}
        <if test="shareholder.cardid!=null and shareholder.cardid!=''">
            and cardid like concat('%', #{shareholder.cardid},'%')
        </if>
        <if test="shareholder.shareholder!=null and shareholder.shareholder!=''">
            and shareholder like concat('%',#{shareholder.shareholder},'%')
        </if>
    </select>
 
</mapper>