Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
browser-backend
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
Administrator
browser-backend
Commits
4c63aaf6
Commit
4c63aaf6
authored
Aug 27, 2020
by
xuxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 绑定店铺且已过期的 ip 显示 grouptype为5的 ip列表中
parent
e7627f40
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
IpResourceRepositoryCustomImpl.java
...nd/browser/repository/IpResourceRepositoryCustomImpl.java
+6
-4
IpResourceServiceImpl.java
...erbackend/browser/service/Impl/IpResourceServiceImpl.java
+5
-2
No files found.
src/main/java/com/edgec/browserbackend/browser/repository/IpResourceRepositoryCustomImpl.java
View file @
4c63aaf6
...
@@ -134,15 +134,17 @@ public class IpResourceRepositoryCustomImpl implements IpResourceRepositoryCusto
...
@@ -134,15 +134,17 @@ public class IpResourceRepositoryCustomImpl implements IpResourceRepositoryCusto
public
boolean
updateStatus
(
String
id
,
int
status
,
Object
...
args
)
{
public
boolean
updateStatus
(
String
id
,
int
status
,
Object
...
args
)
{
Document
doc
=
new
Document
();
Document
doc
=
new
Document
();
BasicQuery
basicQuery
=
new
BasicQuery
(
doc
);
BasicQuery
basicQuery
=
new
BasicQuery
(
doc
);
basicQuery
.
addCriteria
(
where
(
"id"
).
is
(
id
).
and
(
"isDeleted"
).
is
(
false
));
Update
update
=
new
Update
();
if
(
args
.
length
==
0
)
{
if
(
args
.
length
==
0
)
{
basicQuery
.
addCriteria
(
where
(
"id"
).
is
(
id
).
and
(
"isDeleted"
).
is
(
false
)
);
update
.
set
(
"status"
,
status
);
}
}
if
(
args
.
length
==
1
)
{
if
(
args
.
length
==
1
)
{
basicQuery
.
addCriteria
(
where
(
"id"
).
is
(
id
).
and
(
"isDeleted"
).
is
(
true
)
);
update
.
set
(
"status"
,
status
).
set
(
"isDeleted"
,
true
);
}
}
Update
update
=
new
Update
();
update
.
set
(
"status"
,
status
);
UpdateResult
result
=
mongoTemplate
.
updateFirst
(
basicQuery
,
update
,
IpResource
.
class
);
UpdateResult
result
=
mongoTemplate
.
updateFirst
(
basicQuery
,
update
,
IpResource
.
class
);
if
(
result
.
getModifiedCount
()
<
1
)
if
(
result
.
getModifiedCount
()
<
1
)
...
...
src/main/java/com/edgec/browserbackend/browser/service/Impl/IpResourceServiceImpl.java
View file @
4c63aaf6
...
@@ -975,8 +975,11 @@ public class IpResourceServiceImpl implements IpResourceService {
...
@@ -975,8 +975,11 @@ public class IpResourceServiceImpl implements IpResourceService {
}
}
break
;
break
;
case
5
:
case
5
:
// 已分配
// 已分配且未过期
ipResources
=
ipResourceRepository
.
findShopIdInList
(
shopIds
,
false
);
ipResources
=
ipResourceRepository
.
findShopIdInList
(
shopIds
,
false
)
.
stream
()
.
filter
(
x
->
x
.
getValidTime
()
>
Instant
.
now
().
toEpochMilli
())
.
collect
(
Collectors
.
toList
());
if
(!
isParent
)
if
(!
isParent
)
notUsed
=
ipResourceRepository
.
findByOwnerAndStatusInAndIsDeletedAndBind
(
username
,
Arrays
.
asList
(
0
,
2
,
4
,
8
),
false
,
false
);
notUsed
=
ipResourceRepository
.
findByOwnerAndStatusInAndIsDeletedAndBind
(
username
,
Arrays
.
asList
(
0
,
2
,
4
,
8
),
false
,
false
);
else
else
...
...
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