zhanghua
2022-12-15 6c56f35bef519265b4e7ae98fda6ca87855daf9f
Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server
7个文件已修改
43 ■■■■ 已修改文件
pom.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-common/src/main/java/com/ycl/controller/user/UmsRoleController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/resources/ImageResourcesController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/resources/VideoResourcesController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/entity/resources/VideoResources.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/vo/TrendVo.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/resources/mapper/trend/TrendAnalysisMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -169,8 +169,9 @@
            <version>${jaxb-api.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>javax.mail-api</artifactId>
            <groupId>com.sun.mail</groupId>
            <artifactId>javax.mail</artifactId>
            <version>1.6.2</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
ycl-common/src/main/java/com/ycl/controller/user/UmsRoleController.java
@@ -1,5 +1,6 @@
package com.ycl.controller.user;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ycl.annotation.LogSave;
import com.ycl.api.CommonPage;
@@ -73,6 +74,14 @@
        return CommonResult.success(roleList);
    }
    @ApiOperation("获取未被禁用角色")
    @RequestMapping(value = "/allow_list", method = RequestMethod.GET)
    @ResponseBody
    public CommonResult<List<UmsRole>> allowList() {
        List<UmsRole> roleList = roleService.list(new LambdaQueryWrapper<UmsRole>().eq(UmsRole::getStatus,1));
        return CommonResult.success(roleList);
    }
    @ApiOperation("根据角色名称分页获取角色列表")
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ResponseBody
ycl-platform/src/main/java/com/ycl/controller/resources/ImageResourcesController.java
@@ -3,12 +3,14 @@
import com.ycl.annotation.LogSave;
import com.ycl.api.CommonResult;
import com.ycl.bo.AdminUserDetails;
import com.ycl.controller.BaseController;
import com.ycl.entity.resources.ImageResources;
import com.ycl.service.resources.IImageResourcesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -29,6 +31,7 @@
    @Autowired
    IImageResourcesService iImageResourcesService;
    @GetMapping("/query")
    @ApiOperation("查询")
    @LogSave(operationType = "图片资源管理", contain = "查询图片")
@@ -42,28 +45,30 @@
    @PutMapping("modification")
    @ApiOperation("修改图片")
    @LogSave(operationType = "图片管理",contain = "修改图片")
    @LogSave(operationType = "图片管理", contain = "修改图片")
    public CommonResult modify(@RequestBody ImageResources imageResources) {
        return CommonResult.success(iImageResourcesService.updateById(imageResources));
    }
    @DeleteMapping("deletion")
    @ApiOperation("删除")
    @LogSave(operationType = "图片管理",contain = "删除图片")
    @LogSave(operationType = "图片管理", contain = "删除图片")
    public CommonResult delete(@RequestParam Integer id) {
        return CommonResult.success(iImageResourcesService.removeById(id));
    }
    @PostMapping("addition")
    @ApiOperation("添加")
    @LogSave(operationType = "图片管理",contain = "添加图片")
    @LogSave(operationType = "图片管理", contain = "添加图片")
    public CommonResult add(@RequestBody ImageResources imageResources) {
        AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        imageResources.setCreateUser(user.getUserId());
        return CommonResult.success(iImageResourcesService.save(imageResources));
    }
    @DeleteMapping("deletion_batch")
    @ApiOperation("批量删除")
    @LogSave(operationType = "图片管理",contain = "批量删除图片")
    @LogSave(operationType = "图片管理", contain = "批量删除图片")
    public CommonResult delete(@RequestParam List<Integer> ids) {
        return CommonResult.success(iImageResourcesService.removeBatchByIds(ids));
    }
ycl-platform/src/main/java/com/ycl/controller/resources/VideoResourcesController.java
@@ -3,12 +3,14 @@
import com.ycl.annotation.LogSave;
import com.ycl.api.CommonResult;
import com.ycl.bo.AdminUserDetails;
import com.ycl.controller.BaseController;
import com.ycl.entity.resources.VideoResources;
import com.ycl.service.resources.IVideoResourcesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -58,6 +60,8 @@
    @ApiOperation("添加")
    @LogSave(operationType = "视频管理", contain = "添加视频")
    public CommonResult add(@RequestBody VideoResources videoResources) {
        AdminUserDetails user = (AdminUserDetails) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
        videoResources.setCreateUser(user.getUserId());
        return CommonResult.success(iVideoResourcesService.save(videoResources));
    }
ycl-platform/src/main/java/com/ycl/entity/resources/VideoResources.java
@@ -53,7 +53,7 @@
     * 创建人
     */
    @TableField("create_user")
    private Integer createUser;
    private Long createUser;
    /**
     * 创建时间
ycl-platform/src/main/java/com/ycl/vo/TrendVo.java
@@ -26,4 +26,10 @@
    @ApiModelProperty(value = "报警地址")
    private String address;
    @ApiModelProperty(value = "经度")
    private String longitude;
    @ApiModelProperty(value = "纬度")
    private String latitude;
}
ycl-platform/src/main/resources/mapper/trend/TrendAnalysisMapper.xml
@@ -6,7 +6,9 @@
        SELECT
        t2.id,
        t2.NAME,
        count( 0 ) AS count
        count( 0 ) AS count,
        t2.longitude,
        t2.latitude
        FROM
        ums_violations t1
        LEFT JOIN ums_video_point t2 ON t2.id = t1.video_point_id