|
|
|
@ -414,7 +414,7 @@ class PaymentMerchantController extends ThinkController
|
|
|
|
|
$query = M('payment_rule', 'tab_')->where($conditions);
|
|
|
|
|
$countQuery = clone $query;
|
|
|
|
|
|
|
|
|
|
$items = $query->order('id desc')->page($page, $row)->select();
|
|
|
|
|
$items = $query->order('start_time desc')->page($page, $row)->select();
|
|
|
|
|
$count = $countQuery->count();
|
|
|
|
|
|
|
|
|
|
$gameTypes = $gameService->getGameTypes(null, 'id,type_name');
|
|
|
|
@ -509,9 +509,11 @@ class PaymentMerchantController extends ThinkController
|
|
|
|
|
'message' => $message
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$paymentRuleService = new PaymentRuleService();
|
|
|
|
|
$records = $paymentRuleService->filterRecords($records);
|
|
|
|
|
|
|
|
|
|
$ids = [];
|
|
|
|
|
$paymentRuleService = new PaymentRuleService();
|
|
|
|
|
foreach ($records as $record) {
|
|
|
|
|
$startTime = $record['start_time'] == '' ? 0 : strtotime($record['start_time'] . ' 00:00:00');
|
|
|
|
|
$endTime = $record['end_time'] == '' ? PaymentRuleService::FOREVER_TIME : strtotime($record['end_time'] . ' 23:59:59');
|
|
|
|
@ -607,7 +609,7 @@ class PaymentMerchantController extends ThinkController
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$startTime = $params['start_time'] == '' ? 0 : strtotime($params['start_time'] . ' 00:00:00');
|
|
|
|
|
/* $startTime = $params['start_time'] == '' ? 0 : strtotime($params['start_time'] . ' 00:00:00');
|
|
|
|
|
$endTime = $params['end_time'] == '' ? PaymentRuleService::FOREVER_TIME : strtotime($params['end_time'] . ' 23:59:59');
|
|
|
|
|
|
|
|
|
|
if (date('Ymd', $rule['start_time']) <= date('Ymd') && $startTime != $rule['start_time']) {
|
|
|
|
@ -635,14 +637,14 @@ class PaymentMerchantController extends ThinkController
|
|
|
|
|
'status' => 0,
|
|
|
|
|
'message' => '最后生效时间在今日之前,不可修改'
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
} */
|
|
|
|
|
|
|
|
|
|
$item = [
|
|
|
|
|
'alipay_merchant_id' => $params['alipay_merchant_id'],
|
|
|
|
|
'weixin_merchant_id' => $params['weixin_merchant_id'],
|
|
|
|
|
'express_merchant_id' => $params['express_merchant_id'],
|
|
|
|
|
'start_time' => $startTime,
|
|
|
|
|
'end_time' => $endTime,
|
|
|
|
|
// 'start_time' => $startTime,
|
|
|
|
|
// 'end_time' => $endTime,
|
|
|
|
|
'update_time' => time()
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
@ -675,6 +677,13 @@ class PaymentMerchantController extends ThinkController
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($rule['start_time'] < strtotime(date('Y-m-d 23:59:59', time()))) {
|
|
|
|
|
$this->ajaxReturn([
|
|
|
|
|
'status' => 0,
|
|
|
|
|
'message' => '该记录不可删除,规则开始时间包含今天或今天之前的时间。'
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
M('payment_rule', 'tab_')->where(['id' => $id])->delete();
|
|
|
|
|
addOperationLog([
|
|
|
|
|
'op_type' => 2,
|
|
|
|
@ -735,6 +744,9 @@ class PaymentMerchantController extends ThinkController
|
|
|
|
|
|
|
|
|
|
$isRepat = false;
|
|
|
|
|
$paymentRuleService = new PaymentRuleService();
|
|
|
|
|
|
|
|
|
|
$records = $paymentRuleService->filterRecords($records);
|
|
|
|
|
|
|
|
|
|
foreach ($records as $record) {
|
|
|
|
|
$rules = $paymentRuleService->getTimeRepeatRules($record);
|
|
|
|
|
if (count($rules)) {
|
|
|
|
|