mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-03 02:56:20 +00:00
fix: 获取是否订阅消息通知类型查询范围错误问题
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
package org.dromara.daxpay.service.dao.config;
|
||||
|
||||
import cn.bootx.platform.common.mybatisplus.impl.BaseManager;
|
||||
import org.dromara.daxpay.service.entity.config.MerchantNotifyConfig;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.daxpay.service.common.entity.MchAppBaseEntity;
|
||||
import org.dromara.daxpay.service.entity.config.MerchantNotifyConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
@@ -37,4 +39,11 @@ public class MerchantNotifyConfigManager extends BaseManager<MerchantNotifyConfi
|
||||
.eq(MerchantNotifyConfig::getCode, notifyType)
|
||||
.oneOpt();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据appId查询
|
||||
*/
|
||||
public List<MerchantNotifyConfig> findAllByAppId(String appId) {
|
||||
return findAllByField(MchAppBaseEntity::getAppId, appId);
|
||||
}
|
||||
}
|
||||
|
@@ -1,14 +1,14 @@
|
||||
package org.dromara.daxpay.service.service.config;
|
||||
|
||||
import cn.bootx.platform.common.mybatisplus.base.MpIdEntity;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.daxpay.service.common.cache.MchAppCacheService;
|
||||
import org.dromara.daxpay.service.dao.config.MerchantNotifyConfigManager;
|
||||
import org.dromara.daxpay.service.dao.constant.MerchantNotifyConstManager;
|
||||
import org.dromara.daxpay.service.entity.config.MerchantNotifyConfig;
|
||||
import org.dromara.daxpay.service.entity.constant.MerchantNotifyConst;
|
||||
import org.dromara.daxpay.service.result.config.MerchantNotifyConfigResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -37,7 +37,7 @@ public class MerchantNotifyConfigService {
|
||||
* 显示列表
|
||||
*/
|
||||
public List<MerchantNotifyConfigResult> findAllByAppId(String appId) {
|
||||
var map = configManager.findAll()
|
||||
var map = configManager.findAllByAppId(appId)
|
||||
.stream()
|
||||
.collect(Collectors.toMap(MerchantNotifyConfig::getCode, Function.identity(), (v1, v2) -> v1));
|
||||
List<MerchantNotifyConst> costs = constManagerAll.lambdaQuery().orderByAsc(MpIdEntity::getId).list();
|
||||
|
@@ -67,7 +67,7 @@ public class MerchantCallbackSendService {
|
||||
.execute();
|
||||
body = execute.body();
|
||||
} catch (Exception e) {
|
||||
log.error("发送通知失败,数据错误,任务ID:{}",task.getTradeId(),e);
|
||||
log.error("发送回调失败,数据错误,任务ID:{}",task.getTradeId(),e);
|
||||
record.setErrorMsg(e.getMessage());
|
||||
}
|
||||
// 如果响应值等于SUCCESS, 说明发送成功, 进行成功处理
|
||||
|
@@ -44,6 +44,7 @@ public class MerchantNotifyTaskService {
|
||||
*/
|
||||
public void registerPayNotice(PayOrder order) {
|
||||
if (this.nonRegister(NotifyContentTypeEnum.PAY)){
|
||||
log.info("支付通知无需回调,订单号:{}",order.getOrderNo());
|
||||
return;
|
||||
}
|
||||
var noticeResult = PayOrderConvert.CONVERT.toResult(order);
|
||||
@@ -85,6 +86,7 @@ public class MerchantNotifyTaskService {
|
||||
*/
|
||||
public void registerTransferNotice(TransferOrder order) {
|
||||
if (this.nonRegister(NotifyContentTypeEnum.TRANSFER)){
|
||||
log.info("转账无需回调,订单号:{}",order.getTransferNo());
|
||||
return;
|
||||
}
|
||||
var noticeResult = TransferOrderConvert.CONVERT.toResult(order);
|
||||
|
Reference in New Issue
Block a user