From 6c56f35bef519265b4e7ae98fda6ca87855daf9f Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期四, 15 十二月 2022 11:29:08 +0800 Subject: [PATCH] Merge branch 'master' of http://42.193.1.25:9521/r/sccg_server --- ycl-common/src/main/java/com/ycl/controller/user/UmsRoleController.java | 9 +++++++++ ycl-platform/src/main/java/com/ycl/controller/resources/ImageResourcesController.java | 13 +++++++++---- ycl-platform/src/main/java/com/ycl/entity/resources/VideoResources.java | 2 +- ycl-platform/src/main/java/com/ycl/controller/resources/VideoResourcesController.java | 4 ++++ ycl-platform/src/main/resources/mapper/trend/TrendAnalysisMapper.xml | 4 +++- pom.xml | 5 +++-- ycl-platform/src/main/java/com/ycl/vo/TrendVo.java | 6 ++++++ 7 files changed, 35 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 0b2982c..fbc6e74 100644 --- a/pom.xml +++ b/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> diff --git a/ycl-common/src/main/java/com/ycl/controller/user/UmsRoleController.java b/ycl-common/src/main/java/com/ycl/controller/user/UmsRoleController.java index fe60c3e..e06cd8e 100644 --- a/ycl-common/src/main/java/com/ycl/controller/user/UmsRoleController.java +++ b/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 diff --git a/ycl-platform/src/main/java/com/ycl/controller/resources/ImageResourcesController.java b/ycl-platform/src/main/java/com/ycl/controller/resources/ImageResourcesController.java index 596f523..e7c88b4 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/resources/ImageResourcesController.java +++ b/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)); } diff --git a/ycl-platform/src/main/java/com/ycl/controller/resources/VideoResourcesController.java b/ycl-platform/src/main/java/com/ycl/controller/resources/VideoResourcesController.java index 8fe358b..4f7feae 100644 --- a/ycl-platform/src/main/java/com/ycl/controller/resources/VideoResourcesController.java +++ b/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)); } diff --git a/ycl-platform/src/main/java/com/ycl/entity/resources/VideoResources.java b/ycl-platform/src/main/java/com/ycl/entity/resources/VideoResources.java index 7d95cc9..21cfd17 100644 --- a/ycl-platform/src/main/java/com/ycl/entity/resources/VideoResources.java +++ b/ycl-platform/src/main/java/com/ycl/entity/resources/VideoResources.java @@ -53,7 +53,7 @@ * 鍒涘缓浜� */ @TableField("create_user") - private Integer createUser; + private Long createUser; /** * 鍒涘缓鏃堕棿 diff --git a/ycl-platform/src/main/java/com/ycl/vo/TrendVo.java b/ycl-platform/src/main/java/com/ycl/vo/TrendVo.java index 44fa666..ba1c6ee 100644 --- a/ycl-platform/src/main/java/com/ycl/vo/TrendVo.java +++ b/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; + } diff --git a/ycl-platform/src/main/resources/mapper/trend/TrendAnalysisMapper.xml b/ycl-platform/src/main/resources/mapper/trend/TrendAnalysisMapper.xml index 2ff2fdf..8a74e7e 100644 --- a/ycl-platform/src/main/resources/mapper/trend/TrendAnalysisMapper.xml +++ b/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 -- Gitblit v1.8.0