Commit de06e96d authored by 33's avatar 33

修复订单号BUG

parent da78b73a
...@@ -2,6 +2,8 @@ package com.fzm.admin.controller; ...@@ -2,6 +2,8 @@ package com.fzm.admin.controller;
import com.fzm.common.annotation.Authentication; import com.fzm.common.annotation.Authentication;
import com.fzm.common.entity.vo.PaymentVo; import com.fzm.common.entity.vo.PaymentVo;
import com.fzm.common.enums.ResultCode;
import com.fzm.common.exception.GlobalException;
import com.fzm.common.model.ResponseModel; import com.fzm.common.model.ResponseModel;
import com.fzm.common.service.RefundService; import com.fzm.common.service.RefundService;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
...@@ -46,8 +48,14 @@ public class RefundController { ...@@ -46,8 +48,14 @@ public class RefundController {
@GetMapping("/submit") @GetMapping("/submit")
@ApiOperation(value = "提交退款申请") @ApiOperation(value = "提交退款申请")
public ResponseModel<Boolean> submit(@ApiParam(required = true, value = "订单id") @RequestParam Long orderId) throws IOException, InterruptedException { public ResponseModel<Boolean> submit(@ApiParam(required = true, value = "订单id") @RequestParam String orderId) throws IOException, InterruptedException {
Boolean result = refundService.submit(orderId); long oid;
try {
oid = Long.parseLong(orderId);
} catch (Exception e) {
throw GlobalException.newException(ResultCode.REFUND_FAILED, "订单号错误");
}
Boolean result = refundService.submit(oid);
return ResponseModel.success(result); return ResponseModel.success(result);
} }
} }
...@@ -17,6 +17,9 @@ public class Order { ...@@ -17,6 +17,9 @@ public class Order {
@ApiModelProperty("主键") @ApiModelProperty("主键")
private Long id; private Long id;
@ApiModelProperty("订单编号")
private String orderId;
@ApiModelProperty("订单名") @ApiModelProperty("订单名")
private String orderName; private String orderName;
...@@ -43,4 +46,9 @@ public class Order { ...@@ -43,4 +46,9 @@ public class Order {
@ApiModelProperty("最后一次修改时间") @ApiModelProperty("最后一次修改时间")
private Date updateDate; private Date updateDate;
public void setId(Long id) {
this.id = id;
this.orderId = String.valueOf(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