->where("((begin_time<={$time_start} and (end_time >={$time_start} or end_time=0)) or (begin_time<={$time_end} and end_time >={$time_end}) or (end_time>={$time_start} and end_time <={$time_end}))")
->select();
@ -1540,7 +1547,7 @@ class MarketPercentageController extends ThinkController
if (IS_POST) {
$data = $_POST;
if (!$data['begin_time']) {
if (!$data['begin_time']&& !$data['is_start']) {
$this->ajaxReturn(['msg'=>"起始时间必填","status"=>0]);
}
@ -1564,6 +1571,7 @@ class MarketPercentageController extends ThinkController
$time_start = strtotime($data['begin_time']);
if($data['end_time']) {
$time_end = strtotime($data['end_time']);
} else {
@ -1573,6 +1581,28 @@ class MarketPercentageController extends ThinkController
->where("((begin_time<={$time_start} and (end_time >={$time_start} or end_time=0)) or (begin_time<={$time_end} and end_time >={$time_end}) or (end_time>={$time_start} and end_time <={$time_end})) and id != {$id}")
->select();
@ -1596,12 +1626,8 @@ class MarketPercentageController extends ThinkController