diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/DoorController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/DoorController.java new file mode 100644 index 0000000..b5a1b4e --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/DoorController.java @@ -0,0 +1,67 @@ +package com.ruoyi.web.controller.system; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.utils.sign.Base64; +import com.ruoyi.system.domain.XysArticle; +import com.ruoyi.system.domain.XysImg; +import com.ruoyi.system.service.IXysArticleService; +import com.ruoyi.system.service.IXysImgService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 門戶Controller + * + * @author libao + * @date 2024-07-08 + */ +@RestController +@RequestMapping("/door") +public class DoorController extends BaseController +{ + @Autowired + private IXysArticleService xysArticleService; + @Autowired + private IXysImgService xysImgService; + + /** + * 查询文章列表 + */ + @GetMapping("/getArticleList") + public TableDataInfo getArticleList(XysArticle xysArticle) + { + startPage(); + List list = xysArticleService.selectXysArticleList(xysArticle); + return getDataTable(list); + } + + /** + * 查询图片列表 + */ + @GetMapping("/getImgList") + public TableDataInfo getImgList(XysImg xysImg) + { + startPage(); + List list = xysImgService.selectXysImgList(xysImg); + return getDataTable(list); + } + + /** + * 获取文章管理详细信息 + */ + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(xysArticleService.selectXysArticleById(id)); + } + +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/XysArticleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/XysArticleController.java index 630456e..38fb15d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/XysArticleController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/XysArticleController.java @@ -79,8 +79,8 @@ public class XysArticleController extends BaseController @PostMapping public AjaxResult add(@RequestBody XysArticle xysArticle) { - String content = new String(Base64.decode(xysArticle.getContent())); - xysArticle.setContent(content); +// String content = new String(Base64.decode(xysArticle.getContent())); +// xysArticle.setContent(content); return toAjax(xysArticleService.insertXysArticle(xysArticle)); } @@ -92,8 +92,8 @@ public class XysArticleController extends BaseController @PutMapping public AjaxResult edit(@RequestBody XysArticle xysArticle) { - String content = new String(Base64.decode(xysArticle.getContent())); - xysArticle.setContent(content); +// String content = new String(Base64.decode(xysArticle.getContent())); +// xysArticle.setContent(content); return toAjax(xysArticleService.updateXysArticle(xysArticle)); } diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml index 55b4075..28cf8cb 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml @@ -14,9 +14,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - select dict_id, dict_name, dict_type, status, create_by, create_time, remark + select dict_id, dict_name, dict_type, status, create_by, create_time, remark from sys_dict_type @@ -39,36 +39,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') + order by create_time desc - + - + - + - + - + delete from sys_dict_type where dict_id = #{dictId} - + delete from sys_dict_type where dict_id in #{dictId} - + @@ -83,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where dict_id = #{dictId} - + insert into sys_dict_type( dict_name, @@ -101,5 +102,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sysdate() ) - - \ No newline at end of file + + diff --git a/ruoyi-ui/src/views/system/img/index.vue b/ruoyi-ui/src/views/system/img/index.vue index 498ddcc..609fd1c 100644 --- a/ruoyi-ui/src/views/system/img/index.vue +++ b/ruoyi-ui/src/views/system/img/index.vue @@ -66,7 +66,11 @@ - + + +