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 77c5cc93
authored
Jul 14, 2021
by
水库浪子
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改群发相关BUG
1 parent
71f7ba0b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
4 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/common/CommonController.java
linkwe-framework/src/main/java/com/linkwechat/framework/web/service/FileService.java
linkwe-wecom/src/main/resources/mapper/wecom/WeCustomerMapper.xml
linkwe-wecom/src/main/resources/mapper/wecom/WeCustomerMessageOriginalMapper.xml
linkwe-admin/src/main/java/com/linkwechat/web/controller/common/CommonController.java
View file @
77c5cc9
...
@@ -9,6 +9,7 @@ import com.linkwechat.common.core.domain.FileVo;
...
@@ -9,6 +9,7 @@ import com.linkwechat.common.core.domain.FileVo;
import
com.linkwechat.common.utils.StringUtils
;
import
com.linkwechat.common.utils.StringUtils
;
import
com.linkwechat.common.utils.file.FileUploadUtils
;
import
com.linkwechat.common.utils.file.FileUploadUtils
;
import
com.linkwechat.common.utils.file.FileUtils
;
import
com.linkwechat.common.utils.file.FileUtils
;
import
com.linkwechat.common.utils.file.MimeTypeUtils
;
import
com.linkwechat.framework.web.domain.server.SysFile
;
import
com.linkwechat.framework.web.domain.server.SysFile
;
import
com.linkwechat.framework.web.service.FileService
;
import
com.linkwechat.framework.web.service.FileService
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
...
@@ -120,8 +121,9 @@ public class CommonController {
...
@@ -120,8 +121,9 @@ public class CommonController {
* 通用上传请求
* 通用上传请求
*/
*/
@PostMapping
(
"/common/uploadFile2Cos"
)
@PostMapping
(
"/common/uploadFile2Cos"
)
public
AjaxResult
uploadFile2Cos
(
MultipartFile
file
)
throws
Exception
{
public
AjaxResult
uploadFile2Cos
(
MultipartFile
file
){
try
{
try
{
SysFile
sysFile
SysFile
sysFile
=
fileService
.
upload
(
file
);
=
fileService
.
upload
(
file
);
return
AjaxResult
.
success
(
return
AjaxResult
.
success
(
...
@@ -131,7 +133,7 @@ public class CommonController {
...
@@ -131,7 +133,7 @@ public class CommonController {
.
build
()
.
build
()
);
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
AjaxResult
.
error
(
e
.
getMessage
()
);
return
AjaxResult
.
error
(
"不支持当前文件上传或文件过大建议传20MB以内的文件"
);
}
}
}
}
...
...
linkwe-framework/src/main/java/com/linkwechat/framework/web/service/FileService.java
View file @
77c5cc9
...
@@ -6,6 +6,7 @@ import com.linkwechat.common.config.RuoYiConfig;
...
@@ -6,6 +6,7 @@ import com.linkwechat.common.config.RuoYiConfig;
import
com.linkwechat.common.utils.OsUtils
;
import
com.linkwechat.common.utils.OsUtils
;
import
com.linkwechat.common.utils.file.FileUploadUtils
;
import
com.linkwechat.common.utils.file.FileUploadUtils
;
import
com.linkwechat.common.utils.file.FileUtils
;
import
com.linkwechat.common.utils.file.FileUtils
;
import
com.linkwechat.common.utils.file.MimeTypeUtils
;
import
com.linkwechat.framework.web.domain.server.SysFile
;
import
com.linkwechat.framework.web.domain.server.SysFile
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -42,7 +43,10 @@ public class FileService {
...
@@ -42,7 +43,10 @@ public class FileService {
* @return
* @return
* @throws IOException
* @throws IOException
*/
*/
public
SysFile
upload
(
MultipartFile
file
)
throws
IOException
{
public
SysFile
upload
(
MultipartFile
file
)
throws
Exception
{
try
{
FileUploadUtils
.
assertAllowed
(
file
,
MimeTypeUtils
.
DEFAULT_ALLOWED_EXTENSION
);
String
fileName
=
""
;
String
fileName
=
""
;
String
imgUrlPrefix
=
""
;
String
imgUrlPrefix
=
""
;
if
(
ruoYiConfig
.
getFile
().
isStartCosUpload
()){
//开启云上传
if
(
ruoYiConfig
.
getFile
().
isStartCosUpload
()){
//开启云上传
...
@@ -61,6 +65,13 @@ public class FileService {
...
@@ -61,6 +65,13 @@ public class FileService {
.
fileName
(
fileName
)
.
fileName
(
fileName
)
.
imgUrlPrefix
(
imgUrlPrefix
)
.
imgUrlPrefix
(
imgUrlPrefix
)
.
build
();
.
build
();
}
catch
(
Exception
e
){
throw
e
;
}
}
}
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeCustomerMapper.xml
View file @
77c5cc9
...
@@ -288,6 +288,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -288,6 +288,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"userId != null and userId !=''"
>
<if
test=
"userId != null and userId !=''"
>
AND wfcr.user_id=#{userId}
AND wfcr.user_id=#{userId}
</if>
</if>
ORDER BY wfcr.create_time ASC limit 1
</select>
</select>
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeCustomerMessageOriginalMapper.xml
View file @
77c5cc9
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
wcm.chat_type,
wcm.chat_type,
wcm.setting_time,
wcm.setting_time,
wcm.expect_send,
wcm.expect_send,
wcm.
actual_send,
(SELECT count(*) FROM `we_customer_messgaeResult` wcmr where wcmr.message_id=wcm.message_id and `status`=1) as
actual_send,
wcm.timed_task,
wcm.timed_task,
wcm.msgid,
wcm.msgid,
wcm.check_status
wcm.check_status
...
...
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