智慧保安后台管理-验收版本
tangzy
2021-12-06 30df94c05573a426d030510d4dd58ae1d93bfb7a
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.punish.mapper.PunishMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="punishResultMap" type="org.springblade.modules.punish.vo.PunishVO">
        <result column="punishtype" property="punishtype"/>
        <result column="punishreason" property="punishreason"/>
        <result column="punishresult" property="punishresult"/>
        <result column="punishtime" property="punishtime"/>
        <result column="punisnum" property="punisnum"/>
        <result column="jurisdiction" property="jurisdiction"/>
        <result column="enterpriseName" property="enterpriseName"/>
        <result column="jurname" property="jurname"/>
        <result column="penalty" property="penalty"/>
    </resultMap>
 
 
    <select id="selectPunishPage" resultMap="punishResultMap">
        SELECT i.enterpriseName,
               j.dept_name as jurname,
               p.punishtype,
               p.punishreason,
               p.punishresult,
               p.punishtime,
               p.punisnum,
               p.penalty
        FROM sys_punish p
                 LEFT JOIN sys_information i ON i.departmentid = p.deptid
                 LEFT JOIN sys_jurisdiction j ON j.id = p.jurisdiction
        where 1=1
        <if test="punish.jurisdiction!=null and punish.jurisdiction!='' and punish.jurisdiction!='1123598813738675201'">
            and  p.jurisdiction = #{punish.jurisdiction}
        </if>
    </select>
 
</mapper>