|
|
@@ -992,14 +992,14 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
// 深拷贝 Content 对象,避免使用 JSON
|
|
|
QwSopTempSetting.Content clonedContent = deepCopyContent(content);
|
|
|
if (clonedContent == null) {
|
|
|
- log.error("Failed to clone content, skipping handleCourseMessage.");
|
|
|
+// log.error("Failed to clone content, skipping handleCourseMessage.");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
List<QwSopTempSetting.Content.Setting> settings = clonedContent.getSetting();
|
|
|
List<QwSopTempSetting.Content.Setting> settingAll = new ArrayList<>();
|
|
|
if (settings == null || settings.isEmpty()) {
|
|
|
- log.error("Cloned content settings are empty, skipping.");
|
|
|
+// log.error("Cloned content settings are empty, skipping.");
|
|
|
return;
|
|
|
}
|
|
|
// 顺序处理每个 Setting,避免过多的并行导致线程开销
|
|
|
@@ -1118,7 +1118,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
// 2. 获取系统配置
|
|
|
SysConfig luckyBagConfig = sysConfigMapper.selectConfigByConfigKey("luckyBag.config");
|
|
|
if (ObjectUtil.isEmpty(luckyBagConfig) || StringUtil.strIsNullOrEmpty(luckyBagConfig.getConfigValue())) {
|
|
|
- log.warn("福袋配置为空,设置发送状态为失败");
|
|
|
+// log.warn("福袋配置为空,设置发送状态为失败");
|
|
|
setSopLogsStatus(sopLogs, 5L, 0L, "福袋配置不存在");
|
|
|
}
|
|
|
|
|
|
@@ -1127,7 +1127,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
try {
|
|
|
jsonObject = JSON.parseObject(luckyBagConfig.getConfigValue());
|
|
|
} catch (Exception e) {
|
|
|
- log.error("解析福袋配置JSON失败: {}", luckyBagConfig.getConfigValue(), e);
|
|
|
+// log.error("解析福袋配置JSON失败: {}", luckyBagConfig.getConfigValue(), e);
|
|
|
setSopLogsStatus(sopLogs, 5L, 0L, "福袋配置格式错误");
|
|
|
}
|
|
|
|
|
|
@@ -1143,7 +1143,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
}
|
|
|
|
|
|
if (count == null) {
|
|
|
- log.warn("周限制次数配置为空");
|
|
|
+// log.warn("周限制次数配置为空");
|
|
|
setSopLogsStatus(sopLogs, 5L, 0L, "周限制次数配置错误");
|
|
|
}
|
|
|
|
|
|
@@ -1173,12 +1173,12 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
Object cachedCount = redisCache.getCacheObject(countCacheKey);
|
|
|
if (cachedCount != null && cachedCount instanceof Integer) {
|
|
|
recordCount = (Integer) cachedCount;
|
|
|
- log.debug("福袋计数缓存命中,userId: {},次数: {}", fsUserId, recordCount);
|
|
|
+// log.debug("福袋计数缓存命中,userId: {},次数: {}", fsUserId, recordCount);
|
|
|
|
|
|
// 如果只需要判断是否超限,且已超限,直接返回
|
|
|
if (recordCount >= count) {
|
|
|
- log.info("用户福袋次数已达上限(计数缓存), userId: {}, 当前次数: {}, 限制次数: {}",
|
|
|
- fsUserId, recordCount, count);
|
|
|
+// log.info("用户福袋次数已达上限(计数缓存), userId: {}, 当前次数: {}, 限制次数: {}",
|
|
|
+// fsUserId, recordCount, count);
|
|
|
setSopLogsStatus(sopLogs, 5L, 0L, "超过福袋发放次数");
|
|
|
luckyBagCollectRecords = Collections.emptyList();
|
|
|
// 可以直接返回,不需要查询完整记录
|
|
|
@@ -1226,7 +1226,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
|
|
|
// 6. 检查次数限制
|
|
|
if (recordCount >= count) {
|
|
|
- log.info("用户福袋次数已达上限, userId: {}, 当前次数: {}, 限制次数: {}", fsUserId, recordCount, count);
|
|
|
+// log.info("用户福袋次数已达上限, userId: {}, 当前次数: {}, 限制次数: {}", fsUserId, recordCount, count);
|
|
|
setSopLogsStatus(sopLogs, 5L, 0L, "超过福袋发放次数");
|
|
|
}
|
|
|
}
|
|
|
@@ -1242,7 +1242,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
0L, 0L, qwUserId, companyUserId, companyId, cachedCourseConfig, null);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- log.error("生成活动链接失败", e);
|
|
|
+// log.error("生成活动链接失败", e);
|
|
|
setSopLogsStatus(sopLogs, 5L, 0L, "生成活动链接失败");
|
|
|
return;
|
|
|
}
|
|
|
@@ -1271,7 +1271,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
setting.setMiniprogramTitle("福袋发放");
|
|
|
setting.setMiniprogramPage(link);
|
|
|
|
|
|
- log.info("福袋配置成功,userId: {}, appId: {}", fsUserId, finalAppId);
|
|
|
+// log.info("福袋配置成功,userId: {}, appId: {}", fsUserId, finalAppId);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
log.error("任务模板福袋发放失败", e);
|
|
|
@@ -1362,7 +1362,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
}
|
|
|
|
|
|
if (config == null) {
|
|
|
- log.error("CourseConfig is not loaded.");
|
|
|
+// log.error("CourseConfig is not loaded.");
|
|
|
return "";
|
|
|
}
|
|
|
FsCourseLink link = new FsCourseLink();
|
|
|
@@ -1418,13 +1418,13 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
// 深拷贝 Content 对象,避免使用 JSON
|
|
|
QwSopTempSetting.Content clonedContent = deepCopyContent(content);
|
|
|
if (clonedContent == null) {
|
|
|
- log.error("Failed to clone content, skipping handleCourseMessage.");
|
|
|
+// log.error("Failed to clone content, skipping handleCourseMessage.");
|
|
|
return;
|
|
|
}
|
|
|
clonedContent.setLiveId(liveId);
|
|
|
List<QwSopTempSetting.Content.Setting> settings = clonedContent.getSetting();
|
|
|
if (settings == null || settings.isEmpty()) {
|
|
|
- log.error("Cloned content settings are empty, skipping.");
|
|
|
+// log.error("Cloned content settings are empty, skipping.");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -1506,7 +1506,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
// 深拷贝 Content 对象,避免使用 JSON
|
|
|
QwSopTempSetting.Content clonedContent = deepCopyContent(content);
|
|
|
if (clonedContent == null) {
|
|
|
- log.error("Failed to clone content, skipping handleCourseMessage.");
|
|
|
+// log.error("Failed to clone content, skipping handleCourseMessage.");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -1517,7 +1517,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
|
|
|
List<QwSopTempSetting.Content.Setting> settings = clonedContent.getSetting();
|
|
|
if (settings == null || settings.isEmpty()) {
|
|
|
- log.error("Cloned content settings are empty, skipping.");
|
|
|
+// log.error("Cloned content settings are empty, skipping.");
|
|
|
return;
|
|
|
}
|
|
|
//如果是@所有人,就添加
|
|
|
@@ -1633,9 +1633,10 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
setting.setMiniType(miniType);
|
|
|
if (!StringUtil.strIsNullOrEmpty(finalAppId)) {
|
|
|
setting.setMiniprogramAppid(finalAppId);
|
|
|
- } else {
|
|
|
- log.error("公司的小程序id为空:采用了前端传的固定值" + sopLogs.getSopId());
|
|
|
}
|
|
|
+// else {
|
|
|
+// log.error("公司的小程序id为空:采用了前端传的固定值" + sopLogs.getSopId());
|
|
|
+// }
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -1785,8 +1786,8 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
st.setBusinessId(String.valueOf(businessId));
|
|
|
String realLinkFull = appActivitlLink + JSON.toJSONString(courseMap);
|
|
|
link.setRealLink(realLinkFull);
|
|
|
- log.error("存入fs_course_link:" + registeredRealLink);
|
|
|
- log.error("QwSopCourseFinishTempSetting.Setting:{}", st);
|
|
|
+// log.error("存入fs_course_link:" + registeredRealLink);
|
|
|
+// log.error("QwSopCourseFinishTempSetting.Setting:{}", st);
|
|
|
//存短链-
|
|
|
fsCourseLinkMapper.insertFsCourseLink(link);
|
|
|
return link.getRealLink();
|
|
|
@@ -1865,7 +1866,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
- log.info("福袋记录添加成功 [recordId:{}, luckyBagId:{}]", recordId, content.getLuckyBagId());
|
|
|
+// log.info("福袋记录添加成功 [recordId:{}, luckyBagId:{}]", recordId, content.getLuckyBagId());
|
|
|
return recordId;
|
|
|
|
|
|
} catch (NumberFormatException e) {
|
|
|
@@ -1978,7 +1979,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
}
|
|
|
|
|
|
if (config == null) {
|
|
|
- log.error("CourseConfig is not loaded.");
|
|
|
+// log.error("CourseConfig is not loaded.");
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
@@ -2075,7 +2076,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
}
|
|
|
|
|
|
if (config == null) {
|
|
|
- log.error("CourseConfig is not loaded.");
|
|
|
+// log.error("CourseConfig is not loaded.");
|
|
|
return null;
|
|
|
}
|
|
|
FsCourseLink link = createFsCourseLink(corpId, sendTime, courseId, videoId, qwUserId,
|
|
|
@@ -2192,7 +2193,7 @@ public class SopLogsTaskServiceImpl implements SopLogsTaskService {
|
|
|
}
|
|
|
|
|
|
if (config == null) {
|
|
|
- log.error("CourseConfig is not loaded.");
|
|
|
+// log.error("CourseConfig is not loaded.");
|
|
|
return "";
|
|
|
}
|
|
|
|