Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wangliwen 2022-08-03 14:41:08 +08:00
commit 527266a9b5
25 changed files with 39 additions and 83 deletions

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.Booth;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,11 +1,9 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.BuildingRecords;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
@ -19,6 +17,6 @@ import java.util.Map;
*/
@Mapper
public interface BuildingRecordsMapper extends BaseDao<BuildingRecords> {
public void batchSave(@Param("list") List<Map> list);
void batchSave(@Param("list") List<Map> list);
}

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.BuildingSite;
import org.apache.ibatis.annotations.Mapper;

View File

@ -11,7 +11,6 @@ import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.security.core.parameters.P;
import java.util.List;
import java.util.Map;
@ -31,8 +30,6 @@ public interface CameraChannelMapper extends BaseDao<CameraChannel> {
@Select("select c.* from t_camera_channel c where channel_code in " +
"(select b.channel_code from t_channel_mtm_label b where b.label_code = #{labelCode}) ")
List<ChannelLabelDto> selectLabel(@Param("labelCode") String labelCode);
//@Update("update t_camera_channel set state = list")
void updateState(@Param("list") List list);
@Select("select * from t_label")
List<Label> selectAllLabel();

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.dto.ChengguanDto;
import io.renren.modules.monitor.entity.Camera;
@ -13,12 +12,6 @@ import java.util.List;
@Mapper
public interface CameraMapper extends BaseDao<Camera> {
@Select("SELECT tc.pic,tc.capture_time AS captureTime FROM t_project_mtm_camera pmc JOIN t_camera tc ON pmc.project_id = #{id} AND pmc.camera_id = tc.`code` AND tc.pic IS NOT NULL")
@Select("SELECT tc.pic,tc.capture_time AS captureTime FROM t_project_mtm_camera pmc JOIN t_camera tc ON pmc.project_id = #{id} AND pmc.camera_id = tc.code AND tc.pic IS NOT NULL")
List<Picture> selectPicByProjectId(String id);
@Select("SELECT tp.*,tc.* FROM t_project_mtm_camera pmc JOIN t_camera tc JOIN t_project tp ON pmc.camera_id = tc.`code` AND pmc.project_id = tp.id")
List<ChengguanDto> selectCamera();
@Select("SELECT code FROM t_camera")
List<String> selectCameraCodes();
}

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.CameraScenic;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.CaseCityLaw;
import org.apache.ibatis.annotations.Mapper;
@ -17,7 +16,6 @@ import java.util.Map;
*/
@Mapper
public interface CaseCityLawMapper extends BaseDao<CaseCityLaw> {
//public void batchSave(List<Map> list);
public void batchSave(List<Map> list);
public void singleSave(Map map);
void batchSave(List<Map> list);
void singleSave(Map map);
}

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.dto.ChannelPictureDto;
import io.renren.modules.monitor.entity.ChannelPicture;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.Event;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,7 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.PassengerFlow;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.Project;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.RoadData;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.Sanitation;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.SanitationTask;
import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.dto.ScenicCameraDto;
import io.renren.modules.monitor.entity.Camera;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.SedimentTrail;
import org.apache.ibatis.annotations.Mapper;

View File

@ -60,8 +60,8 @@ import java.util.stream.Collectors;
@RequestMapping("/resource")
@Api(tags = "资源表")
public class ResourceController {
private static Integer cpuNUm = Runtime.getRuntime().availableProcessors();
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm);
private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors();
private static final ExecutorService executor = Executors.newFixedThreadPool(CPUNUM);
@Value("${big_date.name}")
private String bigDateDeptName; // 大数据局名称
@ -175,7 +175,7 @@ public class ResourceController {
public Result<String> updateTest() {
CompletableFuture.runAsync(() -> {
List<Long> ids = jdbcTemplate.queryForList("SELECT id FROM tb_data_resource", Long.class);
ids.stream().forEach(id -> {
ids.forEach(id -> {
ResourceDTO data = resourceService.selectWithAttrs(id);
resourceService.update(data);
});

View File

@ -10,7 +10,6 @@ import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSource
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@ -37,7 +37,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new AliPayInterceptor()).addPathPatterns("/pay/alipay/**");
// registry.addInterceptor(identityInterceptor);
}
@Override

View File

@ -89,24 +89,13 @@ public class LoginController {
// @ApiImplicitParam(name = "captcha", value = "验证码", paramType = "query",required = true, dataType="String"),
@ApiImplicitParam(name = "uuid", value = "UUID", paramType = "query", required = true, dataType = "String"),
})
// public Result login(HttpServletRequest request, @RequestBody LoginDTO login) {
public Result login(HttpServletRequest request, HttpServletResponse response, @ApiIgnore @RequestParam Map<String, Object> params) throws Exception {
LoginDTO login = new LoginDTO();
login.setUsername(String.valueOf(params.get("username")));
String password = PasswordUtils.desEncrypt(String.valueOf(params.get("password")));
login.setPassword(password);
// login.setCaptcha(String.valueOf(params.get("captcha")));
login.setUuid(String.valueOf(params.get("uuid")));
//效验数据
// ValidatorUtils.validateEntity(login);
//验证码是否正确
// boolean flag = captchaService.validate(login.getUuid(), login.getCaptcha());
// if(!flag){
// return new Result().error(ErrorCode.CAPTCHA_ERROR);
// }
//用户信息
SysUserDTO user = sysUserService.getByUsername(login.getUsername());

View File

@ -71,7 +71,7 @@ public class CasSSOValidator implements SSOValidator {
String newQuery = stringBuilder.toString();
if (newQuery.endsWith("&")) newQuery = newQuery.substring(0, newQuery.length()-1);
return url.replace(StringUtils.isBlank(newQuery) ? "?"+query:query, newQuery);
return url.replace(StringUtils.isBlank(newQuery) ? "?" + query : query, newQuery);
} catch (MalformedURLException e) {
e.printStackTrace();

View File

@ -57,9 +57,6 @@ public class Oauth2Filter extends AuthenticatingFilter {
@Override
protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
// if(((HttpServletRequest) request).getMethod().equals(RequestMethod.OPTIONS.name())){
// return true;
// }
String currentToken = getRequestToken((HttpServletRequest) request);
if (StringUtils.isBlank(currentToken))
return false;
@ -106,7 +103,6 @@ public class Oauth2Filter extends AuthenticatingFilter {
private void send401Error(HttpServletResponse response, String msg) throws IOException {
response.setContentType("application/json;charset=utf-8");
response.setHeader("Access-Control-Allow-Credentials", "true");
// response.setHeader("Access-Control-Allow-Origin", "*");
response.setStatus(HttpStatus.SC_UNAUTHORIZED);
Result r = new Result().error(HttpStatus.SC_UNAUTHORIZED, msg);

View File

@ -11,7 +11,7 @@ import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.Serializable;
public class ShiroSessionManager extends DefaultWebSessionManager {
public class ShiroSessionManager extends DefaultWebSessionManager {
/**
* 这个是客户端请求给服务端带的header
*/

View File

@ -1,7 +1,7 @@
-- 涉及到的表tb_data_category
-- 注意更新时间
/*
20228210:32:13
20228310:58:06
*/
REPLACE INTO `tb_data_category` VALUES (1514138753379680257, '组件服务', NULL, NULL, 'false', NULL, 'false', 'false', '', 10, 0, 1067246875800000001, '2022-04-13 15:09:45', 1513437369940344833, '2022-07-12 16:16:11', NULL, NULL, NULL, NULL, NULL);
@ -123,7 +123,7 @@ REPLACE INTO `tb_data_category` VALUES (1529779058827653122, '应用场景一图
REPLACE INTO `tb_data_category` VALUES (1529779170127704065, '应用场景二图片', '组件服务', '1529027455640145922', 'true', 'image', 'false', 'false', '', 7, 0, 1516728698224427010, '2022-05-26 18:59:11', 1516728698224427010, '2022-05-26 18:59:11', NULL, NULL, NULL, NULL, NULL);
REPLACE INTO `tb_data_category` VALUES (1529795010596253697, '算法体验中心', '组件服务', '1514138753379680257', 'false', NULL, 'false', 'false', '', 8, 0, 1516728698224427010, '2022-05-26 20:02:07', 1516728698224427010, '2022-05-26 20:02:07', NULL, NULL, NULL, NULL, NULL);
REPLACE INTO `tb_data_category` VALUES (1529795422393020418, '图片文字识别', '组件服务', '1529795010596253697', 'true', 'image', 'false', 'false', '', 1, 0, 1516728698224427010, '2022-05-26 20:03:46', 1516728698224427010, '2022-05-26 20:03:46', NULL, NULL, NULL, NULL, NULL);
REPLACE INTO `tb_data_category` VALUES (1529795713490300929, '文本识别', '组件服务', '1529795010596253697', 'true', 'select', 'true', 'true', '1529028127496343554', 2, 0, 1516728698224427010, '2022-05-26 20:04:55', 1516728698224427010, '2022-05-26 20:04:55', NULL, NULL, NULL, NULL, NULL);
REPLACE INTO `tb_data_category` VALUES (1529795713490300929, '文本识别', '组件服务', '1529795010596253697', 'true', 'select', 'false', 'true', '1529028127496343554', 2, 0, 1516728698224427010, '2022-05-26 20:04:55', 1516728698224427010, '2022-05-26 20:04:55', NULL, NULL, NULL, NULL, NULL);
REPLACE INTO `tb_data_category` VALUES (1529804677682663425, '子系统', '应用资源', '1514164306501517314', 'false', NULL, 'false', 'false', '', 6, 0, 1516970523606630401, '2022-05-26 20:40:32', 1516970523606630401, '2022-05-26 20:40:32', NULL, NULL, NULL, NULL, NULL);
REPLACE INTO `tb_data_category` VALUES (1529804827373178882, '子系统数量', '应用资源', '1529804677682663425', 'true', 'input', 'false', 'false', '', 1, 0, 1516970523606630401, '2022-05-26 20:41:08', 1516970523606630401, '2022-05-26 20:41:08', NULL, NULL, NULL, NULL, NULL);
REPLACE INTO `tb_data_category` VALUES (1529804904594509826, '子系统一名称', '应用资源', '1529804677682663425', 'true', 'input', 'false', 'false', '', 2, 0, 1516970523606630401, '2022-05-26 20:41:26', 1516970523606630401, '2022-05-26 20:41:26', NULL, NULL, NULL, NULL, NULL);

View File

@ -1,35 +1,35 @@
DROP TABLE IF EXISTS `t_camera_channel_cache`;
CREATE TABLE `t_camera_channel_cache` (
`idt_camera_channel` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
`channel_code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`channel_id` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`channel_name` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '摄像头id',
`gps_x` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经度',
`gps_y` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '纬度',
`status` int(0) NULL DEFAULT NULL COMMENT '1在线0离线',
`parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织id',
`region_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`region_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`node_name` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`check_status` int(0) NULL DEFAULT 0,
PRIMARY KEY (`idt_camera_channel`, `channel_code`) USING BTREE,
INDEX `gps_x`(`gps_x`) USING BTREE,
INDEX `gps_y`(`gps_y`) USING BTREE,
INDEX `channel_code`(`channel_code`) USING BTREE
`idt_camera_channel` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
`channel_code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`channel_id` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`channel_name` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '摄像头id',
`gps_x` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经度',
`gps_y` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '纬度',
`status` int(0) NULL DEFAULT NULL COMMENT '1在线0离线',
`parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织id',
`region_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`region_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`node_name` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`check_status` int(0) NULL DEFAULT 0,
PRIMARY KEY (`idt_camera_channel`, `channel_code`) USING BTREE,
INDEX `gps_x`(`gps_x`) USING BTREE,
INDEX `gps_y`(`gps_y`) USING BTREE,
INDEX `channel_code`(`channel_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 134450 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通道表' ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `t_camera_organization_cache`;
CREATE TABLE `t_camera_organization_cache` (
`id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`parent_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sort` int(0) NULL DEFAULT NULL,
`subCount` int(0) NULL DEFAULT NULL,
`count` int(0) NULL DEFAULT 0 COMMENT '这个是统计该区域下的摄像头数据同步的次数,没太大作用',
`is_parent` int(0) NULL DEFAULT NULL COMMENT '是否有子节点',
`path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`is_root` int(0) NULL DEFAULT 0 COMMENT '是否是根节点',
`orgaid` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '作为主键',
`channelCount` int(0) NULL DEFAULT 0,
PRIMARY KEY (`orgaid`, `id`) USING BTREE
`id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`parent_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sort` int(0) NULL DEFAULT NULL,
`subCount` int(0) NULL DEFAULT NULL,
`count` int(0) NULL DEFAULT 0 COMMENT '这个是统计该区域下的摄像头数据同步的次数,没太大作用',
`is_parent` int(0) NULL DEFAULT NULL COMMENT '是否有子节点',
`path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`is_root` int(0) NULL DEFAULT 0 COMMENT '是否是根节点',
`orgaid` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '作为主键',
`channelCount` int(0) NULL DEFAULT 0,
PRIMARY KEY (`orgaid`, `id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8868 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;