| New file | 
 |  |  | 
 |  |  | package com.dy.pipIrrBase.dict; | 
 |  |  |  | 
 |  |  | import com.dy.common.aop.SsoAop; | 
 |  |  | import com.dy.common.webUtil.BaseResponse; | 
 |  |  | import com.dy.common.webUtil.BaseResponseUtils; | 
 |  |  | import com.dy.pipIrrGlobal.voBa.VoDictItem; | 
 |  |  | import com.dy.pipIrrGlobal.voBa.VoMapCenter; | 
 |  |  | import io.swagger.v3.oas.annotations.tags.Tag; | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.web.bind.annotation.GetMapping; | 
 |  |  | import org.springframework.web.bind.annotation.RequestMapping; | 
 |  |  | import org.springframework.web.bind.annotation.RequestParam; | 
 |  |  | import org.springframework.web.bind.annotation.RestController; | 
 |  |  |  | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * @author ZhuBaoMin | 
 |  |  |  * @date 2024-06-26 20:36 | 
 |  |  |  * @LastEditTime 2024-06-26 20:36 | 
 |  |  |  * @Description | 
 |  |  |  */ | 
 |  |  |  | 
 |  |  | @Slf4j | 
 |  |  | @Tag(name = "字典项管理", description = "字典项管理") | 
 |  |  | @RestController | 
 |  |  | @RequestMapping(path="dict_item") | 
 |  |  | public class DictCtrl { | 
 |  |  |     @Autowired | 
 |  |  |     private DictSv dictSv; | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 根据字典Code获取字典项 | 
 |  |  |      * @param dictCode | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @GetMapping(path = "some") | 
 |  |  |     @SsoAop() | 
 |  |  |     public BaseResponse<List<VoDictItem>> some(@RequestParam String dictCode){ | 
 |  |  |         return BaseResponseUtils.buildSuccess(dictSv.getDictItemsByDictCode(dictCode)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 根据配置项名称获取配置项值 | 
 |  |  |      * @param itemName | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @GetMapping(path = "setting") | 
 |  |  |     @SsoAop() | 
 |  |  |     public BaseResponse<String> getSettingValue(String itemName) { | 
 |  |  |         return BaseResponseUtils.buildSuccess(dictSv.getItemValue(itemName)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     /** | 
 |  |  |      * 获取地图中心坐标 | 
 |  |  |      * @return | 
 |  |  |      */ | 
 |  |  |     @GetMapping(path = "map_center") | 
 |  |  |     @SsoAop | 
 |  |  |     public BaseResponse<VoMapCenter> getMapCenter() { | 
 |  |  |         return BaseResponseUtils.buildSuccess(dictSv.getMapCenter()); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } |