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
13eb76cb
Commit
13eb76cb
authored
Jul 09, 2024
by
xiongjiangtao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into 202406_chat_data
parents
fcef86f6
febd5e40
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
17 deletions
+87
-17
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+12
-4
StaffClerkRelationApiServiceImpl.java
...ce/service/out/impl/StaffClerkRelationApiServiceImpl.java
+14
-10
SelfFriendSyncNewOperation.java
...anage/service/task/friend/SelfFriendSyncNewOperation.java
+7
-0
StaffMapper.xml
...manage3-service/src/main/resources/mapper/StaffMapper.xml
+1
-1
UploadController.java
...om/gic/haoban/manage/web/controller/UploadController.java
+53
-2
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
13eb76cb
...
...
@@ -749,7 +749,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
memberId
=
memberService
.
getMemberIdByPhoneNumber
(
mobile
,
enterpriseId
);
}
if
(
null
==
memberId
)
{
memberId
=
this
.
getMeberId
(
enterpriseId
,
unionId
,
name
,
avatar
,
qrcodeParam
,
externalUserid
,
wxEnterpriseRelated
.
getWxEnterpriseType
(),
2
)
;
memberId
=
this
.
getMeberId
(
enterpriseId
,
unionId
,
name
,
avatar
,
qrcodeParam
,
externalUserid
,
wxEnterpriseRelated
.
getWxEnterpriseType
(),
2
,
dto
.
getAddCreateTime
()
)
;
}
if
(
memberId
==
null
)
{
log
.
info
(
"新增外部联系人,创建member失败,unionid={},外部联系人id={},"
,
unionId
,
externalUserid
);
...
...
@@ -1529,7 +1529,11 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
}
this
.
saveExternalClerk
(
memberId
,
staffId
,
unionDTO
,
staffClerkRelation
,
statusFlag
);
if
(
StringUtils
.
isNotBlank
(
memberId
))
{
this
.
pushTagSync
(
memberId
,
wxEnterpriseId
,
enterpriseId
);
if
(
null
==
RedisUtil
.
getCache
(
"zhuan_self"
))
{
this
.
pushTagSync
(
memberId
,
wxEnterpriseId
,
enterpriseId
);
}
else
{
log
.
info
(
"不同步标签"
);
}
log
.
info
(
"通知会员 更新为企微好友 memberId:{}"
,
memberId
);
// memberApiService.updateMemberQywxFlag(enterpriseId, memberId, 1);
List
<
TabHaobanExternalClerkRelated
>
memberList
=
externalClerkRelatedService
.
getAddTimeByMemberId
(
memberId
,
enterpriseId
,
"1"
);
...
...
@@ -1948,7 +1952,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
log
.
info
(
"导购码不存在:"
+
clerkId
);
qrcodeParam
=
"clerk_clerk_"
+
clerk
.
getClerkId
()
;
}
String
memberId
=
this
.
getMeberId
(
enterpriseId
,
externalUserDTO
.
getUnionId
(),
externalUserDTO
.
getName
(),
externalUserDTO
.
getAvatar
(),
qrcodeParam
,
externalUserDTO
.
getExternalUserId
(),
wxEnterpriseRelated
.
getWxEnterpriseType
(),
1
)
;
String
memberId
=
this
.
getMeberId
(
enterpriseId
,
externalUserDTO
.
getUnionId
(),
externalUserDTO
.
getName
(),
externalUserDTO
.
getAvatar
(),
qrcodeParam
,
externalUserDTO
.
getExternalUserId
(),
wxEnterpriseRelated
.
getWxEnterpriseType
(),
1
,
externalUserDTO
.
getAddCreateTime
()
)
;
if
(
memberId
==
null
)
{
return
"会员不存在:unionid:"
+
externalUserDTO
.
getUnionId
();
}
...
...
@@ -1956,7 +1960,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
return
this
.
saveExternalUser
(
externalUserDTO
);
}
private
String
getMeberId
(
String
enterpriseId
,
String
unionid
,
String
name
,
String
image
,
String
qrcodeParam
,
String
externalUserId
,
int
wxEnterpriseType
,
int
sence
)
{
private
String
getMeberId
(
String
enterpriseId
,
String
unionid
,
String
name
,
String
image
,
String
qrcodeParam
,
String
externalUserId
,
int
wxEnterpriseType
,
int
sence
,
String
qwTime
)
{
QywxMemberQDTO
qdto
=
new
QywxMemberQDTO
()
;
qdto
.
setEnterpriseId
(
enterpriseId
);
qdto
.
setNick
(
name
);
...
...
@@ -1966,6 +1970,10 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
if
(
wxEnterpriseType
==
0
)
{
qdto
.
setUserId
(
externalUserId
);
}
if
(
StringUtils
.
isNotBlank
(
qwTime
))
{
Date
time
=
new
Date
(
Long
.
valueOf
(
qwTime
)*
1000
l
);
qdto
.
setAddTime
(
time
);
}
qdto
.
setSence
(
sence
);
String
memberId
=
null
;
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
MemberSimpleDetailDTO
>
resp
=
this
.
memberEntranceApiService
.
enterpriseWechatByFriendEntrance
(
qdto
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffClerkRelationApiServiceImpl.java
View file @
13eb76cb
...
...
@@ -632,18 +632,22 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
List
<
String
>
takeoverClerkIdList
=
new
ArrayList
<>()
;
if
(
CollectionUtils
.
isNotEmpty
(
staffIdList
))
{
for
(
int
i
=
0
;
i
<
staffIdList
.
size
();
i
++)
{
List
<
String
>
clerkIdList
=
null
;
String
staffId
=
staffIdList
.
get
(
i
)
;
TabHaobanStaff
staff
=
this
.
staffMapper
.
selectByPrimaryKeyNoStatus
(
staffId
)
;
if
(
null
!=
staff
&&
null
!=
staff
.
getDelTime
())
{
Date
delTime
=
DateUtil
.
addNumForMinute
(
staff
.
getDelTime
(),-
5
);
List
<
String
>
clerkIdList
=
this
.
tabHaobanStaffClerkRelationMapper
.
taskoverClerkIdList
(
staffId
,
delTime
)
;
if
(
CollectionUtils
.
isNotEmpty
(
clerkIdList
))
{
takeoverClerkIdList
.
addAll
(
clerkIdList
);
}
}
else
if
(
null
!=
staff
)
{
List
<
TabHaobanStaffClerkRelation
>
list
=
this
.
tabHaobanStaffClerkRelationMapper
.
taskoverClerkIdListAll
(
staffId
)
;
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
takeoverClerkIdList
.
add
(
list
.
get
(
0
).
getClerkId
())
;
if
(
null
!=
staff
)
{
if
(
null
!=
staff
.
getDelTime
())
{
Date
delTime
=
DateUtil
.
addNumForMinute
(
staff
.
getDelTime
(),
-
5
);
clerkIdList
=
this
.
tabHaobanStaffClerkRelationMapper
.
taskoverClerkIdList
(
staffId
,
delTime
);
if
(
CollectionUtils
.
isNotEmpty
(
clerkIdList
))
{
takeoverClerkIdList
.
addAll
(
clerkIdList
);
}
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
List
<
TabHaobanStaffClerkRelation
>
list
=
this
.
tabHaobanStaffClerkRelationMapper
.
taskoverClerkIdListAll
(
staffId
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
takeoverClerkIdList
.
add
(
list
.
get
(
0
).
getClerkId
());
}
}
}
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/task/friend/SelfFriendSyncNewOperation.java
View file @
13eb76cb
...
...
@@ -63,6 +63,13 @@ public class SelfFriendSyncNewOperation implements BaseSyncOperation {
String
staffId
=
dataPre
.
getpDataId
()
;
String
taskId
=
dealParamMqDTO
.
getTaskId
();
String
externalUserId
=
dataPre
.
getDataContent
();
String
qywxFlushLimitFlag
=
"qywxFlushLimitFlag"
;
Object
o
=
RedisUtil
.
getCache
(
qywxFlushLimitFlag
)
;
if
(
null
!=
o
&&
o
.
toString
().
equals
(
wxEnterpriseId
))
{
logger
.
info
(
"超接口限制,staffId={},{},{}"
,
staffId
,
wxUserId
,
externalUserId
);
dealException
(
taskId
,
dataPre
.
getDataId
(),
null
,
"超接口限制"
);
return
;
}
// 查询企微侧外部联系人详情
ExternalUserDTO
externalUserDTO
=
memberUnionidRelatedApiService
.
getCorpSelfExternalUseridInfo
(
wxEnterpriseId
,
wxUserId
,
externalUserId
);
if
(
externalUserDTO
==
null
)
{
...
...
haoban-manage3-service/src/main/resources/mapper/StaffMapper.xml
View file @
13eb76cb
...
...
@@ -495,7 +495,7 @@
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and super_manager_flag is null
and (wx_user_id = #{wxUserId,jdbcType=VARCHAR} or wx_open_user_id = #{wxUserId,jdbcType=VARCHAR})
order by update_time desc,create_time desc limit 1
order by
status_flag asc ,
update_time desc,create_time desc limit 1
</select>
<update
id=
"updateOpenUserIdsByUserId"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanStaff"
>
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/UploadController.java
View file @
13eb76cb
...
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.web.controller;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.service.AccountService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.haoban.common.anno.IgnoreLogin
;
import
com.gic.haoban.common.utils.HaobanResponse
;
...
...
@@ -9,6 +10,7 @@ import com.gic.haoban.common.utils.UploadUtils;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.thirdparty.api.service.QQCloudPicService
;
import
com.gic.thirdparty.cloudfile.CloudFileUtil
;
import
com.gic.thirdparty.cloudfile.CmeUtil
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileBusinessOptEnum
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileTypeEnum
;
import
com.gic.thirdparty.cloudfile.pojo.CloudFileInfo
;
...
...
@@ -17,6 +19,8 @@ import org.apache.commons.lang.StringUtils;
import
org.apache.logging.log4j.LogManager
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartHttpServletRequest
;
...
...
@@ -30,10 +34,57 @@ import java.util.*;
public
class
UploadController
extends
WebBaseController
{
private
static
org
.
apache
.
logging
.
log4j
.
Logger
logger
=
LogManager
.
getLogger
(
UploadController
.
class
);
@Autowired
private
QQCloudPicService
qqCloudPic
Service
;
private
AccountService
account
Service
;
@Autowired
private
EnterpriseService
enterpriseService
;
/**
* 获取桶名称
* @param fileType 文件后缀 mp4、jpg....
* @param fileFlag 视频类型 3为cme临时资源 - 此字段保持原来业务
* @param tempFlag 是否临时文件,1是0否
* @return
*/
@RequestMapping
(
"get-bucket"
)
@ResponseBody
public
RestResponse
<
CloudFileInfo
>
getBucket
(
String
fileType
,
String
enterpriseId
,
@RequestParam
(
required
=
false
)
Integer
fileFlag
,
String
businessType
,
@RequestParam
(
defaultValue
=
"0"
)
int
tempFlag
)
{
CloudFileBusinessOptEnum
businessOptEnum
=
null
;
// 天
Long
timeOut
=
null
;
if
(
StringUtils
.
isBlank
(
businessType
))
{
businessType
=
"material_content"
;
}
// 内容中心
if
(
"material_content"
.
equals
(
businessType
))
{
//存储空间余额校验
if
(!
accountService
.
storageFeeCheck
(
enterpriseId
)){
return
RestResponse
.
failure
(
"-1"
,
"存储余额不足,暂不支持图片/视频上传,请充值"
);
}
businessOptEnum
=
CloudFileBusinessOptEnum
.
MATERIAL_CONTENT
;
}
else
if
(
"haoban"
.
equals
(
businessType
))
{
// 好办
if
(
tempFlag
==
0
)
{
businessOptEnum
=
CloudFileBusinessOptEnum
.
HAOBAN_COMMON
;
}
else
{
businessOptEnum
=
CloudFileBusinessOptEnum
.
COMMON
;
timeOut
=
7L
;
}
}
CloudFileTypeEnum
cloudFileTypeEnum
=
CloudFileTypeEnum
.
getFileTypeByExtension
(
fileType
);
CloudFileInfo
cloudFileInfo
=
null
;
//cme上传视频走 temp存储桶只存一天有效期
if
(
fileFlag
!=
null
&&
fileFlag
==
3
)
{
cloudFileInfo
=
CloudFileUtil
.
getPreUploadTempFileInfo
(
fileType
,
cloudFileTypeEnum
,
CmeUtil
.
CME_TEMP_COS
,
CloudFileBusinessOptEnum
.
MATERIAL_CONTENT
,
1L
);
}
else
{
EnterpriseDTO
enterpriseDTO
=
enterpriseService
.
getEnterpriseById
(
enterpriseId
);
cloudFileInfo
=
CloudFileUtil
.
getPreUploadTempFileInfo
(
fileType
,
cloudFileTypeEnum
,
enterpriseDTO
.
getFactoryCode
(),
businessOptEnum
,
timeOut
);
}
if
(
cloudFileInfo
==
null
){
return
RestResponse
.
failure
(
"-1"
,
"获取桶名称失败"
);
}
return
RestResponse
.
successResult
(
cloudFileInfo
);
}
@RequestMapping
(
"upload-img"
)
@IgnoreLogin
...
...
@@ -120,7 +171,7 @@ public class UploadController extends WebBaseController {
if
(
name
.
contains
(
"."
))
{
name
=
name
.
substring
(
name
.
lastIndexOf
(
"."
)+
1
)
;
}
CloudFileInfo
uploadInfo
=
CloudFileUtil
.
uploadTempFile
(
file
,
name
,
type
,
factoryCode
,
CloudFileBusinessOptEnum
.
COMMON
,
7
*
24
L
)
;
CloudFileInfo
uploadInfo
=
CloudFileUtil
.
uploadTempFile
(
file
,
name
,
type
,
factoryCode
,
CloudFileBusinessOptEnum
.
COMMON
,
7L
)
;
if
(
uploadInfo
!=
null
)
{
map
.
put
(
"qcloudImageUrl"
,
uploadInfo
.
getOrgFileUrl
());
map
.
put
(
"imageFiledCode"
,
"imageFiledCode"
);
...
...
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