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 PortalOrgSyncUpService extends BaseService {
	
	private SyncUpDao syncUpDao;
	
	@Autowired
	public PortalOrgSyncUpService(SyncUpDao syncUpDao) {
		this.syncUpDao = syncUpDao;
	}
	
	/* Portal Org PRD TO STG SEND*/
	public void insertPtlOrgIntfSnd(String schemaId) {

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

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

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

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

}
