sendJobStatusSql.php 625 字节
<?php

namespace Model;

/**
 * 邮件发送任务状态
 * @author:dc
 * @time 2023/4/10 16:27
 * Class sendJobStatusSql
 * @package Model
 */
class sendJobStatusSql {

    /**
     * 表
     * @var string
     */
    public static $table = 'send_job_status';


    /**
     * 统计
     * @param int $job_id
     * @param string $to
     * @return string
     * @author:dc
     * @time 2023/4/11 16:13
     */
    public static function count(int $job_id, string $to=''):string {
        return "select count(*) from `".self::$table."` where `job_id` = {$job_id} ".($to ? "and `to_email` = '{$to}'" : '');
    }



}