记得上下班打卡 | git大法好,push需谨慎

Commit d1d3aba6 authored by 胡佳晨's avatar 胡佳晨

修改 返回值

parent dbfc7bf7
......@@ -2,6 +2,7 @@ package com.liquidnet.service.kylin.controller;
import com.github.pagehelper.PageInfo;
import com.liquidnet.service.base.ErrorMapping;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dto.param.PayAgainParam;
import com.liquidnet.service.kylin.dto.param.PayOrderParam;
......@@ -52,7 +53,12 @@ public class KylinOrderTicketsController {
@ApiOperation("再次支付")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<PayResultVo> payAgain(@RequestBody @Valid PayAgainParam payAgainParam) {
return orderTicketsService.payAgain(payAgainParam);
PayResultVo vo = orderTicketsService.payAgain(payAgainParam).getData();
if(null==vo){
return ResponseDto.failure(ErrorMapping.get("20003"));
}else{
return ResponseDto.success(vo);
}
}
@PostMapping("syncOrder")
......@@ -74,7 +80,12 @@ public class KylinOrderTicketsController {
@ApiOperation("订单详情")
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<OrderDetailsVo> orderDetails(@RequestParam(value = "orderId",required = false) @NotNull(message = "订单id不能为空") String orderId) {
return ResponseDto.success(orderTicketsService.orderDetails(orderId));
OrderDetailsVo vo = orderTicketsService.orderDetails(orderId);
if(null==vo){
return ResponseDto.failure(ErrorMapping.get("20003"));
}else {
return ResponseDto.success(vo);
}
}
@GetMapping("checkPayment")
......@@ -82,10 +93,14 @@ public class KylinOrderTicketsController {
@ApiResponse(code = 200, message = "接口返回对象参数")
public ResponseDto<HashMap> checkOrderResult(@RequestParam("orderId") @NotNull(message = "订单id不能为空") String orderId) {
Integer status = orderTicketsService.checkOrderResult(orderId).getData();
if(null==status){
return ResponseDto.failure(ErrorMapping.get("20003"));
}else {
HashMap<String,Integer> map = new HashMap<>();
map.put("status",status);
return ResponseDto.success(map);
}
}
......
......@@ -532,6 +532,9 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
checkOrderTime(uid);
//检查订单时间 是否关闭
KylinOrderTicketVo orderTicketData = dataUtils.getOrderTicketVo(payAgainParam.getOrderId());
if(!orderTicketData.getUserId().equals(uid)){
return null;
}
if (orderTicketData == null) {
return ResponseDto.failure("订单不存在");
}
......@@ -823,7 +826,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
checkOrderTime(uid);
KylinOrderTicketVo orderTicketVo = dataUtils.getOrderTicketVo(orderId);
if(!orderTicketVo.getUserId().equals(uid)){
return new OrderDetailsVo();
return null;
}
if (null != orderTicketVo) {
//TODO 顺丰快递
......@@ -978,7 +981,11 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
@Override
public ResponseDto<Integer> checkOrderResult(String orderId) {
String uid = CurrentUtil.getCurrentUid();
KylinOrderTicketVo orderTicketData = dataUtils.getOrderTicketVo(orderId);
if(!orderTicketData.getUserId().equals(uid)){
return null;
}
if (orderTicketData == null) {
return ResponseDto.failure("订单不存在");
} else {
......
......@@ -6,7 +6,7 @@
#APP ERROR
20001=验证码发送失败
20002=验证码无效
20003=
20003=无权查看
20004=
20005=手机号获取失败,请更换登录方式
20006=第三方账号未注册
......
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