|
@@ -0,0 +1,33 @@
|
|
|
+package com.zanxiang.game.module.sdk.service.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.zanxiang.game.module.mybatis.entity.CpPushErrorLog;
|
|
|
+import com.zanxiang.game.module.mybatis.mapper.CpPushErrorLogMapper;
|
|
|
+import com.zanxiang.game.module.sdk.enums.CpPushDataEnum;
|
|
|
+import com.zanxiang.game.module.sdk.service.ICpPushErrorLogService;
|
|
|
+import com.zanxiang.module.util.JsonUtil;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.time.LocalDateTime;
|
|
|
+
|
|
|
+
|
|
|
+ * @author : lingfeng
|
|
|
+ * @time : 2024-06-27
|
|
|
+ * @description : CP推送数据错误日志
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@Service
|
|
|
+public class CpPushErrorLogServiceImpl extends ServiceImpl<CpPushErrorLogMapper, CpPushErrorLog> implements ICpPushErrorLogService {
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void createLog(Long gameId, CpPushDataEnum cpPushDataEnum, Object param, String errorMsg) {
|
|
|
+ super.save(CpPushErrorLog.builder()
|
|
|
+ .dataType(cpPushDataEnum.getValue())
|
|
|
+ .gameId(gameId)
|
|
|
+ .param(JsonUtil.toString(param))
|
|
|
+ .errorMsg(errorMsg)
|
|
|
+ .createTime(LocalDateTime.now())
|
|
|
+ .build());
|
|
|
+ }
|
|
|
+}
|