From efdb99f8cecc4afb592afad79c761081d5d5cf22 Mon Sep 17 00:00:00 2001
From: lee <4766465@qq.com>
Date: Wed, 18 Dec 2024 13:27:00 +0800
Subject: [PATCH] init

---
 system-test/src/main/java/com/yami/shop/systemtest/base/BaseTestTemplate.java |   88 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 88 insertions(+), 0 deletions(-)

diff --git a/system-test/src/main/java/com/yami/shop/systemtest/base/BaseTestTemplate.java b/system-test/src/main/java/com/yami/shop/systemtest/base/BaseTestTemplate.java
new file mode 100644
index 0000000..925d751
--- /dev/null
+++ b/system-test/src/main/java/com/yami/shop/systemtest/base/BaseTestTemplate.java
@@ -0,0 +1,88 @@
+package com.yami.shop.systemtest.base;
+
+import java.util.List;
+
+/**
+ * 这个是一个模板方法,继承这个类的时候,会需要实现创建商品到计算分账的方法,需要根据需要进行实现
+ */
+public abstract class BaseTestTemplate implements BaseTest{
+
+    @Override
+    public void doTest() {
+        List<Long> prodIds = createProduct();
+        getProduct(prodIds);
+
+        doMarketing();
+
+        confirmOrder();
+        submitOrder();
+        payOrder();
+        checkAccountByPay();
+        receiptOrder();
+        checkAccountByReceipt();
+        refundOrder();
+        checkAccountByRefund();
+        deleteProduct(prodIds);
+    }
+
+    /**
+     * 创建商品
+     * @return 创建的几个商品的id列表
+     */
+    public abstract List<Long> createProduct();
+
+    /**
+     * 获取商品详情
+     */
+    public abstract void getProduct(List<Long> prodIds);
+
+    /**
+     * 进行营销,创建完这个商品,究竟是用来干嘛的,满减?优惠券?团购?秒杀?
+     */
+    public abstract void doMarketing();
+
+    /**
+     * 立即购买 确认订单
+     */
+    public abstract void confirmOrder();
+
+    /**
+     * 提交订单
+     */
+    public abstract void submitOrder();
+
+    /**
+     * 支付订单
+     */
+    public abstract void payOrder();
+
+    /**
+     * 查看结算信息
+     */
+    public abstract void checkAccountByPay();
+
+    /**
+     * 确认收货
+     */
+    public abstract void receiptOrder();
+
+    /**
+     * 查看结算信息
+     */
+    public abstract void checkAccountByReceipt();
+
+    /**
+     * 退款
+     */
+    public abstract void refundOrder();
+
+    /**
+     * 查看结算信息
+     */
+    public abstract void checkAccountByRefund();
+
+    /**
+     *
+     */
+    public abstract void deleteProduct(List<Long> prodIds);
+}

--
Gitblit v1.9.3