Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
store-system
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
luoyangfei
store-system
Commits
9d2df493
Commit
9d2df493
authored
Nov 08, 2018
by
wangyihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加 默认值
parent
9b5ef34f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
3 deletions
+39
-3
AdministratorsServiceImpl.java
.../com/fqy/core/service/impl/AdministratorsServiceImpl.java
+8
-1
StoreServiceImpl.java
...n/java/cn/com/fqy/core/service/impl/StoreServiceImpl.java
+17
-1
WorkerServiceImpl.java
.../java/cn/com/fqy/core/service/impl/WorkerServiceImpl.java
+14
-1
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/core/service/impl/AdministratorsServiceImpl.java
View file @
9d2df493
...
...
@@ -3,6 +3,7 @@ package cn.com.fqy.core.service.impl;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Random
;
import
javax.annotation.Resource
;
...
...
@@ -262,7 +263,7 @@ public class AdministratorsServiceImpl implements AdministratorsService {
* @return
*/
public
String
generatePK
()
{
return
null
;
return
String
.
valueOf
(
new
Date
().
getTime
()
*
1000000
+
new
Random
().
nextInt
(
1000000
))
;
}
/**
...
...
@@ -271,6 +272,12 @@ public class AdministratorsServiceImpl implements AdministratorsService {
*/
public
void
fillDefaultValues
(
Administrators
obj
)
{
if
(
obj
!=
null
)
{
if
(
obj
.
getIsAuditing
()
==
null
)
{
obj
.
setIsAuditing
(
0
);
}
if
(
obj
.
getIsDeleted
()
==
null
)
{
obj
.
setIsDeleted
(
0
);
}
}
}
...
...
2code/server/store-system/src/main/java/cn/com/fqy/core/service/impl/StoreServiceImpl.java
View file @
9d2df493
...
...
@@ -3,6 +3,7 @@ package cn.com.fqy.core.service.impl;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Random
;
import
javax.annotation.Resource
;
...
...
@@ -262,7 +263,7 @@ public class StoreServiceImpl implements StoreService {
* @return
*/
public
String
generatePK
()
{
return
null
;
return
String
.
valueOf
(
new
Date
().
getTime
()
*
1000000
+
new
Random
().
nextInt
(
1000000
))
;
}
/**
...
...
@@ -271,6 +272,21 @@ public class StoreServiceImpl implements StoreService {
*/
public
void
fillDefaultValues
(
Store
obj
)
{
if
(
obj
!=
null
)
{
if
(
obj
.
getIsAuditing
()
==
null
)
{
obj
.
setIsAuditing
(
0
);
}
if
(
obj
.
getIsDeleted
()
==
null
)
{
obj
.
setIsDeleted
(
0
);
}
if
(
obj
.
getIsShopping
()
==
null
)
{
obj
.
setIsShopping
(
0
);
}
if
(
obj
.
getIsAvailable
()
==
null
)
{
obj
.
setIsAvailable
(
0
);
}
if
(
obj
.
getIsRecommend
()
==
null
)
{
obj
.
setIsRecommend
(
0
);
}
}
}
...
...
2code/server/store-system/src/main/java/cn/com/fqy/core/service/impl/WorkerServiceImpl.java
View file @
9d2df493
...
...
@@ -3,6 +3,7 @@ package cn.com.fqy.core.service.impl;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Random
;
import
javax.annotation.Resource
;
...
...
@@ -262,7 +263,7 @@ public class WorkerServiceImpl implements WorkerService {
* @return
*/
public
String
generatePK
()
{
return
null
;
return
String
.
valueOf
(
new
Date
().
getTime
()
*
1000000
+
new
Random
().
nextInt
(
1000000
))
;
}
/**
...
...
@@ -271,6 +272,18 @@ public class WorkerServiceImpl implements WorkerService {
*/
public
void
fillDefaultValues
(
Worker
obj
)
{
if
(
obj
!=
null
)
{
if
(
obj
.
getIsAuditing
()
==
null
)
{
obj
.
setIsAuditing
(
0
);
}
if
(
obj
.
getIsDeleted
()
==
null
)
{
obj
.
setIsDeleted
(
0
);
}
if
(
obj
.
getIsShopping
()
==
null
)
{
obj
.
setIsShopping
(
0
);
}
if
(
obj
.
getIsRecommend
()
==
null
)
{
obj
.
setIsRecommend
(
0
);
}
}
}
...
...
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