增加认证后返回

main
rong.liu 12 months ago
parent dee79be6ef
commit e9f2d8a968
  1. 14
      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<UserAuthenticationInformation> 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 {

Loading…
Cancel
Save