diff --git a/mallinkAdmin/src/main/resources/db/migration/V20203271750__optimization.sql b/mallinkAdmin/src/main/resources/db/migration/V20203271750__optimization.sql
new file mode 100644
index 000000000..27b5c5f60
--- /dev/null
+++ b/mallinkAdmin/src/main/resources/db/migration/V20203271750__optimization.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `wx_msg_record`
+ADD INDEX `idx_uuid_msg`(`uuid`, `msg_type`, `msg_status`, `status_message`(8)) USING BTREE COMMENT '消息索引';
\ No newline at end of file
diff --git a/mallinkPosApi/src/main/java/com/iformall/service/impl/PosServiceImpl.java b/mallinkPosApi/src/main/java/com/iformall/service/impl/PosServiceImpl.java
index e82d2e04c..f8de6e1c0 100644
--- a/mallinkPosApi/src/main/java/com/iformall/service/impl/PosServiceImpl.java
+++ b/mallinkPosApi/src/main/java/com/iformall/service/impl/PosServiceImpl.java
@@ -2346,6 +2346,7 @@ public class PosServiceImpl implements PosService {
try {
orderQ = orderMapper.selectOne(new QueryWrapper<>(orderQ));
} catch (Exception e) {
+ logger.error("sql error ",e);
isExist = false;
}
if (orderQ != null) {
@@ -2424,6 +2425,7 @@ public class PosServiceImpl implements PosService {
try {
refundQ = orderMapper.selectOne(new QueryWrapper<>(refundQ));
} catch (Exception e) {
+ logger.error("sql error ",e);
}
if (refundQ != null) {
logger.error(ErrorCode.POS_ORDER_HAD_SYNCED.getMessage());
diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java
index d93c8043d..64c0466c5 100644
--- a/mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java
+++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCardSpendServiceImpl.java
@@ -85,7 +85,7 @@ public class WxCardSpendServiceImpl implements WxCardSpendService {
try {
couponMerchant = wxCouponMerchantMapper.selectOne(new QueryWrapper(couponMerchantQ));
} catch (Exception e) {
- logger.error("couponmerchant not found: " + cardInfo.getCouponId());
+ logger.error("couponmerchant not found: " + cardInfo.getCouponId(),e);
}
return couponMerchant;
}
diff --git a/mallinkService/src/main/resources/mapper/WxMsgRecordMapper.xml b/mallinkService/src/main/resources/mapper/WxMsgRecordMapper.xml
index ce39aff59..2c3cddffa 100644
--- a/mallinkService/src/main/resources/mapper/WxMsgRecordMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxMsgRecordMapper.xml
@@ -59,15 +59,22 @@
order by createtime desc
+
+
+
+
+
+
+
+
+
+
+
update wx_msg_record set updatetime = now()
,msg_status = #{msgStatus}
,status_message = #{statusMessage}
- where id in(
- select t.id from (
- select id from wx_msg_record where uuid = #{uuid}
- ) t
- )
+ where uuid = #{uuid}