parent
ef809e0737
commit
26d24ed5f9
@ -1,4 +1,4 @@
|
||||
package com.mashibing.apipassenger.request;
|
||||
package com.mashibing.internalcommon.request;
|
||||
|
||||
|
||||
import lombok.Data;
|
@ -0,0 +1,29 @@
|
||||
package com.mashibing.servicepassengeruser.controller;
|
||||
|
||||
import com.mashibing.internalcommon.dto.ResponseResult;
|
||||
import com.mashibing.internalcommon.request.VerificationCodeDTO;
|
||||
import com.mashibing.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 service;
|
||||
|
||||
@PostMapping("/user")
|
||||
public ResponseResult loginOrReg(@RequestBody VerificationCodeDTO verificationCodeDTO){
|
||||
|
||||
String passengerPhone = verificationCodeDTO.getPassengerPhone();
|
||||
System.out.println("手机号:"+passengerPhone);
|
||||
|
||||
// 调用接口实现
|
||||
service.loginOrRegister(passengerPhone);
|
||||
|
||||
return ResponseResult.success("");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
package com.mashibing.servicepassengeruser.service;
|
||||
|
||||
import com.mashibing.internalcommon.dto.ResponseResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class UserService {
|
||||
|
||||
public ResponseResult loginOrRegister(String passengerPhone){
|
||||
|
||||
System.out.println("user service 被调用,手机号码为:"+passengerPhone);
|
||||
|
||||
//根据手机号查询用户信息
|
||||
|
||||
//判断用户信息是否存在
|
||||
|
||||
//如果不存在,插入用户信息
|
||||
|
||||
return ResponseResult.success();
|
||||
}
|
||||
}
|
Loading…
Reference in new issue