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 f62896bd
authored
Feb 03, 2021
by
18356073052
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
侧边栏收藏请求方法修改
1 parent
fe128240
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatCollectionController.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/WeChatCollectionDto.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatCollectionController.java
View file @
f62896b
...
@@ -5,6 +5,7 @@ import com.linkwechat.common.core.controller.BaseController;
...
@@ -5,6 +5,7 @@ import com.linkwechat.common.core.controller.BaseController;
import
com.linkwechat.common.core.domain.AjaxResult
;
import
com.linkwechat.common.core.domain.AjaxResult
;
import
com.linkwechat.common.core.page.TableDataInfo
;
import
com.linkwechat.common.core.page.TableDataInfo
;
import
com.linkwechat.common.enums.BusinessType
;
import
com.linkwechat.common.enums.BusinessType
;
import
com.linkwechat.wecom.domain.dto.WeChatCollectionDto
;
import
com.linkwechat.wecom.domain.vo.WeChatSideVo
;
import
com.linkwechat.wecom.domain.vo.WeChatSideVo
;
import
com.linkwechat.wecom.service.IWeChatCollectionService
;
import
com.linkwechat.wecom.service.IWeChatCollectionService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -33,8 +34,8 @@ public class WeChatCollectionController extends BaseController {
...
@@ -33,8 +34,8 @@ public class WeChatCollectionController extends BaseController {
//@PreAuthorize("@ss.hasPermi('chat:collection:add')")
//@PreAuthorize("@ss.hasPermi('chat:collection:add')")
@Log
(
title
=
"添加收藏"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"添加收藏"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"addCollection"
)
@PostMapping
(
"addCollection"
)
public
AjaxResult
addCollection
(
@Request
Param
(
value
=
"materialId"
)
Long
materialId
,
@RequestParam
(
value
=
"userId"
)
String
userId
)
{
public
AjaxResult
addCollection
(
@Request
Body
WeChatCollectionDto
chatCollectionDto
)
{
return
toAjax
(
weChatCollectionService
.
addCollection
(
materialId
,
userId
));
return
toAjax
(
weChatCollectionService
.
addCollection
(
chatCollectionDto
.
getMaterialId
(),
chatCollectionDto
.
getUserId
()
));
}
}
...
@@ -44,8 +45,8 @@ public class WeChatCollectionController extends BaseController {
...
@@ -44,8 +45,8 @@ public class WeChatCollectionController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('chat:collection:delete')"
)
@PreAuthorize
(
"@ss.hasPermi('chat:collection:delete')"
)
// @Log(title = "取消收藏", businessType = BusinessType.UPDATE)
// @Log(title = "取消收藏", businessType = BusinessType.UPDATE)
@PostMapping
(
value
=
"cancleCollection"
)
@PostMapping
(
value
=
"cancleCollection"
)
public
AjaxResult
cancleCollection
(
@Request
Param
(
value
=
"materialId"
)
Long
materialId
,
@RequestParam
(
value
=
"userId"
)
String
userId
)
{
public
AjaxResult
cancleCollection
(
@Request
Body
WeChatCollectionDto
chatCollectionDto
)
{
return
toAjax
(
weChatCollectionService
.
cancleCollection
(
materialId
,
userId
));
return
toAjax
(
weChatCollectionService
.
cancleCollection
(
chatCollectionDto
.
getMaterialId
(),
chatCollectionDto
.
getUserId
()
));
}
}
/**
/**
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/WeChatCollectionDto.java
0 → 100644
View file @
f62896b
package
com
.
linkwechat
.
wecom
.
domain
.
dto
;
import
lombok.Data
;
/**
* @author Administrator
*/
@Data
public
class
WeChatCollectionDto
{
private
Long
materialId
;
private
String
userId
;
}
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