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

Commit fe304314 authored by anjiabin's avatar anjiabin
parents 74b6f986 9f11d0e9
......@@ -19,30 +19,30 @@ import org.springframework.web.bind.annotation.RestController;
* @author jiangxiulong
* @since 2021-06-11 6:10 下午
*/
@Api(tags = "前端-退款回调")
@RestController
@RequestMapping("refund")
//@Api(tags = "前端-退款回调")
//@RestController
//@RequestMapping("refund")
public class OrderRefundOvertimeController {
@Autowired
private OrderRefundOvertimeServiceImpl orderRefundOvertimeServiceImpl;
@PostMapping("apply")
@ApiOperation("超时退款")
@ApiImplicitParams({
@ApiImplicitParam(type = "body", dataType = "String", name = "orderTicketsId", value = "订单ID", required = true),
})
public Boolean refundApply(@RequestParam() String orderTicketsId) {
try {
Boolean res = orderRefundOvertimeServiceImpl.refundApply(orderTicketsId);
if (res) {
return true;
} else {
return false;
}
} catch (Exception e) {
return false;
}
}
// @Autowired
// private OrderRefundOvertimeServiceImpl orderRefundOvertimeServiceImpl;
//
// @PostMapping("apply")
// @ApiOperation("超时退款")
// @ApiImplicitParams({
// @ApiImplicitParam(type = "body", dataType = "String", name = "orderTicketsId", value = "订单ID", required = true),
// })
// public Boolean refundApply(@RequestParam() String orderTicketsId) {
// try {
// Boolean res = orderRefundOvertimeServiceImpl.refundApply(orderTicketsId);
// if (res) {
// return true;
// } else {
// return false;
// }
// } catch (Exception e) {
// return false;
// }
// }
}
package com.liquidnet.service.order.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 订单详情 前端控制器
* </p>
*
* @author liquidnet
* @since 2021-05-20
*/
@RestController
@RequestMapping("orderEnter")
public class KylinOrderTicketEntitiesController {
}
......@@ -110,6 +110,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
public ResponseDto<PayResultVo> checkCanOrder(PayOrderParam payOrderParam) {
Long currentTime;
boolean isDownGeneral = false;
List<AdamEntersVo> entersVoList = new ArrayList<>();
Long startTime = System.currentTimeMillis();
String uid = CurrentUtil.getCurrentUid();
String lock = "userId:" + uid;
......@@ -260,7 +261,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
isDownGeneral = true;
//学生票 判断
List<AdamEntersVo> entersVoList = new ArrayList<>();
entersVoList = new ArrayList<>();
if (isTrueName == 1) {
currentTime = System.currentTimeMillis();
for (String enterId : payOrderParam.getEnterIdList()) {
......@@ -318,6 +319,14 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
dataUtils.changeSurplusGeneral(payOrderParam.getTicketId(), payOrderParam.getNumber());
currentTime = System.currentTimeMillis() - currentTime;
log.debug("redis 修改库存 异常 -> time:" + (currentTime) + "毫秒");
for (AdamEntersVo enters : entersVoList) {
dataUtils.changeBuyInfo(uid, enters.getIdCard(), payOrderParam.getPerformanceId(), payOrderParam.getTicketId(), -1);
}
if (entersVoList.size() == 0) {
for (int i = 0; i < payOrderParam.getNumber(); i++) {
dataUtils.changeBuyInfo(uid, "", payOrderParam.getPerformanceId(), payOrderParam.getTicketId(), -1);
}
}
}
e.printStackTrace();
log.error("Kylin Order Pay Error = " + e.getMessage());
......@@ -1153,12 +1162,12 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
}
Map token = CurrentUtil.getTokenClaims();
String username = StringUtils.defaultString(((String) token.get("nickname")), "");
// String result = refundsStatusService.userOrderTicketRefunding(orderTicketVo, refundSinglePrice.doubleValue(), orderTicketEntitiesId, reason, picList, uid, username, kylinOrderRefundsVoBaseList.size());
// if (result != "") {
// return ResponseDto.success(result);
// } else {
String result = refundsStatusService.userOrderTicketRefunding(orderTicketVo, refundSinglePrice.doubleValue(), orderTicketEntitiesId, reason, picList, uid, username, kylinOrderRefundsVoBaseList.size());
if (result != "") {
return ResponseDto.success(result);
} else {
return ResponseDto.failure(ErrorMapping.get("20019"));
// }
}
} catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure(ErrorMapping.get("20019"));
......
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