管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-02-04 0ff3a661acf8c36b5fe7bec4f00dea71cf5ed4a5
1
已修改2个文件
28 ■■■■ 文件已修改
src/main/java/com/lf/server/controller/all/PermsController.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/lf/server/controller/all/PermsController.java
@@ -5,11 +5,11 @@
import com.lf.server.entity.all.PermsAuthEntity;
import com.lf.server.entity.all.ResAuthEntity;
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.data.DirEntity;
import com.lf.server.entity.sys.LayerEntity;
import com.lf.server.entity.sys.MenuEntity;
import com.lf.server.entity.sys.UserEntity;
import com.lf.server.helper.StringHelper;
import com.lf.server.service.all.PermsService;
import com.lf.server.service.sys.LayerService;
import com.lf.server.service.sys.MenuService;
import com.lf.server.service.sys.TokenService;
import io.swagger.annotations.Api;
@@ -20,7 +20,6 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -39,6 +38,9 @@
    @Autowired
    MenuService menuService;
    @Autowired
    LayerService layerService;
    @SysLog()
    @ApiOperation(value = "查询当前用户的资源授权")
@@ -163,4 +165,22 @@
            return fail(ex.getMessage(), null);
        }
    }
    @SysLog()
    @ApiOperation(value = "查询所有图层")
    @GetMapping(value = "/selectLayers")
    public ResponseMsg<Object> selectLayers(HttpServletRequest req) {
        try {
            UserEntity ue = tokenService.getCurrentUser(req);
            if (ue == null) {
                return fail("用户未登录", null);
            }
            List<LayerEntity> list = layerService.selectAll();
            return success(list);
        } catch (Exception ex) {
            return fail(ex.getMessage(), null);
        }
    }
}
src/main/resources/application.yml
@@ -41,8 +41,8 @@
  datasource:
    name: prod
    # JDBC 基本配置 &currentSchema=public
    #url: jdbc:postgresql://192.168.20.205:5433/langfang?useAffectedRows=true
    url: jdbc:postgresql://127.0.0.1:5433/langfang?useAffectedRows=true
    #url: jdbc:postgresql://127.0.0.1:5433/langfang?useAffectedRows=true
    username : postgres
    #password: Postgres!_14_Lf
    password: postgres