Introducing new features. close #I4PKOA feign client 提供字段查询功能

This commit is contained in:
lbw 2022-01-06 14:02:14 +08:00
parent d5e4ad0b3e
commit 62858fbb5a
3 changed files with 45 additions and 2 deletions

View File

@ -105,7 +105,7 @@ COMMIT;
DROP TABLE IF EXISTS `sys_dict_item`;
CREATE TABLE `sys_dict_item` (
`id` bigint NOT NULL,
`dict_id` int NOT NULL COMMENT '字典ID',
`dict_id` bigint NOT NULL COMMENT '字典ID',
`value` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '',
`label` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '标签',
`type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '字典类型',

View File

@ -0,0 +1,43 @@
/*
* Copyright (c) 2020 pig4cloud Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.pig4cloud.pig.admin.api.feign;
import com.pig4cloud.pig.admin.api.entity.SysDictItem;
import com.pig4cloud.pig.common.core.constant.ServiceNameConstants;
import com.pig4cloud.pig.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.List;
/**
* 字典调用
*
* @author lengleng
*/
@FeignClient(contextId = "remoteDictService", value = ServiceNameConstants.UMPS_SERVICE)
public interface RemoteDictService {
/**
* @param type 字典类型
* @return 返回字典项列表
*/
@GetMapping("/dict/type/{type}")
R<List<SysDictItem>> getDictByType(@PathVariable("type") String type);
}

View File

@ -1,5 +1,5 @@
# ?? feignclient ??????? ?????????????
com.pig4cloud.pig.common.feign.PigFeignAutoConfiguration=\
com.pig4cloud.pig.admin.api.feign.RemoteDictSe rvice,\
com.pig4cloud.pig.admin.api.feign.RemoteDeptService,\
com.pig4cloud.pig.admin.api.feign.RemoteLogService,\
com.pig4cloud.pig.admin.api.feign.RemoteTokenService,\