2024-07-15 13:42:18 +08:00
|
|
|
package com.ai.da.service;
|
|
|
|
|
|
2025-04-15 10:22:45 +08:00
|
|
|
import com.ai.da.mapper.primary.entity.ProductCoupons;
|
2024-12-16 10:26:02 +08:00
|
|
|
import com.ai.da.mapper.primary.entity.SubscriptionInfo;
|
2025-04-15 10:22:45 +08:00
|
|
|
import com.ai.da.model.dto.CreateCouponDTO;
|
2024-11-18 16:20:25 +08:00
|
|
|
import com.ai.da.model.dto.ProductPurchaseDTO;
|
2025-04-15 10:22:45 +08:00
|
|
|
import com.ai.da.model.dto.QueryCouponsPageDTO;
|
|
|
|
|
import com.ai.da.model.vo.CheckCouponsVO;
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
2024-11-18 16:20:25 +08:00
|
|
|
import com.stripe.exception.StripeException;
|
|
|
|
|
|
2025-11-25 16:46:05 +08:00
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
2024-11-18 16:20:25 +08:00
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
2024-07-15 13:42:18 +08:00
|
|
|
|
|
|
|
|
public interface StripeService {
|
|
|
|
|
|
2025-01-07 11:07:49 +08:00
|
|
|
String pay(ProductPurchaseDTO productPurchaseDTO, HttpServletRequest request);
|
2024-07-15 13:42:18 +08:00
|
|
|
|
|
|
|
|
Boolean notify(HttpServletRequest request);
|
2024-07-16 16:59:58 +08:00
|
|
|
|
2024-12-16 10:26:02 +08:00
|
|
|
SubscriptionInfo getLatestSubscriptionInfoByAccountId(Long accountId);
|
|
|
|
|
|
2024-07-16 16:59:58 +08:00
|
|
|
void checkOrderStatus(String orderNo);
|
2024-11-18 16:20:25 +08:00
|
|
|
|
2024-11-28 10:43:06 +08:00
|
|
|
List<String> getSubscriptionIds(String name, String userEmail) throws StripeException;
|
2024-11-18 16:20:25 +08:00
|
|
|
|
2024-11-28 10:43:06 +08:00
|
|
|
void cancelSubscriptionTemp(String subscriptionId);
|
|
|
|
|
|
2025-11-14 14:51:30 +08:00
|
|
|
boolean sendEmail(String subscriptionId, String type, String orderNo);
|
|
|
|
|
|
2025-11-14 18:08:40 +08:00
|
|
|
String getLanguage(String language, String country, String type);
|
|
|
|
|
|
|
|
|
|
// void subscriptionReminder();
|
2024-11-18 16:20:25 +08:00
|
|
|
|
2024-11-28 10:43:06 +08:00
|
|
|
String createSubscriptionTemp(String name, String email);
|
|
|
|
|
|
2025-01-07 11:07:49 +08:00
|
|
|
// Map getIp(HttpServletRequest request);
|
2025-02-21 17:16:44 +08:00
|
|
|
|
|
|
|
|
String getStackTrace(Exception e, int maxLines);
|
2025-04-15 10:22:45 +08:00
|
|
|
|
|
|
|
|
String createCoupon(CreateCouponDTO createCouponDTO);
|
|
|
|
|
|
|
|
|
|
CheckCouponsVO checkProductCoupon(String promotionCode, Long price);
|
|
|
|
|
|
2025-06-06 19:37:38 +08:00
|
|
|
ProductCoupons updateCouponsInfo(Long id, String paidCommission, String cooperator, String remark, Long startTime);
|
2025-04-15 15:58:22 +08:00
|
|
|
|
2025-04-15 10:22:45 +08:00
|
|
|
ProductCoupons getProductCoupon(String promotionCode, String promotionCodeId);
|
|
|
|
|
|
|
|
|
|
String retrieveCoupon(String couponId);
|
|
|
|
|
|
|
|
|
|
String retrievePromotionCode(String promotionCode);
|
|
|
|
|
|
|
|
|
|
IPage<ProductCoupons> getAllCoupons(QueryCouponsPageDTO queryCouponsPageDTO);
|
2025-04-28 14:40:42 +08:00
|
|
|
|
|
|
|
|
void deleteCoupon(Long id);
|
2024-07-15 13:42:18 +08:00
|
|
|
}
|