|
|
@@ -1789,8 +1789,13 @@ public class AppAppOrderServiceImpl extends ServiceImpl<AppOrderDao, TbOrder> im
|
|
|
if (tbOrder.getStatus().equals(8) || tbOrder.getStatus().equals(5)) {
|
|
|
return Result.success();
|
|
|
}
|
|
|
+
|
|
|
+ if (tbOrder.getStatus() == 4) {
|
|
|
+ throw new SqxException("订单处于完成状态,不允许退单");
|
|
|
+ }
|
|
|
+
|
|
|
UserEntity userEntity = userDao.selectById(tbOrder.getUserId());
|
|
|
- //已支付判断支付方式
|
|
|
+ // 已支付判断支付方式
|
|
|
if (tbOrder.getPayType() == 2) {
|
|
|
//余额支付,直接退还钱包
|
|
|
userMoneyDao.updateMayMoney(1, tbOrder.getUserId(), tbOrder.getPayMoney().doubleValue());
|
|
|
@@ -2426,7 +2431,7 @@ public class AppAppOrderServiceImpl extends ServiceImpl<AppOrderDao, TbOrder> im
|
|
|
public Result adminCancelOrders(Long orderId) {
|
|
|
String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
|
|
|
TbOrder tbOrder = appOrderDao.selectById(orderId);
|
|
|
- if(tbOrder.getStatus()==5){
|
|
|
+ if(tbOrder.getStatus()==5 || tbOrder.getStatus() == 8){
|
|
|
return Result.success();
|
|
|
}
|
|
|
if (tbOrder.getIsPay() == 0) {
|
|
|
@@ -2436,6 +2441,10 @@ public class AppAppOrderServiceImpl extends ServiceImpl<AppOrderDao, TbOrder> im
|
|
|
tbOrder1.setStatus(5);
|
|
|
appOrderDao.updateById(tbOrder1);
|
|
|
} else {
|
|
|
+ if (tbOrder.getStatus() == 4) {
|
|
|
+ throw new SqxException("订单处于完成状态,不允许退单");
|
|
|
+ }
|
|
|
+
|
|
|
UserEntity userEntity = userDao.selectById(tbOrder.getUserId());
|
|
|
//已支付判断支付方式
|
|
|
if (tbOrder.getPayType() == 2) {
|