Browse Source

[招商][客户列表]

release_toaliyun_real
Burce 6 years ago
parent
commit
43952fd0aa
7 changed files with 28 additions and 10 deletions
  1. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestDemandQuery.java
  2. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestFollowQuery.java
  3. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestMessageQuery.java
  4. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestOperateRecordQuery.java
  5. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestRemindQuery.java
  6. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestTaskQuery.java
  7. +16
    -10
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java

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

@@ -2,8 +2,10 @@ package com.iformall.domain.vo.invest;

import com.iformall.enums.EnumCustomerType;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class InvestDemandQuery extends InvestPageQuery {

/**


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

@@ -2,8 +2,10 @@ package com.iformall.domain.vo.invest;

import com.iformall.enums.EnumFollowType;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class InvestFollowQuery extends InvestPageQuery {

/**


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

@@ -1,8 +1,10 @@
package com.iformall.domain.vo.invest;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class InvestMessageQuery extends InvestPageQuery {

/**


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

@@ -2,8 +2,10 @@ package com.iformall.domain.vo.invest;

import com.iformall.enums.EnumFollowType;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class InvestOperateRecordQuery extends InvestPageQuery {

/**


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

@@ -2,8 +2,10 @@ package com.iformall.domain.vo.invest;

import com.iformall.enums.EnumRemindDateType;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class InvestRemindQuery extends InvestPageQuery {

/**


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

@@ -2,8 +2,10 @@ package com.iformall.domain.vo.invest;

import com.iformall.enums.EnumTaskStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class InvestTaskQuery extends InvestPageQuery {

@io.swagger.annotations.ApiModelProperty(value="商铺编号",name="shopNumber")


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

@@ -64,21 +64,27 @@ public class InvestBizServiceImpl implements InvestBizService {
customerParams = queryParams.getCustomer();
demandParams = queryParams.getDemand();
}

InvestPageResult<InvestDemandVo> investPage = new InvestPageResult<>();

LambdaQueryWrapper<InvestDemandEntity> queryWrapperDemand = new LambdaQueryWrapper<>(demandParams);
InvestPageResult<InvestCustomerEntity> customers = customerService.queryPage(buildPageQuery(params, customerParams));
if (CollectionUtils.isEmpty(customers.getRecords())) {
return investPage;
List<InvestDemandEntity> demandList = demandService.list(new LambdaQueryWrapper<>(demandParams));
LambdaQueryWrapper<InvestCustomerEntity> queryWrapperCustomer = new LambdaQueryWrapper<>(customerParams);
InvestPageResult<InvestCustomerEntity> customers;
if (Objects.isNull(InvestUserContext.getDataUser())) {
queryWrapperCustomer.in(ObjectUtils.allNotNull(params.getDemandOwner()),InvestCustomerEntity::getId, getIds(demandList, InvestDemandEntity::getCustomerId));
} else {
if(CollectionUtils.isEmpty(demandList)) {
return investPage;
} else {
queryWrapperCustomer.in(InvestCustomerEntity::getId, getIds(demandList, InvestDemandEntity::getCustomerId));
}
}
queryWrapperDemand.in(InvestDemandEntity::getCustomerId, getIds(customers.getRecords(), InvestCustomerEntity::getId));

List<InvestDemandEntity> demandList = demandService.list(queryWrapperDemand);

customers = customerService.queryPage(buildPageQuery(params, null), queryWrapperCustomer);
List<InvestDemandVo> resultList = getTargeInfoList(demandList, customers.getRecords());
BeanUtils.copyProperties(customers, investPage);
investPage.setRecords(resultList);
if (CollectionUtils.isEmpty(customers.getRecords())) {
return investPage;
}

return investPage;
}



Loading…
Cancel
Save