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

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

修改消费日志

parent a3d22cc0
......@@ -310,16 +310,16 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
ResponseDto<PayResultVo> resultData = order(payOrderParam, uid, isMember, isTrueName, performanceData, ticketData, entersVoList, isStudent, ticketTimesData, currentTime);
// redisLockUtil.unlock(lock);
log.debug("总耗时 ->"+(System.currentTimeMillis()-startTime)+"毫秒");
log.debug("总耗时 ->" + (System.currentTimeMillis() - startTime) + "毫秒");
return resultData;
}
} catch (Exception e) {
// if (isDownGeneral) {
// currentTime = System.currentTimeMillis();
// dataUtils.changeSurplusGeneral(payOrderParam.getTicketId(), payOrderParam.getNumber());
// currentTime = System.currentTimeMillis() - currentTime;
// log.debug("redis 修改库存 异常 -> time:" + (currentTime) + "毫秒");
// }
if (isDownGeneral) {
currentTime = System.currentTimeMillis();
dataUtils.changeSurplusGeneral(payOrderParam.getTicketId(), payOrderParam.getNumber());
currentTime = System.currentTimeMillis() - currentTime;
log.debug("redis 修改库存 异常 -> time:" + (currentTime) + "毫秒");
}
e.printStackTrace();
log.error("Kylin Order Pay Error = " + e.getMessage());
// redisLockUtil.unlock(lock);
......@@ -328,14 +328,13 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
}
private ResponseDto<PayResultVo> order(PayOrderParam payOrderParam, String uid, boolean isMember, int isTrueName, KylinPerformanceVo performanceData, KylinTicketVo ticketData, List<AdamEntersVo> entersVoList, Integer isStudent, KylinTicketTimesVo ticketTimesData, Long currentTime) {
try {
LinkedList<String> sqls = new LinkedList<>();
String source = CurrentUtil.getCliSource() == null ? "" : CurrentUtil.getCliSource();
String version = CurrentUtil.getCliVersion() == null ? "" : CurrentUtil.getCliVersion();
LocalDateTime now = LocalDateTime.now();
//生成订单 order_ticket
KylinOrderTickets orderTickets = new KylinOrderTickets();
String orderTicketId = IDGenerator.nextSnowId().toString();
String orderTicketId = IDGenerator.nextSnowId();
orderTickets.setOrderTicketsId(orderTicketId);
orderTickets.setUserId(uid);
Map token = CurrentUtil.getTokenClaims();
......@@ -548,38 +547,6 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
currentTime = System.currentTimeMillis() - currentTime;
log.debug("调用 PHP 支付 -> time:" + (currentTime) + "毫秒");
PayResultVo payResultVo = JsonUtils.fromJson(returnData, PayResultVo.class);
// PayResultVo payResultVo = null;
// try {
// payResultVo = JsonUtils.fromJson("{\n" +
// " \"code\": \"20210618130049218267704668657P\",\n" +
// " \"order_code\": \"T7774750254320448484\",\n" +
// " \"status\": null,\n" +
// " \"order_id\": \"77747502543208448\",\n" +
// " \"showUrl\": \"http://devm.zhengzai.tv/#/ticket/purchase/detail?id=5936241&amp;type=purchase&amp;performance_id=5936241&amp;ticket_id=10981&amp;amount=1&amp;products_array=&amp;amount_array=&amp;express=077747502543208448\",\n" +
// " \"returnUrl\": \"http://devm.zhengzai.tv/#/order/status?order_type=ticket&amp;order_id=77747502543208448\",\n" +
// " \"price\": 0.01,\n" +
// " \"pay_data\": {\n" +
// " \"packages\": null,\n" +
// " \"partnerid\": null,\n" +
// " \"prepayid\": null,\n" +
// " \"sign\": null,\n" +
// " \"mweb_url\": null,\n" +
// " \"paySign\": null,\n" +
// " \"signType\": null,\n" +
// " \"redirect_url\": \"https://openapi.alipay.com/gateway.do?alipay_sdk=lokielse%2Fomnipay-alipay&app_id=2019082866535131&biz_content=%7B%22product_code%22%3A%22QUICK_WAP_PAY%22%2C%22total_amount%22%3A%220.01%22%2C%22subject%22%3A%2206%5Cu670830%5Cu65e5%5Cu5355%5Cu65e5%5Cu7968%5Cu80e1%5Cu5927%5Cu7f8e%5Cu5e76%5Cu53d1%5Cu4e0b%5Cu5355%22%2C%22body%22%3A%22%5Cu80e1%5Cu5927%5Cu7f8e%5Cu5e76%5Cu53d1%5Cu4e0b%5Cu5355%5Cu5355%5Cu65e5%5Cu796806%5Cu670830%5Cu65e5%22%2C%22out_trade_no%22%3A%2220210618130049218267704668657P%22%2C%22time_expire%22%3A%222021-06-18+13%3A06%22%2C%22quit_url%22%3A%22http%3A%5C%2F%5C%2Fdevm.zhengzai.tv%5C%2F%23%5C%2Fticket%5C%2Fpurchase%5C%2Fdetail%3Fid%3D5936241%26amp%3Btype%3Dpurchase%26amp%3Bperformance_id%3D5936241%26amp%3Bticket_id%3D10981%26amp%3Bamount%3D1%26amp%3Bproducts_array%3D%26amp%3Bamount_array%3D%26amp%3Bexpress%3D077747502543208448%22%7D&charset=utf-8&format=JSON&method=alipay.trade.wap.pay&notify_url=http%3A%2F%2Ftestpay.zhengzai.tv%2Fnotify%2Fwap%2Falipay%2F1&return_url=http%3A%2F%2Fdevm.zhengzai.tv%2F%23%2Forder%2Fstatus%3Forder_type%3Dticket%26amp%3Border_id%3D77747502543208448&sign_type=RSA2&timestamp=2021-06-18+13%3A00%3A49&version=1.0&sign=UaHmNdI1cXjjSkR4gwrnELSWXqb1Icg1uCOe0vEo5yHCqWOy4JZCZbjCR1xOHQKowSMBAr6U2XLtMAaNXr6mX%2B%2F5IiaChsD4IPoODNT7F4GckVcqP3GkdLZTro%2FGmBau6VoYw1uVpyutQTJsjEU1fQ%2F5KDAKLvg0XG%2F1D%2BXb%2Bv6LdLDvehCEPzy4W%2BCT0qPANU4ysgZkt9hP1ljH61%2FBWiDnfz%2BOdust4KBoJYQzNWO3XSwvc17OxdGHn8EBmYRJz6sr1nt0i2h4BGQtjrOHRB3dToVkxrlsHtbrOmiCdRFH6utSVA8UjeKtlEB%2FH%2BkQfVxPkpOicTjkokhDNK6svg%3D%3D\",\n" +
// " \"order_str\": null,\n" +
// " \"appId\": null,\n" +
// " \"appid\": null,\n" +
// " \"nonceStr\": null,\n" +
// " \"noncestr\": null,\n" +
// " \"timeStamp\": null,\n" +
// " \"timestamp\": null,\n" +
// " \"package\": null\n" +
// " }\n" +
// " }", PayResultVo.class);
// } catch (Exception e) {
// payResultVo = new PayResultVo();
// }
payResultVo.setOrder_id(orderTicketId);
payResultVo.setPrice(orderTickets.getPriceActual());
orderTickets.setPayCode(payResultVo.getCode());
......@@ -614,26 +581,14 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
log.debug("redis 修改订单列表 -> time:" + (currentTime) + "毫秒");
// 执行sql
try {
String sqlData = SqlMapping.gets(sqls, sqlsDataB, sqlsDataC, sqlsDataD, sqlsDataA);
currentTime = System.currentTimeMillis();
rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_CREADE, MQConst.ROUTING_KEY_SQL_ORDER_CREATE,
sqlData);
currentTime = System.currentTimeMillis() - currentTime;
log.debug("MQ 发送 -> time:" + (currentTime) + "毫秒");
}catch (Exception e){
log.error("WARNING Kylin MQ Error = " + e.getMessage());
}
log.info(UserPathDto.setData("下单(唤起支付)", payOrderParam, payResultVo));
return ResponseDto.success(payResultVo);
}catch (Exception e){
currentTime = System.currentTimeMillis();
dataUtils.changeSurplusGeneral(payOrderParam.getTicketId(), payOrderParam.getNumber());
currentTime = System.currentTimeMillis() - currentTime;
log.debug("redis 修改库存 异常 -> time:" + (currentTime) + "毫秒");
log.error("Kylin Order Inner Pay Error = " + e.getMessage());
return ResponseDto.failure(ErrorMapping.get("20018"));//乱七八糟异常
}
}
@Override
......
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