|
|
@@ -27,6 +27,7 @@ import java.net.URLEncoder;
|
|
|
import java.sql.Date;
|
|
|
import java.util.*;
|
|
|
|
|
|
+import static com.cnd3b.common.parameter.parameter.tuserid;
|
|
|
import static com.cnd3b.service.GetWechatData.sortByStartDigits;
|
|
|
import static com.cnd3b.utility.aliyun.oss.AliyunOSSUtil.*;
|
|
|
|
|
|
@@ -159,7 +160,7 @@ public class wechatapplet extends Controller {
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "创建用户学习记录");
|
|
|
sqlFactory.addParameter("tuser_studyid", tuser_studyid);
|
|
|
sqlFactory.addParameter("tarchives_scid", tarchives_scid);
|
|
|
- sqlFactory.addParameter("tuserid", parameter.tuserid);
|
|
|
+ sqlFactory.addParameter("tuserid", tuserid);
|
|
|
dbConnect.runSqlUpdate(sqlFactory);
|
|
|
|
|
|
|
|
|
@@ -184,6 +185,7 @@ public class wechatapplet extends Controller {
|
|
|
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "分类");
|
|
|
sqlFactory.addParameter_SQL("where", where);
|
|
|
+ sqlFactory.addParameter("tuserid", tuserid);
|
|
|
String sql = sqlFactory.getSQL();
|
|
|
Rows rows = dbConnect.runSqlQuery(sql);
|
|
|
|
|
|
@@ -205,7 +207,7 @@ public class wechatapplet extends Controller {
|
|
|
new Thread() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
- String sql = "SELECT*FROM tuserrequestlog WHERE fdate='" + getDate_Str() + "' AND tuserid='" + parameter.tuserid + "'";
|
|
|
+ String sql = "SELECT*FROM tuserrequestlog WHERE fdate='" + getDate_Str() + "' AND tuserid='" + tuserid + "'";
|
|
|
Rows rows = dbConnect.runSqlQuery(sql);
|
|
|
if (rows.isEmpty()) {
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "新增日志");
|
|
|
@@ -213,7 +215,7 @@ public class wechatapplet extends Controller {
|
|
|
sqlFactory.addParameter("siteid", parameter.defaultsiteid);
|
|
|
sqlFactory.addParameter("fdate", getDate_Str());
|
|
|
sqlFactory.addParameter("flastrequestdate", getDateTime_Str());
|
|
|
- sqlFactory.addParameter("tuserid", parameter.tuserid);
|
|
|
+ sqlFactory.addParameter("tuserid", tuserid);
|
|
|
sqlFactory.addParameter("type", type);
|
|
|
dbConnect.runSqlUpdate(sqlFactory.getSQL());
|
|
|
} else {
|
|
|
@@ -433,13 +435,13 @@ public class wechatapplet extends Controller {
|
|
|
String tprocess = content.getString("tprocess");
|
|
|
String tlogintime = content.getString("tlogintime");
|
|
|
|
|
|
- PaoSetRemote paoSetRemote = getP2ServerSystemPaoSet("tviewlog", "tarchives_scid = '" + tarchives_scid + "' and tattachmentid = '" + tattachmentid + "' and tuserid = '" + parameter.tuserid + "' ");
|
|
|
+ PaoSetRemote paoSetRemote = getP2ServerSystemPaoSet("tviewlog", "tarchives_scid = '" + tarchives_scid + "' and tattachmentid = '" + tattachmentid + "' and tuserid = '" + tuserid + "' ");
|
|
|
if (paoSetRemote.isEmpty()) {
|
|
|
PaoRemote paoRemote = paoSetRemote.addAtEnd();
|
|
|
paoRemote.setValue("tarchives_scid", tarchives_scid, 11L);
|
|
|
paoRemote.setValue("tattachmentid", tattachmentid, 11L);
|
|
|
paoRemote.setValue("tprocess", tprocess, 11L);
|
|
|
- paoRemote.setValue("tuserid", parameter.tuserid, 11L);
|
|
|
+ paoRemote.setValue("tuserid", tuserid, 11L);
|
|
|
paoRemote.setValue("changedate", getDateTime_Str(), 11L);
|
|
|
paoRemote.setValue("tlogintime", tlogintime, 11L);
|
|
|
paoSetRemote.save();
|
|
|
@@ -465,7 +467,7 @@ public class wechatapplet extends Controller {
|
|
|
public String selectViewlog() throws P2Exception {
|
|
|
Long tarchives_scid = content.getLong("tarchives_scid");
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "查询视频播放记录");
|
|
|
- sqlFactory.addParameter("tuserid", parameter.tuserid);
|
|
|
+ sqlFactory.addParameter("tuserid", tuserid);
|
|
|
sqlFactory.addParameter("tarchives_scid", tarchives_scid);
|
|
|
String sql = sqlFactory.getSQL();
|
|
|
Rows rows = dbConnect.runSqlQuery(sql);
|
|
|
@@ -479,7 +481,7 @@ public class wechatapplet extends Controller {
|
|
|
*/
|
|
|
public Rows getUserRoles() {
|
|
|
//查询对应用户的角色
|
|
|
- String sqlRoles = "SELECT wechat_position ,fusertype FROM tuser WHERE tuserid = '" + parameter.tuserid + "'";
|
|
|
+ String sqlRoles = "SELECT wechat_position ,fusertype FROM tuser WHERE tuserid = '" + tuserid + "'";
|
|
|
return dbConnect.runSqlQuery(sqlRoles);
|
|
|
}
|
|
|
|
|
|
@@ -507,7 +509,7 @@ public class wechatapplet extends Controller {
|
|
|
* @return
|
|
|
*/
|
|
|
public ArrayList<String> getUserFauthtypeList() {
|
|
|
- String sqlFauthtype = "SELECT fauthtype FROM tagentauth WHERE tagentsid=( SELECT tagentsid FROM tagents WHERE wechat_depid=(SELECT wechat_depid FROM tuser WHERE tuserid= '" + parameter.tuserid + "'))";
|
|
|
+ String sqlFauthtype = "SELECT fauthtype FROM tagentauth WHERE tagentsid=( SELECT tagentsid FROM tagents WHERE wechat_depid=(SELECT wechat_depid FROM tuser WHERE tuserid= '" + tuserid + "'))";
|
|
|
return dbConnect.runSqlQuery(sqlFauthtype).toArrayList("fauthtype");
|
|
|
}
|
|
|
|
|
|
@@ -515,7 +517,7 @@ public class wechatapplet extends Controller {
|
|
|
public ArrayList<String> getUserFolderList(ArrayList<String> listRole, ArrayList<String> listfauthtype) {
|
|
|
ArrayList<String> listFolders = new ArrayList<>();
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "查询账号目录");
|
|
|
- sqlFactory.addParameter("tuserid", parameter.tuserid);
|
|
|
+ sqlFactory.addParameter("tuserid", tuserid);
|
|
|
sqlFactory.addParameter_in("frole", listRole);
|
|
|
sqlFactory.addParameter_in("fauthtype", listfauthtype);
|
|
|
String sql = sqlFactory.getSQL();
|
|
|
@@ -606,7 +608,7 @@ public class wechatapplet extends Controller {
|
|
|
ArrayList<JSONObject> commonPrefixList2 = new ArrayList<>();
|
|
|
//查询当前用户的上级部门id
|
|
|
String deptId = "";
|
|
|
- String sql = "SELECT tdepartmentid FROM tdepartment WHERE wechat_depid = ( SELECT wechat_parendeptid FROM tdepartment WHERE wechat_depid = ( SELECT wechat_depid FROM tuser WHERE tuserid = '" + parameter.tuserid + "'))";
|
|
|
+ String sql = "SELECT tdepartmentid FROM tdepartment WHERE wechat_depid = ( SELECT wechat_parendeptid FROM tdepartment WHERE wechat_depid = ( SELECT wechat_depid FROM tuser WHERE tuserid = '" + tuserid + "'))";
|
|
|
Rows rowsDept = dbConnect.runSqlQuery(sql);
|
|
|
if (!rowsDept.isEmpty()) {
|
|
|
deptId = rowsDept.get(0).getString("tdepartmentid");
|
|
|
@@ -671,7 +673,7 @@ public class wechatapplet extends Controller {
|
|
|
isTuserid = true;
|
|
|
} else {
|
|
|
for (String str : list_tuserid) {
|
|
|
- if (Objects.equals(parameter.tuserid, str)) {
|
|
|
+ if (Objects.equals(tuserid, str)) {
|
|
|
isTuserid = true;
|
|
|
}
|
|
|
}
|