Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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
base_platform_enterprise
gic-platform-enterprise
Commits
0d7e2330
Commit
0d7e2330
authored
May 13, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序二维码
parent
983d54a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
9 deletions
+52
-9
AppletQrcodePathDTO.java
...main/java/com/gic/enterprise/dto/AppletQrcodePathDTO.java
+42
-0
AppletQrcodeApiService.java
...va/com/gic/enterprise/service/AppletQrcodeApiService.java
+2
-2
AppletQrcodeApiServiceImpl.java
...rprise/service/outer/impl/AppletQrcodeApiServiceImpl.java
+8
-7
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/AppletQrcodePathDTO.java
0 → 100644
View file @
0d7e2330
package
com
.
gic
.
enterprise
.
dto
;
import
java.io.Serializable
;
public
class
AppletQrcodePathDTO
implements
Serializable
{
private
String
fileId
;
private
String
url
;
private
String
downloadUrl
;
private
String
path
;
public
String
getFileId
()
{
return
fileId
;
}
public
void
setFileId
(
String
fileId
)
{
this
.
fileId
=
fileId
;
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
String
getDownloadUrl
()
{
return
downloadUrl
;
}
public
void
setDownloadUrl
(
String
downloadUrl
)
{
this
.
downloadUrl
=
downloadUrl
;
}
public
String
getPath
()
{
return
path
;
}
public
void
setPath
(
String
path
)
{
this
.
path
=
path
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/AppletQrcodeApiService.java
View file @
0d7e2330
...
...
@@ -2,11 +2,11 @@ package com.gic.enterprise.service;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.enterprise.dto.AppletQrcodeDTO
;
import
com.gic.enterprise.dto.AppletQrcodePathDTO
;
import
java.util.Map
;
public
interface
AppletQrcodeApiService
{
ServiceResponse
<
Map
<
String
,
Object
>
>
takeAppletQrcode
(
Integer
enterpriseId
,
String
appid
,
String
path
,
String
params
);
ServiceResponse
<
AppletQrcodePathDTO
>
takeAppletQrcode
(
Integer
enterpriseId
,
String
appid
,
String
path
,
String
params
);
ServiceResponse
<
AppletQrcodeDTO
>
getAppletQrcode
(
Integer
id
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AppletQrcodeApiServiceImpl.java
View file @
0d7e2330
...
...
@@ -2,6 +2,7 @@ package com.gic.enterprise.service.outer.impl;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.enterprise.dto.AppletQrcodeDTO
;
import
com.gic.enterprise.dto.AppletQrcodePathDTO
;
import
com.gic.enterprise.entity.TabAppletQrcode
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.service.AppletQrcodeApiService
;
...
...
@@ -23,7 +24,7 @@ public class AppletQrcodeApiServiceImpl implements AppletQrcodeApiService {
private
WeixinWxaFunService
weixinWxaFunService
;
@Override
public
ServiceResponse
<
Map
<
String
,
Object
>
>
takeAppletQrcode
(
Integer
enterpriseId
,
String
appid
,
String
path
,
String
params
)
{
public
ServiceResponse
<
AppletQrcodePathDTO
>
takeAppletQrcode
(
Integer
enterpriseId
,
String
appid
,
String
path
,
String
params
)
{
TabAppletQrcode
tabAppletQrcode
=
new
TabAppletQrcode
();
tabAppletQrcode
.
setAppid
(
appid
);
tabAppletQrcode
.
setEnterpriseId
(
enterpriseId
);
...
...
@@ -35,12 +36,12 @@ public class AppletQrcodeApiServiceImpl implements AppletQrcodeApiService {
Map
<
String
,
Object
>
result
=
wxaQrcode
.
getResult
();
byte
[]
contents
=
(
byte
[])
result
.
get
(
"content"
);
UploadResult
uploadResult
=
QQCloudPicUtils
.
uploadLocalPicStream
(
"pic01"
,
""
,
contents
);
Map
<
String
,
Object
>
pic
=
new
HashMap
<>
();
pic
.
put
(
"fileId"
,
uploadResult
.
getFileId
());
pic
.
put
(
"url"
,
uploadResult
.
getUrl
());
pic
.
put
(
"downloadUrl"
,
uploadResult
.
getDownloadUrl
());
pic
.
put
(
"path"
,
path
+
"?pageId="
+
i
);
ServiceResponse
.
success
(
pic
);
AppletQrcodePathDTO
qrcodePathDTO
=
new
AppletQrcodePathDTO
();
qrcodePathDTO
.
setFileId
(
uploadResult
.
getFileId
());
qrcodePathDTO
.
setUrl
(
uploadResult
.
getUrl
());
qrcodePathDTO
.
setDownloadUrl
(
uploadResult
.
getDownloadUrl
());
qrcodePathDTO
.
setPath
(
path
+
"?pageId="
+
i
);
ServiceResponse
.
success
(
qrcodePathDTO
);
}
return
ServiceResponse
.
failure
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
(),
"生成小程序二维码异常"
);
}
...
...
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