|
@@ -9,10 +9,11 @@ class Cron
|
|
|
|
|
|
public function yspay_api()
|
|
|
{
|
|
|
+ $day = Dever::input('day', 7);
|
|
|
$time = time();
|
|
|
$where['status'] = '5,6';
|
|
|
$where['withdraw'] = 1;
|
|
|
- $where['cdate'] = $time - 7*86400;
|
|
|
+ $where['cdate'] = $time - $day*86400;
|
|
|
$order = Dever::db('shop/sell_order')->getDataByTime($where);
|
|
|
|
|
|
if ($order) {
|
|
@@ -26,6 +27,11 @@ class Cron
|
|
|
{
|
|
|
$shop = Dever::db('shop/info')->find($v['shop_id']);
|
|
|
if ($v['withdraw'] == 1 && $shop && $shop['mid'] && $shop['status'] == 1) {
|
|
|
+
|
|
|
+ if ($v['refund_cash']) {
|
|
|
+ $v['price'] -= $v['refund_cash'];
|
|
|
+ $v['price'] = round($v['price'], 2);
|
|
|
+ }
|
|
|
$cash = $v['price'] * 100;
|
|
|
Dever::load('shop/yspay')->action($shop['mid'], $v['order_num'], 2, $cash);
|
|
|
}
|