正在显示
4 个修改的文件
包含
30 行增加
和
6 行删除
| @@ -14,6 +14,8 @@ use App\Http\Requests\Aside\Project\ProcessRecordsRequest; | @@ -14,6 +14,8 @@ use App\Http\Requests\Aside\Project\ProcessRecordsRequest; | ||
| 14 | use App\Http\Requests\Aside\Project\ProjectRequest; | 14 | use App\Http\Requests\Aside\Project\ProjectRequest; |
| 15 | use App\Models\ASide\APublicModel; | 15 | use App\Models\ASide\APublicModel; |
| 16 | use App\Models\Channel\Channel; | 16 | use App\Models\Channel\Channel; |
| 17 | +use App\Models\Channel\User; | ||
| 18 | +use App\Models\Channel\Zone; | ||
| 17 | use App\Models\Com\City; | 19 | use App\Models\Com\City; |
| 18 | use App\Models\Devops\ServerConfig; | 20 | use App\Models\Devops\ServerConfig; |
| 19 | use App\Models\Domain\DomainInfo; | 21 | use App\Models\Domain\DomainInfo; |
| @@ -822,4 +824,24 @@ class ProjectController extends BaseController | @@ -822,4 +824,24 @@ class ProjectController extends BaseController | ||
| 822 | $logic->saveOtherProject(); | 824 | $logic->saveOtherProject(); |
| 823 | $this->response('success'); | 825 | $this->response('success'); |
| 824 | } | 826 | } |
| 827 | + | ||
| 828 | + /** | ||
| 829 | + * @remark :获取渠道信息 | ||
| 830 | + * @name :getChannel | ||
| 831 | + * @author :lyh | ||
| 832 | + * @method :post | ||
| 833 | + * @time :2023/11/17 16:08 | ||
| 834 | + */ | ||
| 835 | + public function getChannel(){ | ||
| 836 | + $zoneModel = new Zone(); | ||
| 837 | + $zone_list = $zoneModel->list(); | ||
| 838 | + $channelModel = new Channel(); | ||
| 839 | + $channelUserModel = new User(); | ||
| 840 | + foreach ($zone_list as $k => $v){ | ||
| 841 | + $channel_list = $channelModel->list(['zone_id'=>$v['id']]); | ||
| 842 | + foreach ($channel_list as $k1 => $v1){ | ||
| 843 | + $channelUserModel->list(['channel_id'=>$v1['id']]); | ||
| 844 | + } | ||
| 845 | + } | ||
| 846 | + } | ||
| 825 | } | 847 | } |
| @@ -47,11 +47,11 @@ class VisualizationController extends BaseController | @@ -47,11 +47,11 @@ class VisualizationController extends BaseController | ||
| 47 | */ | 47 | */ |
| 48 | public function save(VisualizationLogic $logic){ | 48 | public function save(VisualizationLogic $logic){ |
| 49 | $this->request->validate([ | 49 | $this->request->validate([ |
| 50 | - 'type'=>'required', | ||
| 51 | - 'main_html'=>'required', | 50 | + 'source'=>'required', |
| 51 | + 'source_id'=>'required', | ||
| 52 | ],[ | 52 | ],[ |
| 53 | - 'type.required' => '类型不能为空', | ||
| 54 | - 'main_html.required' => 'main_html不能为空', | 53 | + 'source.required' => 'source不能为空', |
| 54 | + 'source_id.required' => 'source_id不能为空', | ||
| 55 | ]); | 55 | ]); |
| 56 | $logic->saveVisualization(); | 56 | $logic->saveVisualization(); |
| 57 | $this->response('success'); | 57 | $this->response('success'); |
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | namespace App\Models\Channel; | 3 | namespace App\Models\Channel; |
| 4 | 4 | ||
| 5 | +use App\Models\Base; | ||
| 5 | use Illuminate\Database\Eloquent\Model; | 6 | use Illuminate\Database\Eloquent\Model; |
| 6 | use phpDocumentor\Reflection\Types\Self_; | 7 | use phpDocumentor\Reflection\Types\Self_; |
| 7 | 8 | ||
| @@ -11,7 +12,7 @@ use phpDocumentor\Reflection\Types\Self_; | @@ -11,7 +12,7 @@ use phpDocumentor\Reflection\Types\Self_; | ||
| 11 | * @author zbj | 12 | * @author zbj |
| 12 | * @date 2023/6/27 | 13 | * @date 2023/6/27 |
| 13 | */ | 14 | */ |
| 14 | -class Channel extends Model | 15 | +class Channel extends Base |
| 15 | { | 16 | { |
| 16 | //设置关联表名 | 17 | //设置关联表名 |
| 17 | protected $table = 'gl_channel'; | 18 | protected $table = 'gl_channel'; |
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | 2 | ||
| 3 | namespace App\Models\Channel; | 3 | namespace App\Models\Channel; |
| 4 | 4 | ||
| 5 | +use App\Models\Base; | ||
| 5 | use Illuminate\Database\Eloquent\Model; | 6 | use Illuminate\Database\Eloquent\Model; |
| 6 | 7 | ||
| 7 | /** | 8 | /** |
| @@ -10,7 +11,7 @@ use Illuminate\Database\Eloquent\Model; | @@ -10,7 +11,7 @@ use Illuminate\Database\Eloquent\Model; | ||
| 10 | * @author zbj | 11 | * @author zbj |
| 11 | * @date 2023/6/27 | 12 | * @date 2023/6/27 |
| 12 | */ | 13 | */ |
| 13 | -class Zone extends Model | 14 | +class Zone extends Base |
| 14 | { | 15 | { |
| 15 | //设置关联表名 | 16 | //设置关联表名 |
| 16 | protected $table = 'gl_channel_zone'; | 17 | protected $table = 'gl_channel_zone'; |
-
请 注册 或 登录 后发表评论