Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
newShopBack
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
newshop
newShopBack
Commits
efe247ae
Commit
efe247ae
authored
Dec 16, 2019
by
孙磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
youhua
Signed-off-by:
sunlei
<
sunlei@romens.cn
>
parent
faae7377
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
shopGoodsBrand.php
backend/models/v1/shopgoods/shopGoodsBrand.php
+3
-2
shopGoodsProperty.php
backend/models/v1/shopgoods/shopGoodsProperty.php
+13
-2
No files found.
backend/models/v1/shopgoods/shopGoodsBrand.php
View file @
efe247ae
<?php
<?php
namespace
app\models
;
namespace
app\models
\v1\shopgoods
;
use
Yii
;
use
app\models\v1\BaseModel
;
use
app\models\v1\BaseModel
;
use
Yii
;
use
yii\data\ActiveDataProvider
;
/**
/**
* This is the model class for table "shop_goods_brand".
* This is the model class for table "shop_goods_brand".
...
...
backend/models/v1/shopgoods/shopGoodsProperty.php
View file @
efe247ae
<?php
<?php
namespace
app\models
;
namespace
app\models
\v1\shopgoods
;
use
Yii
;
use
app\models\v1\BaseModel
;
use
app\models\v1\BaseModel
;
use
Yii
;
use
yii\data\ActiveDataProvider
;
/**
/**
* This is the model class for table "shop_goods_property".
* This is the model class for table "shop_goods_property".
...
@@ -53,4 +54,14 @@ class ShopGoodsProperty extends BaseModel
...
@@ -53,4 +54,14 @@ class ShopGoodsProperty extends BaseModel
'TYPE'
=>
'Type'
,
'TYPE'
=>
'Type'
,
];
];
}
}
/**
* 获取商品标签信息
*/
public
function
getGoodsProperty
(
$name
)
{
return
$query
=
static
::
find
()
->
select
(
'count(GUID) as num,GUID'
)
->
where
([
'NAME'
=>
$name
])
->
all
();
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment