|
@@ -15,6 +15,8 @@ import com.keao.edu.im.api.client.ImFeignService;
|
|
|
import com.keao.edu.im.api.entity.MemberChangedMessage;
|
|
|
import com.keao.edu.im.api.entity.PublishMessageDto;
|
|
|
import com.keao.edu.thirdparty.message.provider.JiguangPushPlugin;
|
|
|
+import com.keao.edu.thirdparty.storage.StoragePluginContext;
|
|
|
+import com.keao.edu.thirdparty.storage.provider.KS3StoragePlugin;
|
|
|
import com.keao.edu.user.api.entity.ExamRoom;
|
|
|
import com.keao.edu.user.api.entity.ExamRoomStudentRelation;
|
|
|
import com.keao.edu.user.api.entity.Student;
|
|
@@ -72,6 +74,8 @@ public class StudentExamResultServiceImpl extends BaseServiceImpl<Long, StudentE
|
|
|
private ExamReviewDao examReviewDao;
|
|
|
@Autowired
|
|
|
private SysConfigService sysConfigService;
|
|
|
+ @Autowired
|
|
|
+ private StoragePluginContext storagePluginContext;
|
|
|
|
|
|
private final static Logger logger = LoggerFactory.getLogger(StudentExamResultServiceImpl.class);
|
|
|
|
|
@@ -279,7 +283,7 @@ public class StudentExamResultServiceImpl extends BaseServiceImpl<Long, StudentE
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public void recordSync(RecordNotify recordNotify) {
|
|
|
+ public synchronized void recordSync(RecordNotify recordNotify) {
|
|
|
logger.info("recordSync paramJson{}",recordNotify);
|
|
|
if (recordNotify.getType() == 4){
|
|
|
JSONObject jsonObject = JSONObject.parseObject(recordNotify.getOutput());
|
|
@@ -294,10 +298,14 @@ public class StudentExamResultServiceImpl extends BaseServiceImpl<Long, StudentE
|
|
|
return;
|
|
|
}
|
|
|
String videoUrl = studentExamResult.getVideoUrl();
|
|
|
+ String fileName = jsonObject.get("fileUrl").toString();
|
|
|
+ String substring = fileName.substring(0, fileName.lastIndexOf("?"));
|
|
|
+ String substring1 = substring.substring(substring.lastIndexOf("/") + 1);
|
|
|
+ storagePluginContext.setFileAcl(KS3StoragePlugin.PLUGIN_NAME,substring1,true);
|
|
|
if(StringUtils.isNotEmpty(videoUrl)){
|
|
|
- videoUrl += "," + jsonObject.get("fileUrl");
|
|
|
+ videoUrl += "," + substring1;
|
|
|
}else {
|
|
|
- videoUrl = jsonObject.get("fileUrl").toString();
|
|
|
+ videoUrl = substring1;
|
|
|
}
|
|
|
studentExamResult.setVideoUrl(videoUrl);
|
|
|
studentExamResultDao.update(studentExamResult);
|