| @@ -211,7 +211,7 @@ public class CouponSendSchedule { | |||||
| /** | /** | ||||
| * 生日券发放 | * 生日券发放 | ||||
| */ | */ | ||||
| @Scheduled(cron = "0 30 15 * * ?") // 测试每天8:30点发券 | |||||
| @Scheduled(cron = "0 30 8 * * ?") // 测试每天8:30点发券 | |||||
| public void birthdayCouponSendSchedule() { | public void birthdayCouponSendSchedule() { | ||||
| logger.info("生日发券: 任务开始"); | logger.info("生日发券: 任务开始"); | ||||
| List<WxMall> mallList = wxMallMapper.findList(new WxMall()); | List<WxMall> mallList = wxMallMapper.findList(new WxMall()); | ||||
| @@ -34,8 +34,8 @@ public class InvestSchedule { | |||||
| InvestFollowRecordService followRecordService; | InvestFollowRecordService followRecordService; | ||||
| @Scheduled(cron = "0 0 14 * * ?") // 每天凌晨1点盘点前一天的数据 | |||||
| //@Scheduled(cron = "*/30 * * * * ?") // 测试10秒中一次 | |||||
| //@Scheduled(cron = "0 0 14 * * ?") // 每天下午两点执行定时任务 | |||||
| @Scheduled(cron = "0 */5 * * * *?") // 测试,每5分钟执行 | |||||
| public void messageSchedule() { | public void messageSchedule() { | ||||
| //一个月内未完成提醒 | //一个月内未完成提醒 | ||||
| taskMonthMessage(); | taskMonthMessage(); | ||||
| @@ -1,6 +1,5 @@ | |||||
| package com.iformall.service.invest; | package com.iformall.service.invest; | ||||
| import com.baomidou.mybatisplus.core.toolkit.StringUtils; | |||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||
| import com.google.common.collect.ImmutableListMultimap; | import com.google.common.collect.ImmutableListMultimap; | ||||
| import com.google.common.collect.Multimaps; | import com.google.common.collect.Multimaps; | ||||
| @@ -8,9 +7,8 @@ import com.iformall.common.ErrorCode; | |||||
| import com.iformall.domain.po.invest.InvestBaseEntity; | import com.iformall.domain.po.invest.InvestBaseEntity; | ||||
| import com.iformall.domain.vo.invest.InvestPageQuery; | import com.iformall.domain.vo.invest.InvestPageQuery; | ||||
| import com.iformall.exception.MallinkException; | import com.iformall.exception.MallinkException; | ||||
| import org.apache.commons.compress.utils.Lists; | |||||
| import org.apache.commons.lang3.StringUtils; | |||||
| import org.checkerframework.checker.nullness.qual.Nullable; | import org.checkerframework.checker.nullness.qual.Nullable; | ||||
| import org.springframework.util.CollectionUtils; | |||||
| import java.lang.reflect.Method; | import java.lang.reflect.Method; | ||||
| import java.text.MessageFormat; | import java.text.MessageFormat; | ||||
| @@ -32,7 +30,7 @@ public class InvestHelper { | |||||
| } | } | ||||
| private static void camelToUnderline(String sortColumn, String sortOrder, Page page) { | private static void camelToUnderline(String sortColumn, String sortOrder, Page page) { | ||||
| if (StringUtils.isEmpty(sortColumn)) { | |||||
| if (StringUtils.isBlank(sortColumn)) { | |||||
| return; | return; | ||||
| } | } | ||||
| if (Objects.equals(sortOrder, "desc")) { | if (Objects.equals(sortOrder, "desc")) { | ||||
| @@ -123,7 +121,7 @@ public class InvestHelper { | |||||
| @SuppressWarnings("unchecked") | @SuppressWarnings("unchecked") | ||||
| public static <T extends Enum<T>> T codeOf(Class enumType, String value) { | public static <T extends Enum<T>> T codeOf(Class enumType, String value) { | ||||
| if (StringUtils.isEmpty(value)) { | |||||
| if (StringUtils.isBlank(value)) { | |||||
| return null; | return null; | ||||
| } | } | ||||
| int code = Integer.parseInt(value); | int code = Integer.parseInt(value); | ||||
| @@ -111,8 +111,9 @@ public class InvestBaseServiceImpl<M extends BaseMapper<T>, T> extends ServiceIm | |||||
| LambdaQueryWrapper<InvestMessageEntity> queryWrapper = new LambdaQueryWrapper<>(); | LambdaQueryWrapper<InvestMessageEntity> queryWrapper = new LambdaQueryWrapper<>(); | ||||
| queryWrapper.eq(InvestMessageEntity::getType, type); | queryWrapper.eq(InvestMessageEntity::getType, type); | ||||
| queryWrapper.eq(InvestMessageEntity::getTid, tid); | queryWrapper.eq(InvestMessageEntity::getTid, tid); | ||||
| queryWrapper.eq(InvestMessageEntity::getTag,tag) ; | |||||
| queryWrapper.in(InvestMessageEntity::getOwner, ownerArray); | queryWrapper.in(InvestMessageEntity::getOwner, ownerArray); | ||||
| List<InvestMessageEntity> before = messageService.list(); | |||||
| List<InvestMessageEntity> before = messageService.list(queryWrapper); | |||||
| Map<Long,InvestMessageEntity> map = InvestHelper.getMap(before,InvestMessageEntity::getOwner) ; | Map<Long,InvestMessageEntity> map = InvestHelper.getMap(before,InvestMessageEntity::getOwner) ; | ||||
| List<InvestMessageEntity> messageEntityList = new ArrayList<>(); | List<InvestMessageEntity> messageEntityList = new ArrayList<>(); | ||||
| for (Long aLong : ownerArray) { | for (Long aLong : ownerArray) { | ||||
| @@ -70,7 +70,8 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| LambdaQueryWrapper<InvestCustomerEntity> queryWrapperCustomer = new LambdaQueryWrapper<>(customerParams); | LambdaQueryWrapper<InvestCustomerEntity> queryWrapperCustomer = new LambdaQueryWrapper<>(customerParams); | ||||
| InvestPageResult<InvestCustomerEntity> customers; | InvestPageResult<InvestCustomerEntity> customers; | ||||
| if (Objects.isNull(InvestUserContext.getDataUser())) { | if (Objects.isNull(InvestUserContext.getDataUser())) { | ||||
| queryWrapperCustomer.in(ObjectUtils.allNotNull(params.getDemandOwner()),InvestCustomerEntity::getId, getIds(demandList, InvestDemandEntity::getCustomerId)); | |||||
| queryWrapperCustomer.in(ObjectUtils.allNotNull(params.getDemandOwner()), | |||||
| InvestCustomerEntity::getId, getIds(demandList, InvestDemandEntity::getCustomerId)); | |||||
| } else { | } else { | ||||
| if(CollectionUtils.isEmpty(demandList)) { | if(CollectionUtils.isEmpty(demandList)) { | ||||
| return investPage; | return investPage; | ||||
| @@ -504,7 +505,7 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| if (count > 0) { | if (count > 0) { | ||||
| investTaskEntity.setStatus(EnumTaskStatus.INTENTION); | investTaskEntity.setStatus(EnumTaskStatus.INTENTION); | ||||
| } else { | } else { | ||||
| if (StringUtils.isNotEmpty(investTaskEntity.getOwner())) { | |||||
| if (StringUtils.isNotBlank(investTaskEntity.getOwner())) { | |||||
| investTaskEntity.setStatus(EnumTaskStatus.NEGOTIATING); | investTaskEntity.setStatus(EnumTaskStatus.NEGOTIATING); | ||||
| } | } | ||||
| } | } | ||||
| @@ -54,7 +54,7 @@ public class InvestTaskServiceImpl extends InvestBaseServiceImpl<InvestTaskDao, | |||||
| private void saveMessage(InvestTaskEntity entity) { | private void saveMessage(InvestTaskEntity entity) { | ||||
| String owner = entity.getOwner(); | String owner = entity.getOwner(); | ||||
| if (StringUtils.isNotEmpty(owner)) { | |||||
| if (StringUtils.isNotBlank(owner)) { | |||||
| List<Long> ownerArray = JSONArray.parseArray(owner, Long.class); | List<Long> ownerArray = JSONArray.parseArray(owner, Long.class); | ||||
| this.saveBatchMessage(ownerArray, EnumInvestMessageType.TASK_CREATE.getInfo(), EnumInvestMessageTag.TASK_CREATE, EnumFollowType.TASK, entity.getId()); | this.saveBatchMessage(ownerArray, EnumInvestMessageType.TASK_CREATE.getInfo(), EnumInvestMessageTag.TASK_CREATE, EnumFollowType.TASK, entity.getId()); | ||||
| } | } | ||||