Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eMall_api
Project
Project
Details
Activity
Releases
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
杨硕
eMall_api
Commits
9994c57c
Commit
9994c57c
authored
Jul 19, 2023
by
高宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员码接口
parent
2da87b58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
Qrcode.java
emall-core/src/main/java/com/emall/flash/utils/Qrcode.java
+9
-13
No files found.
emall-core/src/main/java/com/emall/flash/utils/Qrcode.java
View file @
9994c57c
...
@@ -54,7 +54,6 @@ public class Qrcode {
...
@@ -54,7 +54,6 @@ public class Qrcode {
public
int
calStructureappendParity
(
byte
[]
originaldata
)
{
public
int
calStructureappendParity
(
byte
[]
originaldata
)
{
int
i
=
0
;
int
i
=
0
;
int
structureappendParity
=
false
;
int
originaldataLength
=
originaldata
.
length
;
int
originaldataLength
=
originaldata
.
length
;
int
structureappendParity
;
int
structureappendParity
;
if
(
originaldataLength
>
1
)
{
if
(
originaldataLength
>
1
)
{
...
@@ -93,7 +92,6 @@ public class Qrcode {
...
@@ -93,7 +92,6 @@ public class Qrcode {
int
[]
codewordNumPlus
;
int
[]
codewordNumPlus
;
int
codewordNumCounterValue
;
int
codewordNumCounterValue
;
int
totalDataBits
;
int
totalDataBits
;
int
dataCounter
;
switch
(
this
.
qrcodeEncodeMode
)
{
switch
(
this
.
qrcodeEncodeMode
)
{
case
'A'
:
case
'A'
:
codewordNumPlus
=
new
int
[]{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
};
codewordNumPlus
=
new
int
[]{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
2
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
};
...
@@ -347,21 +345,21 @@ public class Qrcode {
...
@@ -347,21 +345,21 @@ public class Qrcode {
byte
formatInformationValue
=
(
byte
)(
ec
<<
3
|
maskNumber
);
byte
formatInformationValue
=
(
byte
)(
ec
<<
3
|
maskNumber
);
String
[]
formatInformationArray
=
new
String
[]{
"101010000010010"
,
"101000100100101"
,
"101111001111100"
,
"101101101001011"
,
"100010111111001"
,
"100000011001110"
,
"100111110010111"
,
"100101010100000"
,
"111011111000100"
,
"111001011110011"
,
"111110110101010"
,
"111100010011101"
,
"110011000101111"
,
"110001100011000"
,
"110110001000001"
,
"110100101110110"
,
"001011010001001"
,
"001001110111110"
,
"001110011100111"
,
"001100111010000"
,
"000011101100010"
,
"000001001010101"
,
"000110100001100"
,
"000100000111011"
,
"011010101011111"
,
"011000001101000"
,
"011111100110001"
,
"011101000000110"
,
"010010010110100"
,
"010000110000011"
,
"010111011011010"
,
"010101111101101"
};
String
[]
formatInformationArray
=
new
String
[]{
"101010000010010"
,
"101000100100101"
,
"101111001111100"
,
"101101101001011"
,
"100010111111001"
,
"100000011001110"
,
"100111110010111"
,
"100101010100000"
,
"111011111000100"
,
"111001011110011"
,
"111110110101010"
,
"111100010011101"
,
"110011000101111"
,
"110001100011000"
,
"110110001000001"
,
"110100101110110"
,
"001011010001001"
,
"001001110111110"
,
"001110011100111"
,
"001100111010000"
,
"000011101100010"
,
"000001001010101"
,
"000110100001100"
,
"000100000111011"
,
"011010101011111"
,
"011000001101000"
,
"011111100110001"
,
"011101000000110"
,
"010010010110100"
,
"010000110000011"
,
"010111011011010"
,
"010101111101101"
};
for
(
int
i
=
0
;
i
<
15
;
++
i
)
{
for
(
int
a
=
0
;
a
<
15
;
++
a
)
{
byte
content
=
Byte
.
parseByte
(
formatInformationArray
[
formatInformationValue
].
substring
(
i
,
i
+
1
));
byte
content
=
Byte
.
parseByte
(
formatInformationArray
[
formatInformationValue
].
substring
(
a
,
a
+
1
));
matrixContent
[
formatInformationX1
[
i
]
&
255
][
formatInformationY1
[
i
]
&
255
]
=
(
byte
)(
content
*
255
);
matrixContent
[
formatInformationX1
[
i
]
&
255
][
formatInformationY1
[
a
]
&
255
]
=
(
byte
)(
content
*
255
);
matrixContent
[
formatInformationX2
[
i
]
&
255
][
formatInformationY2
[
i
]
&
255
]
=
(
byte
)(
content
*
255
);
matrixContent
[
formatInformationX2
[
i
]
&
255
][
formatInformationY2
[
a
]
&
255
]
=
(
byte
)(
content
*
255
);
}
}
boolean
[][]
out
=
new
boolean
[
modules1Side
][
modules1Side
];
boolean
[][]
out
=
new
boolean
[
modules1Side
][
modules1Side
];
int
c
=
0
;
int
c
=
0
;
for
(
int
i
=
0
;
i
<
modules1Side
;
++
i
)
{
for
(
int
b
=
0
;
b
<
modules1Side
;
++
b
)
{
for
(
int
j
=
0
;
j
<
modules1Side
;
++
j
)
{
for
(
int
j
=
0
;
j
<
modules1Side
;
++
j
)
{
if
((
matrixContent
[
j
][
i
]
&
maskContent
)
==
0
&&
frameData
[
c
]
!=
49
)
{
if
((
matrixContent
[
j
][
b
]
&
maskContent
)
==
0
&&
frameData
[
c
]
!=
49
)
{
out
[
j
][
i
]
=
false
;
out
[
j
][
b
]
=
false
;
}
else
{
}
else
{
out
[
j
][
i
]
=
true
;
out
[
j
][
b
]
=
true
;
}
}
++
c
;
++
c
;
...
@@ -460,8 +458,6 @@ public class Qrcode {
...
@@ -460,8 +458,6 @@ public class Qrcode {
}
catch
(
Exception
var17
)
{
}
catch
(
Exception
var17
)
{
var17
.
printStackTrace
();
var17
.
printStackTrace
();
}
}
int
i
=
false
;
int
j
=
0
;
int
j
=
0
;
int
rsBlockNumber
=
0
;
int
rsBlockNumber
=
0
;
byte
[][]
rsTemp
=
new
byte
[
rsBlockOrder
.
length
][];
byte
[][]
rsTemp
=
new
byte
[
rsBlockOrder
.
length
][];
...
@@ -632,4 +628,4 @@ public class Qrcode {
...
@@ -632,4 +628,4 @@ public class Qrcode {
return
res
;
return
res
;
}
}
}
}
\ 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