Browse Source

商品组上下架添加操作日志

hu 1 year ago
parent
commit
a1f43336e2
1 changed files with 14 additions and 2 deletions
  1. 14 2
      src/custom/restcontroller/webmanage/sale/itemgroup/itemgroup.java

+ 14 - 2
src/custom/restcontroller/webmanage/sale/itemgroup/itemgroup.java

@@ -2,6 +2,7 @@ package restcontroller.webmanage.sale.itemgroup;
 
 import beans.brand.Brand;
 import beans.data.BatchDeleteErr;
+import beans.datacontrllog.DataContrlLog;
 import beans.datatag.DataTag;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -292,7 +293,13 @@ public class itemgroup extends Controller {
         SQLFactory sqlFactoryupdate = new SQLFactory(this, "商品组上架");
         sqlFactoryupdate.addParameter("siteid", siteid);
         sqlFactoryupdate.addParameter_in("sa_itemgroupids", stringArray);
-        dbConnect.runSqlUpdate(sqlFactoryupdate);
+        ArrayList<String> sqlList = new ArrayList<>();
+        sqlList.add(sqlFactoryupdate.getSQL());
+        for (long sa_itemgroupid:list) {
+            sqlList.add(DataContrlLog.createLog(this, "sa_itemgroup", sa_itemgroupid, "上架", "商品组上架成功").getSQL());
+        }
+
+        dbConnect.runSqlUpdate(sqlList);
 //        //发送消息
 //        for (String id : stringArray) {
 //            sendMsg(Long.parseLong(id));
@@ -376,7 +383,12 @@ public class itemgroup extends Controller {
         SQLFactory sqlFactoryupdate = new SQLFactory(this, "商品组下架");
         sqlFactoryupdate.addParameter("siteid", siteid);
         sqlFactoryupdate.addParameter_in("sa_itemgroupids", stringArray);
-        dbConnect.runSqlUpdate(sqlFactoryupdate);
+        ArrayList<String> sqlList = new ArrayList<>();
+        sqlList.add(sqlFactoryupdate.getSQL());
+        for (long sa_itemgroupid:list) {
+            sqlList.add(DataContrlLog.createLog(this, "sa_itemgroup", sa_itemgroupid, "下架", "商品组下架成功").getSQL());
+        }
+        dbConnect.runSqlUpdate(sqlList);
         return getSucReturnObject().toString();
     }