...
|
...
|
@@ -4,6 +4,7 @@ package com.sunyo.wlpt.message.bus.service.controller; |
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding;
|
|
|
import com.sunyo.wlpt.message.bus.service.response.ResultJson;
|
|
|
import com.sunyo.wlpt.message.bus.service.service.UserInfoService;
|
|
|
import com.sunyo.wlpt.message.bus.service.service.UserMessageBindingService;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
...
|
...
|
@@ -23,6 +24,9 @@ import java.util.concurrent.TimeoutException; |
|
|
public class UserMessageBindingController {
|
|
|
|
|
|
@Resource
|
|
|
private UserInfoService userInfoService;
|
|
|
|
|
|
@Resource
|
|
|
private UserMessageBindingService userMessageBindingService;
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -49,7 +53,6 @@ public class UserMessageBindingController { |
|
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize)
|
|
|
{
|
|
|
// 获取查询参数
|
|
|
UserMessageBinding userMessageBinding = UserMessageBinding.builder()
|
|
|
.username(username)
|
|
|
.serverName(serverName)
|
...
|
...
|
@@ -58,7 +61,6 @@ public class UserMessageBindingController { |
|
|
.queueName(queueName)
|
|
|
.routingKeyName(routingKeyName)
|
|
|
.build();
|
|
|
// 分页查询
|
|
|
PageInfo pageInfo = userMessageBindingService.selectUserMessageBindingList(userMessageBinding, pageNum, pageSize);
|
|
|
return pageInfo.getTotal() > 0
|
|
|
? new ResultJson<>("200", "查询-账户消息绑定配置列表,成功!", pageInfo)
|
...
|
...
|
@@ -75,7 +77,6 @@ public class UserMessageBindingController { |
|
|
public ResultJson deleteUserMessageBinding(@RequestBody UserMessageBinding userMessageBinding)
|
|
|
throws IOException, TimeoutException
|
|
|
{
|
|
|
// 执行删除方法
|
|
|
return userMessageBindingService.deleteByPrimaryKey(userMessageBinding.getId()) > 0
|
|
|
? new ResultJson<>("200", "删除-账户消息配置信息,成功")
|
|
|
: new ResultJson<>("500", "删除-账户消息配置信息,失败");
|
...
|
...
|
@@ -91,7 +92,6 @@ public class UserMessageBindingController { |
|
|
public ResultJson batchRemoveUserMessageBinding(String ids)
|
|
|
throws IOException, TimeoutException
|
|
|
{
|
|
|
// 执行批量删除
|
|
|
return userMessageBindingService.deleteByPrimaryKey(ids) > 0
|
|
|
? new ResultJson<>("200", "批量删除-账户消息配置信息,成功")
|
|
|
: new ResultJson<>("500", "批量删除-账户消息配置信息,失败");
|
...
|
...
|
@@ -106,7 +106,6 @@ public class UserMessageBindingController { |
|
|
@PutMapping("/update")
|
|
|
public ResultJson updateUserMessageBinding(@RequestBody UserMessageBinding userMessageBinding)
|
|
|
{
|
|
|
// 执行编辑
|
|
|
return userMessageBindingService.updateByPrimaryKeySelective(userMessageBinding) > 0
|
|
|
? new ResultJson<>("200", "编辑-账户消息配置-信息,成功")
|
|
|
: new ResultJson<>("500", "编辑-账户消息配置-信息,失败");
|
...
|
...
|
@@ -122,7 +121,6 @@ public class UserMessageBindingController { |
|
|
public ResultJson insertUserMessageBinding(@RequestBody UserMessageBinding userMessageBinding)
|
|
|
throws IOException, TimeoutException
|
|
|
{
|
|
|
// 执行新增
|
|
|
return userMessageBindingService.insertSelective(userMessageBinding) > 0
|
|
|
? new ResultJson<>("200", "添加-账户消息配置-信息,成功")
|
|
|
: new ResultJson<>("500", "添加-账户消息配置-信息,失败");
|
...
|
...
|
|