...
|
...
|
@@ -58,8 +58,8 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
private AtomicInteger atomicInt = new AtomicInteger(0);
|
|
|
|
|
|
private String SETTLEMENT_TOPIC = "front.union.shareSettleAdd";
|
|
|
private String NEW_USER_REBATES_RATIO_KEY = "newUserRebatesRatio";
|
|
|
private String OLD_USER_REBATES_RATIO_KEY = "oldUserRebatesRatio";
|
|
|
private String NEW_USER_REBATES_RATIO_KEY = "union.newUserRebatesRatio";
|
|
|
private String OLD_USER_REBATES_RATIO_KEY = "union.oldUserRebatesRatio";
|
|
|
|
|
|
/**
|
|
|
* 获取用户可提现金额、已提现金额、是否可以提现
|
...
|
...
|
@@ -161,8 +161,8 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
rebatesRatio=configReader.getDouble(OLD_USER_REBATES_RATIO_KEY, 0.03);
|
|
|
insertReq.setIsNew((byte)2);
|
|
|
}
|
|
|
//返利金额计算小数位两位后取舍问题
|
|
|
insertReq.setAmount(bo.getLastOrderAmount().multiply(new BigDecimal(rebatesRatio)));
|
|
|
//返利金额计算小数位两位后舍弃
|
|
|
insertReq.setAmount((bo.getLastOrderAmount().multiply(new BigDecimal(rebatesRatio))).setScale(2,BigDecimal.ROUND_DOWN));
|
|
|
logger.info("insertOrder,orderCode is {},rebatesRatio is {},rebates is ",bo.getOrderCode(),rebatesRatio,insertReq.getAmount());
|
|
|
|
|
|
unionShareOrdersMapper.insertSelective(insertReq);
|
...
|
...
|
@@ -402,7 +402,7 @@ public class UnionShareServiceImpl implements IUnionShareService { |
|
|
clearShareOrderRedis(bo.getPromoteUid());
|
|
|
}
|
|
|
|
|
|
//存入redis
|
|
|
//存入redis,注意param的顺序
|
|
|
public void addToRedis(ShareOrdersKeyEnum se, int uid,Object value, String... param) {
|
|
|
redisHashCache.put(se.getPreKey(),uid,se.getHashKey(param),value,se.getCacheTime(), TimeUnit.SECONDS);
|
|
|
}
|
...
|
...
|
|