用户取消支付重新设置订单状态
This commit is contained in:
@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
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.entity.*;
|
||||
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.exception.MsgException;
|
||||
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.TradeQueryReq;
|
||||
import com.chaozhanggui.system.cashierservice.netty.PushToClientChannelHandlerAdapter;
|
||||
@@ -169,6 +171,8 @@ public class PayService {
|
||||
private ShopUtils shopUtils;
|
||||
@Autowired
|
||||
private MpOrderDetailMapper mpOrderDetailMapper;
|
||||
@Autowired
|
||||
private MpOrderInfoMapper mpOrderInfoMapper;
|
||||
|
||||
public PayService(@Qualifier("tbShopSongOrderServiceImpl") TbShopSongOrderService 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(){
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user