Commit 14571487 by giaogiao

取消(驳回)订单接口

parent a0d51828
package com.jumeirah.api.merchant.controller.order;
import com.jumeirah.api.merchant.entity.param.StrokeCancelParam;
import com.jumeirah.api.merchant.entity.param.StrokeCompleteParam;
import com.jumeirah.api.merchant.entity.param.StrokeConfirmPaymentParam;
import com.jumeirah.api.merchant.entity.param.StrokeDiscountCheckParam;
......@@ -143,6 +144,23 @@ public class McStrokeController extends BaseController {
return ApiResult.result(flag);
}
/**
* 取消(驳回)订单接口
*/
@PostMapping("/cancel")
@OperationLog(name = "取消(驳回)订单接口", type = OperationLogType.UPDATE)
@ApiOperation(value = "取消(驳回)订单接口", response = ApiResult.class)
@RequiresPermissions("merchant:order:edit")
public ApiResult<Boolean> cancel(@Validated @RequestBody StrokeCancelParam strokeCancelParam) throws Exception {
Stroke stroke = new Stroke();
stroke.setId(strokeCancelParam.getId())
.setStatus(StrokeStatusEnum.CANCEL.getCode())
.setUpdateTime(new Timestamp(System.currentTimeMillis()));
boolean flag = strokeService.updateStroke(stroke);
return ApiResult.result(flag);
}
/* *//**
* 修改行程表
*//*
......
package com.jumeirah.api.merchant.entity.param;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* 行程表
*
* @author wei
* @since 2020-09-29
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "StrokeCancelParam")
public class StrokeCancelParam extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "id不能为空")
@ApiModelProperty("主键ID")
private Long id;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment