Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
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
liqin
chnmuseum-party
Commits
0b2b2d63
Commit
0b2b2d63
authored
Apr 22, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
f5c2d27d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
ChinaMobileRestApiController.java
...um/party/web/controller/ChinaMobileRestApiController.java
+16
-16
No files found.
src/main/java/cn/chnmuseum/party/web/controller/ChinaMobileRestApiController.java
View file @
0b2b2d63
...
@@ -121,22 +121,22 @@ public class ChinaMobileRestApiController extends BaseController {
...
@@ -121,22 +121,22 @@ public class ChinaMobileRestApiController extends BaseController {
final
String
organId
=
tBoxOperation
.
getOrganId
();
final
String
organId
=
tBoxOperation
.
getOrganId
();
final
TUser
tUser
=
getcurUser
();
final
TUser
tUser
=
getcurUser
();
if
(
tUser
!=
null
&&
organId
.
equals
(
tUser
.
getOrgId
()))
{
if
(
tUser
!=
null
&&
organId
.
equals
(
tUser
.
getOrgId
()))
{
final
String
countStr
=
this
.
stringRedisTemplate
.
opsForValue
().
get
(
macAddress
+
"_count"
);
//
final String countStr = this.stringRedisTemplate.opsForValue().get(macAddress + "_count");
if
(
StringUtils
.
isNotBlank
(
countStr
))
{
//
if (StringUtils.isNotBlank(countStr)) {
final
long
count
=
Long
.
parseLong
(
countStr
);
//
final long count = Long.parseLong(countStr);
if
(
count
>
1
)
{
//
if (count > 1) {
JSONObject
jsonObject
=
new
JSONObject
();
//
JSONObject jsonObject = new JSONObject();
jsonObject
.
put
(
"key"
,
""
);
//
jsonObject.put("key", "");
return
getFailResult
(
"400"
,
"已经获取过一次,无法再次获取"
,
jsonObject
);
//
return getFailResult("400", "已经获取过一次,无法再次获取", jsonObject);
}
//
}
}
else
if
(
tBoxOperation
.
getRequestCount
()
>
1
)
{
//
} else if (tBoxOperation.getRequestCount() > 1) {
JSONObject
jsonObject
=
new
JSONObject
();
//
JSONObject jsonObject = new JSONObject();
jsonObject
.
put
(
"key"
,
""
);
//
jsonObject.put("key", "");
return
getFailResult
(
"400"
,
"已经获取过一次,无法再次获取"
,
jsonObject
);
//
return getFailResult("400", "已经获取过一次,无法再次获取", jsonObject);
}
//
}
this
.
stringRedisTemplate
.
opsForValue
().
increment
(
macAddress
+
"_count"
);
//
this.stringRedisTemplate.opsForValue().increment(macAddress + "_count");
tBoxOperation
.
setRequestCount
(
tBoxOperation
.
getRequestCount
()
+
1
);
//
tBoxOperation.setRequestCount(tBoxOperation.getRequestCount() + 1);
this
.
boxOperationService
.
updateById
(
tBoxOperation
);
//
this.boxOperationService.updateById(tBoxOperation);
JSONObject
jsonObject
=
new
JSONObject
();
JSONObject
jsonObject
=
new
JSONObject
();
jsonObject
.
put
(
"key"
,
tBoxOperation
.
getPrivateKey
());
jsonObject
.
put
(
"key"
,
tBoxOperation
.
getPrivateKey
());
...
...
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