添加汇付支付

This commit is contained in:
韩鹏辉
2024-01-19 14:50:53 +08:00
parent f930f5a274
commit 7e90ab73b0
3 changed files with 27 additions and 14 deletions

View File

@@ -125,6 +125,8 @@
<configuration>
<mainClass>com.chaozhanggui.admin.system.Shell</mainClass>
<outputDirectory>./</outputDirectory>
<fork>true</fork>
<includeSystemScope>true</includeSystemScope>
</configuration>
<executions>
<execution>

View File

@@ -156,6 +156,6 @@
</select>
<select id="selectByStatus" resultMap="BaseResultMap">
select * from tb_pluss_merchant_audit_record where channel=7 and thirdStatus=1
select * from tb_pluss_merchant_audit_record where channel=7 and thirdStatus=3 and applicationId like concat('merchantResident_','%')
</select>
</mapper>

View File

@@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.mock.web.MockMultipartFile;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartFile;
@@ -1892,7 +1893,7 @@ public class HfMerService {
log.info("私钥:{}",privateKey);
Map<String, Object> merchantEntryParams = new HashMap<>(10);
merchantEntryParams.put("request_id", requestId);//请求流水号
merchantEntryParams.put("request_id", "openAccount_"+requestId);//请求流水号
merchantEntryParams.put("usr_phone", baseInfo.getContactmobile());//注册手机号
merchantEntryParams.put("cont_name", baseInfo.getContactname()); //联系人姓名
merchantEntryParams.put("cont_phone", baseInfo.getContactmobile());//联系人电话
@@ -2181,16 +2182,14 @@ public class HfMerService {
tbPlussMerchantHfInfoMapper.updateByPrimaryKey(hfInfo);
record.setThirdstatus("5");
record.setUpdatetime(new Date());
tbPlussMerchantAuditRecordMapper.updateByPrimaryKeySelective(record);
channelStatus.setStatus("3");
channelStatus.setStatus("00");
channelStatus.setThirdstatus("00");
channelStatus.setRemark("汇付审核通过");
channelStatus.setMercname(null);
tbPlussMerchantChannelStatusMapper.updateByPrimaryKeySelective(channelStatus);
Map map=null;
//上传证照
TbPlussMerchantBaseInfo baseInfo= tbPlussMerchantBaseInfoMapper.selectByMerchantcode(record.getMerchantcode());
@@ -2283,6 +2282,7 @@ public class HfMerService {
tbPlussMerchantHfInfoMapper.updateByPrimaryKey(hfInfo);
record.setThirdstatus("5");
record.setStatus("1");
record.setUpdatetime(new Date());
tbPlussMerchantAuditRecordMapper.updateByPrimaryKeySelective(record);
@@ -2332,7 +2332,7 @@ public class HfMerService {
init();
String requestId= SnowFlakeUtil.nextId().toString();
Map<String, Object> merchantEntryParams = new HashMap<>(10);
merchantEntryParams.put("request_id", requestId);//测试时每次请求需修改流水
merchantEntryParams.put("request_id", "merchantResident_"+requestId);//测试时每次请求需修改流水
merchantEntryParams.put("sub_Api_Key", sub_Api_Key);//商户进件后返回的生产或者测试API Key
merchantEntryParams.put("fee_type", "02");//费率01-标准费率线上02-标准费率线下
merchantEntryParams.put("app_id", app_id);//商户进件后返回的应用ID
@@ -2368,7 +2368,7 @@ public class HfMerService {
merchantAuditRecord.setMerchantcode(baseInfo.getMerchantcode());
merchantAuditRecord.setChannel(7);
merchantAuditRecord.setMerchantid(sub_Api_Key);
merchantAuditRecord.setThirdstatus("1");
merchantAuditRecord.setThirdstatus("3");
merchantAuditRecord.setApplicationid(requestId);
merchantAuditRecord.setCreatetime(new Date());
tbPlussMerchantAuditRecordMapper.insert(merchantAuditRecord);
@@ -2387,8 +2387,7 @@ public class HfMerService {
log.info("商户入驻merchant config result=" + JSON.toJSONString(merchantResident));
}
@Scheduled(initialDelay = 1000,fixedDelay = 10000)
public void queryMerchantResident(){
List<TbPlussMerchantAuditRecord> records= tbPlussMerchantAuditRecordMapper.selectByStatus();
if(ObjectUtil.isEmpty(records)){
@@ -2396,7 +2395,7 @@ public class HfMerService {
return;
}
for (TbPlussMerchantAuditRecord record : records) {
queryResident(record.getApplicationid());
}
}
@@ -2404,9 +2403,21 @@ public class HfMerService {
public void queryResident(String requestId){
// MerchantResident.query()
init();
Map<String, Object> merchantEntryParams = new HashMap<>(10);
merchantEntryParams.put("request_id",requestId);
try {
Map<String, Object> queryMap= MerchantResident.query(merchantEntryParams);
if(ObjectUtil.isNotEmpty(queryMap)&&"succeeded".equals(queryMap.get("status").toString())){
authInfo(requestId);
}
} catch (BaseAdaPayException e) {
e.printStackTrace();
}
}