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
d8624cb1
Commit
d8624cb1
authored
Feb 22, 2023
by
jinxin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix/2023-02-22' into test_branch
parents
db5119bd
4338f45b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
105 additions
and
10 deletions
+105
-10
TransferActiveCodeDTO.java
.../com/gic/haoban/manage/api/dto/TransferActiveCodeDTO.java
+21
-0
StaffClerkRelationServiceImpl.java
...e/service/service/impl/StaffClerkRelationServiceImpl.java
+1
-1
DealSyncOperationApiServiceImpl.java
...ice/service/out/impl/DealSyncOperationApiServiceImpl.java
+1
-1
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+71
-6
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+9
-0
StaffController.java
...com/gic/haoban/manage/web/controller/StaffController.java
+1
-1
HmQrcodeController.java
...c/haoban/manage/web/controller/hm/HmQrcodeController.java
+0
-0
TargetController.java
...haoban/manage/web/controller/target/TargetController.java
+0
-0
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+1
-1
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/TransferActiveCodeDTO.java
View file @
d8624cb1
...
@@ -28,10 +28,22 @@ public class TransferActiveCodeDTO implements Serializable {
...
@@ -28,10 +28,22 @@ public class TransferActiveCodeDTO implements Serializable {
*/
*/
private
Integer
failedNum
;
private
Integer
failedNum
;
/**
/**
* 成功明细
*/
private
List
<
Map
<
String
,
String
>>
successList
;
/**
* 失败明细
* 失败明细
*/
*/
private
List
<
Map
<
String
,
String
>>
failedList
;
private
List
<
Map
<
String
,
String
>>
failedList
;
public
List
<
Map
<
String
,
String
>>
getSuccessList
()
{
return
successList
;
}
public
void
setSuccessList
(
List
<
Map
<
String
,
String
>>
successList
)
{
this
.
successList
=
successList
;
}
public
Integer
getTotalNum
()
{
public
Integer
getTotalNum
()
{
return
totalNum
;
return
totalNum
;
}
}
...
@@ -67,6 +79,15 @@ public class TransferActiveCodeDTO implements Serializable {
...
@@ -67,6 +79,15 @@ public class TransferActiveCodeDTO implements Serializable {
//操作日志记录
//操作日志记录
public
String
logRecord
()
{
public
String
logRecord
()
{
StringBuilder
log
=
new
StringBuilder
();
StringBuilder
log
=
new
StringBuilder
();
//记录单个转移的成功日志
if
(
CollUtil
.
isNotEmpty
(
this
.
successList
)
&&
this
.
totalNum
==
1
){
Map
<
String
,
String
>
stringMap
=
this
.
successList
.
get
(
0
);
String
handoverStaffPhone
=
null
==
stringMap
.
get
(
"handoverStaffPhone"
)?
""
:
stringMap
.
get
(
"handoverStaffPhone"
);
String
takeoverStaffPhone
=
null
==
stringMap
.
get
(
"takeoverStaffPhone"
)?
""
:
stringMap
.
get
(
"takeoverStaffPhone"
);
log
.
append
(
"将"
+
stringMap
.
get
(
"handoverStaffName"
)+
"-"
+
handoverStaffPhone
+
"的许可手动转移给"
+
stringMap
.
get
(
"takeoverStaffName"
)+
"-"
+
takeoverStaffPhone
);
return
log
.
toString
();
}
log
.
append
(
"共需转移"
+
this
.
totalNum
+
",成功"
+
this
.
successNum
+
",失败"
+
this
.
failedNum
+
"。"
);
log
.
append
(
"共需转移"
+
this
.
totalNum
+
",成功"
+
this
.
successNum
+
",失败"
+
this
.
failedNum
+
"。"
);
if
(
CollUtil
.
isNotEmpty
(
this
.
failedList
))
{
if
(
CollUtil
.
isNotEmpty
(
this
.
failedList
))
{
log
.
append
(
"失败明细:"
);
log
.
append
(
"失败明细:"
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/StaffClerkRelationServiceImpl.java
View file @
d8624cb1
...
@@ -117,7 +117,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
...
@@ -117,7 +117,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
logger
.
info
(
"通知会员 删除企微好友,该会员无任何好友关系,memberId:{}"
,
memberId
);
logger
.
info
(
"通知会员 删除企微好友,该会员无任何好友关系,memberId:{}"
,
memberId
);
memberApiService
.
updateMemberQywxFlag
(
enterpriseId
,
memberId
,
0
);
memberApiService
.
updateMemberQywxFlag
(
enterpriseId
,
memberId
,
0
);
memberApiService
.
updateMemberQywxEveryOccasion
(
enterpriseId
,
memberId
,
0
,
new
Date
());
memberApiService
.
updateMemberQywxEveryOccasion
(
enterpriseId
,
memberId
,
0
,
new
Date
());
return
;
continue
;
}
}
logger
.
info
(
"通知会员 删除企微好友 每次调用更新为非企微好友时间 memberId:{}"
,
memberId
);
logger
.
info
(
"通知会员 删除企微好友 每次调用更新为非企微好友时间 memberId:{}"
,
memberId
);
memberApiService
.
updateMemberQywxEveryOccasion
(
enterpriseId
,
memberId
,
1
,
new
Date
());
memberApiService
.
updateMemberQywxEveryOccasion
(
enterpriseId
,
memberId
,
1
,
new
Date
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/DealSyncOperationApiServiceImpl.java
View file @
d8624cb1
...
@@ -355,7 +355,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
...
@@ -355,7 +355,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
GicMQClient
clientInstance
=
GICMQClientUtil
.
getClientInstance
();
GicMQClient
clientInstance
=
GICMQClientUtil
.
getClientInstance
();
try
{
try
{
clientInstance
.
sendBatchMessages
(
"departmentSyncDealMq"
,
listRet
);
clientInstance
.
sendBatchMessages
(
"departmentSyncDealMq"
,
listRet
,
10
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
info
(
"发送失败:{},{}"
,
taskId
,
JSONObject
.
toJSONString
(
listRet
));
logger
.
info
(
"发送失败:{},{}"
,
taskId
,
JSONObject
.
toJSONString
(
listRet
));
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
d8624cb1
...
@@ -17,7 +17,9 @@ import org.apache.commons.collections.CollectionUtils;
...
@@ -17,7 +17,9 @@ 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
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.redisson.api.RAtomicLong
;
import
org.redisson.api.RRateLimiter
;
import
org.redisson.api.RRateLimiter
;
import
org.redisson.api.RSet
;
import
org.redisson.api.RateIntervalUnit
;
import
org.redisson.api.RateIntervalUnit
;
import
org.redisson.api.RateType
;
import
org.redisson.api.RateType
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -45,6 +47,7 @@ import com.gic.haoban.app.customer.enums.GicQywxSyncTypeEnum;
...
@@ -45,6 +47,7 @@ import com.gic.haoban.app.customer.enums.GicQywxSyncTypeEnum;
import
com.gic.haoban.app.customer.enums.QywxSyncTaskTypeEnum
;
import
com.gic.haoban.app.customer.enums.QywxSyncTaskTypeEnum
;
import
com.gic.haoban.app.customer.service.api.service.CustomerApiService
;
import
com.gic.haoban.app.customer.service.api.service.CustomerApiService
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.common.utils.DingUtils
;
import
com.gic.haoban.manage.api.constants.Manage3Constants
;
import
com.gic.haoban.manage.api.constants.Manage3Constants
;
import
com.gic.haoban.manage.api.dto.ContentMaterialDTO
;
import
com.gic.haoban.manage.api.dto.ContentMaterialDTO
;
import
com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO
;
import
com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO
;
...
@@ -382,17 +385,79 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -382,17 +385,79 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
DealQywxExternalUserPojo
dealQywxExternalUserPojo
=
new
DealQywxExternalUserPojo
();
DealQywxExternalUserPojo
dealQywxExternalUserPojo
=
new
DealQywxExternalUserPojo
();
dealQywxExternalUserPojo
.
setType
(
DealQywxExternalUserPojo
.
DealType
.
add
.
getType
());
dealQywxExternalUserPojo
.
setType
(
DealQywxExternalUserPojo
.
DealType
.
add
.
getType
());
dealQywxExternalUserPojo
.
setData
(
dto
);
dealQywxExternalUserPojo
.
setData
(
dto
);
GicMQClient
instance
=
GICMQClientUtil
.
getClientInstance
();
GicMQClient
instance
=
GICMQClientUtil
.
getClientInstance
();
String
mqName
=
"dealQywxExternalUserMq"
;
if
(
this
.
mqCheck
(
dto
))
{
mqName
=
"dealQywxExternalUserMq2"
;
}
try
{
try
{
instance
.
sendMessage
(
"dealQywxExternalUserMq"
,
JSONObject
.
toJSONString
(
dealQywxExternalUserPojo
));
instance
.
sendMessage
(
mqName
,
JSONObject
.
toJSONString
(
dealQywxExternalUserPojo
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"异步处理异常:{}"
,
e
);
log
.
info
(
"异步处理异常:{}"
,
e
);
}
}
return
null
;
return
null
;
}
}
// 加好友量大的迁移到mq2
int
maxCount
=
800
;
private
boolean
mqCheck
(
QwFrientNoticeDTO
dto
)
{
boolean
flag
=
false
;
Object
obj
=
RedisUtil
.
getCache
(
"dealQywxExternalUserMq2"
)
;
String
corpid
=
dto
.
getCorpid
()
;
if
(
null
!=
obj
)
{
String
str
=
obj
.
toString
()
;
if
(
StringUtils
.
isNotBlank
(
corpid
)
&&
str
.
contains
(
corpid
))
{
flag
=
true
;
log
.
info
(
"加好友计数,手动配置到userMq2,corpid={}"
,
corpid
);
return
flag
;
}
}
if
(
null
!=
obj
&&
obj
.
toString
().
equals
(
"0"
))
{
return
false
;
}
TabHaobanWxEnterprise
wxEnterprise
=
this
.
wxEnterpriseService
.
getEnterpriseBycorpId
(
corpid
)
;
if
(
null
!=
wxEnterprise
)
{
String
wxEnterpriseId
=
wxEnterprise
.
getWxEnterpriseId
()
;
flag
=
this
.
needToMq2
(
wxEnterpriseId
)
;
if
(!
flag
)
{
long
times
=
this
.
getTimes
(
wxEnterpriseId
)
;
if
(
"wp59NLDQAAtTbif_SxAixUQVqMld4vug"
.
equals
(
corpid
))
{
maxCount
=
2
;
}
if
(
times
>
maxCount
)
{
if
(!
needToMq2
(
wxEnterpriseId
))
{
log
.
info
(
"加好友计数发送告警,id={}"
,
wxEnterpriseId
);
DingUtils
.
send
(
"加好友mq切换,企业="
+
wxEnterpriseId
,
false
);
}
log
.
info
(
"加好友计数,自动到userMq2,{}"
,
wxEnterpriseId
);
this
.
addToMq2Mark
(
wxEnterpriseId
);
flag
=
true
;
}
}
}
return
flag
;
}
private
long
getTimes
(
String
wxEnterpriseId
)
{
String
key
=
"qwadd:count:"
+
wxEnterpriseId
;
RAtomicLong
cache
=
RedisUtil
.
getRedisClient
().
getAtomicLong
(
key
);
long
val
=
cache
.
addAndGet
(
1
);
if
(
val
<=
1
)
{
cache
.
expire
(
1
,
TimeUnit
.
MINUTES
);
}
return
val
;
}
private
void
addToMq2Mark
(
String
wxEnterpriseId
)
{
String
key
=
"qwadd:count2:"
+
wxEnterpriseId
;
RedisUtil
.
setCache
(
key
,
1
,
600L
);
}
private
boolean
needToMq2
(
String
wxEnterpriseId
)
{
String
key
=
"qwadd:count2:"
+
wxEnterpriseId
;
return
null
!=
RedisUtil
.
getCache
(
key
)
;
}
@Override
@Override
public
String
addMemberUnionidRelatedNew
(
MemberUnionidRelatedDTO
dto
,
String
wxUserId
)
{
public
String
addMemberUnionidRelatedNew
(
MemberUnionidRelatedDTO
dto
,
String
wxUserId
)
{
String
corpId
=
dto
.
getCorpid
();
String
corpId
=
dto
.
getCorpid
();
...
@@ -1175,7 +1240,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -1175,7 +1240,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
GicMQClient
instance
=
GICMQClientUtil
.
getClientInstance
();
GicMQClient
instance
=
GICMQClientUtil
.
getClientInstance
();
try
{
try
{
instance
.
sendMessage
(
"dealQywxExternalUserMq"
,
JSONObject
.
toJSONString
(
dealQywxExternalUserPojo
));
instance
.
sendMessage
(
"dealQywxExternalUserMq
3
"
,
JSONObject
.
toJSONString
(
dealQywxExternalUserPojo
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"异步处理异常:{}"
,
e
);
log
.
info
(
"异步处理异常:{}"
,
e
);
}
}
...
@@ -1189,7 +1254,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -1189,7 +1254,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
GicMQClient
instance
=
GICMQClientUtil
.
getClientInstance
();
GicMQClient
instance
=
GICMQClientUtil
.
getClientInstance
();
try
{
try
{
instance
.
sendMessage
(
"dealQywxExternalUserMq"
,
JSONObject
.
toJSONString
(
dealQywxExternalUserPojo
));
instance
.
sendMessage
(
"dealQywxExternalUserMq
3
"
,
JSONObject
.
toJSONString
(
dealQywxExternalUserPojo
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"异步处理异常:{}"
,
e
);
log
.
info
(
"异步处理异常:{}"
,
e
);
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
d8624cb1
...
@@ -971,6 +971,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -971,6 +971,7 @@ public class StaffApiServiceImpl implements StaffApiService {
logger
.
info
(
"转移成员返回结果:{}"
,
JSONObject
.
toJSONString
(
listServiceResponse
));
logger
.
info
(
"转移成员返回结果:{}"
,
JSONObject
.
toJSONString
(
listServiceResponse
));
int
successNum
=
0
,
failedNum
=
0
;
int
successNum
=
0
,
failedNum
=
0
;
List
<
Map
<
String
,
String
>>
failedList
=
new
ArrayList
<>();
List
<
Map
<
String
,
String
>>
failedList
=
new
ArrayList
<>();
List
<
Map
<
String
,
String
>>
successList
=
new
ArrayList
<>();
if
(
Constant
.
SUCCESS
.
equals
(
listServiceResponse
.
getCode
())){
if
(
Constant
.
SUCCESS
.
equals
(
listServiceResponse
.
getCode
())){
List
<
AccountTransferUserDTO
>
resultList
=
listServiceResponse
.
getResult
();
List
<
AccountTransferUserDTO
>
resultList
=
listServiceResponse
.
getResult
();
result
.
setTotalNum
(
resultList
.
size
());
result
.
setTotalNum
(
resultList
.
size
());
...
@@ -984,6 +985,13 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -984,6 +985,13 @@ public class StaffApiServiceImpl implements StaffApiService {
staffMapper
.
updateStaffInfoByStaffId
(
handoverStaff
.
getStaffId
(),
null
,
null
,
null
);
staffMapper
.
updateStaffInfoByStaffId
(
handoverStaff
.
getStaffId
(),
null
,
null
,
null
);
//更新接收成员的许可信息
//更新接收成员的许可信息
staffMapper
.
updateStaffInfoByStaffId
(
takeOverStaff
.
getStaffId
(),
handoverStaff
.
getActiveTime
(),
handoverStaff
.
getExpireTime
(),
handoverStaff
.
getActiveCode
());
staffMapper
.
updateStaffInfoByStaffId
(
takeOverStaff
.
getStaffId
(),
handoverStaff
.
getActiveTime
(),
handoverStaff
.
getExpireTime
(),
handoverStaff
.
getActiveCode
());
//记录转移成功明细
Map
<
String
,
String
>
successMap
=
new
HashMap
<>(
8
);
successMap
.
put
(
"handoverStaffName"
,
handoverStaff
.
getStaffName
());
successMap
.
put
(
"handoverStaffPhone"
,
handoverStaff
.
getPhoneNumber
());
successMap
.
put
(
"takeoverStaffName"
,
takeOverStaff
.
getStaffName
());
successMap
.
put
(
"takeoverStaffPhone"
,
takeOverStaff
.
getPhoneNumber
());
successList
.
add
(
successMap
);
}
else
{
}
else
{
//企微转移失败,记录失败明细
//企微转移失败,记录失败明细
...
@@ -1000,6 +1008,7 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -1000,6 +1008,7 @@ public class StaffApiServiceImpl implements StaffApiService {
result
.
setSuccessNum
(
successNum
);
result
.
setSuccessNum
(
successNum
);
result
.
setFailedNum
(
failedNum
);
result
.
setFailedNum
(
failedNum
);
result
.
setFailedList
(
failedList
);
result
.
setFailedList
(
failedList
);
result
.
setSuccessList
(
successList
);
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
(
result
);
return
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
.
success
(
result
);
}
}
//企业微信接口调用失败,记录错误
//企业微信接口调用失败,记录错误
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/StaffController.java
View file @
d8624cb1
...
@@ -487,7 +487,7 @@ public class StaffController extends WebBaseController {
...
@@ -487,7 +487,7 @@ public class StaffController extends WebBaseController {
List
<
DepartmentDTO
>
relationList
=
departmentApiService
.
listSonByDepartmentIds
(
departmentIdSet
,
wxEnterpriseId
);
List
<
DepartmentDTO
>
relationList
=
departmentApiService
.
listSonByDepartmentIds
(
departmentIdSet
,
wxEnterpriseId
);
Map
<
String
,
DepartmentDTO
>
departmentMap
=
relationList
.
stream
().
collect
(
Collectors
.
toMap
(
DepartmentDTO:
:
getDepartmentId
,
s
->
s
));
Map
<
String
,
DepartmentDTO
>
departmentMap
=
relationList
.
stream
().
collect
(
Collectors
.
toMap
(
DepartmentDTO:
:
getDepartmentId
,
s
->
s
));
List
<
String
>
departmentIds
=
new
ArrayList
<>();
List
<
String
>
departmentIds
=
new
ArrayList
<>();
if
(
!
needDep
)
{
if
(
needDep
)
{
departmentIds
=
relationList
.
stream
().
map
(
DepartmentDTO:
:
getDepartmentId
).
collect
(
Collectors
.
toList
());
departmentIds
=
relationList
.
stream
().
map
(
DepartmentDTO:
:
getDepartmentId
).
collect
(
Collectors
.
toList
());
}
}
List
<
StaffDTO
>
staffAllList
=
Lists
.
newArrayListWithCapacity
(
5000
);
List
<
StaffDTO
>
staffAllList
=
Lists
.
newArrayListWithCapacity
(
5000
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmQrcodeController.java
View file @
d8624cb1
This diff is collapsed.
Click to expand it.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/target/TargetController.java
View file @
d8624cb1
This diff is collapsed.
Click to expand it.
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
d8624cb1
...
@@ -124,6 +124,6 @@
...
@@ -124,6 +124,6 @@
<dubbo:reference
id=
"settingApiService"
interface=
"com.gic.haoban.app.aggregation.api.service.SettingApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"settingApiService"
interface=
"com.gic.haoban.app.aggregation.api.service.SettingApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<!-- <dubbo:reference id="newDataTargetConfigApiService" interface="com.gic.enterprise.api.service.target.NewDataTargetConfigApiService" timeout="100000" retries="0" check="false" />--
>
<dubbo:reference
id=
"newDataTargetConfigApiService"
interface=
"com.gic.enterprise.api.service.target.NewDataTargetConfigApiService"
timeout=
"100000"
retries=
"0"
check=
"false"
/
>
</beans>
</beans>
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