mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
移动端接口新闻分类列表bug处理
This commit is contained in:
@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.iot.mapper.NewsCategoryMapper">
|
<mapper namespace="com.ruoyi.iot.mapper.NewsCategoryMapper">
|
||||||
|
|
||||||
<resultMap type="NewsCategory" id="NewsCategoryResult">
|
<resultMap type="com.ruoyi.iot.domain.NewsCategory" id="NewsCategoryResult">
|
||||||
<result property="categoryId" column="category_id" />
|
<result property="categoryId" column="category_id" />
|
||||||
<result property="categoryName" column="category_name" />
|
<result property="categoryName" column="category_name" />
|
||||||
<result property="orderNum" column="order_num" />
|
<result property="orderNum" column="order_num" />
|
||||||
@@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
select category_id, category_name, order_num, del_flag, create_by, create_time, update_by, update_time, remark from news_category
|
select category_id, category_name, order_num, del_flag, create_by, create_time, update_by, update_time, remark from news_category
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectNewsCategoryList" parameterType="NewsCategory" resultMap="NewsCategoryResult">
|
<select id="selectNewsCategoryList" parameterType="com.ruoyi.iot.domain.NewsCategory" resultMap="NewsCategoryResult">
|
||||||
<include refid="selectNewsCategoryVo"/>
|
<include refid="selectNewsCategoryVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="categoryName != null and categoryName != ''"> and category_name like concat('%', #{categoryName}, '%')</if>
|
<if test="categoryName != null and categoryName != ''"> and category_name like concat('%', #{categoryName}, '%')</if>
|
||||||
@@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where category_id = #{categoryId}
|
where category_id = #{categoryId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertNewsCategory" parameterType="NewsCategory" useGeneratedKeys="true" keyProperty="categoryId">
|
<insert id="insertNewsCategory" parameterType="com.ruoyi.iot.domain.NewsCategory" useGeneratedKeys="true" keyProperty="categoryId">
|
||||||
insert into news_category
|
insert into news_category
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="categoryName != null and categoryName != ''">category_name,</if>
|
<if test="categoryName != null and categoryName != ''">category_name,</if>
|
||||||
@@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateNewsCategory" parameterType="NewsCategory">
|
<update id="updateNewsCategory" parameterType="com.ruoyi.iot.domain.NewsCategory">
|
||||||
update news_category
|
update news_category
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="categoryName != null and categoryName != ''">category_name = #{categoryName},</if>
|
<if test="categoryName != null and categoryName != ''">category_name = #{categoryName},</if>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.iot.mapper.NewsMapper">
|
<mapper namespace="com.ruoyi.iot.mapper.NewsMapper">
|
||||||
|
|
||||||
<resultMap type="News" id="NewsResult">
|
<resultMap type="com.ruoyi.iot.domain.News" id="NewsResult">
|
||||||
<result property="newsId" column="news_id" />
|
<result property="newsId" column="news_id" />
|
||||||
<result property="title" column="title" />
|
<result property="title" column="title" />
|
||||||
<result property="content" column="content" />
|
<result property="content" column="content" />
|
||||||
@@ -27,20 +27,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
select news_id, title, img_url, is_top, is_banner, category_id, category_name, status, author, del_flag, create_by, create_time, update_by, update_time, remark from news
|
select news_id, title, img_url, is_top, is_banner, category_id, category_name, status, author, del_flag, create_by, create_time, update_by, update_time, remark from news
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectNewsList" parameterType="News" resultMap="NewsResult">
|
<select id="selectNewsList" parameterType="com.ruoyi.iot.domain.News" resultMap="NewsResult">
|
||||||
<include refid="selectNewsVo"/>
|
select news_id, title, img_url, is_top, is_banner, category_id, category_name, status, author,
|
||||||
|
create_by, create_time, update_by, update_time, remark
|
||||||
|
from news s
|
||||||
<where>
|
<where>
|
||||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
<if test="title != null and title != ''"> and title like concat('%', #{title}, '%')</if>
|
||||||
|
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||||
<if test="isTop != null "> and is_top = #{isTop}</if>
|
<if test="isTop != null "> and is_top = #{isTop}</if>
|
||||||
<if test="isBanner != null "> and is_banner = #{isBanner}</if>
|
<if test="isBanner != null "> and is_banner = #{isBanner}</if>
|
||||||
<if test="categoryName != null and categoryName != ''"> and category_name like concat('%', #{categoryName}, '%')</if>
|
<if test="categoryName != null and categoryName != ''"> and category_name like concat('%', #{categoryName}, '%')</if>
|
||||||
<if test="categoryId != null"> and category_Id = #{categoryId})</if>
|
|
||||||
<if test="status != null "> and status = #{status}</if>
|
<if test="status != null "> and status = #{status}</if>
|
||||||
</where>
|
</where>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectTopNewsList" parameterType="News" resultMap="NewsResult">
|
<select id="selectTopNewsList" parameterType="com.ruoyi.iot.domain.News" resultMap="NewsResult">
|
||||||
select n.news_id, n.title, n.img_url, n.is_top, n.is_banner, n.category_id, c.category_name, n.status, n.author, n.create_time, n.remark
|
select n.news_id, n.title, n.img_url, n.is_top, n.is_banner, n.category_id, c.category_name, n.status, n.author, n.create_time, n.remark
|
||||||
from news n left join news_category c on c.category_id=n.category_id
|
from news n left join news_category c on c.category_id=n.category_id
|
||||||
where n.is_top=1 and n.status=1
|
where n.is_top=1 and n.status=1
|
||||||
@@ -52,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where news_id = #{newsId}
|
where news_id = #{newsId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertNews" parameterType="News" useGeneratedKeys="true" keyProperty="newsId">
|
<insert id="insertNews" parameterType="com.ruoyi.iot.domain.News" useGeneratedKeys="true" keyProperty="newsId">
|
||||||
insert into news
|
insert into news
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="title != null and title != ''">title,</if>
|
<if test="title != null and title != ''">title,</if>
|
||||||
@@ -90,7 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateNews" parameterType="News">
|
<update id="updateNews" parameterType="com.ruoyi.iot.domain.News">
|
||||||
update news
|
update news
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="title != null and title != ''">title = #{title},</if>
|
<if test="title != null and title != ''">title = #{title},</if>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.iot.mapper.SocialPlatformMapper">
|
<mapper namespace="com.ruoyi.iot.mapper.SocialPlatformMapper">
|
||||||
|
|
||||||
<resultMap type="SocialPlatform" id="SocialPlatformResult">
|
<resultMap type="com.ruoyi.iot.domain.SocialPlatform" id="SocialPlatformResult">
|
||||||
<result property="socialPlatformId" column="social_platform_id"/>
|
<result property="socialPlatformId" column="social_platform_id"/>
|
||||||
<result property="platform" column="platform"/>
|
<result property="platform" column="platform"/>
|
||||||
<result property="status" column="status"/>
|
<result property="status" column="status"/>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
from iot_social_platform
|
from iot_social_platform
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSocialPlatformList" parameterType="SocialPlatform" resultMap="SocialPlatformResult">
|
<select id="selectSocialPlatformList" parameterType="com.ruoyi.iot.domain.SocialPlatform" resultMap="SocialPlatformResult">
|
||||||
<include refid="selectSocialPlatformVo"/>
|
<include refid="selectSocialPlatformVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="platform != null and platform != ''">and platform = #{platform}</if>
|
<if test="platform != null and platform != ''">and platform = #{platform}</if>
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
where platform = #{platform}
|
where platform = #{platform}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertSocialPlatform" parameterType="SocialPlatform" useGeneratedKeys="true"
|
<insert id="insertSocialPlatform" parameterType="com.ruoyi.iot.domain.SocialPlatform" useGeneratedKeys="true"
|
||||||
keyProperty="socialPlatformId">
|
keyProperty="socialPlatformId">
|
||||||
insert into iot_social_platform
|
insert into iot_social_platform
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateSocialPlatform" parameterType="SocialPlatform">
|
<update id="updateSocialPlatform" parameterType="com.ruoyi.iot.domain.SocialPlatform">
|
||||||
update iot_social_platform
|
update iot_social_platform
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="platform != null and platform != ''">platform = #{platform},</if>
|
<if test="platform != null and platform != ''">platform = #{platform},</if>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.iot.mapper.SocialUserMapper">
|
<mapper namespace="com.ruoyi.iot.mapper.SocialUserMapper">
|
||||||
|
|
||||||
<resultMap type="SocialUser" id="SocialUserResult">
|
<resultMap type="com.ruoyi.iot.domain.SocialUser" id="SocialUserResult">
|
||||||
<result property="socialUserId" column="social_user_id"/>
|
<result property="socialUserId" column="social_user_id"/>
|
||||||
<result property="uuid" column="uuid"/>
|
<result property="uuid" column="uuid"/>
|
||||||
<result property="source" column="source"/>
|
<result property="source" column="source"/>
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
from iot_social_user
|
from iot_social_user
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSocialUserList" parameterType="SocialUser" resultMap="SocialUserResult">
|
<select id="selectSocialUserList" parameterType="com.ruoyi.iot.domain.SocialUser" resultMap="SocialUserResult">
|
||||||
<include refid="selectSocialUserVo"/>
|
<include refid="selectSocialUserVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="uuid != null and uuid != ''">and uuid = #{uuid}</if>
|
<if test="uuid != null and uuid != ''">and uuid = #{uuid}</if>
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
where social_user_id = #{socialUserId}
|
where social_user_id = #{socialUserId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertSocialUser" parameterType="SocialUser" useGeneratedKeys="true" keyProperty="socialUserId">
|
<insert id="insertSocialUser" parameterType="com.ruoyi.iot.domain.SocialUser" useGeneratedKeys="true" keyProperty="socialUserId">
|
||||||
insert into iot_social_user
|
insert into iot_social_user
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="uuid != null and uuid != ''">uuid,</if>
|
<if test="uuid != null and uuid != ''">uuid,</if>
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateSocialUser" parameterType="SocialUser">
|
<update id="updateSocialUser" parameterType="com.ruoyi.iot.domain.SocialUser">
|
||||||
update iot_social_user
|
update iot_social_user
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
<if test="uuid != null and uuid != ''">uuid = #{uuid},</if>
|
<if test="uuid != null and uuid != ''">uuid = #{uuid},</if>
|
||||||
|
|||||||
Reference in New Issue
Block a user