From c0b8cf32504dd1a42780bb1ee06ae8a7b0d7b120 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期三, 09 十月 2024 23:36:11 +0800 Subject: [PATCH] 指标数据 --- iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/ind/IndItemApiImpl.java | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/ind/IndItemApiImpl.java b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/ind/IndItemApiImpl.java new file mode 100644 index 0000000..7bf2fb6 --- /dev/null +++ b/iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/api/ind/IndItemApiImpl.java @@ -0,0 +1,36 @@ +package com.iailab.module.data.api.ind; + +import com.iailab.framework.common.util.object.ConvertUtils; +import com.iailab.module.data.api.ind.dto.ApiIndItemQueryDTO; +import com.iailab.module.data.api.ind.dto.ApiIndItemValueDTO; +import com.iailab.module.data.ind.collection.IndItemCollector; +import com.iailab.module.data.ind.item.vo.IndItemValueVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @author PanZhibao + * @Description + * @createTime 2024年10月04日 + */ +@RestController // 提供 RESTful API 接口,给 Feign 调用 +@Validated +public class IndItemApiImpl implements IndItemApi { + + @Autowired + private IndItemCollector indItemCollector; + + public List<ApiIndItemValueDTO> queryIndItemDefaultValue(String itemNo){ + List<IndItemValueVO> list = indItemCollector.queryValue(itemNo); + return ConvertUtils.sourceToTarget(list, ApiIndItemValueDTO.class); + } + + @Override + public List<ApiIndItemValueDTO> queryIndItemHistoryValue(ApiIndItemQueryDTO dto) { + List<IndItemValueVO> list = indItemCollector.queryValue(dto.getItemNo(), dto.getStart(), dto.getEnd()); + return ConvertUtils.sourceToTarget(list, ApiIndItemValueDTO.class); + } +} \ No newline at end of file -- Gitblit v1.9.3