main
topsun 2 years ago
parent ad3672c2d9
commit 12d0880874

@ -1,6 +1,8 @@
package com.taxi.apipassenger.controller;
import com.taxi.apipassenger.request.VerificationCodeDTO;
import com.taxi.apipassenger.service.VerificationCodeService;
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;
@ -8,13 +10,14 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
public class VerificationCodeController {
@Autowired
public VerificationCodeService verificationCodeService;
@GetMapping("/verification-code")
public String verificationCode(@RequestBody VerificationCodeDTO verificationCodeDTO){
String passengerPhone = verificationCodeDTO.getPassengerPhone();
System.out.println("接受到的手机号码参数:"+passengerPhone);
return "";
return verificationCodeService.generatorCode(passengerPhone);
}
}

@ -17,7 +17,8 @@ public class VerificationCodeService {
//返回值
JSONObject result =new JSONObject();
return code;
result.put("code",1);
result.put("message","success");
return result.toString();
}
}

Loading…
Cancel
Save