<?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.api.butlerApp.dao.butler.ButlerAlarmDao">

    <insert id="insertAlarmRecord" parameterType="com.api.model.butlerApp.ButlerAppAlarm">
        insert into sys_one_button_alarm_butler(
            create_id,
            create_date
        )values (
            #{createId},
            #{createDate}
        )
    </insert>
    <select id="findOrganizationByUserId" parameterType="java.lang.Integer" resultType="java.lang.String">
        select so.name
        from sys_user as su,sys_organization as so
        where su.organization_id = so.id and su.id = #{createId}
    </select>
    <select id="findNameByUserId" parameterType="java.lang.Integer" resultType="java.lang.String">
        select actual_name from sys_user where id = #{createId}
    </select>
    <select id="findTelByUserId" resultType="java.lang.String">
        select tel from sys_user where id = #{createId}
    </select>
</mapper>