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
79effe5d
Commit
79effe5d
authored
Nov 03, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modifyorderAmount
parent
2dd6a3ea
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
72 additions
and
8 deletions
+72
-8
ApiConst.php
application/library/Our/ApiConst.php
+2
-0
DescribeConst.php
application/library/Our/DescribeConst.php
+4
-0
OrderService.php
application/models/Business/Order/OrderService.php
+16
-3
ShopkeeperService.php
application/models/Business/Store/ShopkeeperService.php
+2
-2
CodeConfig.php
application/models/Error/CodeConfig.php
+2
-0
Shopkeeper.php
application/modules/Client/controllers/Shopkeeper.php
+26
-3
modifyOrderAmount.php
public/client/shopkeeper/modifyOrderAmount.php
+20
-0
No files found.
application/library/Our/ApiConst.php
View file @
79effe5d
...
@@ -446,6 +446,8 @@ class ApiConst
...
@@ -446,6 +446,8 @@ class ApiConst
const
arriveTimeRadius
=
1800
;
const
arriveTimeRadius
=
1800
;
const
arrBegin
=
0
;
...
...
application/library/Our/DescribeConst.php
View file @
79effe5d
...
@@ -171,5 +171,9 @@ class DescribeConst
...
@@ -171,5 +171,9 @@ class DescribeConst
const
anonymity
=
'匿名用户'
;
const
anonymity
=
'匿名用户'
;
const
imageMessage
=
'【图片】'
;
const
imageMessage
=
'【图片】'
;
const
updateSuccess
=
'修改成功'
;
const
updateFail
=
'修改失败'
;
}
}
?>
?>
\ No newline at end of file
application/models/Business/Order/OrderService.php
View file @
79effe5d
...
@@ -745,9 +745,6 @@ class OrderServiceModel extends \Business\AbstractModel
...
@@ -745,9 +745,6 @@ class OrderServiceModel extends \Business\AbstractModel
echo
'物流信息更新成功订单号:'
.
$result
[
'orderId'
]
.
"
\r\n
"
;
echo
'物流信息更新成功订单号:'
.
$result
[
'orderId'
]
.
"
\r\n
"
;
}
}
};
};
}
}
/**
/**
...
@@ -826,6 +823,22 @@ class OrderServiceModel extends \Business\AbstractModel
...
@@ -826,6 +823,22 @@ class OrderServiceModel extends \Business\AbstractModel
}
}
public
function
updateOrderAmount
(
$storeId
,
$orderId
,
$newOrderAmount
)
{
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
$orderDetail
=
$orderDao
->
getByOrderId
(
$orderId
,
$orderDao
->
getOrderDetailField
());
$orderDetail
=
$orderDetail
[
ApiConst
::
arrBegin
];
if
(
$orderDetail
[
'storeId'
]
!=
$storeId
){
ErrorModel
::
throwException
(
CodeConfigModel
::
orderNotExist
);
}
if
(
$orderDetail
[
'isReceivePayment'
]
!=
ApiConst
::
noreceivePayment
){
ErrorModel
::
throwException
(
CodeConfigModel
::
notAllowUpdataOrderAmount
);
}
$data
[
'order_amount'
]
=
$newOrderAmount
;
$res
=
$orderDao
->
updateByOrderId
(
$data
,
$orderId
);
return
$res
;
}
/**
/**
* 获得配送详情
* 获得配送详情
*
*
...
...
application/models/Business/Store/ShopkeeperService.php
View file @
79effe5d
...
@@ -307,8 +307,8 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
...
@@ -307,8 +307,8 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
}
}
if
(
$this
->
clientType
&&
$this
->
clientType
==
NameConst
::
pcClient
)
{
if
(
$this
->
clientType
&&
$this
->
clientType
==
NameConst
::
pcClient
)
{
$value
[
'couponAmount'
]
=
(
$value
[
'goodsAmount'
]
+
$value
[
'shippingFee'
])
-
$value
[
'orderAmount'
];
//优惠券金额
$value
[
'couponAmount'
]
=
(
$value
[
'goodsAmount'
]
+
$value
[
'shippingFee'
])
-
$value
[
'orderAmount'
];
//优惠券金额
$value
[
'receiveAmount'
]
=
$value
[
'goodsAmount'
]
-
$value
[
'couponAmount'
];
$value
[
'receiveAmount'
]
=
$value
[
'goodsAmount'
]
+
$value
[
'shippingFee'
]
-
$value
[
'couponAmount'
];
$value
[
'orderAmount'
]
=
$value
[
'orderAmount'
]
+
$value
[
'coupon
Amount'
];
// $value['orderAmount'] = $value['order
Amount'];
$value
[
'reciverInfo'
]
=
unserialize
(
$value
[
'reciverInfo'
]);
$value
[
'reciverInfo'
]
=
unserialize
(
$value
[
'reciverInfo'
]);
$value
[
'dlyoPickupCode'
]
=
intval
(
substr
(
$value
[
'orderSn'
],
ApiConst
::
positionPickupCodeBegin
));
$value
[
'dlyoPickupCode'
]
=
intval
(
substr
(
$value
[
'orderSn'
],
ApiConst
::
positionPickupCodeBegin
));
$value
[
'deliveryTimeEnd'
]
=
$value
[
'deliveryTime'
]
+
ApiConst
::
arriveTimeRadius
;
$value
[
'deliveryTimeEnd'
]
=
$value
[
'deliveryTime'
]
+
ApiConst
::
arriveTimeRadius
;
...
...
application/models/Error/CodeConfig.php
View file @
79effe5d
...
@@ -292,6 +292,7 @@ class CodeConfigModel
...
@@ -292,6 +292,7 @@ class CodeConfigModel
const
addDeliveryManError
=
300124
;
const
addDeliveryManError
=
300124
;
const
updateOrderFail
=
300120
;
const
updateOrderFail
=
300120
;
const
selectDeliveryFail
=
300121
;
const
selectDeliveryFail
=
300121
;
const
notAllowUpdataOrderAmount
=
300125
;
const
noEnoughStorageForBundlingGoods
=
30118
;
const
noEnoughStorageForBundlingGoods
=
30118
;
const
noOrderWaitToPay
=
30119
;
const
noOrderWaitToPay
=
30119
;
const
wrongEvaluation
=
30120
;
const
wrongEvaluation
=
30120
;
...
@@ -778,6 +779,7 @@ class CodeConfigModel
...
@@ -778,6 +779,7 @@ class CodeConfigModel
self
::
selectDeliveryFail
=>
'配送员选择失败'
,
self
::
selectDeliveryFail
=>
'配送员选择失败'
,
self
::
noEnoughStorageForBundlingGoods
=>
'组合销售库存紧张,您购买的数量太多啦'
,
self
::
noEnoughStorageForBundlingGoods
=>
'组合销售库存紧张,您购买的数量太多啦'
,
self
::
noOrderWaitToPay
=>
'您的订单已支付,请勿重复支付'
,
self
::
noOrderWaitToPay
=>
'您的订单已支付,请勿重复支付'
,
self
::
notAllowUpdataOrderAmount
=>
'当前状态不允许修改订单金额'
,
self
::
wrongEvaluation
=>
'商品评论应在6-500字之间'
,
self
::
wrongEvaluation
=>
'商品评论应在6-500字之间'
,
self
::
selfGoodsForStoreOrder
=>
'店主不能购买自己的商品'
,
self
::
selfGoodsForStoreOrder
=>
'店主不能购买自己的商品'
,
//销售员
//销售员
...
...
application/modules/Client/controllers/Shopkeeper.php
View file @
79effe5d
...
@@ -278,9 +278,9 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
...
@@ -278,9 +278,9 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
}
}
/**
/**
* 确认收货
* 确认收货
* @throws Exception
* @throws Exception
*/
*/
public
function
confirmReceiveAction
(){
public
function
confirmReceiveAction
(){
$refundId
=
intval
(
$this
->
req
[
'data'
][
'refundId'
]);
$refundId
=
intval
(
$this
->
req
[
'data'
][
'refundId'
]);
if
(
!
$refundId
)
{
if
(
!
$refundId
)
{
...
@@ -293,6 +293,8 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
...
@@ -293,6 +293,8 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
}
}
/**
/**
* 获取应用版本
* 获取应用版本
*/
*/
...
@@ -328,6 +330,27 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
...
@@ -328,6 +330,27 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
$this
->
success
(
$res
);
$this
->
success
(
$res
);
}
}
/**
* 修改订单金额
* @throws Exception
*/
public
function
modifyOrderAmountAction
(){
$orderId
=
intval
(
$this
->
req
[
'data'
][
'orderId'
]);
$orderAmount
=
intval
(
$this
->
req
[
'data'
][
'orderAmount'
]);
if
(
empty
(
$orderId
)
&&
empty
(
$orderAmount
))
{
ErrorModel
::
throwException
(
CodeConfigModel
::
paramsError
);
}
$orderService
=
\Business\Order\OrderServiceModel
::
getInstance
();
$res
=
$orderService
->
updateOrderAmount
(
$this
->
storeId
,
$orderId
,
$orderAmount
);
if
(
$res
!==
false
){
$this
->
success
(
$res
,
\Our\DescribeConst
::
updateSuccess
);
}
ErrorModel
::
throwException
(
CodeConfigModel
::
commonError
);
}
}
}
public/client/shopkeeper/modifyOrderAmount.php
0 → 100644
View file @
79effe5d
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
<title>
简单的html5 File测试 for pic2base64
</title>
<style>
</style>
</head>
<body>
<form
action=
"/client/shopkeeper/modifyOrderAmount"
method=
"post"
>
用户登录状态key:
<input
name=
"data[key]"
value=
"bd9b675342850f741b1818aa74aa63a8"
/><br
/>
订单id:
<input
name=
"data[orderId]"
value=
"403"
/><br
/>
订单价格:
<input
name=
"data[orderAmount]"
value=
"10"
/><br
/>
<p
id=
"img_area"
></p>
<input
type=
"submit"
value=
"提交"
>
</form>
</body>
</html>
\ No newline at end of file
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