This commit is contained in:
苏竹红
2024-03-21 17:14:15 +08:00
parent 4da17b583a
commit 157e5a769e
4 changed files with 12 additions and 10 deletions

View File

@@ -31,7 +31,7 @@
content content
</sql> </sql>
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true"> <insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
insert into hy_content_info insert into xfsg_content_info
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="record.contentTitle != null"> <if test="record.contentTitle != null">
content_title, content_title,
@@ -101,7 +101,7 @@
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective"> <update id="updateByPrimaryKeySelective">
update hy_content_info update xfsg_content_info
<set> <set>
<if test="record.contentTitle != null and record.contentTitle != ''"> <if test="record.contentTitle != null and record.contentTitle != ''">
content_title = #{record.contentTitle}, content_title = #{record.contentTitle},
@@ -140,7 +140,7 @@
where id = #{record.id} where id = #{record.id}
</update> </update>
<update id="deleteSelective"> <update id="deleteSelective">
update hy_content_info update xfsg_content_info
<set> <set>
deleted = 1 deleted = 1
</set> </set>
@@ -148,7 +148,7 @@
</update> </update>
<select id="queryContentList" resultMap="HyContentInfoVOList"> <select id="queryContentList" resultMap="HyContentInfoVOList">
select <include refid="Base_Column_List"></include>, update_user_id updateUserId select <include refid="Base_Column_List"></include>, update_user_id updateUserId
from hy_content_info from xfsg_content_info
where deleted = 0 where deleted = 0
<if test="contentTitle != null and contentTitle != ''"> <if test="contentTitle != null and contentTitle != ''">
and content_title like concat('%', #{contentTitle}, '%') and content_title like concat('%', #{contentTitle}, '%')
@@ -183,7 +183,7 @@
<!-- C 端使用的动态查询 --> <!-- C 端使用的动态查询 -->
<select id="queryContentListForC" resultType="com.cool.store.vo.HyContentInfoVO"> <select id="queryContentListForC" resultType="com.cool.store.vo.HyContentInfoVO">
select <include refid="Base_Column_List"></include> select <include refid="Base_Column_List"></include>
from hy_content_info from xfsg_content_info
where deleted = 0 where deleted = 0
and status = 0 and status = 0
<if test="contentTitle != null and contentTitle != ''"> <if test="contentTitle != null and contentTitle != ''">
@@ -207,7 +207,7 @@
<!-- 查询动态详情 --> <!-- 查询动态详情 -->
<select id="queryContentInfo" resultType="com.cool.store.entity.HyContentInfoDO"> <select id="queryContentInfo" resultType="com.cool.store.entity.HyContentInfoDO">
select <include refid="Base_Column_List"></include> select <include refid="Base_Column_List"></include>
from hy_content_info from xfsg_content_info
where deleted = 0 where deleted = 0
and id = #{contentId} and id = #{contentId}
</select> </select>
@@ -215,7 +215,7 @@
<!-- 标题是否重复 --> <!-- 标题是否重复 -->
<select id="whetherTitleDuplicated" resultType="java.lang.Boolean"> <select id="whetherTitleDuplicated" resultType="java.lang.Boolean">
SELECT COUNT(*) SELECT COUNT(*)
FROM hy_content_info FROM xfsg_content_info
WHERE deleted = 0 WHERE deleted = 0
AND content_title = #{contentTitle} AND content_title = #{contentTitle}
</select> </select>
@@ -223,7 +223,7 @@
<!-- 获取所有标题 --> <!-- 获取所有标题 -->
<select id="queryTitles" resultType="java.lang.String"> <select id="queryTitles" resultType="java.lang.String">
SELECT content_title SELECT content_title
FROM hy_content_info FROM xfsg_content_info
WHERE deleted = 0 WHERE deleted = 0
</select> </select>
</mapper> </mapper>

View File

@@ -21,7 +21,7 @@ import java.util.List;
@RestController @RestController
@RequestMapping("news") @RequestMapping("news")
@Api(tags = "动态") @Api(tags = "PC动态")
@Slf4j @Slf4j
public class ContentController { public class ContentController {

View File

@@ -8,6 +8,7 @@ import com.cool.store.service.OpenAreaService;
import com.cool.store.vo.OpenAreaTreeVO; import com.cool.store.vo.OpenAreaTreeVO;
import com.cool.store.vo.OpenAreaVO; import com.cool.store.vo.OpenAreaVO;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@@ -23,6 +24,7 @@ import java.util.List;
*/ */
@RestController @RestController
@RequestMapping("/openArea") @RequestMapping("/openArea")
@Api(tags = "PC开放城市")
public class OpenAreaController { public class OpenAreaController {
@Resource @Resource

View File

@@ -26,7 +26,7 @@ import java.util.List;
*/ */
@RestController @RestController
@RequestMapping("mini/news") @RequestMapping("mini/news")
@Api(tags = "动态") @Api(tags = "小程序动态")
@Slf4j @Slf4j
public class MiniContentController { public class MiniContentController {
@Autowired @Autowired