Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
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
7d14b627
Commit
7d14b627
authored
Jun 22, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复sql
parent
91c56285
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
6 additions
and
69 deletions
+6
-69
UserDataMapper.xml
...nergy-mapper/src/main/resources/mapper/UserDataMapper.xml
+1
-1
UsersMapper.xml
wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
+1
-1
UserDataManger.java
...ain/java/cn/wisenergy/service/Manager/UserDataManger.java
+0
-14
BottomServiceImpl.java
...java/cn/wisenergy/service/app/impl/BottomServiceImpl.java
+1
-1
UserDataServiceImpl.java
...va/cn/wisenergy/service/app/impl/UserDataServiceImpl.java
+1
-1
TestUserController2.java
...senergy/web/admin/controller/app/TestUserController2.java
+0
-49
UserDataController.java
...isenergy/web/admin/controller/app/UserDataController.java
+1
-1
application.yml
wisenergy-web-admin/src/main/resources/application.yml
+1
-1
No files found.
wisenergy-mapper/src/main/resources/mapper/UserDataMapper.xml
View file @
7d14b627
...
...
@@ -116,7 +116,7 @@
select *
from
<include
refid=
"table"
/>
limit #{startNo},#{endNo}
where user_id > #{startNo} and #{endNo} >=user_id
</select>
</mapper>
wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
View file @
7d14b627
...
...
@@ -242,7 +242,7 @@ GROUP BY user_id
select id as userId,rank,phone
from
<include
refid=
"table"
/>
limit #{startNo},#{endNo}
where id> #{startNo} and #{endNo} >=id
</select>
<select
id=
"getUserData"
resultType=
"cn.wisenergy.model.vo.UserVo"
>
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/Manager/UserDataManger.java
View file @
7d14b627
...
...
@@ -29,18 +29,4 @@ public class UserDataManger {
}
return
true
;
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
boolean
updateBatchUserData
(
List
<
UserData
>
list
)
{
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
for
(
UserData
userData
:
list
)
{
int
count
=
userDataMapper
.
edit
(
userData
);
if
(
count
==
0
)
{
return
false
;
}
}
}
return
true
;
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/BottomServiceImpl.java
View file @
7d14b627
...
...
@@ -35,7 +35,7 @@ public class BottomServiceImpl implements BottomService {
usersId
=
0L
;
}
Integer
startNo
=
Math
.
toIntExact
(
usersId
)
-
1
;
Integer
endNo
=
queryVo
.
getNumber
();
Integer
endNo
=
startNo
+
queryVo
.
getNumber
();
//获取所有用户数据
List
<
UserData
>
list
=
userDataMapper
.
getBottom
(
startNo
,
endNo
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserDataServiceImpl.java
View file @
7d14b627
...
...
@@ -58,7 +58,7 @@ public class UserDataServiceImpl implements UserDataService {
usersId
=
0L
;
}
Integer
startNo
=
Math
.
toIntExact
(
usersId
);
Integer
endNo
=
queryVo
.
getNumber
();
Integer
endNo
=
startNo
+
queryVo
.
getNumber
();
//获取所有用户数据
List
<
UserDto
>
userDtos
=
usersMapper
.
getAllUserData
(
startNo
,
endNo
);
if
(
CollectionUtils
.
isEmpty
(
userDtos
))
{
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/TestUserController2.java
deleted
100644 → 0
View file @
91c56285
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.dto.UserSimpleInfoDto
;
import
cn.wisenergy.model.dto.UsersInfoDto
;
import
cn.wisenergy.service.app.TestUserService
;
import
cn.wisenergy.web.common.BaseController
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* @author ASUS
*/
@Api
(
tags
=
"用户管理(Test)"
)
@RestController
@Slf4j
public
class
TestUserController2
extends
BaseController
{
@Autowired
private
TestUserService
testUserService
;
@ApiOperation
(
value
=
"获取下一级用户的信息"
,
notes
=
"获取下一级用户的信息"
,
httpMethod
=
"GET"
)
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户id"
,
dataType
=
"int"
)
@GetMapping
(
"/users/getDownUsersInfoById"
)
public
R
<
List
<
UserSimpleInfoDto
>>
getDownUserInfoById
(
Long
userId
)
{
log
.
info
(
"TestUserController2[]getDownUsersInfoById[]input.param.userId:"
+
userId
);
List
<
UserSimpleInfoDto
>
users
=
testUserService
.
getDownUserInfoById
(
userId
);
return
R
.
ok
(
users
);
}
@ApiOperation
(
value
=
"获取用户详细信息"
,
notes
=
"获取用户详细信息"
,
httpMethod
=
"GET"
)
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"用户id"
,
dataType
=
"int"
)
@GetMapping
(
"/users/getUserInfoById"
)
public
R
<
UsersInfoDto
>
getUserInfoById
(
Long
userId
)
{
log
.
info
(
"TestUserController2[]getUserInfoById[]input.param.userId:"
+
userId
);
UsersInfoDto
user
=
testUserService
.
getUserInfoById
(
userId
);
return
R
.
ok
(
user
);
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserDataController.java
View file @
7d14b627
...
...
@@ -25,7 +25,7 @@ public class UserDataController {
@Resource
private
UserDataService
userDataService
;
@ApiOperation
(
value
=
"
获取token接口"
,
notes
=
"获取token接口
"
,
httpMethod
=
"POST"
)
@ApiOperation
(
value
=
"
批量保存统计用户数据"
,
notes
=
"批量保存统计用户数据
"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"queryVo"
,
value
=
"每次统计条数"
,
dataType
=
"UserQueryVo"
)
@PostMapping
(
value
=
"/user/saveBatchUserData"
)
public
R
<
Boolean
>
saveBatchUserData
(
@RequestBody
UserQueryVo
queryVo
)
{
...
...
wisenergy-web-admin/src/main/resources/application.yml
View file @
7d14b627
...
...
@@ -17,7 +17,7 @@ spring:
allow-bean-definition-overriding
:
true
# 环境 dev|test|prod
profiles
:
active
:
prod
active
:
dev
# jackson时间格式化
jackson
:
time-zone
:
GMT+8
...
...
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