LAPTOP-KB9HII50\70708 11 ヶ月 前
コミット
a75b7a73df

+ 15 - 1
business/base-service/src/main/java/com/yihu/jw/article/service/BaseMenuManageService.java

@ -783,7 +783,7 @@ public class BaseMenuManageService {
        return list;
    }
    public MixEnvelop findArticleByMenuId(String menuId, String title, Integer page, Integer pageSize, String isContent, String articleType) {
    public MixEnvelop findArticleByMenuId(String categoryFirst,String menuId, String title, Integer page, Integer pageSize, String isContent, String articleType) {
        List<String> menuIds = new ArrayList<>();
        if (StringUtils.isNoneBlank(menuId)) {
            String str[] = menuId.split(",");
@ -805,6 +805,20 @@ public class BaseMenuManageService {
                menuId = menuId.substring(1, menuId.length() - 1);
            }
        }
        if (StringUtils.isNotBlank(categoryFirst)) {
            if (StringUtils.isBlank(menuId)) {
                menuId = "";
            }
            String sqlType = "select * from base_menu_dict where parent_id='" + categoryFirst + "' and is_del='1' and status=1";
            List<BaseMenuDictDO> menuDictDOS = jdbcTemplate.query(sqlType, new BeanPropertyRowMapper<>(BaseMenuDictDO.class));
            if (menuDictDOS.size() > 0) {
                for (BaseMenuDictDO menuDictDO : menuDictDOS) {
                    menuIds.add(menuDictDO.getId());
                    menuId = menuId + "," + menuDictDO.getId() + ",";
                }
                menuId = menuId.substring(1, menuId.length() - 1);
            }
        }
        System.out.print("menuId" + menuId);
        Integer count;

+ 4 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/menu/BaseMenuNoLoginEndpoint.java

@ -61,7 +61,9 @@ public class BaseMenuNoLoginEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseRequestMapping.MenuNologin.findArticleByMenuId)
    @ApiOperation(value = "查询文章")
    public Envelop findArticleByMenuid(
            @ApiParam(name = "menuId", value = "menuId", required = false)
            @ApiParam(name = "categoryFirst", value = "一级分类", required = false)
            @RequestParam(value = "categoryFirst",required = false) String categoryFirst,
            @ApiParam(name = "menuId", value = "二级分类", required = false)
            @RequestParam(value = "menuId",required = false) String menuId,
            @ApiParam(name = "title", value = "menuId", required = false)
            @RequestParam(value = "title",required = false) String title,
@ -74,7 +76,7 @@ public class BaseMenuNoLoginEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "pageSize", value = "pageSize", required = false)
            @RequestParam(value = "pageSize",required = true) Integer pageSize) {
        try {
            return success(menuService.findArticleByMenuId(menuId,title,page,pageSize,isContent,articleType));
            return success(menuService.findArticleByMenuId(categoryFirst,menuId,title,page,pageSize,isContent,articleType));
        }catch (Exception e){
            return failedException(e);
        }

+ 3 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/article/BaseMenuNoLoginEndpoint.java

@ -63,6 +63,8 @@ public class BaseMenuNoLoginEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseRequestMapping.MenuNologin.findArticleByMenuId)
    @ApiOperation(value = "查询文章")
    public Envelop findArticleByMenuid(
            @ApiParam(name = "categoryFirst", value = "一级分类", required = false)
            @RequestParam(value = "categoryFirst",required = false) String categoryFirst,
            @ApiParam(name = "menuId", value = "menuId", required = false)
            @RequestParam(value = "menuId",required = false) String menuId,
            @ApiParam(name = "articleType", value = "文章类型", required = false)
@ -74,7 +76,7 @@ public class BaseMenuNoLoginEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "pageSize", value = "pageSize", required = false)
            @RequestParam(value = "pageSize",required = true) Integer pageSize) {
        try {
            return success(menuService.findArticleByMenuId(menuId,title,page,pageSize,"0",articleType));
            return success(menuService.findArticleByMenuId(categoryFirst,menuId,title,page,pageSize,"0",articleType));
        }catch (Exception e){
            return failedException(e);
        }