Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
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
吴迪
gs1-office-web-sit
Commits
438b6b92
Commit
438b6b92
authored
Dec 20, 2021
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】修改方法
parent
46441157
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
6 deletions
+26
-6
BarcodeGenerationController.java
...odules/manage/controller/BarcodeGenerationController.java
+4
-3
CreateQRcodeVo.java
...a/io/office/modules/manage/entity/dto/CreateQRcodeVo.java
+19
-0
BarcodeGenerationService.java
...fice/modules/manage/service/BarcodeGenerationService.java
+1
-1
BarcodeGenerationServiceImpl.java
...les/manage/service/impl/BarcodeGenerationServiceImpl.java
+2
-2
No files found.
src/main/java/io/office/modules/manage/controller/BarcodeGenerationController.java
View file @
438b6b92
...
...
@@ -3,6 +3,7 @@ package io.office.modules.manage.controller;
import
io.office.common.utils.R
;
import
io.office.modules.app.annotation.Login
;
import
io.office.modules.manage.entity.GS1CodeListEntity
;
import
io.office.modules.manage.entity.dto.CreateQRcodeVo
;
import
io.office.modules.manage.service.BarcodeGenerationService
;
import
io.office.modules.manage.utils.CheckAICodeUtil
;
import
io.office.modules.manage.vo.request.CheckAIVo
;
...
...
@@ -33,11 +34,11 @@ public class BarcodeGenerationController {
*/
@Login
@PostMapping
(
"/api/createQRcode"
)
public
R
createQRcode
(
@RequestBody
String
[]
param
)
{
if
(
param
.
length
==
0
){
public
R
createQRcode
(
@RequestBody
CreateQRcodeVo
createQRcodeVo
)
{
if
(
createQRcodeVo
.
getParam
().
size
()
==
0
){
return
R
.
error
(
"参数有误"
);
}
String
url
=
this
.
barcodeGenerationService
.
createPicture
(
param
);
String
url
=
this
.
barcodeGenerationService
.
createPicture
(
createQRcodeVo
.
getParam
().
toArray
()
);
return
R
.
ok
().
put
(
"data"
,
url
);
}
@Login
...
...
src/main/java/io/office/modules/manage/entity/dto/CreateQRcodeVo.java
0 → 100644
View file @
438b6b92
package
io
.
office
.
modules
.
manage
.
entity
.
dto
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.List
;
/**
*
* @description:
*
* @author wudi
* @date 17:58 2021/12/20
*/
@Data
public
class
CreateQRcodeVo
implements
Serializable
{
private
List
<
String
>
param
;
}
src/main/java/io/office/modules/manage/service/BarcodeGenerationService.java
View file @
438b6b92
...
...
@@ -13,7 +13,7 @@ import java.util.List;
*/
@Service
public
interface
BarcodeGenerationService
{
String
createPicture
(
String
[]
param
);
String
createPicture
(
Object
[]
param
);
List
<
GS1CodeListEntity
>
getGS1CodeListSSCC
();
...
...
src/main/java/io/office/modules/manage/service/impl/BarcodeGenerationServiceImpl.java
View file @
438b6b92
...
...
@@ -23,12 +23,12 @@ public class BarcodeGenerationServiceImpl implements BarcodeGenerationService {
public
static
final
String
prefix_url
=
"barcodegeneration/api/gensvg?type="
;
@Override
public
String
createPicture
(
String
[]
param
)
{
public
String
createPicture
(
Object
[]
param
)
{
String
content
=
""
;
//遍历参数数组
for
(
int
i
=
0
;
i
<
param
.
length
;
i
++)
{
//获取ai标识符
String
[]
split
=
param
[
i
].
split
(
","
);
String
[]
split
=
param
[
i
].
toString
().
split
(
","
);
String
aiCode
=
split
[
0
];
//根据ai标识符查ai详情
GS1CodeListEntity
fixedLengthResult
=
qRcodeDao
.
getFixedLengthResult
(
aiCode
);
...
...
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