月球大数据地理空间分析展示平台-【后端】-月球后台服务
13693261870
2023-08-25 dfded458c5ee662a2dc4a51a6d0640e1a4f4a4bb
src/main/java/com/moon/server/controller/sys/LayerController.java
@@ -5,6 +5,7 @@
import com.moon.server.entity.all.ResponseMsg;
import com.moon.server.entity.sys.LayerEntity;
import com.moon.server.entity.sys.UserEntity;
import com.moon.server.service.all.PermsService;
import com.moon.server.service.sys.LayerService;
import com.moon.server.service.sys.TokenService;
import io.swagger.annotations.Api;
@@ -30,6 +31,9 @@
    @Autowired
    TokenService tokenService;
    @Autowired
    PermsService permsService;
    @SysLog()
    @ApiOperation(value = "分页查询并返回记录数")
@@ -61,9 +65,9 @@
    @SysLog()
    @ApiOperation(value = "查询所有")
    @GetMapping(value = "/selectAll")
    public ResponseMsg<List<LayerEntity>> selectAll() {
    public ResponseMsg<List<LayerEntity>> selectAll(Integer flag) {
        try {
            List<LayerEntity> list = layerService.selectAll();
            List<LayerEntity> list = layerService.selectAll(flag);
            return success(list);
        } catch (Exception ex) {
@@ -101,6 +105,9 @@
            }
            int count = layerService.insert(entity);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -124,6 +131,9 @@
            }
            int count = layerService.inserts(list);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -140,6 +150,9 @@
    public ResponseMsg<Integer> delete(int id) {
        try {
            int count = layerService.delete(id);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -160,6 +173,9 @@
            }
            int count = layerService.deletes(ids);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -182,6 +198,9 @@
            }
            int count = layerService.update(entity);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {
@@ -206,6 +225,9 @@
            }
            int count = layerService.updates(list);
            if (count > 0) {
                permsService.clearPermsCache();
            }
            return success(count);
        } catch (Exception ex) {