Date stringToDate(String dateString) {
Date dt = null;
new String();
if (dateString.contains("T")) {
String codDateStr = dateString.replace("T", " ");
if (codDateStr.contains("+")) {
codDateStr = codDateStr.substring(0, codDateStr.indexOf("+"));
}
SimpleDateFormat[] sdfs = new SimpleDateFormat[]{new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"), new SimpleDateFormat("yyyy-MM-dd HH:mm:ssZ"), new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"), new SimpleDateFormat("yyyy-MM-ddHH:mm:ss"), new SimpleDateFormat("yyyy-MM-dd")};
SimpleDateFormat[] arr$ = sdfs;
int len$ = sdfs.length;
int i$ = 0;
while(i$ < len$) {
SimpleDateFormat sdf = arr$[i$];
try {
dt = sdf.parse(codDateStr);
break;
} catch (Exception var10) {
++i$;
}
}
}
return dt;
}
public String getCreateDate() { #get回原始
return this.createDate;
}
public Date findCreateDate() { # find经转化 妙
return this.stringToDate(this.createDate);
}
价格计算 this.totalPrice = BigDecimal.ZERO; this.totalRePrice = BigDecimal.ZERO; this.totalDiscount = BigDecimal.ZERO; int len$; int i$; if (this.theSkus != null && this.theSkus.length > 0) { SKU[] arr$ = this.theSkus; len$ = arr$.length; for(i$ = 0; i$ < len$; ++i$) { SKU sku = arr$[i$]; this.totalPrice = this.totalPrice.add(sku.getPrice().multiply(new BigDecimal(sku.getNum()))); this.totalRePrice = this.totalRePrice.add(sku.getReprice().multiply(new BigDecimal(sku.getNum()))); this.totalDiscount = this.totalDiscount.add(sku.getDiscount().multiply(new BigDecimal(sku.getNum()))); } } 拷贝属性 org.springframework.beans.BeanUtils this.foreach(new CartHandler() { public void execute(Suit suit, SkuType skuType, SKU sku) { SKU e = new SKU(); if (suit != null) { ; } BeanUtils.copyProperties(sku, e); result.add(e); } });