Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
47e443c6
Commit
47e443c6
authored
Nov 15, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群发
parent
72f5e3e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
11 deletions
+13
-11
UploadController.java
...om/gic/haoban/manage/web/controller/UploadController.java
+11
-11
QwMessageController.java
...an/manage/web/controller/content/QwMessageController.java
+2
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/UploadController.java
View file @
47e443c6
...
@@ -11,8 +11,6 @@ import java.util.Map;
...
@@ -11,8 +11,6 @@ import java.util.Map;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
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
;
...
@@ -21,9 +19,9 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
...
@@ -21,9 +19,9 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.commons.util.GlobalVar
;
import
com.gic.commons.util.GlobalVar
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.haoban.app.customer.service.api.service.MemberChatApiService
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
...
@@ -78,8 +76,15 @@ public class UploadController extends WebBaseController {
...
@@ -78,8 +76,15 @@ public class UploadController extends WebBaseController {
// fileType image:图片 video:视频 file:文件 audio音频 other:其它
// fileType image:图片 video:视频 file:文件 audio音频 other:其它
@RequestMapping
(
"upload-img-fee"
)
@RequestMapping
(
"upload-img-fee"
)
@IgnoreLogin
public
RestResponse
<
Object
>
imgUploadFee
(
HttpServletRequest
request
,
String
fileType
,
String
enterpriseId
)
throws
Exception
{
public
HaobanResponse
imgUploadFee
(
HttpServletRequest
request
,
String
fileType
,
String
enterpriseId
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
enterpriseId
))
{
return
RestResponse
.
failure
(
"9999"
,
"企业未传"
)
;
}
EnterpriseDTO
enterprise
=
this
.
enterpriseService
.
getEnterpriseById
(
enterpriseId
)
;
if
(
null
==
enterprise
)
{
return
RestResponse
.
failure
(
"9999"
,
"商户不存在"
)
;
}
String
factoryCode
=
enterprise
.
getFactoryCode
()
;
MultipartHttpServletRequest
multiRequest
=
(
MultipartHttpServletRequest
)
request
;
MultipartHttpServletRequest
multiRequest
=
(
MultipartHttpServletRequest
)
request
;
Iterator
<
String
>
iter
=
multiRequest
.
getFileNames
();
Iterator
<
String
>
iter
=
multiRequest
.
getFileNames
();
java
.
util
.
List
<
Map
<
String
,
Object
>>
picList
=
new
ArrayList
<>();
java
.
util
.
List
<
Map
<
String
,
Object
>>
picList
=
new
ArrayList
<>();
...
@@ -91,13 +96,8 @@ public class UploadController extends WebBaseController {
...
@@ -91,13 +96,8 @@ public class UploadController extends WebBaseController {
map
=
new
HashMap
<>();
map
=
new
HashMap
<>();
MultipartFile
mf
=
list
.
get
(
i
);
MultipartFile
mf
=
list
.
get
(
i
);
CloudFileTypeEnum
type
=
getType
(
fileType
)
;
CloudFileTypeEnum
type
=
getType
(
fileType
)
;
EnterpriseDTO
enterprise
=
this
.
enterpriseService
.
getEnterpriseById
(
enterpriseId
)
;
File
file
=
File
.
createTempFile
(
"tmp"
,
null
);
File
file
=
File
.
createTempFile
(
"tmp"
,
null
);
mf
.
transferTo
(
file
);
mf
.
transferTo
(
file
);
String
factoryCode
=
"jhdm"
;
if
(
null
!=
enterprise
)
{
factoryCode
=
enterprise
.
getFactoryCode
()
;
}
CloudFileInfo
uploadInfo
=
CloudFileUtil
.
uploadTempFile
(
file
,
mf
.
getOriginalFilename
(),
type
,
factoryCode
,
CloudFileBusinessOptEnum
.
COMMON
,
7
*
24L
)
;
CloudFileInfo
uploadInfo
=
CloudFileUtil
.
uploadTempFile
(
file
,
mf
.
getOriginalFilename
(),
type
,
factoryCode
,
CloudFileBusinessOptEnum
.
COMMON
,
7
*
24L
)
;
if
(
uploadInfo
!=
null
)
{
if
(
uploadInfo
!=
null
)
{
map
.
put
(
"qcloudImageUrl"
,
uploadInfo
.
getOrgFileUrl
());
map
.
put
(
"qcloudImageUrl"
,
uploadInfo
.
getOrgFileUrl
());
...
@@ -107,7 +107,7 @@ public class UploadController extends WebBaseController {
...
@@ -107,7 +107,7 @@ public class UploadController extends WebBaseController {
file
.
deleteOnExit
();
file
.
deleteOnExit
();
}
}
}
}
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
picList
);
return
RestResponse
.
successResult
(
picList
);
}
}
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/QwMessageController.java
View file @
47e443c6
...
@@ -88,6 +88,7 @@ public class QwMessageController extends WebBaseController {
...
@@ -88,6 +88,7 @@ public class QwMessageController extends WebBaseController {
json
.
put
(
"staffId"
,
staffId
);
json
.
put
(
"staffId"
,
staffId
);
json
.
put
(
"content"
,
qo
.
getContent
())
;
json
.
put
(
"content"
,
qo
.
getContent
())
;
json
.
put
(
"contentMaterialId"
,
contentMaterialId
)
;
json
.
put
(
"contentMaterialId"
,
contentMaterialId
)
;
json
.
put
(
"sendClerkId"
,
clerkId
);
// 群发-分享
// 群发-分享
json
.
put
(
"sendType"
,
1
);
json
.
put
(
"sendType"
,
1
);
json
.
put
(
"wxEnterpriseId"
,
wxEnterpriseId
);
json
.
put
(
"wxEnterpriseId"
,
wxEnterpriseId
);
...
@@ -132,6 +133,7 @@ public class QwMessageController extends WebBaseController {
...
@@ -132,6 +133,7 @@ public class QwMessageController extends WebBaseController {
json
.
put
(
"enterpriseId"
,
enterpriseId
);
json
.
put
(
"enterpriseId"
,
enterpriseId
);
json
.
put
(
"imgJson"
,
imgJson
);
json
.
put
(
"imgJson"
,
imgJson
);
json
.
put
(
"staffId"
,
staffId
);
json
.
put
(
"staffId"
,
staffId
);
json
.
put
(
"sendClerkId"
,
clerkId
);
// 朋友圈-分享
// 朋友圈-分享
json
.
put
(
"sendType"
,
2
);
json
.
put
(
"sendType"
,
2
);
json
.
put
(
"wxEnterpriseId"
,
wxEnterpriseId
);
json
.
put
(
"wxEnterpriseId"
,
wxEnterpriseId
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment