<?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.cf.imes.module.system.dal.mysql.machine.MachineMapper">


    <select id="selectMachine" resultType="com.cf.imes.module.system.dal.dataobject.machine.MachineDO">


        select *
        from system_machine
                 where organ_id = #{organId}
                   and deleted = false
                   and machine_type = #{machineType}
                   and name  = #{name}
                   and id != #{machineId};


    </select>

    <select id="selectMachineDataSource" resultType="java.util.Map">

        select ${filed}  from system_machine where organ_id = #{organId} and deleted = false and id = #{machineId}

    </select>
</mapper>