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
2e0c00bf
Commit
2e0c00bf
authored
Dec 05, 2018
by
christ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
order_sort
parent
fdfd3958
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
2 deletions
+33
-2
OrderGoods.php
application/models/DAO/Order/OrderGoods.php
+18
-0
jpush.php
scripts/crontab/push/jpush.php
+15
-2
No files found.
application/models/DAO/Order/OrderGoods.php
View file @
2e0c00bf
...
@@ -260,6 +260,24 @@ class OrderGoodsModel extends \DAO\AbstractModel {
...
@@ -260,6 +260,24 @@ class OrderGoodsModel extends \DAO\AbstractModel {
$res
=
$this
->
db
->
from
(
$this
->
_tableName
)
->
select
(
$this
->
sumGoodsNum
)
->
where
(
$where
)
->
group
(
"buyer_id"
)
->
group
(
"store_id"
)
->
fetchAll
();
$res
=
$this
->
db
->
from
(
$this
->
_tableName
)
->
select
(
$this
->
sumGoodsNum
)
->
where
(
$where
)
->
group
(
"buyer_id"
)
->
group
(
"store_id"
)
->
fetchAll
();
return
$res
;
return
$res
;
}
public
function
getMemberStoreOrderGoodsCountBak
(
$storeIds
,
$memberIds
){
$this
->
setDb
(
$this
->
dbName
);
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
(
DbNameConst
::
salveDBConnectName
);
$whereOrder
[
'store_id'
]
=
array
(
'in'
,
$storeIds
);
$whereOrder
[
'buyer_id'
]
=
array
(
'in'
,
$memberIds
);
$whereOrder
[
'order_state'
]
=
array
(
'in'
,
ArrayConst
::
orderCloseAndCancel
);
$orderIds
=
$orderDao
->
getFieldByWhere
(
$whereOrder
,
'order_id'
);
$where
[
'store_id'
]
=
array
(
'in'
,
$storeIds
);
$where
[
'buyer_id'
]
=
array
(
'in'
,
$memberIds
);
$where
[
'is_refund'
]
=
array
(
'neq'
,
ApiConst
::
refundSuccess
);
if
(
$orderIds
){
$where
[
'order_id'
]
=
array
(
'notin'
,
$orderIds
);
}
$where
=
$this
->
db
->
getSqlWhereByArray
(
$where
);
$res
=
$this
->
db
->
from
(
$this
->
_tableName
)
->
select
(
$this
->
sumGoodsNum
)
->
where
(
$where
)
->
group
(
"buyer_id"
)
->
group
(
"store_id"
)
->
fetchAll
();
return
$res
;
}
}
public
function
convertRefundOrderGoods
(
$orderGoods
,
$orderGoodsId
){
public
function
convertRefundOrderGoods
(
$orderGoods
,
$orderGoodsId
){
$newOrderGoods
=
Array
();
$newOrderGoods
=
Array
();
...
...
scripts/crontab/push/jpush.php
View file @
2e0c00bf
...
@@ -84,8 +84,21 @@ class cliOrderClose extends basecli
...
@@ -84,8 +84,21 @@ class cliOrderClose extends basecli
$stores
=
$goodsCommonService
->
getGoodsCount
(
$storesIds
);
$stores
=
$goodsCommonService
->
getGoodsCount
(
$storesIds
);
if
(
!
empty
(
$stores
)){
if
(
!
empty
(
$stores
)){
foreach
(
$stores
as
$store
){
foreach
(
$stores
as
$store
){
$addData
=
array
(
'storeId'
=>
$store
[
'storeId'
],
'type'
=>
\Our\ApiConst
::
messageGoodsAlert
,
'op'
=>
\Our\NameConst
::
set
,
'alertCount'
=>
$store
[
'count'
],
'params'
=>
array
());
$push
=
\Our\Push
::
getInstance
();
$push
->
addOneToClient
(
$addData
);
$pushData
=
array
(
'storeId'
=>
$store
[
'storeId'
],
'type'
=>
\Our\ApiConst
::
messageGoodsAlert
,
'waitReceiveCount'
=>
ApiConst
::
zero
,
'waitDeliveryCount'
=>
0
,
'waitGetCount'
=>
0
,
'orderCount'
=>
ApiConst
::
zero
,
'waitRefundProccessCount'
=>
ApiConst
::
zero
,
'waitRefundReceiveCount'
=>
ApiConst
::
zero
,
'refundCount'
=>
ApiConst
::
zero
,
'alertCount'
=>
$store
[
'count'
],
'params'
=>
array
(
'c'
=>
'shopkeeper'
,
'm'
=>
'orderDetail'
,
'orderId'
=>
$store
[
'orderId'
]));
$push
->
addOneToClient
(
$pushData
);
}
}
}
}
...
...
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