package com.ruoyi.tc.mapper.history;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.tc.entity.history.AssetEmailHistory;
import com.ruoyi.tc.entity.request.AssetzcTjRequest;
import com.ruoyi.tc.entity.response.AssetzcTjResponse;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 电子邮件资产表(asset_email_cp)表数据库访问层
 *
 * @author makejava
 * @since 2024-11-15 10:03:56
 */
public interface AssetEmailHistoryMapper extends BaseMapper<AssetEmailHistory> {


    /**
     * 电子邮件资产提交记录
     *
     * @param req
     * @return
     */
    @Select("select dzyxhz as xtmc, update_time as updateTime,status,email_id as id from  asset_email_history where task_id= #{req.taskId} and asset_id =#{req.assetId} and status!=0")
    List<AssetzcTjResponse> findByTaskIdandAssetId(@Param("req") AssetzcTjRequest req);
}

