iailab-module-data/iailab-module-data-biz/db/mysql/tenant.sql
@@ -116,7 +116,7 @@ `id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `tag_name` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '测点名称', `data_type` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '数据类型', `tag_id` int NOT NULL COMMENT '顺序号', `tag_id` int default NULL COMMENT '顺序号', `tag_desc` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci default NULL COMMENT '测点描述', `enabled` tinyint(1) DEFAULT NULL COMMENT '是否启用', `device` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '关联设备', @@ -200,13 +200,13 @@ `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编码', `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '名称', `url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'URL', `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '方法', `method` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '请求方法', `param` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '参数', `descp` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '描述', `status` int NULL DEFAULT NULL COMMENT '状态', `creator` VARCHAR(255) COMMENT '创建人' , `creator` VARCHAR(64) COMMENT '创建人' , `create_time` DATETIME COMMENT '创建时间' , `updater` VARCHAR(255) COMMENT '修改人' , `updater` VARCHAR(64) COMMENT '修改人' , `update_time` DATETIME COMMENT '修改时间' , PRIMARY KEY (`ID`) USING BTREE, UNIQUE KEY `uk_code` (`code`) USING BTREE @@ -214,14 +214,14 @@ CREATE TABLE `t_http_token` ( `id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, `api_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, `login_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, `client_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, `client_secret` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL, `username` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, `password` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, `token` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'token', `id` varchar(36) NOT NULL COMMENT 'ID', `api_id` varchar(36) NOT NULL COMMENT '接口ID', `login_url` varchar(200) DEFAULT NULL COMMENT '登录地址', `client_id` varchar(100) DEFAULT NULL COMMENT 'ClientId', `client_secret` varchar(100) DEFAULT NULL COMMENT 'ClientSecret', `username` varchar(50) DEFAULT NULL COMMENT '用户名', `password` varchar(50) DEFAULT NULL COMMENT '密码', `token` varchar(2000) DEFAULT NULL COMMENT 'token', `expire_time` datetime DEFAULT NULL COMMENT '过期时间', `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE, @@ -229,14 +229,16 @@ ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='接口Token'; CREATE TABLE `t_http_tag` ( `id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '查询号', `http_api_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'HTTP 接口代码', `tag_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '测点编码', `tag_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '测点名称', `id` varchar(36) NOT NULL COMMENT 'ID', `api_id` varchar(36) NOT NULL COMMENT '接口ID', `tag_name` varchar(64) NOT NULL COMMENT '标签名称', `data_type` varchar(16) NOT NULL COMMENT '数据类型', `enabled` tinyint(1) DEFAULT NULL COMMENT '是否启用', `tag_desc` varchar(64) DEFAULT NULL COMMENT '描述', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='接口Tag表'; ) ENGINE=InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT='接口Tag表'; -- 指标管理------------ CREATE TABLE t_ind_data_set( iailab-module-data/iailab-module-data-biz/pom.xml
@@ -202,9 +202,16 @@ <plugins> <!-- 打包 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>${spring.boot.version}</version> <executions> <execution> <goals> <goal>repackage</goal> <!-- 将引入的 jar 打入其中 --> </goals> </execution> </executions> </plugin> </plugins> </build> iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/collector/HttpCollectorForZxzk.java
文件已删除 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/controller/admin/HttpApiController.java
@@ -7,10 +7,12 @@ import com.iailab.module.data.channel.http.service.HttpApiService; import com.iailab.module.data.channel.http.vo.HttpApiPageReqVO; import com.iailab.module.data.channel.http.vo.HttpApiRespVO; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.validation.Valid; import java.util.Date; import java.util.List; import java.util.UUID; @@ -28,58 +30,45 @@ @Resource private HttpApiService httpApiService; @PreAuthorize("@ss.hasPermission('data:channel-http:query')") @GetMapping("page") public CommonResult<PageResult<HttpApiRespVO>> page(@Valid HttpApiPageReqVO reqVO) { PageResult<HttpApiEntity> page = httpApiService.queryPage(reqVO); return success(BeanUtils.toBean(page, HttpApiRespVO.class)); } @PreAuthorize("@ss.hasPermission('data:channel-http:query')") @GetMapping("list") public CommonResult<List<HttpApiEntity>> list() { List<HttpApiEntity> list = httpApiService.list(); return success(list); } /** * 根据id查询详情 * * @param id */ @PreAuthorize("@ss.hasPermission('data:channel-http:query')") @GetMapping("/info/{id}") public CommonResult<HttpApiEntity> info(@PathVariable("id") String id){ HttpApiEntity info= httpApiService.info(id); return success(info); } /** * 添加API * * @param httpApiEntity */ @PostMapping("/add") public CommonResult<Boolean> add(@RequestBody HttpApiEntity httpApiEntity){ String id = UUID.randomUUID().toString(); httpApiEntity.setId(id); @PreAuthorize("@ss.hasPermission('data:channel-http:create')") @PostMapping("/create") public CommonResult<Boolean> create(@RequestBody HttpApiEntity httpApiEntity){ httpApiEntity.setId(UUID.randomUUID().toString()); httpApiEntity.setCreateTime(new Date()); httpApiService.add(httpApiEntity); return success(true); } /** * 修改API * * @param httpApiEntity */ @PreAuthorize("@ss.hasPermission('data:channel-http:update')") @PutMapping("/update") public CommonResult<Boolean> update(@RequestBody HttpApiEntity httpApiEntity) { httpApiService.update(httpApiEntity); httpApiEntity.setUpdateTime(new Date()); return success(true); } /** * 删除API * * @param id * */ @PreAuthorize("@ss.hasPermission('data:channel-http:delete')") @DeleteMapping("/delete") public CommonResult<Boolean> delete(@RequestParam("id") String id) { httpApiService.delete(id); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/controller/admin/HttpTagController.java
@@ -7,10 +7,12 @@ import com.iailab.module.data.channel.http.service.HttpTagService; import com.iailab.module.data.channel.http.vo.HttpTagPageReqVO; import com.iailab.module.data.channel.http.vo.HttpTagRespVO; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.validation.Valid; import java.util.Date; import java.util.List; import java.util.UUID; @@ -23,44 +25,51 @@ * @createTime 2024年08月27日 */ @RestController @RequestMapping("/data/http/tag") @RequestMapping("/data/channel/http/tag") public class HttpTagController { @Resource private HttpTagService tagService; @PreAuthorize("@ss.hasPermission('data:channel-http:query')") @GetMapping("page") public CommonResult<PageResult<HttpTagRespVO>> page(@Valid HttpTagPageReqVO reqVO) { PageResult<HttpTagEntity> page = tagService.queryPage(reqVO); return success(BeanUtils.toBean(page, HttpTagRespVO.class)); } @PreAuthorize("@ss.hasPermission('data:channel-http:query')") @GetMapping("list") public CommonResult<List<HttpTagEntity>> list(){ List<HttpTagEntity> list = tagService.list(); return new CommonResult<List<HttpTagEntity>>().setData(list); } @PreAuthorize("@ss.hasPermission('data:channel-http:query')") @GetMapping("/info/{id}") public CommonResult<HttpTagEntity> info(@PathVariable("id") String id){ HttpTagEntity info= tagService.info(id); return success(info); } @PostMapping("/add") @PreAuthorize("@ss.hasPermission('data:channel-http:create')") @PostMapping("/create") public CommonResult<Boolean> add(@RequestBody HttpTagEntity httpTagEntity){ String id = UUID.randomUUID().toString(); httpTagEntity.setId(id); httpTagEntity.setId(UUID.randomUUID().toString()); httpTagEntity.setCreateTime(new Date()); tagService.add(httpTagEntity); return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-http:update')") @PutMapping("/update") public CommonResult<Boolean> update(@RequestBody HttpTagEntity httpTagEntity) { httpTagEntity.setUpdateTime(new Date()); tagService.update(httpTagEntity); return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-http:delete')") @DeleteMapping("/delete") public CommonResult<Boolean> delete(@RequestParam("id") String id) { tagService.delete(id); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/controller/admin/HttpTokenController.java
@@ -7,10 +7,12 @@ import com.iailab.module.data.channel.http.service.HttpTokenService; import com.iailab.module.data.channel.http.vo.HttpTokenPageReqVO; import com.iailab.module.data.channel.http.vo.HttpTokenRespVO; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.validation.Valid; import java.util.Date; import java.util.List; import java.util.UUID; @@ -22,52 +24,59 @@ * @createTime 2024年08月27日 */ @RestController @RequestMapping("/data/http/token") @RequestMapping("/data/channel/http/token") public class HttpTokenController { @Resource private HttpTokenService httpTokenService; @PreAuthorize("@ss.hasPermission('data:channel-http:query')") @GetMapping("page") public CommonResult<PageResult<HttpTokenRespVO>> page(@Valid HttpTokenPageReqVO reqVO) { PageResult<HttpTokenEntity> page = httpTokenService.queryPage(reqVO); return success(BeanUtils.toBean(page, HttpTokenRespVO.class)); } @PreAuthorize("@ss.hasPermission('data:channel-http:query')") @GetMapping("list") public CommonResult<List<HttpTokenEntity>> list(){ List<HttpTokenEntity> list = httpTokenService.list(); return new CommonResult<List<HttpTokenEntity>>().setData(list); } @PreAuthorize("@ss.hasPermission('data:channel-http:query')") @GetMapping("/info/{id}") public CommonResult<HttpTokenEntity> info(@PathVariable("id") String id){ HttpTokenEntity info= httpTokenService.info(id); return success(info); } @PostMapping("/add") public CommonResult<Boolean> add(@RequestBody HttpTokenEntity HttpTokenEntity){ String id = UUID.randomUUID().toString(); HttpTokenEntity.setId(id); @PreAuthorize("@ss.hasPermission('data:channel-http:create')") @PostMapping("/create") public CommonResult<Boolean> create(@RequestBody HttpTokenEntity HttpTokenEntity){ HttpTokenEntity.setId(UUID.randomUUID().toString()); HttpTokenEntity.setUpdateTime(new Date()); httpTokenService.add(HttpTokenEntity); return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-http:update')") @PutMapping("/update") public CommonResult<Boolean> update(@RequestBody HttpTokenEntity HttpTokenEntity) { httpTokenService.update(HttpTokenEntity); return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-http:delete')") @DeleteMapping("/delete") public CommonResult<Boolean> delete(@RequestParam("id") String id) { httpTokenService.delete(id); return success(true); } @GetMapping("/api-id/{apiId}") public CommonResult<HttpTokenEntity> apiId(@PathVariable("apiId") String apiId) { @PreAuthorize("@ss.hasPermission('data:channel-http:query')") @GetMapping("/api-id") public CommonResult<HttpTokenEntity> apiId(@RequestParam("apiId") String apiId) { HttpTokenEntity info = httpTokenService.getByApiId(apiId); return success(info); } iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/dao/HttpTagDao.java
@@ -13,8 +13,8 @@ public interface HttpTagDao extends BaseMapperX<HttpTagEntity> { default PageResult<HttpTagEntity> selectPage(HttpTagPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX<HttpTagEntity>() .likeIfPresent(HttpTagEntity::getTagType, reqVO.getTagType()) .likeIfPresent(HttpTagEntity::getTagCode, reqVO.getTagCode()) .likeIfPresent(HttpTagEntity::getTagName, reqVO.getTagType()) .likeIfPresent(HttpTagEntity::getTagName, reqVO.getTagCode()) .likeIfPresent(HttpTagEntity::getTagName, reqVO.getTagName()) .orderByDesc(HttpTagEntity::getCreateTime)); } iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/entity/EleLowTagEntity.java
文件已删除 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/entity/FxjyTagEntity.java
文件已删除 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/entity/HttpApiEntity.java
@@ -20,14 +20,59 @@ @Schema(description = "主键") @TableId(value = "id", type = IdType.INPUT) private String id; private String name; /** * 编码 */ private String code; /** * 名称 */ private String name; /** * URL */ private String url; /** * 请求方法 */ private String method; private String collectType; /** * 参数 */ private String param; /** * 描述 */ private String descp; /** * 状态 */ private Integer status; /** * 创建人 */ private String creator; /** * 创建时间 */ private Date createTime; /** * 修改人 */ private String updater; /** * 修改时间 */ private Date updateTime; } iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/entity/HttpTagEntity.java
@@ -27,26 +27,31 @@ private String id; /** * HTTP api code * 接口ID */ private String httpApiCode; private String apiId; /** * 测点类型 */ private String tagType; /** * 测点编码 */ private String tagCode; /** * 测点名称 * 标签名称 */ private String tagName; /** * 数据类型 */ private String dataType; /** * 标签描述 */ private String tagDesc; /** * 是否启用 */ private Boolean enabled; /** * 创建时间 */ private Date createTime; iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/entity/HttpTokenEntity.java
@@ -10,7 +10,7 @@ import java.util.Date; @Data @TableName("T_HTTP_TOKEN") @TableName("t_http_token") public class HttpTokenEntity implements Serializable { private static final long serialVersionUID = 1L; @@ -20,16 +20,49 @@ @Schema(description = "主键") @TableId(value = "id", type = IdType.INPUT) private String id; /** * 接口ID */ private String apiId; /** * 登录地址 */ private String loginUrl; /** * ClientId */ private String clientId; /** * ClientSecret */ private String clientSecret; /** * 用户名 */ private String username; /** * 密码 */ private String password; /** * token */ private String token; private String prvsetName; private String projectName; private String platform; /** * 过期时间 */ private Date expireTime; /** * 更新时间 */ private Date updateTime; } iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/entity/XSTTagEntity.java
文件已删除 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/service/HttpTokenService.java
@@ -21,7 +21,5 @@ HttpTokenEntity getByApiId(String apiId); void updateToken(String clientId); String queryToken(String clientId); } iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/service/impl/HttpTokenServiceImpl.java
@@ -65,32 +65,6 @@ return httpTokenDao.selectOne(wrapper); } @Override public void updateToken(String clientId) { Map<String, String> params = new HashMap<>(1); params.put("timeout", "30000"); HttpTokenEntity entity = httpTokenDao.selectOne(new QueryWrapper<HttpTokenEntity>().eq("client_id", clientId)); Map<String, String> dataJson = new HashMap<>(2); String url = entity.getLoginUrl(); String userName = entity.getUsername(); String password = entity.getPassword(); String prvsetName = entity.getPrvsetName(); String projectName = entity.getProjectName(); String platform = entity.getPlatform(); dataJson.put("username", userName); dataJson.put("password", password); dataJson.put("prvset_name", prvsetName); dataJson.put("project_name", projectName); dataJson.put("platform", platform); //查询token的请求 String responseStr = httpsRequest.doPostToken(url, params, JSONObject.toJSONString(dataJson), "utf-8"); //插入token和更新时间 entity.setToken(responseStr); entity.setUpdateTime(new Date()); httpTokenDao.update(entity, new QueryWrapper<HttpTokenEntity>().eq("client_id", clientId)); } @Override public String queryToken(String clientId) { return httpTokenDao.selectOne(new QueryWrapper<HttpTokenEntity>().eq("client_id", clientId)).getToken(); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/vo/HttpApiRespVO.java
@@ -21,36 +21,32 @@ @ExcelProperty("ID") private String id; @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("") private String name; @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("") @Schema(description = "编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("编码") private String code; @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("") @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("名称") private String name; @Schema(description = "URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("URL") private String url; @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("") @Schema(description = "请求方法", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("请求方法") private String method; @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("") private String collectType; @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("") @Schema(description = "参数", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("参数") private String param; @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("") @Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("描述") private String descp; @Schema(description = "", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("") @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("状态") private Integer status; @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/http/vo/HttpTagRespVO.java
@@ -21,22 +21,26 @@ @ExcelProperty("ID") private String id; @Schema(description = "api编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("api编码") private String httpApiCode; @Schema(description = "接口ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("接口ID") private String apiId; @Schema(description = "测点类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("测点类型") private String tagType; @Schema(description = "测点编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("测点编码") private String tagCode; @Schema(description = "测点名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("测点名称") @Schema(description = "标签名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("标签名称") private String tagName; @Schema(description = "数据类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("数据类型") private String dataType; @Schema(description = "标签描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("标签描述") private String tagDesc; @Schema(description = "是否启用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("是否启用") private Boolean enabled; @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @ExcelProperty("创建时间") private Date createTime; iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/controller/admin/ChannelKioDeviceController.java
@@ -10,6 +10,7 @@ import com.iailab.module.data.channel.kio.vo.KioDeviceRespVO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -32,12 +33,14 @@ @Resource private ChannelKioDeviceService channelKioDeviceService; @PreAuthorize("@ss.hasPermission('data:channel-kio:query')") @GetMapping("page") public CommonResult<PageResult<KioDeviceRespVO>> list(@Valid KioDevicePageReqVO reqVO) { PageResult<ChannelKioDeviceEntity> page = channelKioDeviceService.queryPage(reqVO); return success(BeanUtils.toBean(page, KioDeviceRespVO.class)); } @PreAuthorize("@ss.hasPermission('data:channel-kio:query')") @GetMapping("/info/{id}") @Operation(summary = "信息") public CommonResult<ChannelKioDeviceEntity> info(@PathVariable("id") String id) { @@ -45,8 +48,9 @@ return success(info); } @PreAuthorize("@ss.hasPermission('data:channel-kio:create')") @PostMapping("/add") public CommonResult<Boolean> add(@RequestBody ChannelKioDeviceEntity channelKioDeviceEntity) { public CommonResult<Boolean> create(@RequestBody ChannelKioDeviceEntity channelKioDeviceEntity) { String id = UUID.randomUUID().toString(); channelKioDeviceEntity.setId(id); channelKioDeviceEntity.setCreateTime(new Date()); @@ -54,6 +58,7 @@ return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-kio:update')") @PutMapping("/update") public CommonResult<Boolean> update(@RequestBody ChannelKioDeviceEntity channelKioDeviceEntity) { channelKioDeviceEntity.setUpdateTime(new Date()); @@ -61,6 +66,7 @@ return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-kio:delete')") @DeleteMapping("/delete") public CommonResult<Boolean> delete(@RequestParam("id") String id) { channelKioDeviceService.delete(id); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/kio/controller/admin/ChannelKioTagController.java
@@ -8,6 +8,7 @@ import com.iailab.module.data.channel.kio.vo.KioTagPageReqVO; import com.iailab.module.data.channel.kio.vo.KioTagRespVO; import io.swagger.v3.oas.annotations.Operation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -29,12 +30,14 @@ /** * 分页查询tag * */ @PreAuthorize("@ss.hasPermission('data:channel-kio:query')") @GetMapping("page") public CommonResult<PageResult<KioTagRespVO>> page(@Valid KioTagPageReqVO reqVO){ PageResult<ChannelKioTagEntity> page = channelKioTagService.queryPage(reqVO); return success(BeanUtils.toBean(page, KioTagRespVO.class)); } @PreAuthorize("@ss.hasPermission('data:channel-kio:query')") @GetMapping("/info/{id}") @Operation(summary = "信息") public CommonResult<ChannelKioTagEntity> info(@PathVariable("id") String id) { @@ -42,8 +45,9 @@ return success(info); } @PostMapping("/add") public CommonResult<Boolean> add(@RequestBody ChannelKioTagEntity channelKioTagEntity) { @PreAuthorize("@ss.hasPermission('data:channel-kio:create')") @PostMapping("/create") public CommonResult<Boolean> create(@RequestBody ChannelKioTagEntity channelKioTagEntity) { String id = UUID.randomUUID().toString(); channelKioTagEntity.setId(id); channelKioTagEntity.setCreateTime(new Date()); @@ -51,6 +55,7 @@ return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-kio:update')") @PutMapping("/update") public CommonResult<Boolean> update(@RequestBody ChannelKioTagEntity channelKioTagEntity) { channelKioTagEntity.setUpdateTime(new Date()); @@ -58,6 +63,7 @@ return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-kio:delete')") @DeleteMapping("/delete") public CommonResult<Boolean> delete(@RequestParam("id") String id) { channelKioTagService.delete(id); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/modbus/controller/admin/ChannelModbusDeviceController.java
@@ -10,6 +10,7 @@ import javax.annotation.Resource; import com.iailab.module.data.channel.modbus.vo.ModBusDeviceRespVO; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -34,6 +35,7 @@ * * @param reqVO */ @PreAuthorize("@ss.hasPermission('data:channel-modbus:query')") @GetMapping("/page") public CommonResult<PageResult<ModBusDeviceRespVO>> list(@Validated ModBusDevicePageReqVO reqVO) { PageResult<ChannelModBusDeviceEntity> page = channelModbusDeviceService.queryPage(reqVO); @@ -46,6 +48,7 @@ * * @param id */ @PreAuthorize("@ss.hasPermission('data:channel-modbus:query')") @GetMapping("/info/{id}") public CommonResult<ChannelModBusDeviceEntity> info(@PathVariable("id") String id) { ChannelModBusDeviceEntity info = channelModbusDeviceService.info(id); @@ -57,8 +60,9 @@ * * @param channelModBusDeviceEntity */ @PostMapping("/add") public CommonResult<Boolean> add(@RequestBody ChannelModBusDeviceEntity channelModBusDeviceEntity) { @PreAuthorize("@ss.hasPermission('data:channel-modbus:create')") @PostMapping("/create") public CommonResult<Boolean> create(@RequestBody ChannelModBusDeviceEntity channelModBusDeviceEntity) { String id = UUID.randomUUID().toString(); channelModBusDeviceEntity.setId(id); channelModbusDeviceService.add(channelModBusDeviceEntity); @@ -70,6 +74,7 @@ * * @param channelModBusDeviceEntity */ @PreAuthorize("@ss.hasPermission('data:channel-modbus:update')") @PutMapping("/update") public CommonResult<Boolean> update(@RequestBody ChannelModBusDeviceEntity channelModBusDeviceEntity) { channelModbusDeviceService.update(channelModBusDeviceEntity); @@ -81,6 +86,7 @@ * * @param id */ @PreAuthorize("@ss.hasPermission('data:channel-modbus:delete')") @DeleteMapping("/delete") public CommonResult<Boolean> delete(@RequestParam("id") String id) { channelModbusDeviceService.delete(id); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/modbus/controller/admin/ChannelModbusTagController.java
@@ -51,8 +51,8 @@ * * @param channelModBusTagEntity */ @PostMapping("/add") public CommonResult<Boolean> add(@RequestBody ChannelModBusTagEntity channelModBusTagEntity) { @PostMapping("/create") public CommonResult<Boolean> create(@RequestBody ChannelModBusTagEntity channelModBusTagEntity) { String id = UUID.randomUUID().toString(); channelModBusTagEntity.setId(id); channelModBusTagEntity.setCreateTime(new Date()); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/modbus/entity/ChannelModBusTagEntity.java
@@ -37,7 +37,7 @@ private String dataType; /** * 是否可以tag,如果为false,即使定义了但是runtime不会读取该数据 * 是否启用 */ private Boolean enabled; iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/controller/admin/ChannelOPCDADeviceController.java
@@ -8,6 +8,7 @@ import com.iailab.module.data.channel.opcda.vo.OpcDaDevicePageReqVO; import com.iailab.module.data.channel.opcda.vo.OpcDaDeviceRespVO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; @@ -28,20 +29,23 @@ @Autowired private ChannelOPCDADeviceService channelOPCDADeviceService; @PreAuthorize("@ss.hasPermission('data:channel-opcda:query')") @GetMapping("page") public CommonResult<PageResult<OpcDaDeviceRespVO>> list(@Valid OpcDaDevicePageReqVO reqVO) { PageResult<ChannelOPCDADeviceEntity> page = channelOPCDADeviceService.queryPage(reqVO); return success(BeanUtils.toBean(page, OpcDaDeviceRespVO.class)); } @PreAuthorize("@ss.hasPermission('data:channel-opcda:query')") @GetMapping("/info/{id}") public CommonResult<ChannelOPCDADeviceEntity> info(@PathVariable("id") String id) { ChannelOPCDADeviceEntity info = channelOPCDADeviceService.info(id); return success(info); } @PostMapping("/add") public CommonResult<Boolean> add(@RequestBody ChannelOPCDADeviceEntity channelOPCDADeviceEntity) { @PreAuthorize("@ss.hasPermission('data:channel-opcda:create')") @PostMapping("/create") public CommonResult<Boolean> create(@RequestBody ChannelOPCDADeviceEntity channelOPCDADeviceEntity) { String id = UUID.randomUUID().toString(); channelOPCDADeviceEntity.setId(id); channelOPCDADeviceEntity.setCreateTime(new Date()); @@ -49,6 +53,7 @@ return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-opcda:update')") @PutMapping("/update") public CommonResult<Boolean> update(@RequestBody ChannelOPCDADeviceEntity channelOPCDADeviceEntity) { channelOPCDADeviceEntity.setUpdateTime(new Date()); @@ -56,6 +61,7 @@ return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-opcda:delete')") @DeleteMapping("/delete") public CommonResult<Boolean> delete(@RequestParam("id") String id) { channelOPCDADeviceService.delete(id); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/controller/admin/ChannelOPCDATagController.java
@@ -9,6 +9,7 @@ import com.iailab.module.data.channel.opcda.vo.OpcDaTagRespVO; import com.iailab.module.data.common.exception.RRException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -29,21 +30,24 @@ public class ChannelOPCDATagController { @Autowired private ChannelOPCDATagService channelOPCDATagService; @PreAuthorize("@ss.hasPermission('data:channel-opcua:query')") @GetMapping("page") public CommonResult<PageResult<OpcDaTagRespVO>> list(@Valid OpcDaTagPageReqVO reqVO) { PageResult<ChannelOPCDATagEntity> page = channelOPCDATagService.queryPage(reqVO); return success(BeanUtils.toBean(page, OpcDaTagRespVO.class)); } @PreAuthorize("@ss.hasPermission('data:channel-opcua:query')") @GetMapping("/info/{id}") public CommonResult<ChannelOPCDATagEntity> info(@PathVariable("id") String id) { ChannelOPCDATagEntity info = channelOPCDATagService.info(id); return success(info); } @PostMapping("/add") public CommonResult<Boolean> add(@RequestBody ChannelOPCDATagEntity channelOPCDATagEntity) { @PreAuthorize("@ss.hasPermission('data:channel-opcua:create')") @PostMapping("/create") public CommonResult<Boolean> create(@RequestBody ChannelOPCDATagEntity channelOPCDATagEntity) { String id = UUID.randomUUID().toString(); channelOPCDATagEntity.setId(id); channelOPCDATagEntity.setCreateTime(new Date()); @@ -51,6 +55,7 @@ return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-opcua:update')") @PutMapping("/update") public CommonResult<Boolean> update(@RequestBody ChannelOPCDATagEntity channelOPCDATagEntity) { channelOPCDATagEntity.setUpdateTime(new Date()); @@ -58,11 +63,13 @@ return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-opcua:delete')") @DeleteMapping("/delete") public CommonResult<Boolean> delete(@RequestParam("id") String id) { channelOPCDATagService.delete(id); return success(true); } @PostMapping("/import/{serverId}") public CommonResult<String> importTag(@PathVariable("serverId") String serverId, @RequestParam("file") MultipartFile file) { try { iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcda/controller/package-info.java
对比新文件 @@ -0,0 +1 @@ package com.iailab.module.data.channel.opcda.controller; iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/controller/admin/ChannelOPCUADeviceController.java
@@ -7,6 +7,7 @@ import com.iailab.module.data.channel.opcua.service.ChannelOPCUADeviceService; import com.iailab.module.data.channel.opcua.vo.OpcUaDevicePageReqVO; import com.iailab.module.data.channel.opcua.vo.OpcUaDeviceRespVO; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -27,32 +28,37 @@ @Resource private ChannelOPCUADeviceService channelOPCUADeviceService; @PreAuthorize("@ss.hasPermission('data:channel-opcua:query')") @GetMapping("page") public CommonResult<PageResult<OpcUaDeviceRespVO>> list(@Valid OpcUaDevicePageReqVO reqVO) { PageResult<ChannelOPCUADeviceEntity> page = channelOPCUADeviceService.queryPage(reqVO); return success(BeanUtils.toBean(page, OpcUaDeviceRespVO.class)); } @PreAuthorize("@ss.hasPermission('data:channel-opcua:query')") @GetMapping("/info/{id}") public CommonResult<ChannelOPCUADeviceEntity> info(@PathVariable("id") String id) { ChannelOPCUADeviceEntity info = channelOPCUADeviceService.info(id); return success(info); } @PostMapping("/add") public CommonResult<Boolean> add(@RequestBody ChannelOPCUADeviceEntity channelOPCUADeviceEntity) { @PreAuthorize("@ss.hasPermission('data:channel-opcua:create')") @PostMapping("/create") public CommonResult<Boolean> create(@RequestBody ChannelOPCUADeviceEntity channelOPCUADeviceEntity) { String id = UUID.randomUUID().toString(); channelOPCUADeviceEntity.setId(id); channelOPCUADeviceService.add(channelOPCUADeviceEntity); return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-opcua:update')") @PutMapping("/update") public CommonResult<Boolean> update(@RequestBody ChannelOPCUADeviceEntity channelOPCUADeviceEntity) { channelOPCUADeviceService.update(channelOPCUADeviceEntity); return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-opcua:delete')") @DeleteMapping("/delete") public CommonResult<Boolean> delete(@RequestParam("id") String id) { channelOPCUADeviceService.delete(id); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/controller/admin/ChannelOPCUATagController.java
@@ -7,6 +7,7 @@ import com.iailab.module.data.channel.opcua.service.ChannelOPCUATagService; import com.iailab.module.data.channel.opcua.vo.OpcUaTagPageReqVO; import com.iailab.module.data.channel.opcua.vo.OpcUaTagRespVO; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -28,20 +29,23 @@ @Resource private ChannelOPCUATagService channelOpcuaTagService; @PreAuthorize("@ss.hasPermission('data:channel-opcua:query')") @GetMapping("page") public CommonResult<PageResult<OpcUaTagRespVO>> list(@Valid OpcUaTagPageReqVO reqVO) { PageResult<ChannelOPCUATagEntity> page = channelOpcuaTagService.queryPage(reqVO); return success(BeanUtils.toBean(page, OpcUaTagRespVO.class)); } @PreAuthorize("@ss.hasPermission('data:channel-opcua:query')") @GetMapping("/info/{id}") public CommonResult<ChannelOPCUATagEntity> info(@PathVariable("id") String id) { ChannelOPCUATagEntity info = channelOpcuaTagService.info(id); return success(info); } @PostMapping("/add") public CommonResult<Boolean> add(@RequestBody ChannelOPCUATagEntity channelOPCUATagEntity) { @PreAuthorize("@ss.hasPermission('data:channel-opcua:create')") @PostMapping("/create") public CommonResult<Boolean> create(@RequestBody ChannelOPCUATagEntity channelOPCUATagEntity) { String id = UUID.randomUUID().toString(); channelOPCUATagEntity.setId(id); channelOPCUATagEntity.setCreateTime(new Date()); @@ -49,6 +53,7 @@ return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-opcua:update')") @PutMapping("/update") public CommonResult<Boolean> update(@RequestBody ChannelOPCUATagEntity channelOPCUATagEntity) { channelOPCUATagEntity.setUpdateTime(new Date()); @@ -56,6 +61,7 @@ return success(true); } @PreAuthorize("@ss.hasPermission('data:channel-opcua:delete')") @DeleteMapping("/delete") public CommonResult<Boolean> delete(@RequestParam("id") String id) { channelOpcuaTagService.delete(id); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/opcua/entity/ChannelOPCUATagEntity.java
@@ -16,7 +16,7 @@ * @createTime 2023年05月8日 15:01:00 */ @Data @TableName("t_channel_opcda_tag") @TableName("t_channel_opcua_tag") public class ChannelOPCUATagEntity implements Serializable { private static final long serialVersionUID = 1L; @@ -46,7 +46,7 @@ private String device; /** * Modbus地址 00001 ~49999 * 地址 */ private String address; iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/channel/tag/controller/TagController.java
@@ -157,8 +157,8 @@ List<TagOptionDTO> op2 = new ArrayList<>(); tags.forEach(item1 -> { TagOptionDTO op3 = new TagOptionDTO(); op3.setValue(item1.getTagCode()); op3.setLabel(item1.getTagCode()); op3.setValue(item1.getTagName()); op3.setLabel(item1.getTagName()); op2.add(op3); }); op1.setChildren(op2); iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/PointCollector.java
@@ -7,7 +7,6 @@ import com.iailab.module.data.point.common.PointTypeEnum; import com.iailab.module.data.point.dto.DaPointDTO; import com.iailab.module.data.point.service.DaPointService; import com.iailab.module.data.channel.http.collector.HttpCollectorForZxzk; import com.iailab.module.data.influxdb.pojo.InfluxPointValuePOJO; import com.iailab.module.data.channel.modbus.collector.ModBusCollector; import com.iailab.module.data.channel.opcua.collector.OpcUaCollector; @@ -55,9 +54,6 @@ @Resource private OpcUaCollector opcUaCollector; @Resource private HttpCollectorForZxzk httpCollectorForZxzk; /** * 采集 iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/collection/handler/MeasureHandle.java
@@ -12,7 +12,6 @@ import com.iailab.module.data.point.common.PointDataTypeEnum; import com.iailab.module.data.point.dto.DaPointDTO; import com.iailab.module.data.point.service.DaPointService; import com.iailab.module.data.channel.http.collector.HttpCollectorForZxzk; import com.iailab.module.data.influxdb.pojo.InfluxPointValuePOJO; import lombok.extern.slf4j.Slf4j; import javax.annotation.Resource; @@ -50,9 +49,6 @@ @Autowired private OpcDACollector opcDACollector; @Resource private HttpCollectorForZxzk httpCollectorForZxzk; @Resource private DaPointService daPointService; @@ -95,10 +91,6 @@ } if (!CollectionUtils.isEmpty(kioTagIds)) { tagValues.putAll(kingIOCollector.getTagValues(kioTagIds)); } if (!CollectionUtils.isEmpty(httpTagZxzk)) { tagValues.putAll(httpCollectorForZxzk.getTagValues(httpTagZxzk)); } this.toCommonResult(collectTime, dtos, tagValues, dataMap, result); log.info("测量点处理结束"); @@ -175,9 +167,7 @@ } else if (DataSourceType.KIO.getCode().equals(item.getSourceType())) { value = kingIOCollector.getTagValue(item.getSourceId(), item.getTagNo()); } else if (DataSourceType.HTTP.getCode().equals(item.getSourceType())) { if (CommonConstant.HTTP_API_ZXZK_IH.equals(item.getSourceName())) { value = httpCollectorForZxzk.getTagValue(item.getSourceId(), item.getTagNo()); } } else { log.info("没有匹配的TagNo=" + item.getTagNo()); } iailab-module-data/iailab-module-data-biz/src/main/resources/application-test.yamlcopy from iailab-module-model/iailab-module-model-biz/src/main/resources/application-dev.yaml copy to iailab-module-data/iailab-module-data-biz/src/main/resources/application-test.yaml
文件从 iailab-module-model/iailab-module-model-biz/src/main/resources/application-dev.yaml 复制 @@ -38,7 +38,7 @@ primary: master datasource: master: url: jdbc:mysql://127.0.0.1:3306/iailab_expert_master?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true url: jdbc:mysql://172.16.8.100:3306/iailab_expert_master?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true username: root password: 123456 @@ -47,5 +47,14 @@ host: 127.0.0.1 # 地址 port: 6379 # 端口 database: 0 # 数据库索引 # password: 123456 # 密码,建议生产环境开启 password: 123456 # 密码,建议生产环境开启 influx-db: org: IAILab bucket: whs_data token: gxhXM4H1VOBv07kYXKWyPag_zJ8_oChP4ooZ3u-BkSae9LS8R1wWzJYlmUjL3Qe9t1hDU3DtoYD5HTgjWoTGOg== url: http://172.16.8.100:8086 iems: upload-dir: D:/DLUT/upload/ iailab-module-model/iailab-module-model-biz/pom.xml
@@ -58,11 +58,6 @@ <groupId>com.iailab</groupId> <artifactId>iailab-common-monitor</artifactId> </dependency> <!-- Job 定时任务相关 --> <dependency> <groupId>com.iailab</groupId> <artifactId>iailab-common-job</artifactId> </dependency> <dependency> <groupId>com.iailab</groupId> <artifactId>iailab-common-biz-data-permission</artifactId> @@ -188,23 +183,43 @@ <plugins> <!-- 打包 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>${spring.boot.version}</version> <executions> <execution> <goals> <goal>repackage</goal> <!-- 将引入的 jar 打入其中 --> </goals> </execution> </executions> </plugin> <!-- <plugin>--> <!-- <groupId>org.springframework.boot</groupId>--> <!-- <artifactId>spring-boot-maven-plugin</artifactId>--> <!-- <version>${spring.boot.version}</version>--> <!-- <executions>--> <!-- <execution>--> <!-- <goals>--> <!-- <goal>repackage</goal> <!– 将引入的 jar 打入其中 –>--> <!-- </goals>--> <!-- </execution>--> <!-- </executions>--> <!-- </plugin>--> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>flatten-maven-plugin</artifactId> <version>1.1.0</version> <configuration> <updatePomFile>true</updatePomFile> <flattenMode>resolveCiFriendliesOnly</flattenMode> </configuration> <executions> <execution> <id>flatten</id> <phase>process-resources</phase> <goals> <goal>flatten</goal> </goals> </execution> <execution> <id>flatten.clean</id> <phase>clean</phase> <goals> <goal>clean</goal> </goals> </execution> </executions> </plugin> </plugins> </build> iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/enums/CommonConstant.java
对比新文件 @@ -0,0 +1,18 @@ package com.iailab.module.model.common.enums; import java.math.BigDecimal; /** * @Description: 通用常量 */ public interface CommonConstant { int IS_ENABLE = 1; BigDecimal BAD_VALUE = new BigDecimal("-2"); BigDecimal ZERO_VALUE = new BigDecimal("0"); String HTTP_API_ZXZK_IH = "ZXZK_IH"; } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/enums/CommonDict.java
对比新文件 @@ -0,0 +1,13 @@ package com.iailab.module.model.common.enums; /** * @author PanZhibao * @Description * @createTime 2022年06月26日 12:12:00 */ public class CommonDict { public static final Integer ONE = 1; public static final Integer TOW = 2; } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/enums/DataSourceType.java
对比新文件 @@ -0,0 +1,35 @@ package com.iailab.module.model.common.enums; import lombok.AllArgsConstructor; import lombok.Getter; /** * @author PanZhibao * @Description * @createTime 2024年05月12日 */ @Getter @AllArgsConstructor public enum DataSourceType { OPCUA("OPCUA", "OPC UA"), OPCDA("OPCDA", "OPC DA"), ModBus("ModBus", "ModBus"), KIO("KIO", "KIO"), HTTP("HTTP", "HTTP"); private String code; private String desc; public static DataSourceType getEumByCode(String code) { if (code == null) { return null; } for (DataSourceType statusEnum : DataSourceType.values()) { if (statusEnum.getCode().equals(code)) { return statusEnum; } } return null; } } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/enums/DataTypeEnum.java
对比新文件 @@ -0,0 +1,22 @@ package com.iailab.module.model.common.enums; import lombok.AllArgsConstructor; import lombok.Getter; /** * @author PanZhibao * @Description * @createTime 2023年05月03日 19:10:00 */ @Getter @AllArgsConstructor public enum DataTypeEnum { INT("int"), FLOAT("float"), BOOLEAN("boolean"); private String code; } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/enums/DatabaseType.java
对比新文件 @@ -0,0 +1,9 @@ package com.iailab.module.model.common.enums; /** * @author PanZhibao * @date 2021年09月01日 15:06 */ public enum DatabaseType { DB2, MY_SQL, SQL_SERVER } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/enums/IsEnableEnum.java
对比新文件 @@ -0,0 +1,21 @@ package com.iailab.module.model.common.enums; /** * @author PanZhibao * @Description * @createTime 2023年07月17日 17:41:00 */ public enum IsEnableEnum { DISABLE(0), // 手动 ENABLE(1); //自动 private Integer value; IsEnableEnum(Integer value) { this.value = value; } public Integer value() { return this.value; } } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/enums/JsErrorCode.java
对比新文件 @@ -0,0 +1,10 @@ package com.iailab.module.model.common.enums; /** * @author PanZhibao * @Description * @createTime 2022年03月28日 17:46:00 */ public enum JsErrorCode { Infinity, NaN } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/enums/RequestMethodType.java
对比新文件 @@ -0,0 +1,18 @@ package com.iailab.module.model.common.enums; /** * @author PanZhibao * @date 2021年08月17日 11:28 */ public enum RequestMethodType { /** * GET */ GET, /** * POST */ POST } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/enums/RowAction.java
对比新文件 @@ -0,0 +1,15 @@ package com.iailab.module.model.common.enums; /** * @author PanZhibao * @Description * @createTime 2022年06月25日 10:48:00 */ public class RowAction { public static final String ADD = "add"; public static final String UPDATE = "update"; public static final String DELETE = "delete"; } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/enums/TagValueTypeConstant.java
对比新文件 @@ -0,0 +1,35 @@ package com.iailab.module.model.common.enums; /** * @author PanZhibao * @Description * @createTime 2023年04月25日 15:43:00 */ public class TagValueTypeConstant { public static final String QUALITY_GOOD = "Good"; public static final String BOOLEAN = "Boolean"; public static final String INT8 = "Int8"; public static final String INT16 = "Int16"; public static final String INT32 = "Int32"; public static final String INT64 = "Int64"; public static final String UINT8 = "UInt8"; public static final String UINT16 = "UInt16"; public static final String UINT32 = "UInt32"; public static final String UINT64 = "UInt64"; public static final String FLOAT = "Float"; public static final String DOUBLE = "Double"; public static final String STRING = "String"; } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/exception/RRException.java
对比新文件 @@ -0,0 +1,53 @@ package com.iailab.module.model.common.exception; /** * 自定义异常 * * @author Mark sunlightcs@gmail.com */ public class RRException extends RuntimeException { private static final long serialVersionUID = 1L; private String msg; private int code = 500; public RRException(String msg) { super(msg); this.msg = msg; } public RRException(String msg, Throwable e) { super(msg, e); this.msg = msg; } public RRException(String msg, int code) { super(msg); this.msg = msg; this.code = code; } public RRException(String msg, int code, Throwable e) { super(msg, e); this.msg = msg; this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public int getCode() { return code; } public void setCode(int code) { this.code = code; } } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/exception/RRExceptionHandler.java
对比新文件 @@ -0,0 +1,56 @@ package com.iailab.module.model.common.exception;//package com.iailab.module.data.common.exception; // //import com.iailab.module.data.common.utils.R; //import org.apache.shiro.authz.AuthorizationException; //import org.slf4j.Logger; //import org.slf4j.LoggerFactory; //import org.springframework.dao.DuplicateKeyException; //import org.springframework.web.bind.annotation.ExceptionHandler; //import org.springframework.web.bind.annotation.RestControllerAdvice; //import org.springframework.web.servlet.NoHandlerFoundException; // ///** // * 异常处理器 // * // * @author Mark sunlightcs@gmail.com // */ //@RestControllerAdvice //public class RRExceptionHandler { // private Logger logger = LoggerFactory.getLogger(getClass()); // // /** // * 处理自定义异常 // */ // @ExceptionHandler(RRException.class) // public R handleRRException(RRException e){ // R r = new R(); // r.put("code", e.getCode()); // r.put("msg", e.getMessage()); // // return r; // } // // @ExceptionHandler(NoHandlerFoundException.class) // public R handlerNoFoundException(Exception e) { // logger.error(e.getMessage(), e); // return R.error(404, "路径不存在,请检查路径是否正确"); // } // // @ExceptionHandler(DuplicateKeyException.class) // public R handleDuplicateKeyException(DuplicateKeyException e){ // logger.error(e.getMessage(), e); // return R.error("数据库中已存在该记录"); // } // // @ExceptionHandler(AuthorizationException.class) // public R handleAuthorizationException(AuthorizationException e){ // logger.error(e.getMessage(), e); // return R.error("没有权限,请联系管理员授权"); // } // // @ExceptionHandler(Exception.class) // public R handleException(Exception e){ // logger.error(e.getMessage(), e); // return R.error(); // } //} iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/interceptor/DataFilterInterceptor.java
对比新文件 @@ -0,0 +1,81 @@ package com.iailab.module.model.common.interceptor; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.toolkit.PluginUtils; import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor; import net.sf.jsqlparser.JSQLParserException; import net.sf.jsqlparser.expression.Expression; import net.sf.jsqlparser.expression.StringValue; import net.sf.jsqlparser.expression.operators.conditional.AndExpression; import net.sf.jsqlparser.parser.CCJSqlParserUtil; import net.sf.jsqlparser.statement.select.PlainSelect; import net.sf.jsqlparser.statement.select.Select; import org.apache.ibatis.executor.Executor; import org.apache.ibatis.mapping.BoundSql; import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.session.ResultHandler; import org.apache.ibatis.session.RowBounds; import java.util.Map; /** * 数据过滤 * * @author Mark sunlightcs@gmail.com */ public class DataFilterInterceptor implements InnerInterceptor { @Override public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) { DataScope scope = getDataScope(parameter); // 不进行数据过滤 if(scope == null || StrUtil.isBlank(scope.getSqlFilter())){ return; } // 拼接新SQL String buildSql = getSelect(boundSql.getSql(), scope); // 重写SQL PluginUtils.mpBoundSql(boundSql).sql(buildSql); } private DataScope getDataScope(Object parameter){ if (parameter == null){ return null; } // 判断参数里是否有DataScope对象 if (parameter instanceof Map) { Map<?, ?> parameterMap = (Map<?, ?>) parameter; for (Map.Entry entry : parameterMap.entrySet()) { if (entry.getValue() != null && entry.getValue() instanceof DataScope) { return (DataScope) entry.getValue(); } } } else if (parameter instanceof DataScope) { return (DataScope) parameter; } return null; } private String getSelect(String buildSql, DataScope scope){ try { Select select = (Select) CCJSqlParserUtil.parse(buildSql); PlainSelect plainSelect = (PlainSelect) select.getSelectBody(); Expression expression = plainSelect.getWhere(); if(expression == null){ plainSelect.setWhere(new StringValue(scope.getSqlFilter())); }else{ AndExpression andExpression = new AndExpression(expression, new StringValue(scope.getSqlFilter())); plainSelect.setWhere(andExpression); } return select.toString().replaceAll("'", ""); }catch (JSQLParserException e){ return buildSql; } } } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/interceptor/DataScope.java
对比新文件 @@ -0,0 +1,28 @@ package com.iailab.module.model.common.interceptor; /** * 数据范围 * * @author Mark sunlightcs@gmail.com * @since 1.0.0 */ public class DataScope { private String sqlFilter; public DataScope(String sqlFilter) { this.sqlFilter = sqlFilter; } public String getSqlFilter() { return sqlFilter; } public void setSqlFilter(String sqlFilter) { this.sqlFilter = sqlFilter; } @Override public String toString() { return this.sqlFilter; } } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/xss/HTMLFilter.java
对比新文件 @@ -0,0 +1,530 @@ package com.iailab.module.model.common.xss; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.logging.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * * HTML filtering utility for protecting against XSS (Cross Site Scripting). * * This code is licensed LGPLv3 * * This code is a Java port of the original work in PHP by Cal Hendersen. * http://code.iamcal.com/php/lib_filter/ * * The trickiest part of the translation was handling the differences in regex handling * between PHP and Java. These resources were helpful in the process: * * http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html * http://us2.php.net/manual/en/reference.pcre.pattern.modifiers.php * http://www.regular-expressions.info/modifiers.html * * A note on naming conventions: instance variables are prefixed with a "v"; global * constants are in all caps. * * Sample use: * String input = ... * String clean = new HTMLFilter().filter( input ); * * The class is not thread safe. Create a new instance if in doubt. * * If you find bugs or have suggestions on improvement (especially regarding * performance), please contact us. The latest version of this * source, and our contact details, can be found at http://xss-html-filter.sf.net * * @author Joseph O'Connell * @author Cal Hendersen * @author Michael Semb Wever */ public final class HTMLFilter { /** regex flag union representing /si modifiers in php **/ private static final int REGEX_FLAGS_SI = Pattern.CASE_INSENSITIVE | Pattern.DOTALL; private static final Pattern P_COMMENTS = Pattern.compile("<!--(.*?)-->", Pattern.DOTALL); private static final Pattern P_COMMENT = Pattern.compile("^!--(.*)--$", REGEX_FLAGS_SI); private static final Pattern P_TAGS = Pattern.compile("<(.*?)>", Pattern.DOTALL); private static final Pattern P_END_TAG = Pattern.compile("^/([a-z0-9]+)", REGEX_FLAGS_SI); private static final Pattern P_START_TAG = Pattern.compile("^([a-z0-9]+)(.*?)(/?)$", REGEX_FLAGS_SI); private static final Pattern P_QUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)=([\"'])(.*?)\\2", REGEX_FLAGS_SI); private static final Pattern P_UNQUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)(=)([^\"\\s']+)", REGEX_FLAGS_SI); private static final Pattern P_PROTOCOL = Pattern.compile("^([^:]+):", REGEX_FLAGS_SI); private static final Pattern P_ENTITY = Pattern.compile("&#(\\d+);?"); private static final Pattern P_ENTITY_UNICODE = Pattern.compile("&#x([0-9a-f]+);?"); private static final Pattern P_ENCODE = Pattern.compile("%([0-9a-f]{2});?"); private static final Pattern P_VALID_ENTITIES = Pattern.compile("&([^&;]*)(?=(;|&|$))"); private static final Pattern P_VALID_QUOTES = Pattern.compile("(>|^)([^<]+?)(<|$)", Pattern.DOTALL); private static final Pattern P_END_ARROW = Pattern.compile("^>"); private static final Pattern P_BODY_TO_END = Pattern.compile("<([^>]*?)(?=<|$)"); private static final Pattern P_XML_CONTENT = Pattern.compile("(^|>)([^<]*?)(?=>)"); private static final Pattern P_STRAY_LEFT_ARROW = Pattern.compile("<([^>]*?)(?=<|$)"); private static final Pattern P_STRAY_RIGHT_ARROW = Pattern.compile("(^|>)([^<]*?)(?=>)"); private static final Pattern P_AMP = Pattern.compile("&"); private static final Pattern P_QUOTE = Pattern.compile("<"); private static final Pattern P_LEFT_ARROW = Pattern.compile("<"); private static final Pattern P_RIGHT_ARROW = Pattern.compile(">"); private static final Pattern P_BOTH_ARROWS = Pattern.compile("<>"); // @xxx could grow large... maybe use sesat's ReferenceMap private static final ConcurrentMap<String,Pattern> P_REMOVE_PAIR_BLANKS = new ConcurrentHashMap<String, Pattern>(); private static final ConcurrentMap<String,Pattern> P_REMOVE_SELF_BLANKS = new ConcurrentHashMap<String, Pattern>(); /** set of allowed html elements, along with allowed attributes for each element **/ private final Map<String, List<String>> vAllowed; /** counts of open tags for each (allowable) html element **/ private final Map<String, Integer> vTagCounts = new HashMap<String, Integer>(); /** html elements which must always be self-closing (e.g. "<img />") **/ private final String[] vSelfClosingTags; /** html elements which must always have separate opening and closing tags (e.g. "<b></b>") **/ private final String[] vNeedClosingTags; /** set of disallowed html elements **/ private final String[] vDisallowed; /** attributes which should be checked for valid protocols **/ private final String[] vProtocolAtts; /** allowed protocols **/ private final String[] vAllowedProtocols; /** tags which should be removed if they contain no content (e.g. "<b></b>" or "<b />") **/ private final String[] vRemoveBlanks; /** entities allowed within html markup **/ private final String[] vAllowedEntities; /** flag determining whether comments are allowed in input String. */ private final boolean stripComment; private final boolean encodeQuotes; private boolean vDebug = false; /** * flag determining whether to try to make tags when presented with "unbalanced" * angle brackets (e.g. "<b text </b>" becomes "<b> text </b>"). If set to false, * unbalanced angle brackets will be html escaped. */ private final boolean alwaysMakeTags; /** Default constructor. * */ public HTMLFilter() { vAllowed = new HashMap<>(); final ArrayList<String> a_atts = new ArrayList<String>(); a_atts.add("href"); a_atts.add("target"); vAllowed.put("a", a_atts); final ArrayList<String> img_atts = new ArrayList<String>(); img_atts.add("src"); img_atts.add("width"); img_atts.add("height"); img_atts.add("alt"); vAllowed.put("img", img_atts); final ArrayList<String> no_atts = new ArrayList<String>(); vAllowed.put("b", no_atts); vAllowed.put("strong", no_atts); vAllowed.put("i", no_atts); vAllowed.put("em", no_atts); vSelfClosingTags = new String[]{"img"}; vNeedClosingTags = new String[]{"a", "b", "strong", "i", "em"}; vDisallowed = new String[]{}; vAllowedProtocols = new String[]{"http", "mailto", "https"}; // no ftp. vProtocolAtts = new String[]{"src", "href"}; vRemoveBlanks = new String[]{"a", "b", "strong", "i", "em"}; vAllowedEntities = new String[]{"amp", "gt", "lt", "quot"}; stripComment = true; encodeQuotes = true; alwaysMakeTags = true; } /** Set debug flag to true. Otherwise use default settings. See the default constructor. * * @param debug turn debug on with a true argument */ public HTMLFilter(final boolean debug) { this(); vDebug = debug; } /** Map-parameter configurable constructor. * * @param conf map containing configuration. keys match field names. */ public HTMLFilter(final Map<String,Object> conf) { assert conf.containsKey("vAllowed") : "configuration requires vAllowed"; assert conf.containsKey("vSelfClosingTags") : "configuration requires vSelfClosingTags"; assert conf.containsKey("vNeedClosingTags") : "configuration requires vNeedClosingTags"; assert conf.containsKey("vDisallowed") : "configuration requires vDisallowed"; assert conf.containsKey("vAllowedProtocols") : "configuration requires vAllowedProtocols"; assert conf.containsKey("vProtocolAtts") : "configuration requires vProtocolAtts"; assert conf.containsKey("vRemoveBlanks") : "configuration requires vRemoveBlanks"; assert conf.containsKey("vAllowedEntities") : "configuration requires vAllowedEntities"; vAllowed = Collections.unmodifiableMap((HashMap<String, List<String>>) conf.get("vAllowed")); vSelfClosingTags = (String[]) conf.get("vSelfClosingTags"); vNeedClosingTags = (String[]) conf.get("vNeedClosingTags"); vDisallowed = (String[]) conf.get("vDisallowed"); vAllowedProtocols = (String[]) conf.get("vAllowedProtocols"); vProtocolAtts = (String[]) conf.get("vProtocolAtts"); vRemoveBlanks = (String[]) conf.get("vRemoveBlanks"); vAllowedEntities = (String[]) conf.get("vAllowedEntities"); stripComment = conf.containsKey("stripComment") ? (Boolean) conf.get("stripComment") : true; encodeQuotes = conf.containsKey("encodeQuotes") ? (Boolean) conf.get("encodeQuotes") : true; alwaysMakeTags = conf.containsKey("alwaysMakeTags") ? (Boolean) conf.get("alwaysMakeTags") : true; } private void reset() { vTagCounts.clear(); } private void debug(final String msg) { if (vDebug) { Logger.getAnonymousLogger().info(msg); } } //--------------------------------------------------------------- // my versions of some PHP library functions public static String chr(final int decimal) { return String.valueOf((char) decimal); } public static String htmlSpecialChars(final String s) { String result = s; result = regexReplace(P_AMP, "&", result); result = regexReplace(P_QUOTE, """, result); result = regexReplace(P_LEFT_ARROW, "<", result); result = regexReplace(P_RIGHT_ARROW, ">", result); return result; } //--------------------------------------------------------------- /** * given a user submitted input String, filter out any invalid or restricted * html. * * @param input text (i.e. submitted by a user) than may contain html * @return "clean" version of input, with only valid, whitelisted html elements allowed */ public String filter(final String input) { reset(); String s = input; debug("************************************************"); debug(" INPUT: " + input); s = escapeComments(s); debug(" escapeComments: " + s); s = balanceHTML(s); debug(" balanceHTML: " + s); s = checkTags(s); debug(" checkTags: " + s); s = processRemoveBlanks(s); debug("processRemoveBlanks: " + s); s = validateEntities(s); debug(" validateEntites: " + s); debug("************************************************\n\n"); return s; } public boolean isAlwaysMakeTags(){ return alwaysMakeTags; } public boolean isStripComments(){ return stripComment; } private String escapeComments(final String s) { final Matcher m = P_COMMENTS.matcher(s); final StringBuffer buf = new StringBuffer(); if (m.find()) { final String match = m.group(1); //(.*?) m.appendReplacement(buf, Matcher.quoteReplacement("<!--" + htmlSpecialChars(match) + "-->")); } m.appendTail(buf); return buf.toString(); } private String balanceHTML(String s) { if (alwaysMakeTags) { // // try and form html // s = regexReplace(P_END_ARROW, "", s); s = regexReplace(P_BODY_TO_END, "<$1>", s); s = regexReplace(P_XML_CONTENT, "$1<$2", s); } else { // // escape stray brackets // s = regexReplace(P_STRAY_LEFT_ARROW, "<$1", s); s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2><", s); // // the last regexp causes '<>' entities to appear // (we need to do a lookahead assertion so that the last bracket can // be used in the next pass of the regexp) // s = regexReplace(P_BOTH_ARROWS, "", s); } return s; } private String checkTags(String s) { Matcher m = P_TAGS.matcher(s); final StringBuffer buf = new StringBuffer(); while (m.find()) { String replaceStr = m.group(1); replaceStr = processTag(replaceStr); m.appendReplacement(buf, Matcher.quoteReplacement(replaceStr)); } m.appendTail(buf); s = buf.toString(); // these get tallied in processTag // (remember to reset before subsequent calls to filter method) for (String key : vTagCounts.keySet()) { for (int ii = 0; ii < vTagCounts.get(key); ii++) { s += "</" + key + ">"; } } return s; } private String processRemoveBlanks(final String s) { String result = s; for (String tag : vRemoveBlanks) { if(!P_REMOVE_PAIR_BLANKS.containsKey(tag)){ P_REMOVE_PAIR_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?></" + tag + ">")); } result = regexReplace(P_REMOVE_PAIR_BLANKS.get(tag), "", result); if(!P_REMOVE_SELF_BLANKS.containsKey(tag)){ P_REMOVE_SELF_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?/>")); } result = regexReplace(P_REMOVE_SELF_BLANKS.get(tag), "", result); } return result; } private static String regexReplace(final Pattern regex_pattern, final String replacement, final String s) { Matcher m = regex_pattern.matcher(s); return m.replaceAll(replacement); } private String processTag(final String s) { // ending tags Matcher m = P_END_TAG.matcher(s); if (m.find()) { final String name = m.group(1).toLowerCase(); if (allowed(name)) { if (!inArray(name, vSelfClosingTags)) { if (vTagCounts.containsKey(name)) { vTagCounts.put(name, vTagCounts.get(name) - 1); return "</" + name + ">"; } } } } // starting tags m = P_START_TAG.matcher(s); if (m.find()) { final String name = m.group(1).toLowerCase(); final String body = m.group(2); String ending = m.group(3); //debug( "in a starting tag, name='" + name + "'; body='" + body + "'; ending='" + ending + "'" ); if (allowed(name)) { String params = ""; final Matcher m2 = P_QUOTED_ATTRIBUTES.matcher(body); final Matcher m3 = P_UNQUOTED_ATTRIBUTES.matcher(body); final List<String> paramNames = new ArrayList<String>(); final List<String> paramValues = new ArrayList<String>(); while (m2.find()) { paramNames.add(m2.group(1)); //([a-z0-9]+) paramValues.add(m2.group(3)); //(.*?) } while (m3.find()) { paramNames.add(m3.group(1)); //([a-z0-9]+) paramValues.add(m3.group(3)); //([^\"\\s']+) } String paramName, paramValue; for (int ii = 0; ii < paramNames.size(); ii++) { paramName = paramNames.get(ii).toLowerCase(); paramValue = paramValues.get(ii); // debug( "paramName='" + paramName + "'" ); // debug( "paramValue='" + paramValue + "'" ); // debug( "allowed? " + vAllowed.get( name ).contains( paramName ) ); if (allowedAttribute(name, paramName)) { if (inArray(paramName, vProtocolAtts)) { paramValue = processParamProtocol(paramValue); } params += " " + paramName + "=\"" + paramValue + "\""; } } if (inArray(name, vSelfClosingTags)) { ending = " /"; } if (inArray(name, vNeedClosingTags)) { ending = ""; } if (ending == null || ending.length() < 1) { if (vTagCounts.containsKey(name)) { vTagCounts.put(name, vTagCounts.get(name) + 1); } else { vTagCounts.put(name, 1); } } else { ending = " /"; } return "<" + name + params + ending + ">"; } else { return ""; } } // comments m = P_COMMENT.matcher(s); if (!stripComment && m.find()) { return "<" + m.group() + ">"; } return ""; } private String processParamProtocol(String s) { s = decodeEntities(s); final Matcher m = P_PROTOCOL.matcher(s); if (m.find()) { final String protocol = m.group(1); if (!inArray(protocol, vAllowedProtocols)) { // bad protocol, turn into local anchor link instead s = "#" + s.substring(protocol.length() + 1, s.length()); if (s.startsWith("#//")) { s = "#" + s.substring(3, s.length()); } } } return s; } private String decodeEntities(String s) { StringBuffer buf = new StringBuffer(); Matcher m = P_ENTITY.matcher(s); while (m.find()) { final String match = m.group(1); final int decimal = Integer.decode(match).intValue(); m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); } m.appendTail(buf); s = buf.toString(); buf = new StringBuffer(); m = P_ENTITY_UNICODE.matcher(s); while (m.find()) { final String match = m.group(1); final int decimal = Integer.valueOf(match, 16).intValue(); m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); } m.appendTail(buf); s = buf.toString(); buf = new StringBuffer(); m = P_ENCODE.matcher(s); while (m.find()) { final String match = m.group(1); final int decimal = Integer.valueOf(match, 16).intValue(); m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); } m.appendTail(buf); s = buf.toString(); s = validateEntities(s); return s; } private String validateEntities(final String s) { StringBuffer buf = new StringBuffer(); // validate entities throughout the string Matcher m = P_VALID_ENTITIES.matcher(s); while (m.find()) { final String one = m.group(1); //([^&;]*) final String two = m.group(2); //(?=(;|&|$)) m.appendReplacement(buf, Matcher.quoteReplacement(checkEntity(one, two))); } m.appendTail(buf); return encodeQuotes(buf.toString()); } private String encodeQuotes(final String s){ if(encodeQuotes){ StringBuffer buf = new StringBuffer(); Matcher m = P_VALID_QUOTES.matcher(s); while (m.find()) { final String one = m.group(1); //(>|^) final String two = m.group(2); //([^<]+?) final String three = m.group(3); //(<|$) m.appendReplacement(buf, Matcher.quoteReplacement(one + regexReplace(P_QUOTE, """, two) + three)); } m.appendTail(buf); return buf.toString(); }else{ return s; } } private String checkEntity(final String preamble, final String term) { return ";".equals(term) && isValidEntity(preamble) ? '&' + preamble : "&" + preamble; } private boolean isValidEntity(final String entity) { return inArray(entity, vAllowedEntities); } private static boolean inArray(final String s, final String[] array) { for (String item : array) { if (item != null && item.equals(s)) { return true; } } return false; } private boolean allowed(final String name) { return (vAllowed.isEmpty() || vAllowed.containsKey(name)) && !inArray(name, vDisallowed); } private boolean allowedAttribute(final String name, final String paramName) { return allowed(name) && (vAllowed.isEmpty() || vAllowed.get(name).contains(paramName)); } } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/xss/SQLFilter.java
对比新文件 @@ -0,0 +1,42 @@ package com.iailab.module.model.common.xss; import com.iailab.module.model.common.exception.RRException; import org.apache.commons.lang3.StringUtils; /** * SQL过滤 * * @author Mark sunlightcs@gmail.com */ public class SQLFilter { /** * SQL注入过滤 * @param str 待验证的字符串 */ public static String sqlInject(String str){ if(StringUtils.isBlank(str)){ return null; } //去掉'|"|;|\字符 str = StringUtils.replace(str, "'", ""); str = StringUtils.replace(str, "\"", ""); str = StringUtils.replace(str, ";", ""); str = StringUtils.replace(str, "\\", ""); //转换成小写 str = str.toLowerCase(); //非法字符 String[] keywords = {"master", "truncate", "insert", "select", "delete", "update", "declare", "alter", "drop"}; //判断是否包含非法字符 for(String keyword : keywords){ if(str.indexOf(keyword) != -1){ throw new RRException("包含非法字符"); } } return str; } } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/xss/XssFilter.java
对比新文件 @@ -0,0 +1,29 @@ package com.iailab.module.model.common.xss; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import java.io.IOException; /** * XSS过滤 * * @author Mark sunlightcs@gmail.com */ public class XssFilter implements Filter { @Override public void init(FilterConfig config) throws ServletException { } public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper( (HttpServletRequest) request); chain.doFilter(xssRequest, response); } @Override public void destroy() { } } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/common/xss/XssHttpServletRequestWrapper.java
对比新文件 @@ -0,0 +1,139 @@ package com.iailab.module.model.common.xss; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import javax.servlet.ReadListener; import javax.servlet.ServletInputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; /** * XSS过滤处理 * * @author Mark sunlightcs@gmail.com */ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper { //没被包装过的HttpServletRequest(特殊场景,需要自己过滤) HttpServletRequest orgRequest; //html过滤 private final static HTMLFilter htmlFilter = new HTMLFilter(); public XssHttpServletRequestWrapper(HttpServletRequest request) { super(request); orgRequest = request; } @Override public ServletInputStream getInputStream() throws IOException { //非json类型,直接返回 if(!MediaType.APPLICATION_JSON_VALUE.equalsIgnoreCase(super.getHeader(HttpHeaders.CONTENT_TYPE))){ return super.getInputStream(); } //为空,直接返回 String json = IOUtils.toString(super.getInputStream(), "utf-8"); if (StringUtils.isBlank(json)) { return super.getInputStream(); } //xss过滤 json = xssEncode(json); final ByteArrayInputStream bis = new ByteArrayInputStream(json.getBytes("utf-8")); return new ServletInputStream() { @Override public boolean isFinished() { return true; } @Override public boolean isReady() { return true; } @Override public void setReadListener(ReadListener readListener) { } @Override public int read() throws IOException { return bis.read(); } }; } @Override public String getParameter(String name) { String value = super.getParameter(xssEncode(name)); if (StringUtils.isNotBlank(value)) { value = xssEncode(value); } return value; } @Override public String[] getParameterValues(String name) { String[] parameters = super.getParameterValues(name); if (parameters == null || parameters.length == 0) { return null; } for (int i = 0; i < parameters.length; i++) { parameters[i] = xssEncode(parameters[i]); } return parameters; } @Override public Map<String,String[]> getParameterMap() { Map<String,String[]> map = new LinkedHashMap<>(); Map<String,String[]> parameters = super.getParameterMap(); for (String key : parameters.keySet()) { String[] values = parameters.get(key); for (int i = 0; i < values.length; i++) { values[i] = xssEncode(values[i]); } map.put(key, values); } return map; } @Override public String getHeader(String name) { String value = super.getHeader(xssEncode(name)); if (StringUtils.isNotBlank(value)) { value = xssEncode(value); } return value; } private String xssEncode(String input) { return htmlFilter.filter(input); } /** * 获取最原始的request */ public HttpServletRequest getOrgRequest() { return orgRequest; } /** * 获取最原始的request */ public static HttpServletRequest getOrgRequest(HttpServletRequest request) { if (request instanceof XssHttpServletRequestWrapper) { return ((XssHttpServletRequestWrapper) request).getOrgRequest(); } return request; } } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/framework/rpc/config/RpcConfiguration.java
@@ -2,10 +2,11 @@ import com.iailab.module.data.api.point.DataPointApi; import com.iailab.module.infra.api.config.ConfigApi; import com.iailab.module.system.api.tenant.TenantApi; import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.context.annotation.Configuration; @Configuration(proxyBeanMethods = false) @EnableFeignClients(clients = {DataPointApi.class,ConfigApi.class}) @EnableFeignClients(clients = {DataPointApi.class, ConfigApi.class, TenantApi.class}) public class RpcConfiguration { } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/vo/DmModuleRespVO.java
@@ -14,7 +14,7 @@ * @Description * @createTime 2024年08月29日 */ @Schema(description = "模型平台 - ModBusDevice Response VO") @Schema(description = "模型平台 - DmModule Response VO") @Data @ExcelIgnoreUnannotated public class DmModuleRespVO { iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/entity/StScheduleModelEntity.java
@@ -14,7 +14,7 @@ * @date 2021年07月19日 15:03 */ @Data @TableName("T_ST_SCHEDULE_MODEL") @TableName("t_st_schedule_model") public class StScheduleModelEntity extends BaseDO { private static final long serialVersionUID = 1L; iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/StScheduleModelService.java
@@ -12,7 +12,7 @@ * @author PanZhibao * @date 2021年07月20日 14:13 */ public interface StScheduleModelService extends BaseService<StScheduleModelEntity> { public interface StScheduleModelService { PageResult<StScheduleModelEntity> page(StScheduleModelPageReqVO reqVO); iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/sche/service/impl/StScheduleModelServiceImpl.java
@@ -1,8 +1,8 @@ package com.iailab.module.model.mcs.sche.service.impl; import com.baomidou.dynamic.datasource.annotation.DSTransactional; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.iailab.framework.common.pojo.PageResult; import com.iailab.framework.common.service.impl.BaseServiceImpl; import com.iailab.framework.common.util.object.BeanUtils; import com.iailab.module.model.mcs.sche.dao.StScheduleModelDao; import com.iailab.module.model.mcs.sche.entity.StScheduleModelEntity; @@ -16,6 +16,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.List; import java.util.UUID; @@ -24,7 +25,10 @@ * @date 2021年07月20日 14:23 */ @Service public class StScheduleModelServiceImpl extends BaseServiceImpl<StScheduleModelDao, StScheduleModelEntity> implements StScheduleModelService { public class StScheduleModelServiceImpl implements StScheduleModelService { @Resource private StScheduleModelDao stScheduleModelDao; @Autowired private StScheduleModelParamService stScheduleModelParamService; @@ -34,43 +38,43 @@ @Override public PageResult<StScheduleModelEntity> page(StScheduleModelPageReqVO reqVO) { return baseDao.selectPage(reqVO); return stScheduleModelDao.selectPage(reqVO); } @Override public List<StScheduleModelEntity> list() { return baseDao.selectList(null); return stScheduleModelDao.selectList(null); } @Override @Transactional(rollbackFor = Exception.class) @DSTransactional(rollbackFor = Exception.class) public void create(StScheduleModelSaveReqVO reqVO) { StScheduleModelEntity entity = BeanUtils.toBean(reqVO, StScheduleModelEntity.class); entity.setId(UUID.randomUUID().toString()); baseDao.insert(entity); stScheduleModelDao.insert(entity); stScheduleModelParamService.saveList(entity.getId(), reqVO.getParamList()); stScheduleModelSettingService.saveList(entity.getId(), reqVO.getSettingList()); } @Override @Transactional(rollbackFor = Exception.class) @DSTransactional(rollbackFor = Exception.class) public void update(StScheduleModelSaveReqVO reqVO) { StScheduleModelEntity entity = BeanUtils.toBean(reqVO, StScheduleModelEntity.class); baseDao.updateById(entity); stScheduleModelDao.updateById(entity); stScheduleModelParamService.saveList(entity.getId(), reqVO.getParamList()); stScheduleModelSettingService.saveList(entity.getId(), reqVO.getSettingList()); } @Override public StScheduleModelEntity get(String id) { return baseDao.selectById(id); return stScheduleModelDao.selectById(id); } @Override @Transactional(rollbackFor = Exception.class) @DSTransactional(rollbackFor = Exception.class) public void delete(String id) { baseDao.deleteById(id); stScheduleModelDao.deleteById(id); stScheduleModelParamService.deleteByModelId(id); stScheduleModelSettingService.deleteByModelId(id); } @@ -82,12 +86,12 @@ QueryWrapper<StScheduleModelEntity> scheduleModelWrapper = new QueryWrapper<>(); scheduleModelWrapper.ne(StringUtils.isNotBlank(id), "id", id); scheduleModelWrapper.and(wrapper -> wrapper.eq("model_name", modelname)); return baseDao.selectCount(scheduleModelWrapper); return stScheduleModelDao.selectCount(scheduleModelWrapper); } @Override public Long count() { QueryWrapper<StScheduleModelEntity> wrapper = new QueryWrapper<>(); return baseDao.selectCount(wrapper); return stScheduleModelDao.selectCount(wrapper); } } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/common/dto/MdkDataDTO.java
文件已删除 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/common/enums/ItemPredictStatus.java
@@ -1,10 +1,13 @@ package com.iailab.module.model.mdk.common.enums; import org.jetbrains.annotations.Contract; import lombok.AllArgsConstructor; import lombok.Getter; /** * 预测项的预测状态 */ @Getter @AllArgsConstructor public enum ItemPredictStatus { PREDICTING(1), @@ -15,13 +18,4 @@ private Integer value; @Contract(pure = true) ItemPredictStatus(Integer value) { this.value = value; } @Contract(pure = true) public Integer getValue() { return value; } } iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mdk/schedule/impl/ScheduleModelHandlerImpl.java
@@ -49,7 +49,7 @@ public ScheduleResultVO doSchedule(String schemeCode, Date scheduleTime) throws ModelInvokeException { ScheduleResultVO scheduleResult = new ScheduleResultVO(); StScheduleSchemeEntity scheduleScheme = stScheduleSchemeService.getByCode(schemeCode); StScheduleModelEntity scheduleModel = stScheduleModelService.selectById(scheduleScheme.getModelId()); StScheduleModelEntity scheduleModel = stScheduleModelService.get(scheduleScheme.getModelId()); if (scheduleModel == null) { throw new ModelInvokeException(MessageFormat.format("{0},modelId={1}", ModelInvokeException.errorGetModelEntity, scheduleModel.getId())); iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/MpkFileController.java
@@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.Operation; import org.apache.commons.io.IOUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -30,12 +31,14 @@ @GetMapping("page") @Operation(summary = "分页") @PreAuthorize("@ss.hasPermission('mpk:file:query')") public CommonResult<PageData<MpkFileDTO>> page(@RequestParam Map<String, Object> params) { PageData<MpkFileDTO> page = mpkFileService.page(params); return success(page); } @PreAuthorize("@ss.hasPermission('mpk:file:query')") @GetMapping("{id}") public CommonResult<MpkFileDTO> info(@PathVariable("id") String id) { MpkFileDTO schedule = mpkFileService.get(id); @@ -43,6 +46,7 @@ return success(schedule); } @PreAuthorize("@ss.hasPermission('mpk:file:query')") @GetMapping("list") public CommonResult<List<MpkFileDTO>> list() { List<MpkFileDTO> list = mpkFileService.list(new HashMap<>()); @@ -50,22 +54,25 @@ return success(list); } @PreAuthorize("@ss.hasPermission('mpk:file:create')") @PostMapping public CommonResult save(@RequestBody MpkFileDTO dto) { public CommonResult<Boolean> save(@RequestBody MpkFileDTO dto) { mpkFileService.save(dto); return CommonResult.success(); return CommonResult.success(true); } @PreAuthorize("@ss.hasPermission('mpk:file:delete')") @DeleteMapping public CommonResult delete(String id) { public CommonResult<Boolean> delete(String id) { mpkFileService.delete(id); return CommonResult.success(); return CommonResult.success(true); } @PreAuthorize("@ss.hasPermission('mpk:file:update')") @PutMapping public CommonResult update(@RequestBody MpkFileDTO dto) { public CommonResult<Boolean> update(@RequestBody MpkFileDTO dto) { mpkFileService.update(dto); return CommonResult.success(); return CommonResult.success(true); } @GetMapping("generat") iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/admin/ProjectController.java
@@ -7,6 +7,7 @@ import com.iailab.module.model.mpk.dto.ProjectPackageHistoryModelDTO; import com.iailab.module.model.mpk.service.ProjectService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import java.util.Date; @@ -28,6 +29,7 @@ @Autowired private ProjectService projectService; @PreAuthorize("@ss.hasPermission('mpk:project:query')") @GetMapping("page") public CommonResult<PageData<ProjectDTO>> page(@RequestParam Map<String, Object> params){ PageData<ProjectDTO> page = projectService.page(params); @@ -35,6 +37,7 @@ return success(page); } @PreAuthorize("@ss.hasPermission('mpk:project:query')") @GetMapping("list") public CommonResult<List<ProjectDTO>> list() { List<ProjectDTO> list = projectService.list(new HashMap<>()); @@ -42,6 +45,7 @@ return success(list); } @PreAuthorize("@ss.hasPermission('mpk:project:query')") @GetMapping("{id}") public CommonResult<ProjectDTO> get(@PathVariable("id") String id){ ProjectDTO data = projectService.get(id); @@ -49,27 +53,30 @@ return success(data); } @PreAuthorize("@ss.hasPermission('mpk:project:create')") @PostMapping public CommonResult save(@RequestBody ProjectDTO dto){ public CommonResult<Boolean> save(@RequestBody ProjectDTO dto){ projectService.save(dto); return CommonResult.success(); return CommonResult.success(true); } @PreAuthorize("@ss.hasPermission('mpk:project:update')") @PutMapping public CommonResult update(@RequestBody ProjectDTO dto){ public CommonResult<Boolean> update(@RequestBody ProjectDTO dto){ dto.setUpdateTime(new Date()); projectService.update(dto); return CommonResult.success(); return CommonResult.success(true); } @PreAuthorize("@ss.hasPermission('mpk:project:delete')") @DeleteMapping public CommonResult delete(String id){ public CommonResult<Boolean> delete(String id){ projectService.delete(id); return CommonResult.success(); return CommonResult.success(true); } @GetMapping("getProjectModel") iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/controller/package-info.java
对比新文件 @@ -0,0 +1 @@ package com.iailab.module.model.mpk.controller; iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/MpkFileServiceImpl.java
@@ -67,12 +67,12 @@ @Autowired private ConfigApi configApi; private String mpkBakFilePath; private String mpkBakFilePath = ""; @PostConstruct /*@PostConstruct public void init() { mpkBakFilePath = configApi.getConfigValueByKey("mpkBakFilePath").getCheckedData(); } }*/ @Override public PageData<MpkFileDTO> page(Map<String, Object> params) { iailab-module-model/iailab-module-model-biz/src/main/resources/application-dev.yml
文件已删除 iailab-module-model/iailab-module-model-biz/src/main/resources/application-dev_rec.yaml
文件名从 iailab-module-model/iailab-module-model-biz/src/main/resources/application-dev.yaml 修改 @@ -44,8 +44,8 @@ # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 redis: host: 127.0.0.1 # 地址 host: 172.16.8.100 # 地址 port: 6379 # 端口 database: 0 # 数据库索引 # password: 123456 # 密码,建议生产环境开启 password: 123456 # 密码,建议生产环境开启 iailab-module-model/iailab-module-model-biz/src/main/resources/application-local.yml
文件已删除 iailab-module-model/iailab-module-model-biz/src/main/resources/application-prod.yml
文件已删除 iailab-module-model/iailab-module-model-biz/src/main/resources/application-test.yml
文件已删除 iailab-module-model/iailab-module-model-biz/src/main/resources/application-uat.yml
文件已删除 iailab-module-model/iailab-module-model-biz/src/main/resources/application.yml
@@ -11,12 +11,12 @@ username: @nacos.username@ password: @nacos.password@ discovery: # 【配置中心】配置项 namespace: ${spring.profiles.active} namespace: test group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP metadata: version: @nacos.metadata.version@ # 服务实例的版本号,可用于灰度发布 config: # 【注册中心】配置项 namespace: ${spring.profiles.active} namespace: test group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP main: iailab-module-model/iailab-module-model-biz/src/main/resources/banner.txt
@@ -1,8 +1,8 @@ ,--. ,--.,--. ,--. ,--. ,--. ,--. ,--. `--' ,--,--.`--'| | ,--,--.| |-. ,-----.,--,--, ,-' '-.,-' '-.,-----.,--,--,--. ,---. ,-| | ,---. | | ,--.' ,-. |,--.| |' ,-. || .-. ''-----'| \'-. .-''-. .-''-----'| || .-. |' .-. || .-. :| | | |\ '-' || || |\ '-' || `-' | | || | | | | | | | | |' '-' '\ `-' |\ --.| | `--' `--`--'`--'`--' `--`--' `---' `--''--' `--' `--' `--`--`--' `---' `---' `----'`--' ,--. ,--.,--. ,--. ,--. ,--. `--' ,--,--.`--'| | ,--,--.| |-. ,-----.,--,--,--. ,---. ,-| | ,---. | | ,--.' ,-. |,--.| |' ,-. || .-. ''-----'| || .-. |' .-. || .-. :| | | |\ '-' || || |\ '-' || `-' | | | | |' '-' '\ `-' |\ --.| | `--' `--`--'`--'`--' `--`--' `---' `--`--`--' `---' `---' `----'`--' iailab-module-system/iailab-module-system-biz/db/增量SQL/202409.sql
对比新文件 @@ -0,0 +1,6 @@ alter table system_menu add column `app_id` int DEFAULT NULL; alter table system_menu add column `tenant_id` int DEFAULT NULL; alter table system_app add column `type` int DEFAULT NULL; alter table system_app add column `tenant_id` int DEFAULT NULL; alter table system_app add column `group_id` int DEFAULT NULL;