Commit 0e0330b1 by 李小惠

更新基础数据通知本地主机

parent 9c9ffee4
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -24,6 +24,7 @@ public class UpdateReassignmentReq extends BaseRequest {
* 申请人id
*/
private String userId;
private String agentId;
private String orderCode;
......
......@@ -18,56 +18,11 @@ public enum SupplierExceptionEnum implements IExceptionEnum {
PRODUCT_SKU_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 13, "号型不存在"),
/**
* 批次信息不存在
* 厂商名称已存在
*/
BATCH_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 14, "批次不存在"),
SUPPLIER_NAME_IS_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE, "厂商名称已存在"),
/**
* 批次信息不存在
*/
BATCH_PROCESSED(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 15, "批次已生产"),
/**
* 批次生产已完成
*/
BATCH_PROCESSED_DONE(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 16, "批次生产已完成"),
/**
* 批次生产已完成
*/
MODIFY_NUM_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 17, "批次生产已完成,数量不能小于原数量"),
/**
* 标签信息不存在
*/
TAG_INFO_NOT_EXISTS(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 19, "标签信息不存在"),
/**
* 标签信息初始化完成
*/
TAG_INFO_INIT_DONE(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 20, "检查标签信息是否绑定完成"),
/**
* 标签已绑定
*/
TAG_INFO_HAD_BINDING(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 21, "标签已绑定"),
/**
* 确认绑定是否已完成
*/
TAG_UID_BINDING_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 22, "确认绑定是否已完成"),
/**
* 标签重复
*/
TAG_INFO_REPEAT_ERROR(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 23, "标签重复"),
/**
* 供应商信息不存在
*/
SUPPLIER_IS_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE, "供应商已存在"),
SUPPLIER_CODE_IS_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE, "厂商编码已存在"),
;
......
......@@ -12,6 +12,7 @@ public enum WarehouseExceptionEnum implements IExceptionEnum {
*/
WAREHOUSE_NOT_EXIST(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "仓库信息不存在"),
WAREHOUSE_IS_LOCKED(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "仓库锁库中,记账失败"),
WAREHOUSE_NAME_IS_EXIET(CommonConstant.DEFAULT_USER_ERROR_CODE + JYZBConstant.JYZB_EXCEPTION_STEP_CODE + 12, "仓库名称已存在,请勿提交重复名称"),
;
......
......@@ -6,6 +6,7 @@ import com.junmp.jyzb.entity.PubOrg;
import com.junmp.jyzb.service.CabinetService;
import com.junmp.jyzb.service.PubOrgService;
import org.springframework.amqp.core.*;
import org.springframework.amqp.rabbit.core.RabbitAdmin;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -26,6 +27,9 @@ public class TopicRabbitConfig {
@Resource
private CabinetService cabinetService;
@Resource
private RabbitAdmin rabbitAdmin;
// Inject the services using constructor injection
public TopicRabbitConfig() {
......@@ -57,7 +61,8 @@ public class TopicRabbitConfig {
// Bind the queue to the exchange with the routing key specific to the organization
Binding orgBinding = BindingBuilder.bind(orgQueue).to(topicExchange)
.with(ORG_ROUTING_KEY_PREFIX + org.getOrgId());
rabbitAdmin.declareQueue(orgQueue);
rabbitAdmin.declareBinding(orgBinding);
bindings.add(orgBinding);
}
......@@ -68,7 +73,8 @@ public class TopicRabbitConfig {
// Bind the queue to the exchange with the routing key specific to the cabinet
Binding cabinetBinding = BindingBuilder.bind(cabinetQueue).to(topicExchange)
.with(CABINET_ROUTING_KEY_PREFIX + cabinet.getCabinetNum());
rabbitAdmin.declareQueue(cabinetQueue);
rabbitAdmin.declareBinding(cabinetBinding);
bindings.add(cabinetBinding);
}
......
......@@ -126,44 +126,20 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
this.save(size);
sizeRepository.save(size);
//新增信息之后,将消息推送给所有本地主机
LambdaQueryWrapper<WarehouseDev> queryWrapper = new LambdaQueryWrapper<WarehouseDev>()
.select(WarehouseDev::getOrgId)
.groupBy(WarehouseDev::getOrgId);
List<WarehouseDev> list1 = warehouseDevService.list(queryWrapper);
List<String> orgIdsList = list1.stream()
.map(WarehouseDev::getOrgId)
.collect(Collectors.toList());
String exchangeName="baseInfoChangeExchange";
// LambdaQueryWrapper<WarehouseDev> queryWrapper = new LambdaQueryWrapper<WarehouseDev>()
// .select(WarehouseDev::getOrgId)
// .groupBy(WarehouseDev::getOrgId);
// List<WarehouseDev> list1 = warehouseDevService.list(queryWrapper);
// List<String> orgIdsList = list1.stream()
// .map(WarehouseDev::getOrgId)
// .collect(Collectors.toList());
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为号型
mqDto.setType(1);
mqDto.setMessage("Adding sizeInfo");
List<String> MQList=new ArrayList<>();
for (String orgId:orgIdsList) {
String queueName=orgId+"InfoChange";
int messageCount = rabbitTemplate.execute(channel -> {
AMQP.Queue.DeclareOk declareOk = channel.queueDeclarePassive(queueName);
return declareOk.getMessageCount();
});
if (messageCount==0){
MQList.add(queueName);
}
}
//将需要发送消息的队列通过add出来之后,将通过异步的方式分别将消息推送到指定的队列中去
List<CompletableFuture<Void>> futures = MQList.stream()
.map(queueName -> CompletableFuture.runAsync(() -> {
// 执行推送消息的逻辑
// pushMessage(orgId);
MQ.SendMsg(exchangeName,queueName,mqDto);
}))
.collect(Collectors.toList());
// 等待所有 CompletableFuture 完成
CompletableFuture<Void> allOf = CompletableFuture.allOf(futures.toArray(new CompletableFuture[0]));
allOf.join();
MQ.sendToExchange(exchangeName,"org.*",mqDto);
return sizeID+"||"+code;
}
......@@ -201,8 +177,14 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
BeanPlusUtil.copyProperties(req, size);
size.setUpdateTime(DateTimeUtil.getCurrentDateTime());
sizeRepository.save(size);
//推送消息通知
// MQ.SendMsg();
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为号型
mqDto.setType(1);
mqDto.setMessage("Updating sizeInfo");
MQ.sendToExchange(exchangeName,"org.*",mqDto);
return this.updateById(size);
}
......@@ -220,16 +202,13 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
LambdaQueryWrapper<EquipmentSize> wrapper = createWrapper(req);
List<EquipmentSize> es = this.list(wrapper);
List<EquipmentSizeDto> dtoList = new ArrayList<>();
// 将 EquipmentSize 对象转换为 EquipmentSizeDto 对象并添加到 dtoList 中
for (EquipmentSize equipmentSize : es) {
EquipmentSizeDto dto = new EquipmentSizeDto();
BeanPlusUtil.copyProperties(equipmentSize, dto);
dtoList.add(dto);
}
return dtoList;
List<EquipmentSizeDto> collect = es.stream().map(equipmentSize -> {
EquipmentSizeDto dto = new EquipmentSizeDto();
BeanPlusUtil.copyProperties(equipmentSize, dto);
return dto;}
).sorted(Comparator.comparing(dto -> Integer.parseInt(dto.getCode())))
.collect(Collectors.toList());
return collect;
}
@Override
public PageResult<EquipmentSizeDto> getSizePages(QueryEquipmentSizeReq req) {
......@@ -300,7 +279,7 @@ public class EquipmentSizeServiceImpl extends ServiceImpl<EquipmentSizeMapper, E
//根据名称模糊查询
wrapper.like(ObjectUtil.isNotEmpty(req.getName()), EquipmentSize::getName, req.getName());
wrapper.orderByDesc(EquipmentSize::getCreateTime);
// wrapper.orderByAsc(EquipmentSize::getCode);
return wrapper;
}
}
\ No newline at end of file
......@@ -7,12 +7,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.junmp.jyzb.Repository.TypeRepository;
import com.junmp.jyzb.api.bean.dto.ESTypeDto;
import com.junmp.jyzb.api.bean.dto.EquipmentTypeDto;
import com.junmp.jyzb.api.bean.dto.EquipmentTreeDto;
import com.junmp.jyzb.api.bean.dto.*;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.SizeDto;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.TypeDto;
import com.junmp.jyzb.api.bean.dto.SizeAndTypeDto;
import com.junmp.jyzb.api.bean.query.QueryEquipmentTypeReq;
import com.junmp.jyzb.api.bean.req.UpdateEquipmentTypeReq;
import com.junmp.jyzb.api.exception.JYZBAppException;
......@@ -65,6 +62,9 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
@Resource
private EquipmentCountSummaryMapper equipmentCountSummaryMapper;
@Autowired
private RabbitMQSendMsg MQ;
@Resource
private EquipmentSizeService equipmentSizeService;
private static final String REDIS_TYPE = "Type_";
......@@ -136,6 +136,15 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
this.save(type);
//更新parent_ids字段
equipmentTypeMapper.setTypeParentIds();
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(2);
mqDto.setMessage("Adding typeInfo");
MQ.sendToExchange(exchangeName,"org.*",mqDto);
return String.valueOf(newcode);
} else {
String msg="以下供应商不存在:" +String.join(",", chekResult);
......@@ -166,7 +175,11 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
.set(EquipmentSize::getEpcType,req.getEpcType())
.eq(EquipmentSize::getTypeId,req.getId()));
}
EquipmentType type = this.queryEqType(req);
EquipmentType type = this.getById(req.getId());
if (ObjectUtil.isNull(type)) {
throw new ServiceException(EquipmentExceptionEnum.EQUIPMENT_TYPE_NOT_EXIST);
}
req.setCode(type.getCode());//为了以防typeCode不一致的问题
List<String> chekResult = supplierService.CheckSupplierList(req.getSupplierList());
if (chekResult.size() == 0) {
// 先增加code码
......@@ -228,6 +241,14 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
}
// 保存type
type.setUpdateTime(DateTimeUtil.getCurrentDateTime());
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(2);
mqDto.setMessage("Updating typeInfo");
MQ.sendToExchange(exchangeName,"org.*",mqDto);
return this.updateById(type);
} else {
String msg="以下供应商不存在:" +String.join(",", chekResult);
......@@ -235,14 +256,7 @@ public class EquipmentTypeServiceImpl extends ServiceImpl<EquipmentTypeMapper, E
}
}
private EquipmentType queryEqType(UpdateEquipmentTypeReq req) {
EquipmentType type = this.getById(req.getId());
if (ObjectUtil.isNull(type)) {
throw new ServiceException(EquipmentExceptionEnum.EQUIPMENT_TYPE_NOT_EXIST);
}
return type;
}
@Override
......
package com.junmp.jyzb.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.SupplierInfoDto;
import com.junmp.jyzb.api.bean.dto.MQDto;
import com.junmp.jyzb.api.bean.dto.SupplierDto;
import com.junmp.jyzb.api.bean.query.QuerySupplierReq;
import com.junmp.jyzb.api.bean.req.UpdateSupplierReq;
......@@ -13,11 +15,13 @@ import com.junmp.jyzb.entity.Supplier;
import com.junmp.jyzb.service.OrderMainService;
import com.junmp.jyzb.service.SupplierService;
import com.junmp.jyzb.utils.DateTimeUtil;
import com.junmp.jyzb.utils.RabbitMQSendMsg;
import com.junmp.v2.common.exception.base.ServiceException;
import com.junmp.v2.common.util.BeanPlusUtil;
import com.junmp.v2.db.api.factory.PageFactory;
import com.junmp.v2.db.api.factory.PageResultFactory;
import com.junmp.v2.db.api.page.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.junmp.jyzb.mapper.SupplierMapper;
......@@ -33,14 +37,25 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
@Resource
OrderMainService orderMainService;
@Autowired
private RabbitMQSendMsg MQ;
@Resource
private SupplierMapper supplierMapper;
@Override
public String AddSupplier(UpdateSupplierReq req) {
Supplier one = getOne(new LambdaQueryWrapper<Supplier>().eq(Supplier::getName, req.getName()));
if (one != null){
throw new ServiceException(SupplierExceptionEnum.SUPPLIER_IS_EXIST);
List<Supplier> list = list(new LambdaQueryWrapper<Supplier>()
.eq(Supplier::getName, req.getName()).or().eq(Supplier::getCode, req.getCode()));
if (CollectionUtil.isNotEmpty(list)){
for (Supplier supplier:list) {
if (supplier.getName().equals(req.getName())){
throw new ServiceException(SupplierExceptionEnum.SUPPLIER_NAME_IS_EXIST);
}
if (supplier.getCode().equals(req.getCode())){
throw new ServiceException(SupplierExceptionEnum.SUPPLIER_CODE_IS_EXIST);
}
}
}
Supplier supplier = new Supplier();
String ID=UUID.randomUUID().toString();
......@@ -48,7 +63,16 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
BeanPlusUtil.copyProperties(req, supplier);
supplier.setCreateTime(DateTimeUtil.getCurrentDateTime());
supplier.setUpdateTime(DateTimeUtil.getCurrentDateTime());
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(3);
mqDto.setMessage("Adding supplierInfo");
MQ.sendToExchange(exchangeName,"org.*",mqDto);
this.save(supplier);
return ID;
}
......@@ -62,19 +86,23 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
@Override
public boolean UpdateSupplier(UpdateSupplierReq req) {
Supplier supplier = this.QuerySupplier(req);
Supplier supplier = this.getById(req.getId());
if (ObjectUtil.isNull(supplier)) {
throw new ServiceException(SupplierExceptionEnum.SUPPLIER_NOT_EXIST);
}
req.setCode(supplier.getCode());//为了控制code不一致的情况
BeanPlusUtil.copyProperties(req, supplier);
supplier.setUpdateTime(DateTimeUtil.getCurrentDateTime());
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(3);
mqDto.setMessage("Updating supplierInfo");
MQ.sendToExchange(exchangeName,"org.*",mqDto);
return this.updateById(supplier);
}
private Supplier QuerySupplier(UpdateSupplierReq req) {
Supplier app = this.getById(req.getId());
if (ObjectUtil.isNull(app)) {
throw new ServiceException(SupplierExceptionEnum.SUPPLIER_NOT_EXIST);
}
return app;
}
public List<String> CheckSupplierList(List<String> req){
......@@ -145,7 +173,10 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
@Override
public Boolean ChangeSupplierState(UpdateSupplierReq req) {
Supplier supplier = this.QuerySupplier(req);
Supplier supplier = this.getById(req.getId());
if (ObjectUtil.isNull(supplier)) {
throw new ServiceException(SupplierExceptionEnum.SUPPLIER_NOT_EXIST);
}
BeanPlusUtil.copyProperties(req, supplier);
supplier.setUpdateTime(DateTimeUtil.getCurrentDateTime());
return this.updateById(supplier);
......
package com.junmp.jyzb.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.junmp.jyzb.api.bean.dto.FetchingDataDto.WarehouseInfoDto;
import com.junmp.jyzb.api.bean.dto.MQDto;
import com.junmp.jyzb.api.bean.dto.WarehouseDto;
import com.junmp.jyzb.api.bean.query.PolicemanReq;
import com.junmp.jyzb.api.bean.query.WarehouseReq;
......@@ -20,6 +22,7 @@ import com.junmp.jyzb.utils.*;
import com.junmp.v2.common.exception.base.ServiceException;
import com.junmp.v2.common.util.BeanPlusUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -44,15 +47,29 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
@Resource
private TemperatureRedisCache temperatureRedisCache;
@Autowired
private RabbitMQSendMsg MQ;
@Override
public String AddWarehouse(UpdateWarehouseReq req) {
List<Warehouse> list = list(new LambdaQueryWrapper<Warehouse>().eq(Warehouse::getName, req.getName()));
if (CollectionUtil.isNotEmpty(list)){
throw new ServiceException(WarehouseExceptionEnum.WAREHOUSE_NAME_IS_EXIET);
}
Warehouse warehouse = new Warehouse();
BeanPlusUtil.copyProperties(req, warehouse);
warehouse.setCreateTime(DateTimeUtil.getCurrentDateTime());
warehouse.setUpdateTime(DateTimeUtil.getCurrentDateTime());
save(warehouse);
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(4);
mqDto.setMessage("Adding warehouseInfo");
MQ.sendToExchange(exchangeName,"org."+warehouse.getOrgId(),mqDto);
return warehouse.getId();
}
......@@ -85,9 +102,20 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
@Override
public boolean updateWarehouse(UpdateWarehouseReq req) {
List<Warehouse> list = list(new LambdaQueryWrapper<Warehouse>().eq(Warehouse::getName, req.getName()));
if (CollectionUtil.isNotEmpty(list)){
throw new ServiceException(WarehouseExceptionEnum.WAREHOUSE_NAME_IS_EXIET);
}
Warehouse warehouse = new Warehouse();
BeanPlusUtil.copyProperties(req,warehouse);
warehouse.setUpdateTime(DateTimeUtil.getCurrentDateTime());
String exchangeName="topicExchange";
MQDto mqDto = new MQDto();
mqDto.setApi("InfoChange");
//更改类别,1为类型
mqDto.setType(4);
mqDto.setMessage("Updating warehouseInfo");
MQ.sendToExchange(exchangeName,"org."+warehouse.getOrgId(),mqDto);
return this.updateById(warehouse);
}
......@@ -182,13 +210,13 @@ public class WarehouseServiceImpl extends ServiceImpl<WarehouseMapper,Warehouse>
@Override
@Transactional(rollbackFor = Exception.class)
public boolean updateHumidityAndtemperature(HumidityAndtemperature req) {
Date date = new Date(req.getCreateTime()*1000);
Date date = new Date(req.getCreateTime());
//查询数据库仓库id取到仓库名称
Warehouse warehouse = getById(req.getWarehouseId());
//将数据放入redis
temperatureRedisCache.addTemperatureHumidity(req.getWarehouseId(),warehouse.getName(),
req.getCreateTime()*1000,req.getHumidity(),req.getTemperature());
req.getCreateTime(),req.getHumidity(),req.getTemperature());
//更新仓库的温度和湿度
warehouse.setHumidity(req.getHumidity());
warehouse.setTemperature(req.getTemperature());
......
......@@ -23,6 +23,7 @@ public class RabbitMQSendMsg {
rabbitAdmin.declareQueue(queue);
rabbitAdmin.declareExchange(exchange);
rabbitAdmin.declareBinding(BindingBuilder.bind(queue).to(exchange).with(name).noargs());
String jsonString = JSON.toJSONString(msg);
// // 创建 MessageProperties 对象,并设置 TTL
// MessageProperties messageProperties = new MessageProperties();
......@@ -39,6 +40,10 @@ public class RabbitMQSendMsg {
String routingKey = "org." + orgId;
rabbitTemplate.convertAndSend("topicExchange", routingKey, message);
}
public void sendToExchange(String exchangeName,String routingKey,Object msg){
String jsonString = JSON.toJSONString(msg);
rabbitTemplate.convertAndSend(exchangeName,routingKey,jsonString);
}
public void publishCabinetMessage(String cabinetId, String message) {
String routingKey = "cabinet." + cabinetId;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论