| | |
| | | package cc.mrbird.febs; |
| | | |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import cc.mrbird.febs.common.utils.RedisUtils; |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | | import cc.mrbird.febs.dapp.entity.DataDictionaryCustom; |
| | | import cc.mrbird.febs.dapp.mapper.DappMemberDao; |
| | | import cc.mrbird.febs.dapp.mapper.DataDictionaryCustomMapper; |
| | | import cc.mrbird.febs.dapp.utils.BoxUtil; |
| | | import cn.hutool.core.util.RandomUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.web3j.abi.datatypes.Int; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2022-06-09 |
| | | **/ |
| | | @Slf4j |
| | | @SpringBootTest |
| | | public class MemberTest { |
| | | |
| | |
| | | break; |
| | | } |
| | | parentId = parentMember.getRefererId(); |
| | | if(StringUtils.isBlank(parentId) || "0".equals(parentId)){ |
| | | if (StringUtils.isBlank(parentId) || "0".equals(parentId)) { |
| | | break; |
| | | } |
| | | if (parentMember.getRefererId().equals(parentMember.getInviteId())) { |
| | |
| | | member.setRefererIds(ids); |
| | | member.setFeeProfitIds(feeProfitIds); |
| | | } |
| | | |
| | | @Autowired |
| | | private RedisUtils redisUtils; |
| | | |
| | | @Test |
| | | public void redisTest() { |
| | | redisUtils.hget("1234567", "1111111"); |
| | | } |
| | | |
| | | private Map<Integer, Integer> map = new HashMap<>(); |
| | | private int BOX_OPEN_CNT = 0; |
| | | |
| | | @Test |
| | | public void boxOpenTest() { |
| | | Runnable runnable = new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | BoxUtil.Box box = BoxUtil.openBox(); |
| | | log.info("====={}==={}=====", box.getIndex(), box.getCount()); |
| | | } |
| | | }; |
| | | |
| | | for (int i = 0; i < 9; i++) { |
| | | Thread thread = new Thread(runnable); |
| | | thread.start(); |
| | | // BoxUtil.Box box = BoxUtil.openBox(); |
| | | // log.info("====={}==={}=====", box.getIndex(), box.getCount()); |
| | | } |
| | | } |
| | | |
| | | } |