Quellcode durchsuchen

商品增加产品标签,新增系统消息查询及消息阅读接口

沈静伟 vor 4 Jahren
Ursprung
Commit
b91d5b730c

+ 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 from tagents_product t1
+select t1.tagents_productid,t1.fprice, t1.fprodname, t1.fprodnum,t1.fprodclassname,ftag from tagents_product t1
 where t1.siteid=$siteid$ and t1.tagentsid=$tagentsid$ and $where$

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/customer/products/SQL/商品详情查询.sql

@@ -1,4 +1,4 @@
 select  tagents_productid, createby, changeby, createdate, changedate,
  fisonsale, fnotes, foffsaleby, foffsaledate, fonsaleby, fonsaledate, fprice, fprodname, fprodnum
- , fprodclassname, fintroduction from tagents_product t1
+ , fprodclassname, fintroduction,ftag from tagents_product t1
  where siteid=$siteid$ and tagentsid=$tagentsid$ and tagents_productid=$tagents_productid$

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

@@ -47,6 +47,7 @@ public class products extends Controller {
                 where.append("t1.fprodname like'%").append(whereObject.getString("condition")).append("%' ");
                 where.append("or t1.fprodnum like'%").append(whereObject.getString("condition")).append("%' ");
                 where.append("or t1.fintroduction like'%").append(whereObject.getString("condition")).append("%' ");
+                where.append("or t1.ftag like'%").append(whereObject.getString("condition")).append("%' ");
                 where.append(")");
             }
             if (whereObject.getBooleanValue("fisonsale")) {
@@ -98,6 +99,7 @@ public class products extends Controller {
         String fprodclassname = content.getString("fprodclassname", "tagents_product.fprodclassname", "经营类目");
         String fintroduction = content.getString("fintroduction", "tagents_product.fintroduction", "产品介绍");
         String fnotes = content.getString("fnotes", "tagents_product.fnotes", "备注");
+        String ftag = content.getString("ftag", "tagents_product.ftag", "标签");
 
         PaoSetRemote tagents_productSet = getP2ServerSystemPaoSet("tagents_product", "siteid='" + siteid + "' and tagentsid='" + tagentsid + "' and tagents_productid='" + tagents_productid + "'");
         PaoRemote tagents_product = null;
@@ -115,6 +117,7 @@ public class products extends Controller {
         tagents_product.setValue("fprice", fprice, 11L);//销售单价
         tagents_product.setValue("fprodclassname", fprodclassname, 11L);//经营类目
         tagents_product.setValue("fintroduction", fintroduction, 11L);//产品介绍
+        tagents_product.setValue("ftag", ftag, 11L);//产品标签
         tagents_product.setValue("fnotes", fnotes, 11L);//备注
         tagents_product.setValue("changeby", username, 11L);//修改人
         tagents_product.setValue("changedate", sysdate, 11L);//修改时间

+ 11 - 7
src/dsb/com/cnd3b/restcontroller/system/message/Message.java

@@ -27,17 +27,21 @@ public class Message extends Controller {
     }
 
     public String readMessage() {
-        SQLFactory factory = new SQLFactory(this, "消息阅读");
+        SQLFactory read = new SQLFactory(this, "消息阅读");
+        read.addParameter("siteid", siteid);
+        read.addParameter("tenterprise_userid", userid);
+        read.addParameter("tmessageid", content.getString("tmessageid"));
+
+        SQLFactory factory = new SQLFactory(this, "消息详情");
         factory.addParameter("siteid", siteid);
         factory.addParameter("tenterprise_userid", userid);
         factory.addParameter("tmessageid", content.getString("tmessageid"));
-        String status = dbConnect.runSqlUpdate(factory.getSQL());
-        if ("true".equals(status)) {
-            return getSucReturnObject().toString();
-        } else {
-            return getErrReturnObject().setErrMsg(status).toString();
-        }
+        Rows rows = dbConnect.runSqlQuery(factory.getSQL());
+        dbConnect.runSqlUpdate(read.getSQL());
+
+        return getSucReturnObject().setData(rows).toString();
     }
+
     /**
      * 消息发送
      *

+ 2 - 0
src/dsb/com/cnd3b/restcontroller/system/message/SQL/消息详情.sql

@@ -0,0 +1,2 @@
+select tmessageid,createdate,fmessage,ftype,fisread,freaddate,objectname,objectid from tMessage t1
+where siteid=$siteid$ and tenterprise_userid=$tenterprise_userid$ and tmessageid=$tmessageid$

+ 1 - 1
src/dsb/com/cnd3b/restcontroller/system/message/SQL/消息阅读.sql

@@ -1,2 +1,2 @@
 update tMessage set fisread=1 ,freaddate=getdate()
-where siteid=$siteid$ and tenterprise_userid=$tenterprise_userid$ and  tmessageid=$tmessageid$
+where siteid=$siteid$ and tenterprise_userid=$tenterprise_userid$ and  tmessageid=$tmessageid$ and fisread=0