支付根据状态查询

This commit is contained in:
2024-10-11 14:12:27 +08:00
parent fb7c22aacc
commit cc4d34b6fe
2 changed files with 3 additions and 2 deletions

View File

@@ -70,6 +70,6 @@ public interface TbShopPayTypeRepository extends JpaRepository<TbShopPayType, In
@Query("select t from TbShopPayType t where t.payType=:payType and t.shopId=:shopId")
TbShopPayType findByPayType(@Param("payType")String payType,@Param("shopId") String shopId);
@Query("select t from TbShopPayType t where t.shopId=:s")
@Query("select t from TbShopPayType t where t.shopId=:s and is_display=1")
List<TbShopPayType> findByShopId(String s);
}

View File

@@ -1488,7 +1488,8 @@ public class TbShopTableServiceImpl implements TbShopTableService {
throw new BadRequestException("订单不存在");
}
if (!"unpaid".equals(orderInfo.getStatus()) && !"pending".equals(orderInfo.getStatus())) {
if (!"paying".equals(orderInfo.getStatus()) &&
!"unpaid".equals(orderInfo.getStatus()) && !"pending".equals(orderInfo.getStatus())) {
throw new BadRequestException("订单非未支付状态");
}