|
@@ -4,6 +4,7 @@ import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.fs.common.BeanCopyUtils;
|
|
|
import com.fs.common.core.domain.R;
|
|
@@ -22,6 +23,7 @@ import com.fs.company.mapper.CompanyMapper;
|
|
|
import com.fs.company.mapper.CompanyMoneyLogsMapper;
|
|
|
import com.fs.company.mapper.CompanyUserMapper;
|
|
|
import com.fs.company.service.ICompanyService;
|
|
|
+import com.fs.config.cloud.CloudHostProper;
|
|
|
import com.fs.course.config.CourseConfig;
|
|
|
import com.fs.course.domain.*;
|
|
|
import com.fs.course.dto.CoursePackageDTO;
|
|
@@ -59,13 +61,20 @@ import com.fs.qwApi.service.QwApiService;
|
|
|
import com.fs.sop.mapper.QwSopLogsMapper;
|
|
|
import com.fs.sop.mapper.SopUserLogsInfoMapper;
|
|
|
import com.fs.sop.service.ISopUserLogsInfoService;
|
|
|
+import com.fs.system.domain.SysConfig;
|
|
|
import com.fs.system.mapper.SysDictDataMapper;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
import com.fs.voice.utils.StringUtil;
|
|
|
import com.github.binarywang.wxpay.bean.transfer.TransferBillsResult;
|
|
|
+import com.google.common.collect.Sets;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
+import org.apache.commons.lang.exception.ExceptionUtils;
|
|
|
import org.apache.rocketmq.spring.core.RocketMQTemplate;
|
|
|
+import org.jetbrains.annotations.NotNull;
|
|
|
+import org.redisson.api.RLock;
|
|
|
+import org.redisson.api.RedissonClient;
|
|
|
+import org.redisson.client.RedisClient;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -81,6 +90,7 @@ import java.time.Instant;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.time.ZoneId;
|
|
|
import java.util.*;
|
|
|
+import java.util.concurrent.CompletableFuture;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
import java.util.concurrent.atomic.AtomicLong;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -103,6 +113,26 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
private Boolean isNewWxMerchant;
|
|
|
private static final Logger logger = LoggerFactory.getLogger(FsUserCourseVideoServiceImpl.class);
|
|
|
|
|
|
+ /**
|
|
|
+ * 红包账户锁
|
|
|
+ */
|
|
|
+ private static final String REDPACKET_POOL_LOCK = "redpacket_pool_lock";
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 公司红包金额
|
|
|
+ */
|
|
|
+ private static final String REDPACKET_COMPANY_MONEY = "redpacket_money";
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 红包改变记录
|
|
|
+ */
|
|
|
+ private static final String REDPACKET_COMPANY_MONEY_CHANGE = "redpacket_money_change";
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 是否开启红包账户扣减
|
|
|
+ */
|
|
|
+ @Value("${enableRedPackAccount:0}")
|
|
|
+ private String ENABLE_RED_PACK_ACCOUNT;
|
|
|
|
|
|
private static final String miniappRealLink = "/pages_course/video.html?course=";
|
|
|
private static final String REAL_LINK_PREFIX = "/courseH5/pages/course/learning?course=";
|
|
@@ -138,6 +168,8 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
private AsyncIsAddKfXfkService xfkService;
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private RedissonClient redissonClient;
|
|
|
@Autowired
|
|
|
private QwExternalContactMapper qwExternalContactMapper;
|
|
|
@Autowired
|
|
@@ -212,6 +244,9 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
@Autowired
|
|
|
private FsCourseAnswerLogsMapper courseAnswerLogsMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CloudHostProper cloudHostProper;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 查询课堂视频
|
|
@@ -408,7 +443,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
|
|
|
@Override
|
|
|
public R isAddKf(FsUserCourseVideoAddKfUParam param) {
|
|
|
- logger.info("zyp \n【判断添加客服】:{}",param);
|
|
|
+ logger.info("【判断添加客服】:{}",param);
|
|
|
//查询用户
|
|
|
FsUser fsUser = fsUserMapper.selectFsUserByUserId(param.getUserId());
|
|
|
//用户不存在唤起重新授权
|
|
@@ -579,7 +614,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
log.setQwUserId(Long.valueOf(param.getQwUserId()));
|
|
|
log.setCreateTime(new Date());
|
|
|
log.setLogType(3);
|
|
|
- logger.info("zyp \n【群聊生成看课记录】:{}",param);
|
|
|
+ logger.info("【群聊生成看课记录】:{}",param);
|
|
|
courseWatchLogMapper.insertFsCourseWatchLog(log);
|
|
|
}
|
|
|
|
|
@@ -774,7 +809,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
public R getInternetTraffic(FsUserCourseVideoFinishUParam param) {
|
|
|
try {
|
|
|
if (param.getBufferRate()==null){
|
|
|
- logger.error("zyp \n【缓冲值空】参数: {}",param);
|
|
|
+ logger.error("【缓冲值空】参数: {}",param);
|
|
|
return R.error("缓冲值空");
|
|
|
}
|
|
|
FsCourseTrafficLog trafficLog = new FsCourseTrafficLog();
|
|
@@ -801,13 +836,13 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
// 处理 UUID 为空的情况
|
|
|
if (StringUtils.isNotEmpty(trafficLog.getUuId())) {
|
|
|
// 直接插入或更新
|
|
|
-// logger.error("zyp \n【插入或更新流量】:{}",trafficLog);
|
|
|
+// logger.error("【插入或更新流量】:{}",trafficLog);
|
|
|
fsCourseTrafficLogMapper.insertOrUpdateTrafficLog(trafficLog);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
// 打印参数param和异常信息
|
|
|
- logger.error("zyp \n【插入或更新流量失败】参数: {}, 错误信息:{}", param, e.getMessage(), e);
|
|
|
+ logger.error("【插入或更新流量失败】参数: {}, 错误信息:{}", param, e.getMessage(), e);
|
|
|
return R.error();
|
|
|
}
|
|
|
return R.ok();
|
|
@@ -1043,13 +1078,12 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
try {
|
|
|
handleFsUserWx(user,param.getAppId());
|
|
|
}catch (Exception e){
|
|
|
- logger.error("zyp \n 【更新或插入用户与小程序的绑定关系失败】:{}", user.getUserId());
|
|
|
+ logger.error("【更新或插入用户与小程序的绑定关系失败】:{}", user.getUserId());
|
|
|
}
|
|
|
}else {
|
|
|
packetParam.setOpenId(fsUserWx.getOpenId());
|
|
|
}
|
|
|
//查出公司绑定openid并赋值
|
|
|
-
|
|
|
}
|
|
|
|
|
|
//判断服务号配置是否存在
|
|
@@ -1063,104 +1097,126 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
packetParam.setAppId(param.getAppId());
|
|
|
packetParam.setUser(user);
|
|
|
|
|
|
- System.out.println("红包金额"+amount);
|
|
|
- System.out.println("红包商户号"+packetParam);
|
|
|
+ logger.info("红包金额 {},红包商户号 {}",amount,packetParam);
|
|
|
//2025.6.19 红包金额为0的时候
|
|
|
if (amount.compareTo(BigDecimal.ZERO)>0){
|
|
|
|
|
|
-// Company company = companyMapper.selectCompanyByIdForUpdate(param.getCompanyId());
|
|
|
- // BigDecimal money = company.getMoney();
|
|
|
- // BigDecimal subtract = money.subtract(amount);
|
|
|
-// if (subtract.compareTo(BigDecimal.ZERO)<0){
|
|
|
-// FsCourseRedPacketLog redPacketLog = new FsCourseRedPacketLog();
|
|
|
-// redPacketLog.setCourseId(param.getCourseId());
|
|
|
-// redPacketLog.setCompanyId(param.getCompanyId());
|
|
|
-// redPacketLog.setUserId(param.getUserId());
|
|
|
-// redPacketLog.setVideoId(param.getVideoId());
|
|
|
-// redPacketLog.setStatus(2);
|
|
|
-// redPacketLog.setQwUserId(param.getQwUserId() != null ? param.getQwUserId() : null);
|
|
|
-// redPacketLog.setCompanyUserId(param.getCompanyUserId());
|
|
|
-// redPacketLog.setCreateTime(new Date());
|
|
|
-// redPacketLog.setAmount(amount);
|
|
|
-// redPacketLog.setWatchLogId(log.getLogId() != null ? log.getLogId() : null);
|
|
|
-// redPacketLog.setPeriodId(param.getPeriodId());
|
|
|
-// redPacketLogMapper.insertFsCourseRedPacketLog(redPacketLog);
|
|
|
-// return R.error("余额不足请稍等");
|
|
|
-// }
|
|
|
- // 发送红包
|
|
|
- R sendRedPacket = paymentService.sendRedPacket(packetParam);
|
|
|
- if (sendRedPacket.get("code").equals(200)) {
|
|
|
- FsCourseRedPacketLog redPacketLog = new FsCourseRedPacketLog();
|
|
|
- TransferBillsResult transferBillsResult;
|
|
|
- if (sendRedPacket.get("isNew").equals(1)){
|
|
|
- transferBillsResult = (TransferBillsResult)sendRedPacket.get("data");
|
|
|
- redPacketLog.setResult(JSON.toJSONString(sendRedPacket));
|
|
|
- redPacketLog.setOutBatchNo(transferBillsResult.getOutBillNo());
|
|
|
- }else {
|
|
|
- redPacketLog.setOutBatchNo(sendRedPacket.get("orderCode").toString());
|
|
|
+ //---------------发红包前先判断润天账户余额是否足够---------
|
|
|
+ RLock lock = redissonClient.getLock(REDPACKET_POOL_LOCK);
|
|
|
+ try{
|
|
|
+ boolean locked = lock.tryLock(3, 10, TimeUnit.SECONDS);
|
|
|
+
|
|
|
+ if (!locked) {
|
|
|
+ logger.error("获取锁失败");
|
|
|
+ return R.error("[红包领取] 系统繁忙,请重试!");
|
|
|
}
|
|
|
- // 添加红包记录
|
|
|
- redPacketLog.setCourseId(param.getCourseId());
|
|
|
-// redPacketLog.setOutBatchNo(sendRedPacket.get("orderCode").toString());
|
|
|
- redPacketLog.setCompanyId(param.getCompanyId());
|
|
|
- redPacketLog.setUserId(param.getUserId());
|
|
|
- redPacketLog.setVideoId(param.getVideoId());
|
|
|
- redPacketLog.setStatus(0);
|
|
|
- redPacketLog.setQwUserId(param.getQwUserId() != null ? param.getQwUserId() : null);
|
|
|
- redPacketLog.setCompanyUserId(param.getCompanyUserId());
|
|
|
- redPacketLog.setCreateTime(new Date());
|
|
|
- redPacketLog.setAmount(amount);
|
|
|
- redPacketLog.setWatchLogId(log.getLogId() != null ? log.getLogId() : null);
|
|
|
- redPacketLog.setPeriodId(param.getPeriodId());
|
|
|
- redPacketLogMapper.insertFsCourseRedPacketLog(redPacketLog);
|
|
|
|
|
|
- // 更新观看记录的奖励类型
|
|
|
- log.setRewardType(config.getRewardType());
|
|
|
- courseWatchLogMapper.updateFsCourseWatchLog(log);
|
|
|
-//
|
|
|
-// company.setMoney(subtract);
|
|
|
-// companyMapper.updateCompany(company);
|
|
|
-//
|
|
|
-// CompanyMoneyLogs logs=new CompanyMoneyLogs();
|
|
|
-// logs.setCompanyId(company.getCompanyId());
|
|
|
-// logs.setRemark("扣除红包金额");
|
|
|
-// logs.setMoney(amount.multiply(new BigDecimal(-1)));
|
|
|
-// logs.setLogsType(15);
|
|
|
-// logs.setBalance(company.getMoney());
|
|
|
-// logs.setCreateTime(new Date());
|
|
|
-// moneyLogsMapper.insertCompanyMoneyLogs(logs);
|
|
|
+ // 发送红包
|
|
|
+ return sendRedPacketRewardToUser(param, log, config, packetParam, amount);
|
|
|
|
|
|
- return sendRedPacket;
|
|
|
- } else {
|
|
|
- return R.error("奖励发送失败,请联系客服");
|
|
|
+ }catch (Exception e){
|
|
|
+ logger.error("领取红包失败原因:{}", ExceptionUtils.getFullStackTrace(e),e);
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }finally {
|
|
|
+ if (lock.isHeldByCurrentThread()) {
|
|
|
+ lock.unlock();
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
FsCourseRedPacketLog redPacketLog = new FsCourseRedPacketLog();
|
|
|
// 添加红包记录
|
|
|
redPacketLog.setCourseId(param.getCourseId());
|
|
|
-// redPacketLog.setOutBatchNo(sendRedPacket.get("orderCode").toString());
|
|
|
+
|
|
|
redPacketLog.setCompanyId(param.getCompanyId());
|
|
|
redPacketLog.setUserId(param.getUserId());
|
|
|
redPacketLog.setVideoId(param.getVideoId());
|
|
|
redPacketLog.setStatus(0);
|
|
|
- redPacketLog.setQwUserId(param.getQwUserId() != null ? param.getQwUserId() : null);
|
|
|
+ redPacketLog.setQwUserId(param.getQwUserId());
|
|
|
redPacketLog.setCompanyUserId(param.getCompanyUserId());
|
|
|
redPacketLog.setCreateTime(new Date());
|
|
|
redPacketLog.setAmount(BigDecimal.ZERO);
|
|
|
- redPacketLog.setWatchLogId(log.getLogId() != null ? log.getLogId() : null);
|
|
|
+ redPacketLog.setWatchLogId(log.getLogId());
|
|
|
redPacketLog.setPeriodId(param.getPeriodId());
|
|
|
redPacketLogMapper.insertFsCourseRedPacketLog(redPacketLog);
|
|
|
|
|
|
// 更新观看记录的奖励类型
|
|
|
-// if (param.getLinkType() == null || param.getLinkType() == 0) {
|
|
|
log.setRewardType(config.getRewardType());
|
|
|
courseWatchLogMapper.updateFsCourseWatchLog(log);
|
|
|
-// }
|
|
|
return R.ok("红包发送成功");
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
+ private R sendRedPacketRewardToUser(FsCourseSendRewardUParam param, FsCourseWatchLog log, CourseConfig config, WxSendRedPacketParam packetParam, BigDecimal amount) {
|
|
|
+
|
|
|
+ BigDecimal companyMoney = null;
|
|
|
+ if(StringUtils.equals(ENABLE_RED_PACK_ACCOUNT,"1")) {
|
|
|
+ companyMoney = redisCache.getCacheObject(REDPACKET_COMPANY_MONEY);
|
|
|
+ if(ObjectUtils.isNull(companyMoney)){
|
|
|
+ SysConfig sysConfig = sysConfigService.selectConfigByConfigKey("company.money");
|
|
|
+ if(ObjectUtils.isNull(sysConfig)){
|
|
|
+ throw new IllegalArgumentException("润天公司账户余额不能为空!请检查配置!");
|
|
|
+ }
|
|
|
+ String configValue = sysConfig.getConfigValue();
|
|
|
+ companyMoney = new BigDecimal(configValue);
|
|
|
+ logger.info("缓存公司余额为空,从数据库读取 companyMoney: {}",companyMoney);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (companyMoney.compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
+ logger.info("润天账户余额: {} 不足!", companyMoney);
|
|
|
+ return R.error("[红包领取] 账户余额不足,请联系管理员!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 发送红包
|
|
|
+ R sendRedPacket = paymentService.sendRedPacket(packetParam);
|
|
|
+ if (sendRedPacket.get("code").equals(200)) {
|
|
|
+ FsCourseRedPacketLog redPacketLog = new FsCourseRedPacketLog();
|
|
|
+ TransferBillsResult transferBillsResult;
|
|
|
+ if (sendRedPacket.get("isNew").equals(1)){
|
|
|
+ transferBillsResult = (TransferBillsResult)sendRedPacket.get("data");
|
|
|
+ redPacketLog.setResult(JSON.toJSONString(sendRedPacket));
|
|
|
+ redPacketLog.setOutBatchNo(transferBillsResult.getOutBillNo());
|
|
|
+ }else {
|
|
|
+ redPacketLog.setOutBatchNo(sendRedPacket.get("orderCode").toString());
|
|
|
+ }
|
|
|
+ // 添加红包记录
|
|
|
+ redPacketLog.setCourseId(param.getCourseId());
|
|
|
+ redPacketLog.setCompanyId(param.getCompanyId());
|
|
|
+ redPacketLog.setUserId(param.getUserId());
|
|
|
+ redPacketLog.setVideoId(param.getVideoId());
|
|
|
+ redPacketLog.setStatus(0);
|
|
|
+ redPacketLog.setQwUserId(param.getQwUserId() != null ? param.getQwUserId() : null);
|
|
|
+ redPacketLog.setCompanyUserId(param.getCompanyUserId());
|
|
|
+ redPacketLog.setCreateTime(new Date());
|
|
|
+ redPacketLog.setAmount(amount);
|
|
|
+ redPacketLog.setWatchLogId(log.getLogId() != null ? log.getLogId() : null);
|
|
|
+ redPacketLog.setPeriodId(param.getPeriodId());
|
|
|
+ if(StringUtils.equals(ENABLE_RED_PACK_ACCOUNT,"1")) {
|
|
|
+ redPacketLog.setAccBalanceBefore(companyMoney);
|
|
|
+ redPacketLog.setAccBalanceAfter(companyMoney.subtract(amount));
|
|
|
+ }
|
|
|
+
|
|
|
+ CompletableFuture.runAsync(() -> {
|
|
|
+ redPacketLogMapper.insertFsCourseRedPacketLog(redPacketLog);
|
|
|
+ // 更新观看记录的奖励类型
|
|
|
+ log.setRewardType(config.getRewardType());
|
|
|
+ courseWatchLogMapper.updateFsCourseWatchLog(log);
|
|
|
+ });
|
|
|
+
|
|
|
+ if(StringUtils.equals(ENABLE_RED_PACK_ACCOUNT,"1")) {
|
|
|
+ // 更新账户余额
|
|
|
+ logger.info("[更新账户余额] 当前余额{} 更新后余额{}",companyMoney.toPlainString(),companyMoney.subtract(amount).toPlainString());
|
|
|
+
|
|
|
+ companyMoney = companyMoney.subtract(amount);
|
|
|
+ redisCache.setCacheObject(REDPACKET_COMPANY_MONEY,companyMoney);
|
|
|
+ }
|
|
|
+ return sendRedPacket;
|
|
|
+ } else {
|
|
|
+ return R.error("奖励发送失败,请联系客服");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
private void handleFsUserWx(FsUser user, String appId) {
|
|
|
FsUserWx fsUserWx = new FsUserWx();
|
|
@@ -1173,7 +1229,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
fsUserWx.setUpdateTime(new Date());
|
|
|
fsUserWxService.saveOrUpdateByUniqueKey(fsUserWx);
|
|
|
|
|
|
- logger.info("zyp \n 【更新或插入用户与小程序{}的绑定关系】:{}", appId, user.getUserId());
|
|
|
+ logger.info("【更新或插入用户与小程序{}的绑定关系】:{}", appId, user.getUserId());
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1228,14 +1284,14 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
FsUserWx fsUserWx = fsUserWxService.selectByAppIdAndUserId(param.getAppId(),user.getUserId(),1);
|
|
|
if (fsUserWx ==null){
|
|
|
if (user.getCourseMaOpenId()==null){
|
|
|
- logger.error("zyp \n 【转账openId参数错误】:{}", user.getUserId());
|
|
|
+ logger.error(" 【转账openId参数错误】:{}", user.getUserId());
|
|
|
return R.error("openId参数错误,请清理缓存后重新授权!");
|
|
|
}
|
|
|
packetParam.setOpenId(user.getCourseMaOpenId());
|
|
|
try {
|
|
|
handleFsUserWx(user,param.getAppId());
|
|
|
}catch (Exception e){
|
|
|
- logger.error("zyp \n 【更新或插入用户与小程序的绑定关系失败】:{}", user.getUserId(),e);
|
|
|
+ logger.error(" 【更新或插入用户与小程序的绑定关系失败】:{}", user.getUserId(),e);
|
|
|
}
|
|
|
|
|
|
}else {
|
|
@@ -2157,6 +2213,9 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
}else {
|
|
|
link.setLinkType(3);
|
|
|
}
|
|
|
+ link.setProjectCode(cloudHostProper.getProjectCode());
|
|
|
+
|
|
|
+ link.setProjectCode(cloudHostProper.getProjectCode());
|
|
|
|
|
|
String randomString = generateRandomStringWithLock();
|
|
|
if (StringUtil.strIsNullOrEmpty(randomString)){
|
|
@@ -2603,7 +2662,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
public R getInternetTrafficIsOpen(FsUserCourseVideoFinishUParam param) {
|
|
|
try {
|
|
|
if (param.getBufferRate()==null){
|
|
|
- logger.error("zyp \n【缓冲值空】参数: {}",param);
|
|
|
+ logger.error("【缓冲值空】参数: {}",param);
|
|
|
return R.error("缓冲值空");
|
|
|
}
|
|
|
FsCourseTrafficLog trafficLog = new FsCourseTrafficLog();
|
|
@@ -2624,13 +2683,13 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
// 处理 UUID 为空的情况
|
|
|
if (StringUtils.isNotEmpty(trafficLog.getUuId())) {
|
|
|
// 直接插入或更新
|
|
|
-// logger.error("zyp \n【插入或更新流量】:{}",trafficLog);
|
|
|
+// logger.error("【插入或更新流量】:{}",trafficLog);
|
|
|
fsCourseTrafficLogMapper.insertOrUpdateTrafficLog(trafficLog);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
// 打印参数param和异常信息
|
|
|
- logger.error("zyp \n【插入或更新流量失败】参数: {}, 错误信息:{}", param, e.getMessage(), e);
|
|
|
+ logger.error("【插入或更新流量失败】参数: {}, 错误信息:{}", param, e.getMessage(), e);
|
|
|
return R.error();
|
|
|
}
|
|
|
return R.ok();
|
|
@@ -2646,7 +2705,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
log.setDuration(0L);
|
|
|
log.setCreateTime(new Date());
|
|
|
log.setLogType(3);
|
|
|
- logger.info("zyp \n【群聊生成看课记录】:{}",param);
|
|
|
+ logger.info("【群聊生成看课记录】:{}",param);
|
|
|
courseWatchLogMapper.insertFsCourseWatchLog(log);
|
|
|
} catch (BeansException e) {
|
|
|
return R.error("群聊生成看课记录失败!");
|