Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
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
haoban3.0
haoban-manage3.0
Commits
49ea908a
Commit
49ea908a
authored
Nov 09, 2021
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor:代码优化
parent
6055960d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
TestController.java
.../com/gic/haoban/manage/web/controller/TestController.java
+10
-4
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/TestController.java
View file @
49ea908a
...
...
@@ -176,13 +176,19 @@ public class TestController extends WebBaseController {
/**
* 获取到分表到哪个表内
*
* @param
enterpriseI
d
* @param count
* @param
tableId 分表i
d
* @param count
分表数量
* @return
*/
@RequestMapping
(
"/test-table"
)
public
HaobanResponse
testTable
(
String
enterpriseId
,
int
count
)
{
int
i
=
enterpriseId
.
hashCode
()
%
count
;
public
HaobanResponse
testTable
(
String
tableId
,
Integer
count
)
{
if
(
StringUtils
.
isBlank
(
tableId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_5
);
}
if
(
count
==
null
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_5
);
}
int
i
=
tableId
.
hashCode
()
%
count
;
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
i
);
}
}
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