订单申诉完成是,无需进行撤销申诉操作

This commit is contained in:
Chopper
2021-08-12 00:28:46 +08:00
parent d5b6ba5d00
commit 9e3eb1f74e
3 changed files with 7 additions and 2 deletions

View File

@@ -213,6 +213,7 @@ public enum ResultCode {
COMPLAINT_NOT_EXIT(33103, "当前投诉记录不存在"),
COMPLAINT_ARBITRATION_RESULT_ERROR(33104, "结束订单投诉时,仲裁结果不能为空"),
COMPLAINT_APPEAL_CONTENT_ERROR(33105, "商家申诉时,申诉内容不能为空"),
COMPLAINT_CANCEL_ERROR(33106, "申诉已完成,不需要进行取消申诉操作"),
/**

View File

@@ -214,6 +214,11 @@ public class OrderComplaintServiceImpl extends ServiceImpl<OrderComplaintMapper,
@Override
public boolean cancel(String id) {
OrderComplaint orderComplaint = this.getById(id);
//如果以及仲裁,则不可以进行申诉取消
if(orderComplaint.getComplainStatus().equals(ComplaintStatusEnum.COMPLETE.name())){
throw new ServiceException(ResultCode.COMPLAINT_CANCEL_ERROR);
}
LambdaUpdateWrapper<OrderComplaint> lambdaUpdateWrapper = Wrappers.lambdaUpdate();
lambdaUpdateWrapper.eq(OrderComplaint::getId, id);
lambdaUpdateWrapper.set(OrderComplaint::getComplainStatus, ComplaintStatusEnum.CANCEL.name());