package com.eactive.eai.rms.onl.common.service.syncup;

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

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.beans.factory.annotation.Autowired;

import com.eactive.eai.rms.common.base.BaseService;

@Service
@Transactional
public class PortalApiSpecSyncUpService extends BaseService {
	
	private SyncUpDao syncUpDao;
	
	@Autowired
	public PortalApiSpecSyncUpService(SyncUpDao syncUpDao) {
		this.syncUpDao = syncUpDao;
	}
	
	/* Portal Api Spec STG TO PRD SEND*/
	public void insertPtlApiSpecInfoIntfSnd(String schemaId) {

		HashMap<String, Object> paramMap = new HashMap<>();
		
		paramMap.put("schemaId", schemaId);
		
		syncUpDao.insertPortalApiSpecInfoIntfSnd(paramMap);
	}
	
	/* Portal Api Spec STG TO PRD RCV*/
	public void deletePtlApiSpecInfoRcv(String schemaId) {

		HashMap<String, Object> paramMap = new HashMap<>();
		
		paramMap.put("schemaId", schemaId);
		
		syncUpDao.deletePortalApiSpecInfoRcv(paramMap);
	}
	
	public void insertPtlApiSpecInfoRcv(String schemaId) {

		HashMap<String, Object> paramMap = new HashMap<>();
		
		paramMap.put("schemaId", schemaId);
		
		syncUpDao.insertPortalApiSpecInfoRcv(paramMap);
	}
	
	public List<HashMap<String, Object>> updatePtlApiSpecInfoIntfRcv(String schemaId) {

		HashMap<String, Object> paramMap = new HashMap<>();
		
		paramMap.put("schemaId", schemaId);
		
		return syncUpDao.updatePortalApiSpecInfoIntfRcv(paramMap);
	}

}
