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 bc6f20d9
authored
Nov 24, 2021
by
linkwechat8856@163.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
朋友圈详情相关接口提交;
1 parent
0d3d3535
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
6 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeMomentsController.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeMoments.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeMomentsMapper.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeMomentsService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeMomentsServiceImpl.java
linkwe-wecom/src/main/resources/mapper/wecom/WeMomentsMapper.xml
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeMomentsController.java
View file @
bc6f20d
package
com
.
linkwechat
.
web
.
controller
.
wecom
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.core.controller.BaseController
;
import
com.linkwechat.common.core.domain.AjaxResult
;
import
com.linkwechat.common.core.page.TableDataInfo
;
import
com.linkwechat.common.utils.StringUtils
;
import
com.linkwechat.wecom.constants.SynchRecordConstants
;
import
com.linkwechat.wecom.domain.WeMessagePush
;
import
com.linkwechat.wecom.domain.WeMoments
;
import
com.linkwechat.wecom.service.IWeMomentsService
;
import
com.linkwechat.wecom.service.IWeSynchRecordService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
...
...
@@ -52,6 +48,20 @@ public class WeMomentsController extends BaseController {
/**
* 获取朋友圈详情
* @param momentId
* @return
*/
@GetMapping
(
"/findMomentsDetail/{momentId}"
)
public
AjaxResult
findMomentsDetail
(
@PathVariable
String
momentId
){
return
AjaxResult
.
success
(
iWeMomentsService
.
findMomentsDetail
(
momentId
)
);
}
/**
* 新增或者编辑朋友圈
* @return
*/
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeMoments.java
View file @
bc6f20d
...
...
@@ -18,7 +18,7 @@ import java.util.List;
* 朋友圈
*/
@Data
@TableName
(
"we_moments"
)
@TableName
(
value
=
"we_moments"
,
autoResultMap
=
true
)
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
...
...
@@ -79,6 +79,23 @@ public class WeMoments extends BaseEntity {
private
Integer
pointNum
;
//评论员工名
@TableField
(
exist
=
false
)
private
String
momentUserName
;
//点赞员工名
@TableField
(
exist
=
false
)
private
String
pointUserName
;
//评论客户名
@TableField
(
exist
=
false
)
private
String
momentCustomerName
;
//点赞客户名
@TableField
(
exist
=
false
)
private
String
pointCustomerName
;
@Data
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeMomentsMapper.java
View file @
bc6f20d
...
...
@@ -9,4 +9,6 @@ import java.util.List;
public
interface
WeMomentsMapper
extends
BaseMapper
<
WeMoments
>
{
List
<
WeMoments
>
findMoments
(
WeMoments
weMoments
);
WeMoments
findMomentsDetail
(
@Param
(
"momentId"
)
String
momentId
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeMomentsService.java
View file @
bc6f20d
...
...
@@ -3,6 +3,7 @@ package com.linkwechat.wecom.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.linkwechat.wecom.domain.WeMoments
;
import
com.linkwechat.wecom.mapper.WeMomentsMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -15,4 +16,6 @@ public interface IWeMomentsService extends IService<WeMoments> {
void
synchPersonMoments
(
Integer
filterType
);
void
synchEnterpriseMoments
(
Integer
filterType
);
WeMoments
findMomentsDetail
(
String
momentId
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeMomentsServiceImpl.java
View file @
bc6f20d
...
...
@@ -267,10 +267,20 @@ public class WeMomentsServiceImpl extends ServiceImpl<WeMomentsMapper, WeMoments
/**
* 同步朋友圈
* 朋友圈详情
* @param momentId
* @return
*/
@Override
public
WeMoments
findMomentsDetail
(
String
momentId
)
{
return
this
.
baseMapper
.
findMomentsDetail
(
momentId
);
}
/**
* 同步朋友圈
*/
private
void
synchMoments
(
Integer
filterType
)
{
List
<
MomentsListDetailResultDto
.
Moment
>
moments
=
new
ArrayList
<>();
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeMomentsMapper.xml
View file @
bc6f20d
...
...
@@ -34,4 +34,42 @@
</select>
<resultMap
id=
"MomentsDetailMapper"
type=
"com.linkwechat.wecom.domain.WeMoments"
>
<result
column=
"content"
property=
"content"
></result>
<result
column=
"other_content"
property=
"otherContent"
typeHandler=
"com.linkwechat.wecom.handler.GenericTypeHandler"
></result>
<result
column=
"noAddUserName"
property=
"noAddUserName"
></result>
<result
column=
"addUserName"
property=
"addUserName"
></result>
<result
column=
"momentUserName"
property=
"momentUserName"
></result>
<result
column=
"pointUserName"
property=
"pointUserName"
></result>
<result
column=
"momentCustomerName"
property=
"momentCustomerName"
></result>
<result
column=
"pointCustomerName"
property=
"pointCustomerName"
></result>
</resultMap>
<select
id=
"findMomentsDetail"
resultMap=
"MomentsDetailMapper"
>
SELECT
wm.content,
wm.other_content,
(SELECT GROUP_CONCAT(wu.user_name) FROM we_user wu WHERE FIND_IN_SET(wu.user_id,wm.no_add_user)) as noAddUserName,
(SELECT GROUP_CONCAT(wu.user_name) FROM we_user wu WHERE FIND_IN_SET(wu.user_id,wm.add_user)) as addUserName,
(SELECT GROUP_CONCAT(wu.user_name) FROM we_user wu
LEFT JOIN we_moments_interacte wmi ON wu.user_id=wmi.interacte_user_id WHERE wmi.interacte_type=0 and wmi.interacte_user_type=0
and wmi.moment_id=wm.moment_id
) as momentUserName,
(SELECT GROUP_CONCAT(wu.user_name) FROM we_user wu
LEFT JOIN we_moments_interacte wmi ON wu.user_id=wmi.interacte_user_id WHERE wmi.interacte_type=1 and wmi.interacte_user_type=0
and wmi.moment_id=wm.moment_id
) as pointUserName,
(SELECT GROUP_CONCAT(DISTINCT wu.`name`) FROM we_customer wu
LEFT JOIN we_moments_interacte wmi ON wu.external_userid=wmi.interacte_user_id WHERE wmi.interacte_type=0 and wmi.interacte_user_type=1
and wmi.moment_id=wm.moment_id
) as momentCustomerName,
(SELECT GROUP_CONCAT(DISTINCT wu.`name`) FROM we_customer wu
LEFT JOIN we_moments_interacte wmi ON wu.external_userid=wmi.interacte_user_id WHERE wmi.interacte_type=1 and wmi.interacte_user_type=1
and wmi.moment_id=wm.moment_id
) as pointCustomerName
FROM
we_moments wm
where wm.moment_id=#{momentId}
</select>
</mapper>
\ No newline at end of file
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