作者 lyh

gx脚本demo

... ... @@ -83,9 +83,11 @@ class MonthProjectCount extends Command
$res = (new FormGlobalsoApi())->getInquiryAll($url,$v);
echo date('Y-m-d H:i:s') . '月份:'.$v. PHP_EOL;
$arr['total'] = $arr['month_total'] = 0;
echo date('Y-m-d H:i:s') . '返回值:'.json_encode($res) . PHP_EOL;
if(isset($res['data']['count'])){
echo date('Y-m-d H:i:s') . '数据:'.$res['data']['count'] . PHP_EOL;
$arr['month_total'] = $res['data']['count'] + InquiryFormData::getCount([$start.' 00:00:00',$end.' 00:00:00']);
echo date('Y-m-d H:i:s') . '加上其他询盘后的:'.$arr['month_total'] . PHP_EOL;
}
//获取上一个的count
$previousMonth = date('Y-m', strtotime($v . ' -1 month'));
... ...
... ... @@ -174,7 +174,7 @@ class ProductController extends BaseController
$this->param['featured_status'] = $this->param['featured_status'] ?? 0;
if($this->param['featured_status'] != Category::STATUS_ACTIVE) {
$cateModel = new Category();
$featured_ids = $cateModel->where('title', 'like', 'Featured%')->pluck('id')->toArray();
$featured_ids = $cateModel->formatQuery(['title'=>['in',['Featured','featured']]])->pluck('id')->toArray();
if(!empty($featured_ids)){
$status = [];
if(isset($this->map['status'])){
... ...