Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
semour
/
semour_web
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
0c87a96b
authored
Nov 22, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'dev/ver/1.0.0' of
http://git.ichunt.net/semour/semour_web
into dev/ver/1.0.0
parents
d87ac9f0
aad51e06
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
app/Http/Controllers/Api/OrderApiController.php
app/Http/Services/CartService.php
app/Http/Controllers/Api/OrderApiController.php
View file @
0c87a96b
...
...
@@ -42,7 +42,7 @@ class OrderApiController extends Controller
]);
$result
=
OrderService
::
addOrder
(
$data
,
$request
->
user
->
id
);
return
!
$result
?
$this
->
setError
(
'Add
cart failed , please contact administrator'
)
:
$this
->
setSuccess
(
'Add inquiry
success'
);
return
!
$result
?
$this
->
setError
(
'Add
order failed , please contact administrator'
)
:
$this
->
setSuccess
(
'Add order
success'
);
}
//订单列表
...
...
app/Http/Services/CartService.php
View file @
0c87a96b
...
...
@@ -221,6 +221,7 @@ class CartService
$redis
=
Redis
::
connection
();
$goodsInfoArr
=
ThirdService
::
getGoodsInfo
(
array_column
(
$result
,
"goods_id"
));
$cartList
=
[];
foreach
(
$result
as
$v
)
{
$goods_id
=
$v
[
'goods_id'
];
...
...
@@ -259,7 +260,7 @@ class CartService
}
}
$temp
[
"status"
]
=
$temp
[
"buy_number"
]
>
0
?
CartModel
::
status_yes
:
CartModel
::
status_no
;
$temp
[
"status"
]
=
$temp
[
"buy_number"
]
>
0
&&
$skuInfo
[
"is_buy"
]
==
1
?
CartModel
::
status_yes
:
CartModel
::
status_no
;
$temp
[
"buy_price"
]
=
$buy_price
;
$temp
[
"update_time"
]
=
time
();
$flag
=
CartModel
::
where
([
"cart_id"
=>
$v
[
"cart_id"
]])
->
update
(
$temp
);
...
...
@@ -267,7 +268,6 @@ class CartService
continue
;
}
//格式化数据
$skuInfo
=
self
::
dullDataInfo
(
$skuInfo
);
$cartList
[]
=
[
...
...
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