feat():测试

master
Number7 2024-08-09 09:33:43 +08:00
parent 4a42089361
commit b0df4d5a5f
3 changed files with 83 additions and 1 deletions

View File

@ -113,7 +113,7 @@ public class OrderPayCustomerController {
* @return * @return
*/ */
@DeleteMapping("/{orderCustomerId}") @DeleteMapping("/{orderCustomerId}")
@Operation(summary = "客户信息删除",description ="通过ID删除客户信息" ) @Operation(summary = "客户信息删除",description ="通过ID删除客户信息,七天内存在支付相关记录的客户,不可进行删除" )
public Result<String> delete(@PathVariable("orderCustomerId") Long orderCustomerId){ public Result<String> delete(@PathVariable("orderCustomerId") Long orderCustomerId){
orderPayCustomerService.removeById(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,"操作成功");
}
} }

View File

@ -26,4 +26,23 @@ public interface OrderPayCustomerService extends IService<OrderPayCustomer>{
*/ */
List<String> getCustomerAllList(); 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);
} }

View File

@ -10,6 +10,7 @@ import com.muyu.cloud.pay.domain.resp.CustomerResp;
import com.muyu.cloud.pay.mapper.OrderPayCustomerMapper; import com.muyu.cloud.pay.mapper.OrderPayCustomerMapper;
import com.muyu.cloud.pay.service.OrderPayCustomerService; import com.muyu.cloud.pay.service.OrderPayCustomerService;
import com.muyu.cloud.pay.service.OrderPayService; 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.core.exception.ServiceException;
import com.muyu.common.nacos.service.NacosServerService; import com.muyu.common.nacos.service.NacosServerService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
@ -103,6 +104,38 @@ public class OrderPayCustomerServiceImpl
return nacosServerAllList.stream() return nacosServerAllList.stream()
.filter(nacosServer -> !customerSet.contains(nacosServer)) .filter(nacosServer -> !customerSet.contains(nacosServer))
.toList(); .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){
} }
/** /**