智慧保安后台管理-验收版本
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
<?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.insurance.mapper.InsuranceMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="socialResultMap" type="org.springblade.modules.insurance.vo.InsuranceVO">
        <id column="id" property="id"/>
        <result column="name" property="name"/>
        <result column="sex" property="sex"/>
        <result column="nation" property="nation"/>
        <result column="birthday" property="birthday"/>
        <result column="telephone" property="telephone"/>
        <result column="cardid" property="cardid"/>
        <result column="residence" property="residence"/>
        <result column="address" property="address"/>
        <result column="nature" property="nature"/>
        <result column="amount" property="amount"/>
        <result column="insuredtime" property="insuredtime"/>
        <result column="deptid" property="deptid"/>
    </resultMap>
 
 
    <select id="selectInsurancePage" resultMap="socialResultMap">
        select * from sys_insurance
        where 1=1
        <if test="insurance.name!=null and insurance.name!=''">
            and insurance.name like concat('%',#{insurance.name},'%')
        </if>
        <if test="insurance.cardid!=null and insurance.cardid!=''">
            and insurance.cardid like concat('%',#{insurance.cardid},'%')
        </if>
        <if test="insurance.deptid!=null and insurance.deptid!=''">
            and insurance.deptid like concat('%',#{insurance.deptid},'%')
        </if>
    </select>
 
</mapper>