|  |  |  | 
|---|
|  |  |  | public class Constants { | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    public static   String REDIS_VERSION="alks_"; | 
|---|
|  |  |  | public static final String LINGYANG_USERNUM_LIMIT = "LINGYANG_USERNUM_LIMIT"; | 
|---|
|  |  |  | //    public static   String REDIS_VERSION="alks_"; | 
|---|
|  |  |  | public static   String REDIS_VERSION="dm_"; | 
|---|
|  |  |  | public static final int ZERO = 0 ; | 
|---|
|  |  |  | public static final int ONE = 1 ; | 
|---|
|  |  |  | 
|---|
|  |  |  | d = d.setScale(4, BigDecimal.ROUND_HALF_UP); | 
|---|
|  |  |  | return  d; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public static BigDecimal formatBigdecimalFloat(BigDecimal d,int scale) { | 
|---|
|  |  |  | if (d == null) { | 
|---|
|  |  |  | d = new BigDecimal(0.0); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //保留两位小数且四舍五入 | 
|---|
|  |  |  | d = d.setScale(scale, BigDecimal.ROUND_HALF_UP); | 
|---|
|  |  |  | return  d; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public static String formatCodeStr(String code) { | 
|---|
|  |  |  | if (code == null) { | 
|---|
|  |  |  | return ""; | 
|---|