分账-查询分账结果
@since 2.8.25
@param payProfitsharingquery payProfitsharingquery
@param key key
@return PayProfitsharingqueryResult
519909
public static PayProfitsharingqueryResult payProfitsharingquery(PayProfitsharingquery payProfitsharingquery,String key){
		Map<String,String> map = MapUtil.objectToMap(payProfitsharingquery);
		String sign = SignatureUtil.generateSign(map,payProfitsharingquery.getSign_type() == null? "HMAC-SHA256": payProfitsharingquery.getSign_type(),key);
		payProfitsharingquery.setSign(sign);
		String xml = XMLConverUtil.convertToXML(payProfitsharingquery);
		HttpUriRequest httpUriRequest = RequestBuilder.post()
				.setHeader(xmlHeader)
				.setUri(baseURI() + "/pay/profitsharingquery")
				.setEntity(new StringEntity(xml,Charset.forName("utf-8")))
				.build();
		return LocalHttpClient.executeXmlResult(httpUriRequest,PayProfitsharingqueryResult.class, payProfitsharingquery.getSign_type() == null? "HMAC-SHA256": payProfitsharingquery.getSign_type(),key);
	}
1111621
public byte[] encryptSharedKey(Key sharedKey, Key publicKey) throws java.io.IOException {
        byte[] encryptedSharedKey = null;
        if (sharedKey == null) {
            if (tc.isDebugEnabled()) {
                Tr.debug(tc, "ERROR!!! shared key is null!");
            }
            return null;
        }
        byte[] encodedPublicKey = publicKey.getEncoded();
        encryptor = new AuditKeyEncryptor(encodedPublicKey);
        byte[] encodedSharedKey = sharedKey.getEncoded();
        encryptedSharedKey = encryptor.encrypt(encodedSharedKey);
        return encryptedSharedKey;
    }
596869
public static MchBaseResult payProfitsharingaddreceiver(PayProfitsharingOperation payProfitsharingOperation,String key){
		Map<String,String> map = MapUtil.objectToMap(payProfitsharingOperation, "receiver");
		if(payProfitsharingOperation.getReceiver() != null){
			map.put("receiver", JsonUtil.toJSONString(payProfitsharingOperation.getReceiver()));
		}
		String sign = SignatureUtil.generateSign(map,payProfitsharingOperation.getSign_type() == null? "HMAC-SHA256": payProfitsharingOperation.getSign_type(),key);
		payProfitsharingOperation.setSign(sign);
		String xml = XMLConverUtil.convertToXML(payProfitsharingOperation);
		HttpUriRequest httpUriRequest = RequestBuilder.post()
				.setHeader(xmlHeader)
				.setUri(baseURI() + "/pay/profitsharingaddreceiver")
				.setEntity(new StringEntity(xml,Charset.forName("utf-8")))
				.build();
		return LocalHttpClient.executeXmlResult(httpUriRequest,MchBaseResult.class, payProfitsharingOperation.getSign_type() == null? "HMAC-SHA256": payProfitsharingOperation.getSign_type(),key);
	}
1229510
public CachedInstanceQuery getCachedQuery(final String _key)
    {
        if (this.query == null) {
            try {
                this.query = new CachedInstanceQuery(_key, this.typeUUID)
                                .setIncludeChildTypes(isIncludeChildTypes())
                                .setCompanyDependent(isCompanyDependent());
                prepareQuery();
            } catch (final EFapsException e) {
                QueryBuilder.LOG.error("Could not open InstanceQuery for uuid: {}", this.typeUUID);
            }
        }
        return (CachedInstanceQuery) this.query;
    }
1148352
protected Query buildQuery(String spaceId, String key) {
        BooleanQuery.Builder builder = new BooleanQuery.Builder();
        if (!StringUtils.isBlank(spaceId)) {
            builder.add(new TermQuery(new Term(FIELD_SPACE_ID, spaceId.trim())), Occur.MUST);
        }
        if (!StringUtils.isBlank(key)) {
            builder.add(new TermQuery(new Term(FIELD_KEY, key.trim())), Occur.MUST);
        }
        return builder.build();
    }
