package org.jeecg.modules.api.teambuyController;

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.apiService.LoginApiService;
import org.jeecg.modules.bean.LoginReq;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags="登录-登录相关接口")
@RestController
@RequestMapping("/teambuy/login")
@Slf4j
public class ApiLoginController {
    /******************************************************************************************************************/
    //工作信息
    @Resource
    private LoginApiService loginApiService;
    /******************************************************************************************************************/

    //小程序-微信授权登录接口
    @ApiOperation(value="小程序-微信授权登录接口", notes="小程序-微信授权登录接口")
    @GetMapping("/login")
    public Result<?> login(LoginReq loginReq){
        return loginApiService.login(loginReq);
    }

    //绑定手机号码
    @ApiOperation(value="小程序-绑定手机号码", notes="小程序-绑定手机号码")
    @GetMapping(value = "/bindPhone")
    public Result<Object> bindPhone(String phoneCode){
        return loginApiService.bindPhone(phoneCode);
    }

}
