|
@@ -0,0 +1,39 @@
|
|
|
|
+package com.jkcredit.sysnews.resource.biz.navigationBar;
|
|
|
|
+
|
|
|
|
+import com.jkcredit.sysnews.model.vo.navigationBar.NavigationBarVo;
|
|
|
|
+import com.jkcredit.sysnews.resource.base.BizResource;
|
|
|
|
+import com.jkcredit.sysnews.service.navigationBar.NavigationBarService;
|
|
|
|
+import com.jkcredit.sysnews.spi.lang.exception.ServiceException;
|
|
|
|
+import com.jkcredit.sysnews.spi.web.data.ResponseData;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
+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.RestController;
|
|
|
|
+
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @description:
|
|
|
|
+ * @author: xusonglin
|
|
|
|
+ * @create: 2020/3/16 13:43
|
|
|
|
+ * @version: V1.0
|
|
|
|
+ **/
|
|
|
|
+@Slf4j
|
|
|
|
+@RestController
|
|
|
|
+public class NavigationBarBizResource extends BizResource {
|
|
|
|
+ @Autowired
|
|
|
|
+ NavigationBarService navigationBarService;
|
|
|
|
+
|
|
|
|
+ @GetMapping("/menus")
|
|
|
|
+ @ApiOperation(value = "获取菜单栏")
|
|
|
|
+ public ResponseData getNavigationBars() {
|
|
|
|
+ try {
|
|
|
|
+ List<NavigationBarVo> navigationBarVoList = navigationBarService.getNavigationBarsWithoutPage();
|
|
|
|
+ return ResponseData.success(navigationBarVoList);
|
|
|
|
+ } catch (ServiceException e) {
|
|
|
|
+ log.error(e.getMessage());
|
|
|
|
+ return ResponseData.failed("获取菜单栏失败");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|