From e9f2d8a96851eb0d138cfe53f12b45a09f3f82e2 Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Fri, 15 Dec 2023 15:09:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=A4=E8=AF=81=E5=90=8E?= =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AliRealNameAuthenticationController.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/users/src/main/java/com/huoran/users/controller/AliRealNameAuthenticationController.java b/users/src/main/java/com/huoran/users/controller/AliRealNameAuthenticationController.java index 6dde4d0..a7eae53 100644 --- a/users/src/main/java/com/huoran/users/controller/AliRealNameAuthenticationController.java +++ b/users/src/main/java/com/huoran/users/controller/AliRealNameAuthenticationController.java @@ -1,5 +1,6 @@ package com.huoran.users.controller; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.google.gson.Gson; import com.huoran.common.response.R; import com.huoran.common.utils.TokenUtils; @@ -99,6 +100,19 @@ public class AliRealNameAuthenticationController { } + @PostMapping("/authenticationOrNot") + @ApiOperation(value = "是否认证", response = UserAuthenticationInformation.class) + public R authenticationOrNot(HttpServletRequest request) { + + String accountId = TokenUtils.getIdByJwtToken(request); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("account_id",accountId); + UserAuthenticationInformation userAuthenticationInformation = service.getOne(queryWrapper); + if (ObjectUtils.isEmpty(userAuthenticationInformation)){ + return R.ok().put("data", false); + } + return R.ok().put("data", true).put("authenticationInformation",userAuthenticationInformation); + } /*@ApiOperation(value = "输入身份证号码、姓名进行实名认证") @PostMapping("/realNameAuthentication") public R realNameAuthentication(@RequestParam(name = "idCardNo", required = true) @ApiParam(value = "身份证号码") String idCardNo, @RequestParam(name = "userName", required = true) @ApiParam(value = "用户姓名") String userName, HttpServletRequest request) throws IOException {