p配置
This commit is contained in:
@@ -6,15 +6,15 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface CategoryInfoMapper
|
||||
public interface CategoryInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@@ -22,7 +22,7 @@ public interface CategoryInfoMapper
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ public interface CategoryInfoMapper
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ public interface CategoryInfoMapper
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -46,7 +46,7 @@ public interface CategoryInfoMapper
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -54,9 +54,11 @@ public interface CategoryInfoMapper
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCategoryInfoByIds(String[] ids);
|
||||
|
||||
List<CategoryInfo> selectCategoryList();
|
||||
}
|
||||
|
||||
@@ -3,18 +3,19 @@ package com.ruoyi.system.service;
|
||||
import com.ruoyi.common.core.domain.entity.CategoryInfo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
public interface ICategoryInfoService
|
||||
public interface ICategoryInfoService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@@ -22,7 +23,7 @@ public interface ICategoryInfoService
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
@@ -30,7 +31,7 @@ public interface ICategoryInfoService
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -38,7 +39,7 @@ public interface ICategoryInfoService
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -46,7 +47,7 @@ public interface ICategoryInfoService
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -54,9 +55,11 @@ public interface ICategoryInfoService
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCategoryInfoById(String id);
|
||||
|
||||
List<CategoryInfo> getCategory();
|
||||
}
|
||||
|
||||
@@ -11,19 +11,19 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-15
|
||||
*/
|
||||
@Service
|
||||
public class CategoryInfoServiceImpl implements ICategoryInfoService
|
||||
public class CategoryInfoServiceImpl implements ICategoryInfoService
|
||||
{
|
||||
@Autowired
|
||||
private CategoryInfoMapper categoryInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@@ -35,7 +35,7 @@ public class CategoryInfoServiceImpl implements ICategoryInfoService
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@@ -47,7 +47,7 @@ public class CategoryInfoServiceImpl implements ICategoryInfoService
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -60,7 +60,7 @@ public class CategoryInfoServiceImpl implements ICategoryInfoService
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param categoryInfo 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -73,7 +73,7 @@ public class CategoryInfoServiceImpl implements ICategoryInfoService
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -85,7 +85,7 @@ public class CategoryInfoServiceImpl implements ICategoryInfoService
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -94,4 +94,9 @@ public class CategoryInfoServiceImpl implements ICategoryInfoService
|
||||
{
|
||||
return categoryInfoMapper.deleteCategoryInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CategoryInfo> getCategory() {
|
||||
return categoryInfoMapper.selectCategoryList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.system.mapper.CategoryInfoMapper">
|
||||
|
||||
|
||||
<resultMap type="CategoryInfo" id="CategoryInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="categoryId" column="category_id" />
|
||||
@@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectCategoryInfoList" parameterType="CategoryInfo" resultMap="CategoryInfoResult">
|
||||
<include refid="selectCategoryInfoVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
@@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="modify != null and modify != ''"> and modify = #{modify}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCategoryInfoById" parameterType="String" resultMap="CategoryInfoResult">
|
||||
<include refid="selectCategoryInfoVo"/>
|
||||
where id = #{id}
|
||||
@@ -76,9 +76,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCategoryInfoByIds" parameterType="String">
|
||||
delete from category_info where id in
|
||||
delete from category_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
||||
<select id="selectCategoryList" resultType="com.ruoyi.common.core.domain.entity.CategoryInfo">
|
||||
<include refid="selectCategoryInfoVo" /> where is_del = 0
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user