|
@@ -193,7 +193,7 @@ public class DailySign extends Controller {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- boolean isdownload = content.getBooleanValue("isdownload");
|
|
|
+ int type = content.getIntValue("type");
|
|
|
Long sat_sharematerialid = content.getLongValue("sat_sharematerialid");
|
|
|
|
|
|
QuerySQL sqlFactory = SQLFactory.createQuerySQL(this, "sat_sharematerial_read")
|
|
@@ -202,13 +202,13 @@ public class DailySign extends Controller {
|
|
|
sqlFactory.addQueryFields("address", "''");
|
|
|
sqlFactory.setSiteid(siteid);
|
|
|
sqlFactory.setWhere(where.toString());
|
|
|
- sqlFactory.setWhere("isdownload", isdownload);
|
|
|
+ sqlFactory.setWhere("type", type);
|
|
|
sqlFactory.setWhere("sat_sharematerialid", sat_sharematerialid);
|
|
|
sqlFactory.setOrderBy(pageSorting).setPage(pageSize, pageNumber);
|
|
|
Rows rows = sqlFactory.query();
|
|
|
|
|
|
for (Row row : rows) {
|
|
|
- row.put("headpic",getHeadPic(row.getLong("createuserid")));
|
|
|
+ row.put("headpic", getHeadPic(row.getLong("createuserid")));
|
|
|
}
|
|
|
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
@@ -228,14 +228,18 @@ public class DailySign extends Controller {
|
|
|
insertSQL.setUniqueid(createTableID("sat_sharematerial_read"));
|
|
|
insertSQL.setSiteid(siteid);
|
|
|
insertSQL.setValue("sat_sharematerialid", sat_sharematerialid);
|
|
|
- insertSQL.setValue("isdownload", content.getBooleanValue("isdownload"));
|
|
|
+ insertSQL.setValue("type", content.getIntValue("type"));
|
|
|
insertSQL.insert();
|
|
|
|
|
|
- if (content.getBooleanValue("isdownload")) {
|
|
|
+ if (content.getIntValue("type") == 0) {
|
|
|
dbConnect.runSqlUpdate("UPDATE sat_sharematerial SET downloadcount=downloadcount+1 WHERE sat_sharematerialid=" + sat_sharematerialid + " and siteid='" + siteid + "'");
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ if (content.getIntValue("type") == 1) {
|
|
|
dbConnect.runSqlUpdate("UPDATE sat_sharematerial SET readcount=readcount+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();
|
|
|
}
|