[feat] 新增通知公告接口
parent
da3416821e
commit
d27aacf7e7
|
|
@ -89,4 +89,13 @@ public class SysNoticeController extends BaseController
|
|||
{
|
||||
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据标题查询通知公告
|
||||
*/
|
||||
@GetMapping("/no-login/{noticeTitle}")
|
||||
public AjaxResult getInfo(@PathVariable String noticeTitle)
|
||||
{
|
||||
return success(noticeService.selectNoticeByNoticeTitle(noticeTitle));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,4 +57,12 @@ public interface SysNoticeMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteNoticeByIds(Long[] noticeIds);
|
||||
|
||||
/**
|
||||
* 查询公告信息
|
||||
*
|
||||
* @param noticeTitle 公告标题
|
||||
* @return 公告信息
|
||||
*/
|
||||
public SysNotice selectNoticeByNoticeTitle(String noticeTitle);
|
||||
}
|
||||
|
|
@ -57,4 +57,12 @@ public interface ISysNoticeService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteNoticeByIds(Long[] noticeIds);
|
||||
|
||||
/**
|
||||
* 查询公告信息
|
||||
*
|
||||
* @param noticeTitle 公告标题
|
||||
* @return 公告信息
|
||||
*/
|
||||
public SysNotice selectNoticeByNoticeTitle(String noticeTitle);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,4 +89,15 @@ public class SysNoticeServiceImpl implements ISysNoticeService
|
|||
{
|
||||
return noticeMapper.deleteNoticeByIds(noticeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询公告信息
|
||||
*
|
||||
* @param noticeTitle 公告标题
|
||||
* @return 公告信息
|
||||
*/
|
||||
@Override
|
||||
public SysNotice selectNoticeByNoticeTitle(String noticeTitle) {
|
||||
return noticeMapper.selectNoticeByNoticeTitle(noticeTitle);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectNoticeByNoticeTitle" parameterType="String" resultMap="SysNoticeResult">
|
||||
<include refid="selectNoticeVo"/>
|
||||
where notice_title = #{noticeTitle}
|
||||
order by notice_id desc
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertNotice" parameterType="SysNotice">
|
||||
insert into sys_notice (
|
||||
|
|
|
|||
Loading…
Reference in New Issue