feat():添加禁用和启用接口

master
zhang chengzhi 2024-08-09 10:43:28 +08:00
parent cd341b1a01
commit 4e6cbfb409
4 changed files with 11 additions and 13 deletions

View File

@ -26,20 +26,20 @@ public class CustomerOrderPaySimpleResp {
/**
*
*/
@Schema(name = "客户单号",type = "String",defaultValue = "OIEJSO798DOE79DIL",description = "客户传入的支付单信息")
@Schema(title = "客户单号",type = "String",defaultValue = "OIEJSO798DOE79DIL",description = "客户传入的支付单信息")
private String cusOrderNumber;
/**
*
*/
@Schema(name = "支付金额",type = "BigDecimal",defaultValue = "36.56",description = "客户传入的支付金额")
@Schema(title = "支付金额",type = "BigDecimal",defaultValue = "36.56",description = "客户传入的支付金额")
private BigDecimal price;
/**
*
*/
@Schema(name = "支付渠道商",type = "String",defaultValue = "支付宝",description = "用户支付的时候选择的渠道商")
@Schema(title = "支付渠道商",type = "String",defaultValue = "支付宝",description = "用户支付的时候选择的渠道商")
private String channelTypeName;

View File

@ -82,7 +82,7 @@ orderPayCustomerService.save(OrderPayCustomer.addBuild(orderCustomerAddReq));
/**
*
*
* @param orderCustomerId
* @param orderCustomerUpdReq
* @return

View File

@ -51,8 +51,6 @@ public interface OrderPayCustomerService extends IService<OrderPayCustomer> {
* @param orderCustomerId ID
* @param status SysIsYesNo
*/
void settingStatus(Long orderCustomerId,String status);

View File

@ -2,6 +2,7 @@ package com.muyu.cloud.pay.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.cloud.pay.domain.OrderPayCustomer;
import com.muyu.cloud.pay.domain.OrderPayInfo;
@ -93,21 +94,20 @@ public class OrderPayCustomerServiceImpl extends ServiceImpl<OrderPayCustomerMap
.toList();
}
@Override
@Override //禁用客户
public void disable(Long orderCustomerId) {
this.settingStatus(orderCustomerId, SystemYesNo.NO.getCode());
}
@Override
@Override //启用客户
public void enable(Long orderCustomerId) {
this.settingStatus(orderCustomerId, SystemYesNo.NO.getCode());
this.settingStatus(orderCustomerId, SystemYesNo.YES.getCode());
}
public void settingStatus(Long orderCustomerId,String status){
UpdateWrapper<OrderPayCustomer> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("id",orderCustomerId).set("status",status);
this.update(updateWrapper);
}