feat():补齐订单客户相关API接口
parent
55f941b50a
commit
4f9e9adb87
|
@ -97,7 +97,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);
|
||||||
return Result.success(null,"操作成功");
|
return Result.success(null,"操作成功");
|
||||||
|
@ -115,4 +115,29 @@ public class OrderPayCustomerController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID禁用客户
|
||||||
|
* @param orderCustomerId
|
||||||
|
* @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
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/enable/{orderCustomerId}")
|
||||||
|
@Operation(summary = "通过ID客户启用",description = "通过ID启用客户信息,启用之后可以调用支付相关接口")
|
||||||
|
public Result<String> enable(@PathVariable("orderCustomerId") Long orderCustomerId){
|
||||||
|
this.orderPayCustomerService.disable(orderCustomerId);
|
||||||
|
return Result.success(null,"操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,4 +21,22 @@ public interface OrderPayCustomerService extends IService<OrderPayCustomer> {
|
||||||
*/
|
*/
|
||||||
List<String> getCustomerAllList();
|
List<String> getCustomerAllList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 禁用客户
|
||||||
|
* @param orderCustomerId
|
||||||
|
*/
|
||||||
|
void disable(Long orderCustomerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启用客户
|
||||||
|
* @param orderCustomerId
|
||||||
|
*/
|
||||||
|
void enable(Long orderCustomerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过客户ID设置客户状态
|
||||||
|
* @param orderCustomerId
|
||||||
|
* @param status
|
||||||
|
*/
|
||||||
|
void settingStatus(Long orderCustomerId, String status);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,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.core.utils.StringUtils;
|
import com.muyu.common.core.utils.StringUtils;
|
||||||
import com.muyu.common.nacos.service.NacosService;
|
import com.muyu.common.nacos.service.NacosService;
|
||||||
|
@ -78,6 +79,7 @@ public class OrderPayCustomerServiceImpl extends ServiceImpl<OrderPayCustomerMap
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean save(OrderPayCustomer orderPayCustomer) {
|
public boolean save(OrderPayCustomer orderPayCustomer) {
|
||||||
String appCode = orderPayCustomer.getAppCode();
|
String appCode = orderPayCustomer.getAppCode();
|
||||||
|
@ -95,4 +97,32 @@ public class OrderPayCustomerServiceImpl extends ServiceImpl<OrderPayCustomerMap
|
||||||
}
|
}
|
||||||
return super.save(orderPayCustomer);
|
return super.save(orderPayCustomer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 禁用客户
|
||||||
|
* @param orderCustomerId
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void disable(Long orderCustomerId) {
|
||||||
|
this.settingStatus(orderCustomerId, SystemYesNo.NO.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 启用客户
|
||||||
|
* @param orderCustomerId
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void enable(Long orderCustomerId) {
|
||||||
|
this.settingStatus(orderCustomerId, SystemYesNo.YES.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void settingStatus(Long orderCustomerId, String status) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue