Commit 64cc1a80 authored by 赵啸非's avatar 赵啸非

添加消息队列创建与删除

parent 24448285
......@@ -52,6 +52,19 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
@Autowired
private MessageService messageService;
@Override
protected void validData(DeviceEntity entity, Context context) throws AppException {
if(!ObjectUtils.isEmpty(entity.getPlatformId())){
throw new AppException("所属平台不能为空!");
}
if(!ObjectUtils.isEmpty(entity.getProductId())){
throw new AppException("所属产品不能为空!");
}
super.validData(entity, context);
}
@Override
public ApiResp<String> sendDeviceMessage(DeviceEntity deviceEntity, TopicPartitionInfo info, TbQueueMsgHeaders header, String message, Context context) {
ApiResp<String> resp = new ApiResp<>();
......
......@@ -111,6 +111,8 @@ public class DeviceController extends BaseCRUDJsonMappingController<DeviceServic
super.init(request, response, form, model, context);
}
/**
* 下发信息
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment