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
b5f25d77
Commit
b5f25d77
authored
Apr 16, 2020
by
蘑菇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 图片地址转换
parent
ccf35a45
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
8 deletions
+37
-8
pom.xml
haoban-manage3-service/pom.xml
+7
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+25
-6
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+5
-2
No files found.
haoban-manage3-service/pom.xml
View file @
b5f25d77
...
@@ -115,6 +115,13 @@
...
@@ -115,6 +115,13 @@
<version>
3.0-SNAPSHOT
</version>
<version>
3.0-SNAPSHOT
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-thirdparty-api
</artifactId>
<version>
${gic-thirdparty-api}
</version>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
b5f25d77
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
java.io.InputStream
;
import
java.net.URL
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashSet
;
import
java.util.HashSet
;
...
@@ -11,15 +12,16 @@ import java.util.Set;
...
@@ -11,15 +12,16 @@ import java.util.Set;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.commons.util.
ToolUtil
;
import
com.gic.commons.util.
GlobalInfo
;
import
com.gic.
haoban.base.api.common.Constant
;
import
com.gic.
commons.util.GlobalVar
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.api.service.DepartmentApiService
;
import
com.gic.haoban.manage.service.util.EmojiFilterUtil
;
import
com.gic.thirdparty.api.dto.PicUploadResDTO
;
import
com.gic.thirdparty.api.service.QQCloudPicService
;
import
com.vdurmont.emoji.EmojiParser
;
import
com.vdurmont.emoji.EmojiParser
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.hibernate.hql.internal.CollectionSubqueryFactory
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -98,6 +100,9 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -98,6 +100,9 @@ public class StaffApiServiceImpl implements StaffApiService {
private
WxEnterpriseRelatedApiService
wxEnterpriseRelatedApiService
;
private
WxEnterpriseRelatedApiService
wxEnterpriseRelatedApiService
;
@Autowired
@Autowired
private
SyncErrorLogService
syncErrorLogService
;
private
SyncErrorLogService
syncErrorLogService
;
@Autowired
private
QQCloudPicService
qqCloudPicService
;
@Override
@Override
public
StaffDTO
selectById
(
String
staffId
)
{
public
StaffDTO
selectById
(
String
staffId
)
{
...
@@ -936,7 +941,8 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -936,7 +941,8 @@ public class StaffApiServiceImpl implements StaffApiService {
}
}
//修改
//修改
}
else
{
}
else
{
staff
.
setHeadImg
(
clerkDTO
.
getHeadImgUrl
());
String
url
=
changeHeaderImageUrl
(
clerkDTO
.
getHeadImgUrl
());
staff
.
setHeadImg
(
url
);
staff
.
setSex
(
clerkDTO
.
getClerkGender
());
staff
.
setSex
(
clerkDTO
.
getClerkGender
());
//staff.setPostion(postion);
//staff.setPostion(postion);
// staff.setStaffName(staffName);
// staff.setStaffName(staffName);
...
@@ -978,6 +984,19 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -978,6 +984,19 @@ public class StaffApiServiceImpl implements StaffApiService {
return
response
;
return
response
;
}
}
private
String
changeHeaderImageUrl
(
String
headImgUrl
)
{
try
{
InputStream
in
=
new
URL
(
headImgUrl
).
openStream
();
byte
[]
data
=
IOUtils
.
toByteArray
(
in
);
PicUploadResDTO
uploadPic
=
qqCloudPicService
.
uploadPic
(
GlobalVar
.
ctxPropertiesMap
.
get
(
GlobalInfo
.
QQPIC_KEY_ENTERPRISE
),
data
);
logger
.
info
(
"腾讯云万象优图返回"
+
JSON
.
toJSONString
(
uploadPic
));
return
uploadPic
.
downloadUrl
;
}
catch
(
Exception
e
){
logger
.
info
(
"上传腾讯云万象优图返回失败了:"
,
e
);
return
headImgUrl
;
}
}
/**
/**
* 删除企业微信
* 删除企业微信
*
*
...
...
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
b5f25d77
...
@@ -56,6 +56,8 @@
...
@@ -56,6 +56,8 @@
<dubbo:reference
interface=
"com.gic.member.api.service.MemberOpenCardBusinessService"
id=
"memberOpenCardBusinessService"
/>
<dubbo:reference
interface=
"com.gic.member.api.service.MemberOpenCardBusinessService"
id=
"memberOpenCardBusinessService"
/>
<dubbo:reference
id=
"eSDataDynamicOperationApiService"
interface=
"com.gic.search.engine.api.service.dynamic.ESDataDynamicOperationApiService"
timeout=
"10000"
/>
<dubbo:reference
id=
"eSDataDynamicOperationApiService"
interface=
"com.gic.search.engine.api.service.dynamic.ESDataDynamicOperationApiService"
timeout=
"10000"
/>
<dubbo:reference
id=
"qqCloudPicService"
interface=
"com.gic.thirdparty.api.service.QQCloudPicService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
</beans>
</beans>
\ No newline at end of file
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