|
@@ -2,6 +2,9 @@ package com.qunzhixinxi.hnqz.admin.controller;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import cn.hutool.json.JSONObject;
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
+import com.qunzhixinxi.hnqz.admin.api.constant.CacheConstants;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.SysUserSub;
|
|
|
import com.qunzhixinxi.hnqz.admin.entity.dto.UserSignCertDTO;
|
|
|
import com.qunzhixinxi.hnqz.admin.service.gig.SysUserSignCertService;
|
|
@@ -10,6 +13,8 @@ import com.qunzhixinxi.hnqz.common.log.annotation.SysLog;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -31,6 +36,8 @@ public class SysUserSignCertController {
|
|
|
|
|
|
private final SysUserSignCertService sysUserSignCertService;
|
|
|
|
|
|
+ private final RedisTemplate redisTemplate;
|
|
|
+
|
|
|
/**
|
|
|
* 保存用户基础信息
|
|
|
*
|
|
@@ -175,4 +182,20 @@ public class SysUserSignCertController {
|
|
|
|
|
|
return R.ok();
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询签约认证结果
|
|
|
+ *
|
|
|
+ * @param userId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("/sign-cert-result/{userId}")
|
|
|
+ public R<?> getSignCertResult(@PathVariable("userId") Integer userId) {
|
|
|
+ String key = CacheConstants.USER_SIGN_CERT_RESPONSE_KEY + userId;
|
|
|
+ JSONObject response = (JSONObject) redisTemplate.opsForValue().get(key);
|
|
|
+ if (response == null) {
|
|
|
+ return R.failed("没有结果");
|
|
|
+ }
|
|
|
+ return R.ok(response);
|
|
|
+ }
|
|
|
}
|