[feat] 新增通知公告接口
parent
da3416821e
commit
d27aacf7e7
|
|
@ -89,4 +89,13 @@ public class SysNoticeController extends BaseController
|
||||||
{
|
{
|
||||||
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
|
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 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteNoticeByIds(Long[] noticeIds);
|
public int deleteNoticeByIds(Long[] noticeIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公告信息
|
||||||
|
*
|
||||||
|
* @param noticeTitle 公告标题
|
||||||
|
* @return 公告信息
|
||||||
|
*/
|
||||||
|
public SysNotice selectNoticeByNoticeTitle(String noticeTitle);
|
||||||
}
|
}
|
||||||
|
|
@ -57,4 +57,12 @@ public interface ISysNoticeService
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteNoticeByIds(Long[] noticeIds);
|
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);
|
return noticeMapper.deleteNoticeByIds(noticeIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公告信息
|
||||||
|
*
|
||||||
|
* @param noticeTitle 公告标题
|
||||||
|
* @return 公告信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysNotice selectNoticeByNoticeTitle(String noticeTitle) {
|
||||||
|
return noticeMapper.selectNoticeByNoticeTitle(noticeTitle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</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 id="insertNotice" parameterType="SysNotice">
|
||||||
insert into sys_notice (
|
insert into sys_notice (
|
||||||
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue