|
@@ -12,6 +12,8 @@ import com.fs.company.domain.Company;
|
|
import com.fs.company.domain.CompanyMoneyLogs;
|
|
import com.fs.company.domain.CompanyMoneyLogs;
|
|
import com.fs.company.mapper.CompanyMapper;
|
|
import com.fs.company.mapper.CompanyMapper;
|
|
import com.fs.company.mapper.CompanyMoneyLogsMapper;
|
|
import com.fs.company.mapper.CompanyMoneyLogsMapper;
|
|
|
|
+import com.fs.course.domain.FsCourseWatchLog;
|
|
|
|
+import com.fs.course.mapper.FsCourseWatchLogMapper;
|
|
import com.fs.course.param.FsCourseRedPacketLogParam;
|
|
import com.fs.course.param.FsCourseRedPacketLogParam;
|
|
import com.fs.course.vo.FsCourseRedPacketLogListPVO;
|
|
import com.fs.course.vo.FsCourseRedPacketLogListPVO;
|
|
import com.fs.his.domain.FsUser;
|
|
import com.fs.his.domain.FsUser;
|
|
@@ -37,7 +39,8 @@ public class FsCourseRedPacketLogServiceImpl implements IFsCourseRedPacketLogSer
|
|
{
|
|
{
|
|
@Autowired
|
|
@Autowired
|
|
private FsCourseRedPacketLogMapper fsCourseRedPacketLogMapper;
|
|
private FsCourseRedPacketLogMapper fsCourseRedPacketLogMapper;
|
|
-
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private CompanyMapper companyMapper;
|
|
/**
|
|
/**
|
|
* 查询短链课程看课记录
|
|
* 查询短链课程看课记录
|
|
*
|
|
*
|
|
@@ -162,7 +165,7 @@ public class FsCourseRedPacketLogServiceImpl implements IFsCourseRedPacketLogSer
|
|
@Autowired
|
|
@Autowired
|
|
private FsUserMapper fsUserMapper;
|
|
private FsUserMapper fsUserMapper;
|
|
@Autowired
|
|
@Autowired
|
|
- private CompanyMapper companyMapper;
|
|
|
|
|
|
+ private FsCourseWatchLogMapper courseWatchLogMapper;
|
|
@Autowired
|
|
@Autowired
|
|
private CompanyMoneyLogsMapper moneyLogsMapper;
|
|
private CompanyMoneyLogsMapper moneyLogsMapper;
|
|
@Override
|
|
@Override
|
|
@@ -202,7 +205,12 @@ public class FsCourseRedPacketLogServiceImpl implements IFsCourseRedPacketLogSer
|
|
}else {
|
|
}else {
|
|
redPacketLog.setOutBatchNo(sendRedPacket.get("orderCode").toString());
|
|
redPacketLog.setOutBatchNo(sendRedPacket.get("orderCode").toString());
|
|
}
|
|
}
|
|
|
|
+ FsCourseWatchLog log = new FsCourseWatchLog();
|
|
|
|
+ log.setLogId(param.getWatchLogId());
|
|
|
|
+ log.setRewardType(1);
|
|
|
|
+ courseWatchLogMapper.updateFsCourseWatchLog(log);
|
|
// 添加红包记录
|
|
// 添加红包记录
|
|
|
|
+ redPacketLog.setLogId(param.getLogId());
|
|
redPacketLog.setStatus(0);
|
|
redPacketLog.setStatus(0);
|
|
fsCourseRedPacketLogMapper.updateFsCourseRedPacketLog(redPacketLog);
|
|
fsCourseRedPacketLogMapper.updateFsCourseRedPacketLog(redPacketLog);
|
|
// 更新观看记录的奖励类型
|
|
// 更新观看记录的奖励类型
|
|
@@ -217,13 +225,15 @@ public class FsCourseRedPacketLogServiceImpl implements IFsCourseRedPacketLogSer
|
|
logs.setCreateTime(new Date());
|
|
logs.setCreateTime(new Date());
|
|
moneyLogsMapper.insertCompanyMoneyLogs(logs);
|
|
moneyLogsMapper.insertCompanyMoneyLogs(logs);
|
|
suc++;
|
|
suc++;
|
|
|
|
+ }else {
|
|
|
|
+ err++;
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|
|
- err=0;
|
|
|
|
|
|
+ err++;
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
- return R.ok();
|
|
|
|
|
|
+ return R.ok("成功:"+suc+" 失败:"+err);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|