diff --git a/fw-valhalla-common/src/main/java/cn/fw/valhalla/common/utils/MessageFormatUtil.java b/fw-valhalla-common/src/main/java/cn/fw/valhalla/common/utils/MessageFormatUtil.java index cc8e10e..4dbfdb3 100644 --- a/fw-valhalla-common/src/main/java/cn/fw/valhalla/common/utils/MessageFormatUtil.java +++ b/fw-valhalla-common/src/main/java/cn/fw/valhalla/common/utils/MessageFormatUtil.java @@ -1,8 +1,8 @@ package cn.fw.valhalla.common.utils; import java.text.MessageFormat; +import java.time.LocalDate; import java.util.ArrayList; -import java.util.Date; import java.util.List; /** @@ -25,7 +25,9 @@ public class MessageFormatUtil { } public static void main(String[] args) { - System.out.println("示例:" + MessageFormatTransfer("crm:valhalla:save:lock:key:{0}:{1}", 11111L, new Date())); + // System.out.println("示例:" + MessageFormatTransfer("crm:valhalla:save:lock:key:{0}:{1}", 11111L, new Date())); + + System.out.println(LocalDate.now().plusYears(0)); } } diff --git a/fw-valhalla-dao/src/main/java/cn/fw/valhalla/dao/mapper/CustomerMapper.java b/fw-valhalla-dao/src/main/java/cn/fw/valhalla/dao/mapper/CustomerMapper.java index e24811a..01b1f14 100644 --- a/fw-valhalla-dao/src/main/java/cn/fw/valhalla/dao/mapper/CustomerMapper.java +++ b/fw-valhalla-dao/src/main/java/cn/fw/valhalla/dao/mapper/CustomerMapper.java @@ -1,13 +1,15 @@ package cn.fw.valhalla.dao.mapper; import cn.fw.valhalla.domain.db.customer.Customer; +import cn.fw.valhalla.domain.dto.CustomerDetailDto; import cn.fw.valhalla.domain.dto.StammkundeAnalyseDTO; +import cn.fw.valhalla.domain.query.CustomCustomerQuery; +import cn.fw.valhalla.domain.query.CustomerQueryVO; import cn.fw.valhalla.domain.query.StammkundeAnalyseQueryVO; +import cn.fw.valhalla.domain.vo.customer.CustomerListVO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; -import cn.fw.valhalla.domain.vo.customer.CustomerListVO; -import cn.fw.valhalla.domain.query.CustomerQueryVO; import java.util.List; @@ -31,8 +33,17 @@ public interface CustomerMapper extends BaseMapper { /** * 查询指定条件的客户 + * * @param queryVO * @return */ List analyseList(@Param("condition") StammkundeAnalyseQueryVO queryVO); + + /** + * 查询自定义参数的档案信息 + * + * @param query + * @return + */ + List queryCustomList(@Param("condition") CustomCustomerQuery query); } diff --git a/fw-valhalla-dao/src/main/resources/mapper/CustomerMapper.xml b/fw-valhalla-dao/src/main/resources/mapper/CustomerMapper.xml index 47e104c..8aa5328 100644 --- a/fw-valhalla-dao/src/main/resources/mapper/CustomerMapper.xml +++ b/fw-valhalla-dao/src/main/resources/mapper/CustomerMapper.xml @@ -130,4 +130,93 @@ and t2.lng <= #{condition.maxLng} + + diff --git a/fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/query/CustomCustomerQuery.java b/fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/query/CustomCustomerQuery.java new file mode 100644 index 0000000..e7c2950 --- /dev/null +++ b/fw-valhalla-domain/src/main/java/cn/fw/valhalla/domain/query/CustomCustomerQuery.java @@ -0,0 +1,35 @@ +package cn.fw.valhalla.domain.query; + + +import lombok.Data; + +import java.time.LocalDate; +import java.util.List; + +/** + * @author : kurisu + * @className : CustomCustomerQuery + * @description : + * @date: 2022-01-10 17:46 + */ +@Data +public class CustomCustomerQuery { + + private Integer minMileage; + private Integer maxMileage; + private LocalDate minBuyDate; + private LocalDate maxBuyDate; + private Integer level; + + + private boolean andCondition; + + + private Integer customerType; + + private Long groupId; + + private Integer followType; + private String frameNo; + private List shopList; +} diff --git a/fw-valhalla-sdk/pom.xml b/fw-valhalla-sdk/pom.xml index 8700aa6..f90e2e0 100644 --- a/fw-valhalla-sdk/pom.xml +++ b/fw-valhalla-sdk/pom.xml @@ -10,7 +10,7 @@ ../pom.xml fw-valhalla-sdk - 1.1.4 + 1.1.5 jar fw-valhalla-sdk diff --git a/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/api/ValhallaGeneralApiService.java b/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/api/ValhallaGeneralApiService.java index fea4294..92aa6a0 100644 --- a/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/api/ValhallaGeneralApiService.java +++ b/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/api/ValhallaGeneralApiService.java @@ -1,12 +1,15 @@ package cn.fw.valhalla.sdk.api; import cn.fw.data.base.domain.common.Message; +import cn.fw.valhalla.sdk.param.CustomerQueryReq; import cn.fw.valhalla.sdk.param.ReachLogReq; +import cn.fw.valhalla.sdk.result.CustomerSimpleInfoDto; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import javax.validation.Valid; +import java.util.List; /** * @author : kurisu @@ -18,9 +21,19 @@ import javax.validation.Valid; public interface ValhallaGeneralApiService { /** * 保存进站记录 + * * @param reachLogReq * @return */ @PostMapping("/reach/save") Message saveReachLog(@Valid @RequestBody ReachLogReq reachLogReq); + + /** + * 查询保有客档案信息 + * + * @param customerQueryReq + * @return + */ + @PostMapping("/query/customer/list") + Message> queryCustomList(@RequestBody CustomerQueryReq customerQueryReq); } diff --git a/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/enums/CustomerFollowTypeEnum.java b/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/enums/CustomerFollowTypeEnum.java new file mode 100644 index 0000000..e5d0088 --- /dev/null +++ b/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/enums/CustomerFollowTypeEnum.java @@ -0,0 +1,76 @@ +package cn.fw.valhalla.sdk.enums; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.Getter; + +/** + * @author : kurisu + * @className : CustomerFollowTypeEnum + * @description : 跟进类型 + * @date: 2022-01-10 17:37 + */ +public enum CustomerFollowTypeEnum { + /** + * 例保 + */ + RM(2, "流失客户"), + /** + * 续保 + */ + IR(4, "续保"), + ; + + /** + * 值 + */ + private final Integer value; + /** + * 名称 + */ + @Getter + private final String name; + + CustomerFollowTypeEnum(final Integer value, final String name) { + this.value = value; + this.name = name; + } + + /** + * 根据枚举值获取枚举对象 + */ + @JsonCreator + public static CustomerFollowTypeEnum ofValue(final Integer value) { + for (final CustomerFollowTypeEnum typeEnum : CustomerFollowTypeEnum.values()) { + if (typeEnum.value.equals(value)) { + return typeEnum; + } + } + return null; + } + + /** + * 获取描述 + * + * @return 值 + */ + @JsonCreator + public static String getNameByVale(final Integer value) { + for (final CustomerFollowTypeEnum typeEnum : CustomerFollowTypeEnum.values()) { + if (typeEnum.value.equals(value)) { + return typeEnum.getName(); + } + } + return ""; + } + + /** + * 获取值 + * + * @return 值 + */ + @JsonValue + public Integer getValue() { + return value; + } +} diff --git a/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/param/CustomerQueryReq.java b/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/param/CustomerQueryReq.java new file mode 100644 index 0000000..9ebb3c8 --- /dev/null +++ b/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/param/CustomerQueryReq.java @@ -0,0 +1,150 @@ +package cn.fw.valhalla.sdk.param; + +import cn.fw.valhalla.sdk.enums.CustomerFollowTypeEnum; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Arrays; +import java.util.List; + + +/** + * @author : kurisu + * @className : CustomerQueryReq + * @description : 保有客查询参数 + * @date: 2022-01-10 14:59 + */ +@ToString +@EqualsAndHashCode +public class CustomerQueryReq implements Serializable { + private static final long serialVersionUID = 2363764577856885L; + + /** + * 进站里程 + * 单位km 最多指会取前两个元素 + */ + private Integer[] arrivalMileage; + + /** + * 车辆年限 + * 向上取整 + */ + private Integer[] ageLimit; + + /** + * 客户星级 + */ + private Integer level; + /** + * 是否是 并且条件 + * 反之就是或者 + */ + private boolean andCondition; + + + /** + * (以下独立于 andCondition 都是取并且) + * 保有客类型 (暂无) + */ + @Deprecated + private Integer customerType; + + @NotNull(message = "集团id不能为空") + private Long groupId; + + /** + * 保有客跟进类型 + */ + private CustomerFollowTypeEnum followType; + /** + * 车架号 + */ + private String frameNo; + + /** + * 门店id列表 + */ + private List shopList; + + public Integer getCustomerType() { + return customerType; + } + + public void setCustomerType(Integer customerType) { + this.customerType = customerType; + } + + public CustomerFollowTypeEnum getFollowType() { + return followType; + } + + public void setFollowType(CustomerFollowTypeEnum followType) { + this.followType = followType; + } + + public Integer[] getArrivalMileage() { + return arrivalMileage; + } + + public void setArrivalMileage(Integer... arrivalMileage) { + if (arrivalMileage != null && arrivalMileage.length > 2) { + this.arrivalMileage = Arrays.copyOfRange(arrivalMileage, 0, 2); + return; + } + this.arrivalMileage = arrivalMileage; + } + + public Integer[] getAgeLimit() { + return ageLimit; + } + + public void setAgeLimit(Integer... ageLimit) { + if (ageLimit != null && ageLimit.length > 2) { + this.ageLimit = Arrays.copyOfRange(ageLimit, 0, 2); + return; + } + this.ageLimit = ageLimit; + } + + public Integer getLevel() { + return level; + } + + public void setLevel(Integer level) { + this.level = level; + } + + public boolean isAndCondition() { + return andCondition; + } + + public void setAndCondition(boolean andCondition) { + this.andCondition = andCondition; + } + + public String getFrameNo() { + return frameNo; + } + + public void setFrameNo(String frameNo) { + this.frameNo = frameNo; + } + + public List getShopList() { + return shopList; + } + + public void setShopList(List shopList) { + this.shopList = shopList; + } + + public Long getGroupId() { + return groupId; + } + + public void setGroupId(Long groupId) { + this.groupId = groupId; + } +} diff --git a/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/result/CustomerSimpleInfoDto.java b/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/result/CustomerSimpleInfoDto.java new file mode 100644 index 0000000..719c0d4 --- /dev/null +++ b/fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/result/CustomerSimpleInfoDto.java @@ -0,0 +1,110 @@ +package cn.fw.valhalla.sdk.result; + +import lombok.Data; + +import java.util.Date; + +/** + * @author kurisu + * @date 2020-08-27 + */ +@Data +public class CustomerSimpleInfoDto { + private Long id; + /** + * 会员id + */ + private Long memberId; + /** + * 车牌号 + */ + private String plateNo; + /** + * 车架号 + */ + private String frameNo; + /** + * 发动机编号 + */ + private String engineNo; + /** + * 行驶证注册日期 + */ + private Date regDate; + /** + * 车型代码 + */ + private String specCode; + /** + * 品牌id + */ + private Long brandId; + /** + * 品牌名称 + */ + private String brandName; + /** + * 车系id + */ + private Long seriesId; + /** + * 车系名称 + */ + private String seriesName; + /** + * 车系id + */ + private Long specId; + /** + * 车系名称 + */ + private String specName; + /** + * 车辆图片 + */ + private String carImage; + /** + * 标签 + */ + private String tags; + /** + * 客户星级 + */ + private Integer cusLevel; + /** + * 姓名 + */ + private String name; + /** + * 联系电话 + */ + private String mobile; + /** + * 保险到期日期 + */ + private Date insuranceExpireDate; + /** + * 当前行驶里程 单位KM + */ + private Integer currentMileage; + /** + * 购车时间 + */ + private Date buyDate; + /** + * 所属服务站id + */ + private Long shopId; + /** + * 所属商家id + */ + private Long dealerId; + /** + * 所属集团 + */ + private Long groupId; + /** + * 专属服务顾问id + */ + private Long adviserId; +} \ No newline at end of file diff --git a/fw-valhalla-server/src/main/java/cn/fw/valhalla/ValhallaApplication.java b/fw-valhalla-server/src/main/java/cn/fw/valhalla/ValhallaApplication.java index 60c6bc3..6eca472 100644 --- a/fw-valhalla-server/src/main/java/cn/fw/valhalla/ValhallaApplication.java +++ b/fw-valhalla-server/src/main/java/cn/fw/valhalla/ValhallaApplication.java @@ -26,7 +26,7 @@ import org.springframework.scheduling.annotation.EnableScheduling; @EnableAutoConfiguration @Configuration @EnableRedisRepositories -@MapperScan("cn.fw.**.mapper") +@MapperScan("cn.fw.valhalla.dao.mapper") @ComponentScan({"cn.fw.valhalla.*"}) @EnableFeignClients({"cn.fw.**.sdk", "cn.fw.flow.api"}) @EnableConfigurationProperties({UrlProperty.class}) diff --git a/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/api/ValhallaGeneralApiServiceImpl.java b/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/api/ValhallaGeneralApiServiceImpl.java index fbacc63..6fe3471 100644 --- a/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/api/ValhallaGeneralApiServiceImpl.java +++ b/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/api/ValhallaGeneralApiServiceImpl.java @@ -2,10 +2,15 @@ package cn.fw.valhalla.controller.api; import cn.fw.common.web.annotation.ControllerMethod; import cn.fw.data.base.domain.common.Message; +import cn.fw.valhalla.domain.dto.CustomerDetailDto; import cn.fw.valhalla.sdk.api.ValhallaGeneralApiService; +import cn.fw.valhalla.sdk.param.CustomerQueryReq; import cn.fw.valhalla.sdk.param.ReachLogReq; +import cn.fw.valhalla.sdk.result.CustomerSimpleInfoDto; import cn.fw.valhalla.service.bus.ReachLogBizService; +import cn.fw.valhalla.service.bus.cust.CustomerBizService; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -13,6 +18,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; +import java.util.ArrayList; +import java.util.List; import static cn.fw.common.web.util.ResultBuilder.success; @@ -28,10 +35,16 @@ import static cn.fw.common.web.util.ResultBuilder.success; public class ValhallaGeneralApiServiceImpl implements ValhallaGeneralApiService { private final ReachLogBizService reachLogBizService; + /** + * 保有客数据服务 + */ + private final CustomerBizService customerBiz; @Autowired - public ValhallaGeneralApiServiceImpl(final ReachLogBizService reachLogBizService) { + public ValhallaGeneralApiServiceImpl(final ReachLogBizService reachLogBizService, + final CustomerBizService customerBiz) { this.reachLogBizService = reachLogBizService; + this.customerBiz = customerBiz; } @PostMapping("/reach/save") @@ -41,4 +54,18 @@ public class ValhallaGeneralApiServiceImpl implements ValhallaGeneralApiService reachLogBizService.saveReachLog(reachLogReq); return success(); } + + @Override + @PostMapping("/query/customer/list") + @ControllerMethod("查询保有客档案列表") + public Message> queryCustomList(@Valid @RequestBody CustomerQueryReq customerQueryReq) { + List list = customerBiz.queryCustomList(customerQueryReq); + List dtoList = new ArrayList<>(); + for (CustomerDetailDto customer : list) { + CustomerSimpleInfoDto dto = new CustomerSimpleInfoDto(); + BeanUtils.copyProperties(customer, dto); + dtoList.add(dto); + } + return success(dtoList); + } } diff --git a/fw-valhalla-server/src/main/resources/application-local.yml b/fw-valhalla-server/src/main/resources/application-local.yml index 6ca689d..7d121a1 100644 --- a/fw-valhalla-server/src/main/resources/application-local.yml +++ b/fw-valhalla-server/src/main/resources/application-local.yml @@ -4,7 +4,7 @@ logging: max-size: 1GB level: root: info - cn.fw: info + cn.fw: debug org.zalando.logbook: trace nacos: plugin: diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/cust/CustomerBizService.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/cust/CustomerBizService.java index 8988a47..b4e4af7 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/cust/CustomerBizService.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/bus/cust/CustomerBizService.java @@ -16,6 +16,7 @@ import cn.fw.valhalla.domain.db.pool.PublicPool; import cn.fw.valhalla.domain.db.pool.StammkundePool; import cn.fw.valhalla.domain.dto.CustomerDetailDto; import cn.fw.valhalla.domain.enums.*; +import cn.fw.valhalla.domain.query.CustomCustomerQuery; import cn.fw.valhalla.domain.query.CustomerQueryVO; import cn.fw.valhalla.domain.query.StammkundeAnalyseQueryVO; import cn.fw.valhalla.domain.vo.customer.*; @@ -31,6 +32,7 @@ import cn.fw.valhalla.rpc.member.dto.MemberUserDTO; import cn.fw.valhalla.rpc.oop.dto.ShopDTO; import cn.fw.valhalla.rpc.oop.dto.SpecDTO; import cn.fw.valhalla.sdk.param.CustomerParams; +import cn.fw.valhalla.sdk.param.CustomerQueryReq; import cn.fw.valhalla.sdk.result.CustomerInfoDto; import cn.fw.valhalla.sdk.result.ReceptionResultDto; import cn.fw.valhalla.service.bus.StammkundeBizService; @@ -84,6 +86,7 @@ public class CustomerBizService extends AbstractCustomerService { private final SettingBizService settingBizService; private final FollowRecordService followRecordService; private final StammkundeBizService stammkundeBizService; + private final FollowTaskService followTaskService; @Value("${spring.cache.custom.global-prefix}:customer") @Getter @@ -349,6 +352,19 @@ public class CustomerBizService extends AbstractCustomerService { } /** + * 根据自定义条件查询保有客档案 + * + * @param queryReq + * @return + */ + public List queryCustomList(final CustomerQueryReq queryReq) { + + CustomCustomerQuery query = fillParams(queryReq); + + return customerService.queryCustomList(query); + } + + /** * 根据手机号查询所有档案 * * @param mobile @@ -780,4 +796,38 @@ public class CustomerBizService extends AbstractCustomerService { vo.setPeriods(loanInfo.getPeriods()); } } + + private CustomCustomerQuery fillParams(final CustomerQueryReq queryReq) { + CustomCustomerQuery query = new CustomCustomerQuery(); + BeanUtils.copyProperties(queryReq, query); + + + if (queryReq.getArrivalMileage() != null && queryReq.getArrivalMileage().length > 0) { + for (int i = 0; i < queryReq.getArrivalMileage().length; i++) { + if (i == 0) { + query.setMinMileage(queryReq.getArrivalMileage()[i]); + } + if (i == 1) { + query.setMaxMileage(queryReq.getArrivalMileage()[i]); + } + } + } + + if (queryReq.getAgeLimit() != null && queryReq.getAgeLimit().length > 0) { + for (int i = 0; i < queryReq.getAgeLimit().length; i++) { + if (i == 0) { + query.setMaxBuyDate(LocalDate.now().plusYears(-1L * queryReq.getAgeLimit()[i])); + } + if (i == 1) { + query.setMinBuyDate(LocalDate.now().plusYears(-1L * queryReq.getAgeLimit()[i])); + } + } + } + + if (Objects.nonNull(queryReq.getFollowType())) { + query.setFollowType(queryReq.getFollowType().getValue()); + } + + return query; + } } diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/CustomerService.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/CustomerService.java index 1fe39b1..ab885dd 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/CustomerService.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/CustomerService.java @@ -1,7 +1,9 @@ package cn.fw.valhalla.service.data; import cn.fw.valhalla.domain.db.customer.Customer; +import cn.fw.valhalla.domain.dto.CustomerDetailDto; import cn.fw.valhalla.domain.dto.StammkundeAnalyseDTO; +import cn.fw.valhalla.domain.query.CustomCustomerQuery; import cn.fw.valhalla.domain.query.CustomerQueryVO; import cn.fw.valhalla.domain.query.StammkundeAnalyseQueryVO; import cn.fw.valhalla.domain.vo.customer.CustomerListVO; @@ -110,4 +112,12 @@ public interface CustomerService extends IService { * @return */ List analyseList(StammkundeAnalyseQueryVO queryVO); + + /** + * 查询自定义参数的档案信息 + * + * @param query + * @return + */ + List queryCustomList(CustomCustomerQuery query); } diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/FollowTaskService.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/FollowTaskService.java index 9268613..bfb7de9 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/FollowTaskService.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/FollowTaskService.java @@ -56,4 +56,13 @@ public interface FollowTaskService extends IService { * @return */ FollowTask queryOngoingTaskByClueId(Long clueId); + + /** + * 查询是否有正在进行中的跟进任务 + * + * @param customerId + * @param followType + * @return + */ + boolean hasOngoingTask(Long customerId, Integer followType); } diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/CustomerServiceImpl.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/CustomerServiceImpl.java index 2e4f4b2..d1987e2 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/CustomerServiceImpl.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/CustomerServiceImpl.java @@ -2,7 +2,9 @@ package cn.fw.valhalla.service.data.impl; import cn.fw.valhalla.dao.mapper.CustomerMapper; import cn.fw.valhalla.domain.db.customer.Customer; +import cn.fw.valhalla.domain.dto.CustomerDetailDto; import cn.fw.valhalla.domain.dto.StammkundeAnalyseDTO; +import cn.fw.valhalla.domain.query.CustomCustomerQuery; import cn.fw.valhalla.domain.query.CustomerQueryVO; import cn.fw.valhalla.domain.query.StammkundeAnalyseQueryVO; import cn.fw.valhalla.domain.vo.customer.CustomerListVO; @@ -17,7 +19,6 @@ import org.springframework.util.CollectionUtils; import java.util.ArrayList; import java.util.List; -import java.util.Objects; import java.util.Optional; /** @@ -119,4 +120,9 @@ public class CustomerServiceImpl extends ServiceImpl i List list = this.getBaseMapper().analyseList(queryVO); return Optional.ofNullable(list).orElse(new ArrayList<>()); } + + @Override + public List queryCustomList(CustomCustomerQuery query) { + return Optional.ofNullable(getBaseMapper().queryCustomList(query)).orElse(new ArrayList<>()); + } } diff --git a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/FollowTaskServiceImpl.java b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/FollowTaskServiceImpl.java index 4fd3419..960a612 100644 --- a/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/FollowTaskServiceImpl.java +++ b/fw-valhalla-service/src/main/java/cn/fw/valhalla/service/data/impl/FollowTaskServiceImpl.java @@ -3,11 +3,9 @@ package cn.fw.valhalla.service.data.impl; import cn.fw.valhalla.dao.mapper.FollowTaskMapper; import cn.fw.valhalla.domain.db.follow.FollowTask; import cn.fw.valhalla.domain.dto.FollowPoolDTO; -import cn.fw.valhalla.domain.dto.StammkundeAnalyseDTO; import cn.fw.valhalla.domain.enums.FollowTypeEnum; import cn.fw.valhalla.domain.enums.TaskStateEnum; import cn.fw.valhalla.domain.query.FollowPoolQueryVO; -import cn.fw.valhalla.domain.query.StammkundeAnalyseQueryVO; import cn.fw.valhalla.service.data.FollowTaskService; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -67,4 +65,13 @@ public class FollowTaskServiceImpl extends ServiceImpllambdaQuery() + .eq(FollowTask::getCustomerId, customerId) + .eq(FollowTask::getState, TaskStateEnum.ONGOING) + .eq(FollowTask::getType, followType) + ) > 0; + } } diff --git a/pom.xml b/pom.xml index b4cc041..b67816b 100644 --- a/pom.xml +++ b/pom.xml @@ -117,7 +117,7 @@ cn.fw fw-valhalla-sdk - 1.1.4 + 1.1.5 cn.fw