Browse Source

Merge branch 'master' of http://116.63.33.55/git/read_opc

DESKTOP-227F4HN\Zt 2 years ago
parent
commit
ff47f1f5ec

+ 31 - 0
chuanyi_client2/src/api/datasource.js

@@ -76,6 +76,21 @@ export function saveOrUpdateDataSource(data) {
 }
 
 /**
+ * 通过id删除数据源配置
+ * @param id
+ * @returns {AxiosPromise}
+ */
+export function delDataSourceById(id) {
+    return request({
+        url: '/dataSource/delDataSourceById/' + id,
+        headers: {
+            isToken: true
+        },
+        method: 'post'
+    })
+}
+
+/**
  * 查询组配置
  * @returns {AxiosPromise}
  */
@@ -88,3 +103,19 @@ export function getAllItemGroup() {
         method: 'get'
     })
 }
+
+/**
+ * 保存组配置
+ * @param data
+ * @returns {AxiosPromise}
+ */
+export function saveOrUpdateItemGroup(data) {
+    return request({
+        url: '/itemGroup/addItemGroup',
+        headers: {
+            isToken: true
+        },
+        method: 'post',
+        data
+    })
+}

+ 1 - 0
chuanyi_client2/src/assets/icons/svg/file.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1669369976975" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2664" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M842.666667 285.866667l-187.733334-187.733334c-14.933333-14.933333-32-21.333333-53.333333-21.333333H234.666667C194.133333 74.666667 160 108.8 160 149.333333v725.333334c0 40.533333 34.133333 74.666667 74.666667 74.666666h554.666666c40.533333 0 74.666667-34.133333 74.666667-74.666666V337.066667c0-19.2-8.533333-38.4-21.333333-51.2z m-44.8 44.8c-2.133333 2.133333-4.266667 0-8.533334 0h-170.666666c-6.4 0-10.666667-4.266667-10.666667-10.666667V149.333333c0-2.133333 0-6.4-2.133333-8.533333 0 0 2.133333 0 2.133333 2.133333l189.866667 187.733334z m-8.533334 554.666666H234.666667c-6.4 0-10.666667-4.266667-10.666667-10.666666V149.333333c0-6.4 4.266667-10.666667 10.666667-10.666666h311.466666c-2.133333 4.266667-2.133333 6.4-2.133333 10.666666v170.666667c0 40.533333 34.133333 74.666667 74.666667 74.666667h170.666666c4.266667 0 6.4 0 10.666667-2.133334V874.666667c0 6.4-4.266667 10.666667-10.666667 10.666666z" p-id="2665" fill="#8a8a8a"></path><path d="M640 693.333333H341.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h298.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM640 522.666667H341.333333c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h298.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32zM341.333333 416h85.333334c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32h-85.333334c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32z" p-id="2666" fill="#8a8a8a"></path></svg>

+ 1 - 0
chuanyi_client2/src/assets/icons/svg/folder-open.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1669370233473" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11882" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M1003.153333 404.96a52.933333 52.933333 0 0 0-42.38-20.96H896V266.666667a53.393333 53.393333 0 0 0-53.333333-53.333334H461.253333a10.573333 10.573333 0 0 1-7.54-3.126666L344.46 100.953333A52.986667 52.986667 0 0 0 306.746667 85.333333H53.333333a53.393333 53.393333 0 0 0-53.333333 53.333334v704a53.393333 53.393333 0 0 0 53.333333 53.333333h796.893334a53.453333 53.453333 0 0 0 51.453333-39.333333l110.546667-405.333334a52.953333 52.953333 0 0 0-9.073334-46.373333zM53.333333 128h253.413334a10.573333 10.573333 0 0 1 7.54 3.126667l109.253333 109.253333A52.986667 52.986667 0 0 0 461.253333 256H842.666667a10.666667 10.666667 0 0 1 10.666666 10.666667v117.333333H173.773333a53.453333 53.453333 0 0 0-51.453333 39.333333L42.666667 715.366667V138.666667a10.666667 10.666667 0 0 1 10.666666-10.666667z m917.726667 312.14l-110.546667 405.333333a10.666667 10.666667 0 0 1-10.286666 7.86H63.226667a10.666667 10.666667 0 0 1-10.286667-13.473333l110.546667-405.333333A10.666667 10.666667 0 0 1 173.773333 426.666667h787a10.666667 10.666667 0 0 1 10.286667 13.473333z" fill="#8a8a8a" p-id="11883"></path></svg>

+ 1 - 0
chuanyi_client2/src/assets/icons/svg/folder.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1669370187917" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11351" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M153.856 154.112H153.6a51.2 51.2 0 0 0-51.2 51.2V819.2a51.2 51.2 0 0 0 51.2 51.2h716.8a51.2 51.2 0 0 0 51.2-51.2V307.4048a51.2 51.2 0 0 0-51.4048-50.9952l-336.6912 1.3312a102.4 102.4 0 0 1-72.8064-30.0032L403.1488 170.1888a51.2 51.2 0 0 0-35.9424-15.0016l-213.3504-1.024z m0.256-51.2l213.4016 1.0752a102.4 102.4 0 0 1 71.8848 30.0032l57.4976 57.5488a51.2 51.2 0 0 0 36.4544 15.0016l336.64-1.3312A102.4 102.4 0 0 1 972.8 307.2v512a102.4 102.4 0 0 1-102.4 102.4H153.6a102.4 102.4 0 0 1-102.4-102.4V205.312a102.4 102.4 0 0 1 102.4-102.4h0.512z" fill="#8a8a8a" p-id="11352"></path></svg>

+ 273 - 24
chuanyi_client2/src/components/HeaderMain/index.vue

@@ -6,7 +6,8 @@
         <div class="nav-title">报表模版设计</div>
       </div>
       <div>
-        hhhh
+        <el-tree node-key="id"
+                 class="filter-tree group-tree"></el-tree>
       </div>
     </el-tab-pane>
     <el-tab-pane>
@@ -22,6 +23,7 @@
                  @node-contextmenu="rightNodeEvent"
                  @node-click="handleNodeClick"
                  :highlight-current="false"
+                 :expand-on-click-node="false"
                  :default-expand-all="true"></el-tree>
       </div>
     </el-tab-pane>
@@ -76,6 +78,7 @@
                   </el-select>
                   <el-button size="mini" @click="addDataItem" style="float: right;width: 100px;margin-top: 4px;">添加数据项</el-button>
                 </el-form-item>
+                <el-tag size="mini" v-if="chooseItemDataView" class="cy-item-tag">已选择({{ chooseItemDataList.length }})项</el-tag>
               </div>
 <!--              <el-button size="mini"  style="float: right;margin-top: 15px;margin-right: 14px;">添加数据项</el-button>-->
             </el-form>
@@ -140,40 +143,59 @@
             <el-input placeholder="请输入关键字进行过滤" v-model="filterItemData"></el-input>
             <el-tree class="cy-item-tree"
                      ref="itemTree"
-                     :data="itemDataList"
-                     :indent="0"
+                     :data="itemDataListByTree"
+                     :indent="10"
                      node-key="id"
+                     show-checkbox
+                     :check-on-click-node="true"
                      :filter-node-method="filterItemDataNode"
                      :highlight-current="true"
-                     :default-expand-all="true"></el-tree>
+                     :default-expand-all="true">
+              <span class="custom-tree-node" slot-scope="{ node, data }">
+                <svg-icon v-if="!data.children" icon-class="file"/>
+                <svg-icon v-else-if="node.expanded" icon-class="folder-open"/>
+                <svg-icon v-else icon-class="folder"/>
+                <span :title='node.label || "-"' style="margin-left: 2px;">{{node.label}}</span>
+              </span>
+            </el-tree>
           </div>
         </div>
         <!-- 操作按钮 -->
         <div class="cy-transform-btn">
           <el-row>
-            <el-button size="mini">添加&nbsp;&gt;&gt;</el-button>
+            <el-button size="mini" @click="addCheckNodesBtnEvent">添加&nbsp;&gt;&gt;</el-button>
           </el-row>
           <el-row>
