|
|
@@ -1741,6 +1741,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
public void userDateDownload(UserDownloadBo bo) {
|
|
|
SysTask task = iSysTaskService.getOne(new LambdaQueryWrapper<SysTask>()
|
|
|
.eq(SysTask::getSysUserId, bo.getCreateSysUserId())
|
|
|
@@ -1783,47 +1784,52 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
break;
|
|
|
case 2://证件照
|
|
|
//获取个人近照
|
|
|
- try {
|
|
|
- InputStream inputStream = ossService.getStreamByObject(user.getOneInchPhotos());
|
|
|
- //写入本地文件
|
|
|
- String inchPath = userPath + "/证件照.jpg";
|
|
|
- FileOutputStream fileOutputStream = new FileOutputStream(inchPath);
|
|
|
- byte[] buffer = new byte[1024];
|
|
|
- int len = 0;
|
|
|
- while ((len = inputStream.read(buffer)) != -1) {
|
|
|
- fileOutputStream.write(buffer, 0, len);
|
|
|
+ if (ObjectUtils.isNotNull(user.getOneInchPhotos())){
|
|
|
+ try {
|
|
|
+ InputStream inputStream = ossService.getStreamByObject(user.getOneInchPhotos());
|
|
|
+ //写入本地文件
|
|
|
+ String inchPath = userPath + "/证件照.jpg";
|
|
|
+ FileOutputStream fileOutputStream = new FileOutputStream(inchPath);
|
|
|
+ byte[] buffer = new byte[1024];
|
|
|
+ int len = 0;
|
|
|
+ while ((len = inputStream.read(buffer)) != -1) {
|
|
|
+ fileOutputStream.write(buffer, 0, len);
|
|
|
+ }
|
|
|
+ inputStream.close();
|
|
|
+ fileOutputStream.close();
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
|
- inputStream.close();
|
|
|
- fileOutputStream.close();
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
}
|
|
|
break;
|
|
|
case 3://身份证照片
|
|
|
//获取身份证照片
|
|
|
try {
|
|
|
- InputStream inputStream = ossService.getStreamByObject(user.getIdCardImg1());
|
|
|
- //写入本地文件
|
|
|
- String inchPath = userPath + "/身份证正面.jpg";
|
|
|
- FileOutputStream fileOutputStream = new FileOutputStream(inchPath);
|
|
|
- byte[] buffer = new byte[1024];
|
|
|
- int len = 0;
|
|
|
- while ((len = inputStream.read(buffer)) != -1) {
|
|
|
- fileOutputStream.write(buffer, 0, len);
|
|
|
+ if (ObjectUtils.isNotNull(user.getIdCardImg1())){
|
|
|
+ InputStream inputStream = ossService.getStreamByObject(user.getIdCardImg1());
|
|
|
+ //写入本地文件
|
|
|
+ String inchPath = userPath + "/身份证正面.jpg";
|
|
|
+ FileOutputStream fileOutputStream = new FileOutputStream(inchPath);
|
|
|
+ byte[] buffer = new byte[1024];
|
|
|
+ int len = 0;
|
|
|
+ while ((len = inputStream.read(buffer)) != -1) {
|
|
|
+ fileOutputStream.write(buffer, 0, len);
|
|
|
+ }
|
|
|
+ inputStream.close();
|
|
|
+ fileOutputStream.close();
|
|
|
}
|
|
|
- inputStream.close();
|
|
|
- fileOutputStream.close();
|
|
|
-
|
|
|
- InputStream inputStream2 = ossService.getStreamByObject(user.getIdCardImg2());
|
|
|
- String inchPath2 = userPath + "/身份证反面.jpg";
|
|
|
- FileOutputStream fileOutputStream2 = new FileOutputStream(inchPath2);
|
|
|
- byte[] buffer2 = new byte[1024];
|
|
|
- int len2 = 0;
|
|
|
- while ((len2 = inputStream2.read(buffer2)) != -1) {
|
|
|
- fileOutputStream2.write(buffer2, 0, len2);
|
|
|
+ if (ObjectUtils.isNotNull(user.getIdCardImg2())){
|
|
|
+ InputStream inputStream2 = ossService.getStreamByObject(user.getIdCardImg2());
|
|
|
+ String inchPath2 = userPath + "/身份证反面.jpg";
|
|
|
+ FileOutputStream fileOutputStream2 = new FileOutputStream(inchPath2);
|
|
|
+ byte[] buffer2 = new byte[1024];
|
|
|
+ int len2 = 0;
|
|
|
+ while ((len2 = inputStream2.read(buffer2)) != -1) {
|
|
|
+ fileOutputStream2.write(buffer2, 0, len2);
|
|
|
+ }
|
|
|
+ inputStream2.close();
|
|
|
+ fileOutputStream2.close();
|
|
|
}
|
|
|
- inputStream2.close();
|
|
|
- fileOutputStream2.close();
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
@@ -1911,6 +1917,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
item.setRealname(user.getRealname());
|
|
|
item.setIdCard(EncryptHandler.decrypt(user.getIdCard()));
|
|
|
item.setSubscribeStatusStr(item.getSubscribeStatus() == 1 ? "已预约":"已取消");
|
|
|
+ item.setCreateTimeStr(DateUtils.timestampToDateFormat(item.getCreateTime(),"yyyy-MM-dd HH:mm:ss"));
|
|
|
if (item.getSubscribeStatus() == 1){
|
|
|
if (ObjectUtils.isNull(item.getApplyTime())){
|
|
|
item.setSubscribeStatus(3);
|