1.mq新增消费组

2.用户组件功能调整
This commit is contained in:
2023-09-07 09:45:44 +08:00
parent a44659ce98
commit 13e1c85c79
6 changed files with 24 additions and 1 deletions

View File

@@ -38,8 +38,13 @@ public interface ServerInfo {
String CS_HARMONIC_BOOT = "cs-harmonic-boot"; String CS_HARMONIC_BOOT = "cs-harmonic-boot";
String CS_REPORT_BOOT = "cs-report-boot"; String CS_REPORT_BOOT = "cs-report-boot";
String ACCESS_BOOT = "access-boot";
String CS_STAT_BOOT = "stat-boot"; String CS_STAT_BOOT = "stat-boot";
String CS_RT_BOOT = "rt-boot"; String CS_RT_BOOT = "rt-boot";
String CS_ZL_EVENT_BOOT = "zl-event-boot"; String CS_ZL_EVENT_BOOT = "zl-event-boot";

View File

@@ -11,7 +11,7 @@ import lombok.Data;
* @version 1.0.0 * @version 1.0.0
* @createTime 2023/9/5 16:38 * @createTime 2023/9/5 16:38
*/ */
@Data
public class AppFileMessage extends BaseMessage { public class AppFileMessage extends BaseMessage {
@ApiModelProperty("网络设备码") @ApiModelProperty("网络设备码")
@@ -38,11 +38,15 @@ public class AppFileMessage extends BaseMessage {
private AppFileMessage.FileInfo fileInfo; private AppFileMessage.FileInfo fileInfo;
private String data; private String data;
private String name;
} }
@Data @Data
public static class FileInfo{ public static class FileInfo{
private String name;
private Long fileTime; private Long fileTime;
private Integer fileSize; private Integer fileSize;

View File

@@ -26,4 +26,5 @@ public class AppFileMessageTemplate extends RocketMQEnhanceTemplate {
appFileMessage.setSource(BusinessResource.APP_RESOURCE); appFileMessage.setSource(BusinessResource.APP_RESOURCE);
return send(BusinessTopic.NJCN_APP_FILE_TOPIC, tag, appFileMessage); return send(BusinessTopic.NJCN_APP_FILE_TOPIC, tag, appFileMessage);
} }
} }

View File

@@ -46,4 +46,9 @@ public interface AppRedisKey {
*/ */
String RMQ_CONSUME_KEY="rocketMQConsumeKey:"; String RMQ_CONSUME_KEY="rocketMQConsumeKey:";
/**
* rocketMQ消费文件key
*/
String RMQ_FILE_CONSUME_KEY="rocketMQFileConsumeKey:";
} }

View File

@@ -24,6 +24,7 @@ public enum SystemResponseEnum {
INTERFERENCE_EMPTY("A00356","查询字典干扰源类型数据为空"), INTERFERENCE_EMPTY("A00356","查询字典干扰源类型数据为空"),
BUSINESS_EMPTY("A00356","查询字典行业类型数据为空"), BUSINESS_EMPTY("A00356","查询字典行业类型数据为空"),
SYSTEM_TYPE_EMPTY("A00356","查询字典系统类型数据为空"),
DEV_TYPE_EMPTY("A00357","查询字典设备类型数据为空"), DEV_TYPE_EMPTY("A00357","查询字典设备类型数据为空"),
MANUFACTURER("A00358","查询字典终端厂家数据为空"), MANUFACTURER("A00358","查询字典终端厂家数据为空"),
DEV_VARIETY("A00359","查询字典终端类型数据为空"), DEV_VARIETY("A00359","查询字典终端类型数据为空"),

View File

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.common.pojo.exception.BusinessException; import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.system.api.DicDataFeignClient; import com.njcn.system.api.DicDataFeignClient;
import com.njcn.system.enums.SystemResponseEnum;
import com.njcn.system.pojo.po.DictData; import com.njcn.system.pojo.po.DictData;
import com.njcn.user.enums.UserResponseEnum; import com.njcn.user.enums.UserResponseEnum;
import com.njcn.user.mapper.ComponentMapper; import com.njcn.user.mapper.ComponentMapper;
@@ -103,6 +104,9 @@ public class ComponentServiceImpl extends ServiceImpl<ComponentMapper, Component
Map<String,List<ComponentVO>> map = list.stream().filter(m->!Objects.isNull(m.getSystemType())).collect(Collectors.groupingBy(ComponentVO::getSystemType)); Map<String,List<ComponentVO>> map = list.stream().filter(m->!Objects.isNull(m.getSystemType())).collect(Collectors.groupingBy(ComponentVO::getSystemType));
map.forEach((k,v)->{ map.forEach((k,v)->{
DictData dictData = dicDataFeignClient.getDicDataById(k).getData(); DictData dictData = dicDataFeignClient.getDicDataById(k).getData();
if (Objects.isNull(dictData)){
throw new BusinessException(SystemResponseEnum.SYSTEM_TYPE_EMPTY);
}
ComponentVO componentVO = new ComponentVO(); ComponentVO componentVO = new ComponentVO();
componentVO.setId(dictData.getId()); componentVO.setId(dictData.getId());
componentVO.setName(dictData.getName()); componentVO.setName(dictData.getName());
@@ -145,6 +149,9 @@ public class ComponentServiceImpl extends ServiceImpl<ComponentMapper, Component
Map<String,List<ComponentVO>> map = componentVOList.stream().collect(Collectors.groupingBy(ComponentVO::getSystemType)); Map<String,List<ComponentVO>> map = componentVOList.stream().collect(Collectors.groupingBy(ComponentVO::getSystemType));
map.forEach((k, v)->{ map.forEach((k, v)->{
DictData dictData = dicDataFeignClient.getDicDataById(k).getData(); DictData dictData = dicDataFeignClient.getDicDataById(k).getData();
if (Objects.isNull(dictData)){
throw new BusinessException(SystemResponseEnum.SYSTEM_TYPE_EMPTY);
}
ComponentVO componentVO = new ComponentVO(); ComponentVO componentVO = new ComponentVO();
componentVO.setName(dictData.getName()); componentVO.setName(dictData.getName());
componentVO.setChildren( componentVO.setChildren(