1
0

2 Achegas 1833ba84b0 ... 54847c34d1

Autor SHA1 Mensaxe Data
  wu 54847c34d1 Merge remote-tracking branch 'origin/develop-yellow' into develop2 hai 9 meses
  wu 00c29ace45 通告管理bug修复 hai 9 meses

+ 15 - 6
src/custom/restcontroller/webmanage/saletool/notice/notice.java

@@ -41,11 +41,16 @@ public class notice extends Controller {
 //            insertSQL.setValue("status", content.getString("status"));
             insertSQL.setValue("publishdate", content.getStringValueForDate("publishdate", "yyyy-MM-dd", "null"));
             insertSQL.setValue("sat_notice_classid", content.getLongValue("sat_notice_classid"));
-            insertSQL.setValue("content", content.getStringValue("contentstr", true));
+            if (content.containsKey("content")) {
+                insertSQL.setValue("content", content.getStringValue("content", true));
+            } else {
+                insertSQL.setValue("content", content.getStringValue("contentstr", true));
+            }
+
             insertSQL.insert();
             content.put("sat_noticeid", sat_noticeid);
 
-            DataContrlLog.createLog(this, "sat_notice", sat_noticeid, "新建", "新建通告 "+content.getString("title")).insert();
+            DataContrlLog.createLog(this, "sat_notice", sat_noticeid, "新建", "新建通告 " + content.getString("title")).insert();
         } else {
             UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, sat_notice);
             updateSQL.setSiteid(siteid);
@@ -54,10 +59,14 @@ public class notice extends Controller {
 //            updateSQL.setValue("status", content.getString("status"));
             updateSQL.setValue("publishdate", content.getStringValueForDate("publishdate", "yyyy-MM-dd", "null"));
             updateSQL.setValue("sat_notice_classid", content.getLongValue("sat_notice_classid"));
-            updateSQL.setValue("content", content.getStringValue("contentstr", true));
+            if (content.containsKey("content")) {
+                updateSQL.setValue("content", content.getStringValue("content", true));
+            } else {
+                updateSQL.setValue("content", content.getStringValue("contentstr", true));
+            }
             updateSQL.update();
 
-            DataContrlLog.createLog(this, "sat_notice", sat_noticeid, "编辑", "编辑通告 "+content.getString("title")).insert();
+            DataContrlLog.createLog(this, "sat_notice", sat_noticeid, "编辑", "编辑通告 " + content.getString("title")).insert();
         }
         return queryNoticeMain();
     }
@@ -232,7 +241,7 @@ public class notice extends Controller {
                 return getErrReturnObject().setErrMsg("【" + row.getString("title") + "】通告已发布,无法再次发布").toString();
             }
 
-            DataContrlLog.createLog(this, "sat_notice", row.getLong("sat_noticeid"), "发布", "发布通告 "+row.getString("title")).insert();
+            DataContrlLog.createLog(this, "sat_notice", row.getLong("sat_noticeid"), "发布", "发布通告 " + row.getString("title")).insert();
         }
 
         SQLFactory sqlFactoryupdate = new SQLFactory(this, "通告发布");
@@ -299,7 +308,7 @@ public class notice extends Controller {
             if (row.getString("status").equals("新建")) {
                 return getErrReturnObject().setErrMsg("【" + row.getString("title") + "】通告已下架,无法再次下架").toString();
             }
-            DataContrlLog.createLog(this, "sat_notice", row.getLong("sat_noticeid"), "取消发布", "取消发布通告 "+row.getString("title")).insert();
+            DataContrlLog.createLog(this, "sat_notice", row.getLong("sat_noticeid"), "取消发布", "取消发布通告 " + row.getString("title")).insert();
         }
 
         SQLFactory sqlFactoryupdate = new SQLFactory(this, "通告下架");