Browse Source

[招商][消息提醒]

release_toaliyun_real
Burce 6 years ago
parent
commit
b23f33df3e
3 changed files with 22 additions and 13 deletions
  1. +2
    -4
      mallinkService/src/main/java/com/iformall/domain/po/invest/InvestMessageEntity.java
  2. +9
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestPageResult.java
  3. +11
    -9
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java

+ 2
- 4
mallinkService/src/main/java/com/iformall/domain/po/invest/InvestMessageEntity.java View File

@@ -28,15 +28,13 @@ public class InvestMessageEntity extends InvestBaseEntity {
/**
* 数据主键ID
*/
@JsonIgnore
//@io.swagger.annotations.ApiModelProperty(value = "数据主键ID", name = "tid")
@io.swagger.annotations.ApiModelProperty(value = "数据主键ID", name = "tid")
private Long tid;

/**
* 数据类型:0-招商任务;1-客户需求
*/
@JsonIgnore
//@io.swagger.annotations.ApiModelProperty(value = "数据类型:0-招商任务;1-客户需求", name = "type")
@io.swagger.annotations.ApiModelProperty(value = "数据类型:0-招商任务;1-客户需求", name = "type")
private EnumFollowType type;
/**
* 消息内容


+ 9
- 0
mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestPageResult.java View File

@@ -27,5 +27,14 @@ public class InvestPageResult<T> {

private boolean hasNextPage = false ;

public Collection<T> getRecords() {
return records;
}

public void setRecords(Collection<T> records) {
this.records = records;
if (total > (records.size() + current * size)) {
hasNextPage = true;
}
}
}

+ 11
- 9
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java View File

@@ -340,15 +340,10 @@ public class InvestBizServiceImpl implements InvestBizService {
@Override
public boolean saveCustomerAndDemand(InvestDemandDto demandDto) {
InvestHelper.notNull(demandDto, demandDto.getCustomer(), demandDto.getDemand());
InvestCustomerEntity customerEntityDB = customerService.getByIdNotNull(demandDto.getCustomer().getId());
if (Objects.isNull(customerEntityDB)) {
customerEntityDB = demandDto.getCustomer();
customerService.save(customerEntityDB);
} else {
customerService.updateById(demandDto.getCustomer());
}
InvestCustomerEntity customerEntity = demandDto.getCustomer() ;
customerService.save(customerEntity);
InvestDemandEntity demandEntity = demandDto.getDemand();
demandEntity.setCustomerId(customerEntityDB.getId());
demandEntity.setCustomerId(customerEntity.getId());
return demandService.save(demandEntity);
}

@@ -356,9 +351,16 @@ public class InvestBizServiceImpl implements InvestBizService {
@Override
public boolean updateCustomerAndDemand(InvestDemandDto demandDto) {
InvestHelper.notNull(demandDto, demandDto.getCustomer(), demandDto.getDemand());
Long customerId = demandDto.getCustomer().getId();
if (Objects.isNull(customerId)) {
customerId = demandDto.getDemand().getCustomerId();
demandDto.getCustomer().setId(customerId);
}
customerService.updateById(demandDto.getCustomer());
InvestDemandEntity demandEntity = demandDto.getDemand();
demandEntity.setCustomerId(demandDto.getCustomer().getId());
if (Objects.isNull(demandEntity.getCustomerId())) {
demandEntity.setCustomerId(customerId);
}
return demandService.updateById(demandEntity);
}



Loading…
Cancel
Save