feat():新增列表查询
parent
9cb17eb3f0
commit
a48c68db23
|
@ -1,7 +1,9 @@
|
||||||
package com.muyu.cloud.pay;
|
package com.muyu.cloud.pay;
|
||||||
|
|
||||||
|
import com.dtflys.forest.springboot.annotation.ForestScan;
|
||||||
import com.muyu.common.security.annotation.EnableCustomConfig;
|
import com.muyu.common.security.annotation.EnableCustomConfig;
|
||||||
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
import com.muyu.common.security.annotation.EnableMyFeignClients;
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@ -12,6 +14,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
* @name:MuYuPayApplication
|
* @name:MuYuPayApplication
|
||||||
* @Date:2024/7/29 17:08
|
* @Date:2024/7/29 17:08
|
||||||
*/
|
*/
|
||||||
|
@Log4j2
|
||||||
|
@ForestScan(basePackages = "com.muyu.common.remote")
|
||||||
@EnableCustomConfig
|
@EnableCustomConfig
|
||||||
@EnableMyFeignClients
|
@EnableMyFeignClients
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
package com.muyu.cloud.pay;
|
||||||
|
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||||
|
import org.springframework.boot.SpringApplicationRunListener;
|
||||||
|
import org.springframework.context.ConfigurableApplicationContext;
|
||||||
|
import org.springframework.core.env.ConfigurableEnvironment;
|
||||||
|
|
||||||
|
import java.time.Duration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author:zhangchengzhi
|
||||||
|
* @Package:com.muyu.cloud.pay
|
||||||
|
* @Project:cloud-pay
|
||||||
|
* @name:MySpringApplicationRunlistener
|
||||||
|
* @Date:2024/8/5 19:57
|
||||||
|
*/
|
||||||
|
@Log4j2
|
||||||
|
public class MySpringApplicationRunlistener implements SpringApplicationRunListener {
|
||||||
|
|
||||||
|
|
||||||
|
public MySpringApplicationRunlistener() {
|
||||||
|
log.info("MySpringApplicationRunlistener");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void starting(ConfigurableBootstrapContext bootstrapContext) {
|
||||||
|
log.info("执行:{}","starting");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void environmentPrepared(ConfigurableBootstrapContext bootstrapContext, ConfigurableEnvironment environment) {
|
||||||
|
log.info("执行:{}","starting");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void contextPrepared(ConfigurableApplicationContext context) {
|
||||||
|
log.info("执行:{}","starting");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void contextLoaded(ConfigurableApplicationContext context) {
|
||||||
|
log.info("执行:{}","starting");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void started(ConfigurableApplicationContext context, Duration timeTaken) {
|
||||||
|
log.info("执行:{}","starting");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ready(ConfigurableApplicationContext context, Duration timeTaken) {
|
||||||
|
log.info("执行:{}","starting");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void failed(ConfigurableApplicationContext context, Throwable exception) {
|
||||||
|
log.info("执行:{}","starting");
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,5 @@
|
||||||
package com.muyu.cloud.pay.controller;
|
package com.muyu.cloud.pay.controller;
|
||||||
|
|
||||||
import com.muyu.cloud.pay.domain.OrderPayCustomer;
|
|
||||||
import com.muyu.cloud.pay.domain.req.CustomerListReq;
|
import com.muyu.cloud.pay.domain.req.CustomerListReq;
|
||||||
import com.muyu.cloud.pay.domain.resp.CustomerResp;
|
import com.muyu.cloud.pay.domain.resp.CustomerResp;
|
||||||
import com.muyu.cloud.pay.service.OrderPayCustomerService;
|
import com.muyu.cloud.pay.service.OrderPayCustomerService;
|
||||||
|
@ -35,41 +34,35 @@ public class OrderPayCustomerController {
|
||||||
private final OrderPayCustomerService orderPayCustomerService;
|
private final OrderPayCustomerService orderPayCustomerService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*查询所有的客户
|
* 查询所有的客户
|
||||||
|
*
|
||||||
* @param customerListReq 客户列表请求参数
|
* @param customerListReq 客户列表请求参数
|
||||||
* @return 客户列表
|
* @return 客户列表
|
||||||
*/
|
*/
|
||||||
@RequestMapping(path = "/list",method = RequestMethod.POST)
|
@RequestMapping(path = "/list", method = RequestMethod.POST)
|
||||||
@Operation(summary = "查看客户",description = "根据客户的名称,编码,是否开启等可以进行客户的筛选")
|
@Operation(summary = "查看客户", description = "根据客户的名称,编码,是否开启等可以进行客户的筛选")
|
||||||
public Result<List<CustomerResp>> selectList(@Validated @RequestBody CustomerListReq customerListReq){
|
public Result<List<CustomerResp>> selectList(@Validated @RequestBody CustomerListReq customerListReq) {
|
||||||
|
|
||||||
return Result.success(orderPayCustomerService.selectList(customerListReq));
|
return Result.success(orderPayCustomerService.selectList(customerListReq));
|
||||||
};
|
}
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有客户的
|
* 获取所有客户的
|
||||||
|
*
|
||||||
* @return 客户集合
|
* @return 客户集合
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@GetMapping("/all")
|
@GetMapping("/all")
|
||||||
@Operation(summary = "获取未接入的客户",description = "调用nacosAPI获取所有的微服务名称,作为支付中台的客户")
|
@Operation(summary = "获取未接入的客户", description = "调用nacosAPI获取所有的微服务名称,作为支付中台的客户")
|
||||||
@Schema(description = "获取未接入的客户",defaultValue = "[\"客户1\",\"客户2\"]",type = "List")
|
@Schema(description = "获取未接入的客户", defaultValue = "[\"客户1\",\"客户2\"]", type = "List")
|
||||||
public Result<List<String>> getCustomerAllList(){
|
public Result<List<String>> getCustomerAllList() {
|
||||||
|
|
||||||
return Result.success(
|
|
||||||
orderPayCustomerService.getCustomerAllList()
|
|
||||||
);//客户业务层
|
|
||||||
|
|
||||||
|
return Result.success(
|
||||||
|
orderPayCustomerService.getCustomerAllList()
|
||||||
|
);//客户业务层
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue