Просмотр исходного кода

[招商]adjust

release_toaliyun_real
Burce 6 лет назад
Родитель
Сommit
f33049e14c
3 измененных файлов: 34 добавлений и 3 удалений
  1. +0
    -3
      mallinkService/src/main/java/com/iformall/domain/po/invest/InvestCustomerEntity.java
  2. +2
    -0
      mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java
  3. +32
    -0
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java

+ 0
- 3
mallinkService/src/main/java/com/iformall/domain/po/invest/InvestCustomerEntity.java Просмотреть файл

@@ -1,8 +1,6 @@
package com.iformall.domain.po.invest;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;


@@ -11,7 +9,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.iformall.common.LogColumn;
import com.iformall.enums.EnumCustomerRatingType;
import com.iformall.enums.EnumCustomerType;
import com.iformall.enums.EnumInvestChannel;
import lombok.Data;
import lombok.EqualsAndHashCode;



+ 2
- 0
mallinkService/src/main/java/com/iformall/service/invest/InvestBizService.java Просмотреть файл

@@ -63,4 +63,6 @@ public interface InvestBizService {

InvestFollowRecordVo findFollowRecordById(Long id) ;

Map<String, Object> statistics();

}

+ 32
- 0
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java Просмотреть файл

@@ -1009,6 +1009,38 @@ public class InvestBizServiceImpl implements InvestBizService {
return buildFollowRecordItem(usersMap, followRecordEntity, customerEntity, brand);
}

@Override
public Map<String, Object> statistics() {
Map<String, Object> result = new HashMap<>();
if (Objects.isNull(InvestUserContext.getDataUser())) {
result.put("taskTotal", taskService.count(new LambdaQueryWrapper<InvestTaskEntity>()
.ge(InvestTaskEntity::getStatus, EnumTaskStatus.CREATED)
.eq(InvestTaskEntity::getTenantId, InvestUserContext.getUser().getTenantId())));
result.put("customerTotal", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>()
.ge(InvestCustomerEntity::getTenantId, InvestUserContext.getUser().getTenantId())));
result.put("taskToday", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>()
.apply("date_format(create_date,'%Y-%m-%d') = {0}", DateUtils.format(new Date()))
.eq(InvestCustomerEntity::getTenantId, InvestUserContext.getUser().getTenantId())));
result.put("customerImport", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>()
.eq(InvestCustomerEntity::getType, EnumCustomerType.INTENTIONAL)
.eq(InvestCustomerEntity::getTenantId, InvestUserContext.getUser().getTenantId())));
result.put("remindCount", remindService.count(new LambdaQueryWrapper<InvestRemindEntity>()
.ge(InvestRemindEntity::getTenantId, InvestUserContext.getUser().getTenantId())));
result.put("taskCreate", taskService.count(new LambdaQueryWrapper<InvestTaskEntity>()
.eq(InvestTaskEntity::getStatus, EnumTaskStatus.CREATED)
.eq(InvestTaskEntity::getTenantId, InvestUserContext.getUser().getTenantId())));
//result.put("customerCreate", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>()
// .eq(InvestCustomerEntity::getStatus, EnumTaskStatus.CREATED)));
} else {
result.put("taskTotal", taskService.count(new LambdaQueryWrapper<InvestTaskEntity>()
.ge(InvestTaskEntity::getStatus, EnumTaskStatus.CREATED)
.apply("`owner` REGEXP {0}", InvestUserContext.getUserId())));
result.put("customerTotal", demandService.count(new LambdaQueryWrapper<InvestDemandEntity>()
.ge(InvestDemandEntity::getOwner, InvestUserContext.getUser().getTenantId())));
}
return result;
}

private void syncTargetStatus(InvestTaskEntity investTaskEntity) {
//if (!Objects.equals(investTaskEntity.getTargetType(), EnumInvestType.RENT)) {
// return;


Загрузка…
Отмена
Сохранить