Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenchuanwen
my-yaf-project
Commits
b94c2001
Commit
b94c2001
authored
Nov 22, 2018
by
christ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
order
parent
ff5ccddd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
NameConst.php
application/library/Our/NameConst.php
+4
-0
ShopkeeperService.php
application/models/Business/Store/ShopkeeperService.php
+2
-2
Order.php
application/models/DAO/Order/Order.php
+3
-3
No files found.
application/library/Our/NameConst.php
View file @
b94c2001
...
@@ -181,6 +181,10 @@ class NameConst {
...
@@ -181,6 +181,10 @@ class NameConst {
const
versionOne
=
'1.0.0'
;
const
versionOne
=
'1.0.0'
;
const
versionDefault
=
'1.0'
;
const
versionDefault
=
'1.0'
;
const
bySeller
=
'bySeller'
;
const
bySelf
=
'bySelf'
;
}
}
?>
?>
\ No newline at end of file
application/models/Business/Store/ShopkeeperService.php
View file @
b94c2001
...
@@ -920,8 +920,8 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
...
@@ -920,8 +920,8 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$storeId
=
$memberDao
->
getInfo
(
$memberId
,
'store_id'
);
$storeId
=
$memberDao
->
getInfo
(
$memberId
,
'store_id'
);
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
(
DbNameConst
::
salveDBConnectName
);
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
(
DbNameConst
::
salveDBConnectName
);
$waitReceiveCount
=
$orderDao
->
getCountByOrderState
(
$storeId
,
ApiConst
::
orderStateWaitConfirm
);
$waitReceiveCount
=
$orderDao
->
getCountByOrderState
(
$storeId
,
ApiConst
::
orderStateWaitConfirm
);
$waitDeliveryCount
=
$orderDao
->
getCountByShippingTypeAndOrderState
(
$storeId
,
ApiConst
::
bySeller
,
array
(
ApiConst
::
orderStateWaitSend
,
ApiConst
::
orderStateWaitRecieve
)
);
$waitDeliveryCount
=
$orderDao
->
getCountByShippingTypeAndOrderState
(
$storeId
);
$waitGetCount
=
$orderDao
->
getCountByShippingTypeAndOrderState
(
$storeId
,
ApiConst
::
bySelf
,
ApiConst
::
orderStateWaitRecieve
);
$waitGetCount
=
$orderDao
->
getCountByShippingTypeAndOrderState
(
$storeId
,
NameConst
::
bySelf
);
$orderCount
=
$waitReceiveCount
+
$waitDeliveryCount
+
$waitGetCount
;
$orderCount
=
$waitReceiveCount
+
$waitDeliveryCount
+
$waitGetCount
;
return
array
(
'waitReceiveCount'
=>
$waitReceiveCount
,
'waitDeliveryCount'
=>
$waitDeliveryCount
,
'waitGetCount'
=>
$waitGetCount
,
'orderCount'
=>
$orderCount
);
return
array
(
'waitReceiveCount'
=>
$waitReceiveCount
,
'waitDeliveryCount'
=>
$waitDeliveryCount
,
'waitGetCount'
=>
$waitGetCount
,
'orderCount'
=>
$orderCount
);
}
}
...
...
application/models/DAO/Order/Order.php
View file @
b94c2001
...
@@ -1148,11 +1148,11 @@ class OrderModel extends \DAO\AbstractModel
...
@@ -1148,11 +1148,11 @@ class OrderModel extends \DAO\AbstractModel
$where
[
'shipping_type'
]
=
ApiConst
::
bySelf
;
$where
[
'shipping_type'
]
=
ApiConst
::
bySelf
;
$where
[
'order_state'
]
=
ApiConst
::
orderStateWaitRecieve
;
$where
[
'order_state'
]
=
ApiConst
::
orderStateWaitRecieve
;
}
}
public
function
getCountByShippingTypeAndOrderState
(
$storeId
,
$type
=
'bySeller'
){
public
function
getCountByShippingTypeAndOrderState
(
$storeId
,
$type
=
NameConst
::
bySeller
){
if
(
$type
==
'bySeller'
){
if
(
$type
==
NameConst
::
bySeller
){
$where
=
$this
->
getWaitDeliveryCondition
(
$storeId
);
$where
=
$this
->
getWaitDeliveryCondition
(
$storeId
);
}
}
if
(
$type
==
'bySelf'
){
if
(
$type
==
NameConst
::
bySelf
){
$where
=
$this
->
getByselfCondition
(
$storeId
);
$where
=
$this
->
getByselfCondition
(
$storeId
);
}
}
$count
=
$this
->
getCountByWhere
(
$where
);
$count
=
$this
->
getCountByWhere
(
$where
);
...
...
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