package com.hzya.frame.plugin.lets.util;

import com.hzya.frame.plugin.lets.constant.ProfilesActiveConstant;
import com.hzya.frame.plugin.lets.queryvo.QueryIntegrationTaskLivingDetails;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.dao.IIntegrationTaskLivingDetailsDao;
import com.hzya.frame.sysnew.integtationTaskLivingDetails.entity.IntegrationTaskLivingDetailsEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author：liuyang
 * @Package：com.hzya.frame.plugin.lets.util
 * @Project：kangarooDataCenterV3
 * @name：IntegrationTaskLivingDetailsUtil
 * @Date：2024/9/3 14:16
 * @Filename：IntegrationTaskLivingDetailsUtil
 */
@Component
public class IntegrationTaskLivingDetailsUtil {

    @Autowired
    private IIntegrationTaskLivingDetailsDao iIntegrationTaskLivingDetailsDao;

    /**
     * 批量查询日志明细
     *
     * @author liuyang
     */
    public List<IntegrationTaskLivingDetailsEntity> queryIntegrationTaskLivingDetails(String primaryKey, String pluginId) throws Exception {
        QueryIntegrationTaskLivingDetails queryIntegrationTaskLivingDetails = new QueryIntegrationTaskLivingDetails();
        queryIntegrationTaskLivingDetails.setRoot_app_pk_s(primaryKey);
        queryIntegrationTaskLivingDetails.setParam_new_state(ProfilesActiveConstant.LOG_STATUS_Y_H);
        queryIntegrationTaskLivingDetails.setPluginId(pluginId);
        return (List<IntegrationTaskLivingDetailsEntity>) iIntegrationTaskLivingDetailsDao.query(queryIntegrationTaskLivingDetails);
    }
}
