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
e6955b2b
Commit
e6955b2b
authored
Nov 30, 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
bf3b787a
9ad84fd8
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
123 additions
and
35 deletions
+123
-35
Push.php
application/library/Our/Push.php
+15
-10
StoreUtil.php
application/library/Store/StoreUtil.php
+2
-6
GoodsClassService.php
application/models/Business/Goods/GoodsClassService.php
+3
-3
OrderService.php
application/models/Business/Order/OrderService.php
+1
-1
RefundService.php
application/models/Business/Order/RefundService.php
+47
-8
DeliveryService.php
application/models/Business/Store/DeliveryService.php
+7
-2
StoreService.php
application/models/Business/Store/StoreService.php
+12
-4
MemberService.php
application/models/Business/User/MemberService.php
+1
-1
OrderGoods.php
application/models/DAO/Order/OrderGoods.php
+9
-0
QmStoreClass.php
application/models/DAO/QmStoreClass.php
+26
-0
No files found.
application/library/Our/Push.php
View file @
e6955b2b
...
...
@@ -169,7 +169,7 @@ class Push
$this
->
pushMessage
(
$id
,
$this
->
orderId
,
$toId
,
$this
->
orderId
,
$toUserId
,
$this
->
orderName
,
$member
[
'memberName'
],
ApiConst
::
orderMessageType
,
ApiConst
::
memberMessageType
,
$fromAvatar
,
$message
);
}
//配送提醒
public
function
deliveryRemind
(
$toId
,
$orderId
)
public
function
deliveryRemind
(
$toId
,
$orderId
,
$orderGoodsId
=
false
)
{
$memberDao
=
\DAO\MemberModel
::
getInstance
();
$member
=
$memberDao
->
getInfo
(
$toId
);
...
...
@@ -177,20 +177,25 @@ class Push
$toUserId
=
$toId
;
$orderService
=
\Business\Order\OrderServiceModel
::
getInstance
();
$orderDetail
=
$orderService
->
getOrderDetail
(
$orderId
);
if
(
$orderGoodsId
){
$orderGoodsDao
=
\DAO\Order\OrderGoodsModel
::
getInstance
();
$orderDetail
[
'orderGoods'
]
=
$orderGoodsDao
->
convertRefundOrderGoods
(
$orderDetail
[
'orderGoods'
],
$orderGoodsId
);
}
$messageContent
=
$this
->
getOrderMessageContent
(
$orderDetail
);
$href
=
Common
::
format
(
PathConst
::
orderId
,
$orderId
);
$fromAvatar
=
Common
::
getStaticFile
(
ImageConst
::
orderAvatarName
,
ImageConst
::
systemAvatar
);
// $buttons=$this->getRecieveButtons($orderId);
// $buttons=$this->getRecieveButtons($orderId);
$message
=
$this
->
getMessageTemplate
(
ApiConst
::
deliveryOrderType
,
DescribeConst
::
deliveryRemindTitle
,
$messageContent
,
''
,
''
,
$href
,
ApiConst
::
zero
);
$id
=
time
()
.
(
string
)
$this
->
orderIdStr
.
$orderId
;
$this
->
pushMessage
(
$id
,
\Our\MemberIdConst
::
deliveryId
,
$toId
,
\Our\MemberIdConst
::
deliveryId
,
$toUserId
,
\Our\MemberIdConst
::
deliveryMessageName
,
$member
[
'memberName'
],
ApiConst
::
orderMessageType
,
ApiConst
::
deliveryUserMessageType
,
$fromAvatar
,
$message
);
}
public
function
sendDelivery
(
$toId
,
$orderId
){
$this
->
deliveryRemind
(
$toId
,
$orderId
);
public
function
sendDelivery
(
$toId
,
$orderId
,
$orderGoodsId
=
false
){
$this
->
deliveryRemind
(
$toId
,
$orderId
,
$orderGoodsId
);
$this
->
sendTcpMessage
();
}
private
function
getButton
(
$buttonType
,
$name
,
$buttonId
,
$params
){
return
array
(
return
array
(
'type'
=>
$buttonType
,
'name'
=>
$name
,
'status'
=>
ApiConst
::
messageButoonNotClick
,
...
...
@@ -209,10 +214,10 @@ class Push
}
//确认接单按钮
private
function
getComfirmRecieveButtons
(
$orderId
){
$buttons
=
array
();
$button
=
$this
->
getButton
(
ApiConst
::
messageButtonTypeReciverButton
,
DescribeConst
::
recieveButton
,
ApiConst
::
messageButtonIdOne
,
array
(
'orderId'
=>
$orderId
));
array_push
(
$buttons
,
$button
);
return
$buttons
;
$buttons
=
array
();
$button
=
$this
->
getButton
(
ApiConst
::
messageButtonTypeReciverButton
,
DescribeConst
::
recieveButton
,
ApiConst
::
messageButtonIdOne
,
array
(
'orderId'
=>
$orderId
));
array_push
(
$buttons
,
$button
);
return
$buttons
;
}
public
function
getOrderMessageContent
(
$orderDetail
){
...
...
@@ -261,7 +266,7 @@ class Push
}
$message
[
'data'
]
=
$this
->
data
;
$message
[
'uid'
]
=
!
empty
(
$this
->
uid
)
?
$this
->
uid
:
ApiConst
::
zero
;
// $message['data']=array_slice($message['data'],2,14);
// $message['data']=array_slice($message['data'],2,14);
$message
=
json_encode
(
$message
);
$key
=
md5
(
$message
);
$redis
->
set
(
$key
,
$message
);
...
...
application/library/Store/StoreUtil.php
View file @
e6955b2b
...
...
@@ -16,9 +16,7 @@ class StoreUtil {
$inAreaFlag
=
false
;
$qmStoreClassDao
=
\DAO\QmStoreClassModel
::
getInstance
();
$qmClassCon
[
'store_id'
]
=
$storeId
;
$qmClassCon
[
'is_charged'
]
=
1
;
$qmClassCon
[
'class_style'
]
=
2
;
$qmSignScopeList
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\QmStoreClassRedisModel
::
getInstance
(),
array
(
&
$qmStoreClassDao
,
'selectByWhere'
),
array
(
$qmClassCon
,
'sign_scope'
),
\Our\ApiConst
::
oneHour
,
array
(
$storeId
));
$qmSignScopeList
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\QmStoreClassRedisModel
::
getInstance
(),
array
(
&
$qmStoreClassDao
,
'getStoreSignClasses'
),
array
(
$qmClassCon
,
'sign_scope'
),
\Our\ApiConst
::
oneHour
,
array
(
'store'
.
$storeId
));
if
(
$qmSignScopeList
){
foreach
(
$qmSignScopeList
as
$qmSignScope
){
if
(
$qmSignScope
[
'sign_scope'
]){
...
...
@@ -43,9 +41,7 @@ class StoreUtil {
$inAreaFlag
=
false
;
$qmStoreClassDao
=
\DAO\QmStoreClassModel
::
getInstance
();
$qmClassCon
[
'store_id'
]
=
$storeId
;
$qmClassCon
[
'is_charged'
]
=
1
;
$qmClassCon
[
'class_style'
]
=
2
;
$qmSignScopeList
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\QmStoreClassRedisModel
::
getInstance
(),
array
(
&
$qmStoreClassDao
,
'selectByWhere'
),
array
(
$qmClassCon
,
'sign_scope'
),
\Our\ApiConst
::
oneHour
,
array
(
$storeId
));
$qmSignScopeList
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\QmStoreClassRedisModel
::
getInstance
(),
array
(
&
$qmStoreClassDao
,
'getStoreSignClasses'
),
array
(
$qmClassCon
,
'sign_scope'
),
\Our\ApiConst
::
oneHour
,
array
(
'store'
.
$storeId
));
if
(
$qmSignScopeList
){
foreach
(
$qmSignScopeList
as
$qmSignScope
){
if
(
$qmSignScope
[
'sign_scope'
]){
...
...
application/models/Business/Goods/GoodsClassService.php
View file @
e6955b2b
...
...
@@ -30,11 +30,11 @@ class GoodsClassServiceModel extends \Business\AbstractModel{
*/
public
function
getSignClassesByCityCode
(
$cityCode
){
$qmStoreClassCon
[
'city_code'
]
=
$cityCode
;
$qmStoreClassCon
[
'class_style'
]
=
\Our\ApiConst
::
signClassStyle
;
$qmStoreClassCon
[
'is_charged'
]
=
\Our\ApiConst
::
one
;
/*
$qmStoreClassCon['class_style'] = \Our\ApiConst::signClassStyle;
$qmStoreClassCon['is_charged'] = \Our\ApiConst::one;
*/
$storeField
=
'gc_id,sign_scope,gc_parent_id,store_id'
;
$qmStoreClassDao
=
\DAO\QmStoreClassModel
::
getInstance
();
$signStoreClasses
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\QmStoreClassRedisModel
::
getInstance
(),
array
(
&
$qmStoreClassDao
,
'getStoreClasses'
),
array
(
$qmStoreClassCon
,
$storeField
),
\Our\ApiConst
::
oneHour
,
array
(
$cityCode
));
$signStoreClasses
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\QmStoreClassRedisModel
::
getInstance
(),
array
(
&
$qmStoreClassDao
,
'getStore
Sign
Classes'
),
array
(
$qmStoreClassCon
,
$storeField
),
\Our\ApiConst
::
oneHour
,
array
(
$cityCode
));
return
$signStoreClasses
;
}
...
...
application/models/Business/Order/OrderService.php
View file @
e6955b2b
...
...
@@ -883,7 +883,7 @@ class OrderServiceModel extends \Business\AbstractModel
if
(
empty
(
$diliverymanIds
))
{
ErrorModel
::
throwException
(
CodeConfigModel
::
commonError
);
}
$qmDeliveryLogList
=
$qmDeliveryLogDao
->
getListByDeliverymanIdAndTypeCache
(
$diliverymanIds
,
$type
,
ApiConst
::
pageIndex
,
$pageSize
,
array
(
'get_time'
=>
'desc'
),
$memberId
);
$qmDeliveryLogList
=
$qmDeliveryLogDao
->
getListByDeliverymanIdAndTypeCache
(
$diliverymanIds
,
$type
,
$
pageIndex
,
$pageSize
,
array
(
'get_time'
=>
'desc'
),
$memberId
);
$orderIds
=
Array
();
foreach
(
$qmDeliveryLogList
[
'list'
]
as
$qmDeliveryLog
){
if
(
$qmDeliveryLog
[
'orderType'
]
==
ApiConst
::
orderTypeRefund
){
...
...
application/models/Business/Order/RefundService.php
View file @
e6955b2b
...
...
@@ -184,7 +184,7 @@ class RefundServiceModel extends \Business\AbstractModel
$storeDAO
->
deleteStoreRefundCache
(
$refund
[
'store_id'
],
$refund
[
'order_id'
]);
$refundReturnDao
->
db
->
doCommit
();
$push
=
\Our\Push
::
getInstance
();
$pushData
=
array
(
'storeId'
=>
$
order_info
[
'storeId'
]
,
$pushData
=
array
(
'storeId'
=>
$
storeId
,
'type'
=>
ApiConst
::
messageRefund
,
'waitReceiveCount'
=>
ApiConst
::
zero
,
'waitDeliveryCount'
=>
ApiConst
::
zero
,
...
...
@@ -233,15 +233,16 @@ class RefundServiceModel extends \Business\AbstractModel
$refund_array
[
'seller_time'
]
=
TIMESTAMP
;
$refund_array
[
'seller_state'
]
=
$sellerState
;
//卖家处理状态:1为待审核,2为同意,3为不同意
$refund_array
[
'seller_message'
]
=
$sellerMessage
;
//如果卖家不同意退款回写is_refund
if
(
$return
[
'refund_type'
]
==
ApiConst
::
refundTypeGoods
&&
!
$isGiveUp
){
if
(
$return
[
'refund_type'
]
==
ApiConst
::
refundTypeGoods
&&
!
$isGiveUp
&&
$sellerState
==
ApiConst
::
refundSellerAgree
){
$waitRefundReceiveCount
=
ApiConst
::
one
;
$refundCount
=
ApiConst
::
zero
;
}
else
{
$waitRefundReceiveCount
=
ApiConst
::
zero
;
$refundCount
=
ApiConst
::
reduceOne
;
}
if
(
$refund_array
[
'seller_state'
]
!=
'2'
){
//如果卖家不同意退款回写is_refund
if
(
$sellerState
!=
'2'
){
$orderGoodsUpdateData
[
'is_refund'
]
=
ApiConst
::
zero
;
$orderGoodsUpdateData
[
'refund_state_name'
]
=
DescribeConst
::
sellerRefuseReturn
;
$orderGoodsUpdateData
[
'gmt_update'
]
=
TIMESTAMP
;
...
...
@@ -413,6 +414,27 @@ class RefundServiceModel extends \Business\AbstractModel
$orderDao
->
deleteOrderCache
(
$refund
[
'buyer_id'
],
$refund
[
'order_id'
],
$refund
[
'store_id'
]);
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$refundReturnDao
,
'getList'
),
array
(),
array
(
$refund
[
'store_id'
]));
$refundReturnDao
->
db
->
doCommit
();
$refundReturnDao
->
deleteRefundCache
(
$refund
[
'buyer_id'
],
$refund
[
'refund_id'
]);
$orderDao
->
deleteOrderCache
(
$refund
[
'buyer_id'
],
$refund
[
'order_id'
],
$refund
[
'store_id'
]);
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$refundReturnDao
,
'getList'
),
array
(),
array
(
$refund
[
'store_id'
]));
$storeDao
->
deleteStoreCache
(
$storeId
,
$refund
[
'order_id'
]);
$storeDao
->
deleteStoreRefundCache
(
$storeId
,
$refund
[
'order_id'
]);
$push
=
\Our\Push
::
getInstance
();
$pushData
=
array
(
'storeId'
=>
$storeId
,
'type'
=>
ApiConst
::
messageRefund
,
'waitReceiveCount'
=>
ApiConst
::
zero
,
'waitDeliveryCount'
=>
ApiConst
::
zero
,
'waitGetCount'
=>
ApiConst
::
zero
,
'orderCount'
=>
ApiConst
::
zero
,
'waitRefundProccessCount'
=>
ApiConst
::
reduceOne
,
'waitRefundReceiveCount'
=>
ApiConst
::
zero
,
'refundCount'
=>
ApiConst
::
reduceOne
,
'alertCount'
=>
ApiConst
::
zero
,
'params'
=>
array
(
'c'
=>
'shopkeeper'
,
'm'
=>
'orderDetail'
,
'refundId'
=>
$refund
[
'refund_id'
]));
$push
->
addOneToClient
(
$pushData
);
$push
->
sendTcpMessage
();
return
true
;
}
...
...
@@ -480,8 +502,24 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReturnDao
->
deleteRefundCache
(
$refund
[
'buyer_id'
],
$refund
[
'refund_id'
]);
$orderDao
->
deleteOrderCache
(
$refund
[
'buyer_id'
],
$refund
[
'order_id'
],
$refund
[
'store_id'
]);
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$refundReturnDao
,
'getList'
),
array
(),
array
(
$refund
[
'store_id'
]));
$storeDao
->
deleteStoreCache
(
$refund
[
'store_id'
],
$refund
[
'order_id'
]);
$storeDao
->
deleteStoreRefundCache
(
$refund
[
'store_id'
],
$refund
[
'order_id'
]);
$storeDao
->
deleteStoreCache
(
$storeId
,
$refund
[
'order_id'
]);
$storeDao
->
deleteStoreRefundCache
(
$storeId
,
$refund
[
'order_id'
]);
$push
=
\Our\Push
::
getInstance
();
$pushData
=
array
(
'storeId'
=>
$storeId
,
'type'
=>
ApiConst
::
messageRefund
,
'waitReceiveCount'
=>
ApiConst
::
zero
,
'waitDeliveryCount'
=>
ApiConst
::
zero
,
'waitGetCount'
=>
ApiConst
::
zero
,
'orderCount'
=>
ApiConst
::
zero
,
'waitRefundProccessCount'
=>
ApiConst
::
reduceOne
,
'waitRefundReceiveCount'
=>
ApiConst
::
zero
,
'refundCount'
=>
ApiConst
::
reduceOne
,
'alertCount'
=>
ApiConst
::
zero
,
'params'
=>
array
(
'c'
=>
'shopkeeper'
,
'm'
=>
'orderDetail'
,
'refundId'
=>
$refund
[
'refund_id'
]));
$push
->
addOneToClient
(
$pushData
);
$push
->
sendTcpMessage
();
return
true
;
}
$refundReturnDao
->
db
->
doRollback
();
...
...
@@ -680,7 +718,7 @@ class RefundServiceModel extends \Business\AbstractModel
if
(
empty
(
$refundReturn
))
{
ErrorModel
::
throwException
(
CodeConfigModel
::
notExistRefund
);
}
$res
=
$this
->
getStoreRefundList
(
$storeId
,
$returnId
);
$res
=
$this
->
getStoreRefundList
(
$storeId
,
ApiConst
::
zero
,
ApiConst
::
zero
,
ApiConst
::
pageSize
,
$returnId
);
if
(
!
empty
(
$res
[
'refundReturns'
][
ApiConst
::
zero
]))
{
return
$res
[
'refundReturns'
][
ApiConst
::
zero
];
}
...
...
@@ -1106,6 +1144,7 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReturn
[
'goodsAttr'
]
=
$goodsDao
->
getFormatGoodsAttr
(
$orderGoods
[
'goodsSpec'
]);
$refundReturn
[
'sellerStateName'
]
=
ArrayConst
::
sellerState
[
$refundReturn
[
'sellerState'
]];
$refundReturn
[
'refundTypeName'
]
=
ArrayConst
::
refundType
[
$refundReturn
[
'refundType'
]];
$refundReturn
[
'goodsPayPrice'
]
=
$orderGoods
[
'goodsPayPrice'
];
$refundReturn
[
'returnTypeName'
]
=
ArrayConst
::
returnType
[
$refundReturn
[
'returnType'
]];
$refundReturn
[
'picInfo'
]
=!
empty
(
$refundReturn
[
'picInfo'
])
?
unserialize
(
$refundReturn
[
'picInfo'
])
:
array
();
if
(
!
empty
(
$refundReturn
[
'picInfo'
])){
...
...
@@ -1160,7 +1199,7 @@ class RefundServiceModel extends \Business\AbstractModel
if
(
!
empty
(
$diliveryMan
)){
$diliveryMan
=
array
(
'id'
=>
$diliveryMan
[
'id'
],
'trueName'
=>
$diliveryMan
[
'true
_n
ame'
],
'trueName'
=>
$diliveryMan
[
'true
N
ame'
],
'mobile'
=>
$diliveryMan
[
'mobile'
],
);
$info
[
'diliveryman'
]
=
$diliveryMan
;
...
...
application/models/Business/Store/DeliveryService.php
View file @
e6955b2b
...
...
@@ -45,7 +45,7 @@ class DeliveryServiceModel extends \Business\AbstractModel
$orderD
=
$orderDao
->
find
(
$whereOrder
,
$orderDao
->
getOrderDetailField
());
}
else
{
$whereOrder
[
'order_id'
]
=
$data
[
'orderId'
];
$orderD
=
$orderDao
->
find
(
$
data
[
'orderId'
]
,
$orderDao
->
getOrderDetailField
());
$orderD
=
$orderDao
->
find
(
$
whereOrder
,
$orderDao
->
getOrderDetailField
());
}
// if( $orderD['diliveryman_id']== $data['id']){
...
...
@@ -105,7 +105,12 @@ class DeliveryServiceModel extends \Business\AbstractModel
$storeDao
->
deleteStoreRefundCache
(
$data
[
'storeId'
],
$data
[
'orderId'
]);
//配送员推送
$push
=
\Our\Push
::
getInstance
();
$push
->
sendDelivery
(
$oringeDeliveryManMemberId
,
$orderD
[
'orderId'
]);
if
(
$data
[
'orderType'
]
==
ApiConst
::
orderTypeRefund
){
$push
->
sendDelivery
(
$oringeDeliveryManMemberId
,
$orderD
[
'orderId'
],
$orderOne
[
'orderGoodsId'
]);
}
else
{
$push
->
sendDelivery
(
$oringeDeliveryManMemberId
,
$orderD
[
'orderId'
]);
}
$messageService
->
addMessageCenterToDb
();
return
$res
;
}
...
...
application/models/Business/Store/StoreService.php
View file @
e6955b2b
...
...
@@ -735,6 +735,12 @@ class StoreServiceModel extends \Business\AbstractModel{
$storeRedis
=
\Redis\Db6\StoreRedisModel
::
getInstance
();
$signStoreKey
=
\Our\NameConst
::
signStoreIdsPrefix
.
crc32
(
serialize
(
$position
));
$signStoreIds
=
$storeRedis
->
find
(
$signStoreKey
,
\Our\ApiConst
::
oneHour
);
if
(
!
$signStoreIds
){
$signStoreInfo
=
\Business\Goods\GoodsClassServiceModel
::
getInstance
()
->
getSignStoreInfo
(
$position
);
if
(
$signStoreInfo
){
$signStoreIds
=
$signStoreInfo
[
'signStoreIds'
];
}
}
//签约店铺存在
if
(
$signStoreIds
){
$return
=
$this
->
getSignStoreClassesByStoreIds
(
$signStoreIds
,
$gcId
,
$position
);
...
...
@@ -759,8 +765,10 @@ class StoreServiceModel extends \Business\AbstractModel{
/*if($signStoreIds&&$serviceStoreIds){
$serviceStoreIds = array_diff($serviceStoreIds,$signStoreIds);
}*/
//签约店铺存在
if
(
!
$serviceStoreIds
){
$serviceStoreIds
=
\Business\Goods\GoodsClassServiceModel
::
getInstance
()
->
getServiceStoreIds
(
$position
);
}
//服务店铺存在
if
(
$serviceStoreIds
){
$return
=
$this
->
getStoreClassesByStoreIds
(
$serviceStoreIds
,
$gcId
);
return
$return
;
...
...
@@ -802,9 +810,9 @@ class StoreServiceModel extends \Business\AbstractModel{
* @return array|bool
*/
public
function
getSignStoreClassesByStoreIds
(
$signStoreIds
,
$gcId
,
$position
){
$signStoreClassSql
=
' store_id in ('
.
implode
(
','
,
$signStoreIds
)
.
') and
is_charged=1 and class_style = 2 and
gc_parent_id ='
.
$gcId
;
$signStoreClassSql
=
' store_id in ('
.
implode
(
','
,
$signStoreIds
)
.
') and gc_parent_id ='
.
$gcId
;
$qmStoreClassDao
=
\DAO\QmStoreClassModel
::
getInstance
();
$signClassStores
=
$qmStoreClassDao
->
selectByWhere
(
$signStoreClassSql
,
'store_id,gc_id,sign_scope'
);
$signClassStores
=
$qmStoreClassDao
->
getStoreSignClasses
(
$signStoreClassSql
,
'store_id,gc_id,sign_scope'
);
//$signClassStores = $storeGoodsClassDao->selectByWhere($signStoreClassSql,'store_id,gc_id');
if
(
$signClassStores
){
$return
=
array
();
...
...
application/models/Business/User/MemberService.php
View file @
e6955b2b
...
...
@@ -776,7 +776,7 @@ class MemberServiceModel extends \Business\AbstractModel
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
changeMobileFailed
);
}
if
(
$store
){
$storeResult
=
$storeModel
->
save
(
array
(
'store_phone'
=>
$data
[
'mobile'
]),
array
(
'store_id'
=>
$store
[
'store_id'
]));
$storeResult
=
$storeModel
->
save
(
array
(
'store_phone'
=>
$data
[
'mobile'
]
,
'seller_name'
=>
$data
[
'mobile'
]
),
array
(
'store_id'
=>
$store
[
'store_id'
]));
if
(
$storeResult
===
false
){
$memberDao
->
db
->
doRollback
();
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
storePhoneUpdateFailed
);
...
...
application/models/DAO/Order/OrderGoods.php
View file @
e6955b2b
...
...
@@ -259,6 +259,15 @@ class OrderGoodsModel extends \DAO\AbstractModel {
return
$res
;
}
public
function
convertRefundOrderGoods
(
$orderGoods
,
$orderGoodsId
){
$newOrderGoods
=
Array
();
foreach
(
$orderGoods
as
$orderGood
){
if
(
$orderGood
[
'recId'
]
==
$orderGoodsId
){
array_push
(
$newOrderGoods
,
$orderGood
);
}
}
return
$newOrderGoods
;
}
/**
* 类实例
*
...
...
application/models/DAO/QmStoreClass.php
View file @
e6955b2b
...
...
@@ -14,6 +14,8 @@ class QmStoreClassModel extends \DAO\AbstractModel{
*/
protected
$_tableName
=
'han_qm_store_class'
;
protected
$_tableNameSign
=
'han_sign_store_class_view'
;
/**
* 主键
*
...
...
@@ -99,6 +101,30 @@ class QmStoreClassModel extends \DAO\AbstractModel{
return
$result
;
}
public
function
getStoreSignClasses
(
$where
,
$field
=
"*"
){
$this
->
setDb
();
if
(
is_array
(
$where
)){
$where
=
$this
->
db
->
getSqlWhereByArray
(
$where
);
}
$result
=
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableNameSign
)
->
where
(
$where
)
->
fetchAll
();
return
$result
;
}
/**
* 删除签约店铺缓存
* @param $cityCode
* @throws \Our\Exception
*/
public
function
delStoreSignClassesCache
(
$cityCode
=
false
,
$storeId
=
false
){
if
(
$cityCode
){
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db6\QmStoreClassRedisModel
::
getInstance
(),
array
(
&
$this
,
'getStoreSignClasses'
),
array
(),
array
(
$cityCode
));
}
if
(
$storeId
){
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db6\QmStoreClassRedisModel
::
getInstance
(),
array
(
&
$this
,
'getStoreSignClasses'
),
array
(),
array
(
'store'
.
$storeId
));
}
}
/**
* 删除签约店铺缓存
* @param $cityCode
...
...
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