Signed-off-by: lixiangrong <lixiangrong@pxene.com>
parent
a87d321290
commit
c94f4ce35f
|
@ -8,5 +8,6 @@
|
|||
target
|
||||
com
|
||||
*.project
|
||||
*
|
||||
*.classpath
|
||||
/.settings
|
||||
/bin
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
redis.pool.maxActive=1024
|
||||
redis.pool.maxIdle=200
|
||||
redis.pool.maxWait=1000
|
||||
redis.pool.testOnBorrow=true
|
||||
redis.pool.testOnReturn=true
|
||||
redis.ip=192.168.3.166
|
||||
redis.port=7379
|
||||
redis.pool.maxActive=1024
|
||||
redis.pool.maxIdle=200
|
||||
redis.pool.maxWait=1000
|
||||
redis.pool.testOnBorrow=true
|
||||
redis.pool.testOnReturn=true
|
||||
redis.ip=192.168.3.166
|
||||
#redis.ip=111.235.158.31
|
||||
redis.port=7379
|
||||
redis.password=
|
|
@ -1,16 +1,13 @@
|
|||
package osc.git.eh3.test;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import osc.git.eh3.redis.JedisUtil;
|
||||
|
||||
public class TestCode {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
@ -232,8 +229,19 @@ public class TestCode {
|
|||
// System.out.println(JedisUtil.getStr("0000"));
|
||||
// Map<String,Integer> result = new HashMap<String, Integer>();
|
||||
// System.out.println(result.get("jj"));
|
||||
double budgets = 10000;
|
||||
System.out.println((budgets/100));
|
||||
// double budgets = 10000;
|
||||
// System.out.println((budgets/100));
|
||||
|
||||
String str = null;
|
||||
BigDecimal budget = new BigDecimal(str);
|
||||
// budget = budget.subtract(new BigDecimal(10));
|
||||
// if (budget.compareTo(new BigDecimal(0)) <= 0) {
|
||||
// System.out.println("1");
|
||||
// } else {
|
||||
// System.out.println("2");
|
||||
// }
|
||||
|
||||
System.out.println(budget.doubleValue());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
package osc.git.eh3.test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import osc.git.eh3.redis.JedisUtil;
|
||||
|
||||
public class TestRedisData {
|
||||
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
showSom("fa5f9738-6055-4881-b1be-32f8111a18d1");
|
||||
}
|
||||
|
||||
public static void showSom(String groupid){
|
||||
String[] keys = JedisUtil.getKeys("dsp_budget_*_"+groupid);
|
||||
BigDecimal totals = new BigDecimal(0);
|
||||
for (String key : keys) {
|
||||
System.out.println(key+"-----------:"+JedisUtil.getStr(key));
|
||||
totals = totals.add(new BigDecimal(JedisUtil.getStr(key)));
|
||||
}
|
||||
System.out.println("budget_balance_"+groupid+"-----------:"+JedisUtil.getStr("budget_balance_"+groupid));
|
||||
totals = totals.add(new BigDecimal(JedisUtil.getStr("budget_balance_"+groupid)));
|
||||
System.out.println(totals.toPlainString());
|
||||
|
||||
keys = JedisUtil.getKeys("dsp_counter_*_"+groupid);
|
||||
for (String key : keys) {
|
||||
System.out.println(key+"-----------:"+JedisUtil.getStr(key));
|
||||
}
|
||||
System.out.println("counter_balance_"+groupid+"-----------:"+JedisUtil.getStr("counter_balance_"+groupid));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue