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 f5a06ae7
authored
Dec 20, 2020
by
xinlaa
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
https://gitee.com/LinkWeChat/link-wechat
into master
2 parents
3ed94698
93018173
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
49 changed files
with
1503 additions
and
76 deletions
README.md
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeConversationArchiveController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerMessagePushController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WePosterController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WePosterFontController.java
linkwe-admin/src/main/resources/application-druid.yml
linkwe-admin/src/main/resources/application.yml
linkwe-common/pom.xml
linkwe-common/src/main/java/com/linkwechat/common/constant/WeConstans.java
linkwe-common/src/main/java/com/linkwechat/common/core/domain/BaseEntity.java
linkwe-common/src/main/java/com/linkwechat/common/core/elasticsearch/ElasticSearch.java
linkwe-common/src/main/java/com/linkwechat/common/enums/BusinessType.java
linkwe-common/src/main/java/com/linkwechat/common/enums/WePosterSubassemblyType.java
linkwe-common/src/main/java/com/linkwechat/common/utils/file/FileUploadUtils.java
linkwe-common/src/main/java/com/linkwechat/common/utils/img/ImageUtils.java
linkwe-common/src/main/java/com/linkwechat/common/utils/img/NetFileUtils.java
linkwe-common/src/main/java/com/tencent/wework/FinanceUtils.java
linkwe-framework/pom.xml
linkwe-wecom/src/main/java/com/linkwechat/wecom/client/WeMsgAuditClient.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/client/WeMsgauditClient.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeCustomer.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeCustomerMessageOriginal.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeGroup.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WePoster.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WePosterFont.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WePosterSubassembly.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/msgaudit/WeMsgAuditDto.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/msgaudit/MsgauditDto.java → linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeMsgAuditVo.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WePosterFontMapper.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WePosterMapper.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WePosterSubassemblyMapper.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeAccessTokenService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeConversationArchiveService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWePosterFontService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWePosterService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWePosterSubassemblyService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeUserService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeAccessTokenServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeConversationArchiveServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCorpAccountServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessagePushServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WePosterFontServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WePosterServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WePosterSubassemblyServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeUserServiceImpl.java
linkwe-wecom/src/main/resources/mapper/wecom/WeposterFontMapper.xml
linkwe-wecom/src/main/resources/mapper/wecom/WeposterMapper.xml
linkwe-wecom/src/main/resources/mapper/wecom/WeposterSubassemblyMapper.xml
pom.xml
README.md
View file @
f5a06ae
...
@@ -210,7 +210,7 @@ com.linkwechat
...
@@ -210,7 +210,7 @@ com.linkwechat
### 联系作者加入群
### 联系作者加入群


### 特别鸣谢
### 特别鸣谢
...
...
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeConversationArchiveController.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
web
.
controller
.
wecom
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.api.R
;
import
com.github.pagehelper.PageInfo
;
import
com.linkwechat.wecom.service.IWeConversationArchiveService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author sxw
* @description 会话存档controller
* @date 2020/12/19 13:51
**/
@Slf4j
@RestController
@RequestMapping
(
"/wecom/finance"
)
public
class
WeConversationArchiveController
{
@Autowired
private
IWeConversationArchiveService
weConversationArchiveService
;
/**
* 获取内部联系人列表
*
* @return
*/
@PreAuthorize
(
"@ss.hasPermi('conversationArchive:InternalContact:list')"
)
@GetMapping
(
"/getInternalContactList"
)
public
R
<
PageInfo
<
JSONObject
>>
getInternalContactList
(
String
userId
,
int
pageSize
,
int
pageNum
)
{
return
R
.
ok
(
weConversationArchiveService
.
getInternalContactList
(
userId
,
pageSize
,
pageNum
));
}
}
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeCustomerMessagePushController.java
View file @
f5a06ae
...
@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
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.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -34,7 +35,7 @@ public class WeCustomerMessagePushController extends BaseController {
...
@@ -34,7 +35,7 @@ public class WeCustomerMessagePushController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('system:push:add')"
)
@PreAuthorize
(
"@ss.hasPermi('system:push:add')"
)
@Log
(
title
=
"新增群发消息发送"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"新增群发消息发送"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
value
=
"add"
)
@PostMapping
(
value
=
"add"
)
public
AjaxResult
add
(
CustomerMessagePushDto
customerMessagePushDto
)
{
public
AjaxResult
add
(
@RequestBody
CustomerMessagePushDto
customerMessagePushDto
)
{
try
{
try
{
weCustomerMessagePushService
.
addWeCustomerMessagePush
(
customerMessagePushDto
);
weCustomerMessagePushService
.
addWeCustomerMessagePush
(
customerMessagePushDto
);
}
catch
(
JsonProcessingException
e
)
{
}
catch
(
JsonProcessingException
e
)
{
...
...
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WePosterController.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
web
.
controller
.
wecom
;
import
com.linkwechat.common.core.controller.BaseController
;
import
com.linkwechat.common.core.domain.AjaxResult
;
import
com.linkwechat.common.utils.SnowFlakeUtil
;
import
com.linkwechat.wecom.domain.WePoster
;
import
com.linkwechat.wecom.domain.WePosterFont
;
import
com.linkwechat.wecom.domain.WePosterSubassembly
;
import
com.linkwechat.wecom.service.IWePosterFontService
;
import
com.linkwechat.wecom.service.IWePosterService
;
import
com.linkwechat.wecom.service.IWePosterSubassemblyService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
@RestController
@RequestMapping
(
value
=
"wecom/poster/"
)
@Api
(
description
=
"海报"
)
public
class
WePosterController
extends
BaseController
{
@Resource
private
IWePosterService
wePosterService
;
@Resource
private
IWePosterSubassemblyService
wePosterSubassemblyService
;
@Resource
private
IWePosterFontService
wePosterFontService
;
@PostMapping
(
value
=
"insert"
)
@ApiOperation
(
"创建海报"
)
@Transactional
(
rollbackFor
=
RuntimeException
.
class
)
public
AjaxResult
insert
(
@RequestBody
WePoster
poster
){
wePosterService
.
generateSimpleImg
(
poster
);
poster
.
setId
(
SnowFlakeUtil
.
nextId
());
poster
.
setDelFlag
(
1
);
wePosterService
.
saveOrUpdate
(
poster
);
poster
.
getPosterSubassemblyList
().
forEach
(
wePosterSubassembly
->
{
wePosterSubassembly
.
setDelFlag
(
1
);
wePosterSubassembly
.
setId
(
SnowFlakeUtil
.
nextId
());
wePosterSubassembly
.
setPosterId
(
poster
.
getId
());
});
wePosterSubassemblyService
.
saveBatch
(
poster
.
getPosterSubassemblyList
());
return
AjaxResult
.
success
(
"创建成功"
);
}
@PutMapping
(
value
=
"update"
)
@ApiOperation
(
"修改海报"
)
@Transactional
(
rollbackFor
=
RuntimeException
.
class
)
public
AjaxResult
update
(
@RequestBody
WePoster
poster
){
if
(
poster
.
getId
()
==
null
){
return
AjaxResult
.
error
(
"id为空"
);
}
wePosterService
.
generateSimpleImg
(
poster
);
wePosterService
.
saveOrUpdate
(
poster
);
List
<
WePosterSubassembly
>
posterSubassemblyList
=
wePosterSubassemblyService
.
lambdaQuery
().
eq
(
WePosterSubassembly:
:
getPosterId
,
poster
.
getId
()).
eq
(
WePosterSubassembly:
:
getDelFlag
,
1
).
list
();
Map
<
Long
,
WePosterSubassembly
>
posterSubassemblyMap
=
posterSubassemblyList
.
stream
().
collect
(
Collectors
.
toMap
(
WePosterSubassembly:
:
getId
,
p
->
p
));
List
<
WePosterSubassembly
>
insertList
=
new
ArrayList
<>();
List
<
WePosterSubassembly
>
updateList
=
new
ArrayList
<>();
poster
.
getPosterSubassemblyList
().
forEach
(
wePosterSubassembly
->
{
if
(
wePosterSubassembly
.
getId
()
==
null
){
wePosterSubassembly
.
setId
(
SnowFlakeUtil
.
nextId
());
wePosterSubassembly
.
setPosterId
(
poster
.
getId
());
wePosterSubassembly
.
setDelFlag
(
1
);
insertList
.
add
(
wePosterSubassembly
);
}
else
{
posterSubassemblyMap
.
remove
(
wePosterSubassembly
.
getId
());
updateList
.
add
(
wePosterSubassembly
);
}
});
if
(!
CollectionUtils
.
isEmpty
(
insertList
))
{
wePosterSubassemblyService
.
saveBatch
(
insertList
);
}
if
(!
CollectionUtils
.
isEmpty
(
updateList
))
{
wePosterSubassemblyService
.
updateBatchById
(
updateList
);
}
List
<
WePosterSubassembly
>
deleteList
=
new
ArrayList
<>(
posterSubassemblyMap
.
values
());
if
(!
CollectionUtils
.
isEmpty
(
deleteList
)){
deleteList
.
forEach
(
wePosterSubassembly
->
wePosterSubassembly
.
setDelFlag
(
0
));
wePosterSubassemblyService
.
updateBatchById
(
deleteList
);
}
return
AjaxResult
.
success
(
"修改成功"
);
}
@GetMapping
(
value
=
"list"
)
@ApiOperation
(
"列表查询海报"
)
public
AjaxResult
list
(){
List
<
WePoster
>
fontList
=
wePosterService
.
lambdaQuery
()
.
eq
(
WePoster:
:
getDelFlag
,
1
)
.
orderByDesc
(
WePoster:
:
getCreateTime
)
.
list
();
return
AjaxResult
.
success
(
fontList
);
}
@GetMapping
(
value
=
"entity/{id}"
)
@ApiOperation
(
"查询海报详情"
)
public
AjaxResult
entity
(
@PathVariable
Long
id
){
return
AjaxResult
.
success
(
wePosterService
.
selectOne
(
id
));
}
@GetMapping
(
value
=
"page"
)
@ApiOperation
(
"分页查询海报"
)
public
AjaxResult
page
(){
startPage
();
List
<
WePoster
>
fontList
=
wePosterService
.
lambdaQuery
()
.
eq
(
WePoster:
:
getDelFlag
,
1
)
.
orderByDesc
(
WePoster:
:
getCreateTime
)
.
list
();
return
AjaxResult
.
success
(
getDataTable
(
fontList
));
}
@DeleteMapping
(
value
=
"delete/{id}"
)
@ApiOperation
(
value
=
"删除海报"
)
@Transactional
(
rollbackFor
=
RuntimeException
.
class
)
public
AjaxResult
deletePosterFont
(
@PathVariable
Long
id
){
wePosterService
.
lambdaUpdate
().
set
(
WePoster:
:
getDelFlag
,
0
).
eq
(
WePoster:
:
getId
,
id
);
wePosterSubassemblyService
.
lambdaUpdate
().
set
(
WePosterSubassembly:
:
getDelFlag
,
0
).
eq
(
WePosterSubassembly:
:
getPosterId
,
id
).
eq
(
WePosterSubassembly:
:
getFontId
,
1
);
return
AjaxResult
.
success
(
"删除成功"
);
}
}
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WePosterFontController.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
web
.
controller
.
wecom
;
import
com.linkwechat.common.core.controller.BaseController
;
import
com.linkwechat.common.core.domain.AjaxResult
;
import
com.linkwechat.common.utils.SnowFlakeUtil
;
import
com.linkwechat.web.controller.common.CommonController
;
import
com.linkwechat.wecom.domain.WePosterFont
;
import
com.linkwechat.wecom.service.IWePosterFontService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@RequestMapping
(
value
=
"wecom/posterFont/"
)
@Api
(
description
=
"海报字体"
)
public
class
WePosterFontController
extends
BaseController
{
@Resource
private
IWePosterFontService
wePosterFontService
;
@PostMapping
(
value
=
"posterFont"
)
@ApiOperation
(
"创建海报字体"
)
@Transactional
(
rollbackFor
=
RuntimeException
.
class
)
public
AjaxResult
insertPosterFont
(
@RequestBody
WePosterFont
posterFont
){
posterFont
.
setId
(
SnowFlakeUtil
.
nextId
());
posterFont
.
setDelFlag
(
1
);
wePosterFontService
.
save
(
posterFont
);
return
AjaxResult
.
success
(
"创建成功"
);
}
@PutMapping
(
value
=
"posterFont"
)
@ApiOperation
(
"修改海报字体"
)
@Transactional
(
rollbackFor
=
RuntimeException
.
class
)
public
AjaxResult
updatePosterFont
(
@RequestBody
WePosterFont
posterFont
){
if
(
posterFont
.
getId
()
==
null
){
return
AjaxResult
.
error
(
"id为空"
);
}
wePosterFontService
.
saveOrUpdate
(
posterFont
);
return
AjaxResult
.
success
(
"修改成功"
);
}
@GetMapping
(
value
=
"posterFontList"
)
@ApiOperation
(
"列表查询海报字体"
)
public
AjaxResult
selectPosterFontList
(){
List
<
WePosterFont
>
fontList
=
wePosterFontService
.
lambdaQuery
()
.
eq
(
WePosterFont:
:
getDelFlag
,
1
)
.
orderByDesc
(
WePosterFont:
:
getOrder
)
.
orderByDesc
(
WePosterFont:
:
getCreateTime
)
.
list
();
return
AjaxResult
.
success
(
fontList
);
}
@GetMapping
(
value
=
"posterFontPage"
)
@ApiOperation
(
"分页查询海报字体"
)
public
AjaxResult
selectPosterFontPage
(){
startPage
();
List
<
WePosterFont
>
fontList
=
wePosterFontService
.
lambdaQuery
()
.
eq
(
WePosterFont:
:
getDelFlag
,
1
)
.
orderByDesc
(
WePosterFont:
:
getOrder
)
.
orderByDesc
(
WePosterFont:
:
getCreateTime
)
.
list
();
return
AjaxResult
.
success
(
getDataTable
(
fontList
));
}
@DeleteMapping
(
value
=
"posterFont/{id}"
)
@ApiOperation
(
"删除海报字体"
)
@Transactional
(
rollbackFor
=
RuntimeException
.
class
)
public
AjaxResult
deletePosterFont
(
@PathVariable
Long
id
){
wePosterFontService
.
lambdaUpdate
().
set
(
WePosterFont:
:
getDelFlag
,
0
).
eq
(
WePosterFont:
:
getId
,
id
);
return
AjaxResult
.
success
(
"删除成功"
);
}
}
linkwe-admin/src/main/resources/application-druid.yml
View file @
f5a06ae
...
@@ -6,9 +6,9 @@ spring:
...
@@ -6,9 +6,9 @@ spring:
druid
:
druid
:
# 主库数据源
# 主库数据源
master
:
master
:
url
:
jdbc:mysql://
cdb-gvebaa90.bj.tencentcdb.com:10179
/link-wechat?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://
127.0.0.1:3306
/link-wechat?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
root
username
:
root
password
:
linkwechat2020
password
:
root
# 从库数据源
# 从库数据源
slave
:
slave
:
# 从数据源开关/默认关闭
# 从数据源开关/默认关闭
...
...
linkwe-admin/src/main/resources/application.yml
View file @
f5a06ae
...
@@ -176,6 +176,6 @@ wecome:
...
@@ -176,6 +176,6 @@ wecome:
-
/service/get_login_info
-
/service/get_login_info
#企微回调通知配置
#企微回调通知配置
callBack
:
callBack
:
appIdOrCorpId
:
ww24262ce93851488f
token
:
jtQ1aGHgSmH2UHNBIndUtUe6B6EwfR
encodingAesKey
:
Vga4HWv7nFbRDYK8iAaQbxmkuecpo2BAfmXAyWwcXMO
\ No newline at end of file
\ No newline at end of file
appIdOrCorpId
:
token
:
encodingAesKey
:
\ No newline at end of file
\ No newline at end of file
linkwe-common/pom.xml
View file @
f5a06ae
...
@@ -101,6 +101,16 @@
...
@@ -101,6 +101,16 @@
<artifactId>
jjwt
</artifactId>
<artifactId>
jjwt
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
io.vertx
</groupId>
<artifactId>
vertx-core
</artifactId>
</dependency>
<dependency>
<groupId>
io.vertx
</groupId>
<artifactId>
vertx-web-client
</artifactId>
</dependency>
<!-- redis 缓存操作 -->
<!-- redis 缓存操作 -->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
...
@@ -137,6 +147,8 @@
...
@@ -137,6 +147,8 @@
</dependency>
</dependency>
<!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本-->
<!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本-->
<dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<groupId>
io.swagger
</groupId>
...
...
linkwe-common/src/main/java/com/linkwechat/common/constant/WeConstans.java
View file @
f5a06ae
...
@@ -269,4 +269,7 @@ public class WeConstans {
...
@@ -269,4 +269,7 @@ public class WeConstans {
}
}
public
static
final
String
WECOM_FINANCE_INDEX
=
"finance"
;
public
static
final
String
WECOM_FINANCE_INDEX
=
"finance"
;
/** 开启会话存档成员列表 **/
public
static
final
String
weMsgAuditKey
=
"wecom_msg_audit:user:ids"
;
}
}
linkwe-common/src/main/java/com/linkwechat/common/core/domain/BaseEntity.java
View file @
f5a06ae
...
@@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
...
@@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.linkwechat.common.utils.DateUtils
;
import
com.linkwechat.common.utils.DateUtils
;
import
com.linkwechat.common.utils.SecurityUtils
;
import
com.linkwechat.common.utils.SecurityUtils
;
import
io.swagger.annotations.ApiModelProperty
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
/**
/**
...
@@ -22,34 +23,48 @@ public class BaseEntity implements Serializable
...
@@ -22,34 +23,48 @@ public class BaseEntity implements Serializable
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/** 搜索值 */
/** 搜索值 */
@TableField
(
exist
=
false
)
@ApiModelProperty
(
hidden
=
true
)
private
String
searchValue
;
private
String
searchValue
;
/** 创建者 */
/** 创建者 */
@ApiModelProperty
(
hidden
=
true
)
private
String
createBy
;
private
String
createBy
;
/** 创建时间 */
/** 创建时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
hidden
=
true
)
private
Date
createTime
=
new
Date
();
private
Date
createTime
=
new
Date
();
/** 更新者 */
/** 更新者 */
@ApiModelProperty
(
hidden
=
true
)
private
String
updateBy
;
private
String
updateBy
;
/** 更新时间 */
/** 更新时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
hidden
=
true
)
private
Date
updateTime
=
new
Date
();
private
Date
updateTime
=
new
Date
();
/** 备注 */
/** 备注 */
@TableField
(
exist
=
false
)
@ApiModelProperty
(
hidden
=
true
)
private
String
remark
;
private
String
remark
;
/** 开始时间 */
/** 开始时间 */
@JsonIgnore
@JsonIgnore
@TableField
(
exist
=
false
)
@ApiModelProperty
(
hidden
=
true
)
private
String
beginTime
;
private
String
beginTime
;
/** 结束时间 */
/** 结束时间 */
@JsonIgnore
@JsonIgnore
@TableField
(
exist
=
false
)
@ApiModelProperty
(
hidden
=
true
)
private
String
endTime
;
private
String
endTime
;
/** 请求参数 */
/** 请求参数 */
@TableField
(
exist
=
false
)
@ApiModelProperty
(
hidden
=
true
)
private
Map
<
String
,
Object
>
params
;
private
Map
<
String
,
Object
>
params
;
public
String
getSearchValue
()
public
String
getSearchValue
()
...
...
linkwe-common/src/main/java/com/linkwechat/common/core/elasticsearch/ElasticSearch.java
View file @
f5a06ae
package
com
.
linkwechat
.
common
.
core
.
elasticsearch
;
package
com
.
linkwechat
.
common
.
core
.
elasticsearch
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.github.pagehelper.PageInfo
;
import
com.linkwechat.common.core.domain.elastic.ElasticSearchEntity
;
import
com.linkwechat.common.core.domain.elastic.ElasticSearchEntity
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest
;
import
org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest
;
...
@@ -24,6 +25,9 @@ import org.elasticsearch.index.reindex.DeleteByQueryRequest;
...
@@ -24,6 +25,9 @@ import org.elasticsearch.index.reindex.DeleteByQueryRequest;
import
org.elasticsearch.search.SearchHit
;
import
org.elasticsearch.search.SearchHit
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -163,7 +167,7 @@ public class ElasticSearch {
...
@@ -163,7 +167,7 @@ public class ElasticSearch {
* @since
* @since
*/
*/
public
void
insertOrUpdateOne
(
String
idxName
,
ElasticSearchEntity
entity
)
{
public
void
insertOrUpdateOne
(
String
idxName
,
ElasticSearchEntity
entity
)
{
IndexRequest
request
=
new
IndexRequest
(
idxName
,
"_doc"
);
IndexRequest
request
=
new
IndexRequest
(
idxName
,
"_doc"
);
log
.
error
(
"Data : id={},entity={}"
,
entity
.
getId
(),
JSON
.
toJSONString
(
entity
.
getData
()));
log
.
error
(
"Data : id={},entity={}"
,
entity
.
getId
(),
JSON
.
toJSONString
(
entity
.
getData
()));
request
.
id
(
entity
.
getId
());
request
.
id
(
entity
.
getId
());
request
.
source
(
entity
.
getData
(),
XContentType
.
JSON
);
request
.
source
(
entity
.
getData
(),
XContentType
.
JSON
);
...
@@ -190,7 +194,7 @@ public class ElasticSearch {
...
@@ -190,7 +194,7 @@ public class ElasticSearch {
*/
*/
public
void
insertBatch
(
String
idxName
,
List
<
ElasticSearchEntity
>
list
)
{
public
void
insertBatch
(
String
idxName
,
List
<
ElasticSearchEntity
>
list
)
{
BulkRequest
request
=
new
BulkRequest
();
BulkRequest
request
=
new
BulkRequest
();
list
.
forEach
(
item
->
request
.
add
(
new
IndexRequest
(
idxName
,
"_doc"
).
id
(
item
.
getId
())
list
.
forEach
(
item
->
request
.
add
(
new
IndexRequest
(
idxName
,
"_doc"
).
id
(
item
.
getId
())
.
source
(
item
.
getData
(),
XContentType
.
JSON
)));
.
source
(
item
.
getData
(),
XContentType
.
JSON
)));
try
{
try
{
restHighLevelClient
.
bulk
(
request
,
RequestOptions
.
DEFAULT
);
restHighLevelClient
.
bulk
(
request
,
RequestOptions
.
DEFAULT
);
...
@@ -213,7 +217,7 @@ public class ElasticSearch {
...
@@ -213,7 +217,7 @@ public class ElasticSearch {
*/
*/
public
<
T
>
void
deleteBatch
(
String
idxName
,
Collection
<
T
>
idList
)
{
public
<
T
>
void
deleteBatch
(
String
idxName
,
Collection
<
T
>
idList
)
{
BulkRequest
request
=
new
BulkRequest
();
BulkRequest
request
=
new
BulkRequest
();
idList
.
forEach
(
item
->
request
.
add
(
new
DeleteRequest
(
idxName
,
"_doc"
,
item
.
toString
())));
idList
.
forEach
(
item
->
request
.
add
(
new
DeleteRequest
(
idxName
,
"_doc"
,
item
.
toString
())));
try
{
try
{
restHighLevelClient
.
bulk
(
request
,
RequestOptions
.
DEFAULT
);
restHighLevelClient
.
bulk
(
request
,
RequestOptions
.
DEFAULT
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -237,6 +241,7 @@ public class ElasticSearch {
...
@@ -237,6 +241,7 @@ public class ElasticSearch {
request
.
source
(
builder
);
request
.
source
(
builder
);
try
{
try
{
SearchResponse
response
=
restHighLevelClient
.
search
(
request
,
RequestOptions
.
DEFAULT
);
SearchResponse
response
=
restHighLevelClient
.
search
(
request
,
RequestOptions
.
DEFAULT
);
long
totalHits
=
response
.
getHits
().
getTotalHits
().
value
;
SearchHit
[]
hits
=
response
.
getHits
().
getHits
();
SearchHit
[]
hits
=
response
.
getHits
().
getHits
();
List
<
T
>
res
=
new
ArrayList
<>(
hits
.
length
);
List
<
T
>
res
=
new
ArrayList
<>(
hits
.
length
);
for
(
SearchHit
hit
:
hits
)
{
for
(
SearchHit
hit
:
hits
)
{
...
@@ -247,6 +252,32 @@ public class ElasticSearch {
...
@@ -247,6 +252,32 @@ public class ElasticSearch {
throw
new
RuntimeException
(
e
);
throw
new
RuntimeException
(
e
);
}
}
}
}
public
<
T
>
PageInfo
<
T
>
searchPage
(
String
idxName
,
SearchSourceBuilder
builder
,
int
pageNum
,
int
pageSize
,
Class
<
T
>
c
)
{
SearchRequest
request
=
new
SearchRequest
(
idxName
);
request
.
source
(
builder
);
try
{
SearchResponse
response
=
restHighLevelClient
.
search
(
request
,
RequestOptions
.
DEFAULT
);
int
totalHits
=(
int
)
response
.
getHits
().
getTotalHits
().
value
;
SearchHit
[]
hits
=
response
.
getHits
().
getHits
();
List
<
T
>
res
=
new
ArrayList
<>(
hits
.
length
);
for
(
SearchHit
hit
:
hits
)
{
res
.
add
(
JSON
.
parseObject
(
hit
.
getSourceAsString
(),
c
));
}
// 封装分页
PageInfo
<
T
>
page
=
new
PageInfo
<>();
page
.
setList
(
res
);
page
.
setPageNum
(
pageNum
);
page
.
setPageSize
(
pageSize
);
page
.
setTotal
(
totalHits
);
page
.
setPages
(
totalHits
==
0
?
0
:
(
totalHits
%
pageNum
==
0
?
totalHits
/
pageNum
:
(
totalHits
/
pageNum
)
+
1
));
page
.
setHasNextPage
(
page
.
getPageNum
()
<
page
.
getPages
());
return
page
;
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
}
/**
/**
* 删除index
* 删除index
*
*
...
...
linkwe-common/src/main/java/com/linkwechat/common/enums/BusinessType.java
View file @
f5a06ae
...
@@ -2,11 +2,10 @@ package com.linkwechat.common.enums;
...
@@ -2,11 +2,10 @@ package com.linkwechat.common.enums;
/**
/**
* 业务操作类型
* 业务操作类型
*
*
* @author ruoyi
* @author ruoyi
*/
*/
public
enum
BusinessType
public
enum
BusinessType
{
{
/**
/**
* 其它
* 其它
*/
*/
...
@@ -51,7 +50,7 @@ public enum BusinessType
...
@@ -51,7 +50,7 @@ public enum BusinessType
* 生成代码
* 生成代码
*/
*/
GENCODE
,
GENCODE
,
/**
/**
* 清空数据
* 清空数据
*/
*/
...
...
linkwe-common/src/main/java/com/linkwechat/common/enums/WePosterSubassemblyType.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
common
.
enums
;
/**
* 海报组件类型
* @author ws
*/
public
enum
WePosterSubassemblyType
{
/**
* 自定义文本
*/
plainText
(
0
,
"自定义文本"
),
/**
* 图片
*/
picture
(
1
,
"图片"
),
/**
* 二维码
*/
QRCode
(
2
,
"二维码"
);
private
Integer
code
;
private
String
label
;
private
WePosterSubassemblyType
(
Integer
code
,
String
label
){
this
.
code
=
code
;
this
.
label
=
label
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getLabel
()
{
return
label
;
}
public
void
setLabel
(
String
label
)
{
this
.
label
=
label
;
}
}
linkwe-common/src/main/java/com/linkwechat/common/utils/file/FileUploadUtils.java
View file @
f5a06ae
...
@@ -161,7 +161,12 @@ public class FileUploadUtils {
...
@@ -161,7 +161,12 @@ public class FileUploadUtils {
private
static
final
String
getPathFileName
(
String
uploadDir
,
String
fileName
)
throws
IOException
{
private
static
final
String
getPathFileName
(
String
uploadDir
,
String
fileName
)
throws
IOException
{
int
dirLastIndex
=
RuoYiConfig
.
getProfile
().
length
()
+
1
;
int
dirLastIndex
=
RuoYiConfig
.
getProfile
().
length
()
+
1
;
String
currentDir
=
StringUtils
.
substring
(
uploadDir
,
dirLastIndex
);
String
currentDir
=
StringUtils
.
substring
(
uploadDir
,
dirLastIndex
);
String
pathFileName
=
Constants
.
RESOURCE_PREFIX
+
"/"
+
currentDir
+
"/"
+
fileName
;
String
pathFileName
;
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isBlank
(
currentDir
)){
pathFileName
=
Constants
.
RESOURCE_PREFIX
+
"/"
+
fileName
;
}
else
{
pathFileName
=
Constants
.
RESOURCE_PREFIX
+
"/"
+
currentDir
+
"/"
+
fileName
;
}
return
pathFileName
;
return
pathFileName
;
}
}
...
...
linkwe-common/src/main/java/com/linkwechat/common/utils/img/ImageUtils.java
0 → 100644
View file @
f5a06ae
This diff is collapsed.
Click to expand it.
linkwe-common/src/main/java/com/linkwechat/common/utils/img/NetFileUtils.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
common
.
utils
.
img
;
import
io.netty.buffer.ByteBuf
;
import
io.netty.buffer.Unpooled
;
import
io.vertx.core.Vertx
;
import
io.vertx.core.buffer.Buffer
;
import
io.vertx.ext.web.client.WebClient
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.awt.*
;
import
java.io.*
;
import
java.nio.channels.Channels
;
import
java.nio.channels.FileChannel
;
import
java.nio.channels.ReadableByteChannel
;
import
java.util.concurrent.Callable
;
import
java.util.concurrent.CountDownLatch
;
import
java.util.concurrent.TimeUnit
;
/**
* @author ws
*/
public
class
NetFileUtils
{
private
static
final
Vertx
vertx
=
Vertx
.
vertx
();
private
static
final
WebClient
webClient
=
WebClient
.
create
(
vertx
);
public
static
void
main
(
String
[]
args
)
{
FileCallable
fileCallable
=
getNetFile
(
"https://pc-index-skin.cdn.bcebos.com/hiphoto/51631423522.jpg?x-bce-process=image/crop,x_0,y_13,w_1999,h_1250"
);
ByteArrayOutputStream
byteArrayOutputStream
=
getByteArrayOutputStream
(
fileCallable
,
true
);
StreamMultipartFile
file
=
new
StreamMultipartFile
(
"你好啊.jpg"
,
byteArrayOutputStream
.
toByteArray
());
File
f
=
new
File
(
"D:/网页/2.jpg"
);
try
{
file
.
transferTo
(
f
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
public
static
FileCallable
getNetFile
(
String
urlPath
){
FileCallable
fileCallable
=
new
FileCallable
();
webClient
.
getAbs
(
urlPath
).
send
().
onSuccess
(
response
->
{
if
(
response
.
statusCode
()
==
200
||
response
.
statusCode
()
==
302
){
Buffer
buffer
=
response
.
body
();
buffer
.
getByteBuf
();
byte
[]
bytes
=
buffer
.
getBytes
();
fileCallable
.
setFile
(
bytes
);
}
else
{
fileCallable
.
error
();
}
}).
onFailure
(
throwable
->
{
fileCallable
.
error
();
throwable
.
printStackTrace
();
});
return
fileCallable
;
}
public
static
ByteArrayOutputStream
getByteArrayOutputStream
(
FileCallable
fileCallable
,
boolean
clearBuf
){
try
{
ByteBuf
byteBuf
=
fileCallable
.
call
();
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
int
byteLength
=
1024
;
byte
[]
bytes
=
new
byte
[
byteLength
];
int
length
=
0
;
while
((
length
=
byteBuf
.
readableBytes
())
>
0
){
byteBuf
.
readBytes
(
bytes
,
0
,
Math
.
min
(
length
,
byteLength
));
byteArrayOutputStream
.
write
(
bytes
,
0
,
Math
.
min
(
length
,
byteLength
));
}
if
(!
clearBuf
){
byteBuf
.
resetReaderIndex
();
}
else
{
byteBuf
.
clear
();
}
return
byteArrayOutputStream
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
public
static
class
FileCallable
implements
Callable
<
ByteBuf
>{
private
final
CountDownLatch
countDownLatch
=
new
CountDownLatch
(
1
);
private
volatile
ByteBuf
byteBuf
;
/**
* Computes a result, or throws an exception if unable to do so.
*
* @return computed result
* @throws Exception if unable to compute a result
*/
@Override
public
ByteBuf
call
()
throws
Exception
{
boolean
k
=
countDownLatch
.
await
(
10
,
TimeUnit
.
MINUTES
);
if
(
k
&&
byteBuf
!=
null
){
return
byteBuf
;
}
else
{
throw
new
RuntimeException
(
"获取失败"
);
}
}
public
void
setFile
(
byte
[]
bytes
){
ByteBuf
byteBuf
=
Unpooled
.
directBuffer
();
byteBuf
.
writeBytes
(
bytes
);
this
.
byteBuf
=
byteBuf
;
countDownLatch
.
countDown
();
}
public
void
error
(){
countDownLatch
.
countDown
();
}
}
public
static
class
StreamMultipartFile
implements
MultipartFile
{
private
final
String
filename
;
private
final
byte
[]
bytes
;
public
StreamMultipartFile
(
String
filename
,
byte
[]
bytes
){
this
.
filename
=
filename
;
this
.
bytes
=
bytes
;
}
@Override
public
String
getName
()
{
return
filename
;
}
@Override
public
String
getOriginalFilename
()
{
return
filename
;
}
@Override
public
String
getContentType
()
{
return
null
;
}
@Override
public
boolean
isEmpty
()
{
return
bytes
==
null
||
bytes
.
length
==
0
;
}
@Override
public
long
getSize
()
{
return
bytes
.
length
;
}
@Override
public
byte
[]
getBytes
()
throws
IOException
{
return
this
.
bytes
;
}
@Override
public
InputStream
getInputStream
()
throws
IOException
{
return
new
ByteArrayInputStream
(
bytes
);
}
@Override
public
void
transferTo
(
File
file
)
throws
IOException
,
IllegalStateException
{
FileOutputStream
fileOutputStream
=
new
FileOutputStream
(
file
);
FileChannel
fileChannel
=
fileOutputStream
.
getChannel
();
ReadableByteChannel
channel
=
Channels
.
newChannel
(
new
ByteArrayInputStream
(
bytes
));
fileChannel
.
transferFrom
(
channel
,
0
,
bytes
.
length
);
fileChannel
.
close
();
channel
.
close
();
fileOutputStream
.
close
();
}
}
}
linkwe-common/src/main/java/com/tencent/wework/FinanceUtils.java
View file @
f5a06ae
...
@@ -55,33 +55,7 @@ public class FinanceUtils {
...
@@ -55,33 +55,7 @@ public class FinanceUtils {
}
}
}
}
private
final
static
String
privateKey
=
"-----BEGIN RSA PRIVATE KEY-----\n"
+
private
final
static
String
privateKey
=
""
;
"MIIEpAIBAAKCAQEAjGwIQIMGDJonMQdX3OJzZN0YVoYbORK1FU/8vhwdI9ixxSGW\n"
+
"nrAQc6r8k3g1QTXzmKAxdVlAa1OGZCpl5X5A6C9JwDhFpuN+SKJxfxtHNv1oBk0r\n"
+
"LnDftsdlibZFQn3fiMomxKyU8eujWBe31+pLQXaTSdSHcNhb+NrBa7AtNUr/c7bK\n"
+
"nnFUZHDpXFB4Z0BhK1cRh2NN7ppLNnIJXpduGrwGtLdx++LsBaX2vjO4qW/DKP2Z\n"
+
"3gZON1tGoofS1IPhCg0naoRN3lL7ctFAyxOr2ualGOc6hpvBGfjnBKU42aoaKQEi\n"
+
"7tVJHChonZXMRcm4mdPu5371IzPeR3NYlP3ESQIDAQABAoIBAEux8MDV4GzqrDXB\n"
+
"v5tSduHoTTZXFFWvv+29MIFKpmqsZSfe81KXlkbD5WOZaRu9+ZJMyFx5wEAaxlc4\n"
+
"g7UyWcrPsvHrY6CTAYAmEQhzq+/4qhq7fouKTQ46boHNv4gYUmdqkXtzjNbcLzFN\n"
+
"l8zMf8TKJpul9VzfRLThN2LVlYkkETcCukzZrK+aSCi6E/dL+noL1ndZYmWF5kbB\n"
+
"lk881x5CdbusYBtoxfh6ie0EXfCyK4duX3OdvXRcSpTdqiqTcrtt9oinh4ZHV930\n"
+
"BCTPkGGz5UL3C243W3dlzuonNXqwl++FCSyRMVONYSgb4NRJn4fvehjGtXyAv3Sz\n"
+
"nSAVoAECgYEA9dhYk4DT2Hclaqo/0ugQvUp7oIPN9qFgrZ6nU94SHkdrBqhFrCmz\n"
+
"32GeYGSsQJQx3T9Kuip7oGX9AOKn3f30NrcuAe9VzzWAkCKQgQgmtMVySAPWCVr9\n"
+
"4MH77hc3ijxr6iGd70BQ7EDyVQGRvZqOLl1wu7yZ9vhbVHA87KpgHf0CgYEAkjjn\n"
+
"mNudh+rs8ibrGu+md8bXJdxHtIbncXF5VsV7wi4HlHfKnWqy+z2If1akm2iacnsi\n"
+
"XDVqyYNExdtoxmbPc/R9ZJ8jP0FLPoWACcjP03r9H+5eiXrmniZbElGshnwKHFFh\n"
+
"ZlY1xPAXFgEjh10DDG1wK6/9eB13o+NdP7c7yz0CgYEA3HujNOadF84DaJ43j1dB\n"
+
"bAKYzWRoG4CvzAY12ymW5kD244mWssjT4MsT1y9yrJg8AEj7I+tl5HyTY2/jTVys\n"
+
"4UV3pZSYSLWbD6lwH8jHrehGjf+ivdE1T5Wp8+YukXOO9PQhSKlN6hR1QXee1YT/\n"
+
"buWubTDAhJZIknn2qepDOaECgYA/OnITLCwTYOey0ldpn2V5d7cC/RzYmFkuOeZB\n"
+
"OkYIsoS+k4o+xau9bl8+yQWG2hWnGU3DV6nkl2m+sOC+oihkuL0cLKA+MwrJb0rt\n"
+
"cDNF/HHGQ/oHMujUTDunUT/sK2jn09ztNqwri7I/5qApYXP3BL+zdHeDYCKi8Kca\n"
+
"7S3i9QKBgQCgKgQf8u+oRojMH14iJssAyNEhZgmJ85s/BeiUmMuW5K8iZZ5pnVuq\n"
+
"8nc/IJGVPHRTObdGCd1L4d5UERiX46Z1BjYv/nuK5DScDcB3mq6K9VXJLNE+MxwW\n"
+
"wOVT+6FjmBRucGXczAkWXCH7++y6gYzE+OuRIdv5sVkE24gNG7sawg==\n"
+
"-----END RSA PRIVATE KEY-----"
;
/**
/**
* 拉取聊天记录
* 拉取聊天记录
...
...
linkwe-framework/pom.xml
View file @
f5a06ae
...
@@ -75,6 +75,15 @@
...
@@ -75,6 +75,15 @@
<artifactId>
linkwe-wecom
</artifactId>
<artifactId>
linkwe-wecom
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
io.vertx
</groupId>
<artifactId>
vertx-core
</artifactId>
</dependency>
<dependency>
<groupId>
io.vertx
</groupId>
<artifactId>
vertx-web-client
</artifactId>
</dependency>
</dependencies>
</dependencies>
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/client/WeMsgAuditClient.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
client
;
import
com.dtflys.forest.annotation.DataObject
;
import
com.dtflys.forest.annotation.Request
;
import
com.linkwechat.wecom.domain.dto.msgaudit.WeMsgAuditDto
;
/**
* @author sxw
* @description 会话存档接口
* @date 2020/12/2 16:45
**/
public
interface
WeMsgAuditClient
{
/**
* 获取会话内容存档开启成员列表
*/
@Request
(
url
=
"/msgaudit/get_permit_user_list"
,
type
=
"POST"
)
WeMsgAuditDto
getPermitUserList
(
@DataObject
WeMsgAuditDto
msgAuditDto
);
/**
* 单聊 获取会话中外部成员的同意情况
* @param msgAuditDto
* @return
*/
@Request
(
url
=
"/msgaudit/check_single_agree"
,
type
=
"POST"
)
WeMsgAuditDto
checkSingleAgree
(
@DataObject
WeMsgAuditDto
msgAuditDto
);
/**
* 群聊 获取群会话中外部成员的同意情况
* @param msgAuditDto
* @return
*/
@Request
(
url
=
"/msgaudit/check_room_agree"
,
type
=
"POST"
)
WeMsgAuditDto
checkRoomAgree
(
@DataObject
WeMsgAuditDto
msgAuditDto
);
/**
* 获取会话内容存档内部群信息
* @param msgAuditDto
* @return
*/
@Request
(
url
=
"/msgaudit/groupchat/get"
,
type
=
"POST"
)
WeMsgAuditDto
getGroupChat
(
@DataObject
WeMsgAuditDto
msgAuditDto
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/client/WeMsgauditClient.java
deleted
100644 → 0
View file @
3ed9469
package
com
.
linkwechat
.
wecom
.
client
;
import
com.dtflys.forest.annotation.DataObject
;
import
com.dtflys.forest.annotation.Request
;
import
com.linkwechat.wecom.domain.dto.WeMessagePushResultDto
;
import
com.linkwechat.wecom.domain.dto.msgaudit.MsgauditDto
;
/**
* @author sxw
* @description 会话存档接口
* @date 2020/12/2 16:45
**/
public
interface
WeMsgauditClient
{
/**
* 获取会话内容存档开启成员列表
*/
@Request
(
url
=
"/msgaudit/get_permit_user_list"
,
type
=
"POST"
)
WeMessagePushResultDto
sendMessageToUser
(
@DataObject
MsgauditDto
msgauditDto
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeCustomer.java
View file @
f5a06ae
...
@@ -92,6 +92,8 @@ public class WeCustomer extends BaseEntity
...
@@ -92,6 +92,8 @@ public class WeCustomer extends BaseEntity
private
Integer
status
;
private
Integer
status
;
/** 部门 */
/** 部门 */
@TableField
(
exist
=
false
)
private
String
departmentIds
;
private
String
departmentIds
;
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeCustomerMessageOriginal.java
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
domain
;
package
com
.
linkwechat
.
wecom
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.linkwechat.common.core.domain.BaseEntity
;
import
com.linkwechat.common.core.domain.BaseEntity
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
/**
* 群发消息 原始数据信息表 we_customer_messageOriginal
* 群发消息 原始数据信息表 we_customer_messageOriginal
*
*
...
@@ -63,5 +66,4 @@ public class WeCustomerMessageOriginal extends BaseEntity {
...
@@ -63,5 +66,4 @@ public class WeCustomerMessageOriginal extends BaseEntity {
*/
*/
private
int
delFlag
;
private
int
delFlag
;
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeGroup.java
View file @
f5a06ae
...
@@ -63,6 +63,7 @@ public class WeGroup {
...
@@ -63,6 +63,7 @@ public class WeGroup {
private
String
endTime
;
private
String
endTime
;
/**员工id*/
/**员工id*/
@TableField
(
exist
=
false
)
private
String
userIds
;
private
String
userIds
;
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WePoster.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
domain
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.linkwechat.common.core.domain.BaseEntity
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* 海报
* @author ws
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@TableName
(
value
=
"we_poster"
)
@ApiModel
(
value
=
"海报"
)
public
class
WePoster
extends
BaseEntity
{
@TableId
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
/**
* 海报标题
*/
@TableField
@ApiModelProperty
(
value
=
"海报标题"
)
private
String
title
;
/**
* 背景图片
*/
@TableField
@ApiModelProperty
(
value
=
"背景图片"
)
private
String
backgroundImgPath
;
/**
* 示例图片
*/
@TableField
@ApiModelProperty
(
value
=
"示例图片"
)
private
String
sampleImgPath
;
/**
* 海报类型 1 通用海报
*/
@TableField
@ApiModelProperty
(
value
=
"海报类型 1 通用海报(默认)"
)
private
Long
type
;
@TableField
@ApiModelProperty
(
value
=
"海报状态 1 启用 0 关闭"
)
private
Integer
delFlag
;
@TableField
@ApiModelProperty
(
value
=
"海报背景宽度"
)
private
Integer
width
;
@TableField
@ApiModelProperty
(
value
=
"海报背景高度"
)
private
Integer
height
;
/**
* 海报组件数组
*/
@TableField
(
exist
=
false
)
private
List
<
WePosterSubassembly
>
posterSubassemblyList
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WePosterFont.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.linkwechat.common.core.domain.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 海报字体实体
* @author ws
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@TableName
(
value
=
"we_poster_font"
)
@ApiModel
(
value
=
"海报字体"
)
public
class
WePosterFont
extends
BaseEntity
{
/**
* id
*/
@TableId
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
/**
* 字体名称
*/
@TableField
(
value
=
"font_name"
)
@ApiModelProperty
(
value
=
"字体名称"
)
private
String
fontName
;
/**
* 字体网络地址
*/
@TableField
(
value
=
"font_url"
)
@ApiModelProperty
(
value
=
"字体链接"
)
private
String
fontUrl
;
/**
* 字体排序
*/
@TableField
(
value
=
"`order`"
)
@ApiModelProperty
(
value
=
"展示排序 顺序"
)
private
Integer
order
;
/**
* 状态
*/
@TableField
(
value
=
"del_flag"
)
@ApiModelProperty
(
value
=
"1 启用 0 关闭"
)
private
Integer
delFlag
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WePosterSubassembly.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.linkwechat.common.core.domain.BaseEntity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
* 海报组成部件
* @author ws
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
@TableName
(
value
=
"we_poster_subassembly"
)
@ApiModel
(
value
=
"海报组成部件"
)
public
class
WePosterSubassembly
extends
BaseEntity
{
@TableId
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
@TableField
@ApiModelProperty
(
value
=
"海报id"
)
private
Long
posterId
;
/**
* x坐标
*/
@TableField
(
value
=
"`left`"
)
@ApiModelProperty
(
value
=
"x坐标"
)
private
Integer
left
;
/**
* y坐标
*/
@TableField
@ApiModelProperty
(
value
=
"y坐标"
)
private
Integer
top
;
/**
* 宽度
*/
@TableField
@ApiModelProperty
(
value
=
"控件宽度"
)
private
Integer
width
;
/**
* 高度
*/
@TableField
@ApiModelProperty
(
value
=
"空间高度"
)
private
Integer
height
;
/**
* 类型 1 固定文本 2 固定图片 3 二维码图片
*/
@TableField
@ApiModelProperty
(
value
=
"类型 1 固定文本 2 固定图片 3 二维码图片"
)
private
Integer
type
;
@TableField
@ApiModelProperty
(
value
=
"字体id"
)
private
Long
fontId
;
/**
* 字体大小(像素大小)
*/
@TableField
@ApiModelProperty
(
value
=
"字体大小(像素大小)"
)
private
Integer
fontSize
;
/**
* 字体颜色(十六进制)
*/
@TableField
@ApiModelProperty
(
value
=
"字体颜色(十六进制)"
)
private
String
fontColor
;
/**
* 字体对齐方式 0 左对齐 1居中 2右对齐
*/
@TableField
@ApiModelProperty
(
value
=
"字体对齐方式 0 左对齐 1居中 2右对齐"
)
private
Integer
fontTextAlign
;
/**
* 图片网络地址
*/
@TableField
@ApiModelProperty
(
value
=
"图片地址(与字体id互斥)"
)
private
String
imgPath
;
@TableField
@ApiModelProperty
(
value
=
"1 启用 0 删除"
)
private
Integer
delFlag
;
/**
* 文字内容
*/
@TableField
@ApiModelProperty
(
value
=
"文本内容"
)
private
String
content
;
/**
* 字体实体
*/
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"字体信息"
)
private
WePosterFont
font
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/msgaudit/WeMsgAuditDto.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
domain
.
dto
.
msgaudit
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.linkwechat.wecom.domain.dto.WeResultDto
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author sxw
* @description 会话存档
* @date 2020/12/2 16:47
**/
@Data
public
class
WeMsgAuditDto
extends
WeResultDto
{
/**
* 设置在开启范围内的成员的userid列表
*/
private
List
<
String
>
ids
;
/**
* 同意情况
*/
private
List
<
AgreeInfo
>
agreeInfo
;
/**
* roomid对应的群名称
*/
private
String
roomName
;
/**
* roomid对应的群创建者,userid
*/
private
String
creator
;
/**
* roomid对应的群创建时间
*/
@JSONField
(
format
=
"unixtime"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
roomCreateTime
;
/**
* roomid对应的群公告
*/
private
String
notice
;
/**
* roomid对应的群成员列表
*/
private
List
<
Member
>
members
;
private
class
Member
{
/**
* roomid群成员的id,userid
*/
private
String
memberId
;
/**
* roomid群成员的入群时间
*/
private
String
joinTime
;
}
private
class
AgreeInfo
{
/**
* 同意状态改变的具体时间,utc时间
*/
private
String
statusChangeTime
;
/**
* 成员Id
*/
private
String
userId
;
/**
* 群内外部联系人的externalopenid
*/
private
String
exteranaLopenId
;
/**
* 同意:”Agree”,不同意:”Disagree”,默认同意:”Default_Agree”
*/
private
String
agreeSagreeStatustatus
;
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/
dto/msgaudit/MsgauditDt
o.java
→
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/
vo/WeMsgAuditV
o.java
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
domain
.
dto
.
msgaudit
;
package
com
.
linkwechat
.
wecom
.
domain
.
vo
;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.List
;
/**
/**
* @author sxw
* @author sxw
* @description 会话存档
* @description 会话存档
入参实体
* @date 2020/12/
2 16:47
* @date 2020/12/
19 12:38
**/
**/
@Data
@Data
public
class
MsgauditDt
o
{
public
class
WeMsgAuditV
o
{
/**
/**
* 拉取对应版本的开启成员列表。1表示办公版;2表示服务版;3表示企业版。
* 拉取对应版本的开启成员列表。1表示办公版;2表示服务版;3表示企业版。
* 非必填,不填写的时候返回全量成员列表
* 非必填,不填写的时候返回全量成员列表
*/
*/
private
Integer
type
;
private
Integer
type
;
/** 待查询的roomid */
private
String
roomid
;
/** 待查询的会话信息,数组 */
private
List
<
Info
>
info
;
@Data
private
class
Info
{
/**
* 内部成员的userid
*/
private
String
userid
;
/**
* 外部成员的externalopenid
*/
private
String
exteranalopenid
;
}
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WePosterFontMapper.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.linkwechat.wecom.domain.WePosterFont
;
/**
* 海报字体
* @author ws
*/
public
interface
WePosterFontMapper
extends
BaseMapper
<
WePosterFont
>
{
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WePosterMapper.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.linkwechat.wecom.domain.WePoster
;
import
com.linkwechat.wecom.domain.WePosterFont
;
/**
* 海报
* @author ws
*/
public
interface
WePosterMapper
extends
BaseMapper
<
WePoster
>
{
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WePosterSubassemblyMapper.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.linkwechat.wecom.domain.WePosterFont
;
import
com.linkwechat.wecom.domain.WePosterSubassembly
;
/**
* 海报组件
* @author ws
*/
public
interface
WePosterSubassemblyMapper
extends
BaseMapper
<
WePosterSubassembly
>{
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeAccessTokenService.java
View file @
f5a06ae
...
@@ -14,4 +14,6 @@ public interface IWeAccessTokenService {
...
@@ -14,4 +14,6 @@ public interface IWeAccessTokenService {
public
String
findProviderAccessToken
();
public
String
findProviderAccessToken
();
public
void
removeToken
();
}
}
\ No newline at end of file
\ No newline at end of file
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeConversationArchiveService.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageInfo
;
/**
* @author sxw
* @description 会话存档业务接口
* @date 2020/12/19 13:59
**/
public
interface
IWeConversationArchiveService
{
/**
* 根据用户ID 获取对应内部联系人列表
*
* @param userId
* @return
*/
PageInfo
<
JSONObject
>
getInternalContactList
(
String
userId
,
int
pageSize
,
int
pageNum
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWePosterFontService.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.linkwechat.wecom.domain.WePosterFont
;
import
java.awt.*
;
/**
* 海报
* @author ws
*/
public
interface
IWePosterFontService
extends
IService
<
WePosterFont
>
{
/**
* 获取字体
* @param id
* @param size
* @return
*/
public
Font
getFont
(
Long
id
,
Integer
size
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWePosterService.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.linkwechat.wecom.domain.WePoster
;
/**
* 海报
* @author ws
*/
public
interface
IWePosterService
extends
IService
<
WePoster
>
{
/**
* 查询一条
* @param id
* @return
*/
public
WePoster
selectOne
(
Long
id
);
/**
* 生成海报图片地址
* @param poster
* @return
*/
public
String
generateSimpleImg
(
WePoster
poster
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWePosterSubassemblyService.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.linkwechat.wecom.domain.WePosterSubassembly
;
import
java.util.List
;
/**
* 海报
* @author ws
*/
public
interface
IWePosterSubassemblyService
extends
IService
<
WePosterSubassembly
>
{
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeUserService.java
View file @
f5a06ae
...
@@ -2,6 +2,7 @@ package com.linkwechat.wecom.service;
...
@@ -2,6 +2,7 @@ package com.linkwechat.wecom.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.dto.msgaudit.WeMsgAuditDto
;
import
com.linkwechat.wecom.domain.vo.WeAllocateCustomersVo
;
import
com.linkwechat.wecom.domain.vo.WeAllocateCustomersVo
;
import
com.linkwechat.wecom.domain.vo.WeAllocateGroupsVo
;
import
com.linkwechat.wecom.domain.vo.WeAllocateGroupsVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
...
@@ -108,4 +109,11 @@ public interface IWeUserService extends IService<WeUser>
...
@@ -108,4 +109,11 @@ public interface IWeUserService extends IService<WeUser>
*/
*/
List
<
WeAllocateGroupsVo
>
getAllocateGroups
(
WeAllocateGroupsVo
weAllocateGroupsVo
);
List
<
WeAllocateGroupsVo
>
getAllocateGroups
(
WeAllocateGroupsVo
weAllocateGroupsVo
);
/**
* 获取会话内容存档开启成员列表
* @param msgAuditDto
* @return
*/
List
<
WeUser
>
getPermitUserList
(
WeMsgAuditDto
msgAuditDto
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeAccessTokenServiceImpl.java
View file @
f5a06ae
...
@@ -68,6 +68,8 @@ public class WeAccessTokenServiceImpl implements IWeAccessTokenService {
...
@@ -68,6 +68,8 @@ public class WeAccessTokenServiceImpl implements IWeAccessTokenService {
}
}
private
String
findAccessToken
(
String
accessTokenKey
){
private
String
findAccessToken
(
String
accessTokenKey
){
String
weAccessToken
=
redisCache
.
getCacheObject
(
accessTokenKey
);
String
weAccessToken
=
redisCache
.
getCacheObject
(
accessTokenKey
);
...
@@ -105,4 +107,15 @@ public class WeAccessTokenServiceImpl implements IWeAccessTokenService {
...
@@ -105,4 +107,15 @@ public class WeAccessTokenServiceImpl implements IWeAccessTokenService {
}
}
/**
* 清空redis中的相关token
*/
@Override
public
void
removeToken
()
{
redisCache
.
deleteObject
(
WeConstans
.
WE_COMMON_ACCESS_TOKEN
);
redisCache
.
deleteObject
(
WeConstans
.
WE_CONTACT_ACCESS_TOKEN
);
redisCache
.
deleteObject
(
WeConstans
.
WE_PROVIDER_ACCESS_TOKEN
);
}
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeConversationArchiveServiceImpl.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.github.pagehelper.PageInfo
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.core.elasticsearch.ElasticSearch
;
import
com.linkwechat.wecom.service.IWeConversationArchiveService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.elasticsearch.index.query.BoolQueryBuilder
;
import
org.elasticsearch.index.query.QueryBuilders
;
import
org.elasticsearch.search.builder.SearchSourceBuilder
;
import
org.elasticsearch.search.sort.SortOrder
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* @author sxw
* @description 会话存档业务实现类
* @date 2020/12/19 14:00
**/
@Slf4j
@Service
public
class
WeConversationArchiveServiceImpl
implements
IWeConversationArchiveService
{
@Autowired
private
ElasticSearch
elasticSearch
;
/**
* 根据用户ID 获取对应内部联系人列表
*
* @param userId
* @return
*/
@Override
public
PageInfo
<
JSONObject
>
getInternalContactList
(
String
userId
,
int
pageSize
,
int
pageNum
)
{
SearchSourceBuilder
builder
=
new
SearchSourceBuilder
();
int
from
=
(
pageSize
-
1
)
*
pageNum
;
builder
.
size
(
pageNum
);
builder
.
from
(
from
);
builder
.
sort
(
"msgtime"
,
SortOrder
.
ASC
);
BoolQueryBuilder
boolQueryBuilder
=
QueryBuilders
.
boolQuery
()
.
must
(
QueryBuilders
.
termsQuery
(
"tolist.keyword"
,
userId
))
.
must
(
QueryBuilders
.
termQuery
(
"roomid"
,
""
));
builder
.
query
(
boolQueryBuilder
);
return
elasticSearch
.
searchPage
(
WeConstans
.
WECOM_FINANCE_INDEX
,
builder
,
pageNum
,
pageSize
,
JSONObject
.
class
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCorpAccountServiceImpl.java
View file @
f5a06ae
...
@@ -6,6 +6,7 @@ import java.util.Optional;
...
@@ -6,6 +6,7 @@ import java.util.Optional;
import
com.linkwechat.common.constant.Constants
;
import
com.linkwechat.common.constant.Constants
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.utils.DateUtils
;
import
com.linkwechat.common.utils.DateUtils
;
import
com.linkwechat.wecom.service.IWeAccessTokenService
;
import
com.linkwechat.wecom.service.IWeCorpAccountService
;
import
com.linkwechat.wecom.service.IWeCorpAccountService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -25,6 +26,10 @@ public class WeCorpAccountServiceImpl implements IWeCorpAccountService {
...
@@ -25,6 +26,10 @@ public class WeCorpAccountServiceImpl implements IWeCorpAccountService {
@Autowired
@Autowired
private
WeCorpAccountMapper
weCorpAccountMapper
;
private
WeCorpAccountMapper
weCorpAccountMapper
;
@Autowired
private
IWeAccessTokenService
iWeAccessTokenService
;
/**
/**
* 查询企业id相关配置
* 查询企业id相关配置
*
*
...
@@ -72,7 +77,15 @@ public class WeCorpAccountServiceImpl implements IWeCorpAccountService {
...
@@ -72,7 +77,15 @@ public class WeCorpAccountServiceImpl implements IWeCorpAccountService {
public
int
updateWeCorpAccount
(
WeCorpAccount
wxCorpAccount
)
public
int
updateWeCorpAccount
(
WeCorpAccount
wxCorpAccount
)
{
{
return
weCorpAccountMapper
.
updateWeCorpAccount
(
wxCorpAccount
);
int
returnCode
=
weCorpAccountMapper
.
updateWeCorpAccount
(
wxCorpAccount
);
if
(
Constants
.
SERVICE_RETURN_SUCCESS_CODE
<
returnCode
){
iWeAccessTokenService
.
removeToken
();
}
return
returnCode
;
}
}
...
@@ -94,7 +107,18 @@ public class WeCorpAccountServiceImpl implements IWeCorpAccountService {
...
@@ -94,7 +107,18 @@ public class WeCorpAccountServiceImpl implements IWeCorpAccountService {
*/
*/
@Override
@Override
public
int
startVailWeCorpAccount
(
String
corpId
)
{
public
int
startVailWeCorpAccount
(
String
corpId
)
{
return
weCorpAccountMapper
.
startVailWeCorpAccount
(
corpId
);
int
returnCode
=
weCorpAccountMapper
.
startVailWeCorpAccount
(
corpId
);
if
(
Constants
.
SERVICE_RETURN_SUCCESS_CODE
<
returnCode
){
iWeAccessTokenService
.
removeToken
();
}
return
returnCode
;
}
}
@Override
@Override
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeCustomerMessagePushServiceImpl.java
View file @
f5a06ae
...
@@ -84,7 +84,7 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
...
@@ -84,7 +84,7 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
//定义一个任务执行队列
//定义一个任务执行队列
//把任务放入执行队列
//把任务放入执行队列
//任务执行 sendMessgae(WeMessagePush weMessagePush) 方法
//任务执行 sendMessgae(WeMessagePush weMessagePush) 方法
if
(
DateUtils
.
diffTime
(
new
Date
(),
DateUtil
.
parse
(
customerMessagePushDto
.
getSettingTime
(),
"yyyy-MM-dd HH:mm:ss"
))
<
0
)
{
if
(
DateUtils
.
diffTime
(
new
Date
(),
DateUtil
.
parse
(
customerMessagePushDto
.
getSettingTime
(),
"yyyy-MM-dd HH:mm:ss"
))
>
0
)
{
throw
new
WeComException
(
"发送时间不能小于当前时间"
);
throw
new
WeComException
(
"发送时间不能小于当前时间"
);
}
}
...
@@ -265,7 +265,7 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
...
@@ -265,7 +265,7 @@ public class WeCustomerMessagePushServiceImpl implements IWeCustomerMessagePushS
List
<
String
>
customers
=
Lists
.
newArrayList
();
List
<
String
>
customers
=
Lists
.
newArrayList
();
if
(
pushRange
.
equals
(
"0"
)){
if
(
pushRange
.
equals
(
"0"
)){
//查询系统所有客户
//查询系统所有客户
List
<
WeCustomer
>
weCustomers
=
weCustomerService
.
list
(
);
List
<
WeCustomer
>
weCustomers
=
weCustomerService
.
selectWeCustomerList
(
null
);
if
(
CollectionUtils
.
isNotEmpty
(
weCustomers
)){
if
(
CollectionUtils
.
isNotEmpty
(
weCustomers
)){
customers
=
weCustomers
.
stream
().
map
(
WeCustomer:
:
getExternalUserid
).
distinct
().
collect
(
Collectors
.
toList
());
customers
=
weCustomers
.
stream
().
map
(
WeCustomer:
:
getExternalUserid
).
distinct
().
collect
(
Collectors
.
toList
());
}
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WePosterFontServiceImpl.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.linkwechat.common.utils.img.NetFileUtils
;
import
com.linkwechat.wecom.domain.WePosterFont
;
import
com.linkwechat.wecom.mapper.WePosterFontMapper
;
import
com.linkwechat.wecom.service.IWePosterFontService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.awt.*
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
/**
* 海报字体
* @author ws
*/
@Service
public
class
WePosterFontServiceImpl
extends
ServiceImpl
<
WePosterFontMapper
,
WePosterFont
>
implements
IWePosterFontService
{
@Resource
private
WePosterFontMapper
wePosterFontMapper
;
/**
* 字体数据缓存
*/
private
final
Map
<
Long
,
Font
>
FONT_MAP
=
new
ConcurrentHashMap
<>();
/**
* 获取字体
*
* @param id
* @param size
* @return
*/
@Override
public
Font
getFont
(
Long
id
,
Integer
size
)
{
WePosterFont
posterFont
=
this
.
getById
(
id
);
if
(
posterFont
==
null
){
throw
new
RuntimeException
(
"字体id为:"
+
id
+
"的字体不存在"
);
}
Font
font
;
if
((
font
=
FONT_MAP
.
get
(
posterFont
.
getId
()))
!=
null
){
return
font
.
deriveFont
((
float
)
size
);
}
ByteArrayInputStream
byteArrayInputStream
=
new
ByteArrayInputStream
(
NetFileUtils
.
getByteArrayOutputStream
(
NetFileUtils
.
getNetFile
(
posterFont
.
getFontUrl
()),
false
).
toByteArray
());
try
{
font
=
Font
.
createFont
(
Font
.
TRUETYPE_FONT
,
byteArrayInputStream
);
FONT_MAP
.
put
(
posterFont
.
getId
(),
font
);
font
=
font
.
deriveFont
((
float
)
size
);
return
font
;
}
catch
(
FontFormatException
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"字体格式错误"
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WePosterServiceImpl.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.linkwechat.common.utils.file.FileUploadUtils
;
import
com.linkwechat.common.utils.file.FileUtils
;
import
com.linkwechat.common.utils.img.ImageUtils
;
import
com.linkwechat.common.utils.img.NetFileUtils
;
import
com.linkwechat.wecom.domain.WePoster
;
import
com.linkwechat.wecom.domain.WePosterFont
;
import
com.linkwechat.wecom.domain.WePosterSubassembly
;
import
com.linkwechat.wecom.mapper.WePosterMapper
;
import
com.linkwechat.wecom.service.IWePosterFontService
;
import
com.linkwechat.wecom.service.IWePosterService
;
import
com.linkwechat.wecom.service.IWePosterSubassemblyService
;
import
org.apache.commons.fileupload.FileItem
;
import
org.apache.commons.fileupload.FileItemFactory
;
import
org.apache.commons.fileupload.disk.DiskFileItemFactory
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.multipart.commons.CommonsMultipartFile
;
import
javax.annotation.Resource
;
import
javax.imageio.ImageIO
;
import
java.awt.*
;
import
java.awt.image.BufferedImage
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.net.NetworkInterface
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 海报字体
*
* @author ws
*/
@Service
public
class
WePosterServiceImpl
extends
ServiceImpl
<
WePosterMapper
,
WePoster
>
implements
IWePosterService
{
@Resource
private
WePosterMapper
wePosterMapper
;
@Resource
private
IWePosterSubassemblyService
posterSubassemblyService
;
@Resource
private
IWePosterFontService
posterFontService
;
/**
* 查询一条
*
* @param id
* @return
*/
@Override
public
WePoster
selectOne
(
Long
id
)
{
WePoster
poster
=
this
.
lambdaQuery
()
.
eq
(
WePoster:
:
getId
,
id
)
.
eq
(
WePoster:
:
getDelFlag
,
1
)
.
list
().
get
(
0
);
if
(
poster
==
null
)
{
return
null
;
}
poster
.
setPosterSubassemblyList
(
posterSubassemblyService
.
lambdaQuery
().
eq
(
WePosterSubassembly:
:
getPosterId
,
poster
.
getId
()).
list
());
if
(!
CollectionUtils
.
isEmpty
(
poster
.
getPosterSubassemblyList
()))
{
List
<
Long
>
fontIdList
=
poster
.
getPosterSubassemblyList
().
stream
().
filter
(
wePosterSubassembly
->
wePosterSubassembly
.
getFontId
()
!=
null
).
map
(
WePosterSubassembly:
:
getFontId
).
distinct
().
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
fontIdList
))
{
List
<
WePosterFont
>
fontList
=
posterFontService
.
lambdaQuery
().
in
(
WePosterFont:
:
getId
,
fontIdList
).
list
();
if
(!
CollectionUtils
.
isEmpty
(
fontList
))
{
Map
<
Long
,
WePosterFont
>
fontMap
=
fontList
.
stream
().
collect
(
Collectors
.
toMap
(
WePosterFont:
:
getId
,
f
->
f
));
poster
.
getPosterSubassemblyList
().
stream
().
filter
(
wePosterSubassembly
->
wePosterSubassembly
.
getFontId
()
!=
null
).
forEach
(
wePosterSubassembly
->
{
WePosterFont
font
=
fontMap
.
get
(
wePosterSubassembly
.
getFontId
());
if
(
font
!=
null
)
{
wePosterSubassembly
.
setFont
(
font
);
}
});
}
}
}
return
poster
;
}
/**
* 生成海报图片地址
*
* @param poster
* @return
*/
@Override
public
String
generateSimpleImg
(
WePoster
poster
)
{
Map
<
Long
,
Font
>
fontMap
=
poster
.
getPosterSubassemblyList
().
stream
().
filter
(
wePosterSubassembly
->
wePosterSubassembly
.
getFontId
()
!=
null
)
.
collect
(
Collectors
.
toMap
(
WePosterSubassembly:
:
getFontId
,
wePosterSubassembly
->
posterFontService
.
getFont
(
wePosterSubassembly
.
getFontId
(),
wePosterSubassembly
.
getFontSize
())));
Map
<
String
,
NetFileUtils
.
FileCallable
>
fileCallableMap
=
poster
.
getPosterSubassemblyList
().
stream
().
filter
(
wePosterSubassembly
->
StringUtils
.
isNotBlank
(
wePosterSubassembly
.
getImgPath
())).
distinct
().
collect
(
Collectors
.
toMap
(
WePosterSubassembly:
:
getImgPath
,
wePosterSubassembly
->
{
return
NetFileUtils
.
getNetFile
(
wePosterSubassembly
.
getImgPath
());
}));
if
(
CollectionUtils
.
isEmpty
(
fileCallableMap
))
{
fileCallableMap
=
new
HashMap
<>();
}
fileCallableMap
.
put
(
poster
.
getBackgroundImgPath
(),
NetFileUtils
.
getNetFile
(
poster
.
getBackgroundImgPath
()));
Map
<
String
,
BufferedImage
>
bufferedImageMap
=
fileCallableMap
.
entrySet
().
stream
().
collect
(
Collectors
.
toMap
(
stringFileCallableEntry
->
stringFileCallableEntry
.
getKey
(),
stringFileCallableEntry
->
{
try
{
return
ImageIO
.
read
(
new
ByteArrayInputStream
(
NetFileUtils
.
getByteArrayOutputStream
(
stringFileCallableEntry
.
getValue
(),
false
).
toByteArray
()));
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"图片读取错误"
);
}
}));
BufferedImage
backgroundImg
=
bufferedImageMap
.
get
(
poster
.
getBackgroundImgPath
());
poster
.
setWidth
(
backgroundImg
.
getWidth
());
poster
.
setHeight
(
backgroundImg
.
getHeight
());
poster
.
getPosterSubassemblyList
().
forEach
(
wePosterSubassembly
->
{
if
(
wePosterSubassembly
.
getFontId
()
!=
null
)
{
Font
font
=
fontMap
.
get
(
wePosterSubassembly
.
getFontId
());
FontMetrics
fontMetrics
=
ImageUtils
.
getFontMetrics
(
font
);
Color
color
;
if
(
StringUtils
.
isNotBlank
(
wePosterSubassembly
.
getFontColor
()))
{
color
=
ImageUtils
.
getColor
(
wePosterSubassembly
.
getFontColor
());
}
else
{
color
=
Color
.
BLACK
;
}
List
<
ImageUtils
.
LineText
>
lineTextList
=
ImageUtils
.
splitContext
(
wePosterSubassembly
.
getContent
(),
fontMetrics
,
wePosterSubassembly
.
getLeft
(),
wePosterSubassembly
.
getTop
(),
wePosterSubassembly
.
getWidth
(),
wePosterSubassembly
.
getHeight
(),
wePosterSubassembly
.
getFontTextAlign
());
lineTextList
.
forEach
(
lineText
->
{
ImageUtils
.
writeFontBufferedImage
(
backgroundImg
,
lineText
.
getText
(),
lineText
.
getPointX
(),
lineText
.
getPointY
(),
font
,
color
);
});
}
else
{
BufferedImage
bufferedImage
=
bufferedImageMap
.
get
(
wePosterSubassembly
.
getImgPath
());
bufferedImage
=
ImageUtils
.
fixedDimensionBufferedImage
(
bufferedImage
,
BufferedImage
.
TYPE_INT_RGB
,
wePosterSubassembly
.
getWidth
(),
wePosterSubassembly
.
getHeight
());
ImageUtils
.
mergeBufferedImage
(
backgroundImg
,
bufferedImage
,
wePosterSubassembly
.
getLeft
(),
wePosterSubassembly
.
getTop
());
}
});
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
try
{
ImageIO
.
write
(
backgroundImg
,
"jpg"
,
byteArrayOutputStream
);
NetFileUtils
.
StreamMultipartFile
streamMultipartFile
=
new
NetFileUtils
.
StreamMultipartFile
(
System
.
currentTimeMillis
()+
".jpg"
,
byteArrayOutputStream
.
toByteArray
());
byteArrayOutputStream
.
close
();
String
path
=
FileUploadUtils
.
uploadFile
(
streamMultipartFile
);
poster
.
setSampleImgPath
(
path
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"图片生成错误"
);
}
return
null
;
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WePosterSubassemblyServiceImpl.java
0 → 100644
View file @
f5a06ae
package
com
.
linkwechat
.
wecom
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.linkwechat.wecom.domain.WePosterSubassembly
;
import
com.linkwechat.wecom.mapper.WePosterSubassemblyMapper
;
import
com.linkwechat.wecom.service.IWePosterSubassemblyService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 海报字体
* @author ws
*/
@Service
public
class
WePosterSubassemblyServiceImpl
extends
ServiceImpl
<
WePosterSubassemblyMapper
,
WePosterSubassembly
>
implements
IWePosterSubassemblyService
{
@Resource
private
WePosterSubassemblyMapper
wePosterSubassemblyMapper
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeUserServiceImpl.java
View file @
f5a06ae
...
@@ -3,9 +3,12 @@ package com.linkwechat.wecom.service.impl;
...
@@ -3,9 +3,12 @@ package com.linkwechat.wecom.service.impl;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.core.redis.RedisCache
;
import
com.linkwechat.common.exception.wecom.WeComException
;
import
com.linkwechat.common.exception.wecom.WeComException
;
import
com.linkwechat.wecom.client.WeMsgAuditClient
;
import
com.linkwechat.wecom.client.WeUserClient
;
import
com.linkwechat.wecom.client.WeUserClient
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.dto.msgaudit.WeMsgAuditDto
;
import
com.linkwechat.wecom.domain.vo.WeAllocateCustomersVo
;
import
com.linkwechat.wecom.domain.vo.WeAllocateCustomersVo
;
import
com.linkwechat.wecom.domain.vo.WeAllocateGroupsVo
;
import
com.linkwechat.wecom.domain.vo.WeAllocateGroupsVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
import
com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo
;
...
@@ -22,6 +25,8 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -22,6 +25,8 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.concurrent.TimeUnit
;
/**
/**
* 通讯录相关客户Service业务层处理
* 通讯录相关客户Service业务层处理
...
@@ -35,10 +40,15 @@ public class WeUserServiceImpl extends ServiceImpl<WeUserMapper,WeUser> implemen
...
@@ -35,10 +40,15 @@ public class WeUserServiceImpl extends ServiceImpl<WeUserMapper,WeUser> implemen
@Autowired
@Autowired
private
WeUserMapper
weUserMapper
;
private
WeUserMapper
weUserMapper
;
@Autowired
private
RedisCache
redisCache
;
@Autowired
@Autowired
private
WeUserClient
weUserClient
;
private
WeUserClient
weUserClient
;
@Autowired
private
WeMsgAuditClient
weMsgAuditClient
;
@Autowired
@Autowired
private
IWeCustomerService
iWeCustomerService
;
private
IWeCustomerService
iWeCustomerService
;
...
@@ -245,5 +255,17 @@ public class WeUserServiceImpl extends ServiceImpl<WeUserMapper,WeUser> implemen
...
@@ -245,5 +255,17 @@ public class WeUserServiceImpl extends ServiceImpl<WeUserMapper,WeUser> implemen
return
this
.
baseMapper
.
getAllocateGroups
(
weAllocateGroupsVo
);
return
this
.
baseMapper
.
getAllocateGroups
(
weAllocateGroupsVo
);
}
}
@Override
public
List
<
WeUser
>
getPermitUserList
(
WeMsgAuditDto
msgAuditDto
)
{
List
<
String
>
userIds
=
redisCache
.
getCacheList
(
WeConstans
.
weMsgAuditKey
);
if
(
CollectionUtil
.
isNotEmpty
(
userIds
)){
WeMsgAuditDto
permitUserList
=
weMsgAuditClient
.
getPermitUserList
(
msgAuditDto
);
userIds
=
Optional
.
ofNullable
(
userIds
).
orElse
(
permitUserList
.
getIds
());
redisCache
.
setCacheList
(
WeConstans
.
weMsgAuditKey
,
userIds
);
redisCache
.
expire
(
WeConstans
.
weMsgAuditKey
,
10
,
TimeUnit
.
MILLISECONDS
);
}
return
weUserMapper
.
selectBatchIds
(
userIds
);
}
}
}
linkwe-wecom/src/main/resources/mapper/wecom/WeposterFontMapper.xml
0 → 100644
View file @
f5a06ae
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.linkwechat.wecom.mapper.WePosterFontMapper"
>
</mapper>
\ No newline at end of file
\ No newline at end of file
linkwe-wecom/src/main/resources/mapper/wecom/WeposterMapper.xml
0 → 100644
View file @
f5a06ae
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.linkwechat.wecom.mapper.WePosterMapper"
>
</mapper>
\ No newline at end of file
\ No newline at end of file
linkwe-wecom/src/main/resources/mapper/wecom/WeposterSubassemblyMapper.xml
0 → 100644
View file @
f5a06ae
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.linkwechat.wecom.mapper.WePosterSubassemblyMapper"
>
</mapper>
\ No newline at end of file
\ No newline at end of file
pom.xml
View file @
f5a06ae
...
@@ -37,12 +37,22 @@
...
@@ -37,12 +37,22 @@
<hutool.version>
5.4.1
</hutool.version>
<hutool.version>
5.4.1
</hutool.version>
<zxing.version>
3.3.3
</zxing.version>
<zxing.version>
3.3.3
</zxing.version>
<mybatis-plus.version>
3.4.0
</mybatis-plus.version>
<mybatis-plus.version>
3.4.0
</mybatis-plus.version>
<vertx.version>
4.0.0
</vertx.version>
<netty-version>
4.1.49.Final
</netty-version>
</properties>
</properties>
<!-- 依赖声明 -->
<!-- 依赖声明 -->
<dependencyManagement>
<dependencyManagement>
<dependencies>
<dependencies>
<dependency>
<groupId>
io.netty
</groupId>
<artifactId>
netty-bom
</artifactId>
<version>
${netty-version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<!-- SpringBoot的依赖配置-->
<!-- SpringBoot的依赖配置-->
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
...
@@ -235,8 +245,17 @@
...
@@ -235,8 +245,17 @@
<version>
${mybatis-plus.version}
</version>
<version>
${mybatis-plus.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
io.vertx
</groupId>
<artifactId>
vertx-core
</artifactId>
<version>
${vertx.version}
</version>
</dependency>
<dependency>
<groupId>
io.vertx
</groupId>
<artifactId>
vertx-web-client
</artifactId>
<version>
${vertx.version}
</version>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
...
@@ -292,7 +311,7 @@
...
@@ -292,7 +311,7 @@
<enabled>
true
</enabled>
<enabled>
true
</enabled>
</releases>
</releases>
<snapshots>
<snapshots>
<enabled>
fals
e
</enabled>
<enabled>
tru
e
</enabled>
</snapshots>
</snapshots>
</pluginRepository>
</pluginRepository>
</pluginRepositories>
</pluginRepositories>
...
...
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