Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
takeout_sbk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yunpeng.song
takeout_sbk
Commits
22e1c231
Commit
22e1c231
authored
Dec 25, 2019
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug: Order Detail Main Product Options Code Not Save Mysql DB
parent
e3950090
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fmTakeout/DTools/pmsOrdersData.cpp
+2
-2
No files found.
fmTakeout/DTools/pmsOrdersData.cpp
View file @
22e1c231
...
@@ -384,7 +384,7 @@ bool PmsOrdersData::insertSubProductData(const QList<dishesObject*> sub_products
...
@@ -384,7 +384,7 @@ bool PmsOrdersData::insertSubProductData(const QList<dishesObject*> sub_products
if
(
!
MainProOptions
.
isEmpty
()
)
{
if
(
!
MainProOptions
.
isEmpty
()
)
{
++
availSubProNum
;
++
availSubProNum
;
QSqlQuery
query
(
m_sqlDb
);
QSqlQuery
query
(
m_sqlDb
);
query
.
prepare
(
"INSERT INTO order_item_condiments(item_id, condiment_code , price, condimen_total , qty ) VALUES(?, ?, ?, ?, ?
, ?, ?, ?, ?
)"
);
query
.
prepare
(
"INSERT INTO order_item_condiments(item_id, condiment_code , price, condimen_total , qty ) VALUES(?, ?, ?, ?, ?)"
);
query
.
addBindValue
(
ProInIdRef
.
toInt
());
// --主商品自增编号
query
.
addBindValue
(
ProInIdRef
.
toInt
());
// --主商品自增编号
query
.
addBindValue
(
MainProOptions
);
// --子商品code
query
.
addBindValue
(
MainProOptions
);
// --子商品code
query
.
addBindValue
(
0
);
// --子商品价格
query
.
addBindValue
(
0
);
// --子商品价格
...
@@ -394,7 +394,7 @@ bool PmsOrdersData::insertSubProductData(const QList<dishesObject*> sub_products
...
@@ -394,7 +394,7 @@ bool PmsOrdersData::insertSubProductData(const QList<dishesObject*> sub_products
QLOG_ERROR
()
<<
QString
(
"[<<<<---PmsOrdersData::insertSubProductData:Insert ProInIdRef:%1 MainProOptions code:%2 Failed --->>>>]"
)
QLOG_ERROR
()
<<
QString
(
"[<<<<---PmsOrdersData::insertSubProductData:Insert ProInIdRef:%1 MainProOptions code:%2 Failed --->>>>]"
)
.
arg
(
ProInIdRef
).
arg
(
MainProOptions
)
.
arg
(
ProInIdRef
).
arg
(
MainProOptions
)
<<
query
.
lastError
().
text
()
<<
QString
::
number
(
query
.
lastError
().
type
());
<<
query
.
lastError
().
text
()
<<
QString
::
number
(
query
.
lastError
().
type
());
QLOG_ERROR
()
<<
QString
(
"INSERT INTO order_item_condiments(item_id, condiment_code , price, condimen_total , qty ) VALUES(
?, ?, ?, ?, ?, ?, ?, ?, ?
)"
)
QLOG_ERROR
()
<<
QString
(
"INSERT INTO order_item_condiments(item_id, condiment_code , price, condimen_total , qty ) VALUES(
%1, %2, %3, %4, %5
)"
)
.
arg
(
ProInIdRef
.
toInt
()).
arg
(
MainProOptions
).
arg
(
0
).
arg
(
0
).
arg
(
1
);
.
arg
(
ProInIdRef
.
toInt
()).
arg
(
MainProOptions
).
arg
(
0
).
arg
(
0
).
arg
(
1
);
}
else
{
}
else
{
SubProInIdRef
=
query
.
lastInsertId
().
toString
();
SubProInIdRef
=
query
.
lastInsertId
().
toString
();
...
...
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