zangbin il y a 1 an
Parent
commit
c627a43ed2

+ 3 - 0
tour-module/src/main/java/com/tour/module/service/impl/MakeCardServiceImpl.java

@@ -16,6 +16,7 @@ import org.apache.commons.lang3.StringUtils;
 import com.tour.module.mapper.MakeCardMapper;
 import com.tour.module.domain.MakeCard;
 import com.tour.module.service.IMakeCardService;
+import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.ArrayList;
@@ -32,6 +33,7 @@ public class MakeCardServiceImpl extends ServiceImpl<MakeCardMapper, MakeCard> i
 
     @Resource
     IMakeCardAllocationService iMakeCardAllocationService;
+    @Resource
     ICardService iCardService;
     @Resource
     RedisCache redisCache;
@@ -69,6 +71,7 @@ public class MakeCardServiceImpl extends ServiceImpl<MakeCardMapper, MakeCard> i
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public boolean makeCard(MakeCard markCard) {
         int result = baseMapper.insert(markCard);
         Long cardNo =null;

+ 2 - 2
tour-module/src/main/java/com/tour/module/service/impl/OrderServiceImpl.java

@@ -324,11 +324,11 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
         if (commission.signum() == 0) {
             return;
         }
-        BigDecimal lastCommission = BigDecimal.ZERO;
+        BigDecimal lastCommission;
         Agent agent = iAgentService.getById(order.getAgentId());
         Agent sAgent = iAgentService.getByPid(agent.getPid());
         if (sAgent != null) {
-            BigDecimal sCommission = BigDecimal.ZERO;
+            BigDecimal sCommission;
             if (sAgent.getPid() == 0) {
                 // 一级代理商分佣
                 sCommission = commission.multiply(agent.getCommissonRate().divide(new BigDecimal(100),2, RoundingMode.DOWN)).setScale(2,RoundingMode.DOWN);

+ 1 - 1
web-ui/vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       // http://localhost:8081
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://localhost:8083`,
+        target: `http://localhost:8087`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''