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
9aaa6fc9
Commit
9aaa6fc9
authored
Dec 01, 2018
by
christ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
orderChangePrice
parent
cb645e8a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
6 deletions
+9
-6
Common.php
application/library/Our/Common.php
+2
-2
Push.php
application/library/Our/Push.php
+4
-4
OrderService.php
application/models/Business/Order/OrderService.php
+2
-0
ShopkeeperService.php
application/models/Business/Store/ShopkeeperService.php
+1
-0
No files found.
application/library/Our/Common.php
View file @
9aaa6fc9
...
...
@@ -278,8 +278,8 @@ class Common
$result
=
trim
(
$result
);
return
$result
;
}
public
static
function
getDivNum
(){
public
static
function
getDivNum
(
$num
){
return
bcdiv
(
$num
,
100
,
2
);
}
public
static
function
mutiplicative
(
$num
){
return
intval
(
bcmul
(
$num
,
\Our\ApiConst
::
oneHandred
));
...
...
application/library/Our/Push.php
View file @
9aaa6fc9
...
...
@@ -245,10 +245,10 @@ class Push
$messageContent
.=
'收货地址:'
.
$orderDetail
[
'reciverInfo'
][
'address'
]
.
"
\n
"
;
$messageContent
.=
'收货人:'
.
$orderDetail
[
'reciverInfo'
][
'trueName'
]
.
"
\n
"
;
$messageContent
.=
'收货人电话:'
.
$orderDetail
[
'reciverInfo'
][
'mobPhone'
]
.
"
\n
"
;
$messageContent
.=
'订单金额:'
.
$orderDetail
[
'goodsAmount'
]
.
"
\n
"
;
$messageContent
.=
'运费:'
.
$orderDetail
[
'shippingFee'
]
.
"
\n
"
;
$messageContent
.=
'优惠金额:'
.
$orderDetail
[
'couponAmount'
]
.
"
\n
"
;
$messageContent
.=
'应付金额:'
.
$orderDetail
[
'orderAmount'
]
.
"
\n
"
;
$messageContent
.=
'订单金额:'
.
Common
::
getDivNum
(
$orderDetail
[
'goodsAmount'
])
.
"
\n
"
;
$messageContent
.=
'运费:'
.
Common
::
getDivNum
(
$orderDetail
[
'shippingFee'
])
.
"
\n
"
;
$messageContent
.=
'优惠金额:'
.
Common
::
getDivNum
(
$orderDetail
[
'couponAmount'
])
.
"
\n
"
;
$messageContent
.=
'应付金额:'
.
Common
::
getDivNum
(
$orderDetail
[
'orderAmount'
])
.
"
\n
"
;
return
$messageContent
;
}
...
...
application/models/Business/Order/OrderService.php
View file @
9aaa6fc9
...
...
@@ -973,6 +973,7 @@ class OrderServiceModel extends \Business\AbstractModel
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
$orderLogDao
=
\DAO\Order\OrderLogModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
$orderDetail
=
$orderDao
->
getByOrderId
(
$orderId
,
$orderDao
->
getOrderDetailField
());
$messageService
=
new
\Business\Message\MessageServiceModel
();
$orderDetail
=
$orderDetail
[
ApiConst
::
arrBegin
];
$storeDao
=
\DAO\StoreModel
::
getInstance
();
if
(
$orderDetail
[
'storeId'
]
!=
$storeId
){
...
...
@@ -986,6 +987,7 @@ class OrderServiceModel extends \Business\AbstractModel
$push
=
\Our\Push
::
getInstance
();
$push
->
updateOrderAmount
(
$orderDetail
[
'storeId'
],
$orderDetail
[
'orderId'
],
$orderDetail
[
'orderSn'
]);
$push
->
sendTcpMessage
();
$messageService
->
addMessageCenterToDb
();
$orderDao
->
deleteOrderCache
(
$orderDetail
[
'memberId'
],
$orderId
,
$storeId
,
true
);
$storeDao
->
deleteStoreCache
(
$storeId
,
$orderId
);
$orderLogDao
->
add
(
$orderDetail
[
'orderId'
],
ArrayConst
::
logMsgType
[
ApiConst
::
sellerUpdateOrderAmount
],
DescribeConst
::
sellerLog
,
$memberName
,
$orderDetail
[
'orderState'
]);
...
...
application/models/Business/Store/ShopkeeperService.php
View file @
9aaa6fc9
...
...
@@ -276,6 +276,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
'orderId'
=>
$order
[
'order_id'
]));
$push
->
addOneToClient
(
$pushData
);
$push
->
sendTcpMessage
();
$push
->
addOneToClient
();
// \Our\RedisHelper::rpush('client_push',array('storeId'=>$order['storeId'],'type'=>ApiConst::messageWaitReceive,'op'=>NameConst::reduce,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'orderDetail','orderId'=>$order['orderId'])));
//\Our\RedisHelper::rpush('client_push',array('storeId'=>$order['storeId'],'type'=>$type,'op'=>NameConst::add,'num'=>ApiConst::one,'params'=>array('c'=>'shopkeeper','m'=>'orderDetail','orderId'=>$order['orderId'])));
$orderDao
->
deleteOrderCache
(
$order
[
'buyer_id'
],
$orderId
,
$order
[
'store_id'
],
true
);
...
...
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