添加博客分类相关功能
This commit is contained in:
parent
cebe648db9
commit
5afe4ba819
8
pom.xml
8
pom.xml
@ -403,6 +403,13 @@
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 博客模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-blog</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
@ -411,6 +418,7 @@
|
||||
<module>ruoyi-common</module>
|
||||
<module>ruoyi-extra</module>
|
||||
<module>ruoyi-modules</module>
|
||||
<module>ruoyi-modules/ruoyi-blog</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
@ -67,6 +67,12 @@
|
||||
<!-- <artifactId>powerjob-worker-spring-boot-starter</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- 博客系统 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-blog</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -143,7 +143,7 @@ springdoc:
|
||||
version: '版本号: ${ruoyi.version}'
|
||||
# 作者信息
|
||||
contact:
|
||||
name: 数据小王子
|
||||
name: huangge1199
|
||||
email: 738981257@qq.com
|
||||
url: https://gitee.com/dataprince/ruoyi-flex
|
||||
components:
|
||||
|
@ -23,9 +23,6 @@ public class TreeEntity extends BaseEntity
|
||||
/** 父菜单ID */
|
||||
private Long parentId;
|
||||
|
||||
/** 显示顺序 */
|
||||
private Integer orderNum;
|
||||
|
||||
/** 祖级列表 */
|
||||
@Column(ignore = true)
|
||||
private String ancestors;
|
||||
@ -54,16 +51,6 @@ public class TreeEntity extends BaseEntity
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Integer getOrderNum()
|
||||
{
|
||||
return orderNum;
|
||||
}
|
||||
|
||||
public void setOrderNum(Integer orderNum)
|
||||
{
|
||||
this.orderNum = orderNum;
|
||||
}
|
||||
|
||||
public String getAncestors()
|
||||
{
|
||||
return ancestors;
|
||||
|
@ -14,6 +14,7 @@
|
||||
<module>ruoyi-generator</module>
|
||||
<module>ruoyi-job</module>
|
||||
<module>ruoyi-system</module>
|
||||
<module>ruoyi-blog</module>
|
||||
</modules>
|
||||
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
|
86
ruoyi-modules/ruoyi-blog/pom.xml
Normal file
86
ruoyi-modules/ruoyi-blog/pom.xml
Normal file
@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<artifactId>ruoyi-blog</artifactId>
|
||||
|
||||
<description>
|
||||
博客系统模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 获取系统信息 -->
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-excel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-json</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-orm</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-oss</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-springdoc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,116 @@
|
||||
package com.ruoyi.blog.controller;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.ruoyi.common.core.core.domain.R;
|
||||
import com.ruoyi.common.excel.utils.ExcelUtil;
|
||||
import com.ruoyi.common.log.annotation.Log;
|
||||
import com.ruoyi.common.log.enums.BusinessType;
|
||||
import com.ruoyi.common.web.annotation.RepeatSubmit;
|
||||
import com.ruoyi.common.web.core.BaseController;
|
||||
import jakarta.annotation.Resource;
|
||||
import com.ruoyi.blog.domain.vo.BlogCategoriesVo;
|
||||
import com.ruoyi.blog.domain.bo.BlogCategoriesBo;
|
||||
import com.ruoyi.blog.service.IBlogCategoriesService;
|
||||
|
||||
|
||||
/**
|
||||
* 博客分类Controller
|
||||
*
|
||||
* @author huangge1199
|
||||
* 2024-08-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/blog/categories")
|
||||
public class BlogCategoriesController extends BaseController
|
||||
{
|
||||
@Resource
|
||||
private IBlogCategoriesService blogCategoriesService;
|
||||
|
||||
/**
|
||||
* 查询博客分类列表
|
||||
*/
|
||||
@SaCheckPermission("blog:categories:list")
|
||||
@GetMapping("/list")
|
||||
public R<List<BlogCategoriesVo>> list(BlogCategoriesBo blogCategoriesBo)
|
||||
{
|
||||
List<BlogCategoriesVo> list = blogCategoriesService.selectList(blogCategoriesBo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出博客分类列表
|
||||
*/
|
||||
@SaCheckPermission("blog:categories:export")
|
||||
@Log(title = "博客分类", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BlogCategoriesBo blogCategoriesBo)
|
||||
{
|
||||
List<BlogCategoriesVo> list = blogCategoriesService.selectList(blogCategoriesBo);
|
||||
ExcelUtil.exportExcel(list, "博客分类", BlogCategoriesVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取博客分类详细信息
|
||||
*/
|
||||
@SaCheckPermission("blog:categories:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<BlogCategoriesVo> getInfo(@PathVariable Long id)
|
||||
{
|
||||
return R.ok(blogCategoriesService.selectById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增博客分类
|
||||
*/
|
||||
@SaCheckPermission("blog:categories:add")
|
||||
@Log(title = "博客分类", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated @RequestBody BlogCategoriesBo blogCategoriesBo)
|
||||
{
|
||||
boolean inserted = blogCategoriesService.insert(blogCategoriesBo);
|
||||
if (!inserted) {
|
||||
return R.fail("新增博客分类记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改博客分类
|
||||
*/
|
||||
@SaCheckPermission("blog:categories:edit")
|
||||
@Log(title = "博客分类", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated @RequestBody BlogCategoriesBo blogCategoriesBo)
|
||||
{
|
||||
Boolean updated = blogCategoriesService.update(blogCategoriesBo);
|
||||
if (!updated) {
|
||||
R.fail("修改博客分类记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除博客分类
|
||||
*/
|
||||
@SaCheckPermission("blog:categories:remove")
|
||||
@Log(title = "博客分类", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@PathVariable Long[] ids)
|
||||
{
|
||||
boolean deleted = blogCategoriesService.deleteByIds(ids);
|
||||
if (!deleted) {
|
||||
R.fail("删除博客分类记录失败!");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.ruoyi.blog.domain;
|
||||
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.ruoyi.common.orm.core.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 博客分类对象 blog_categories
|
||||
*
|
||||
* @author huangge1199
|
||||
* 2024-08-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(value = "blog_categories")
|
||||
public class BlogCategories extends TreeEntity
|
||||
{
|
||||
/** 主键 */
|
||||
@Id
|
||||
private Long id;
|
||||
|
||||
/** 描述 */
|
||||
private String description;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 密码 */
|
||||
private String password;
|
||||
|
||||
/** 优先级 */
|
||||
private Long priority;
|
||||
|
||||
/** 固定链接地址 */
|
||||
private String slug;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.ruoyi.blog.domain.bo;
|
||||
|
||||
import com.ruoyi.blog.domain.BlogCategories;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
import com.ruoyi.common.orm.core.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 博客分类业务对象 blog_categories
|
||||
*
|
||||
* @author huangge1199
|
||||
* @date 2024-08-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BlogCategories.class, reverseConvertGenerate = false)
|
||||
public class BlogCategoriesBo extends TreeEntity
|
||||
{
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@NotBlank(message = "描述不能为空")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@NotBlank(message = "名称不能为空")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 优先级
|
||||
*/
|
||||
private Long priority;
|
||||
|
||||
/**
|
||||
* 固定链接地址
|
||||
*/
|
||||
private String slug;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.ruoyi.blog.domain.vo;
|
||||
|
||||
import com.ruoyi.blog.domain.BlogCategories;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
|
||||
import com.ruoyi.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.ruoyi.common.orm.core.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 博客分类视图对象 blog_categories
|
||||
*
|
||||
* @author huangge1199
|
||||
* @date 2024-08-26
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = BlogCategories.class)
|
||||
public class BlogCategoriesVo extends TreeEntity implements Serializable
|
||||
{
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 描述 */
|
||||
@ExcelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
/** 名称 */
|
||||
@ExcelProperty(value = "名称")
|
||||
private String name;
|
||||
|
||||
/** 密码 */
|
||||
@ExcelProperty(value = "密码")
|
||||
private String password;
|
||||
|
||||
/** 优先级 */
|
||||
@ExcelProperty(value = "优先级")
|
||||
private Long priority;
|
||||
|
||||
/** 固定链接地址 */
|
||||
@ExcelProperty(value = "固定链接地址")
|
||||
private String slug;
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.ruoyi.blog.mapper;
|
||||
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.ruoyi.blog.domain.BlogCategories;
|
||||
|
||||
/**
|
||||
* 博客分类Mapper接口
|
||||
*
|
||||
* @author huangge1199
|
||||
* 2024-08-26
|
||||
*/
|
||||
@Mapper
|
||||
public interface BlogCategoriesMapper extends BaseMapper<BlogCategories>
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.ruoyi.blog.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.blog.domain.BlogCategories;
|
||||
import com.ruoyi.blog.domain.vo.BlogCategoriesVo;
|
||||
import com.ruoyi.blog.domain.bo.BlogCategoriesBo;
|
||||
import com.ruoyi.common.orm.core.service.IBaseService;
|
||||
|
||||
/**
|
||||
* 博客分类Service接口
|
||||
*
|
||||
* @author huangge1199
|
||||
* 2024-08-26
|
||||
*/
|
||||
public interface IBlogCategoriesService extends IBaseService<BlogCategories>
|
||||
{
|
||||
/**
|
||||
* 查询博客分类
|
||||
*
|
||||
* @param id 博客分类主键
|
||||
* @return 博客分类
|
||||
*/
|
||||
BlogCategoriesVo selectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询博客分类列表
|
||||
*
|
||||
* @param blogCategoriesBo 博客分类Bo
|
||||
* @return 博客分类集合
|
||||
*/
|
||||
List<BlogCategoriesVo> selectList(BlogCategoriesBo blogCategoriesBo);
|
||||
|
||||
|
||||
/**
|
||||
* 新增博客分类
|
||||
*
|
||||
* @param blogCategoriesBo 博客分类Bo
|
||||
* @return 结果:true 操作成功,false 操作失败
|
||||
*/
|
||||
boolean insert(BlogCategoriesBo blogCategoriesBo);
|
||||
|
||||
/**
|
||||
* 修改博客分类
|
||||
*
|
||||
* @param blogCategoriesBo 博客分类Bo
|
||||
* @return 结果:true 更新成功,false 更新失败
|
||||
*/
|
||||
boolean update(BlogCategoriesBo blogCategoriesBo);
|
||||
|
||||
/**
|
||||
* 批量删除博客分类
|
||||
*
|
||||
* @param ids 需要删除的博客分类主键集合
|
||||
* @return 结果:true 删除成功,false 删除失败
|
||||
*/
|
||||
boolean deleteByIds(Long[] ids);
|
||||
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
package com.ruoyi.blog.service.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.ruoyi.common.core.utils.MapstructUtils;
|
||||
import com.ruoyi.common.core.utils.StringUtils;
|
||||
import com.ruoyi.common.orm.core.page.PageQuery;
|
||||
import com.ruoyi.common.orm.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.orm.core.service.impl.BaseServiceImpl;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.ruoyi.blog.mapper.BlogCategoriesMapper;
|
||||
import com.ruoyi.blog.domain.BlogCategories;
|
||||
import com.ruoyi.blog.domain.bo.BlogCategoriesBo;
|
||||
import com.ruoyi.blog.domain.vo.BlogCategoriesVo;
|
||||
import com.ruoyi.blog.service.IBlogCategoriesService;
|
||||
import static com.ruoyi.blog.domain.table.BlogCategoriesTableDef.BLOG_CATEGORIES;
|
||||
|
||||
/**
|
||||
* 博客分类Service业务层处理
|
||||
*
|
||||
* @author huangge1199
|
||||
* 2024-08-26
|
||||
*/
|
||||
@Service
|
||||
public class BlogCategoriesServiceImpl extends BaseServiceImpl<BlogCategoriesMapper, BlogCategories> implements IBlogCategoriesService
|
||||
{
|
||||
@Resource
|
||||
private BlogCategoriesMapper blogCategoriesMapper;
|
||||
|
||||
@Override
|
||||
public QueryWrapper query() {
|
||||
return super.query().from(BLOG_CATEGORIES);
|
||||
}
|
||||
|
||||
private QueryWrapper buildQueryWrapper(BlogCategoriesBo blogCategoriesBo) {
|
||||
QueryWrapper queryWrapper = super.buildBaseQueryWrapper();
|
||||
|
||||
if (StringUtils.isNotBlank(blogCategoriesBo.getName())) {
|
||||
queryWrapper.and(BLOG_CATEGORIES.NAME.like(blogCategoriesBo.getName()));
|
||||
}
|
||||
if (blogCategoriesBo.getParentId() != null) {
|
||||
queryWrapper.and(BLOG_CATEGORIES.PARENT_ID.eq(blogCategoriesBo.getParentId()));
|
||||
}
|
||||
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询博客分类
|
||||
*
|
||||
* @param id 博客分类主键
|
||||
* @return 博客分类
|
||||
*/
|
||||
@Override
|
||||
public BlogCategoriesVo selectById(Long id)
|
||||
{
|
||||
return this.getOneAs(query().where(BLOG_CATEGORIES.ID.eq(id)), BlogCategoriesVo.class);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询博客分类列表
|
||||
*
|
||||
* @param blogCategoriesBo 博客分类Bo
|
||||
* @return 博客分类集合
|
||||
*/
|
||||
@Override
|
||||
public List<BlogCategoriesVo> selectList(BlogCategoriesBo blogCategoriesBo)
|
||||
{
|
||||
QueryWrapper queryWrapper = buildQueryWrapper(blogCategoriesBo);
|
||||
return this.listAs(queryWrapper, BlogCategoriesVo.class);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增博客分类
|
||||
*
|
||||
* @param blogCategoriesBo 博客分类Bo
|
||||
* @return 结果:true 操作成功,false 操作失败
|
||||
*/
|
||||
@Override
|
||||
public boolean insert(BlogCategoriesBo blogCategoriesBo)
|
||||
{
|
||||
BlogCategories blogCategories = MapstructUtils.convert(blogCategoriesBo, BlogCategories.class);
|
||||
|
||||
return this.save(blogCategories);//使用全局配置的雪花算法主键生成器生成ID值
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改博客分类
|
||||
*
|
||||
* @param blogCategoriesBo 博客分类Bo
|
||||
* @return 结果:true 更新成功,false 更新失败
|
||||
*/
|
||||
@Override
|
||||
public boolean update(BlogCategoriesBo blogCategoriesBo)
|
||||
{
|
||||
BlogCategories blogCategories = MapstructUtils.convert(blogCategoriesBo, BlogCategories.class);
|
||||
if(ObjectUtil.isNotNull(blogCategories) && ObjectUtil.isNotNull(blogCategories.getId())) {
|
||||
boolean updated = this.updateById(blogCategories);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除博客分类
|
||||
*
|
||||
* @param ids 需要删除的博客分类主键集合
|
||||
* @return 结果:true 删除成功,false 删除失败
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public boolean deleteByIds(Long[] ids)
|
||||
{
|
||||
return this.removeByIds(Arrays.asList(ids));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.blog.mapper.BlogCategoriesMapper">
|
||||
|
||||
</mapper>
|
@ -1,7 +1,7 @@
|
||||
# 代码生成
|
||||
gen:
|
||||
# 作者
|
||||
author: 轩辕龙儿
|
||||
author: huangge1199
|
||||
# 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool
|
||||
packageName: com.ruoyi.demo
|
||||
# 自动去除表前缀,默认是false
|
||||
|
Loading…
Reference in New Issue
Block a user