Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
49e9318c
Commit
49e9318c
authored
Oct 19, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加收藏搜索
parent
9a8512f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
AppUserCollectBiz.java
.../github/wxiaoqi/security/admin/biz/AppUserCollectBiz.java
+4
-1
AppUserCollectController.java
...wxiaoqi/security/admin/rest/AppUserCollectController.java
+3
-2
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserCollectBiz.java
View file @
49e9318c
...
@@ -95,10 +95,13 @@ public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserColl
...
@@ -95,10 +95,13 @@ public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserColl
return
ObjectRestResponse
.
succ
(
obj
);
return
ObjectRestResponse
.
succ
(
obj
);
}
}
//我的收藏
//我的收藏
public
ObjectRestResponse
getCollectList
(
Integer
userId
,
int
page
,
int
limit
){
public
ObjectRestResponse
getCollectList
(
Integer
userId
,
int
page
,
int
limit
,
Integer
type
){
Example
example
=
new
Example
(
AppUserCollect
.
class
);
Example
example
=
new
Example
(
AppUserCollect
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andEqualTo
(
"userId"
,
userId
).
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
0
);
criteria
.
andEqualTo
(
"userId"
,
userId
).
andEqualTo
(
"isDel"
,
0
).
andEqualTo
(
"status"
,
0
);
if
(
type
!=
null
&&
type
>
0
){
criteria
.
andEqualTo
(
"type"
,
type
);
}
example
.
setOrderByClause
(
"`id` desc"
);
example
.
setOrderByClause
(
"`id` desc"
);
List
<
AppUserCollect
>
list
=
selectByExample
(
example
);
List
<
AppUserCollect
>
list
=
selectByExample
(
example
);
PageHelper
.
startPage
(
page
,
limit
);
PageHelper
.
startPage
(
page
,
limit
);
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUserCollectController.java
View file @
49e9318c
...
@@ -57,7 +57,8 @@ public class AppUserCollectController extends CommonBaseController {
...
@@ -57,7 +57,8 @@ public class AppUserCollectController extends CommonBaseController {
@ApiModelProperty
(
"我的收藏"
)
@ApiModelProperty
(
"我的收藏"
)
public
ObjectRestResponse
list
(
public
ObjectRestResponse
list
(
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1"
)
Integer
page
,
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"10"
)
Integer
limit
@RequestParam
(
value
=
"limit"
,
defaultValue
=
"10"
)
Integer
limit
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
)
{
)
{
try
{
try
{
String
username
=
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
)).
getId
();
String
username
=
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
)).
getId
();
...
@@ -65,7 +66,7 @@ public class AppUserCollectController extends CommonBaseController {
...
@@ -65,7 +66,7 @@ public class AppUserCollectController extends CommonBaseController {
throw
new
Exception
();
throw
new
Exception
();
}
}
Integer
userid
=
Integer
.
parseInt
(
username
);
Integer
userid
=
Integer
.
parseInt
(
username
);
return
collectBiz
.
getCollectList
(
userid
,
page
,
limit
);
return
collectBiz
.
getCollectList
(
userid
,
page
,
limit
,
type
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
log
.
error
(
e
.
getMessage
());
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
EXCEPTION_CODE
,
"出现异常"
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
EXCEPTION_CODE
,
"出现异常"
);
...
...
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