|
@@ -144,6 +144,9 @@ public class PromoteQrcodePoolServiceImpl extends ServiceImpl<PromoteQrcodePoolM
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public Boolean addRedis(Integer promoteId, Integer custserviceId, Integer weight) {
|
|
public Boolean addRedis(Integer promoteId, Integer custserviceId, Integer weight) {
|
|
|
|
|
+ if (custserviceId == null || custserviceId.equals(0)){
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
String scoreStr = BigDecimal.valueOf(weight.doubleValue() / 1000).setScale(4, RoundingMode.HALF_EVEN).stripTrailingZeros().toPlainString();
|
|
String scoreStr = BigDecimal.valueOf(weight.doubleValue() / 1000).setScale(4, RoundingMode.HALF_EVEN).stripTrailingZeros().toPlainString();
|
|
|
float score = Float.parseFloat(scoreStr);
|
|
float score = Float.parseFloat(scoreStr);
|
|
|
Long index = stringRedisTemplate.opsForZSet().rank(RedisKey.PanCustServiceIdView + promoteId, Integer.toString(custserviceId));
|
|
Long index = stringRedisTemplate.opsForZSet().rank(RedisKey.PanCustServiceIdView + promoteId, Integer.toString(custserviceId));
|