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
a911acbc
Commit
a911acbc
authored
Dec 27, 2018
by
chenchuanwen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd
parents
24112cca
91e1e913
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
15 deletions
+31
-15
ApiConst.php
application/library/Our/ApiConst.php
+2
-0
PathConst.php
application/library/Our/PathConst.php
+1
-2
Pay.php
application/library/Payment/Pay.php
+5
-3
TencentPay.php
application/library/Payment/TencentPay.php
+1
-1
WxLitePay.php
application/library/Payment/WxLitePay.php
+7
-2
OrderService.php
application/models/Business/Order/OrderService.php
+5
-2
StoreService.php
application/models/Business/Store/StoreService.php
+2
-2
User.php
application/modules/Client/controllers/User.php
+1
-1
jpush.php
scripts/crontab/push/jpush.php
+7
-2
No files found.
application/library/Our/ApiConst.php
View file @
a911acbc
...
@@ -96,6 +96,8 @@ class ApiConst
...
@@ -96,6 +96,8 @@ class ApiConst
const
memberMessageType
=
5
;
const
memberMessageType
=
5
;
const
diliveryMessageOrder
=
9
;
const
diliveryMessageOrder
=
9
;
const
messageReceiveOrderType
=
301
;
//配送员用户消息类型
//配送员用户消息类型
//快递消息
//快递消息
const
deliveryUserMessageType
=
8
;
const
deliveryUserMessageType
=
8
;
...
...
application/library/Our/PathConst.php
View file @
a911acbc
...
@@ -53,8 +53,7 @@ class PathConst {
...
@@ -53,8 +53,7 @@ class PathConst {
const
storeStatTime
=
"/storeStat.conf"
;
const
storeStatTime
=
"/storeStat.conf"
;
const
orderCancelTime
=
"/orderCancelTime.conf"
;
const
orderCancelTime
=
"/orderCancelTime.conf"
;
const
ktestTime
=
"/ktestTime.conf"
;
//const favoritesStoreFavTimeConf="favoritesStoreFavTime.conf";
//const favoritesStoreFavTimeConf="favoritesStoreFavTime.conf";
...
...
application/library/Payment/Pay.php
View file @
a911acbc
...
@@ -45,10 +45,12 @@ class Pay {
...
@@ -45,10 +45,12 @@ class Pay {
$orderInfo
[
'openid'
]
=
$authInfo
[
'openid'
];
$orderInfo
[
'openid'
]
=
$authInfo
[
'openid'
];
$wxLitePay
=
WxLitePay
::
getInstance
();
$wxLitePay
=
WxLitePay
::
getInstance
();
$return
=
$wxLitePay
->
doPay
(
$orderInfo
);
$return
=
$wxLitePay
->
doPay
(
$orderInfo
);
$prepayId
=
$wxLitePay
->
getPrepayId
();
$prepayId
=
$return
[
'prepay_id'
];
unset
(
$return
[
'prepay_id'
]);
// \Our\Log::getInstance()->write($prepayId,'/data/log/apptest');
if
(
$prepayId
)
{
if
(
$prepayId
)
{
$dbName
=
\Our\DbNameConst
::
masterDBConnectName
;
$dbName
=
\Our\DbNameConst
::
masterDBConnectName
;
\DAO\Order\OrderModel
::
getInstance
(
$dbName
)
->
update
(
array
(
'pay_sn'
=>
$
data
[
'paySn'
]),
array
(
'prepay_id'
=>
$prepayId
));
\DAO\Order\OrderModel
::
getInstance
(
$dbName
)
->
update
(
array
(
'pay_sn'
=>
$
orderInfo
[
'paySn'
]),
array
(
'prepay_id'
=>
$prepayId
));
}
}
}
else
if
(
$data
[
'channel'
]
==
\Our\NameConst
::
qqAppChannel
){
}
else
if
(
$data
[
'channel'
]
==
\Our\NameConst
::
qqAppChannel
){
$qPay
=
QPay
::
getInstance
();
$qPay
=
QPay
::
getInstance
();
...
@@ -92,7 +94,7 @@ class Pay {
...
@@ -92,7 +94,7 @@ class Pay {
$orderInfo
[
'orderAmount'
]
=
$this
->
orderAmount
;
$orderInfo
[
'orderAmount'
]
=
$this
->
orderAmount
;
if
(
$this
->
channel
==
\Our\NameConst
::
wxLiteChannel
){
if
(
$this
->
channel
==
\Our\NameConst
::
wxLiteChannel
){
$orderConfirmUtil
=
\Order\OrderConfirmUtil
::
getInstance
();
$orderConfirmUtil
=
\Order\OrderConfirmUtil
::
getInstance
();
$newPaySn
=
$orderConfirmUtil
->
makeNewPaySnForOrderWithOldPaySn
(
$this
->
paySn
,
$this
->
memberId
);
$newPaySn
=
$orderConfirmUtil
->
makeNewPaySnForOrderWithOldPaySn
(
$this
->
paySn
,
$this
->
memberId
);
$this
->
paySn
=
$newPaySn
;
$this
->
paySn
=
$newPaySn
;
}
}
$orderInfo
[
'paySn'
]
=
$this
->
paySn
;
$orderInfo
[
'paySn'
]
=
$this
->
paySn
;
...
...
application/library/Payment/TencentPay.php
View file @
a911acbc
...
@@ -445,4 +445,4 @@ class TencentPay {
...
@@ -445,4 +445,4 @@ class TencentPay {
}
}
}
}
\ No newline at end of file
application/library/Payment/WxLitePay.php
View file @
a911acbc
...
@@ -35,9 +35,12 @@ class WxLitePay extends \Payment\TencentPay{
...
@@ -35,9 +35,12 @@ class WxLitePay extends \Payment\TencentPay{
}
}
//$this->setRequestParams($orderInfo);
//$this->setRequestParams($orderInfo);
$wxAppParameters
=
$this
->
getParameters
();
$wxAppParameters
=
$this
->
getParameters
();
$prepayId
=
$wxAppParameters
[
'prepay_id'
];
unset
(
$wxAppParameters
[
'prepay_id'
]);
$returnData
=
array
(
$returnData
=
array
(
'credential'
=>
array
(
\Our\NameConst
::
wxLiteChannel
=>
$wxAppParameters
),
'credential'
=>
array
(
\Our\NameConst
::
wxLiteChannel
=>
$wxAppParameters
),
'app_id'
=>
$this
->
appid
'app_id'
=>
$this
->
appid
,
'prepay_id'
=>
$prepayId
);
);
return
$returnData
;
return
$returnData
;
}
}
...
@@ -50,6 +53,8 @@ class WxLitePay extends \Payment\TencentPay{
...
@@ -50,6 +53,8 @@ class WxLitePay extends \Payment\TencentPay{
$wxApiObj
[
'package'
]
=
'prepay_id='
.
$this
->
prepay_id
;
$wxApiObj
[
'package'
]
=
'prepay_id='
.
$this
->
prepay_id
;
$wxApiObj
[
'signType'
]
=
'MD5'
;
$wxApiObj
[
'signType'
]
=
'MD5'
;
$wxApiObj
[
"paySign"
]
=
$this
->
getSign
(
$wxApiObj
);
$wxApiObj
[
"paySign"
]
=
$this
->
getSign
(
$wxApiObj
);
$wxApiObj
[
"prepay_id"
]
=
$this
->
prepay_id
;
return
$wxApiObj
;
return
$wxApiObj
;
}
}
...
@@ -143,4 +148,4 @@ class WxLitePay extends \Payment\TencentPay{
...
@@ -143,4 +148,4 @@ class WxLitePay extends \Payment\TencentPay{
return
self
::
$_instance
;
return
self
::
$_instance
;
}
}
}
}
\ No newline at end of file
application/models/Business/Order/OrderService.php
View file @
a911acbc
...
@@ -333,13 +333,13 @@ class OrderServiceModel extends \Business\AbstractModel
...
@@ -333,13 +333,13 @@ class OrderServiceModel extends \Business\AbstractModel
$storeDao
=
\DAO\StoreModel
::
getInstance
();
$storeDao
=
\DAO\StoreModel
::
getInstance
();
//判断订单目前状态是否允许取消
//判断订单目前状态是否允许取消
$isAllowCancel
=
$orderDao
->
isAllowCancel
(
$order
);
$isAllowCancel
=
$orderDao
->
isAllowCancel
(
$order
);
$isAllowCance
=
true
;
//
$isAllowCance = true;
if
(
$isAllowCancel
)
{
if
(
$isAllowCancel
)
{
$res
=
$orderDao
->
updateStatusByOrderId
(
$orderId
,
ApiConst
::
orderStateCancel
,
false
,
ApiConst
::
cancelOrderBySelf
);
$res
=
$orderDao
->
updateStatusByOrderId
(
$orderId
,
ApiConst
::
orderStateCancel
,
false
,
ApiConst
::
cancelOrderBySelf
);
if
(
$res
)
{
if
(
$res
)
{
$this
->
updateOrderGoodsStoregeByOrderIds
(
array
(
$orderId
));
$this
->
updateOrderGoodsStoregeByOrderIds
(
array
(
$orderId
));
$order
[
'refundOrderNo'
]
=
$refundReturnDao
->
getRefundsn
(
$order
[
'storeId'
]);
$order
[
'refundOrderNo'
]
=
$refundReturnDao
->
getRefundsn
(
$order
[
'storeId'
]);
if
(
$order
[
'paymentTime'
]
>
ApiConst
::
zero
){
if
(
$order
[
'paymentTime'
]
>
ApiConst
::
zero
&&
in_array
(
$order
[
'paymentType'
],
ArrayConst
::
orderPayTypeOnlines
)
){
$resultRefund
=
$refundReturnDao
->
refundMoney
(
$order
);
$resultRefund
=
$refundReturnDao
->
refundMoney
(
$order
);
if
(
$resultRefund
){
if
(
$resultRefund
){
$where
[
'order_id'
]
=
$order
[
'orderId'
];
$where
[
'order_id'
]
=
$order
[
'orderId'
];
...
@@ -405,6 +405,7 @@ class OrderServiceModel extends \Business\AbstractModel
...
@@ -405,6 +405,7 @@ class OrderServiceModel extends \Business\AbstractModel
$type
=
ApiConst
::
messageWaitGet
;
$type
=
ApiConst
::
messageWaitGet
;
}
else
{
}
else
{
$type
=
ApiConst
::
messageWaitSend
;
$type
=
ApiConst
::
messageWaitSend
;
}
}
$push
=
\Our\Push
::
getInstance
();
$push
=
\Our\Push
::
getInstance
();
$pushData
=
array
(
'storeId'
=>
$order
[
'store_id'
],
$pushData
=
array
(
'storeId'
=>
$order
[
'store_id'
],
...
@@ -521,6 +522,7 @@ class OrderServiceModel extends \Business\AbstractModel
...
@@ -521,6 +522,7 @@ class OrderServiceModel extends \Business\AbstractModel
{
{
$baseConfDir
=
\Our\Common
::
getConfig
(
'out.config'
);
$baseConfDir
=
\Our\Common
::
getConfig
(
'out.config'
);
$savePath
=
$baseConfDir
.
\Our\PathConst
::
orderWaitRecieveTaskAddTime
;
$savePath
=
$baseConfDir
.
\Our\PathConst
::
orderWaitRecieveTaskAddTime
;
$messageService
=
\Business\Message\MessageServiceModel
::
getInstance
();
$addTime
=
file_get_contents
(
$savePath
);
$addTime
=
file_get_contents
(
$savePath
);
$addTime
=
$addTime
?
$addTime
:
ApiConst
::
zero
;
$addTime
=
$addTime
?
$addTime
:
ApiConst
::
zero
;
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
...
@@ -535,6 +537,7 @@ class OrderServiceModel extends \Business\AbstractModel
...
@@ -535,6 +537,7 @@ class OrderServiceModel extends \Business\AbstractModel
$pageBegin
++
;
$pageBegin
++
;
}
while
(
!
empty
(
$orders
[
'list'
]));
}
while
(
!
empty
(
$orders
[
'list'
]));
$push
->
sendTcpMessage
();
$push
->
sendTcpMessage
();
$messageService
->
addMessageCenterToDb
();
file_put_contents
(
$savePath
,
TIMESTAMP
);
file_put_contents
(
$savePath
,
TIMESTAMP
);
}
}
...
...
application/models/Business/Store/StoreService.php
View file @
a911acbc
...
@@ -320,13 +320,13 @@ class StoreServiceModel extends \Business\AbstractModel{
...
@@ -320,13 +320,13 @@ class StoreServiceModel extends \Business\AbstractModel{
* @return array
* @return array
* @throws \Our\Exception
* @throws \Our\Exception
*/
*/
public
function
getStoreDetail
(
$param
){
public
function
getStoreDetail
(
$param
,
$flag
=
true
){
$storeId
=
intval
(
$param
[
'storeId'
]);
$storeId
=
intval
(
$param
[
'storeId'
]);
if
(
!
$storeId
){
if
(
!
$storeId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyStoreId
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyStoreId
);
}
}
list
(
$storeInfo
,
$storeLabel
)
=
\DAO\StoreModel
::
getInstance
()
->
get
(
$storeId
);
list
(
$storeInfo
,
$storeLabel
)
=
\DAO\StoreModel
::
getInstance
()
->
get
(
$storeId
,
true
,
$flag
);
//展示图片
//展示图片
// $detailImg = [];
// $detailImg = [];
// if($storeInfo['store_detail_image']){
// if($storeInfo['store_detail_image']){
...
...
application/modules/Client/controllers/User.php
View file @
a911acbc
...
@@ -43,7 +43,7 @@ class UserController extends \Our\Controller_AbstractIndex {
...
@@ -43,7 +43,7 @@ class UserController extends \Our\Controller_AbstractIndex {
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
storeIsRefuse
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
storeIsRefuse
);
}
}
$storeService
=
\Business\Store\StoreServiceModel
::
getInstance
();
$storeService
=
\Business\Store\StoreServiceModel
::
getInstance
();
$storeOne
=
$storeService
->
getStoreDetail
(
$seller
);
$storeOne
=
$storeService
->
getStoreDetail
(
$seller
,
false
);
}
else
{
}
else
{
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
errorUsernameOrPassword
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
errorUsernameOrPassword
);
}
}
...
...
scripts/crontab/push/jpush.php
View file @
a911acbc
...
@@ -60,7 +60,7 @@ class cliOrderClose extends basecli
...
@@ -60,7 +60,7 @@ class cliOrderClose extends basecli
// else{
// else{
// if(!empty($res['timeDiff'])){
// if(!empty($res['timeDiff'])){
// $timeArr=explode('-',$res['timeDiff']);
// $timeArr=explode('-',$res['timeDiff']);
// if(!empty($timeArr)){
v
// if(!empty($timeArr)){
// if(\Our\Common::isCurentTimeInSection($timeArr[0],$timeArr[1])){
// if(\Our\Common::isCurentTimeInSection($timeArr[0],$timeArr[1])){
// continue;
// continue;
// }
// }
...
@@ -74,7 +74,12 @@ class cliOrderClose extends basecli
...
@@ -74,7 +74,12 @@ class cliOrderClose extends basecli
}
}
protected
function
autoPushClient
(){
protected
function
autoPushClient
(){
$push
=
\Our\Push
::
getInstance
();
$push
=
\Our\Push
::
getInstance
();
$messageService
=
\Business\Message\MessageServiceModel
::
getInstance
();
while
(
$pushData
=
\Our\RedisHelper
::
lpop
(
'client_push'
)){
while
(
$pushData
=
\Our\RedisHelper
::
lpop
(
'client_push'
)){
if
(
$pushData
[
'type'
]
==
\Our\ApiConst
::
messageReceiveOrderType
){
$push
->
recievedOrder
(
$pushData
[
'storeId'
],
$pushData
[
'orderId'
]);
continue
;
}
$push
->
addOneToClient
(
$pushData
);
$push
->
addOneToClient
(
$pushData
);
}
}
$goodsCommonService
=
\Business\Goods\GoodsCommonServiceModel
::
getInstance
();
$goodsCommonService
=
\Business\Goods\GoodsCommonServiceModel
::
getInstance
();
...
@@ -103,8 +108,8 @@ class cliOrderClose extends basecli
...
@@ -103,8 +108,8 @@ class cliOrderClose extends basecli
}
}
}
}
$push
->
sendTcpMessage
();
$push
->
sendTcpMessage
();
$messageService
->
addMessageCenterToDb
();
}
}
protected
function
_runCli
()
protected
function
_runCli
()
{
{
...
...
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