2021与蓝度共同重构项目,服务端
liuhaonan
2022-10-21 0a30812acaa26ebe654340f7e749a6801b63b194
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
<?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.sandu.ximon.dao.mapper.AdvisementPlayerMapper">
 
    <resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.AdvisementPlayer">
        <id property="id" column="id" jdbcType="BIGINT"/>
        <result property="macAddress" column="mac_address" jdbcType="VARCHAR"/>
        <result property="belongTo" column="belong_to" jdbcType="VARCHAR"/>
        <result property="equipmentState" column="equipment_state" jdbcType="INTEGER"/>
        <result property="bindingState" column="binding_state" jdbcType="INTEGER"/>
        <result property="task" column="task" jdbcType="VARCHAR"/>
        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
        <result property="missionId" column="mission_id" jdbcType="BIGINT"/>
    </resultMap>
    <select id="listAdvisementPlayerByKeyword" resultType="com.sandu.ximon.dao.domain.AdvisementPlayer">
 
        SELECT    * FROM   (SELECT    * FROM    (SELECT    * FROM    advisement_player AS table1
              WHERE belong_to  LIKE CONCAT(CONCAT('%', #{keyword}), '%')) AS table2
         WHERE equipment_state = #{equipmentState1}
         OR equipment_state = #{equipmentState2}) AS table3
        WHERE binding_state = #{bindingState1} OR binding_state = #{bindingState2};
    </select>
 
</mapper>