| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="machineV1ServiceDaoImpl"> |
| | | |
| | | |
| | | <!-- 保存设备信息信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveMachineInfo" parameterType="Map"> |
| | | insert into machine( |
| | | heartbeat_time,machine_code,auth_code,location_type_cd,machine_version,machine_name,machine_mac, |
| | | machine_id,type_id,state,community_id,location_obj_id,machine_type_cd,machine_ip,direction,b_id |
| | | ) values ( |
| | | #{heartbeatTime},#{machineCode},#{authCode},#{locationTypeCd},#{machineVersion},#{machineName},#{machineMac}, |
| | | #{machineId},#{typeId},#{state},#{communityId},#{locationObjId},#{machineTypeCd},#{machineIp},#{direction},#{bId} |
| | | ) |
| | | insert into machine(heartbeat_time, machine_code, auth_code, location_type_cd, machine_version, machine_name, |
| | | machine_mac, |
| | | machine_id, type_id, state, community_id, location_obj_id, machine_type_cd, machine_ip, |
| | | direction, b_id) |
| | | values (#{heartbeatTime}, #{machineCode}, #{authCode}, #{locationTypeCd}, #{machineVersion}, #{machineName}, |
| | | #{machineMac}, |
| | | #{machineId}, #{typeId}, #{state}, #{communityId}, #{locationObjId}, #{machineTypeCd}, #{machineIp}, |
| | | #{direction}, #{bId}) |
| | | </insert> |
| | | |
| | | |
| | | <!-- 查询设备信息信息 add by wuxw 2018-07-03 --> |
| | | <select id="getMachineInfo" parameterType="Map" resultType="Map"> |
| | |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!-- 修改设备信息信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateMachineInfo" parameterType="Map"> |
| | |
| | | <if test="machineId !=null and machineId != ''"> |
| | | and t.machine_id= #{machineId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询设备信息数量 add by wuxw 2018-07-03 --> |
| | |
| | | <if test="direction !=null and direction != ''"> |
| | | and t.direction= #{direction} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |