管道基础大数据平台系统开发-【后端】-Server
12
13693261870
2022-11-21 07a68b8d93aa059968a9709f2c81e6625338032c
src/main/java/com/lf/server/controller/data/MetaController.java
@@ -1,10 +1,11 @@
package com.lf.server.controller.data;
import com.lf.server.aspect.SysLog;
import com.lf.server.annotation.SysLog;
import com.lf.server.controller.all.BaseController;
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.data.MetaEntity;
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.helper.WebHelper;
import com.lf.server.service.data.MetaService;
import com.lf.server.service.sys.TokenService;
import io.swagger.annotations.Api;
@@ -21,7 +22,7 @@
 * 元数据
 * @author WWW
 */
@Api(tags = "数据管理\\元数据管理")
@Api(tags = "数据管理\\元数据")
@RestController
@RequestMapping("/meta")
public class MetaController extends BaseController {
@@ -82,10 +83,12 @@
            if (pageSize < 1 || pageIndex < 1) {
                return fail("每页页数或分页数小于1", null);
            }
            int count = metaService.selectCount(name);
            if (count == 0) {
                return success(0, null);
            }
            List<MetaEntity> rs = metaService.selectByPage(name, pageSize, pageSize * (pageIndex - 1));
            return success(count, rs);
@@ -124,7 +127,7 @@
    }
    @SysLog()
    @ApiOperation(value = "添加数据")
    @ApiOperation(value = "插入一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "MetaEntity", paramType = "body")
    })
@@ -136,6 +139,7 @@
                entity.setCreateUser(ue.getId());
            }
            entity.setCreateTime(WebHelper.getCurrentTimestamp());
            int count = metaService.insert(entity);
            return success(count);
@@ -145,7 +149,7 @@
    }
    @SysLog()
    @ApiOperation(value = "批量添加")
    @ApiOperation(value = "插入多条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "MetaEntity", paramType = "body")
    })
@@ -168,7 +172,7 @@
    }
    @SysLog()
    @ApiOperation(value = "刪除数据")
    @ApiOperation(value = "删除一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "ID", dataType = "Integer", paramType = "query", example = "1")
    })
@@ -184,7 +188,7 @@
    }
    @SysLog()
    @ApiOperation(value = "批量删除")
    @ApiOperation(value = "删除多条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ids", value = "ID数组", dataType = "Integer", paramType = "query", example = "1,2")
    })
@@ -204,7 +208,7 @@
    }
    @SysLog()
    @ApiOperation(value = "修改数据")
    @ApiOperation(value = "更新一条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "entity", value = "实体类", dataType = "MetaEntity", paramType = "body")
    })
@@ -226,7 +230,7 @@
    }
    @SysLog()
    @ApiOperation(value = "批量修改")
    @ApiOperation(value = "更新多条")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "list", value = "实体类集合", dataType = "MetaEntity", paramType = "body")
    })