|
@@ -0,0 +1,38 @@
|
|
|
+package com.hrsk.cloud.eg.app.business;
|
|
|
+
|
|
|
+import com.hrsk.cloud.eg.app.constant.EgApiTypeEnum;
|
|
|
+import com.hrsk.cloud.eg.dto.data.common.LocalEnumDto;
|
|
|
+import com.hrsk.cloud.eg.vo.response.DefaultResponseVo;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author zhangyy
|
|
|
+ * @version 1.0
|
|
|
+ * @description: CommonService 公共信息操作类
|
|
|
+ * @date 2024/9/24 11:48
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class CommonService {
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description: 获取本地枚举返回给前端
|
|
|
+ * @author zhangyy
|
|
|
+ * @date 2024/9/24 11:56
|
|
|
+ * @version 1.0
|
|
|
+ */
|
|
|
+ public List<LocalEnumDto> getLocalEnumList() {
|
|
|
+ List<LocalEnumDto> localEnumDtoList = new ArrayList<>();
|
|
|
+ EgApiTypeEnum[] values = EgApiTypeEnum.values();
|
|
|
+ LocalEnumDto localEnumDto=null;
|
|
|
+ for (int i = 0; i < values.length; i++) {
|
|
|
+ localEnumDto = new LocalEnumDto();
|
|
|
+ localEnumDto.setCode(values[i].getCode());
|
|
|
+ localEnumDto.setMsg(values[i].getMsg());
|
|
|
+ localEnumDtoList.add(localEnumDto);
|
|
|
+ }
|
|
|
+ return localEnumDtoList;
|
|
|
+ }
|
|
|
+}
|