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
9f12a21f
Commit
9f12a21f
authored
Nov 21, 2018
by
zhz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into master_dev
parents
24361181
baa6c650
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
109 additions
and
67 deletions
+109
-67
ArrayConst.php
application/library/Our/ArrayConst.php
+2
-2
MessageService.php
application/models/Business/Message/MessageService.php
+10
-2
OrderService.php
application/models/Business/Order/OrderService.php
+1
-0
RefundService.php
application/models/Business/Order/RefundService.php
+2
-1
MessageHistory.php
application/models/DAO/MessageHistory.php
+5
-1
Order.php
application/models/DAO/Order/Order.php
+2
-1
Store.php
application/models/DAO/Store.php
+83
-59
news_server.php
scripts/crontab/push/news_server.php
+4
-1
No files found.
application/library/Our/ArrayConst.php
View file @
9f12a21f
...
...
@@ -157,8 +157,8 @@ class ArrayConst
);
const
defaultDeliveryMan
=
array
(
'id'
=>
0
,
'trueName'
=>
'
配送员a
'
,
'mobile'
=>
'
18650329907
'
,
'trueName'
=>
''
,
'mobile'
=>
''
,
);
const
messageOrderButtonsType
=
array
(
0
,
1
,
2
...
...
application/models/Business/Message/MessageService.php
View file @
9f12a21f
...
...
@@ -251,6 +251,10 @@ class MessageServiceModel extends \Business\AbstractModel
*/
public
function
getMemberList
(
$memberId
,
$selfType
,
$toId
,
$otherId
,
$toType
=
ApiConst
::
systemMessageType
,
$field
=
'*'
,
$pageIndex
=
ApiConst
::
pageIndex
,
$pageSize
=
ApiConst
::
pageSize
)
{
if
(
$memberId
==
$toId
){
$toType
=
ApiConst
::
storeMessageType
;
$selfType
=
ApiConst
::
memberMessageType
;
}
$messageHistory
=
\DAO\MessageHistoryModel
::
getInstance
();
$self
=
$this
->
getUserByMemberIdAndSelfType
(
$memberId
,
$selfType
);
if
(
empty
(
$toId
))
{
...
...
@@ -352,6 +356,10 @@ class MessageServiceModel extends \Business\AbstractModel
public
function
update
(
$fromId
,
$fromType
,
$toId
,
$toType
)
{
if
(
$fromId
==
$toId
){
$fromType
=
ApiConst
::
memberMessageType
;
$toType
=
ApiConst
::
storeMessageType
;
}
$messageHistoryDao
=
\DAO\MessageHistoryModel
::
getInstance
();
$messageOneDao
=
\DAO\MessageOneModel
::
getInstance
();
$messageOneDao
->
setDb
(
DbNameConst
::
masterDBConnectName
);
...
...
@@ -359,8 +367,8 @@ class MessageServiceModel extends \Business\AbstractModel
$isSuccess
=
$messageHistoryDao
->
updateByFromIdAndSelfTypeAndToIdAndToType
(
$fromId
,
$fromType
,
$toId
,
$toType
);
$memberDb0Redis
=
\Redis\Db0\MemberRedisModel
::
getInstance
();
if
(
$isSuccess
){
$isSuccess
=-
1
*
$isSuccess
;
$memberDb0Redis
->
tableHIncrBy
(
$fromId
,
'unread_message_count'
,
$isSuccess
);
$isSuccess
=-
1
*
$isSuccess
;
$memberDb0Redis
->
tableHIncrBy
(
$fromId
,
'unread_message_count'
,
$isSuccess
);
}
return
$isSuccess
;
...
...
application/models/Business/Order/OrderService.php
View file @
9f12a21f
...
...
@@ -292,6 +292,7 @@ class OrderServiceModel extends \Business\AbstractModel
$returnData
[
'diliverymanId'
]
=
ApiConst
::
zero
;
$returnData
[
'deliveryman'
]
=
new
\stdClass
();
}
$returnData
[
'offlinePayway'
]
=
$storeDao
->
convertOfflinePayway
(
$returnData
[
'offlinePayway'
]);
$returnData
[
'storeMemberId'
]
=
$this
->
store
[
'memberId'
];
$returnData
[
'totalGoodsNum'
]
=
$orderGoodsDao
->
getGoodsCount
(
$this
->
orderGoodsList
);
$returnData
[
'offlinePayway'
]
=
$this
->
store
[
'offlinePayway'
]
?
$this
->
store
[
'offlinePayway'
]
:
''
;
...
...
application/models/Business/Order/RefundService.php
View file @
9f12a21f
...
...
@@ -942,7 +942,8 @@ class RefundServiceModel extends \Business\AbstractModel
if
(
$info
[
'refundShippingType'
]
==
ApiConst
::
bySeller
){
if
(
$info
[
'returnType'
]
==
ApiConst
::
returnTypeMustReturn
){
if
(
!
$info
[
'diliverymanId'
]){
$info
[
'diliveryman'
]
=
ArrayConst
::
defaultDeliveryMan
;
$info
[
'diliveryman'
]
=
new
\stdClass
();
// $info['diliveryman']=ArrayConst::defaultDeliveryMan;
}
else
{
$diliveryMan
=
$diliveryManDao
->
findById
(
$info
[
'diliverymanId'
]);
if
(
!
empty
(
$diliveryMan
)){
...
...
application/models/DAO/MessageHistory.php
View file @
9f12a21f
...
...
@@ -72,7 +72,11 @@ class MessageHistoryModel extends \DAO\AbstractModel {
}
public
function
updateByFromIdAndSelfTypeAndToIdAndToType
(
$fromId
,
$fromType
,
$toId
,
$toType
){
$where
=
Common
::
format
(
" (((fromId=
{
0
}
and toId=
{
1
}
and toType=
{
2
}
and fromType=
{
3
}
) and status=0))"
,
$toId
,
$fromId
,
$fromType
,
$toType
);
if
(
$fromId
!=
$toId
){
$where
=
Common
::
format
(
" (((fromId=
{
0
}
and toId=
{
1
}
and toType=
{
2
}
and fromType=
{
3
}
) and status=0))"
,
$toId
,
$fromId
,
$fromType
,
$toType
);
}
else
{
$where
=
Common
::
format
(
" (((fromId=
{
0
}
and toId=
{
1
}
and toType=
{
2
}
and fromType=
{
3
}
) and status=0))"
,
$toId
,
$fromId
,
$toType
,
$fromType
);
}
$data
[
'status'
]
=
ApiConst
::
read
;
return
$this
->
updateByWhere
(
$where
,
$data
);
}
...
...
application/models/DAO/Order/Order.php
View file @
9f12a21f
...
...
@@ -1035,7 +1035,8 @@ class OrderModel extends \DAO\AbstractModel
'buyerId'
=>
'buyer_id'
,
'deliveryTime'
=>
'delivery_time'
,
'evaluationState'
=>
'evaluation_state'
,
'orderNote'
=>
'order_note'
'orderNote'
=>
'order_note'
,
'isReceivePayment'
=>
'is_receive_payment'
);
}
...
...
application/models/DAO/Store.php
View file @
9f12a21f
This diff is collapsed.
Click to expand it.
scripts/crontab/push/news_server.php
View file @
9f12a21f
...
...
@@ -107,7 +107,10 @@ $serv->on('Message', function($server, $frame) use($conf){
$sendMessage
[
'toType'
]
=
$rev_data
[
'toType'
];
if
(
!
empty
(
$sendFd
)){
echo
'发送fd:'
.
$sendFd
;
$server
->
push
(
$sendFd
,
responseJson
(
1
,
"fromMsg"
,
"success"
,
$sendMessage
));
if
(
$sendFd
!=
$frame
->
fd
){
$server
->
push
(
$sendFd
,
responseJson
(
1
,
"fromMsg"
,
"success"
,
$sendMessage
));
}
}
echo
'afterSendFd:'
.
$sendFd
;
}
...
...
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