feat():增加禁用启用接口
parent
c779917cab
commit
1ff6797a54
|
@ -117,9 +117,33 @@ public class OrderPayCustomerController {
|
||||||
* @return 客户信息
|
* @return 客户信息
|
||||||
*/
|
*/
|
||||||
@DeleteMapping("/{orderCustomerId}")
|
@DeleteMapping("/{orderCustomerId}")
|
||||||
@Operation(summary = "通过ID获取客户",description = "通过ID获取客户信息")
|
@Operation(summary = "通过ID获取客户信息",description = "通过ID获取客户信息")
|
||||||
public Result<OrderPayCustomer> findById(@PathVariable("orderCustomerId") Long orderCustomerId){
|
public Result<OrderPayCustomer> findById(@PathVariable("orderCustomerId") Long orderCustomerId){
|
||||||
|
|
||||||
return Result.success(orderPayCustomerService.getById(orderCustomerId),"操作成功");
|
return Result.success(orderPayCustomerService.getById(orderCustomerId),"操作成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过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,"操作成功");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,4 +29,25 @@ public interface OrderPayCustomerService extends IService<OrderPayCustomer> {
|
||||||
* @return 客户集合
|
* @return 客户集合
|
||||||
*/
|
*/
|
||||||
List<String> getCustomerAllList();
|
List<String> getCustomerAllList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID禁用客户
|
||||||
|
* @param orderCustomerId ID
|
||||||
|
* @return 禁用结果
|
||||||
|
*/
|
||||||
|
void disable(Long orderCustomerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID启用客户
|
||||||
|
* @param orderCustomerId ID
|
||||||
|
* @return 启用结果
|
||||||
|
*/
|
||||||
|
void enable(Long orderCustomerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过客户ID设置状态
|
||||||
|
* @param orderCustomerId ID
|
||||||
|
* @param status 状态 SysIsYseNo
|
||||||
|
*/
|
||||||
|
void settingStatus(Long orderCustomerId,String status);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ 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.NacosServiceService;
|
import com.muyu.common.nacos.service.NacosServiceService;
|
||||||
|
|
||||||
|
@ -95,6 +96,29 @@ public class OrderPayCustomerServiceImpl
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 警用客户
|
||||||
|
* @param orderCustomerId ID
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void disable(Long orderCustomerId) {
|
||||||
|
this.settingStatus(orderCustomerId, SystemYesNo.NO.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启用客户
|
||||||
|
* @param orderCustomerId ID
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void enable(Long orderCustomerId) {
|
||||||
|
this.settingStatus(orderCustomerId, SystemYesNo.YES.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void settingStatus(Long orderCustomerId,String status){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean save(OrderPayCustomer orderPayCustomer) {
|
public boolean save(OrderPayCustomer orderPayCustomer) {
|
||||||
String appCode = orderPayCustomer.getAppCode();
|
String appCode = orderPayCustomer.getAppCode();
|
||||||
|
|
Loading…
Reference in New Issue