package com.madeu.crm.settings.log.ctrl;

import com.madeu.init.ManagerDraftAction;
import com.madeu.crm.settings.log.dto.LogHistoryDTO;
import com.madeu.crm.settings.log.svc.LogHistoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Slf4j
@RestController
public class LogHistoryController extends ManagerDraftAction {

    @Autowired
    private LogHistoryService logHistoryService;

    @RequestMapping(value = "/logHistory/moveLogHistoryList.do")
    public ModelAndView moveLogHistoryList() throws Exception {
        return new ModelAndView("/crm/settings/log/logHistorySelectList");
    }

    @RequestMapping(value = "/logHistory/getLogHistoryList.do")
    public LogHistoryDTO getLogHistoryList(@RequestBody LogHistoryDTO paramDTO) throws Exception {
        return logHistoryService.getLogHistoryList(paramDTO);
    }
}
