|
|
|
@@ -8,6 +8,7 @@ import com.iformall.domain.dto.InvestDemandDto; |
|
|
|
import com.iformall.domain.dto.InvestTaskDto; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.po.invest.*; |
|
|
|
import com.iformall.domain.vo.WxShopVo; |
|
|
|
import com.iformall.domain.vo.invest.*; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.service.*; |
|
|
|
@@ -433,8 +434,12 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
InvestCustomerEntity customerEntity = customerService.getByIdNotNull(id); |
|
|
|
InvestDemandEntity demandEntity = demandService.getByCustomerId(customerEntity.getId()); |
|
|
|
WxBrand brand = brandService.getById(customerEntity.getBrandId()); |
|
|
|
WxShop shop = shopService.getById(demandEntity.getTargetId()); |
|
|
|
Map<Long, MallUserInfo> usersMap = getMap(this.queryUserList(null), MallUserInfo::getId); |
|
|
|
WxShop shop = null; |
|
|
|
Map<Long, MallUserInfo> usersMap = null; |
|
|
|
if (Objects.nonNull(demandEntity)) { |
|
|
|
shop = shopService.getById(demandEntity.getTargetId()); |
|
|
|
usersMap = getMap(this.queryUserList(null), MallUserInfo::getId); |
|
|
|
} |
|
|
|
return buildDemindItem(demandEntity, customerEntity, brand, shop, usersMap); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -442,8 +447,24 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
public InvestTaskVo findTaskById(Long id) { |
|
|
|
InvestTaskEntity taskEntity = taskService.getByIdNotNull(id); |
|
|
|
WxShop shop = shopService.getById(taskEntity.getTargetId()); |
|
|
|
WxShopVo shopVo = null; |
|
|
|
if (Objects.nonNull(shop)) { |
|
|
|
WxShop shopMapQuery = new WxShop(); |
|
|
|
shopMapQuery.setIds(Arrays.asList(taskEntity.getTargetId())); |
|
|
|
Collection<Map<String, Object>> shopMap = shopService.listMapAsPage(shopMapQuery, 1, 10).getList(); |
|
|
|
for (Map<String, Object> stringObjectMap : shopMap) { |
|
|
|
Long shopId = Long.valueOf(String.valueOf(stringObjectMap.get("id"))); |
|
|
|
if (Objects.nonNull(shop.getId())) { |
|
|
|
shopVo = new WxShopVo(); |
|
|
|
shopVo.setId(shopId); |
|
|
|
shopVo.setFloorName(String.valueOf(stringObjectMap.get("floor"))); |
|
|
|
shopVo.setBuildingName(String.valueOf(stringObjectMap.get("building"))); |
|
|
|
BeanUtils.copyProperties(shop, shopVo); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Map<Long, MallUserInfo> usersMap = getMap(this.queryUserList(null), MallUserInfo::getId); |
|
|
|
return buildTaskItem(taskEntity, shop, usersMap); |
|
|
|
return buildTaskItem(taskEntity, shopVo, usersMap); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@@ -457,7 +478,6 @@ public class InvestBizServiceImpl implements InvestBizService { |
|
|
|
remindVo.setBrand(brandService.getById(customerEntity.getBrandId())); |
|
|
|
} |
|
|
|
remindVo.setOwnerInfo(userInfoService.getById(remindEntity.getOwner())); |
|
|
|
|
|
|
|
return remindVo; |
|
|
|
} |
|
|
|
|
|
|
|
|