|  |  | package com.sunyo.wlpt.message.bus.service.controller; | 
|  |  |  | 
|  |  |  | 
|  |  | import com.github.pagehelper.PageInfo; | 
|  |  | import com.sunyo.wlpt.message.bus.service.model.MessageRouter; | 
|  |  | import com.sunyo.wlpt.message.bus.service.model.MessageRouterReciver; | 
|  |  | import com.sunyo.wlpt.message.bus.service.response.ResultJson; | 
|  |  | import com.sunyo.wlpt.message.bus.service.service.MessageRouterReciverService; | 
|  |  | import com.sunyo.wlpt.message.bus.service.utils.IdUtils; | 
|  |  | import io.swagger.annotations.ApiOperation; | 
|  |  | import org.apache.commons.lang.StringUtils; | 
|  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|  |  | import org.springframework.transaction.annotation.Propagation; | 
|  |  | import org.springframework.transaction.annotation.Transactional; | 
|  |  | import org.springframework.web.bind.annotation.*; | 
|  |  |  | 
|  |  | @RequestMapping("/bus/router") | 
|  |  | @RestController | 
|  |  | public class RouterReceiverController { | 
|  |  |  | 
|  |  | @Autowired | 
|  |  | MessageRouterReciverService messageRouterReciverService; | 
|  |  |  | 
|  |  |  | 
|  |  | @ApiOperation(value = "添加路由接收者", notes = "添加路由接收者数组,参数必须要有:路由ID,接收者数组rcvrs") | 
|  |  | @PostMapping("/receiver") | 
|  |  | public ResultJson batchAddRouter(@RequestBody MessageRouter messageRouter){ | 
|  |  | boolean result = messageRouterReciverService.batchAddMessageRouterReciver(messageRouter); | 
|  |  | return  result ? new ResultJson("200","success") :new ResultJson("400","添加失败,没有订阅者或出现异常"); | 
|  |  | } | 
|  |  |  | 
|  |  | @ApiOperation(value = "删除路由接收者接口", notes = "接收路由接收者对象,根据接收者ID进行删除") | 
|  |  | @DeleteMapping("/receiver") | 
|  |  | public ResultJson del(@RequestBody MessageRouterReciver reciver){ | 
|  |  | boolean result = messageRouterReciverService.delReciver(reciver); | 
|  |  | return  result ? new ResultJson("200","success") :new ResultJson("400","添加失败,没有订阅者或出现异常"); | 
|  |  | } | 
|  |  | } | 
... | ... |  |