|
|
|
@ -70,7 +70,7 @@ class PaymentRuleService
|
|
|
|
|
}
|
|
|
|
|
if ($length == 1) {
|
|
|
|
|
$first = $repeatRules[0];
|
|
|
|
|
if ($startTime <= $first['start_time'] && $endTime >= $last['end_time']) {
|
|
|
|
|
if ($startTime <= $first['start_time'] && $endTime >= $first['end_time']) {
|
|
|
|
|
M('payment_rule', 'tab_')->where(['id' => $first['id']])->delete();
|
|
|
|
|
} elseif ($endTime < $first['end_time'] && $startTime <= $first['start_time']) {
|
|
|
|
|
M('payment_rule', 'tab_')->where(['id' => $first['id']])->save(['start_time' => $endTime + 1, 'update_time' => time()]);
|
|
|
|
|