Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
c272b204
Commit
c272b204
authored
Feb 12, 2019
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete DistributedIDService.java
parent
b5f407d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
32 deletions
+0
-32
DistributedIDService.java
...a/pwc/taxtech/atms/service/impl/DistributedIDService.java
+0
-32
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DistributedIDService.java
deleted
100644 → 0
View file @
b5f407d2
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.common.util.SnowFlake
;
import
javax.annotation.PostConstruct
;
@Component
public
class
DistributedIdService
extends
BaseService
{
@Value
(
"${distributed_id_datacenter}"
)
private
Integer
dataCenterId
;
@Value
(
"${distributed_id_machine}"
)
private
Integer
machineId
;
private
SnowFlake
snowFlake
;
@PostConstruct
public
void
init
()
{
snowFlake
=
new
SnowFlake
(
dataCenterId
,
machineId
);
}
/**
* 获取Id
*
* @return long
*/
public
long
nextId
()
{
return
snowFlake
.
nextId
();
}
}
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