Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
LC_server_goods
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9fb67a20
authored
Dec 16, 2019
by
叶明星
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
zc
parent
220fa21c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
.env
app/Model/SelfGoodsModel.php
.env
View file @
9fb67a20
...
@@ -4,14 +4,14 @@ APP_KEY=
...
@@ -4,14 +4,14 @@ APP_KEY=
APP_TIMEZONE=PRC
APP_TIMEZONE=PRC
//系统编码,用于生成错误码
//系统编码,用于生成错误码
SYSTEM_CODE=0
6
SYSTEM_CODE=0
2
//系统名称,用于告警识别
//系统名称,用于告警识别
SYSTEM_NAME=猎传商品信息处理服务(开发环境)
SYSTEM_NAME=猎传商品信息处理服务(开发环境)
//laravels监听IP和端口
//laravels监听IP和端口
LARAVELS_LISTEN_IP=0.0.0.0
LARAVELS_LISTEN_IP=0.0.0.0
LARAVELS_LISTEN_PORT=6200
6
LARAVELS_LISTEN_PORT=6200
2
//基石自营商品主库
//基石自营商品主库
...
...
app/Model/SelfGoodsModel.php
View file @
9fb67a20
...
@@ -37,6 +37,21 @@ class SelfGoodsModel extends Model
...
@@ -37,6 +37,21 @@ class SelfGoodsModel extends Model
}
else
$Find
[
'stock'
]
=
0
;
}
else
$Find
[
'stock'
]
=
0
;
}
}
}
}
//处理货期
$delivery_type
=
[
1
=>
'现货'
,
2
=>
'期货'
];
if
(
!
empty
(
$Find
[
'delivery_type'
])
&&
!
empty
(
$delivery_type
[
$Find
[
'delivery_type'
]])){
$Find
[
'delivery_type_name'
]
=
$delivery_type
[
$Find
[
'delivery_type'
]];
}
else
{
$Find
[
'delivery_type'
]
=
2
;
$Find
[
'delivery_type_name'
]
=
'期货'
;
}
//处理活动价
//处理活动价
$Find
[
'ac_type'
]
=
0
;
$Find
[
'ac_type'
]
=
0
;
$Find
[
'allow_coupon'
]
=
1
;
$Find
[
'allow_coupon'
]
=
1
;
...
@@ -220,7 +235,7 @@ class SelfGoodsModel extends Model
...
@@ -220,7 +235,7 @@ class SelfGoodsModel extends Model
$this
->
connection
=
'self'
;
//开始连接数据库
$this
->
connection
=
'self'
;
//开始连接数据库
$fieldArr
=
[
'other_attrs'
,
'goods_id'
,
'goods_type'
,
'supplier_id'
,
'brand_id'
,
'class_id1'
,
'class_id2'
,
'goods_name'
,
'status'
,
$fieldArr
=
[
'other_attrs'
,
'goods_id'
,
'goods_type'
,
'supplier_id'
,
'brand_id'
,
'class_id1'
,
'class_id2'
,
'goods_name'
,
'status'
,
'encoded'
,
'encap'
,
'packing'
,
'goods_unit'
,
'goods_images'
,
'pdf'
,
'goods_brief'
,
'moq'
,
'mpq'
,
'encoded'
,
'encap'
,
'packing'
,
'goods_unit'
,
'goods_images'
,
'pdf'
,
'goods_brief'
,
'moq'
,
'mpq'
,
'ladder_price'
,
'update_time'
,
'sku_name'
,
'mpl'
,
'stock'
,
'attrs'
,
'cost'
,
'new_cost'
,
'cn_delivery_time'
];
'ladder_price'
,
'update_time'
,
'sku_name'
,
'mpl'
,
'stock'
,
'attrs'
,
'cost'
,
'new_cost'
,
'cn_delivery_time'
,
'delivery_type'
];
$info
=
$this
->
where
(
'goods_id'
,
'='
,
$goods_id
)
->
select
(
$fieldArr
)
->
first
();
$info
=
$this
->
where
(
'goods_id'
,
'='
,
$goods_id
)
->
select
(
$fieldArr
)
->
first
();
if
(
!
$info
)
return
false
;
if
(
!
$info
)
return
false
;
$info
=
$info
->
toArray
();
$info
=
$info
->
toArray
();
...
...
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