package org.jeecg.modules.xcx.user.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.bean.LoginReq;
import org.jeecg.modules.xcx.user.service.ILoginService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "登录接口")
@Slf4j
@RestController
@RequestMapping("/login")
public class XcxLoginController {

    @Resource
    private ILoginService loginService;

    @ApiOperation(value = "登录")
    @PostMapping("/login")
    public Result<?> officialLogin(LoginReq loginReq){
        return loginService.officialLogin(loginReq);
    }

}
