Commit 1f07ac69188baa790c6fc54d38a77407b85fc378

Authored by 张志伟
1 parent 25558a59

:sparkles: 新增查询数量接口

fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/app/CustomerController.java
... ... @@ -25,10 +25,7 @@ import javax.validation.constraints.NotBlank;
25 25 import javax.validation.constraints.NotNull;
26 26 import java.util.List;
27 27  
28   -import static cn.fw.common.web.util.ExceptionHandler.handleException;
29   -import static cn.fw.common.web.util.ResultBuilder.failureWithMessage;
30 28 import static cn.fw.common.web.util.ResultBuilder.success;
31   -import static cn.fw.valhalla.common.constant.MessageStr.SAVE_FAILURE;
32 29  
33 30 /**
34 31 * @author : kurisu
... ...
fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/erp/CustomerController.java 0 → 100644
  1 +package cn.fw.valhalla.controller.erp;
  2 +
  3 +import cn.fw.common.web.annotation.ControllerMethod;
  4 +import cn.fw.data.base.domain.common.Message;
  5 +import cn.fw.security.auth.client.annotation.Authorization;
  6 +import cn.fw.security.auth.client.annotation.IgnoreUserToken;
  7 +import cn.fw.security.auth.client.enums.AuthType;
  8 +import cn.fw.valhalla.domain.dto.CustomerDetailDto;
  9 +import cn.fw.valhalla.sdk.param.CustomerQueryReq;
  10 +import cn.fw.valhalla.service.bus.cust.CustomerBizService;
  11 +import lombok.RequiredArgsConstructor;
  12 +import lombok.extern.slf4j.Slf4j;
  13 +import org.springframework.validation.annotation.Validated;
  14 +import org.springframework.web.bind.annotation.GetMapping;
  15 +import org.springframework.web.bind.annotation.RequestBody;
  16 +import org.springframework.web.bind.annotation.RequestMapping;
  17 +import org.springframework.web.bind.annotation.RestController;
  18 +
  19 +import javax.validation.Valid;
  20 +import java.util.List;
  21 +
  22 +import static cn.fw.common.web.util.ResultBuilder.success;
  23 +
  24 +/**
  25 + * @author : kurisu
  26 + * @className : CustomerController
  27 + * @description : 档案控制器
  28 + * @date: 2020-08-12 15:30
  29 + */
  30 +@Slf4j
  31 +@Validated
  32 +@RestController
  33 +@Authorization(AuthType.ERP)
  34 +@RequiredArgsConstructor
  35 +@RequestMapping("/erp/customer")
  36 +public class CustomerController {
  37 + private final CustomerBizService customerBizService;
  38 +
  39 +
  40 + @GetMapping("/condition/count")
  41 + @IgnoreUserToken
  42 + @ControllerMethod("查询满足条件的档案数量")
  43 + public Message<Number> conditionCustomerCount(@Valid @RequestBody CustomerQueryReq customerQueryReq) {
  44 + List<CustomerDetailDto> list = customerBizService.queryCustomList(customerQueryReq);
  45 + return success(list.size());
  46 + }
  47 +}
... ...