This commit is contained in:
lifenlong 2021-08-12 00:35:50 +08:00
commit 8532400b82
4 changed files with 16 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());

View File

@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
@ -106,4 +107,12 @@ public class OrderManagerController {
}
@ApiOperation(value = "查询物流踪迹")
@ApiImplicitParams({
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path")
})
@PostMapping(value = "/getTraces/{orderSn}")
public ResultMessage<Object> getTraces(@NotBlank(message = "订单编号不能为空") @PathVariable String orderSn) {
return ResultUtil.data(orderService.getTraces(orderSn));
}
}

View File

@ -71,10 +71,9 @@ public class OrderComplaintStoreController {
@ApiOperation(value = "修改申诉信息")
@PutMapping
public ResultMessage<OrderComplaintVO> update(OrderComplaintVO orderComplainVO) {
orderComplainVO.setStoreId(UserContext.getCurrentUser().getId());
orderComplainVO.setStoreId(UserContext.getCurrentUser().getStoreId());
orderComplaintService.updateOrderComplain(orderComplainVO);
return ResultUtil.data(orderComplainVO);
}
@ApiOperation(value = "申诉")