|
@@ -9,6 +9,7 @@ use Hyperf\DbConnection\Db;
|
|
|
use App\Model\GlobalTableField;
|
|
|
use App\Model\GlobalTableFieldType;
|
|
|
use App\Model\GlobalTableFieldValue;
|
|
|
+use App\Model\Website;
|
|
|
use Hyperf\Di\Annotation\Inject;
|
|
|
use Hyperf\Redis\Redis;
|
|
|
#[RpcService(name: "FormService", protocol: "jsonrpc-http", server: "jsonrpc-http")]
|
|
@@ -506,6 +507,13 @@ class FormService implements FormServiceInterface
|
|
|
{
|
|
|
try {
|
|
|
$globalTable = GlobalTable::where('id',$data['table_id'])->first();
|
|
|
+ $websiteInfo = Website::where('id',$globalTable['website_id'])->first();
|
|
|
+ if(empty($websiteInfo)){
|
|
|
+ return Result::error('网站不存在');
|
|
|
+ }else{
|
|
|
+ $globalTable['website_name'] = $websiteInfo['website_name'];
|
|
|
+ $globalTable['suffix'] = $websiteInfo['suffix'];
|
|
|
+ }
|
|
|
$fields = GlobalTableField::from('global_table_field as a')
|
|
|
->join('global_table_field_type as b', 'a.field_type', '=', 'b.id')
|
|
|
->where('a.table_id', $data['table_id'])
|