|
@@ -966,6 +966,12 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
String json = configService.selectConfigByKey("course.config");
|
|
|
CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);
|
|
|
|
|
|
+ // 判断来源是否是app,如是app,则发放积分奖励
|
|
|
+ int sourceApp = 3;
|
|
|
+ if(sourceApp == param.getSource()){
|
|
|
+ return sendIntegralReward(param, user, log, config);
|
|
|
+ }
|
|
|
+
|
|
|
// 根据奖励类型发放不同奖励
|
|
|
switch (config.getRewardType()) {
|
|
|
// 红包奖励
|
|
@@ -1585,11 +1591,12 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
return ResponseResult.fail(504, "请观看最新的课程项目");
|
|
|
}
|
|
|
// 项目看课数限制
|
|
|
- Integer logCount = fsUserCourseMapper.selectTodayCourseWatchLogCountByUserIdAndProjectId(param.getUserId(), param.getProjectId());
|
|
|
- if (Objects.isNull(watchCourseVideo) && logCount > 0) {
|
|
|
- return ResponseResult.fail(504, "超过项目看课数量限制");
|
|
|
+ if(!"福本源".equals(signProjectName)) {
|
|
|
+ Integer logCount = fsUserCourseMapper.selectTodayCourseWatchLogCountByUserIdAndProjectId(param.getUserId(), param.getProjectId());
|
|
|
+ if (Objects.isNull(watchCourseVideo) && logCount > 0) {
|
|
|
+ return ResponseResult.fail(504, "超过项目看课数量限制");
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
//添加判断:该用户是否已经存在此课程的看课记录,并且看课记录的销售id不是传入的销售id
|
|
|
if(watchCourseVideo != null){
|
|
|
if(!watchCourseVideo.getCompanyUserId().equals(param.getCompanyUserId())) {
|