修改资讯查询模糊搜索,字段信息管理排序

This commit is contained in:
gognqingkai 2024-04-18 14:52:39 +08:00
parent d48a5c3348
commit 1a41b74097
4 changed files with 97 additions and 89 deletions

View File

@ -50,10 +50,10 @@
and info_category_name = #{infoCategoryName}
</if>
<if test="infoTitle != null and infoTitle != ''">
and info_title = #{infoTitle}
and info_title like concat('%', #{infoTitle}, '%')
</if>
<if test="infoCode != null and infoCode != ''">
and info_code = #{infoCode}
and info_code like concat('%', #{infoCode}, '%')
</if>
<if test="infoContent != null and infoContent != ''">
and info_content = #{infoContent}

View File

@ -5,114 +5,123 @@
<mapper namespace="com.xinelu.manage.mapper.infocategory.InfoCategoryMapper">
<resultMap type="InfoCategory" id="InfoCategoryResult">
<result property="id" column="id"/>
<result property="infoCategoryCode" column="info_category_code"/>
<result property="infoCategoryName" column="info_category_name"/>
<result property="infoCategoryType" column="info_category_type"/>
<result property="infoCategorySort" column="info_category_sort"/>
<result property="infoCategoryCreator" column="info_category_creator"/>
<result property="infoCategoryCreateTime" column="info_category_create_time"/>
<result property="id" column="id"/>
<result property="infoCategoryCode" column="info_category_code"/>
<result property="infoCategoryName" column="info_category_name"/>
<result property="infoCategoryType" column="info_category_type"/>
<result property="infoCategorySort" column="info_category_sort"/>
<result property="infoCategoryCreator" column="info_category_creator"/>
<result property="infoCategoryCreateTime" column="info_category_create_time"/>
</resultMap>
<sql id="selectInfoCategoryVo">
select id, info_category_code, info_category_name, info_category_type, info_category_sort, info_category_creator, info_category_create_time from info_category
select id,
info_category_code,
info_category_name,
info_category_type,
info_category_sort,
info_category_creator,
info_category_create_time
from info_category
</sql>
<select id="selectInfoCategoryList" parameterType="InfoCategory" resultMap="InfoCategoryResult">
<include refid="selectInfoCategoryVo"/>
<where>
<if test="infoCategoryCode != null and infoCategoryCode != ''">
and info_category_code = #{infoCategoryCode}
</if>
<if test="infoCategoryName != null and infoCategoryName != ''">
and info_category_name like concat('%', #{infoCategoryName}, '%')
</if>
<if test="infoCategoryType != null and infoCategoryType != ''">
and info_category_type = #{infoCategoryType}
</if>
<if test="infoCategorySort != null ">
and info_category_sort = #{infoCategorySort}
</if>
<if test="infoCategoryCreator != null and infoCategoryCreator != ''">
and info_category_creator = #{infoCategoryCreator}
</if>
<if test="infoCategoryCreateTime != null ">
and info_category_create_time = #{infoCategoryCreateTime}
</if>
<if test="infoCategoryCode != null and infoCategoryCode != ''">
and info_category_code like concat('%', #{infoCategoryCode}, '%')
</if>
<if test="infoCategoryName != null and infoCategoryName != ''">
and info_category_name like concat('%', #{infoCategoryName}, '%')
</if>
<if test="infoCategoryType != null and infoCategoryType != ''">
and info_category_type = #{infoCategoryType}
</if>
<if test="infoCategorySort != null ">
and info_category_sort = #{infoCategorySort}
</if>
<if test="infoCategoryCreator != null and infoCategoryCreator != ''">
and info_category_creator = #{infoCategoryCreator}
</if>
<if test="infoCategoryCreateTime != null ">
and info_category_create_time = #{infoCategoryCreateTime}
</if>
</where>
order by info_category_sort
</select>
<select id="selectInfoCategoryByName" parameterType="String" resultMap="InfoCategoryResult">
<select id="selectInfoCategoryByName" parameterType="String" resultMap="InfoCategoryResult">
<include refid="selectInfoCategoryVo"/>
where info_category_name = #{info_category_name}
</select>
<select id="selectInfoCategoryById" parameterType="Long" resultMap="InfoCategoryResult">
<include refid="selectInfoCategoryVo"/>
where id = #{id}
<include refid="selectInfoCategoryVo"/>
where id = #{id}
</select>
<insert id="insertInfoCategory" parameterType="InfoCategory" useGeneratedKeys="true"
keyProperty="id">
insert into info_category
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="infoCategoryCode != null">info_category_code,
</if>
<if test="infoCategoryName != null">info_category_name,
</if>
<if test="e != null">info_category_type,
</if>
<if test="infoCategorySort != null">info_category_sort,
</if>
<if test="infoCategoryCreator != null">info_category_creator,
</if>
<if test="infoCategoryCreateTime != null">info_category_create_time,
</if>
<if test="infoCategoryCode != null">info_category_code,
</if>
<if test="infoCategoryName != null">info_category_name,
</if>
<if test="e != null">info_category_type,
</if>
<if test="infoCategorySort != null">info_category_sort,
</if>
<if test="infoCategoryCreator != null">info_category_creator,
</if>
<if test="infoCategoryCreateTime != null">info_category_create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="infoCategoryCode != null">#{infoCategoryCode},
</if>
<if test="infoCategoryName != null">#{infoCategoryName},
</if>
<if test="infoCategoryType != null">#{infoCategoryType},
</if>
<if test="infoCategorySort != null">#{infoCategorySort},
</if>
<if test="infoCategoryCreator != null">#{infoCategoryCreator},
</if>
<if test="infoCategoryCreateTime != null">#{infoCategoryCreateTime},
</if>
<if test="infoCategoryCode != null">#{infoCategoryCode},
</if>
<if test="infoCategoryName != null">#{infoCategoryName},
</if>
<if test="infoCategoryType != null">#{infoCategoryType},
</if>
<if test="infoCategorySort != null">#{infoCategorySort},
</if>
<if test="infoCategoryCreator != null">#{infoCategoryCreator},
</if>
<if test="infoCategoryCreateTime != null">#{infoCategoryCreateTime},
</if>
</trim>
</insert>
<update id="updateInfoCategory" parameterType="InfoCategory">
update info_category
<trim prefix="SET" suffixOverrides=",">
<if test="infoCategoryCode != null">info_category_code =
#{infoCategoryCode},
</if>
<if test="infoCategoryName != null">info_category_name =
#{infoCategoryName},
</if>
<if test="infoCategoryType != null">info_category_type =
#{infoCategoryType},
</if>
<if test="infoCategorySort != null">info_category_sort =
#{infoCategorySort},
</if>
<if test="infoCategoryCreator != null">info_category_creator =
#{infoCategoryCreator},
</if>
<if test="infoCategoryCreateTime != null">info_category_create_time =
#{infoCategoryCreateTime},
</if>
<if test="infoCategoryCode != null">info_category_code =
#{infoCategoryCode},
</if>
<if test="infoCategoryName != null">info_category_name =
#{infoCategoryName},
</if>
<if test="infoCategoryType != null">info_category_type =
#{infoCategoryType},
</if>
<if test="infoCategorySort != null">info_category_sort =
#{infoCategorySort},
</if>
<if test="infoCategoryCreator != null">info_category_creator =
#{infoCategoryCreator},
</if>
<if test="infoCategoryCreateTime != null">info_category_create_time =
#{infoCategoryCreateTime},
</if>
</trim>
where id = #{id}
</update>
<delete id="deleteInfoCategoryById" parameterType="Long">
delete from info_category where id = #{id}
delete
from info_category
where id = #{id}
</delete>
<delete id="deleteInfoCategoryByIds" parameterType="String">
@ -130,7 +139,6 @@
</select>
<insert id="insertInfoCategoryList">
insert into info_category(
info_category_code,

View File

@ -77,7 +77,7 @@
#{fieldMark}
</if>
</where>
order by create_time DESC
order by content_sort, create_time DESC
</select>
<select id="selectLabelFieldContentById" parameterType="Long"
@ -162,40 +162,40 @@
update label_field_content
<trim prefix="SET" suffixOverrides=",">
<if test="fieldId != null">field_id =
#{fieldId},
#{fieldId},
</if>
<if test="fieldName != null">field_name =
#{fieldName},
#{fieldName},
</if>
<if test="contentName != null">content_name =
#{contentName},
#{contentName},
</if>
<if test="contentCode != null">content_code =
#{contentCode},
#{contentCode},
</if>
<if test="resultPreview != null">result_preview =
#{resultPreview},
#{resultPreview},
</if>
<if test="contentSort != null">content_sort =
#{contentSort},
#{contentSort},
</if>
<if test="contentRemark != null">content_remark =
#{contentRemark},
#{contentRemark},
</if>
<if test="fieldMark != null">field_mark =
#{fieldMark},
#{fieldMark},
</if>
<if test="createBy != null">create_by =
#{createBy},
#{createBy},
</if>
<if test="createTime != null">create_time =
#{createTime},
#{createTime},
</if>
<if test="updateBy != null">update_by =
#{updateBy},
#{updateBy},
</if>
<if test="updateTime != null">update_time =
#{updateTime},
#{updateTime},
</if>
</trim>
where id = #{id}

View File

@ -57,7 +57,7 @@
#{fieldRemark}
</if>
</where>
order by create_time DESC
order by field_sort, create_time DESC
</select>