Browse Source

误提交删除

dongbw 7 years ago
parent
commit
3b8df81dfa

+ 0 - 153
search-console-b2b/src/main/java/com/uas/search/console/b2b/jms/LuceneMessage.java

@@ -1,153 +0,0 @@
-package com.uas.search.console.b2b.jms;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-/**
- * 用于实时更新的消息
- *
- * @author sunyj
- * @since 2017/10/11 16:12
- */
-@Entity
-@Table(name = "lucene$message")
-public class LuceneMessage implements Serializable {
-
-    /**
-     * 序列号
-     */
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * id
-     */
-    @Id
-    @Column(name = "me_id")
-    private Long id;
-
-    /**
-     * 表名
-     */
-    @Column(name = "me_table_name")
-    private String tableName;
-
-    /**
-     * 更改类型
-     */
-    @Column(name = "me_method_type")
-    private String methodType;
-
-    /**
-     * 数据 id
-     */
-    @Column(name = "me_data_id")
-    private Long dataId;
-
-    /**
-     * 数据,可为空
-     */
-    @Column(name = "me_data")
-    private String data;
-
-    /**
-     * 优先级
-     */
-    @Column(name = "me_priority")
-    private Long priority;
-
-    /**
-     * 尝试次数
-     */
-    @Column(name = "me_retry_count")
-    private Long retryCount;
-
-    /**
-     * 时间
-     */
-    @Column(name = "me_create_time")
-    private Date createTime;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public String getTableName() {
-        return tableName;
-    }
-
-    public void setTableName(String tableName) {
-        this.tableName = tableName;
-    }
-
-    public String getMethodType() {
-        return methodType;
-    }
-
-    public void setMethodType(String methodType) {
-        this.methodType = methodType;
-    }
-
-    public Long getDataId() {
-        return dataId;
-    }
-
-    public void setDataId(Long dataId) {
-        this.dataId = dataId;
-    }
-
-    public String getData() {
-        return data;
-    }
-
-    public void setData(String data) {
-        this.data = data;
-    }
-
-    public Long getPriority() {
-        return priority;
-    }
-
-    public void setPriority(Long priority) {
-        this.priority = priority;
-    }
-
-    public Long getRetryCount() {
-        return retryCount;
-    }
-
-    public void setRetryCount(Long retryCount) {
-        this.retryCount = retryCount;
-    }
-
-    public String getCreateTime() {
-        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTime);
-    }
-
-    public void setCreateTime(Date createTime) {
-        this.createTime = createTime;
-    }
-
-    @Override
-    public String toString() {
-        return "LuceneMessage{" +
-                "id=" + id +
-                ", tableName='" + tableName + '\'' +
-                ", methodType='" + methodType + '\'' +
-                ", dataId=" + dataId +
-                ", data='" + data + '\'' +
-                ", priority=" + priority +
-                ", retryCount=" + retryCount +
-                ", createTime=" + createTime +
-                '}';
-    }
-}
-

+ 0 - 45
search-console-b2b/src/main/java/com/uas/search/console/b2b/jms/LuceneMessageDao.java

@@ -1,45 +0,0 @@
-package com.uas.search.console.b2b.jms;
-
-import com.uas.search.annotation.NotEmpty;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.jpa.repository.query.Procedure;
-import org.springframework.stereotype.Repository;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.List;
-
-/**
- * @author sunyj
- * @since 2016年7月7日 下午5:52:52
- */
-@Repository
-public interface LuceneMessageDao
-        extends JpaSpecificationExecutor<LuceneMessage>, JpaRepository<LuceneMessage, Long> {
-
-    /**
-     * 获取指定数目的数据
-     *
-     * @param start 开始的记录
-     * @param size 指定数目
-     * @return 数据
-     */
-    @Query(value = "select * from lucene$message where me_retry_count < 5 order by me_priority desc, me_id limit ?1, ?2", nativeQuery = true)
-    List<LuceneMessage> findList(@NotEmpty("start") Integer start, @NotEmpty("size") Integer size);
-
-    /**
-     * 统计行数
-     * @return 行数
-     */
-    @Query(value = "select count(1) from lucene$message where me_retry_count < 5", nativeQuery = true)
-    long count();
-
-    /**
-     * 出队消息
-     * @param id 消息 id
-     */
-    @Transactional
-    @Procedure(procedureName = "dequeue_lucene_message")
-    void dequeueLuceneMessage(@NotEmpty("id") Long id);
-}