Commit 248678283d188583e51887c18f7afa7f96b9f362

Authored by 夏天
1 parent b5de742c

查询保有客档案sdk

fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/api/CustomerApiService.java
@@ -243,5 +243,16 @@ public interface CustomerApiService { @@ -243,5 +243,16 @@ public interface CustomerApiService {
243 @GetMapping("/query/vehicle/by/vin") 243 @GetMapping("/query/vehicle/by/vin")
244 Message<MemberVehicleDTO> queryVehicle(@RequestParam("vin") String vin); 244 Message<MemberVehicleDTO> queryVehicle(@RequestParam("vin") String vin);
245 245
  246 + /**
  247 + * 查询保有客数量
  248 + *
  249 + * @param req 查询参数
  250 + * @return 保有客数量
  251 + */
  252 + @PostMapping("/query/cus/cnt")
  253 + Message<List<CusCntResult>> queryCusCnt(@RequestBody CusCntReq req);
  254 +
  255 +
  256 +
246 257
247 } 258 }
fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/param/CusCntReq.java 0 → 100644
  1 +package cn.fw.valhalla.sdk.param;
  2 +
  3 +import lombok.Data;
  4 +
  5 +import javax.validation.constraints.NotNull;
  6 +
  7 +import java.util.List;
  8 +
  9 +/**
  10 + * 查询保有客数量
  11 + *
  12 + * @author xiatian
  13 + */
  14 +@Data
  15 +public class CusCntReq {
  16 +
  17 + /**
  18 + * 门店id集合
  19 + */
  20 + private List<Long> shopIds;
  21 +
  22 + /**
  23 + * 顾问id集合
  24 + */
  25 + private List<Long> adviserIds;
  26 +}
fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/result/CusCntResult.java 0 → 100644
  1 +package cn.fw.valhalla.sdk.result;
  2 +
  3 +import lombok.Data;
  4 +
  5 +/**
  6 + * @author xiatian
  7 + * @date 2023-05-12
  8 + */
  9 +@Data
  10 +public class CusCntResult {
  11 + /**
  12 + * 门店id或人员id
  13 + */
  14 + private Long id;
  15 + /**
  16 + * 数量
  17 + */
  18 + private Integer cnt;
  19 +}
fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/api/CustomerApiServiceImpl.java
@@ -19,9 +19,8 @@ import org.springframework.beans.factory.annotation.Autowired; @@ -19,9 +19,8 @@ import org.springframework.beans.factory.annotation.Autowired;
19 import org.springframework.web.bind.annotation.*; 19 import org.springframework.web.bind.annotation.*;
20 20
21 import javax.validation.Valid; 21 import javax.validation.Valid;
22 -import java.util.ArrayList;  
23 -import java.util.List;  
24 -import java.util.Objects; 22 +
  23 +import java.util.*;
25 24
26 import static cn.fw.common.businessvalidator.Validator.BV; 25 import static cn.fw.common.businessvalidator.Validator.BV;
27 import static cn.fw.common.web.util.ResultBuilder.success; 26 import static cn.fw.common.web.util.ResultBuilder.success;
@@ -277,4 +276,11 @@ public class CustomerApiServiceImpl implements CustomerApiService { @@ -277,4 +276,11 @@ public class CustomerApiServiceImpl implements CustomerApiService {
277 public Message<MemberVehicleDTO> queryVehicle(@RequestParam("vin") final String vin) { 276 public Message<MemberVehicleDTO> queryVehicle(@RequestParam("vin") final String vin) {
278 return success(customerBiz.queryVehicleByVin(vin)); 277 return success(customerBiz.queryVehicleByVin(vin));
279 } 278 }
  279 +
  280 + @Override
  281 + @PostMapping("/query/cus/cnt")
  282 + @ControllerMethod("查询保有客户数量")
  283 + public Message<List<CusCntResult>> queryCusCnt(@RequestBody final CusCntReq req) {
  284 + return success();
  285 + }
280 } 286 }