$tj="AND (node_field_data.title LIKE CONCAT('%','".$post['title_name']."','%') or node_field_data.title is null )".
"AND (node__field_scene_name.field_scene_name_value LIKE CONCAT('%','".$post['scene_name']."','%') or node__field_scene_name.field_scene_name_value is null )".
"AND (node__field_app_name.field_app_name_value LIKE CONCAT('%','".$post['app_name']."','%') or node__field_app_name.field_app_name_value is null )";
$arg=[
':userid'=>$uid,
':code'=>$post['computer_code']
];
$get_user=User::load($uid);
$is_enterprise=$get_user->hasRole("enterprise");
$tj="AND (node_field_data.title LIKE CONCAT('%',:title_name,'%') or node_field_data.title is null ) ".
"AND (node__field_scene_name.field_scene_name_value LIKE CONCAT('%',:scene_name,'%') or node__field_scene_name.field_scene_name_value is null ) ".
"AND (node__field_app_name.field_app_name_value LIKE CONCAT('%',:app_name,'%') or node__field_app_name.field_app_name_value is null )";
$tj=$tj." AND node__field_kind.field_kind_target_id= :kind";
$arg[':kind']=$post['kind'];
}
//查找订单内容
$rs=$database->query("select node.nid as nid,node__field_production.field_production_target_id as production_id,node__field_production_name.field_production_name_value as production_name, ".
...
...
@@ -115,16 +127,15 @@ public function getProductionList(){
"node__field_download_url.field_download_url_value as production_download_url, ".
"node__field_app_name.field_app_name_value as app_name,node__field_belong_computer.computer_code, ".
"node__field_logo.field_logo_value as logo, ".
"node__field_app_id.field_app_id_value as app_id, ".
"node__field_kind.field_kind_target_id ".
"from {node} AS node left join {node__field_production} as node__field_production on node.nid=node__field_production.entity_id ".
"left join {node__field_app_id} as node__field_app_id on node__field_app_id.entity_id=node__field_production.field_production_target_id ".
"left join {node__field_production_name} as node__field_production_name on node__field_production_name.entity_id=node__field_production.field_production_target_id ".
"left join {node__field_scene_name} as node__field_scene_name on node__field_scene_name.entity_id=node__field_production.field_production_target_id ".
"left join {node__field_download_url} as node__field_download_url on node__field_download_url.entity_id=node__field_production.field_production_target_id ".
"left join {node__field_app_name} as node__field_app_name on node__field_app_name.entity_id=node__field_production.field_production_target_id ".
"left join {node__field_user} as node__field_user on node__field_user.entity_id=node.nid ".
"left join {node_field_data} as node_field_data on node_field_data.nid=node__field_production.field_production_target_id ".
"left join {node__field_kind} as node__field_kind ON node__field_production.field_production_target_id=node__field_kind.entity_id ".
"left join {node__field_logo} as node__field_logo on node__field_logo.entity_id=node__field_production.field_production_target_id ".
"left join ( select node__field_computer_code.field_computer_code_value as computer_code,node__field_user.field_user_target_id,node__field_production.field_production_target_id from {node__field_belong_computer} as node__field_belong_computer ".
"left join {node__field_computer_code} as node__field_computer_code on node__field_belong_computer.field_belong_computer_target_id=node__field_computer_code.entity_id ".
...
...
@@ -138,9 +149,9 @@ public function getProductionList(){
':code'=>$post['computer_code']
])->fetchAll();
$rs_count=$database->query("select count(*) as total ".
"from {node} AS node left join {node__field_production} as node__field_production on node.nid=node__field_production.entity_id ".
"left join {node__field_app_id} as node__field_app_id on node__field_app_id.entity_id=node__field_production.field_production_target_id ".
"left join {node__field_production_name} as node__field_production_name on node__field_production_name.entity_id=node__field_production.field_production_target_id ".
"left join {node__field_scene_name} as node__field_scene_name on node__field_scene_name.entity_id=node__field_production.field_production_target_id ".
"left join {node__field_download_url} as node__field_download_url on node__field_download_url.entity_id=node__field_production.field_production_target_id ".
...
...
@@ -581,6 +592,9 @@ public function saveOrder(){
/*
* 保存订单
* */
$save_order=\Drupal::entityTypeManager()
->getStorage('node')
->create([
...
...
@@ -828,9 +842,7 @@ public function getProductionView(){
"node__field_download_url.field_download_url_value as production_download_url, ".
"node__field_app_name.field_app_name_value as app_name, ".
"node__field_logo.field_logo_value as logo, ".
"node__field_app_id.field_app_id_value as app_id ".
"from {node} as node left join {node__field_production} as node__field_production on node.nid=node__field_production.entity_id ".
"left join {node__field_app_id} as node__field_app_id on node__field_app_id.entity_id=node.nid ".
"left join {node__field_production_name} as node__field_production_name on node__field_production_name.entity_id=node.nid ".
"left join {node__field_scene_name} as node__field_scene_name on node__field_scene_name.entity_id=node.nid ".
"left join {node__field_download_url} as node__field_download_url on node__field_download_url.entity_id=node.nid ".
...
...
@@ -847,7 +859,6 @@ public function getProductionView(){
$rs_count=$database->query("select count(*) as total ".
"from {node} as node left join {node__field_production} as node__field_production on node.nid=node__field_production.entity_id ".
"left join {node__field_app_id} as node__field_app_id on node__field_app_id.entity_id=node.nid ".
"left join {node__field_production_name} as node__field_production_name on node__field_production_name.entity_id=node.nid ".
"left join {node__field_scene_name} as node__field_scene_name on node__field_scene_name.entity_id=node.nid ".
"left join {node__field_download_url} as node__field_download_url on node__field_download_url.entity_id=node.nid ".
/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
publicfunctiongetSource()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.',E_USER_DEPRECATED);