From ab7e92d5154b5acf05699bd527c4d8b5fff10550 Mon Sep 17 00:00:00 2001
From: zyy <zyy@email.com>
Date: Sat, 06 Dec 2025 19:01:30 +0800
Subject: [PATCH] 新增ATS
---
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRealNameAuthContoller.java | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRealNameAuthContoller.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRealNameAuthContoller.java
index 40e4075..e3a96a2 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRealNameAuthContoller.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiRealNameAuthContoller.java
@@ -12,6 +12,7 @@
import com.yami.trading.common.domain.Result;
import com.yami.trading.common.exception.YamiShopBindException;
import com.yami.trading.service.AwsS3OSSFileService;
+import com.yami.trading.service.IdentifyingCodeTimeWindowService;
import com.yami.trading.service.RealNameAuthRecordService;
import com.yami.trading.service.system.TipService;
import io.swagger.annotations.Api;
@@ -40,6 +41,9 @@
AwsS3OSSFileService awsS3OSSFileService;
@Autowired
MachineTranslationService translationService;
+
+ @Autowired
+ IdentifyingCodeTimeWindowService identifyingCodeTimeWindowService;
@PostMapping("/apply")
@ApiOperation(value = "实名认证申请")
@@ -73,12 +77,27 @@
realNameAuthRecord = new RealNameAuthRecord();
}
+ if (model.getIdBackImg() == null || model.getIdBackImg().isEmpty()) {
+ throw new YamiShopBindException("请上传完整证件信息");
+ }
+ if (model.getIdFrontImg() == null || model.getIdFrontImg().isEmpty()) {
+ throw new YamiShopBindException("请上传完整证件信息");
+ }
+
if (model.getIdNumber().length() > 50) {
throw new YamiShopBindException("证件号码长度超过50");
}
if (model.getName().length() >50) {
throw new YamiShopBindException("实名姓名长度超过50");
}
+ if (model.getPhone() == null || model.getPhone().isEmpty()) {
+ throw new YamiShopBindException("请输入手机号");
+ }
+
+ /*String authcode = identifyingCodeTimeWindowService.getAuthCode(model.getPhone());
+ if (authcode == null || !authcode.equals(model.getCode())) {
+ throw new YamiShopBindException("验证码不正确");
+ }*/
Date now = new Date();
BeanUtils.copyProperties(model, realNameAuthRecord);
@@ -88,6 +107,7 @@
realNameAuthRecord.setCreateTimeTs(now.getTime() / 1000L);
realNameAuthRecord.setUpdateTimeTs(now.getTime() / 1000L);
realNameAuthRecord.setStatus(1);
+ realNameAuthRecord.setPhone(model.getPhone());
realNameAuthRecordService.saveOrUpdate(realNameAuthRecord);
if (Constants.SECURITY_ROLE_MEMBER.equals(user.getRoleName())) {
@@ -126,6 +146,7 @@
map.put("idimg_1", record.getIdFrontImg());
map.put("idimg_2", record.getIdBackImg());
map.put("idimg_3", record.getHandheldPhoto());
+ map.put("phone", record.getPhone());
return Result.succeed(map);
}
--
Gitblit v1.9.3