package com.th.demo.controller.system;

import com.th.demo.service.impl.system.SysLoginServiceImpl;
import com.th.demo.service.system.SysLoginService;
import com.th.demo.tools.Tools;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.io.PrintWriter;

@RestController
@RequestMapping(value = "/SysLogin")
public class SysLoginController {
    @Autowired
    public SysLoginService sysLoginService;

    @RequestMapping(value = "/login.do", method = RequestMethod.POST)
    public String login(String username,
                        String password
    ) throws IOException {
        String result = sysLoginService.login(username, password);
        return result;

    }


}
