| | |
| | | <result property="serialNumber" column="serial_number" jdbcType="VARCHAR"/> |
| | | <result property="belongTo" column="belong_to" jdbcType="VARCHAR"/> |
| | | <result property="address" column="address" jdbcType="VARCHAR"/> |
| | | <result property="equipmentState" column="equipment_state" jdbcType="VARCHAR"/> |
| | | <result property="workState" column="work_state" jdbcType="VARCHAR"/> |
| | | <result property="bindingState" column="binding_state" jdbcType="VARCHAR"/> |
| | | <result property="equipmentState" column="equipment_state" jdbcType="INTEGER"/> |
| | | <result property="workState" column="work_state" jdbcType="INTEGER"/> |
| | | <result property="bindingState" column="binding_state" jdbcType="INTEGER"/> |
| | | <result property="note" column="note" jdbcType="VARCHAR"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <select id="listMonitorByKeyword" resultType="com.sandu.ximon.dao.domain.Monitor"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | monitor |
| | | WHERE |
| | | serial_number LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | or belong_to LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | and equipment_state = #{equipmentState1} |
| | | or equipment_state = #{equipmentState2} |
| | | and binding_state = #{bindingState1} |
| | | or binding_state = #{bindingState2}; |
| | | SELECT * FROM (SELECT * FROM (SELECT * FROM monitor AS table1 |
| | | WHERE serial_number LIKE CONCAT(CONCAT('%', #{keyword}), '%') |
| | | OR 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> |
| | | |
| | | |