|
@@ -787,7 +787,6 @@ public class OrderServiceImpl implements IOrderService {
|
|
|
|
|
|
appOrder
|
|
appOrder
|
|
.setType(CommonConstant.ORDER_TYPE_1)
|
|
.setType(CommonConstant.ORDER_TYPE_1)
|
|
- .setAddressSiteId(appGame.getSiteId())
|
|
|
|
.setOriginalPrice(sumPrice)
|
|
.setOriginalPrice(sumPrice)
|
|
.setCreateTime(new Date())
|
|
.setCreateTime(new Date())
|
|
.setUpdateTime(new Date())
|
|
.setUpdateTime(new Date())
|
|
@@ -795,6 +794,9 @@ public class OrderServiceImpl implements IOrderService {
|
|
.setUpdateBy(user.getId())
|
|
.setUpdateBy(user.getId())
|
|
.setStatus(CommonConstant.STATUS_NORMAL)
|
|
.setStatus(CommonConstant.STATUS_NORMAL)
|
|
.setDelFlag(CommonConstant.DEL_FLAG_0);
|
|
.setDelFlag(CommonConstant.DEL_FLAG_0);
|
|
|
|
+ if (ObjectUtil.isNotEmpty(appGame.getSiteId())){
|
|
|
|
+ appOrder.setAddressSiteId(appGame.getSiteId());
|
|
|
|
+ }
|
|
if (StrUtil.isNotBlank(createOrderForm.getGameCertificationForm())) {
|
|
if (StrUtil.isNotBlank(createOrderForm.getGameCertificationForm())) {
|
|
appOrder.setGameCertification(createOrderForm.getGameCertificationForm());
|
|
appOrder.setGameCertification(createOrderForm.getGameCertificationForm());
|
|
}
|
|
}
|
|
@@ -1114,7 +1116,6 @@ public class OrderServiceImpl implements IOrderService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!Objects.equals(appOrderProInfo.getType(), CommonConstant.ORDER_PRO_INFO_TYPE_6)) {
|
|
if (!Objects.equals(appOrderProInfo.getType(), CommonConstant.ORDER_PRO_INFO_TYPE_6)) {
|
|
- AppSite appSite = appSiteMapper.selectById(appCoursesMapper.selectById(appOrderProInfo.getProductId()).getAddressSiteId());
|
|
|
|
//订单券号记录
|
|
//订单券号记录
|
|
AppIsin appIsin = new AppIsin();
|
|
AppIsin appIsin = new AppIsin();
|
|
appIsin
|
|
appIsin
|
|
@@ -1125,12 +1126,26 @@ public class OrderServiceImpl implements IOrderService {
|
|
.setFamilyId(appOrderProInfo.getFamilyUserId())
|
|
.setFamilyId(appOrderProInfo.getFamilyUserId())
|
|
.setFamilyUserName(appOrderProInfo.getUserName())
|
|
.setFamilyUserName(appOrderProInfo.getUserName())
|
|
.setUserPhone(appOrderProInfo.getUserPhone())
|
|
.setUserPhone(appOrderProInfo.getUserPhone())
|
|
- .setUseAddress(appSite.getName())
|
|
|
|
//过期时间
|
|
//过期时间
|
|
.setExpireTime(appOrderProInfo.getExpireTime())
|
|
.setExpireTime(appOrderProInfo.getExpireTime())
|
|
//生成10位随机券号
|
|
//生成10位随机券号
|
|
.setTicketNo(appOrderProInfo.getTicketNo())
|
|
.setTicketNo(appOrderProInfo.getTicketNo())
|
|
.setIsinStatus(CommonConstant.ISIN_STATUS_0);
|
|
.setIsinStatus(CommonConstant.ISIN_STATUS_0);
|
|
|
|
+ if (appOrder.getType() == 0){
|
|
|
|
+ String s = createOrderForm.getProductIds().split(",")[0];
|
|
|
|
+ String priceRuleId = s.split("\\|")[0];
|
|
|
|
+ AppSitePriceRules priceRule = appSitePriceRulesMapper.selectById(priceRuleId);
|
|
|
|
+ AppSitePlace appSitePlace = appSitePlaceMapper.selectById(priceRule.getSitePlaceId());
|
|
|
|
+ AppSite appSite = appSiteMapper.selectById(appSitePlace.getSiteId());
|
|
|
|
+ appIsin.setUseAddress(appSite.getName());
|
|
|
|
+ }if (appOrder.getType() == 1){
|
|
|
|
+ AppGamePriceRules appGamePriceRules = appGamePriceRulesMapper.selectById(createOrderForm.getProductIds());
|
|
|
|
+ AppGame appGame = appGameMapper.findByPriceRules(appGamePriceRules.getId());
|
|
|
|
+ appIsin.setUseAddress(appGame.getSiteAddress());
|
|
|
|
+ }if (appOrder.getType() == 2){
|
|
|
|
+ AppSite appSite = appSiteMapper.selectById(appCoursesMapper.selectById(appOrderProInfo.getProductId()).getAddressSiteId());
|
|
|
|
+ appIsin.setUseAddress(appSite.getName());
|
|
|
|
+ }
|
|
appIsinMapper.insert(appIsin);
|
|
appIsinMapper.insert(appIsin);
|
|
}
|
|
}
|
|
if (Objects.equals(appOrderProInfo.getType(), CommonConstant.ORDER_PRO_INFO_TYPE_0)) {
|
|
if (Objects.equals(appOrderProInfo.getType(), CommonConstant.ORDER_PRO_INFO_TYPE_0)) {
|
|
@@ -1167,7 +1182,7 @@ public class OrderServiceImpl implements IOrderService {
|
|
payForm.setOrPayOrder(0);
|
|
payForm.setOrPayOrder(0);
|
|
} else {
|
|
} else {
|
|
Map<String, String> result = payment(appOrder.getId());
|
|
Map<String, String> result = payment(appOrder.getId());
|
|
- payForm.setParams(result);
|
|
|
|
|
|
+// payForm.setParams(result);
|
|
|
|
|
|
//发布任务到redission延迟队列(16分钟)
|
|
//发布任务到redission延迟队列(16分钟)
|
|
String task = CommonConstant.ORDER_TIME_OUT_TASK_PREFIX + appOrder.getId();
|
|
String task = CommonConstant.ORDER_TIME_OUT_TASK_PREFIX + appOrder.getId();
|
|
@@ -1488,9 +1503,9 @@ public class OrderServiceImpl implements IOrderService {
|
|
//退改规则、
|
|
//退改规则、
|
|
appOrderInfoDTO.setReminder(appGame.getReminder());
|
|
appOrderInfoDTO.setReminder(appGame.getReminder());
|
|
//开始时间
|
|
//开始时间
|
|
- appOrderInfoDTO.setStartTime(appGame.getStartTime());
|
|
|
|
|
|
+ appOrderInfoDTO.setGameStartTime(appGame.getStartTime());
|
|
//结束时间
|
|
//结束时间
|
|
- appOrderInfoDTO.setEndTime(appGame.getEndTime());
|
|
|
|
|
|
+ appOrderInfoDTO.setGameEndTime(appGame.getEndTime());
|
|
//赛程安排
|
|
//赛程安排
|
|
List<AppGameScheduleVO> appGameScheduleVOList = appGameScheduleMapper.getListVo(appGame.getId());
|
|
List<AppGameScheduleVO> appGameScheduleVOList = appGameScheduleMapper.getListVo(appGame.getId());
|
|
appOrderInfoDTO.setAppGameScheduleVOList(appGameScheduleVOList);
|
|
appOrderInfoDTO.setAppGameScheduleVOList(appGameScheduleVOList);
|
|
@@ -1670,14 +1685,14 @@ public class OrderServiceImpl implements IOrderService {
|
|
AppOrder appOrder = appOrderMapper.selectOne(Wrappers.<AppOrder>lambdaQuery().eq(AppOrder::getOrderCode, orderCode).last("limit 1"));
|
|
AppOrder appOrder = appOrderMapper.selectOne(Wrappers.<AppOrder>lambdaQuery().eq(AppOrder::getOrderCode, orderCode).last("limit 1"));
|
|
|
|
|
|
//null代表查询失败 SUCCESS-成功 USERPAYING和ACCEPT为中间态 其他为支付失败
|
|
//null代表查询失败 SUCCESS-成功 USERPAYING和ACCEPT为中间态 其他为支付失败
|
|
- JSONObject res = weChatPayService.orderQueryByOutTradeNo(orderCode);
|
|
|
|
- String s = res == null ? null : res.getString("trade_state");
|
|
|
|
-// String s = "SUCCESS";
|
|
|
|
|
|
+// JSONObject res = weChatPayService.orderQueryByOutTradeNo(orderCode);
|
|
|
|
+// String s = res == null ? null : res.getString("trade_state");
|
|
|
|
+ String s = "SUCCESS";
|
|
if ("SUCCESS".equals(s) || appOrder.getOriginalPrice().compareTo(BigDecimal.ZERO)==0) {
|
|
if ("SUCCESS".equals(s) || appOrder.getOriginalPrice().compareTo(BigDecimal.ZERO)==0) {
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(appOrder) && Objects.equals(appOrder.getOrderStatus(), CommonConstant.ORDER_STATUS_0)) {
|
|
if (ObjectUtil.isNotEmpty(appOrder) && Objects.equals(appOrder.getOrderStatus(), CommonConstant.ORDER_STATUS_0)) {
|
|
appOrder.setOrderStatus(1);
|
|
appOrder.setOrderStatus(1);
|
|
- appOrder.setTransactionId(res.getString("transaction_id"));
|
|
|
|
|
|
+// appOrder.setTransactionId(res.getString("transaction_id"));
|
|
appOrderMapper.updateById(appOrder);
|
|
appOrderMapper.updateById(appOrder);
|
|
List<AppOrderProInfo> proInfoList = appOrderProInfoMapper.selectList(Wrappers.<AppOrderProInfo>lambdaQuery().eq(AppOrderProInfo::getOrderId, appOrder.getId()));
|
|
List<AppOrderProInfo> proInfoList = appOrderProInfoMapper.selectList(Wrappers.<AppOrderProInfo>lambdaQuery().eq(AppOrderProInfo::getOrderId, appOrder.getId()));
|
|
if (CollUtil.isNotEmpty(proInfoList)) {
|
|
if (CollUtil.isNotEmpty(proInfoList)) {
|