feat:【IoT 物联网】新版本同步
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -24,7 +24,7 @@
|
|||||||
<!-- <module>yudao-module-crm</module>-->
|
<!-- <module>yudao-module-crm</module>-->
|
||||||
<!-- <module>yudao-module-erp</module>-->
|
<!-- <module>yudao-module-erp</module>-->
|
||||||
<!-- <module>yudao-module-ai</module>-->
|
<!-- <module>yudao-module-ai</module>-->
|
||||||
<module>yudao-module-iot</module>
|
<!-- <module>yudao-module-iot</module>-->
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<name>${project.artifactId}</name>
|
<name>${project.artifactId}</name>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|||||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||||
|
import lombok.Getter;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@@ -30,6 +31,7 @@ import java.util.List;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class JsonUtils {
|
public class JsonUtils {
|
||||||
|
|
||||||
|
@Getter
|
||||||
private static ObjectMapper objectMapper = new ObjectMapper();
|
private static ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.framework.mybatis.config;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.handler.DefaultDBFieldHandler;
|
import cn.iocoder.yudao.framework.mybatis.core.handler.DefaultDBFieldHandler;
|
||||||
import com.baomidou.mybatisplus.annotation.DbType;
|
import com.baomidou.mybatisplus.annotation.DbType;
|
||||||
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
|
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
|
||||||
@@ -82,7 +83,11 @@ public class YudaoMybatisAutoConfiguration {
|
|||||||
@Bean
|
@Bean
|
||||||
public JacksonTypeHandler jacksonTypeHandler(List<ObjectMapper> objectMappers) {
|
public JacksonTypeHandler jacksonTypeHandler(List<ObjectMapper> objectMappers) {
|
||||||
// 特殊:设置 JacksonTypeHandler 的 ObjectMapper!
|
// 特殊:设置 JacksonTypeHandler 的 ObjectMapper!
|
||||||
JacksonTypeHandler.setObjectMapper(CollUtil.getFirst(objectMappers));
|
ObjectMapper objectMapper = CollUtil.getFirst(objectMappers);
|
||||||
|
if (objectMapper == null) {
|
||||||
|
objectMapper = JsonUtils.getObjectMapper();
|
||||||
|
}
|
||||||
|
JacksonTypeHandler.setObjectMapper(objectMapper);
|
||||||
return new JacksonTypeHandler(Object.class);
|
return new JacksonTypeHandler(Object.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -958,7 +958,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
|
|||||||
// 1.3.1 获取父流程实例 并标记为不通过
|
// 1.3.1 获取父流程实例 并标记为不通过
|
||||||
Execution execution = runtimeService.createExecutionQuery().executionId(instance.getSuperExecutionId()).singleResult();
|
Execution execution = runtimeService.createExecutionQuery().executionId(instance.getSuperExecutionId()).singleResult();
|
||||||
ProcessInstance parentProcessInstance = getProcessInstance(execution.getProcessInstanceId());
|
ProcessInstance parentProcessInstance = getProcessInstance(execution.getProcessInstanceId());
|
||||||
updateProcessInstanceReject(parentProcessInstance, REJECT_CHILD_PROCESS.getReason());
|
updateProcessInstanceReject(parentProcessInstance, BpmReasonEnum.REJECT_CHILD_PROCESS.getReason());
|
||||||
|
|
||||||
// 1.3.2 结束父流程。需要在子流程结束事务提交后执行
|
// 1.3.2 结束父流程。需要在子流程结束事务提交后执行
|
||||||
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
|
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
|
||||||
@@ -969,7 +969,7 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService
|
|||||||
if (ObjectUtil.equal(transactionStatus, TransactionSynchronization.STATUS_ROLLED_BACK)) {
|
if (ObjectUtil.equal(transactionStatus, TransactionSynchronization.STATUS_ROLLED_BACK)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
taskService.moveTaskToEnd(parentProcessInstance.getId(),REJECT_CHILD_PROCESS.getReason());
|
taskService.moveTaskToEnd(parentProcessInstance.getId(), BpmReasonEnum.REJECT_CHILD_PROCESS.getReason());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.iot.controller.admin.ota;
|
package cn.iocoder.yudao.module.iot.controller.admin.ota;
|
||||||
|
|
||||||
|
4import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.collection.MapUtils;
|
import cn.iocoder.yudao.framework.common.util.collection.MapUtils;
|
||||||
@@ -18,7 +19,6 @@ import io.swagger.v3.oas.annotations.Parameters;
|
|||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import org.dromara.hutool.core.collection.CollUtil;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ yudao:
|
|||||||
# 针对引入的 HTTP 组件的配置
|
# 针对引入的 HTTP 组件的配置
|
||||||
# ====================================
|
# ====================================
|
||||||
http:
|
http:
|
||||||
enabled: false
|
enabled: true
|
||||||
server-port: 8092
|
server-port: 8092
|
||||||
# ====================================
|
# ====================================
|
||||||
# 针对引入的 EMQX 组件的配置
|
# 针对引入的 EMQX 组件的配置
|
||||||
|
|||||||
@@ -109,11 +109,11 @@
|
|||||||
<!-- </dependency>-->
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- IoT 物联网相关模块。默认注释,保证编译速度 -->
|
<!-- IoT 物联网相关模块。默认注释,保证编译速度 -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
<!-- <groupId>cn.iocoder.boot</groupId>-->
|
||||||
<artifactId>yudao-module-iot-biz</artifactId>
|
<!-- <artifactId>yudao-module-iot-biz</artifactId>-->
|
||||||
<version>${revision}</version>
|
<!-- <version>${revision}</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- spring boot 配置所需依赖 -->
|
<!-- spring boot 配置所需依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
Reference in New Issue
Block a user