详情。
This commit is contained in:
parent
a1828094e5
commit
e1b78d116b
@ -115,4 +115,10 @@ public class SysNoticeController extends BaseController
|
|||||||
|
|
||||||
return noticeService.addReadItem(sysXhpcNoticeReadEntity.getNoticeId(), sysXhpcNoticeReadEntity.getUserId());
|
return noticeService.addReadItem(sysXhpcNoticeReadEntity.getNoticeId(), sysXhpcNoticeReadEntity.getUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/showDetail")
|
||||||
|
public AjaxResult showDetail(@RequestParam Integer noticeId){
|
||||||
|
|
||||||
|
return AjaxResult.success(noticeService.showDetail(noticeId));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,4 +88,7 @@ public interface SysNoticeMapper
|
|||||||
int insertIntoRead(@Param("noticeId") Integer noticeId,@Param("userId") Long userId);
|
int insertIntoRead(@Param("noticeId") Integer noticeId,@Param("userId") Long userId);
|
||||||
|
|
||||||
|
|
||||||
|
Map<String,Object> selectContent(@Param("noticeId") Integer noticeId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,4 +80,7 @@ public interface ISysNoticeService
|
|||||||
AjaxResult addReadItem(Integer noticeId,Long userId);
|
AjaxResult addReadItem(Integer noticeId,Long userId);
|
||||||
|
|
||||||
|
|
||||||
|
Map<String,Object> showDetail(Integer noticeId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -147,4 +147,11 @@ public class SysNoticeServiceImpl implements ISysNoticeService
|
|||||||
}
|
}
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> showDetail(Integer noticeId) {
|
||||||
|
|
||||||
|
return noticeMapper.selectContent(noticeId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,6 +89,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteNoticeByIds" parameterType="Long">
|
<delete id="deleteNoticeByIds" parameterType="Long">
|
||||||
|
|
||||||
delete from sys_notice where notice_id in
|
delete from sys_notice where notice_id in
|
||||||
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
|
<foreach item="noticeId" collection="array" open="(" separator="," close=")">
|
||||||
#{noticeId}
|
#{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 into xhpc_notice_read (user_id,notice_id) values(#{userId},#{noticeId})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectContent" resultType="map">
|
||||||
|
|
||||||
|
select cast(notice_content as char) as noticeContent
|
||||||
|
from sys_notice
|
||||||
|
where notice_id=#{noticeId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user