吴志根 4 лет назад
Родитель
Сommit
14d180edb2

+ 1 - 0
src/dsb/com/cnd3b/common/data/SQL/附件查询.sql

@@ -30,6 +30,7 @@ select t1.siteid
      , t1.fobsurl
      , t1.createdate
      , t1.contentlength
+     , t1.ftitle
 from tattachment t1
 where t1.ownertable = 'tarchives_sc'
   and t1.ownerid in  $ownerid$

+ 1 - 0
src/dsb/com/cnd3b/common/data/SQL/附件查询_类型.sql

@@ -30,6 +30,7 @@ select t1.siteid
      , t1.fobsurl
      , t1.createdate
      , t1.contentlength
+     , t1.ftitle
 from tattachment t1
 where t1.ownertable = 'tarchives_sc'
   and t1.ownerid in  $ownerid$

+ 1 - 1
src/dsb/com/cnd3b/common/parameter/parameter.java

@@ -27,7 +27,7 @@ public class parameter {
     public static String defaultsiteid = "JIUSHENG";
     public static Boolean isMac = true;
     //设置改部门下的为经销商
-    public static String depname = "嘉兴多三边科技有限公司";
+    public static String depname = "经销商";
     public static String tuserid = "";
 
     /**

+ 2 - 2
src/dsb/com/cnd3b/restcontroller/customer/wechatapplet/wechatapplet.java

@@ -60,10 +60,10 @@ public class wechatapplet extends Controller {
         }
         SQLFactory sqlFactory = null;
         if (ttypedetailid.equals("")) {
-            sqlFactory = new SQLFactory(this, "查询课件列表_全部", pageSize, pageNumber, " t1.createdate desc");
+            sqlFactory = new SQLFactory(this, "查询课件列表_全部", pageSize, pageNumber, "t1.fisontop DESC, t1.createdate desc");
             sqlFactory.addParameter("keywords", "%" + keywords + "%");
         } else {
-            sqlFactory = new SQLFactory(this, "查询课件列表", pageSize, pageNumber, " t1.createdate desc");
+            sqlFactory = new SQLFactory(this, "查询课件列表", pageSize, pageNumber, "t1.fisontop DESC, t1.createdate desc");
             sqlFactory.addParameter("ttypedetailid", ttypedetailid);
             sqlFactory.addParameter("keywords", "%" + keywords + "%");
         }

+ 2 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/tarchives_sc/SQL/查询课件列表.sql

@@ -7,4 +7,5 @@ SELECT t1.tarchives_scid,
        t1.fisontop,
        t1.fiscandownload
 FROM tarchives_sc t1
-WHERE (t1.fnotes LIKE $keywords$ OR t1.ftitle LIKE $keywords$)
+WHERE (t1.fnotes LIKE $keywords$ OR t1.ftitle LIKE $keywords$)
+  and t1.ttypedetailid = $ttypedetailid$

+ 10 - 0
src/dsb/com/cnd3b/restcontroller/enterprise/tarchives_sc/SQL/查询课件列表_全部.sql

@@ -0,0 +1,10 @@
+SELECT t1.tarchives_scid,
+       t1.ttypedetailid,
+       t1.createdate,
+       t1.fnotes,
+       t1.ftitle,
+       t1.fvisitors,
+       t1.fisontop,
+       t1.fiscandownload
+FROM tarchives_sc t1
+WHERE (t1.fnotes LIKE $keywords$ OR t1.ftitle LIKE $keywords$)

+ 14 - 2
src/dsb/com/cnd3b/restcontroller/enterprise/tarchives_sc/tarchives_sc.java

@@ -137,8 +137,20 @@ public class tarchives_sc extends Controller {
             keywords = content.getString("keywords");
         }
 
-        SQLFactory sqlFactory = new SQLFactory(this, "查询课件列表", pageSize, pageNumber, " t1.createdate desc");
-        sqlFactory.addParameter("keywords", "%" + keywords + "%");
+        String ttypedetailid = "";
+        if (content.containsKey("ttypedetailid")) {
+            ttypedetailid = content.getString("ttypedetailid");
+        }
+        SQLFactory sqlFactory = null;
+        if (ttypedetailid.equals("")) {
+            sqlFactory = new SQLFactory(this, "查询课件列表_全部", pageSize, pageNumber, " t1.createdate desc");
+            sqlFactory.addParameter("keywords", "%" + keywords + "%");
+        } else {
+            sqlFactory = new SQLFactory(this, "查询课件列表", pageSize, pageNumber, " t1.createdate desc");
+            sqlFactory.addParameter("keywords", "%" + keywords + "%");
+            sqlFactory.addParameter("ttypedetailid", ttypedetailid);
+        }
+
         Rows rows = dbConnect.runSqlQuery(sqlFactory.getSQL());
         RowsMap rowsMap = getAttachmentUrl("tarchives_sc", rows.toArrayList("tarchives_scid"), "video");
         //查询封面

+ 4 - 0
src/dsb/com/cnd3b/restcontroller/system/system/OSSManage.java

@@ -47,6 +47,7 @@ public class OSSManage extends Controller {
         String ownertable = content.getString("ownertable");
         String ownerid = content.getString("ownerid");
         String ftype = content.getString("ftype");
+        String ftitle = content.getString("ftitle");
 
         File file = new File(filePath);
         if (!file.exists()) {
@@ -79,6 +80,7 @@ public class OSSManage extends Controller {
         paoRemote.setValue("fdocument", file.getName(), 11L);
         paoRemote.setValue("fobsurl", url, 11L);
         paoRemote.setValue("contentlength", String.valueOf(file.length()), 11L);
+        paoRemote.setValue("ftitle", ftitle, 11L);
         paoSetRemote.save();
 
         JSONObject object = new JSONObject();
@@ -104,6 +106,7 @@ public class OSSManage extends Controller {
         String ownertable = content.getString("ownertable");
         String ownerid = content.getString("ownerid");
         String ftype = content.getString("ftype");
+        String ftitle = content.getString("ftitle");
 
         File file = new File(filePath);
         if (!file.exists()) {
@@ -137,6 +140,7 @@ public class OSSManage extends Controller {
             paoRemote.setValue("fdocument", file.getName(), 11L);
             paoRemote.setValue("fobsurl", url, 11L);
             paoRemote.setValue("contentlength", String.valueOf(file.length()), 11L);
+            paoRemote.setValue("ftitle", ftitle, 11L);
             paoSetRemote.save();