详情。

This commit is contained in:
little-cat-sweet 2021-08-06 14:36:58 +08:00
parent a1828094e5
commit e1b78d116b
5 changed files with 30 additions and 0 deletions

View File

@ -115,4 +115,10 @@ public class SysNoticeController extends BaseController
return noticeService.addReadItem(sysXhpcNoticeReadEntity.getNoticeId(), sysXhpcNoticeReadEntity.getUserId());
}
@GetMapping("/showDetail")
public AjaxResult showDetail(@RequestParam Integer noticeId){
return AjaxResult.success(noticeService.showDetail(noticeId));
}
}

View File

@ -88,4 +88,7 @@ public interface SysNoticeMapper
int insertIntoRead(@Param("noticeId") Integer noticeId,@Param("userId") Long userId);
Map<String,Object> selectContent(@Param("noticeId") Integer noticeId);
}

View File

@ -80,4 +80,7 @@ public interface ISysNoticeService
AjaxResult addReadItem(Integer noticeId,Long userId);
Map<String,Object> showDetail(Integer noticeId);
}

View File

@ -147,4 +147,11 @@ public class SysNoticeServiceImpl implements ISysNoticeService
}
return AjaxResult.success();
}
@Override
public Map<String, Object> showDetail(Integer noticeId) {
return noticeMapper.selectContent(noticeId);
}
}

View File

@ -89,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteNoticeByIds" parameterType="Long">
delete from sys_notice where notice_id in
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
#{noticeId}
@ -141,4 +142,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into xhpc_notice_read (user_id,notice_id) values(#{userId},#{noticeId})
</insert>
<select id="selectContent" resultType="map">
select cast(notice_content as char) as noticeContent
from sys_notice
where notice_id=#{noticeId}
</select>
</mapper>