Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenDocCN
yii2_fecshop
提交
d6845559
Y
yii2_fecshop
项目概览
OpenDocCN
/
yii2_fecshop
通知
17
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
yii2_fecshop
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d6845559
编写于
4月 10, 2017
作者:
R
root
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整mongodb的示例数据
上级
74b6d78d
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
12 addition
and
0 deletion
+12
-0
migrations/mongodb-example-data/fecshop_test/article.bson
migrations/mongodb-example-data/fecshop_test/article.bson
+0
-0
migrations/mongodb-example-data/fecshop_test/article.metadata.json
...s/mongodb-example-data/fecshop_test/article.metadata.json
+1
-0
migrations/mongodb-example-data/fecshop_test/category.bson
migrations/mongodb-example-data/fecshop_test/category.bson
+0
-0
migrations/mongodb-example-data/fecshop_test/category.metadata.json
.../mongodb-example-data/fecshop_test/category.metadata.json
+1
-0
migrations/mongodb-example-data/fecshop_test/favorite.bson
migrations/mongodb-example-data/fecshop_test/favorite.bson
+0
-0
migrations/mongodb-example-data/fecshop_test/favorite.metadata.json
.../mongodb-example-data/fecshop_test/favorite.metadata.json
+1
-0
migrations/mongodb-example-data/fecshop_test/log_product_view.bson
...s/mongodb-example-data/fecshop_test/log_product_view.bson
+0
-0
migrations/mongodb-example-data/fecshop_test/log_product_view.metadata.json
...-example-data/fecshop_test/log_product_view.metadata.json
+1
-0
migrations/mongodb-example-data/fecshop_test/migration.bson
migrations/mongodb-example-data/fecshop_test/migration.bson
+0
-0
migrations/mongodb-example-data/fecshop_test/migration.metadata.json
...mongodb-example-data/fecshop_test/migration.metadata.json
+1
-0
migrations/mongodb-example-data/fecshop_test/newsletter.bson
migrations/mongodb-example-data/fecshop_test/newsletter.bson
+0
-0
migrations/mongodb-example-data/fecshop_test/newsletter.metadata.json
...ongodb-example-data/fecshop_test/newsletter.metadata.json
+1
-0
migrations/mongodb-example-data/fecshop_test/product_flat.bson
...tions/mongodb-example-data/fecshop_test/product_flat.bson
+0
-0
migrations/mongodb-example-data/fecshop_test/product_flat.metadata.json
...godb-example-data/fecshop_test/product_flat.metadata.json
+1
-0
migrations/mongodb-example-data/fecshop_test/review.bson
migrations/mongodb-example-data/fecshop_test/review.bson
+0
-0
migrations/mongodb-example-data/fecshop_test/review.metadata.json
...ns/mongodb-example-data/fecshop_test/review.metadata.json
+1
-0
migrations/mongodb-example-data/fecshop_test/static_block.bson
...tions/mongodb-example-data/fecshop_test/static_block.bson
+0
-0
migrations/mongodb-example-data/fecshop_test/static_block.metadata.json
...godb-example-data/fecshop_test/static_block.metadata.json
+1
-0
migrations/mongodb-example-data/fecshop_test/url_rewrite.bson
...ations/mongodb-example-data/fecshop_test/url_rewrite.bson
+0
-0
migrations/mongodb-example-data/fecshop_test/url_rewrite.metadata.json
...ngodb-example-data/fecshop_test/url_rewrite.metadata.json
+1
-0
services/product/ProductMongodb.php
services/product/ProductMongodb.php
+2
-0
未找到文件。
migrations/mongodb-example-data/fecshop_test/article.bson
0 → 100644
浏览文件 @
d6845559
文件已添加
migrations/mongodb-example-data/fecshop_test/article.metadata.json
0 → 100644
浏览文件 @
d6845559
{
"options"
:{},
"indexes"
:[{
"v"
:
1
,
"key"
:{
"_id"
:
1
},
"name"
:
"_id_"
,
"ns"
:
"fecshop_test.article"
},{
"v"
:
1
,
"key"
:{
"url_key"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"url_key_-1"
,
"ns"
:
"fecshop_test.article"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}}]}
\ No newline at end of file
migrations/mongodb-example-data/fecshop_test/category.bson
0 → 100644
浏览文件 @
d6845559
文件已添加
migrations/mongodb-example-data/fecshop_test/category.metadata.json
0 → 100644
浏览文件 @
d6845559
{
"options"
:{},
"indexes"
:[{
"v"
:
1
,
"key"
:{
"_id"
:
1
},
"name"
:
"_id_"
,
"ns"
:
"fecshop_test.category"
}]}
\ No newline at end of file
migrations/mongodb-example-data/fecshop_test/favorite.bson
0 → 100644
浏览文件 @
d6845559
文件已添加
migrations/mongodb-example-data/fecshop_test/favorite.metadata.json
0 → 100644
浏览文件 @
d6845559
{
"options"
:{},
"indexes"
:[{
"v"
:
1
,
"key"
:{
"_id"
:
1
},
"name"
:
"_id_"
,
"ns"
:
"fecshop_test.favorite"
},{
"v"
:
1
,
"key"
:{
"user_id"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"user_id_-1"
,
"ns"
:
"fecshop_test.favorite"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}},{
"v"
:
1
,
"key"
:{
"product_id"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"product_id_-1"
,
"ns"
:
"fecshop_test.favorite"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}}]}
\ No newline at end of file
migrations/mongodb-example-data/fecshop_test/log_product_view.bson
0 → 100644
浏览文件 @
d6845559
文件已添加
migrations/mongodb-example-data/fecshop_test/log_product_view.metadata.json
0 → 100644
浏览文件 @
d6845559
{
"options"
:{},
"indexes"
:[{
"v"
:
1
,
"key"
:{
"_id"
:
1
},
"name"
:
"_id_"
,
"ns"
:
"fecshop_test.log_product_view"
}]}
\ No newline at end of file
migrations/mongodb-example-data/fecshop_test/migration.bson
0 → 100644
浏览文件 @
d6845559
文件已添加
migrations/mongodb-example-data/fecshop_test/migration.metadata.json
0 → 100644
浏览文件 @
d6845559
{
"options"
:{},
"indexes"
:[{
"v"
:
1
,
"key"
:{
"_id"
:
1
},
"name"
:
"_id_"
,
"ns"
:
"fecshop_test.migration"
}]}
\ No newline at end of file
migrations/mongodb-example-data/fecshop_test/newsletter.bson
0 → 100644
浏览文件 @
d6845559
文件已添加
migrations/mongodb-example-data/fecshop_test/newsletter.metadata.json
0 → 100644
浏览文件 @
d6845559
{
"options"
:{},
"indexes"
:[{
"v"
:
1
,
"key"
:{
"_id"
:
1
},
"name"
:
"_id_"
,
"ns"
:
"fecshop_test.newsletter"
},{
"v"
:
1
,
"key"
:{
"email"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"email_-1"
,
"ns"
:
"fecshop_test.newsletter"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}}]}
\ No newline at end of file
migrations/mongodb-example-data/fecshop_test/product_flat.bson
0 → 100644
浏览文件 @
d6845559
文件已添加
migrations/mongodb-example-data/fecshop_test/product_flat.metadata.json
0 → 100644
浏览文件 @
d6845559
{
"options"
:{},
"indexes"
:[{
"v"
:
1
,
"key"
:{
"_id"
:
1
},
"name"
:
"_id_"
,
"ns"
:
"fecshop_test.product_flat"
},{
"v"
:
1
,
"key"
:{
"spu"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"spu_-1"
,
"ns"
:
"fecshop_test.product_flat"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}},{
"v"
:
1
,
"key"
:{
"sku"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"sku_-1"
,
"ns"
:
"fecshop_test.product_flat"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}},{
"v"
:
1
,
"key"
:{
"category"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"category_-1"
,
"ns"
:
"fecshop_test.product_flat"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}}]}
\ No newline at end of file
migrations/mongodb-example-data/fecshop_test/review.bson
0 → 100644
浏览文件 @
d6845559
文件已添加
migrations/mongodb-example-data/fecshop_test/review.metadata.json
0 → 100644
浏览文件 @
d6845559
{
"options"
:{},
"indexes"
:[{
"v"
:
1
,
"key"
:{
"_id"
:
1
},
"name"
:
"_id_"
,
"ns"
:
"fecshop_test.review"
},{
"v"
:
1
,
"key"
:{
"product_spu"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"product_spu_-1"
,
"ns"
:
"fecshop_test.review"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}},{
"v"
:
1
,
"key"
:{
"product_sku"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"product_sku_-1"
,
"ns"
:
"fecshop_test.review"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}},{
"v"
:
1
,
"key"
:{
"product_id"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"product_id_-1"
,
"ns"
:
"fecshop_test.review"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}},{
"v"
:
1
,
"key"
:{
"user_id"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"user_id_-1"
,
"ns"
:
"fecshop_test.review"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}}]}
\ No newline at end of file
migrations/mongodb-example-data/fecshop_test/static_block.bson
0 → 100644
浏览文件 @
d6845559
文件已添加
migrations/mongodb-example-data/fecshop_test/static_block.metadata.json
0 → 100644
浏览文件 @
d6845559
{
"options"
:{},
"indexes"
:[{
"v"
:
1
,
"key"
:{
"_id"
:
1
},
"name"
:
"_id_"
,
"ns"
:
"fecshop_test.static_block"
},{
"v"
:
1
,
"key"
:{
"identify"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"identify_-1"
,
"ns"
:
"fecshop_test.static_block"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}}]}
\ No newline at end of file
migrations/mongodb-example-data/fecshop_test/url_rewrite.bson
0 → 100644
浏览文件 @
d6845559
文件已添加
migrations/mongodb-example-data/fecshop_test/url_rewrite.metadata.json
0 → 100644
浏览文件 @
d6845559
{
"options"
:{},
"indexes"
:[{
"v"
:
1
,
"key"
:{
"_id"
:
1
},
"name"
:
"_id_"
,
"ns"
:
"fecshop_test.url_rewrite"
},{
"v"
:
1
,
"key"
:{
"custom_url_key"
:{
"$numberLong"
:
"-1"
}},
"name"
:
"custom_url_key_-1"
,
"ns"
:
"fecshop_test.url_rewrite"
,
"w"
:{
"$numberLong"
:
"1"
},
"background"
:
true
,
"socketTimeoutMS"
:{
"$numberLong"
:
"300000"
}}]}
\ No newline at end of file
services/product/ProductMongodb.php
浏览文件 @
d6845559
...
...
@@ -156,6 +156,8 @@ class ProductMongodb implements ProductInterface
Yii
::
$service
->
helper
->
errors
->
add
(
'Product '
.
$this
->
getPrimaryKey
()
.
' is not exist'
);
return
;
}
echo
new
\
MongoDB\BSON\ObjectId
(
$primaryVal
);
exit
;
#验证sku 是否重复
$product_one
=
Product
::
find
()
->
asArray
()
->
where
([
'<>'
,
$this
->
getPrimaryKey
(),(
new
\
MongoDB\BSON\ObjectId
(
$primaryVal
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录