Przeglądaj źródła

[招商][概览]

release_toaliyun_real
Burce 6 lat temu
rodzic
commit
9323d0e8ae
2 zmienionych plików z 17 dodań i 9 usunięć
  1. +1
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestBaseController.java
  2. +16
    -9
      mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java

+ 1
- 0
mallinkAdmin/src/main/java/com/iformall/controller/invest/InvestBaseController.java Wyświetl plik

@@ -30,6 +30,7 @@ public class InvestBaseController extends BaseController {
super.InitBinder(dataBinder);
registerEnumEditor(dataBinder, EnumCustomerType.class, "customerType") ;
registerEnumEditor(dataBinder, EnumCustomerRatingType.class, "customerRatingType") ;
registerEnumEditor(dataBinder, EnumCustomerRatingType.class, "rating") ;
registerEnumEditor(dataBinder, EnumTaskStatus.class, "taskStatus") ;
registerEnumEditor(dataBinder, EnumFollowType.class, "type") ;
}


+ 16
- 9
mallinkService/src/main/java/com/iformall/service/invest/impl/InvestBizServiceImpl.java Wyświetl plik

@@ -518,7 +518,7 @@ public class InvestBizServiceImpl implements InvestBizService {
InvestPageResult<InvestTaskVo> investPage = new InvestPageResult<>();
taskQueryWrapper.apply(StringUtils.isNotBlank(taskParams.getOwner()), "`owner` REGEXP {0}", taskParams.getOwner());
taskQueryWrapper.apply(Objects.nonNull(params.getBusinessId()), "`content` REGEXP {0}",
String.format("\"businessId\": %d", params.getBusinessId()));
buildBusinessQuery(params));
taskParams.setOwner(null);
taskQueryWrapper.setEntity(taskParams);

@@ -567,6 +567,13 @@ public class InvestBizServiceImpl implements InvestBizService {
return investPage;
}

private String buildBusinessQuery(InvestTaskQuery params) {
if (params.getBusinessId() <= 10) {
return String.format("\"businessId\": %d[^1%d]", params.getBusinessId(), params.getBusinessId());
}
return String.format("\"businessId\": %d", params.getBusinessId());
}

private Collection<Long> buildShopContractQuery(Collection<WxShop> shops, EnumRentShopType shopType) {
Collection<Long> shopIds = new ArrayList<>();
if (CollectionUtils.isNotEmpty(shops)) {
@@ -699,10 +706,10 @@ public class InvestBizServiceImpl implements InvestBizService {
}

private String getDayEnd(Date date) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
calendar.add(Calendar.DAY_OF_YEAR, 1);
return DateUtils.format(calendar.getTime());
//Calendar calendar = Calendar.getInstance();
//calendar.setTime(date);
//calendar.add(Calendar.DAY_OF_YEAR, 1);
return DateUtils.format(date);
}

private String getDayStart(Date date) {
@@ -1041,11 +1048,11 @@ public class InvestBizServiceImpl implements InvestBizService {
.eq(InvestTaskEntity::getTenantId, InvestUserContext.getUser().getTenantId())));
result.put("customerTotal", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>()
.eq(InvestCustomerEntity::getTenantId, InvestUserContext.getUser().getTenantId())));
result.put("taskToday", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>()
result.put("customerToday", 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("customerImportant", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>()
.eq(InvestCustomerEntity::getType, EnumCustomerType.INTENTIONAL)
.in(InvestCustomerEntity::getType, EnumCustomerType.POTENTIAL,EnumCustomerType.INTENTIONAL)
.eq(InvestCustomerEntity::getTenantId, InvestUserContext.getUser().getTenantId())));
result.put("remindTotal", remindService.count(new LambdaQueryWrapper<InvestRemindEntity>()
.eq(InvestRemindEntity::getTenantId, InvestUserContext.getUser().getTenantId())));
@@ -1061,10 +1068,10 @@ public class InvestBizServiceImpl implements InvestBizService {
.apply("`owner` REGEXP {0}", InvestUserContext.getUserId())));
result.put("customerTotal", demandService.count(new LambdaQueryWrapper<InvestDemandEntity>()
.eq(InvestDemandEntity::getOwner, InvestUserContext.getUser().getTenantId())));
result.put("taskToday", customerService.count(new LambdaQueryWrapper<InvestCustomerEntity>()
result.put("taskToday", taskService.count(new LambdaQueryWrapper<InvestTaskEntity>()
.apply("`owner` REGEXP {0}", InvestUserContext.getUserId())
.apply("date_format(create_date,'%Y-%m-%d') = {0}", DateUtils.format(new Date()))
.eq(InvestCustomerEntity::getTenantId, InvestUserContext.getUser().getTenantId())));
.eq(InvestTaskEntity::getTenantId, InvestUserContext.getUser().getTenantId())));
result.put("customerToday", demandService.count(new LambdaQueryWrapper<InvestDemandEntity>()
.eq(InvestDemandEntity::getOwner, InvestUserContext.getUser().getTenantId())
.apply("date_format(create_date,'%Y-%m-%d') = {0}", DateUtils.format(new Date()))


Ładowanie…
Anuluj
Zapisz