Jelajahi Sumber

提现记录

shish 5 tahun lalu
induk
melakukan
5e16b6b932

+ 0 - 0
app/ghs/controllers/MerchantCapitalController.php → app/ghs/controllers/SjCapitalController.php


+ 19 - 0
app/shop/controllers/CashController.php

@@ -0,0 +1,19 @@
+<?php
+
+namespace shop\controllers;
+
+use biz\merchant\classes\CashClass;
+use common\components\util;
+
+class CashController extends BaseController
+{
+
+    //客户列表 shish 2019.11.30
+    public function actionList()
+    {
+        $where = ['shopId' => $this->shopId];
+        $list = CashClass::getCashList($where);
+        util::success($list);
+    }
+
+}

+ 26 - 0
biz/merchant/classes/CashClass.php

@@ -0,0 +1,26 @@
+<?php
+
+namespace biz\merchant\classes;
+
+use biz\admin\classes\ShopAdminClass;
+use common\components\dirUtil;
+use common\components\httpUtil;
+use common\components\qrCodeUtil;
+use common\components\util;
+use common\components\wxUtil;
+use Yii;
+use biz\base\classes\BaseClass;
+
+class CashClass extends BaseClass
+{
+
+    public static $baseFile = '\biz\merchant\models\Cash';
+
+    //提现记录 shish 2021.2.21
+    public static function getCashList($where)
+    {
+        $data = self::getList('*', $where, 'addTime DESC');
+        return $data;
+    }
+
+}

+ 15 - 0
biz/merchant/models/Cash.php

@@ -0,0 +1,15 @@
+<?php
+
+namespace biz\merchant\models;
+
+use biz\base\models\Base;
+
+class Cash extends Base
+{
+
+    public static function tableName()
+    {
+        return 'xhCash';
+    }
+
+}

+ 13 - 0
biz/merchant/services/CashService.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace biz\merchant\services;
+
+use biz\base\services\BaseService;
+use Yii;
+
+class CashService extends BaseService
+{
+
+    public static $baseFile = '\biz\merchant\classes\CashClass';
+
+}

+ 14 - 1
sql.sql

@@ -1205,4 +1205,17 @@ ALTER TABLE xhRecharge ADD `addTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAM
 ALTER TABLE xhRecharge ADD `updateTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间' AFTER `addTime`;
 ALTER TABLE xhRecharge ADD remark VARCHAR(1000) NOT NULL DEFAULT '' COMMENT '' AFTER `payStatus`;
 DROP TABLE IF EXISTS `xhRechargeLog`;
-ALTER TABLE xhMerchantCapital RENAME TO xhSjCapital;
+ALTER TABLE xhMerchantCapital RENAME TO xhSjCapital;
+DROP TABLE IF EXISTS `xhWithdraw`;
+DROP TABLE IF EXISTS `xhCash`;
+CREATE TABLE IF NOT EXISTS `xhCash`(
+id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+sjId INT NOT NULL DEFAULT 0 COMMENT '商家id',
+shopId INT NOT NULL DEFAULT 0 COMMENT '',
+amount DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '提现金额',
+balance DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '当前余额',
+`status` TINYINT NOT NULL DEFAULT 1 COMMENT '1待处理 2处理中 3已完成',
+`addTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
+`updateTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间'
+)COMMENT='提现订单';
+ALTER TABLE `xhCash` ADD `event` VARCHAR(100) NOT NULL DEFAULT '' COMMENT '事项' AFTER `shopId`;