Commit 77f7792f authored by 黎博's avatar 黎博

新增vcc查数据

parent 5b0ca2c6
package cn.qg.qaplatform.controller;
import cn.qg.qaplatform.common.JsonResult;
import cn.qg.qaplatform.common.enums.VccStatusEnum;
import cn.qg.qaplatform.domain.QueryVccUser;
import cn.qg.qaplatform.service.VccDataService;
import cn.qg.qaplatform.utils.page.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.Map;
@CrossOrigin
@RestController
@RequestMapping("/vcc")
......@@ -29,4 +33,21 @@ public class QueryVccController {
QueryVccUser queryVccUser = vccDataService.queryUserVccStatus(namespace, phoneNo);
return JsonResult.success(queryVccUser);
}
@GetMapping("/checkData")
public JsonResult checkUserData(String namespace, String phoneNo, String idCardNo) {
QueryVccUser queryVccUser = vccDataService.queryUserVccStatus(namespace, phoneNo);
if (queryVccUser == null) {
return JsonResult.serverFailed("数据不存在!");
}
Map<String, Object> map = new HashMap<>();
map.put("phoneNo", queryVccUser.getPhoneNo());
map.put("userId", queryVccUser.getUserId());
map.put("uuid", queryVccUser.getUuid());
map.put("registeredFrom", queryVccUser.getRegisteredFrom());
map.put("nextApplyTime", queryVccUser.getNextApplyTime());
map.put("createdAt", queryVccUser.getCreatedAt());
map.put("status", VccStatusEnum.getDescByCode(queryVccUser.getStatus()));
return JsonResult.success(map);
}
}
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