feat():修复接口相关逻辑
parent
3465b4805d
commit
06f0afceec
|
@ -117,6 +117,30 @@ public class OrderPayCustomerController {
|
|||
public Result<OrderPayCustomer> findById(@PathVariable("orderCustomerId") Long orderCustomerId){
|
||||
return Result.success(orderPayCustomerService.getById(orderCustomerId),"操作成功");
|
||||
}
|
||||
/**
|
||||
* 通过ID禁用客户
|
||||
* @param orderCustomerId ID
|
||||
* @return 禁用结果
|
||||
*/
|
||||
@GetMapping("/enable/{orderCustomerId}")
|
||||
@Operation(summary = "通过ID禁用客户",description = "通过ID禁用客户,禁用之后禁止调用支付相关接口")
|
||||
public Result<String> disable(@PathVariable("orderCustomerId") Long orderCustomerId){
|
||||
this.orderPayCustomerService.deisable(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,"操作成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -22,4 +22,23 @@ public interface OrderPayCustomerService extends IService<OrderPayCustomer> {
|
|||
* @return 客户集合
|
||||
*/
|
||||
List<String> getCustomerAllList();
|
||||
|
||||
/**
|
||||
* 禁用客户
|
||||
* @param orderCustomerId 客户ID
|
||||
*/
|
||||
void deisable(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;
|
||||
|
@ -129,6 +130,29 @@ public class OrderPayCustomerServiceImpl
|
|||
.toList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁用客户
|
||||
* @param orderCustomerId 客户ID
|
||||
*/
|
||||
@Override
|
||||
public void deisable(Long orderCustomerId) {
|
||||
this.settingStatus(orderCustomerId, SystemYesNo.NO.getCode());
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用客户
|
||||
* @param orderCustomerId 客户ID
|
||||
*/
|
||||
@Override
|
||||
public void enable(Long orderCustomerId) {
|
||||
this.settingStatus(orderCustomerId, SystemYesNo.YES.getCode());
|
||||
|
||||
}
|
||||
|
||||
public void settingStatus(Long orderCustomerId,String status) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean save(OrderPayCustomer orderPayCustomer) {
|
||||
String appCode = orderPayCustomer.getAppCode();
|
||||
|
|
Loading…
Reference in New Issue