his-uncles-father
2021-04-06 c2528fee65fa17a7434eb16deb782fd7c4e71523
java110-core/src/main/java/com/java110/core/factory/GenerateCodeFactory.java
@@ -188,7 +188,7 @@
    public static final String CODE_PREFIX_collectionId = "23";
    public static final String CODE_PREFIX_authId = "23";
    public static final String CODE_PREFIX_planId = "24";
    public static final String CODE_PREFIX_visitId = "24";
    /**
@@ -320,6 +320,34 @@
     * @throws GenerateCodeException
     */
    public static String getPsId(String prefix) throws GenerateCodeException {
        if (!MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_NEED_INVOKE_GENERATE_ID))) {
            return prefix + DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_H) + nextId("%04d");
        }
        //调用服务
        return getCode(prefix);
    }
    /**
     * 获取资源ID
     *
     * @return
     * @throws GenerateCodeException
     */
    public static String getResId(String prefix) throws GenerateCodeException {
        if (!MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_NEED_INVOKE_GENERATE_ID))) {
            return prefix + DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_H) + nextId("%04d");
        }
        //调用服务
        return getCode(prefix);
    }
    /**
     * 生成费用id
     *
     * @return
     * @throws GenerateCodeException
     */
    public static String getFeeId(String prefix) throws GenerateCodeException {
        if (!MappingConstant.VALUE_ON.equals(MappingCache.getValue(MappingConstant.KEY_NEED_INVOKE_GENERATE_ID))) {
            return prefix + DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_H) + nextId("%04d");
        }
@@ -840,7 +868,6 @@
        //调用服务
        return getCode(prefixMap.get("pgId"));
    }
    /**
     * 获取restTemplate