From 39096ae6b4255fc18436fb6e68e7e26b03e30295 Mon Sep 17 00:00:00 2001
From: puhanshu <a9236326>
Date: 星期一, 20 十二月 2021 10:04:12 +0800
Subject: [PATCH] 修改bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserTradeServiceImpl.java |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserTradeServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserTradeServiceImpl.java
index 8b46e66..2609a25 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserTradeServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActIntegralUserTradeServiceImpl.java
@@ -99,6 +99,10 @@
     @Override
     public Long addIntegralTradeRecord(Long userId, Long integralId, Long communityId, Long serviceId,
         Integer serviceType, Integer amount, Integer changeType, String remark, Integer identityType, Long createBy) {
+        if (amount < 0) {
+            changeType = ComActIntegralUserTradeDO.changeType.reduce;
+            amount = Math.abs(amount);
+        }
         ComActIntegralUserTradeDO integralUserTradeDO = new ComActIntegralUserTradeDO();
         integralUserTradeDO.setId(Snowflake.getId());
         integralUserTradeDO.setUserId(userId);

--
Gitblit v1.7.1