<?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="cn.com.ctop.kuaishou.modules.ai.mapper.AiKuaishouAccountLevelOperationRecordMapper">

    <select id="queryMatchResult" resultType="com.alibaba.fastjson.JSONObject">
        SELECT
            t1.account_id as 'accountId',
            t1.message as 'resultText',
            t1.`status` as 'authStatus',
            t2.auth_name as 'authName'
        FROM
            ctop_ai_kuaishou_account_level_operation_record t1
                LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
        where t1.project_id = #{projectId}
        and stat_date = DATE_FORMAT(now(), '%Y-%m-%d')
    </select>
</mapper>