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
c3effd4e
Commit
c3effd4e
authored
Jun 20, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改收藏
parent
2729e34e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
AppUserCollectBiz.java
.../github/wxiaoqi/security/admin/biz/AppUserCollectBiz.java
+2
-2
AppUserCollectController.java
...wxiaoqi/security/admin/rest/AppUserCollectController.java
+6
-3
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserCollectBiz.java
View file @
c3effd4e
...
@@ -50,10 +50,10 @@ public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserColl
...
@@ -50,10 +50,10 @@ public class AppUserCollectBiz extends BaseBiz<AppUserCollectMapper, AppUserColl
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
//查看是否收藏
//查看是否收藏
public
ObjectRestResponse
checkUserCollect
(
Integer
id
,
Integer
userId
){
public
ObjectRestResponse
checkUserCollect
(
Integer
id
,
Integer
userId
,
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
(
"typeId"
,
id
).
andEqualTo
(
"isDel"
,
0
);
criteria
.
andEqualTo
(
"userId"
,
userId
).
andEqualTo
(
"typeId"
,
id
).
andEqualTo
(
"
type"
,
type
).
andEqualTo
(
"
isDel"
,
0
);
int
count
=
selectCountByExample
(
example
);
int
count
=
selectCountByExample
(
example
);
boolean
falg
=
count
>
0
?
false
:
true
;
boolean
falg
=
count
>
0
?
false
:
true
;
return
ObjectRestResponse
.
succ
(
falg
);
return
ObjectRestResponse
.
succ
(
falg
);
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUserCollectController.java
View file @
c3effd4e
...
@@ -81,15 +81,18 @@ public class AppUserCollectController extends CommonBaseController {
...
@@ -81,15 +81,18 @@ public class AppUserCollectController extends CommonBaseController {
return
collectBiz
.
addUserCollect
(
collectDTO
);
return
collectBiz
.
addUserCollect
(
collectDTO
);
}
}
@RequestMapping
(
value
=
"/collect
/{id}
"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/collect"
,
method
=
RequestMethod
.
GET
)
@ApiModelProperty
(
"查看是否收藏"
)
@ApiModelProperty
(
"查看是否收藏"
)
public
ObjectRestResponse
<
AppUser
>
get
(
@PathVariable
Integer
id
)
throws
Exception
{
public
ObjectRestResponse
<
AppUser
>
get
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
,
@RequestParam
(
value
=
"type"
,
defaultValue
=
"0"
)
Integer
type
)
throws
Exception
{
String
username
=
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
)).
getId
();
String
username
=
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
)).
getId
();
if
(
username
==
null
)
{
if
(
username
==
null
)
{
throw
new
Exception
();
throw
new
Exception
();
}
}
Integer
userid
=
Integer
.
parseInt
(
username
);
Integer
userid
=
Integer
.
parseInt
(
username
);
return
collectBiz
.
checkUserCollect
(
userid
,
id
);
return
collectBiz
.
checkUserCollect
(
userid
,
id
,
type
);
}
}
/**
/**
* 取消收藏
* 取消收藏
...
...
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