xiaoyong931011
2021-11-10 b0c195d4628b9086fb6e3f16759d15cf49100a50
Merge branch 'score-shop' of http://120.27.238.55:7000/r/xzx into score-shop
1 files modified
1 files added
33 ■■■■■ changed files
gc-order/src/main/java/com/xzx/gc/order/service/DistribService.java 8 ●●●● patch | view | raw | blame | history
gc-order/src/test/java/com/xzx/order/XcTest.java 25 ●●●●● patch | view | raw | blame | history
gc-order/src/main/java/com/xzx/gc/order/service/DistribService.java
@@ -67,7 +67,7 @@
        }
        Integer count = userHeadDetailsMapper.selectDetailsCount(userId);
//        UserInfo userInfo = userMapper.selectByPrimaryKey(userId);
        UserInfo userInfo = userMapper.selectByPrimaryKey(userId);
        AccountInfo accountInfo = accountMapper.selectAccountInfoByUserId(userHeadRelate.getHeadUserId());
        if (AccountInfo.IS_PROHIBIT_Y.equals(accountInfo.getIsProhibit())) {
@@ -128,6 +128,10 @@
            }
        }
        if (totalReturnCoin.intValue() == 0 && totalReturnScore.intValue() == 0) {
            return;
        }
        UserHeadDetails userHeadDetails = new UserHeadDetails();
        userHeadDetails.setHeadUserId(userHeadRelate.getHeadUserId());
        userHeadDetails.setUserId(userId);
@@ -165,7 +169,7 @@
        sysMessage.setUserId(userHeadRelate.getHeadUserId());
        sysMessage.setMessageType("4");
        sysMessage.setMessageSubTypeName("返利消息");
        sysMessage.setMessage("收到用户:" + accountInfo.getAccountName().replaceAll("(\\w{3})\\w*(\\w{4})", "$1****$2") + "的订单返利, 积分:" + totalReturnScore +", 环保币:" + totalReturnCoin);
        sysMessage.setMessage("收到用户:" + userInfo.getMobilePhone().replaceAll("(\\w{3})\\w*(\\w{4})", "$1****$2") + "的订单返利, 积分:" + totalReturnScore +", 环保币:" + totalReturnCoin);
        sysMessage.setFlag("2");
        sysMessageMapper.insert(sysMessage);
    }
gc-order/src/test/java/com/xzx/order/XcTest.java
New file
@@ -0,0 +1,25 @@
package com.xzx.order;
import com.xzx.gc.GcOrderApplication;
import com.xzx.gc.order.service.DistribService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = {GcOrderApplication.class})
@ActiveProfiles(profiles = {"xc"})
public class XcTest {
    @Autowired
    DistribService distribService;
    @Test
    public void distribTest() {
        distribService.distribRecord(740L, "YH1402174298026016768");
    }
}