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
44ebfd57
Commit
44ebfd57
authored
Dec 14, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校验
parent
987c2182
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
7 deletions
+47
-7
GroupChatController.java
...aoban/manage/web/controller/chat/GroupChatController.java
+22
-0
GroupChatHmController.java
...ban/manage/web/controller/chat/GroupChatHmController.java
+20
-5
GroupChatPlanController.java
...n/manage/web/controller/chat/GroupChatPlanController.java
+5
-2
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatController.java
View file @
44ebfd57
...
@@ -2,6 +2,10 @@ package com.gic.haoban.manage.web.controller.chat;
...
@@ -2,6 +2,10 @@ package com.gic.haoban.manage.web.controller.chat;
import
java.util.List
;
import
java.util.List
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.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.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -34,6 +38,8 @@ import com.gic.haoban.manage.api.service.chat.GroupChatApiService;
...
@@ -34,6 +38,8 @@ import com.gic.haoban.manage.api.service.chat.GroupChatApiService;
@RequestMapping
(
"/chat"
)
@RequestMapping
(
"/chat"
)
public
class
GroupChatController
{
public
class
GroupChatController
{
private
static
Logger
logger
=
LogManager
.
getLogger
(
GroupChatController
.
class
);
@Autowired
@Autowired
private
GroupChatApiService
groupChatApiService
;
private
GroupChatApiService
groupChatApiService
;
...
@@ -42,6 +48,7 @@ public class GroupChatController {
...
@@ -42,6 +48,7 @@ public class GroupChatController {
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
ServiceResponse
<
Boolean
>
resp
=
this
.
groupChatApiService
.
getSetGicFlag
(
wxEnterpriseId
);
ServiceResponse
<
Boolean
>
resp
=
this
.
groupChatApiService
.
getSetGicFlag
(
wxEnterpriseId
);
logger
.
info
(
"是否需要认领gic={},{}"
,
resp
.
getResult
(),
wxEnterpriseId
);
return
RestResponse
.
successResult
(
resp
.
getResult
());
return
RestResponse
.
successResult
(
resp
.
getResult
());
}
}
...
@@ -57,6 +64,9 @@ public class GroupChatController {
...
@@ -57,6 +64,9 @@ public class GroupChatController {
@RequestMapping
(
"set-gic-enterprise"
)
@RequestMapping
(
"set-gic-enterprise"
)
public
RestResponse
<
Object
>
save
(
@RequestBody
GroupChatSearchQDTO
qdto
)
{
public
RestResponse
<
Object
>
save
(
@RequestBody
GroupChatSearchQDTO
qdto
)
{
List
<
Long
>
groupChatIdList
=
qdto
.
getGroupChatIdList
();
List
<
Long
>
groupChatIdList
=
qdto
.
getGroupChatIdList
();
if
(
CollectionUtils
.
isEmpty
(
groupChatIdList
))
{
return
RestResponse
.
failure
(
"1"
,
"请选择认领的群"
);
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
...
@@ -85,6 +95,9 @@ public class GroupChatController {
...
@@ -85,6 +95,9 @@ public class GroupChatController {
@RequestMapping
(
"detail"
)
@RequestMapping
(
"detail"
)
public
RestResponse
<
Object
>
detail
(
Long
groupChatId
)
{
public
RestResponse
<
Object
>
detail
(
Long
groupChatId
)
{
if
(
null
==
groupChatId
)
{
return
RestResponse
.
failure
(
"1"
,
"群ID空"
);
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
ServiceResponse
<
GroupChatDTO
>
resp
=
this
.
groupChatApiService
.
detail
(
loginUser
.
getWxEnterpriseId
(),
ServiceResponse
<
GroupChatDTO
>
resp
=
this
.
groupChatApiService
.
detail
(
loginUser
.
getWxEnterpriseId
(),
groupChatId
);
groupChatId
);
...
@@ -105,6 +118,9 @@ public class GroupChatController {
...
@@ -105,6 +118,9 @@ public class GroupChatController {
@RequestMapping
(
"owner-history"
)
@RequestMapping
(
"owner-history"
)
public
RestResponse
<
Object
>
ownerHistory
(
Long
groupChatId
)
{
public
RestResponse
<
Object
>
ownerHistory
(
Long
groupChatId
)
{
if
(
null
==
groupChatId
)
{
return
RestResponse
.
failure
(
"1"
,
"群ID空"
);
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
ServiceResponse
<
List
<
GroupChatOwnerHistoryDTO
>>
resp
=
this
.
groupChatApiService
.
listOwnerHistory
(
groupChatId
,
ServiceResponse
<
List
<
GroupChatOwnerHistoryDTO
>>
resp
=
this
.
groupChatApiService
.
listOwnerHistory
(
groupChatId
,
...
@@ -114,6 +130,12 @@ public class GroupChatController {
...
@@ -114,6 +130,12 @@ public class GroupChatController {
@RequestMapping
(
"transfer"
)
@RequestMapping
(
"transfer"
)
public
RestResponse
<
Object
>
transfer
(
String
staffId
,
List
<
Long
>
groupChatIdList
)
{
public
RestResponse
<
Object
>
transfer
(
String
staffId
,
List
<
Long
>
groupChatIdList
)
{
if
(
StringUtils
.
isEmpty
(
staffId
))
{
return
RestResponse
.
failure
(
"1"
,
"请选择继承的群主"
);
}
if
(
CollectionUtils
.
isEmpty
(
groupChatIdList
))
{
return
RestResponse
.
failure
(
"1"
,
"请选择继承的群"
);
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
ServiceResponse
<
Void
>
resp
=
this
.
groupChatApiService
.
transfer
(
wxEnterpriseId
,
staffId
,
groupChatIdList
);
ServiceResponse
<
Void
>
resp
=
this
.
groupChatApiService
.
transfer
(
wxEnterpriseId
,
staffId
,
groupChatIdList
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatHmController.java
View file @
44ebfd57
...
@@ -10,7 +10,6 @@ import java.net.URL;
...
@@ -10,7 +10,6 @@ import java.net.URL;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
import
java.util.zip.ZipOutputStream
;
...
@@ -73,6 +72,12 @@ public class GroupChatHmController {
...
@@ -73,6 +72,12 @@ public class GroupChatHmController {
@RequestMapping
(
"add"
)
@RequestMapping
(
"add"
)
public
RestResponse
<
Object
>
save
(
@RequestBody
GroupChatHmDTO
dto
)
{
public
RestResponse
<
Object
>
save
(
@RequestBody
GroupChatHmDTO
dto
)
{
if
(
CollectionUtils
.
isEmpty
(
dto
.
getChatIdList
()))
{
return
RestResponse
.
failure
(
"1"
,
"请选择加入的群"
);
}
if
(
dto
.
getChatIdList
().
size
()
>
4
)
{
return
RestResponse
.
failure
(
"1"
,
"最多可选4个群"
);
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
dto
.
setCreatorId
(
loginUser
.
getClerkId
());
dto
.
setCreatorId
(
loginUser
.
getClerkId
());
dto
.
setCreatorName
(
loginUser
.
getClerkName
());
dto
.
setCreatorName
(
loginUser
.
getClerkName
());
...
@@ -86,6 +91,12 @@ public class GroupChatHmController {
...
@@ -86,6 +91,12 @@ public class GroupChatHmController {
@RequestMapping
(
"update"
)
@RequestMapping
(
"update"
)
public
RestResponse
<
Object
>
update
(
@RequestBody
GroupChatHmDTO
dto
)
{
public
RestResponse
<
Object
>
update
(
@RequestBody
GroupChatHmDTO
dto
)
{
if
(
CollectionUtils
.
isEmpty
(
dto
.
getChatIdList
()))
{
return
RestResponse
.
failure
(
"1"
,
"请选择加入的群"
);
}
if
(
dto
.
getChatIdList
().
size
()
>
4
)
{
return
RestResponse
.
failure
(
"1"
,
"最多可选4个群"
);
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
dto
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
dto
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
dto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
dto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
...
@@ -100,9 +111,9 @@ public class GroupChatHmController {
...
@@ -100,9 +111,9 @@ public class GroupChatHmController {
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
qdto
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
qdto
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
qdto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
qdto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
List
<
String
>
creatorIdList
=
CreatorUtils
.
getCreatorIdList
(
0
)
;
List
<
String
>
creatorIdList
=
CreatorUtils
.
getCreatorIdList
(
0
);
if
(
CollectionUtils
.
isNotEmpty
(
creatorIdList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
creatorIdList
))
{
qdto
.
setCreatorIdList
(
creatorIdList
)
;
qdto
.
setCreatorIdList
(
creatorIdList
);
}
}
ServiceResponse
<
Page
<
GroupChatHmDTO
>>
page
=
this
.
groupChatHmApiService
.
listPage
(
qdto
,
basePageInfo
);
ServiceResponse
<
Page
<
GroupChatHmDTO
>>
page
=
this
.
groupChatHmApiService
.
listPage
(
qdto
,
basePageInfo
);
return
RestResponse
.
successResult
(
page
.
getResult
());
return
RestResponse
.
successResult
(
page
.
getResult
());
...
@@ -123,6 +134,9 @@ public class GroupChatHmController {
...
@@ -123,6 +134,9 @@ public class GroupChatHmController {
@RequestMapping
(
"discard"
)
@RequestMapping
(
"discard"
)
public
RestResponse
<
Object
>
discard
(
Long
chatHmId
)
{
public
RestResponse
<
Object
>
discard
(
Long
chatHmId
)
{
if
(
null
==
chatHmId
)
{
return
RestResponse
.
failure
(
"1"
,
"群活码ID空"
);
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
loginUser
.
getWxEnterpriseId
();
String
clerkId
=
loginUser
.
getClerkId
();
String
clerkId
=
loginUser
.
getClerkId
();
...
@@ -183,6 +197,7 @@ public class GroupChatHmController {
...
@@ -183,6 +197,7 @@ public class GroupChatHmController {
return
RestResponse
.
successResult
(
page
.
getResult
());
return
RestResponse
.
successResult
(
page
.
getResult
());
}
}
@SuppressWarnings
(
"deprecation"
)
@RequestMapping
(
"download"
)
@RequestMapping
(
"download"
)
public
RestResponse
<
Object
>
download
(
ChatHmSearchQDTO
qdto
,
@RequestParam
(
defaultValue
=
"0"
)
int
allFlag
)
{
public
RestResponse
<
Object
>
download
(
ChatHmSearchQDTO
qdto
,
@RequestParam
(
defaultValue
=
"0"
)
int
allFlag
)
{
if
(
allFlag
==
0
&&
CollectionUtils
.
isEmpty
(
qdto
.
getChatHmIdList
()))
{
if
(
allFlag
==
0
&&
CollectionUtils
.
isEmpty
(
qdto
.
getChatHmIdList
()))
{
...
@@ -213,7 +228,7 @@ public class GroupChatHmController {
...
@@ -213,7 +228,7 @@ public class GroupChatHmController {
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
String
enterpriseId
=
loginUser
.
getEnterpriseId
();
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
basePageInfo
.
setPageNum
(
1
);
basePageInfo
.
setPageNum
(
1
);
basePageInfo
.
setPageSize
(
1000
);
basePageInfo
.
setPageSize
(
Integer
.
MAX_VALUE
);
qdto
.
setEnterpriseId
(
enterpriseId
);
qdto
.
setEnterpriseId
(
enterpriseId
);
qdto
.
setWxEnterpriseId
(
wxEnterpriseId
);
qdto
.
setWxEnterpriseId
(
wxEnterpriseId
);
ServiceResponse
<
Page
<
GroupChatHmDTO
>>
resp
=
this
.
groupChatHmApiService
.
listPage
(
qdto
,
basePageInfo
);
ServiceResponse
<
Page
<
GroupChatHmDTO
>>
resp
=
this
.
groupChatHmApiService
.
listPage
(
qdto
,
basePageInfo
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatPlanController.java
View file @
44ebfd57
...
@@ -57,8 +57,8 @@ public class GroupChatPlanController {
...
@@ -57,8 +57,8 @@ public class GroupChatPlanController {
@RequestMapping
(
"add"
)
@RequestMapping
(
"add"
)
public
RestResponse
<
Object
>
save
(
@RequestBody
GroupChatPlanDTO
dto
)
{
public
RestResponse
<
Object
>
save
(
@RequestBody
GroupChatPlanDTO
dto
)
{
if
(
StringUtils
.
isNotBlank
(
dto
.
getStaffIdList
()))
{
if
(
StringUtils
.
isNotBlank
(
dto
.
getStaffIdList
()))
{
return
RestResponse
.
failure
(
"9999"
,
"请选择群主"
);
return
RestResponse
.
failure
(
"9999"
,
"请选择群主"
);
}
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
dto
.
setCreatorId
(
loginUser
.
getClerkId
());
dto
.
setCreatorId
(
loginUser
.
getClerkId
());
...
@@ -94,6 +94,9 @@ public class GroupChatPlanController {
...
@@ -94,6 +94,9 @@ public class GroupChatPlanController {
if
(
null
!=
plan
.
getSendTime
()
&&
plan
.
getSendTime
().
before
(
new
Date
()))
{
if
(
null
!=
plan
.
getSendTime
()
&&
plan
.
getSendTime
().
before
(
new
Date
()))
{
return
RestResponse
.
failure
(
"9999"
,
"已发送的不能编辑"
);
return
RestResponse
.
failure
(
"9999"
,
"已发送的不能编辑"
);
}
}
if
(
plan
.
getStartTime
().
before
(
new
Date
()))
{
return
RestResponse
.
failure
(
"9999"
,
"进行中的不能编辑"
);
}
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
dto
.
setModifierId
(
loginUser
.
getClerkId
());
dto
.
setModifierId
(
loginUser
.
getClerkId
());
dto
.
setModifierName
(
loginUser
.
getClerkName
());
dto
.
setModifierName
(
loginUser
.
getClerkName
());
...
...
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