OWL ITS + 탐지시스템(인터넷 진흥원)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package kr.wisestone.owl.web.controller;
 
import kr.wisestone.owl.domain.User;
import kr.wisestone.owl.domain.UserHistory;
import kr.wisestone.owl.service.UserHistoryService;
import kr.wisestone.owl.service.UserService;
import kr.wisestone.owl.web.condition.UserHistoryCondition;
import org.springframework.beans.factory.HierarchicalBeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
 
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
 
/**
 * Created by maprex on 2021-05-11
 */
@Controller
public class UserHistoryController extends BaseController {
 
    @Autowired
    private UserHistoryService userHistoryService;
 
    @Autowired
    private UserService userService;
 
    //  로그인 이력 입력
    @RequestMapping(value = "/userHistory/addLogin", produces = MediaType.APPLICATION_JSON_VALUE)
    public
    @ResponseBody
    Map<String, Object> addUserHistory() {
        Map<String, Object> resJsonData = new HashMap<>();
        // 개발했으나 불필요
//        UserHistoryCondition condition = new UserHistoryCondition();
//        condition.setHistoryType(UserHistory.HISTORY_LOGIN);
//        this.userHistoryService.addUserHistory(resJsonData, condition);
 
        this.userService.updateLastLogin();
 
        return this.setSuccessMessage(resJsonData);
    }
}