Parcourir la source

[招商]adjust

release_toaliyun_real
Burce il y a 6 ans
Parent
révision
312ddec80b
7 fichiers modifiés avec 44 ajouts et 19 suppressions
  1. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestDemandController.java
  2. +3
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestFollowRecordController.java
  3. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/invest/InvestRemindEntity.java
  4. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/invest/InvestTaskEntity.java
  5. +3
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestPageQuery.java
  6. +3
    -1
      mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java
  7. +32
    -13
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java

+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestDemandController.java Voir le fichier

@@ -43,7 +43,7 @@ public class InvestDemandController extends InvestBaseController {
@SystemServiceLog
@ApiOperation(value = "分页列表接口")
@GetMapping("/list")
public InvestResultData<InvestPageResult<InvestDemandVo>> list(InvestPageQuery<InvestDemandEntity> params) {
public InvestResultData<InvestPageResult<InvestDemandVo>> list(InvestPageQuery<InvestDemandDto> params) {
return execute(params, p -> investBizService.queryPageDemand(p));
}



+ 3
- 2
mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestFollowRecordController.java Voir le fichier

@@ -2,6 +2,7 @@ package com.iformall.controller.invest;

import com.iformall.common.InvestResultData;
import com.iformall.domain.po.invest.InvestFollowRecordEntity;
import com.iformall.domain.vo.invest.InvestFollowRecordVo;
import com.iformall.domain.vo.invest.InvestPageQuery;
import com.iformall.domain.vo.invest.InvestPageResult;
import com.iformall.service.invest.InvestBizService;
@@ -38,8 +39,8 @@ public class InvestFollowRecordController extends InvestBaseController {
*/
@ApiOperation("分页列表接口")
@GetMapping("/list")
public InvestResultData<InvestPageResult<InvestFollowRecordEntity>> list(InvestPageQuery<InvestFollowRecordEntity> params) {
return execute(params, p -> investFollowRecordService.queryPage(p));
public InvestResultData<InvestPageResult<InvestFollowRecordVo>> list(InvestPageQuery<InvestFollowRecordEntity> params) {
return execute(params, p -> bizService.queryPageFollowRecord(p));
}




+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/po/invest/InvestRemindEntity.java Voir le fichier

@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

import com.iformall.domain.po.invest.InvestBaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

@@ -28,6 +27,7 @@ public class InvestRemindEntity extends InvestBaseEntity {
/**
* 提醒内容
*/

@io.swagger.annotations.ApiModelProperty(value = "提醒内容", name = "content",example = "\"" +
"{" +
"\"text\": \"今天约了王老板,要求签订框架协议\"," +


+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/po/invest/InvestTaskEntity.java Voir le fichier

@@ -51,7 +51,7 @@ public class InvestTaskEntity extends InvestBaseEntity {
*/
@io.swagger.annotations.ApiModelProperty(value = "任务设定条件", name = "content",example = "\"{" +
"\"business\": 1," +
" \"lastDate\": \"2018-10-01 12:18:48\"" +
" \"lastDate\": \"2018-10-01 12:18:48\",\"contractId\":222222222222" +
"}\"")
private String content;



+ 3
- 0
mallinkService/src/main/java/com/iformall/domain/vo/invest/InvestPageQuery.java Voir le fichier

@@ -6,6 +6,9 @@ import java.util.List;

@Data
public class InvestPageQuery<T> {
public InvestPageQuery(T queryData) {
this.queryData = queryData;
}
@io.swagger.annotations.ApiModelProperty(value = "当前页", name = "pageNum", example = "1")
private Integer pageNum = 1;



+ 3
- 1
mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java Voir le fichier

@@ -11,7 +11,7 @@ import java.util.List;

public interface InvestBizService {

InvestPageResult<InvestDemandVo> queryPageDemand(InvestPageQuery<InvestDemandEntity> params);
InvestPageResult<InvestDemandVo> queryPageDemand(InvestPageQuery<InvestDemandDto> params);

InvestPageResult<InvestTaskVo> queryPageTask(InvestPageQuery<InvestTaskEntity> params);

@@ -26,4 +26,6 @@ public interface InvestBizService {
InvestDemandVo findDemandById(Long id) ;

InvestTaskVo findTaskById(Long id) ;

InvestFollowRecordVo findFollowRecordById(Long id) ;
}

+ 32
- 13
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java Voir le fichier

@@ -1,6 +1,8 @@
package com.iformall.service.invest.impl;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.iformall.domain.dto.InvestDemandDto;
import com.iformall.domain.po.*;
import com.iformall.domain.po.invest.InvestCustomerEntity;
@@ -44,13 +46,14 @@ public class InvestBizServiceImpl implements InvestBizService {
private MallUserInfoService userInfoService;

@Override
public InvestPageResult<InvestDemandVo> queryPageDemand(InvestPageQuery<InvestDemandEntity> params) {
InvestPageResult<InvestDemandEntity> demandPage = demandService.queryPage(params);
public InvestPageResult<InvestDemandVo> queryPageDemand(InvestPageQuery<InvestDemandDto> params) {
InvestDemandDto queryDemand = params.getQueryData();
InvestPageResult<InvestDemandEntity> demandPage = demandService.queryPage(new InvestPageQuery<>(queryDemand));
InvestPageResult<InvestDemandVo> investPage = new InvestPageResult<>();
if (CollectionUtils.isEmpty(demandPage.getRecords())) {
return investPage;
}
List<InvestDemandVo> resultList = getTargeInfoList(demandPage);
List<InvestDemandVo> resultList = getTargeInfoList(demandPage, queryDemand.getCustomer());
BeanUtils.copyProperties(demandPage, investPage);
investPage.setRecords(resultList);
return investPage;
@@ -107,14 +110,7 @@ public class InvestBizServiceImpl implements InvestBizService {
for (InvestFollowRecordEntity item : recordList) {
InvestCustomerEntity customerEntity = customerMap.get(item.getCustomerId());
WxBrand brand = brandMap.get(customerEntity.getBrandId());
List<MallUserInfo> ownerInfo = getMallUserInfos(usersMap, item);
InvestFollowRecordVo followRecordVo = new InvestFollowRecordVo();
followRecordVo.setCustomer(customerEntity);
followRecordVo.setMemberInfo(ownerInfo);
followRecordVo.setBrand(brand);
followRecordVo.setOwnerInfo(usersMap.get(item.getOwner()));
BeanUtils.copyProperties(item, followRecordVo);
resultList.add(followRecordVo);
resultList.add(buildFollowRecordItem(usersMap, item, customerEntity, brand));
}

BeanUtils.copyProperties(recordPage, investPage);
@@ -189,6 +185,27 @@ public class InvestBizServiceImpl implements InvestBizService {
return buildTaskItem(taskEntity, shop, usersMap);
}

@Override
public InvestFollowRecordVo findFollowRecordById(Long id) {
Map<Long, MallUserInfo> usersMap = getUserInfoMap();
InvestFollowRecordEntity followRecordEntity = followRecordService.getByIdNotNull(id);
InvestCustomerEntity customerEntity = customerService.getByIdNotNull(followRecordEntity.getCustomerId());
WxBrand brand = brandService.getById(customerEntity.getBrandId());
InvestFollowRecordVo followRecordVo = buildFollowRecordItem(usersMap, followRecordEntity, customerEntity, brand);
return followRecordVo;
}

private InvestFollowRecordVo buildFollowRecordItem(Map<Long, MallUserInfo> usersMap, InvestFollowRecordEntity item, InvestCustomerEntity customerEntity, WxBrand brand) {
List<MallUserInfo> ownerInfo = getMallUserInfos(usersMap, item);
InvestFollowRecordVo followRecordVo = new InvestFollowRecordVo();
followRecordVo.setCustomer(customerEntity);
followRecordVo.setMemberInfo(ownerInfo);
followRecordVo.setBrand(brand);
followRecordVo.setOwnerInfo(usersMap.get(item.getOwner()));
BeanUtils.copyProperties(item, followRecordVo);
return followRecordVo;
}

private InvestDemandVo buildDemindItem(InvestDemandEntity item, InvestCustomerEntity customer, WxBrand brand, WxShop shop, Map<Long, MallUserInfo> usersMap) {
InvestDemandVo resultItemVo = new InvestDemandVo();
resultItemVo.setBrand(brand);
@@ -224,10 +241,12 @@ public class InvestBizServiceImpl implements InvestBizService {
return ownerInfo;
}

private List<InvestDemandVo> getTargeInfoList(InvestPageResult<InvestDemandEntity> demandPage) {
private List<InvestDemandVo> getTargeInfoList(InvestPageResult<InvestDemandEntity> demandPage, InvestCustomerEntity queryCustomer) {
List<InvestDemandEntity> demandList = demandPage.getRecords();
//2、客户信息
Collection<InvestCustomerEntity> customers = getCustomers(demandList.stream().map(InvestDemandEntity::getCustomerId));
LambdaQueryWrapper<InvestCustomerEntity> customerWrapper = new LambdaQueryWrapper<>(queryCustomer);
customerWrapper.in(InvestCustomerEntity::getId, demandList.stream().map(InvestDemandEntity::getCustomerId));
Collection<InvestCustomerEntity> customers = customerService.list(new QueryWrapper<>(queryCustomer));
Map<Long, InvestCustomerEntity> customersMap = getCustomerMap(customers);

//3、目标信息


Chargement…
Annuler
Enregistrer