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
28983176
Commit
28983176
authored
Dec 19, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into lyz_version1
parents
6a1b2a56
29ef3685
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
29 deletions
+41
-29
OrderConfirmUtil.php
application/library/Order/OrderConfirmUtil.php
+2
-2
ImageConst.php
application/library/Our/ImageConst.php
+1
-1
RefundService.php
application/models/Business/Order/RefundService.php
+10
-8
ShopkeeperService.php
application/models/Business/Store/ShopkeeperService.php
+20
-12
Abstract.php
application/models/DAO/Abstract.php
+1
-0
RefundReturn.php
application/models/DAO/Order/RefundReturn.php
+1
-0
Delivery.php
application/modules/Client/controllers/Delivery.php
+1
-1
Shopkeeper.php
application/modules/Client/controllers/Shopkeeper.php
+4
-4
url.ini
conf/url.ini
+1
-1
No files found.
application/library/Order/OrderConfirmUtil.php
View file @
28983176
...
...
@@ -1231,12 +1231,12 @@ class OrderConfirmUtil {
}
}
}
$storeGoodsList
[
'gcPrices'
]
=
isset
(
$storeGcCouponPriceArray
);
$storeGoodsList
[
'gcPrices'
]
=
isset
(
$storeGcCouponPriceArray
)
?
$storeGcCouponPriceArray
:
array
()
;
$storeGoodsList
[
'goodsCommonPrices'
]
=
$storeGoodsCommonCouponPriceArray
;
$storeGoodsList
[
'storeCouponPrice'
]
=
$storeCouponPrice
;
$reliefAmount
=
$cartService
->
getOneCouponReliefAmount
(
$coupon
,
$storeGoodsList
);
if
(
$reliefAmount
&&
$reliefAmount
>
\Our\ApiConst
::
zero
){
$totalPrice
=
$totalPrice
-
$reliefAmount
;
$totalPrice
=
(
$reliefAmount
>
$totalPrice
)
?
0
:
(
$totalPrice
-
$reliefAmount
)
;
}
return
$totalPrice
;
}
...
...
application/library/Our/ImageConst.php
View file @
28983176
...
...
@@ -94,7 +94,7 @@ class ImageConst{
4
=>
self
::
reportPath
,
5
=>
self
::
memberAvatar
);
const
ninTyPath
=
'?x-oss-process=image/resize,m_fill,h_90,w_90'
;
const
sizeScale
=
1.5
;
const
goodsListImgSize
=
334
;
const
CommentGoodsImgSize
=
138
;
...
...
application/models/Business/Order/RefundService.php
View file @
28983176
...
...
@@ -482,6 +482,7 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReturnDao
->
db
->
doRollback
();
return
false
;
}
//$this->recordSellerLog('退款处理,退款编号:'.$refund['refund_sn']); //待确认
//记录操作日志
$sellerLogDAO
=
\DAO\SellerLogModel
::
getInstance
();
...
...
@@ -512,14 +513,14 @@ class RefundServiceModel extends \Business\AbstractModel
'refundId'
=>
$refund
[
'refund_id'
]));
$push
->
addOneToClient
(
$pushData
);
$push
->
sendTcpMessage
();
return
true
;
}
if
(
$refundAmount
>
$refund
[
'buyer_refund_amount'
]){
//showDialog('退款金额不可大于本订单支付金额','','error');
$refundReturnDao
->
db
->
doRollback
();
return
false
;
return
true
;
}
// if($refundAmount > $refund['buyer_refund_amount']){
// //showDialog('退款金额不可大于本订单支付金额','','error');
// $refundReturnDao->db->doRollback();
// return false;
// }
//以下为同意退款流程
if
(
$order_info
[
'order_state'
]
==
40
){
//交易完成订单,退积分
...
...
@@ -1258,8 +1259,9 @@ class RefundServiceModel extends \Business\AbstractModel
$refundArray
[
'refund_shipping_type'
]
=
isset
(
$refund
[
'refundShippingType'
])
?
$refund
[
'refundShippingType'
]
:
ApiConst
::
zero
;
$refundArrayUnLine
=
Common
::
convertUnderline
(
$refundArray
);
$state
=
$refundReturnDao
->
addRefundReturn
(
$refundArray
,
$orderInfo
,
$orderGoods
);
$updateOrderData
[
'refund_amount'
]
=
$orderInfo
[
'refundAmount'
]
+
$refundArray
[
'refund_amount'
];
$updateOrderData
[
'origin_refund_amount'
]
=
$orderInfo
[
'origin_refund_amount'
]
+
$originRefundAmount
;
$updateOrderData
[
'refund_amount'
]
=
$orderInfo
[
'refundAmount'
]
+
$refundAmount
;
$updateOrderData
[
'origin_refund_amount'
]
=
$orderInfo
[
'originRefundAmount'
]
+
$originRefundAmount
;
$orderDao
->
deleteOrderCache
(
$memberId
,
$orderInfo
[
'orderId'
],
$orderInfo
[
'storeId'
],
true
);
$storeDao
->
deleteStoreCache
(
$orderInfo
[
'storeId'
],
$orderInfo
[
'orderId'
]);
...
...
application/models/Business/Store/ShopkeeperService.php
View file @
28983176
...
...
@@ -237,9 +237,13 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
* @param $orderId
* @return bool
*/
public
function
orderReceive
(
$memberId
,
$orderId
)
public
function
orderReceive
(
$memberId
,
$orderId
,
$isStore
=
false
)
{
$storeId
=
$this
->
_getStoreByMemberId
(
$memberId
);
if
(
$isStore
){
$storeId
=
$memberId
;
}
else
{
$storeId
=
$this
->
_getStoreByMemberId
(
$memberId
);
}
$where
[
'order_id'
]
=
$orderId
;
$where
[
'store_id'
]
=
$storeId
;
$where
[
'order_state'
]
=
ApiConst
::
orderStateWaitConfirm
;
...
...
@@ -490,10 +494,14 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
return
$this
->
orderGoodsField
.
',goods_commonid as goodsCommonid,goods_commonid as goodsCommonId,goods_spec as goodsSpec '
;
}
public
function
getDiliveryManByStoreId
(
$memberId
)
public
function
getDiliveryManByStoreId
(
$memberId
,
$isStoreId
=
false
)
{
$memberDao
=
\DAO\MemberModel
::
getInstance
();
$storeId
=
$memberDao
->
getInfo
(
$memberId
,
'store_id'
);
if
(
$isStoreId
){
$storeId
=
$memberId
;
}
else
{
$storeId
=
$memberDao
->
getInfo
(
$memberId
,
'store_id'
);
}
if
(
empty
(
$storeId
))
{
ErrorModel
::
throwException
(
CodeConfigModel
::
emptyStoreId
);
}
...
...
@@ -505,9 +513,9 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
return
$diliveryMans
;
}
public
function
confirmReceivePayment
(
$memberId
,
$orderId
){
public
function
confirmReceivePayment
(
$memberId
,
$
storeId
,
$
orderId
){
$memberDao
=
\DAO\MemberModel
::
getInstance
();
$storeId
=
$memberDao
->
getInfo
(
$memberId
,
'store_id'
);
//
$storeId = $memberDao->getInfo($memberId, 'store_id');
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
$where
[
'order_id'
]
=
$orderId
;
$where
[
'store_id'
]
=
$storeId
;
...
...
@@ -1084,10 +1092,10 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
}
public
function
getSellerCount
(
$
member
Id
)
public
function
getSellerCount
(
$
store
Id
)
{
$memberDao
=
\DAO\MemberModel
::
getInstance
();
$storeId
=
$memberDao
->
getInfo
(
$memberId
,
'store_id'
);
//
$storeId = $memberDao->getInfo($memberId, 'store_id');
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
(
DbNameConst
::
salveDBConnectName
);
$waitReceiveCount
=
$orderDao
->
getCountByOrderState
(
$storeId
,
ApiConst
::
orderStateWaitConfirm
);
$waitDeliveryCount
=
$orderDao
->
getCountByShippingTypeAndOrderState
(
$storeId
);
...
...
@@ -1095,10 +1103,10 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$orderCount
=
$waitReceiveCount
+
$waitDeliveryCount
+
$waitGetCount
;
return
array
(
'waitReceiveCount'
=>
$waitReceiveCount
,
'waitDeliveryCount'
=>
$waitDeliveryCount
,
'waitGetCount'
=>
$waitGetCount
,
'orderCount'
=>
$orderCount
);
}
public
function
getSellerRefundCount
(
$
member
Id
)
public
function
getSellerRefundCount
(
$
store
Id
)
{
$memberDao
=
\DAO\MemberModel
::
getInstance
();
$storeId
=
$memberDao
->
getInfo
(
$memberId
,
'store_id'
);
//
$storeId = $memberDao->getInfo($memberId, 'store_id');
$refundReturnDao
=
\DAO\Order\RefundReturnModel
::
getInstance
(
DbNameConst
::
salveDBConnectName
);
//待处理
$waitRefundProccessCount
=
$refundReturnDao
->
getCountByRefundState
(
$storeId
);
...
...
@@ -1106,10 +1114,10 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$refundCount
=
$waitRefundProccessCount
+
$waitRefundReceiveCount
;
return
array
(
'waitRefundProccessCount'
=>
$waitRefundProccessCount
,
'waitRefundReceiveCount'
=>
$waitRefundReceiveCount
,
'refundCount'
=>
$refundCount
);
}
public
function
getStorageAlarmCount
(
$
member
Id
)
public
function
getStorageAlarmCount
(
$
store
Id
)
{
$memberDao
=
\DAO\MemberModel
::
getInstance
();
$storeId
=
$memberDao
->
getInfo
(
$memberId
,
'store_id'
);
//
$storeId = $memberDao->getInfo($memberId, 'store_id');
$goodsDao
=
\DAO\GoodsModel
::
getInstance
();
$alertCount
=
$goodsDao
->
getAlertCountByStoreId
(
$storeId
);
return
array
(
'alertCount'
=>
$alertCount
);
...
...
application/models/DAO/Abstract.php
View file @
28983176
...
...
@@ -75,6 +75,7 @@ abstract class AbstractModel {
public
function
lists
(
$where
=
array
(),
$order
=
''
,
$field
=
'*'
,
$pageIndex
=
0
,
$pageSize
=
20
,
$group
=
null
){
$this
->
db
->
from
(
$this
->
_tableName
);
$this
->
db
->
where
(
$where
);
$this
->
db
->
select
(
$field
);
$count
=
$this
->
db
->
fetchNum
();
$this
->
db
->
from
(
$this
->
_tableName
);
$this
->
db
->
where
(
$where
);
...
...
application/models/DAO/Order/RefundReturn.php
View file @
28983176
...
...
@@ -384,6 +384,7 @@ class RefundReturnModel extends \DAO\AbstractModel
if
(
$pics
)
{
foreach
(
$pics
as
$pic
)
{
$readFile
=
\Our\Common
::
getStaticFile
(
$pic
,
ImageConst
::
refund
);
//$readFile.=ImageConst::ninTyPath;
array_push
(
$picsRes
,
$readFile
);
}
}
...
...
application/modules/Client/controllers/Delivery.php
View file @
28983176
...
...
@@ -44,7 +44,7 @@ class DeliveryController extends \Our\Controller_AbstractClient {
* 获得配送员列表
*/
public
function
getDeliveriersAction
(){
$result
=
$this
->
shopkeeperService
->
getDiliveryManByStoreId
(
$this
->
memberId
);
$result
=
$this
->
shopkeeperService
->
getDiliveryManByStoreId
(
$this
->
storeId
,
true
);
$result
=
$result
?
$result
:
[];
if
(
$result
!==
false
){
$this
->
success
(
$result
,
\Our\DescribeConst
::
successMessage
,
\Our\DescribeConst
::
successMessage
);
...
...
application/modules/Client/controllers/Shopkeeper.php
View file @
28983176
...
...
@@ -111,7 +111,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
*/
public
function
orderReceiveAction
(){
$orderId
=
$this
->
req
[
'data'
][
'orderId'
];
$result
=
$this
->
shopkeeperService
->
orderReceive
(
$this
->
memberId
,
$orderId
);
$result
=
$this
->
shopkeeperService
->
orderReceive
(
$this
->
storeId
,
$orderId
,
true
);
if
(
$result
)
{
$this
->
success
(
array
(),
\Our\DescribeConst
::
successMessage
,
\Our\DescribeConst
::
successMessage
);
}
else
{
...
...
@@ -143,7 +143,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
$pageSize
=
$this
->
getPageSize
();
$orderState
=
isset
(
$this
->
req
[
'data'
][
'orderState'
])
?
$this
->
req
[
'data'
][
'orderState'
]
:
''
;
$keyword
=
isset
(
$this
->
req
[
'data'
][
'keyword'
])
?
$this
->
req
[
'data'
][
'keyword'
]
:
''
;
$result
=
$this
->
shopkeeperService
->
getOrders
(
$this
->
memberId
,
$pageIndex
,
$pageSize
,
$orderState
,
$keyword
);
$result
=
$this
->
shopkeeperService
->
getOrders
(
$this
->
storeId
,
$pageIndex
,
$pageSize
,
$orderState
,
$keyword
,
true
);
$this
->
success
(
$result
);
// if($result){
// $this->success(array(),\Our\DescribeConst::successMessage,\Our\DescribeConst::successMessage);
...
...
@@ -183,7 +183,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
* 获得订单数量
*/
public
function
countAction
(){
$result
=
$this
->
shopkeeperService
->
getCount
(
$this
->
member
Id
);
$result
=
$this
->
shopkeeperService
->
getCount
(
$this
->
store
Id
);
if
(
!
empty
(
$result
)){
$this
->
success
(
$result
);
}
...
...
@@ -193,7 +193,7 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
public
function
receivePaymentAction
(){
$shopkeeperService
=
\Business\Store\ShopkeeperServiceModel
::
getInstance
();
$res
=
$shopkeeperService
->
confirmReceivePayment
(
$this
->
memberId
,
$this
->
req
[
'data'
][
'orderId'
]);
$res
=
$shopkeeperService
->
confirmReceivePayment
(
$this
->
memberId
,
$this
->
storeId
,
$this
->
req
[
'data'
][
'orderId'
]);
if
(
$res
){
$this
->
success
(
array
(),
\Our\DescribeConst
::
successMessage
);
}
else
{
...
...
conf/url.ini
View file @
28983176
...
...
@@ -122,7 +122,7 @@ config.url.resourcesHost = "http://local.qm.com"
config.url.userHost
=
""
; oss 域名
config.url.ossHost
=
"http
://qmoss-01.oss-cn-hangzhou.aliyuncs
.com"
config.url.ossHost
=
"http
s://imgpre.shenbd
.com"
;推送域名
config.url.pushHost
=
"192.168.1.201:9503"
;
...
...
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