Helius
2021-06-16 4e51778362c2130598a4c73ec4cebe6629dbc53f
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
<?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.xzx.gc.system.mapper.FenceMapper">
  <resultMap id="BaseResultMap" type="com.xzx.gc.entity.Fence">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="fence_name" jdbcType="VARCHAR" property="fenceName" />
    <result column="fence_type" jdbcType="VARCHAR" property="fenceType" />
    <result column="keyword" jdbcType="VARCHAR" property="keyword" />
    <result column="radius" jdbcType="TINYINT" property="radius" />
    <result column="longitude" jdbcType="VARCHAR" property="longitude" />
    <result column="latitude" jdbcType="VARCHAR" property="latitude" />
    <result column="longlatiarr" jdbcType="VARCHAR" property="longlatiarr" />
    <result column="create_time" jdbcType="VARCHAR" property="createTime" />
    <result column="update_time" jdbcType="VARCHAR" property="updateTime" />
    <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
    <result column="prohibit" jdbcType="BIT" property="prohibit" />
    <result column="town_code" jdbcType="VARCHAR" property="townCode" />
    <result column="partner_id" jdbcType="VARCHAR" property="partnerId" />
  </resultMap>
 
 
 
 
    <select id="findByPartnerId" resultMap="BaseResultMap">
        SELECT
            b.*
        FROM
            xzx_partner_fence a
            INNER JOIN xzx_electronic_fence b ON a.fence_id = b.id
        WHERE
            a.del_flag = 0
            AND b.del_flag = 0
            AND b.prohibit = 0
            and a.partner_id=#{partnerId}
            order  by b.create_time desc
    </select>
 
 
 
</mapper>