|
@@ -10,6 +10,7 @@ import com.kxs.common.core.constant.SecurityConstants;
|
|
|
import com.kxs.common.core.util.AssertUtil;
|
|
import com.kxs.common.core.util.AssertUtil;
|
|
|
import com.kxs.stat.api.feign.RemoteKxsStatService;
|
|
import com.kxs.stat.api.feign.RemoteKxsStatService;
|
|
|
import com.kxs.system.api.feign.RemoteOldService;
|
|
import com.kxs.system.api.feign.RemoteOldService;
|
|
|
|
|
+import com.kxs.system.api.util.ParamResolver;
|
|
|
import com.kxs.user.api.vo.kxsapp.shareholder.ShareholderGetShareholderAmountVO;
|
|
import com.kxs.user.api.vo.kxsapp.shareholder.ShareholderGetShareholderAmountVO;
|
|
|
import com.kxs.user.biz.mapper.KxsShdTradeAmtMapper;
|
|
import com.kxs.user.biz.mapper.KxsShdTradeAmtMapper;
|
|
|
import com.kxs.user.api.model.KxsShdTradeAmt;
|
|
import com.kxs.user.api.model.KxsShdTradeAmt;
|
|
@@ -58,26 +59,14 @@ public class KxsShdTradeAmtServiceImpl extends ServiceImpl<KxsShdTradeAmtMapper,
|
|
|
month = LocalDateTimeUtil.format(LocalDate.now(), DatePattern.SIMPLE_MONTH_PATTERN);
|
|
month = LocalDateTimeUtil.format(LocalDate.now(), DatePattern.SIMPLE_MONTH_PATTERN);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- //调用老系统 已弃用
|
|
|
|
|
-// HashMap<String, Object> param = new HashMap<>();
|
|
|
|
|
-// HashMap<String, Object> data = new HashMap<>();
|
|
|
|
|
-// data.put("UserId",1);
|
|
|
|
|
-// data.put("TradeMonthOrDate",month);
|
|
|
|
|
-// data.put("Kind","team");
|
|
|
|
|
-// param.put("value",JSON.toJSONString(data));
|
|
|
|
|
-//// String param = "{UserId:1,TradeMonthOrDate:"+ month +",Kind:team}";
|
|
|
|
|
-// R result = remoteOldService.GetUserTradeAmout(param);
|
|
|
|
|
-// if(result.getStatus() == 1){
|
|
|
|
|
-// Map<String,Object> resultData = (Map<String, Object>) result.getData();
|
|
|
|
|
-// BigDecimal totalPosAmt = BigDecimal.valueOf((Double) resultData.get("TotalPosAmt"));
|
|
|
|
|
-// }
|
|
|
|
|
-
|
|
|
|
|
BigDecimal statAmount = remoteKxsStatService.getStatAmount(month, SecurityConstants.FROM_IN);
|
|
BigDecimal statAmount = remoteKxsStatService.getStatAmount(month, SecurityConstants.FROM_IN);
|
|
|
//有效交易额 稳定期交易额 * 1.5
|
|
//有效交易额 稳定期交易额 * 1.5
|
|
|
- BigDecimal totalAmount = statAmount.multiply(new BigDecimal("1.5"));
|
|
|
|
|
|
|
+ String shdTotalRate = ParamResolver.getStr("SHD_TOTAL_RATE", "1.5");
|
|
|
|
|
+ BigDecimal totalAmount = statAmount.multiply(new BigDecimal(shdTotalRate));
|
|
|
|
|
+
|
|
|
//累计奖金池 总交易额 * 万分之1.5 保留俩位小数
|
|
//累计奖金池 总交易额 * 万分之1.5 保留俩位小数
|
|
|
BigDecimal bonusPool = totalAmount.multiply(new BigDecimal("1.5")).divide(new BigDecimal("10000"), 2, RoundingMode.FLOOR);
|
|
BigDecimal bonusPool = totalAmount.multiply(new BigDecimal("1.5")).divide(new BigDecimal("10000"), 2, RoundingMode.FLOOR);
|
|
|
|
|
+
|
|
|
//高中低奖金池计算规则 总奖金池 / 3
|
|
//高中低奖金池计算规则 总奖金池 / 3
|
|
|
BigDecimal bonus = bonusPool.divide(new BigDecimal("3"), 2, RoundingMode.FLOOR);
|
|
BigDecimal bonus = bonusPool.divide(new BigDecimal("3"), 2, RoundingMode.FLOOR);
|
|
|
KxsShdTradeAmt kxsShdTradeAmt = kxsShdTradeAmtMapper.selectOne(Wrappers.<KxsShdTradeAmt>query().lambda().eq(KxsShdTradeAmt::getTradeMonth, month));
|
|
KxsShdTradeAmt kxsShdTradeAmt = kxsShdTradeAmtMapper.selectOne(Wrappers.<KxsShdTradeAmt>query().lambda().eq(KxsShdTradeAmt::getTradeMonth, month));
|