197 map debug
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@
|
||||
|
||||
//variables.framework.docs={};
|
||||
variables.framework.docs.APIName="svc-api";
|
||||
variables.framework.docs.APIVersion="0.196"; /*$ git config --global --unset user.password*/
|
||||
variables.framework.docs.APIVersion="0.197"; /*$ git config --global --unset user.password*/
|
||||
|
||||
variables.framework.globalHeaders = structNew();
|
||||
variables.framework.globalHeaders["Access-Control-Expose-Headers"] = "Location";
|
||||
|
||||
@@ -58,7 +58,7 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In
|
||||
<m:field>sop.config::text as config</m:field>
|
||||
<m:field>sop.state_path</m:field>
|
||||
<m:field>e.service_id</m:field>
|
||||
<m:field>e.instance_uid</m:field>
|
||||
<m:field>e.instance_uid::text as instance_uid</m:field>
|
||||
</m:field_set>
|
||||
from instance_operation_cfs_param iop
|
||||
join svc_operation_cfs_param sop on (iop.svc_operation_cfs_param_id=sop.svc_operation_cfs_param_id)
|
||||
@@ -185,6 +185,7 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In
|
||||
<cfreturn noData().withStatus(204, "No Content") />
|
||||
</cffunction><!--- delete --->
|
||||
|
||||
|
||||
<cffunction name="put" hint="запись CFS параметра операции инстанса">
|
||||
<cfargument name="instanceOperationCfsParamUid" type="string" required=true hint="type:guid"/>
|
||||
<cfargument name="paramValue" type="string" required=true/>
|
||||
@@ -192,7 +193,7 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In
|
||||
|
||||
<cfset var local={}/>
|
||||
<cftry>
|
||||
<cfset checkInstanceParam(arguments.instanceOperationCfsParamUid,arguments.paramValue,arguments.usrId)/>
|
||||
<cfset checkInstanceParam(arguments.instanceOperationCfsParamUid, arguments.paramValue, arguments.usrId)/>
|
||||
<cfcatch type="invalidParamValue">
|
||||
<cfreturn representationOf(this.helper.formatBadRequestError(cfcatch)).withStatus(400)/>
|
||||
</cfcatch>
|
||||
@@ -250,7 +251,7 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In
|
||||
<cfset local.spMapArray = [local.spContainer]/>
|
||||
</cfif>
|
||||
<cfcatch type="any">
|
||||
<cfset local.spMapArray = []/><!--- теряем все данные --->
|
||||
<cfset local.spMapArray = [{"error":"#cfcatch.message#"}]/><!--- теряем все данные --->
|
||||
</cfcatch>
|
||||
</cftry>
|
||||
|
||||
@@ -291,7 +292,8 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In
|
||||
</cfquery>
|
||||
|
||||
<!--- формируем дескриптор --->
|
||||
<cfset var mapDescriptor=structNew("linked")/>
|
||||
<cfset var mapDescriptor=structNew("linked")/>
|
||||
|
||||
<cfloop query="local.qSubparam">
|
||||
<cfset structInsert(mapDescriptor, local.qSubparam.svc_operation_cfs_subparam,
|
||||
{
|
||||
@@ -404,28 +406,7 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In
|
||||
<cfreturn valueList(local.qAvailableResourceRealm.resource_realm)/>
|
||||
</cffunction>
|
||||
|
||||
<!--- <cffunction name="getKeysFromState" returnType="string" access="public">
|
||||
<cfargument name="instance_uid" type="GUID"/>
|
||||
<cfargument name="path"/>
|
||||
<cfargument name="args" type="array" default=[]/>
|
||||
|
||||
<cfset var local={}/>
|
||||
|
||||
<cfquery name="local.qAvailableResourceRealm"><!--- *** distinct халява, но придумывать корректную формулировку времени мало --->
|
||||
select distinct r.resource_realm, r.sort
|
||||
from resource_realm r
|
||||
join resource_realm_access a on
|
||||
(r.resource_realm_id=a.resource_realm_id
|
||||
AND (a.contract_id=<cfqueryparam cfsqltype="CF_SQL_INTEGER" value=#arguments.contractId# null=#!isValid("integer", arguments.contractId)#/>
|
||||
OR a.contract_id=0) /*0 means access to any contract*/
|
||||
AND a.is_enabled)
|
||||
join svc s on r.resource_realm_type_id=s.resource_realm_type_id
|
||||
where s.svc_id=<cfqueryparam cfsqltype="CF_SQL_INTEGER" value=#arguments.svcId# null=#!isValid("integer", arguments.svcId)#/>
|
||||
order by r.sort, r.resource_realm
|
||||
</cfquery> <!--- <cfdump var=#arguments#/> cfdump здесь провоцирует NPE --->
|
||||
<cfreturn valueList(local.qAvailableResourceRealm.resource_realm)/>
|
||||
</cffunction> --->
|
||||
|
||||
|
||||
<!--- для вложенных справочников --->
|
||||
<!--- дублировано: deck-tool/instance_operation.cfm --->
|
||||
|
||||
@@ -284,7 +284,7 @@ arguments.requestArguments.specificationId=usrCustomerInfo.specificationId; //In
|
||||
<cfif local.qSvcOperationCfsParam.is_required GT 0 AND len(arguments.paramValue) EQ 0>
|
||||
<cfthrow type="invalidParamValue" message="Missing required parameter (#local.qSvcOperationCfsParam.svc_operation_cfs_param#)"/>
|
||||
<cfelseif len(arguments.paramValue) AND NOT validateDataType(arguments.paramValue,local.qSvcOperationCfsParam.data_type)>
|
||||
<cfthrow type="invalidParamValue" message="Invalid format (#local.qSvcOperationCfsParam.svc_operation_cfs_param#)"/>
|
||||
<cfthrow type="invalidParamValue" message="Invalid format #local.qSvcOperationCfsParam.data_type# #local.qSvcOperationCfsParam.svc_operation_cfs_param#"/>
|
||||
</cfif>
|
||||
|
||||
<cfif len(arguments.paramValue) AND listLen(local.qSvcOperationCfsParam.value_list) GT 0 AND NOT listFind(local.qSvcOperationCfsParam.value_list, arguments.paramValue)>
|
||||
|
||||
Reference in New Issue
Block a user