Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
bb9ec0e5
Commit
bb9ec0e5
authored
Jun 07, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改用户列表查询
parent
7823f81b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
15 deletions
+63
-15
base-manager/src/test/java/com/mortals/httpclient/product/ProductController.http
...ava/com/mortals/httpclient/product/ProductController.http
+0
-1
portal-manager/doc/api.md
portal-manager/doc/api.md
+25
-9
portal-manager/src/main/java/com/mortals/xhx/module/user/model/vo/UserVo.java
...ain/java/com/mortals/xhx/module/user/model/vo/UserVo.java
+26
-0
portal-manager/src/main/java/com/mortals/xhx/module/user/web/UserController.java
.../java/com/mortals/xhx/module/user/web/UserController.java
+0
-1
portal-manager/src/main/resources/sqlmap/module/user/userExt.xml
...manager/src/main/resources/sqlmap/module/user/userExt.xml
+4
-2
portal-manager/src/test/java/com/mortals/httpclient/user/UserController.http
...test/java/com/mortals/httpclient/user/UserController.http
+8
-2
No files found.
base-manager/src/test/java/com/mortals/httpclient/product/ProductController.http
View file @
bb9ec0e5
###产品列表
###产品列表
POST {{baseUrl}}/product/list
POST {{baseUrl}}/product/list
Authorization: {{authToken}}
Content-Type: application/json
Content-Type: application/json
{
{
...
...
portal-manager/doc/api.md
View file @
bb9ec0e5
...
@@ -262,14 +262,29 @@ Content-Type: multipart/form-data
...
@@ -262,14 +262,29 @@ Content-Type: multipart/form-data
:---|:---|:---|:------
:---|:---|:---|:------
page|Integer|否|当前页
page|Integer|否|当前页
size|Integer|否|每页条数,值为-1,查询所有记录
size|Integer|否|每页条数,值为-1,查询所有记录
roleId|String|否|角色权限id
orConditionList|Arrays|否|复合查询条件,对象间关系为或,
 
loginName|String|否|登录名称
 
realName|String|否|用户姓名
 
mobile|String|否|手机号码
**请求样例:**
**请求样例:**
```
```
{
{
"page":1,
"page":1,
"size":10
"size":10,
"roleId":"1",
"orConditionList":[
{
"loginName":"zhang3"
},
{
"realName":"张三"
},
{
"mobile":"13281114856"
}
]
}
}
```
```
**响应参数:**
**响应参数:**
...
@@ -291,9 +306,11 @@ data|object|数据对象
...
@@ -291,9 +306,11 @@ data|object|数据对象
  
areaCodes|String|所属区域code,多个逗号分隔
  
areaCodes|String|所属区域code,多个逗号分隔
  
roleId|String|所属角色id,多个逗号分隔
  
roleId|String|所属角色id,多个逗号分隔
  
roleName|String|所属角色名称,多个逗号分隔
  
roleName|String|所属角色名称,多个逗号分隔
  
lastLoginTime|Date|创建时间
dict|object|字典对象
dict|object|字典对象
 
userType|object|字典属性对象,详见附录
 
userType|object|字典属性对象,详见附录
 
status|object|字典属性对象,详见附录
 
status|object|字典属性对象,详见附录
 
roleId|object|字典属性对象,详见附录
**响应消息样例:**
**响应消息样例:**
```
```
...
@@ -404,7 +421,7 @@ data|object|数据对象
...
@@ -404,7 +421,7 @@ data|object|数据对象
  
areaCodes|String|所属区域code,多个逗号分隔
  
areaCodes|String|所属区域code,多个逗号分隔
  
roleId|String|所属角色id,多个逗号分隔
  
roleId|String|所属角色id,多个逗号分隔
  
roleName|String|所属角色名称,多个逗号分隔
  
roleName|String|所属角色名称,多个逗号分隔
  
lastLoginTime|Date|创建时间
**响应消息样例:**
**响应消息样例:**
```
```
{
{
...
@@ -473,10 +490,10 @@ size|Integer|否|每页条数,值为-1,查询所有记录
...
@@ -473,10 +490,10 @@ size|Integer|否|每页条数,值为-1,查询所有记录
**请求样例:**
**请求样例:**
```
```
{
{
"page":1,
"page":1,
"size":10
"size":10,
}
}
```
```
**响应参数:**
**响应参数:**
...
@@ -495,7 +512,6 @@ data|object|数据对象
...
@@ -495,7 +512,6 @@ data|object|数据对象
  
name|String|角色名称
  
name|String|角色名称
  
roleCode|String|角色编码
  
roleCode|String|角色编码
  
roleSort|Integer|角色排序字段
  
roleSort|Integer|角色排序字段
  
roleType|Integer|角色类型(0.系统内置角色,1.默认系统角色,2.普通角色)
  
remark|String|备注
  
remark|String|备注
  
roleType|Integer|角色状态(0.停用,1.启用)
  
roleType|Integer|角色状态(0.停用,1.启用)
  
createTime|Date|创建时间
  
createTime|Date|创建时间
...
...
portal-manager/src/main/java/com/mortals/xhx/module/user/model/vo/UserVo.java
View file @
bb9ec0e5
package
com.mortals.xhx.module.user.model.vo
;
package
com.mortals.xhx.module.user.model.vo
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.xhx.module.menu.model.MenuEntity
;
import
com.mortals.xhx.module.menu.model.MenuEntity
;
import
com.mortals.xhx.module.user.model.UserEntity
;
import
com.mortals.xhx.module.user.model.UserQuery
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -16,6 +19,10 @@ import java.util.List;
...
@@ -16,6 +19,10 @@ import java.util.List;
@Data
@Data
public
class
UserVo
extends
BaseEntityLong
{
public
class
UserVo
extends
BaseEntityLong
{
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private
List
<
UserQuery
>
orConditionList
;
/**
/**
* 唯一标识
* 唯一标识
*/
*/
...
@@ -48,4 +55,23 @@ public class UserVo extends BaseEntityLong {
...
@@ -48,4 +55,23 @@ public class UserVo extends BaseEntityLong {
/** 查询条件 */
/** 查询条件 */
private
String
query
;
private
String
query
;
public
static
void
main
(
String
[]
args
)
{
UserQuery
userEntity
=
new
UserQuery
();
userEntity
.
setRealName
(
"张三"
);
UserQuery
userQuery
=
new
UserQuery
();
List
<
UserQuery
>
conditionList
=
new
ArrayList
<>();
conditionList
.
add
(
userEntity
);
userQuery
.
setOrConditionList
(
conditionList
);
System
.
out
.
println
(
JSON
.
toJSONString
(
userQuery
));
}
}
}
\ No newline at end of file
portal-manager/src/main/java/com/mortals/xhx/module/user/web/UserController.java
View file @
bb9ec0e5
...
@@ -93,7 +93,6 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
...
@@ -93,7 +93,6 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
JSONObject
ret
=
new
JSONObject
();
JSONObject
ret
=
new
JSONObject
();
Context
context
=
this
.
getContext
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"查询"
+
this
.
getModuleDesc
();
String
busiDesc
=
"查询"
+
this
.
getModuleDesc
();
int
code
;
int
code
;
try
{
try
{
PageInfo
pageInfo
=
this
.
buildPageInfo
(
query
);
PageInfo
pageInfo
=
this
.
buildPageInfo
(
query
);
...
...
portal-manager/src/main/resources/sqlmap/module/user/userExt.xml
View file @
bb9ec0e5
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
u.id
u.id
) as a
) as a
<trim
suffixOverrides=
"where"
suffix=
""
>
<trim
suffixOverrides=
"where"
suffix=
""
>
where
<where>
<trim
prefixOverrides=
"and"
prefix=
""
>
<trim
prefixOverrides=
"and"
prefix=
""
>
<include
refid=
"_condition_"
/>
<include
refid=
"_condition_"
/>
<if
test=
"condition != null and !condition.isEmpty()"
>
<if
test=
"condition != null and !condition.isEmpty()"
>
...
@@ -125,6 +125,7 @@
...
@@ -125,6 +125,7 @@
</if>
</if>
</if>
</if>
</trim>
</trim>
</where>
</trim>
</trim>
<include
refid=
"_orderCols_"
/>
<include
refid=
"_orderCols_"
/>
</select>
</select>
...
@@ -144,7 +145,7 @@
...
@@ -144,7 +145,7 @@
u.id
u.id
) as a
) as a
<trim
suffixOverrides=
"where"
suffix=
""
>
<trim
suffixOverrides=
"where"
suffix=
""
>
where
<where>
<trim
prefixOverrides=
"and"
prefix=
""
>
<trim
prefixOverrides=
"and"
prefix=
""
>
<include
refid=
"_condition_"
/>
<include
refid=
"_condition_"
/>
<if
test=
"condition != null and !condition.isEmpty()"
>
<if
test=
"condition != null and !condition.isEmpty()"
>
...
@@ -155,6 +156,7 @@
...
@@ -155,6 +156,7 @@
</if>
</if>
</if>
</if>
</trim>
</trim>
</where>
</trim>
</trim>
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
portal-manager/src/test/java/com/mortals/httpclient/user/UserController.http
View file @
bb9ec0e5
...
@@ -5,8 +5,14 @@ Authorization: {{authToken}}
...
@@ -5,8 +5,14 @@ Authorization: {{authToken}}
Content-Type: application/json
Content-Type: application/json
{
{
"page":1,
"page":1,
"size":10
"size":10,
"roleId":"2",
"orConditionList":[
{
"loginName":"test"
}
]
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment