用户取消支付重新设置订单状态
This commit is contained in:
@@ -100,6 +100,9 @@ public class NotifyController {
|
|||||||
String orderNo=object.get("mchOrderNo").toString();
|
String orderNo=object.get("mchOrderNo").toString();
|
||||||
String tradeNo=object.get("payOrderId").toString();
|
String tradeNo=object.get("payOrderId").toString();
|
||||||
return payService.callBackPayFST(tradeNo);
|
return payService.callBackPayFST(tradeNo);
|
||||||
|
}else {
|
||||||
|
String tradeNo=object.get("payOrderId").toString();
|
||||||
|
return String.valueOf(payService.activateOrder(tradeNo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.chaozhanggui.system.cashierservice.dao.*;
|
import com.chaozhanggui.system.cashierservice.dao.*;
|
||||||
import com.chaozhanggui.system.cashierservice.entity.*;
|
import com.chaozhanggui.system.cashierservice.entity.*;
|
||||||
import com.chaozhanggui.system.cashierservice.entity.dto.ReturnGroupOrderDto;
|
import com.chaozhanggui.system.cashierservice.entity.dto.ReturnGroupOrderDto;
|
||||||
@@ -13,6 +14,7 @@ import com.chaozhanggui.system.cashierservice.entity.dto.ShopEatTypeInfoDTO;
|
|||||||
import com.chaozhanggui.system.cashierservice.entity.vo.ShopUserListVo;
|
import com.chaozhanggui.system.cashierservice.entity.vo.ShopUserListVo;
|
||||||
import com.chaozhanggui.system.cashierservice.exception.MsgException;
|
import com.chaozhanggui.system.cashierservice.exception.MsgException;
|
||||||
import com.chaozhanggui.system.cashierservice.mapper.MpOrderDetailMapper;
|
import com.chaozhanggui.system.cashierservice.mapper.MpOrderDetailMapper;
|
||||||
|
import com.chaozhanggui.system.cashierservice.mapper.MpOrderInfoMapper;
|
||||||
import com.chaozhanggui.system.cashierservice.model.PayReq;
|
import com.chaozhanggui.system.cashierservice.model.PayReq;
|
||||||
import com.chaozhanggui.system.cashierservice.model.TradeQueryReq;
|
import com.chaozhanggui.system.cashierservice.model.TradeQueryReq;
|
||||||
import com.chaozhanggui.system.cashierservice.netty.PushToClientChannelHandlerAdapter;
|
import com.chaozhanggui.system.cashierservice.netty.PushToClientChannelHandlerAdapter;
|
||||||
@@ -169,6 +171,8 @@ public class PayService {
|
|||||||
private ShopUtils shopUtils;
|
private ShopUtils shopUtils;
|
||||||
@Autowired
|
@Autowired
|
||||||
private MpOrderDetailMapper mpOrderDetailMapper;
|
private MpOrderDetailMapper mpOrderDetailMapper;
|
||||||
|
@Autowired
|
||||||
|
private MpOrderInfoMapper mpOrderInfoMapper;
|
||||||
|
|
||||||
public PayService(@Qualifier("tbShopSongOrderServiceImpl") TbShopSongOrderService shopSongOrderService) {
|
public PayService(@Qualifier("tbShopSongOrderServiceImpl") TbShopSongOrderService shopSongOrderService) {
|
||||||
this.shopSongOrderService = shopSongOrderService;
|
this.shopSongOrderService = shopSongOrderService;
|
||||||
@@ -1471,6 +1475,19 @@ public class PayService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新激活支付中的订单
|
||||||
|
*
|
||||||
|
* @param tradeNo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int activateOrder(String tradeNo) {
|
||||||
|
return mpOrderInfoMapper.update(null, new LambdaUpdateWrapper<TbOrderInfo>()
|
||||||
|
.eq(TbOrderInfo::getOrderNo, tradeNo)
|
||||||
|
.eq(TbOrderInfo::getStatus, "paying")
|
||||||
|
.set(TbOrderInfo::getStatus, "unpaid"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// public Result returnOrder(){
|
// public Result returnOrder(){
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user