-            <el-button size="mini">&lt;&lt;&nbsp;移除</el-button>
+            <el-button size="mini" @click="removeCheckNodesBtnEvent">&lt;&lt;&nbsp;移除</el-button>
           </el-row>
           <el-row>
-            <el-button size="mini">全部移除</el-button>
+            <el-button size="mini" @click="removeAllCheckNodesBtnEvent">全部移除</el-button>
           </el-row>
         </div>
         <!-- 已选择数据项 -->
         <div class="cy-transform-data">
           <el-divider content-position="left">已选择数据项</el-divider>
           <div class="cy-line">
-            <el-tree :data="chooseItemDataList"
+            <el-tree :data="chooseItemDataListByTree"
+                     ref="chooseItemTree"
                      :indent="0"
                      node-key="id"
+                     show-checkbox
+                     :check-on-click-node="true"
                      :highlight-current="true"
-                     :default-expand-all="true"></el-tree>
+                     :default-expand-all="true">
+              <span class="custom-tree-node" slot-scope="{ node, data }">
+                <svg-icon v-if="!data.children" icon-class="file"/>
+                <svg-icon v-else-if="node.expanded" icon-class="folder-open"/>
+                <svg-icon v-else icon-class="folder"/>
+                <span :title='node.label || "-"' style="margin-left: 2px;">{{node.label}}</span>
+              </span>
+            </el-tree>
           </div>
         </div>
       </div>
       <span slot='footer'>
-          <el-button type="primary">确定</el-button>
+          <el-button type="primary" @click="itemDialogSave">确定</el-button>
           <el-button @click="itemDialogClose">取消</el-button>
       </span>
     </el-dialog>
@@ -181,7 +203,13 @@
 </template>
 
 <script>
-import {getAllDataSource, getAllItemGroup, getDataSourceItemTree} from "@/api/datasource";
+import {
+  getAllDataSource,
+  getAllItemGroup,
+  getDataSourceItemTree,
+  saveOrUpdateDataSource,
+  saveOrUpdateItemGroup
+} from "@/api/datasource";
 import {getDictByKey} from "@/api/basic";
 import {showLoading} from "@/utils/cqcy";
 
