Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -41,9 +41,9 @@ public interface HyContentInfoMapper {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* B 端使用的动态查询
|
* C 端使用的动态查询
|
||||||
*/
|
*/
|
||||||
List<HyContentInfoVO> queryContentListForB(ContentQueryListDto dto);
|
List<HyContentInfoVO> queryContentListForC(ContentQueryListDto dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据contentId查询动态详情
|
* 根据contentId查询动态详情
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, content_title, subject, content_type, cover, content, status, deleted, create_time, update_time,
|
id, content_title, `subject`, content_type, cover, content, `status`, deleted, create_time, update_time,
|
||||||
create_user_id, update_user_id
|
create_user_id, update_user_id
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
@@ -165,6 +165,7 @@
|
|||||||
<if test="endTime != null and endTime != ''">
|
<if test="endTime != null and endTime != ''">
|
||||||
and update_time <= #{endTime}
|
and update_time <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
|
order by update_time desc
|
||||||
</select>
|
</select>
|
||||||
<select id="getUpdateUserName" resultType="string">
|
<select id="getUpdateUserName" resultType="string">
|
||||||
select name
|
select name
|
||||||
@@ -179,12 +180,12 @@
|
|||||||
and user_id = #{updateUserId}
|
and user_id = #{updateUserId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- B 端使用的动态查询 -->
|
<!-- C 端使用的动态查询 -->
|
||||||
<select id="queryContentListForB" 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 hy_content_info
|
||||||
where deleted = 0
|
where deleted = 0
|
||||||
and status = 1
|
and status = 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}, '%')
|
||||||
</if>
|
</if>
|
||||||
@@ -200,6 +201,7 @@
|
|||||||
<if test="endTime != null and endTime != ''">
|
<if test="endTime != null and endTime != ''">
|
||||||
and update_time <= #{endTime}
|
and update_time <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
|
order by update_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询动态详情 -->
|
<!-- 查询动态详情 -->
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ import lombok.Data;
|
|||||||
public class ContentQueryTitlesDto {
|
public class ContentQueryTitlesDto {
|
||||||
|
|
||||||
@ApiModelProperty("用户输入标题")
|
@ApiModelProperty("用户输入标题")
|
||||||
private String tittle;
|
private String title;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ public interface ContentService {
|
|||||||
*/
|
*/
|
||||||
List<HyContentInfoVO> queryContentList(ContentQueryListDto dto);
|
List<HyContentInfoVO> queryContentList(ContentQueryListDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询动态列表 C 端用
|
||||||
|
*/
|
||||||
|
List<HyContentInfoVO> queryContentListToC(ContentQueryListDto dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询动态详情
|
* 查询动态详情
|
||||||
* @param contentId
|
* @param contentId
|
||||||
|
|||||||
@@ -75,7 +75,15 @@ public class ContentServiceImpl implements ContentService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<HyContentInfoVO> queryContentList(ContentQueryListDto dto) {
|
public List<HyContentInfoVO> queryContentList(ContentQueryListDto dto) {
|
||||||
return contentInfoMapper.queryContentListForB(dto);
|
return contentInfoMapper.queryContentList(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询动态列表 C 端用
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<HyContentInfoVO> queryContentListToC(ContentQueryListDto dto) {
|
||||||
|
return contentInfoMapper.queryContentListForC(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class ContentController {
|
|||||||
@PostMapping("/queryTitles")
|
@PostMapping("/queryTitles")
|
||||||
@ApiOperation("搜索标题是否重复")
|
@ApiOperation("搜索标题是否重复")
|
||||||
public ResponseResult<Boolean> queryTitles(@RequestBody ContentQueryTitlesDto title) {
|
public ResponseResult<Boolean> queryTitles(@RequestBody ContentQueryTitlesDto title) {
|
||||||
return ResponseResult.success(contentService.queryTitles(title.getTittle()));
|
return ResponseResult.success(contentService.queryTitles(title.getTitle()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class ContentController {
|
|||||||
@ApiOperation("查询动态列表")
|
@ApiOperation("查询动态列表")
|
||||||
public ResponseResult<PageInfo<HyContentInfoVO>> queryContentList(@RequestBody ContentQueryListDto dto) {
|
public ResponseResult<PageInfo<HyContentInfoVO>> queryContentList(@RequestBody ContentQueryListDto dto) {
|
||||||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
||||||
List<HyContentInfoVO> list = contentService.queryContentList(dto);
|
List<HyContentInfoVO> list = contentService.queryContentListToC(dto);
|
||||||
PageInfo<HyContentInfoVO> page = new PageInfo<>(list);
|
PageInfo<HyContentInfoVO> page = new PageInfo<>(list);
|
||||||
return ResponseResult.success(page);
|
return ResponseResult.success(page);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user