bug--代码规范优化,升级fastjson1.2.73
This commit is contained in:
@ -169,5 +169,7 @@ public interface ShopConstants {
|
||||
|
||||
String YSHOP_APP_LOGIN_USER = "app-online-token";
|
||||
|
||||
String YSHOP_WECHAT_PUSH_REMARK = "yshop为您服务!";
|
||||
|
||||
|
||||
}
|
||||
|
@ -569,8 +569,9 @@ public class PrintUtil4 {
|
||||
* @return
|
||||
*/
|
||||
public static String substring(String str, int f, int t) {
|
||||
if (f > str.length())
|
||||
if (f > str.length()) {
|
||||
return null;
|
||||
}
|
||||
if (t > str.length()) {
|
||||
return str.substring(f, str.length());
|
||||
} else {
|
||||
|
@ -27,7 +27,7 @@ public class OrderUtil {
|
||||
* @return
|
||||
**/
|
||||
public static int getSecondTimestamp(){
|
||||
String timestamp = String.valueOf(new Date().getTime()/1000);
|
||||
String timestamp = String.valueOf(System.currentTimeMillis()/1000);
|
||||
return Integer.valueOf(timestamp);
|
||||
}
|
||||
|
||||
@ -42,7 +42,9 @@ public class OrderUtil {
|
||||
public static String checkActivityStatus(Date starTime,Date endTime,Integer status){
|
||||
Date nowTime = new Date();
|
||||
|
||||
if(ShopCommonEnum.IS_STATUS_0.getValue().equals(status)) return "关闭";
|
||||
if(ShopCommonEnum.IS_STATUS_0.getValue().equals(status)) {
|
||||
return "关闭";
|
||||
}
|
||||
|
||||
if(DateUtil.compare(starTime,nowTime) > 0){
|
||||
return "活动未开始";
|
||||
@ -131,7 +133,7 @@ public class OrderUtil {
|
||||
* @return
|
||||
**/
|
||||
public static int getSecondTimestampTwo() {
|
||||
String timestamp = String.valueOf(new Date().getTime() / 1000);
|
||||
String timestamp = String.valueOf(System.currentTimeMillis() / 1000);
|
||||
return Integer.valueOf(timestamp);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user