Commit 5703ce12 by huangjinxin

fix:工作队列表分页修复

feat:bean消息储存表添加
1 parent 1de26b2e
package com.dituhui.pea.order.dao;
import com.dituhui.pea.order.entity.BeanMqMessageEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.CrudRepository;
public interface BeanMqMessageDao extends JpaRepository<BeanMqMessageEntity, String>, JpaSpecificationExecutor<BeanMqMessageEntity>,
CrudRepository<BeanMqMessageEntity, String> {
}
......@@ -38,7 +38,7 @@ public class BusinessTeamsDTO {
/**
* 总条数
*/
private Integer total;
private Long total;
}
@lombok.Data
......
package com.dituhui.pea.order.entity;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* bean mq消息储存表
*/
@Data
@Entity
@Table(name = "bean_mq_message")
@EntityListeners(AuditingEntityListener.class)
public class BeanMqMessageEntity implements Serializable {
private static final long serialVersionUID = -8806128881082006267L;
/**
* 主键
*/
@Id
@GeneratedValue(generator = "uuid")
@GenericGenerator(name = "uuid", strategy = "uuid")
@Column(name = "ID", unique = true, nullable = false, length = 32)
private String id;
/**
* 消息
*/
@Column(name = "msg", nullable = false)
private String msg;
/**
* 是否同步成功,0:失败,1:成功 默认成功
*/
@Column(name = "success")
private Integer success = 1;
@Column(name = "create_time", nullable = false, updatable = false, columnDefinition = "timestamp default current_timestamp")
private LocalDateTime createTime = LocalDateTime.now();
}
......@@ -80,7 +80,7 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
contents.add(content);
}
BusinessTeamsDTO.Result rs = new BusinessTeamsDTO.Result();
rs.setContent(contents).setTotal(page.getTotalPages()).setPageSize(page.getSize());
rs.setContent(contents).setPages(page.getTotalPages()).setTotal(page.getTotalElements()).setPageSize(page.getSize());
return Result.success(rs);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!