shish 5 anni fa
parent
commit
ea2a5b3449

+ 18 - 0
biz-ghs/custom/classes/CustomCapitalClass.php

@@ -0,0 +1,18 @@
+<?php
+
+namespace bizGhs\custom\classes;
+
+use biz\shop\classes\ShopClass;
+use biz\sj\classes\MerchantClass;
+use common\components\business;
+use common\components\imgUtil;
+use common\components\util;
+use Yii;
+use bizHd\base\classes\BaseClass;
+
+class CustomCapitalClass extends BaseClass
+{
+
+	public static $baseFile = '\bizGhs\custom\models\Custom';
+
+}

+ 13 - 0
biz-ghs/custom/models/CustomCapital.php

@@ -0,0 +1,13 @@
+<?php
+namespace bizGhs\custom\models;
+use bizHd\base\models\Base;
+
+class CustomCapital extends Base
+{
+
+    public static function tableName()
+    {
+        return 'xhGhsCustomCapital';
+    }
+
+}

+ 15 - 0
biz-ghs/custom/services/CustomCapitalService.php

@@ -0,0 +1,15 @@
+<?php
+
+namespace bizGhs\custom\services;
+
+use bizHd\base\services\BaseService;
+use bizGhs\custom\classes\CustomClass;
+use biz\shop\classes\ShopClass;
+use Yii;
+
+class CustomCapitalService extends BaseService
+{
+
+    public static $baseFile = '\bizGhs\custom\classes\CustomCapitalClass';
+
+}

+ 14 - 0
biz-hd/custom/classes/CustomCapitalClass.php

@@ -0,0 +1,14 @@
+<?php
+
+namespace bizHd\custom\classes;
+
+use common\components\util;
+use Yii;
+use bizHd\base\classes\BaseClass;
+
+class CustomCapitalClass extends BaseClass
+{
+
+    public static $baseFile = '\bizHd\custom\models\CustomCapital';
+
+}

+ 13 - 0
biz-hd/custom/models/CustomCapital.php

@@ -0,0 +1,13 @@
+<?php
+namespace bizHd\custom\models;
+use bizHd\base\models\Base;
+
+class CustomCapital extends Base
+{
+
+	public static function tableName()
+	{
+		return 'xhCustomCapital';
+	}
+
+}

+ 14 - 0
biz-hd/custom/services/CustomCapitalService.php

@@ -0,0 +1,14 @@
+<?php
+
+namespace bizHd\custom\services;
+
+use bizHd\base\services\BaseService;
+use bizHd\custom\classes\CustomClass;
+use Yii;
+
+class CustomCapitalService extends BaseService
+{
+
+    public static $baseFile = '\bizHd\custom\classes\CustomCapitalClass';
+
+}

+ 13 - 0
biz/shop/classes/ShopCapitalClass.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace biz\shop\classes;
+
+use Yii;
+use biz\base\classes\BaseClass;
+
+class ShopCapitalClass extends BaseClass
+{
+
+    public static $baseFile = '\biz\shop\models\ShopCapital';
+
+}

+ 13 - 0
biz/shop/models/ShopCapital.php

@@ -0,0 +1,13 @@
+<?php
+namespace biz\shop\models;
+use biz\base\models\Base;
+
+class ShopCapital extends Base
+{
+
+	public static function tableName()
+	{
+		return 'xhShopCapital';
+	}
+
+}

+ 14 - 0
biz/shop/services/ShopCapitalService.php

@@ -0,0 +1,14 @@
+<?php
+
+namespace biz\shop\services;
+
+use biz\base\services\BaseService;
+use common\components\util;
+use Yii;
+
+class ShopCapitalService extends BaseService
+{
+
+	public static $baseFile = '\biz\shop\classes\ShopCapitalClass';
+
+}

+ 22 - 1
sql.sql

@@ -1618,4 +1618,25 @@ CREATE TABLE `xhShopCapital` (
   PRIMARY KEY (`id`)
 ) COMMENT='门店收支';
 ALTER TABLE `xhSjCapital` DROP COLUMN `shopId`;
-ALTER TABLE `xhSjCapital` CHANGE merchantId `sjId` INT NOT NULL DEFAULT 0 COMMENT '商家id';
+ALTER TABLE `xhSjCapital` CHANGE merchantId `sjId` INT NOT NULL DEFAULT 0 COMMENT '商家id';
+CREATE TABLE `xhGhsCustomCapital` (
+  `id` INT(11) NOT NULL AUTO_INCREMENT,
+  `userId` INT(11) NOT NULL DEFAULT '0' COMMENT '用户id',
+  `alipayId` VARCHAR(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '支付宝用户id',
+  `merchantId` INT(11) NOT NULL DEFAULT '0' COMMENT '商家id',
+  `relateId` INT(11) NOT NULL DEFAULT '0' COMMENT '关联id;订单id',
+  `capitalType` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '流水订单的类型 参考configDict capitalType',
+  `operateId` INT(11) NOT NULL DEFAULT '0' COMMENT '操作人id adminId 等',
+  `balance` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '余额',
+  `amount` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '金额',
+  `io` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '收支类型0支出 1收入',
+  `totalIncome` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '累计收入',
+  `totalExpend` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '累计支出',
+  `payWay` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '资金收支方式0微信1支付宝2余额3现金,具体请查看配置文件configDict payWay',
+  `event` VARCHAR(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '事项,说明,类型的具体解释',
+  `userName` VARCHAR(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '用户名',
+  `remark` VARCHAR(500) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注',
+  `addTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
+  `updateTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
+  PRIMARY KEY (`id`)
+) COMMENT='客户收支';