Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
D
data-server
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
licc
data-server
Commits
beaf7e85
Commit
beaf7e85
authored
Jun 23, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化查询遗漏用户数据接口
parent
1b6007f5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
UserDataMapper.java
...per/src/main/java/cn/wisenergy/mapper/UserDataMapper.java
+2
-0
UserDataMapper.xml
...nergy-mapper/src/main/resources/mapper/UserDataMapper.xml
+9
-0
UserDataServiceImpl.java
...va/cn/wisenergy/service/app/impl/UserDataServiceImpl.java
+2
-2
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/UserDataMapper.java
View file @
beaf7e85
...
...
@@ -21,5 +21,7 @@ public interface UserDataMapper extends BaseMapper<UserData> {
Long
getBottomMaxId
();
Long
getUserId
(
@Param
(
"userId"
)
Long
userId
);
List
<
UserData
>
getBottom
(
@Param
(
"startNo"
)
Integer
startNumber
,
@Param
(
"endNo"
)
Integer
endNo
);
}
wisenergy-mapper/src/main/resources/mapper/UserDataMapper.xml
View file @
beaf7e85
...
...
@@ -119,4 +119,13 @@
where user_id > #{startNo} and #{endNo} >=user_id
</select>
<select
id=
"getUserId"
resultType=
"java.lang.Long"
>
select user_id
from
<include
refid=
"table"
/>
<where>
user_id=#{userId}
</where>
</select>
</mapper>
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserDataServiceImpl.java
View file @
beaf7e85
...
...
@@ -119,8 +119,8 @@ public class UserDataServiceImpl implements UserDataService {
List
<
Long
>
list
=
new
ArrayList
<>();
for
(
Long
userId
:
userIds
)
{
//判断是否存在统计数据
UserData
data
=
userDataMapper
.
getBy
UserId
(
userId
);
if
(
null
==
data
)
{
Long
id
=
userDataMapper
.
get
UserId
(
userId
);
if
(
null
==
id
)
{
list
.
add
(
userId
);
}
}
...
...
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