Commit 37db99e20bd685059f1e3647fda3892155c68ee4
1 parent
c4c45132
feat:【IoT 物联网】新版本同步
Showing
7 changed files
with
18 additions
and
11 deletions
pom.xml
| ... | ... | @@ -24,7 +24,7 @@ |
| 24 | 24 | <!-- <module>yudao-module-crm</module>--> |
| 25 | 25 | <!-- <module>yudao-module-erp</module>--> |
| 26 | 26 | <!-- <module>yudao-module-ai</module>--> |
| 27 | - <module>yudao-module-iot</module> | |
| 27 | +<!-- <module>yudao-module-iot</module>--> | |
| 28 | 28 | </modules> |
| 29 | 29 | |
| 30 | 30 | <name>${project.artifactId}</name> | ... | ... |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/util/json/JsonUtils.java
| ... | ... | @@ -13,6 +13,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; |
| 13 | 13 | import com.fasterxml.jackson.databind.SerializationFeature; |
| 14 | 14 | import com.fasterxml.jackson.databind.module.SimpleModule; |
| 15 | 15 | import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; |
| 16 | +import lombok.Getter; | |
| 16 | 17 | import lombok.SneakyThrows; |
| 17 | 18 | import lombok.extern.slf4j.Slf4j; |
| 18 | 19 | |
| ... | ... | @@ -30,6 +31,7 @@ import java.util.List; |
| 30 | 31 | @Slf4j |
| 31 | 32 | public class JsonUtils { |
| 32 | 33 | |
| 34 | + @Getter | |
| 33 | 35 | private static ObjectMapper objectMapper = new ObjectMapper(); |
| 34 | 36 | |
| 35 | 37 | static { | ... | ... |
yudao-framework/yudao-spring-boot-starter-mybatis/src/main/java/cn/iocoder/yudao/framework/mybatis/config/YudaoMybatisAutoConfiguration.java
| ... | ... | @@ -2,6 +2,7 @@ package cn.iocoder.yudao.framework.mybatis.config; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.collection.CollUtil; |
| 4 | 4 | import cn.hutool.core.util.StrUtil; |
| 5 | +import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | |
| 5 | 6 | import cn.iocoder.yudao.framework.mybatis.core.handler.DefaultDBFieldHandler; |
| 6 | 7 | import com.baomidou.mybatisplus.annotation.DbType; |
| 7 | 8 | import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration; |
| ... | ... | @@ -82,7 +83,11 @@ public class YudaoMybatisAutoConfiguration { |
| 82 | 83 | @Bean |
| 83 | 84 | public JacksonTypeHandler jacksonTypeHandler(List<ObjectMapper> objectMappers) { |
| 84 | 85 | // 特殊:设置 JacksonTypeHandler 的 ObjectMapper! |
| 85 | - JacksonTypeHandler.setObjectMapper(CollUtil.getFirst(objectMappers)); | |
| 86 | + ObjectMapper objectMapper = CollUtil.getFirst(objectMappers); | |
| 87 | + if (objectMapper == null) { | |
| 88 | + objectMapper = JsonUtils.getObjectMapper(); | |
| 89 | + } | |
| 90 | + JacksonTypeHandler.setObjectMapper(objectMapper); | |
| 86 | 91 | return new JacksonTypeHandler(Object.class); |
| 87 | 92 | } |
| 88 | 93 | ... | ... |
yudao-module-bpm/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java
| ... | ... | @@ -958,7 +958,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 958 | 958 | // 1.3.1 获取父流程实例 并标记为不通过 |
| 959 | 959 | Execution execution = runtimeService.createExecutionQuery().executionId(instance.getSuperExecutionId()).singleResult(); |
| 960 | 960 | ProcessInstance parentProcessInstance = getProcessInstance(execution.getProcessInstanceId()); |
| 961 | - updateProcessInstanceReject(parentProcessInstance, REJECT_CHILD_PROCESS.getReason()); | |
| 961 | + updateProcessInstanceReject(parentProcessInstance, BpmReasonEnum.REJECT_CHILD_PROCESS.getReason()); | |
| 962 | 962 | |
| 963 | 963 | // 1.3.2 结束父流程。需要在子流程结束事务提交后执行 |
| 964 | 964 | TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() { |
| ... | ... | @@ -969,7 +969,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 969 | 969 | if (ObjectUtil.equal(transactionStatus, TransactionSynchronization.STATUS_ROLLED_BACK)) { |
| 970 | 970 | return; |
| 971 | 971 | } |
| 972 | - taskService.moveTaskToEnd(parentProcessInstance.getId(),REJECT_CHILD_PROCESS.getReason()); | |
| 972 | + taskService.moveTaskToEnd(parentProcessInstance.getId(), BpmReasonEnum.REJECT_CHILD_PROCESS.getReason()); | |
| 973 | 973 | } |
| 974 | 974 | }); |
| 975 | 975 | } | ... | ... |
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/ota/IotOtaTaskRecordController.java
| 1 | 1 | package cn.iocoder.yudao.module.iot.controller.admin.ota; |
| 2 | 2 | |
| 3 | +4import cn.hutool.core.collection.CollUtil; | |
| 3 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | 6 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; |
| ... | ... | @@ -18,7 +19,6 @@ import io.swagger.v3.oas.annotations.Parameters; |
| 18 | 19 | import io.swagger.v3.oas.annotations.tags.Tag; |
| 19 | 20 | import jakarta.annotation.Resource; |
| 20 | 21 | import jakarta.validation.Valid; |
| 21 | -import org.dromara.hutool.core.collection.CollUtil; | |
| 22 | 22 | import org.springframework.security.access.prepost.PreAuthorize; |
| 23 | 23 | import org.springframework.validation.annotation.Validated; |
| 24 | 24 | import org.springframework.web.bind.annotation.GetMapping; | ... | ... |
yudao-module-iot/yudao-module-iot-gateway/src/main/resources/application.yaml
yudao-server/pom.xml
| ... | ... | @@ -109,11 +109,11 @@ |
| 109 | 109 | <!-- </dependency>--> |
| 110 | 110 | |
| 111 | 111 | <!-- IoT 物联网相关模块。默认注释,保证编译速度 --> |
| 112 | - <dependency> | |
| 113 | - <groupId>cn.iocoder.boot</groupId> | |
| 114 | - <artifactId>yudao-module-iot-biz</artifactId> | |
| 115 | - <version>${revision}</version> | |
| 116 | - </dependency> | |
| 112 | +<!-- <dependency>--> | |
| 113 | +<!-- <groupId>cn.iocoder.boot</groupId>--> | |
| 114 | +<!-- <artifactId>yudao-module-iot-biz</artifactId>--> | |
| 115 | +<!-- <version>${revision}</version>--> | |
| 116 | +<!-- </dependency>--> | |
| 117 | 117 | |
| 118 | 118 | <!-- spring boot 配置所需依赖 --> |
| 119 | 119 | <dependency> | ... | ... |