From 1f07ac69188baa790c6fc54d38a77407b85fc378 Mon Sep 17 00:00:00 2001 From: Kurisu Date: Mon, 14 Feb 2022 10:00:28 +0800 Subject: [PATCH] :sparkles: 新增查询数量接口 --- fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/app/CustomerController.java | 3 --- fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/erp/CustomerController.java | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/erp/CustomerController.java diff --git a/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/app/CustomerController.java b/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/app/CustomerController.java index d5c27d6..963ecbc 100644 --- a/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/app/CustomerController.java +++ b/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/app/CustomerController.java @@ -25,10 +25,7 @@ import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.util.List; -import static cn.fw.common.web.util.ExceptionHandler.handleException; -import static cn.fw.common.web.util.ResultBuilder.failureWithMessage; import static cn.fw.common.web.util.ResultBuilder.success; -import static cn.fw.valhalla.common.constant.MessageStr.SAVE_FAILURE; /** * @author : kurisu diff --git a/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/erp/CustomerController.java b/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/erp/CustomerController.java new file mode 100644 index 0000000..86b2835 --- /dev/null +++ b/fw-valhalla-server/src/main/java/cn/fw/valhalla/controller/erp/CustomerController.java @@ -0,0 +1,47 @@ +package cn.fw.valhalla.controller.erp; + +import cn.fw.common.web.annotation.ControllerMethod; +import cn.fw.data.base.domain.common.Message; +import cn.fw.security.auth.client.annotation.Authorization; +import cn.fw.security.auth.client.annotation.IgnoreUserToken; +import cn.fw.security.auth.client.enums.AuthType; +import cn.fw.valhalla.domain.dto.CustomerDetailDto; +import cn.fw.valhalla.sdk.param.CustomerQueryReq; +import cn.fw.valhalla.service.bus.cust.CustomerBizService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; +import java.util.List; + +import static cn.fw.common.web.util.ResultBuilder.success; + +/** + * @author : kurisu + * @className : CustomerController + * @description : 档案控制器 + * @date: 2020-08-12 15:30 + */ +@Slf4j +@Validated +@RestController +@Authorization(AuthType.ERP) +@RequiredArgsConstructor +@RequestMapping("/erp/customer") +public class CustomerController { + private final CustomerBizService customerBizService; + + + @GetMapping("/condition/count") + @IgnoreUserToken + @ControllerMethod("查询满足条件的档案数量") + public Message conditionCustomerCount(@Valid @RequestBody CustomerQueryReq customerQueryReq) { + List list = customerBizService.queryCustomList(customerQueryReq); + return success(list.size()); + } +} -- libgit2 0.22.2