From 08e23a7dc4b40897c4da67e83f53ab9ba65e61ed Mon Sep 17 00:00:00 2001 From: dhb52 Date: Mon, 15 Jan 2024 22:47:46 +0800 Subject: [PATCH] wip: style-fix --- .../yudao/module/crm/enums/ErrorCodeConstants.java | 2 +- .../crm/dal/mysql/customer/CrmCustomerMapper.java | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java index 4543fe856..f2ad2d6f9 100644 --- a/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java +++ b/yudao-module-crm/yudao-module-crm-api/src/main/java/cn/iocoder/yudao/module/crm/enums/ErrorCodeConstants.java @@ -85,6 +85,6 @@ public interface ErrorCodeConstants { ErrorCode FOLLOW_UP_RECORD_NOT_EXISTS = new ErrorCode(1_020_013_000, "跟进记录不存在"); // ========== 待办消息 1_020_014_000 ========== - ErrorCode BACKLOG_CONTACT_STATUS_ERROR = new ErrorCode(1_020_014_000, "客户联系状态有误"); + ErrorCode BACKLOG_CONTACT_STATUS_INVALID = new ErrorCode(1_020_014_000, "客户联系状态有误"); } diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/customer/CrmCustomerMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/customer/CrmCustomerMapper.java index 925bc8bf3..1c70b8267 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/customer/CrmCustomerMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/customer/CrmCustomerMapper.java @@ -7,23 +7,19 @@ import cn.iocoder.yudao.framework.mybatis.core.query.MPJLambdaWrapperX; import cn.iocoder.yudao.module.crm.controller.admin.backlog.vo.CrmTodayCustomerPageReqVO; import cn.iocoder.yudao.module.crm.controller.admin.customer.vo.CrmCustomerPageReqVO; import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO; -import cn.iocoder.yudao.module.crm.dal.dataobject.followup.CrmFollowUpRecordDO; import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum; import cn.iocoder.yudao.module.crm.util.CrmQueryWrapperUtils; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import org.apache.ibatis.annotations.Mapper; import org.springframework.lang.Nullable; -import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; -import java.time.temporal.TemporalUnit; import java.util.Collection; import java.util.List; -import java.util.concurrent.TimeUnit; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.BACKLOG_CONTACT_STATUS_ERROR; +import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.BACKLOG_CONTACT_STATUS_INVALID; /** * 客户 Mapper @@ -89,8 +85,8 @@ public interface CrmCustomerMapper extends BaseMapperX { query.selectAll(CrmCustomerDO.class); // 拼接自身的查询条件 - LocalDateTime beginOfToday = LocalDateTime.now().toLocalDate().atTime(LocalTime.MIN); - LocalDateTime endOfToday = LocalDateTime.now().toLocalDate().atTime(LocalTime.MAX); + LocalDateTime beginOfToday = LocalDateTime.now().toLocalDate().atTime(LocalTime.MIN); + LocalDateTime endOfToday = LocalDateTime.now().toLocalDate().atTime(LocalTime.MAX); if (pageReqVO.getContactStatus().equals(CrmTodayCustomerPageReqVO.CONTACT_TODAY)) { // 今天需联系 query.between(CrmCustomerDO::getContactNextTime, beginOfToday, endOfToday); @@ -101,7 +97,7 @@ public interface CrmCustomerMapper extends BaseMapperX { // 已联系 query.between(CrmCustomerDO::getContactLastTime, beginOfToday, endOfToday); } else { - throw exception(BACKLOG_CONTACT_STATUS_ERROR); + throw exception(BACKLOG_CONTACT_STATUS_INVALID); } return selectJoinPage(pageReqVO, CrmCustomerDO.class, query);