|
@@ -16,6 +16,7 @@ import com.iden.common.exception.BDException;
|
|
import com.iden.common.service.IdenCrowdService;
|
|
import com.iden.common.service.IdenCrowdService;
|
|
import com.iden.common.service.IdenPersonCrowdRefService;
|
|
import com.iden.common.service.IdenPersonCrowdRefService;
|
|
import com.iden.common.service.IdenPersonService;
|
|
import com.iden.common.service.IdenPersonService;
|
|
|
|
+import com.iden.common.util.DateUtils;
|
|
import com.iden.common.util.ImgUtil;
|
|
import com.iden.common.util.ImgUtil;
|
|
import com.iden.common.util.MyBeanUtils;
|
|
import com.iden.common.util.MyBeanUtils;
|
|
import com.iden.common.vo.PersonVO;
|
|
import com.iden.common.vo.PersonVO;
|
|
@@ -175,7 +176,7 @@ public class PersonService {
|
|
if (!ImgUtil.isImg(fileName)) {
|
|
if (!ImgUtil.isImg(fileName)) {
|
|
throw new BDException("图像文件必须是图片格式!");
|
|
throw new BDException("图像文件必须是图片格式!");
|
|
}
|
|
}
|
|
- String saveFileName = UUID.randomUUID().toString() + "_" + fileName;
|
|
|
|
|
|
+ String saveFileName = DateUtils.getCurrYyyyMMddHHmmssDate() + "_" + UUID.randomUUID().toString() + fileName.substring(fileName.lastIndexOf("."), fileName.length());
|
|
String picFullFileName = idenRoot + "data/final/image/person/" + saveFileName;
|
|
String picFullFileName = idenRoot + "data/final/image/person/" + saveFileName;
|
|
FileOutputStream fos = new FileOutputStream(picFullFileName);
|
|
FileOutputStream fos = new FileOutputStream(picFullFileName);
|
|
fos.write(file.getBytes());
|
|
fos.write(file.getBytes());
|