parent
8789de157f
commit
b20b37e473
@ -0,0 +1,25 @@
|
||||
package com.taxi.apidriver.controller;
|
||||
|
||||
import com.internal.dto.ResponseResult;
|
||||
import com.internal.request.VerificationCodeDTO;
|
||||
import com.taxi.apidriver.service.VerficationCodeService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class VerficationCodeController {
|
||||
|
||||
@Autowired
|
||||
private VerficationCodeService verficationCodeService;
|
||||
|
||||
@GetMapping("/verfication-code")
|
||||
public ResponseResult verficationCode(@RequestBody VerificationCodeDTO verificationCodeDTO){
|
||||
String driverPhone = verificationCodeDTO.getDriverPhone();
|
||||
log.info("司机的号码"+driverPhone);
|
||||
return verficationCodeService.checkSendVerficationCode(driverPhone);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.taxi.apidriver.service;
|
||||
|
||||
import com.internal.dto.ResponseResult;
|
||||
import com.internal.request.VerificationCodeDTO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
@Service
|
||||
public class VerficationCodeService {
|
||||
|
||||
|
||||
public ResponseResult checkSendVerficationCode(String driverPhone){
|
||||
//查询该手机号的司机是否存在
|
||||
|
||||
//获取验证码
|
||||
|
||||
//调用三方,获取验证码
|
||||
|
||||
//存入redis
|
||||
|
||||
return ResponseResult.success();
|
||||
}
|
||||
}
|
Loading…
Reference in new issue