Ver código fonte

商品列表增加是否上架的过滤
附件上传成功反馈增加删除指定附件功能

沈静伟 4 anos atrás
pai
commit
ce6829cbcc

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/customer/products/SQL/商户产品列表查询.sql

@@ -1,2 +1,2 @@
 select t1.tagents_productid,t1.fprice, t1.fprodname, t1.fprodnum,t1.fprodclassname,ftag,fisonsale, fintroduction from tagents_product t1
-where t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$
+where t1.fisonsale=1 and t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$

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

@@ -35,8 +35,8 @@ public class products extends Controller {
         /**
          *排序条件设置
          */
-        String[] sortfield = {"t1.fprodname"};
-        String sort = getSort(sortfield, "t1.fprodname");
+        String[] sortfield = {"t1.fisonsale desc,t1.fprodname"};
+        String sort = getSort(sortfield, "t1.fisonsale desc,t1.fprodname");
         /**
          * 过滤条件设置
          */

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/customer/usercenter/usermsg/usermsg.java

@@ -69,7 +69,7 @@ public class usermsg extends Controller {
             pao.setValue("fwechatno", fwechatno, 11L);
             pao.setValue("changeby", username, 11L);
             pao.setValue("changedate", getDateTime(), 11L);
-            pao.setValue("faddress", faddress, 11L);
+            pao.setValue("faddress", faddress.equalsIgnoreCase("null") ? "" : faddress, 11L);
             pao.setValue("frole", frole, 11L);
             tenterprise_usersSet.save();
 

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/enterprise/products/SQL/商品列表查询.sql

@@ -1,2 +1,2 @@
 select t1.tagents_productid,t1.fprice, t1.fprodname, t1.fprodnum,t1.fprodclassname,ftag,fisonsale, fintroduction from tagents_product t1
-where t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$ and $where$
+where t1.fisonsale=1 and t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$ and $where$

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/publicmethod/homepage/SQL/优质商品.sql

@@ -1,2 +1,2 @@
 select t1.tagents_productid,t1.tagentsid,t1.fintroduction,t1.fprodname,t1.fprodclassname from tagents_product t1
-where t1.siteid=$siteid$ and (t1.tagentsid=$tagentsid$ or $tagentsid$=0)
+where t1.fisonsale=1 and t1.siteid=$siteid$ and (t1.tagentsid=$tagentsid$ or $tagentsid$=0)

+ 15 - 1
src/dsb/com/cnd3b/restcontroller/system/system/docManage.java

@@ -241,7 +241,6 @@ public class docManage extends Controller {
 
     public String uploadSuccess() {
         String obsfilename = content.getString("obsfilename");
-
         if (!obsfilemap.containsKey(obsfilename)) {
             return getErrReturnObject().setErrMsg("找不到对应的云存储文件").toString();
         }
@@ -282,6 +281,7 @@ public class docManage extends Controller {
                 mpctaskid = mpcFactory.createMpcTask(siteid, obsfilename);
             }
             ArrayList<String> SQlist = new ArrayList<>();
+
             /**
              * 本地信息插入
              */
@@ -356,6 +356,20 @@ public class docManage extends Controller {
             if (ftype.equalsIgnoreCase("headportrait")) {
                 headPicMap.remove(userid);//清除头像缓存
             }
+
+            /**
+             * 自动删除指定的附件信息
+             */
+            if (content.containsKey("deleteattachmentids")) {
+                JSONArray deleteattachmentids = content.getJSONArray("deleteattachmentids");//需要删除的附件信息id
+                for (Object o : deleteattachmentids) {
+                    long id = (long) o;
+                    content.put("ownertable", ownertable);
+                    content.put("ownerid", ownerid);
+                    content.put("tattachmentid", id);
+                    deleteDoc();
+                }
+            }
         } catch (Exception exception) {
             resultObject.put("code", 0);
             resultObject.put("msg", exception.getMessage());