Commit a1e8f5a9 by lpx

# 商家管理端行程相关接口

parent 4b6762f2
package com.jumeirah.api.merchant.controller.order; package com.jumeirah.api.merchant.controller.order;
import com.jumeirah.api.merchant.entity.param.StrokeConfirmPaymentParam;
import com.jumeirah.api.merchant.entity.param.StrokeDiscountCheckParam;
import com.jumeirah.api.merchant.entity.param.StrokeQuotedPriceParam; import com.jumeirah.api.merchant.entity.param.StrokeQuotedPriceParam;
import com.jumeirah.common.entity.Stroke; import com.jumeirah.common.entity.Stroke;
import com.jumeirah.common.param.McStrokePageParam; import com.jumeirah.common.param.McStrokePageParam;
import com.jumeirah.common.service.StrokeService; import com.jumeirah.common.service.StrokeService;
import com.jumeirah.common.vo.McStrokeQueryVo; import com.jumeirah.common.vo.McStrokeQueryVo;
import com.jumeirah.common.vo.StrokeDetailVo;
import io.geekidea.springbootplus.framework.common.api.ApiResult; import io.geekidea.springbootplus.framework.common.api.ApiResult;
import io.geekidea.springbootplus.framework.common.controller.BaseController; import io.geekidea.springbootplus.framework.common.controller.BaseController;
import io.geekidea.springbootplus.framework.core.pagination.Paging; import io.geekidea.springbootplus.framework.core.pagination.Paging;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;
import io.geekidea.springbootplus.framework.log.annotation.OperationLog; import io.geekidea.springbootplus.framework.log.annotation.OperationLog;
import io.geekidea.springbootplus.framework.log.enums.OperationLogType; import io.geekidea.springbootplus.framework.log.enums.OperationLogType;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -18,8 +18,6 @@ import lombok.extern.slf4j.Slf4j; ...@@ -18,8 +18,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -65,8 +63,36 @@ public class McStrokeController extends BaseController { ...@@ -65,8 +63,36 @@ public class McStrokeController extends BaseController {
} }
/** /**
* 修改行程表 * 优惠调机审核接口
*/
@PostMapping("/discount/check")
@OperationLog(name = "优惠调机审核接口", type = OperationLogType.UPDATE)
@ApiOperation(value = "优惠调机审核接口", response = ApiResult.class)
public ApiResult<Boolean> checkStrokeDiscount(@Validated @RequestBody StrokeDiscountCheckParam strokeDiscountCheckParam) throws Exception {
Stroke stroke = new Stroke();
stroke.setId(strokeDiscountCheckParam.getId())
.setAuditStatus(strokeDiscountCheckParam.getAuditStatus());
boolean flag = strokeService.updateStroke(stroke);
return ApiResult.result(flag);
}
/**
* 行程订单确认付款接口
*/ */
@PostMapping("/confirmPayment")
@OperationLog(name = "优惠调机审核接口", type = OperationLogType.UPDATE)
@ApiOperation(value = "优惠调机审核接口", response = ApiResult.class)
public ApiResult<Boolean> confirmPaymentStroke(@Validated @RequestBody StrokeConfirmPaymentParam strokeConfirmPaymentParam) throws Exception {
Stroke stroke = new Stroke();
stroke.setId(strokeConfirmPaymentParam.getId())
.setPaymentStatus(strokeConfirmPaymentParam.getPaymentStatus());
boolean flag = strokeService.updateStroke(stroke);
return ApiResult.result(flag);
}
/* *//**
* 修改行程表
*//*
@PostMapping("/update") @PostMapping("/update")
@OperationLog(name = "修改行程表", type = OperationLogType.UPDATE) @OperationLog(name = "修改行程表", type = OperationLogType.UPDATE)
@ApiOperation(value = "修改行程表", response = ApiResult.class) @ApiOperation(value = "修改行程表", response = ApiResult.class)
...@@ -75,9 +101,9 @@ public class McStrokeController extends BaseController { ...@@ -75,9 +101,9 @@ public class McStrokeController extends BaseController {
return ApiResult.result(flag); return ApiResult.result(flag);
} }
/** *//**
* 删除行程表 * 删除行程表
*/ *//*
@PostMapping("/delete/{id}") @PostMapping("/delete/{id}")
@OperationLog(name = "删除行程表", type = OperationLogType.DELETE) @OperationLog(name = "删除行程表", type = OperationLogType.DELETE)
@ApiOperation(value = "删除行程表", response = ApiResult.class) @ApiOperation(value = "删除行程表", response = ApiResult.class)
...@@ -86,16 +112,16 @@ public class McStrokeController extends BaseController { ...@@ -86,16 +112,16 @@ public class McStrokeController extends BaseController {
return ApiResult.result(flag); return ApiResult.result(flag);
} }
/** *//**
* 获取行程表详情 * 获取行程表详情
*/ *//*
@GetMapping("/info/{id}") @GetMapping("/info/{id}")
@OperationLog(name = "行程表详情", type = OperationLogType.INFO) @OperationLog(name = "行程表详情", type = OperationLogType.INFO)
@ApiOperation(value = "行程表详情", response = StrokeDetailVo.class) @ApiOperation(value = "行程表详情", response = StrokeDetailVo.class)
public ApiResult<StrokeDetailVo> getStroke(@PathVariable("id") Long id) throws Exception { public ApiResult<StrokeDetailVo> getStroke(@PathVariable("id") Long id) throws Exception {
StrokeDetailVo strokeQueryVo = strokeService.getStrokeById(id); StrokeDetailVo strokeQueryVo = strokeService.getStrokeById(id);
return ApiResult.ok(strokeQueryVo); return ApiResult.ok(strokeQueryVo);
} }*/
} }
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 = "Stroke确认付款对象")
public class StrokeConfirmPaymentParam extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "id不能为空")
@ApiModelProperty("主键ID")
private Long id;
@NotNull(message = "付款状态不能为空")
@ApiModelProperty("付款状态,0-未付款,1-付款中,2-已付款,3-退款中,99-已退款")
private Integer paymentStatus;
}
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 = "Stroke优惠调机审核对象")
public class StrokeDiscountCheckParam extends BaseEntity {
private static final long serialVersionUID = 1L;
@NotNull(message = "id不能为空")
@ApiModelProperty("主键ID")
private Long id;
@NotNull(message = "审核状态不能为空")
@ApiModelProperty("审核状态,0审核中,1审核通过,2审核未通过")
private Integer auditStatus;
}
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