|
|
|
@ -56,7 +56,7 @@ public class ResourceModel {
|
|
|
|
|
* @param page
|
|
|
|
|
* @param limit
|
|
|
|
|
*/
|
|
|
|
|
public Page<Record> getZskPage(int type_id, String keyword, String area_code, int page, int limit) {
|
|
|
|
|
public Page<Record> getZskPage(String person_id, int type_id, String keyword, String area_code, int page, int limit) {
|
|
|
|
|
List<String> idList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
//1、如果是云南省:查看所有自己发布的文档,不管是省,市,县,都能看到全省的文档
|
|
|
|
@ -80,8 +80,15 @@ public class ResourceModel {
|
|
|
|
|
if (!StrKit.isBlank(keyword)) {
|
|
|
|
|
kv.set("keyword", keyword);
|
|
|
|
|
}
|
|
|
|
|
SqlPara sqlPara = Db.getSqlPara("Resource.getZskPage",kv);
|
|
|
|
|
return Db.paginate(page, limit, sqlPara);
|
|
|
|
|
SqlPara sqlPara = Db.getSqlPara("Resource.getZskPage", kv);
|
|
|
|
|
Page<Record> records = Db.paginate(page, limit, sqlPara);
|
|
|
|
|
|
|
|
|
|
for (Record record : records.getList()) {
|
|
|
|
|
String database_person_id = record.getStr("person_id");
|
|
|
|
|
record.set("can_delete", database_person_id.equals(person_id));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return records;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -104,13 +111,14 @@ public class ResourceModel {
|
|
|
|
|
* @param identity_id
|
|
|
|
|
* @param area_code
|
|
|
|
|
*/
|
|
|
|
|
public void uploadZskDocument(String name, String file_name, int type_id, int identity_id, String area_code) {
|
|
|
|
|
public void uploadZskDocument(String name, String file_name, int type_id, int identity_id, String area_code, String person_id) {
|
|
|
|
|
Record record = new Record();
|
|
|
|
|
record.set("name", name);
|
|
|
|
|
record.set("file_name", file_name);
|
|
|
|
|
record.set("type_id", type_id);
|
|
|
|
|
record.set("identity_id", identity_id);
|
|
|
|
|
record.set("area_code", area_code);
|
|
|
|
|
record.set("person_id", person_id);
|
|
|
|
|
Db.save("t_zsk_files", "id", record);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|