Commit 9d2df493 authored by wangyihao's avatar wangyihao

添加 默认值

parent 9b5ef34f
......@@ -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);
}
}
}
......
......@@ -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);
}
}
}
......
......@@ -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);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment