init
This commit is contained in:
@@ -0,0 +1,115 @@
|
||||
package com.ruoyi.office.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.office.domain.TtArticles;
|
||||
import com.ruoyi.office.service.ITtArticlesService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 文章Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-03-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/office/articles")
|
||||
public class TtArticlesController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITtArticlesService ttArticlesService;
|
||||
|
||||
/**
|
||||
* 查询文章列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:articles:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TtArticles ttArticles)
|
||||
{
|
||||
startPage();
|
||||
List<TtArticles> list = ttArticlesService.selectTtArticlesList(ttArticles);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出文章列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:articles:export')")
|
||||
@Log(title = "文章", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TtArticles ttArticles)
|
||||
{
|
||||
List<TtArticles> list = ttArticlesService.selectTtArticlesList(ttArticles);
|
||||
ExcelUtil<TtArticles> util = new ExcelUtil<TtArticles>(TtArticles.class);
|
||||
util.exportExcel(response, list, "文章数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文章详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:articles:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Integer id)
|
||||
{
|
||||
return success(ttArticlesService.selectTtArticlesById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文章
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:articles:add')")
|
||||
@Log(title = "文章", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TtArticles ttArticles)
|
||||
{
|
||||
return toAjax(ttArticlesService.insertTtArticles(ttArticles));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文章
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:articles:edit')")
|
||||
@Log(title = "文章", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TtArticles ttArticles)
|
||||
{
|
||||
return toAjax(ttArticlesService.updateTtArticles(ttArticles));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文章
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:articles:remove')")
|
||||
@Log(title = "文章", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Integer[] ids)
|
||||
{
|
||||
return toAjax(ttArticlesService.deleteTtArticlesByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布文章
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:articles:edit')")
|
||||
@Log(title = "文章", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("published/{ids}")
|
||||
public AjaxResult publish(@PathVariable Integer[] ids)
|
||||
{
|
||||
return toAjax(ttArticlesService.publishTtArticlesByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.office.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.office.domain.TtCarousel;
|
||||
import com.ruoyi.office.service.ITtCarouselService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 轮播图管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-03-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/office/carousel")
|
||||
public class TtCarouselController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITtCarouselService ttCarouselService;
|
||||
|
||||
/**
|
||||
* 查询轮播图管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:carousel:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TtCarousel ttCarousel)
|
||||
{
|
||||
startPage();
|
||||
List<TtCarousel> list = ttCarouselService.selectTtCarouselList(ttCarousel);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出轮播图管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:carousel:export')")
|
||||
@Log(title = "轮播图管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TtCarousel ttCarousel)
|
||||
{
|
||||
List<TtCarousel> list = ttCarouselService.selectTtCarouselList(ttCarousel);
|
||||
ExcelUtil<TtCarousel> util = new ExcelUtil<TtCarousel>(TtCarousel.class);
|
||||
util.exportExcel(response, list, "轮播图管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取轮播图管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:carousel:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Integer id)
|
||||
{
|
||||
return success(ttCarouselService.selectTtCarouselById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增轮播图管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:carousel:add')")
|
||||
@Log(title = "轮播图管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TtCarousel ttCarousel)
|
||||
{
|
||||
return toAjax(ttCarouselService.insertTtCarousel(ttCarousel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改轮播图管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:carousel:edit')")
|
||||
@Log(title = "轮播图管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TtCarousel ttCarousel)
|
||||
{
|
||||
return toAjax(ttCarouselService.updateTtCarousel(ttCarousel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除轮播图管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:carousel:remove')")
|
||||
@Log(title = "轮播图管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Integer[] ids)
|
||||
{
|
||||
return toAjax(ttCarouselService.deleteTtCarouselByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package com.ruoyi.office.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.office.domain.TtCode;
|
||||
import com.ruoyi.office.service.ITtCodeService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 源码管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/office/code")
|
||||
public class TtCodeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITtCodeService ttCodeService;
|
||||
|
||||
/**
|
||||
* 查询源码管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:code:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TtCode ttCode)
|
||||
{
|
||||
startPage();
|
||||
List<TtCode> list = ttCodeService.selectTtCodeList(ttCode);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出源码管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:code:export')")
|
||||
@Log(title = "源码管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TtCode ttCode)
|
||||
{
|
||||
List<TtCode> list = ttCodeService.selectTtCodeList(ttCode);
|
||||
ExcelUtil<TtCode> util = new ExcelUtil<TtCode>(TtCode.class);
|
||||
util.exportExcel(response, list, "源码管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取源码管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:code:query')")
|
||||
@GetMapping(value = "/{codeId}")
|
||||
public AjaxResult getInfo(@PathVariable("codeId") Long codeId)
|
||||
{
|
||||
return success(ttCodeService.selectTtCodeByCodeId(codeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增源码管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:code:add')")
|
||||
@Log(title = "源码管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TtCode ttCode)
|
||||
{
|
||||
return toAjax(ttCodeService.insertTtCode(ttCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改源码管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:code:edit')")
|
||||
@Log(title = "源码管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TtCode ttCode)
|
||||
{
|
||||
return toAjax(ttCodeService.updateTtCode(ttCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除源码管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:code:remove')")
|
||||
@Log(title = "源码管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{codeIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] codeIds)
|
||||
{
|
||||
return toAjax(ttCodeService.deleteTtCodeByCodeIds(codeIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 转文章
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:code:edit')")
|
||||
@Log(title = "源码管理", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/transToArticle/{codeId}")
|
||||
public AjaxResult transToArticle(@PathVariable Long codeId)
|
||||
{
|
||||
String msg = ttCodeService.transToArticle(codeId);
|
||||
return success(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转文章
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:code:edit')")
|
||||
@Log(title = "转文章(南音)", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/transToArticle1/{codeId}")
|
||||
public AjaxResult transToArticle1(@PathVariable Long codeId, @RequestParam String coverUrl) {
|
||||
String msg = ttCodeService.transToArticle1(codeId, coverUrl);
|
||||
return success(msg);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.office.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.office.domain.TtFile;
|
||||
import com.ruoyi.office.service.ITtFileService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 文件管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/office/file")
|
||||
public class TtFileController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITtFileService ttFileService;
|
||||
|
||||
/**
|
||||
* 查询文件管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:file:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TtFile ttFile)
|
||||
{
|
||||
startPage();
|
||||
List<TtFile> list = ttFileService.selectTtFileList(ttFile);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出文件管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:file:export')")
|
||||
@Log(title = "文件管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TtFile ttFile)
|
||||
{
|
||||
List<TtFile> list = ttFileService.selectTtFileList(ttFile);
|
||||
ExcelUtil<TtFile> util = new ExcelUtil<TtFile>(TtFile.class);
|
||||
util.exportExcel(response, list, "文件管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:file:query')")
|
||||
@GetMapping(value = "/{fileId}")
|
||||
public AjaxResult getInfo(@PathVariable("fileId") Long fileId)
|
||||
{
|
||||
return success(ttFileService.selectTtFileByFileId(fileId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文件管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:file:add')")
|
||||
@Log(title = "文件管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TtFile ttFile)
|
||||
{
|
||||
return toAjax(ttFileService.insertTtFile(ttFile));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文件管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:file:edit')")
|
||||
@Log(title = "文件管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TtFile ttFile)
|
||||
{
|
||||
return toAjax(ttFileService.updateTtFile(ttFile));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文件管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:file:remove')")
|
||||
@Log(title = "文件管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{fileIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] fileIds)
|
||||
{
|
||||
return toAjax(ttFileService.deleteTtFileByFileIds(fileIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
package com.ruoyi.office.controller;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.utils.CoverGenerator;
|
||||
import com.ruoyi.office.domain.TtCode;
|
||||
import com.ruoyi.office.service.ITtCodeService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.office.domain.TtProjectInfo;
|
||||
import com.ruoyi.office.service.ITtProjectInfoService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 项目清单Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/office/project")
|
||||
public class TtProjectInfoController extends BaseController {
|
||||
@Autowired
|
||||
private ITtProjectInfoService ttProjectInfoService;
|
||||
@Autowired
|
||||
private ITtCodeService ttCodeService;
|
||||
|
||||
|
||||
/**
|
||||
* 查询项目清单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:project:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TtProjectInfo ttProjectInfo) {
|
||||
startPage();
|
||||
List<TtProjectInfo> list = ttProjectInfoService.selectTtProjectInfoList(ttProjectInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出项目清单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:project:export')")
|
||||
@Log(title = "项目清单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TtProjectInfo ttProjectInfo) {
|
||||
List<TtProjectInfo> list = ttProjectInfoService.selectTtProjectInfoList(ttProjectInfo);
|
||||
ExcelUtil<TtProjectInfo> util = new ExcelUtil<TtProjectInfo>(TtProjectInfo.class);
|
||||
util.exportExcel(response, list, "项目清单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目清单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:project:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Integer id) {
|
||||
return success(ttProjectInfoService.selectTtProjectInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目清单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:project:add')")
|
||||
@Log(title = "项目清单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TtProjectInfo ttProjectInfo) {
|
||||
return toAjax(ttProjectInfoService.insertTtProjectInfo(ttProjectInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目清单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:project:edit')")
|
||||
@Log(title = "项目清单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TtProjectInfo ttProjectInfo) {
|
||||
return toAjax(ttProjectInfoService.updateTtProjectInfo(ttProjectInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目清单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:project:remove')")
|
||||
@Log(title = "项目清单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Integer[] ids) {
|
||||
return toAjax(ttProjectInfoService.deleteTtProjectInfoByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 匹配已整理源码
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:project:edit')")
|
||||
@Log(title = "匹配已整理源码", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/matchCode/{id}")
|
||||
public AjaxResult matchCode(@PathVariable Integer id) {
|
||||
String msg = ttProjectInfoService.matchCode(id);
|
||||
return success(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成项目封面图
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('office:project:edit')")
|
||||
@Log(title = "生成封面图", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/cover/{id}")
|
||||
public void generateCover(@PathVariable Long id, HttpServletResponse response) throws IOException {
|
||||
try {
|
||||
TtCode ttCode = ttCodeService.selectTtCodeByCodeId(id);
|
||||
TtProjectInfo projectInfo = ttProjectInfoService.selectTtProjectInfoByName(ttCode.getCodeName());
|
||||
String projectName = projectInfo.getProjectName1() == null ? projectInfo.getProjectName() : projectInfo.getProjectName1();
|
||||
|
||||
// 将项目名称按"的"分割,取后半部分作为副标题
|
||||
String title = projectInfo.getProjectNum1();
|
||||
String subtitle = projectName;
|
||||
if (projectName != null && projectName.contains("的")) {
|
||||
String[] parts = projectName.split("的");
|
||||
if (parts.length > 1) {
|
||||
subtitle = parts[parts.length - 1].trim();
|
||||
}
|
||||
}
|
||||
|
||||
String tag = projectInfo.getProjectDesc();
|
||||
int titleSize = 120;
|
||||
if (subtitle.length() > 8) {
|
||||
titleSize = 80;
|
||||
}
|
||||
|
||||
// 使用CoverGenerator生成图片
|
||||
BufferedImage cover = CoverGenerator.createCover(
|
||||
title,
|
||||
subtitle,
|
||||
tag,
|
||||
titleSize // 副标题字体大小
|
||||
);
|
||||
|
||||
// 设置响应头
|
||||
response.setContentType("application/octet-stream");
|
||||
String fileName = new String((projectInfo.getProjectName() + "_cover.png").getBytes("UTF-8"), "ISO-8859-1");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=" + fileName);
|
||||
response.setHeader("Access-Control-Expose-Headers", "Content-Disposition");
|
||||
|
||||
// 将图片写入响应流
|
||||
ImageIO.write(cover, "PNG", response.getOutputStream());
|
||||
response.getOutputStream().flush();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("生成封面图片失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
package com.ruoyi.office.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 文章对象 tt_articles
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-03-01
|
||||
*/
|
||||
public class TtArticles extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 文章ID,主键 */
|
||||
private Integer id;
|
||||
|
||||
/** 文章标题 */
|
||||
@Excel(name = "文章标题")
|
||||
private String title;
|
||||
|
||||
/** 文章摘要 */
|
||||
@Excel(name = "文章摘要")
|
||||
private String summary;
|
||||
|
||||
/** 文章内容 */
|
||||
@Excel(name = "文章内容")
|
||||
private String content;
|
||||
|
||||
/** 作者姓名 */
|
||||
@Excel(name = "作者姓名")
|
||||
private String author;
|
||||
|
||||
/** 文章发布日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "文章发布日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date publishedDate;
|
||||
|
||||
/** 文章分类 */
|
||||
@Excel(name = "文章分类")
|
||||
private String category;
|
||||
|
||||
/** 文章标签(多个标签用逗号分隔) */
|
||||
@Excel(name = "文章标签", readConverterExp = "多=个标签用逗号分隔")
|
||||
private String tags;
|
||||
|
||||
/** 文章附件下载链接 */
|
||||
@Excel(name = "文章附件下载链接")
|
||||
private String attachmentUrl;
|
||||
|
||||
/** 文章浏览次数 */
|
||||
@Excel(name = "文章浏览次数")
|
||||
private Integer views;
|
||||
|
||||
/** 文章头图 */
|
||||
@Excel(name = "文章头图")
|
||||
private String cover;
|
||||
|
||||
/** 文章是否已发布(TRUE为已发布,FALSE为草稿) */
|
||||
@Excel(name = "文章是否已发布")
|
||||
private String isPublished;
|
||||
|
||||
/** 文章创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "文章创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date createdAt;
|
||||
|
||||
/** 文章最后更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "文章最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date updatedAt;
|
||||
|
||||
private List<TtFile> fileList;
|
||||
|
||||
public void setId(Integer id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
public void setSummary(String summary)
|
||||
{
|
||||
this.summary = summary;
|
||||
}
|
||||
|
||||
public String getSummary()
|
||||
{
|
||||
return summary;
|
||||
}
|
||||
public void setContent(String content)
|
||||
{
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getContent()
|
||||
{
|
||||
return content;
|
||||
}
|
||||
public void setAuthor(String author)
|
||||
{
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public String getAuthor()
|
||||
{
|
||||
return author;
|
||||
}
|
||||
public void setPublishedDate(Date publishedDate)
|
||||
{
|
||||
this.publishedDate = publishedDate;
|
||||
}
|
||||
|
||||
public Date getPublishedDate()
|
||||
{
|
||||
return publishedDate;
|
||||
}
|
||||
public void setCategory(String category)
|
||||
{
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getCategory()
|
||||
{
|
||||
return category;
|
||||
}
|
||||
public void setTags(String tags)
|
||||
{
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
public String getTags()
|
||||
{
|
||||
return tags;
|
||||
}
|
||||
public void setAttachmentUrl(String attachmentUrl)
|
||||
{
|
||||
this.attachmentUrl = attachmentUrl;
|
||||
}
|
||||
|
||||
public String getAttachmentUrl()
|
||||
{
|
||||
return attachmentUrl;
|
||||
}
|
||||
public void setViews(Integer views)
|
||||
{
|
||||
this.views = views;
|
||||
}
|
||||
|
||||
public Integer getViews()
|
||||
{
|
||||
return views;
|
||||
}
|
||||
public void setIsPublished(String isPublished)
|
||||
{
|
||||
this.isPublished = isPublished;
|
||||
}
|
||||
|
||||
public String getIsPublished()
|
||||
{
|
||||
return isPublished;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
|
||||
public String getCover() {
|
||||
return cover;
|
||||
}
|
||||
|
||||
public void setCover(String cover) {
|
||||
this.cover = cover;
|
||||
}
|
||||
|
||||
public List<TtFile> getFileList() {
|
||||
return fileList;
|
||||
}
|
||||
|
||||
public void setFileList(List<TtFile> fileList) {
|
||||
this.fileList = fileList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("title", getTitle())
|
||||
.append("summary", getSummary())
|
||||
.append("content", getContent())
|
||||
.append("author", getAuthor())
|
||||
.append("publishedDate", getPublishedDate())
|
||||
.append("category", getCategory())
|
||||
.append("tags", getTags())
|
||||
.append("attachmentUrl", getAttachmentUrl())
|
||||
.append("views", getViews())
|
||||
.append("cover", getCover())
|
||||
.append("isPublished", getIsPublished())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package com.ruoyi.office.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 轮播图管理对象 tt_carousel
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-03-28
|
||||
*/
|
||||
public class TtCarousel extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Integer id;
|
||||
|
||||
/** 轮播图名称 */
|
||||
@Excel(name = "轮播图名称")
|
||||
private String carouselName;
|
||||
|
||||
/** 轮播图片 */
|
||||
@Excel(name = "轮播图片")
|
||||
private String carouselPic;
|
||||
|
||||
/** 跳转文章 */
|
||||
@Excel(name = "跳转文章")
|
||||
private String carouselArticle;
|
||||
|
||||
/** 更新时间 */
|
||||
private Date updatedAt;
|
||||
|
||||
/** 创建时间 */
|
||||
private Date createdAt;
|
||||
|
||||
public void setId(Integer id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCarouselName(String carouselName)
|
||||
{
|
||||
this.carouselName = carouselName;
|
||||
}
|
||||
|
||||
public String getCarouselName()
|
||||
{
|
||||
return carouselName;
|
||||
}
|
||||
public void setCarouselPic(String carouselPic)
|
||||
{
|
||||
this.carouselPic = carouselPic;
|
||||
}
|
||||
|
||||
public String getCarouselPic()
|
||||
{
|
||||
return carouselPic;
|
||||
}
|
||||
public void setCarouselArticle(String carouselArticle)
|
||||
{
|
||||
this.carouselArticle = carouselArticle;
|
||||
}
|
||||
|
||||
public String getCarouselArticle()
|
||||
{
|
||||
return carouselArticle;
|
||||
}
|
||||
public void setUpdatedAt(Date updatedAt)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Date getUpdatedAt()
|
||||
{
|
||||
return updatedAt;
|
||||
}
|
||||
public void setCreatedAt(Date createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public Date getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("carouselName", getCarouselName())
|
||||
.append("carouselPic", getCarouselPic())
|
||||
.append("carouselArticle", getCarouselArticle())
|
||||
.append("updatedAt", getUpdatedAt())
|
||||
.append("createdAt", getCreatedAt())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
198
ruoyi-office/src/main/java/com/ruoyi/office/domain/TtCode.java
Normal file
198
ruoyi-office/src/main/java/com/ruoyi/office/domain/TtCode.java
Normal file
@@ -0,0 +1,198 @@
|
||||
package com.ruoyi.office.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 源码管理对象 tt_code
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-21
|
||||
*/
|
||||
public class TtCode extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
private Long codeId;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
@Excel(name = "项目名称")
|
||||
private String codeName;
|
||||
|
||||
/**
|
||||
* 项目描述
|
||||
*/
|
||||
@Excel(name = "项目描述")
|
||||
private String codeDesc;
|
||||
|
||||
/**
|
||||
* 运行环境
|
||||
*/
|
||||
@Excel(name = "运行环境")
|
||||
private String codeEnvironment;
|
||||
|
||||
/**
|
||||
* 项目技术
|
||||
*/
|
||||
@Excel(name = "项目技术")
|
||||
private String codeTechnology;
|
||||
|
||||
/**
|
||||
* 来源
|
||||
*/
|
||||
@Excel(name = "来源")
|
||||
private String codeSource;
|
||||
|
||||
/**
|
||||
* 付费方式
|
||||
*/
|
||||
@Excel(name = "付费方式")
|
||||
private String paymentType;
|
||||
|
||||
/**
|
||||
* 网盘地址
|
||||
*/
|
||||
@Excel(name = "网盘地址")
|
||||
private String diskLink;
|
||||
|
||||
/**
|
||||
* 是否发布
|
||||
*/
|
||||
@Excel(name = "是否发布")
|
||||
private String publishFlag;
|
||||
|
||||
/**
|
||||
* 截图文件
|
||||
*/
|
||||
@Excel(name = "截图文件")
|
||||
private String pictureFile;
|
||||
|
||||
/**
|
||||
* 视频文件
|
||||
*/
|
||||
@Excel(name = "视频文件")
|
||||
private String videoFile;
|
||||
|
||||
private List<TtFile> fileList;
|
||||
|
||||
public void setCodeId(Long codeId) {
|
||||
this.codeId = codeId;
|
||||
}
|
||||
|
||||
public Long getCodeId() {
|
||||
return codeId;
|
||||
}
|
||||
|
||||
public void setCodeName(String codeName) {
|
||||
this.codeName = codeName;
|
||||
}
|
||||
|
||||
public String getCodeName() {
|
||||
return codeName;
|
||||
}
|
||||
|
||||
public void setCodeDesc(String codeDesc) {
|
||||
this.codeDesc = codeDesc;
|
||||
}
|
||||
|
||||
public String getCodeDesc() {
|
||||
return codeDesc;
|
||||
}
|
||||
|
||||
public void setCodeEnvironment(String codeEnvironment) {
|
||||
this.codeEnvironment = codeEnvironment;
|
||||
}
|
||||
|
||||
public String getCodeEnvironment() {
|
||||
return codeEnvironment;
|
||||
}
|
||||
|
||||
public void setCodeTechnology(String codeTechnology) {
|
||||
this.codeTechnology = codeTechnology;
|
||||
}
|
||||
|
||||
public String getCodeTechnology() {
|
||||
return codeTechnology;
|
||||
}
|
||||
|
||||
public void setCodeSource(String codeSource) {
|
||||
this.codeSource = codeSource;
|
||||
}
|
||||
|
||||
public String getCodeSource() {
|
||||
return codeSource;
|
||||
}
|
||||
|
||||
public void setPaymentType(String paymentType) {
|
||||
this.paymentType = paymentType;
|
||||
}
|
||||
|
||||
public String getPaymentType() {
|
||||
return paymentType;
|
||||
}
|
||||
|
||||
public void setDiskLink(String diskLink) {
|
||||
this.diskLink = diskLink;
|
||||
}
|
||||
|
||||
public String getDiskLink() {
|
||||
return diskLink;
|
||||
}
|
||||
|
||||
public void setPublishFlag(String publishFlag) {
|
||||
this.publishFlag = publishFlag;
|
||||
}
|
||||
|
||||
public String getPublishFlag() {
|
||||
return publishFlag;
|
||||
}
|
||||
|
||||
public void setPictureFile(String pictureFile) {
|
||||
this.pictureFile = pictureFile;
|
||||
}
|
||||
|
||||
public String getPictureFile() {
|
||||
return pictureFile;
|
||||
}
|
||||
|
||||
public void setVideoFile(String videoFile) {
|
||||
this.videoFile = videoFile;
|
||||
}
|
||||
|
||||
public String getVideoFile() {
|
||||
return videoFile;
|
||||
}
|
||||
|
||||
public List<TtFile> getFileList() {
|
||||
return fileList;
|
||||
}
|
||||
|
||||
public void setFileList(List<TtFile> fileList) {
|
||||
this.fileList = fileList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("codeId", getCodeId())
|
||||
.append("codeName", getCodeName())
|
||||
.append("codeDesc", getCodeDesc())
|
||||
.append("codeEnvironment", getCodeEnvironment())
|
||||
.append("codeTechnology", getCodeTechnology())
|
||||
.append("codeSource", getCodeSource())
|
||||
.append("paymentType", getPaymentType())
|
||||
.append("diskLink", getDiskLink())
|
||||
.append("publishFlag", getPublishFlag())
|
||||
.append("pictureFile", getPictureFile())
|
||||
.append("videoFile", getVideoFile())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
package com.ruoyi.office.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 文件管理对象 tt_file
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public class TtFile extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long fileId;
|
||||
|
||||
/** 文件名称 */
|
||||
@Excel(name = "文件名称")
|
||||
private String fileName;
|
||||
|
||||
/** 文件url */
|
||||
@Excel(name = "文件url")
|
||||
private String fileUrl;
|
||||
|
||||
/** 关联源码 */
|
||||
@Excel(name = "关联源码")
|
||||
private String codeName;
|
||||
|
||||
private String pictureFile;
|
||||
|
||||
public void setFileId(Long fileId)
|
||||
{
|
||||
this.fileId = fileId;
|
||||
}
|
||||
|
||||
public Long getFileId()
|
||||
{
|
||||
return fileId;
|
||||
}
|
||||
public void setFileName(String fileName)
|
||||
{
|
||||
this.fileName = fileName;
|
||||
}
|
||||
|
||||
public String getFileName()
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
public void setFileUrl(String fileUrl)
|
||||
{
|
||||
this.fileUrl = fileUrl;
|
||||
}
|
||||
|
||||
public String getFileUrl()
|
||||
{
|
||||
return fileUrl;
|
||||
}
|
||||
public void setCodeName(String codeName)
|
||||
{
|
||||
this.codeName = codeName;
|
||||
}
|
||||
|
||||
public String getCodeName()
|
||||
{
|
||||
return codeName;
|
||||
}
|
||||
|
||||
public String getPictureFile() {
|
||||
return pictureFile;
|
||||
}
|
||||
|
||||
public void setPictureFile(String pictureFile) {
|
||||
this.pictureFile = pictureFile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("fileId", getFileId())
|
||||
.append("fileName", getFileName())
|
||||
.append("fileUrl", getFileUrl())
|
||||
.append("codeName", getCodeName())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
package com.ruoyi.office.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 项目清单对象 tt_project_info
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-10-23
|
||||
*/
|
||||
public class TtProjectInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Integer id;
|
||||
|
||||
/** 项目编号 */
|
||||
@Excel(name = "项目编号")
|
||||
private String projectNum;
|
||||
|
||||
/** 项目整理编号 */
|
||||
@Excel(name = "项目整理编号")
|
||||
private String projectNum1;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String projectName;
|
||||
|
||||
/** 项目整理名称 */
|
||||
@Excel(name = "项目整理名称")
|
||||
private String projectName1;
|
||||
|
||||
/** 项目描述 */
|
||||
@Excel(name = "项目描述")
|
||||
private String projectDesc;
|
||||
|
||||
/** 项目链接 */
|
||||
@Excel(name = "项目链接")
|
||||
private String projectUrl;
|
||||
|
||||
/** 演示视频链接 */
|
||||
@Excel(name = "演示视频链接")
|
||||
private String projectVurl;
|
||||
|
||||
/** 项目百度链接 */
|
||||
@Excel(name = "项目百度链接")
|
||||
private String projectBaiduUrl;
|
||||
|
||||
public void setId(Integer id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setProjectNum(String projectNum)
|
||||
{
|
||||
this.projectNum = projectNum;
|
||||
}
|
||||
|
||||
public String getProjectNum()
|
||||
{
|
||||
return projectNum;
|
||||
}
|
||||
public void setProjectNum1(String projectNum1)
|
||||
{
|
||||
this.projectNum1 = projectNum1;
|
||||
}
|
||||
|
||||
public String getProjectNum1()
|
||||
{
|
||||
return projectNum1;
|
||||
}
|
||||
public void setProjectName(String projectName)
|
||||
{
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
public String getProjectName()
|
||||
{
|
||||
return projectName;
|
||||
}
|
||||
public void setProjectName1(String projectName1)
|
||||
{
|
||||
this.projectName1 = projectName1;
|
||||
}
|
||||
|
||||
public String getProjectName1()
|
||||
{
|
||||
return projectName1;
|
||||
}
|
||||
public void setProjectDesc(String projectDesc)
|
||||
{
|
||||
this.projectDesc = projectDesc;
|
||||
}
|
||||
|
||||
public String getProjectDesc()
|
||||
{
|
||||
return projectDesc;
|
||||
}
|
||||
public void setProjectUrl(String projectUrl)
|
||||
{
|
||||
this.projectUrl = projectUrl;
|
||||
}
|
||||
|
||||
public String getProjectUrl()
|
||||
{
|
||||
return projectUrl;
|
||||
}
|
||||
public void setProjectVurl(String projectVurl)
|
||||
{
|
||||
this.projectVurl = projectVurl;
|
||||
}
|
||||
|
||||
public String getProjectVurl()
|
||||
{
|
||||
return projectVurl;
|
||||
}
|
||||
|
||||
public String getProjectBaiduUrl() {
|
||||
return projectBaiduUrl;
|
||||
}
|
||||
|
||||
public void setProjectBaiduUrl(String projectBaiduUrl) {
|
||||
this.projectBaiduUrl = projectBaiduUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("projectNum", getProjectNum())
|
||||
.append("projectNum1", getProjectNum1())
|
||||
.append("projectName", getProjectName())
|
||||
.append("projectName1", getProjectName1())
|
||||
.append("projectDesc", getProjectDesc())
|
||||
.append("projectUrl", getProjectUrl())
|
||||
.append("projectVurl", getProjectVurl())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.office.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.office.domain.TtArticles;
|
||||
|
||||
/**
|
||||
* 文章Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-03-01
|
||||
*/
|
||||
public interface TtArticlesMapper
|
||||
{
|
||||
/**
|
||||
* 查询文章
|
||||
*
|
||||
* @param id 文章主键
|
||||
* @return 文章
|
||||
*/
|
||||
public TtArticles selectTtArticlesById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询文章列表
|
||||
*
|
||||
* @param ttArticles 文章
|
||||
* @return 文章集合
|
||||
*/
|
||||
public List<TtArticles> selectTtArticlesList(TtArticles ttArticles);
|
||||
|
||||
/**
|
||||
* 新增文章
|
||||
*
|
||||
* @param ttArticles 文章
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTtArticles(TtArticles ttArticles);
|
||||
|
||||
/**
|
||||
* 修改文章
|
||||
*
|
||||
* @param ttArticles 文章
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTtArticles(TtArticles ttArticles);
|
||||
|
||||
/**
|
||||
* 删除文章
|
||||
*
|
||||
* @param id 文章主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtArticlesById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除文章
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtArticlesByIds(Integer[] ids);
|
||||
|
||||
List<TtArticles> lastUpdateList(String searchKey);
|
||||
|
||||
int publishTtArticlesByIds(Integer[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.office.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.office.domain.TtCarousel;
|
||||
|
||||
/**
|
||||
* 轮播图管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-03-28
|
||||
*/
|
||||
public interface TtCarouselMapper
|
||||
{
|
||||
/**
|
||||
* 查询轮播图管理
|
||||
*
|
||||
* @param id 轮播图管理主键
|
||||
* @return 轮播图管理
|
||||
*/
|
||||
public TtCarousel selectTtCarouselById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询轮播图管理列表
|
||||
*
|
||||
* @param ttCarousel 轮播图管理
|
||||
* @return 轮播图管理集合
|
||||
*/
|
||||
public List<TtCarousel> selectTtCarouselList(TtCarousel ttCarousel);
|
||||
|
||||
/**
|
||||
* 新增轮播图管理
|
||||
*
|
||||
* @param ttCarousel 轮播图管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTtCarousel(TtCarousel ttCarousel);
|
||||
|
||||
/**
|
||||
* 修改轮播图管理
|
||||
*
|
||||
* @param ttCarousel 轮播图管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTtCarousel(TtCarousel ttCarousel);
|
||||
|
||||
/**
|
||||
* 删除轮播图管理
|
||||
*
|
||||
* @param id 轮播图管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtCarouselById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除轮播图管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtCarouselByIds(Integer[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.office.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.office.domain.TtCode;
|
||||
|
||||
/**
|
||||
* 源码管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-21
|
||||
*/
|
||||
public interface TtCodeMapper
|
||||
{
|
||||
/**
|
||||
* 查询源码管理
|
||||
*
|
||||
* @param codeId 源码管理主键
|
||||
* @return 源码管理
|
||||
*/
|
||||
public TtCode selectTtCodeByCodeId(Long codeId);
|
||||
|
||||
/**
|
||||
* 查询源码管理列表
|
||||
*
|
||||
* @param ttCode 源码管理
|
||||
* @return 源码管理集合
|
||||
*/
|
||||
public List<TtCode> selectTtCodeList(TtCode ttCode);
|
||||
|
||||
/**
|
||||
* 新增源码管理
|
||||
*
|
||||
* @param ttCode 源码管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTtCode(TtCode ttCode);
|
||||
|
||||
/**
|
||||
* 修改源码管理
|
||||
*
|
||||
* @param ttCode 源码管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTtCode(TtCode ttCode);
|
||||
|
||||
/**
|
||||
* 删除源码管理
|
||||
*
|
||||
* @param codeId 源码管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtCodeByCodeId(Long codeId);
|
||||
|
||||
/**
|
||||
* 批量删除源码管理
|
||||
*
|
||||
* @param codeIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtCodeByCodeIds(Long[] codeIds);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.office.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.office.domain.TtFile;
|
||||
|
||||
/**
|
||||
* 文件管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public interface TtFileMapper
|
||||
{
|
||||
/**
|
||||
* 查询文件管理
|
||||
*
|
||||
* @param fileId 文件管理主键
|
||||
* @return 文件管理
|
||||
*/
|
||||
public TtFile selectTtFileByFileId(Long fileId);
|
||||
|
||||
/**
|
||||
* 查询文件管理列表
|
||||
*
|
||||
* @param ttFile 文件管理
|
||||
* @return 文件管理集合
|
||||
*/
|
||||
public List<TtFile> selectTtFileList(TtFile ttFile);
|
||||
|
||||
/**
|
||||
* 新增文件管理
|
||||
*
|
||||
* @param ttFile 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTtFile(TtFile ttFile);
|
||||
|
||||
/**
|
||||
* 修改文件管理
|
||||
*
|
||||
* @param ttFile 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTtFile(TtFile ttFile);
|
||||
|
||||
/**
|
||||
* 删除文件管理
|
||||
*
|
||||
* @param fileId 文件管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtFileByFileId(Long fileId);
|
||||
|
||||
/**
|
||||
* 批量删除文件管理
|
||||
*
|
||||
* @param fileIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtFileByFileIds(Long[] fileIds);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.office.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.office.domain.TtProjectInfo;
|
||||
|
||||
/**
|
||||
* 项目清单Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
public interface TtProjectInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询项目清单
|
||||
*
|
||||
* @param id 项目清单主键
|
||||
* @return 项目清单
|
||||
*/
|
||||
public TtProjectInfo selectTtProjectInfoById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询项目清单列表
|
||||
*
|
||||
* @param ttProjectInfo 项目清单
|
||||
* @return 项目清单集合
|
||||
*/
|
||||
public List<TtProjectInfo> selectTtProjectInfoList(TtProjectInfo ttProjectInfo);
|
||||
|
||||
/**
|
||||
* 新增项目清单
|
||||
*
|
||||
* @param ttProjectInfo 项目清单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTtProjectInfo(TtProjectInfo ttProjectInfo);
|
||||
|
||||
/**
|
||||
* 修改项目清单
|
||||
*
|
||||
* @param ttProjectInfo 项目清单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTtProjectInfo(TtProjectInfo ttProjectInfo);
|
||||
|
||||
/**
|
||||
* 删除项目清单
|
||||
*
|
||||
* @param id 项目清单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtProjectInfoById(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除项目清单
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtProjectInfoByIds(Integer[] ids);
|
||||
|
||||
List<TtProjectInfo> lastUpdateList(String searchKey);
|
||||
|
||||
TtProjectInfo selectTtProjectInfoByName(String codeName);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.office.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.office.domain.TtArticles;
|
||||
|
||||
/**
|
||||
* 文章Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-03-01
|
||||
*/
|
||||
public interface ITtArticlesService
|
||||
{
|
||||
/**
|
||||
* 查询文章
|
||||
*
|
||||
* @param id 文章主键
|
||||
* @return 文章
|
||||
*/
|
||||
public TtArticles selectTtArticlesById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询文章列表
|
||||
*
|
||||
* @param ttArticles 文章
|
||||
* @return 文章集合
|
||||
*/
|
||||
public List<TtArticles> selectTtArticlesList(TtArticles ttArticles);
|
||||
|
||||
/**
|
||||
* 新增文章
|
||||
*
|
||||
* @param ttArticles 文章
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTtArticles(TtArticles ttArticles);
|
||||
|
||||
/**
|
||||
* 修改文章
|
||||
*
|
||||
* @param ttArticles 文章
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTtArticles(TtArticles ttArticles);
|
||||
|
||||
/**
|
||||
* 批量删除文章
|
||||
*
|
||||
* @param ids 需要删除的文章主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtArticlesByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 删除文章信息
|
||||
*
|
||||
* @param id 文章主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtArticlesById(Integer id);
|
||||
|
||||
List<TtArticles> lastUpdateList(String searchKey);
|
||||
|
||||
int publishTtArticlesByIds(Integer[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.office.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.office.domain.TtCarousel;
|
||||
|
||||
/**
|
||||
* 轮播图管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-03-28
|
||||
*/
|
||||
public interface ITtCarouselService
|
||||
{
|
||||
/**
|
||||
* 查询轮播图管理
|
||||
*
|
||||
* @param id 轮播图管理主键
|
||||
* @return 轮播图管理
|
||||
*/
|
||||
public TtCarousel selectTtCarouselById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询轮播图管理列表
|
||||
*
|
||||
* @param ttCarousel 轮播图管理
|
||||
* @return 轮播图管理集合
|
||||
*/
|
||||
public List<TtCarousel> selectTtCarouselList(TtCarousel ttCarousel);
|
||||
|
||||
/**
|
||||
* 新增轮播图管理
|
||||
*
|
||||
* @param ttCarousel 轮播图管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTtCarousel(TtCarousel ttCarousel);
|
||||
|
||||
/**
|
||||
* 修改轮播图管理
|
||||
*
|
||||
* @param ttCarousel 轮播图管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTtCarousel(TtCarousel ttCarousel);
|
||||
|
||||
/**
|
||||
* 批量删除轮播图管理
|
||||
*
|
||||
* @param ids 需要删除的轮播图管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtCarouselByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 删除轮播图管理信息
|
||||
*
|
||||
* @param id 轮播图管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtCarouselById(Integer id);
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.ruoyi.office.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.office.domain.TtCode;
|
||||
|
||||
/**
|
||||
* 源码管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-21
|
||||
*/
|
||||
public interface ITtCodeService {
|
||||
/**
|
||||
* 查询源码管理
|
||||
*
|
||||
* @param codeId 源码管理主键
|
||||
* @return 源码管理
|
||||
*/
|
||||
public TtCode selectTtCodeByCodeId(Long codeId);
|
||||
|
||||
/**
|
||||
* 查询源码管理列表
|
||||
*
|
||||
* @param ttCode 源码管理
|
||||
* @return 源码管理集合
|
||||
*/
|
||||
public List<TtCode> selectTtCodeList(TtCode ttCode);
|
||||
|
||||
/**
|
||||
* 新增源码管理
|
||||
*
|
||||
* @param ttCode 源码管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTtCode(TtCode ttCode);
|
||||
|
||||
/**
|
||||
* 修改源码管理
|
||||
*
|
||||
* @param ttCode 源码管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTtCode(TtCode ttCode);
|
||||
|
||||
/**
|
||||
* 批量删除源码管理
|
||||
*
|
||||
* @param codeIds 需要删除的源码管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtCodeByCodeIds(Long[] codeIds);
|
||||
|
||||
/**
|
||||
* 删除源码管理信息
|
||||
*
|
||||
* @param codeId 源码管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtCodeByCodeId(Long codeId);
|
||||
|
||||
/**
|
||||
* 转文章
|
||||
*
|
||||
* @param codeId 源码管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public String transToArticle(Long codeId);
|
||||
|
||||
/**
|
||||
* 转文章(南音)
|
||||
*/
|
||||
public String transToArticle1(Long codeId, String coverUrl);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.office.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.office.domain.TtFile;
|
||||
|
||||
/**
|
||||
* 文件管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
public interface ITtFileService
|
||||
{
|
||||
/**
|
||||
* 查询文件管理
|
||||
*
|
||||
* @param fileId 文件管理主键
|
||||
* @return 文件管理
|
||||
*/
|
||||
public TtFile selectTtFileByFileId(Long fileId);
|
||||
|
||||
/**
|
||||
* 查询文件管理列表
|
||||
*
|
||||
* @param ttFile 文件管理
|
||||
* @return 文件管理集合
|
||||
*/
|
||||
public List<TtFile> selectTtFileList(TtFile ttFile);
|
||||
|
||||
/**
|
||||
* 新增文件管理
|
||||
*
|
||||
* @param ttFile 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTtFile(TtFile ttFile);
|
||||
|
||||
/**
|
||||
* 修改文件管理
|
||||
*
|
||||
* @param ttFile 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTtFile(TtFile ttFile);
|
||||
|
||||
/**
|
||||
* 批量删除文件管理
|
||||
*
|
||||
* @param fileIds 需要删除的文件管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtFileByFileIds(Long[] fileIds);
|
||||
|
||||
/**
|
||||
* 删除文件管理信息
|
||||
*
|
||||
* @param fileId 文件管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtFileByFileId(Long fileId);
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.ruoyi.office.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.office.domain.TtProjectInfo;
|
||||
|
||||
/**
|
||||
* 项目清单Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
public interface ITtProjectInfoService
|
||||
{
|
||||
/**
|
||||
* 查询项目清单
|
||||
*
|
||||
* @param id 项目清单主键
|
||||
* @return 项目清单
|
||||
*/
|
||||
public TtProjectInfo selectTtProjectInfoById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询项目清单列表
|
||||
*
|
||||
* @param ttProjectInfo 项目清单
|
||||
* @return 项目清单集合
|
||||
*/
|
||||
public List<TtProjectInfo> selectTtProjectInfoList(TtProjectInfo ttProjectInfo);
|
||||
|
||||
/**
|
||||
* 新增项目清单
|
||||
*
|
||||
* @param ttProjectInfo 项目清单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTtProjectInfo(TtProjectInfo ttProjectInfo);
|
||||
|
||||
/**
|
||||
* 修改项目清单
|
||||
*
|
||||
* @param ttProjectInfo 项目清单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTtProjectInfo(TtProjectInfo ttProjectInfo);
|
||||
|
||||
/**
|
||||
* 批量删除项目清单
|
||||
*
|
||||
* @param ids 需要删除的项目清单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtProjectInfoByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 删除项目清单信息
|
||||
*
|
||||
* @param id 项目清单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTtProjectInfoById(Integer id);
|
||||
|
||||
String matchCode(Integer id);
|
||||
|
||||
List<?> lastUpdateList(String searchKey);
|
||||
|
||||
TtProjectInfo selectTtProjectInfoByName(String codeName);
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.office.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.office.mapper.TtArticlesMapper;
|
||||
import com.ruoyi.office.domain.TtArticles;
|
||||
import com.ruoyi.office.service.ITtArticlesService;
|
||||
|
||||
/**
|
||||
* 文章Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-03-01
|
||||
*/
|
||||
@Service
|
||||
public class TtArticlesServiceImpl implements ITtArticlesService
|
||||
{
|
||||
@Autowired
|
||||
private TtArticlesMapper ttArticlesMapper;
|
||||
|
||||
/**
|
||||
* 查询文章
|
||||
*
|
||||
* @param id 文章主键
|
||||
* @return 文章
|
||||
*/
|
||||
@Override
|
||||
public TtArticles selectTtArticlesById(Integer id)
|
||||
{
|
||||
return ttArticlesMapper.selectTtArticlesById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文章列表
|
||||
*
|
||||
* @param ttArticles 文章
|
||||
* @return 文章
|
||||
*/
|
||||
@Override
|
||||
public List<TtArticles> selectTtArticlesList(TtArticles ttArticles)
|
||||
{
|
||||
return ttArticlesMapper.selectTtArticlesList(ttArticles);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文章
|
||||
*
|
||||
* @param ttArticles 文章
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTtArticles(TtArticles ttArticles)
|
||||
{
|
||||
ttArticles.setIsPublished("N");
|
||||
return ttArticlesMapper.insertTtArticles(ttArticles);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文章
|
||||
*
|
||||
* @param ttArticles 文章
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTtArticles(TtArticles ttArticles)
|
||||
{
|
||||
return ttArticlesMapper.updateTtArticles(ttArticles);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除文章
|
||||
*
|
||||
* @param ids 需要删除的文章主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTtArticlesByIds(Integer[] ids)
|
||||
{
|
||||
return ttArticlesMapper.deleteTtArticlesByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文章信息
|
||||
*
|
||||
* @param id 文章主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTtArticlesById(Integer id)
|
||||
{
|
||||
return ttArticlesMapper.deleteTtArticlesById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TtArticles> lastUpdateList(String searchKey) {
|
||||
return ttArticlesMapper.lastUpdateList(searchKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int publishTtArticlesByIds(Integer[] ids) {
|
||||
return ttArticlesMapper.publishTtArticlesByIds(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.office.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.office.mapper.TtCarouselMapper;
|
||||
import com.ruoyi.office.domain.TtCarousel;
|
||||
import com.ruoyi.office.service.ITtCarouselService;
|
||||
|
||||
/**
|
||||
* 轮播图管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-03-28
|
||||
*/
|
||||
@Service
|
||||
public class TtCarouselServiceImpl implements ITtCarouselService
|
||||
{
|
||||
@Autowired
|
||||
private TtCarouselMapper ttCarouselMapper;
|
||||
|
||||
/**
|
||||
* 查询轮播图管理
|
||||
*
|
||||
* @param id 轮播图管理主键
|
||||
* @return 轮播图管理
|
||||
*/
|
||||
@Override
|
||||
public TtCarousel selectTtCarouselById(Integer id)
|
||||
{
|
||||
return ttCarouselMapper.selectTtCarouselById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询轮播图管理列表
|
||||
*
|
||||
* @param ttCarousel 轮播图管理
|
||||
* @return 轮播图管理
|
||||
*/
|
||||
@Override
|
||||
public List<TtCarousel> selectTtCarouselList(TtCarousel ttCarousel)
|
||||
{
|
||||
return ttCarouselMapper.selectTtCarouselList(ttCarousel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增轮播图管理
|
||||
*
|
||||
* @param ttCarousel 轮播图管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTtCarousel(TtCarousel ttCarousel)
|
||||
{
|
||||
return ttCarouselMapper.insertTtCarousel(ttCarousel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改轮播图管理
|
||||
*
|
||||
* @param ttCarousel 轮播图管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTtCarousel(TtCarousel ttCarousel)
|
||||
{
|
||||
return ttCarouselMapper.updateTtCarousel(ttCarousel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除轮播图管理
|
||||
*
|
||||
* @param ids 需要删除的轮播图管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTtCarouselByIds(Integer[] ids)
|
||||
{
|
||||
return ttCarouselMapper.deleteTtCarouselByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除轮播图管理信息
|
||||
*
|
||||
* @param id 轮播图管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTtCarouselById(Integer id)
|
||||
{
|
||||
return ttCarouselMapper.deleteTtCarouselById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
package com.ruoyi.office.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.app.domain.AppBlogArticle;
|
||||
import com.ruoyi.app.domain.AppResource;
|
||||
import com.ruoyi.app.domain.AppResourceList;
|
||||
import com.ruoyi.app.mapper.AppBlogArticleMapper;
|
||||
import com.ruoyi.app.mapper.AppResourceMapper;
|
||||
import com.ruoyi.office.domain.TtArticles;
|
||||
import com.ruoyi.office.domain.TtFile;
|
||||
import com.ruoyi.office.domain.TtProjectInfo;
|
||||
import com.ruoyi.office.mapper.TtArticlesMapper;
|
||||
import com.ruoyi.office.mapper.TtFileMapper;
|
||||
import com.ruoyi.office.mapper.TtProjectInfoMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.office.mapper.TtCodeMapper;
|
||||
import com.ruoyi.office.domain.TtCode;
|
||||
import com.ruoyi.office.service.ITtCodeService;
|
||||
|
||||
/**
|
||||
* 源码管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-12-21
|
||||
*/
|
||||
@Service
|
||||
public class TtCodeServiceImpl implements ITtCodeService {
|
||||
@Autowired
|
||||
private TtCodeMapper ttCodeMapper;
|
||||
@Autowired
|
||||
private TtArticlesMapper ttArticlesMapper;
|
||||
@Autowired
|
||||
private TtFileMapper fileMapper;
|
||||
@Autowired
|
||||
private AppBlogArticleMapper appBlogArticleMapper;
|
||||
@Autowired
|
||||
private AppResourceMapper appResourceMapper;
|
||||
@Autowired
|
||||
private TtProjectInfoMapper ttProjectInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询源码管理
|
||||
*
|
||||
* @param codeId 源码管理主键
|
||||
* @return 源码管理
|
||||
*/
|
||||
@Override
|
||||
public TtCode selectTtCodeByCodeId(Long codeId) {
|
||||
TtCode ttCode = ttCodeMapper.selectTtCodeByCodeId(codeId);
|
||||
TtFile file = new TtFile();
|
||||
file.setCodeName(ttCode.getCodeName());
|
||||
ttCode.setFileList(fileMapper.selectTtFileList(file));
|
||||
return ttCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询源码管理列表
|
||||
*
|
||||
* @param ttCode 源码管理
|
||||
* @return 源码管理
|
||||
*/
|
||||
@Override
|
||||
public List<TtCode> selectTtCodeList(TtCode ttCode) {
|
||||
return ttCodeMapper.selectTtCodeList(ttCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增源码管理
|
||||
*
|
||||
* @param ttCode 源码管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTtCode(TtCode ttCode) {
|
||||
return ttCodeMapper.insertTtCode(ttCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改源码管理
|
||||
*
|
||||
* @param ttCode 源码管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTtCode(TtCode ttCode) {
|
||||
return ttCodeMapper.updateTtCode(ttCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除源码管理
|
||||
*
|
||||
* @param codeIds 需要删除的源码管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTtCodeByCodeIds(Long[] codeIds) {
|
||||
return ttCodeMapper.deleteTtCodeByCodeIds(codeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 源码转文章
|
||||
*
|
||||
* @param codeId 源码管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTtCodeByCodeId(Long codeId) {
|
||||
return ttCodeMapper.deleteTtCodeByCodeId(codeId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String transToArticle(Long codeId) {
|
||||
TtCode ttCode = ttCodeMapper.selectTtCodeByCodeId(codeId);
|
||||
TtArticles ttArticles = new TtArticles();
|
||||
ttArticles.setTitle(ttCode.getCodeName());
|
||||
List<TtArticles> list = ttArticlesMapper.selectTtArticlesList(ttArticles);
|
||||
if (!list.isEmpty()) {
|
||||
return "不能重复转文章!";
|
||||
}
|
||||
ttArticles.setAuthor("Feast");
|
||||
ttArticles.setCategory(ttCode.getPaymentType());
|
||||
if (ttCode.getPaymentType().equals("2")) {
|
||||
ttArticles.setAttachmentUrl(ttCode.getDiskLink());
|
||||
}
|
||||
StringBuffer content = new StringBuffer();
|
||||
content.append("<p><strong>### 项目描述</strong></p>");
|
||||
content.append(ttCode.getCodeDesc());
|
||||
content.append("<p><strong>### 运行环境</strong></p>");
|
||||
content.append(ttCode.getCodeEnvironment());
|
||||
content.append("<p><strong>### 项目技术</strong></p>");
|
||||
content.append(ttCode.getCodeTechnology());
|
||||
ttArticles.setContent(content.toString());
|
||||
ttArticlesMapper.insertTtArticles(ttArticles);
|
||||
return "源码转文章成功!";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String transToArticle1(Long codeId, String coverUrl) {
|
||||
TtCode ttCode = ttCodeMapper.selectTtCodeByCodeId(codeId);
|
||||
TtProjectInfo ttProjectInfo = ttProjectInfoMapper.selectTtProjectInfoByName(ttCode.getCodeName());
|
||||
ttCode.setDiskLink(ttProjectInfo.getProjectBaiduUrl());
|
||||
ttCode.setPublishFlag("Y");
|
||||
ttCodeMapper.updateTtCode(ttCode);
|
||||
StringBuffer content = new StringBuffer();
|
||||
content.append("<p><strong>### 项目描述</strong></p>");
|
||||
content.append(ttCode.getCodeDesc());
|
||||
content.append("<p><strong>### 运行环境</strong></p>");
|
||||
content.append(ttCode.getCodeEnvironment());
|
||||
content.append("<p><strong>### 项目技术</strong></p>");
|
||||
content.append(ttCode.getCodeTechnology());
|
||||
content.append("<p><strong>### 演示视频</strong></p>");
|
||||
content.append("请移步首页-<strong>视频资源</strong>,搜索<strong>项目编号</strong>查看");
|
||||
TtFile file = new TtFile();
|
||||
file.setCodeName(ttCode.getCodeName());
|
||||
List<TtFile> fileList = fileMapper.selectTtFileList(file);
|
||||
AppBlogArticle article = new AppBlogArticle();
|
||||
article.setTitle(ttCode.getCodeName());
|
||||
List<AppBlogArticle> list = appBlogArticleMapper.selectAppBlogArticleList(article);
|
||||
if (!list.isEmpty()) {
|
||||
return "不能重复转文章!";
|
||||
}
|
||||
//新增资源
|
||||
AppResource resource = new AppResource();
|
||||
resource.setExplain(content.toString());
|
||||
resource.setResourceTitle(ttCode.getCodeName());
|
||||
if (!fileList.isEmpty()) {
|
||||
resource.setShowImg(fileList.get(0).getFileUrl());
|
||||
}
|
||||
resource.setResourceType(5L);
|
||||
resource.setIsShow(0L);
|
||||
resource.setIsAd(2L);
|
||||
resource.setAdNumber(100L);
|
||||
resource.setCreateTime(new Date());
|
||||
resource.setShowImg(coverUrl);
|
||||
appResourceMapper.insertAppResource(resource);
|
||||
//新增文章
|
||||
article.setArticleType(4L);
|
||||
article.setIsRecommendation(1L);
|
||||
article.setIsShow(1L);
|
||||
article.setIsAd(1L);
|
||||
if (!fileList.isEmpty()) {
|
||||
article.setShowImg(fileList.get(0).getFileUrl());
|
||||
}
|
||||
article.setContentInfo(content.toString());
|
||||
article.setAppResourceId(resource.getId());
|
||||
article.setCreateTime(new Date());
|
||||
article.setShowImg(coverUrl);
|
||||
appBlogArticleMapper.insertAppBlogArticle(article);
|
||||
//新增资源网盘链接
|
||||
List<AppResourceList> resourceList = new ArrayList<AppResourceList>();
|
||||
AppResourceList appResourceList = new AppResourceList();
|
||||
appResourceList.setAppResourceId(resource.getId());
|
||||
appResourceList.setListName("网盘链接");
|
||||
appResourceList.setListUrl(ttCode.getDiskLink());
|
||||
resourceList.add(appResourceList);
|
||||
if (resourceList.size() > 0)
|
||||
{
|
||||
appResourceMapper.batchAppResourceList(resourceList);
|
||||
}
|
||||
return "源码转文章成功!";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.ruoyi.office.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.office.mapper.TtFileMapper;
|
||||
import com.ruoyi.office.domain.TtFile;
|
||||
import com.ruoyi.office.service.ITtFileService;
|
||||
|
||||
/**
|
||||
* 文件管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-30
|
||||
*/
|
||||
@Service
|
||||
public class TtFileServiceImpl implements ITtFileService {
|
||||
@Autowired
|
||||
private TtFileMapper ttFileMapper;
|
||||
|
||||
private final String SITE_URL = "http://img.yidaima.cn/";
|
||||
|
||||
/**
|
||||
* 查询文件管理
|
||||
*
|
||||
* @param fileId 文件管理主键
|
||||
* @return 文件管理
|
||||
*/
|
||||
@Override
|
||||
public TtFile selectTtFileByFileId(Long fileId) {
|
||||
return ttFileMapper.selectTtFileByFileId(fileId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文件管理列表
|
||||
*
|
||||
* @param ttFile 文件管理
|
||||
* @return 文件管理
|
||||
*/
|
||||
@Override
|
||||
public List<TtFile> selectTtFileList(TtFile ttFile) {
|
||||
return ttFileMapper.selectTtFileList(ttFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增文件管理
|
||||
*
|
||||
* @param ttFile 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTtFile(TtFile ttFile) {
|
||||
int index = 0;
|
||||
if (!StringUtils.isNull(ttFile.getPictureFile())) {
|
||||
String[] pictures = ttFile.getPictureFile().split(",");
|
||||
TreeMap<Integer, String> treeMap = new TreeMap();
|
||||
for (String url : pictures) {
|
||||
url = url.replaceAll(SITE_URL, "");
|
||||
String[] urls = url.split("-");
|
||||
String picName = urls[0];
|
||||
if(picName.contains("_")){
|
||||
String[] picNames = picName.split("_");
|
||||
treeMap.put(Integer.parseInt(picNames[0]), url);
|
||||
} else {
|
||||
treeMap.put(Integer.parseInt(urls[0]), url);
|
||||
}
|
||||
}
|
||||
|
||||
for (Integer key : treeMap.keySet()) {
|
||||
TtFile file = new TtFile();
|
||||
file.setCodeName(ttFile.getCodeName());
|
||||
file.setFileUrl(SITE_URL + treeMap.get(key));
|
||||
String[] urls = treeMap.get(key).split("-");
|
||||
String picName = urls[0];
|
||||
if(picName.contains("_")){
|
||||
String[] picNames = picName.split("_");
|
||||
file.setFileName(picNames[1]);
|
||||
}
|
||||
ttFileMapper.insertTtFile(file);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
return index;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改文件管理
|
||||
*
|
||||
* @param ttFile 文件管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTtFile(TtFile ttFile) {
|
||||
return ttFileMapper.updateTtFile(ttFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除文件管理
|
||||
*
|
||||
* @param fileIds 需要删除的文件管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTtFileByFileIds(Long[] fileIds) {
|
||||
return ttFileMapper.deleteTtFileByFileIds(fileIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除文件管理信息
|
||||
*
|
||||
* @param fileId 文件管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTtFileByFileId(Long fileId) {
|
||||
return ttFileMapper.deleteTtFileByFileId(fileId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.ruoyi.office.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.office.domain.TtCode;
|
||||
import com.ruoyi.office.mapper.TtCodeMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.office.mapper.TtProjectInfoMapper;
|
||||
import com.ruoyi.office.domain.TtProjectInfo;
|
||||
import com.ruoyi.office.service.ITtProjectInfoService;
|
||||
|
||||
/**
|
||||
* 项目清单Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-07
|
||||
*/
|
||||
@Service
|
||||
public class TtProjectInfoServiceImpl implements ITtProjectInfoService
|
||||
{
|
||||
@Autowired
|
||||
private TtProjectInfoMapper ttProjectInfoMapper;
|
||||
@Autowired
|
||||
private TtCodeMapper ttCodeMapper;
|
||||
|
||||
/**
|
||||
* 查询项目清单
|
||||
*
|
||||
* @param id 项目清单主键
|
||||
* @return 项目清单
|
||||
*/
|
||||
@Override
|
||||
public TtProjectInfo selectTtProjectInfoById(Integer id)
|
||||
{
|
||||
return ttProjectInfoMapper.selectTtProjectInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目清单列表
|
||||
*
|
||||
* @param ttProjectInfo 项目清单
|
||||
* @return 项目清单
|
||||
*/
|
||||
@Override
|
||||
public List<TtProjectInfo> selectTtProjectInfoList(TtProjectInfo ttProjectInfo)
|
||||
{
|
||||
return ttProjectInfoMapper.selectTtProjectInfoList(ttProjectInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目清单
|
||||
*
|
||||
* @param ttProjectInfo 项目清单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTtProjectInfo(TtProjectInfo ttProjectInfo)
|
||||
{
|
||||
return ttProjectInfoMapper.insertTtProjectInfo(ttProjectInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目清单
|
||||
*
|
||||
* @param ttProjectInfo 项目清单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTtProjectInfo(TtProjectInfo ttProjectInfo)
|
||||
{
|
||||
return ttProjectInfoMapper.updateTtProjectInfo(ttProjectInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目清单
|
||||
*
|
||||
* @param ids 需要删除的项目清单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTtProjectInfoByIds(Integer[] ids)
|
||||
{
|
||||
return ttProjectInfoMapper.deleteTtProjectInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目清单信息
|
||||
*
|
||||
* @param id 项目清单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTtProjectInfoById(Integer id)
|
||||
{
|
||||
return ttProjectInfoMapper.deleteTtProjectInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String matchCode(Integer id) {
|
||||
TtProjectInfo projectInfo = ttProjectInfoMapper.selectTtProjectInfoById(id);
|
||||
TtCode ttCode = new TtCode();
|
||||
ttCode.setCodeName(projectInfo.getProjectName());
|
||||
List<TtCode> list = ttCodeMapper.selectTtCodeList(ttCode);
|
||||
if(list.isEmpty()){
|
||||
return "未匹配到已整理源码!";
|
||||
}
|
||||
projectInfo.setProjectName1(list.get(0).getCodeName());
|
||||
ttProjectInfoMapper.updateTtProjectInfo(projectInfo);
|
||||
return "匹配完成";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<?> lastUpdateList(String searchKey) {
|
||||
return ttProjectInfoMapper.lastUpdateList(searchKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TtProjectInfo selectTtProjectInfoByName(String codeName) {
|
||||
return ttProjectInfoMapper.selectTtProjectInfoByName(codeName);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user