<?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="org.jeecg.modules.ctop.mapper.MailLogMapper">


    <select id="selectCountByAccountIdAndDate" resultType="java.lang.Integer">

        select
        count(1)
        from
        ctop_mail_log
        where account_id = #{accountId}
        and DATE_FORMAT(create_time,'%Y-%m-%d') = #{createTime}


    </select>
    <select id="selectMailList" resultType="java.lang.String">
     select
     t2.email
     from
     ctop_project_member t1
     left join sys_user t2
     on t1.user_id = t2.id
     where t1.project_id = #{projectId}
     and t2.email != ''
    </select>


    <select id="selectWeiXinIdList" resultType="java.lang.String">
     select
     t2.wexin_id
     from
     ctop_project_member t1
     left join ctop_corp_wexin_user t2
     on t1.user_id = t2.user_id
     where t1.project_id = #{projectId}
     and t2.wexin_id != ''
    </select>


</mapper>