package sgc.portal.com.com.service;

import sgc.portal.base.util.EasyHashMap;
import sgc.portal.com.com.model.ComPasswordPolicy;
import sgc.portal.com.com.persistence.ComPasswordPolicyMapper;
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;

/**
 *
 *
 * .
 *
 * @author beomgeun.lee
 * @version 1.0.0
 * @since 2020. 8. 2.
 */

@Transactional
@Service
public class ComPasswordPolicyService {

	@Autowired
	private ComPasswordPolicyMapper comPasswordPolicyMapper;

	public List<EasyHashMap<String, Object>> selectComPasswordPolicyList(ComPasswordPolicy comPasswordPolicy) {
		return comPasswordPolicyMapper.selectComPasswordPolicyList(comPasswordPolicy);
	}
	
	public EasyHashMap<String, Object> selectComPasswordPolicyMap() {
		return comPasswordPolicyMapper.selectComPasswordPolicyMap();
	}

	public Map<String, Object> saveComPasswordPolicy(ComPasswordPolicy comPasswordPolicy) {
		Map<String, Object> result = new HashMap<>();
		comPasswordPolicyMapper.saveComPasswordPolicyInsert(comPasswordPolicy);
		return result;
	}
}
