|
|
@@ -493,10 +493,11 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
|
|
|
*/
|
|
|
public static Date string2Date(String dateStr, String format) throws Exception {
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
|
|
- if (dateStr == null) {
|
|
|
+ if (dateStr != null) {
|
|
|
return sdf.parse(dateStr);
|
|
|
+ }else {
|
|
|
+ return null;
|
|
|
}
|
|
|
- return null;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -510,8 +511,9 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
|
|
if (date != null) {
|
|
|
return sdf.format(date);
|
|
|
+ }else {
|
|
|
+ return null;
|
|
|
}
|
|
|
- return null;
|
|
|
}
|
|
|
|
|
|
}
|