Commit 9a54ecb3 authored by 黎博's avatar 黎博

更新造数据状态

parent 55a3881a
...@@ -39,5 +39,10 @@ public class GenLoanUser { ...@@ -39,5 +39,10 @@ public class GenLoanUser {
/** /**
* 当前状态 * 当前状态
*/ */
private String status; private Integer status;
/**
* 状态描述
*/
private String desc;
} }
...@@ -9,13 +9,10 @@ import lombok.extern.slf4j.Slf4j; ...@@ -9,13 +9,10 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import sun.applet.Main;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.print.URIException;
import java.net.URISyntaxException; import java.net.URISyntaxException;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit;
@Service @Service
...@@ -147,8 +144,15 @@ public class GenUserDataServiceImpl implements GenUserDataService { ...@@ -147,8 +144,15 @@ public class GenUserDataServiceImpl implements GenUserDataService {
Map authResult = MainProcess.queryUserAuditRecord(namespace, userId); Map authResult = MainProcess.queryUserAuditRecord(namespace, userId);
String orderNo = authResult.get("order_no").toString().trim(); String orderNo = authResult.get("order_no").toString().trim();
String productId = authResult.get("product_id").toString(); String productId = authResult.get("product_id").toString();
Long accountId;
// 查询accountId // 查询accountId
Long accountId = MainProcess.getUserAccountId(namespace, userId, productId); try {
accountId = MainProcess.getUserAccountId(namespace, userId, productId);
} catch (IndexOutOfBoundsException e) {
e.printStackTrace();
log.info("资方分配失败,quota_account表中无法查询到accountId!");
return false;
}
// 绑卡 // 绑卡
String payToken = MainProcess.bindCard(namespace, token, accountId); String payToken = MainProcess.bindCard(namespace, token, accountId);
// 绑卡发送短信 // 绑卡发送短信
...@@ -301,27 +305,33 @@ public class GenUserDataServiceImpl implements GenUserDataService { ...@@ -301,27 +305,33 @@ public class GenUserDataServiceImpl implements GenUserDataService {
genLoanUser = queryBasicLoanStatusDataService.getUserInfoByPhoneNo(namespace, phoneNo); genLoanUser = queryBasicLoanStatusDataService.getUserInfoByPhoneNo(namespace, phoneNo);
// 资方审核中 // 资方审核中
if (redisResult.equals("0")) { if (redisResult.equals("0")) {
genLoanUser.setStatus("资方审核中..."); genLoanUser.setStatus(0);
genLoanUser.setDesc("资方审核中...");
} }
// 资方审核失败 // 资方审核失败
if (redisResult.equals("1")) { if (redisResult.equals("1")) {
genLoanUser.setStatus("资方审核失败"); genLoanUser.setStatus(1);
genLoanUser.setDesc("资方审核失败");
} }
// 提现成功 // 提现成功
if (redisResult.equals("2")) { if (redisResult.equals("2")) {
genLoanUser.setStatus("提现成功"); genLoanUser.setStatus(2);
genLoanUser.setDesc("提现成功");
} }
// 提现失败 // 提现失败
if (redisResult.equals("10")) { if (redisResult.equals("10")) {
genLoanUser.setStatus("提现失败"); genLoanUser.equals("10");
genLoanUser.setDesc("资方分配失败");
} }
// 放款成功 // 放款成功
if (redisResult.equals("3")) { if (redisResult.equals("3")) {
genLoanUser.setStatus("放款成功"); genLoanUser.setStatus(3);
genLoanUser.setDesc("放款成功");
} }
// 放款失败 // 放款失败
if (redisResult.equals("4")) { if (redisResult.equals("4")) {
genLoanUser.setStatus("放款失败"); genLoanUser.setStatus(4);
genLoanUser.setDesc("放款失败");
} }
return genLoanUser; return genLoanUser;
} }
......
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