|
|
@@ -223,22 +223,24 @@ public class DailySign extends Controller {
|
|
|
|
|
|
Long sat_sharematerialid = content.getLongValue("sat_sharematerialid");
|
|
|
|
|
|
- InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sat_sharematerial_read");
|
|
|
- insertSQL.setUniqueid(createTableID("sat_sharematerial_read"));
|
|
|
- insertSQL.setSiteid(siteid);
|
|
|
- insertSQL.setValue("sat_sharematerialid", sat_sharematerialid);
|
|
|
- insertSQL.setValue("type", content.getIntValue("type"));
|
|
|
- insertSQL.insert();
|
|
|
-
|
|
|
- if (content.getIntValue("type") == 0) {
|
|
|
- dbConnect.runSqlUpdate("UPDATE sat_sharematerial SET readcount=readcount+1 WHERE sat_sharematerialid=" + sat_sharematerialid + " and siteid='" + siteid + "'");
|
|
|
- }
|
|
|
- if (content.getIntValue("type") == 1) {
|
|
|
- dbConnect.runSqlUpdate("UPDATE sat_sharematerial SET downloadcount=downloadcount+1 WHERE sat_sharematerialid=" + sat_sharematerialid + " and siteid='" + siteid + "'");
|
|
|
- }
|
|
|
- if (content.getIntValue("type") == 2) {
|
|
|
- dbConnect.runSqlUpdate("UPDATE sat_sharematerial SET mailcount=mailcount+1 WHERE sat_sharematerialid=" + sat_sharematerialid + " and siteid='" + siteid + "'");
|
|
|
- }
|
|
|
+ SharematerialHelper.updateReadLog(this,sat_sharematerialid,content.getIntValue("type"));
|
|
|
+
|
|
|
+// InsertSQL insertSQL = SQLFactory.createInsertSQL(this, "sat_sharematerial_read");
|
|
|
+// insertSQL.setUniqueid(createTableID("sat_sharematerial_read"));
|
|
|
+// insertSQL.setSiteid(siteid);
|
|
|
+// insertSQL.setValue("sat_sharematerialid", sat_sharematerialid);
|
|
|
+// insertSQL.setValue("type", content.getIntValue("type"));
|
|
|
+// insertSQL.insert();
|
|
|
+//
|
|
|
+// if (content.getIntValue("type") == 0) {
|
|
|
+// dbConnect.runSqlUpdate("UPDATE sat_sharematerial SET readcount=readcount+1 WHERE sat_sharematerialid=" + sat_sharematerialid + " and siteid='" + siteid + "'");
|
|
|
+// }
|
|
|
+// if (content.getIntValue("type") == 1) {
|
|
|
+// dbConnect.runSqlUpdate("UPDATE sat_sharematerial SET downloadcount=downloadcount+1 WHERE sat_sharematerialid=" + sat_sharematerialid + " and siteid='" + siteid + "'");
|
|
|
+// }
|
|
|
+// if (content.getIntValue("type") == 2) {
|
|
|
+// dbConnect.runSqlUpdate("UPDATE sat_sharematerial SET mailcount=mailcount+1 WHERE sat_sharematerialid=" + sat_sharematerialid + " and siteid='" + siteid + "'");
|
|
|
+// }
|
|
|
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|