|
|
@@ -1042,6 +1042,18 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
@Transactional
|
|
|
public R sendReward(FsCourseSendRewardUParam param) {
|
|
|
|
|
|
+ //查询今日领取红包记录
|
|
|
+ FsCourseRedPacketLog fsCourseRedPacketLog = redPacketLogMapper.selectRedPacketLogByUserIdToday(param.getUserId());
|
|
|
+ if (fsCourseRedPacketLog != null) {
|
|
|
+ if (fsCourseRedPacketLog.getStatus() == 1) {
|
|
|
+ return R.error("今日已领取过红包了!");
|
|
|
+ }
|
|
|
+ if (fsCourseRedPacketLog.getStatus() == 0) {
|
|
|
+ if (!Objects.equals(param.getVideoId(), fsCourseRedPacketLog.getVideoId())) {
|
|
|
+ return R.error("已在其它课程领取过!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
// 获取用户信息
|
|
|
FsUser user = fsUserMapper.selectFsUserByUserId(param.getUserId());
|
|
|
// if (StringUtils.isEmpty(user.getMpOpenId())){
|