|
|
@ -152,13 +152,6 @@ public class LarkUserActiveRelatoinServiceImpl implements ILarkUserActiveRelatoi
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public ResponseVo<LarkUserActiveRelatoin> commitFile(LarkActiveUserRelationRequest request) {
|
|
|
|
public ResponseVo<LarkUserActiveRelatoin> commitFile(LarkActiveUserRelationRequest request) {
|
|
|
|
MultipartFile multipartFile = request.getFile();
|
|
|
|
|
|
|
|
File file = FileUtils.multipartFile2File(multipartFile);
|
|
|
|
|
|
|
|
String name = file.getName();
|
|
|
|
|
|
|
|
String[] split = name.split("\\.");
|
|
|
|
|
|
|
|
String key = String.format("%s_%s", split[0], System.currentTimeMillis());
|
|
|
|
|
|
|
|
split[0] = key;
|
|
|
|
|
|
|
|
key = String.join(".", split);
|
|
|
|
|
|
|
|
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 new ResponseVo();
|
|
|
@ -170,8 +163,17 @@ public class LarkUserActiveRelatoinServiceImpl implements ILarkUserActiveRelatoi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Integer totalCount = userActiveCount(relatoin) + 1;
|
|
|
|
Integer totalCount = userActiveCount(relatoin) + 1;
|
|
|
|
LarkActive larkActive = larkActiveMapper.selectLarkActiveById(relatoin.getActiveId());
|
|
|
|
LarkActive larkActive = larkActiveMapper.selectLarkActiveById(relatoin.getActiveId());
|
|
|
|
|
|
|
|
MultipartFile multipartFile = request.getFile();
|
|
|
|
|
|
|
|
if (multipartFile != null) {
|
|
|
|
|
|
|
|
File file = FileUtils.multipartFile2File(multipartFile);
|
|
|
|
|
|
|
|
String name = file.getName();
|
|
|
|
|
|
|
|
String[] split = name.split("\\.");
|
|
|
|
|
|
|
|
String key = String.format("%s_%s", split[0], System.currentTimeMillis());
|
|
|
|
|
|
|
|
split[0] = key;
|
|
|
|
|
|
|
|
key = String.join(".", split);
|
|
|
|
cosHelper.upload(BUCKET_NAME, key, file);
|
|
|
|
cosHelper.upload(BUCKET_NAME, key, file);
|
|
|
|
buildUserActiveImage(relatoin, key);
|
|
|
|
buildUserActiveImage(relatoin, key);
|
|
|
|
|
|
|
|
}
|
|
|
|
if (totalCount >= larkActive.getActiveImageCount()) {
|
|
|
|
if (totalCount >= larkActive.getActiveImageCount()) {
|
|
|
|
relatoin.setActiveStage(LarkActiveStageEnum.ADJUST.getCode());
|
|
|
|
relatoin.setActiveStage(LarkActiveStageEnum.ADJUST.getCode());
|
|
|
|
larkUserActiveRelatoinMapper.updateLarkUserActiveRelatoin(relatoin);
|
|
|
|
larkUserActiveRelatoinMapper.updateLarkUserActiveRelatoin(relatoin);
|
|
|
|