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 2b73c982
authored
Jan 19, 2021
by
孙喜旺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/back_end_dev' into back_end_dev
2 parents
2866442a
e46a8d64
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
117 additions
and
35 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/system/SysUserController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatCollectionController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatItemController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatSideController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerMessagePushController.java
linkwe-admin/src/main/resources/application.yml
linkwe-framework/src/main/java/com/linkwechat/framework/config/SecurityConfig.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatCollectionMapper.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatItemMapper.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatCollectionService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatItemService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeCustomerMessageOriginalService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatCollectionServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatItemServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessageOriginalServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeMaterialServiceImpl.java
linkwe-wecom/src/main/resources/mapper/wecom/WeChatCollectionMapper.xml
linkwe-wecom/src/main/resources/mapper/wecom/WeChatItemMapper.xml
linkwe-admin/src/main/java/com/linkwechat/web/controller/system/SysUserController.java
View file @
2b73c98
package
com
.
linkwechat
.
web
.
controller
.
system
;
package
com
.
linkwechat
.
web
.
controller
.
system
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.linkwechat.common.annotation.Log
;
import
com.linkwechat.common.annotation.Log
;
import
com.linkwechat.common.constant.UserConstants
;
import
com.linkwechat.common.constant.UserConstants
;
import
com.linkwechat.common.core.controller.BaseController
;
import
com.linkwechat.common.core.controller.BaseController
;
...
@@ -17,13 +18,17 @@ import com.linkwechat.framework.web.service.TokenService;
...
@@ -17,13 +18,17 @@ import com.linkwechat.framework.web.service.TokenService;
import
com.linkwechat.system.service.ISysPostService
;
import
com.linkwechat.system.service.ISysPostService
;
import
com.linkwechat.system.service.ISysRoleService
;
import
com.linkwechat.system.service.ISysRoleService
;
import
com.linkwechat.system.service.ISysUserService
;
import
com.linkwechat.system.service.ISysUserService
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.service.IWeUserService
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.vertx.ext.auth.User
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -48,6 +53,10 @@ public class SysUserController extends BaseController
...
@@ -48,6 +53,10 @@ public class SysUserController extends BaseController
@Autowired
@Autowired
private
TokenService
tokenService
;
private
TokenService
tokenService
;
@Autowired
private
IWeUserService
iWeUserService
;
/**
/**
* 获取用户列表
* 获取用户列表
*/
*/
...
@@ -56,6 +65,7 @@ public class SysUserController extends BaseController
...
@@ -56,6 +65,7 @@ public class SysUserController extends BaseController
public
TableDataInfo
list
(
SysUser
user
)
public
TableDataInfo
list
(
SysUser
user
)
{
{
startPage
();
startPage
();
List
<
SysUser
>
list
=
userService
.
selectUserList
(
user
);
List
<
SysUser
>
list
=
userService
.
selectUserList
(
user
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
}
}
...
@@ -193,4 +203,27 @@ public class SysUserController extends BaseController
...
@@ -193,4 +203,27 @@ public class SysUserController extends BaseController
user
.
setUpdateBy
(
SecurityUtils
.
getUsername
());
user
.
setUpdateBy
(
SecurityUtils
.
getUsername
());
return
toAjax
(
userService
.
updateUserStatus
(
user
));
return
toAjax
(
userService
.
updateUserStatus
(
user
));
}
}
@GetMapping
(
"/findCurrentLoginUser"
)
public
AjaxResult
findCurrentLoginUser
(
HttpServletRequest
request
){
String
userId
=
""
;
LoginUser
loginUser
=
tokenService
.
getLoginUser
(
request
);
if
(
null
!=
loginUser
){
SysUser
user
=
loginUser
.
getUser
();
if
(
null
!=
user
){
List
<
WeUser
>
weUsers
=
iWeUserService
.
selectWeUserList
(
WeUser
.
builder
()
.
mobile
(
user
.
getPhonenumber
())
.
build
());
if
(
CollectionUtil
.
isNotEmpty
(
weUsers
)){
userId
=
weUsers
.
get
(
0
).
getUserId
();
}
}
}
return
AjaxResult
.
success
(
userId
);
}
}
}
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatCollectionController.java
View file @
2b73c98
...
@@ -53,9 +53,9 @@ public class WeChatCollectionController extends BaseController {
...
@@ -53,9 +53,9 @@ public class WeChatCollectionController extends BaseController {
*/
*/
// @PreAuthorize("@ss.hasPermi('chat:collection:list')")
// @PreAuthorize("@ss.hasPermi('chat:collection:list')")
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
@RequestParam
(
value
=
"userId"
)
Long
userId
)
{
public
TableDataInfo
list
(
@RequestParam
(
value
=
"userId"
)
Long
userId
,
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
)
{
startPage
();
startPage
();
List
<
WeChatSideVo
>
collections
=
weChatCollectionService
.
collections
(
userId
);
List
<
WeChatSideVo
>
collections
=
weChatCollectionService
.
collections
(
userId
,
keyword
);
return
getDataTable
(
collections
);
return
getDataTable
(
collections
);
}
}
...
...
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatItemController.java
View file @
2b73c98
...
@@ -16,6 +16,7 @@ import java.util.List;
...
@@ -16,6 +16,7 @@ import java.util.List;
/**
/**
* 聊天工具侧边栏
* 聊天工具侧边栏
*
* @author kewen
* @author kewen
*/
*/
@RequestMapping
(
value
=
"/wecom/chat/item"
)
@RequestMapping
(
value
=
"/wecom/chat/item"
)
...
@@ -41,9 +42,10 @@ public class WeChatItemController extends BaseController {
...
@@ -41,9 +42,10 @@ public class WeChatItemController extends BaseController {
*/
*/
//@PreAuthorize("@ss.hasPermi('chat:item:list')")
//@PreAuthorize("@ss.hasPermi('chat:item:list')")
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
@RequestParam
(
value
=
"sideId"
)
Long
sideId
)
{
public
TableDataInfo
list
(
@RequestParam
(
value
=
"sideId"
)
Long
sideId
,
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
)
{
startPage
();
startPage
();
List
<
WeChatSideVo
>
weChatSideVos
=
weChatItemService
.
chatItems
(
sideId
);
List
<
WeChatSideVo
>
weChatSideVos
=
weChatItemService
.
chatItems
(
sideId
,
keyword
);
return
getDataTable
(
weChatSideVos
);
return
getDataTable
(
weChatSideVos
);
}
}
...
...
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatSideController.java
View file @
2b73c98
...
@@ -15,6 +15,7 @@ import java.util.List;
...
@@ -15,6 +15,7 @@ import java.util.List;
/**
/**
* 聊天工具侧边栏
* 聊天工具侧边栏
*
* @author kewen
* @author kewen
*/
*/
@RequestMapping
(
value
=
"/wecom/chat/side"
)
@RequestMapping
(
value
=
"/wecom/chat/side"
)
...
@@ -28,11 +29,11 @@ public class WeChatSideController extends BaseController {
...
@@ -28,11 +29,11 @@ public class WeChatSideController extends BaseController {
/**
/**
* 群发侧边栏列表
* 群发侧边栏列表
*/
*/
//
@PreAuthorize("@ss.hasPermi('chat:side:list')")
@PreAuthorize
(
"@ss.hasPermi('chat:side:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
@RequestParam
(
value
=
"h5"
)
String
h5
)
{
public
TableDataInfo
list
()
{
startPage
();
startPage
();
List
<
WeChatSide
>
weChatSides
=
weChatSideService
.
chatSides
(
h5
);
List
<
WeChatSide
>
weChatSides
=
weChatSideService
.
chatSides
(
"0"
);
return
getDataTable
(
weChatSides
);
return
getDataTable
(
weChatSides
);
}
}
...
@@ -46,4 +47,14 @@ public class WeChatSideController extends BaseController {
...
@@ -46,4 +47,14 @@ public class WeChatSideController extends BaseController {
return
toAjax
(
weChatSideService
.
updateWeChatSide
(
weChatSide
));
return
toAjax
(
weChatSideService
.
updateWeChatSide
(
weChatSide
));
}
}
/**
* 群发侧边栏列表
*/
@GetMapping
(
"/h5List"
)
public
TableDataInfo
h5List
()
{
startPage
();
List
<
WeChatSide
>
weChatSides
=
weChatSideService
.
chatSides
(
"1"
);
return
getDataTable
(
weChatSides
);
}
}
}
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerMessagePushController.java
View file @
2b73c98
...
@@ -87,10 +87,21 @@ public class WeCustomerMessagePushController extends BaseController {
...
@@ -87,10 +87,21 @@ public class WeCustomerMessagePushController extends BaseController {
*/
*/
@PreAuthorize
(
"@ss.hasPermi('customerMessagePush:push:pushResults')"
)
@PreAuthorize
(
"@ss.hasPermi('customerMessagePush:push:pushResults')"
)
@GetMapping
(
value
=
"/pushResults"
)
@GetMapping
(
value
=
"/pushResults"
)
public
TableDataInfo
customerMessagePushResult
(
@RequestParam
(
value
=
"messageId"
)
Long
messageId
,
@RequestParam
(
value
=
"status"
)
String
status
)
{
public
TableDataInfo
customerMessagePushResult
(
@RequestParam
(
value
=
"messageId"
)
Long
messageId
,
@RequestParam
(
value
=
"status"
)
String
status
)
{
startPage
();
startPage
();
List
<
WeCustomerMessageResultVo
>
weCustomerMessageResuls
=
weCustomerMessgaeResultService
.
customerMessagePushs
(
messageId
,
status
);
List
<
WeCustomerMessageResultVo
>
weCustomerMessageResuls
=
weCustomerMessgaeResultService
.
customerMessagePushs
(
messageId
,
status
);
return
getDataTable
(
weCustomerMessageResuls
);
return
getDataTable
(
weCustomerMessageResuls
);
}
}
/**
* 同步消息发送结果
*/
@PreAuthorize
(
"@ss.hasPermi('customerMessagePush:push:asyncResult')"
)
@PostMapping
(
value
=
"asyncResult"
)
public
AjaxResult
asyncResult
(
@RequestParam
(
value
=
"msgid"
)
String
msgid
,
@RequestParam
(
value
=
"messageId"
)
Long
messageId
)
{
weCustomerMessageOriginalService
.
asyncResult
(
msgid
,
messageId
);
return
AjaxResult
.
success
();
}
}
}
linkwe-admin/src/main/resources/application.yml
View file @
2b73c98
...
@@ -145,7 +145,7 @@ xss:
...
@@ -145,7 +145,7 @@ xss:
# elasticsearch配置
# elasticsearch配置
elasticsearch
:
elasticsearch
:
schema
:
http
schema
:
http
address
:
${ES_ADDRESS:localhost}
address
:
${ES_ADDRESS:localhost
:9200
}
connectTimeout
:
10000
connectTimeout
:
10000
socketTimeout
:
10000
socketTimeout
:
10000
connectionRequestTimeout
:
10000
connectionRequestTimeout
:
10000
...
...
linkwe-framework/src/main/java/com/linkwechat/framework/config/SecurityConfig.java
View file @
2b73c98
...
@@ -120,7 +120,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
...
@@ -120,7 +120,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.
antMatchers
(
"/wecom/chat/collection/list"
).
anonymous
()
.
antMatchers
(
"/wecom/chat/collection/list"
).
anonymous
()
.
antMatchers
(
"/wecom/chat/collection/cancleCollection"
).
anonymous
()
.
antMatchers
(
"/wecom/chat/collection/cancleCollection"
).
anonymous
()
.
antMatchers
(
"/wecom/chat/collection/addCollection"
).
anonymous
()
.
antMatchers
(
"/wecom/chat/collection/addCollection"
).
anonymous
()
.
antMatchers
(
"/wecom/chat/side/
l
ist"
).
anonymous
()
.
antMatchers
(
"/wecom/chat/side/
h5L
ist"
).
anonymous
()
.
antMatchers
(
"/wecom/ticket/**"
).
anonymous
()
.
antMatchers
(
"/wecom/ticket/**"
).
anonymous
()
// 除上面外的所有请求全部需要鉴权认证
// 除上面外的所有请求全部需要鉴权认证
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatCollectionMapper.java
View file @
2b73c98
...
@@ -46,6 +46,6 @@ public interface WeChatCollectionMapper extends BaseMapper<WeChatCollection> {
...
@@ -46,6 +46,6 @@ public interface WeChatCollectionMapper extends BaseMapper<WeChatCollection> {
* @param userId 用户id
* @param userId 用户id
* @return {@link WeChatSideVo}s
* @return {@link WeChatSideVo}s
*/
*/
public
List
<
WeChatSideVo
>
findCollections
(
Long
userI
d
);
public
List
<
WeChatSideVo
>
findCollections
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"keyword"
)
String
keywor
d
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatItemMapper.java
View file @
2b73c98
...
@@ -10,12 +10,14 @@ import java.util.List;
...
@@ -10,12 +10,14 @@ import java.util.List;
/**
/**
* 聊天工具侧边栏
* 聊天工具侧边栏
*
* @author kewen
* @author kewen
*/
*/
public
interface
WeChatItemMapper
extends
BaseMapper
<
WeChatItem
>
{
public
interface
WeChatItemMapper
extends
BaseMapper
<
WeChatItem
>
{
/**
/**
* 批量添加侧边栏素材
* 批量添加侧边栏素材
*
* @param items 侧边栏素材列表
* @param items 侧边栏素材列表
* @return 结果
* @return 结果
*/
*/
...
@@ -23,6 +25,7 @@ public interface WeChatItemMapper extends BaseMapper<WeChatItem> {
...
@@ -23,6 +25,7 @@ public interface WeChatItemMapper extends BaseMapper<WeChatItem> {
/**
/**
* 删除侧边栏素材
* 删除侧边栏素材
*
* @param sideId 侧边栏id
* @param sideId 侧边栏id
* @return 结果
* @return 结果
*/
*/
...
@@ -33,7 +36,8 @@ public interface WeChatItemMapper extends BaseMapper<WeChatItem> {
...
@@ -33,7 +36,8 @@ public interface WeChatItemMapper extends BaseMapper<WeChatItem> {
* h5素材列表
* h5素材列表
*
*
* @param sideId 侧边栏id
* @param sideId 侧边栏id
* @param keyword 关键词
* @return
* @return
*/
*/
public
List
<
WeChatSideVo
>
findChatItems
(
@Param
(
"sideId"
)
Long
sideId
);
public
List
<
WeChatSideVo
>
findChatItems
(
@Param
(
"sideId"
)
Long
sideId
,
@Param
(
"keyword"
)
String
keyword
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatCollectionService.java
View file @
2b73c98
...
@@ -37,6 +37,6 @@ public interface IWeChatCollectionService extends IService<WeChatCollection> {
...
@@ -37,6 +37,6 @@ public interface IWeChatCollectionService extends IService<WeChatCollection> {
* @param userId 用户id
* @param userId 用户id
* @return {@link WeChatSideVo}s
* @return {@link WeChatSideVo}s
*/
*/
public
List
<
WeChatSideVo
>
collections
(
Long
userId
);
public
List
<
WeChatSideVo
>
collections
(
Long
userId
,
String
keyword
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatItemService.java
View file @
2b73c98
...
@@ -27,6 +27,6 @@ public interface IWeChatItemService extends IService<WeChatItem> {
...
@@ -27,6 +27,6 @@ public interface IWeChatItemService extends IService<WeChatItem> {
* @param sideId 侧边栏id
* @param sideId 侧边栏id
* @return
* @return
*/
*/
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
);
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
,
String
keyword
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeCustomerMessageOriginalService.java
View file @
2b73c98
...
@@ -40,4 +40,12 @@ public interface IWeCustomerMessageOriginalService extends IService<WeCustomerMe
...
@@ -40,4 +40,12 @@ public interface IWeCustomerMessageOriginalService extends IService<WeCustomerMe
*/
*/
CustomerMessagePushVo
CustomerMessagePushDetail
(
Long
messageId
);
CustomerMessagePushVo
CustomerMessagePushDetail
(
Long
messageId
);
/**
* 同步发送结果
*
* @param msgid 可以用于获取发送结果
*/
void
asyncResult
(
String
msgid
,
Long
messageId
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatCollectionServiceImpl.java
View file @
2b73c98
...
@@ -38,8 +38,8 @@ public class WeChatCollectionServiceImpl extends ServiceImpl<WeChatCollectionMap
...
@@ -38,8 +38,8 @@ public class WeChatCollectionServiceImpl extends ServiceImpl<WeChatCollectionMap
}
}
@Override
@Override
public
List
<
WeChatSideVo
>
collections
(
Long
userId
)
{
public
List
<
WeChatSideVo
>
collections
(
Long
userId
,
String
keyword
)
{
return
weChatCollectionMapper
.
findCollections
(
userId
);
return
weChatCollectionMapper
.
findCollections
(
userId
,
keyword
);
}
}
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatItemServiceImpl.java
View file @
2b73c98
...
@@ -96,8 +96,8 @@ public class WeChatItemServiceImpl extends ServiceImpl<WeChatItemMapper, WeChatI
...
@@ -96,8 +96,8 @@ public class WeChatItemServiceImpl extends ServiceImpl<WeChatItemMapper, WeChatI
}
}
@Override
@Override
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
)
{
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
,
String
keyword
)
{
return
weChatItemMapper
.
findChatItems
(
sideId
);
return
weChatItemMapper
.
findChatItems
(
sideId
,
keyword
);
}
}
/**
/**
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessageOriginalServiceImpl.java
View file @
2b73c98
...
@@ -63,20 +63,31 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
...
@@ -63,20 +63,31 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
CustomerMessagePushVo
customerMessagePushDetail
=
weCustomerMessageOriginalMapper
.
findCustomerMessagePushDetail
(
messageId
);
CustomerMessagePushVo
customerMessagePushDetail
=
weCustomerMessageOriginalMapper
.
findCustomerMessagePushDetail
(
messageId
);
AtomicInteger
atomicInteger
=
new
AtomicInteger
();
//拉取消息发送结果
//拉取消息发送结果
CompletableFuture
.
runAsync
(()->{
CompletableFuture
.
runAsync
(()
->
syncSendResult
(
customerMessagePushDetail
.
getMsgid
(),
messageId
));
return
customerMessagePushDetail
;
}
@Override
public
void
asyncResult
(
String
msgid
,
Long
messageId
)
{
syncSendResult
(
msgid
,
messageId
);
}
String
msgid
=
customerMessagePushDetail
.
getMsgid
();
public
void
syncSendResult
(
String
msgid
,
Long
messageId
)
{
if
(
StringUtils
.
isNotEmpty
(
msgid
)){
AtomicInteger
atomicInteger
=
new
AtomicInteger
();
if
(
StringUtils
.
isNotEmpty
(
msgid
))
{
List
<
String
>
msgIds
=
null
;
List
<
String
>
msgIds
=
null
;
try
{
try
{
msgIds
=
objectMapper
.
readValue
(
msgid
,
new
TypeReference
<
List
<
String
>>()
{
});
msgIds
=
objectMapper
.
readValue
(
msgid
,
new
TypeReference
<
List
<
String
>>()
{
});
}
catch
(
JsonProcessingException
e
)
{
}
catch
(
JsonProcessingException
e
)
{
...
@@ -84,11 +95,11 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
...
@@ -84,11 +95,11 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
}
}
if
(
CollectionUtils
.
isNotEmpty
(
msgIds
))
{
if
(
CollectionUtils
.
isNotEmpty
(
msgIds
))
{
msgIds
.
forEach
(
m
->
{
msgIds
.
forEach
(
m
->
{
QueryCustomerMessageStatusResultDataObjectDto
dataObjectDto
=
new
QueryCustomerMessageStatusResultDataObjectDto
();
QueryCustomerMessageStatusResultDataObjectDto
dataObjectDto
=
new
QueryCustomerMessageStatusResultDataObjectDto
();
dataObjectDto
.
setMsgid
(
m
);
dataObjectDto
.
setMsgid
(
m
);
...
@@ -100,15 +111,15 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
...
@@ -100,15 +111,15 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
List
<
DetailMessageStatusResultDto
>
detailList
=
queryCustomerMessageStatusResultDto
.
getDetail_list
();
List
<
DetailMessageStatusResultDto
>
detailList
=
queryCustomerMessageStatusResultDto
.
getDetail_list
();
detailList
.
forEach
(
d
->
{
detailList
.
forEach
(
d
->
{
if
(
d
.
getStatus
().
equals
(
"1"
))
{
if
(
d
.
getStatus
().
equals
(
"1"
))
{
atomicInteger
.
incrementAndGet
();
atomicInteger
.
incrementAndGet
();
}
}
weCustomerMessgaeResultMapper
.
updateWeCustomerMessgaeResult
(
messageId
,
d
.
getChat_id
(),
d
.
getExternal_userid
(),
d
.
getStatus
(),
d
.
getSend_time
());
weCustomerMessgaeResultMapper
.
updateWeCustomerMessgaeResult
(
messageId
,
d
.
getChat_id
(),
d
.
getExternal_userid
(),
d
.
getStatus
(),
d
.
getSend_time
());
});
});
...
@@ -121,11 +132,7 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
...
@@ -121,11 +132,7 @@ public class WeCustomerMessageOriginalServiceImpl extends ServiceImpl<WeCustomer
}
}
//更新微信实际发送条数
//更新微信实际发送条数
weCustomerMessageService
.
updateWeCustomerMessageActualSend
(
messageId
,
atomicInteger
.
get
());
weCustomerMessageService
.
updateWeCustomerMessageActualSend
(
messageId
,
atomicInteger
.
get
());
});
return
customerMessagePushDetail
;
}
}
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeMaterialServiceImpl.java
View file @
2b73c98
...
@@ -61,7 +61,7 @@ public class WeMaterialServiceImpl implements IWeMaterialService {
...
@@ -61,7 +61,7 @@ public class WeMaterialServiceImpl implements IWeMaterialService {
// 上传并返回新文件名称
// 上传并返回新文件名称
fileName
=
FileUploadUtils
.
upload
(
filePath
,
file
);
fileName
=
FileUploadUtils
.
upload
(
filePath
,
file
);
}
}
String
url
=
serverConfig
.
getUrl
()
+
fileName
;
String
url
=
fileName
;
//上传临时素材
//上传临时素材
Optional
<
com
.
linkwechat
.
common
.
enums
.
MediaType
>
mediaType
=
com
.
linkwechat
.
common
.
enums
.
MediaType
.
of
(
type
);
Optional
<
com
.
linkwechat
.
common
.
enums
.
MediaType
>
mediaType
=
com
.
linkwechat
.
common
.
enums
.
MediaType
.
of
(
type
);
if
(!
mediaType
.
isPresent
())
{
if
(!
mediaType
.
isPresent
())
{
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeChatCollectionMapper.xml
View file @
2b73c98
...
@@ -36,6 +36,9 @@
...
@@ -36,6 +36,9 @@
LEFT JOIN we_category wc ON wm.category_id = wc.id
LEFT JOIN we_category wc ON wm.category_id = wc.id
<where>
<where>
wcc.user_id=#{userId}
wcc.user_id=#{userId}
<if
test=
"keyword!=null and keyword!=''"
>
AND wm.material_name LIKE CONCAT('%',#{keyword},'%')
</if>
</where>
</where>
</select>
</select>
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeChatItemMapper.xml
View file @
2b73c98
...
@@ -34,6 +34,9 @@
...
@@ -34,6 +34,9 @@
LEFT JOIN we_category wc ON wm.category_id = wc.id
LEFT JOIN we_category wc ON wm.category_id = wc.id
<where>
<where>
wci.side_id=#{sideId}
wci.side_id=#{sideId}
<if
test=
"keyword!=null and keyword!=''"
>
AND wm.material_name LIKE CONCAT('%',#{keyword},'%')
</if>
</where>
</where>
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
\ 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