|
@ -0,0 +1,74 @@
|
|
|
package com.yihu.jw.hospital.endpoint.article;
|
|
|
|
|
|
import com.yihu.jw.article.dao.KnowledgeArticleDictDao;
|
|
|
import com.yihu.jw.article.service.BaseMenuManageService;
|
|
|
import com.yihu.jw.restmodel.web.Envelop;
|
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
|
import com.yihu.jw.rm.base.BaseRequestMapping;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
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 javax.annotation.Resource;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping(value = BaseRequestMapping.MenuNologin.PREFIX)
|
|
|
@Api(value = "首页菜单管理免登录接口", description = "首页菜单管理免登录接口", tags = {"基础服务 - 首页菜单管理免登录接口"})
|
|
|
public class BaseMenuNoLoginEndpoint extends EnvelopRestEndpoint {
|
|
|
@Autowired
|
|
|
private BaseMenuManageService menuService;
|
|
|
@Resource
|
|
|
private KnowledgeArticleDictDao knowledgeArticleDictDao;
|
|
|
|
|
|
@GetMapping(value = BaseRequestMapping.MenuNologin.findAllMenu)
|
|
|
@ApiOperation(value = "查询首页列表")
|
|
|
public Envelop findMenuShowByKey(
|
|
|
@ApiParam(name = "parentId", value = "parentId", required = false)
|
|
|
@RequestParam(value = "parentId",required = false) String parentId,
|
|
|
@ApiParam(name = "name", value = "name", required = false)
|
|
|
@RequestParam(value = "name",required = false) String name) {
|
|
|
try {
|
|
|
return success(menuService.findMenuShow());
|
|
|
}catch (Exception e){
|
|
|
return failedException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseRequestMapping.MenuNologin.findMenuByParentId)
|
|
|
@ApiOperation(value = "查询二级菜单")
|
|
|
public Envelop findMenuByParentId(
|
|
|
@ApiParam(name = "parentId", value = "parentId", required = false)
|
|
|
@RequestParam(value = "parentId",required = false) String parentId,
|
|
|
@ApiParam(name = "status", value = "status", required = false)
|
|
|
@RequestParam(value = "status",required = false) Integer status) {
|
|
|
try {
|
|
|
return success(menuService.findByParentId(parentId,status));
|
|
|
}catch (Exception e){
|
|
|
return failedException(e);
|
|
|
}
|
|
|
}
|
|
|
@GetMapping(value = BaseRequestMapping.MenuNologin.findArticleByMenuId)
|
|
|
@ApiOperation(value = "查询文章")
|
|
|
public Envelop findArticleByMenuid(
|
|
|
@ApiParam(name = "menuId", value = "menuId", required = false)
|
|
|
@RequestParam(value = "menuId",required = true) String menuId,
|
|
|
@ApiParam(name = "title", value = "menuId", required = false)
|
|
|
@RequestParam(value = "title",required = false) String title,
|
|
|
@ApiParam(name = "page", value = "page", required = false)
|
|
|
@RequestParam(value = "page",required = true) Integer page,
|
|
|
@ApiParam(name = "pageSize", value = "pageSize", required = false)
|
|
|
@RequestParam(value = "pageSize",required = true) Integer pageSize) {
|
|
|
try {
|
|
|
return success(menuService.findArticleByMenuId(menuId,title,page,pageSize));
|
|
|
}catch (Exception e){
|
|
|
return failedException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|