537973
@Override
	public int countByG_K(long groupId, String key) {
		FinderPath finderPath = FINDER_PATH_COUNT_BY_G_K;

		Object[] finderArgs = new Object[] { groupId, key };

		Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);

		if (count == null) {
			StringBundler query = new StringBundler(3);

			query.append(_SQL_COUNT_CPOPTION_WHERE);

			query.append(_FINDER_COLUMN_G_K_GROUPID_2);

			boolean bindKey = false;

			if (key == null) {
				query.append(_FINDER_COLUMN_G_K_KEY_1);
			}
			else if (key.equals("")) {
				query.append(_FINDER_COLUMN_G_K_KEY_3);
			}
			else {
				bindKey = true;

				query.append(_FINDER_COLUMN_G_K_KEY_2);
			}

			String sql = query.toString();

			Session session = null;

			try {
				session = openSession();

				Query q = session.createQuery(sql);

				QueryPos qPos = QueryPos.getInstance(q);

				qPos.add(groupId);

				if (bindKey) {
					qPos.add(key);
				}

				count = (Long)q.uniqueResult();

				finderCache.putResult(finderPath, finderArgs, count);
			}
			catch (Exception e) {
				finderCache.removeResult(finderPath, finderArgs);

				throw processException(e);
			}
			finally {
				closeSession(session);
			}
		}

		return count.intValue();
	}
939512
@Override
	public long dynamicQueryCount(DynamicQuery dynamicQuery,
		Projection projection) {
		return commercePaymentMethodGroupRelPersistence.countWithDynamicQuery(dynamicQuery,
			projection);
	}
1320905
private QueryMethodCache generateQueryByPKMethod(Class<?> mapperClass,Class<?> entityClass){
		QueryMethodCache methodCache = null;
		Field[] fields = entityClass.getDeclaredFields();
		//主键key前缀
		for (Field field : fields) {
			if(field.isAnnotationPresent(Id.class)){
				methodCache = new QueryMethodCache();
				methodCache.isPk = true;
				methodCache.collectionResult = false;
				methodCache.keyPattern = entityClass.getSimpleName() + ".id:%s";
				methodCache.methodName = mapperClass.getName() + "." + methodDefine.selectName();
				methodCache.cacheGroupKey = entityClass.getSimpleName() + GROUPKEY_SUFFIX;
			}
		}
		return methodCache;
	}
752299
public RootMethodRunResult getRunResultByRootMethodKey(String key) {
        if (key == null) {
            throw new NullPointerException();
        }
        for (RootMethodRunResult rootMethodRunResult : rootMethodRunResults) {
            if ((rootMethodRunResult.getRootMethod() != null)
                    && key.equals(rootMethodRunResult.getRootMethod().getKey())) {
                return rootMethodRunResult;
            }
        }
        return null;
    }
609036
public static MicropayResult payMicropay(Micropay micropay,String key){
		Map<String,String> map = MapUtil.objectToMap(micropay);
		//@since 2.8.14 detail 字段签名处理
		if(micropay.getDetail() != null){
			map.put("detail",JsonUtil.toJSONString(micropay.getDetail()));
		}
		String sign = SignatureUtil.generateSign(map,micropay.getSign_type(),key);
		micropay.setSign(sign);
		String closeorderXML = XMLConverUtil.convertToXML(micropay);
		HttpUriRequest httpUriRequest = RequestBuilder.post()
				.setHeader(xmlHeader)
				.setUri(baseURI()+ "/pay/micropay")
				.setEntity(new StringEntity(closeorderXML,Charset.forName("utf-8")))
				.build();
		return LocalHttpClient.executeXmlResult(httpUriRequest,MicropayResult.class,micropay.getSign_type(),key);
	}
