|
@@ -0,0 +1,37 @@
|
|
|
+package com.zanxiang.game.data.serve.service.impl;
|
|
|
+
|
|
|
+import com.zanxiang.erp.base.ErpServer;
|
|
|
+import com.zanxiang.erp.base.rpc.IDingTalkMsgRpc;
|
|
|
+import com.zanxiang.game.data.serve.service.IGameMonitorAlarmService;
|
|
|
+import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
+import org.nutz.dao.Dao;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.time.LocalDateTime;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author tianhua
|
|
|
+ * @version 1.0
|
|
|
+ * @description: TODO
|
|
|
+ * @date 2023/12/13 16:24
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class GameMonitorAlarmServiceImpl implements IGameMonitorAlarmService {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private Dao dao;
|
|
|
+
|
|
|
+ @DubboReference(providedBy = ErpServer.SERVER_DUBBO_NAME)
|
|
|
+ private IDingTalkMsgRpc dingTalkMsgRpc;
|
|
|
+
|
|
|
+ public boolean sendMsgToUser() {
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
+ String msg = "这是一条测试钉钉消息,发送时间:" + now;
|
|
|
+ dingTalkMsgRpc.sendByUserId(401L, msg);
|
|
|
+
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|