ソースを参照

构建提现体系

skyfffire 1 ヶ月 前
コミット
43c37e9c36

+ 2 - 0
src/main/java/common/jfinal/AppConfig.java

@@ -20,6 +20,7 @@ import modules.order.OrderStatusMaintenanceTask;
 import modules.upload.UploadController;
 import modules.user.UserController;
 import modules.user.UserService;
+import modules.withdraw.WithdrawController;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import java.util.concurrent.ExecutorService;
@@ -60,6 +61,7 @@ public class AppConfig extends JFinalConfig {
         routes.add("/nftt", NfttController.class);
         routes.add("/order", OrderController.class);
         routes.add("/news", NewsController.class);
+        routes.add("/withdraw", WithdrawController.class);
     }
 
     @Override

+ 15 - 2
src/main/java/common/model/base/BaseWithdraw.java

@@ -9,14 +9,14 @@ import com.jfinal.plugin.activerecord.IBean;
 @SuppressWarnings("serial")
 public abstract class BaseWithdraw<M extends BaseWithdraw<M>> extends Model<M> implements IBean {
 	/**
-	 * 提现主键
+	 * 提现主键,订单号
 	 */
 	public void setWithdrawSn(java.lang.String withdrawSn) {
 		set("withdraw_sn", withdrawSn);
 	}
 	
 	/**
-	 * 提现主键
+	 * 提现主键,订单号
 	 */
 	public java.lang.String getWithdrawSn() {
 		return getStr("withdraw_sn");
@@ -73,6 +73,19 @@ public abstract class BaseWithdraw<M extends BaseWithdraw<M>> extends Model<M> i
 	public java.lang.String getReason() {
 		return getStr("reason");
 	}
+	/**
+	 * 审批人
+	 */
+	public void setApproverId(java.lang.Integer approverId) {
+		set("approver_id", approverId);
+	}
+	
+	/**
+	 * 审批人
+	 */
+	public java.lang.Integer getApproverId() {
+		return getInt("approver_id");
+	}
 	/**
 	 * 慧用工原文
 	 */

+ 18 - 0
src/main/java/modules/withdraw/WithdrawController.java

@@ -0,0 +1,18 @@
+package modules.withdraw;
+
+import com.jfinal.aop.Before;
+import com.jfinal.aop.Inject;
+import common.interceptor.LoginInterceptor;
+import common.utils.http.MyController;
+import common.utils.http.MyRet;
+
+public class WithdrawController extends MyController {
+    @Inject
+    WithdrawService service;
+    
+    public void hello() {
+        renderJson(MyRet.ok(service.hello()));
+    }
+    
+    
+}

+ 7 - 0
src/main/java/modules/withdraw/WithdrawService.java

@@ -0,0 +1,7 @@
+package modules.withdraw;
+
+public class WithdrawService {
+    public String hello() {
+        return "Hello Withdraw";
+    }
+}

+ 12 - 0
src/test/rest/WithdrawControllerTest.http

@@ -0,0 +1,12 @@
+### 连通性测试
+POST {{ baseUrl }}/withdraw/hello
+
+### 用户提交提现申请
+POST {{ baseUrl }}/withdraw/create
+Content-Type: application/json
+dl-token: {{dl_token_var}}
+
+{
+  "amount": 100
+}
+