Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 415c15c6
authored
Jan 27, 2021
by
18356073052
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
工具 侧边栏栏 素材收藏 修改
1 parent
863512e1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatCollectionController.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeChatCollection.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatCollectionMapper.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatCollectionService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatCollectionServiceImpl.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatCollectionController.java
View file @
415c15c
...
...
@@ -33,7 +33,7 @@ public class WeChatCollectionController extends BaseController {
//@PreAuthorize("@ss.hasPermi('chat:collection:add')")
@Log
(
title
=
"添加收藏"
,
businessType
=
BusinessType
.
INSERT
)
@PutMapping
(
"addCollection"
)
public
AjaxResult
addCollection
(
@RequestParam
(
value
=
"materialId"
)
Long
materialId
,
@RequestParam
(
value
=
"user
Id"
)
Lo
ng
userId
)
{
public
AjaxResult
addCollection
(
@RequestParam
(
value
=
"materialId"
)
Long
materialId
,
@RequestParam
(
value
=
"user
Name"
)
Stri
ng
userId
)
{
return
toAjax
(
weChatCollectionService
.
addCollection
(
materialId
,
userId
));
}
...
...
@@ -44,7 +44,7 @@ public class WeChatCollectionController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('chat:collection:delete')"
)
// @Log(title = "取消收藏", businessType = BusinessType.UPDATE)
@PostMapping
(
value
=
"cancleCollection"
)
public
AjaxResult
cancleCollection
(
@RequestParam
(
value
=
"materialId"
)
Long
materialId
,
@RequestParam
(
value
=
"user
Id"
)
Lo
ng
userId
)
{
public
AjaxResult
cancleCollection
(
@RequestParam
(
value
=
"materialId"
)
Long
materialId
,
@RequestParam
(
value
=
"user
Name"
)
Stri
ng
userId
)
{
return
toAjax
(
weChatCollectionService
.
cancleCollection
(
materialId
,
userId
));
}
...
...
@@ -53,9 +53,9 @@ public class WeChatCollectionController extends BaseController {
*/
// @PreAuthorize("@ss.hasPermi('chat:collection:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
@RequestParam
(
value
=
"user
Id"
)
Long
userId
,
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keywor
d
)
{
public
TableDataInfo
list
(
@RequestParam
(
value
=
"user
Name"
)
String
userName
,
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
userI
d
)
{
startPage
();
List
<
WeChatSideVo
>
collections
=
weChatCollectionService
.
collections
(
user
Id
,
keywor
d
);
List
<
WeChatSideVo
>
collections
=
weChatCollectionService
.
collections
(
user
Name
,
userI
d
);
return
getDataTable
(
collections
);
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeChatCollection.java
View file @
415c15c
...
...
@@ -24,6 +24,6 @@ public class WeChatCollection extends BaseEntity {
/**
* 用户id
*/
private
Lo
ng
userId
;
private
Stri
ng
userId
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatCollectionMapper.java
View file @
415c15c
...
...
@@ -29,7 +29,7 @@ public interface WeChatCollectionMapper extends BaseMapper<WeChatCollection> {
* @param userId 用户id
* @return 结果
*/
public
int
dropCollection
(
@Param
(
"materialId"
)
Long
materialId
,
@Param
(
"userId"
)
Lo
ng
userId
);
public
int
dropCollection
(
@Param
(
"materialId"
)
Long
materialId
,
@Param
(
"userId"
)
Stri
ng
userId
);
/**
* 通过素材id和用户id查询当前素材的收藏条数
...
...
@@ -38,7 +38,7 @@ public interface WeChatCollectionMapper extends BaseMapper<WeChatCollection> {
* @param userId 用户id
* @return 当前素材收藏的条数
*/
public
int
countCollectionByMaterialIdAndUserId
(
@Param
(
"materialId"
)
Long
materialId
,
@Param
(
"userId"
)
Lo
ng
userId
);
public
int
countCollectionByMaterialIdAndUserId
(
@Param
(
"materialId"
)
Long
materialId
,
@Param
(
"userId"
)
Stri
ng
userId
);
/**
* 收藏列表
...
...
@@ -46,6 +46,6 @@ public interface WeChatCollectionMapper extends BaseMapper<WeChatCollection> {
* @param userId 用户id
* @return {@link WeChatSideVo}s
*/
public
List
<
WeChatSideVo
>
findCollections
(
@Param
(
"userId"
)
Lo
ng
userId
,
@Param
(
"keyword"
)
String
keyword
);
public
List
<
WeChatSideVo
>
findCollections
(
@Param
(
"userId"
)
Stri
ng
userId
,
@Param
(
"keyword"
)
String
keyword
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatCollectionService.java
View file @
415c15c
...
...
@@ -20,7 +20,7 @@ public interface IWeChatCollectionService extends IService<WeChatCollection> {
* @param userId 用户id
* @return 结果
*/
public
int
addCollection
(
Long
materialId
,
Lo
ng
userId
);
public
int
addCollection
(
Long
materialId
,
Stri
ng
userId
);
/**
* 取消收藏
...
...
@@ -29,7 +29,7 @@ public interface IWeChatCollectionService extends IService<WeChatCollection> {
* @param userId 用户id
* @return 结果
*/
public
int
cancleCollection
(
Long
materialId
,
Lo
ng
userId
);
public
int
cancleCollection
(
Long
materialId
,
Stri
ng
userId
);
/**
* 收藏列表
...
...
@@ -37,6 +37,6 @@ public interface IWeChatCollectionService extends IService<WeChatCollection> {
* @param userId 用户id
* @return {@link WeChatSideVo}s
*/
public
List
<
WeChatSideVo
>
collections
(
Lo
ng
userId
,
String
keyword
);
public
List
<
WeChatSideVo
>
collections
(
Stri
ng
userId
,
String
keyword
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatCollectionServiceImpl.java
View file @
415c15c
...
...
@@ -24,7 +24,7 @@ public class WeChatCollectionServiceImpl extends ServiceImpl<WeChatCollectionMap
@Override
public
int
addCollection
(
Long
materialId
,
Lo
ng
userId
)
{
public
int
addCollection
(
Long
materialId
,
Stri
ng
userId
)
{
WeChatCollection
chatCollection
=
new
WeChatCollection
();
chatCollection
.
setCollectionId
(
SnowFlakeUtil
.
nextId
());
chatCollection
.
setMaterialId
(
materialId
);
...
...
@@ -33,12 +33,12 @@ public class WeChatCollectionServiceImpl extends ServiceImpl<WeChatCollectionMap
}
@Override
public
int
cancleCollection
(
Long
materialId
,
Lo
ng
userId
)
{
public
int
cancleCollection
(
Long
materialId
,
Stri
ng
userId
)
{
return
weChatCollectionMapper
.
dropCollection
(
materialId
,
userId
);
}
@Override
public
List
<
WeChatSideVo
>
collections
(
Lo
ng
userId
,
String
keyword
)
{
public
List
<
WeChatSideVo
>
collections
(
Stri
ng
userId
,
String
keyword
)
{
return
weChatCollectionMapper
.
findCollections
(
userId
,
keyword
);
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment