parent
d30fe1948d
commit
c4aca8d00e
@ -1,4 +1,4 @@
|
||||
package com.taxi.apipassenger.request;
|
||||
package com.internal.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
@ -0,0 +1,23 @@
|
||||
package com.taxi.servicepassengeruser.controller;
|
||||
|
||||
import com.internal.dto.ResponseResult;
|
||||
import com.internal.request.VerificationCodeDTO;
|
||||
import com.taxi.servicepassengeruser.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class UserController {
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@PostMapping("/user")
|
||||
public ResponseResult loginOrReg(@RequestBody VerificationCodeDTO verificationCodeDTO){
|
||||
String passengerPhone = verificationCodeDTO.getPassengerPhone();
|
||||
System.out.println("手机号:" + passengerPhone);
|
||||
return userService.loginOrReg(passengerPhone);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package com.taxi.servicepassengeruser.service;
|
||||
|
||||
import com.internal.dto.ResponseResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class UserService {
|
||||
|
||||
|
||||
public ResponseResult loginOrReg(String passengerPhone){
|
||||
System.out.println("UserService 被调用, 手机号: " + passengerPhone);
|
||||
//根据手机号查询用户信息
|
||||
|
||||
//判断用户信息是否存在
|
||||
|
||||
//如果不存在,插入用户信息
|
||||
return ResponseResult.success();
|
||||
}
|
||||
}
|
Loading…
Reference in new issue