作者 lyh

gx

<?php
/**
* @remark :
* @name :RenewProjectController.php
* @author :lyh
* @method :post
* @time :2023/8/11 10:22
*/
namespace App\Http\Controllers\Aside\Project;
use App\Http\Controllers\Aside\BaseController;
use App\Models\HomeCount\Count;
use Carbon\Carbon;
class RenewProjectController extends BaseController
{
/**
* @remark :获取所有服务天数小于15天的项目
* @name :lists
* @author :lyh
* @method :post
* @time :2023/8/11 10:22
*/
public function lists(){
$count = new Count();
$yesterday = Carbon::yesterday()->toDateString();
$count_list = $count->list(['date'=>$yesterday,'service_day'=>['<=',15]],'id',['project_id']);
$arr = [];
}
}
... ...
... ... @@ -112,6 +112,7 @@ class ServerConfigLogic extends BaseLogic
$data['serve_id'] = $res;
}else{
$data['mysql_id'] = $res;
//$this->initializationMysql($this->param);
}
$project->edit($data,['id'=>$this->param['project_id']]);
return true;
... ...
... ... @@ -117,8 +117,8 @@ class MenuLogic extends BaseLogic
* @method :post
* @time :2023/7/25 14:17
*/
public function roleMenuList(){
$lists = $this->model->list();
public function roleMenuList($map = []){
$lists = $this->model->list($map,'sort');
$menu = array();
foreach ($lists as $k => $v){
$v = (array)$v;
... ...
... ... @@ -72,7 +72,6 @@ class ProjectServer extends BaseService
public static function initTable($project)
{
$database_name = DB::connection('custom_tmp_mysql')->getDatabaseName();
$table = Schema::connection('custom_tmp_mysql')->getAllTables();
$table = array_column($table, 'Tables_in_' . $database_name);
foreach ($table as $v) {
... ... @@ -80,7 +79,6 @@ class ProjectServer extends BaseService
if ($has_table) {
continue;
}
$sql = DB::connection('custom_tmp_mysql')->select("SHOW CREATE TABLE {$v}");
DB::connection('custom_mysql')->statement(get_object_vars($sql[0])['Create Table']);
}
... ...