/*
 * Copyright (c) 2019, PANNK and/or its affiliates. All rights reserved.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */
package com.pannk.mms.modules.sys.controller;

import com.pannk.mms.common.base.BaseController;
import com.pannk.mms.modules.sys.vo.LoginForm;
import com.pannk.mms.common.base.Result;
import com.pannk.mms.modules.sys.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author：wolf
 * @date：2020/11/2 23:13
 **/
@RequestMapping("/sys")
@RestController
public class SysLoginController extends BaseController {

    @Autowired
    private SysUserService sysUserService;

    @PostMapping("/login")
    public Result login(@RequestBody LoginForm loginForm) {
        return sysUserService.login(loginForm);
    }

    @PostMapping("/logout")
    public Result logout() {
        return Result.success();
    }
}
