bug--代码规范优化,升级fastjson1.2.73

This commit is contained in:
taochengbo
2020-08-29 16:17:15 +08:00
parent 574c7219ac
commit 0f05897962
64 changed files with 727 additions and 275 deletions

View File

@ -169,5 +169,7 @@ public interface ShopConstants {
String YSHOP_APP_LOGIN_USER = "app-online-token";
String YSHOP_WECHAT_PUSH_REMARK = "yshop为您服务";
}

View File

@ -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 {

View File

@ -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);
}