package com.muyu.pay.controller; import com.dtflys.forest.springboot.annotation.ForestScannerRegister; import com.muyu.common.core.domain.Result; import com.muyu.domain.OrderPayCustomer; import com.muyu.domain.req.CustomerListReq; import com.muyu.domain.resp.CustomerResp; import com.muyu.pay.service.OrderPayCustomerService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @RequestMapping("/customer") @Log4j2 @Tag(name = "客户控制层",description = "进行客户管理,查看等相关操作") public class OrderPayCustomerController { public OrderPayCustomerController (){ log.info("扫描路径{}", ForestScannerRegister.getBasePackages()); } @Autowired private OrderPayCustomerService orderPayCustomerService; /** * 查询所有用户 */ @RequestMapping(path = "/list",method = RequestMethod.POST) @Operation(summary = "查看客户" , description = "根据客户的名称,编码,是否开启等可以镜像客户的筛选") public Result> selectList(@Validated @RequestBody CustomerListReq customerListReq){ return Result.success( orderPayCustomerService.selectList(customerListReq) ); } @GetMapping("/all") @Operation(summary = "获取未接入的客户",description = "调用nacosAPI获取所有的微服务名称") @Schema(description = "获取未接入的客户",defaultValue = "客户1,客户2",type = "List") public Result> getCustomerAllList(){ return Result.success(orderPayCustomerService.getCustomerAllList()); } }