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
4b092fcc
Commit
4b092fcc
authored
Nov 09, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单确认相关
parent
555e2fa7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
291 additions
and
58 deletions
+291
-58
OrderConfirmUtil.php
application/library/Order/OrderConfirmUtil.php
+171
-9
CartService.php
application/models/Business/Cart/CartService.php
+3
-3
AddressService.php
application/models/Business/User/AddressService.php
+0
-1
DeliveryFormula.php
application/models/DAO/DeliveryFormula.php
+104
-43
FavoritesStore.php
application/models/DAO/FavoritesStore.php
+1
-1
Goods.php
application/models/DAO/Goods.php
+1
-0
CodeConfig.php
application/models/Error/CodeConfig.php
+11
-1
No files found.
application/library/Order/OrderConfirmUtil.php
View file @
4b092fcc
This diff is collapsed.
Click to expand it.
application/models/Business/Cart/CartService.php
View file @
4b092fcc
...
...
@@ -663,7 +663,7 @@ class CartServiceModel extends \Business\AbstractModel{
* @param $address
* @param $storeCartData
*/
public
function
getDeliveryTypeForCartNew
(
$address
,
$storeCartData
,
$dbName
=
\Our\DbNameConst
::
salveDBConnectName
){
public
function
getDeliveryTypeForCartNew
(
$address
,
$storeCartData
,
$dbName
=
\Our\DbNameConst
::
salveDBConnectName
,
$checkFlag
=
false
){
$storeIds
=
$storeCartData
[
'storeIds'
];
$storeDao
=
\DAO\StoreModel
::
getInstance
();
$deliveryFormulaDao
=
\DAO\DeliveryFormulaModel
::
getInstance
(
$dbName
);
...
...
@@ -715,7 +715,7 @@ class CartServiceModel extends \Business\AbstractModel{
$storeDistance
=
\Our\CommonExtension
::
getDistance
(
$address
[
'lat'
],
$address
[
'lng'
],
$store
[
'store_latitude'
],
$store
[
'store_longitude'
],
\Our\ApiConst
::
one
);
if
(
$result
){
$deliverySetting
[
'inServiceAreaFlag'
]
=
\Our\ApiConst
::
one
;
$deliverTimeList
=
$deliveryFormulaDao
->
getDeliveryFormulaForCartNew
(
$store
,
$store
Distance
,
$deliveryFree
Flag
);
$deliverTimeList
=
$deliveryFormulaDao
->
getDeliveryFormulaForCartNew
(
$store
,
$store
Carts
,
$storeDistance
,
$deliveryFreeFlag
,
$check
Flag
);
if
(
$deliverTimeList
){
$deliverySetting
[
'deliverTimeList'
]
=
$deliverTimeList
[
'timeList'
];
$storeCartData
[
'cartList'
][
$storeId
][
'storeDistance'
]
=
$storeDistance
;
...
...
@@ -1244,7 +1244,7 @@ class CartServiceModel extends \Business\AbstractModel{
function
addOrder
(
$data
,
$memberId
,
$currentAddress
){
$orderUtil
=
\Order\OrderConfirmUtil
::
getInstance
();
$return
=
$orderUtil
->
addOrder
(
$data
,
$memberId
,
$currentAddress
);
$return
=
$orderUtil
->
addOrder
(
$data
,
$memberId
,
$currentAddress
,
true
);
//删除订单列表缓存
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
();
$orderDao
->
deleteOrderCache
(
$memberId
);
...
...
application/models/Business/User/AddressService.php
View file @
4b092fcc
...
...
@@ -309,7 +309,6 @@ class AddressServiceModel extends \Business\AbstractModel {
}
}
return
array
(
'returnAddressId'
=>
$choosedAddressId
,
'choosedAddressFlag'
=>
$choosedAddressFlag
,
'addresses'
=>
$returnAddresses
);
}
public
function
getMyCurrentAddressByMemberId
(
$memberId
){
...
...
application/models/DAO/DeliveryFormula.php
View file @
4b092fcc
This diff is collapsed.
Click to expand it.
application/models/DAO/FavoritesStore.php
View file @
4b092fcc
...
...
@@ -48,7 +48,7 @@ class FavoritesStoreModel extends \DAO\AbstractModel {
return
$this
->
db
->
fetchAll
();
}
public
function
getOne
(
$field
,
$where
,
$order
=
array
(
'fav_time'
=>
'desc'
)){
public
function
getOne
(
$field
,
$where
,
$order
=
array
(
'fav_time'
=>
'desc'
,
'favid'
=>
'desc'
)){
$this
->
setDb
(
$this
->
dbName
);
if
(
$order
){
foreach
(
$order
as
$key
=>
$value
){
...
...
application/models/DAO/Goods.php
View file @
4b092fcc
...
...
@@ -310,6 +310,7 @@ class GoodsModel extends \DAO\AbstractModel {
if
(
isset
(
$returnData
[
$temp
[
'goods_commonid'
]][
'is_transport'
])){
continue
;
}
$returnData
[
$temp
[
'goods_commonid'
]][
'delivery_template_id'
]
=
$temp
[
'delivery_template_id'
];
$returnData
[
$temp
[
'goods_commonid'
]][
'is_transport'
]
=
$temp
[
'is_transport'
];
$returnData
[
$temp
[
'goods_commonid'
]][
'transport_id'
]
=
$temp
[
'transport_id'
];
$returnData
[
$temp
[
'goods_commonid'
]][
'goods_freight'
]
=
$temp
[
'goods_freight'
];
...
...
application/models/Error/CodeConfig.php
View file @
4b092fcc
...
...
@@ -284,6 +284,11 @@ class CodeConfigModel
const
notExsitOrder
=
300112
;
const
alreadyExsitRefundGoods
=
300113
;
const
notAllowDelete
=
300114
;
const
emptyDeliveryTime
=
300115
;
const
wrongDeliveryTime
=
300116
;
const
wrongBuyerTimeRangeForOrder
=
300117
;
const
emptyBuyerMobile
=
300118
;
const
wrongBuyerMobile
=
300119
;
const
noExpressDeliveryForOrder1
=
30115
;
const
goodsNoStoreForCartOrOrder1
=
30116
;
...
...
@@ -707,6 +712,11 @@ class CodeConfigModel
self
::
notExsitOrder
=>
'订单不存在'
,
self
::
alreadyExsitRefundGoods
=>
'退款订单已经存在'
,
self
::
notAllowDelete
=>
'当前订单状态不允许删除'
,
self
::
emptyDeliveryTime
=>
'配送时间或者自提时间不能为空'
,
self
::
wrongDeliveryTime
=>
'配送时间格式错误'
,
self
::
wrongBuyerTimeRangeForOrder
=>
'自提时间点错误'
,
self
::
emptyBuyerMobile
=>
'自提人手机号码不能为空'
,
self
::
wrongBuyerMobile
=>
'自提人手机号码格式错误'
,
self
::
platFormAreadyIn
=>
'您已经申请过平台介入'
,
self
::
deleteError
=>
'放入回收站失败,订单状态有误'
,
self
::
restoreError
=>
'永久删除、从回收站还原失败,订单状态有误'
,
...
...
@@ -764,7 +774,7 @@ class CodeConfigModel
self
::
emptyOrderForPay
=>
'支付的订单不存在'
,
self
::
emptyOrderIdForPay
=>
'订单ID不能为空'
,
self
::
noRightForOrder
=>
'您没有该订单权限'
,
self
::
wrongPayForOrder
=>
'
该订单无需线上支付
'
,
self
::
wrongPayForOrder
=>
'
订单状态发生改变,请刷新后重试
'
,
self
::
newPaySnInsertFailed
=>
'新订单支付参数生成失败'
,
self
::
updateOrderForPayFailed
=>
'唤起支付时更新订单失败'
,
self
::
noOrderListForPaySn
=>
'当前paySn没有找到对应订单列表'
,
...
...
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