记得上下班打卡 | git大法好,push需谨慎

Commit 3fa927f7 authored by zhanggb's avatar zhanggb

+feign:api:手机号静默登录接口(内部调用);

parent 4fa6a264
...@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern; import javax.validation.constraints.Pattern;
import java.util.List; import java.util.List;
...@@ -43,4 +44,11 @@ public interface FeignAdamBaseClient { ...@@ -43,4 +44,11 @@ public interface FeignAdamBaseClient {
@PostMapping(value = {"rsc/reg/mobile"}) @PostMapping(value = {"rsc/reg/mobile"})
ResponseDto<AdamUserInfoVo> registerByMobile(@Pattern(regexp = "\\d{11}", message = "手机号格式有误") ResponseDto<AdamUserInfoVo> registerByMobile(@Pattern(regexp = "\\d{11}", message = "手机号格式有误")
@RequestParam(value = "mobile") String mobile); @RequestParam(value = "mobile") String mobile);
@PostMapping(value = {"login/silent_mobile"})
ResponseDto<AdamUserInfoVo> loginBySilentMobile(@Pattern(regexp = "\\d{11}", message = "手机号格式有误")
@NotBlank(message = "手机号不能为空")
@RequestParam(value = "mobile") String mobile,
@NotBlank(message = "临时票据不能为空")
@RequestParam(value = "otp") String otp);
} }
...@@ -330,11 +330,11 @@ public class AdamLoginController { ...@@ -330,11 +330,11 @@ public class AdamLoginController {
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "otp", value = "临时票据"), @ApiImplicitParam(type = "form", required = true, dataType = "String", name = "otp", value = "临时票据"),
}) })
@PostMapping(value = {"login/silent_mobile"}) @PostMapping(value = {"login/silent_mobile"})
public ResponseDto<AdamLoginInfoVo> loginByMobile(@Pattern(regexp = "\\d{11}", message = "手机号格式有误") public ResponseDto<AdamLoginInfoVo> loginBySilentMobile(@Pattern(regexp = "\\d{11}", message = "手机号格式有误")
@NotBlank(message = "手机号不能为空") @NotBlank(message = "手机号不能为空")
@RequestParam String mobile, @RequestParam String mobile,
@NotBlank(message = "临时票据不能为空") @NotBlank(message = "临时票据不能为空")
@RequestParam String otp) { @RequestParam String otp) {
log.info("login by silent for mobile:{},{}", mobile, otp); log.info("login by silent for mobile:{},{}", mobile, otp);
String otpDecrypt = null; String otpDecrypt = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment