猜你像搜索
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SearchContent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
public interface SearchContentMapper
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public SearchContent selectSearchContentById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param searchContent 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<SearchContent> selectSearchContentList(SearchContent searchContent);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param searchContent 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSearchContent(SearchContent searchContent);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param searchContent 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSearchContent(SearchContent searchContent);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSearchContentById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSearchContentByIds(String[] ids);
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SearchContent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
public interface ISearchContentService
|
||||
{
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
public SearchContent selectSearchContentById(String id);
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param searchContent 【请填写功能名称】
|
||||
* @return 【请填写功能名称】集合
|
||||
*/
|
||||
public List<SearchContent> selectSearchContentList(SearchContent searchContent);
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param searchContent 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSearchContent(SearchContent searchContent);
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param searchContent 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSearchContent(SearchContent searchContent);
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSearchContentByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSearchContentById(String id);
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SearchContent;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.system.mapper.SearchContentMapper;
|
||||
import com.ruoyi.system.service.ISearchContentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-19
|
||||
*/
|
||||
@Service
|
||||
public class SearchContentServiceImpl implements ISearchContentService
|
||||
{
|
||||
@Autowired
|
||||
private SearchContentMapper searchContentMapper;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public SearchContent selectSearchContentById(String id)
|
||||
{
|
||||
return searchContentMapper.selectSearchContentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*
|
||||
* @param searchContent 【请填写功能名称】
|
||||
* @return 【请填写功能名称】
|
||||
*/
|
||||
@Override
|
||||
public List<SearchContent> selectSearchContentList(SearchContent searchContent)
|
||||
{
|
||||
return searchContentMapper.selectSearchContentList(searchContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*
|
||||
* @param searchContent 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSearchContent(SearchContent searchContent)
|
||||
{
|
||||
searchContent.setCreateTime(DateUtils.getNowDate());
|
||||
return searchContentMapper.insertSearchContent(searchContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*
|
||||
* @param searchContent 【请填写功能名称】
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSearchContent(SearchContent searchContent)
|
||||
{
|
||||
return searchContentMapper.updateSearchContent(searchContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 需要删除的【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSearchContentByIds(String[] ids)
|
||||
{
|
||||
return searchContentMapper.deleteSearchContentByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】信息
|
||||
*
|
||||
* @param id 【请填写功能名称】主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSearchContentById(String id)
|
||||
{
|
||||
return searchContentMapper.deleteSearchContentById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
<?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.system.mapper.SearchContentMapper">
|
||||
|
||||
<resultMap type="SearchContent" id="SearchContentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="content" column="content" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSearchContentVo">
|
||||
select id, content, create_time from search_content
|
||||
</sql>
|
||||
|
||||
<select id="selectSearchContentList" parameterType="SearchContent" resultMap="SearchContentResult">
|
||||
<include refid="selectSearchContentVo"/>
|
||||
<where>
|
||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSearchContentById" parameterType="String" resultMap="SearchContentResult">
|
||||
<include refid="selectSearchContentVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSearchContent" parameterType="SearchContent" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into search_content
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="content != null">content,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="content != null">#{content},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSearchContent" parameterType="SearchContent">
|
||||
update search_content
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="content != null">content = #{content},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSearchContentById" parameterType="String">
|
||||
delete from search_content where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSearchContentByIds" parameterType="String">
|
||||
delete from search_content where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user