Browse Source

图库管理

shish 6 years ago
parent
commit
a87fbfc7b2

+ 17 - 0
biz/goods/classes/PicCategoryClass.php

@@ -0,0 +1,17 @@
+<?php
+
+namespace biz\goods\classes;
+
+use biz\goods\services\GoodsCategoryService;
+use biz\goods\services\GoodsStyleService;
+use common\components\business;
+use common\components\stringUtil;
+use Yii;
+use biz\base\classes\BaseClass;
+
+class PicCategoryClass extends BaseClass
+{
+	
+	public static $baseFile = '\biz\goods\models\PicCategory';
+	
+}

+ 17 - 0
biz/goods/classes/PicClass.php

@@ -0,0 +1,17 @@
+<?php
+
+namespace biz\goods\classes;
+
+use biz\goods\services\GoodsCategoryService;
+use biz\goods\services\GoodsStyleService;
+use common\components\business;
+use common\components\stringUtil;
+use Yii;
+use biz\base\classes\BaseClass;
+
+class PicClass extends BaseClass
+{
+	
+	public static $baseFile = '\biz\goods\models\Pic';
+	
+}

+ 13 - 0
biz/goods/models/Pic.php

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

+ 13 - 0
biz/goods/models/PicCategory.php

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

+ 12 - 0
biz/goods/services/PicCategoryService.php

@@ -0,0 +1,12 @@
+<?php
+
+namespace biz\goods\services;
+
+use biz\base\services\BaseService;
+
+class PicCategoryService extends BaseService
+{
+	
+	public static $baseFile = '\biz\goods\classes\PicCategoryClass';
+	
+}

+ 12 - 0
biz/goods/services/PicService.php

@@ -0,0 +1,12 @@
+<?php
+
+namespace biz\goods\services;
+
+use biz\base\services\BaseService;
+
+class PicService extends BaseService
+{
+
+	public static $baseFile = '\biz\goods\classes\PicClass';
+
+}

+ 18 - 0
sql.txt

@@ -1,3 +1,21 @@
+2019.12.8 shish
+DROP TABLE IF EXISTS xhPic;
+CREATE TABLE IF NOT EXISTS xhPic(
+id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+merchantId INT NOT NULL DEFAULT 0 COMMENT '商家id',
+img VARCHAR(500) NOT NULL DEFAULT '' COMMENT '图片地址',
+price DECIMAL(9,2) NOT NULL DEFAULT 0.00 COMMENT '价格',
+`name` VARCHAR(100) NOT NULL DEFAULT '' COMMENT '商品名称',
+`addTime` INT NOT NULL DEFAULT 0 COMMENT '添加时间'
+)COMMENT='图库;商品图库';
+DROP TABLE IF EXISTS xhPicCategory;
+CREATE TABLE IF NOT EXISTS xhPicCategory(
+id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+merchantId INT NOT NULL DEFAULT 0 COMMENT '商家id',
+pictureId INT NOT NULL DEFAULT 0 COMMENT '图片id',
+categoryId INT NOT NULL DEFAULT 0 COMMENT '分类id'
+)COMMENT='商品图与分类关系';
+
 shizhongqi 2019.12.7
 ALTER TABLE xhAd ADD `status` TINYINT NOT NULL DEFAULT 0 COMMENT '启用状态 0 未启用 1 启用' AFTER `adName`;
 ALTER TABLE xhAd ADD `order` INT NOT NULL DEFAULT 0 COMMENT '排序' AFTER `status`;