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
11804589
Commit
11804589
authored
Oct 09, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into feature-202309-数据组队列迁移
parents
753bc94b
3e48ebb6
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
892 additions
and
37 deletions
+892
-37
DealSyncOperationApiService.java
...aoban/manage/api/service/DealSyncOperationApiService.java
+0
-1
ExternalClerkRelatedApiService.java
...an/manage/api/service/ExternalClerkRelatedApiService.java
+2
-4
WxEnterpriseRelatedApiService.java
...ban/manage/api/service/WxEnterpriseRelatedApiService.java
+2
-0
StoreRangeService.java
.../gic/haoban/manage/service/service/StoreRangeService.java
+2
-0
WxEnterpriseRelatedService.java
...an/manage/service/service/WxEnterpriseRelatedService.java
+8
-0
MaterialDataAdaptor.java
.../service/service/content/adaptor/MaterialDataAdaptor.java
+5
-1
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+5
-0
StoreRangeServiceImpl.java
...an/manage/service/service/impl/StoreRangeServiceImpl.java
+24
-0
WxEnterpriseRelatedServiceImpl.java
.../service/service/impl/WxEnterpriseRelatedServiceImpl.java
+30
-0
DealSyncOperationApiServiceImpl.java
...ice/service/out/impl/DealSyncOperationApiServiceImpl.java
+3
-0
ExternalClerkRelatedApiServiceImpl.java
.../service/out/impl/ExternalClerkRelatedApiServiceImpl.java
+5
-2
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+3
-0
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+10
-2
QywxTagApiServiceImpl.java
...anage/service/service/out/impl/QywxTagApiServiceImpl.java
+13
-2
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+8
-6
WxEnterpriseRelatedApiServiceImpl.java
...e/service/out/impl/WxEnterpriseRelatedApiServiceImpl.java
+5
-0
GroupChatPlanApiServiceImpl.java
...ce/service/out/impl/chat/GroupChatPlanApiServiceImpl.java
+1
-0
AppOrderApiServiceImpl.java
...vice/service/out/impl/licence/AppOrderApiServiceImpl.java
+4
-0
SelfFriendSyncNewOperation.java
...anage/service/task/friend/SelfFriendSyncNewOperation.java
+1
-1
TabHaobanExternalClerkRelatedMapper.xml
.../resources/mapper/TabHaobanExternalClerkRelatedMapper.xml
+1
-2
DepartmentContoller.java
...gic/haoban/manage/web/controller/DepartmentContoller.java
+1
-1
GroupChatController.java
...aoban/manage/web/controller/chat/GroupChatController.java
+33
-6
GroupChatPlanController.java
...n/manage/web/controller/chat/GroupChatPlanController.java
+127
-6
ExcelSheet.java
...rc/main/java/com/gic/haoban/manage/web/qo/ExcelSheet.java
+49
-0
ExportSheetUtil.java
...java/com/gic/haoban/manage/web/utils/ExportSheetUtil.java
+81
-0
GroupChatPlanExcelVO.java
...m/gic/haoban/manage/web/vo/chat/GroupChatPlanExcelVO.java
+155
-0
ReceiveExcelVO.java
...ava/com/gic/haoban/manage/web/vo/chat/ReceiveExcelVO.java
+158
-0
SendExcelVO.java
...n/java/com/gic/haoban/manage/web/vo/chat/SendExcelVO.java
+150
-0
UploadController.java
...om/gic/haoban/manage/web/controller/UploadController.java
+6
-3
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/DealSyncOperationApiService.java
View file @
11804589
...
@@ -28,7 +28,6 @@ public interface DealSyncOperationApiService {
...
@@ -28,7 +28,6 @@ public interface DealSyncOperationApiService {
/**
/**
* mq拆分
* mq拆分
* 部门同步处理
* 部门同步处理
* "routerName": "departmentSyncDealMq2"
*
*
* @param params
* @param params
*/
*/
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/ExternalClerkRelatedApiService.java
View file @
11804589
...
@@ -3,10 +3,7 @@ package com.gic.haoban.manage.api.service;
...
@@ -3,10 +3,7 @@ package com.gic.haoban.manage.api.service;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.ClerkStaffWxUserDTO
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO
;
import
com.gic.haoban.manage.api.dto.ExternalClerkRelatedShortInfoDTO
;
import
com.gic.haoban.manage.api.dto.FriendMemberStatusDTO
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -323,4 +320,5 @@ public interface ExternalClerkRelatedApiService {
...
@@ -323,4 +320,5 @@ public interface ExternalClerkRelatedApiService {
* @return
* @return
*/
*/
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
String
>
getMemberIdByExternalId
(
String
wxEnterpriseId
,
String
externalUserId
);
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
String
>
getMemberIdByExternalId
(
String
wxEnterpriseId
,
String
externalUserId
);
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxEnterpriseRelatedApiService.java
View file @
11804589
...
@@ -170,4 +170,6 @@ public interface WxEnterpriseRelatedApiService {
...
@@ -170,4 +170,6 @@ public interface WxEnterpriseRelatedApiService {
public
int
getRelationCount
(
String
enterpriseId
)
;
public
int
getRelationCount
(
String
enterpriseId
)
;
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Integer
>
getEnterprieseQwType
(
String
enterpriseId
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/StoreRangeService.java
View file @
11804589
...
@@ -113,4 +113,6 @@ public interface StoreRangeService {
...
@@ -113,4 +113,6 @@ public interface StoreRangeService {
List
<
String
>
listStoreIdByName
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeName
)
;
List
<
String
>
listStoreIdByName
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeName
)
;
public
boolean
hasStore
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeId
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/WxEnterpriseRelatedService.java
View file @
11804589
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service;
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service;
import
java.util.List
;
import
java.util.List
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated
;
import
com.gic.haoban.manage.service.pojo.bo.WxEnterpriseRelationBO
;
import
com.gic.haoban.manage.service.pojo.bo.WxEnterpriseRelationBO
;
...
@@ -42,4 +43,11 @@ public interface WxEnterpriseRelatedService {
...
@@ -42,4 +43,11 @@ public interface WxEnterpriseRelatedService {
public
WxEnterpriseRelationBO
getHeadEnterprise
(
String
enterpriseId
)
;
public
WxEnterpriseRelationBO
getHeadEnterprise
(
String
enterpriseId
)
;
public
boolean
getAddByWelcomeFlag
(
TabHaobanWxEnterpriseRelated
wxEnterpriseRelated
,
String
unionid
,
boolean
isHmUnionid
)
;
public
boolean
getAddByWelcomeFlag
(
TabHaobanWxEnterpriseRelated
wxEnterpriseRelated
,
String
unionid
,
boolean
isHmUnionid
)
;
/**
* 获取GIC商户企微类型 0无好办 1独立应用 2第三方 3(独立应用+第三方)
* @param enterpriseId
* @return
*/
public
ServiceResponse
<
Integer
>
getEnterprieseQwType
(
String
enterpriseId
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/MaterialDataAdaptor.java
View file @
11804589
...
@@ -136,7 +136,11 @@ public class MaterialDataAdaptor {
...
@@ -136,7 +136,11 @@ public class MaterialDataAdaptor {
if
(
result
.
get
(
"data"
)
==
null
)
{
if
(
result
.
get
(
"data"
)
==
null
)
{
return
null
;
return
null
;
}
}
JSONObject
jsonObject
=
DataApiUtils
.
getPageOne
(
result
);
List
<
JSONObject
>
dataList
=
DataApiUtils
.
getDataList
(
result
);
if
(
CollectionUtils
.
isEmpty
(
dataList
))
{
return
null
;
}
JSONObject
jsonObject
=
dataList
.
get
(
0
);
if
(
jsonObject
.
isEmpty
())
{
if
(
jsonObject
.
isEmpty
())
{
return
null
;
return
null
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
11804589
...
@@ -136,6 +136,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -136,6 +136,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
List
<
StaffClerkRelationDTO
>
relationList
=
this
.
listByStaffId
(
wxEnterpriseId
,
staffId
)
;
List
<
StaffClerkRelationDTO
>
relationList
=
this
.
listByStaffId
(
wxEnterpriseId
,
staffId
)
;
Set
<
String
>
set
=
relationList
.
stream
().
map
(
o
->
o
.
getEnterpriseId
()).
collect
(
Collectors
.
toSet
())
;
Set
<
String
>
set
=
relationList
.
stream
().
map
(
o
->
o
.
getEnterpriseId
()).
collect
(
Collectors
.
toSet
())
;
// 否关联的多个商户
// 否关联的多个商户
logger
.
info
(
"关联商户={}"
,
set
.
size
());
boolean
multipleFlag
=
set
.
size
()
>
1
;
boolean
multipleFlag
=
set
.
size
()
>
1
;
List
<
String
>
storeIdList
=
relationList
.
stream
().
filter
(
o
->!
storeId
.
equals
(
o
.
getStoreId
())
&&
o
.
getEnterpriseId
().
equals
(
enterpriseId
)).
map
(
o
->
o
.
getStoreId
()).
collect
(
Collectors
.
toList
())
;
List
<
String
>
storeIdList
=
relationList
.
stream
().
filter
(
o
->!
storeId
.
equals
(
o
.
getStoreId
())
&&
o
.
getEnterpriseId
().
equals
(
enterpriseId
)).
map
(
o
->
o
.
getStoreId
()).
collect
(
Collectors
.
toList
())
;
logger
.
info
(
"成员{},关联门店数={},同商户下的门店={}"
,
staffId
,
relationList
.
size
(),
JSON
.
toJSON
(
storeIdList
));
logger
.
info
(
"成员{},关联门店数={},同商户下的门店={}"
,
staffId
,
relationList
.
size
(),
JSON
.
toJSON
(
storeIdList
));
...
@@ -173,6 +174,10 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -173,6 +174,10 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
newClerkId
=
mainClerk
.
getClerkId
()
;
newClerkId
=
mainClerk
.
getClerkId
()
;
logger
.
info
(
"查询到成员的主门店导购={},{}"
,
staffId
,
newClerkId
);
logger
.
info
(
"查询到成员的主门店导购={},{}"
,
staffId
,
newClerkId
);
}
}
}
else
{
if
(
multipleFlag
)
{
needFlush
=
true
;
}
}
}
}
}
// 删除关联关系
// 删除关联关系
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StoreRangeServiceImpl.java
View file @
11804589
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.service.service.impl;
...
@@ -3,6 +3,8 @@ package com.gic.haoban.manage.service.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.ToolUtil
;
import
com.gic.commons.util.ToolUtil
;
import
com.gic.enterprise.api.dto.StoreGroupDTO
;
import
com.gic.enterprise.api.service.StoreGroupService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
...
@@ -45,6 +47,8 @@ public class StoreRangeServiceImpl implements StoreRangeService {
...
@@ -45,6 +47,8 @@ public class StoreRangeServiceImpl implements StoreRangeService {
@Autowired
@Autowired
private
StaffClerkRelationService
staffClerkRelationService
;
private
StaffClerkRelationService
staffClerkRelationService
;
@Autowired
private
StoreGroupService
storeGroupService
;
@Override
@Override
...
@@ -267,4 +271,24 @@ public class StoreRangeServiceImpl implements StoreRangeService {
...
@@ -267,4 +271,24 @@ public class StoreRangeServiceImpl implements StoreRangeService {
public
List
<
String
>
listStoreIdByName
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeName
)
{
public
List
<
String
>
listStoreIdByName
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeName
)
{
return
tabHaobanStoreRelationMapper
.
listStoreIdByName
(
wxEnterpriseId
,
enterpriseId
,
storeName
);
return
tabHaobanStoreRelationMapper
.
listStoreIdByName
(
wxEnterpriseId
,
enterpriseId
,
storeName
);
}
}
@Override
public
boolean
hasStore
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
storeId
)
{
List
<
String
>
storeGroupIds
=
this
.
listStoreGroupIdByWxEnterpriseId
(
wxEnterpriseId
,
enterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
storeGroupIds
))
{
logger
.
info
(
"好办门店分组id为空"
);
return
false
;
}
String
[]
array
=
storeGroupIds
.
toArray
(
new
String
[
0
]);
List
<
StoreGroupDTO
>
storeGroupDTOS
=
storeGroupService
.
listStoreGroup
(
array
,
enterpriseId
);
List
<
String
>
parentGroupIds
=
storeGroupDTOS
.
stream
().
map
(
StoreGroupDTO:
:
getParentGroupId
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
parentGroupIds
)
&&
parentGroupIds
.
contains
(
"0"
))
{
logger
.
info
(
"企微包含所有门店"
,
wxEnterpriseId
);
return
true
;
}
if
(
isFlagByStoreId
(
storeId
,
wxEnterpriseId
,
enterpriseId
))
{
return
true
;
}
return
false
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseRelatedServiceImpl.java
View file @
11804589
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.impl;
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.api.dto.EnterpriseSettingDTO
;
import
com.gic.enterprise.api.dto.EnterpriseSettingDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
...
@@ -122,4 +123,33 @@ public class WxEnterpriseRelatedServiceImpl implements WxEnterpriseRelatedServic
...
@@ -122,4 +123,33 @@ public class WxEnterpriseRelatedServiceImpl implements WxEnterpriseRelatedServic
}
}
return
true
;
return
true
;
}
}
@Override
public
ServiceResponse
<
Integer
>
getEnterprieseQwType
(
String
enterpriseId
)
{
List
<
TabHaobanWxEnterpriseRelated
>
list
=
this
.
mapper
.
listByEnterpriseId
(
enterpriseId
)
;
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
ServiceResponse
.
success
(
0
)
;
}
logger
.
info
(
"gic商户={}关联={}"
,
enterpriseId
,
list
.
size
());
Set
<
String
>
wxEidList
=
list
.
stream
().
map
(
o
->
o
.
getWxEnterpriseId
()).
collect
(
Collectors
.
toSet
())
;
List
<
TabHaobanWxEnterprise
>
wxList
=
this
.
wxEnterpriseMapper
.
listByIds
(
wxEidList
)
;
if
(
CollectionUtils
.
isEmpty
(
wxList
))
{
return
ServiceResponse
.
success
(
0
)
;
}
boolean
selfFlag
=
false
,
thirdFlag
=
false
;
for
(
TabHaobanWxEnterprise
o
:
wxList
)
{
if
(
o
.
getWxSecurityType
()==
5
)
{
selfFlag
=
true
;
}
else
{
thirdFlag
=
true
;
}
}
if
(
selfFlag
&&
thirdFlag
)
{
return
ServiceResponse
.
success
(
3
)
;
}
else
if
(
selfFlag
)
{
return
ServiceResponse
.
success
(
1
)
;
}
else
{
return
ServiceResponse
.
success
(
2
)
;
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DealSyncOperationApiServiceImpl.java
View file @
11804589
...
@@ -934,6 +934,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
...
@@ -934,6 +934,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
TabHaobanSyncTask
syncTask
=
syncTaskService
.
getSyncTask
(
taskId
);
TabHaobanSyncTask
syncTask
=
syncTaskService
.
getSyncTask
(
taskId
);
String
wxEnterpriseId
=
syncTask
.
getWxEnterpriseId
();
String
wxEnterpriseId
=
syncTask
.
getWxEnterpriseId
();
this
.
unlockTask
(
wxEnterpriseId
)
;
this
.
unlockTask
(
wxEnterpriseId
)
;
this
.
cleanDiffrence
(
wxEnterpriseId
,
taskId
);
logger
.
info
(
"同步通讯录完成"
);
logger
.
info
(
"同步通讯录完成"
);
RedisUtil
.
unlock
(
key
);
RedisUtil
.
unlock
(
key
);
}
}
...
@@ -970,6 +971,8 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
...
@@ -970,6 +971,8 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
List
<
String
>
dataIds
=
preDealService
.
listReDataIdByPDataId
(
taskId
,
stffId
,
PreDealTypeEnum
.
friend
.
getVal
());
List
<
String
>
dataIds
=
preDealService
.
listReDataIdByPDataId
(
taskId
,
stffId
,
PreDealTypeEnum
.
friend
.
getVal
());
if
(
CollectionUtils
.
isEmpty
(
dataIds
))
{
if
(
CollectionUtils
.
isEmpty
(
dataIds
))
{
logger
.
info
(
"无第三方的数据/自建"
);
logger
.
info
(
"无第三方的数据/自建"
);
String
staffLockKey
=
DealSyncOperationApiServiceImpl
.
FRIEND_LOCK
+
stffId
;
RedisUtil
.
delCache
(
staffLockKey
);
preDealService
.
updateStatusByDataId
(
taskId
,
stffId
,
PreDealTypeEnum
.
friend_clerk
.
getVal
(),
PreDealStatusEnum
.
computed
.
getVal
(),
"成功"
);
preDealService
.
updateStatusByDataId
(
taskId
,
stffId
,
PreDealTypeEnum
.
friend_clerk
.
getVal
(),
PreDealStatusEnum
.
computed
.
getVal
(),
"成功"
);
}
else
{
}
else
{
sendToMq
(
taskId
,
new
HashSet
<>(
dataIds
),
SyncTaskStatusEnum
.
friend_sync
,
null
);
sendToMq
(
taskId
,
new
HashSet
<>(
dataIds
),
SyncTaskStatusEnum
.
friend_sync
,
null
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/ExternalClerkRelatedApiServiceImpl.java
View file @
11804589
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.dto.SubscribeMessageDTO
;
import
com.gic.api.base.dto.SubscribeMessageDTO
;
...
@@ -25,7 +24,10 @@ import com.gic.haoban.manage.api.service.DealSyncOperationApiService;
...
@@ -25,7 +24,10 @@ import com.gic.haoban.manage.api.service.DealSyncOperationApiService;
import
com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService
;
import
com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.*
;
import
com.gic.haoban.manage.service.dao.mapper.ExternalUseridLogMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanExternalClerkRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
import
com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.ext.MemberStaffRelExtDO
;
import
com.gic.haoban.manage.service.entity.ext.MemberStaffRelExtDO
;
...
@@ -54,6 +56,7 @@ import org.redisson.api.RateType;
...
@@ -54,6 +56,7 @@ import org.redisson.api.RateType;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
11804589
...
@@ -498,6 +498,9 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -498,6 +498,9 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
private
void
addToMq2Mark
(
String
wxEnterpriseId
)
{
private
void
addToMq2Mark
(
String
wxEnterpriseId
)
{
String
key
=
"qwadd:count2:"
+
wxEnterpriseId
;
String
key
=
"qwadd:count2:"
+
wxEnterpriseId
;
if
(
null
!=
RedisUtil
.
getCache
(
"qwadd:count:"
+
wxEnterpriseId
))
{
RedisUtil
.
delCache
(
"qwadd:count:"
+
wxEnterpriseId
)
;
}
RedisUtil
.
setCache
(
key
,
1
,
600L
);
RedisUtil
.
setCache
(
key
,
1
,
600L
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
11804589
...
@@ -205,9 +205,9 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -205,9 +205,9 @@ public class MessageApiServiceImpl implements MessageApiService {
Set
<
String
>
wxSet
=
Sets
.
newHashSet
(
Set
<
String
>
wxSet
=
Sets
.
newHashSet
(
// 鸿星尔克
// 鸿星尔克
"e034e2bd5d0b44d3bf553c9f8204094c"
,
"e034e2bd5d0b44d3bf553c9f8204094c"
,
//
润臣测试环境
//
达摩科技
"b18ffdc9d0644912865a248859914d80"
,
"b18ffdc9d0644912865a248859914d80"
,
//
尊兴
//
达摩科技-生产
"fb40256db41142a196b21ccf03e58507"
,
"fb40256db41142a196b21ccf03e58507"
,
// 金华悦行
// 金华悦行
"ac451a350eed4a96958dd5c7377f8bd9"
);
"ac451a350eed4a96958dd5c7377f8bd9"
);
...
@@ -243,7 +243,15 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -243,7 +243,15 @@ public class MessageApiServiceImpl implements MessageApiService {
log
.
info
(
"职务名称:position:{}"
,
position
);
log
.
info
(
"职务名称:position:{}"
,
position
);
clerkQwDTO
.
setClerkType
(
StringUtils
.
isBlank
(
position
)
?
0
:
position
.
contains
(
"店长"
)
?
1
:
0
);
clerkQwDTO
.
setClerkType
(
StringUtils
.
isBlank
(
position
)
?
0
:
position
.
contains
(
"店长"
)
?
1
:
0
);
clerkQwDTO
.
setClerkGener
(
dto
.
getGender
());
clerkQwDTO
.
setClerkGener
(
dto
.
getGender
());
if
(
StringUtils
.
isBlank
(
dto
.
getMobile
())
&&
dto
.
getUserid
().
startsWith
(
"51"
)
&&
dto
.
getUserid
().
length
()==
12
)
{
clerkQwDTO
.
setPhoneNumber
(
dto
.
getUserid
().
substring
(
1
));
}
else
{
clerkQwDTO
.
setPhoneNumber
(
dto
.
getMobile
());
clerkQwDTO
.
setPhoneNumber
(
dto
.
getMobile
());
}
if
(
StringUtils
.
isBlank
(
clerkQwDTO
.
getPhoneNumber
()))
{
log
.
info
(
"导购手机号不存在{}"
,
dto
.
getUserid
());
return
;
}
clerkQwDTO
.
setNationcode
(
dto
.
getTelephone
());
clerkQwDTO
.
setNationcode
(
dto
.
getTelephone
());
// 调用换导购接口逻辑
// 调用换导购接口逻辑
clerkService
.
syncClerkForQw
(
clerkQwDTO
);
clerkService
.
syncClerkForQw
(
clerkQwDTO
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/QywxTagApiServiceImpl.java
View file @
11804589
...
@@ -15,11 +15,13 @@ import com.gic.haoban.manage.api.enums.QywxTagRelationSyncFlagEnum;
...
@@ -15,11 +15,13 @@ import com.gic.haoban.manage.api.enums.QywxTagRelationSyncFlagEnum;
import
com.gic.haoban.manage.api.enums.QywxTagRelationTypeEnum
;
import
com.gic.haoban.manage.api.enums.QywxTagRelationTypeEnum
;
import
com.gic.haoban.manage.api.service.QywxTagApiService
;
import
com.gic.haoban.manage.api.service.QywxTagApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.QywxTagRelationMapper
;
import
com.gic.haoban.manage.service.entity.*
;
import
com.gic.haoban.manage.service.entity.*
;
import
com.gic.haoban.manage.service.pojo.QywxSyncTagFormatPojo
;
import
com.gic.haoban.manage.service.pojo.QywxSyncTagFormatPojo
;
import
com.gic.haoban.manage.service.service.ExternalClerkRelatedService
;
import
com.gic.haoban.manage.service.service.ExternalClerkRelatedService
;
import
com.gic.haoban.manage.service.service.QywxTagService
;
import
com.gic.haoban.manage.service.service.QywxTagService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.util.DingUtils
;
import
com.gic.member.api.dto.MemberTagDTO
;
import
com.gic.member.api.dto.MemberTagDTO
;
import
com.gic.member.api.service.MemberTagService
;
import
com.gic.member.api.service.MemberTagService
;
import
com.gic.member.tag.api.dto.MemberTagItemDTO
;
import
com.gic.member.tag.api.dto.MemberTagItemDTO
;
...
@@ -85,6 +87,8 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -85,6 +87,8 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
@Autowired
@Autowired
private
MemberTagItemApiService
memberTagItemApiService
;
private
MemberTagItemApiService
memberTagItemApiService
;
@Autowired
private
QywxTagRelationMapper
qywxTagRelationMapper
;
@Override
@Override
public
void
pullQywxTag
(
String
wxEnterpriseId
)
{
public
void
pullQywxTag
(
String
wxEnterpriseId
)
{
...
@@ -107,8 +111,15 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -107,8 +111,15 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
@Override
@Override
public
ServiceResponse
syncTagToQywx
(
String
wxEnterpriseId
,
String
enterpriseId
,
QywxTagInfoDTO
infoDTO
,
List
<
QywxTagItemDTO
>
items
)
{
public
ServiceResponse
syncTagToQywx
(
String
wxEnterpriseId
,
String
enterpriseId
,
QywxTagInfoDTO
infoDTO
,
List
<
QywxTagItemDTO
>
items
)
{
logger
.
info
(
"保存标签同步"
);
ServiceResponse
ret
=
new
ServiceResponse
();
ServiceResponse
ret
=
new
ServiceResponse
();
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
WxEnterpriseQwDTO
qwDTO
=
this
.
wxEnterpriseService
.
getQwInfo
(
wxEnterpriseId
)
;
// 如果
List
<
TabQywxTagRelation
>
list
=
this
.
qywxTagRelationMapper
.
listByMemberTagId
(
wxEnterpriseId
,
infoDTO
.
getMemberTagId
())
;
if
(
CollectionUtils
.
isNotEmpty
(
list
)
&&
list
.
size
()
>=
items
.
size
())
{
logger
.
info
(
"标签已存在,直接处理会员"
);
return
ret
;
}
//调用企业微信接口保存
//调用企业微信接口保存
QywxGetCorpTagListDTO
resp
=
this
.
saveQywxTag
(
qwDTO
.
getThirdCorpid
(),
infoDTO
,
items
,
qwDTO
);
QywxGetCorpTagListDTO
resp
=
this
.
saveQywxTag
(
qwDTO
.
getThirdCorpid
(),
infoDTO
,
items
,
qwDTO
);
if
(
resp
.
getErrcode
()
!=
0
&&
CollectionUtils
.
isEmpty
(
resp
.
getTagGroup
()))
{
if
(
resp
.
getErrcode
()
!=
0
&&
CollectionUtils
.
isEmpty
(
resp
.
getTagGroup
()))
{
...
@@ -141,7 +152,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -141,7 +152,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
* @param infoDTO
* @param infoDTO
*/
*/
private
void
saveRelation
(
String
wxEnterpriseId
,
String
enterpriseId
,
QywxTagInfoDTO
infoDTO
,
List
<
QywxTagItemDTO
>
items
,
Pair
<
TabQywxTag
,
List
<
TabQywxTagItem
>>
localQywxTagPair
)
{
private
void
saveRelation
(
String
wxEnterpriseId
,
String
enterpriseId
,
QywxTagInfoDTO
infoDTO
,
List
<
QywxTagItemDTO
>
items
,
Pair
<
TabQywxTag
,
List
<
TabQywxTagItem
>>
localQywxTagPair
)
{
Map
<
String
,
QywxTagItemDTO
>
orgMap
=
items
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getQywxTagName
(),
dto
->
dto
));
Map
<
String
,
QywxTagItemDTO
>
orgMap
=
items
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getQywxTagName
(),
dto
->
dto
,(
k1
,
k2
)->
k1
));
//设置关联关系
//设置关联关系
TabQywxTag
groupKey
=
localQywxTagPair
.
getKey
();
TabQywxTag
groupKey
=
localQywxTagPair
.
getKey
();
List
<
TabQywxTagItem
>
tabQywxTagItems
=
localQywxTagPair
.
getRight
();
List
<
TabQywxTagItem
>
tabQywxTagItems
=
localQywxTagPair
.
getRight
();
...
@@ -438,7 +449,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
...
@@ -438,7 +449,7 @@ public class QywxTagApiServiceImpl implements QywxTagApiService {
@Override
@Override
public
ServiceResponse
syncFriendTagToQywxByExternalUserId
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
externalUserId
,
List
<
String
>
tagItemIds
)
{
public
ServiceResponse
syncFriendTagToQywxByExternalUserId
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
externalUserId
,
List
<
String
>
tagItemIds
)
{
logger
.
info
(
"同步好友标签到企业微信:
{},{},{},{}"
,
wxEnterpriseId
,
enterpriseId
,
externalUserId
,
JSONObject
.
toJSONString
(
tagItemIds
));
logger
.
info
(
"同步好友标签到企业微信:
externalUserId={},{}"
,
externalUserId
,
JSONObject
.
toJSONString
(
tagItemIds
));
ServiceResponse
resp
=
new
ServiceResponse
();
ServiceResponse
resp
=
new
ServiceResponse
();
//获取需要同步的标签
//获取需要同步的标签
QywxSyncTagFormatPojo
syncTagFormat
=
listSyncTagItems
(
wxEnterpriseId
);
QywxSyncTagFormatPojo
syncTagFormat
=
listSyncTagItems
(
wxEnterpriseId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
11804589
...
@@ -75,7 +75,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -75,7 +75,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Autowired
@Autowired
private
HmQrcodeService
hmQrcodeService
;
private
HmQrcodeService
hmQrcodeService
;
@Autowired
@Autowired
private
Config
config
;
private
StoreRangeService
storeRangeService
;
@Override
@Override
public
void
bindLogMq
(
String
params
)
{
public
void
bindLogMq
(
String
params
)
{
...
@@ -513,11 +513,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
...
@@ -513,11 +513,13 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
logger
.
info
(
"导购未关联成员,oldClerkId={}"
,
oldClerkId
);
logger
.
info
(
"导购未关联成员,oldClerkId={}"
,
oldClerkId
);
return
;
return
;
}
}
/* StaffClerkRelationDTO oldRelationDTO = staffClerkRelationService.getByClerkId(oldClerkId);
// 如果新门店未关联好办,进行解绑
if (null == oldRelationDTO) {
boolean
hasFlag
=
this
.
storeRangeService
.
hasStore
(
oldRelationDTO
.
getWxEnterpriseId
(),
enterpriseId
,
clerkDTO
.
getStoreId
())
;
logger.info("导购未关联成员,clerkCode={}", clerkCode);
if
(!
hasFlag
)
{
return;
logger
.
info
(
"新门店未关联好办,storeId={}"
,
clerkDTO
.
getStoreId
());
}*/
staffClerkRelationService
.
delBind
(
oldClerkId
,
"-1"
,
ChannelCodeEnum
.
STORE_CHANGE_UNBIND
.
getCode
(),
null
,
null
);
return
;
}
logger
.
info
(
"导购门店转移,老的绑定导购id={}"
,
oldRelationDTO
.
getClerkId
());
logger
.
info
(
"导购门店转移,老的绑定导购id={}"
,
oldRelationDTO
.
getClerkId
());
this
.
moveOrAddClerk
(
clerkSyncQDTO
,
oldRelationDTO
);
this
.
moveOrAddClerk
(
clerkSyncQDTO
,
oldRelationDTO
);
}
else
if
(
type
==
3
)
{
}
else
if
(
type
==
3
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseRelatedApiServiceImpl.java
View file @
11804589
...
@@ -730,4 +730,9 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
...
@@ -730,4 +730,9 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
public
int
getRelationCount
(
String
enterpriseId
)
{
public
int
getRelationCount
(
String
enterpriseId
)
{
return
this
.
wxEnterpriseRelatedService
.
getRelationCount
(
enterpriseId
);
return
this
.
wxEnterpriseRelatedService
.
getRelationCount
(
enterpriseId
);
}
}
@Override
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Integer
>
getEnterprieseQwType
(
String
enterpriseId
)
{
return
this
.
wxEnterpriseRelatedService
.
getEnterprieseQwType
(
enterpriseId
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/chat/GroupChatPlanApiServiceImpl.java
View file @
11804589
...
@@ -118,6 +118,7 @@ public class GroupChatPlanApiServiceImpl implements GroupChatPlanApiService {
...
@@ -118,6 +118,7 @@ public class GroupChatPlanApiServiceImpl implements GroupChatPlanApiService {
if
(
null
!=
qdto
.
getEndDate
())
{
if
(
null
!=
qdto
.
getEndDate
())
{
qdto
.
setEndDate
(
DateUtil
.
getEndTimeOfDay
(
qdto
.
getEndDate
()));
qdto
.
setEndDate
(
DateUtil
.
getEndTimeOfDay
(
qdto
.
getEndDate
()));
}
}
qdto
.
setPlanId
(
planId
);
Page
<
GroupChatPlanLogDTO
>
page
=
this
.
groupChatPlanService
.
listLogPage
(
qdto
,
basePageInfo
);
Page
<
GroupChatPlanLogDTO
>
page
=
this
.
groupChatPlanService
.
listLogPage
(
qdto
,
basePageInfo
);
return
ServiceResponse
.
success
(
page
);
return
ServiceResponse
.
success
(
page
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/licence/AppOrderApiServiceImpl.java
View file @
11804589
...
@@ -304,6 +304,10 @@ public class AppOrderApiServiceImpl implements AppOrderApiService {
...
@@ -304,6 +304,10 @@ public class AppOrderApiServiceImpl implements AppOrderApiService {
appOrderEndTime
=
now
;
appOrderEndTime
=
now
;
}
}
logger
.
info
(
"已购买付费应用的到期时间:{},合同到期时间:{}"
,
DateUtil
.
dateToStr
(
appOrderEndTime
,
DateUtil
.
FORMAT_DATETIME_19
),
DateUtil
.
dateToStr
(
endTime
,
DateUtil
.
FORMAT_DATETIME_19
));
logger
.
info
(
"已购买付费应用的到期时间:{},合同到期时间:{}"
,
DateUtil
.
dateToStr
(
appOrderEndTime
,
DateUtil
.
FORMAT_DATETIME_19
),
DateUtil
.
dateToStr
(
endTime
,
DateUtil
.
FORMAT_DATETIME_19
));
//如果过期时间小于当前时间,取当前时间
if
(
now
.
after
(
appOrderEndTime
)){
appOrderEndTime
=
now
;
}
int
i
=
DateUtil
.
daysBetween
(
appOrderEndTime
,
endTime
);
int
i
=
DateUtil
.
daysBetween
(
appOrderEndTime
,
endTime
);
if
(
i
<
0
){
if
(
i
<
0
){
i
=
0
;
i
=
0
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/friend/SelfFriendSyncNewOperation.java
View file @
11804589
...
@@ -169,7 +169,7 @@ public class SelfFriendSyncNewOperation implements BaseSyncOperation {
...
@@ -169,7 +169,7 @@ public class SelfFriendSyncNewOperation implements BaseSyncOperation {
GicMQClient
clientInstance
=
GICMQClientUtil
.
getClientInstance
();
GicMQClient
clientInstance
=
GICMQClientUtil
.
getClientInstance
();
try
{
try
{
Log
.
info
(
"发送队列SelfFriendSyncNewOperation={}"
,
JSON
.
toJSONString
(
ret
));
Log
.
info
(
"发送队列SelfFriendSyncNewOperation={}"
,
JSON
.
toJSONString
(
ret
));
clientInstance
.
sendBatchMessages
(
"departmentSyncDealMq
2
"
,
ret
);
clientInstance
.
sendBatchMessages
(
"departmentSyncDealMq"
,
ret
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
info
(
"发送失败:{},{}"
,
taskId
);
logger
.
info
(
"发送失败:{},{}"
,
taskId
);
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
haoban-manage3-service/src/main/resources/mapper/TabHaobanExternalClerkRelatedMapper.xml
View file @
11804589
...
@@ -527,8 +527,7 @@
...
@@ -527,8 +527,7 @@
from tab_haoban_external_clerk_related
from tab_haoban_external_clerk_related
where wx_enterprise_id = #{wxEnterpriseId}
where wx_enterprise_id = #{wxEnterpriseId}
and enterprise_id = #{enterpriseId}
and enterprise_id = #{enterpriseId}
and status_flag in (1, 3, 4)
and status_flag = 1
order by create_time
</select>
</select>
<select
id=
"listMemberIdsByMemberIds"
resultType=
"String"
>
<select
id=
"listMemberIdsByMemberIds"
resultType=
"String"
>
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/DepartmentContoller.java
View file @
11804589
...
@@ -336,7 +336,7 @@ public class DepartmentContoller extends WebBaseController {
...
@@ -336,7 +336,7 @@ public class DepartmentContoller extends WebBaseController {
Object
cache
=
RedisUtil
.
getLocalCache
(
"department-list-cache-"
+
wxEnterpriseId
);
Object
cache
=
RedisUtil
.
getLocalCache
(
"department-list-cache-"
+
wxEnterpriseId
);
if
(
null
==
cache
)
{
if
(
null
==
cache
)
{
List
<
DepartmentShortDTO
>
list
=
departmentApiService
.
listAllDepartment
(
wxEnterpriseId
);
List
<
DepartmentShortDTO
>
list
=
departmentApiService
.
listAllDepartment
(
wxEnterpriseId
);
RedisUtil
.
setLocalCache
(
"department-list-cache-"
+
wxEnterpriseId
,
list
,
-
1
L
);
RedisUtil
.
setLocalCache
(
"department-list-cache-"
+
wxEnterpriseId
,
list
,
60
*
60
*
24
L
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
list
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
list
);
}
else
{
}
else
{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
cache
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
cache
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatController.java
View file @
11804589
...
@@ -37,12 +37,14 @@ import org.apache.logging.log4j.Logger;
...
@@ -37,12 +37,14 @@ 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
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -153,11 +155,35 @@ public class GroupChatController {
...
@@ -153,11 +155,35 @@ public class GroupChatController {
@RequestMapping
(
"user/quit/excel"
)
@RequestMapping
(
"user/quit/excel"
)
public
RestResponse
<
Boolean
>
excel
(
HttpServletRequest
request
,
HttpServletResponse
response
,
GroupChatUserSearchQDTO
qdto
,
BasePageInfo
basePageInfo
)
{
public
RestResponse
<
Boolean
>
excel
(
HttpServletRequest
request
,
HttpServletResponse
response
,
String
searchParams
,
Integer
userType
,
Date
startDate
,
Date
endDate
,
@RequestParam
(
defaultValue
=
"2"
)
Integer
status
)
{
GroupChatUserSearchQDTO
qdto
=
new
GroupChatUserSearchQDTO
();
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
int
pageNum
=
1
;
int
pageSize
=
1000
;
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
qdto
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
qdto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
qdto
.
setSearchParams
(
searchParams
);
qdto
.
setUserType
(
userType
);
qdto
.
setStartDate
(
startDate
);
qdto
.
setEndDate
(
endDate
);
qdto
.
setStatus
(
status
);
basePageInfo
.
setPageSize
(
pageSize
);
List
<
GroupChatUserDTO
>
result
=
new
ArrayList
<>();
while
(
true
)
{
basePageInfo
.
setPageNum
(
pageNum
);
ServiceResponse
<
Page
<
GroupChatUserDTO
>>
page
=
this
.
groupChatApiService
.
listUserPage
(
qdto
,
basePageInfo
);
ServiceResponse
<
Page
<
GroupChatUserDTO
>>
page
=
this
.
groupChatApiService
.
listUserPage
(
qdto
,
basePageInfo
);
if
(
page
.
isSuccess
()
&&
CollUtil
.
isNotEmpty
(
page
.
getResult
().
getResult
())){
List
<
GroupChatUserDTO
>
list
=
page
.
getResult
().
getResult
();
if
(
CollectionUtils
.
isEmpty
(
list
))
{
break
;
}
result
.
addAll
(
list
);
pageNum
++;
}
if
(
CollUtil
.
isNotEmpty
(
result
)){
List
<
GroupChatUserQuitVO
>
voList
=
new
ArrayList
<>()
;
List
<
GroupChatUserQuitVO
>
voList
=
new
ArrayList
<>()
;
for
(
GroupChatUserDTO
dto
:
page
.
getResult
().
getResult
()
)
{
for
(
GroupChatUserDTO
dto
:
result
)
{
GroupChatUserQuitVO
vo
=
EntityUtil
.
changeEntityByJSON
(
GroupChatUserQuitVO
.
class
,
dto
)
;
GroupChatUserQuitVO
vo
=
EntityUtil
.
changeEntityByJSON
(
GroupChatUserQuitVO
.
class
,
dto
)
;
vo
.
setUserQuitTimeExcel
(
DateUtil
.
dateToStr
(
dto
.
getUserQuitTime
(),
"yyyy-MM-dd HH:mm:ss"
));
vo
.
setUserQuitTimeExcel
(
DateUtil
.
dateToStr
(
dto
.
getUserQuitTime
(),
"yyyy-MM-dd HH:mm:ss"
));
if
(
dto
.
getUserType
()==
1
)
{
if
(
dto
.
getUserType
()==
1
)
{
...
@@ -169,9 +195,10 @@ public class GroupChatController {
...
@@ -169,9 +195,10 @@ public class GroupChatController {
}
}
voList
.
add
(
vo
)
;
voList
.
add
(
vo
)
;
}
}
String
fileName
=
"退群记录"
;
String
s
=
DateUtil
.
formatString
(
new
Date
(),
DateUtil
.
FORMAT_DATE_10
);
List
<
String
>
titleList
=
Arrays
.
asList
(
"群成员"
,
"身份"
,
"群名称"
,
"群主"
,
"退群时间"
);
String
fileName
=
"退群记录"
+
s
;
List
<
String
>
fileList
=
Arrays
.
asList
(
"userName"
,
"userTypeExcel"
,
"chatName"
,
"staffName"
,
"userQuitTimeExcel"
);
List
<
String
>
titleList
=
Arrays
.
asList
(
"群成员姓名"
,
"群成员昵称"
,
"身份"
,
"群名称"
,
"群主"
,
"退群时间"
);
List
<
String
>
fileList
=
Arrays
.
asList
(
"userName"
,
"nickName"
,
"userTypeExcel"
,
"chatName"
,
"staffName"
,
"userQuitTimeExcel"
);
try
{
try
{
ExcelUtils
.
xls
(
response
,
request
,
fileName
,
voList
,
fileList
,
titleList
);
ExcelUtils
.
xls
(
response
,
request
,
fileName
,
voList
,
fileList
,
titleList
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/chat/GroupChatPlanController.java
View file @
11804589
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
chat
;
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
chat
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.gic.haoban.manage.api.dto.chat.ChatContentDTO
;
import
com.gic.haoban.manage.api.dto.chat.ChatContentDTO
;
import
com.gic.haoban.manage.web.qo.ExcelSheet
;
import
com.gic.haoban.manage.web.utils.ExportSheetUtil
;
import
com.gic.haoban.manage.web.vo.ClerkVo
;
import
com.gic.haoban.manage.web.vo.chat.*
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
...
@@ -38,13 +39,13 @@ import com.gic.haoban.manage.api.service.StaffApiService;
...
@@ -38,13 +39,13 @@ import com.gic.haoban.manage.api.service.StaffApiService;
import
com.gic.haoban.manage.api.service.chat.GroupChatPlanApiService
;
import
com.gic.haoban.manage.api.service.chat.GroupChatPlanApiService
;
import
com.gic.haoban.manage.web.log.LogRecordUserServiceImpl
;
import
com.gic.haoban.manage.web.log.LogRecordUserServiceImpl
;
import
com.gic.haoban.manage.web.utils.CreatorUtils
;
import
com.gic.haoban.manage.web.utils.CreatorUtils
;
import
com.gic.haoban.manage.web.vo.chat.ChatOwnerVO
;
import
com.gic.haoban.manage.web.vo.chat.GroupChatPlanVO
;
import
com.gic.log.record.anno.GicLogRecord
;
import
com.gic.log.record.anno.GicLogRecord
;
import
com.gic.log.record.util.GicLogRecordCategoryEnum
;
import
com.gic.log.record.util.GicLogRecordCategoryEnum
;
import
com.gic.log.record.util.GicLogRecordEvaluationContext
;
import
com.gic.log.record.util.GicLogRecordEvaluationContext
;
import
com.gic.log.record.util.GicLogRecordOptTypeEnum
;
import
com.gic.log.record.util.GicLogRecordOptTypeEnum
;
import
javax.servlet.http.HttpServletResponse
;
/**
/**
*
*
* @ClassName: GroupChatPlanController
* @ClassName: GroupChatPlanController
...
@@ -381,4 +382,124 @@ public class GroupChatPlanController {
...
@@ -381,4 +382,124 @@ public class GroupChatPlanController {
return
RestResponse
.
successResult
(
resp
.
getResult
());
return
RestResponse
.
successResult
(
resp
.
getResult
());
}
}
/**
* 群发记录导出(多个sheet)
* @param qdto
* @param response
* @return
*/
@RequestMapping
(
"export-group-chat"
)
public
RestResponse
<
Void
>
exportGroupChat
(
GroupChatPlanSearchQDTO
qdto
,
HttpServletResponse
response
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
qdto
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
qdto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
List
<
String
>
creatorIdList
=
CreatorUtils
.
getCreatorIdList
(
0
);
if
(
CollectionUtils
.
isNotEmpty
(
creatorIdList
))
{
qdto
.
setCreatorIdList
(
creatorIdList
);
}
BasePageInfo
basePageInfo
=
new
BasePageInfo
();
basePageInfo
.
setPageSize
(
99999
);
ServiceResponse
<
Page
<
GroupChatPlanDTO
>>
page
=
this
.
groupChatPlanApiService
.
listPage
(
qdto
,
basePageInfo
);
List
<
GroupChatPlanDTO
>
result
=
page
.
getResult
().
getResult
();
if
(
CollectionUtils
.
isEmpty
(
result
)){
return
RestResponse
.
failure
(
"-9999"
,
"导出的数据为空"
);
}
List
<
GroupChatPlanExcelVO
>
groupChatPlanExcelVOList
=
EntityUtil
.
changeEntityListByJSON
(
GroupChatPlanExcelVO
.
class
,
result
);
List
<
SendExcelVO
>
sendExcelVOList
=
new
ArrayList
<>();
List
<
ReceiveExcelVO
>
receiveExcelVOList
=
new
ArrayList
<>();
List
<
Long
>
planIdList
=
result
.
stream
().
map
(
a
->
a
.
getPlanId
()).
collect
(
Collectors
.
toList
());
Map
<
Long
,
GroupChatPlanDTO
>
map
=
result
.
stream
().
collect
(
Collectors
.
toMap
(
GroupChatPlanDTO:
:
getPlanId
,
a
->
a
));
//按计划维度 查询群发详情和客户接收详情
GroupChatPlanSearchQDTO
searchQDTO
=
new
GroupChatPlanSearchQDTO
();
searchQDTO
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
searchQDTO
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
for
(
Long
planId
:
planIdList
){
GroupChatPlanDTO
groupChatPlanDTO
=
map
.
get
(
planId
);
ServiceResponse
<
Page
<
GroupChatPlanOwnerLogDTO
>>
resp
=
this
.
groupChatPlanApiService
.
listOwnerLogPage
(
planId
,
searchQDTO
,
basePageInfo
);
List
<
GroupChatPlanOwnerLogDTO
>
planOwnerLogDTOS
=
resp
.
getResult
().
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
planOwnerLogDTOS
)){
List
<
SendExcelVO
>
sendExcelVOList1
=
EntityUtil
.
changeEntityListByJSON
(
SendExcelVO
.
class
,
planOwnerLogDTOS
);
sendExcelVOList1
.
forEach
(
a
->{
a
.
setName
(
groupChatPlanDTO
.
getName
());
a
.
setStartTime
(
groupChatPlanDTO
.
getStartTime
());
a
.
setEndTime
(
groupChatPlanDTO
.
getEndTime
());
});
sendExcelVOList
.
addAll
(
sendExcelVOList1
);
}
ServiceResponse
<
Page
<
GroupChatPlanLogDTO
>>
resp1
=
this
.
groupChatPlanApiService
.
listLogPage
(
planId
,
searchQDTO
,
basePageInfo
);
List
<
GroupChatPlanLogDTO
>
planLogDTOS
=
resp1
.
getResult
().
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
planLogDTOS
)){
List
<
ReceiveExcelVO
>
receiveExcelVOList1
=
EntityUtil
.
changeEntityListByJSON
(
ReceiveExcelVO
.
class
,
planLogDTOS
);
receiveExcelVOList1
.
forEach
(
a
->{
a
.
setName
(
groupChatPlanDTO
.
getName
());
a
.
setStartTime
(
groupChatPlanDTO
.
getStartTime
());
a
.
setEndTime
(
groupChatPlanDTO
.
getEndTime
());
});
receiveExcelVOList
.
addAll
(
receiveExcelVOList1
);
}
}
//设置sheet的表头与表名
String
[]
groupChatListSheetHead
=
{
"任务名称"
,
"任务状态"
,
"已完成群主数"
,
"未完成群主数"
,
"完成率"
,
"已送达群数"
,
"任务开始时间"
,
"任务结束时间"
,
"创建人"
,
"创建时间"
};
String
[]
sendSheetHead
=
{
"任务名称"
,
"发送人"
,
"关联导购"
,
"关联门店"
,
"完成状态"
,
"已送达客户群数"
,
"发送时间"
,
"任务开始时间"
,
"任务结束时间"
};
String
[]
receiveSheetHead
=
{
"任务名称"
,
"群名称"
,
"群人数"
,
"发送人"
,
"关联导购"
,
"关联门店"
,
"发送状态"
,
"发送时间"
,
"任务开始时间"
,
"任务结束时间"
};
List
<
ExcelSheet
>
mysheet
=
new
ArrayList
<>();
ExcelSheet
groupChatListExcel
=
new
ExcelSheet
(
"客户群发列表"
,
groupChatListSheetHead
,
changeGroupChatPlanExcelVOList
(
groupChatPlanExcelVOList
));
mysheet
.
add
(
groupChatListExcel
);
ExcelSheet
sendExcel
=
new
ExcelSheet
(
"发送人群发详情"
,
sendSheetHead
,
changeSendExcelVOList
(
sendExcelVOList
));
mysheet
.
add
(
sendExcel
);
ExcelSheet
receiveExcel
=
new
ExcelSheet
(
"客户群接收详情"
,
receiveSheetHead
,
changeReceiveExcelVOList
(
receiveExcelVOList
));
mysheet
.
add
(
receiveExcel
);
String
s
=
DateUtil
.
formatString
(
new
Date
(),
DateUtil
.
FORMAT_DATE_10
);
String
fileName
=
"客户群群发"
+
s
;
ExportSheetUtil
.
exportManySheetExcel
(
fileName
,
mysheet
,
response
);
return
RestResponse
.
successResult
(
null
);
}
private
List
<
String
[]>
changeGroupChatPlanExcelVOList
(
List
<
GroupChatPlanExcelVO
>
groupChatPlanExcelVOList
){
List
<
String
[]>
result
=
new
ArrayList
<>();
for
(
GroupChatPlanExcelVO
vo
:
groupChatPlanExcelVOList
){
String
startTime
=
DateUtil
.
formatString
(
vo
.
getStartTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
endTime
=
DateUtil
.
formatString
(
vo
.
getEndTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
createTime
=
DateUtil
.
formatString
(
vo
.
getCreateTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
[]
a
=
{
vo
.
getName
(),
vo
.
getStatus
(),
vo
.
getSendCount
()==
null
?
""
:
vo
.
getSendCount
().
toString
(),
vo
.
getStaffCount
()==
null
?
""
:
vo
.
getStaffCount
().
toString
(),
vo
.
getCompletionRate
(),
vo
.
getSuccessChatCount
()==
null
?
""
:
vo
.
getSuccessChatCount
().
toString
(),
startTime
,
endTime
,
vo
.
getCreatorName
(),
createTime
};
result
.
add
(
a
);
}
return
result
;
}
private
List
<
String
[]>
changeSendExcelVOList
(
List
<
SendExcelVO
>
sendExcelVOList
){
List
<
String
[]>
result
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
sendExcelVOList
)){
return
result
;
}
for
(
SendExcelVO
vo
:
sendExcelVOList
){
String
sendTime
=
DateUtil
.
formatString
(
vo
.
getSendTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
startTime
=
DateUtil
.
formatString
(
vo
.
getStartTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
endTime
=
DateUtil
.
formatString
(
vo
.
getEndTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
[]
a
=
{
vo
.
getName
(),
vo
.
getStaffName
(),
vo
.
getClerkName
(),
vo
.
getStoreName
(),
vo
.
getSendStatusExcel
(),
vo
.
getSendCount
()==
null
?
""
:
vo
.
getSendCount
().
toString
(),
sendTime
,
startTime
,
endTime
};
result
.
add
(
a
);
}
return
result
;
}
private
List
<
String
[]>
changeReceiveExcelVOList
(
List
<
ReceiveExcelVO
>
receiveExcelVOList
){
List
<
String
[]>
result
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isEmpty
(
receiveExcelVOList
)){
return
result
;
}
for
(
ReceiveExcelVO
vo
:
receiveExcelVOList
){
String
sendTime
=
DateUtil
.
formatString
(
vo
.
getSendTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
startTime
=
DateUtil
.
formatString
(
vo
.
getStartTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
endTime
=
DateUtil
.
formatString
(
vo
.
getEndTime
(),
DateUtil
.
FORMAT_DATETIME_19
);
String
[]
a
=
{
vo
.
getName
(),
vo
.
getChatName
(),
vo
.
getChatTotalCount
()==
null
?
""
:
vo
.
getChatTotalCount
().
toString
(),
vo
.
getStaffName
(),
vo
.
getClerkName
(),
vo
.
getStoreName
(),
vo
.
getSendStatusExcel
(),
sendTime
,
startTime
,
endTime
};
result
.
add
(
a
);
}
return
result
;
}
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/qo/ExcelSheet.java
0 → 100644
View file @
11804589
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
;
import
java.util.List
;
/**
* @description:
* @Author: wenhua
* @Date: 2023/9/12 11:19
*/
public
class
ExcelSheet
{
/*** sheet的名称*/
private
String
fileName
;
/*** sheet里的标题*/
private
String
[]
handers
;
/*** sheet里的数据集*/
private
List
<
String
[]>
dataset
;
public
String
getFileName
()
{
return
fileName
;
}
public
void
setFileName
(
String
fileName
)
{
this
.
fileName
=
fileName
;
}
public
String
[]
getHanders
()
{
return
handers
;
}
public
void
setHanders
(
String
[]
handers
)
{
this
.
handers
=
handers
;
}
public
List
<
String
[]>
getDataset
()
{
return
dataset
;
}
public
void
setDataset
(
List
<
String
[]>
dataset
)
{
this
.
dataset
=
dataset
;
}
public
ExcelSheet
(
String
fileName
,
String
[]
handers
,
List
<
String
[]>
dataset
)
{
this
.
fileName
=
fileName
;
this
.
handers
=
handers
;
this
.
dataset
=
dataset
;
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/utils/ExportSheetUtil.java
0 → 100644
View file @
11804589
package
com
.
gic
.
haoban
.
manage
.
web
.
utils
;
import
com.gic.haoban.manage.web.qo.ExcelSheet
;
import
org.apache.poi.hssf.usermodel.*
;
import
org.apache.poi.ss.usermodel.CellStyle
;
import
org.apache.poi.ss.usermodel.HorizontalAlignment
;
import
org.apache.poi.ss.usermodel.VerticalAlignment
;
import
org.springframework.http.MediaType
;
import
javax.servlet.http.HttpServletResponse
;
import
java.net.URLEncoder
;
import
java.util.List
;
/**
* @description:
* @Author: wenhua
* @Date: 2023/9/12 11:14
*/
public
class
ExportSheetUtil
{
/**
* 拆解并导出多重Excel
*/
public
static
void
exportManySheetExcel
(
String
fileName
,
List
<
ExcelSheet
>
mysheets
,
HttpServletResponse
response
)
{
//创建工作薄
HSSFWorkbook
wb
=
new
HSSFWorkbook
();
//表头样式
HSSFCellStyle
style
=
wb
.
createCellStyle
();
// 垂直
style
.
setVerticalAlignment
(
CellStyle
.
ALIGN_CENTER
);
// 水平
style
.
setAlignment
(
CellStyle
.
VERTICAL_CENTER
);
//字体样式
HSSFFont
fontStyle
=
wb
.
createFont
();
fontStyle
.
setFontName
(
"微软雅黑"
);
fontStyle
.
setFontHeightInPoints
((
short
)
12
);
style
.
setFont
(
fontStyle
);
for
(
ExcelSheet
excel
:
mysheets
)
{
//新建一个sheet
//获取该sheet名称
HSSFSheet
sheet
=
wb
.
createSheet
(
excel
.
getFileName
());
//获取sheet的标题名
String
[]
handers
=
excel
.
getHanders
();
//第一个sheet的第一行为标题
HSSFRow
rowFirst
=
sheet
.
createRow
(
0
);
//写标题
for
(
int
i
=
0
;
i
<
handers
.
length
;
i
++)
{
//获取第一行的每个单元格
HSSFCell
cell
=
rowFirst
.
createCell
(
i
);
//往单元格里写数据
cell
.
setCellValue
(
handers
[
i
]);
//加样式
cell
.
setCellStyle
(
style
);
//设置每列的列宽
sheet
.
setColumnWidth
(
i
,
4000
);
}
//写数据集
List
<
String
[]>
dataset
=
excel
.
getDataset
();
for
(
int
i
=
0
;
i
<
dataset
.
size
();
i
++)
{
//获取该对象
String
[]
data
=
dataset
.
get
(
i
);
//创建数据行
HSSFRow
row
=
sheet
.
createRow
(
i
+
1
);
for
(
int
j
=
0
;
j
<
data
.
length
;
j
++)
{
//设置对应单元格的值
row
.
createCell
(
j
).
setCellValue
(
data
[
j
]);
}
}
}
// 下载文件谷歌文件名会乱码,用IE
try
{
response
.
setContentType
(
MediaType
.
APPLICATION_OCTET_STREAM_VALUE
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
URLEncoder
.
encode
(
fileName
+
".xls"
,
"utf-8"
));
response
.
setHeader
(
"Cache-Control"
,
"No-cache"
);
response
.
flushBuffer
();
wb
.
write
(
response
.
getOutputStream
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/chat/GroupChatPlanExcelVO.java
0 → 100644
View file @
11804589
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
.
chat
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Date
;
/**
*
* @ClassName: TabHaobanGroupChatPlan
* @Description: TODO
* @Author 徐高华
* @Date 2022年11月25日 15:28:49
* @Modify
* @CopyRight
*/
public
class
GroupChatPlanExcelVO
extends
Object
implements
Serializable
{
private
static
final
long
serialVersionUID
=
21576537277600L
;
/**
* 任务名称
*/
private
String
name
;
/**
* 任务状态
*/
private
String
status
;
/**
* 已完成任务的群主数量
*/
private
Integer
sendCount
;
/**
* 群主数量
*/
private
Integer
staffCount
;
/**
* 完成率
*/
private
String
completionRate
;
/**
* 已送达数的群数
*/
private
Integer
successChatCount
;
/**
* 任务开始时间
*/
private
Date
startTime
;
/**
* 任务结束时间
*/
private
Date
endTime
;
/**
* 创建人
*/
private
String
creatorName
;
/**
* 创建时间
*/
private
Date
createTime
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getStatus
()
{
Date
now
=
new
Date
();
if
(
now
.
before
(
this
.
startTime
)){
status
=
"未开始"
;
}
else
if
(
now
.
before
(
this
.
endTime
)){
status
=
"进行中"
;
}
else
if
(
now
.
after
(
this
.
endTime
)){
status
=
"已结束"
;
}
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
Integer
getSendCount
()
{
return
sendCount
;
}
public
void
setSendCount
(
Integer
sendCount
)
{
this
.
sendCount
=
sendCount
;
}
public
Integer
getStaffCount
()
{
return
staffCount
;
}
public
void
setStaffCount
(
Integer
staffCount
)
{
this
.
staffCount
=
staffCount
;
}
public
String
getCompletionRate
()
{
Double
i
=
100.0
*
this
.
sendCount
/
this
.
staffCount
;
BigDecimal
bd
=
new
BigDecimal
(
i
);
bd
=
bd
.
setScale
(
2
,
RoundingMode
.
HALF_UP
);
completionRate
=
bd
+
"%"
;
return
completionRate
;
}
public
void
setCompletionRate
(
String
completionRate
)
{
this
.
completionRate
=
completionRate
;
}
public
Integer
getSuccessChatCount
()
{
return
successChatCount
;
}
public
void
setSuccessChatCount
(
Integer
successChatCount
)
{
this
.
successChatCount
=
successChatCount
;
}
public
Date
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
Date
startTime
)
{
this
.
startTime
=
startTime
;
}
public
Date
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
Date
endTime
)
{
this
.
endTime
=
endTime
;
}
public
String
getCreatorName
()
{
return
creatorName
;
}
public
void
setCreatorName
(
String
creatorName
)
{
this
.
creatorName
=
creatorName
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
}
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/chat/ReceiveExcelVO.java
0 → 100644
View file @
11804589
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
.
chat
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
*
* @ClassName: TabHaobanGroupChatPlanLog
* @Description: TODO
* @Author 徐高华
* @Date 2022年11月25日 15:17:50
* @Modify
* @CopyRight
*/
public
class
ReceiveExcelVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
21625366526300L
;
/**
* 任务名称
*/
private
String
name
;
/**
* 群名称
*/
private
String
chatName
;
/**
* 群人数
*/
private
Integer
chatTotalCount
;
/**
* 发送人
*/
private
String
staffName
;
/**
* 关联导购
*/
private
String
clerkName
;
/**
* 关联门店
*/
private
String
storeName
;
/**
* 发送状态
*/
private
Integer
sendStatus
;
/**
* 发送状态
*/
private
String
sendStatusExcel
;
/**
* 发送时间
*/
private
Date
sendTime
;
/**
* 任务开始时间
*/
private
Date
startTime
;
/**
* 任务结束时间
*/
private
Date
endTime
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getChatName
()
{
return
chatName
;
}
public
void
setChatName
(
String
chatName
)
{
this
.
chatName
=
chatName
;
}
public
Integer
getChatTotalCount
()
{
return
chatTotalCount
;
}
public
void
setChatTotalCount
(
Integer
chatTotalCount
)
{
this
.
chatTotalCount
=
chatTotalCount
;
}
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
}
public
String
getClerkName
()
{
return
clerkName
;
}
public
void
setClerkName
(
String
clerkName
)
{
this
.
clerkName
=
clerkName
;
}
public
String
getStoreName
()
{
return
storeName
;
}
public
void
setStoreName
(
String
storeName
)
{
this
.
storeName
=
storeName
;
}
public
Integer
getSendStatus
()
{
return
sendStatus
;
}
public
void
setSendStatus
(
Integer
sendStatus
)
{
this
.
sendStatus
=
sendStatus
;
}
public
String
getSendStatusExcel
()
{
sendStatusExcel
=
"发送失败"
;
if
(
this
.
sendStatus
==
0
){
sendStatusExcel
=
"发送失败"
;
}
else
if
(
this
.
sendStatus
==
2
){
sendStatusExcel
=
"已发送"
;
}
return
sendStatusExcel
;
}
public
void
setSendStatusExcel
(
String
sendStatusExcel
)
{
this
.
sendStatusExcel
=
sendStatusExcel
;
}
public
Date
getSendTime
()
{
return
sendTime
;
}
public
void
setSendTime
(
Date
sendTime
)
{
this
.
sendTime
=
sendTime
;
}
public
Date
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
Date
startTime
)
{
this
.
startTime
=
startTime
;
}
public
Date
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
Date
endTime
)
{
this
.
endTime
=
endTime
;
}
}
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/vo/chat/SendExcelVO.java
0 → 100644
View file @
11804589
package
com
.
gic
.
haoban
.
manage
.
web
.
vo
.
chat
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
*
* @ClassName: TabHaobanGroupChatPlanOwnerLog
* @Description: TODO
* @Author 徐高华
* @Date 2022年11月25日 15:29:51
* @Modify
* @CopyRight
*/
public
class
SendExcelVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
21697825515700L
;
/**
* 任务名称
*/
private
String
name
;
/**
* 发送人
*/
private
String
staffName
;
/**
* 关联导购
*/
private
String
clerkName
;
/**
* 关联门店
*/
private
String
storeName
;
/**
* 完成状态
*/
private
Integer
sendStatus
;
/**
* 完成状态
*/
private
String
sendStatusExcel
;
/**
* 已送达客户群数
*/
private
Integer
sendCount
;
/**
* 发送时间
*/
private
Date
sendTime
;
/**
* 任务开始时间
*/
private
Date
startTime
;
/**
* 任务结束时间
*/
private
Date
endTime
;
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getStaffName
()
{
return
staffName
;
}
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
}
public
String
getClerkName
()
{
return
clerkName
;
}
public
void
setClerkName
(
String
clerkName
)
{
this
.
clerkName
=
clerkName
;
}
public
String
getStoreName
()
{
return
storeName
;
}
public
void
setStoreName
(
String
storeName
)
{
this
.
storeName
=
storeName
;
}
public
Integer
getSendStatus
()
{
return
sendStatus
;
}
public
void
setSendStatus
(
Integer
sendStatus
)
{
this
.
sendStatus
=
sendStatus
;
}
public
String
getSendStatusExcel
()
{
sendStatusExcel
=
"待发送"
;
if
(
this
.
sendStatus
==
null
){
return
sendStatusExcel
;
}
if
(
this
.
sendStatus
==
0
){
sendStatusExcel
=
"任务创建失败"
;
}
else
if
(
this
.
sendStatus
==
1
){
sendStatusExcel
=
"待发送"
;
}
else
if
(
this
.
sendStatus
==
2
){
sendStatusExcel
=
"已发送"
;
}
return
sendStatusExcel
;
}
public
void
setSendStatusExcel
(
String
sendStatusExcel
)
{
this
.
sendStatusExcel
=
sendStatusExcel
;
}
public
Integer
getSendCount
()
{
return
sendCount
;
}
public
void
setSendCount
(
Integer
sendCount
)
{
this
.
sendCount
=
sendCount
;
}
public
Date
getSendTime
()
{
return
sendTime
;
}
public
void
setSendTime
(
Date
sendTime
)
{
this
.
sendTime
=
sendTime
;
}
public
Date
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
Date
startTime
)
{
this
.
startTime
=
startTime
;
}
public
Date
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
Date
endTime
)
{
this
.
endTime
=
endTime
;
}
}
\ No newline at end of file
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/UploadController.java
View file @
11804589
...
@@ -48,9 +48,6 @@ public class UploadController extends WebBaseController {
...
@@ -48,9 +48,6 @@ public class UploadController extends WebBaseController {
java
.
util
.
List
<
Map
<
String
,
Object
>>
picList
=
new
ArrayList
<>();
java
.
util
.
List
<
Map
<
String
,
Object
>>
picList
=
new
ArrayList
<>();
while
(
iter
.
hasNext
())
{
while
(
iter
.
hasNext
())
{
String
fileName
=
iter
.
next
();
String
fileName
=
iter
.
next
();
//获取文件名后缀
String
suffix
=
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
)
+
1
);
logger
.
info
(
"文件的后缀为:{}"
,
suffix
);
List
<
MultipartFile
>
list
=
multiRequest
.
getMultiFileMap
().
get
(
fileName
);
List
<
MultipartFile
>
list
=
multiRequest
.
getMultiFileMap
().
get
(
fileName
);
Map
<
String
,
Object
>
map
=
null
;
Map
<
String
,
Object
>
map
=
null
;
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
...
@@ -66,6 +63,12 @@ public class UploadController extends WebBaseController {
...
@@ -66,6 +63,12 @@ public class UploadController extends WebBaseController {
//上传接口替换
//上传接口替换
// PicUploadResDTO picUploadResDTO = qqCloudPicService.uploadPic(
// PicUploadResDTO picUploadResDTO = qqCloudPicService.uploadPic(
// GlobalVar.ctxPropertiesMap.get(GlobalInfo.QQPIC_KEY_ENTERPRISE), fileBuffer);
// GlobalVar.ctxPropertiesMap.get(GlobalInfo.QQPIC_KEY_ENTERPRISE), fileBuffer);
String
suffix
=
""
;
String
name
=
mf
.
getOriginalFilename
()
;
if
(
name
.
contains
(
"."
))
{
suffix
=
name
.
substring
(
name
.
lastIndexOf
(
"."
)+
1
)
;
}
logger
.
info
(
"后缀={}"
,
suffix
);
CloudFileTypeEnum
cloudFileTypeEnum
=
CloudFileTypeEnum
.
OTHER
;
CloudFileTypeEnum
cloudFileTypeEnum
=
CloudFileTypeEnum
.
OTHER
;
if
(
UploadUtils
.
isPicture
(
suffix
))
{
if
(
UploadUtils
.
isPicture
(
suffix
))
{
cloudFileTypeEnum
=
CloudFileTypeEnum
.
IMAGE
;
cloudFileTypeEnum
=
CloudFileTypeEnum
.
IMAGE
;
...
...
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