|
@@ -188,17 +188,21 @@ public class RefundServiceImpl implements RefundService {
|
|
|
@Override
|
|
|
public ResponseEntity<String> refundNotice(PrepayNoticeVo prepayNoticeVo, String dsKey) {
|
|
|
log.info("微信退款申请成功回调函数: {},: {}", prepayNoticeVo, dsKey);
|
|
|
- List<String> dsKeys;
|
|
|
- if (StringUtils.isBlank(dsKey)) {
|
|
|
- List<TenantDo> tenantList = (List<TenantDo>) redisService.getRedisCatchObj("allTenants");
|
|
|
- // 获取 所有的主库信息
|
|
|
- dsKeys = tenantList.stream().map(TenantDo::getDskey).collect(Collectors.toList());
|
|
|
- } else {
|
|
|
- dsKeys = Collections.singletonList(dsKey);
|
|
|
- }
|
|
|
- dsKeys.remove("incontrol");
|
|
|
+ // List<String> dsKeys;
|
|
|
+ // if (StringUtils.isBlank(dsKey)) {
|
|
|
+ // List<TenantDo> tenantList = (List<TenantDo>) redisService.getRedisCatchObj("allTenants");
|
|
|
+ // // 获取 所有的主库信息
|
|
|
+ // dsKeys = tenantList.stream().map(TenantDo::getDskey).collect(Collectors.toList());
|
|
|
+ // } else {
|
|
|
+ // dsKeys = Collections.singletonList(dsKey);
|
|
|
+ // }
|
|
|
+ // dsKeys.remove("incontrol");
|
|
|
+ ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
|
|
+ HttpServletRequest request = attributes.getRequest();
|
|
|
+ // 设置租户信息 自动切库
|
|
|
+ request.setAttribute(Constants.SAAS_LOGIN_TOKEN, dsKey);
|
|
|
// 获取所有商户的密钥
|
|
|
- List<SwEnterpriseConfigInfoDo> secretKeyList = commonBusinessDao.getSecretKey(dsKeys);
|
|
|
+ List<SwEnterpriseConfigInfoDo> secretKeyList = commonBusinessDao.getSecretKey(Collections.singletonList(dsKey));
|
|
|
String analysisStr = null;
|
|
|
String deKey = null;
|
|
|
R error = R.error("失败");
|
|
@@ -237,10 +241,7 @@ public class RefundServiceImpl implements RefundService {
|
|
|
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(error.toString());
|
|
|
}
|
|
|
log.debug("json解析正常:{}",weChatRefundNoticeVo);
|
|
|
- ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
|
|
- HttpServletRequest request = attributes.getRequest();
|
|
|
- // 设置租户信息 自动切库
|
|
|
- request.setAttribute(Constants.SAAS_LOGIN_TOKEN, deKey);
|
|
|
+
|
|
|
|
|
|
String refundId = weChatRefundNoticeVo.getRefundId();
|
|
|
String outRefundNo = weChatRefundNoticeVo.getOutRefundNo();
|