This commit is contained in:
parent
5c21042073
commit
eb096d7b41
|
@ -78,9 +78,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by a.publish_time desc,a.create_time desc
|
||||
<if test="paramLimitno != null and paramLimitno != ''"> limit ${paramLimitno}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectTplbList" parameterType="NdNew" resultMap="NdNewResult">
|
||||
<include refid="selectNdNewVo2"/>
|
||||
where a.image_path is not null and a.image_path != ''
|
||||
<if test="firstType != null and firstType != ''"> and b.parent_id = #{firstType}</if>
|
||||
<if test="newType != null and newType != ''"> and FIND_IN_SET(#{newType},a.new_type) </if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and a.del_flag = #{delFlag}</if>
|
||||
<if test="title != null and title != ''"> and a.title like concat('%', #{title}, '%')</if>
|
||||
<if test="params.beginPublishTime != null and params.beginPublishTime != '' and params.endPublishTime != null and params.endPublishTime != ''"> and a.publish_time between #{params.beginPublishTime} and #{params.endPublishTime}</if>
|
||||
GROUP BY new_type,id
|
||||
order by a.publish_time desc,a.create_time desc
|
||||
<if test="paramLimitno != null and paramLimitno != ''"> limit ${paramLimitno}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectNdNewById" parameterType="Long" resultMap="NdNewResult">
|
||||
<include refid="selectNdNewVo"/>
|
||||
<include refid="selectNdNewVo2"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
<?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.NdLbtMapper">
|
||||
|
||||
<resultMap type="NdLbt" id="NdLbtResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="filePath" column="file_path" />
|
||||
<result property="sort" column="sort" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNdLbtVo">
|
||||
select id, file_path, sort from nd_lbt
|
||||
</sql>
|
||||
|
||||
<select id="selectNdLbtList" parameterType="NdLbt" resultMap="NdLbtResult">
|
||||
<include refid="selectNdLbtVo"/>
|
||||
<where>
|
||||
</where>
|
||||
order by sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectNdLbtById" parameterType="Long" resultMap="NdLbtResult">
|
||||
<include refid="selectNdLbtVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertNdLbt" parameterType="NdLbt">
|
||||
insert into nd_lbt
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="filePath != null">file_path,</if>
|
||||
<if test="sort != null">sort,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="filePath != null">#{filePath},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateNdLbt" parameterType="NdLbt">
|
||||
update nd_lbt
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="filePath != null">file_path = #{filePath},</if>
|
||||
<if test="sort != null">sort = #{sort},</if>
|
||||
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteNdLbtById" parameterType="Long">
|
||||
delete from nd_lbt where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteNdLbtByIds" parameterType="String">
|
||||
delete from nd_lbt where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
|
@ -78,9 +78,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by a.publish_time desc,a.create_time desc
|
||||
<if test="paramLimitno != null and paramLimitno != ''"> limit ${paramLimitno}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectTplbList" parameterType="NdNew" resultMap="NdNewResult">
|
||||
<include refid="selectNdNewVo2"/>
|
||||
where a.image_path is not null and a.image_path != ''
|
||||
<if test="firstType != null and firstType != ''"> and b.parent_id = #{firstType}</if>
|
||||
<if test="newType != null and newType != ''"> and FIND_IN_SET(#{newType},a.new_type) </if>
|
||||
<if test="type != null and type != ''"> and a.type = #{type}</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and a.del_flag = #{delFlag}</if>
|
||||
<if test="title != null and title != ''"> and a.title like concat('%', #{title}, '%')</if>
|
||||
<if test="params.beginPublishTime != null and params.beginPublishTime != '' and params.endPublishTime != null and params.endPublishTime != ''"> and a.publish_time between #{params.beginPublishTime} and #{params.endPublishTime}</if>
|
||||
GROUP BY new_type,id
|
||||
order by a.publish_time desc,a.create_time desc
|
||||
<if test="paramLimitno != null and paramLimitno != ''"> limit ${paramLimitno}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectNdNewById" parameterType="Long" resultMap="NdNewResult">
|
||||
<include refid="selectNdNewVo"/>
|
||||
<include refid="selectNdNewVo2"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
|
|
Loading…
Reference in New Issue