Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jwhx
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
jwhx
Commits
989225e0
Commit
989225e0
authored
Jan 04, 2025
by
wuxiaoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
3767d592
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
modules/Order/app/Services/CashierService.php
modules/Order/app/Services/CashierService.php
+2
-3
No files found.
modules/Order/app/Services/CashierService.php
View file @
989225e0
...
@@ -10,7 +10,6 @@ namespace Modules\Order\Services;
...
@@ -10,7 +10,6 @@ namespace Modules\Order\Services;
use
Illuminate\Support\Str
;
use
Illuminate\Support\Str
;
use
Modules\Goods\Models\GoodsSku
;
use
Modules\Goods\Models\GoodsSku
;
use
Modules\Member\Models\MemberAddress
;
use
Modules\Order\Models\Cart
;
use
Modules\Order\Models\Cart
;
use
Modules\Goods\Models\Goods
;
use
Modules\Goods\Models\Goods
;
use
Modules\Order\Models\Order
;
use
Modules\Order\Models\Order
;
...
@@ -45,10 +44,10 @@ class CashierService {
...
@@ -45,10 +44,10 @@ class CashierService {
$goods_sn
=
$request
->
input
(
'goods_sn'
);
$goods_sn
=
$request
->
input
(
'goods_sn'
);
$firstChar
=
substr
(
$goods_sn
,
0
,
1
);
// 截取第一个字符
$firstChar
=
substr
(
$goods_sn
,
0
,
1
);
// 截取第一个字符
if
(
$firstChar
==
"G"
){
if
(
$firstChar
==
"G"
){
$goodsSN
=
Goods
::
where
([
'goods_sn'
=>
$goods_sn
])
->
fi
nd
();
$goodsSN
=
Goods
::
where
([
'goods_sn'
=>
$goods_sn
])
->
fi
rst
();
$goods_id
=
empty
(
$goodsSN
)
?
$goods_id
:
$goodsSN
->
id
;
$goods_id
=
empty
(
$goodsSN
)
?
$goods_id
:
$goodsSN
->
id
;
}
else
if
(
$firstChar
==
"S"
){
}
else
if
(
$firstChar
==
"S"
){
$goodsSKUSN
=
GoodsSku
::
where
([
'goods_sn'
=>
$goods_sn
])
->
fi
nd
();
$goodsSKUSN
=
GoodsSku
::
where
([
'goods_sn'
=>
$goods_sn
])
->
fi
rst
();
$goods_id
=
empty
(
$goodsSKUSN
)
?
$goods_id
:
$goodsSKUSN
->
goods_id
;
$goods_id
=
empty
(
$goodsSKUSN
)
?
$goods_id
:
$goodsSKUSN
->
goods_id
;
$goods_sku_id
=
empty
(
$goodsSKUSN
)
?
$goods_id
:
$goodsSKUSN
->
id
;
$goods_sku_id
=
empty
(
$goodsSKUSN
)
?
$goods_id
:
$goodsSKUSN
->
id
;
}
}
...
...
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