|
|
@@ -2555,6 +2555,29 @@ public class OrderServiceImpl extends ServiceImpl<AppOrderMapper, AppOrder> impl
|
|
|
return payForm;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Boolean cancelSchoolOrder(String orderId) {
|
|
|
+
|
|
|
+ AppOrder appOrder = appOrderMapper.selectById(orderId);
|
|
|
+ if (ObjectUtil.isEmpty(appOrder)) {
|
|
|
+ throw new JeecgBootException("当前订单不存在!");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!Objects.equals(appOrder.getOrderType(), CommonConstant.ORDER_PRO_INFO_TYPE_0)){
|
|
|
+ throw new JeecgBootException("只能主动取消学校场地预约订单!");
|
|
|
+ }
|
|
|
+ List<AppOrderProInfo> orderProInfoList = appOrderProInfoMapper.selectList(Wrappers.<AppOrderProInfo>lambdaQuery().eq(AppOrderProInfo::getOrderId, orderId));
|
|
|
+ if (CollUtil.isNotEmpty(orderProInfoList)) {
|
|
|
+ for (AppOrderProInfo appOrderProInfo : orderProInfoList) {
|
|
|
+ appOrderProInfo.setOrderStatus(CommonConstant.ORDER_STATUS_4);
|
|
|
+ appOrderProInfoMapper.updateById(appOrderProInfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ appOrder.setOrderStatus(CommonConstant.ORDER_STATUS_4);
|
|
|
+ appOrderMapper.updateById(appOrder);
|
|
|
+ return Boolean.TRUE;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* @return String 订单号
|