package com.eactive.eai.rms.common.acl.user;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.web.SortDefault;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

import com.eactive.eai.rms.common.acl.user.ui.UserLoginHistoryUI;
import com.eactive.eai.rms.common.base.BaseAnnotationController;
import com.eactive.eai.rms.common.vo.GridResponse;
import com.eactive.eai.rms.data.entity.onl.unifbwk.UnifBwkTpService;
import com.fasterxml.jackson.databind.ObjectMapper;


@Controller
public class UserLoginHistoryManController extends BaseAnnotationController {

	private final UserManService userManService;


	@Autowired
	public UserLoginHistoryManController(UserManService userManService) {
		this.userManService = userManService;
	}

	@GetMapping(value = "/common/acl/user/userLoginHistoryMan.view")
	public void view() {
		// view
	}

	@PostMapping(value = "/common/acl/user/userLoginHistoryMan.json", params = "cmd=LIST")
	public ResponseEntity<GridResponse<UserLoginHistoryUI>> selectList( Pageable pageable, UserLoginHistoryUI userLoginHistoryUI) {
		
		Page<UserLoginHistoryUI> page = userManService.selectList(pageable, userLoginHistoryUI);
		return ResponseEntity.ok(new GridResponse<>(page));
	}
}
