xiangpei
2024-08-16 0a1af1f220a6b47db08bc6d2e2b9660d08fe59ed
leftjoin
3个文件已修改
20 ■■■■ 已修改文件
ycl-server/src/main/java/com/ycl/platform/controller/DataCenterController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/DynamicColumnController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-server/src/main/java/com/ycl/platform/controller/DataCenterController.java
@@ -35,7 +35,7 @@
     */
    @GetMapping("/assetManagement")
    @ApiOperation(value = "资产管理", notes = "资产管理")
    @PreAuthorize("hasAuthority('assetManagement:page')")
    @PreAuthorize("@ss.hasPermi('assetManagement:page')")
    public Result assetManagement(DataCenterQuery query) {
        return monitorService.assetManagement(query);
    }
@@ -48,7 +48,7 @@
     */
    @GetMapping("/platformOnlineRate")
    @ApiOperation(value = "平台在线率", notes = "平台在线率")
    @PreAuthorize("hasAuthority('platformOnline:page')")
    @PreAuthorize("@ss.hasPermi('platformOnline:page')")
    public Result platformOnlineRate(DataCenterQuery query) {
        return platformOnlineService.page(query);
    }
ycl-server/src/main/java/com/ycl/platform/controller/DynamicColumnController.java
@@ -32,48 +32,48 @@
    @PostMapping
    @ApiOperation(value = "添加", notes = "添加")
    @PreAuthorize("hasAuthority('dynamicColumn:add')")
    @PreAuthorize("@ss.hasPermi('dynamicColumn:add')")
    public Result add(@RequestBody @Validated(Add.class) DynamicColumnForm form) {
        return dynamicColumnService.add(form);
    }
    @PutMapping
    @ApiOperation(value = "修改", notes = "修改")
    @PreAuthorize("hasAuthority('dynamicColumn:edit')")
    @PreAuthorize("@ss.hasPermi('dynamicColumn:edit')")
    public Result update(@RequestBody @Validated(Update.class) DynamicColumnForm form) {
        return dynamicColumnService.update(form);
    }
    @DeleteMapping("/{id}")
    @ApiOperation(value = "ID删除", notes = "ID删除")
    @PreAuthorize("hasAuthority('dynamicColumn:del')")
    @PreAuthorize("@ss.hasPermi('dynamicColumn:del')")
    public Result removeById(@PathVariable("id") String id) {
        return dynamicColumnService.removeById(id);
    }
    @DeleteMapping("/batch")
    @ApiOperation(value = "批量删除", notes = "批量删除")
    @PreAuthorize("hasAuthority('dynamicColumn:del:batch')")
    @PreAuthorize("@ss.hasPermi('dynamicColumn:del:batch')")
    public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) {
        return dynamicColumnService.remove(ids);
    }
    @GetMapping("/page")
    @ApiOperation(value = "分页", notes = "分页")
    @PreAuthorize("hasAuthority('dynamicColumn:page')")
    @PreAuthorize("@ss.hasPermi('dynamicColumn:page')")
    public Result page(DynamicColumnQuery query) {
        return dynamicColumnService.page(query);
    }
    @GetMapping("/{id}")
    @ApiOperation(value = "详情", notes = "详情")
    @PreAuthorize("hasAuthority('dynamicColumn:detail')")
    @PreAuthorize("@ss.hasPermi('dynamicColumn:detail')")
    public Result detail(@PathVariable("id") Integer id) {
        return dynamicColumnService.detail(id);
    }
    @GetMapping("/list")
    @PreAuthorize("hasAuthority('dynamicColumn:list')")
    @PreAuthorize("@ss.hasPermi('dynamicColumn:list')")
    @ApiOperation(value = "列表", notes = "列表")
    public Result list() {
        return dynamicColumnService.all();
ycl-server/src/main/resources/mapper/zgyw/YwPointMapper.xml
@@ -95,7 +95,7 @@
        FROM
        t_yw_point yp
        INNER JOIN t_monitor m ON yp.serial_number = m.serial_number
        INNER JOIN t_yw_unit yu ON yu.id = yp.unit_id
        LEFT JOIN t_yw_unit yu ON yu.id = yp.unit_id
        <where>
            <if test="query.pointName != null and query.pointName != ''">
                AND m.name like concat('%', #{query.pointName} ,'%')