瀏覽代碼

[招商]adjust

release_toaliyun_real
Burce 6 年之前
父節點
當前提交
e7565c271d
共有 5 個文件被更改,包括 24 次插入6 次删除
  1. +1
    -1
      mallinkService/src/main/java/com/iformall/domain/po/invest/InvestFollowRecordEntity.java
  2. +2
    -0
      mallinkService/src/main/java/com/iformall/domain/po/invest/InvestTaskEntity.java
  3. +7
    -0
      mallinkService/src/main/java/com/iformall/service/invest/event/InvestListener.java
  4. +12
    -3
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java
  5. +2
    -2
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestOperateRecordServiceImpl.java

+ 1
- 1
mallinkService/src/main/java/com/iformall/domain/po/invest/InvestFollowRecordEntity.java 查看文件

@@ -19,7 +19,7 @@ import lombok.EqualsAndHashCode;
@TableName("invest_follow_record")
@EqualsAndHashCode(callSuper = true)
public class InvestFollowRecordEntity extends InvestBaseEntity {
public static final String KEY_MEMBER = "member" ;
/**
* 主谈人
*/


+ 2
- 0
mallinkService/src/main/java/com/iformall/domain/po/invest/InvestTaskEntity.java 查看文件

@@ -24,6 +24,8 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = true)
public class InvestTaskEntity extends InvestBaseEntity {

public static final String KEY_CONTRACTID = "contractId" ;

/**
* 负责人
*/


+ 7
- 0
mallinkService/src/main/java/com/iformall/service/invest/event/InvestListener.java 查看文件

@@ -7,7 +7,9 @@ import com.iformall.domain.vo.RentEventInfo;
import com.iformall.enums.EnumInvestType;
import com.iformall.enums.EnumRentContractStatus;
import com.iformall.enums.EnumTaskStatus;
import com.iformall.service.invest.InvestHelper;
import com.iformall.service.invest.InvestTaskService;
import com.iformall.utils.JsonUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -15,6 +17,7 @@ import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
import java.util.Objects;

@Slf4j
@@ -50,6 +53,10 @@ public class InvestListener implements ApplicationListener<InvestEvent> {

for (InvestTaskEntity task : tasks) {
task.setStatus(status);
String content = task.getContent();
Map contentMap = JSON.parseObject(content, Map.class);
contentMap.put(InvestTaskEntity.KEY_CONTRACTID, rentEventInfo.getRentId());
task.setContent(JsonUtil.obj2Json(contentMap));
}
taskService.updateBatchById(tasks);
}


+ 12
- 3
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java 查看文件

@@ -13,6 +13,7 @@ import com.iformall.service.WxBrandService;
import com.iformall.service.WxShopService;
import com.iformall.service.invest.*;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -106,9 +107,7 @@ public class InvestBizServiceImpl implements InvestBizService {
for (InvestFollowRecordEntity item : recordList) {
InvestCustomerEntity customerEntity = customerMap.get(item.getCustomerId());
WxBrand brand = brandMap.get(customerEntity.getBrandId());
Map<String, Object> followContent = (Map<String, Object>) JSON.parseObject(item.getContent(), Map.class);
String followMember = (String) followContent.get("member");
List<MallUserInfo> ownerInfo = getMallUserInfos(followMember, usersMap);
List<MallUserInfo> ownerInfo = getMallUserInfos(usersMap, item);
InvestFollowRecordVo followRecordVo = new InvestFollowRecordVo();
followRecordVo.setCustomer(customerEntity);
followRecordVo.setMemberInfo(ownerInfo);
@@ -124,6 +123,16 @@ public class InvestBizServiceImpl implements InvestBizService {
return investPage;
}

private List<MallUserInfo> getMallUserInfos(Map<Long, MallUserInfo> usersMap, InvestFollowRecordEntity item) {
List<MallUserInfo> ownerInfo = null ;
Map contentMap = JSON.parseObject(item.getContent(),Map.class);
if (MapUtils.isNotEmpty(contentMap)) {
String followMember = (String) contentMap.get(InvestFollowRecordEntity.KEY_MEMBER);
ownerInfo = getMallUserInfos(followMember, usersMap);
}
return ownerInfo;
}

@Override
public List<MallUserInfo> queryUserList() {
MallUserInfo query = new MallUserInfo();


+ 2
- 2
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestOperateRecordServiceImpl.java 查看文件

@@ -18,8 +18,8 @@ public class InvestOperateRecordServiceImpl extends InvestBaseServiceImpl<Invest
}

void checkBeforeSaveOrUpdate(InvestOperateRecordEntity entity) {
InvestHelper.notNull(entity.getTbl(), "");
InvestHelper.notNull(entity.getTid(), "");
InvestHelper.notNull(entity.getTbl());
InvestHelper.notNull(entity.getTid());
entity.setOperator(InvestUserContext.getUserId());
}



Loading…
取消
儲存