From 9b74b38799f496090e0926b7957fea94bb18663b Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Fri, 9 Jan 2026 17:06:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/czg/mq/EntryManagerMqListener.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cash-api/order-server/src/main/java/com/czg/mq/EntryManagerMqListener.java b/cash-api/order-server/src/main/java/com/czg/mq/EntryManagerMqListener.java index b7c5ae1de..440802876 100644 --- a/cash-api/order-server/src/main/java/com/czg/mq/EntryManagerMqListener.java +++ b/cash-api/order-server/src/main/java/com/czg/mq/EntryManagerMqListener.java @@ -10,6 +10,7 @@ import com.czg.order.entity.ShopDirectMerchant; import com.czg.service.RedisService; import com.czg.service.order.dto.AggregateMerchantVO; import com.czg.service.order.service.ShopDirectMerchantService; +import com.mybatisflex.core.query.QueryWrapper; import com.rabbitmq.client.Channel; import jakarta.annotation.Resource; import lombok.extern.slf4j.Slf4j; @@ -86,8 +87,6 @@ public class EntryManagerMqListener { } EntryRespDto resp = EntryManager.entryMerchant(entry, platform.toArray(new String[0])); ShopDirectMerchant merchant = new ShopDirectMerchant(); - merchant.setShopId(entry.getShopId()); - merchant.setWechatApplyId(resp.getWechatApplyId()); merchant.setWechatStatus(resp.getWechatStatus()); merchant.setWechatErrorMsg(resp.getWechatErrorMsg()); @@ -96,17 +95,16 @@ public class EntryManagerMqListener { merchant.setAlipayStatus(resp.getAlipayStatus()); merchant.setAlipayAuthInfo(resp.getAlipayAuthInfo()); merchant.setAlipayErrorMsg(resp.getAlipayErrorMsg()); - shopDirectMerchantService.updateById(merchant); + shopDirectMerchantService.update(merchant, new QueryWrapper().eq(ShopDirectMerchant::getShopId, shopId).eq(ShopDirectMerchant::getLicenceNo, split[1])); } channel.basicAck(deliveryTag, false); } catch (Exception e) { log.error("进件MQ对接业务异常shopId:{}", msg, e); ShopDirectMerchant merchant = new ShopDirectMerchant(); - merchant.setShopId(shopId); merchant.setWechatStatus(PayCst.EntryStatus.REJECTED); merchant.setAlipayStatus(PayCst.EntryStatus.REJECTED); merchant.setErrorMsg("系统错误,请联系管理员后重试。"); - shopDirectMerchantService.updateById(merchant); + shopDirectMerchantService.update(merchant, new QueryWrapper().eq(ShopDirectMerchant::getShopId, shopId).eq(ShopDirectMerchant::getLicenceNo, split[1])); channel.basicNack(deliveryTag, false, false); } finally { delMessageId(msg);