|
@@ -31,14 +31,15 @@ public class visitors extends Controller {
|
|
|
super(content);
|
|
|
}
|
|
|
|
|
|
- @API(title = "游客个人信息", apiversion = R.ID20240510104102.v1.class)
|
|
|
+ @API(title = "【游客,工作台】个人信息", apiversion = R.ID20240510104102.v1.class)
|
|
|
public String visitorsInfo() throws YosException {
|
|
|
Row row = new Row();
|
|
|
//统计我的访问店铺数量
|
|
|
Rows rows = dbConnect.runSqlQuery("SELECT count(*) count from sa_store_history WHERE userid=" + userid + " and siteid='" + siteid + "'");
|
|
|
row.put("count_historystore", rows.get(0).getLong("count"));
|
|
|
//预约
|
|
|
- row.put("count_appointment", 0);
|
|
|
+ rows = dbConnect.runSqlQuery("SELECT count(*) count from sa_appointment WHERE createuserid=" + userid + " and siteid='" + siteid + "'");
|
|
|
+ row.put("count_appointment", rows.get(0).getLong("count"));
|
|
|
//地址
|
|
|
rows = dbConnect.runSqlQuery("SELECT count(*) count from sys_enterprise_contacts WHERE createuserid=" + userid + " and siteid='" + siteid + "' and deleted=0");
|
|
|
row.put("count_address", rows.get(0).getLong("count"));
|
|
@@ -48,15 +49,17 @@ public class visitors extends Controller {
|
|
|
//订单
|
|
|
rows = dbConnect.runSqlQuery("SELECT count(*) count from sa_custorder WHERE createuserid=" + userid + " and siteid='" + siteid + "' and deleted=0");
|
|
|
row.put("count_order", rows.get(0).getLong("count"));
|
|
|
+ rows = dbConnect.runSqlQuery("SELECT count(*) count count from sys_phonebook WHERE sys_phonebookgroupid in (SELECT sys_phonebookgroupid from sys_phonebookgroup WHERE classid=1) and siteid='"+siteid+"'");
|
|
|
// 通讯录
|
|
|
- row.put("count_addressbook", 0);
|
|
|
+ row.put("count_addressbook", rows.get(0).getLong("count"));
|
|
|
//考试成绩
|
|
|
rows = dbConnect.runSqlQuery("SELECT count(*) count from sat_courseware_test WHERE userid=" + userid + " and siteid='" + siteid + "' ");
|
|
|
row.put("count_coursewaretest", rows.get(0).getLong("count"));
|
|
|
// 问卷调查
|
|
|
row.put("count_questions", 0);
|
|
|
+ rows = dbConnect.runSqlQuery("SELECT count(*) count from sa_feedback WHERE userid=" + userid + " and siteid='" + siteid + "' ");
|
|
|
// 意见反馈
|
|
|
- row.put("count_feedback", 0);
|
|
|
+ row.put("count_feedback", rows.get(0).getLong("count"));
|
|
|
|
|
|
row.putAll(getUser(userid));
|
|
|
row.put("headpic", getHeadPic(userid));
|