切换导航条
此项目
正在载入...
登录
message_bus
/
message_bus_service
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
王勇
5 years ago
提交
7663521cbde15db4e81a27f1a80c1ca50feef673
1 个父辈
04bb8230
添加配置,使用username,而不是userID
显示空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
9 行增加
和
8 行删除
src/main/java/com/sunyo/wlpt/message/bus/service/controller/UserMessageBindingController.java
src/main/resources/mapper/UserMessageBindingMapper.xml
src/main/java/com/sunyo/wlpt/message/bus/service/controller/UserMessageBindingController.java
查看文件 @
7663521
...
...
@@ -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"
,
"添加-账户消息配置-信息,失败"
);
...
...
src/main/resources/mapper/UserMessageBindingMapper.xml
查看文件 @
7663521
...
...
@@ -364,8 +364,11 @@
from user_message_binding
<where>
<!-- 所属用户id -->
<if
test=
"userId != null and userId != ''"
>
user_id = #{userId,jdbcType=VARCHAR}
<!-- <if test="userId != null and userId != ''">-->
<!-- user_id = #{userId,jdbcType=VARCHAR}-->
<!-- </if>-->
<if
test=
"username != null and username != ''"
>
AND username = #{username,jdbcType=VARCHAR}
</if>
<!-- 所属服务器id -->
<if
test=
"serverId != null and serverId != ''"
>
...
...
请
注册
或
登录
后发表评论