Browse Source

消息实体、执行任务修改,

chenw 7 years ago
parent
commit
17c694faa4

+ 101 - 101
applications/transfers/transfers-dto/src/main/java/com/usoftchina/saas/transfers/dto/MessageInfo.java

@@ -9,105 +9,105 @@ import java.util.UUID;
  * @create: 2019-01-09 11:33
  **/
 public class MessageInfo implements Serializable{
-        /**
-         * 消息ID
-         */
-        private String msgId;
-        /**
-         * 用户ID
-         */
-        private String userId;
-        /**
-         * 应用ID
-         */
-        private String appId;
-        /**
-         * 业务类型
-         */
-        private String bizType;
-
-        /**
-         * 业务单据ID
-         */
-
-        private String bizId;
-        /**
-         * 公司id
-         * @return
-         */
-        private Long companyId;
-
-        /**
-         * 时间戳
-         */
-        private long timestamp;
-
-        public long getTimestamp() {
-            return timestamp;
-        }
-
-        public void setTimestamp(long timestamp) {
-            this.timestamp = timestamp;
-        }
-
-        public String getMsgId() {
-            return msgId;
-        }
-
-        public void setMsgId(String msgId) {
-            this.msgId = msgId;
-        }
-
-        public String getUserId() {
-            return userId;
-        }
-
-        public void setUserId(String userId) {
-            this.userId = userId;
-        }
-
-        public String getAppId() {
-            return appId;
-        }
-
-        public void setAppId(String appId) {
-            this.appId = appId;
-        }
-
-        public String getBizType() {
-            return bizType;
-        }
-
-        public void setBizType(String bizType) {
-            this.bizType = bizType;
-        }
-
-        public String getBizId() {
-            return bizId;
-        }
-
-        public void setBizId(String bizId) {
-            this.bizId = bizId;
-        }
-
-        public MessageInfo(String userId, String bizType, String bizId, Long companyId) {
-            this.msgId = UUID.randomUUID().toString();
-            this.userId = userId;
-            this.appId = "trade";
-            this.bizType = bizType;
-            this.bizId = bizId;
-            this.companyId = companyId;
-            this.timestamp = new Date().getTime();
-        }
-
-        public MessageInfo() {
-
-        }
-        public Long getCompanyId() {
-            return companyId;
-        }
-
-        public void setCompanyId(Long companyId) {
-            this.companyId = companyId;
-        }
+    /**
+     * 消息ID
+     */
+    private String msgId;
+    /**
+     * 用户ID
+     */
+    private Long userId;
+    /**
+     * 应用ID
+     */
+    private String appId;
+    /**
+     * 业务类型
+     */
+    private String bizType;
+
+    /**
+     * 业务单据ID
+     */
+
+    private String bizId;
+    /**
+     * 公司id
+     * @return
+     */
+    private Long companyId;
+
+    /**
+     * 时间戳
+     */
+    private long timestamp;
+
+    public long getTimestamp() {
+        return timestamp;
+    }
+
+    public void setTimestamp(long timestamp) {
+        this.timestamp = timestamp;
+    }
+
+    public String getMsgId() {
+        return msgId;
+    }
+
+    public void setMsgId(String msgId) {
+        this.msgId = msgId;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public String getAppId() {
+        return appId;
+    }
+
+    public void setAppId(String appId) {
+        this.appId = appId;
+    }
+
+    public String getBizType() {
+        return bizType;
+    }
+
+    public void setBizType(String bizType) {
+        this.bizType = bizType;
+    }
+
+    public String getBizId() {
+        return bizId;
+    }
+
+    public void setBizId(String bizId) {
+        this.bizId = bizId;
+    }
+
+    public MessageInfo(Long userId, String bizType, String bizId, Long companyId) {
+        this.msgId = UUID.randomUUID().toString();
+        this.userId = userId;
+        this.appId = "trade";
+        this.bizType = bizType;
+        this.bizId = bizId;
+        this.companyId = companyId;
+        this.timestamp = new Date().getTime();
+    }
+
+    public MessageInfo() {
+
+    }
+    public Long getCompanyId() {
+        return companyId;
+    }
+
+    public void setCompanyId(Long companyId) {
+        this.companyId = companyId;
+    }
 }

+ 1 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/ReceiveService.java

@@ -67,7 +67,7 @@ public class ReceiveService {
                    break;
            }
 
-           task.execute();
+           task.execute(info);
 
            //更新状态
            brokerMessageLogMapper.updateSuccess(info.getMsgId());

+ 3 - 1
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/Executable.java

@@ -1,5 +1,7 @@
 package com.usoftchina.saas.transfers.task;
 
+import com.usoftchina.saas.transfers.dto.MessageInfo;
+
 /**
  * @author: guq
  * @create: 2019-01-08 13:38
@@ -18,5 +20,5 @@ public abstract class Executable {
     /**
      * 执行任务
      */
-    public abstract void execute();
+    public abstract void execute(MessageInfo messageInfo);
 }