@@ -211,9 +239,12 @@ export default {
       dataSourceList: [],
       // 数据项
       itemDataList: [],
+      itemDataListByTree: [],
       filterItemData: '',
       // 已选择的数据项
       chooseItemDataList: [],
+      chooseItemDataListByTree: [],
+      chooseItemDataView: false,
       groupBasicForm: {
         groupName: '',
         groupDescribe: '',
@@ -235,7 +266,15 @@ export default {
   watch: {
     filterItemData(val) {
       this.$refs.itemTree.filter(val)
-    }
+    },
+    /** 组添加右键值监听 */
+    visibleGroupMenu(value) {
+      if (value) {
+        document.body.addEventListener('click', this.closeMenu)
+      } else {
+        document.body.removeEventListener('click', this.closeMenu)
+      }
+    },
   },
   computed: {
   },
@@ -274,9 +313,41 @@ export default {
     handleSave() {
       this.$refs['groupBasicForm'].validate(valid => {
         if (valid && this.checkParams()) {
+          // 参数封装
+          let params = JSON.parse(JSON.stringify(this.groupBasicForm))
+          params.readMode = this.groupRateForm.readMode
+          params.modeValue = this.groupRateForm.modeValue
+          this.addGroupItem(params)
         }
       })
     },
+    /** 保存组配置 */
+    addGroupItem(params) {
+      const loading = showLoading(this, '保存中,请稍候···')
+      saveOrUpdateItemGroup(params).then(res => {
+        loading.close()
+        if (res.data) {
+          this.$alert('保存成功!', '温馨提示', {
+            confirmButtonText: '确定',
+            callback: action => {
+              this.handleCancel()
+              // 刷新组列表
+            }
+          })
+          return
+        }
+        this.$message({
+          message: '保存失败!',
+          type: 'error'
+        })
+      }).catch((e) => {
+        loading.close()
+        this.$message({
+          message: '保存失败!',
+          type: 'error'
+        })
+      })
+    },
     /** 选择数据源值改变事件 */
     dataSourceChange(val) {
       this.groupBasicForm.dataSourceId = val
@@ -322,15 +393,65 @@ export default {
         })
         return
       }
-      const loading = showLoading(this, '加载中,请稍候···')
-      getDataSourceItemTree(id).then(res => {
-        loading.close()
-        this.itemDataList = res.data
-        this.dataItemDialogVisible = true
-      }).catch((e) => {
-        loading.close()
-        console.error(e)
-      })
+      // const loading = showLoading(this, '加载中,请稍候···')
+      // getDataSourceItemTree(id).then(res => {
+      //   loading.close()
+      //   this.itemDataList = res.data
+      //   this.itemDataListByTree = res.data
+      //   this.dataItemDialogVisible = true
+      // }).catch((e) => {
+      //   loading.close()
+      //   console.error(e)
+      // })
+      let ada = [{
+        id: 1,
+        label: '一级 1',
+        children: [{
+          id: 4,
+          label: '二级 1-1',
+          children: [{
+            id: 9,
+            label: '三级 1-1-1',
+            children: [{
+              id: 41,
+              label: '四级 1-1-1-1',
+              children: [{
+                id: 51,
+                label: '五级 1-1-1-1-1'
+              }, {
+                id: 52,
+                label: '五级 1-1-1-1-2'
+              }]
+            }]
+          }, {
+            id: 10,
+            label: '三级 1-1-2'
+          }]
+        }]
+      }, {
+        id: 2,
+        label: '一级 2',
+        children: [{
+          id: 5,
+          label: '二级 2-1'
+        }, {
+          id: 6,
+          label: '二级 2-2'
+        }]
+      }, {
+        id: 3,
+        label: '一级 3',
+        children: [{
+          id: 7,
+          label: '二级 3-1'
+        }, {
+          id: 8,
+          label: '二级 3-2'
+        }]
+      }]
+      this.itemDataList = JSON.parse(JSON.stringify(ada))
+      this.itemDataListByTree = ada
+      this.dataItemDialogVisible = true
     },
     /** 参数检查 */
     checkParams() {
@@ -364,6 +485,122 @@ export default {
       }
       return true
     },
+    /**
+     * 显示层级数据
+     * @param tree {Array} 树数据
+     * @param func {Function} 回调函数
+     * @param field {String} 字段名称
+     * @param path {Array} 路径数据
+     * @returns {*[]|[]|*}
+     */
+    treeFindPath(tree, func, field = "", path = []) {
+      if (!tree) return []
+      for (const data of tree) {
+        field === "" ? path.push(data) : path.push(data[field]);
+        if (func(data)) return path
+        if (data.children) {
+          const findChildren = this.treeFindPath(data.children, func, field, path)
+          if (findChildren.length) return findChildren
+        }
+        path.pop()
+      }
+      return []
+    },
+    /** 添加数据项 */
+    addCheckNodesBtnEvent() {
+      let checkedNodes = this.$refs.itemTree.getCheckedNodes(false, true)
+      if (checkedNodes.length == 0) {
+        this.$message({
+          message: '请选择数据项!',
+          type: 'warning'
+        })
+        return
+      }
+      // 根据当前选择节点拼接为:XXXX.XXXX.XXX
+      let chooseChannelNameList = []
+      for (let i in checkedNodes) {
+        let checkedNode = checkedNodes[i]
+        if (checkedNode.children && checkedNode.children.length > 0) {
+          continue
+        }
+        const nodeId = checkedNode.$treeNodeId;
+        let channelName = this.treeFindPath(this.itemDataListByTree, data => data.$treeNodeId === nodeId, "label")
+        let temp = {
+          'label': channelName.join('.')
+        }
+        chooseChannelNameList.push(temp)
+      }
+      // 去重
+      let arr = JSON.parse(JSON.stringify(this.chooseItemDataListByTree))
+      if (arr.length == 0) {
+        arr = chooseChannelNameList
+      } else {
+        for (let i in chooseChannelNameList) {
+          let flag = false
+          for (let j in arr) {
+            if (chooseChannelNameList[i].label == arr[j].label) {
+              flag = true
+              break
+            }
+          }
+          if (!flag) {
+            arr.push(chooseChannelNameList[i])
+          }
+        }
+      }
+      this.chooseItemDataListByTree = arr
+      this.$refs.itemTree.setCheckedKeys([])
+    },
+    /** 移除全部数据项 */
+    removeAllCheckNodesBtnEvent() {
+      if (this.chooseItemDataListByTree.length == 0) {
+        return
+      }
+      this.chooseItemDataListByTree = []
+      this.$refs.itemTree.setCheckedKeys([])
+    },
+    /** 移除数据项 */
+    removeCheckNodesBtnEvent() {
+      let checkedNodes = this.$refs.chooseItemTree.getCheckedNodes(false, true)
+      if (checkedNodes.length == 0) {
+        this.$message({
+          message: '请选择数据项!',
+          type: 'warning'
+        })
+        return
+      }
+      // 移除当前选择项
+      for (let i in checkedNodes) {
+        let index = this.chooseItemDataListByTree.indexOf(checkedNodes[i])
+        if (index >= 0) {
+          this.chooseItemDataListByTree.splice(index, 1)
+        }
+      }
+      // 重置选择
+      this.$refs.itemTree.setCheckedKeys([])
+      this.$refs.chooseItemTree.setCheckedKeys([])
+    },
+    /** 选择数据项弹出层保存事件 */
+    itemDialogSave() {
+      if (this.chooseItemDataListByTree.length == 0) {
+        this.$message({
+          message: '请选择数据项!',
+          type: 'warning'
+        })
+        return
+      }
+      let itemList = []
+      let itemNameList = this.chooseItemDataListByTree.map(map => { return map.label })
+      for (let i in itemNameList) {
+        itemList.push({
+          'itemName': itemNameList[i]
+        })
+      }
+      this.groupBasicForm.itemList = itemList
+      this.chooseItemDataList = this.chooseItemDataListByTree
+      this.dataItemDialogVisible = false
+      this.chooseItemDataView = true
+    },
     /** 关闭右键弹出层 */
     closeMenu() {
       this.visibleGroupMenu = false
@@ -382,8 +619,8 @@ export default {
     },
     /** 选择数据项弹出层关闭事件 */
     itemDialogClose(done) {
-      this.itemDataList = []
-      this.chooseItemDataList = []
+      this.itemDataListByTree = []
+      this.chooseItemDataListByTree = []
       if (typeof(done) === 'function') {
         done()
       } else {
@@ -522,6 +759,18 @@ export default {
 }
 
 .cy-transform-data {
-  width: calc(100% - 60px);
+  width: calc(50% - 60px);
+}
+
+.custom-tree-node {
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  overflow: hidden;
+}
+
+.cy-item-tag {
+  float: right;
+  margin-top: -7px;
+  margin-right: 10px;
 }
 </style>

+ 84 - 18
chuanyi_client2/src/components/LeftMenu/index.vue

@@ -64,11 +64,13 @@
           <el-divider content-position="left">已配置数据源列表</el-divider>
           <div class="cy-line">
             <ul class="conn-ul">
-              <li v-for="conn in connServerList"
-                  :class="(chooseConnServer && conn.id == chooseConnServer.id) ? 'conn-is-active' : ''"
-                  @click="(val) => eventByConnServer(conn, val)">
-                <el-image :src="require('@/assets/images/conn.png')" fit="contain"></el-image>
-                <span>{{ conn.dataSourceName }}</span>
+              <li v-for="conn in connServerList">
+                <div :class="(chooseConnServer && conn.id == chooseConnServer.id) ? 'conn-is-active' : ''"
+                     @click="(val) => eventByConnServer(conn, val)">
+                  <el-image :src="require('@/assets/images/conn.png')" fit="contain"></el-image>
+                  <span>{{ conn.dataSourceName }}</span>
+                </div>
+                <i class="el-icon-delete" @click="delConnServer(conn)"></i>
               </li>
             </ul>
           </div>
@@ -135,7 +137,13 @@
 </template>
 
 <script>
-import {getAllDataSource, getDataSourceTree, saveOrUpdateDataSource, testConnect} from "@/api/datasource";
+import {
+  delDataSourceById,
+  getAllDataSource,
+  getDataSourceTree,
+  saveOrUpdateDataSource,
+  testConnect
+} from "@/api/datasource";
 import {showLoading} from "@/utils/cqcy";
 import {encrypt} from "@/utils/jsencrypt";
 import {getPubKey} from "@/utils/auth";
@@ -256,6 +264,39 @@ export default {
         }
       })
     },
+    /** 删除数据源 */
+    delConnServer(data) {
+      let _this = this
+      if (!data) {
+        _this.$message({
+          message: '删除失败!',
+          type: 'error'
+        })
+        return
+      }
+      _this.$confirm('您确定要删除该数据源吗?', '温馨提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消'
+      }).then(() => {
+        const loading = showLoading(_this, '删除中,请稍候···')
+        delDataSourceById(data.id).then(res => {
+          loading.close()
+          // 刷新右侧数据源类型列表
+          _this.getMyDatasourceList()
+          _this.$message({
+            message: res.data,
+            type: 'success'
+          })
+        }).catch((e) => {
+          loading.close()
+          _this.$message({
+            message: '删除失败!',
+            type: 'error'
+          })
+        })
+      }).catch(() => {
+      })
+    },
     /** 已连接服务点击事件 */
     eventByConnServer(conn) {
       this.chooseServerType = null
@@ -558,21 +599,46 @@ export default {
 
   li {
     padding: 5px;
-    cursor: pointer;
-  }
+    height: 30px;
 
-  li:hover {
-    background-color: #F5F7FA;
-  }
+    div {
+      float: left;
+      cursor: pointer;
+      width: calc(100% - 20px);
+      height: 30px;
+      display: flex;
+      align-items: center;
 
-  li.conn-is-active {
-    background-color: #F5F7FA;
-  }
+      span {
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        overflow: hidden;
+        width: calc(100% - 20px);
+      }
+    }
 
-  li .el-image {
-    width: 15px;
-    height: 15px;
-    margin-right: 5px;
+    div:hover {
+      background-color: #F5F7FA;
+    }
+
+    i {
+      float: right;
+      width: 15px;
+      cursor: pointer;
+      height: 30px;
+      display: flex;
+      align-items: center;
+    }
+
+    .conn-is-active {
+      background-color: #F5F7FA;
+    }
+
+    .el-image {
+      width: 15px;
+      height: 15px;
+      margin-right: 5px;
+    }
   }
 }
 </style>

+ 1 - 1
chuanyi_server/src/main/java/com/judong/chuanyiserver/controller/ItemGroupController.java

@@ -19,7 +19,7 @@ public class ItemGroupController {
     private ItemGroupService itemGroupService;
 
     @PostMapping("/addItemGroup")
-    public Result addItemGroup(ItemGroup itemGroup) {
+    public Result addItemGroup(@RequestBody ItemGroup itemGroup) {
         if (Blank.isEmpty(itemGroup, itemGroup.getGroupName())) {
             return Result.no(ResultEnum.REQUEST_WRONGPARAMS.getRespCode(), "组名称不能为空");
         }

+ 1 - 1
chuanyi_server/src/main/java/com/judong/chuanyiserver/dao/ItemGroupDao.java

@@ -11,7 +11,7 @@ public interface ItemGroupDao {
 
     ItemGroup getItemGroupByName(String userId, String groupName);
 
-    Integer addItemGroup(ItemGroup itemGroup);
+    ItemGroup addItemGroup(ItemGroup itemGroup);
 
     ItemGroup getItemGroupById(Integer id);