|
|
@@ -1271,9 +1271,14 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
if (video == null) {
|
|
|
return R.error("视频不存在");
|
|
|
}
|
|
|
- Company company = companyMapper.selectCompanyById(param.getCompanyId());
|
|
|
- if (company == null) {
|
|
|
- return R.error("公司不存在");
|
|
|
+
|
|
|
+ // 特殊处理0的情况
|
|
|
+ Company company = null;
|
|
|
+ if (param.getCompanyId() != null && param.getCompanyId() != 0) {
|
|
|
+ company = companyMapper.selectCompanyById(param.getCompanyId());
|
|
|
+ if (company == null) {
|
|
|
+ return R.error("公司不存在");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 实际流量传输消耗是大于文件的,添加倍数计算流量消耗 配置 course.data.usage.multiple
|
|
|
@@ -1298,7 +1303,10 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
if (StringUtils.isNotEmpty(trafficLog.getUuId())) {
|
|
|
// 插入或更新
|
|
|
fsCourseTrafficLogMapper.insertOrUpdateTrafficLog(trafficLog);
|
|
|
- asyncDeductTraffic(company, trafficLog);
|
|
|
+ // 特殊处理0的情况
|
|
|
+ if (company != null) {
|
|
|
+ asyncDeductTraffic(company, trafficLog);
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|