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
0047b73c
Commit
0047b73c
authored
Aug 28, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc
parent
13c61da8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
12 deletions
+20
-12
ShopkeeperService.php
application/models/Business/Store/ShopkeeperService.php
+14
-6
news_server.php
scripts/crontab/push/news_server.php
+6
-6
No files found.
application/models/Business/Store/ShopkeeperService.php
View file @
0047b73c
...
@@ -481,13 +481,21 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
...
@@ -481,13 +481,21 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$this
->
taskSize
=
PageConst
::
taskPageSize
;
$this
->
taskSize
=
PageConst
::
taskPageSize
;
do
{
do
{
$addDatas
=
array
();
$addDatas
=
array
();
$where
[
'add_time'
]
=
Common
::
format
(
" add_time>=
{
0
}
and add_time<
"
,
$beginTime
,
TIMESTAMP
);
$where
=
Common
::
format
(
" add_time>=
{
0
}
and add_time<
{
1
}
"
,
$beginTime
,
TIMESTAMP
);
$orders
=
$orderDao
->
getList
(
$where
,
$orderDao
->
_primaryKey
,
$this
->
taskIndex
,
$this
->
taskSize
,
$orderField
=
'add_time'
,
$sort
=
'desc'
);
$orders
=
$orderDao
->
getList
(
$where
,
'order_id as orderId,delete_state as deleteState,order_sn as orderSn'
,
$this
->
taskIndex
,
$this
->
taskSize
,
array
(
'add_time'
=>
'desc'
)
);
if
(
!
empty
(
$orders
[
'list'
])){
if
(
!
empty
(
$orders
[
'list'
])){
$orderIds
=
array_column
(
$orders
[
'list'
],
$orderDao
->
_primaryKey
);
$indexs
=
array
();
$resultOrders
=
array
();
$orderIds
=
array_column
(
$orders
[
'list'
],
'orderId'
);
foreach
(
$orders
as
$order
){
$orderGoods
=
$orderGoodDao
->
getOrderGoodsByOrderIds
(
$orderIds
,
'order_id as orderId,goods_name as goodsName'
);
$resultOrders
=
Common
::
intergrateOneToMany
(
$orders
[
'list'
],
$orderGoods
,
'orderId'
,
'orderId'
,
'orderGoods'
);
foreach
(
$resultOrders
as
$result
){
$one
[
'orderId'
]
=
$result
[
'orderId'
];
$one
[
'orderSn'
]
=
$result
[
'orderSn'
];
$namesArr
=
array_column
(
$result
[
'orderGoods'
],
'goodsName'
);
$nameStr
=
implode
(
','
,
$namesArr
);
$one
[
'goodsName'
]
=
$nameStr
;
$one
[
'orderId'
]
=
$result
[
'orderId'
];
array_push
(
$indexs
,
$one
);
}
}
}
}
$storeMemberStatisticData
=
$orderGoodDao
->
getMemberStoreStaticsByCreateTime
(
$beginTime
,
$this
->
taskIndex
,
$this
->
taskSize
);
$storeMemberStatisticData
=
$orderGoodDao
->
getMemberStoreStaticsByCreateTime
(
$beginTime
,
$this
->
taskIndex
,
$this
->
taskSize
);
...
...
scripts/crontab/push/news_server.php
View file @
0047b73c
...
@@ -58,13 +58,13 @@ $serv->on('Message', function($server, $frame) use($conf){
...
@@ -58,13 +58,13 @@ $serv->on('Message', function($server, $frame) use($conf){
$rev_data
=
$rev_data
[
'data'
];
$rev_data
=
$rev_data
[
'data'
];
$realKey
=
KEY_REDIS_PRE
.
$key
;
$realKey
=
KEY_REDIS_PRE
.
$key
;
$sessData
=
$redis
->
get
(
$realKey
);
$sessData
=
$redis
->
get
(
$realKey
);
$sessDataSpilt1
=
explode
(
';'
,
$sessData
);
//
$sessDataSpilt1=explode(';',$sessData);
$sessDataSpilt2
=
explode
(
'|'
,
$sessDataSpilt1
[
1
]);
//
$sessDataSpilt2=explode('|',$sessDataSpilt1[1]);
$sessDataSpilt3
=
explode
(
':'
,
$sessDataSpilt2
[
1
]);
//
$sessDataSpilt3=explode(':', $sessDataSpilt2[1]);
$res
=
$sessDataSpilt3
[
1
];
//
$res= $sessDataSpilt3[1];
$matchs
=
array
();
$matchs
=
array
();
preg_match
(
"/
\d+
/i"
,
$res
,
$matchs
);
preg_match
(
"/
member_id\|i:(\d+)
/i"
,
$res
,
$matchs
);
$memberId
=
$matchs
[
0
];
$memberId
=
$matchs
[
1
];
$messageService
=
\Business\Message\MessageServiceModel
::
getInstance
();
$messageService
=
\Business\Message\MessageServiceModel
::
getInstance
();
$sendFd
=
$redis
->
hGet
(
KEY_PRE
.
$rev_data
[
'toId'
],
'fd'
);
$sendFd
=
$redis
->
hGet
(
KEY_PRE
.
$rev_data
[
'toId'
],
'fd'
);
...
...
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