From 330b527eb2a92144cee7bc93417f214bd289c055 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 09:34:59 +0800
Subject: [PATCH 01/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9console/controllers/Ini?=
=?UTF-8?q?tController.php=E6=96=87=E4=BB=B6=EF=BC=8C=E5=B0=86clearDb?=
=?UTF-8?q?=E6=96=B9=E6=B3=95=E6=94=B9=E4=B8=BA=E5=91=BD=E4=BB=A4=E8=A1=8C?=
=?UTF-8?q?=E5=8F=AF=E8=AE=BF=E9=97=AE=E7=9A=84actionClearDb=E6=96=B9?=
=?UTF-8?q?=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
console/controllers/InitController.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/console/controllers/InitController.php b/console/controllers/InitController.php
index d0ee181..bb51368 100644
--- a/console/controllers/InitController.php
+++ b/console/controllers/InitController.php
@@ -63,7 +63,7 @@ class InitController extends Controller {
* TODO没有完善
* 清空数据库
*/
- public function clearDb() {
+ public function actionClearDb() {
Yii::$app->db->createCommand("SET FOREIGN_KEY_CHECKS = 0;")->execute();
$dbname = explode('=', explode(';', Yii::$app->db->dsn)[1])[1];
$sql = "SELECT CONCAT('drop table ',table_name,';') FROM information_schema.`TABLES` WHERE table_schema='{$dbname}';";
From 2ebaef2e3186a6d7d1941da043b9351eb836762c Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 10:09:22 +0800
Subject: [PATCH 02/95] =?UTF-8?q?=E5=88=9B=E5=BB=BAant=E5=9F=BA=E7=A1=80?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97=E4=B9=8B=E4=B8=80=E2=80=94=E2=80=94=E5=95=86?=
=?UTF-8?q?=E5=93=81=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vendor/antgoods/goods/AutoloadExample.php | 14 ++++++++++
vendor/antgoods/goods/README.md | 31 +++++++++++++++++++++++
vendor/antgoods/goods/composer.json | 21 +++++++++++++++
vendor/antgoods/goods/src/Module.php | 28 ++++++++++++++++++++
4 files changed, 94 insertions(+)
create mode 100644 vendor/antgoods/goods/AutoloadExample.php
create mode 100644 vendor/antgoods/goods/README.md
create mode 100644 vendor/antgoods/goods/composer.json
create mode 100755 vendor/antgoods/goods/src/Module.php
diff --git a/vendor/antgoods/goods/AutoloadExample.php b/vendor/antgoods/goods/AutoloadExample.php
new file mode 100644
index 0000000..1f3b005
--- /dev/null
+++ b/vendor/antgoods/goods/AutoloadExample.php
@@ -0,0 +1,14 @@
+```
\ No newline at end of file
diff --git a/vendor/antgoods/goods/composer.json b/vendor/antgoods/goods/composer.json
new file mode 100644
index 0000000..3b16d84
--- /dev/null
+++ b/vendor/antgoods/goods/composer.json
@@ -0,0 +1,21 @@
+{
+ "name": "antgoods/goods",
+ "description": "ant基础模块之一",
+ "type": "yii2-extension",
+ "keywords": ["goods"],
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "linyao",
+ "email": "linyaostalker@gmail.com"
+ }
+ ],
+ "require": {
+ "yiisoft/yii2": "~2.0.0"
+ },
+ "autoload": {
+ "psr-4": {
+ "antgoods\\goods\\": ""
+ }
+ }
+}
diff --git a/vendor/antgoods/goods/src/Module.php b/vendor/antgoods/goods/src/Module.php
new file mode 100755
index 0000000..5c2b482
--- /dev/null
+++ b/vendor/antgoods/goods/src/Module.php
@@ -0,0 +1,28 @@
+
Date: Tue, 19 Nov 2019 10:25:59 +0800
Subject: [PATCH 03/95] =?UTF-8?q?=E5=9C=A8vendor/antgoods=E5=88=9B?=
=?UTF-8?q?=E5=BB=BAant=E5=95=86=E5=93=81=E6=A8=A1=E5=9D=97=E5=89=8D?=
=?UTF-8?q?=E7=AB=AF=E5=95=86=E5=93=81=E7=B1=BB=E5=88=AB=E8=A1=A8=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E8=BF=81=E7=A7=BB=E6=96=87=E4=BB=B6,=E5=9C=A8console/?=
=?UTF-8?q?migrate=E5=88=A0=E9=99=A4=E5=89=8D=E7=AB=AF=E5=95=86=E5=93=81?=
=?UTF-8?q?=E7=B1=BB=E5=88=AB=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB?=
=?UTF-8?q?=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../m191119_021851_create_table_shop_category.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
rename console/migrations/m191111_080318_create_table_shop_category.php => vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php (87%)
diff --git a/console/migrations/m191111_080318_create_table_shop_category.php b/vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php
similarity index 87%
rename from console/migrations/m191111_080318_create_table_shop_category.php
rename to vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php
index da2a1a3..eabe634 100644
--- a/console/migrations/m191111_080318_create_table_shop_category.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php
@@ -3,9 +3,9 @@
use yii\db\Migration;
/**
- * Class m191111_080318_create_table_shop_category
+ * Class m191119_021851_create_table_shop_category
*/
-class m191111_080318_create_table_shop_category extends Migration
+class m191119_021851_create_table_shop_category extends Migration
{
/**
* {@inheritdoc}
@@ -13,7 +13,7 @@ class m191111_080318_create_table_shop_category extends Migration
public function up()
{
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="前端商品类别表"';
- $this->createTable('ats_shop_category', [
+ $this->createTable('antgoods_shop_category', [
'id' => $this->primaryKey(),
'name'=>$this->string(60)->defaultValue(null)->comment('类别名称'),
'pid'=>$this->integer(11)->defaultValue(null)->comment('父级id'),
@@ -36,7 +36,7 @@ class m191111_080318_create_table_shop_category extends Migration
*/
public function down()
{
- $this->dropTable('kcs_tags_relation_goods');
+ $this->dropTable('antgoods_shop_category');
return true;
}
}
From 8665f9e6ce20fb7df0239a894d275581bde86b81 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 10:28:55 +0800
Subject: [PATCH 04/95] =?UTF-8?q?=E5=9C=A8vendor/antgoods=E5=88=9B?=
=?UTF-8?q?=E5=BB=BAant=E5=95=86=E5=93=81=E6=A8=A1=E5=9D=97=E5=90=8E?=
=?UTF-8?q?=E5=8F=B0=E5=95=86=E5=93=81=E7=B1=BB=E5=88=AB=E8=A1=A8=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E8=BF=81=E7=A7=BB=E6=96=87=E4=BB=B6,=E5=9C=A8console/?=
=?UTF-8?q?migrate=E5=88=A0=E9=99=A4=E5=90=8E=E5=8F=B0=E5=95=86=E5=93=81?=
=?UTF-8?q?=E7=B1=BB=E5=88=AB=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB?=
=?UTF-8?q?=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../m191111_081842_create_table_category.php | 39 -------------------
1 file changed, 39 deletions(-)
delete mode 100644 console/migrations/m191111_081842_create_table_category.php
diff --git a/console/migrations/m191111_081842_create_table_category.php b/console/migrations/m191111_081842_create_table_category.php
deleted file mode 100644
index e7598bd..0000000
--- a/console/migrations/m191111_081842_create_table_category.php
+++ /dev/null
@@ -1,39 +0,0 @@
-createTable('ats_category', [
- 'id' => $this->primaryKey(),
- 'name'=>$this->string(60)->defaultValue(null)->comment('类别名称'),
- 'pid'=>$this->integer(11)->defaultValue(null)->comment('父级id'),
- 'goods_count'=>$this->integer(11)->defaultValue(null)->comment('商品数量'),
- 'sort_order'=>$this->smallInteger(3)->defaultValue(null)->comment('排序'),
- 'icon_type'=>$this->tinyInteger(1)->defaultValue(null)->comment('图标类型'),
- 'icon'=>$this->string(64)->defaultValue(null)->comment('图标'),
- 'is_show'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否显示,1为不显示'),
- 'is_delete'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否删除,1为已删除'),
- 'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'),
- 'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'),
- ],$tableOptions);
- }
-
- /**
- * {@inheritdoc}
- */
- public function down()
- {
- $this->dropTable('ats_category');
- return true;
- }
-}
From f8274e4dfbfc12d3be0dcf177e0451742ad60bb2 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 10:30:33 +0800
Subject: [PATCH 05/95] =?UTF-8?q?=E5=9C=A8vendor/antgoods=E5=88=9B?=
=?UTF-8?q?=E5=BB=BAant=E5=95=86=E5=93=81=E6=A8=A1=E5=9D=97=E5=B1=9E?=
=?UTF-8?q?=E6=80=A7=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB=E6=96=87?=
=?UTF-8?q?=E4=BB=B6,=E5=9C=A8console/migrate=E5=88=A0=E9=99=A4=E5=B1=9E?=
=?UTF-8?q?=E6=80=A7=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB=E6=96=87?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../m191119_022641_create_table_category.php | 39 +++++++++++++++++++
.../m191119_022939_create_table_attribute.php | 8 ++--
2 files changed, 43 insertions(+), 4 deletions(-)
create mode 100644 vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php
rename console/migrations/m191111_082739_create_table_attribute.php => vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php (82%)
diff --git a/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php b/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php
new file mode 100644
index 0000000..4ba6c29
--- /dev/null
+++ b/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php
@@ -0,0 +1,39 @@
+createTable('antgoods_category', [
+ 'id' => $this->primaryKey(),
+ 'name'=>$this->string(60)->defaultValue(null)->comment('类别名称'),
+ 'pid'=>$this->integer(11)->defaultValue(null)->comment('父级id'),
+ 'goods_count'=>$this->integer(11)->defaultValue(null)->comment('商品数量'),
+ 'sort_order'=>$this->smallInteger(3)->defaultValue(null)->comment('排序'),
+ 'icon_type'=>$this->tinyInteger(1)->defaultValue(null)->comment('图标类型'),
+ 'icon'=>$this->string(64)->defaultValue(null)->comment('图标'),
+ 'is_show'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否显示,1为不显示'),
+ 'is_delete'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否删除,1为已删除'),
+ 'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'),
+ 'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'),
+ ],$tableOptions);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function down()
+ {
+ $this->dropTable('antgoods_category');
+ return true;
+ }
+}
diff --git a/console/migrations/m191111_082739_create_table_attribute.php b/vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php
similarity index 82%
rename from console/migrations/m191111_082739_create_table_attribute.php
rename to vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php
index d640a25..df38219 100644
--- a/console/migrations/m191111_082739_create_table_attribute.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php
@@ -3,9 +3,9 @@
use yii\db\Migration;
/**
- * Class m191111_082739_create_table_attribute
+ * Class m191119_022939_create_table_attribute
*/
-class m191111_082739_create_table_attribute extends Migration
+class m191119_022939_create_table_attribute extends Migration
{
/**
* {@inheritdoc}
@@ -13,7 +13,7 @@ class m191111_082739_create_table_attribute extends Migration
public function up()
{
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="属性表"';
- $this->createTable('ats_attribute', [
+ $this->createTable('antgoods_attribute', [
'id' => $this->primaryKey(),
'name'=>$this->string(50)->defaultValue(null)->comment('属性名'),
'value'=>$this->text()->comment('属性值'),
@@ -30,7 +30,7 @@ class m191111_082739_create_table_attribute extends Migration
*/
public function down()
{
- $this->dropTable('ats_attribute');
+ $this->dropTable('antgoods_attribute');
return true;
}
}
From 6c9913dc663bd6f3cd6ab12517fe8b11983fd41b Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 10:32:03 +0800
Subject: [PATCH 06/95] =?UTF-8?q?=E5=9C=A8vendor/antgoods=E5=88=9B?=
=?UTF-8?q?=E5=BB=BAant=E5=95=86=E5=93=81=E6=A8=A1=E5=9D=97=E5=95=86?=
=?UTF-8?q?=E5=93=81=E5=B1=9E=E6=80=A7=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81?=
=?UTF-8?q?=E7=A7=BB=E6=96=87=E4=BB=B6,=E5=9C=A8console/migrate=E5=88=A0?=
=?UTF-8?q?=E9=99=A4=E5=95=86=E5=93=81=E5=B1=9E=E6=80=A7=E8=A1=A8=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E8=BF=81=E7=A7=BB=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../migrations/m191119_023115_create_table_goods_attr.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
rename console/migrations/m191111_083808_create_table_goods_attr.php => vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php (81%)
diff --git a/console/migrations/m191111_083808_create_table_goods_attr.php b/vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php
similarity index 81%
rename from console/migrations/m191111_083808_create_table_goods_attr.php
rename to vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php
index 573252f..62e66aa 100644
--- a/console/migrations/m191111_083808_create_table_goods_attr.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php
@@ -3,9 +3,9 @@
use yii\db\Migration;
/**
- * Class m191111_083808_create_table_goods_attr
+ * Class m191119_023115_create_table_goods_attr
*/
-class m191111_083808_create_table_goods_attr extends Migration
+class m191119_023115_create_table_goods_attr extends Migration
{
/**
* {@inheritdoc}
@@ -13,7 +13,7 @@ class m191111_083808_create_table_goods_attr extends Migration
public function up()
{
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="商品属性表"';
- $this->createTable('ats_goods_attr', [
+ $this->createTable('antgoods_goods_attr', [
'id' => $this->primaryKey(),
'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'),
'attr_id'=>$this->integer(11)->defaultValue(null)->comment('属性id'),
@@ -29,7 +29,7 @@ class m191111_083808_create_table_goods_attr extends Migration
*/
public function down()
{
- $this->dropTable('ats_goods_attr');
+ $this->dropTable('antgoods_goods_attr');
return true;
}
}
From 815be5bcaa714a412fe5434b8524c694bc4b0851 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 10:41:25 +0800
Subject: [PATCH 07/95] =?UTF-8?q?=E5=9C=A8vendor/antgoods=E5=88=9B?=
=?UTF-8?q?=E5=BB=BAant=E5=95=86=E5=93=81=E6=A8=A1=E5=9D=97=E5=93=81?=
=?UTF-8?q?=E7=89=8C=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB=E6=96=87?=
=?UTF-8?q?=E4=BB=B6,=E5=9C=A8console/migrate=E5=88=A0=E9=99=A4=E5=93=81?=
=?UTF-8?q?=E7=89=8C=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB=E6=96=87?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/migrations/m191119_024029_create_table_brand.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
rename console/migrations/m191111_084452_create_table_brand.php => vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php (79%)
diff --git a/console/migrations/m191111_084452_create_table_brand.php b/vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php
similarity index 79%
rename from console/migrations/m191111_084452_create_table_brand.php
rename to vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php
index 6658ff7..615e9ea 100644
--- a/console/migrations/m191111_084452_create_table_brand.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php
@@ -3,9 +3,9 @@
use yii\db\Migration;
/**
- * Class m191111_084452_create_table_brand
+ * Class m191119_024029_create_table_brand
*/
-class m191111_084452_create_table_brand extends Migration
+class m191119_024029_create_table_brand extends Migration
{
/**
* {@inheritdoc}
@@ -13,7 +13,7 @@ class m191111_084452_create_table_brand extends Migration
public function up()
{
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="品牌表"';
- $this->createTable('ats_brand', [
+ $this->createTable('antgoods_brand', [
'id' => $this->primaryKey(),
'name'=>$this->string(50)->defaultValue(null)->comment('品牌名'),
'is_delete'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否删除,1为已删除'),
@@ -27,7 +27,7 @@ class m191111_084452_create_table_brand extends Migration
*/
public function down()
{
- $this->dropTable('ats_brand');
+ $this->dropTable('antgoods_brand');
return true;
}
}
From 10f9a9745ac46dbb0a360d9f141e64cf553dd572 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 10:43:18 +0800
Subject: [PATCH 08/95] =?UTF-8?q?=E5=9C=A8vendor/antgoods=E5=88=9B?=
=?UTF-8?q?=E5=BB=BAant=E5=95=86=E5=93=81=E6=A8=A1=E5=9D=97=E5=95=86?=
=?UTF-8?q?=E5=93=81=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB=E6=96=87?=
=?UTF-8?q?=E4=BB=B6,=E5=9C=A8console/migrate=E5=88=A0=E9=99=A4=E5=95=86?=
=?UTF-8?q?=E5=93=81=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB=E6=96=87?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/migrations/m191119_024205_create_table_goods.php | 4 ++--
.../antgoods/goods/src}/migrations/sql/goods.sql | 0
2 files changed, 2 insertions(+), 2 deletions(-)
rename console/migrations/m191111_095158_create_table_goods.php => vendor/antgoods/goods/src/migrations/m191119_024205_create_table_goods.php (77%)
rename {console => vendor/antgoods/goods/src}/migrations/sql/goods.sql (100%)
mode change 100644 => 100755
diff --git a/console/migrations/m191111_095158_create_table_goods.php b/vendor/antgoods/goods/src/migrations/m191119_024205_create_table_goods.php
similarity index 77%
rename from console/migrations/m191111_095158_create_table_goods.php
rename to vendor/antgoods/goods/src/migrations/m191119_024205_create_table_goods.php
index 5644e70..c3aa5fb 100644
--- a/console/migrations/m191111_095158_create_table_goods.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_024205_create_table_goods.php
@@ -3,9 +3,9 @@
use yii\db\Migration;
/**
- * Class m191111_095158_create_table_goods
+ * Class m191119_024205_create_table_goods
*/
-class m191111_095158_create_table_goods extends Migration
+class m191119_024205_create_table_goods extends Migration
{
/**
* {@inheritdoc}
diff --git a/console/migrations/sql/goods.sql b/vendor/antgoods/goods/src/migrations/sql/goods.sql
old mode 100644
new mode 100755
similarity index 100%
rename from console/migrations/sql/goods.sql
rename to vendor/antgoods/goods/src/migrations/sql/goods.sql
From dfde8e39fe8a15078da50638469a3c6bd2425957 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 10:46:39 +0800
Subject: [PATCH 09/95] =?UTF-8?q?=E5=9C=A8vendor/antgoods=E5=88=9B?=
=?UTF-8?q?=E5=BB=BAant=E5=95=86=E5=93=81=E6=A8=A1=E5=9D=97=E5=95=86?=
=?UTF-8?q?=E5=93=81sku=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB?=
=?UTF-8?q?=E6=96=87=E4=BB=B6,=E5=9C=A8console/migrate=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=E5=95=86=E5=93=81sku=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81?=
=?UTF-8?q?=E7=A7=BB=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/migrations/m191119_024205_create_table_goods.php | 2 +-
.../migrations/m191119_024345_create_table_goods_sku.php | 6 +++---
vendor/antgoods/goods/src/migrations/sql/goods.sql | 4 ++--
.../antgoods/goods/src}/migrations/sql/goods_sku.sql | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
rename console/migrations/m191111_100540_create_table_goods_sku.php => vendor/antgoods/goods/src/migrations/m191119_024345_create_table_goods_sku.php (66%)
rename {console => vendor/antgoods/goods/src}/migrations/sql/goods_sku.sql (89%)
mode change 100644 => 100755
diff --git a/vendor/antgoods/goods/src/migrations/m191119_024205_create_table_goods.php b/vendor/antgoods/goods/src/migrations/m191119_024205_create_table_goods.php
index c3aa5fb..d16c1e5 100644
--- a/vendor/antgoods/goods/src/migrations/m191119_024205_create_table_goods.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_024205_create_table_goods.php
@@ -21,7 +21,7 @@ class m191119_024205_create_table_goods extends Migration
*/
public function down()
{
- $this->dropTable("ats_goods");
+ $this->dropTable("antgoods_goods");
return true;
}
}
diff --git a/console/migrations/m191111_100540_create_table_goods_sku.php b/vendor/antgoods/goods/src/migrations/m191119_024345_create_table_goods_sku.php
similarity index 66%
rename from console/migrations/m191111_100540_create_table_goods_sku.php
rename to vendor/antgoods/goods/src/migrations/m191119_024345_create_table_goods_sku.php
index ac7ec13..227b38b 100644
--- a/console/migrations/m191111_100540_create_table_goods_sku.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_024345_create_table_goods_sku.php
@@ -3,9 +3,9 @@
use yii\db\Migration;
/**
- * Class m191111_100540_create_table_goods_sku
+ * Class m191119_024345_create_table_goods_sku
*/
-class m191111_100540_create_table_goods_sku extends Migration
+class m191119_024345_create_table_goods_sku extends Migration
{
/**
* {@inheritdoc}
@@ -21,7 +21,7 @@ class m191111_100540_create_table_goods_sku extends Migration
*/
public function down()
{
- $this->dropTable("ats_goods_sku");
+ $this->dropTable("antgoods_goods_sku");
return true;
}
}
diff --git a/vendor/antgoods/goods/src/migrations/sql/goods.sql b/vendor/antgoods/goods/src/migrations/sql/goods.sql
index 186d046..238e7c9 100755
--- a/vendor/antgoods/goods/src/migrations/sql/goods.sql
+++ b/vendor/antgoods/goods/src/migrations/sql/goods.sql
@@ -1,5 +1,5 @@
-DROP TABLE IF EXISTS `ats_goods`;
-CREATE TABLE `ats_goods` (
+DROP TABLE IF EXISTS `antgoods_goods`;
+CREATE TABLE `antgoods_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pid` int(11) DEFAULT NULL COMMENT '父级id',
`cat_id` int(11) DEFAULT NULL COMMENT '后台商品类别id',
diff --git a/console/migrations/sql/goods_sku.sql b/vendor/antgoods/goods/src/migrations/sql/goods_sku.sql
old mode 100644
new mode 100755
similarity index 89%
rename from console/migrations/sql/goods_sku.sql
rename to vendor/antgoods/goods/src/migrations/sql/goods_sku.sql
index 0a5ec6c..478a19f
--- a/console/migrations/sql/goods_sku.sql
+++ b/vendor/antgoods/goods/src/migrations/sql/goods_sku.sql
@@ -1,5 +1,5 @@
-DROP TABLE IF EXISTS `ats_goods_sku`;
-CREATE TABLE `ats_goods_sku` (
+DROP TABLE IF EXISTS `antgoods_goods_sku`;
+CREATE TABLE `antgoods_goods_sku` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`goods_id` int(11) DEFAULT NULL COMMENT '商品id',
`goods_code` varchar(50) DEFAULT NULL COMMENT '商品条码',
From 39009a64aa9c9f85e014cc7f425e729dba39bff4 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 10:57:20 +0800
Subject: [PATCH 10/95] =?UTF-8?q?=E5=9C=A8vendor/antgoods=E5=88=9B?=
=?UTF-8?q?=E5=BB=BAant=E5=95=86=E5=93=81=E6=A8=A1=E5=9D=97=E4=BE=9B?=
=?UTF-8?q?=E5=BA=94=E5=95=86=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81=E7=A7=BB?=
=?UTF-8?q?=E6=96=87=E4=BB=B6,=E5=9C=A8console/migrate=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81?=
=?UTF-8?q?=E7=A7=BB=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../migrations/m191119_025607_create_table_supplier.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
rename console/migrations/m191111_100639_create_table_supplier.php => vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php (83%)
diff --git a/console/migrations/m191111_100639_create_table_supplier.php b/vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php
similarity index 83%
rename from console/migrations/m191111_100639_create_table_supplier.php
rename to vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php
index e13f46a..60ccef4 100644
--- a/console/migrations/m191111_100639_create_table_supplier.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php
@@ -3,9 +3,9 @@
use yii\db\Migration;
/**
- * Class m191111_100639_create_table_supplier
+ * Class m191119_025607_create_table_supplier
*/
-class m191111_100639_create_table_supplier extends Migration
+class m191119_025607_create_table_supplier extends Migration
{
/**
* {@inheritdoc}
@@ -13,7 +13,7 @@ class m191111_100639_create_table_supplier extends Migration
public function up()
{
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="供应商表"';
- $this->createTable('ats_supplier', [
+ $this->createTable('antgoods_supplier', [
'id' => $this->primaryKey(),
'name'=>$this->string(50)->defaultValue(null)->comment('供应商名称'),
'full_name'=>$this->string(50)->defaultValue(null)->comment('供应商全称'),
@@ -30,7 +30,7 @@ class m191111_100639_create_table_supplier extends Migration
*/
public function down()
{
- $this->dropTable('ats_supplier');
+ $this->dropTable('antgoods_supplier');
return true;
}
}
From 3bc83f3fc8788a7b89bfb6524022395cf8cb3525 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:00:16 +0800
Subject: [PATCH 11/95] =?UTF-8?q?=E5=9C=A8vendor/antgoods=E5=88=9B?=
=?UTF-8?q?=E5=BB=BAant=E5=95=86=E5=93=81=E6=A8=A1=E5=9D=97=E7=AD=9B?=
=?UTF-8?q?=E9=80=89=E5=B1=9E=E6=80=A7=E8=A1=A8=E6=95=B0=E6=8D=AE=E8=BF=81?=
=?UTF-8?q?=E7=A7=BB=E6=96=87=E4=BB=B6,=E5=9C=A8console/migrate=E5=88=A0?=
=?UTF-8?q?=E9=99=A4=E7=AD=9B=E9=80=89=E5=B1=9E=E6=80=A7=E8=A1=A8=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E8=BF=81=E7=A7=BB=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../m191119_025843_create_table_filter_attr.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
rename console/migrations/m191111_100958_create_table_filter_attr.php => vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php (81%)
diff --git a/console/migrations/m191111_100958_create_table_filter_attr.php b/vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php
similarity index 81%
rename from console/migrations/m191111_100958_create_table_filter_attr.php
rename to vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php
index 357f4dd..5ab3f83 100644
--- a/console/migrations/m191111_100958_create_table_filter_attr.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php
@@ -3,9 +3,9 @@
use yii\db\Migration;
/**
- * Class m191111_100958_create_table_filter_attr
+ * Class m191119_025843_create_table_filter_attr
*/
-class m191111_100958_create_table_filter_attr extends Migration
+class m191119_025843_create_table_filter_attr extends Migration
{
/**
* {@inheritdoc}
@@ -13,7 +13,7 @@ class m191111_100958_create_table_filter_attr extends Migration
public function up()
{
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="筛选属性表"';
- $this->createTable('ats_filter_attr', [
+ $this->createTable('antgoods_filter_attr', [
'id' => $this->primaryKey(),
'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'),
'attr_id'=>$this->integer(11)->defaultValue(null)->comment('属性id'),
@@ -29,7 +29,7 @@ class m191111_100958_create_table_filter_attr extends Migration
*/
public function down()
{
- $this->dropTable('ats_filter_attr');
+ $this->dropTable('antgoods_filter_attr');
return true;
}
}
From 0b7ed0fcd3318f8954d78f0c2091e05d2189b9e2 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:08:00 +0800
Subject: [PATCH 12/95] =?UTF-8?q?antgoods=E6=A8=A1=E5=9D=97=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0shopcategory=E6=A8=A1=E5=9E=8B=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/models/ars/Category.php | 85 -------------------
.../goods/src}/models/ars/ShopCategory.php | 2 +-
2 files changed, 1 insertion(+), 86 deletions(-)
delete mode 100644 common/models/ars/Category.php
rename {common => vendor/antgoods/goods/src}/models/ars/ShopCategory.php (98%)
mode change 100644 => 100755
diff --git a/common/models/ars/Category.php b/common/models/ars/Category.php
deleted file mode 100644
index 3e67792..0000000
--- a/common/models/ars/Category.php
+++ /dev/null
@@ -1,85 +0,0 @@
- 60],
- [['icon'], 'string', 'max' => 64],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '类别名称',
- 'pid' => '父级id',
- 'goods_count' => '商品数量',
- 'sort_order' => '排序',
- 'icon_type' => '图标类型',
- 'icon' => '图标',
- 'is_show' => '是否显示,1为不显示',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/ShopCategory.php b/vendor/antgoods/goods/src/models/ars/ShopCategory.php
old mode 100644
new mode 100755
similarity index 98%
rename from common/models/ars/ShopCategory.php
rename to vendor/antgoods/goods/src/models/ars/ShopCategory.php
index 5df7d3d..aac4022
--- a/common/models/ars/ShopCategory.php
+++ b/vendor/antgoods/goods/src/models/ars/ShopCategory.php
@@ -1,6 +1,6 @@
Date: Tue, 19 Nov 2019 11:08:22 +0800
Subject: [PATCH 13/95] =?UTF-8?q?antgoods=E6=A8=A1=E5=9D=97=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0category=E6=A8=A1=E5=9E=8B=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../goods/src/models/ars/Category.php | 85 +++++++++++++++++++
1 file changed, 85 insertions(+)
create mode 100755 vendor/antgoods/goods/src/models/ars/Category.php
diff --git a/vendor/antgoods/goods/src/models/ars/Category.php b/vendor/antgoods/goods/src/models/ars/Category.php
new file mode 100755
index 0000000..3e67792
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/Category.php
@@ -0,0 +1,85 @@
+ 60],
+ [['icon'], 'string', 'max' => 64],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '类别名称',
+ 'pid' => '父级id',
+ 'goods_count' => '商品数量',
+ 'sort_order' => '排序',
+ 'icon_type' => '图标类型',
+ 'icon' => '图标',
+ 'is_show' => '是否显示,1为不显示',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
From 59d6ceeee1b4c7edcaac18440e52969c1d58679c Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:08:49 +0800
Subject: [PATCH 14/95] =?UTF-8?q?antgoods=E6=A8=A1=E5=9D=97=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0attribute=E6=A8=A1=E5=9E=8B=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
{common => vendor/antgoods/goods/src}/models/ars/Attribute.php | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename {common => vendor/antgoods/goods/src}/models/ars/Attribute.php (100%)
mode change 100644 => 100755
diff --git a/common/models/ars/Attribute.php b/vendor/antgoods/goods/src/models/ars/Attribute.php
old mode 100644
new mode 100755
similarity index 100%
rename from common/models/ars/Attribute.php
rename to vendor/antgoods/goods/src/models/ars/Attribute.php
From 746f566d13c9503204d0a5dcd9368df390a00fff Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:10:14 +0800
Subject: [PATCH 15/95] =?UTF-8?q?antgoods=E6=A8=A1=E5=9D=97=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0goodsattribute=E6=A8=A1=E5=9E=8B=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
{common => vendor/antgoods/goods/src}/models/ars/GoodsAttr.php | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename {common => vendor/antgoods/goods/src}/models/ars/GoodsAttr.php (100%)
mode change 100644 => 100755
diff --git a/common/models/ars/GoodsAttr.php b/vendor/antgoods/goods/src/models/ars/GoodsAttr.php
old mode 100644
new mode 100755
similarity index 100%
rename from common/models/ars/GoodsAttr.php
rename to vendor/antgoods/goods/src/models/ars/GoodsAttr.php
From 0788b1b08de58619a5a11ceb7a0d6467b1549337 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:10:35 +0800
Subject: [PATCH 16/95] =?UTF-8?q?antgoods=E6=A8=A1=E5=9D=97=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0brand=E6=A8=A1=E5=9E=8B=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
{common => vendor/antgoods/goods/src}/models/ars/Brand.php | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename {common => vendor/antgoods/goods/src}/models/ars/Brand.php (100%)
mode change 100644 => 100755
diff --git a/common/models/ars/Brand.php b/vendor/antgoods/goods/src/models/ars/Brand.php
old mode 100644
new mode 100755
similarity index 100%
rename from common/models/ars/Brand.php
rename to vendor/antgoods/goods/src/models/ars/Brand.php
From 4eecb8ae4d82a694f7e90e5ab3c4c430ae6b9e55 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:10:49 +0800
Subject: [PATCH 17/95] =?UTF-8?q?antgoods=E6=A8=A1=E5=9D=97=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0goods=E6=A8=A1=E5=9E=8B=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
{common => vendor/antgoods/goods/src}/models/ars/Goods.php | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename {common => vendor/antgoods/goods/src}/models/ars/Goods.php (100%)
mode change 100644 => 100755
diff --git a/common/models/ars/Goods.php b/vendor/antgoods/goods/src/models/ars/Goods.php
old mode 100644
new mode 100755
similarity index 100%
rename from common/models/ars/Goods.php
rename to vendor/antgoods/goods/src/models/ars/Goods.php
From 6cb569c102fcaa7a97e047082b2bada9c07d97b5 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:11:05 +0800
Subject: [PATCH 18/95] =?UTF-8?q?antgoods=E6=A8=A1=E5=9D=97=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0goodssku=E6=A8=A1=E5=9E=8B=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
{common => vendor/antgoods/goods/src}/models/ars/GoodsSku.php | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename {common => vendor/antgoods/goods/src}/models/ars/GoodsSku.php (100%)
mode change 100644 => 100755
diff --git a/common/models/ars/GoodsSku.php b/vendor/antgoods/goods/src/models/ars/GoodsSku.php
old mode 100644
new mode 100755
similarity index 100%
rename from common/models/ars/GoodsSku.php
rename to vendor/antgoods/goods/src/models/ars/GoodsSku.php
From 98728d184db58bca21514bcacd1a0196a7d3c93f Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:11:54 +0800
Subject: [PATCH 19/95] =?UTF-8?q?antgoods=E6=A8=A1=E5=9D=97=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0supplier=E6=A8=A1=E5=9E=8B=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
{common => vendor/antgoods/goods/src}/models/ars/Supplier.php | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename {common => vendor/antgoods/goods/src}/models/ars/Supplier.php (100%)
mode change 100644 => 100755
diff --git a/common/models/ars/Supplier.php b/vendor/antgoods/goods/src/models/ars/Supplier.php
old mode 100644
new mode 100755
similarity index 100%
rename from common/models/ars/Supplier.php
rename to vendor/antgoods/goods/src/models/ars/Supplier.php
From edf328e00b85d5a61d5ad90dbfbcd242cd55203a Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:12:17 +0800
Subject: [PATCH 20/95] =?UTF-8?q?antgoods=E6=A8=A1=E5=9D=97=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0filter=5Fattr=E6=A8=A1=E5=9E=8B=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
{common => vendor/antgoods/goods/src}/models/ars/FilterAttr.php | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename {common => vendor/antgoods/goods/src}/models/ars/FilterAttr.php (100%)
mode change 100644 => 100755
diff --git a/common/models/ars/FilterAttr.php b/vendor/antgoods/goods/src/models/ars/FilterAttr.php
old mode 100644
new mode 100755
similarity index 100%
rename from common/models/ars/FilterAttr.php
rename to vendor/antgoods/goods/src/models/ars/FilterAttr.php
From 5ddf6795249a23f6686890798e8f46a1f6c72d2e Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:18:45 +0800
Subject: [PATCH 21/95] =?UTF-8?q?antgoods=E6=A8=A1=E5=9D=97=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0goodscontroller.php,=E5=A2=9E=E5=8A=A0goodssearch.php,?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0goods=E7=9A=84views=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E5=A4=B9=EF=BC=8C=E5=9C=A8backend=E5=88=A0=E9=99=A4=E7=9B=B8?=
=?UTF-8?q?=E5=BA=94=E7=9A=84=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../antgoods/goods/src}/controllers/GoodsController.php | 2 +-
.../antgoods/goods/src}/models/searchs/GoodsSearch.php | 2 +-
{backend => vendor/antgoods/goods/src}/views/goods/_form.php | 0
{backend => vendor/antgoods/goods/src}/views/goods/_search.php | 0
{backend => vendor/antgoods/goods/src}/views/goods/create.php | 0
{backend => vendor/antgoods/goods/src}/views/goods/index.php | 0
{backend => vendor/antgoods/goods/src}/views/goods/update.php | 0
{backend => vendor/antgoods/goods/src}/views/goods/view.php | 0
8 files changed, 2 insertions(+), 2 deletions(-)
rename {backend => vendor/antgoods/goods/src}/controllers/GoodsController.php (99%)
mode change 100644 => 100755
rename {common => vendor/antgoods/goods/src}/models/searchs/GoodsSearch.php (99%)
mode change 100644 => 100755
rename {backend => vendor/antgoods/goods/src}/views/goods/_form.php (100%)
rename {backend => vendor/antgoods/goods/src}/views/goods/_search.php (100%)
rename {backend => vendor/antgoods/goods/src}/views/goods/create.php (100%)
rename {backend => vendor/antgoods/goods/src}/views/goods/index.php (100%)
rename {backend => vendor/antgoods/goods/src}/views/goods/update.php (100%)
rename {backend => vendor/antgoods/goods/src}/views/goods/view.php (100%)
diff --git a/backend/controllers/GoodsController.php b/vendor/antgoods/goods/src/controllers/GoodsController.php
old mode 100644
new mode 100755
similarity index 99%
rename from backend/controllers/GoodsController.php
rename to vendor/antgoods/goods/src/controllers/GoodsController.php
index c9024d1..9c7a1cf
--- a/backend/controllers/GoodsController.php
+++ b/vendor/antgoods/goods/src/controllers/GoodsController.php
@@ -1,6 +1,6 @@
Date: Tue, 19 Nov 2019 11:24:04 +0800
Subject: [PATCH 22/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9antgoods=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97model=E6=96=87=E4=BB=B6=E5=91=BD=E5=90=8D=E7=A9=BA?=
=?UTF-8?q?=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vendor/antgoods/goods/src/models/ars/Attribute.php | 2 +-
vendor/antgoods/goods/src/models/ars/Brand.php | 2 +-
vendor/antgoods/goods/src/models/ars/Category.php | 2 +-
vendor/antgoods/goods/src/models/ars/FilterAttr.php | 2 +-
vendor/antgoods/goods/src/models/ars/Goods.php | 2 +-
vendor/antgoods/goods/src/models/ars/GoodsAttr.php | 2 +-
vendor/antgoods/goods/src/models/ars/GoodsSku.php | 2 +-
vendor/antgoods/goods/src/models/ars/Supplier.php | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/vendor/antgoods/goods/src/models/ars/Attribute.php b/vendor/antgoods/goods/src/models/ars/Attribute.php
index 664fb60..a7f1f95 100755
--- a/vendor/antgoods/goods/src/models/ars/Attribute.php
+++ b/vendor/antgoods/goods/src/models/ars/Attribute.php
@@ -1,6 +1,6 @@
Date: Tue, 19 Nov 2019 11:27:43 +0800
Subject: [PATCH 23/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9backend/views/layouts/s?=
=?UTF-8?q?idebar.php=E7=9A=84=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E7=9A=84=E8=B7=B3=E8=BD=AC=E5=9F=9F=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
backend/views/layouts/sidebar.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
mode change 100644 => 100755 backend/views/layouts/sidebar.php
diff --git a/backend/views/layouts/sidebar.php b/backend/views/layouts/sidebar.php
old mode 100644
new mode 100755
index 828322f..1ce632a
--- a/backend/views/layouts/sidebar.php
+++ b/backend/views/layouts/sidebar.php
@@ -22,7 +22,7 @@ use iron\widgets\Menu;
],
['label' => '商品管理', 'url' => '#', 'icon' => 'far fa-archive', 'items' => [
['label' => '商品分类', 'url' => ['category/index', 'tag' => 'new']],
- ['label' => '商品列表', 'url' => ['goods/index']],
+ ['label' => '商品列表', 'url' => ['antgoods/goods/index']],
['label' => '属性管理', 'url' => ['attribute/index']],
]
],
From fd0d4381d48cebe51d36fc41204442e7119fae75 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:30:53 +0800
Subject: [PATCH 24/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9antgoods=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97=E5=95=86=E5=93=81=E6=8E=A7=E5=88=B6=E5=99=A8=E6=96=87?=
=?UTF-8?q?=E4=BB=B6Goods=E6=A8=A1=E5=9E=8B=E5=92=8CGoodsSearch=E6=96=87?=
=?UTF-8?q?=E4=BB=B6=E7=9A=84=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vendor/antgoods/goods/src/controllers/GoodsController.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/vendor/antgoods/goods/src/controllers/GoodsController.php b/vendor/antgoods/goods/src/controllers/GoodsController.php
index 9c7a1cf..7180f54 100755
--- a/vendor/antgoods/goods/src/controllers/GoodsController.php
+++ b/vendor/antgoods/goods/src/controllers/GoodsController.php
@@ -3,8 +3,8 @@
namespace antgoods\goods\controllers;
use Yii;
-use common\models\ars\Goods;
-use common\models\searchs\GoodsSearch;
+use antgoods\goods\models\ars\Goods;
+use antgoods\goods\models\searchs\GoodsSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
From cee6abea0ac16db0945bd7a186be62fd0a741851 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:33:10 +0800
Subject: [PATCH 25/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9antgoods=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97goodssearch.php=E6=96=87=E4=BB=B6goods=E6=A8=A1?=
=?UTF-8?q?=E5=9E=8B=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vendor/antgoods/goods/src/models/searchs/GoodsSearch.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php b/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php
index a85130a..84736a0 100755
--- a/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php
+++ b/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php
@@ -5,7 +5,7 @@ namespace antgoods\goods\models\searchs;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use yii\helpers\ArrayHelper;
-use common\models\ars\Goods;
+use antgoods\goods\models\ars\Goods;
/**
* GoodsSearch represents the model behind the search form of `common\models\ars\Goods`.
From 54a55c27ece87db8d3b994279cbcc90a31b794b9 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 11:36:10 +0800
Subject: [PATCH 26/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9antgoods=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97=E6=89=80=E6=9C=89=E6=A8=A1=E5=9E=8B=E6=96=87=E4=BB=B6?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=A1=A8=E5=90=8D=E7=9A=84=E8=A1=A8=E5=89=8D?=
=?UTF-8?q?=E7=BC=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vendor/antgoods/goods/src/models/ars/Attribute.php | 2 +-
vendor/antgoods/goods/src/models/ars/Brand.php | 2 +-
vendor/antgoods/goods/src/models/ars/Category.php | 2 +-
vendor/antgoods/goods/src/models/ars/FilterAttr.php | 2 +-
vendor/antgoods/goods/src/models/ars/Goods.php | 2 +-
vendor/antgoods/goods/src/models/ars/GoodsAttr.php | 2 +-
vendor/antgoods/goods/src/models/ars/GoodsSku.php | 2 +-
vendor/antgoods/goods/src/models/ars/ShopCategory.php | 2 +-
vendor/antgoods/goods/src/models/ars/Supplier.php | 2 +-
9 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/vendor/antgoods/goods/src/models/ars/Attribute.php b/vendor/antgoods/goods/src/models/ars/Attribute.php
index a7f1f95..7699897 100755
--- a/vendor/antgoods/goods/src/models/ars/Attribute.php
+++ b/vendor/antgoods/goods/src/models/ars/Attribute.php
@@ -24,7 +24,7 @@ class Attribute extends \yii\db\ActiveRecord
*/
public static function tableName()
{
- return 'ats_attribute';
+ return 'antgoods_attribute';
}
/**
diff --git a/vendor/antgoods/goods/src/models/ars/Brand.php b/vendor/antgoods/goods/src/models/ars/Brand.php
index 0cff1d8..aab9e05 100755
--- a/vendor/antgoods/goods/src/models/ars/Brand.php
+++ b/vendor/antgoods/goods/src/models/ars/Brand.php
@@ -21,7 +21,7 @@ class Brand extends \yii\db\ActiveRecord
*/
public static function tableName()
{
- return 'ats_brand';
+ return 'antgoods_brand';
}
/**
diff --git a/vendor/antgoods/goods/src/models/ars/Category.php b/vendor/antgoods/goods/src/models/ars/Category.php
index 4e5333c..e7e7938 100755
--- a/vendor/antgoods/goods/src/models/ars/Category.php
+++ b/vendor/antgoods/goods/src/models/ars/Category.php
@@ -27,7 +27,7 @@ class Category extends \yii\db\ActiveRecord
*/
public static function tableName()
{
- return 'ats_category';
+ return 'antgoods_category';
}
/**
diff --git a/vendor/antgoods/goods/src/models/ars/FilterAttr.php b/vendor/antgoods/goods/src/models/ars/FilterAttr.php
index 4230496..1e377f1 100755
--- a/vendor/antgoods/goods/src/models/ars/FilterAttr.php
+++ b/vendor/antgoods/goods/src/models/ars/FilterAttr.php
@@ -23,7 +23,7 @@ class FilterAttr extends \yii\db\ActiveRecord
*/
public static function tableName()
{
- return 'ats_filter_attr';
+ return 'antgoods_filter_attr';
}
/**
diff --git a/vendor/antgoods/goods/src/models/ars/Goods.php b/vendor/antgoods/goods/src/models/ars/Goods.php
index e565c02..f2ecddd 100755
--- a/vendor/antgoods/goods/src/models/ars/Goods.php
+++ b/vendor/antgoods/goods/src/models/ars/Goods.php
@@ -49,7 +49,7 @@ class Goods extends \yii\db\ActiveRecord
*/
public static function tableName()
{
- return 'ats_goods';
+ return 'antgoods_goods';
}
/**
diff --git a/vendor/antgoods/goods/src/models/ars/GoodsAttr.php b/vendor/antgoods/goods/src/models/ars/GoodsAttr.php
index c07a133..9f22e23 100755
--- a/vendor/antgoods/goods/src/models/ars/GoodsAttr.php
+++ b/vendor/antgoods/goods/src/models/ars/GoodsAttr.php
@@ -23,7 +23,7 @@ class GoodsAttr extends \yii\db\ActiveRecord
*/
public static function tableName()
{
- return 'ats_goods_attr';
+ return 'antgoods_goods_attr';
}
/**
diff --git a/vendor/antgoods/goods/src/models/ars/GoodsSku.php b/vendor/antgoods/goods/src/models/ars/GoodsSku.php
index 5b985fd..ea5b731 100755
--- a/vendor/antgoods/goods/src/models/ars/GoodsSku.php
+++ b/vendor/antgoods/goods/src/models/ars/GoodsSku.php
@@ -36,7 +36,7 @@ class GoodsSku extends \yii\db\ActiveRecord
*/
public static function tableName()
{
- return 'ats_goods_sku';
+ return 'antgoods_goods_sku';
}
/**
diff --git a/vendor/antgoods/goods/src/models/ars/ShopCategory.php b/vendor/antgoods/goods/src/models/ars/ShopCategory.php
index aac4022..aef66d6 100755
--- a/vendor/antgoods/goods/src/models/ars/ShopCategory.php
+++ b/vendor/antgoods/goods/src/models/ars/ShopCategory.php
@@ -30,7 +30,7 @@ class ShopCategory extends \yii\db\ActiveRecord
*/
public static function tableName()
{
- return 'ats_shop_category';
+ return 'antgoods_shop_category';
}
/**
diff --git a/vendor/antgoods/goods/src/models/ars/Supplier.php b/vendor/antgoods/goods/src/models/ars/Supplier.php
index 2aff034..c4ae6a8 100755
--- a/vendor/antgoods/goods/src/models/ars/Supplier.php
+++ b/vendor/antgoods/goods/src/models/ars/Supplier.php
@@ -24,7 +24,7 @@ class Supplier extends \yii\db\ActiveRecord
*/
public static function tableName()
{
- return 'ats_supplier';
+ return 'antgoods_supplier';
}
/**
From 23062a786db283f7823bac4ab6038d11660a70e7 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 13:57:11 +0800
Subject: [PATCH 27/95] =?UTF-8?q?=E5=A2=9E=E5=8A=A0antgoods=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
composer.json | 5 +
.../goods/src/controllers/GoodsController.php | 149 -------------
.../antgoods/goods/src/models/ars/Goods.php | 133 ------------
.../goods/src/models/searchs/GoodsSearch.php | 197 ------------------
.../antgoods/goods/src/views/goods/_form.php | 82 --------
.../goods/src/views/goods/_search.php | 49 -----
.../antgoods/goods/src/views/goods/create.php | 18 --
.../antgoods/goods/src/views/goods/index.php | 28 ---
.../antgoods/goods/src/views/goods/update.php | 19 --
.../antgoods/goods/src/views/goods/view.php | 59 ------
10 files changed, 5 insertions(+), 734 deletions(-)
delete mode 100755 vendor/antgoods/goods/src/controllers/GoodsController.php
delete mode 100755 vendor/antgoods/goods/src/models/ars/Goods.php
delete mode 100755 vendor/antgoods/goods/src/models/searchs/GoodsSearch.php
delete mode 100644 vendor/antgoods/goods/src/views/goods/_form.php
delete mode 100644 vendor/antgoods/goods/src/views/goods/_search.php
delete mode 100644 vendor/antgoods/goods/src/views/goods/create.php
delete mode 100644 vendor/antgoods/goods/src/views/goods/index.php
delete mode 100644 vendor/antgoods/goods/src/views/goods/update.php
delete mode 100644 vendor/antgoods/goods/src/views/goods/view.php
diff --git a/composer.json b/composer.json
index 83a43bb..8a68eb5 100755
--- a/composer.json
+++ b/composer.json
@@ -35,5 +35,10 @@
"yiisoft/yii2-debug": "^2.0@dev",
"kint-php/kint": "dev-master",
"yiisoft/yii2-gii": "^2.0@dev"
+ },
+ "autoload": {
+ "psr-4": {
+ "antgoods\\goods\\": "vendor/antgoods/goods/src"
+ }
}
}
diff --git a/vendor/antgoods/goods/src/controllers/GoodsController.php b/vendor/antgoods/goods/src/controllers/GoodsController.php
deleted file mode 100755
index 7180f54..0000000
--- a/vendor/antgoods/goods/src/controllers/GoodsController.php
+++ /dev/null
@@ -1,149 +0,0 @@
- [
- 'class' => VerbFilter::className(),
- 'actions' => [
- 'delete' => ['POST'],
- ],
- ],
- ];
- }
-
- /**
- * Lists all Goods models.
- * @return mixed
- */
- public function actionIndex()
- {
- $searchModel = new GoodsSearch();
- $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
-
- return $this->render('index', [
- 'searchModel' => $searchModel,
- 'dataProvider' => $dataProvider,
- 'columns' => $searchModel->columns()
- ]);
- }
-
- /**
- * Displays a single Goods model.
- * @param integer $id
- * @return mixed
- * @throws NotFoundHttpException if the model cannot be found
- */
- public function actionView($id)
- {
- return $this->render('view', [
- 'model' => $this->findModel($id),
- ]);
- }
-
- /**
- * Creates a new Goods model.
- * If creation is successful, the browser will be redirected to the 'view' page.
- * @return mixed
- */
- public function actionCreate()
- {
- $model = new Goods();
-
- if ($model->load(Yii::$app->request->post()) && $model->save()) {
- return $this->redirect('index');
- }
-
- return $this->render('create', [
- 'model' => $model,
- ]);
- }
-
- /**
- * Updates an existing Goods model.
- * If update is successful, the browser will be redirected to the 'view' page.
- * @param integer $id
- * @return mixed
- * @throws NotFoundHttpException if the model cannot be found
- */
- public function actionUpdate($id)
- {
- $model = $this->findModel($id);
-
- if ($model->load(Yii::$app->request->post()) && $model->save()) {
- return $this->redirect('index');
- }
-
- return $this->render('update', [
- 'model' => $model,
- ]);
- }
-
- /**
- * Deletes an existing Goods model.
- * If deletion is successful, the browser will be redirected to the 'index' page.
- * @param integer $id
- * @return mixed
- * @throws NotFoundHttpException if the model cannot be found
- */
- public function actionDelete($id)
- {
- $this->findModel($id)->delete();
-
- return $this->redirect(['index']);
- }
-
- /**
- * Finds the Goods model based on its primary key value.
- * If the model is not found, a 404 HTTP exception will be thrown.
- * @param integer $id
- * @return Goods the loaded model
- * @throws NotFoundHttpException if the model cannot be found
- */
- protected function findModel($id)
- {
- if (($model = Goods::findOne($id)) !== null) {
- return $model;
- }
-
- throw new NotFoundHttpException('The requested page does not exist.');
- }
- /**
- * @author iron
- * 文件导出
- */
- public function actionExport()
- {
- $searchModel = new GoodsSearch();
- $params = Yii::$app->request->queryParams;
- if ($params['page-type'] == 'all') {
- $dataProvider = $searchModel->allData($params);
- } else {
- $dataProvider = $searchModel->search($params);
- }
- \iron\widget\Excel::export([
- 'models' => $dataProvider->getModels(),
- 'format' => 'Xlsx',
- 'asAttachment' => true,
- 'fileName' =>'Goods'. "-" .date('Y-m-d H/i/s', time()),
- 'columns' => $searchModel->columns()
- ]);
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/Goods.php b/vendor/antgoods/goods/src/models/ars/Goods.php
deleted file mode 100755
index f2ecddd..0000000
--- a/vendor/antgoods/goods/src/models/ars/Goods.php
+++ /dev/null
@@ -1,133 +0,0 @@
- 120],
- [['sn'], 'string', 'max' => 60],
- [['code'], 'string', 'max' => 50],
- [['unit'], 'string', 'max' => 16],
- [['brief'], 'string', 'max' => 255],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'pid' => '父级id',
- 'cat_id' => '后台商品类别id',
- 'brand_id' => '品牌id',
- 'shop_cat_id' => '前端商品类别id',
- 'name' => '商品名称',
- 'sn' => '商品唯一货号',
- 'code' => '商品货码',
- 'supplier_id' => '供应商id',
- 'weight' => '重量',
- 'length' => '长度',
- 'width' => '宽度',
- 'height' => '高度',
- 'diameter' => '直径',
- 'unit' => '单位',
- 'sold_count' => '已售数量',
- 'limit_count' => '限购数量',
- 'stock' => '库存',
- 'stock_warn' => '库存警告',
- 'market_price' => '市场价',
- 'price' => '销售价',
- 'brief' => '简介',
- 'description' => '详细介绍',
- 'image' => '图片id',
- 'model_id' => '模型id',
- 'is_sale' => '该商品是否开放销售,1为是,0为否',
- 'sort_order' => '排序',
- 'bouns_points' => '奖励积分',
- 'experience_points' => '经验值',
- 'is_delete' => '是否删除,1为已删除',
- 'express_template' => '配送详情id',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php b/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php
deleted file mode 100755
index 84736a0..0000000
--- a/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php
+++ /dev/null
@@ -1,197 +0,0 @@
- 'blobt\grid\CheckboxColumn',
- 'width' => '2%',
- 'align' => 'center'
- ],
- 'id',
- 'pid',
- 'cat_id',
- 'brand_id',
- 'shop_cat_id',
- //'name',
- //'sn',
- //'code',
- //'supplier_id',
- //'weight',
- //'length',
- //'width',
- //'height',
- //'diameter',
- //'unit',
- //'sold_count',
- //'limit_count',
- //'stock',
- //'stock_warn',
- //'market_price',
- //'price',
- //'brief',
- //'description',
- //'image',
- //'model_id',
- //'is_sale',
- //'sort_order',
- //'bouns_points',
- //'experience_points',
- //'is_delete',
- //'express_template',
- //'created_at',
- //'updated_at',
- [
- 'class' => 'iron\grid\ActionColumn',
- 'align' => 'center',
- ],
- ];
- }
- /**
- * @param $params
- * @return ActiveDataProvider
- * 不分页的所有数据
- */
- public function allData($params)
- {
- $query = Goods::find();
- $dataProvider = new ActiveDataProvider([
- 'query' => $query,
- 'pagination' => false,
- 'sort' => false
- ]);
- $this->load($params);
- return $this->filter($query, $dataProvider);
- }
-
- /**
- * Creates data provider instance with search query applied
- *
- * @param array $params
- *
- * @return ActiveDataProvider
- */
- public function search($params)
- {
- $query = Goods::find();
-
- // add conditions that should always apply here
-
- $dataProvider = new ActiveDataProvider([
- 'query' => $query,
- 'pagination' => [
- 'pageSizeLimit' => [1, 200]
- ],
- 'sort' => [
- 'defaultOrder' => [
- 'id' => SORT_DESC,
- ]
- ],
- ]);
-
- $this->load($params);
- return $this->filter($query, $dataProvider);
- }
- /**
- * @param $query
- * @param $dataProvider
- * @return ActiveDataProvider
- * 条件筛选
- */
- private function filter($query, $dataProvider){
- if (!$this->validate()) {
- // uncomment the following line if you do not want to return any records when validation fails
- // $query->where('0=1');
- return $dataProvider;
- }
-
- // grid filtering conditions
- $query->andFilterWhere([
- 'id' => $this->id,
- 'pid' => $this->pid,
- 'cat_id' => $this->cat_id,
- 'brand_id' => $this->brand_id,
- 'shop_cat_id' => $this->shop_cat_id,
- 'supplier_id' => $this->supplier_id,
- 'weight' => $this->weight,
- 'length' => $this->length,
- 'width' => $this->width,
- 'height' => $this->height,
- 'diameter' => $this->diameter,
- 'sold_count' => $this->sold_count,
- 'limit_count' => $this->limit_count,
- 'stock' => $this->stock,
- 'stock_warn' => $this->stock_warn,
- 'market_price' => $this->market_price,
- 'price' => $this->price,
- 'image' => $this->image,
- 'model_id' => $this->model_id,
- 'is_sale' => $this->is_sale,
- 'sort_order' => $this->sort_order,
- 'bouns_points' => $this->bouns_points,
- 'experience_points' => $this->experience_points,
- 'is_delete' => $this->is_delete,
- 'express_template' => $this->express_template,
- 'created_at' => $this->created_at,
- 'updated_at' => $this->updated_at,
- ]);
-
- $query->andFilterWhere(['like', 'name', $this->name])
- ->andFilterWhere(['like', 'sn', $this->sn])
- ->andFilterWhere(['like', 'code', $this->code])
- ->andFilterWhere(['like', 'unit', $this->unit])
- ->andFilterWhere(['like', 'brief', $this->brief])
- ->andFilterWhere(['like', 'description', $this->description]);
- if ($this->created_at_range) {
- $arr = explode(' ~ ', $this->created_at_range);
- $start = strtotime($arr[0]);
- $end = strtotime($arr[1]) + 3600 * 24;
- $query->andFilterWhere(['between', 'created_at', $start, $end]);
- }
- return $dataProvider;
- }
-}
diff --git a/vendor/antgoods/goods/src/views/goods/_form.php b/vendor/antgoods/goods/src/views/goods/_form.php
deleted file mode 100644
index 149e969..0000000
--- a/vendor/antgoods/goods/src/views/goods/_form.php
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
diff --git a/vendor/antgoods/goods/src/views/goods/_search.php b/vendor/antgoods/goods/src/views/goods/_search.php
deleted file mode 100644
index 9a86777..0000000
--- a/vendor/antgoods/goods/src/views/goods/_search.php
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
- ['index'],
- 'method' => 'get',
- 'validateOnType' => true,
- ]);
-?>
-
-
- = $form->field($model, 'id', [
- "template" => "{input}{error}",
- "inputOptions" => [
- "placeholder" => "检索ID",
- "class" => "form-control",
- ],
- "errorOptions" => [
- "class" => "error-tips"
- ]
- ])
- ?>
-
-
- = $form->field($model, "created_at_range", [
- "template" => "{input}{error}",
- "inputOptions" => [
- "placeholder" => "创建时间",
- ],
- "errorOptions" => [
- "class" => "error-tips"
- ]
- ])->widget(DateRangePicker::className());
- ?>
-
-
- = Html::submitButton('', ['class' => 'btn btn-default']) ?>
- = Html::resetButton('', ['class' => 'btn btn-default']) ?>
-
-
-
\ No newline at end of file
diff --git a/vendor/antgoods/goods/src/views/goods/create.php b/vendor/antgoods/goods/src/views/goods/create.php
deleted file mode 100644
index d32b1b8..0000000
--- a/vendor/antgoods/goods/src/views/goods/create.php
+++ /dev/null
@@ -1,18 +0,0 @@
-title = '创建 Goods';
-$this->params['breadcrumbs'][] = ['label' => 'Goods', 'url' => ['index']];
-$this->params['breadcrumbs'][] = $this->title;
-?>
-
-
- = $this->render('_form', [
- 'model' => $model,
- ]) ?>
-
-
diff --git a/vendor/antgoods/goods/src/views/goods/index.php b/vendor/antgoods/goods/src/views/goods/index.php
deleted file mode 100644
index 82c38b2..0000000
--- a/vendor/antgoods/goods/src/views/goods/index.php
+++ /dev/null
@@ -1,28 +0,0 @@
-title = 'Goods';
-$this->params['breadcrumbs'][] = $this->title;
-?>
-
-
- = GridView::widget([
- 'dataProvider' => $dataProvider,
- 'filter' => $this->render("_search", ['model' => $searchModel]),
- 'batch' => [
- [
- "label" => "删除",
- "url" => "goods/deletes"
- ],
- ],
- 'columns' => $columns
- ]);
- ?>
-
-
\ No newline at end of file
diff --git a/vendor/antgoods/goods/src/views/goods/update.php b/vendor/antgoods/goods/src/views/goods/update.php
deleted file mode 100644
index afaf45f..0000000
--- a/vendor/antgoods/goods/src/views/goods/update.php
+++ /dev/null
@@ -1,19 +0,0 @@
-title = '编辑 Goods: ' . $model->name;
-$this->params['breadcrumbs'][] = ['label' => 'Goods', 'url' => ['index']];
-$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
-$this->params['breadcrumbs'][] = 'Update ';
-?>
-
-
- = $this->render('_form', [
- 'model' => $model,
- ]) ?>
-
-
diff --git a/vendor/antgoods/goods/src/views/goods/view.php b/vendor/antgoods/goods/src/views/goods/view.php
deleted file mode 100644
index e2a57f2..0000000
--- a/vendor/antgoods/goods/src/views/goods/view.php
+++ /dev/null
@@ -1,59 +0,0 @@
-title = $model->name;
-$this->params['breadcrumbs'][] = ['label' => 'Goods', 'url' => ['index']];
-$this->params['breadcrumbs'][] = $this->title;
-\yii\web\YiiAsset::register($this);
-?>
-
-
-
- = Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?>
-
-
- = DetailView::widget([
- 'model' => $model,
- 'attributes' => [
- 'id',
- 'pid',
- 'cat_id',
- 'brand_id',
- 'shop_cat_id',
- 'name',
- 'sn',
- 'code',
- 'supplier_id',
- 'weight',
- 'length',
- 'width',
- 'height',
- 'diameter',
- 'unit',
- 'sold_count',
- 'limit_count',
- 'stock',
- 'stock_warn',
- 'market_price',
- 'price',
- 'brief',
- 'description:ntext',
- 'image',
- 'model_id',
- 'is_sale',
- 'sort_order',
- 'bouns_points',
- 'experience_points',
- 'is_delete',
- 'express_template',
- 'created_at',
- 'updated_at',
- ],
- ]) ?>
-
-
From eb5c46218cfdb599c9c44ff1d07b1052866e252e Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 13:59:13 +0800
Subject: [PATCH 28/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9backend=E7=9A=84?=
=?UTF-8?q?=E7=8E=AF=E5=A2=83=E7=94=9F=E6=88=90=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
environments/skeleton/backend/config/main-local.php | 8 ++++----
environments/skeleton/backend/config/params-local.php | 0
2 files changed, 4 insertions(+), 4 deletions(-)
mode change 100644 => 100755 environments/skeleton/backend/config/main-local.php
mode change 100644 => 100755 environments/skeleton/backend/config/params-local.php
diff --git a/environments/skeleton/backend/config/main-local.php b/environments/skeleton/backend/config/main-local.php
old mode 100644
new mode 100755
index ddff7d3..51a12b2
--- a/environments/skeleton/backend/config/main-local.php
+++ b/environments/skeleton/backend/config/main-local.php
@@ -22,16 +22,16 @@ if (!YII_ENV_TEST) {
'allowedIPs' => ['127.0.0.1'],
'generators' => [
'crud' => [
- 'class' => 'blobt\generators\crud\Generator',
+ 'class' => 'iron\generators\crud\Generator',
'templates' => [
'blobtCrud' => '@blobt/generators/crud/default',
- 'linyaoCrud' => '@linyao/generators/crud/default',
+ 'ironCrud' => '@iron/generators/crud/default',
]
],
'model' => [
- 'class' => 'linyao\generators\model\Generator',
+ 'class' => 'iron\generators\model\Generator',
'templates' => [
- 'linyaoModel' => '@linyao/generators/model/default',
+ 'ironModel' => '@iron/generators/model/default',
]
]
],
diff --git a/environments/skeleton/backend/config/params-local.php b/environments/skeleton/backend/config/params-local.php
old mode 100644
new mode 100755
From 8ba1b9474ee1e3d491be98e4a3afed7e84cd2cca Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 14:57:26 +0800
Subject: [PATCH 29/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E5=BA=93=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/models/ars/Address.php | 86 -------------
common/models/ars/AfterSale.php | 78 ------------
common/models/ars/Area.php | 50 --------
common/models/ars/Cart.php | 82 ------------
common/models/ars/City.php | 50 --------
common/models/ars/Collection.php | 71 -----------
common/models/ars/Comment.php | 78 ------------
common/models/ars/Delivery.php | 84 -------------
common/models/ars/ExpressTemplate.php | 93 --------------
common/models/ars/File.php | 85 -------------
common/models/ars/Order.php | 119 ------------------
common/models/ars/OrderGoods.php | 84 -------------
common/models/ars/PaymentLog.php | 84 -------------
common/models/ars/Province.php | 48 -------
common/models/ars/RefundLog.php | 70 -----------
common/models/ars/SearchHistory.php | 78 ------------
common/models/ars/TakingSite.php | 82 ------------
common/models/ars/TemFile.php | 79 ------------
console/migrations/m130524_201442_init.php | 0
.../migrations/m140506_102106_rbac_init.php | 0
...c_add_index_on_auth_assignment_user_id.php | 0
...38_rbac_updates_indexes_without_prefix.php | 0
...erification_token_column_to_user_table.php | 0
.../m190802_072830_add_category.php | 0
.../m191111_101658_create_table_area.php | 0
.../m191111_102644_create_table_province.php | 0
.../m191111_102730_create_table_city.php | 0
.../m191111_102925_create_table_cart.php | 8 +-
.../m191111_112559_create_table_address.php | 8 +-
...m191111_113455_create_table_after_sale.php | 6 +-
...112_005106_create_table_search_history.php | 2 +-
...m191112_005545_create_table_collection.php | 4 +-
.../m191112_005702_create_table_comment.php | 2 +-
.../m191112_010421_create_table_order.php | 2 +-
...191112_011517_create_table_order_goods.php | 4 +-
...191112_012449_create_table_taking_site.php | 2 +-
...2_014508_create_table_express_template.php | 2 +-
.../m191112_015939_create_table_delivery.php | 2 +-
...191112_020830_create_table_payment_log.php | 0
...m191112_021528_create_table_refund_log.php | 0
.../m191112_022131_create_table_file.php | 0
.../m191112_022532_create_table_tem_file.php | 0
console/migrations/schema-mysql.sql | 0
console/migrations/sql/add_category.sql | 0
console/migrations/sql/area.sql | 0
console/migrations/sql/city.sql | 0
console/migrations/sql/province.sql | 0
...1119_021851_create_table_shop_category.php | 6 +-
.../m191119_022641_create_table_category.php | 10 +-
.../m191119_022939_create_table_attribute.php | 4 +-
...m191119_023115_create_table_goods_attr.php | 6 +-
.../m191119_024029_create_table_brand.php | 2 +-
.../m191119_025607_create_table_supplier.php | 8 +-
...191119_025843_create_table_filter_attr.php | 6 +-
.../goods/src/migrations/sql/goods.sql | 10 +-
.../goods/src/migrations/sql/goods_sku.sql | 6 +-
.../goods/src/models/ars/Attribute.php | 79 ------------
.../antgoods/goods/src/models/ars/Brand.php | 72 -----------
.../goods/src/models/ars/Category.php | 85 -------------
.../goods/src/models/ars/FilterAttr.php | 76 -----------
.../goods/src/models/ars/GoodsAttr.php | 76 -----------
.../goods/src/models/ars/GoodsSku.php | 103 ---------------
.../goods/src/models/ars/ShopCategory.php | 94 --------------
.../goods/src/models/ars/Supplier.php | 79 ------------
64 files changed, 50 insertions(+), 2115 deletions(-)
delete mode 100644 common/models/ars/Address.php
delete mode 100644 common/models/ars/AfterSale.php
delete mode 100644 common/models/ars/Area.php
delete mode 100644 common/models/ars/Cart.php
delete mode 100644 common/models/ars/City.php
delete mode 100644 common/models/ars/Collection.php
delete mode 100644 common/models/ars/Comment.php
delete mode 100644 common/models/ars/Delivery.php
delete mode 100644 common/models/ars/ExpressTemplate.php
delete mode 100644 common/models/ars/File.php
delete mode 100644 common/models/ars/Order.php
delete mode 100644 common/models/ars/OrderGoods.php
delete mode 100644 common/models/ars/PaymentLog.php
delete mode 100644 common/models/ars/Province.php
delete mode 100644 common/models/ars/RefundLog.php
delete mode 100644 common/models/ars/SearchHistory.php
delete mode 100644 common/models/ars/TakingSite.php
delete mode 100644 common/models/ars/TemFile.php
mode change 100644 => 100755 console/migrations/m130524_201442_init.php
mode change 100644 => 100755 console/migrations/m140506_102106_rbac_init.php
mode change 100644 => 100755 console/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php
mode change 100644 => 100755 console/migrations/m180523_151638_rbac_updates_indexes_without_prefix.php
mode change 100644 => 100755 console/migrations/m190124_110200_add_verification_token_column_to_user_table.php
mode change 100644 => 100755 console/migrations/m190802_072830_add_category.php
mode change 100644 => 100755 console/migrations/m191111_101658_create_table_area.php
mode change 100644 => 100755 console/migrations/m191111_102644_create_table_province.php
mode change 100644 => 100755 console/migrations/m191111_102730_create_table_city.php
mode change 100644 => 100755 console/migrations/m191111_102925_create_table_cart.php
mode change 100644 => 100755 console/migrations/m191111_112559_create_table_address.php
mode change 100644 => 100755 console/migrations/m191111_113455_create_table_after_sale.php
mode change 100644 => 100755 console/migrations/m191112_005106_create_table_search_history.php
mode change 100644 => 100755 console/migrations/m191112_005545_create_table_collection.php
mode change 100644 => 100755 console/migrations/m191112_005702_create_table_comment.php
mode change 100644 => 100755 console/migrations/m191112_010421_create_table_order.php
mode change 100644 => 100755 console/migrations/m191112_011517_create_table_order_goods.php
mode change 100644 => 100755 console/migrations/m191112_012449_create_table_taking_site.php
mode change 100644 => 100755 console/migrations/m191112_014508_create_table_express_template.php
mode change 100644 => 100755 console/migrations/m191112_015939_create_table_delivery.php
mode change 100644 => 100755 console/migrations/m191112_020830_create_table_payment_log.php
mode change 100644 => 100755 console/migrations/m191112_021528_create_table_refund_log.php
mode change 100644 => 100755 console/migrations/m191112_022131_create_table_file.php
mode change 100644 => 100755 console/migrations/m191112_022532_create_table_tem_file.php
mode change 100644 => 100755 console/migrations/schema-mysql.sql
mode change 100644 => 100755 console/migrations/sql/add_category.sql
mode change 100644 => 100755 console/migrations/sql/area.sql
mode change 100644 => 100755 console/migrations/sql/city.sql
mode change 100644 => 100755 console/migrations/sql/province.sql
delete mode 100755 vendor/antgoods/goods/src/models/ars/Attribute.php
delete mode 100755 vendor/antgoods/goods/src/models/ars/Brand.php
delete mode 100755 vendor/antgoods/goods/src/models/ars/Category.php
delete mode 100755 vendor/antgoods/goods/src/models/ars/FilterAttr.php
delete mode 100755 vendor/antgoods/goods/src/models/ars/GoodsAttr.php
delete mode 100755 vendor/antgoods/goods/src/models/ars/GoodsSku.php
delete mode 100755 vendor/antgoods/goods/src/models/ars/ShopCategory.php
delete mode 100755 vendor/antgoods/goods/src/models/ars/Supplier.php
diff --git a/common/models/ars/Address.php b/common/models/ars/Address.php
deleted file mode 100644
index b7b9ad9..0000000
--- a/common/models/ars/Address.php
+++ /dev/null
@@ -1,86 +0,0 @@
- 20],
- [['province', 'city', 'area'], 'string', 'max' => 10],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'user_id' => '用户id',
- 'consignee' => '收件人',
- 'phone' => '电话',
- 'province' => '省份',
- 'city' => '城市',
- 'area' => '区域',
- 'address' => '详细地址',
- 'status' => '状态,0-默认值 1-默认地址',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/AfterSale.php b/common/models/ars/AfterSale.php
deleted file mode 100644
index 4f0cced..0000000
--- a/common/models/ars/AfterSale.php
+++ /dev/null
@@ -1,78 +0,0 @@
- 64],
- [['take_shipping_sn', 'send_shipping_sn'], 'string', 'max' => 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'operator_id' => '操作者',
- 'user_id' => '用户id',
- 'wx_refund_id' => '微信退款单号',
- 'after_sale_sn' => '售后单号',
- 'order_goods_id' => '订单商品id',
- 'count' => '退换货的商品数量',
- 'amount' => '退货时实际退的金额',
- 'type' => '类型',
- 'reason' => '退换货理由',
- 'description' => '描述',
- 'take_shipping_sn' => '用户发货物流单号',
- 'send_shipping_sn' => '换货商家发货的物流单号',
- 'remarks' => '店家备注',
- 'applyed_at' => '申请时间',
- 'dealed_at' => '处理时间',
- 'finished_at' => '完成时间',
- ];
- }
-
-}
diff --git a/common/models/ars/Area.php b/common/models/ars/Area.php
deleted file mode 100644
index e42ee4f..0000000
--- a/common/models/ars/Area.php
+++ /dev/null
@@ -1,50 +0,0 @@
- 32],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => 'name',
- 'area_id' => 'area_id',
- 'city_id' => 'city_id',
- ];
- }
-
-}
diff --git a/common/models/ars/Cart.php b/common/models/ars/Cart.php
deleted file mode 100644
index 3af30be..0000000
--- a/common/models/ars/Cart.php
+++ /dev/null
@@ -1,82 +0,0 @@
- 120],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'user_id' => '用户id',
- 'goods_id' => '商品id',
- 'goods_name' => '商品名称',
- 'goods_img' => '商品图片',
- 'goods_price' => '商品售价',
- 'sku_id' => '商品sku的id',
- 'goods_count' => '商品数量',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/City.php b/common/models/ars/City.php
deleted file mode 100644
index 3b4096f..0000000
--- a/common/models/ars/City.php
+++ /dev/null
@@ -1,50 +0,0 @@
- 32],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'city_id' => 'city_id',
- 'name' => 'name',
- 'province_id' => 'province_id',
- ];
- }
-
-}
diff --git a/common/models/ars/Collection.php b/common/models/ars/Collection.php
deleted file mode 100644
index 69937f3..0000000
--- a/common/models/ars/Collection.php
+++ /dev/null
@@ -1,71 +0,0 @@
- 'id',
- 'user_id' => '用户id',
- 'goods_id' => '商品id',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/Comment.php b/common/models/ars/Comment.php
deleted file mode 100644
index 2fe43aa..0000000
--- a/common/models/ars/Comment.php
+++ /dev/null
@@ -1,78 +0,0 @@
- 'id',
- 'user_id' => '用户id',
- 'order_goods_id' => '订单详情商品id',
- 'star' => '星级',
- 'content' => '评论内容',
- 'status' => '状态:1为显示,0为不显示',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/Delivery.php b/common/models/ars/Delivery.php
deleted file mode 100644
index e9760bd..0000000
--- a/common/models/ars/Delivery.php
+++ /dev/null
@@ -1,84 +0,0 @@
- 50],
- [['shipping_id'], 'string', 'max' => 10],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'order_id' => '订单id',
- 'shipping_name' => '货流名称',
- 'shipping_id' => '运货单位',
- 'type' => '类型',
- 'goods' => '商品',
- 'status' => '状态',
- 'decription' => '描述',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/ExpressTemplate.php b/common/models/ars/ExpressTemplate.php
deleted file mode 100644
index d91b966..0000000
--- a/common/models/ars/ExpressTemplate.php
+++ /dev/null
@@ -1,93 +0,0 @@
- 255],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '名称',
- 'province' => '省份',
- 'city' => '城市',
- 'area' => '区域',
- 'billing_type' => '账单类型',
- 'extra_weight_type' => '续重重量类型',
- 'exemption_type' => '包邮类型',
- 'basic_price' => '基本运费',
- 'extra_price' => '续重运费',
- 'exemption_amount' => '包邮金额',
- 'support_taking' => '是否支持自提,1为不支持',
- 'taking_site' => '自提地点',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/File.php b/common/models/ars/File.php
deleted file mode 100644
index c58b34e..0000000
--- a/common/models/ars/File.php
+++ /dev/null
@@ -1,85 +0,0 @@
- 255],
- [['alias'], 'string', 'max' => 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'pid' => '父级id',
- 'name' => '名称',
- 'type' => '类型',
- 'own_type' => '拥有者类型',
- 'own_id' => '拥有者id',
- 'alias' => '别名',
- 'path' => '地址',
- 'is_delete' => '是否删除,1为已删除',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/Order.php b/common/models/ars/Order.php
deleted file mode 100644
index c74f2b0..0000000
--- a/common/models/ars/Order.php
+++ /dev/null
@@ -1,119 +0,0 @@
- 64],
- [['consignee', 'phone'], 'string', 'max' => 20],
- [['province', 'city', 'area'], 'string', 'max' => 10],
- [['payment_sn'], 'string', 'max' => 120],
- [['remarks'], 'string', 'max' => 255],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'user_id' => '用户id',
- 'order_sn' => '订单号',
- 'invoice_id' => '发票单号',
- 'status' => '状态',
- 'type' => '类型',
- 'goods_count' => '商品数量',
- 'goods_amount' => '商品金额',
- 'shipping_amount' => '物流金额',
- 'shipping_type' => '物流类型',
- 'consignee' => '收件人',
- 'phone' => '手机号码',
- 'province' => '省份',
- 'city' => '城市',
- 'area' => '区域',
- 'taking_site' => '自提点',
- 'pay_type' => '支付方式',
- 'pay_at' => '支付时间',
- 'payment_sn' => '付款单号',
- 'payment_amount' => '支付金额',
- 'receivables' => '应收款',
- 'remarks' => '备注',
- 'discount_amount' => '折扣金额',
- 'discount_decription' => '折扣说明',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/OrderGoods.php b/common/models/ars/OrderGoods.php
deleted file mode 100644
index f98ceea..0000000
--- a/common/models/ars/OrderGoods.php
+++ /dev/null
@@ -1,84 +0,0 @@
- 120],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'order_id' => '订单id',
- 'goods_id' => '商品id',
- 'goods_img' => '商品图片',
- 'goods_name' => '商品名称',
- 'goods_count' => '商品数量',
- 'sku_value' => '商品sku',
- 'price' => '销售价',
- 'market_price' => '市场价',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/PaymentLog.php b/common/models/ars/PaymentLog.php
deleted file mode 100644
index ad85810..0000000
--- a/common/models/ars/PaymentLog.php
+++ /dev/null
@@ -1,84 +0,0 @@
- 64],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'order_id' => '订单id',
- 'wx_refund_id' => '微信退款单号',
- 'mch_id' => '商户号',
- 'order_amount' => '订单金额',
- 'payment_amount' => '支付金额',
- 'type' => '类型',
- 'status' => '状态',
- 'refund_account' => '退款账户',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/Province.php b/common/models/ars/Province.php
deleted file mode 100644
index 26506c4..0000000
--- a/common/models/ars/Province.php
+++ /dev/null
@@ -1,48 +0,0 @@
- 16],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => 'name',
- 'province_id' => 'province_id',
- ];
- }
-
-}
diff --git a/common/models/ars/RefundLog.php b/common/models/ars/RefundLog.php
deleted file mode 100644
index 9f281b8..0000000
--- a/common/models/ars/RefundLog.php
+++ /dev/null
@@ -1,70 +0,0 @@
- 64],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'order_id' => '订单id',
- 'wx_refund_id' => '微信退款单号',
- 'reason' => '理由',
- 'order_amount' => '订单金额',
- 'refund_amount' => '退款金额',
- 'refunded_amount' => '已退款金额',
- 'type' => '类型',
- 'status' => '状态',
- 'refund_account' => '退款账户',
- 'operator_id' => '操作者',
- 'applyed_at' => '申请时间',
- 'confirmed_at' => '确认时间',
- 'finished_at' => '完成时间',
- ];
- }
-
-}
diff --git a/common/models/ars/SearchHistory.php b/common/models/ars/SearchHistory.php
deleted file mode 100644
index 6be7b5f..0000000
--- a/common/models/ars/SearchHistory.php
+++ /dev/null
@@ -1,78 +0,0 @@
- 255],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'user_id' => '用户id',
- 'keyword' => '关键字',
- 'count' => '次数',
- 'status' => '状态',
- 'type' => '类型',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/TakingSite.php b/common/models/ars/TakingSite.php
deleted file mode 100644
index f147e62..0000000
--- a/common/models/ars/TakingSite.php
+++ /dev/null
@@ -1,82 +0,0 @@
- 120],
- [['province', 'city', 'area'], 'string', 'max' => 10],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '名称',
- 'province' => '省份',
- 'city' => '城市',
- 'area' => '区域',
- 'address' => '地址',
- 'is_default' => '是否为默认,1为默认',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/TemFile.php b/common/models/ars/TemFile.php
deleted file mode 100644
index df9bab0..0000000
--- a/common/models/ars/TemFile.php
+++ /dev/null
@@ -1,79 +0,0 @@
- 255],
- [['alias'], 'string', 'max' => 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'user_id' => '父级id',
- 'name' => '名称',
- 'type' => '类型',
- 'alias' => '别名',
- 'path' => '地址',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/console/migrations/m130524_201442_init.php b/console/migrations/m130524_201442_init.php
old mode 100644
new mode 100755
diff --git a/console/migrations/m140506_102106_rbac_init.php b/console/migrations/m140506_102106_rbac_init.php
old mode 100644
new mode 100755
diff --git a/console/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php b/console/migrations/m170907_052038_rbac_add_index_on_auth_assignment_user_id.php
old mode 100644
new mode 100755
diff --git a/console/migrations/m180523_151638_rbac_updates_indexes_without_prefix.php b/console/migrations/m180523_151638_rbac_updates_indexes_without_prefix.php
old mode 100644
new mode 100755
diff --git a/console/migrations/m190124_110200_add_verification_token_column_to_user_table.php b/console/migrations/m190124_110200_add_verification_token_column_to_user_table.php
old mode 100644
new mode 100755
diff --git a/console/migrations/m190802_072830_add_category.php b/console/migrations/m190802_072830_add_category.php
old mode 100644
new mode 100755
diff --git a/console/migrations/m191111_101658_create_table_area.php b/console/migrations/m191111_101658_create_table_area.php
old mode 100644
new mode 100755
diff --git a/console/migrations/m191111_102644_create_table_province.php b/console/migrations/m191111_102644_create_table_province.php
old mode 100644
new mode 100755
diff --git a/console/migrations/m191111_102730_create_table_city.php b/console/migrations/m191111_102730_create_table_city.php
old mode 100644
new mode 100755
diff --git a/console/migrations/m191111_102925_create_table_cart.php b/console/migrations/m191111_102925_create_table_cart.php
old mode 100644
new mode 100755
index 5c81c47..bea2e27
--- a/console/migrations/m191111_102925_create_table_cart.php
+++ b/console/migrations/m191111_102925_create_table_cart.php
@@ -15,12 +15,12 @@ class m191111_102925_create_table_cart extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="购物车表"';
$this->createTable('ats_cart', [
'id' => $this->primaryKey(),
- 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'),
- 'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'),
- 'goods_name'=>$this->string(120)->defaultValue(null)->comment('商品名称'),
+ 'user_id'=>$this->integer(11)->notNull()->comment('用户id'),
+ 'goods_id'=>$this->integer(11)->notNull()->comment('商品id'),
+ 'goods_name'=>$this->string(120)->notNull()->comment('商品名称'),
'goods_img'=>$this->integer(11)->defaultValue(null)->comment('商品图片'),
'goods_price'=>$this->integer(20)->defaultValue(null)->comment('商品售价'),
- 'sku_id'=>$this->integer(11)->defaultValue(null)->comment('商品sku的id'),
+ 'sku_id'=>$this->integer(11)->notNull()->comment('商品sku的id'),
'goods_count'=>$this->integer(11)->defaultValue(null)->comment('商品数量'),
'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'),
'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'),
diff --git a/console/migrations/m191111_112559_create_table_address.php b/console/migrations/m191111_112559_create_table_address.php
old mode 100644
new mode 100755
index 2882b5c..ab94279
--- a/console/migrations/m191111_112559_create_table_address.php
+++ b/console/migrations/m191111_112559_create_table_address.php
@@ -15,13 +15,13 @@ class m191111_112559_create_table_address extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="地址表"';
$this->createTable('ats_address', [
'id' => $this->primaryKey(),
- 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'),
- 'consignee'=>$this->string(20)->defaultValue(null)->comment('收件人'),
- 'phone'=>$this->string(20)->defaultValue(null)->comment('电话'),
+ 'user_id'=>$this->integer(11)->notNull()->comment('用户id'),
+ 'consignee'=>$this->string(20)->notNull()->comment('收件人'),
+ 'phone'=>$this->string(20)->notNull()->comment('电话'),
'province'=>$this->string(10)->defaultValue(null)->comment('省份'),
'city'=>$this->string(10)->defaultValue(null)->comment('城市'),
'area'=>$this->string(10)->defaultValue(null)->comment('区域'),
- 'address'=>$this->text()->comment('详细地址'),
+ 'address'=>$this->text()->notNull()->comment('详细地址'),
'status'=>$this->tinyInteger(1)->defaultValue(0)->comment('状态,0-默认值 1-默认地址'),
'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'),
'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'),
diff --git a/console/migrations/m191111_113455_create_table_after_sale.php b/console/migrations/m191111_113455_create_table_after_sale.php
old mode 100644
new mode 100755
index fde56b1..56a71ae
--- a/console/migrations/m191111_113455_create_table_after_sale.php
+++ b/console/migrations/m191111_113455_create_table_after_sale.php
@@ -15,13 +15,13 @@ class m191111_113455_create_table_after_sale extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="售后表"';
$this->createTable('ats_after_sale', [
'id' => $this->primaryKey(),
- 'operator_id'=>$this->integer(11)->defaultValue(null)->comment('操作者'),
- 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'),
+ 'operator_id'=>$this->integer(11)->notNull()->comment('操作者'),
+ 'user_id'=>$this->integer(11)->notNull()->comment('用户id'),
'wx_refund_id'=>$this->string(64)->defaultValue(null)->comment('微信退款单号'),
'after_sale_sn'=>$this->string(64)->defaultValue(null)->comment('售后单号'),
'order_goods_id'=>$this->integer(11)->defaultValue(null)->comment('订单商品id'),
'count'=>$this->integer(11)->defaultValue(null)->comment('退换货的商品数量'),
- 'amount'=>$this->integer(20)->defaultValue(null)->comment('退货时实际退的金额'),
+ 'amount'=>$this->integer(20)->notNull()->comment('退货时实际退的金额'),
'type'=>$this->tinyInteger(1)->defaultValue(0)->comment('类型'),
'reason'=>$this->smallInteger(2)->defaultValue(0)->comment('退换货理由'),
'description'=>$this->text()->comment('描述'),
diff --git a/console/migrations/m191112_005106_create_table_search_history.php b/console/migrations/m191112_005106_create_table_search_history.php
old mode 100644
new mode 100755
index e54e8ba..54736ec
--- a/console/migrations/m191112_005106_create_table_search_history.php
+++ b/console/migrations/m191112_005106_create_table_search_history.php
@@ -15,7 +15,7 @@ class m191112_005106_create_table_search_history extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="搜索记录表"';
$this->createTable('ats_search_history', [
'id' => $this->primaryKey(),
- 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'),
+ 'user_id'=>$this->integer(11)->notNull()->comment('用户id'),
'keyword'=>$this->string(255)->defaultValue(null)->comment('关键字'),
'count'=>$this->integer(10)->defaultValue(null)->comment('次数'),
'status'=>$this->tinyInteger(1)->defaultValue(0)->comment('状态'),
diff --git a/console/migrations/m191112_005545_create_table_collection.php b/console/migrations/m191112_005545_create_table_collection.php
old mode 100644
new mode 100755
index 13492eb..e4fb1e7
--- a/console/migrations/m191112_005545_create_table_collection.php
+++ b/console/migrations/m191112_005545_create_table_collection.php
@@ -15,8 +15,8 @@ class m191112_005545_create_table_collection extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="收藏表"';
$this->createTable('ats_collection', [
'id' => $this->primaryKey(),
- 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'),
- 'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'),
+ 'user_id'=>$this->integer(11)->notNull()->comment('用户id'),
+ 'goods_id'=>$this->integer(11)->notNull()->comment('商品id'),
'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'),
'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'),
],$tableOptions);
diff --git a/console/migrations/m191112_005702_create_table_comment.php b/console/migrations/m191112_005702_create_table_comment.php
old mode 100644
new mode 100755
index f3a1ddd..1fa7e2b
--- a/console/migrations/m191112_005702_create_table_comment.php
+++ b/console/migrations/m191112_005702_create_table_comment.php
@@ -15,7 +15,7 @@ class m191112_005702_create_table_comment extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="评论记录表"';
$this->createTable('ats_comment', [
'id' => $this->primaryKey(),
- 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'),
+ 'user_id'=>$this->integer(11)->notNull()->comment('用户id'),
'order_goods_id'=>$this->integer(11)->defaultValue(null)->comment('订单详情商品id'),
'star'=>$this->integer(11)->defaultValue(null)->comment('星级'),
'content'=>$this->text()->comment('评论内容'),
diff --git a/console/migrations/m191112_010421_create_table_order.php b/console/migrations/m191112_010421_create_table_order.php
old mode 100644
new mode 100755
index dfd6a01..6bcfb06
--- a/console/migrations/m191112_010421_create_table_order.php
+++ b/console/migrations/m191112_010421_create_table_order.php
@@ -15,7 +15,7 @@ class m191112_010421_create_table_order extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="订单表"';
$this->createTable('ats_order', [
'id' => $this->primaryKey(),
- 'user_id'=>$this->integer(11)->defaultValue(null)->comment('用户id'),
+ 'user_id'=>$this->integer(11)->notNull()->comment('用户id'),
'order_sn'=>$this->string(64)->defaultValue(null)->comment('订单号'),
'invoice_id'=>$this->string(64)->defaultValue(null)->comment('发票单号'),
'status'=>$this->tinyInteger(2)->defaultValue(0)->comment('状态'),
diff --git a/console/migrations/m191112_011517_create_table_order_goods.php b/console/migrations/m191112_011517_create_table_order_goods.php
old mode 100644
new mode 100755
index 52974d1..3340d25
--- a/console/migrations/m191112_011517_create_table_order_goods.php
+++ b/console/migrations/m191112_011517_create_table_order_goods.php
@@ -15,8 +15,8 @@ class m191112_011517_create_table_order_goods extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="订单商品表"';
$this->createTable('ats_order_goods', [
'id' => $this->primaryKey(),
- 'order_id'=>$this->integer(11)->defaultValue(null)->comment('订单id'),
- 'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'),
+ 'order_id'=>$this->integer(11)->notNull()->comment('订单id'),
+ 'goods_id'=>$this->integer(11)->notNull()->comment('商品id'),
'goods_img'=>$this->integer(11)->defaultValue(null)->comment('商品图片'),
'goods_name'=>$this->string(120)->defaultValue(null)->comment('商品名称'),
'goods_count'=>$this->integer(11)->defaultValue(null)->comment('商品数量'),
diff --git a/console/migrations/m191112_012449_create_table_taking_site.php b/console/migrations/m191112_012449_create_table_taking_site.php
old mode 100644
new mode 100755
index a9bc8e8..a03c9a6
--- a/console/migrations/m191112_012449_create_table_taking_site.php
+++ b/console/migrations/m191112_012449_create_table_taking_site.php
@@ -15,7 +15,7 @@ class m191112_012449_create_table_taking_site extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="自提地点表"';
$this->createTable('ats_taking_site', [
'id' => $this->primaryKey(),
- 'name'=>$this->string(120)->defaultValue(null)->comment('名称'),
+ 'name'=>$this->string(120)->notNull()->comment('名称'),
'province'=>$this->string(10)->defaultValue(null)->comment('省份'),
'city'=>$this->string(10)->defaultValue(null)->comment('城市'),
'area'=>$this->string(10)->defaultValue(null)->comment('区域'),
diff --git a/console/migrations/m191112_014508_create_table_express_template.php b/console/migrations/m191112_014508_create_table_express_template.php
old mode 100644
new mode 100755
index 83a1165..4b788a5
--- a/console/migrations/m191112_014508_create_table_express_template.php
+++ b/console/migrations/m191112_014508_create_table_express_template.php
@@ -15,7 +15,7 @@ class m191112_014508_create_table_express_template extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="配送情况设置表"';
$this->createTable('ats_express_template', [
'id' => $this->primaryKey(),
- 'name'=>$this->string(255)->defaultValue(null)->comment('名称'),
+ 'name'=>$this->string(255)->notNull()->comment('名称'),
'province'=>$this->text()->comment('省份'),
'city'=>$this->text()->comment('城市'),
'area'=>$this->text()->comment('区域'),
diff --git a/console/migrations/m191112_015939_create_table_delivery.php b/console/migrations/m191112_015939_create_table_delivery.php
old mode 100644
new mode 100755
index 92cd994..c90f0a1
--- a/console/migrations/m191112_015939_create_table_delivery.php
+++ b/console/migrations/m191112_015939_create_table_delivery.php
@@ -17,7 +17,7 @@ class m191112_015939_create_table_delivery extends Migration
'id' => $this->primaryKey(),
'order_id'=>$this->integer(11)->defaultValue(null)->comment('订单id'),
'shipping_name'=>$this->string(50)->defaultValue(null)->comment('货流名称'),
- 'shipping_id'=>$this->string(10)->defaultValue(null)->comment('运货单位'),
+ 'shipping_id'=>$this->string(10)->notNull()->comment('运货单位'),
'type'=>$this->tinyInteger(1)->defaultValue(0)->comment('类型'),
'goods'=>$this->text()->comment('商品'),
'status'=>$this->tinyInteger(1)->defaultValue(0)->comment('状态'),
diff --git a/console/migrations/m191112_020830_create_table_payment_log.php b/console/migrations/m191112_020830_create_table_payment_log.php
old mode 100644
new mode 100755
diff --git a/console/migrations/m191112_021528_create_table_refund_log.php b/console/migrations/m191112_021528_create_table_refund_log.php
old mode 100644
new mode 100755
diff --git a/console/migrations/m191112_022131_create_table_file.php b/console/migrations/m191112_022131_create_table_file.php
old mode 100644
new mode 100755
diff --git a/console/migrations/m191112_022532_create_table_tem_file.php b/console/migrations/m191112_022532_create_table_tem_file.php
old mode 100644
new mode 100755
diff --git a/console/migrations/schema-mysql.sql b/console/migrations/schema-mysql.sql
old mode 100644
new mode 100755
diff --git a/console/migrations/sql/add_category.sql b/console/migrations/sql/add_category.sql
old mode 100644
new mode 100755
diff --git a/console/migrations/sql/area.sql b/console/migrations/sql/area.sql
old mode 100644
new mode 100755
diff --git a/console/migrations/sql/city.sql b/console/migrations/sql/city.sql
old mode 100644
new mode 100755
diff --git a/console/migrations/sql/province.sql b/console/migrations/sql/province.sql
old mode 100644
new mode 100755
diff --git a/vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php b/vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php
index eabe634..35f536e 100644
--- a/vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_021851_create_table_shop_category.php
@@ -15,12 +15,12 @@ class m191119_021851_create_table_shop_category extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="前端商品类别表"';
$this->createTable('antgoods_shop_category', [
'id' => $this->primaryKey(),
- 'name'=>$this->string(60)->defaultValue(null)->comment('类别名称'),
+ 'name'=>$this->string(60)->notNull()->comment('类别名称'),
'pid'=>$this->integer(11)->defaultValue(null)->comment('父级id'),
- 'goods_count'=>$this->integer(11)->defaultValue(null)->comment('商品数量'),
+ 'goods_count'=>$this->integer(11)->defaultValue(0)->comment('商品数量'),
'keywords'=>$this->string(100)->defaultValue(null)->comment('关键字'),
'desc'=>$this->string(255)->defaultValue(null)->comment('描述'),
- 'sort_order'=>$this->smallInteger(3)->defaultValue(null)->comment('排序'),
+ 'sort_order'=>$this->smallInteger(3)->defaultValue(0)->comment('排序'),
'icon_type'=>$this->tinyInteger(1)->defaultValue(null)->comment('图标类型'),
'icon'=>$this->string(64)->defaultValue(null)->comment('图标'),
'filter_attr'=>$this->text()->comment('筛选属性'),
diff --git a/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php b/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php
index 4ba6c29..60dd21e 100644
--- a/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_022641_create_table_category.php
@@ -15,14 +15,14 @@ class m191119_022641_create_table_category extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="后台商品类别表"';
$this->createTable('antgoods_category', [
'id' => $this->primaryKey(),
- 'name'=>$this->string(60)->defaultValue(null)->comment('类别名称'),
+ 'name'=>$this->string(60)->notNull()->comment('类别名称'),
'pid'=>$this->integer(11)->defaultValue(null)->comment('父级id'),
- 'goods_count'=>$this->integer(11)->defaultValue(null)->comment('商品数量'),
- 'sort_order'=>$this->smallInteger(3)->defaultValue(null)->comment('排序'),
+ 'goods_count'=>$this->integer(11)->defaultValue(0)->comment('商品数量'),
+ 'sort_order'=>$this->smallInteger(3)->defaultValue(0)->comment('排序'),
'icon_type'=>$this->tinyInteger(1)->defaultValue(null)->comment('图标类型'),
'icon'=>$this->string(64)->defaultValue(null)->comment('图标'),
- 'is_show'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否显示,1为不显示'),
- 'is_delete'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否删除,1为已删除'),
+ 'is_show'=>$this->tinyInteger(1)->defaultValue(0)->comment('是否显示,1为不显示'),
+ 'is_delete'=>$this->tinyInteger(1)->defaultValue(0)->comment('是否删除,1为已删除'),
'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'),
'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'),
],$tableOptions);
diff --git a/vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php b/vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php
index df38219..cb2cad2 100644
--- a/vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_022939_create_table_attribute.php
@@ -15,8 +15,8 @@ class m191119_022939_create_table_attribute extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="属性表"';
$this->createTable('antgoods_attribute', [
'id' => $this->primaryKey(),
- 'name'=>$this->string(50)->defaultValue(null)->comment('属性名'),
- 'value'=>$this->text()->comment('属性值'),
+ 'name'=>$this->string(50)->notNull()->comment('属性名'),
+ 'value'=>$this->text()->notNull()->comment('属性值'),
'type'=>$this->smallInteger(2)->defaultValue(null)->comment('类型'),
'sort_order'=>$this->smallInteger(3)->defaultValue(null)->comment('排序'),
'is_delete'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否删除,1为已删除'),
diff --git a/vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php b/vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php
index 62e66aa..4f33089 100644
--- a/vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_023115_create_table_goods_attr.php
@@ -15,9 +15,9 @@ class m191119_023115_create_table_goods_attr extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="商品属性表"';
$this->createTable('antgoods_goods_attr', [
'id' => $this->primaryKey(),
- 'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'),
- 'attr_id'=>$this->integer(11)->defaultValue(null)->comment('属性id'),
- 'attr_value'=>$this->string(50)->defaultValue(null)->comment('属性名'),
+ 'goods_id'=>$this->integer(11)->notNull()->comment('商品id'),
+ 'attr_id'=>$this->integer(11)->notNull()->comment('属性id'),
+ 'attr_value'=>$this->string(50)->notNull()->comment('属性名'),
'is_delete'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否删除,1为已删除'),
'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'),
'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'),
diff --git a/vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php b/vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php
index 615e9ea..f1d46ad 100644
--- a/vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_024029_create_table_brand.php
@@ -15,7 +15,7 @@ class m191119_024029_create_table_brand extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="品牌表"';
$this->createTable('antgoods_brand', [
'id' => $this->primaryKey(),
- 'name'=>$this->string(50)->defaultValue(null)->comment('品牌名'),
+ 'name'=>$this->string(50)->notNull()->comment('品牌名'),
'is_delete'=>$this->tinyInteger(1)->defaultValue(null)->comment('是否删除,1为已删除'),
'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'),
'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'),
diff --git a/vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php b/vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php
index 60ccef4..c7d8f6c 100644
--- a/vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_025607_create_table_supplier.php
@@ -15,10 +15,10 @@ class m191119_025607_create_table_supplier extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="供应商表"';
$this->createTable('antgoods_supplier', [
'id' => $this->primaryKey(),
- 'name'=>$this->string(50)->defaultValue(null)->comment('供应商名称'),
- 'full_name'=>$this->string(50)->defaultValue(null)->comment('供应商全称'),
- 'phone'=>$this->string(20)->defaultValue(null)->comment('手机号码'),
- 'address'=>$this->string(50)->defaultValue(null)->comment('地址'),
+ 'name'=>$this->string(50)->notNull()->comment('供应商名称'),
+ 'full_name'=>$this->string(50)->notNull()->comment('供应商全称'),
+ 'phone'=>$this->string(20)->notNull()->comment('手机号码'),
+ 'address'=>$this->string(50)->notNull()->comment('地址'),
'is_delete'=>$this->tinyInteger(1)->defaultValue(0)->comment('是否删除,1为已删除'),
'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'),
'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'),
diff --git a/vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php b/vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php
index 5ab3f83..0409292 100644
--- a/vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php
+++ b/vendor/antgoods/goods/src/migrations/m191119_025843_create_table_filter_attr.php
@@ -15,9 +15,9 @@ class m191119_025843_create_table_filter_attr extends Migration
$tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB COMMENT="筛选属性表"';
$this->createTable('antgoods_filter_attr', [
'id' => $this->primaryKey(),
- 'goods_id'=>$this->integer(11)->defaultValue(null)->comment('商品id'),
- 'attr_id'=>$this->integer(11)->defaultValue(null)->comment('属性id'),
- 'attr_value'=>$this->string(50)->defaultValue(null)->comment('属性值'),
+ 'goods_id'=>$this->integer(11)->notNull()->comment('商品id'),
+ 'attr_id'=>$this->integer(11)->notNull()->comment('属性id'),
+ 'attr_value'=>$this->string(50)->notNull()->comment('属性值'),
'is_delete'=>$this->tinyInteger(1)->defaultValue(0)->comment('是否删除,1为已删除'),
'created_at'=>$this->integer(11)->defaultValue(null)->comment('创建时间'),
'updated_at'=>$this->integer(11)->defaultValue(null)->comment('更新时间'),
diff --git a/vendor/antgoods/goods/src/migrations/sql/goods.sql b/vendor/antgoods/goods/src/migrations/sql/goods.sql
index 238e7c9..f744a0b 100755
--- a/vendor/antgoods/goods/src/migrations/sql/goods.sql
+++ b/vendor/antgoods/goods/src/migrations/sql/goods.sql
@@ -2,11 +2,11 @@ DROP TABLE IF EXISTS `antgoods_goods`;
CREATE TABLE `antgoods_goods` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pid` int(11) DEFAULT NULL COMMENT '父级id',
- `cat_id` int(11) DEFAULT NULL COMMENT '后台商品类别id',
- `brand_id` int(11) DEFAULT NULL COMMENT '品牌id',
- `shop_cat_id` int(11) DEFAULT NULL COMMENT '前端商品类别id',
- `name` varchar(120) DEFAULT NULL COMMENT '商品名称',
- `sn` varchar(60) DEFAULT NULL COMMENT '商品唯一货号',
+ `cat_id` int(11) NOT NULL COMMENT '后台商品类别id',
+ `brand_id` int(11) NOT NULL COMMENT '品牌id',
+ `shop_cat_id` int(11) NOT NULL COMMENT '前端商品类别id',
+ `name` varchar(120) NOT NULL COMMENT '商品名称',
+ `sn` varchar(60) NOT NULL COMMENT '商品唯一货号',
`code` varchar(50) DEFAULT NULL COMMENT '商品货码',
`supplier_id` int(11) DEFAULT NULL COMMENT '供应商id',
`weight` mediumint(8) DEFAULT NULL COMMENT '重量',
diff --git a/vendor/antgoods/goods/src/migrations/sql/goods_sku.sql b/vendor/antgoods/goods/src/migrations/sql/goods_sku.sql
index 478a19f..a599a39 100755
--- a/vendor/antgoods/goods/src/migrations/sql/goods_sku.sql
+++ b/vendor/antgoods/goods/src/migrations/sql/goods_sku.sql
@@ -1,9 +1,9 @@
DROP TABLE IF EXISTS `antgoods_goods_sku`;
CREATE TABLE `antgoods_goods_sku` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `goods_id` int(11) DEFAULT NULL COMMENT '商品id',
+ `goods_id` int(11) NOT NULL COMMENT '商品id',
`goods_code` varchar(50) DEFAULT NULL COMMENT '商品条码',
- `goods_sn` varchar(60) DEFAULT NULL COMMENT '商品唯一货号',
+ `goods_sn` varchar(60) NOT NULL COMMENT '商品唯一货号',
`goods_attr` varchar(60) DEFAULT NULL COMMENT '属性匹配',
`weight` mediumint(8) DEFAULT NULL COMMENT '重量',
`length` mediumint(8) DEFAULT NULL COMMENT '长度',
@@ -16,7 +16,7 @@ CREATE TABLE `antgoods_goods_sku` (
`price` int(20) DEFAULT NULL COMMENT '销售价',
`model_id` int(11) DEFAULT NULL COMMENT '模型id',
`is_sale` tinyint(1) DEFAULT '0' COMMENT '该商品是否开放销售,1为是,0为否',
- `sort_order` smallint(3) DEFAULT NULL COMMENT '排序',
+ `sort_order` smallint(3) DEFAULT '0' COMMENT '排序',
`is_delete` tinyint(1) DEFAULT '0' COMMENT '是否删除,1为已删除',
`created_at` int(10) DEFAULT '0' COMMENT '创建时间',
`updated_at` int(10) DEFAULT '0' COMMENT '更新时间',
diff --git a/vendor/antgoods/goods/src/models/ars/Attribute.php b/vendor/antgoods/goods/src/models/ars/Attribute.php
deleted file mode 100755
index 7699897..0000000
--- a/vendor/antgoods/goods/src/models/ars/Attribute.php
+++ /dev/null
@@ -1,79 +0,0 @@
- 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '属性名',
- 'value' => '属性值',
- 'type' => '类型',
- 'sort_order' => '排序',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/Brand.php b/vendor/antgoods/goods/src/models/ars/Brand.php
deleted file mode 100755
index aab9e05..0000000
--- a/vendor/antgoods/goods/src/models/ars/Brand.php
+++ /dev/null
@@ -1,72 +0,0 @@
- 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '品牌名',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/Category.php b/vendor/antgoods/goods/src/models/ars/Category.php
deleted file mode 100755
index e7e7938..0000000
--- a/vendor/antgoods/goods/src/models/ars/Category.php
+++ /dev/null
@@ -1,85 +0,0 @@
- 60],
- [['icon'], 'string', 'max' => 64],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '类别名称',
- 'pid' => '父级id',
- 'goods_count' => '商品数量',
- 'sort_order' => '排序',
- 'icon_type' => '图标类型',
- 'icon' => '图标',
- 'is_show' => '是否显示,1为不显示',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/FilterAttr.php b/vendor/antgoods/goods/src/models/ars/FilterAttr.php
deleted file mode 100755
index 1e377f1..0000000
--- a/vendor/antgoods/goods/src/models/ars/FilterAttr.php
+++ /dev/null
@@ -1,76 +0,0 @@
- 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'goods_id' => '商品id',
- 'attr_id' => '属性id',
- 'attr_value' => '属性值',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/GoodsAttr.php b/vendor/antgoods/goods/src/models/ars/GoodsAttr.php
deleted file mode 100755
index 9f22e23..0000000
--- a/vendor/antgoods/goods/src/models/ars/GoodsAttr.php
+++ /dev/null
@@ -1,76 +0,0 @@
- 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'goods_id' => '商品id',
- 'attr_id' => '属性id',
- 'attr_value' => '属性名',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/GoodsSku.php b/vendor/antgoods/goods/src/models/ars/GoodsSku.php
deleted file mode 100755
index ea5b731..0000000
--- a/vendor/antgoods/goods/src/models/ars/GoodsSku.php
+++ /dev/null
@@ -1,103 +0,0 @@
- 50],
- [['goods_sn', 'goods_attr'], 'string', 'max' => 60],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'goods_id' => '商品id',
- 'goods_code' => '商品条码',
- 'goods_sn' => '商品唯一货号',
- 'goods_attr' => '属性匹配',
- 'weight' => '重量',
- 'length' => '长度',
- 'width' => '宽度',
- 'height' => '高度',
- 'diameter' => '直径',
- 'sold_count' => '已售数量',
- 'stock' => '库存',
- 'market_price' => '市场价',
- 'price' => '销售价',
- 'model_id' => '模型id',
- 'is_sale' => '该商品是否开放销售,1为是,0为否',
- 'sort_order' => '排序',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/ShopCategory.php b/vendor/antgoods/goods/src/models/ars/ShopCategory.php
deleted file mode 100755
index aef66d6..0000000
--- a/vendor/antgoods/goods/src/models/ars/ShopCategory.php
+++ /dev/null
@@ -1,94 +0,0 @@
- 60],
- [['keywords'], 'string', 'max' => 100],
- [['desc'], 'string', 'max' => 255],
- [['icon'], 'string', 'max' => 64],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '类别名称',
- 'pid' => '父级id',
- 'goods_count' => '商品数量',
- 'keywords' => '关键字',
- 'desc' => '描述',
- 'sort_order' => '排序',
- 'icon_type' => '图标类型',
- 'icon' => '图标',
- 'filter_attr' => '筛选属性',
- 'is_show' => '是否显示,1为不显示',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/Supplier.php b/vendor/antgoods/goods/src/models/ars/Supplier.php
deleted file mode 100755
index c4ae6a8..0000000
--- a/vendor/antgoods/goods/src/models/ars/Supplier.php
+++ /dev/null
@@ -1,79 +0,0 @@
- 50],
- [['phone'], 'string', 'max' => 20],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '供应商名称',
- 'full_name' => '供应商全称',
- 'phone' => '手机号码',
- 'address' => '地址',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
From e0fa34b9c55617900960e6456d037b6f634277c4 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 14:58:44 +0800
Subject: [PATCH 30/95] =?UTF-8?q?=E5=9B=A0=E4=BF=AE=E6=94=B9=E4=BA=86?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AD=97=E6=AE=B5=EF=BC=8C=E9=87=8D?=
=?UTF-8?q?=E6=96=B0=E7=94=9F=E6=88=90=E6=89=80=E6=9C=89model=E6=96=87?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/models/ars/Address.php | 88 ++++++++++++
common/models/ars/AfterSale.php | 80 +++++++++++
common/models/ars/Area.php | 51 +++++++
common/models/ars/Cart.php | 84 +++++++++++
common/models/ars/City.php | 51 +++++++
common/models/ars/Collection.php | 73 ++++++++++
common/models/ars/Comment.php | 80 +++++++++++
common/models/ars/Config.php | 0
common/models/ars/Delivery.php | 86 +++++++++++
common/models/ars/ExpressTemplate.php | 95 ++++++++++++
common/models/ars/File.php | 86 +++++++++++
common/models/ars/Order.php | 121 ++++++++++++++++
common/models/ars/OrderGoods.php | 86 +++++++++++
common/models/ars/PaymentLog.php | 85 +++++++++++
common/models/ars/Province.php | 49 +++++++
common/models/ars/RefundLog.php | 71 +++++++++
common/models/ars/SearchHistory.php | 80 +++++++++++
common/models/ars/TakingSite.php | 84 +++++++++++
common/models/ars/TemFile.php | 80 +++++++++++
.../goods/src/models/ars/Attribute.php | 81 +++++++++++
.../antgoods/goods/src/models/ars/Brand.php | 74 ++++++++++
.../goods/src/models/ars/Category.php | 87 +++++++++++
.../goods/src/models/ars/FilterAttr.php | 78 ++++++++++
.../antgoods/goods/src/models/ars/Goods.php | 135 ++++++++++++++++++
.../goods/src/models/ars/GoodsAttr.php | 78 ++++++++++
.../goods/src/models/ars/GoodsSku.php | 105 ++++++++++++++
.../goods/src/models/ars/ShopCategory.php | 96 +++++++++++++
.../goods/src/models/ars/Supplier.php | 81 +++++++++++
28 files changed, 2245 insertions(+)
create mode 100644 common/models/ars/Address.php
create mode 100644 common/models/ars/AfterSale.php
create mode 100644 common/models/ars/Area.php
create mode 100644 common/models/ars/Cart.php
create mode 100644 common/models/ars/City.php
create mode 100644 common/models/ars/Collection.php
create mode 100644 common/models/ars/Comment.php
mode change 100644 => 100755 common/models/ars/Config.php
create mode 100644 common/models/ars/Delivery.php
create mode 100644 common/models/ars/ExpressTemplate.php
create mode 100644 common/models/ars/File.php
create mode 100644 common/models/ars/Order.php
create mode 100644 common/models/ars/OrderGoods.php
create mode 100644 common/models/ars/PaymentLog.php
create mode 100644 common/models/ars/Province.php
create mode 100644 common/models/ars/RefundLog.php
create mode 100644 common/models/ars/SearchHistory.php
create mode 100644 common/models/ars/TakingSite.php
create mode 100644 common/models/ars/TemFile.php
create mode 100644 vendor/antgoods/goods/src/models/ars/Attribute.php
create mode 100644 vendor/antgoods/goods/src/models/ars/Brand.php
create mode 100644 vendor/antgoods/goods/src/models/ars/Category.php
create mode 100644 vendor/antgoods/goods/src/models/ars/FilterAttr.php
create mode 100644 vendor/antgoods/goods/src/models/ars/Goods.php
create mode 100644 vendor/antgoods/goods/src/models/ars/GoodsAttr.php
create mode 100644 vendor/antgoods/goods/src/models/ars/GoodsSku.php
create mode 100644 vendor/antgoods/goods/src/models/ars/ShopCategory.php
create mode 100644 vendor/antgoods/goods/src/models/ars/Supplier.php
diff --git a/common/models/ars/Address.php b/common/models/ars/Address.php
new file mode 100644
index 0000000..aec13fb
--- /dev/null
+++ b/common/models/ars/Address.php
@@ -0,0 +1,88 @@
+ 20],
+ [['province', 'city', 'area'], 'string', 'max' => 10],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'user_id' => '用户id',
+ 'consignee' => '收件人',
+ 'phone' => '电话',
+ 'province' => '省份',
+ 'city' => '城市',
+ 'area' => '区域',
+ 'address' => '详细地址',
+ 'status' => '状态,0-默认值 1-默认地址',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/AfterSale.php b/common/models/ars/AfterSale.php
new file mode 100644
index 0000000..4cf35b1
--- /dev/null
+++ b/common/models/ars/AfterSale.php
@@ -0,0 +1,80 @@
+ 64],
+ [['take_shipping_sn', 'send_shipping_sn'], 'string', 'max' => 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'operator_id' => '操作者',
+ 'user_id' => '用户id',
+ 'wx_refund_id' => '微信退款单号',
+ 'after_sale_sn' => '售后单号',
+ 'order_goods_id' => '订单商品id',
+ 'count' => '退换货的商品数量',
+ 'amount' => '退货时实际退的金额',
+ 'type' => '类型',
+ 'reason' => '退换货理由',
+ 'description' => '描述',
+ 'take_shipping_sn' => '用户发货物流单号',
+ 'send_shipping_sn' => '换货商家发货的物流单号',
+ 'remarks' => '店家备注',
+ 'applyed_at' => '申请时间',
+ 'dealed_at' => '处理时间',
+ 'finished_at' => '完成时间',
+ ];
+ }
+
+
+}
diff --git a/common/models/ars/Area.php b/common/models/ars/Area.php
new file mode 100644
index 0000000..254681b
--- /dev/null
+++ b/common/models/ars/Area.php
@@ -0,0 +1,51 @@
+ 32],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => 'name',
+ 'area_id' => 'area_id',
+ 'city_id' => 'city_id',
+ ];
+ }
+
+
+}
diff --git a/common/models/ars/Cart.php b/common/models/ars/Cart.php
new file mode 100644
index 0000000..ef6477f
--- /dev/null
+++ b/common/models/ars/Cart.php
@@ -0,0 +1,84 @@
+ 120],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'user_id' => '用户id',
+ 'goods_id' => '商品id',
+ 'goods_name' => '商品名称',
+ 'goods_img' => '商品图片',
+ 'goods_price' => '商品售价',
+ 'sku_id' => '商品sku的id',
+ 'goods_count' => '商品数量',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/City.php b/common/models/ars/City.php
new file mode 100644
index 0000000..ae87412
--- /dev/null
+++ b/common/models/ars/City.php
@@ -0,0 +1,51 @@
+ 32],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'city_id' => 'city_id',
+ 'name' => 'name',
+ 'province_id' => 'province_id',
+ ];
+ }
+
+
+}
diff --git a/common/models/ars/Collection.php b/common/models/ars/Collection.php
new file mode 100644
index 0000000..2a1a771
--- /dev/null
+++ b/common/models/ars/Collection.php
@@ -0,0 +1,73 @@
+ 'id',
+ 'user_id' => '用户id',
+ 'goods_id' => '商品id',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/Comment.php b/common/models/ars/Comment.php
new file mode 100644
index 0000000..2701ecf
--- /dev/null
+++ b/common/models/ars/Comment.php
@@ -0,0 +1,80 @@
+ 'id',
+ 'user_id' => '用户id',
+ 'order_goods_id' => '订单详情商品id',
+ 'star' => '星级',
+ 'content' => '评论内容',
+ 'status' => '状态:1为显示,0为不显示',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/Config.php b/common/models/ars/Config.php
old mode 100644
new mode 100755
diff --git a/common/models/ars/Delivery.php b/common/models/ars/Delivery.php
new file mode 100644
index 0000000..85d1d0e
--- /dev/null
+++ b/common/models/ars/Delivery.php
@@ -0,0 +1,86 @@
+ 50],
+ [['shipping_id'], 'string', 'max' => 10],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'order_id' => '订单id',
+ 'shipping_name' => '货流名称',
+ 'shipping_id' => '运货单位',
+ 'type' => '类型',
+ 'goods' => '商品',
+ 'status' => '状态',
+ 'decription' => '描述',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/ExpressTemplate.php b/common/models/ars/ExpressTemplate.php
new file mode 100644
index 0000000..e3e6b81
--- /dev/null
+++ b/common/models/ars/ExpressTemplate.php
@@ -0,0 +1,95 @@
+ 255],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '名称',
+ 'province' => '省份',
+ 'city' => '城市',
+ 'area' => '区域',
+ 'billing_type' => '账单类型',
+ 'extra_weight_type' => '续重重量类型',
+ 'exemption_type' => '包邮类型',
+ 'basic_price' => '基本运费',
+ 'extra_price' => '续重运费',
+ 'exemption_amount' => '包邮金额',
+ 'support_taking' => '是否支持自提,1为不支持',
+ 'taking_site' => '自提地点',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/File.php b/common/models/ars/File.php
new file mode 100644
index 0000000..fc1be27
--- /dev/null
+++ b/common/models/ars/File.php
@@ -0,0 +1,86 @@
+ 255],
+ [['alias'], 'string', 'max' => 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'pid' => '父级id',
+ 'name' => '名称',
+ 'type' => '类型',
+ 'own_type' => '拥有者类型',
+ 'own_id' => '拥有者id',
+ 'alias' => '别名',
+ 'path' => '地址',
+ 'is_delete' => '是否删除,1为已删除',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/Order.php b/common/models/ars/Order.php
new file mode 100644
index 0000000..6f03a52
--- /dev/null
+++ b/common/models/ars/Order.php
@@ -0,0 +1,121 @@
+ 64],
+ [['consignee', 'phone'], 'string', 'max' => 20],
+ [['province', 'city', 'area'], 'string', 'max' => 10],
+ [['payment_sn'], 'string', 'max' => 120],
+ [['remarks'], 'string', 'max' => 255],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'user_id' => '用户id',
+ 'order_sn' => '订单号',
+ 'invoice_id' => '发票单号',
+ 'status' => '状态',
+ 'type' => '类型',
+ 'goods_count' => '商品数量',
+ 'goods_amount' => '商品金额',
+ 'shipping_amount' => '物流金额',
+ 'shipping_type' => '物流类型',
+ 'consignee' => '收件人',
+ 'phone' => '手机号码',
+ 'province' => '省份',
+ 'city' => '城市',
+ 'area' => '区域',
+ 'taking_site' => '自提点',
+ 'pay_type' => '支付方式',
+ 'pay_at' => '支付时间',
+ 'payment_sn' => '付款单号',
+ 'payment_amount' => '支付金额',
+ 'receivables' => '应收款',
+ 'remarks' => '备注',
+ 'discount_amount' => '折扣金额',
+ 'discount_decription' => '折扣说明',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/OrderGoods.php b/common/models/ars/OrderGoods.php
new file mode 100644
index 0000000..fa4d65d
--- /dev/null
+++ b/common/models/ars/OrderGoods.php
@@ -0,0 +1,86 @@
+ 120],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'order_id' => '订单id',
+ 'goods_id' => '商品id',
+ 'goods_img' => '商品图片',
+ 'goods_name' => '商品名称',
+ 'goods_count' => '商品数量',
+ 'sku_value' => '商品sku',
+ 'price' => '销售价',
+ 'market_price' => '市场价',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/PaymentLog.php b/common/models/ars/PaymentLog.php
new file mode 100644
index 0000000..9055f33
--- /dev/null
+++ b/common/models/ars/PaymentLog.php
@@ -0,0 +1,85 @@
+ 64],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'order_id' => '订单id',
+ 'wx_refund_id' => '微信退款单号',
+ 'mch_id' => '商户号',
+ 'order_amount' => '订单金额',
+ 'payment_amount' => '支付金额',
+ 'type' => '类型',
+ 'status' => '状态',
+ 'refund_account' => '退款账户',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/Province.php b/common/models/ars/Province.php
new file mode 100644
index 0000000..b03ffe6
--- /dev/null
+++ b/common/models/ars/Province.php
@@ -0,0 +1,49 @@
+ 16],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => 'name',
+ 'province_id' => 'province_id',
+ ];
+ }
+
+
+}
diff --git a/common/models/ars/RefundLog.php b/common/models/ars/RefundLog.php
new file mode 100644
index 0000000..33ed965
--- /dev/null
+++ b/common/models/ars/RefundLog.php
@@ -0,0 +1,71 @@
+ 64],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'order_id' => '订单id',
+ 'wx_refund_id' => '微信退款单号',
+ 'reason' => '理由',
+ 'order_amount' => '订单金额',
+ 'refund_amount' => '退款金额',
+ 'refunded_amount' => '已退款金额',
+ 'type' => '类型',
+ 'status' => '状态',
+ 'refund_account' => '退款账户',
+ 'operator_id' => '操作者',
+ 'applyed_at' => '申请时间',
+ 'confirmed_at' => '确认时间',
+ 'finished_at' => '完成时间',
+ ];
+ }
+
+
+}
diff --git a/common/models/ars/SearchHistory.php b/common/models/ars/SearchHistory.php
new file mode 100644
index 0000000..17fc86c
--- /dev/null
+++ b/common/models/ars/SearchHistory.php
@@ -0,0 +1,80 @@
+ 255],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'user_id' => '用户id',
+ 'keyword' => '关键字',
+ 'count' => '次数',
+ 'status' => '状态',
+ 'type' => '类型',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/TakingSite.php b/common/models/ars/TakingSite.php
new file mode 100644
index 0000000..cbd36bd
--- /dev/null
+++ b/common/models/ars/TakingSite.php
@@ -0,0 +1,84 @@
+ 120],
+ [['province', 'city', 'area'], 'string', 'max' => 10],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '名称',
+ 'province' => '省份',
+ 'city' => '城市',
+ 'area' => '区域',
+ 'address' => '地址',
+ 'is_default' => '是否为默认,1为默认',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/TemFile.php b/common/models/ars/TemFile.php
new file mode 100644
index 0000000..52c228d
--- /dev/null
+++ b/common/models/ars/TemFile.php
@@ -0,0 +1,80 @@
+ 255],
+ [['alias'], 'string', 'max' => 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'user_id' => '父级id',
+ 'name' => '名称',
+ 'type' => '类型',
+ 'alias' => '别名',
+ 'path' => '地址',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/Attribute.php b/vendor/antgoods/goods/src/models/ars/Attribute.php
new file mode 100644
index 0000000..c68e652
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/Attribute.php
@@ -0,0 +1,81 @@
+ 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '属性名',
+ 'value' => '属性值',
+ 'type' => '类型',
+ 'sort_order' => '排序',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/Brand.php b/vendor/antgoods/goods/src/models/ars/Brand.php
new file mode 100644
index 0000000..a225e59
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/Brand.php
@@ -0,0 +1,74 @@
+ 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '品牌名',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/Category.php b/vendor/antgoods/goods/src/models/ars/Category.php
new file mode 100644
index 0000000..9fe01df
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/Category.php
@@ -0,0 +1,87 @@
+ 60],
+ [['icon'], 'string', 'max' => 64],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '类别名称',
+ 'pid' => '父级id',
+ 'goods_count' => '商品数量',
+ 'sort_order' => '排序',
+ 'icon_type' => '图标类型',
+ 'icon' => '图标',
+ 'is_show' => '是否显示,1为不显示',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/FilterAttr.php b/vendor/antgoods/goods/src/models/ars/FilterAttr.php
new file mode 100644
index 0000000..2036d55
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/FilterAttr.php
@@ -0,0 +1,78 @@
+ 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'goods_id' => '商品id',
+ 'attr_id' => '属性id',
+ 'attr_value' => '属性值',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/Goods.php b/vendor/antgoods/goods/src/models/ars/Goods.php
new file mode 100644
index 0000000..841efc8
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/Goods.php
@@ -0,0 +1,135 @@
+ 120],
+ [['sn'], 'string', 'max' => 60],
+ [['code'], 'string', 'max' => 50],
+ [['unit'], 'string', 'max' => 16],
+ [['brief'], 'string', 'max' => 255],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'pid' => '父级id',
+ 'cat_id' => '后台商品类别id',
+ 'brand_id' => '品牌id',
+ 'shop_cat_id' => '前端商品类别id',
+ 'name' => '商品名称',
+ 'sn' => '商品唯一货号',
+ 'code' => '商品货码',
+ 'supplier_id' => '供应商id',
+ 'weight' => '重量',
+ 'length' => '长度',
+ 'width' => '宽度',
+ 'height' => '高度',
+ 'diameter' => '直径',
+ 'unit' => '单位',
+ 'sold_count' => '已售数量',
+ 'limit_count' => '限购数量',
+ 'stock' => '库存',
+ 'stock_warn' => '库存警告',
+ 'market_price' => '市场价',
+ 'price' => '销售价',
+ 'brief' => '简介',
+ 'description' => '详细介绍',
+ 'image' => '图片id',
+ 'model_id' => '模型id',
+ 'is_sale' => '该商品是否开放销售,1为是,0为否',
+ 'sort_order' => '排序',
+ 'bouns_points' => '奖励积分',
+ 'experience_points' => '经验值',
+ 'is_delete' => '是否删除,1为已删除',
+ 'express_template' => '配送详情id',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/GoodsAttr.php b/vendor/antgoods/goods/src/models/ars/GoodsAttr.php
new file mode 100644
index 0000000..b888e46
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/GoodsAttr.php
@@ -0,0 +1,78 @@
+ 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'goods_id' => '商品id',
+ 'attr_id' => '属性id',
+ 'attr_value' => '属性名',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/GoodsSku.php b/vendor/antgoods/goods/src/models/ars/GoodsSku.php
new file mode 100644
index 0000000..7e4644a
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/GoodsSku.php
@@ -0,0 +1,105 @@
+ 50],
+ [['goods_sn', 'goods_attr'], 'string', 'max' => 60],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'goods_id' => '商品id',
+ 'goods_code' => '商品条码',
+ 'goods_sn' => '商品唯一货号',
+ 'goods_attr' => '属性匹配',
+ 'weight' => '重量',
+ 'length' => '长度',
+ 'width' => '宽度',
+ 'height' => '高度',
+ 'diameter' => '直径',
+ 'sold_count' => '已售数量',
+ 'stock' => '库存',
+ 'market_price' => '市场价',
+ 'price' => '销售价',
+ 'model_id' => '模型id',
+ 'is_sale' => '该商品是否开放销售,1为是,0为否',
+ 'sort_order' => '排序',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/ShopCategory.php b/vendor/antgoods/goods/src/models/ars/ShopCategory.php
new file mode 100644
index 0000000..2ffb20c
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/ShopCategory.php
@@ -0,0 +1,96 @@
+ 60],
+ [['keywords'], 'string', 'max' => 100],
+ [['desc'], 'string', 'max' => 255],
+ [['icon'], 'string', 'max' => 64],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '类别名称',
+ 'pid' => '父级id',
+ 'goods_count' => '商品数量',
+ 'keywords' => '关键字',
+ 'desc' => '描述',
+ 'sort_order' => '排序',
+ 'icon_type' => '图标类型',
+ 'icon' => '图标',
+ 'filter_attr' => '筛选属性',
+ 'is_show' => '是否显示,1为不显示',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/Supplier.php b/vendor/antgoods/goods/src/models/ars/Supplier.php
new file mode 100644
index 0000000..73d51f6
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/Supplier.php
@@ -0,0 +1,81 @@
+ 50],
+ [['phone'], 'string', 'max' => 20],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '供应商名称',
+ 'full_name' => '供应商全称',
+ 'phone' => '手机号码',
+ 'address' => '地址',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
From d5075878c22c2d9aa4ebf9997dd7baea26fb07f7 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 15:03:56 +0800
Subject: [PATCH 31/95] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=9B=A0=E6=B5=8B?=
=?UTF-8?q?=E8=AF=95=E7=94=9F=E6=88=90=E7=9A=84=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
backend/controllers/AttributeController.php | 0
backend/controllers/BrandController.php | 0
backend/controllers/CategoryController.php | 149 ----------------
backend/controllers/ConfigController.php | 0
backend/controllers/OrderController.php | 0
.../controllers/ShopCategoryController.php | 149 ----------------
backend/controllers/SiteController.php | 0
backend/controllers/SupplierController.php | 0
backend/views/attribute/_form.php | 0
backend/views/attribute/_search.php | 0
backend/views/attribute/create.php | 0
backend/views/attribute/index.php | 0
backend/views/attribute/update.php | 0
backend/views/attribute/view.php | 0
backend/views/brand/_form.php | 0
backend/views/brand/_search.php | 0
backend/views/brand/create.php | 0
backend/views/brand/index.php | 0
backend/views/brand/update.php | 0
backend/views/brand/view.php | 0
backend/views/category/_form.php | 38 -----
backend/views/category/_search.php | 49 ------
backend/views/category/create.php | 18 --
backend/views/category/index.php | 28 ---
backend/views/category/test.php | 98 -----------
backend/views/category/update.php | 19 ---
backend/views/category/view.php | 37 ----
backend/views/config/index.php | 0
backend/views/layouts/base.php | 0
backend/views/layouts/breadcrumb.php | 0
backend/views/layouts/footer.php | 0
backend/views/layouts/header.php | 0
backend/views/layouts/main.php | 0
backend/views/layouts/sidebar.php | 2 -
backend/views/order/_form.php | 0
backend/views/order/_search.php | 0
backend/views/order/create.php | 0
backend/views/order/index.php | 0
backend/views/order/update.php | 0
backend/views/order/view.php | 0
backend/views/shop-category/_form.php | 44 -----
backend/views/shop-category/_search.php | 49 ------
backend/views/shop-category/create.php | 18 --
backend/views/shop-category/index.php | 28 ---
backend/views/shop-category/update.php | 19 ---
backend/views/shop-category/view.php | 40 -----
backend/views/site/error.php | 0
backend/views/site/index.php | 0
backend/views/site/login.php | 0
backend/views/site/test.php | 0
backend/views/supplier/_form.php | 0
backend/views/supplier/_search.php | 0
backend/views/supplier/create.php | 0
backend/views/supplier/index.php | 0
backend/views/supplier/update.php | 0
backend/views/supplier/view.php | 0
common/models/searchs/AttributeSearch.php | 147 ----------------
common/models/searchs/BrandSearch.php | 0
common/models/searchs/CategorySearch.php | 153 -----------------
common/models/searchs/OrderSearch.php | 0
common/models/searchs/ShopCategorySearch.php | 159 ------------------
common/models/searchs/SupplierSearch.php | 0
62 files changed, 1244 deletions(-)
mode change 100644 => 100755 backend/controllers/AttributeController.php
mode change 100644 => 100755 backend/controllers/BrandController.php
delete mode 100644 backend/controllers/CategoryController.php
mode change 100644 => 100755 backend/controllers/ConfigController.php
mode change 100644 => 100755 backend/controllers/OrderController.php
delete mode 100644 backend/controllers/ShopCategoryController.php
mode change 100644 => 100755 backend/controllers/SiteController.php
mode change 100644 => 100755 backend/controllers/SupplierController.php
mode change 100644 => 100755 backend/views/attribute/_form.php
mode change 100644 => 100755 backend/views/attribute/_search.php
mode change 100644 => 100755 backend/views/attribute/create.php
mode change 100644 => 100755 backend/views/attribute/index.php
mode change 100644 => 100755 backend/views/attribute/update.php
mode change 100644 => 100755 backend/views/attribute/view.php
mode change 100644 => 100755 backend/views/brand/_form.php
mode change 100644 => 100755 backend/views/brand/_search.php
mode change 100644 => 100755 backend/views/brand/create.php
mode change 100644 => 100755 backend/views/brand/index.php
mode change 100644 => 100755 backend/views/brand/update.php
mode change 100644 => 100755 backend/views/brand/view.php
delete mode 100644 backend/views/category/_form.php
delete mode 100644 backend/views/category/_search.php
delete mode 100644 backend/views/category/create.php
delete mode 100644 backend/views/category/index.php
delete mode 100644 backend/views/category/test.php
delete mode 100644 backend/views/category/update.php
delete mode 100644 backend/views/category/view.php
mode change 100644 => 100755 backend/views/config/index.php
mode change 100644 => 100755 backend/views/layouts/base.php
mode change 100644 => 100755 backend/views/layouts/breadcrumb.php
mode change 100644 => 100755 backend/views/layouts/footer.php
mode change 100644 => 100755 backend/views/layouts/header.php
mode change 100644 => 100755 backend/views/layouts/main.php
mode change 100644 => 100755 backend/views/order/_form.php
mode change 100644 => 100755 backend/views/order/_search.php
mode change 100644 => 100755 backend/views/order/create.php
mode change 100644 => 100755 backend/views/order/index.php
mode change 100644 => 100755 backend/views/order/update.php
mode change 100644 => 100755 backend/views/order/view.php
delete mode 100644 backend/views/shop-category/_form.php
delete mode 100644 backend/views/shop-category/_search.php
delete mode 100644 backend/views/shop-category/create.php
delete mode 100644 backend/views/shop-category/index.php
delete mode 100644 backend/views/shop-category/update.php
delete mode 100644 backend/views/shop-category/view.php
mode change 100644 => 100755 backend/views/site/error.php
mode change 100644 => 100755 backend/views/site/index.php
mode change 100644 => 100755 backend/views/site/login.php
mode change 100644 => 100755 backend/views/site/test.php
mode change 100644 => 100755 backend/views/supplier/_form.php
mode change 100644 => 100755 backend/views/supplier/_search.php
mode change 100644 => 100755 backend/views/supplier/create.php
mode change 100644 => 100755 backend/views/supplier/index.php
mode change 100644 => 100755 backend/views/supplier/update.php
mode change 100644 => 100755 backend/views/supplier/view.php
delete mode 100644 common/models/searchs/AttributeSearch.php
mode change 100644 => 100755 common/models/searchs/BrandSearch.php
delete mode 100644 common/models/searchs/CategorySearch.php
mode change 100644 => 100755 common/models/searchs/OrderSearch.php
delete mode 100644 common/models/searchs/ShopCategorySearch.php
mode change 100644 => 100755 common/models/searchs/SupplierSearch.php
diff --git a/backend/controllers/AttributeController.php b/backend/controllers/AttributeController.php
old mode 100644
new mode 100755
diff --git a/backend/controllers/BrandController.php b/backend/controllers/BrandController.php
old mode 100644
new mode 100755
diff --git a/backend/controllers/CategoryController.php b/backend/controllers/CategoryController.php
deleted file mode 100644
index 4be79f8..0000000
--- a/backend/controllers/CategoryController.php
+++ /dev/null
@@ -1,149 +0,0 @@
- [
- 'class' => VerbFilter::className(),
- 'actions' => [
- 'delete' => ['POST'],
- ],
- ],
- ];
- }
-
- /**
- * Lists all Category models.
- * @return mixed
- */
- public function actionIndex()
- {
- $searchModel = new CategorySearch();
- $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
-
- return $this->render('index', [
- 'searchModel' => $searchModel,
- 'dataProvider' => $dataProvider,
- 'columns' => $searchModel->columns()
- ]);
- }
-
- /**
- * Displays a single Category model.
- * @param integer $id
- * @return mixed
- * @throws NotFoundHttpException if the model cannot be found
- */
- public function actionView($id)
- {
- return $this->render('view', [
- 'model' => $this->findModel($id),
- ]);
- }
-
- /**
- * Creates a new Category model.
- * If creation is successful, the browser will be redirected to the 'view' page.
- * @return mixed
- */
- public function actionCreate()
- {
- $model = new Category();
-
- if ($model->load(Yii::$app->request->post()) && $model->save()) {
- return $this->redirect('index');
- }
-
- return $this->render('create', [
- 'model' => $model,
- ]);
- }
-
- /**
- * Updates an existing Category model.
- * If update is successful, the browser will be redirected to the 'view' page.
- * @param integer $id
- * @return mixed
- * @throws NotFoundHttpException if the model cannot be found
- */
- public function actionUpdate($id)
- {
- $model = $this->findModel($id);
-
- if ($model->load(Yii::$app->request->post()) && $model->save()) {
- return $this->redirect('index');
- }
-
- return $this->render('update', [
- 'model' => $model,
- ]);
- }
-
- /**
- * Deletes an existing Category model.
- * If deletion is successful, the browser will be redirected to the 'index' page.
- * @param integer $id
- * @return mixed
- * @throws NotFoundHttpException if the model cannot be found
- */
- public function actionDelete($id)
- {
- $this->findModel($id)->delete();
-
- return $this->redirect(['index']);
- }
-
- /**
- * Finds the Category model based on its primary key value.
- * If the model is not found, a 404 HTTP exception will be thrown.
- * @param integer $id
- * @return Category the loaded model
- * @throws NotFoundHttpException if the model cannot be found
- */
- protected function findModel($id)
- {
- if (($model = Category::findOne($id)) !== null) {
- return $model;
- }
-
- throw new NotFoundHttpException('The requested page does not exist.');
- }
- /**
- * @author iron
- * 文件导出
- */
- public function actionExport()
- {
- $searchModel = new CategorySearch();
- $params = Yii::$app->request->queryParams;
- if ($params['page-type'] == 'all') {
- $dataProvider = $searchModel->allData($params);
- } else {
- $dataProvider = $searchModel->search($params);
- }
- \iron\widget\Excel::export([
- 'models' => $dataProvider->getModels(),
- 'format' => 'Xlsx',
- 'asAttachment' => true,
- 'fileName' =>'Categories'. "-" .date('Y-m-d H/i/s', time()),
- 'columns' => $searchModel->columns()
- ]);
- }
-}
diff --git a/backend/controllers/ConfigController.php b/backend/controllers/ConfigController.php
old mode 100644
new mode 100755
diff --git a/backend/controllers/OrderController.php b/backend/controllers/OrderController.php
old mode 100644
new mode 100755
diff --git a/backend/controllers/ShopCategoryController.php b/backend/controllers/ShopCategoryController.php
deleted file mode 100644
index ad4e43e..0000000
--- a/backend/controllers/ShopCategoryController.php
+++ /dev/null
@@ -1,149 +0,0 @@
- [
- 'class' => VerbFilter::className(),
- 'actions' => [
- 'delete' => ['POST'],
- ],
- ],
- ];
- }
-
- /**
- * Lists all ShopCategory models.
- * @return mixed
- */
- public function actionIndex()
- {
- $searchModel = new ShopCategorySearch();
- $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
-
- return $this->render('index', [
- 'searchModel' => $searchModel,
- 'dataProvider' => $dataProvider,
- 'columns' => $searchModel->columns()
- ]);
- }
-
- /**
- * Displays a single ShopCategory model.
- * @param integer $id
- * @return mixed
- * @throws NotFoundHttpException if the model cannot be found
- */
- public function actionView($id)
- {
- return $this->render('view', [
- 'model' => $this->findModel($id),
- ]);
- }
-
- /**
- * Creates a new ShopCategory model.
- * If creation is successful, the browser will be redirected to the 'view' page.
- * @return mixed
- */
- public function actionCreate()
- {
- $model = new ShopCategory();
-
- if ($model->load(Yii::$app->request->post()) && $model->save()) {
- return $this->redirect('index');
- }
-
- return $this->render('create', [
- 'model' => $model,
- ]);
- }
-
- /**
- * Updates an existing ShopCategory model.
- * If update is successful, the browser will be redirected to the 'view' page.
- * @param integer $id
- * @return mixed
- * @throws NotFoundHttpException if the model cannot be found
- */
- public function actionUpdate($id)
- {
- $model = $this->findModel($id);
-
- if ($model->load(Yii::$app->request->post()) && $model->save()) {
- return $this->redirect('index');
- }
-
- return $this->render('update', [
- 'model' => $model,
- ]);
- }
-
- /**
- * Deletes an existing ShopCategory model.
- * If deletion is successful, the browser will be redirected to the 'index' page.
- * @param integer $id
- * @return mixed
- * @throws NotFoundHttpException if the model cannot be found
- */
- public function actionDelete($id)
- {
- $this->findModel($id)->delete();
-
- return $this->redirect(['index']);
- }
-
- /**
- * Finds the ShopCategory model based on its primary key value.
- * If the model is not found, a 404 HTTP exception will be thrown.
- * @param integer $id
- * @return ShopCategory the loaded model
- * @throws NotFoundHttpException if the model cannot be found
- */
- protected function findModel($id)
- {
- if (($model = ShopCategory::findOne($id)) !== null) {
- return $model;
- }
-
- throw new NotFoundHttpException('The requested page does not exist.');
- }
- /**
- * @author iron
- * 文件导出
- */
- public function actionExport()
- {
- $searchModel = new ShopCategorySearch();
- $params = Yii::$app->request->queryParams;
- if ($params['page-type'] == 'all') {
- $dataProvider = $searchModel->allData($params);
- } else {
- $dataProvider = $searchModel->search($params);
- }
- \iron\widget\Excel::export([
- 'models' => $dataProvider->getModels(),
- 'format' => 'Xlsx',
- 'asAttachment' => true,
- 'fileName' =>'Shop Categories'. "-" .date('Y-m-d H/i/s', time()),
- 'columns' => $searchModel->columns()
- ]);
- }
-}
diff --git a/backend/controllers/SiteController.php b/backend/controllers/SiteController.php
old mode 100644
new mode 100755
diff --git a/backend/controllers/SupplierController.php b/backend/controllers/SupplierController.php
old mode 100644
new mode 100755
diff --git a/backend/views/attribute/_form.php b/backend/views/attribute/_form.php
old mode 100644
new mode 100755
diff --git a/backend/views/attribute/_search.php b/backend/views/attribute/_search.php
old mode 100644
new mode 100755
diff --git a/backend/views/attribute/create.php b/backend/views/attribute/create.php
old mode 100644
new mode 100755
diff --git a/backend/views/attribute/index.php b/backend/views/attribute/index.php
old mode 100644
new mode 100755
diff --git a/backend/views/attribute/update.php b/backend/views/attribute/update.php
old mode 100644
new mode 100755
diff --git a/backend/views/attribute/view.php b/backend/views/attribute/view.php
old mode 100644
new mode 100755
diff --git a/backend/views/brand/_form.php b/backend/views/brand/_form.php
old mode 100644
new mode 100755
diff --git a/backend/views/brand/_search.php b/backend/views/brand/_search.php
old mode 100644
new mode 100755
diff --git a/backend/views/brand/create.php b/backend/views/brand/create.php
old mode 100644
new mode 100755
diff --git a/backend/views/brand/index.php b/backend/views/brand/index.php
old mode 100644
new mode 100755
diff --git a/backend/views/brand/update.php b/backend/views/brand/update.php
old mode 100644
new mode 100755
diff --git a/backend/views/brand/view.php b/backend/views/brand/view.php
old mode 100644
new mode 100755
diff --git a/backend/views/category/_form.php b/backend/views/category/_form.php
deleted file mode 100644
index 1ce3540..0000000
--- a/backend/views/category/_form.php
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
diff --git a/backend/views/category/_search.php b/backend/views/category/_search.php
deleted file mode 100644
index d43cb1d..0000000
--- a/backend/views/category/_search.php
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
- ['index'],
- 'method' => 'get',
- 'validateOnType' => true,
- ]);
-?>
-
-
- = $form->field($model, 'id', [
- "template" => "{input}{error}",
- "inputOptions" => [
- "placeholder" => "检索ID",
- "class" => "form-control",
- ],
- "errorOptions" => [
- "class" => "error-tips"
- ]
- ])
- ?>
-
-
- = $form->field($model, "created_at_range", [
- "template" => "{input}{error}",
- "inputOptions" => [
- "placeholder" => "创建时间",
- ],
- "errorOptions" => [
- "class" => "error-tips"
- ]
- ])->widget(DateRangePicker::className());
- ?>
-
-
- = Html::submitButton('', ['class' => 'btn btn-default']) ?>
- = Html::resetButton('', ['class' => 'btn btn-default']) ?>
-
-
-
\ No newline at end of file
diff --git a/backend/views/category/create.php b/backend/views/category/create.php
deleted file mode 100644
index 932a778..0000000
--- a/backend/views/category/create.php
+++ /dev/null
@@ -1,18 +0,0 @@
-title = '创建 Category';
-$this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']];
-$this->params['breadcrumbs'][] = $this->title;
-?>
-
-
- = $this->render('_form', [
- 'model' => $model,
- ]) ?>
-
-
diff --git a/backend/views/category/index.php b/backend/views/category/index.php
deleted file mode 100644
index 9c6da0b..0000000
--- a/backend/views/category/index.php
+++ /dev/null
@@ -1,28 +0,0 @@
-title = 'Categories';
-$this->params['breadcrumbs'][] = $this->title;
-?>
-
-
- = GridView::widget([
- 'dataProvider' => $dataProvider,
- 'filter' => $this->render("_search", ['model' => $searchModel]),
- 'batch' => [
- [
- "label" => "删除",
- "url" => "category/deletes"
- ],
- ],
- 'columns' => $columns
- ]);
- ?>
-
-
\ No newline at end of file
diff --git a/backend/views/category/test.php b/backend/views/category/test.php
deleted file mode 100644
index a2ec90b..0000000
--- a/backend/views/category/test.php
+++ /dev/null
@@ -1,98 +0,0 @@
-
-
-
-
-
-
-
Upload
-
-
-
Drag & Drop Files
-
-
-
-
-
diff --git a/backend/views/category/update.php b/backend/views/category/update.php
deleted file mode 100644
index f492c7b..0000000
--- a/backend/views/category/update.php
+++ /dev/null
@@ -1,19 +0,0 @@
-title = '编辑 Category: ' . $model->name;
-$this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']];
-$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
-$this->params['breadcrumbs'][] = 'Update ';
-?>
-
-
- = $this->render('_form', [
- 'model' => $model,
- ]) ?>
-
-
diff --git a/backend/views/category/view.php b/backend/views/category/view.php
deleted file mode 100644
index 403a436..0000000
--- a/backend/views/category/view.php
+++ /dev/null
@@ -1,37 +0,0 @@
-title = $model->name;
-$this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']];
-$this->params['breadcrumbs'][] = $this->title;
-\yii\web\YiiAsset::register($this);
-?>
-
-
-
- = Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?>
-
-
- = DetailView::widget([
- 'model' => $model,
- 'attributes' => [
- 'id',
- 'name',
- 'pid',
- 'goods_count',
- 'sort_order',
- 'icon_type',
- 'icon',
- 'is_show',
- 'is_delete',
- 'created_at',
- 'updated_at',
- ],
- ]) ?>
-
-
diff --git a/backend/views/config/index.php b/backend/views/config/index.php
old mode 100644
new mode 100755
diff --git a/backend/views/layouts/base.php b/backend/views/layouts/base.php
old mode 100644
new mode 100755
diff --git a/backend/views/layouts/breadcrumb.php b/backend/views/layouts/breadcrumb.php
old mode 100644
new mode 100755
diff --git a/backend/views/layouts/footer.php b/backend/views/layouts/footer.php
old mode 100644
new mode 100755
diff --git a/backend/views/layouts/header.php b/backend/views/layouts/header.php
old mode 100644
new mode 100755
diff --git a/backend/views/layouts/main.php b/backend/views/layouts/main.php
old mode 100644
new mode 100755
diff --git a/backend/views/layouts/sidebar.php b/backend/views/layouts/sidebar.php
index 1ce632a..0277d3d 100755
--- a/backend/views/layouts/sidebar.php
+++ b/backend/views/layouts/sidebar.php
@@ -21,9 +21,7 @@ use iron\widgets\Menu;
]
],
['label' => '商品管理', 'url' => '#', 'icon' => 'far fa-archive', 'items' => [
- ['label' => '商品分类', 'url' => ['category/index', 'tag' => 'new']],
['label' => '商品列表', 'url' => ['antgoods/goods/index']],
- ['label' => '属性管理', 'url' => ['attribute/index']],
]
],
['label' => '订单管理', 'url' => '#', 'icon' => 'far fa-list-alt', 'items' => [
diff --git a/backend/views/order/_form.php b/backend/views/order/_form.php
old mode 100644
new mode 100755
diff --git a/backend/views/order/_search.php b/backend/views/order/_search.php
old mode 100644
new mode 100755
diff --git a/backend/views/order/create.php b/backend/views/order/create.php
old mode 100644
new mode 100755
diff --git a/backend/views/order/index.php b/backend/views/order/index.php
old mode 100644
new mode 100755
diff --git a/backend/views/order/update.php b/backend/views/order/update.php
old mode 100644
new mode 100755
diff --git a/backend/views/order/view.php b/backend/views/order/view.php
old mode 100644
new mode 100755
diff --git a/backend/views/shop-category/_form.php b/backend/views/shop-category/_form.php
deleted file mode 100644
index 5f0949f..0000000
--- a/backend/views/shop-category/_form.php
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
diff --git a/backend/views/shop-category/_search.php b/backend/views/shop-category/_search.php
deleted file mode 100644
index 1e839e6..0000000
--- a/backend/views/shop-category/_search.php
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
- ['index'],
- 'method' => 'get',
- 'validateOnType' => true,
- ]);
-?>
-
-
- = $form->field($model, 'id', [
- "template" => "{input}{error}",
- "inputOptions" => [
- "placeholder" => "检索ID",
- "class" => "form-control",
- ],
- "errorOptions" => [
- "class" => "error-tips"
- ]
- ])
- ?>
-
-
- = $form->field($model, "created_at_range", [
- "template" => "{input}{error}",
- "inputOptions" => [
- "placeholder" => "创建时间",
- ],
- "errorOptions" => [
- "class" => "error-tips"
- ]
- ])->widget(DateRangePicker::className());
- ?>
-
-
- = Html::submitButton('', ['class' => 'btn btn-default']) ?>
- = Html::resetButton('', ['class' => 'btn btn-default']) ?>
-
-
-
\ No newline at end of file
diff --git a/backend/views/shop-category/create.php b/backend/views/shop-category/create.php
deleted file mode 100644
index 2fe2348..0000000
--- a/backend/views/shop-category/create.php
+++ /dev/null
@@ -1,18 +0,0 @@
-title = '创建 Shop Category';
-$this->params['breadcrumbs'][] = ['label' => 'Shop Categories', 'url' => ['index']];
-$this->params['breadcrumbs'][] = $this->title;
-?>
-
-
- = $this->render('_form', [
- 'model' => $model,
- ]) ?>
-
-
diff --git a/backend/views/shop-category/index.php b/backend/views/shop-category/index.php
deleted file mode 100644
index e1a7446..0000000
--- a/backend/views/shop-category/index.php
+++ /dev/null
@@ -1,28 +0,0 @@
-title = 'Shop Categories';
-$this->params['breadcrumbs'][] = $this->title;
-?>
-
-
- = GridView::widget([
- 'dataProvider' => $dataProvider,
- 'filter' => $this->render("_search", ['model' => $searchModel]),
- 'batch' => [
- [
- "label" => "删除",
- "url" => "shop-category/deletes"
- ],
- ],
- 'columns' => $columns
- ]);
- ?>
-
-
\ No newline at end of file
diff --git a/backend/views/shop-category/update.php b/backend/views/shop-category/update.php
deleted file mode 100644
index 93e68c8..0000000
--- a/backend/views/shop-category/update.php
+++ /dev/null
@@ -1,19 +0,0 @@
-title = '编辑 Shop Category: ' . $model->name;
-$this->params['breadcrumbs'][] = ['label' => 'Shop Categories', 'url' => ['index']];
-$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
-$this->params['breadcrumbs'][] = 'Update ';
-?>
-
-
- = $this->render('_form', [
- 'model' => $model,
- ]) ?>
-
-
diff --git a/backend/views/shop-category/view.php b/backend/views/shop-category/view.php
deleted file mode 100644
index b94aaa9..0000000
--- a/backend/views/shop-category/view.php
+++ /dev/null
@@ -1,40 +0,0 @@
-title = $model->name;
-$this->params['breadcrumbs'][] = ['label' => 'Shop Categories', 'url' => ['index']];
-$this->params['breadcrumbs'][] = $this->title;
-\yii\web\YiiAsset::register($this);
-?>
-
-
-
- = Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?>
-
-
- = DetailView::widget([
- 'model' => $model,
- 'attributes' => [
- 'id',
- 'name',
- 'pid',
- 'goods_count',
- 'keywords',
- 'desc',
- 'sort_order',
- 'icon_type',
- 'icon',
- 'filter_attr:ntext',
- 'is_show',
- 'is_delete',
- 'created_at',
- 'updated_at',
- ],
- ]) ?>
-
-
diff --git a/backend/views/site/error.php b/backend/views/site/error.php
old mode 100644
new mode 100755
diff --git a/backend/views/site/index.php b/backend/views/site/index.php
old mode 100644
new mode 100755
diff --git a/backend/views/site/login.php b/backend/views/site/login.php
old mode 100644
new mode 100755
diff --git a/backend/views/site/test.php b/backend/views/site/test.php
old mode 100644
new mode 100755
diff --git a/backend/views/supplier/_form.php b/backend/views/supplier/_form.php
old mode 100644
new mode 100755
diff --git a/backend/views/supplier/_search.php b/backend/views/supplier/_search.php
old mode 100644
new mode 100755
diff --git a/backend/views/supplier/create.php b/backend/views/supplier/create.php
old mode 100644
new mode 100755
diff --git a/backend/views/supplier/index.php b/backend/views/supplier/index.php
old mode 100644
new mode 100755
diff --git a/backend/views/supplier/update.php b/backend/views/supplier/update.php
old mode 100644
new mode 100755
diff --git a/backend/views/supplier/view.php b/backend/views/supplier/view.php
old mode 100644
new mode 100755
diff --git a/common/models/searchs/AttributeSearch.php b/common/models/searchs/AttributeSearch.php
deleted file mode 100644
index bb725fe..0000000
--- a/common/models/searchs/AttributeSearch.php
+++ /dev/null
@@ -1,147 +0,0 @@
- 'blobt\grid\CheckboxColumn',
- 'width' => '2%',
- 'align' => 'center'
- ],
- 'id',
- 'name',
- 'value',
- 'type',
- 'sort_order',
- //'is_delete',
- //'created_at',
- //'updated_at',
- [
- 'class' => 'iron\grid\ActionColumn',
- 'align' => 'center',
- ],
- ];
- }
- /**
- * @param $params
- * @return ActiveDataProvider
- * 不分页的所有数据
- */
- public function allData($params)
- {
- $query = Attribute::find();
- $dataProvider = new ActiveDataProvider([
- 'query' => $query,
- 'pagination' => false,
- 'sort' => false
- ]);
- $this->load($params);
- return $this->filter($query, $dataProvider);
- }
-
- /**
- * Creates data provider instance with search query applied
- *
- * @param array $params
- *
- * @return ActiveDataProvider
- */
- public function search($params)
- {
- $query = Attribute::find();
-
- // add conditions that should always apply here
-
- $dataProvider = new ActiveDataProvider([
- 'query' => $query,
- 'pagination' => [
- 'pageSizeLimit' => [1, 200]
- ],
- 'sort' => [
- 'defaultOrder' => [
- 'id' => SORT_DESC,
- ]
- ],
- ]);
-
- $this->load($params);
- return $this->filter($query, $dataProvider);
- }
- /**
- * @param $query
- * @param $dataProvider
- * @return ActiveDataProvider
- * 条件筛选
- */
- private function filter($query, $dataProvider){
- if (!$this->validate()) {
- // uncomment the following line if you do not want to return any records when validation fails
- // $query->where('0=1');
- return $dataProvider;
- }
-
- // grid filtering conditions
- $query->andFilterWhere([
- 'id' => $this->id,
- 'type' => $this->type,
- 'sort_order' => $this->sort_order,
- 'is_delete' => $this->is_delete,
- 'created_at' => $this->created_at,
- 'updated_at' => $this->updated_at,
- ]);
-
- $query->andFilterWhere(['like', 'name', $this->name])
- ->andFilterWhere(['like', 'value', $this->value]);
- if ($this->created_at_range) {
- $arr = explode(' ~ ', $this->created_at_range);
- $start = strtotime($arr[0]);
- $end = strtotime($arr[1]) + 3600 * 24;
- $query->andFilterWhere(['between', 'created_at', $start, $end]);
- }
- return $dataProvider;
- }
-}
diff --git a/common/models/searchs/BrandSearch.php b/common/models/searchs/BrandSearch.php
old mode 100644
new mode 100755
diff --git a/common/models/searchs/CategorySearch.php b/common/models/searchs/CategorySearch.php
deleted file mode 100644
index 2693c7f..0000000
--- a/common/models/searchs/CategorySearch.php
+++ /dev/null
@@ -1,153 +0,0 @@
- 'blobt\grid\CheckboxColumn',
- 'width' => '2%',
- 'align' => 'center'
- ],
- 'id',
- 'name',
- 'pid',
- 'goods_count',
- 'sort_order',
- //'icon_type',
- //'icon',
- //'is_show',
- //'is_delete',
- //'created_at',
- //'updated_at',
- [
- 'class' => 'iron\grid\ActionColumn',
- 'align' => 'center',
- ],
- ];
- }
- /**
- * @param $params
- * @return ActiveDataProvider
- * 不分页的所有数据
- */
- public function allData($params)
- {
- $query = Category::find();
- $dataProvider = new ActiveDataProvider([
- 'query' => $query,
- 'pagination' => false,
- 'sort' => false
- ]);
- $this->load($params);
- return $this->filter($query, $dataProvider);
- }
-
- /**
- * Creates data provider instance with search query applied
- *
- * @param array $params
- *
- * @return ActiveDataProvider
- */
- public function search($params)
- {
- $query = Category::find();
-
- // add conditions that should always apply here
-
- $dataProvider = new ActiveDataProvider([
- 'query' => $query,
- 'pagination' => [
- 'pageSizeLimit' => [1, 200]
- ],
- 'sort' => [
- 'defaultOrder' => [
- 'id' => SORT_DESC,
- ]
- ],
- ]);
-
- $this->load($params);
- return $this->filter($query, $dataProvider);
- }
- /**
- * @param $query
- * @param $dataProvider
- * @return ActiveDataProvider
- * 条件筛选
- */
- private function filter($query, $dataProvider){
- if (!$this->validate()) {
- // uncomment the following line if you do not want to return any records when validation fails
- // $query->where('0=1');
- return $dataProvider;
- }
-
- // grid filtering conditions
- $query->andFilterWhere([
- 'id' => $this->id,
- 'pid' => $this->pid,
- 'goods_count' => $this->goods_count,
- 'sort_order' => $this->sort_order,
- 'icon_type' => $this->icon_type,
- 'is_show' => $this->is_show,
- 'is_delete' => $this->is_delete,
- 'created_at' => $this->created_at,
- 'updated_at' => $this->updated_at,
- ]);
-
- $query->andFilterWhere(['like', 'name', $this->name])
- ->andFilterWhere(['like', 'icon', $this->icon]);
- if ($this->created_at_range) {
- $arr = explode(' ~ ', $this->created_at_range);
- $start = strtotime($arr[0]);
- $end = strtotime($arr[1]) + 3600 * 24;
- $query->andFilterWhere(['between', 'created_at', $start, $end]);
- }
- return $dataProvider;
- }
-}
diff --git a/common/models/searchs/OrderSearch.php b/common/models/searchs/OrderSearch.php
old mode 100644
new mode 100755
diff --git a/common/models/searchs/ShopCategorySearch.php b/common/models/searchs/ShopCategorySearch.php
deleted file mode 100644
index 8704080..0000000
--- a/common/models/searchs/ShopCategorySearch.php
+++ /dev/null
@@ -1,159 +0,0 @@
- 'blobt\grid\CheckboxColumn',
- 'width' => '2%',
- 'align' => 'center'
- ],
- 'id',
- 'name',
- 'pid',
- 'goods_count',
- 'keywords',
- //'desc',
- //'sort_order',
- //'icon_type',
- //'icon',
- //'filter_attr',
- //'is_show',
- //'is_delete',
- //'created_at',
- //'updated_at',
- [
- 'class' => 'iron\grid\ActionColumn',
- 'align' => 'center',
- ],
- ];
- }
- /**
- * @param $params
- * @return ActiveDataProvider
- * 不分页的所有数据
- */
- public function allData($params)
- {
- $query = ShopCategory::find();
- $dataProvider = new ActiveDataProvider([
- 'query' => $query,
- 'pagination' => false,
- 'sort' => false
- ]);
- $this->load($params);
- return $this->filter($query, $dataProvider);
- }
-
- /**
- * Creates data provider instance with search query applied
- *
- * @param array $params
- *
- * @return ActiveDataProvider
- */
- public function search($params)
- {
- $query = ShopCategory::find();
-
- // add conditions that should always apply here
-
- $dataProvider = new ActiveDataProvider([
- 'query' => $query,
- 'pagination' => [
- 'pageSizeLimit' => [1, 200]
- ],
- 'sort' => [
- 'defaultOrder' => [
- 'id' => SORT_DESC,
- ]
- ],
- ]);
-
- $this->load($params);
- return $this->filter($query, $dataProvider);
- }
- /**
- * @param $query
- * @param $dataProvider
- * @return ActiveDataProvider
- * 条件筛选
- */
- private function filter($query, $dataProvider){
- if (!$this->validate()) {
- // uncomment the following line if you do not want to return any records when validation fails
- // $query->where('0=1');
- return $dataProvider;
- }
-
- // grid filtering conditions
- $query->andFilterWhere([
- 'id' => $this->id,
- 'pid' => $this->pid,
- 'goods_count' => $this->goods_count,
- 'sort_order' => $this->sort_order,
- 'icon_type' => $this->icon_type,
- 'is_show' => $this->is_show,
- 'is_delete' => $this->is_delete,
- 'created_at' => $this->created_at,
- 'updated_at' => $this->updated_at,
- ]);
-
- $query->andFilterWhere(['like', 'name', $this->name])
- ->andFilterWhere(['like', 'keywords', $this->keywords])
- ->andFilterWhere(['like', 'desc', $this->desc])
- ->andFilterWhere(['like', 'icon', $this->icon])
- ->andFilterWhere(['like', 'filter_attr', $this->filter_attr]);
- if ($this->created_at_range) {
- $arr = explode(' ~ ', $this->created_at_range);
- $start = strtotime($arr[0]);
- $end = strtotime($arr[1]) + 3600 * 24;
- $query->andFilterWhere(['between', 'created_at', $start, $end]);
- }
- return $dataProvider;
- }
-}
diff --git a/common/models/searchs/SupplierSearch.php b/common/models/searchs/SupplierSearch.php
old mode 100644
new mode 100755
From 9aca28f7cce7d73e69f82eea6d51741cfc069570 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 15:28:40 +0800
Subject: [PATCH 32/95] =?UTF-8?q?=E6=9B=B4=E6=8D=A2model=E6=A8=A1=E6=9D=BF?=
=?UTF-8?q?=E7=94=9F=E6=88=90model=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/models/ars/Address.php | 88 ------------
common/models/ars/AfterSale.php | 80 -----------
common/models/ars/Area.php | 51 -------
common/models/ars/Cart.php | 84 -----------
common/models/ars/City.php | 51 -------
common/models/ars/Collection.php | 73 ----------
common/models/ars/Comment.php | 80 -----------
common/models/ars/Delivery.php | 86 -----------
common/models/ars/ExpressTemplate.php | 95 ------------
common/models/ars/File.php | 86 -----------
common/models/ars/Order.php | 121 ----------------
common/models/ars/OrderGoods.php | 86 -----------
common/models/ars/PaymentLog.php | 85 -----------
common/models/ars/Province.php | 49 -------
common/models/ars/RefundLog.php | 71 ---------
common/models/ars/SearchHistory.php | 80 -----------
common/models/ars/TakingSite.php | 84 -----------
common/models/ars/TemFile.php | 80 -----------
.../goods/src/models/ars/Attribute.php | 81 -----------
.../antgoods/goods/src/models/ars/Brand.php | 74 ----------
.../goods/src/models/ars/Category.php | 87 -----------
.../goods/src/models/ars/FilterAttr.php | 78 ----------
.../antgoods/goods/src/models/ars/Goods.php | 135 ------------------
.../goods/src/models/ars/GoodsAttr.php | 78 ----------
.../goods/src/models/ars/GoodsSku.php | 105 --------------
.../goods/src/models/ars/ShopCategory.php | 96 -------------
.../goods/src/models/ars/Supplier.php | 81 -----------
27 files changed, 2245 deletions(-)
delete mode 100644 common/models/ars/Address.php
delete mode 100644 common/models/ars/AfterSale.php
delete mode 100644 common/models/ars/Area.php
delete mode 100644 common/models/ars/Cart.php
delete mode 100644 common/models/ars/City.php
delete mode 100644 common/models/ars/Collection.php
delete mode 100644 common/models/ars/Comment.php
delete mode 100644 common/models/ars/Delivery.php
delete mode 100644 common/models/ars/ExpressTemplate.php
delete mode 100644 common/models/ars/File.php
delete mode 100644 common/models/ars/Order.php
delete mode 100644 common/models/ars/OrderGoods.php
delete mode 100644 common/models/ars/PaymentLog.php
delete mode 100644 common/models/ars/Province.php
delete mode 100644 common/models/ars/RefundLog.php
delete mode 100644 common/models/ars/SearchHistory.php
delete mode 100644 common/models/ars/TakingSite.php
delete mode 100644 common/models/ars/TemFile.php
delete mode 100644 vendor/antgoods/goods/src/models/ars/Attribute.php
delete mode 100644 vendor/antgoods/goods/src/models/ars/Brand.php
delete mode 100644 vendor/antgoods/goods/src/models/ars/Category.php
delete mode 100644 vendor/antgoods/goods/src/models/ars/FilterAttr.php
delete mode 100644 vendor/antgoods/goods/src/models/ars/Goods.php
delete mode 100644 vendor/antgoods/goods/src/models/ars/GoodsAttr.php
delete mode 100644 vendor/antgoods/goods/src/models/ars/GoodsSku.php
delete mode 100644 vendor/antgoods/goods/src/models/ars/ShopCategory.php
delete mode 100644 vendor/antgoods/goods/src/models/ars/Supplier.php
diff --git a/common/models/ars/Address.php b/common/models/ars/Address.php
deleted file mode 100644
index aec13fb..0000000
--- a/common/models/ars/Address.php
+++ /dev/null
@@ -1,88 +0,0 @@
- 20],
- [['province', 'city', 'area'], 'string', 'max' => 10],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'user_id' => '用户id',
- 'consignee' => '收件人',
- 'phone' => '电话',
- 'province' => '省份',
- 'city' => '城市',
- 'area' => '区域',
- 'address' => '详细地址',
- 'status' => '状态,0-默认值 1-默认地址',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/AfterSale.php b/common/models/ars/AfterSale.php
deleted file mode 100644
index 4cf35b1..0000000
--- a/common/models/ars/AfterSale.php
+++ /dev/null
@@ -1,80 +0,0 @@
- 64],
- [['take_shipping_sn', 'send_shipping_sn'], 'string', 'max' => 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'operator_id' => '操作者',
- 'user_id' => '用户id',
- 'wx_refund_id' => '微信退款单号',
- 'after_sale_sn' => '售后单号',
- 'order_goods_id' => '订单商品id',
- 'count' => '退换货的商品数量',
- 'amount' => '退货时实际退的金额',
- 'type' => '类型',
- 'reason' => '退换货理由',
- 'description' => '描述',
- 'take_shipping_sn' => '用户发货物流单号',
- 'send_shipping_sn' => '换货商家发货的物流单号',
- 'remarks' => '店家备注',
- 'applyed_at' => '申请时间',
- 'dealed_at' => '处理时间',
- 'finished_at' => '完成时间',
- ];
- }
-
-
-}
diff --git a/common/models/ars/Area.php b/common/models/ars/Area.php
deleted file mode 100644
index 254681b..0000000
--- a/common/models/ars/Area.php
+++ /dev/null
@@ -1,51 +0,0 @@
- 32],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => 'name',
- 'area_id' => 'area_id',
- 'city_id' => 'city_id',
- ];
- }
-
-
-}
diff --git a/common/models/ars/Cart.php b/common/models/ars/Cart.php
deleted file mode 100644
index ef6477f..0000000
--- a/common/models/ars/Cart.php
+++ /dev/null
@@ -1,84 +0,0 @@
- 120],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'user_id' => '用户id',
- 'goods_id' => '商品id',
- 'goods_name' => '商品名称',
- 'goods_img' => '商品图片',
- 'goods_price' => '商品售价',
- 'sku_id' => '商品sku的id',
- 'goods_count' => '商品数量',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/City.php b/common/models/ars/City.php
deleted file mode 100644
index ae87412..0000000
--- a/common/models/ars/City.php
+++ /dev/null
@@ -1,51 +0,0 @@
- 32],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'city_id' => 'city_id',
- 'name' => 'name',
- 'province_id' => 'province_id',
- ];
- }
-
-
-}
diff --git a/common/models/ars/Collection.php b/common/models/ars/Collection.php
deleted file mode 100644
index 2a1a771..0000000
--- a/common/models/ars/Collection.php
+++ /dev/null
@@ -1,73 +0,0 @@
- 'id',
- 'user_id' => '用户id',
- 'goods_id' => '商品id',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/Comment.php b/common/models/ars/Comment.php
deleted file mode 100644
index 2701ecf..0000000
--- a/common/models/ars/Comment.php
+++ /dev/null
@@ -1,80 +0,0 @@
- 'id',
- 'user_id' => '用户id',
- 'order_goods_id' => '订单详情商品id',
- 'star' => '星级',
- 'content' => '评论内容',
- 'status' => '状态:1为显示,0为不显示',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/Delivery.php b/common/models/ars/Delivery.php
deleted file mode 100644
index 85d1d0e..0000000
--- a/common/models/ars/Delivery.php
+++ /dev/null
@@ -1,86 +0,0 @@
- 50],
- [['shipping_id'], 'string', 'max' => 10],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'order_id' => '订单id',
- 'shipping_name' => '货流名称',
- 'shipping_id' => '运货单位',
- 'type' => '类型',
- 'goods' => '商品',
- 'status' => '状态',
- 'decription' => '描述',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/ExpressTemplate.php b/common/models/ars/ExpressTemplate.php
deleted file mode 100644
index e3e6b81..0000000
--- a/common/models/ars/ExpressTemplate.php
+++ /dev/null
@@ -1,95 +0,0 @@
- 255],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '名称',
- 'province' => '省份',
- 'city' => '城市',
- 'area' => '区域',
- 'billing_type' => '账单类型',
- 'extra_weight_type' => '续重重量类型',
- 'exemption_type' => '包邮类型',
- 'basic_price' => '基本运费',
- 'extra_price' => '续重运费',
- 'exemption_amount' => '包邮金额',
- 'support_taking' => '是否支持自提,1为不支持',
- 'taking_site' => '自提地点',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/File.php b/common/models/ars/File.php
deleted file mode 100644
index fc1be27..0000000
--- a/common/models/ars/File.php
+++ /dev/null
@@ -1,86 +0,0 @@
- 255],
- [['alias'], 'string', 'max' => 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'pid' => '父级id',
- 'name' => '名称',
- 'type' => '类型',
- 'own_type' => '拥有者类型',
- 'own_id' => '拥有者id',
- 'alias' => '别名',
- 'path' => '地址',
- 'is_delete' => '是否删除,1为已删除',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/Order.php b/common/models/ars/Order.php
deleted file mode 100644
index 6f03a52..0000000
--- a/common/models/ars/Order.php
+++ /dev/null
@@ -1,121 +0,0 @@
- 64],
- [['consignee', 'phone'], 'string', 'max' => 20],
- [['province', 'city', 'area'], 'string', 'max' => 10],
- [['payment_sn'], 'string', 'max' => 120],
- [['remarks'], 'string', 'max' => 255],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'user_id' => '用户id',
- 'order_sn' => '订单号',
- 'invoice_id' => '发票单号',
- 'status' => '状态',
- 'type' => '类型',
- 'goods_count' => '商品数量',
- 'goods_amount' => '商品金额',
- 'shipping_amount' => '物流金额',
- 'shipping_type' => '物流类型',
- 'consignee' => '收件人',
- 'phone' => '手机号码',
- 'province' => '省份',
- 'city' => '城市',
- 'area' => '区域',
- 'taking_site' => '自提点',
- 'pay_type' => '支付方式',
- 'pay_at' => '支付时间',
- 'payment_sn' => '付款单号',
- 'payment_amount' => '支付金额',
- 'receivables' => '应收款',
- 'remarks' => '备注',
- 'discount_amount' => '折扣金额',
- 'discount_decription' => '折扣说明',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/OrderGoods.php b/common/models/ars/OrderGoods.php
deleted file mode 100644
index fa4d65d..0000000
--- a/common/models/ars/OrderGoods.php
+++ /dev/null
@@ -1,86 +0,0 @@
- 120],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'order_id' => '订单id',
- 'goods_id' => '商品id',
- 'goods_img' => '商品图片',
- 'goods_name' => '商品名称',
- 'goods_count' => '商品数量',
- 'sku_value' => '商品sku',
- 'price' => '销售价',
- 'market_price' => '市场价',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/PaymentLog.php b/common/models/ars/PaymentLog.php
deleted file mode 100644
index 9055f33..0000000
--- a/common/models/ars/PaymentLog.php
+++ /dev/null
@@ -1,85 +0,0 @@
- 64],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'order_id' => '订单id',
- 'wx_refund_id' => '微信退款单号',
- 'mch_id' => '商户号',
- 'order_amount' => '订单金额',
- 'payment_amount' => '支付金额',
- 'type' => '类型',
- 'status' => '状态',
- 'refund_account' => '退款账户',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/Province.php b/common/models/ars/Province.php
deleted file mode 100644
index b03ffe6..0000000
--- a/common/models/ars/Province.php
+++ /dev/null
@@ -1,49 +0,0 @@
- 16],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => 'name',
- 'province_id' => 'province_id',
- ];
- }
-
-
-}
diff --git a/common/models/ars/RefundLog.php b/common/models/ars/RefundLog.php
deleted file mode 100644
index 33ed965..0000000
--- a/common/models/ars/RefundLog.php
+++ /dev/null
@@ -1,71 +0,0 @@
- 64],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'order_id' => '订单id',
- 'wx_refund_id' => '微信退款单号',
- 'reason' => '理由',
- 'order_amount' => '订单金额',
- 'refund_amount' => '退款金额',
- 'refunded_amount' => '已退款金额',
- 'type' => '类型',
- 'status' => '状态',
- 'refund_account' => '退款账户',
- 'operator_id' => '操作者',
- 'applyed_at' => '申请时间',
- 'confirmed_at' => '确认时间',
- 'finished_at' => '完成时间',
- ];
- }
-
-
-}
diff --git a/common/models/ars/SearchHistory.php b/common/models/ars/SearchHistory.php
deleted file mode 100644
index 17fc86c..0000000
--- a/common/models/ars/SearchHistory.php
+++ /dev/null
@@ -1,80 +0,0 @@
- 255],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'user_id' => '用户id',
- 'keyword' => '关键字',
- 'count' => '次数',
- 'status' => '状态',
- 'type' => '类型',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/TakingSite.php b/common/models/ars/TakingSite.php
deleted file mode 100644
index cbd36bd..0000000
--- a/common/models/ars/TakingSite.php
+++ /dev/null
@@ -1,84 +0,0 @@
- 120],
- [['province', 'city', 'area'], 'string', 'max' => 10],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '名称',
- 'province' => '省份',
- 'city' => '城市',
- 'area' => '区域',
- 'address' => '地址',
- 'is_default' => '是否为默认,1为默认',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/common/models/ars/TemFile.php b/common/models/ars/TemFile.php
deleted file mode 100644
index 52c228d..0000000
--- a/common/models/ars/TemFile.php
+++ /dev/null
@@ -1,80 +0,0 @@
- 255],
- [['alias'], 'string', 'max' => 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'user_id' => '父级id',
- 'name' => '名称',
- 'type' => '类型',
- 'alias' => '别名',
- 'path' => '地址',
- 'updated_at' => '更新时间',
- 'created_at' => '创建时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/Attribute.php b/vendor/antgoods/goods/src/models/ars/Attribute.php
deleted file mode 100644
index c68e652..0000000
--- a/vendor/antgoods/goods/src/models/ars/Attribute.php
+++ /dev/null
@@ -1,81 +0,0 @@
- 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '属性名',
- 'value' => '属性值',
- 'type' => '类型',
- 'sort_order' => '排序',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/Brand.php b/vendor/antgoods/goods/src/models/ars/Brand.php
deleted file mode 100644
index a225e59..0000000
--- a/vendor/antgoods/goods/src/models/ars/Brand.php
+++ /dev/null
@@ -1,74 +0,0 @@
- 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '品牌名',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/Category.php b/vendor/antgoods/goods/src/models/ars/Category.php
deleted file mode 100644
index 9fe01df..0000000
--- a/vendor/antgoods/goods/src/models/ars/Category.php
+++ /dev/null
@@ -1,87 +0,0 @@
- 60],
- [['icon'], 'string', 'max' => 64],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '类别名称',
- 'pid' => '父级id',
- 'goods_count' => '商品数量',
- 'sort_order' => '排序',
- 'icon_type' => '图标类型',
- 'icon' => '图标',
- 'is_show' => '是否显示,1为不显示',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/FilterAttr.php b/vendor/antgoods/goods/src/models/ars/FilterAttr.php
deleted file mode 100644
index 2036d55..0000000
--- a/vendor/antgoods/goods/src/models/ars/FilterAttr.php
+++ /dev/null
@@ -1,78 +0,0 @@
- 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'goods_id' => '商品id',
- 'attr_id' => '属性id',
- 'attr_value' => '属性值',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/Goods.php b/vendor/antgoods/goods/src/models/ars/Goods.php
deleted file mode 100644
index 841efc8..0000000
--- a/vendor/antgoods/goods/src/models/ars/Goods.php
+++ /dev/null
@@ -1,135 +0,0 @@
- 120],
- [['sn'], 'string', 'max' => 60],
- [['code'], 'string', 'max' => 50],
- [['unit'], 'string', 'max' => 16],
- [['brief'], 'string', 'max' => 255],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'pid' => '父级id',
- 'cat_id' => '后台商品类别id',
- 'brand_id' => '品牌id',
- 'shop_cat_id' => '前端商品类别id',
- 'name' => '商品名称',
- 'sn' => '商品唯一货号',
- 'code' => '商品货码',
- 'supplier_id' => '供应商id',
- 'weight' => '重量',
- 'length' => '长度',
- 'width' => '宽度',
- 'height' => '高度',
- 'diameter' => '直径',
- 'unit' => '单位',
- 'sold_count' => '已售数量',
- 'limit_count' => '限购数量',
- 'stock' => '库存',
- 'stock_warn' => '库存警告',
- 'market_price' => '市场价',
- 'price' => '销售价',
- 'brief' => '简介',
- 'description' => '详细介绍',
- 'image' => '图片id',
- 'model_id' => '模型id',
- 'is_sale' => '该商品是否开放销售,1为是,0为否',
- 'sort_order' => '排序',
- 'bouns_points' => '奖励积分',
- 'experience_points' => '经验值',
- 'is_delete' => '是否删除,1为已删除',
- 'express_template' => '配送详情id',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/GoodsAttr.php b/vendor/antgoods/goods/src/models/ars/GoodsAttr.php
deleted file mode 100644
index b888e46..0000000
--- a/vendor/antgoods/goods/src/models/ars/GoodsAttr.php
+++ /dev/null
@@ -1,78 +0,0 @@
- 50],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'goods_id' => '商品id',
- 'attr_id' => '属性id',
- 'attr_value' => '属性名',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/GoodsSku.php b/vendor/antgoods/goods/src/models/ars/GoodsSku.php
deleted file mode 100644
index 7e4644a..0000000
--- a/vendor/antgoods/goods/src/models/ars/GoodsSku.php
+++ /dev/null
@@ -1,105 +0,0 @@
- 50],
- [['goods_sn', 'goods_attr'], 'string', 'max' => 60],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'goods_id' => '商品id',
- 'goods_code' => '商品条码',
- 'goods_sn' => '商品唯一货号',
- 'goods_attr' => '属性匹配',
- 'weight' => '重量',
- 'length' => '长度',
- 'width' => '宽度',
- 'height' => '高度',
- 'diameter' => '直径',
- 'sold_count' => '已售数量',
- 'stock' => '库存',
- 'market_price' => '市场价',
- 'price' => '销售价',
- 'model_id' => '模型id',
- 'is_sale' => '该商品是否开放销售,1为是,0为否',
- 'sort_order' => '排序',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/ShopCategory.php b/vendor/antgoods/goods/src/models/ars/ShopCategory.php
deleted file mode 100644
index 2ffb20c..0000000
--- a/vendor/antgoods/goods/src/models/ars/ShopCategory.php
+++ /dev/null
@@ -1,96 +0,0 @@
- 60],
- [['keywords'], 'string', 'max' => 100],
- [['desc'], 'string', 'max' => 255],
- [['icon'], 'string', 'max' => 64],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '类别名称',
- 'pid' => '父级id',
- 'goods_count' => '商品数量',
- 'keywords' => '关键字',
- 'desc' => '描述',
- 'sort_order' => '排序',
- 'icon_type' => '图标类型',
- 'icon' => '图标',
- 'filter_attr' => '筛选属性',
- 'is_show' => '是否显示,1为不显示',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
diff --git a/vendor/antgoods/goods/src/models/ars/Supplier.php b/vendor/antgoods/goods/src/models/ars/Supplier.php
deleted file mode 100644
index 73d51f6..0000000
--- a/vendor/antgoods/goods/src/models/ars/Supplier.php
+++ /dev/null
@@ -1,81 +0,0 @@
- 50],
- [['phone'], 'string', 'max' => 20],
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'id',
- 'name' => '供应商名称',
- 'full_name' => '供应商全称',
- 'phone' => '手机号码',
- 'address' => '地址',
- 'is_delete' => '是否删除,1为已删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- ];
- }
-
-
- /**
- * @author linyao
- * @email 602604991@qq.com
- * @created Nov 8, 2019
- *
- * 行为存储创建时间和更新时间
- */
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'createdAtAttribute' => 'created_at',
- 'updatedAtAttribute' => 'updated_at',
- 'value' => function() {
- return time();
- },
- ],
- ];
- }
-}
From b675ebbe8d0c45db8fd6e7976c2b1a173b662a2a Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 15:34:57 +0800
Subject: [PATCH 33/95] =?UTF-8?q?antgoods=E5=A2=9E=E5=8A=A0goods=E7=9A=84c?=
=?UTF-8?q?rud=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
backend/config/main.php | 6 +-
common/models/ars/Address.php | 88 ++++++++
common/models/ars/AfterSale.php | 80 +++++++
common/models/ars/Area.php | 51 +++++
common/models/ars/Cart.php | 84 ++++++++
common/models/ars/City.php | 51 +++++
common/models/ars/Collection.php | 73 +++++++
common/models/ars/Comment.php | 80 +++++++
common/models/ars/Delivery.php | 86 ++++++++
common/models/ars/ExpressTemplate.php | 95 +++++++++
common/models/ars/File.php | 86 ++++++++
common/models/ars/Order.php | 121 +++++++++++
common/models/ars/OrderGoods.php | 86 ++++++++
common/models/ars/PaymentLog.php | 85 ++++++++
common/models/ars/Province.php | 49 +++++
common/models/ars/RefundLog.php | 71 +++++++
common/models/ars/SearchHistory.php | 80 +++++++
common/models/ars/TakingSite.php | 84 ++++++++
common/models/ars/TemFile.php | 80 +++++++
.../goods/src/controllers/GoodsController.php | 149 +++++++++++++
.../goods/src/models/ars/Attribute.php | 81 +++++++
.../antgoods/goods/src/models/ars/Brand.php | 74 +++++++
.../goods/src/models/ars/Category.php | 87 ++++++++
.../goods/src/models/ars/FilterAttr.php | 78 +++++++
.../antgoods/goods/src/models/ars/Goods.php | 135 ++++++++++++
.../goods/src/models/ars/GoodsAttr.php | 78 +++++++
.../goods/src/models/ars/GoodsSku.php | 105 ++++++++++
.../goods/src/models/ars/ShopCategory.php | 96 +++++++++
.../goods/src/models/ars/Supplier.php | 81 +++++++
.../goods/src/models/searchs/GoodsSearch.php | 197 ++++++++++++++++++
.../antgoods/goods/src/views/goods/_form.php | 82 ++++++++
.../goods/src/views/goods/_search.php | 49 +++++
.../antgoods/goods/src/views/goods/create.php | 18 ++
.../antgoods/goods/src/views/goods/index.php | 28 +++
.../antgoods/goods/src/views/goods/update.php | 19 ++
.../antgoods/goods/src/views/goods/view.php | 59 ++++++
36 files changed, 2851 insertions(+), 1 deletion(-)
create mode 100644 common/models/ars/Address.php
create mode 100644 common/models/ars/AfterSale.php
create mode 100644 common/models/ars/Area.php
create mode 100644 common/models/ars/Cart.php
create mode 100644 common/models/ars/City.php
create mode 100644 common/models/ars/Collection.php
create mode 100644 common/models/ars/Comment.php
create mode 100644 common/models/ars/Delivery.php
create mode 100644 common/models/ars/ExpressTemplate.php
create mode 100644 common/models/ars/File.php
create mode 100644 common/models/ars/Order.php
create mode 100644 common/models/ars/OrderGoods.php
create mode 100644 common/models/ars/PaymentLog.php
create mode 100644 common/models/ars/Province.php
create mode 100644 common/models/ars/RefundLog.php
create mode 100644 common/models/ars/SearchHistory.php
create mode 100644 common/models/ars/TakingSite.php
create mode 100644 common/models/ars/TemFile.php
create mode 100644 vendor/antgoods/goods/src/controllers/GoodsController.php
create mode 100644 vendor/antgoods/goods/src/models/ars/Attribute.php
create mode 100644 vendor/antgoods/goods/src/models/ars/Brand.php
create mode 100644 vendor/antgoods/goods/src/models/ars/Category.php
create mode 100644 vendor/antgoods/goods/src/models/ars/FilterAttr.php
create mode 100644 vendor/antgoods/goods/src/models/ars/Goods.php
create mode 100644 vendor/antgoods/goods/src/models/ars/GoodsAttr.php
create mode 100644 vendor/antgoods/goods/src/models/ars/GoodsSku.php
create mode 100644 vendor/antgoods/goods/src/models/ars/ShopCategory.php
create mode 100644 vendor/antgoods/goods/src/models/ars/Supplier.php
create mode 100644 vendor/antgoods/goods/src/models/searchs/GoodsSearch.php
create mode 100644 vendor/antgoods/goods/src/views/goods/_form.php
create mode 100644 vendor/antgoods/goods/src/views/goods/_search.php
create mode 100644 vendor/antgoods/goods/src/views/goods/create.php
create mode 100644 vendor/antgoods/goods/src/views/goods/index.php
create mode 100644 vendor/antgoods/goods/src/views/goods/update.php
create mode 100644 vendor/antgoods/goods/src/views/goods/view.php
diff --git a/backend/config/main.php b/backend/config/main.php
index 272465d..ec8c2c0 100644
--- a/backend/config/main.php
+++ b/backend/config/main.php
@@ -9,7 +9,11 @@ return [
'basePath' => dirname(__DIR__),
'controllerNamespace' => 'backend\controllers',
'bootstrap' => ['log'],
- 'modules' => [],
+ 'modules' => [
+ 'antgoods' => [
+ 'class' => 'antgoods\goods\Module',
+ ],
+ ],
'components' => [
'request' => [
'csrfParam' => '_csrf-backend',
diff --git a/common/models/ars/Address.php b/common/models/ars/Address.php
new file mode 100644
index 0000000..aec13fb
--- /dev/null
+++ b/common/models/ars/Address.php
@@ -0,0 +1,88 @@
+ 20],
+ [['province', 'city', 'area'], 'string', 'max' => 10],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'user_id' => '用户id',
+ 'consignee' => '收件人',
+ 'phone' => '电话',
+ 'province' => '省份',
+ 'city' => '城市',
+ 'area' => '区域',
+ 'address' => '详细地址',
+ 'status' => '状态,0-默认值 1-默认地址',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/AfterSale.php b/common/models/ars/AfterSale.php
new file mode 100644
index 0000000..4cf35b1
--- /dev/null
+++ b/common/models/ars/AfterSale.php
@@ -0,0 +1,80 @@
+ 64],
+ [['take_shipping_sn', 'send_shipping_sn'], 'string', 'max' => 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'operator_id' => '操作者',
+ 'user_id' => '用户id',
+ 'wx_refund_id' => '微信退款单号',
+ 'after_sale_sn' => '售后单号',
+ 'order_goods_id' => '订单商品id',
+ 'count' => '退换货的商品数量',
+ 'amount' => '退货时实际退的金额',
+ 'type' => '类型',
+ 'reason' => '退换货理由',
+ 'description' => '描述',
+ 'take_shipping_sn' => '用户发货物流单号',
+ 'send_shipping_sn' => '换货商家发货的物流单号',
+ 'remarks' => '店家备注',
+ 'applyed_at' => '申请时间',
+ 'dealed_at' => '处理时间',
+ 'finished_at' => '完成时间',
+ ];
+ }
+
+
+}
diff --git a/common/models/ars/Area.php b/common/models/ars/Area.php
new file mode 100644
index 0000000..254681b
--- /dev/null
+++ b/common/models/ars/Area.php
@@ -0,0 +1,51 @@
+ 32],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => 'name',
+ 'area_id' => 'area_id',
+ 'city_id' => 'city_id',
+ ];
+ }
+
+
+}
diff --git a/common/models/ars/Cart.php b/common/models/ars/Cart.php
new file mode 100644
index 0000000..ef6477f
--- /dev/null
+++ b/common/models/ars/Cart.php
@@ -0,0 +1,84 @@
+ 120],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'user_id' => '用户id',
+ 'goods_id' => '商品id',
+ 'goods_name' => '商品名称',
+ 'goods_img' => '商品图片',
+ 'goods_price' => '商品售价',
+ 'sku_id' => '商品sku的id',
+ 'goods_count' => '商品数量',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/City.php b/common/models/ars/City.php
new file mode 100644
index 0000000..ae87412
--- /dev/null
+++ b/common/models/ars/City.php
@@ -0,0 +1,51 @@
+ 32],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'city_id' => 'city_id',
+ 'name' => 'name',
+ 'province_id' => 'province_id',
+ ];
+ }
+
+
+}
diff --git a/common/models/ars/Collection.php b/common/models/ars/Collection.php
new file mode 100644
index 0000000..2a1a771
--- /dev/null
+++ b/common/models/ars/Collection.php
@@ -0,0 +1,73 @@
+ 'id',
+ 'user_id' => '用户id',
+ 'goods_id' => '商品id',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/Comment.php b/common/models/ars/Comment.php
new file mode 100644
index 0000000..2701ecf
--- /dev/null
+++ b/common/models/ars/Comment.php
@@ -0,0 +1,80 @@
+ 'id',
+ 'user_id' => '用户id',
+ 'order_goods_id' => '订单详情商品id',
+ 'star' => '星级',
+ 'content' => '评论内容',
+ 'status' => '状态:1为显示,0为不显示',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/Delivery.php b/common/models/ars/Delivery.php
new file mode 100644
index 0000000..85d1d0e
--- /dev/null
+++ b/common/models/ars/Delivery.php
@@ -0,0 +1,86 @@
+ 50],
+ [['shipping_id'], 'string', 'max' => 10],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'order_id' => '订单id',
+ 'shipping_name' => '货流名称',
+ 'shipping_id' => '运货单位',
+ 'type' => '类型',
+ 'goods' => '商品',
+ 'status' => '状态',
+ 'decription' => '描述',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/ExpressTemplate.php b/common/models/ars/ExpressTemplate.php
new file mode 100644
index 0000000..e3e6b81
--- /dev/null
+++ b/common/models/ars/ExpressTemplate.php
@@ -0,0 +1,95 @@
+ 255],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '名称',
+ 'province' => '省份',
+ 'city' => '城市',
+ 'area' => '区域',
+ 'billing_type' => '账单类型',
+ 'extra_weight_type' => '续重重量类型',
+ 'exemption_type' => '包邮类型',
+ 'basic_price' => '基本运费',
+ 'extra_price' => '续重运费',
+ 'exemption_amount' => '包邮金额',
+ 'support_taking' => '是否支持自提,1为不支持',
+ 'taking_site' => '自提地点',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/File.php b/common/models/ars/File.php
new file mode 100644
index 0000000..fc1be27
--- /dev/null
+++ b/common/models/ars/File.php
@@ -0,0 +1,86 @@
+ 255],
+ [['alias'], 'string', 'max' => 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'pid' => '父级id',
+ 'name' => '名称',
+ 'type' => '类型',
+ 'own_type' => '拥有者类型',
+ 'own_id' => '拥有者id',
+ 'alias' => '别名',
+ 'path' => '地址',
+ 'is_delete' => '是否删除,1为已删除',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/Order.php b/common/models/ars/Order.php
new file mode 100644
index 0000000..6f03a52
--- /dev/null
+++ b/common/models/ars/Order.php
@@ -0,0 +1,121 @@
+ 64],
+ [['consignee', 'phone'], 'string', 'max' => 20],
+ [['province', 'city', 'area'], 'string', 'max' => 10],
+ [['payment_sn'], 'string', 'max' => 120],
+ [['remarks'], 'string', 'max' => 255],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'user_id' => '用户id',
+ 'order_sn' => '订单号',
+ 'invoice_id' => '发票单号',
+ 'status' => '状态',
+ 'type' => '类型',
+ 'goods_count' => '商品数量',
+ 'goods_amount' => '商品金额',
+ 'shipping_amount' => '物流金额',
+ 'shipping_type' => '物流类型',
+ 'consignee' => '收件人',
+ 'phone' => '手机号码',
+ 'province' => '省份',
+ 'city' => '城市',
+ 'area' => '区域',
+ 'taking_site' => '自提点',
+ 'pay_type' => '支付方式',
+ 'pay_at' => '支付时间',
+ 'payment_sn' => '付款单号',
+ 'payment_amount' => '支付金额',
+ 'receivables' => '应收款',
+ 'remarks' => '备注',
+ 'discount_amount' => '折扣金额',
+ 'discount_decription' => '折扣说明',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/OrderGoods.php b/common/models/ars/OrderGoods.php
new file mode 100644
index 0000000..fa4d65d
--- /dev/null
+++ b/common/models/ars/OrderGoods.php
@@ -0,0 +1,86 @@
+ 120],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'order_id' => '订单id',
+ 'goods_id' => '商品id',
+ 'goods_img' => '商品图片',
+ 'goods_name' => '商品名称',
+ 'goods_count' => '商品数量',
+ 'sku_value' => '商品sku',
+ 'price' => '销售价',
+ 'market_price' => '市场价',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/PaymentLog.php b/common/models/ars/PaymentLog.php
new file mode 100644
index 0000000..9055f33
--- /dev/null
+++ b/common/models/ars/PaymentLog.php
@@ -0,0 +1,85 @@
+ 64],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'order_id' => '订单id',
+ 'wx_refund_id' => '微信退款单号',
+ 'mch_id' => '商户号',
+ 'order_amount' => '订单金额',
+ 'payment_amount' => '支付金额',
+ 'type' => '类型',
+ 'status' => '状态',
+ 'refund_account' => '退款账户',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/Province.php b/common/models/ars/Province.php
new file mode 100644
index 0000000..b03ffe6
--- /dev/null
+++ b/common/models/ars/Province.php
@@ -0,0 +1,49 @@
+ 16],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => 'name',
+ 'province_id' => 'province_id',
+ ];
+ }
+
+
+}
diff --git a/common/models/ars/RefundLog.php b/common/models/ars/RefundLog.php
new file mode 100644
index 0000000..33ed965
--- /dev/null
+++ b/common/models/ars/RefundLog.php
@@ -0,0 +1,71 @@
+ 64],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'order_id' => '订单id',
+ 'wx_refund_id' => '微信退款单号',
+ 'reason' => '理由',
+ 'order_amount' => '订单金额',
+ 'refund_amount' => '退款金额',
+ 'refunded_amount' => '已退款金额',
+ 'type' => '类型',
+ 'status' => '状态',
+ 'refund_account' => '退款账户',
+ 'operator_id' => '操作者',
+ 'applyed_at' => '申请时间',
+ 'confirmed_at' => '确认时间',
+ 'finished_at' => '完成时间',
+ ];
+ }
+
+
+}
diff --git a/common/models/ars/SearchHistory.php b/common/models/ars/SearchHistory.php
new file mode 100644
index 0000000..17fc86c
--- /dev/null
+++ b/common/models/ars/SearchHistory.php
@@ -0,0 +1,80 @@
+ 255],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'user_id' => '用户id',
+ 'keyword' => '关键字',
+ 'count' => '次数',
+ 'status' => '状态',
+ 'type' => '类型',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/TakingSite.php b/common/models/ars/TakingSite.php
new file mode 100644
index 0000000..cbd36bd
--- /dev/null
+++ b/common/models/ars/TakingSite.php
@@ -0,0 +1,84 @@
+ 120],
+ [['province', 'city', 'area'], 'string', 'max' => 10],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '名称',
+ 'province' => '省份',
+ 'city' => '城市',
+ 'area' => '区域',
+ 'address' => '地址',
+ 'is_default' => '是否为默认,1为默认',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/common/models/ars/TemFile.php b/common/models/ars/TemFile.php
new file mode 100644
index 0000000..52c228d
--- /dev/null
+++ b/common/models/ars/TemFile.php
@@ -0,0 +1,80 @@
+ 255],
+ [['alias'], 'string', 'max' => 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'user_id' => '父级id',
+ 'name' => '名称',
+ 'type' => '类型',
+ 'alias' => '别名',
+ 'path' => '地址',
+ 'updated_at' => '更新时间',
+ 'created_at' => '创建时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/controllers/GoodsController.php b/vendor/antgoods/goods/src/controllers/GoodsController.php
new file mode 100644
index 0000000..7180f54
--- /dev/null
+++ b/vendor/antgoods/goods/src/controllers/GoodsController.php
@@ -0,0 +1,149 @@
+ [
+ 'class' => VerbFilter::className(),
+ 'actions' => [
+ 'delete' => ['POST'],
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * Lists all Goods models.
+ * @return mixed
+ */
+ public function actionIndex()
+ {
+ $searchModel = new GoodsSearch();
+ $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
+
+ return $this->render('index', [
+ 'searchModel' => $searchModel,
+ 'dataProvider' => $dataProvider,
+ 'columns' => $searchModel->columns()
+ ]);
+ }
+
+ /**
+ * Displays a single Goods model.
+ * @param integer $id
+ * @return mixed
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ public function actionView($id)
+ {
+ return $this->render('view', [
+ 'model' => $this->findModel($id),
+ ]);
+ }
+
+ /**
+ * Creates a new Goods model.
+ * If creation is successful, the browser will be redirected to the 'view' page.
+ * @return mixed
+ */
+ public function actionCreate()
+ {
+ $model = new Goods();
+
+ if ($model->load(Yii::$app->request->post()) && $model->save()) {
+ return $this->redirect('index');
+ }
+
+ return $this->render('create', [
+ 'model' => $model,
+ ]);
+ }
+
+ /**
+ * Updates an existing Goods model.
+ * If update is successful, the browser will be redirected to the 'view' page.
+ * @param integer $id
+ * @return mixed
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ public function actionUpdate($id)
+ {
+ $model = $this->findModel($id);
+
+ if ($model->load(Yii::$app->request->post()) && $model->save()) {
+ return $this->redirect('index');
+ }
+
+ return $this->render('update', [
+ 'model' => $model,
+ ]);
+ }
+
+ /**
+ * Deletes an existing Goods model.
+ * If deletion is successful, the browser will be redirected to the 'index' page.
+ * @param integer $id
+ * @return mixed
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ public function actionDelete($id)
+ {
+ $this->findModel($id)->delete();
+
+ return $this->redirect(['index']);
+ }
+
+ /**
+ * Finds the Goods model based on its primary key value.
+ * If the model is not found, a 404 HTTP exception will be thrown.
+ * @param integer $id
+ * @return Goods the loaded model
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ protected function findModel($id)
+ {
+ if (($model = Goods::findOne($id)) !== null) {
+ return $model;
+ }
+
+ throw new NotFoundHttpException('The requested page does not exist.');
+ }
+ /**
+ * @author iron
+ * 文件导出
+ */
+ public function actionExport()
+ {
+ $searchModel = new GoodsSearch();
+ $params = Yii::$app->request->queryParams;
+ if ($params['page-type'] == 'all') {
+ $dataProvider = $searchModel->allData($params);
+ } else {
+ $dataProvider = $searchModel->search($params);
+ }
+ \iron\widget\Excel::export([
+ 'models' => $dataProvider->getModels(),
+ 'format' => 'Xlsx',
+ 'asAttachment' => true,
+ 'fileName' =>'Goods'. "-" .date('Y-m-d H/i/s', time()),
+ 'columns' => $searchModel->columns()
+ ]);
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/Attribute.php b/vendor/antgoods/goods/src/models/ars/Attribute.php
new file mode 100644
index 0000000..c68e652
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/Attribute.php
@@ -0,0 +1,81 @@
+ 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '属性名',
+ 'value' => '属性值',
+ 'type' => '类型',
+ 'sort_order' => '排序',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/Brand.php b/vendor/antgoods/goods/src/models/ars/Brand.php
new file mode 100644
index 0000000..a225e59
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/Brand.php
@@ -0,0 +1,74 @@
+ 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '品牌名',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/Category.php b/vendor/antgoods/goods/src/models/ars/Category.php
new file mode 100644
index 0000000..9fe01df
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/Category.php
@@ -0,0 +1,87 @@
+ 60],
+ [['icon'], 'string', 'max' => 64],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '类别名称',
+ 'pid' => '父级id',
+ 'goods_count' => '商品数量',
+ 'sort_order' => '排序',
+ 'icon_type' => '图标类型',
+ 'icon' => '图标',
+ 'is_show' => '是否显示,1为不显示',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/FilterAttr.php b/vendor/antgoods/goods/src/models/ars/FilterAttr.php
new file mode 100644
index 0000000..2036d55
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/FilterAttr.php
@@ -0,0 +1,78 @@
+ 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'goods_id' => '商品id',
+ 'attr_id' => '属性id',
+ 'attr_value' => '属性值',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/Goods.php b/vendor/antgoods/goods/src/models/ars/Goods.php
new file mode 100644
index 0000000..841efc8
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/Goods.php
@@ -0,0 +1,135 @@
+ 120],
+ [['sn'], 'string', 'max' => 60],
+ [['code'], 'string', 'max' => 50],
+ [['unit'], 'string', 'max' => 16],
+ [['brief'], 'string', 'max' => 255],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'pid' => '父级id',
+ 'cat_id' => '后台商品类别id',
+ 'brand_id' => '品牌id',
+ 'shop_cat_id' => '前端商品类别id',
+ 'name' => '商品名称',
+ 'sn' => '商品唯一货号',
+ 'code' => '商品货码',
+ 'supplier_id' => '供应商id',
+ 'weight' => '重量',
+ 'length' => '长度',
+ 'width' => '宽度',
+ 'height' => '高度',
+ 'diameter' => '直径',
+ 'unit' => '单位',
+ 'sold_count' => '已售数量',
+ 'limit_count' => '限购数量',
+ 'stock' => '库存',
+ 'stock_warn' => '库存警告',
+ 'market_price' => '市场价',
+ 'price' => '销售价',
+ 'brief' => '简介',
+ 'description' => '详细介绍',
+ 'image' => '图片id',
+ 'model_id' => '模型id',
+ 'is_sale' => '该商品是否开放销售,1为是,0为否',
+ 'sort_order' => '排序',
+ 'bouns_points' => '奖励积分',
+ 'experience_points' => '经验值',
+ 'is_delete' => '是否删除,1为已删除',
+ 'express_template' => '配送详情id',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/GoodsAttr.php b/vendor/antgoods/goods/src/models/ars/GoodsAttr.php
new file mode 100644
index 0000000..b888e46
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/GoodsAttr.php
@@ -0,0 +1,78 @@
+ 50],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'goods_id' => '商品id',
+ 'attr_id' => '属性id',
+ 'attr_value' => '属性名',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/GoodsSku.php b/vendor/antgoods/goods/src/models/ars/GoodsSku.php
new file mode 100644
index 0000000..7e4644a
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/GoodsSku.php
@@ -0,0 +1,105 @@
+ 50],
+ [['goods_sn', 'goods_attr'], 'string', 'max' => 60],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'goods_id' => '商品id',
+ 'goods_code' => '商品条码',
+ 'goods_sn' => '商品唯一货号',
+ 'goods_attr' => '属性匹配',
+ 'weight' => '重量',
+ 'length' => '长度',
+ 'width' => '宽度',
+ 'height' => '高度',
+ 'diameter' => '直径',
+ 'sold_count' => '已售数量',
+ 'stock' => '库存',
+ 'market_price' => '市场价',
+ 'price' => '销售价',
+ 'model_id' => '模型id',
+ 'is_sale' => '该商品是否开放销售,1为是,0为否',
+ 'sort_order' => '排序',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/ShopCategory.php b/vendor/antgoods/goods/src/models/ars/ShopCategory.php
new file mode 100644
index 0000000..2ffb20c
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/ShopCategory.php
@@ -0,0 +1,96 @@
+ 60],
+ [['keywords'], 'string', 'max' => 100],
+ [['desc'], 'string', 'max' => 255],
+ [['icon'], 'string', 'max' => 64],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '类别名称',
+ 'pid' => '父级id',
+ 'goods_count' => '商品数量',
+ 'keywords' => '关键字',
+ 'desc' => '描述',
+ 'sort_order' => '排序',
+ 'icon_type' => '图标类型',
+ 'icon' => '图标',
+ 'filter_attr' => '筛选属性',
+ 'is_show' => '是否显示,1为不显示',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/ars/Supplier.php b/vendor/antgoods/goods/src/models/ars/Supplier.php
new file mode 100644
index 0000000..73d51f6
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/ars/Supplier.php
@@ -0,0 +1,81 @@
+ 50],
+ [['phone'], 'string', 'max' => 20],
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'id',
+ 'name' => '供应商名称',
+ 'full_name' => '供应商全称',
+ 'phone' => '手机号码',
+ 'address' => '地址',
+ 'is_delete' => '是否删除,1为已删除',
+ 'created_at' => '创建时间',
+ 'updated_at' => '更新时间',
+ ];
+ }
+
+
+ /**
+ * @author linyao
+ * @email 602604991@qq.com
+ * @created Nov 8, 2019
+ *
+ * 行为存储创建时间和更新时间
+ */
+ public function behaviors()
+ {
+ return [
+ [
+ 'class' => TimestampBehavior::className(),
+ 'createdAtAttribute' => 'created_at',
+ 'updatedAtAttribute' => 'updated_at',
+ 'value' => function() {
+ return time();
+ },
+ ],
+ ];
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php b/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php
new file mode 100644
index 0000000..738cbf2
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/searchs/GoodsSearch.php
@@ -0,0 +1,197 @@
+ 'blobt\grid\CheckboxColumn',
+ 'width' => '2%',
+ 'align' => 'center'
+ ],
+ 'id',
+ 'pid',
+ 'cat_id',
+ 'brand_id',
+ 'shop_cat_id',
+ //'name',
+ //'sn',
+ //'code',
+ //'supplier_id',
+ //'weight',
+ //'length',
+ //'width',
+ //'height',
+ //'diameter',
+ //'unit',
+ //'sold_count',
+ //'limit_count',
+ //'stock',
+ //'stock_warn',
+ //'market_price',
+ //'price',
+ //'brief',
+ //'description',
+ //'image',
+ //'model_id',
+ //'is_sale',
+ //'sort_order',
+ //'bouns_points',
+ //'experience_points',
+ //'is_delete',
+ //'express_template',
+ //'created_at',
+ //'updated_at',
+ [
+ 'class' => 'iron\grid\ActionColumn',
+ 'align' => 'center',
+ ],
+ ];
+ }
+ /**
+ * @param $params
+ * @return ActiveDataProvider
+ * 不分页的所有数据
+ */
+ public function allData($params)
+ {
+ $query = Goods::find();
+ $dataProvider = new ActiveDataProvider([
+ 'query' => $query,
+ 'pagination' => false,
+ 'sort' => false
+ ]);
+ $this->load($params);
+ return $this->filter($query, $dataProvider);
+ }
+
+ /**
+ * Creates data provider instance with search query applied
+ *
+ * @param array $params
+ *
+ * @return ActiveDataProvider
+ */
+ public function search($params)
+ {
+ $query = Goods::find();
+
+ // add conditions that should always apply here
+
+ $dataProvider = new ActiveDataProvider([
+ 'query' => $query,
+ 'pagination' => [
+ 'pageSizeLimit' => [1, 200]
+ ],
+ 'sort' => [
+ 'defaultOrder' => [
+ 'id' => SORT_DESC,
+ ]
+ ],
+ ]);
+
+ $this->load($params);
+ return $this->filter($query, $dataProvider);
+ }
+ /**
+ * @param $query
+ * @param $dataProvider
+ * @return ActiveDataProvider
+ * 条件筛选
+ */
+ private function filter($query, $dataProvider){
+ if (!$this->validate()) {
+ // uncomment the following line if you do not want to return any records when validation fails
+ // $query->where('0=1');
+ return $dataProvider;
+ }
+
+ // grid filtering conditions
+ $query->andFilterWhere([
+ 'id' => $this->id,
+ 'pid' => $this->pid,
+ 'cat_id' => $this->cat_id,
+ 'brand_id' => $this->brand_id,
+ 'shop_cat_id' => $this->shop_cat_id,
+ 'supplier_id' => $this->supplier_id,
+ 'weight' => $this->weight,
+ 'length' => $this->length,
+ 'width' => $this->width,
+ 'height' => $this->height,
+ 'diameter' => $this->diameter,
+ 'sold_count' => $this->sold_count,
+ 'limit_count' => $this->limit_count,
+ 'stock' => $this->stock,
+ 'stock_warn' => $this->stock_warn,
+ 'market_price' => $this->market_price,
+ 'price' => $this->price,
+ 'image' => $this->image,
+ 'model_id' => $this->model_id,
+ 'is_sale' => $this->is_sale,
+ 'sort_order' => $this->sort_order,
+ 'bouns_points' => $this->bouns_points,
+ 'experience_points' => $this->experience_points,
+ 'is_delete' => $this->is_delete,
+ 'express_template' => $this->express_template,
+ 'created_at' => $this->created_at,
+ 'updated_at' => $this->updated_at,
+ ]);
+
+ $query->andFilterWhere(['like', 'name', $this->name])
+ ->andFilterWhere(['like', 'sn', $this->sn])
+ ->andFilterWhere(['like', 'code', $this->code])
+ ->andFilterWhere(['like', 'unit', $this->unit])
+ ->andFilterWhere(['like', 'brief', $this->brief])
+ ->andFilterWhere(['like', 'description', $this->description]);
+ if ($this->created_at_range) {
+ $arr = explode(' ~ ', $this->created_at_range);
+ $start = strtotime($arr[0]);
+ $end = strtotime($arr[1]) + 3600 * 24;
+ $query->andFilterWhere(['between', 'created_at', $start, $end]);
+ }
+ return $dataProvider;
+ }
+}
diff --git a/vendor/antgoods/goods/src/views/goods/_form.php b/vendor/antgoods/goods/src/views/goods/_form.php
new file mode 100644
index 0000000..5956348
--- /dev/null
+++ b/vendor/antgoods/goods/src/views/goods/_form.php
@@ -0,0 +1,82 @@
+
+
+
diff --git a/vendor/antgoods/goods/src/views/goods/_search.php b/vendor/antgoods/goods/src/views/goods/_search.php
new file mode 100644
index 0000000..9a86777
--- /dev/null
+++ b/vendor/antgoods/goods/src/views/goods/_search.php
@@ -0,0 +1,49 @@
+
+
+ ['index'],
+ 'method' => 'get',
+ 'validateOnType' => true,
+ ]);
+?>
+
+
+ = $form->field($model, 'id', [
+ "template" => "{input}{error}",
+ "inputOptions" => [
+ "placeholder" => "检索ID",
+ "class" => "form-control",
+ ],
+ "errorOptions" => [
+ "class" => "error-tips"
+ ]
+ ])
+ ?>
+
+
+ = $form->field($model, "created_at_range", [
+ "template" => "{input}{error}",
+ "inputOptions" => [
+ "placeholder" => "创建时间",
+ ],
+ "errorOptions" => [
+ "class" => "error-tips"
+ ]
+ ])->widget(DateRangePicker::className());
+ ?>
+
+
+ = Html::submitButton('', ['class' => 'btn btn-default']) ?>
+ = Html::resetButton('', ['class' => 'btn btn-default']) ?>
+
+
+
\ No newline at end of file
diff --git a/vendor/antgoods/goods/src/views/goods/create.php b/vendor/antgoods/goods/src/views/goods/create.php
new file mode 100644
index 0000000..4f1d258
--- /dev/null
+++ b/vendor/antgoods/goods/src/views/goods/create.php
@@ -0,0 +1,18 @@
+title = '创建 Goods';
+$this->params['breadcrumbs'][] = ['label' => 'Goods', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/vendor/antgoods/goods/src/views/goods/index.php b/vendor/antgoods/goods/src/views/goods/index.php
new file mode 100644
index 0000000..82c38b2
--- /dev/null
+++ b/vendor/antgoods/goods/src/views/goods/index.php
@@ -0,0 +1,28 @@
+title = 'Goods';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filter' => $this->render("_search", ['model' => $searchModel]),
+ 'batch' => [
+ [
+ "label" => "删除",
+ "url" => "goods/deletes"
+ ],
+ ],
+ 'columns' => $columns
+ ]);
+ ?>
+
+
\ No newline at end of file
diff --git a/vendor/antgoods/goods/src/views/goods/update.php b/vendor/antgoods/goods/src/views/goods/update.php
new file mode 100644
index 0000000..9689d6d
--- /dev/null
+++ b/vendor/antgoods/goods/src/views/goods/update.php
@@ -0,0 +1,19 @@
+title = '编辑 Goods: ' . $model->name;
+$this->params['breadcrumbs'][] = ['label' => 'Goods', 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
+$this->params['breadcrumbs'][] = 'Update ';
+?>
+
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/vendor/antgoods/goods/src/views/goods/view.php b/vendor/antgoods/goods/src/views/goods/view.php
new file mode 100644
index 0000000..27f0963
--- /dev/null
+++ b/vendor/antgoods/goods/src/views/goods/view.php
@@ -0,0 +1,59 @@
+title = $model->name;
+$this->params['breadcrumbs'][] = ['label' => 'Goods', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+\yii\web\YiiAsset::register($this);
+?>
+
+
+
+ = Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?>
+
+
+ = DetailView::widget([
+ 'model' => $model,
+ 'attributes' => [
+ 'id',
+ 'pid',
+ 'cat_id',
+ 'brand_id',
+ 'shop_cat_id',
+ 'name',
+ 'sn',
+ 'code',
+ 'supplier_id',
+ 'weight',
+ 'length',
+ 'width',
+ 'height',
+ 'diameter',
+ 'unit',
+ 'sold_count',
+ 'limit_count',
+ 'stock',
+ 'stock_warn',
+ 'market_price',
+ 'price',
+ 'brief',
+ 'description:ntext',
+ 'image',
+ 'model_id',
+ 'is_sale',
+ 'sort_order',
+ 'bouns_points',
+ 'experience_points',
+ 'is_delete',
+ 'express_template',
+ 'created_at',
+ 'updated_at',
+ ],
+ ]) ?>
+
+
From 04d4f5c79c5a1e3fe840bf6bcbf17c09a2b9f819 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 19:22:38 +0800
Subject: [PATCH 34/95] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=9B=A0=E4=B8=BA?=
=?UTF-8?q?=E5=B0=91=E4=BA=86/=EF=BC=8C=E5=AF=BC=E8=87=B4menu=E8=8F=9C?=
=?UTF-8?q?=E5=8D=95=E8=B7=AF=E7=94=B1=E6=B7=B7=E4=B9=B1=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
backend/views/layouts/sidebar.php | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/backend/views/layouts/sidebar.php b/backend/views/layouts/sidebar.php
index 0277d3d..720c666 100755
--- a/backend/views/layouts/sidebar.php
+++ b/backend/views/layouts/sidebar.php
@@ -21,11 +21,12 @@ use iron\widgets\Menu;
]
],
['label' => '商品管理', 'url' => '#', 'icon' => 'far fa-archive', 'items' => [
- ['label' => '商品列表', 'url' => ['antgoods/goods/index']],
+ ['label' => '商品列表', 'url' => ['/antgoods/goods/index']],
+ ['label' => '商品分类', 'url' => ['/antgoods/category/index']],
]
],
['label' => '订单管理', 'url' => '#', 'icon' => 'far fa-list-alt', 'items' => [
- ['label' => '订单列表', 'url' => ['order/index', 'tag' => 'new']],
+ ['label' => '订单列表', 'url' => ['/order/index', 'tag' => 'new']],
]
],
From 14e4996136edbe3a4c9d9db7dddef37dfeef971c Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 19:25:29 +0800
Subject: [PATCH 35/95] =?UTF-8?q?antgoods=E5=A2=9E=E5=8A=A0=E5=95=86?=
=?UTF-8?q?=E5=93=81=E5=88=86=E7=B1=BB=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/controllers/CategoryController.php | 149 +++++++++++++++++
.../src/models/searchs/CategorySearch.php | 153 ++++++++++++++++++
.../goods/src/views/category/_form.php | 38 +++++
.../goods/src/views/category/_search.php | 49 ++++++
.../goods/src/views/category/create.php | 18 +++
.../goods/src/views/category/index.php | 28 ++++
.../goods/src/views/category/update.php | 19 +++
.../goods/src/views/category/view.php | 37 +++++
8 files changed, 491 insertions(+)
create mode 100644 vendor/antgoods/goods/src/controllers/CategoryController.php
create mode 100644 vendor/antgoods/goods/src/models/searchs/CategorySearch.php
create mode 100644 vendor/antgoods/goods/src/views/category/_form.php
create mode 100644 vendor/antgoods/goods/src/views/category/_search.php
create mode 100644 vendor/antgoods/goods/src/views/category/create.php
create mode 100644 vendor/antgoods/goods/src/views/category/index.php
create mode 100644 vendor/antgoods/goods/src/views/category/update.php
create mode 100644 vendor/antgoods/goods/src/views/category/view.php
diff --git a/vendor/antgoods/goods/src/controllers/CategoryController.php b/vendor/antgoods/goods/src/controllers/CategoryController.php
new file mode 100644
index 0000000..64017dc
--- /dev/null
+++ b/vendor/antgoods/goods/src/controllers/CategoryController.php
@@ -0,0 +1,149 @@
+ [
+ 'class' => VerbFilter::className(),
+ 'actions' => [
+ 'delete' => ['POST'],
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * Lists all Category models.
+ * @return mixed
+ */
+ public function actionIndex()
+ {
+ $searchModel = new CategorySearch();
+ $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
+
+ return $this->render('index', [
+ 'searchModel' => $searchModel,
+ 'dataProvider' => $dataProvider,
+ 'columns' => $searchModel->columns()
+ ]);
+ }
+
+ /**
+ * Displays a single Category model.
+ * @param integer $id
+ * @return mixed
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ public function actionView($id)
+ {
+ return $this->render('view', [
+ 'model' => $this->findModel($id),
+ ]);
+ }
+
+ /**
+ * Creates a new Category model.
+ * If creation is successful, the browser will be redirected to the 'view' page.
+ * @return mixed
+ */
+ public function actionCreate()
+ {
+ $model = new Category();
+
+ if ($model->load(Yii::$app->request->post()) && $model->save()) {
+ return $this->redirect('index');
+ }
+
+ return $this->render('create', [
+ 'model' => $model,
+ ]);
+ }
+
+ /**
+ * Updates an existing Category model.
+ * If update is successful, the browser will be redirected to the 'view' page.
+ * @param integer $id
+ * @return mixed
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ public function actionUpdate($id)
+ {
+ $model = $this->findModel($id);
+
+ if ($model->load(Yii::$app->request->post()) && $model->save()) {
+ return $this->redirect('index');
+ }
+
+ return $this->render('update', [
+ 'model' => $model,
+ ]);
+ }
+
+ /**
+ * Deletes an existing Category model.
+ * If deletion is successful, the browser will be redirected to the 'index' page.
+ * @param integer $id
+ * @return mixed
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ public function actionDelete($id)
+ {
+ $this->findModel($id)->delete();
+
+ return $this->redirect(['index']);
+ }
+
+ /**
+ * Finds the Category model based on its primary key value.
+ * If the model is not found, a 404 HTTP exception will be thrown.
+ * @param integer $id
+ * @return Category the loaded model
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ protected function findModel($id)
+ {
+ if (($model = Category::findOne($id)) !== null) {
+ return $model;
+ }
+
+ throw new NotFoundHttpException('The requested page does not exist.');
+ }
+ /**
+ * @author iron
+ * 文件导出
+ */
+ public function actionExport()
+ {
+ $searchModel = new CategorySearch();
+ $params = Yii::$app->request->queryParams;
+ if ($params['page-type'] == 'all') {
+ $dataProvider = $searchModel->allData($params);
+ } else {
+ $dataProvider = $searchModel->search($params);
+ }
+ \iron\widget\Excel::export([
+ 'models' => $dataProvider->getModels(),
+ 'format' => 'Xlsx',
+ 'asAttachment' => true,
+ 'fileName' =>'Categories'. "-" .date('Y-m-d H/i/s', time()),
+ 'columns' => $searchModel->columns()
+ ]);
+ }
+}
diff --git a/vendor/antgoods/goods/src/models/searchs/CategorySearch.php b/vendor/antgoods/goods/src/models/searchs/CategorySearch.php
new file mode 100644
index 0000000..63ad3f0
--- /dev/null
+++ b/vendor/antgoods/goods/src/models/searchs/CategorySearch.php
@@ -0,0 +1,153 @@
+ 'blobt\grid\CheckboxColumn',
+ 'width' => '2%',
+ 'align' => 'center'
+ ],
+ 'id',
+ 'name',
+ 'pid',
+ 'goods_count',
+ 'sort_order',
+ //'icon_type',
+ //'icon',
+ //'is_show',
+ //'is_delete',
+ //'created_at',
+ //'updated_at',
+ [
+ 'class' => 'iron\grid\ActionColumn',
+ 'align' => 'center',
+ ],
+ ];
+ }
+ /**
+ * @param $params
+ * @return ActiveDataProvider
+ * 不分页的所有数据
+ */
+ public function allData($params)
+ {
+ $query = Category::find();
+ $dataProvider = new ActiveDataProvider([
+ 'query' => $query,
+ 'pagination' => false,
+ 'sort' => false
+ ]);
+ $this->load($params);
+ return $this->filter($query, $dataProvider);
+ }
+
+ /**
+ * Creates data provider instance with search query applied
+ *
+ * @param array $params
+ *
+ * @return ActiveDataProvider
+ */
+ public function search($params)
+ {
+ $query = Category::find();
+
+ // add conditions that should always apply here
+
+ $dataProvider = new ActiveDataProvider([
+ 'query' => $query,
+ 'pagination' => [
+ 'pageSizeLimit' => [1, 200]
+ ],
+ 'sort' => [
+ 'defaultOrder' => [
+ 'id' => SORT_DESC,
+ ]
+ ],
+ ]);
+
+ $this->load($params);
+ return $this->filter($query, $dataProvider);
+ }
+ /**
+ * @param $query
+ * @param $dataProvider
+ * @return ActiveDataProvider
+ * 条件筛选
+ */
+ private function filter($query, $dataProvider){
+ if (!$this->validate()) {
+ // uncomment the following line if you do not want to return any records when validation fails
+ // $query->where('0=1');
+ return $dataProvider;
+ }
+
+ // grid filtering conditions
+ $query->andFilterWhere([
+ 'id' => $this->id,
+ 'pid' => $this->pid,
+ 'goods_count' => $this->goods_count,
+ 'sort_order' => $this->sort_order,
+ 'icon_type' => $this->icon_type,
+ 'is_show' => $this->is_show,
+ 'is_delete' => $this->is_delete,
+ 'created_at' => $this->created_at,
+ 'updated_at' => $this->updated_at,
+ ]);
+
+ $query->andFilterWhere(['like', 'name', $this->name])
+ ->andFilterWhere(['like', 'icon', $this->icon]);
+ if ($this->created_at_range) {
+ $arr = explode(' ~ ', $this->created_at_range);
+ $start = strtotime($arr[0]);
+ $end = strtotime($arr[1]) + 3600 * 24;
+ $query->andFilterWhere(['between', 'created_at', $start, $end]);
+ }
+ return $dataProvider;
+ }
+}
diff --git a/vendor/antgoods/goods/src/views/category/_form.php b/vendor/antgoods/goods/src/views/category/_form.php
new file mode 100644
index 0000000..c2fe65f
--- /dev/null
+++ b/vendor/antgoods/goods/src/views/category/_form.php
@@ -0,0 +1,38 @@
+
+
+
diff --git a/vendor/antgoods/goods/src/views/category/_search.php b/vendor/antgoods/goods/src/views/category/_search.php
new file mode 100644
index 0000000..d43cb1d
--- /dev/null
+++ b/vendor/antgoods/goods/src/views/category/_search.php
@@ -0,0 +1,49 @@
+
+
+ ['index'],
+ 'method' => 'get',
+ 'validateOnType' => true,
+ ]);
+?>
+
+
+ = $form->field($model, 'id', [
+ "template" => "{input}{error}",
+ "inputOptions" => [
+ "placeholder" => "检索ID",
+ "class" => "form-control",
+ ],
+ "errorOptions" => [
+ "class" => "error-tips"
+ ]
+ ])
+ ?>
+
+
+ = $form->field($model, "created_at_range", [
+ "template" => "{input}{error}",
+ "inputOptions" => [
+ "placeholder" => "创建时间",
+ ],
+ "errorOptions" => [
+ "class" => "error-tips"
+ ]
+ ])->widget(DateRangePicker::className());
+ ?>
+
+
+ = Html::submitButton('', ['class' => 'btn btn-default']) ?>
+ = Html::resetButton('', ['class' => 'btn btn-default']) ?>
+
+
+
\ No newline at end of file
diff --git a/vendor/antgoods/goods/src/views/category/create.php b/vendor/antgoods/goods/src/views/category/create.php
new file mode 100644
index 0000000..1ecb4fa
--- /dev/null
+++ b/vendor/antgoods/goods/src/views/category/create.php
@@ -0,0 +1,18 @@
+title = '创建 Category';
+$this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/vendor/antgoods/goods/src/views/category/index.php b/vendor/antgoods/goods/src/views/category/index.php
new file mode 100644
index 0000000..b63d020
--- /dev/null
+++ b/vendor/antgoods/goods/src/views/category/index.php
@@ -0,0 +1,28 @@
+title = '商品分类';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filter' => $this->render("_search", ['model' => $searchModel]),
+ 'batch' => [
+ [
+ "label" => "删除",
+ "url" => "category/deletes"
+ ],
+ ],
+ 'columns' => $columns
+ ]);
+ ?>
+
+
\ No newline at end of file
diff --git a/vendor/antgoods/goods/src/views/category/update.php b/vendor/antgoods/goods/src/views/category/update.php
new file mode 100644
index 0000000..a4a8106
--- /dev/null
+++ b/vendor/antgoods/goods/src/views/category/update.php
@@ -0,0 +1,19 @@
+title = '编辑 Category: ' . $model->name;
+$this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
+$this->params['breadcrumbs'][] = 'Update ';
+?>
+
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/vendor/antgoods/goods/src/views/category/view.php b/vendor/antgoods/goods/src/views/category/view.php
new file mode 100644
index 0000000..2a087d5
--- /dev/null
+++ b/vendor/antgoods/goods/src/views/category/view.php
@@ -0,0 +1,37 @@
+title = $model->name;
+$this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+\yii\web\YiiAsset::register($this);
+?>
+
+
+
+ = Html::a('返回列表', ['index'], ['class' => 'btn btn-success']) ?>
+
+
+ = DetailView::widget([
+ 'model' => $model,
+ 'attributes' => [
+ 'id',
+ 'name',
+ 'pid',
+ 'goods_count',
+ 'sort_order',
+ 'icon_type',
+ 'icon',
+ 'is_show',
+ 'is_delete',
+ 'created_at',
+ 'updated_at',
+ ],
+ ]) ?>
+
+
From 3c4252c7591f28695b0c8f4b0188e6168dc839a9 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 19:30:25 +0800
Subject: [PATCH 36/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=95=86=E5=93=81?=
=?UTF-8?q?=E5=88=86=E7=B1=BB=E6=A0=B7=E5=BC=8F=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vendor/antgoods/goods/src/views/category/_form.php | 2 --
vendor/antgoods/goods/src/views/category/create.php | 4 ++--
vendor/antgoods/goods/src/views/category/update.php | 6 +++---
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/vendor/antgoods/goods/src/views/category/_form.php b/vendor/antgoods/goods/src/views/category/_form.php
index c2fe65f..d154648 100644
--- a/vendor/antgoods/goods/src/views/category/_form.php
+++ b/vendor/antgoods/goods/src/views/category/_form.php
@@ -14,8 +14,6 @@ use yii\widgets\ActiveForm;
= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
- = $form->field($model, 'pid')->textInput() ?>
-
= $form->field($model, 'goods_count')->textInput() ?>
= $form->field($model, 'sort_order')->textInput() ?>
diff --git a/vendor/antgoods/goods/src/views/category/create.php b/vendor/antgoods/goods/src/views/category/create.php
index 1ecb4fa..624761d 100644
--- a/vendor/antgoods/goods/src/views/category/create.php
+++ b/vendor/antgoods/goods/src/views/category/create.php
@@ -5,8 +5,8 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model antgoods\goods\models\ars\Category */
-$this->title = '创建 Category';
-$this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']];
+$this->title = '创建商品分类';
+$this->params['breadcrumbs'][] = ['label' => '商品分类', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
diff --git a/vendor/antgoods/goods/src/views/category/update.php b/vendor/antgoods/goods/src/views/category/update.php
index a4a8106..4d8f354 100644
--- a/vendor/antgoods/goods/src/views/category/update.php
+++ b/vendor/antgoods/goods/src/views/category/update.php
@@ -5,10 +5,10 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model antgoods\goods\models\ars\Category */
-$this->title = '编辑 Category: ' . $model->name;
-$this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']];
+$this->title = '编辑商品分类: ' . $model->name;
+$this->params['breadcrumbs'][] = ['label' => '商品分类', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
-$this->params['breadcrumbs'][] = 'Update ';
+$this->params['breadcrumbs'][] = '编辑 ';
?>
From 731c110292c27f41403af61f76385fa1451e02b1 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Tue, 19 Nov 2019 19:58:36 +0800
Subject: [PATCH 37/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9antgoods=E5=95=86?=
=?UTF-8?q?=E5=93=81=E6=A8=A1=E5=9D=97=E7=9A=84=E5=AD=97=E6=AE=B5=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vendor/antgoods/goods/src/views/goods/create.php | 4 ++--
vendor/antgoods/goods/src/views/goods/index.php | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/vendor/antgoods/goods/src/views/goods/create.php b/vendor/antgoods/goods/src/views/goods/create.php
index 4f1d258..05be9b7 100644
--- a/vendor/antgoods/goods/src/views/goods/create.php
+++ b/vendor/antgoods/goods/src/views/goods/create.php
@@ -5,8 +5,8 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model antgoods\goods\models\ars\Goods */
-$this->title = '创建 Goods';
-$this->params['breadcrumbs'][] = ['label' => 'Goods', 'url' => ['index']];
+$this->title = '创建商品';
+$this->params['breadcrumbs'][] = ['label' => '商品列表', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
diff --git a/vendor/antgoods/goods/src/views/goods/index.php b/vendor/antgoods/goods/src/views/goods/index.php
index 82c38b2..40421e3 100644
--- a/vendor/antgoods/goods/src/views/goods/index.php
+++ b/vendor/antgoods/goods/src/views/goods/index.php
@@ -7,7 +7,7 @@ use iron\grid\GridView;
/* @var $searchModel common\models\searchs\GoodsSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
-$this->title = 'Goods';
+$this->title = '商品列表';
$this->params['breadcrumbs'][] = $this->title;
?>
From 1dd45f0c81ebe43d3e5e796654b15b11a76aed7b Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Wed, 20 Nov 2019 10:08:53 +0800
Subject: [PATCH 38/95] =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB?=
=?UTF-8?q?=E5=A4=84=E7=90=86=E8=A1=A8=E5=8D=95is=5Fshow=E5=AD=97=E6=AE=B5?=
=?UTF-8?q?=E5=8D=95=E9=80=89=E6=A1=86=EF=BC=8C=E5=A4=84=E7=90=86=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=E5=88=A0=E9=99=A4=E6=93=8D=E4=BD=9C=E4=BB=A5=E5=8F=8A?=
=?UTF-8?q?=E8=A7=84=E5=88=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../goods/src/controllers/CategoryController.php | 5 ++++-
vendor/antgoods/goods/src/models/ars/Category.php | 14 +++++++++++++-
.../goods/src/models/searchs/CategorySearch.php | 1 +
vendor/antgoods/goods/src/views/category/_form.php | 5 ++---
4 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/vendor/antgoods/goods/src/controllers/CategoryController.php b/vendor/antgoods/goods/src/controllers/CategoryController.php
index 64017dc..1d96800 100644
--- a/vendor/antgoods/goods/src/controllers/CategoryController.php
+++ b/vendor/antgoods/goods/src/controllers/CategoryController.php
@@ -105,7 +105,10 @@ class CategoryController extends Controller
*/
public function actionDelete($id)
{
- $this->findModel($id)->delete();
+ $model = $this->findModel($id);
+
+ $model->is_delete = Category::IS_DELETE_YES;
+ $model->save();
return $this->redirect(['index']);
}
diff --git a/vendor/antgoods/goods/src/models/ars/Category.php b/vendor/antgoods/goods/src/models/ars/Category.php
index 9fe01df..212def5 100644
--- a/vendor/antgoods/goods/src/models/ars/Category.php
+++ b/vendor/antgoods/goods/src/models/ars/Category.php
@@ -22,6 +22,18 @@ use yii\behaviors\TimestampBehavior;
*/
class Category extends \yii\db\ActiveRecord
{
+ //是否显示is_show
+ const IS_SHOW_DISPLAY = 0;//显示
+ const IS_SHOW_HIDE = 1;//隐藏
+ //是否删除is_delete
+ const IS_DELETE_NO = 0;//未删除
+ const IS_DELETE_YES = 1;//已删除
+
+ public static $isShow = [
+ self::IS_SHOW_DISPLAY => '显示',
+ self::IS_SHOW_HIDE => '隐藏'
+ ];
+
/**
* {@inheritdoc}
*/
@@ -56,7 +68,7 @@ class Category extends \yii\db\ActiveRecord
'sort_order' => '排序',
'icon_type' => '图标类型',
'icon' => '图标',
- 'is_show' => '是否显示,1为不显示',
+ 'is_show' => '是否显示',
'is_delete' => '是否删除,1为已删除',
'created_at' => '创建时间',
'updated_at' => '更新时间',
diff --git a/vendor/antgoods/goods/src/models/searchs/CategorySearch.php b/vendor/antgoods/goods/src/models/searchs/CategorySearch.php
index 63ad3f0..7ed7c4f 100644
--- a/vendor/antgoods/goods/src/models/searchs/CategorySearch.php
+++ b/vendor/antgoods/goods/src/models/searchs/CategorySearch.php
@@ -121,6 +121,7 @@ class CategorySearch extends Category
* 条件筛选
*/
private function filter($query, $dataProvider){
+ $query->andFilterWhere(['is_delete' => 0]);
if (!$this->validate()) {
// uncomment the following line if you do not want to return any records when validation fails
// $query->where('0=1');
diff --git a/vendor/antgoods/goods/src/views/category/_form.php b/vendor/antgoods/goods/src/views/category/_form.php
index d154648..4badc99 100644
--- a/vendor/antgoods/goods/src/views/category/_form.php
+++ b/vendor/antgoods/goods/src/views/category/_form.php
@@ -2,6 +2,7 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
+use blobt\widgets\Icheck;
/* @var $this yii\web\View */
/* @var $model antgoods\goods\models\ars\Category */
@@ -22,9 +23,7 @@ use yii\widgets\ActiveForm;
= $form->field($model, 'icon')->textInput(['maxlength' => true]) ?>
- = $form->field($model, 'is_show')->textInput() ?>
-
- = $form->field($model, 'is_delete')->textInput() ?>
+ = $form->field($model, 'is_show')->widget(Icheck::className(), ["items" => $model::$isShow, 'type' => "radio"]) ?>
= Html::submitButton('保存', ['class' => 'btn btn-success']) ?>
From 82f319f0c4d5fa51f11f666fa15fc05a0bff1ad6 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Wed, 20 Nov 2019 10:22:17 +0800
Subject: [PATCH 39/95] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=95=86=E5=93=81?=
=?UTF-8?q?=E5=88=86=E7=B1=BBview=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vendor/antgoods/goods/src/views/category/view.php | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/vendor/antgoods/goods/src/views/category/view.php b/vendor/antgoods/goods/src/views/category/view.php
index 2a087d5..9e7b161 100644
--- a/vendor/antgoods/goods/src/views/category/view.php
+++ b/vendor/antgoods/goods/src/views/category/view.php
@@ -27,10 +27,14 @@ $this->params['breadcrumbs'][] = $this->title;
'sort_order',
'icon_type',
'icon',
- 'is_show',
- 'is_delete',
- 'created_at',
- 'updated_at',
+ [
+ 'attribute' => 'is_show',
+ 'value' => function ($model) {
+ return $model->is_show == \antgoods\goods\models\ars\Category::IS_SHOW_DISPLAY ? '显示':'隐藏';
+ }
+ ],
+ 'created_at:datetime',
+ 'updated_at:datetime',
],
]) ?>
From 067866973bfc63ac35e06d5ed5f66660584c8c33 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Wed, 20 Nov 2019 10:29:44 +0800
Subject: [PATCH 40/95] =?UTF-8?q?antgoods=E6=A8=A1=E5=9D=97=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E5=93=81=E7=89=8C=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
backend/views/layouts/sidebar.php | 1 +
.../antgoods/goods/src}/controllers/BrandController.php | 6 +++---
.../antgoods/goods/src}/models/searchs/BrandSearch.php | 6 +++---
.../antgoods/goods/src}/views/brand/_form.php | 2 +-
.../antgoods/goods/src}/views/brand/_search.php | 8 +++++---
.../antgoods/goods/src}/views/brand/create.php | 2 +-
.../antgoods/goods/src}/views/brand/index.php | 4 ++--
.../antgoods/goods/src}/views/brand/update.php | 2 +-
.../antgoods/goods/src}/views/brand/view.php | 2 +-
9 files changed, 18 insertions(+), 15 deletions(-)
rename {backend => vendor/antgoods/goods/src}/controllers/BrandController.php (96%)
mode change 100755 => 100644
rename {common => vendor/antgoods/goods/src}/models/searchs/BrandSearch.php (95%)
mode change 100755 => 100644
rename {backend => vendor/antgoods/goods/src}/views/brand/_form.php (91%)
mode change 100755 => 100644
rename {backend => vendor/antgoods/goods/src}/views/brand/_search.php (92%)
mode change 100755 => 100644
rename {backend => vendor/antgoods/goods/src}/views/brand/create.php (86%)
mode change 100755 => 100644
rename {backend => vendor/antgoods/goods/src}/views/brand/index.php (92%)
mode change 100755 => 100644
rename {backend => vendor/antgoods/goods/src}/views/brand/update.php (89%)
mode change 100755 => 100644
rename {backend => vendor/antgoods/goods/src}/views/brand/view.php (92%)
mode change 100755 => 100644
diff --git a/backend/views/layouts/sidebar.php b/backend/views/layouts/sidebar.php
index 720c666..54868f1 100755
--- a/backend/views/layouts/sidebar.php
+++ b/backend/views/layouts/sidebar.php
@@ -23,6 +23,7 @@ use iron\widgets\Menu;
['label' => '商品管理', 'url' => '#', 'icon' => 'far fa-archive', 'items' => [
['label' => '商品列表', 'url' => ['/antgoods/goods/index']],
['label' => '商品分类', 'url' => ['/antgoods/category/index']],
+ ['label' => '品牌管理', 'url' => ['/antgoods/brand/index']],
]
],
['label' => '订单管理', 'url' => '#', 'icon' => 'far fa-list-alt', 'items' => [
diff --git a/backend/controllers/BrandController.php b/vendor/antgoods/goods/src/controllers/BrandController.php
old mode 100755
new mode 100644
similarity index 96%
rename from backend/controllers/BrandController.php
rename to vendor/antgoods/goods/src/controllers/BrandController.php
index 0dd6523..35e5f83
--- a/backend/controllers/BrandController.php
+++ b/vendor/antgoods/goods/src/controllers/BrandController.php
@@ -1,10 +1,10 @@
diff --git a/backend/views/brand/_search.php b/vendor/antgoods/goods/src/views/brand/_search.php
old mode 100755
new mode 100644
similarity index 92%
rename from backend/views/brand/_search.php
rename to vendor/antgoods/goods/src/views/brand/_search.php
index 14a96ae..ed21354
--- a/backend/views/brand/_search.php
+++ b/vendor/antgoods/goods/src/views/brand/_search.php
@@ -15,8 +15,8 @@ use \blobt\widgets\DateRangePicker;
'validateOnType' => true,
]);
?>
-
-
+
+
= $form->field($model, 'id', [
"template" => "{input}{error}",
"inputOptions" => [
@@ -28,6 +28,8 @@ use \blobt\widgets\DateRangePicker;
]
])
?>
+
+
= $form->field($model, "created_at_range", [
"template" => "{input}{error}",
"inputOptions" => [
@@ -38,10 +40,10 @@ use \blobt\widgets\DateRangePicker;
]
])->widget(DateRangePicker::className());
?>
+
= Html::submitButton('', ['class' => 'btn btn-default']) ?>
= Html::resetButton('', ['class' => 'btn btn-default']) ?>
-
\ No newline at end of file
diff --git a/backend/views/brand/create.php b/vendor/antgoods/goods/src/views/brand/create.php
old mode 100755
new mode 100644
similarity index 86%
rename from backend/views/brand/create.php
rename to vendor/antgoods/goods/src/views/brand/create.php
index c768fcb..ca5f84b
--- a/backend/views/brand/create.php
+++ b/vendor/antgoods/goods/src/views/brand/create.php
@@ -3,7 +3,7 @@
use yii\helpers\Html;
/* @var $this yii\web\View */
-/* @var $model common\models\ars\Brand */
+/* @var $model antgoods\goods\models\ars\Brand */
$this->title = '创建 Brand';
$this->params['breadcrumbs'][] = ['label' => 'Brands', 'url' => ['index']];
diff --git a/backend/views/brand/index.php b/vendor/antgoods/goods/src/views/brand/index.php
old mode 100755
new mode 100644
similarity index 92%
rename from backend/views/brand/index.php
rename to vendor/antgoods/goods/src/views/brand/index.php
index f799f7a..4abe0dd
--- a/backend/views/brand/index.php
+++ b/vendor/antgoods/goods/src/views/brand/index.php
@@ -1,7 +1,7 @@
title = 'Brands';
$this->params['breadcrumbs'][] = $this->title;
?>
-
+
= GridView::widget([
'dataProvider' => $dataProvider,
'filter' => $this->render("_search", ['model' => $searchModel]),
diff --git a/backend/views/brand/update.php b/vendor/antgoods/goods/src/views/brand/update.php
old mode 100755
new mode 100644
similarity index 89%
rename from backend/views/brand/update.php
rename to vendor/antgoods/goods/src/views/brand/update.php
index 453ee2f..7884a9c
--- a/backend/views/brand/update.php
+++ b/vendor/antgoods/goods/src/views/brand/update.php
@@ -3,7 +3,7 @@
use yii\helpers\Html;
/* @var $this yii\web\View */
-/* @var $model common\models\ars\Brand */
+/* @var $model antgoods\goods\models\ars\Brand */
$this->title = '编辑 Brand: ' . $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Brands', 'url' => ['index']];
diff --git a/backend/views/brand/view.php b/vendor/antgoods/goods/src/views/brand/view.php
old mode 100755
new mode 100644
similarity index 92%
rename from backend/views/brand/view.php
rename to vendor/antgoods/goods/src/views/brand/view.php
index 814b5be..c592ea0
--- a/backend/views/brand/view.php
+++ b/vendor/antgoods/goods/src/views/brand/view.php
@@ -4,7 +4,7 @@ use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
-/* @var $model common\models\ars\Brand */
+/* @var $model antgoods\goods\models\ars\Brand */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => 'Brands', 'url' => ['index']];
From 69d7929a88c110d050e03ee8a5e9b3ab27bd24d6 Mon Sep 17 00:00:00 2001
From: linyaostalker <602604991@qq.com>
Date: Wed, 20 Nov 2019 10:37:25 +0800
Subject: [PATCH 41/95] =?UTF-8?q?=E4=BF=AE=E6=94=B9antgoods=E6=A8=A1?=
=?UTF-8?q?=E5=9D=97=E5=93=81=E7=89=8C=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vendor/antgoods/goods/src/models/searchs/BrandSearch.php | 5 ++---
vendor/antgoods/goods/src/views/brand/_form.php | 2 --
vendor/antgoods/goods/src/views/brand/create.php | 4 ++--
vendor/antgoods/goods/src/views/brand/index.php | 2 +-
vendor/antgoods/goods/src/views/brand/update.php | 6 +++---
vendor/antgoods/goods/src/views/brand/view.php | 5 ++---
6 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/vendor/antgoods/goods/src/models/searchs/BrandSearch.php b/vendor/antgoods/goods/src/models/searchs/BrandSearch.php
index 589a2fb..f7fc35e 100644
--- a/vendor/antgoods/goods/src/models/searchs/BrandSearch.php
+++ b/vendor/antgoods/goods/src/models/searchs/BrandSearch.php
@@ -54,9 +54,8 @@ class BrandSearch extends Brand
],
'id',
'name',
- 'is_delete',
- 'created_at',
- 'updated_at',
+ 'created_at:datetime',
+ 'updated_at:datetime',
[
'class' => 'iron\grid\ActionColumn',
'align' => 'center',
diff --git a/vendor/antgoods/goods/src/views/brand/_form.php b/vendor/antgoods/goods/src/views/brand/_form.php
index 9f7f050..6bd4bbc 100644
--- a/vendor/antgoods/goods/src/views/brand/_form.php
+++ b/vendor/antgoods/goods/src/views/brand/_form.php
@@ -14,8 +14,6 @@ use yii\widgets\ActiveForm;
= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
- = $form->field($model, 'is_delete')->textInput() ?>
-