<?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.gyee.wisdom.alarm.sharding.mapper.AlarmUserMapper">

    <select id="login" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.sharding.entity.AlarmUser">
        select * from  ALARM_USER a
        <where>
            1=1
            <if test="userName !=null and userName !=''">
                and a.username=#{userName}
            </if>
            <if test="passWord !=null and passWord !=''">
                and a.password=#{passWord}
            </if>
        </where>
    </select>

    <select id="getUserByUserName" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.sharding.entity.AlarmUser">
        select * from  ALARM_USER a
        <where>
            1=1
            <if test="userName !=null and userName !=''">
                and a.username=#{userName}
            </if>

        </where>
    </select>
    <select id="getAll" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.sharding.entity.AlarmUser">
        select * from  ALARM_USER a
    </select>

    <delete id="deleteByIds" parameterType="String">
        delete from ALARM_USER where id = #{id}
    </delete>
</mapper>
