Commit fdb96df7 by 刘鑫

Merge remote-tracking branch 'origin/develop' into develop

2 parents a30d7e53 70077aa4
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 { ...@@ -38,7 +38,7 @@ public class BusinessTeamsDTO {
/** /**
* 总条数 * 总条数
*/ */
private Integer total; private Long total;
} }
@lombok.Data @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();
}
...@@ -12,6 +12,7 @@ import com.dituhui.pea.order.entity.OrgWarehouseInfoEntity; ...@@ -12,6 +12,7 @@ import com.dituhui.pea.order.entity.OrgWarehouseInfoEntity;
import com.dituhui.pea.order.service.BusinessTeamService; import com.dituhui.pea.order.service.BusinessTeamService;
import com.dituhui.pea.order.service.CommonService; import com.dituhui.pea.order.service.CommonService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
...@@ -80,7 +81,7 @@ public class BusinessTeamServiceImpl implements BusinessTeamService { ...@@ -80,7 +81,7 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
contents.add(content); contents.add(content);
} }
BusinessTeamsDTO.Result rs = new BusinessTeamsDTO.Result(); 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); return Result.success(rs);
} }
...@@ -173,6 +174,9 @@ public class BusinessTeamServiceImpl implements BusinessTeamService { ...@@ -173,6 +174,9 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
if (req.getWarehouseId() != null) { if (req.getWarehouseId() != null) {
entity.setWarehouseId(req.getWarehouseId()); entity.setWarehouseId(req.getWarehouseId());
} }
if (StringUtils.isNotBlank(req.getGroupId())) {
entity.setGroupId(req.getGroupId());
}
entity.setUpdateTime(LocalDateTime.now()); entity.setUpdateTime(LocalDateTime.now());
orgTeamDao.save(entity); orgTeamDao.save(entity);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!