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
5b694a61
Commit
5b694a61
authored
Jan 02, 2019
by
testshenbd
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into linqing
parents
3e780c77
24e95ba7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
9 deletions
+57
-9
Cart.php
application/controllers/Cart.php
+1
-1
SmsTemplateConst.php
application/library/Our/SmsTemplateConst.php
+2
-3
WxLitePay.php
application/library/Payment/WxLitePay.php
+2
-2
OrderService.php
application/models/Business/Order/OrderService.php
+2
-2
RefundReturn.php
application/models/DAO/Order/RefundReturn.php
+0
-1
redisPublish.php
public/redisPublish.php
+6
-0
redisSubscribe.php
public/redisSubscribe.php
+16
-0
redisSubscribe.php
scripts/crontab/push/redisSubscribe.php
+28
-0
No files found.
application/controllers/Cart.php
View file @
5b694a61
...
...
@@ -44,7 +44,7 @@ class CartController extends \Our\Controller_AbstractApi{
//获取购物车为空时的广告位
$advService
=
\Business\Common\AdvServiceModel
::
getInstance
();
$emptyCartAdvs
=
$advService
->
getEmptyCartAdvs
();
$cartList
[
'advs'
]
=
$emptyCartAdvs
;
$cartList
[
'advs'
]
=
$emptyCartAdvs
?
$emptyCartAdvs
:
array
()
;
$this
->
success
(
$cartList
);
}
...
...
application/library/Our/SmsTemplateConst.php
View file @
5b694a61
...
...
@@ -76,10 +76,9 @@ class SmsTemplateConst{
),
//尊敬的${storename},您的店铺由于${reason}无法通过审核,请登录商户后台查看。
'storeCheckUnpass'
=>
array
(
'templateId'
=>
'SMS_15
1547302
'
,
'templateId'
=>
'SMS_15
4495028
'
,
'parameters'
=>
array
(
'storename'
,
'reason'
'storename'
)
),
//目前共有${storeCount}家商户注册待审核,${weiCount}家微信支付待处理状态(需结合微信服务商状态)。
...
...
application/library/Payment/WxLitePay.php
View file @
5b694a61
...
...
@@ -61,9 +61,9 @@ class WxLitePay extends \Payment\TencentPay{
public
function
refund
(
$param
){
if
(
$param
[
'subMchId'
]){
$this
->
refundService
(
$param
);
return
$this
->
refundService
(
$param
);
}
else
{
$this
->
refundCommon
(
$param
);
return
$this
->
refundCommon
(
$param
);
}
}
...
...
application/models/Business/Order/OrderService.php
View file @
5b694a61
...
...
@@ -590,11 +590,11 @@ class OrderServiceModel extends \Business\AbstractModel
$storeDao
=
\DAO\StoreModel
::
getInstance
();
//判断订单目前状态是否允许取消
$isAllowCancel
=
$orderDao
->
isAllowCancel
(
$order
);
//$isAllowCance
= true;
$isAllowCancel
=
true
;
if
(
$isAllowCancel
)
{
$orderDao
->
db
->
doTransaction
();
$res
=
$orderDao
->
updateStatusByOrderId
(
$orderId
,
ApiConst
::
orderStateCancel
,
false
,
ApiConst
::
cancelOrderBySelf
);
$orderDao
->
setDb
(
$orderDao
->
dbName
);
$orderDao
->
db
->
doTransaction
();
if
(
$res
)
{
$this
->
updateOrderGoodsStoregeByOrderIds
(
array
(
$orderId
));
$order
[
'refundOrderNo'
]
=
$refundReturnDao
->
getRefundsn
(
$order
[
'storeId'
]);
...
...
application/models/DAO/Order/RefundReturn.php
View file @
5b694a61
...
...
@@ -505,7 +505,6 @@ class RefundReturnModel extends \DAO\AbstractModel
}
else
if
(
intval
(
$orderInfo
[
'paymentType'
])
==
ApiConst
::
wxProgram
)
{
$wxpay
=
\Payment\WxLitePay
::
getInstance
();
$refund_return
=
$wxpay
->
refund
(
$param
);
if
(
!
(
$refund_return
[
'return_code'
]
==
'SUCCESS'
&&
$refund_return
[
'result_code'
]
==
'SUCCESS'
))
{
$this
->
errorMessage
=
date
(
'Y-m-d'
)
.
'微信退款操作执行失败!'
.
$orderInfo
[
'orderId'
]
.
"
\r\n
"
;
return
false
;
...
...
public/redisPublish.php
0 → 100644
View file @
5b694a61
<?php
//发布
$redis
=
new
Redis
();
$redis
->
connect
(
'192.168.1.201'
,
6379
);
$message
=
'happy New Year'
;
$ret
=
$redis
->
publish
(
'pushcenter'
,
$message
);
public/redisSubscribe.php
0 → 100644
View file @
5b694a61
<?php
//订阅
ini_set
(
'default_socket_timeout'
,
-
1
);
//不超时
$redis
=
new
Redis
();
$redis
->
connect
(
'192.168.1.201'
,
6379
);
$result
=
$redis
->
subscribe
(
array
(
'pushcenter'
),
'callback'
);
function
printTest
(
$meg
){
$len
=
10
;
for
(
$i
=
0
;
$i
<
$len
;
$i
++
){
sleep
(
1
);
echo
$meg
.
"
\r\n
"
;
}
}
function
callback
(
$instance
,
$channelName
,
$message
){
printTest
(
$message
);
}
scripts/crontab/push/redisSubscribe.php
0 → 100644
View file @
5b694a61
<?php
/**
*
* 推送10秒推送一次
*
* @author chenjiebin <sjlinyu@qq.com>
*/
define
(
"APPLICATION_PATH"
,
realpath
(
dirname
(
__FILE__
)
.
'/../../../'
));
//指向public的上一级
require
APPLICATION_PATH
.
'/scripts/crontab/baseCli.php'
;
require
APPLICATION_PATH
.
'/scripts/crontab/common.php'
;
error_reporting
(
E_ALL
^
E_NOTICE
);
// redis 没有设置密码
$conf
=
\Yaf\Registry
::
get
(
'config'
)
->
get
(
'redis.database.params'
);
$redis
=
new
Redis
();
$redis
->
connect
(
$conf
[
'host'
],
$conf
[
'port'
]);
if
(
!
empty
(
$conf
[
'password'
])){
$redis
->
auth
(
$conf
[
'password'
]);
}
//ini_set('default_socket_timeout', -1);(所有长连接不超时)
$redis
->
setOption
(
Redis
::
OPT_READ_TIMEOUT
,
-
1
);
$result
=
$redis
->
subscribe
(
array
(
'redisPublish'
),
'callback'
);
function
printTest
(
$meg
){
echo
$meg
.
'213'
;
}
function
callback
(
$instance
,
$channelName
,
$message
){
printTest
(
$message
);
}
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