package sgc.portal.as.as0101.service;

import java.util.List;

import org.springframework.stereotype.Service;

import sgc.portal.as.as0101.dto.AS01010001USearch;
import sgc.portal.as.as0101.model.AS01010001U;
import sgc.portal.as.as0101.persistence.AS01010001UMapper;
import sgc.portal.base.util.EasyHashMap;

@Service
public class AS01010001UService {
    
	private final AS01010001UMapper mapper;

    public AS01010001UService(AS01010001UMapper mapper) {
        this.mapper = mapper;
    }
    
    //공지사항 조회
    public List<EasyHashMap<String, Object>> selectTcsNotiList(AS01010001USearch search) {
        return mapper.selectTcsNotiList(search);
    }
    
    //공지사항 상세 보기 
    public EasyHashMap<String, Object> getTcsNotiView(AS01010001U cS01010001U) {
    	EasyHashMap<String, Object> view = mapper.selectTcsNotiView(cS01010001U);
    	if (view != null) {
    		mapper.updateTcsNotiHit(view);
    	}
    	return view;
    }
    
}