|
|
@@ -18,6 +18,7 @@ import org.postgresql.util.PGobject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.time.LocalDate;
|
|
|
import java.util.*;
|
|
|
|
|
|
@@ -1139,7 +1140,13 @@ public class CommonService extends BaseService<Map<String, Object>> {
|
|
|
*/
|
|
|
public ResponseResultVO<Map<String, Object>> getCurrentDate(Map<String, Object> param) {
|
|
|
Map<String, Object> res = new HashMap<>();
|
|
|
- res.put("currentDate", LocalDate.now());
|
|
|
+ if(param.isEmpty()) {
|
|
|
+ res.put("currentDate", LocalDate.now());
|
|
|
+ }else {
|
|
|
+ Date date = new Date();
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat ("yyyy-MM-dd hh:mm:ss");
|
|
|
+ res.put("currentDate", simpleDateFormat.format(date));
|
|
|
+ }
|
|
|
return ResponseResultUtil.success(res);
|
|
|
}
|
|
|
}
|