|
|
@@ -39,6 +39,7 @@ import io.jpress.utils.*;
|
|
|
|
|
|
import java.math.BigInteger;
|
|
|
import java.sql.SQLException;
|
|
|
+import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
@@ -409,6 +410,17 @@ public class _ContentController extends JBaseCRUDController<Content> {
|
|
|
boolean saved = Db.tx(new IAtom() {
|
|
|
@Override
|
|
|
public boolean run() throws SQLException {
|
|
|
+ //新闻中心元数据排序时间
|
|
|
+ if ("news".equals(content.getModule()) && metas != null) {
|
|
|
+ String orderTime = metas.get("order_time").replaceAll("T", " ");
|
|
|
+ java.text.SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm");
|
|
|
+ try {
|
|
|
+ Date date = formatter.parse(orderTime);
|
|
|
+ content.setCreated(date);
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
boolean isSameAsOld = true;
|
|
|
Content oldContent = null;
|