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
91c56285
Commit
91c56285
authored
Jun 22, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复事务2
parent
8b072d15
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
10 deletions
+42
-10
UserDataMapper.java
...per/src/main/java/cn/wisenergy/mapper/UserDataMapper.java
+2
-0
UserDataMapper.xml
...nergy-mapper/src/main/resources/mapper/UserDataMapper.xml
+4
-0
BottomServiceImpl.java
...java/cn/wisenergy/service/app/impl/BottomServiceImpl.java
+2
-1
BottomController.java
.../wisenergy/web/admin/controller/app/BottomController.java
+34
-0
UserDataController.java
...isenergy/web/admin/controller/app/UserDataController.java
+0
-9
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/UserDataMapper.java
View file @
91c56285
...
...
@@ -19,5 +19,7 @@ public interface UserDataMapper extends BaseMapper<UserData> {
Long
getMaxId
();
Long
getBottomMaxId
();
List
<
UserData
>
getBottom
(
@Param
(
"startNo"
)
Integer
startNumber
,
@Param
(
"endNo"
)
Integer
endNo
);
}
wisenergy-mapper/src/main/resources/mapper/UserDataMapper.xml
View file @
91c56285
...
...
@@ -105,6 +105,10 @@
</select>
<select
id=
"getMaxId"
resultType=
"java.lang.Long"
>
select user_id from user_data order by user_id desc limit 1
</select>
<select
id=
"getBottomMaxId"
resultType=
"java.lang.Long"
>
select user_id from user_data where bottom is null order by user_id limit 1
</select>
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/BottomServiceImpl.java
View file @
91c56285
...
...
@@ -13,6 +13,7 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author 86187
*/
...
...
@@ -28,7 +29,7 @@ public class BottomServiceImpl implements BottomService {
@Override
public
R
<
Boolean
>
getBottom
(
UserQueryVo
queryVo
)
{
Long
usersId
=
userDataMapper
.
getMaxId
();
Long
usersId
=
userDataMapper
.
get
Bottom
MaxId
();
log
.
info
(
"开始计算用户id:"
+
usersId
);
if
(
null
==
usersId
)
{
usersId
=
0L
;
...
...
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/BottomController.java
0 → 100644
View file @
91c56285
package
cn
.
wisenergy
.
web
.
admin
.
controller
.
app
;
import
cn.wisenergy.common.utils.R
;
import
cn.wisenergy.model.vo.UserQueryVo
;
import
cn.wisenergy.service.app.BottomService
;
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.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @author 86187
*/
@Api
(
tags
=
"用户向下层级管理"
)
@RestController
@Slf4j
public
class
BottomController
extends
BaseController
{
@Resource
private
BottomService
bottomService
;
@ApiOperation
(
value
=
"向下最深层级层级数、伞下人员总和"
,
notes
=
"向下最深层级层级数、伞下人员总和"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"queryVo"
,
value
=
"每次统计条数"
,
dataType
=
"UserQueryVo"
)
@PostMapping
(
value
=
"/user/updateBatchUserData"
)
public
R
<
Boolean
>
updateBatchUserData
(
@RequestBody
UserQueryVo
queryVo
)
{
return
bottomService
.
getBottom
(
queryVo
);
}
}
wisenergy-web-admin/src/main/java/cn/wisenergy/web/admin/controller/app/UserDataController.java
View file @
91c56285
...
...
@@ -25,9 +25,6 @@ public class UserDataController {
@Resource
private
UserDataService
userDataService
;
@Resource
private
BottomService
bottomService
;
@ApiOperation
(
value
=
"获取token接口"
,
notes
=
"获取token接口"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"queryVo"
,
value
=
"每次统计条数"
,
dataType
=
"UserQueryVo"
)
@PostMapping
(
value
=
"/user/saveBatchUserData"
)
...
...
@@ -35,10 +32,4 @@ public class UserDataController {
return
userDataService
.
addBatch
(
queryVo
);
}
@ApiOperation
(
value
=
"向下最深层级层级数、伞下人员总和"
,
notes
=
"向下最深层级层级数、伞下人员总和"
,
httpMethod
=
"POST"
)
@ApiImplicitParam
(
name
=
"queryVo"
,
value
=
"每次统计条数"
,
dataType
=
"UserQueryVo"
)
@PostMapping
(
value
=
"/user/updateBatchUserData"
)
public
R
<
Boolean
>
updateBatchUserData
(
@RequestBody
UserQueryVo
queryVo
)
{
return
bottomService
.
getBottom
(
queryVo
);
}
}
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