Commit 934aeea2bbf264f49a796040c7e491c2545072af
1 parent
2e6ddb3e
fix(DEFECT-1561): 消息配置更新时间未刷新问题
消息配置多次编辑,更新时间没有同步刷新的问题修复
Showing
1 changed file
with
10 additions
and
6 deletions
... | ... | @@ -2,12 +2,16 @@ package org.thingsboard.server.dao.yunteng.impl; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; |
5 | +import java.util.List; | |
6 | +import java.util.Map; | |
7 | +import java.util.Set; | |
5 | 8 | import lombok.RequiredArgsConstructor; |
6 | 9 | import lombok.extern.slf4j.Slf4j; |
7 | 10 | import org.apache.commons.lang3.StringUtils; |
8 | 11 | import org.springframework.stereotype.Service; |
9 | 12 | import org.springframework.transaction.annotation.Transactional; |
10 | 13 | import org.thingsboard.server.common.data.yunteng.constant.FastIotConstants; |
14 | +import org.thingsboard.server.common.data.yunteng.constant.ModelConstants; | |
11 | 15 | import org.thingsboard.server.common.data.yunteng.core.exception.TkDataValidationException; |
12 | 16 | import org.thingsboard.server.common.data.yunteng.core.message.ErrorMessage; |
13 | 17 | import org.thingsboard.server.common.data.yunteng.dto.MessageConfigDTO; |
... | ... | @@ -18,10 +22,6 @@ import org.thingsboard.server.dao.yunteng.mapper.MessageConfigMapper; |
18 | 22 | import org.thingsboard.server.dao.yunteng.service.AbstractBaseService; |
19 | 23 | import org.thingsboard.server.dao.yunteng.service.TkMessageConfigService; |
20 | 24 | |
21 | -import java.util.List; | |
22 | -import java.util.Map; | |
23 | -import java.util.Set; | |
24 | - | |
25 | 25 | @Service |
26 | 26 | @Slf4j |
27 | 27 | @RequiredArgsConstructor |
... | ... | @@ -46,7 +46,8 @@ public class TkMessageConfigServiceImpl |
46 | 46 | String.valueOf(queryMap.get("messageType"))) |
47 | 47 | .eq( |
48 | 48 | queryMap.get("status") != null, |
49 | - TkMessageConfigEntity::getStatus, queryMap.get("status")) | |
49 | + TkMessageConfigEntity::getStatus, | |
50 | + queryMap.get("status")) | |
50 | 51 | .eq(true, TkMessageConfigEntity::getTenantId, tenantId)); |
51 | 52 | return getPageData(configIPage, MessageConfigDTO.class); |
52 | 53 | } |
... | ... | @@ -82,7 +83,10 @@ public class TkMessageConfigServiceImpl |
82 | 83 | } |
83 | 84 | checkMessageConfig(configDTO, tenantId); |
84 | 85 | } |
85 | - configDTO.copyToEntity(config); | |
86 | + configDTO.copyToEntity( | |
87 | + config, | |
88 | + ModelConstants.TablePropertyMapping.CREATOR, | |
89 | + ModelConstants.TablePropertyMapping.CREATE_TIME); | |
86 | 90 | config.setTenantId(tenantId); |
87 | 91 | baseMapper.updateById(config); |
88 | 92 | config.copyToDTO(configDTO); | ... | ... |