Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
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
67141360
authored
Oct 19, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_order_20200923'
parents
fbbfd02c
bf4dfb3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
app/Http/Controllers/ApiController.php
app/Http/Controllers/ApiController.php
View file @
67141360
...
...
@@ -380,15 +380,23 @@ class ApiController extends Controller
$OrderExtendModel
=
new
OrderExtendModel
;
$OrderActionLogModel
=
new
OrderActionLogModel
;
$o
ld_erp_sn
=
$OrderExtendModel
->
where
(
'order_id'
,
$order_id
)
->
value
(
'erp_sn'
);
$o
rder_extend
=
$OrderExtendModel
->
where
(
'order_id'
,
$order_id
)
->
first
(
);
$res
=
$OrderExtendModel
->
where
(
'order_id'
,
$order_id
)
->
update
([
'erp_sn'
=>
$erp_sn
]);
if
(
!
$order_extend
)
{
$res
=
$OrderExtendModel
->
insert
([
'order_id'
=>
$order_id
,
'erp_sn'
=>
$erp_sn
]);
$OrderActionLogModel
->
addLog
(
$order_id
,
$request
->
user
->
userId
,
2
,
'编辑ERP单号,添加订单扩展表'
);
}
else
{
$res
=
$OrderExtendModel
->
where
(
'order_id'
,
$order_id
)
->
update
([
'erp_sn'
=>
$erp_sn
]);
$OrderActionLogModel
->
addLog
(
$order_id
,
$request
->
user
->
userId
,
2
,
'编辑ERP单号,修改前:'
.
$order_extend
->
erp_sn
);
}
if
(
$res
===
false
)
{
$this
->
Export
(
-
1
,
'编辑ERP单号失败'
);
}
$OrderActionLogModel
->
addLog
(
$order_id
,
$request
->
user
->
userId
,
2
,
'编辑ERP单号,修改前:'
.
$old_erp_sn
);
$this
->
Export
(
0
,
'编辑ERP单号成功'
);
}
...
...
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