作者 lyh

gx

... ... @@ -8,21 +8,19 @@ use App\Helper\Arr;
use App\Helper\FormGlobalsoApi;
use App\Http\Logic\Aside\BaseLogic;
use App\Http\Logic\Aside\Manage\ManageLogic;
use App\Models\ASide\Product;
use App\Models\Blog\Blog;
use App\Models\Channel\Channel;
use App\Models\Channel\User;
use App\Models\Channel\Zone;
use App\Models\Devops\ServerConfig;
use App\Models\Inquiry\InquirySet;
use App\Models\Manage\Manage;
use App\Models\News\News;
use App\Models\Product\Product;
use App\Models\Project\DeployBuild;
use App\Models\Project\DeployOptimize;
use App\Models\Project\Payment;
use App\Models\Project\Project;
use App\Models\Task\Task;
use App\Services\ProjectServer;
use App\Utils\EncryptUtils;
use Hashids\Hashids;
use Illuminate\Support\Facades\Cache;
... ...
... ... @@ -20,7 +20,7 @@ class Product extends Base
//设置关联表名
protected $table = 'gl_product';
//连接数据库
// protected $connection = 'custom_mysql';
protected $connection = 'custom_mysql';
const STATUS_DRAFT = 0;
const STATUS_ON = 1;
const STATUS_RECYCLE = 2;
... ... @@ -153,8 +153,8 @@ class Product extends Base
// return RouteMap::getRoute(RouteMap::SOURCE_PRODUCT, $this->id, $this->project_id);
// }
public static function getNumByProjectId($project_id){
return self::where('project_id', $project_id)->where('status', self::STATUS_ON)->count();
}
// public static function getNumByProjectId($project_id){
// return self::where('project_id', $project_id)->where('status', self::STATUS_ON)->count();
// }
}
... ...