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
7afaeca0
Commit
7afaeca0
authored
Dec 19, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
群发
parent
2b3ee035
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
24 deletions
+33
-24
GroupChatController.java
...aoban/manage/web/controller/chat/GroupChatController.java
+28
-20
GroupChatDataController.java
...n/manage/web/controller/chat/GroupChatDataController.java
+4
-3
GroupChatHmController.java
...ban/manage/web/controller/chat/GroupChatHmController.java
+1
-1
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatController.java
View file @
7afaeca0
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
chat
;
import
java.util.ArrayList
;
import
java.util.List
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -50,8 +51,8 @@ public class GroupChatController {
@Autowired
private
GroupChatApiService
groupChatApiService
;
@Autowired
private
StaffApiService
staffApiService
;
private
StaffApiService
staffApiService
;
@RequestMapping
(
"get-set-gic-flag"
)
public
RestResponse
<
Object
>
getFlag
()
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
...
...
@@ -81,25 +82,25 @@ public class GroupChatController {
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
this
.
groupChatApiService
.
updateChatEnterpriseId
(
wxEnterpriseId
,
enterpriseId
,
groupChatIdList
);
String
logContent
=
"认领【"
+
this
.
getChatNames
(
wxEnterpriseId
,
groupChatIdList
)+
"】"
;
String
logContent
=
"认领【"
+
this
.
getChatNames
(
wxEnterpriseId
,
groupChatIdList
)
+
"】"
;
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logContent
);
GicLogRecordEvaluationContext
.
putOptTargetId
(
AuthWebRequestUtil
.
getLoginUser
().
getClerkId
());
return
RestResponse
.
successResult
();
}
private
String
getChatNames
(
String
wxEnterpriseId
,
List
<
Long
>
groupChatIdList
)
{
ServiceResponse
<
List
<
GroupChatDTO
>>
chatResp
=
this
.
groupChatApiService
.
listChatByIdList
(
wxEnterpriseId
,
groupChatIdList
);
List
<
GroupChatDTO
>
chatList
=
chatResp
.
getResult
()
;
StringBuilder
content
=
new
StringBuilder
()
;
for
(
GroupChatDTO
item
:
chatList
)
{
content
.
append
(
item
.
getGroupChatId
()).
append
(
"-"
).
append
(
item
.
getName
()).
append
(
","
)
;
ServiceResponse
<
List
<
GroupChatDTO
>>
chatResp
=
this
.
groupChatApiService
.
listChatByIdList
(
wxEnterpriseId
,
groupChatIdList
);
List
<
GroupChatDTO
>
chatList
=
chatResp
.
getResult
();
StringBuilder
content
=
new
StringBuilder
();
for
(
GroupChatDTO
item
:
chatList
)
{
content
.
append
(
item
.
getGroupChatId
()).
append
(
"-"
).
append
(
item
.
getName
()).
append
(
","
);
}
return
content
.
toString
()
;
return
content
.
toString
();
}
@RequestMapping
(
"page"
)
public
RestResponse
<
Object
>
page
(
GroupChatSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
public
RestResponse
<
Object
>
page
(
@RequestBody
GroupChatSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
sortColumn
=
qdto
.
getSortColumn
();
if
(
StringUtils
.
isBlank
(
sortColumn
))
{
...
...
@@ -135,7 +136,7 @@ public class GroupChatController {
@RequestMapping
(
"detail"
)
public
RestResponse
<
Object
>
detail
(
Long
groupChatId
)
{
if
(
null
==
groupChatId
)
{
if
(
null
==
groupChatId
)
{
return
RestResponse
.
failure
(
"1"
,
"群ID空"
);
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
...
...
@@ -158,7 +159,7 @@ public class GroupChatController {
@RequestMapping
(
"owner-history"
)
public
RestResponse
<
Object
>
ownerHistory
(
Long
groupChatId
)
{
if
(
null
==
groupChatId
)
{
if
(
null
==
groupChatId
)
{
return
RestResponse
.
failure
(
"1"
,
"群ID空"
);
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
...
...
@@ -170,18 +171,25 @@ public class GroupChatController {
@RequestMapping
(
"transfer"
)
@GicLogRecord
(
value
=
"${#logValue}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
HM_LINK_ADD
,
userFunc
=
LogRecordUserServiceImpl
.
class
,
optPage
=
"客户群列表"
)
public
RestResponse
<
Object
>
transfer
(
String
staffId
,
List
<
Long
>
groupChatIdList
)
{
if
(
StringUtils
.
isEmpty
(
staffId
))
{
public
RestResponse
<
Object
>
transfer
(
String
staffId
,
String
groupChatIdList
)
{
if
(
StringUtils
.
isEmpty
(
staffId
))
{
return
RestResponse
.
failure
(
"1"
,
"请选择继承的群主"
);
}
if
(
Collection
Utils
.
isEmpty
(
groupChatIdList
))
{
if
(
String
Utils
.
isEmpty
(
groupChatIdList
))
{
return
RestResponse
.
failure
(
"1"
,
"请选择继承的群"
);
}
String
[]
arr
=
groupChatIdList
.
split
(
","
);
List
<
Long
>
idList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
arr
.
length
;
i
++)
{
if
(
StringUtils
.
isNotBlank
(
arr
[
i
]))
{
idList
.
add
(
Long
.
valueOf
(
arr
[
i
]));
}
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
ServiceResponse
<
Void
>
resp
=
this
.
groupChatApiService
.
transfer
(
wxEnterpriseId
,
staffId
,
groupChatI
dList
);
StaffDTO
staff
=
this
.
staffApiService
.
selectById
(
staffId
)
;
String
logContent
=
"将【"
+
this
.
getChatNames
(
wxEnterpriseId
,
groupChatIdList
)+
"】分配给【"
+
staff
.
getStaffName
()+
"】继承"
;
ServiceResponse
<
Void
>
resp
=
this
.
groupChatApiService
.
transfer
(
wxEnterpriseId
,
staffId
,
i
dList
);
StaffDTO
staff
=
this
.
staffApiService
.
selectById
(
staffId
);
String
logContent
=
"将【"
+
this
.
getChatNames
(
wxEnterpriseId
,
idList
)
+
"】分配给【"
+
staff
.
getStaffName
()
+
"】继承"
;
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logContent
);
GicLogRecordEvaluationContext
.
putOptTargetId
(
AuthWebRequestUtil
.
getLoginUser
().
getClerkId
());
return
RestResponse
.
successResult
(
resp
.
getResult
());
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatDataController.java
View file @
7afaeca0
...
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.web.controller.chat;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -34,7 +35,7 @@ public class GroupChatDataController {
private
GroupChatDataApiService
groupChatDataApiService
;
@RequestMapping
(
"total"
)
public
RestResponse
<
Object
>
listTotalData
(
ChatDataSearchQDTO
qdto
)
{
public
RestResponse
<
Object
>
listTotalData
(
@RequestBody
ChatDataSearchQDTO
qdto
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
qdto
.
setWxEnterpriseId
(
wxEnterpriseId
);
...
...
@@ -44,7 +45,7 @@ public class GroupChatDataController {
}
@RequestMapping
(
"list-chat"
)
public
RestResponse
<
Object
>
listForChat
(
ChatDataSearchQDTO
qdto
)
{
public
RestResponse
<
Object
>
listForChat
(
@RequestBody
ChatDataSearchQDTO
qdto
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
qdto
.
setWxEnterpriseId
(
wxEnterpriseId
);
...
...
@@ -54,7 +55,7 @@ public class GroupChatDataController {
}
@RequestMapping
(
"list-staff"
)
public
RestResponse
<
Object
>
listStaffData
(
ChatDataSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
public
RestResponse
<
Object
>
listStaffData
(
@RequestBody
ChatDataSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
qdto
.
setWxEnterpriseId
(
wxEnterpriseId
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatHmController.java
View file @
7afaeca0
...
...
@@ -235,7 +235,7 @@ public class GroupChatHmController {
@SuppressWarnings
(
"deprecation"
)
@RequestMapping
(
"download"
)
public
RestResponse
<
Object
>
download
(
ChatHmSearchQDTO
qdto
,
@RequestParam
(
defaultValue
=
"0"
)
int
allFlag
)
{
public
RestResponse
<
Object
>
download
(
@RequestBody
ChatHmSearchQDTO
qdto
,
@RequestParam
(
defaultValue
=
"0"
)
int
allFlag
)
{
if
(
allFlag
==
0
&&
CollectionUtils
.
isEmpty
(
qdto
.
getChatHmIdList
()))
{
return
RestResponse
.
failure
(
"1"
,
"请选择要下载的群活码"
);
}
...
...
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