|
@@ -1,11 +1,9 @@
|
|
|
package com.chelvc.cloud.vehicle.server.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.alibaba.fastjson.parser.Feature;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import com.chelvc.cloud.user.client.UserClient;
|
|
|
import com.chelvc.cloud.vehicle.client.constant.TradeConstant;
|
|
|
import com.chelvc.cloud.vehicle.client.util.SFTPUtils;
|
|
|
import com.chelvc.cloud.vehicle.server.dao.MerchantRelationMapper;
|
|
@@ -15,8 +13,6 @@ import com.chelvc.cloud.vehicle.server.service.MerchantApplyRecordService;
|
|
|
import com.chelvc.cloud.vehicle.server.service.MerchantRelationService;
|
|
|
import com.chelvc.cloud.vehicle.server.service.MerchantService;
|
|
|
import com.chelvc.framework.common.exception.ResourceUnavailableException;
|
|
|
-import com.upay.sdk.Constants;
|
|
|
-import com.upay.sdk.core.CipherWrapper;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
@@ -124,20 +120,16 @@ public class MerchantRelationServiceImpl extends ServiceImpl<MerchantRelationMap
|
|
|
JSONObject json = TradeHandle.handle(String.valueOf(jsonObject), TradeConstant.DECLARE_URL,
|
|
|
TradeConstant.PARTNER_ID, null);
|
|
|
String status = json.getString("status");
|
|
|
- int recordStatus = 0;
|
|
|
- if("SUCCESS".equals(status)){
|
|
|
- recordStatus = 2;
|
|
|
- } else {
|
|
|
- recordStatus = 1;
|
|
|
+ if(!"SUCCESS".equals(status)) {
|
|
|
String errorMessage = json.getString("errorMessage");
|
|
|
- throw new ResourceUnavailableException("【认证失败】:"+errorMessage);
|
|
|
+ throw new ResourceUnavailableException("【认证失败】:" + errorMessage);
|
|
|
}
|
|
|
String subMerchantId = json.getString("subMerchantId");
|
|
|
MerchantApplyRecord record = new MerchantApplyRecord();
|
|
|
- record.setUserId(merchantAuth.getId());
|
|
|
+ record.setUserId(merchantAuth.getApplicant());
|
|
|
record.setType(2);
|
|
|
record.setRequestId(requestId);
|
|
|
- record.setStatus(recordStatus);
|
|
|
+ record.setStatus(0);
|
|
|
record.setOperationType("CREATE");
|
|
|
record.setExamineStatus("PROCESSING");
|
|
|
record.setSubMerchantId(subMerchantId);
|
|
@@ -213,11 +205,7 @@ public class MerchantRelationServiceImpl extends ServiceImpl<MerchantRelationMap
|
|
|
JSONObject json = TradeHandle.handle(String.valueOf(jsonObject), TradeConstant.DECLARE_URL,
|
|
|
TradeConstant.PARTNER_ID, null);
|
|
|
String status = json.getString("status");
|
|
|
- int recordStatus = 0;
|
|
|
- if("SUCCESS".equals(status)){
|
|
|
- recordStatus = 2;
|
|
|
- } else {
|
|
|
- recordStatus = 1;
|
|
|
+ if(!"SUCCESS".equals(status)){
|
|
|
String errorMessage = json.getString("errorMessage");
|
|
|
throw new ResourceUnavailableException("【认证失败】:"+errorMessage);
|
|
|
}
|
|
@@ -226,7 +214,7 @@ public class MerchantRelationServiceImpl extends ServiceImpl<MerchantRelationMap
|
|
|
record.setUserId(userAuth.getUserId());
|
|
|
record.setType(1);
|
|
|
record.setRequestId(requestId);
|
|
|
- record.setStatus(recordStatus);
|
|
|
+ record.setStatus(0);
|
|
|
record.setOperationType("CREATE");
|
|
|
record.setExamineStatus("PROCESSING");
|
|
|
record.setSubMerchantId(subMerchantId);
|