package com.chenyang.nse.bussiness.service.core.impl;

import com.chenyang.nse.bussiness.dao.table.core.desensitizationtask.TCoreMonitorTmporaryDao;
import com.chenyang.nse.bussiness.service.core.TCoreMonitorTmporaryService;
import java.util.List;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Repository
@EnableAsync
@Transactional
public class TCoreMonitorTmporaryServiceImpl implements TCoreMonitorTmporaryService {
   @Autowired
   TCoreMonitorTmporaryDao tCoreMonitorTmporaryDao;

   public List queryTaskList(String taskid) {
      return this.tCoreMonitorTmporaryDao.queryGroup(Order.desc("groupid"), "groupid", new Criterion[]{Restrictions.eq("taskid", taskid)});
   }

   public void removeTaskList(String taskid) {
      this.tCoreMonitorTmporaryDao.remove(new Criterion[]{Restrictions.eq("taskid", taskid)});
   }
}
