|
@@ -60,7 +60,7 @@ public class visitors extends Controller {
|
|
|
|
|
|
|
|
row.putAll(getUser(userid));
|
|
row.putAll(getUser(userid));
|
|
|
row.put("headpic", getHeadPic(userid));
|
|
row.put("headpic", getHeadPic(userid));
|
|
|
- row.put("attinfos", Attachment.get(this,"sys_users",userid,"headportrait"));
|
|
|
|
|
|
|
+ row.put("attinfos", Attachment.get(this, "sys_users", userid, "headportrait"));
|
|
|
//查询角色
|
|
//查询角色
|
|
|
Rows rolenameRows = dbConnect.runSqlQuery("select rolename from sys_userrole t1 " +
|
|
Rows rolenameRows = dbConnect.runSqlQuery("select rolename from sys_userrole t1 " +
|
|
|
"inner join sys_role t2 ON t2.roleid=t1.roleid and t2.siteid=t1.siteid " +
|
|
"inner join sys_role t2 ON t2.roleid=t1.roleid and t2.siteid=t1.siteid " +
|
|
@@ -88,9 +88,9 @@ public class visitors extends Controller {
|
|
|
"WHERE t2.sys_enterpriseid=" + sys_enterpriseid + " and t1.siteid='" + siteid + "'");
|
|
"WHERE t2.sys_enterpriseid=" + sys_enterpriseid + " and t1.siteid='" + siteid + "'");
|
|
|
|
|
|
|
|
row.put("areaname", StringUtils.join(areaRows.toArray("areaname"), ","));
|
|
row.put("areaname", StringUtils.join(areaRows.toArray("areaname"), ","));
|
|
|
- row.put("sys_enterpriseid",sys_enterpriseid);
|
|
|
|
|
|
|
+ row.put("sys_enterpriseid", sys_enterpriseid);
|
|
|
|
|
|
|
|
- row.put("enterprise_hr",userInfo.getEnterprise_HrRow());
|
|
|
|
|
|
|
+ row.put("enterprise_hr", userInfo.getEnterprise_HrRow());
|
|
|
|
|
|
|
|
return getSucReturnObject().setData(row).toString();
|
|
return getSucReturnObject().setData(row).toString();
|
|
|
}
|
|
}
|
|
@@ -104,7 +104,7 @@ public class visitors extends Controller {
|
|
|
insertSQL.setUniqueid(createTableID("sys_datacollect"));
|
|
insertSQL.setUniqueid(createTableID("sys_datacollect"));
|
|
|
insertSQL.setSiteid(siteid);
|
|
insertSQL.setSiteid(siteid);
|
|
|
insertSQL.setValue("userid", userid);
|
|
insertSQL.setValue("userid", userid);
|
|
|
- insertSQL.setValue("ownertable", "sys_user");
|
|
|
|
|
|
|
+ insertSQL.setValue("ownertable", "sys_users");
|
|
|
insertSQL.setValue("ownerid", tempuserid);
|
|
insertSQL.setValue("ownerid", tempuserid);
|
|
|
insertSQL.setValue("type", 3);
|
|
insertSQL.setValue("type", 3);
|
|
|
insertSQL.insert();
|
|
insertSQL.insert();
|
|
@@ -124,25 +124,32 @@ public class visitors extends Controller {
|
|
|
"WHERE t1.userid=" + tempuserid + " and t1.siteid='" + siteid + "'");
|
|
"WHERE t1.userid=" + tempuserid + " and t1.siteid='" + siteid + "'");
|
|
|
row.put("rolenames", StringUtils.join(rolenameRows.toArray("rolename"), ","));
|
|
row.put("rolenames", StringUtils.join(rolenameRows.toArray("rolename"), ","));
|
|
|
|
|
|
|
|
- Rows attinfoRows = Attachment.get(this, "sys_user", tempuserid);
|
|
|
|
|
|
|
+ Rows attinfoRows = Attachment.get(this, "sys_users", tempuserid);
|
|
|
row.put("attinfos", attinfoRows);
|
|
row.put("attinfos", attinfoRows);
|
|
|
|
|
|
|
|
//标签
|
|
//标签
|
|
|
- ArrayList<String> tagList = DataTag.queryTag(this, "sys_user", tempuserid, false);
|
|
|
|
|
|
|
+ ArrayList<String> tagList = DataTag.queryTag(this, "sys_users", tempuserid, false);
|
|
|
//系统标签
|
|
//系统标签
|
|
|
- tagList.addAll(DataTag.queryTag(this, "sys_user", tempuserid, true));
|
|
|
|
|
|
|
+ tagList.addAll(DataTag.queryTag(this, "sys_users", tempuserid, true));
|
|
|
row.put("tag", tagList);
|
|
row.put("tag", tagList);
|
|
|
|
|
|
|
|
- Rows rows = dbConnect.runSqlQuery("SELECT count(*) count from sys_datacollect WHERE siteid='" + siteid + "' and type=2 and ownertable='sys_user' and ownerid='" + tempuserid + "'");
|
|
|
|
|
|
|
+ Rows rows = dbConnect.runSqlQuery("SELECT count(*) count from sys_datacollect WHERE siteid='" + siteid + "' and type=2 and ownertable='sys_users' and ownerid='" + tempuserid + "'");
|
|
|
row.put("count_like", rows.get(0).getLong("count"));
|
|
row.put("count_like", rows.get(0).getLong("count"));
|
|
|
|
|
|
|
|
- rows = dbConnect.runSqlQuery("SELECT count(*) count from sys_datacollect WHERE siteid='" + siteid + "' and type=3 and ownertable='sys_user' and ownerid='" + tempuserid + "'");
|
|
|
|
|
|
|
+ rows = dbConnect.runSqlQuery("SELECT count(*) count from sys_datacollect WHERE siteid='" + siteid + "' and type=3 and ownertable='sys_users' and ownerid='" + tempuserid + "'");
|
|
|
row.put("count_read", rows.get(0).getLong("count"));
|
|
row.put("count_read", rows.get(0).getLong("count"));
|
|
|
|
|
|
|
|
- rows= dbConnect.runSqlQuery("SELECT userid,max(createdate) createdate from sys_datacollect WHERE siteid='" + siteid + "' and type=3 and ownertable='sys_user' and ownerid='" + tempuserid + "' GROUP BY userid LIMIT 3");
|
|
|
|
|
|
|
+ if (dbConnect.runSqlQuery("SELECT * from sys_datacollect WHERE siteid='" + siteid + "' and type=2 and ownertable='sys_users' and ownerid='" + tempuserid + "' and userid=" + userid).isNotEmpty()) {
|
|
|
|
|
+ row.put("islike", 1);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ row.put("islike", 0);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ rows = dbConnect.runSqlQuery("SELECT userid,max(createdate) createdate from sys_datacollect WHERE siteid='" + siteid + "' and type=3 and ownertable='sys_users' and ownerid='" + tempuserid + "' GROUP BY userid LIMIT 3");
|
|
|
|
|
|
|
|
- for (Row readrow:rows) {
|
|
|
|
|
- readrow.put("headpic",getHeadPic(readrow.getLong("userid")));
|
|
|
|
|
|
|
+ for (Row readrow : rows) {
|
|
|
|
|
+ readrow.put("headpic", getHeadPic(readrow.getLong("userid")));
|
|
|
}
|
|
}
|
|
|
row.put("readusers", rows);
|
|
row.put("readusers", rows);
|
|
|
|
|
|