feat():测试
parent
4a42089361
commit
b0df4d5a5f
|
@ -113,7 +113,7 @@ public class OrderPayCustomerController {
|
|||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("/{orderCustomerId}")
|
||||
@Operation(summary = "客户信息删除",description ="通过ID删除客户信息" )
|
||||
@Operation(summary = "客户信息删除",description ="通过ID删除客户信息,七天内存在支付相关记录的客户,不可进行删除" )
|
||||
public Result<String> delete(@PathVariable("orderCustomerId") Long orderCustomerId){
|
||||
|
||||
orderPayCustomerService.removeById(orderCustomerId);
|
||||
|
@ -133,4 +133,34 @@ public class OrderPayCustomerController {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过ID禁用客户
|
||||
* @param orderCustomerId ID
|
||||
* @return 禁用结果
|
||||
*/
|
||||
@GetMapping("/disable/{orderCustomerId}")
|
||||
@Operation(summary = "通过ID禁用客户",description = "通过ID禁用客户,禁用之后禁止调用支付相关接口")
|
||||
public Result<String> disable(@PathVariable("orderCustomerId") Long orderCustomerId){
|
||||
|
||||
this.orderPayCustomerService.disable(orderCustomerId);
|
||||
return Result.success(null,"操作成功");
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过ID启用客户
|
||||
* @param orderCustomerId ID
|
||||
* @return 启用结果
|
||||
*/
|
||||
@GetMapping("/enable/{orderCustomerId}")
|
||||
@Operation(summary = "通过ID启用客户",description = "通过ID启用客户,启用之后可以进行支付相关接口的调用")
|
||||
public Result<String> enable(@PathVariable("orderCustomerId") Long orderCustomerId){
|
||||
|
||||
this.orderPayCustomerService.enable(orderCustomerId);
|
||||
return Result.success(null,"操作成功");
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -26,4 +26,23 @@ public interface OrderPayCustomerService extends IService<OrderPayCustomer>{
|
|||
*/
|
||||
List<String> getCustomerAllList();
|
||||
|
||||
/**
|
||||
* 禁用客户
|
||||
* @param orderCustomerId 客户ID
|
||||
*/
|
||||
void disable(Long orderCustomerId);
|
||||
|
||||
/**
|
||||
* 启用客户
|
||||
* @param orderCustomerId 客户ID
|
||||
*/
|
||||
void enable(Long orderCustomerId);
|
||||
|
||||
|
||||
/**
|
||||
* 通过客户ID设置客户状态
|
||||
* @param orderCustomerId ID
|
||||
* @param status 状态 SysIsYesNo
|
||||
*/
|
||||
void settingStatus(Long orderCustomerId,String status);
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.muyu.cloud.pay.domain.resp.CustomerResp;
|
|||
import com.muyu.cloud.pay.mapper.OrderPayCustomerMapper;
|
||||
import com.muyu.cloud.pay.service.OrderPayCustomerService;
|
||||
import com.muyu.cloud.pay.service.OrderPayService;
|
||||
import com.muyu.common.core.enums.SystemYesNo;
|
||||
import com.muyu.common.core.exception.ServiceException;
|
||||
import com.muyu.common.nacos.service.NacosServerService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
|
@ -103,6 +104,38 @@ public class OrderPayCustomerServiceImpl
|
|||
return nacosServerAllList.stream()
|
||||
.filter(nacosServer -> !customerSet.contains(nacosServer))
|
||||
.toList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用客户
|
||||
*
|
||||
* @param orderCustomerId 客户ID
|
||||
*/
|
||||
@Override
|
||||
public void disable(Long orderCustomerId) {
|
||||
|
||||
|
||||
// this.settingStatus(orderCustomerId,SystemYesNo.);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用客户
|
||||
*
|
||||
* @param orderCustomerId 客户ID
|
||||
*/
|
||||
@Override
|
||||
public void enable(Long orderCustomerId) {
|
||||
|
||||
this.settingStatus(orderCustomerId,SystemYesNo.YES.getCode());
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void settingStatus(Long orderCustomerId,String status){
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue