## 添加数据来源枚举接口;
This commit is contained in:
parent
39d070d638
commit
3bc0452bfa
|
|
@ -30,10 +30,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
|
|
@ -2626,5 +2623,21 @@ public class EnumsController extends BaseController {
|
|||
return AjaxResult.success(enumEntityList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品数据来源
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/product-source")
|
||||
public AjaxResult productSource() {
|
||||
List<Map<String, String>> enumEntityList = new ArrayList<>();
|
||||
for (EProductSource value : EProductSource.values()) {
|
||||
HashMap<String, String> tmpEnumEntity = new HashMap<>();
|
||||
tmpEnumEntity.put("value", value.getValue());
|
||||
tmpEnumEntity.put("label", value.getLabel());
|
||||
enumEntityList.add(tmpEnumEntity);
|
||||
}
|
||||
return AjaxResult.success(enumEntityList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue