启动类添加注解

master
张腾 2024-08-09 01:05:54 +08:00
parent 88b67b81f4
commit af09e26538
3 changed files with 82 additions and 6 deletions

View File

@ -0,0 +1,71 @@
package com.muyu.cloud.pay.domain.req;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author
* @Packagecom.muyu.cloud.pay.domain.req
* @Projectcloud-pay
* @nameCustomerAddReq
* @Date2024/8/9 0:15
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Tag(name = "支付服务客户请求对象",description = "根据入参进行服务的添加")
public class CustomerAddReq {
/**
*
*/
@NotEmpty(message = "服务/客户名称不可为空")
@Schema(
title = "服务客户名称",
description = "客户名称一般为微服务详细中文名称,方便使用者区分",
type = "String",
defaultValue = "会员服务",
requiredProperties = {"appName"}
)
private String appName;
/**
* /
*/
@NotBlank(message = "服务/客户编码不可为空")
@Schema(
title = "客户编码",
description = "客户编码为微服务的namespace名称",
type = "String",
defaultValue = "muyu-vip",
requiredProperties = {"appCode"}
)
private String appCode;
/**
*
*/
@Schema(title = "客户描述",type = "String")
private String appDesc;
/**
*
*/
@Schema(
title = "开通状态",description = "状态为Y和N 如果为Y客户可以使用支付接口为N则不可以使用客户接口",
type = "String",defaultValue = "Y"
)
private String status;
/**
*
*/
@Schema(title = "客户备注",type = "String")
private String remark;
}

View File

@ -1,6 +1,8 @@
package com.muyu.cloud.pay.controller;
import com.dtflys.forest.springboot.annotation.ForestScannerRegister;
import com.muyu.cloud.pay.domain.OrderPayCustomer;
import com.muyu.cloud.pay.domain.req.CustomerAddReq;
import com.muyu.cloud.pay.domain.req.CustomerListReq;
import com.muyu.cloud.pay.domain.resp.CustomerListResp;
import com.muyu.cloud.pay.service.OrderPayCustomerService;
@ -33,6 +35,9 @@ public class OrderPayCustomerController {
@Autowired
private OrderPayCustomerService orderPayCustomerService;
public OrderPayCustomerController(){
log.info("forest{}扫描路径", ForestScannerRegister.getBasePackages());
}
@RequestMapping(path = "/list",method = RequestMethod.POST)
@Operation(summary = "查看客户",description = "根据客户的名称,编码,是否开启等可以进行客户的筛选")
public Result<List<CustomerListResp>> selectList(
@ -55,4 +60,10 @@ public class OrderPayCustomerController {
orderPayCustomerService.getCustomerAllList()
);
}
@PostMapping
@Operation(summary = "添加客户信息",description = "添加支付平台客户信息,添加成功后可以使用支付信息")
public Result<String> save(@Validated @RequestBody CustomerAddReq customerAddReq){
return Result.success();
}
}

View File

@ -37,12 +37,6 @@ public class OrderPayCustomerServiceImpl
@Autowired
private NacosServerService nacosServerService;
public OrderPayCustomerServiceImpl() {
List<String> basePackages = ForestScannerRegister.getBasePackages();
for (String basePackage : basePackages) {
log.info("===>"+basePackage);
}
}
@Override
public List<CustomerListResp> selectList(CustomerListReq req) {