1278643
@SuppressWarnings("unchecked")
    protected <T extends Indexable> T taskResult(String key) {
        Indexable result = this.taskGroup.taskResult(key);
        if (result == null) {
            return null;
        } else {
            T castedResult = (T) result;
            return castedResult;
        }
    }
745035
public LinkedList<Entry<String, V>> commonPrefixSearchWithValue(char[] key, int begin)
    {
        LinkedList<Entry<String, Integer>> valueIndex = mdag.commonPrefixSearchWithValueIndex(key, begin);
        LinkedList<Entry<String, V>> entryList = new LinkedList<Entry<String, V>>();
        for (Entry<String, Integer> entry : valueIndex)
        {
            entryList.add(new SimpleEntry<String, V>(entry.getKey(), valueList.get(entry.getValue())));
        }

        return entryList;
    }
737746
public Data get(Key key) {
		synchronized (cache) {
			Pair<Data,Long> p = cache.get(key);
			if (p != null) {
				p.setValue2(Long.valueOf(System.currentTimeMillis()));
				return p.getValue1();
			}
			p = new Pair<>(provider.provide(key), Long.valueOf(System.currentTimeMillis()));
			cache.put(key, p);
			return p.getValue1();
		}
	}
1035273
public static SecapiPayProfitsharingResult secapiPayProfitsharing(SecapiPayProfitsharing secapiPayProfitsharing,String key){
		Map<String,String> map = MapUtil.objectToMap(secapiPayProfitsharing, "receivers");
		if(secapiPayProfitsharing.getReceivers() != null){
			map.put("receivers", JsonUtil.toJSONString(secapiPayProfitsharing.getReceivers()));
		}
		String sign = SignatureUtil.generateSign(map,secapiPayProfitsharing.getSign_type() == null? "HMAC-SHA256": secapiPayProfitsharing.getSign_type(),key);
		secapiPayProfitsharing.setSign(sign);
		String xml = XMLConverUtil.convertToXML(secapiPayProfitsharing);
		HttpUriRequest httpUriRequest = RequestBuilder.post()
				.setHeader(xmlHeader)
				.setUri(baseURI() + "/secapi/pay/profitsharing")
				.setEntity(new StringEntity(xml,Charset.forName("utf-8")))
				.build();
		return LocalHttpClient.keyStoreExecuteXmlResult(secapiPayProfitsharing.getMch_id(), httpUriRequest,SecapiPayProfitsharingResult.class, secapiPayProfitsharing.getSign_type() == null? "HMAC-SHA256": secapiPayProfitsharing.getSign_type(),key);
	}
1197113
public static MchBaseResult payitilReport(Report report,String key){
		Map<String,String> map = MapUtil.objectToMap(report);
		String sign = SignatureUtil.generateSign(map,report.getSign_type(),key);
		report.setSign(sign);
		String shorturlXML = XMLConverUtil.convertToXML(report);
		HttpUriRequest httpUriRequest = RequestBuilder.post()
				.setHeader(xmlHeader)
				.setUri(baseURI()+ "/payitil/report")
				.setEntity(new StringEntity(shorturlXML,Charset.forName("utf-8")))
				.build();
		return LocalHttpClient.executeXmlResult(httpUriRequest,MchBaseResult.class);
	}
1293891
public V get(K key, V defaultValue)
    {
        // Check if we only know an equal entry
        V sharedValue = get(key);

        if (sharedValue == null) {
            // If no entry can be found, store and return the passed one
            sharedValue = defaultValue;

            // Make sure to remember the entry
            put(key, defaultValue);
        }

        // Return the shared entry
        return sharedValue;
    }
810110
@Nullable
	public String getQueryParameter(@NotNull String key) {
		if (query == -1) {
			return null;
		}
		if (queryPositions == null) {
			parseQueryParameters();
		}
		return findParameter(raw, queryPositions, key);
	}