Commit 1c3bfaaf by 吴迪

【新增】前端页面接口

parent 2057f79e
......@@ -60,6 +60,8 @@ public class ShiroConfig {
filterMap.put("/swagger-resources/**", "anon");
filterMap.put("/captcha.jpg", "anon");
filterMap.put("/aaa.txt", "anon");
//不需要登录的接口
filterMap.put("/*/api/**", "anon");
filterMap.put("/**", "oauth2");
shiroFilter.setFilterChainDefinitionMap(filterMap);
......
package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
......@@ -113,4 +115,28 @@ public class IndexCarouselManageController extends AbstractController {
}
}
@PostMapping("/api/bigImages")
// @RequiresPermissions("generator:indexcarouselmanage:bigImages")
public R bigImages() {
try {
QueryWrapper<IndexCarouselManageEntity> newsEntityQueryWrapper = new QueryWrapper<>();
newsEntityQueryWrapper.eq("classnum","大轮播");
newsEntityQueryWrapper.eq("checkflag_index","1");
newsEntityQueryWrapper.gt("levels","0");
newsEntityQueryWrapper.orderByDesc("levels_index");
List<IndexCarouselManageEntity> list = indexCarouselManageService.list(newsEntityQueryWrapper);
return R.ok().put("data", list);
} catch (Exception e) {
log.error("verifyIndexCarouselManage error:", e);
return R.error(e.getMessage());
}
}
}
......@@ -4,9 +4,11 @@ import java.util.Arrays;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
import io.office.modules.manage.entity.IndexCarouselManageEntity;
import io.office.modules.manage.entity.NewsEntity;
import io.office.modules.manage.entity.PictureEntity;
import io.office.modules.manage.entity.dto.PictureParams;
......@@ -115,4 +117,27 @@ public class PictureController extends AbstractController {
}
}
@PostMapping("/api/pictureImageList")
// @RequiresPermissions("generator:indexcarouselmanage:pictureImageList")
public R bigImages() {
try {
QueryWrapper<PictureEntity> newsEntityQueryWrapper = new QueryWrapper<>();
newsEntityQueryWrapper.select("TOP 3 *");
newsEntityQueryWrapper.eq("status","1");
newsEntityQueryWrapper.gt("PicLevel","0");
newsEntityQueryWrapper.orderByDesc("PicLevel");
newsEntityQueryWrapper.orderByDesc("showtime");
newsEntityQueryWrapper.orderByDesc("inputDate");
newsEntityQueryWrapper.orderByDesc("pictureID");
List<PictureEntity> list = pictureService.list(newsEntityQueryWrapper);
return R.ok().put("data", list);
} catch (Exception e) {
log.error("verifyIndexCarouselManage error:", e);
return R.error(e.getMessage());
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment