| | |
| | | package com.xcong.excoin; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.xcong.excoin.common.contants.AppContants; |
| | | import com.xcong.excoin.common.enumerates.CoinTypeEnum; |
| | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | CalculateUtil.getForceSetPriceForWhole("BTC/USDT", memberEntity); |
| | | } |
| | | |
| | | @Test |
| | | public void initOrderTest() { |
| | | List<HashMap<String, Object>> wholeHoldOrders = contractHoldOrderDao.selectAllWholeOrderMemberIdAndSymbol(); |
| | | if (CollUtil.isNotEmpty(wholeHoldOrders)) { |
| | | MemberEntity memberEntity = null; |
| | | for (HashMap<String, Object> wholeHoldOrder : wholeHoldOrders) { |
| | | Long memberId = (Long) wholeHoldOrder.get("member_id"); |
| | | String symbol = (String) wholeHoldOrder.get("symbol"); |
| | | if (memberEntity == null || !memberId.equals(memberEntity.getId())) { |
| | | memberEntity = memberDao.selectById(memberId); |
| | | } |
| | | System.out.println(memberId + "-----" + symbol); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |