2024.8.26

This commit is contained in:
lee 2024-08-26 08:42:46 +08:00
parent d22e0102fe
commit 3d1d4d1d0e
4 changed files with 38 additions and 64 deletions

View File

@ -66,6 +66,17 @@ public class DoorController extends BaseController {
return getDataTable(list);
}
/**
* 查询文章管理列表
*/
@ApiOperation("查询文章")
@PostMapping("/gwArticleList")
public TableDataInfo gwArticleList(CmsArticle article) {
startPage();
List<CmsArticle> list = articleService.selectCmsArticleList(article);
return getDataTable(list);
}
@ApiOperation("文章详情查询")
@ApiImplicitParam(name = "id", value = "文章Id", required = true, dataType = "int", paramType = "path", dataTypeClass = String.class)
@PostMapping("/getArt/{id}")
@ -88,9 +99,9 @@ public class DoorController extends BaseController {
*/
@ApiOperation("照片查询")
@PostMapping("/MaterialList")
public TableDataInfo list() {
public TableDataInfo list(CmsMaterial cmsMaterial) {
// startPage();
List<CmsMaterial> list = materialMapper.selectCmsMaterialList(new CmsMaterial());
List<CmsMaterial> list = materialMapper.selectCmsMaterialList(cmsMaterial);
return getDataTable(list);
}
@ -129,12 +140,14 @@ public class DoorController extends BaseController {
@ApiImplicitParam(name = "description", value = "摘要", dataType = "String", dataTypeClass = String.class),
@ApiImplicitParam(name = "articleModel", value = "文章模型", dataType = "String", dataTypeClass = String.class)
})
public List<CmsArticle> searchArticles(@RequestParam(value = "author", required = false) String author,
public TableDataInfo searchArticles(@RequestParam(value = "author", required = false) String author,
@RequestParam(value = "title", required = false) String title,
@RequestParam(value = "keywords", required = false) String keywords,
@RequestParam(value = "description", required = false) String description,
@RequestParam(value = "articleModel", required = false) String articleModel) {
return articleMapper.selectArticlesFuzzySearch(author, title, keywords, description, articleModel);
startPage();
List<CmsArticle> list = articleMapper.selectArticlesFuzzySearch(author, title, keywords, description, articleModel);
return getDataTable(list);
}
/**
@ -197,62 +210,12 @@ public class DoorController extends BaseController {
}
}
}
/**
* 查询留言列表
* 模糊查询首页收索框
*/
// @ApiOperation("查询留言")
// @PostMapping("/Wordslist")
// public TableDataInfo list(CmsLeaveWords cmsLeaveWords)
// {
// startPage();
// List<CmsLeaveWords> list = cmsLeaveWordsService.selectCmsLeaveWordsList(cmsLeaveWords);
// return getDataTable(list);
// }
/**
* 新增保存留言
*/
// @ApiOperation("新增留言")
// @ApiImplicitParams({
// @ApiImplicitParam(name = "wordsTheme", value = "留言主题", dataType = "String", dataTypeClass = String.class),
// @ApiImplicitParam(name = "wordsEmil", value = "邮箱", dataType = "String", dataTypeClass = String.class),
// @ApiImplicitParam(name = "wordsCms", value = "留言内容", dataType = "String", dataTypeClass = String.class)
// })
// @Log(title = "留言", businessType = BusinessType.INSERT)
// @PostMapping("/WordsAdd")
// public AjaxResult addSave(CmsLeaveWords cmsLeaveWords)
// {
// return toAjax(cmsLeaveWordsService.insertCmsLeaveWords(cmsLeaveWords));
// }
/**
* 查询团队预约列表
*/
// @ApiOperation("查询团队预约列表")
// @PostMapping("/MakeAnAppointmentList")
// public TableDataInfo list(CmsMakeAnAppointment cmsMakeAnAppointment)
// {
// startPage();
// List<CmsMakeAnAppointment> list = cmsMakeAnAppointmentService.selectCmsMakeAnAppointmentList(cmsMakeAnAppointment);
// return getDataTable(list);
// }
/**
* 新增保存团队预约
*/
// @ApiOperation("新增团队预约")
// @ApiImplicitParams({
// @ApiImplicitParam(name = "makeLinkman", value = "联系人", dataType = "String", dataTypeClass = String.class),
// @ApiImplicitParam(name = "makePhone", value = "手机号", dataType = "String", dataTypeClass = String.class),
// @ApiImplicitParam(name = "makeCompany", value = "单位名称", dataType = "String", dataTypeClass = String.class),
// @ApiImplicitParam(name = "makeDate", value = "预约时间", dataType = "Date", dataTypeClass = Date.class)
// })
// @Log(title = "团队预约", businessType = BusinessType.INSERT)
// @PostMapping("/MakeAnAppointmentAdd")
// public AjaxResult addSave(CmsMakeAnAppointment cmsMakeAnAppointment)
// {
// return toAjax(cmsMakeAnAppointmentService.insertCmsMakeAnAppointment(cmsMakeAnAppointment));
// }
@GetMapping("/getNext")
public AjaxResult getBNext(@RequestParam(value = "id") Long id,
@RequestParam(value = "categoryId") String categoryId) {
return AjaxResult.success(articleMapper.getNext(id,categoryId));
}
}

View File

@ -85,4 +85,10 @@ public interface CmsArticleMapper
* @return
*/
public Map<String,Object> getArticleContent(String article_id);
/**
* 下一篇
*/
CmsArticle getNext(@Param("id") Long id,
@Param("categoryId") String categoryId);
}

View File

@ -227,10 +227,10 @@ public class CmsArticleServiceImpl implements ICmsArticleService
public int updateCmsArticle(CmsArticle cmsArticle)
{
cmsArticle.setUpdateTime(DateUtils.getNowDate());
if(SecurityUtils.getLoginUser().getUser() != null){
SysUser user = SecurityUtils.getLoginUser().getUser();
cmsArticle.setYhid(user.getUserId().toString());
}
// if(SecurityUtils.getLoginUser().getUser() != null){
// SysUser user = SecurityUtils.getLoginUser().getUser();
// cmsArticle.setYhid(user.getUserId().toString());
// }
cmsArticle.setDeleted(0);
cmsArticle.setTopFlag(1);
cmsArticle.setAvailable(1);

View File

@ -251,4 +251,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
id=#{article_id}
</where>
</select>
<select id="getNext" parameterType="CmsArticle" resultMap="CmsArticleResult">
select id,title from cms_article where id &gt; #{id} and category_id = #{categoryId}
limit 1
</select>
</mapper>