From 0e8cf93ac019c88e8f7fe4de13d94ab0109bb596 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Wed, 7 Aug 2024 11:11:54 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=E9=9D=9E=E7=A9=BA=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java index 57b8824..19b1525 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java @@ -148,7 +148,7 @@ public class ImsAnalyseExampleServiceImpl extends ServiceImpl> head=new ArrayList<>(); List title = new ArrayList<>(Collections.singletonList("时间")); head.add(title); From 93c13d394caf29f48a3e1c321b07eb139510e671 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Wed, 7 Aug 2024 11:38:06 +0800 Subject: [PATCH 2/6] =?UTF-8?q?#=E6=97=A5=E5=BF=97=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspect/offline/service/impl/InspectOfflineServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java index 8accdf3..62d76e2 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java @@ -948,17 +948,17 @@ public class InspectOfflineServiceImpl implements IOfflineDataService { if (!file.exists()) { throw new RuntimeException("文件名称为:" + fileName + "不存在,上传失败!"); } - R r = null; + R r; try { r = putFile(file); if (!r.isSuccess()) { - throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错:" + r); + throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错" ); } BladeFile bladeFile = r.getData(); return bladeFile != null ? bladeFile.getLink() : null; } catch (Exception ex) { - throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错:" + r.toString(), ex); + throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错:", ex); } }).filter(StringUtils::isNotBlank).collect(Collectors.toList()); bo.setFiles(urls); From d232690c383f8368d72ceb5e0080f50b7a6e2b91 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Wed, 7 Aug 2024 13:35:23 +0800 Subject: [PATCH 3/6] =?UTF-8?q?#=E9=A3=8E=E9=99=A9=E8=AF=84=E4=BC=B0?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../safeproduct/hazard/controller/HazardLibraryController.java | 5 ++++- .../hnac/hzims/safeproduct/hazard/wrapper/HazardLibraryWrapper.java | 6 ++++-- .../hzims/safeproduct/risk/service/impl/EstimateServiceImpl.java | 2 ++ .../safeproduct/risk/service/impl/HazardCategoryServiceImpl.java | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/controller/HazardLibraryController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/controller/HazardLibraryController.java index c7cf1d9..1f5ef35 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/controller/HazardLibraryController.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/controller/HazardLibraryController.java @@ -1,6 +1,7 @@ package com.hnac.hzims.safeproduct.hazard.controller; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.safeproduct.hazard.dto.HazardLibraryDTO; @@ -40,7 +41,9 @@ public class HazardLibraryController extends BladeController { @ApiOperationSupport(order = 2) public R> list(HazardLibraryDTO req) { HazardLibraryEntity library = BeanUtil.copy(req, HazardLibraryEntity.class); - List list = hazardLibraryService.list(hazardLibraryService.getQueryWrapper(library)); + LambdaQueryWrapper queryWrapper = hazardLibraryService.getQueryWrapper(library); + queryWrapper.orderByDesc(HazardLibraryEntity::getCreateTime); + List list = hazardLibraryService.list(queryWrapper); return R.data(HazardLibraryWrapper.build().listVO(list)); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/wrapper/HazardLibraryWrapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/wrapper/HazardLibraryWrapper.java index 55799b4..13bbb90 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/wrapper/HazardLibraryWrapper.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/wrapper/HazardLibraryWrapper.java @@ -5,6 +5,9 @@ import com.hnac.hzims.safeproduct.hazard.vo.HazardLibraryVO; import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.utils.BeanUtil; +/** + * @author huangxing + */ public class HazardLibraryWrapper extends BaseEntityWrapper { public static HazardLibraryWrapper build() { @@ -13,7 +16,6 @@ public class HazardLibraryWrapper extends BaseEntityWrapper source.setCategoryId(entity.getId())).collect(Collectors.toList())); + return sourceService.saveOrUpdateBatch(entity.getSources().stream().peek(source-> source.setCategoryId(entity.getId())).collect(Collectors.toList())); } /** From 74f119bfdf2c39bf60972a86a0f97f9cbb42c9c7 Mon Sep 17 00:00:00 2001 From: ty <1577900710@qq.com> Date: Wed, 7 Aug 2024 14:09:37 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=E5=B7=A1=E6=A3=80?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=BB=9F=E8=AE=A1=E4=BF=9D=E7=95=99=E4=B8=A4?= =?UTF-8?q?=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java index 8ecc34d..3ee36ca 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java @@ -1192,7 +1192,8 @@ public class TaskServiceImpl extends ServiceImpl impleme if (CollectionUtil.isEmpty(list)||CollectionUtil.isEmpty(undoneIds)){ voteChartVo.setFinishRate(0.00d); }else { - BigDecimal divide = new BigDecimal(finishIds.size()).divide(new BigDecimal(list.size()),2, RoundingMode.HALF_UP).setScale(2,RoundingMode.HALF_UP); + BigDecimal divide = new BigDecimal(finishIds.size()).divide(new BigDecimal(list.size()),4, RoundingMode.HALF_UP) + .multiply(new BigDecimal(100)).setScale(2,RoundingMode.HALF_UP); voteChartVo.setFinishRate(divide.doubleValue()); } return voteChartVo; From e3313a099aefb9b9939b1be6353f6da6b4d4d8bf Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Wed, 7 Aug 2024 14:33:15 +0800 Subject: [PATCH 5/6] =?UTF-8?q?fix:=20=E5=90=88=E5=B9=B6master=E5=88=86?= =?UTF-8?q?=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/bigmodel/api/feign/IVideoSyncClient.java | 2 +- .../hzims/bigmodel/interactive/vo/DataItemVO.java | 4 +- .../control/DataSourceExecuteController.java | 33 ++++++ .../business/control/RemoteController.java | 34 +++++++ .../controller/DataSourceExecuteController.java | 33 ------ .../business/controller/RemoteController.java | 36 ------- .../hzims/bigmodel/business/feign/AuthClient.java | 2 +- .../business/service/DataSourceService.java | 9 +- .../business/service/HistoryDataService.java | 4 +- .../bigmodel/configuration/RedisKeyDeleter.java | 27 ----- .../controller/FontEndInteractiveController.java | 2 - .../controller/HznlmInteractiveController.java | 2 - .../interactive/factory/AnswerResolveFactory.java | 7 +- .../interactive/factory/ResolveFactory.java | 10 +- .../service/impl/CanvasResolveServiceImpl.java | 16 +-- .../service/impl/HznlmInvokeServiceImpl.java | 5 +- .../service/impl/VideoResolveServiceImpl.java | 14 +-- .../hzims/bigmodel/interactive/vo/AnswerVO.java | 2 +- .../controller/TableColumnController.java | 2 - .../controller/TableInfoController.java | 2 - .../maintenance/entity/DatasourceEntity.java | 6 +- .../question/service/QuestionHandlerService.java | 12 ++- .../schedule/FrontEndInteractiveSchedule.java | 13 +-- .../hzims/bigmodel/utils/RequestClientUtil.java | 15 +-- .../websocket/handler/InteractiveHandler.java | 113 --------------------- .../whitelist/controller/WhitelistController.java | 3 - .../src/main/resources/template/template.yml | 81 ++++++++------- 27 files changed, 170 insertions(+), 319 deletions(-) create mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/control/DataSourceExecuteController.java create mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/control/RemoteController.java delete mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/controller/DataSourceExecuteController.java delete mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/controller/RemoteController.java delete mode 100644 hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/RedisKeyDeleter.java diff --git a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/api/feign/IVideoSyncClient.java b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/api/feign/IVideoSyncClient.java index 2cd34d4..5af759e 100644 --- a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/api/feign/IVideoSyncClient.java +++ b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/api/feign/IVideoSyncClient.java @@ -28,6 +28,6 @@ public interface IVideoSyncClient extends ISyncClient { @Override @DeleteMapping(PREFIX_API + DELETE_BY_IDS) - R deleteByIds(@RequestParam(value = "ids") String ids); + R deleteByIds(@RequestParam String ids); } diff --git a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataItemVO.java b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataItemVO.java index d4e8d76..c0e20f9 100644 --- a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataItemVO.java +++ b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/DataItemVO.java @@ -14,7 +14,7 @@ public class DataItemVO implements Serializable { private String name; - @JSONField(name = "itemId") + @JSONField(name = "id") private String attrId; @JSONField(name = "record_name") @@ -32,7 +32,7 @@ public class DataItemVO implements Serializable { @JSONField(name = "station_name") private String projectName; - @JSONField(name = "record_id") + @JSONField(name = "item_id") private String signage; private String units; diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/control/DataSourceExecuteController.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/control/DataSourceExecuteController.java new file mode 100644 index 0000000..4efcf3b --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/control/DataSourceExecuteController.java @@ -0,0 +1,33 @@ +package com.hnac.hzims.bigmodel.business.control; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.bigmodel.business.service.DataSourceService; +import com.hnac.hzims.bigmodel.business.vo.SqlVO; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import java.util.List; +import java.util.Map; + +/** + * @Author: huangxing + * @Date: 2024/06/28 14:07 + */ +@RestController +@RequestMapping("/dataSource/execute") +@AllArgsConstructor +public class DataSourceExecuteController { + + private final DataSourceService dataSourceService; + + @PostMapping("/executeQuery") + @ApiOperation("执行大模型sql") + @ApiOperationSupport(order = 1) + public R>> executeQuery(@RequestBody @Valid SqlVO sqlVO) { + return R.data(dataSourceService.queryListOnSpecificDataSource(sqlVO)); + } + +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/control/RemoteController.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/control/RemoteController.java new file mode 100644 index 0000000..3b4422c --- /dev/null +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/control/RemoteController.java @@ -0,0 +1,34 @@ +package com.hnac.hzims.bigmodel.business.control; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.bigmodel.BigModelConstants; +import com.hnac.hzims.bigmodel.business.service.RemoteService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springblade.core.tool.api.R; +import org.springblade.system.dto.ControlDTO; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @Author: huangxing + * @Date: 2024/06/24 14:42 + */ +@AllArgsConstructor +@RequestMapping("/remote") +@RestController +@Api(value = "数据平台遥控指令管理",tags = "数据平台遥控指令管理") +public class RemoteController { + + private final RemoteService remoteService; + + @ApiOperation("下发遥控指令") + @ApiOperationSupport(order = 1) + @PostMapping("/sendRemoteControl") + public R sendRemoteControl(ControlDTO controlDTO) { + return remoteService.sendRemoteControl(controlDTO); + } + +} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/controller/DataSourceExecuteController.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/controller/DataSourceExecuteController.java deleted file mode 100644 index 47e7cc5..0000000 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/controller/DataSourceExecuteController.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.hnac.hzims.bigmodel.business.controller; - -import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import com.hnac.hzims.bigmodel.business.service.DataSourceService; -import com.hnac.hzims.bigmodel.business.vo.SqlVO; -import io.swagger.annotations.ApiOperation; -import lombok.AllArgsConstructor; -import org.springblade.core.tool.api.R; -import org.springframework.web.bind.annotation.*; - -import javax.validation.Valid; -import java.util.List; -import java.util.Map; - -/** - * @Author: huangxing - * @Date: 2024/06/28 14:07 - */ -@RestController -@RequestMapping("/dataSource/execute") -@AllArgsConstructor -public class DataSourceExecuteController { - - private final DataSourceService dataSourceService; - - @PostMapping("/executeQuery") - @ApiOperation("执行大模型sql") - @ApiOperationSupport(order = 1) - public R>> executeQuery(@RequestBody @Valid SqlVO sqlVO) { - return R.data(dataSourceService.queryListOnSpecificDataSource(sqlVO)); - } - -} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/controller/RemoteController.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/controller/RemoteController.java deleted file mode 100644 index f6629a4..0000000 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/controller/RemoteController.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.hnac.hzims.bigmodel.business.controller; - -import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import com.hnac.hzims.bigmodel.BigModelConstants; -import com.hnac.hzims.bigmodel.business.service.RemoteService; -import com.hnac.hzinfo.log.annotation.Business; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.AllArgsConstructor; -import org.springblade.core.tool.api.R; -import org.springblade.system.dto.ControlDTO; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @Author: huangxing - * @Date: 2024/06/24 14:42 - */ -@AllArgsConstructor -@RequestMapping("/remote") -@RestController -@Api(value = "数据平台遥控指令管理",tags = "数据平台遥控指令管理") -@Business(module = BigModelConstants.APP_NAME,value = "数据平台遥控指令管理") -public class RemoteController { - - private final RemoteService remoteService; - - @ApiOperation("下发遥控指令") - @ApiOperationSupport(order = 1) - @PostMapping("/sendRemoteControl") - public R sendRemoteControl(ControlDTO controlDTO) { - return remoteService.sendRemoteControl(controlDTO); - } - -} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/feign/AuthClient.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/feign/AuthClient.java index 08a3d85..3728591 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/feign/AuthClient.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/feign/AuthClient.java @@ -39,7 +39,7 @@ public class AuthClient implements IAuthClient { return R.fail("站点鉴权失败!"); } } - if("业务".equals(req.getType())) { + if("数据中心".equals(req.getType())) { } return R.success("鉴权成功"); diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/service/DataSourceService.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/service/DataSourceService.java index 5e305aa..bad2cb2 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/service/DataSourceService.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/service/DataSourceService.java @@ -7,6 +7,7 @@ import com.hnac.hzims.common.service.UserAuthDataService; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.tool.utils.StringUtil; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Service; import org.springframework.util.Assert; @@ -38,9 +39,11 @@ public class DataSourceService { }); String sql = sqlVO.getSql(); String userAuthDataSQL = userAuthDataService.getUserAuthDataSQL(Long.parseLong(sqlVO.getUserId())); - for (TableAuthVO tableAuthVO : sqlVO.getTableAuthVOList()) { - String tableSubStr = "(SELECT * FROM " + tableAuthVO.getTableName() + " where" + userAuthDataSQL +") temp"; - sql = sql.replace(tableAuthVO.getTableName(),tableSubStr); + if(StringUtil.isNotBlank(userAuthDataSQL)) { + for (TableAuthVO tableAuthVO : sqlVO.getTableAuthVOList()) { + String tableSubStr = "(SELECT * FROM " + tableAuthVO.getTableName() + " where" + userAuthDataSQL +") temp"; + sql = sql.replace(tableAuthVO.getTableName(),tableSubStr); + } } log.info("执行sql:{}",sql); return this.queryListOnSpecificDataSource(sql, sqlVO.getTableAuthVOList().get(0).getDatasourceName()); diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/service/HistoryDataService.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/service/HistoryDataService.java index 302dd08..cc7f5ca 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/service/HistoryDataService.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/business/service/HistoryDataService.java @@ -13,7 +13,6 @@ import com.hnac.hzinfo.sdk.v5.device.vo.ReductionDataVO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.log.exception.ServiceException; -//import org.springblade.core.log.logger.BladeLogger; import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.Func; import org.springframework.stereotype.Service; @@ -33,7 +32,6 @@ import java.time.temporal.ChronoUnit; public class HistoryDataService { private final DeviceDataClient deviceDataClient; - //private final BladeLogger logger; public static final int DATA_COUNT_MAX = 1000; public Result getPolymerizationData(HistoryDataSearchVO searchVO) { @@ -55,7 +53,7 @@ public class HistoryDataService { dataDTO.setSaveTimeType(dateEnum.getSaveTimeType()); dataDTO.setTimeInterval(1); dataDTO.setDtos(Lists.newArrayList(reductionAttrData)); - //logger.info("interactive:getPolymerizationData","config传参为:" + JSON.toJSONString(dataDTO)); + log.info("config传参为:{}", JSON.toJSONString(dataDTO)); return deviceDataClient.pageDeviceCodeAndSignages(dataDTO); } diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/RedisKeyDeleter.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/RedisKeyDeleter.java deleted file mode 100644 index f4dfd36..0000000 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/configuration/RedisKeyDeleter.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.hnac.hzims.bigmodel.configuration; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.CommandLineRunner; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.stereotype.Component; - -import static com.hnac.hzims.bigmodel.schedule.XxlJobHandlerConstant.HZIMS_BIGMODEL_ASK_KEY; - -/** - * @Author: huangxing - * @Date: 2024/07/12 09:23 - */ -@Component -@Slf4j -public class RedisKeyDeleter implements CommandLineRunner { - @Autowired - private RedisTemplate redisTemplate; - - @Override - public void run(String... args) throws Exception { - // 删除指定的Redis key - redisTemplate.delete(HZIMS_BIGMODEL_ASK_KEY); - log.info("服务重启删除问题reids缓存:{}",HZIMS_BIGMODEL_ASK_KEY); - } -} diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/controller/FontEndInteractiveController.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/controller/FontEndInteractiveController.java index ac3789b..21b05f4 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/controller/FontEndInteractiveController.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/controller/FontEndInteractiveController.java @@ -5,7 +5,6 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.google.common.collect.Lists; import com.hnac.hzims.bigmodel.BigModelConstants; import com.hnac.hzims.bigmodel.interactive.service.IHznlmInvokeService; -import com.hnac.hzinfo.log.annotation.Business; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -27,7 +26,6 @@ import java.util.List; @RequestMapping("/fontEnd/interactive") @Api(value = "前端交互控制层",tags = "前端交互控制层") @AllArgsConstructor -@Business(module = BigModelConstants.APP_NAME,value = "前端交互层管理",ignore = false) public class FontEndInteractiveController { private final IHznlmInvokeService hznlmInvokeService; diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/controller/HznlmInteractiveController.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/controller/HznlmInteractiveController.java index eafdc47..4f5dccc 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/controller/HznlmInteractiveController.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/controller/HznlmInteractiveController.java @@ -10,7 +10,6 @@ import com.hnac.hzims.bigmodel.interactive.req.ModelFunctionReq; import com.hnac.hzims.bigmodel.interactive.service.IHznlmInteractiveService; import com.hnac.hzims.bigmodel.interactive.vo.AuthDataVO; import com.hnac.hzims.bigmodel.interactive.vo.ExtraVO; -import com.hnac.hzinfo.log.annotation.Business; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; @@ -29,7 +28,6 @@ import java.util.Map; @AllArgsConstructor @Api(value = "HZLLM大模型交互层",tags = "HZLLM大模型交互层") @RequestMapping("/hzn_lm/interactive") -@Business(module = BigModelConstants.MODULE_NAME,value = "HZLLM大模型交互层") public class HznlmInteractiveController { private final IHznlmInteractiveService interactiveService; diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/factory/AnswerResolveFactory.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/factory/AnswerResolveFactory.java index 666b41b..9d79754 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/factory/AnswerResolveFactory.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/factory/AnswerResolveFactory.java @@ -4,10 +4,9 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum; import com.hnac.hzims.bigmodel.interactive.service.IAnswerResolveService; -import com.hnac.hzims.bigmodel.interactive.service.IResolveService; -import com.hnac.hzims.bigmodel.interactive.vo.AnswerVO; +import com.hnac.hzinfo.exception.HzServiceException; import org.springblade.core.log.exception.ServiceException; -//import org.springblade.core.log.logger.BladeLogger; +import org.springblade.core.tool.api.ResultCode; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.SpringUtil; @@ -49,7 +48,7 @@ public class AnswerResolveFactory { return null; } } - throw new ServiceException("service解析失败!"); + throw new HzServiceException(ResultCode.DEFAULT_NULL_MESSAGE,"service解析失败!"); } } diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/factory/ResolveFactory.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/factory/ResolveFactory.java index df3f0c2..897fb21 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/factory/ResolveFactory.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/factory/ResolveFactory.java @@ -2,8 +2,10 @@ package com.hnac.hzims.bigmodel.interactive.factory; import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum; import com.hnac.hzims.bigmodel.interactive.service.IResolveService; +import com.hnac.hzinfo.exception.HzServiceException; +import lombok.extern.slf4j.Slf4j; import org.springblade.core.log.exception.ServiceException; -//import org.springblade.core.log.logger.BladeLogger; +import org.springblade.core.tool.api.ResultCode; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.SpringUtil; @@ -11,6 +13,7 @@ import org.springblade.core.tool.utils.SpringUtil; * @Author: huangxing * @Date: 2024/06/21 15:53 */ +@Slf4j public class ResolveFactory { public static final String CANVAS_RESOLVE_SERVICE = "canvasResolveService"; @@ -22,7 +25,6 @@ public class ResolveFactory { * @return 解析函数所需service */ public static IResolveService getResolveService(String funcCode) { -// BladeLogger logger = SpringUtil.getBean(BladeLogger.class); FuncRouteEnum funcRouteEnum = FuncRouteEnum.getEnumByFuncCode(funcCode); if(Func.isNotEmpty(funcRouteEnum)) { switch(funcRouteEnum) { @@ -31,8 +33,8 @@ public class ResolveFactory { case OPEN_VIDEO: return SpringUtil.getBean("videoResolveService"); default: -// logger.error("hzims:bigModel:getResolveService","函数解析失败,函数编号为:" + funcCode); - throw new ServiceException("service解析失败"); + log.error("函数解析失败,函数编号为:{}", funcCode); + throw new HzServiceException(ResultCode.FAILURE,"service解析失败"); } } throw new ServiceException("service解析失败"); diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/CanvasResolveServiceImpl.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/CanvasResolveServiceImpl.java index ff1bc5a..4cd0717 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/CanvasResolveServiceImpl.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/CanvasResolveServiceImpl.java @@ -1,16 +1,18 @@ package com.hnac.hzims.bigmodel.interactive.service.impl; +import com.alibaba.fastjson.JSON; import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum; import com.hnac.hzims.bigmodel.interactive.constants.ParamKeyConstants; +import com.hnac.hzims.bigmodel.interactive.factory.ResolveFactory; import com.hnac.hzims.bigmodel.interactive.req.ModelFunctionReq; import com.hnac.hzims.bigmodel.interactive.service.IResolveService; import com.hnac.hzims.bigmodel.interactive.vo.ExtraVO; import com.hnac.hzims.operational.station.entity.StationEntity; import com.hnac.hzims.operational.station.feign.IStationClient; -import groovy.util.logging.Slf4j; +import com.hnac.hzinfo.exception.HzServiceException; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springblade.core.log.exception.ServiceException; -// import org.springblade.core.log.logger.BladeLogger; import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.ResultCode; import org.springblade.core.tool.utils.Func; @@ -18,7 +20,6 @@ import org.springblade.core.tool.utils.StringUtil; import org.springblade.system.cache.ParamCache; import org.springframework.stereotype.Service; import org.springframework.util.Assert; -import com.hnac.hzims.bigmodel.interactive.factory.ResolveFactory; import java.util.*; import java.util.stream.IntStream; @@ -33,7 +34,6 @@ import java.util.stream.IntStream; public class CanvasResolveServiceImpl implements IResolveService { private final IStationClient stationClient; - // private final BladeLogger logger; @Override public ExtraVO resolve(ModelFunctionReq req) { @@ -41,8 +41,8 @@ public class CanvasResolveServiceImpl implements IResolveService { String id = args.get("itemId"); String name = args.get("itemName"); Assert.isTrue(StringUtil.isNotBlank(id) && StringUtil.isNotBlank(name),() -> { - // logger.error("hzims:video:resolve","解析传参错误,缺少必要参数video_id,传参内容为:" + JSON.toJSONString(req)); - throw new ServiceException(ResultCode.FAILURE,"解析传参错误,缺少必要参数video_id"); + log.error("解析传参错误,缺少必要参数video_id,传参内容为:{}", JSON.toJSONString(req)); + throw new HzServiceException(ResultCode.FAILURE,"解析传参错误,缺少必要参数video_id"); }); return this.resolve(id); } @@ -82,7 +82,7 @@ public class CanvasResolveServiceImpl implements IResolveService { extraVO.setRoute(this.replacePath("other/v4/canvas/index.html?hzinfowebkit=true&taskId={taskId}&stationNum={stationNum}&projectId={projectId}&source=app&picName={context}&itemName={itemName}", resolveMap)); } else { - throw new ServiceException(ResultCode.FAILURE,"解析出来的画面类型在云组态、v3、v4类型之外,无法解析路由"); + throw new HzServiceException(ResultCode.FAILURE,"解析出来的画面类型在云组态、v3、v4类型之外,无法解析路由"); } return extraVO; } @@ -91,7 +91,7 @@ public class CanvasResolveServiceImpl implements IResolveService { Map result = new HashMap<>(); List params = Func.toStrList("\\^", paramsStr); Assert.isTrue(params.size() == keys.length, () -> { - throw new ServiceException(ResultCode.FAILURE,"大模型传参params长度错误,传参为:" + paramsStr); + throw new HzServiceException(ResultCode.FAILURE, "大模型传参params长度错误,传参为:" + paramsStr); }); IntStream.iterate(0, index -> index + 1).limit(params.size()).forEach(index -> result.put(keys[index],params.get(index))); return result; diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/HznlmInvokeServiceImpl.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/HznlmInvokeServiceImpl.java index 03eed48..2770cec 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/HznlmInvokeServiceImpl.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/HznlmInvokeServiceImpl.java @@ -14,7 +14,6 @@ import com.hnac.hzims.bigmodel.utils.RequestClientUtil; import com.hnac.hzims.bigmodel.websocket.sessionManager.InteractiveSessionManager; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -//import org.springblade.core.log.logger.BladeLogger; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.Func; @@ -38,7 +37,6 @@ import java.util.Map; public class HznlmInvokeServiceImpl implements IHznlmInvokeService { private final BigModelInvokeUrl bigModelInvokeUrl; -// private final BladeLogger logger; private final SessionRedisManager sessionRedisManager; private final IAuthClient authClient; @@ -112,8 +110,9 @@ public class HznlmInvokeServiceImpl implements IHznlmInvokeService { @Override public void askAbort(String sessionId) { Map params = new HashMap<>(); - params.put("id",sessionId); + params.put("chat_id",sessionId); RequestClientUtil.postCall(fdpHost + bigModelInvokeUrl.getAskAbort(), params); + sessionRedisManager.removeSessionId(sessionId); } @Override diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/VideoResolveServiceImpl.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/VideoResolveServiceImpl.java index e60bbd3..68a883e 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/VideoResolveServiceImpl.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/VideoResolveServiceImpl.java @@ -9,11 +9,11 @@ import com.hnac.hzims.bigmodel.interactive.service.IResolveService; import com.hnac.hzims.bigmodel.interactive.vo.ExtraVO; import com.hnac.hzims.operational.station.entity.StationVideoTypeEntity; import com.hnac.hzims.operational.station.feign.IStationVideoTypeClient; -import groovy.util.logging.Slf4j; +import com.hnac.hzinfo.exception.HzServiceException; import lombok.AllArgsConstructor; -import org.springblade.core.log.exception.ServiceException; -//import org.springblade.core.log.logger.BladeLogger; +import lombok.extern.slf4j.Slf4j; import org.springblade.core.tool.api.R; +import org.springblade.core.tool.api.ResultCode; import org.springblade.core.tool.utils.StringUtil; import org.springframework.stereotype.Service; import org.springframework.util.Assert; @@ -31,7 +31,6 @@ import java.util.Map; public class VideoResolveServiceImpl implements IResolveService { private final IStationVideoTypeClient videoClient; -// private final BladeLogger logger; @Override public ExtraVO resolve(ModelFunctionReq req) { @@ -39,13 +38,10 @@ public class VideoResolveServiceImpl implements IResolveService { String id = args.get("itemId"); String name = args.get("itemName"); Assert.isTrue(StringUtil.isNotBlank(id) && StringUtil.isNotBlank(name),() -> { -// logger.error("hzims:video:resolve","解析传参错误,缺少必要参数video_id,传参内容为:" + JSON.toJSONString(req)); - throw new ServiceException("解析传参错误,缺少必要参数video_id"); + log.error("解析传参错误,缺少必要参数video_id,传参内容为:{}", JSON.toJSONString(req)); + throw new HzServiceException(ResultCode.FAILURE, "解析传参错误,缺少必要参数video_id"); }); return this.resolve(id); -// ExtraVO extra = this.resolve(id); -// String message = "已成功打开" + name + ";"; -// return new ResolveResultVO(message,extra); } @Override diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/AnswerVO.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/AnswerVO.java index 9fd4774..328e7b0 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/AnswerVO.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/vo/AnswerVO.java @@ -25,7 +25,7 @@ public class AnswerVO implements Serializable { @ApiModelProperty("发起问答时的随机ID") @JSONField(name = "chat_id") - private String sessionId; + private String chatId; @ApiModelProperty("发起问答时的用户ID") @JSONField(name = "user_id") diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/TableColumnController.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/TableColumnController.java index 840f784..f9bc2fe 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/TableColumnController.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/TableColumnController.java @@ -3,7 +3,6 @@ package com.hnac.hzims.bigmodel.maintenance.controller; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.bigmodel.BigModelConstants; import com.hnac.hzims.bigmodel.maintenance.service.TableColumnService; -import com.hnac.hzinfo.log.annotation.Business; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -24,7 +23,6 @@ import java.util.Map; @RestController @RequestMapping("/table/info") @Api(value = "数据库表、列信息查询管理",tags = "数据库表、列信息查询管理") -@Business(module = BigModelConstants.APP_NAME,value = "数据库表、列信息查询管理",ignore = false) @AllArgsConstructor public class TableColumnController { diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/TableInfoController.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/TableInfoController.java index 4bc0f1d..d723842 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/TableInfoController.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/controller/TableInfoController.java @@ -5,7 +5,6 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.bigmodel.BigModelConstants; import com.hnac.hzims.bigmodel.maintenance.entity.TableInfoEntity; import com.hnac.hzims.bigmodel.maintenance.service.TableInfoService; -import com.hnac.hzinfo.log.annotation.Business; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -26,7 +25,6 @@ import javax.validation.Valid; @RequestMapping("/tableInfo") @Api(value = "数据库信息管理",tags = "数据库信息管理") @AllArgsConstructor -@Business(module = BigModelConstants.APP_NAME,value = "数据库信息管理",ignore = false) public class TableInfoController { private final TableInfoService tableInfoService; diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/DatasourceEntity.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/DatasourceEntity.java index 514188e..0b2ce5c 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/DatasourceEntity.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/maintenance/entity/DatasourceEntity.java @@ -17,15 +17,11 @@ import java.io.Serializable; * @Date: 2024/07/05 14:45 */ @Data -@EqualsAndHashCode +@EqualsAndHashCode(callSuper=false) @TableName("HZIMS_DATASOURCE") @ApiModel(value = "数据源配置",description = "数据源配置") public class DatasourceEntity extends TenantEntity implements Serializable { - @ApiModelProperty("数据源") - @QueryField(condition = SqlCondition.LIKE) - private String datasource; - @ApiModelProperty("数据源名称") @QueryField(condition = SqlCondition.LIKE) private String datasourceName; diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/question/service/QuestionHandlerService.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/question/service/QuestionHandlerService.java index a9c168e..6a6d9fa 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/question/service/QuestionHandlerService.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/question/service/QuestionHandlerService.java @@ -1,6 +1,7 @@ package com.hnac.hzims.bigmodel.question.service; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.hnac.hzims.bigmodel.interactive.constants.FuncRouteEnum; import com.hnac.hzims.bigmodel.interactive.factory.ResolveFactory; import com.hnac.hzims.bigmodel.interactive.service.IHznlmInvokeService; @@ -14,6 +15,7 @@ import com.hnac.hzims.bigmodel.question.dto.QuestionDTO; import com.hnac.hzims.bigmodel.websocket.service.InteractiveWsService; import com.hnac.hzims.bigmodel.websocket.sessionManager.InteractiveSessionManager; import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.SpringUtil; @@ -27,6 +29,7 @@ import org.springframework.web.socket.TextMessage; */ @Service @AllArgsConstructor +@Slf4j public class QuestionHandlerService { private final IHznlmInvokeService hznlmInvokeService; @@ -70,12 +73,12 @@ public class QuestionHandlerService { private void handleVideoChoose(MessageDTO messageDTO) { InteractiveWsService wsService = SpringUtil.getBean(InteractiveWsService.class); try { - VideoSelectionVO selection = (VideoSelectionVO) messageDTO.getExtra().get("data"); + VideoSelectionVO selection = JSONObject.parseObject(JSON.toJSONString(messageDTO.getExtra().get("data")),VideoSelectionVO.class); IResolveService resolveService = ResolveFactory.getResolveService(FuncRouteEnum.OPEN_VIDEO.getFunc()); String videoId = selection.getItemId(); ExtraVO videoExtras = resolveService.resolve(videoId); AnswerVO answerVO = new AnswerVO(); - answerVO.setSessionId(messageDTO.getChatId()); + answerVO.setChatId(messageDTO.getChatId()); answerVO.setQuery(selection.getItemName()); answerVO.setRunning(0); answerVO.setStatus(0); @@ -85,6 +88,7 @@ public class QuestionHandlerService { wsService.sendMessage(messageDTO.getChatId(),textMessage); } catch (Exception e) { + log.error("an error occurred!",e); AnswerVO answerVO = new AnswerVO(); answerVO.setRunning(0); answerVO.setStatus(-2); @@ -97,11 +101,11 @@ public class QuestionHandlerService { private void handleScadaChoose(MessageDTO messageDTO) { InteractiveWsService wsService = SpringUtil.getBean(InteractiveWsService.class); try { - ScadaSelectionVO selection = (ScadaSelectionVO) messageDTO.getExtra().get("data"); + ScadaSelectionVO selection = JSONObject.parseObject(JSON.toJSONString(messageDTO.getExtra().get("data")),ScadaSelectionVO.class);; IResolveService resolveService = ResolveFactory.getResolveService(FuncRouteEnum.OPEN_CANVAS.getFunc()); ExtraVO scadaExtra = resolveService.resolve(selection.getItemId()); AnswerVO answerVO = new AnswerVO(); - answerVO.setSessionId(messageDTO.getChatId()); + answerVO.setChatId(messageDTO.getChatId()); answerVO.setRunning(0); answerVO.setStatus(0); answerVO.setQuery(selection.getItemName()); diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/FrontEndInteractiveSchedule.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/FrontEndInteractiveSchedule.java index 5ffd675..d4bf7e7 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/FrontEndInteractiveSchedule.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/schedule/FrontEndInteractiveSchedule.java @@ -16,19 +16,15 @@ import com.xxl.job.core.handler.annotation.XxlJob; import com.xxl.job.core.log.XxlJobLogger; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -//import org.springblade.core.log.logger.BladeLogger; import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.ObjectUtil; import org.springframework.stereotype.Component; import org.springframework.web.socket.TextMessage; -import org.springframework.web.socket.WebSocketSession; - import java.util.Arrays; import java.util.List; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ThreadPoolExecutor; -import java.util.stream.Collectors; import static com.hnac.hzims.bigmodel.schedule.XxlJobHandlerConstant.*; @@ -45,7 +41,6 @@ public class FrontEndInteractiveSchedule { private final InteractiveWsService wsService; private final ThreadPoolExecutor getAnswerPoolExecutor; private final IHznlmInvokeService hznlmInvokeService; -// private final BladeLogger logger; @XxlJob(GET_INTERACTIVE_RESULT) public ReturnT getInteractiveResult(String params) { @@ -58,8 +53,8 @@ public class FrontEndInteractiveSchedule { answerList.stream().parallel().forEach(answerVO -> CompletableFuture.runAsync(() -> { // 如果已经获取到答案 则删除缓存 if(answerVO.getRunning() == 0) { -// logger.info("hzims:bigmodel:getInteractiveResult:answer","获取大模型解析答案:" + JSON.toJSONString(answerVO)); - sessionRedisManager.removeSessionId(answerVO.getSessionId()); + log.info("获取大模型解析答案:{}" , JSON.toJSONString(answerVO)); + sessionRedisManager.removeSessionId(answerVO.getChatId()); } Object[] extras = answerVO.getExtras(); if(ObjectUtil.isNotEmpty(answerVO.getExtras()) && extras.length > 0){ @@ -77,11 +72,11 @@ public class FrontEndInteractiveSchedule { } catch(Exception e) { log.error("An error occurred",e); - AnswerVO.error(answerVO.getSessionId(), answerVO.getUserId(), answerVO.getQuery()); + AnswerVO.error(answerVO.getChatId(), answerVO.getUserId(), answerVO.getQuery()); } } TextMessage message = InteractiveSessionManager.getTextMessage("1",JSON.toJSONString(answerVO)); - wsService.sendMessage(answerVO.getSessionId(),message); + wsService.sendMessage(answerVO.getChatId(),message); }, getAnswerPoolExecutor)); return ReturnT.SUCCESS; } diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/utils/RequestClientUtil.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/utils/RequestClientUtil.java index 3e01b66..47fded7 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/utils/RequestClientUtil.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/utils/RequestClientUtil.java @@ -5,11 +5,12 @@ import cn.hutool.http.HttpResponse; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; +import com.hnac.hzinfo.exception.HzServiceException; import lombok.extern.slf4j.Slf4j; -import org.springblade.core.log.exception.ServiceException; import org.springblade.core.tool.api.ResultCode; import org.springframework.util.Assert; +import javax.servlet.http.HttpServletResponse; import java.util.Map; /** @@ -29,8 +30,8 @@ public class RequestClientUtil { log.info("开始远程调用{}接口",url); HttpResponse response = HttpRequest.post(url).body(body).execute(); log.info("远程调用{}接口结束",url); - Assert.isTrue(response.getStatus() == ResultCode.SUCCESS.getCode(), () -> { - throw new ServiceException("远程调用接口" + url + "失败!"); + Assert.isTrue(response.getStatus() == HttpServletResponse.SC_OK, () -> { + throw new HzServiceException(ResultCode.FAILURE, "远程调用接口" + url + "失败!"); }); } @@ -43,8 +44,8 @@ public class RequestClientUtil { log.info("开始远程调用{}接口",url); HttpResponse response = HttpRequest.post(url).body(JSON.toJSONString(body)).execute(); log.info("远程调用{}接口结束",url); - Assert.isTrue(response.getStatus() == ResultCode.SUCCESS.getCode(), () -> { - throw new ServiceException("远程调用接口" + url + "失败!"); + Assert.isTrue(response.getStatus() == HttpServletResponse.SC_OK, () -> { + throw new HzServiceException(ResultCode.FAILURE, "远程调用接口" + url + "失败!"); }); } @@ -58,8 +59,8 @@ public class RequestClientUtil { */ public static T postCall(String url, Map body, TypeReference typeRef) { HttpResponse response = HttpRequest.post(url).body(JSON.toJSONString(body)).execute(); - Assert.isTrue(response.getStatus() == ResultCode.SUCCESS.getCode(), () -> { - throw new ServiceException("远程调用大模型接口" + url + "失败!"); + Assert.isTrue(response.getStatus() == HttpServletResponse.SC_OK, () -> { + throw new HzServiceException(ResultCode.FAILURE, "远程调用大模型接口" + url + "失败!"); }); return JSONObject.parseObject(response.body(), typeRef); } diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/handler/InteractiveHandler.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/handler/InteractiveHandler.java index ba93fb4..8b3fbc7 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/handler/InteractiveHandler.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/websocket/handler/InteractiveHandler.java @@ -80,119 +80,6 @@ public class InteractiveHandler extends TextWebSocketHandler { QuestionHandlerService service = SpringUtil.getBean(QuestionHandlerService.class); service.handleMessage(messageDTO); } -// JSONObject messageJSON = JSONObject.parseObject(message.getPayload()); -// if("0".equals(messageJSON.getString("type"))) { -// // 接收心跳消息,返回一条心跳消息 -// try { -// session.sendMessage(InteractiveSessionManager.getTextMessage("0","收到心跳消息")); -// } catch (IOException e) { -// throw new RuntimeException(e); -// } -// } else { -// String sessionId = InteractiveSessionManager.getEntryBySession(session).getKey(); -// if(messageJSON.containsKey("content")) { -// // 将发送参数存入redis -// redisTemplate.expire(RedisKeyConstants.SESSION_CONTENT_KEY,30, TimeUnit.MINUTES); -// redisTemplate.opsForHash().put(RedisKeyConstants.SESSION_CONTENT_KEY,sessionId,messageJSON.getObject("content", SessionContentVO.class)); -// } -// this.handleMessage(messageJSON, sessionId); -// } - } - - private void handleMessage(JSONObject messageContext, String sessionId) { - Boolean isSpecial = messageContext.getBoolean("isSpecial"); - if (Func.isEmpty(isSpecial) || !isSpecial) { - String context = messageContext.getString("context"); - String userId = messageContext.getString("userId"); - String knowledge = messageContext.getString("knowledge"); - IHznlmInvokeService hznlmInvokeService = SpringUtil.getBean(IHznlmInvokeService.class); - if (knowledge != null) { - hznlmInvokeService.knowledgeAsk(context, sessionId, userId, knowledge); - } else { - hznlmInvokeService.ask(context, sessionId, userId); - } - } - else { - String funcCode = messageContext.getString("func"); - FuncRouteEnum funcEnum = FuncRouteEnum.getEnumByFuncCode(funcCode); - switch (funcEnum) { - case CHOOSE_STATION: - case CHOOSE_YC: - case CHOOSE_FAULT: - case CHOOSE_YK: - this.handleDefaultChoose(messageContext,sessionId); - break; - case CHOOSE_VIDEO: - this.handleVideoChoose(messageContext,sessionId); - break; - case CHOOSE_CANVAS: - this.handleScadaChoose(messageContext,sessionId); - break; - default: - break; - } - } - } - - private void handleDefaultChoose(JSONObject messageContext,String sessionId) { - IHznlmInvokeService invokeService = SpringUtil.getBean(IHznlmInvokeService.class); - Map extra = messageContext.toJavaObject(Map.class); - extra.put("func",extra.get("func")); - extra.put("data",JSONObject.parseObject(JSON.toJSONString(extra.get("selection")))); - invokeService.specialAsk(sessionId, (String) extra.get("userId"),extra); - } - - private void handleVideoChoose(JSONObject messageContext,String sessionId) { - InteractiveWsService wsService = SpringUtil.getBean(InteractiveWsService.class); - try { - VideoSelectionVO selection = messageContext.getObject("selection", VideoSelectionVO.class); - IResolveService resolveService = ResolveFactory.getResolveService(FuncRouteEnum.OPEN_VIDEO.getFunc()); - String videoId = selection.getItemId(); - ExtraVO videoExtras = resolveService.resolve(videoId); - AnswerVO answerVO = new AnswerVO(); - answerVO.setSessionId(sessionId); - answerVO.setQuery(selection.getItemName()); - answerVO.setRunning(0); - answerVO.setStatus(0); - answerVO.setAnswer("已成功打开"+selection.getItemName()+"视频"); - answerVO.setExtras(new Object[]{JSON.toJSONString(videoExtras)}); - TextMessage textMessage = InteractiveSessionManager.getTextMessage("1", JSON.toJSONString(answerVO)); - wsService.sendMessage(sessionId,textMessage); - } - catch (Exception e) { - AnswerVO answerVO = new AnswerVO(); - answerVO.setRunning(0); - answerVO.setStatus(-2); - answerVO.setAnswer("视频解析失败!"); - TextMessage textMessage = InteractiveSessionManager.getTextMessage("1", JSON.toJSONString(answerVO)); - wsService.sendMessage(sessionId,textMessage); - } - } - - private void handleScadaChoose(JSONObject messageContext,String sessionId) { - InteractiveWsService wsService = SpringUtil.getBean(InteractiveWsService.class); - try { - ScadaSelectionVO selection = messageContext.getObject("selection", ScadaSelectionVO.class); - IResolveService resolveService = ResolveFactory.getResolveService(FuncRouteEnum.OPEN_CANVAS.getFunc()); - ExtraVO scadaExtra = resolveService.resolve(selection.getItemId()); - AnswerVO answerVO = new AnswerVO(); - answerVO.setSessionId(sessionId); - answerVO.setRunning(0); - answerVO.setStatus(0); - answerVO.setQuery(selection.getItemName()); - answerVO.setAnswer("已成功打开"+selection.getItemName()+"实时画面"); - answerVO.setExtras(new Object[]{JSON.toJSONString(scadaExtra)}); - TextMessage textMessage = InteractiveSessionManager.getTextMessage("1", JSON.toJSONString(answerVO)); - wsService.sendMessage(sessionId,textMessage); - } - catch (Exception e) { - AnswerVO answerVO = new AnswerVO(); - answerVO.setRunning(0); - answerVO.setStatus(-2); - answerVO.setAnswer("实时画面解析失败!"); - TextMessage textMessage = InteractiveSessionManager.getTextMessage("1", JSON.toJSONString(answerVO)); - wsService.sendMessage(sessionId,textMessage); - } } } diff --git a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/whitelist/controller/WhitelistController.java b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/whitelist/controller/WhitelistController.java index 7c1d6d6..5e29227 100644 --- a/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/whitelist/controller/WhitelistController.java +++ b/hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/whitelist/controller/WhitelistController.java @@ -1,10 +1,8 @@ package com.hnac.hzims.bigmodel.whitelist.controller; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; -import com.hnac.hzims.bigmodel.BigModelConstants; import com.hnac.hzims.bigmodel.entity.WhitelistEntity; import com.hnac.hzims.bigmodel.whitelist.service.WhitelistService; -import com.hnac.hzinfo.log.annotation.Business; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; @@ -23,7 +21,6 @@ import java.util.List; @RestController @RequestMapping("/whitelist") @Api(value = "白名单用户",tags = "白名单用户") -@Business(module = BigModelConstants.MODULE_NAME,value = "大模型函数管理") @AllArgsConstructor public class WhitelistController { diff --git a/hzims-service/hzims-big-model/src/main/resources/template/template.yml b/hzims-service/hzims-big-model/src/main/resources/template/template.yml index bf90921..0fca177 100644 --- a/hzims-service/hzims-big-model/src/main/resources/template/template.yml +++ b/hzims-service/hzims-big-model/src/main/resources/template/template.yml @@ -1,22 +1,55 @@ #服务器端口 server: port: 8135 - -#数据源配置 spring: #排除DruidDataSourceAutoConfigure autoconfigure: - exclude: com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DruidDataSourceAutoConfigure + exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure datasource: - url: jdbc:mysql://${hzinfo.db.busines.ip}:${hzinfo.db.busines.port}/prod_hzims_big_model?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true - username: ${hzinfo.db.busines.username} - password: ${hzinfo.db.busines.password} - -#oss配置 -oss: - endpoint: ${hzinfo.oss.endpoint} - access-key: ${hzinfo.oss.access-key} - secret-key: ${hzinfo.oss.secret-key} + dynamic: + #设置默认的数据源或者数据源组,默认值即为master + primary: master + datasource: + master: + url: jdbc:mysql://${hzinfo.db.busines.ip}:${hzinfo.db.busines.port}/test_hzims_big_model?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: ${hzinfo.db.busines.username} + password: ${hzinfo.db.busines.password} + operation: + url: jdbc:mysql://192.168.60.34:3576/test_hzims_operation?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: ${hzinfo.db.busines.username} + password: ${hzinfo.db.busines.password} + equipment: + url: jdbc:mysql://192.168.60.34:3576/test_hzims_equipment?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: ${hzinfo.db.busines.username} + password: ${hzinfo.db.busines.password} + ticket: + url: jdbc:mysql://192.168.60.34:3576/test_hzims_ticket?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: ${hzinfo.db.busines.username} + password: ${hzinfo.db.busines.password} + safeproduct: + url: jdbc:mysql://192.168.60.34:3576/test_hzims?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: ${hzinfo.db.busines.username} + password: ${hzinfo.db.busines.password} + inspect: + url: jdbc:mysql://192.168.60.34:3576/test_hzims_inspect?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: ${hzinfo.db.busines.username} + password: ${hzinfo.db.busines.password} + basic: + url: jdbc:mysql://192.168.60.34:3576/test_basic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: ${hzinfo.db.busines.username} + password: ${hzinfo.db.busines.password} + alarm: + url: jdbc:mysql://192.168.60.34:3576/test_hzims_alarm?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: ${hzinfo.db.busines.username} + password: ${hzinfo.db.busines.password} + information: + url: jdbc:mysql://192.168.60.34:3576/information_schema?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: ${hzinfo.db.busines.username} + password: ${hzinfo.db.busines.password} + hznlm: + url: jdbc:mysql://192.168.60.16:3306/hzn_lm?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true + username: root + password: 123 fdp: host: http://192.168.60.16:9997 @@ -41,26 +74,4 @@ xxl: ip: ${hzims.server.ip} logpath: /data/applogs/xxl-job/jobhandler logretentiondays: 7 - port: 28135 - -blade: - data: - sdk: - enabled: true - url: http://${hzims.sdk.ip}/api/hzinfo-data-config - ctrlUrl: http://${hzims.sdk.ip}/api/hzinfo-data-handler - scadaUrl: http://${hzims.sdk.ip}/api/hzinfo-data-scada - appId: ${hzims.sdk.appId} - appSecret: ${hzims.sdk.appSecret} - redisIp: ${hzims.sdk.redisIp} - redisPort: ${hzims.sdk.redisPort} - password: ${hzims.sdk.password} - maxKeys: 1000 - data-scope: - enabled: false - lock: - enabled: true - address: redis://${hzinfo.redis.ip}:${hzinfo.redis.port} - password: ${hzinfo.redis.password} - database: 0 - ssl: false \ No newline at end of file + port: 28135 \ No newline at end of file From 09352a6ccce5475d37357010bb96da5a11184d0b Mon Sep 17 00:00:00 2001 From: haungxing <1203316822@qq.com> Date: Wed, 7 Aug 2024 15:14:20 +0800 Subject: [PATCH 6/6] =?UTF-8?q?fix:=20=E5=90=88=E5=B9=B6master=E5=88=86?= =?UTF-8?q?=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hnac/hzims/bigmodel/api/feign/IVideoSyncClient.java | 2 +- hzims-service/hzims-big-model/pom.xml | 2 +- .../hzims-big-model/src/main/resources/template/template.yml | 8 ++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/api/feign/IVideoSyncClient.java b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/api/feign/IVideoSyncClient.java index 5af759e..6ce759c 100644 --- a/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/api/feign/IVideoSyncClient.java +++ b/hzims-service-api/big-model-api/src/main/java/com/hnac/hzims/bigmodel/api/feign/IVideoSyncClient.java @@ -28,6 +28,6 @@ public interface IVideoSyncClient extends ISyncClient { @Override @DeleteMapping(PREFIX_API + DELETE_BY_IDS) - R deleteByIds(@RequestParam String ids); + R deleteByIds(@RequestParam("ids") String ids); } diff --git a/hzims-service/hzims-big-model/pom.xml b/hzims-service/hzims-big-model/pom.xml index 783e410..77bd234 100644 --- a/hzims-service/hzims-big-model/pom.xml +++ b/hzims-service/hzims-big-model/pom.xml @@ -76,7 +76,7 @@ com.baomidou dynamic-datasource-spring-boot-starter - 2.5.6 + 3.5.0 diff --git a/hzims-service/hzims-big-model/src/main/resources/template/template.yml b/hzims-service/hzims-big-model/src/main/resources/template/template.yml index 0fca177..5f1a299 100644 --- a/hzims-service/hzims-big-model/src/main/resources/template/template.yml +++ b/hzims-service/hzims-big-model/src/main/resources/template/template.yml @@ -34,10 +34,6 @@ spring: url: jdbc:mysql://192.168.60.34:3576/test_hzims_inspect?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true username: ${hzinfo.db.busines.username} password: ${hzinfo.db.busines.password} - basic: - url: jdbc:mysql://192.168.60.34:3576/test_basic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true - username: ${hzinfo.db.busines.username} - password: ${hzinfo.db.busines.password} alarm: url: jdbc:mysql://192.168.60.34:3576/test_hzims_alarm?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true username: ${hzinfo.db.busines.username} @@ -68,10 +64,10 @@ xxl: job: accessToken: '' admin: - addresses: http://${hzims.xxljob.ip}:${hzims.xxljob.port}/xxl-job-admin + addresses: http://${hzims.server.ip}:${hzims.xxljob.port}/xxl-job-admin executor: appname: hzims-big-model - ip: ${hzims.server.ip} + ip: ${hzims.xxljob.ip} logpath: /data/applogs/xxl-job/jobhandler logretentiondays: 7 port: 28135 \ No newline at end of file