package com.template.controller;

import com.template.annotation.PassToken;
import com.template.api.LogInfoControllerAPI;
import com.template.model.result.CommonResult;
import com.template.services.impl.SmsCodeServiceImpl;
import com.template.services.impl.SystemUserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class LogInfoController implements LogInfoControllerAPI {


    @Autowired
    SystemUserServiceImpl systemUserService;

    @Autowired
    SmsCodeServiceImpl smsCodeService;

    @Override
    @PassToken
    public CommonResult verifyPhone(@RequestParam String phone) {
        return CommonResult.ok();
    }

    @Override
    @PassToken
    public CommonResult logInfo(String phone, String code) {
        return smsCodeService.logIn(phone,code);
    }
}
