package sgc.portal.com.com.service;

import sgc.portal.base.util.EasyHashMap;
import sgc.portal.com.com.model.BatchJob;
import sgc.portal.com.com.persistence.ComBatchJobMngMapper;
import sgc.portal.security.annotation.Secured;
import sgc.portal.security.annotation.SecurityPolicy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**********************************************************
 * 시스템명  		: 시스템관리(COM)
 * 프로그램ID 		: ComBatchJobMngService
 * 프로그램명   		: 배치JOB관리 Service
 * @author      : SBK
 * @version   	: 2022-09-19
 * @since JDK1.8
 * @see
 * 1. 최초 작성
**********************************************************/
@Transactional
@Service
public class ComBatchJobMngService
{

    @Autowired
    private ComBatchJobMngMapper comBatchJobMngMapper;

    /**
     * Select com cmpn mng list.
     *
     * @param cmpns the cmpns
     * @return the list
     */
    public  List<EasyHashMap<String, Object>>  selectComBatchJobMng()
    {
	    return comBatchJobMngMapper.selectComBatchJobMng();
    }

    /**
     * Save com cmpn mng.
     *
     * @param cmpns the cmpns
     * @return 
     */
//등록, 수정, 삭제
	@Secured(policy = SecurityPolicy.NONE)
    public Map<String, Object> excuteJobList(BatchJob batchJob)
    {
		Map<String,Object> result = new HashMap<>();
		
		comBatchJobMngMapper.excuteJobList(batchJob);
		
		
		return result;
    }
}
