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

Commit 9f11d0e9 authored by 胡佳晨's avatar 胡佳晨

Merge branch 'test'

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