package sgc.portal.cs.cs0104.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import sgc.portal.base.util.EasyHashMap;
import sgc.portal.com.auth.model.PrvtinfoFindHist;
import sgc.portal.com.auth.model.SmComHdlgAuth;
import sgc.portal.com.auth.service.MaskingDesabledService;
import sgc.portal.com.com.service.ComAuthUserMngService;
import sgc.portal.cs.cs0104.service.CS01040001UService;
import sgc.portal.cs.cs0104.dto.CS01040001USearch;
import sgc.portal.cs.cs0104.model.CS01040001U;

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

@RestController
@RequestMapping("/cs/cs0104")
public class CS01040001UController {
	
	private final CS01040001UService service;

    public CS01040001UController(CS01040001UService service) {
        this.service = service;
    }

    //사용자별현장권한 조회
    @PostMapping("/CS01040001U/selectSmComUserList")
    public List<EasyHashMap<String, Object>> selectSmComUserList(@RequestBody CS01040001USearch search) {
        return service.selectSmComUserList(search);
    }
    
    @PostMapping("/CS01040001U/selectTcsAuthUsersiteList")
    public List<EasyHashMap<String, Object>> selectTcsAuthUsersiteList(@RequestBody CS01040001USearch search) {
        return service.selectTcsAuthUsersiteList(search);
    }

	//사용자별현장권한 등록
    @PostMapping("/CS01040001U/saveTcsAuthUsersite")
    public Map<String, String> saveTcsAuthUsersite(@RequestBody CS01040001U cS01040001U) {
    	return service.saveTcsAuthUsersite(cS01040001U);
    }
}
