|
@@ -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, "通告下架");
|