|
|
@@ -34,36 +34,36 @@ public class visitors extends Controller {
|
|
|
@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"));
|
|
|
- //预约
|
|
|
- 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"));
|
|
|
- //收藏
|
|
|
- rows = dbConnect.runSqlQuery("SELECT count(*) count from sys_datacollect WHERE userid=" + userid + " and siteid='" + siteid + "' and type=1");
|
|
|
- row.put("count_collect", rows.get(0).getLong("count"));
|
|
|
- //订单
|
|
|
- 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 from sys_phonebook WHERE sys_phonebookgroupid in (SELECT sys_phonebookgroupid from sys_phonebookgroup WHERE classid=1) and siteid='"+siteid+"'");
|
|
|
- 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 changeuserid=" + userid + " and siteid='" + siteid + "' ");
|
|
|
- // 意见反馈
|
|
|
- row.put("count_feedback", rows.get(0).getLong("count"));
|
|
|
-
|
|
|
- rows = dbConnect.runSqlQuery("SELECT count(*) count from sa_awardmx WHERE createuserid=" + userid + " and siteid='" + siteid + "' ");
|
|
|
- // 中奖明细
|
|
|
- row.put("count_awardmx", rows.get(0).getLong("count"));
|
|
|
+// //统计我的访问店铺数量
|
|
|
+// 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"));
|
|
|
+// //预约
|
|
|
+// 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"));
|
|
|
+// //收藏
|
|
|
+// rows = dbConnect.runSqlQuery("SELECT count(*) count from sys_datacollect WHERE userid=" + userid + " and siteid='" + siteid + "' and type=1");
|
|
|
+// row.put("count_collect", rows.get(0).getLong("count"));
|
|
|
+// //订单
|
|
|
+// 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 from sys_phonebook WHERE sys_phonebookgroupid in (SELECT sys_phonebookgroupid from sys_phonebookgroup WHERE classid=1) and siteid='"+siteid+"'");
|
|
|
+// 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 changeuserid=" + userid + " and siteid='" + siteid + "' ");
|
|
|
+// // 意见反馈
|
|
|
+// row.put("count_feedback", rows.get(0).getLong("count"));
|
|
|
+//
|
|
|
+// rows = dbConnect.runSqlQuery("SELECT count(*) count from sa_awardmx WHERE createuserid=" + userid + " and siteid='" + siteid + "' ");
|
|
|
+// // 中奖明细
|
|
|
+// row.put("count_awardmx", rows.get(0).getLong("count"));
|
|
|
|
|
|
row.putAll(getUser(userid));
|
|
|
row.put("headpic", getHeadPic(userid));
|
|
|
@@ -79,9 +79,7 @@ public class visitors extends Controller {
|
|
|
long days = ChronoUnit.DAYS.between(startDate, endDate);
|
|
|
row.put("joindays", days);
|
|
|
//签到时间
|
|
|
- Rows signRows = dbConnect.runSqlQuery("SELECT count(DISTINCT t1.sat_sharematerialid) count from sat_sharematerial_read t1 " +
|
|
|
- "inner join sat_sharematerial t2 ON t2.sat_sharematerialid=t1.sat_sharematerialid " +
|
|
|
- "WHERE t2.classid=1 and t1.createuserid=" + userid + " and t1.type=0 and t1.siteid='" + siteid + "'");
|
|
|
+ Rows signRows = dbConnect.runSqlQuery("SELECT count(*) count from sys_signin WHERE type='签到' and siteid='" + siteid + "' and userid='" + userid + "'");
|
|
|
row.put("signdays", signRows.get(0).getLong("count"));
|
|
|
|
|
|
Rows storerows = dbConnect.runSqlQuery("SELECT t1.*from sa_store t1 \n" +
|