CZT
2023-11-09 6c6b10257d0df6259ac1811774e1de44a283c7c7
src/main/java/com/fzzy/api/service/ApiTriggerService.java
@@ -62,6 +62,13 @@
    }
    public ApiTrigger findNameByCode(String code, String parentCode) {
        List<ApiTrigger> listParent = apiTriggerRep.findNameByCode(code, parentCode);
        if (null == listParent || listParent.isEmpty()) return null;
        return listParent.get(0);
    }
    private void add2Cache(ApiTrigger trigger) {
        String key = RedisConst.buildKey(RedisConst.KYE_LIST_TRIGGER, trigger.getCode());
@@ -113,16 +120,16 @@
        String result = null;
        Map<String, String> parentMap = contextMap.get(parentCode);
        if (null == parentMap || parentMap.isEmpty()) {
            if(StringUtils.isEmpty(bizCode)){
            if (StringUtils.isEmpty(bizCode)) {
                return bizCode;
            }
            if(Constant.TRIGGER_P_LSPZ.equals(parentCode)){
                result = Integer.valueOf(bizCode)*1000000 + "";
                result = result.substring(0,7);
            }else if(Constant.TRIGGER_P_LSXZ.equals(parentCode)){
                result = Integer.valueOf(bizCode)*100 + "";
                result = result.substring(0,3);
            }else {
            if (Constant.TRIGGER_P_LSPZ.equals(parentCode)) {
                result = Integer.valueOf(bizCode) * 1000000 + "";
                result = result.substring(0, 7);
            } else if (Constant.TRIGGER_P_LSXZ.equals(parentCode)) {
                result = Integer.valueOf(bizCode) * 100 + "";
                result = result.substring(0, 3);
            } else {
                result = bizCode;
            }
            return result;
@@ -134,16 +141,16 @@
        }
        if (null == result) {
            if(StringUtils.isEmpty(bizCode)){
            if (StringUtils.isEmpty(bizCode)) {
                return bizCode;
            }
            if(Constant.TRIGGER_P_LSPZ.equals(parentCode)){
                result = Integer.valueOf(bizCode)*1000000 + "";
                result = result.substring(0,7);
            }else if(Constant.TRIGGER_P_LSXZ.equals(parentCode)){
                result = Integer.valueOf(bizCode)*100 + "";
                result = result.substring(0,3);
            }else {
            if (Constant.TRIGGER_P_LSPZ.equals(parentCode)) {
                result = Integer.valueOf(bizCode) * 1000000 + "";
                result = result.substring(0, 7);
            } else if (Constant.TRIGGER_P_LSXZ.equals(parentCode)) {
                result = Integer.valueOf(bizCode) * 100 + "";
                result = result.substring(0, 3);
            } else {
                result = bizCode;
            }
        }
@@ -178,8 +185,12 @@
        list.add(new ApiTrigger(PushProtocol.SB_SC_2021.getCode(), PushProtocol.SB_SC_2021.getName()));
        list.add(new ApiTrigger(PushProtocol.SB_GD_2022.getCode(), PushProtocol.SB_GD_2022.getName()));
        list.add(new ApiTrigger(PushProtocol.SB_GD_2020.getCode(), PushProtocol.SB_GD_2020.getName()));
        list.add(new ApiTrigger(PushProtocol.SB_HN_2022.getCode(), PushProtocol.SB_HN_2022.getName()));
        list.add(new ApiTrigger(PushProtocol.SB_WHJL_2023.getCode(), PushProtocol.SB_WHJL_2023.getName()));
        list.add(new ApiTrigger(PushProtocol.HB_FZZY_JG_2022.getCode(), PushProtocol.HB_FZZY_JG_2022.getName()));
        list.add(new ApiTrigger(PushProtocol.SB_SHJdJW_2023.getCode(), PushProtocol.SB_SHJdJW_2023.getName()));
        list.add(new ApiTrigger(PushProtocol.SB_SH_2023.getCode(), PushProtocol.SB_SH_2023.getName()));
        list.add(new ApiTrigger(PushProtocol.SB_NX_2023.getCode(), PushProtocol.SB_NX_2023.getName()));
        return list;
    }
@@ -195,6 +206,8 @@
        list.add(new ApiTrigger(SyncProtocol.GB_DEFAULT.getCode(), SyncProtocol.GB_DEFAULT.getName()));
        list.add(new ApiTrigger(SyncProtocol.FZZY_V30_GB.getCode(), SyncProtocol.FZZY_V30_GB.getName()));
        list.add(new ApiTrigger(SyncProtocol.FZZY_V35_GB.getCode(), SyncProtocol.FZZY_V35_GB.getName()));
        list.add(new ApiTrigger(SyncProtocol.FZZY_V40_GB.getCode(), SyncProtocol.FZZY_V40_GB.getName()));
        list.add(new ApiTrigger(SyncProtocol.FZZY_V40_WHJL.getCode(), SyncProtocol.FZZY_V40_WHJL.getName()));
        list.add(new ApiTrigger(SyncProtocol.FZZY_V35_SHYZ.getCode(), SyncProtocol.FZZY_V35_SHYZ.getName()));
        return list;
    }