|
|
@ -195,18 +195,20 @@ public class LarkUserActiveRelatoinServiceImpl implements ILarkUserActiveRelatoi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ResponseVo<LarkUserActiveRelatoin> commitFile(LarkActiveUserRelationRequest request) {
|
|
|
|
public ResponseVo<String> commitFile(LarkActiveUserRelationRequest request) {
|
|
|
|
|
|
|
|
ResponseVo responseVo = new ResponseVo();
|
|
|
|
List<LarkActive> larkActives = larkActiveMapper.selectLarkActiveByName(request.getLarkActiveName(), FlagStatus.OK.getCode());
|
|
|
|
List<LarkActive> larkActives = larkActiveMapper.selectLarkActiveByName(request.getLarkActiveName(), FlagStatus.OK.getCode());
|
|
|
|
if (CollectionUtils.isEmpty(larkActives)){
|
|
|
|
if (CollectionUtils.isEmpty(larkActives)){
|
|
|
|
return new ResponseVo();
|
|
|
|
return responseVo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
LarkActive active = larkActives.get(0);
|
|
|
|
LarkActive active = larkActives.get(0);
|
|
|
|
LarkUserActiveRelatoin relatoin = queryUserActiveRelation(request.getCompanyName(),request.getUserName(), active.getId());
|
|
|
|
LarkUserActiveRelatoin relatoin = queryUserActiveRelation(request.getCompanyName(),request.getUserName(), active.getId());
|
|
|
|
if (relatoin == null) {
|
|
|
|
if (relatoin == null) {
|
|
|
|
return new ResponseVo();
|
|
|
|
return responseVo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Integer totalCount = userActiveCount(relatoin,request.getImageBase64()) + 1;
|
|
|
|
Integer totalCount = userActiveCount(relatoin,request.getImageBase64()) + 1;
|
|
|
|
LarkActive larkActive = larkActiveMapper.selectLarkActiveById(relatoin.getActiveId());
|
|
|
|
LarkActive larkActive = larkActiveMapper.selectLarkActiveById(relatoin.getActiveId());
|
|
|
|
|
|
|
|
String url = null;
|
|
|
|
if (StringUtils.isNotBlank(request.getImageBase64())) {
|
|
|
|
if (StringUtils.isNotBlank(request.getImageBase64())) {
|
|
|
|
File file = base642File(request.getImageBase64());
|
|
|
|
File file = base642File(request.getImageBase64());
|
|
|
|
String name = file.getName();
|
|
|
|
String name = file.getName();
|
|
|
@ -216,6 +218,8 @@ public class LarkUserActiveRelatoinServiceImpl implements ILarkUserActiveRelatoi
|
|
|
|
key = String.join(".", split);
|
|
|
|
key = String.join(".", split);
|
|
|
|
cosHelper.upload(BUCKET_NAME, key, file);
|
|
|
|
cosHelper.upload(BUCKET_NAME, key, file);
|
|
|
|
buildUserActiveImage(relatoin, key,null);
|
|
|
|
buildUserActiveImage(relatoin, key,null);
|
|
|
|
|
|
|
|
url = cosHelper.previewUrl(BUCKET_NAME, key);
|
|
|
|
|
|
|
|
responseVo.setData(url);
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
buildUserActiveImage(relatoin,null, request.getRemark());
|
|
|
|
buildUserActiveImage(relatoin,null, request.getRemark());
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -224,7 +228,7 @@ public class LarkUserActiveRelatoinServiceImpl implements ILarkUserActiveRelatoi
|
|
|
|
larkUserActiveRelatoinMapper.updateLarkUserActiveRelatoin(relatoin);
|
|
|
|
larkUserActiveRelatoinMapper.updateLarkUserActiveRelatoin(relatoin);
|
|
|
|
larkUserActiveInviteRelatoinService.inviteSuccess(Arrays.asList(request.getUserName()));
|
|
|
|
larkUserActiveInviteRelatoinService.inviteSuccess(Arrays.asList(request.getUserName()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return new ResponseVo();
|
|
|
|
return responseVo;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|