|
|
@@ -33,130 +33,130 @@ public class ArticleOutController {
|
|
|
private ArticleServiceInterface articleServiceInterface;
|
|
|
@Autowired
|
|
|
private AppletServiceInterface appletServiceInterface;
|
|
|
-// /**
|
|
|
-// * 分类列表查询
|
|
|
-// * @return
|
|
|
-// */
|
|
|
-// @GetMapping("getClassificationList")
|
|
|
-// public Mono<RStatus<Paged<Classification>>> getClassificationList(){
|
|
|
-// return articleServiceInterface.getClassificationList();
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 通过分类ID查询标签列表
|
|
|
-// *
|
|
|
-// * @param classificationId 分类ID 值为0时查询所有标签
|
|
|
-// * @param page
|
|
|
-// * @param size
|
|
|
-// * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link LabelManagementRes}>>>
|
|
|
-// */
|
|
|
-// @GetMapping("getLableList")
|
|
|
-// public Mono<RStatus<Paged<LabelManagementRes>>> getLableList(@RequestParam("classificationId") Long classificationId,
|
|
|
-// @RequestParam("page") Integer page,
|
|
|
-// @RequestParam("size")Integer size){
|
|
|
-// return articleServiceInterface.getOutLableList(classificationId,page,size);
|
|
|
-// }
|
|
|
-// /**
|
|
|
-// * 通过标签名称查询标签信息
|
|
|
-// *
|
|
|
-// * @param name
|
|
|
-// *
|
|
|
-// * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link LabelManagementRes}>>>
|
|
|
-// */
|
|
|
-// @GetMapping("byNamegetLable")
|
|
|
-// public Mono<RStatus<List<LabelManagementRes>>> byNamegetLable(@RequestParam("name") String name
|
|
|
-// ){
|
|
|
-// return articleServiceInterface.byNamegetLable(name);
|
|
|
-// }
|
|
|
-// /**
|
|
|
-// * 通过标签Id查询文章列表
|
|
|
-// *
|
|
|
-// * @param labelId id
|
|
|
-// * @param page
|
|
|
-// * @param size
|
|
|
-// * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link LabelManagementRes}>>>
|
|
|
-// */
|
|
|
-// @GetMapping("byLableIdGetArticle")
|
|
|
-// public Mono<RStatus<Paged<ArticleOutRes>>> byLableNameGetArticle(@NotNull @RequestParam("labelId") Long labelId,
|
|
|
-// @RequestParam("page") Integer page,
|
|
|
-// @RequestParam("size")Integer size){
|
|
|
-// return articleServiceInterface.byLableGetArticle(labelId,page,size);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 通过标签name查询文章列表
|
|
|
-// * @param name
|
|
|
-// * @param page
|
|
|
-// * @param size
|
|
|
-// * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link ArticleOutRes}>>>
|
|
|
-// */
|
|
|
-// @GetMapping("byLableNameGetArticle")
|
|
|
-// public Mono<RStatus<Paged<ArticleOutRes>>> byLableNameGetArticle(@NotNull @RequestParam("name") String name,
|
|
|
-// @RequestParam("page") Integer page,
|
|
|
-// @RequestParam("size")Integer size){
|
|
|
-// return articleServiceInterface.byLableNameGetArticle(name,page,size);
|
|
|
-// }
|
|
|
-// /**
|
|
|
-// * 获取用户是否已经解锁文章
|
|
|
-// *
|
|
|
-// * @param userId 用户id
|
|
|
-// * @param articleId 文章id 值0时返回所有已解锁文章
|
|
|
-// * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link ArticleOutRes}>>>
|
|
|
-// */
|
|
|
-// @GetMapping("byUserIdGetUnlockState")
|
|
|
-// public Mono<RStatus<List<ArticleUnlockStateRes>>> byUserIdGetUnlockState(@NotNull @RequestParam("userId") String userId,
|
|
|
-// @NotNull @RequestParam("articleId") Long articleId){
|
|
|
-// return articleServiceInterface.byUserIdGetUnlockState(userId,articleId);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 随机获取域名和小程序appid
|
|
|
-// *
|
|
|
-// * @return {@link Mono}<{@link RStatus}<{@link List}<{@link AppidDomainRes}>>>
|
|
|
-// */
|
|
|
-// @GetMapping("getdomain")
|
|
|
-// public Mono<RStatus<AppidDomainRes>> getdomain(){
|
|
|
-// return articleServiceInterface.getdomain();
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 根据文章id获取内容(可以根据列表id集合进行下一页)
|
|
|
-// * @param articleId
|
|
|
-// * @return {@link Mono}<{@link RStatus}<{@link ArticleOutRes}>>
|
|
|
-// */
|
|
|
-// @GetMapping("byArticleIdGet")
|
|
|
-// public Mono<RStatus<ArticleOutRes>> byArticleIdGet(@NotNull @RequestParam("articleId") Long articleId){
|
|
|
-// return articleServiceInterface.byArticleIdGet(articleId);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 随机下一页
|
|
|
-// * @return {@link Mono}<{@link RStatus}<{@link ArticleOutRes}>>
|
|
|
-// */
|
|
|
-// @GetMapping("randomNextPage")
|
|
|
-// public Mono<RStatus<ArticleOutRes>> randomNextPage(){
|
|
|
-// return articleServiceInterface.randomNextPage();
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 通过 userId 和文章 id 获取观看视频状态
|
|
|
-// * @param userId unique
|
|
|
-// * @param id 相册id
|
|
|
-// * @return {@link Mono}<{@link RStatus}<{@link DataRes}>>
|
|
|
-// */
|
|
|
-// @GetMapping("byUserIdGetArticleState")
|
|
|
-// public Mono<RStatus<DataRes>> byUserIdGetArticleState(@RequestParam("userId") String userId,@RequestParam("id") Long id ){
|
|
|
-// return appletServiceInterface.getUniqueStateArticle(userId,id);
|
|
|
-// }
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 获取打开广告地址
|
|
|
-// * @param userId 同一用户使用一条scheme链接
|
|
|
-// * @return {@link Mono}<{@link RStatus}<{@link AppletH5Data}>>
|
|
|
-// */
|
|
|
-// @GetMapping("getOpenLink")
|
|
|
-// public Mono<RStatus<AppletH5Data>> getOpenLink(@RequestParam("userId") String userId){
|
|
|
-// return appletServiceInterface.getOpenLink(userId);
|
|
|
-// }
|
|
|
+ /**
|
|
|
+ * 分类列表查询
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @GetMapping("getClassificationList")
|
|
|
+ public Mono<RStatus<Paged<Classification>>> getClassificationList(){
|
|
|
+ return articleServiceInterface.getClassificationList();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过分类ID查询标签列表
|
|
|
+ *
|
|
|
+ * @param classificationId 分类ID 值为0时查询所有标签
|
|
|
+ * @param page
|
|
|
+ * @param size
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link LabelManagementRes}>>>
|
|
|
+ */
|
|
|
+ @GetMapping("getLableList")
|
|
|
+ public Mono<RStatus<Paged<LabelManagementRes>>> getLableList(@RequestParam("classificationId") Long classificationId,
|
|
|
+ @RequestParam("page") Integer page,
|
|
|
+ @RequestParam("size")Integer size){
|
|
|
+ return articleServiceInterface.getOutLableList(classificationId,page,size);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 通过标签名称查询标签信息
|
|
|
+ *
|
|
|
+ * @param name
|
|
|
+ *
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link LabelManagementRes}>>>
|
|
|
+ */
|
|
|
+ @GetMapping("byNamegetLable")
|
|
|
+ public Mono<RStatus<List<LabelManagementRes>>> byNamegetLable(@RequestParam("name") String name
|
|
|
+ ){
|
|
|
+ return articleServiceInterface.byNamegetLable(name);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 通过标签Id查询文章列表
|
|
|
+ *
|
|
|
+ * @param labelId id
|
|
|
+ * @param page
|
|
|
+ * @param size
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link LabelManagementRes}>>>
|
|
|
+ */
|
|
|
+ @GetMapping("byLableIdGetArticle")
|
|
|
+ public Mono<RStatus<Paged<ArticleOutRes>>> byLableNameGetArticle(@NotNull @RequestParam("labelId") Long labelId,
|
|
|
+ @RequestParam("page") Integer page,
|
|
|
+ @RequestParam("size")Integer size){
|
|
|
+ return articleServiceInterface.byLableGetArticle(labelId,page,size);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过标签name查询文章列表
|
|
|
+ * @param name
|
|
|
+ * @param page
|
|
|
+ * @param size
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link ArticleOutRes}>>>
|
|
|
+ */
|
|
|
+ @GetMapping("byLableNameGetArticle")
|
|
|
+ public Mono<RStatus<Paged<ArticleOutRes>>> byLableNameGetArticle(@NotNull @RequestParam("name") String name,
|
|
|
+ @RequestParam("page") Integer page,
|
|
|
+ @RequestParam("size")Integer size){
|
|
|
+ return articleServiceInterface.byLableNameGetArticle(name,page,size);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 获取用户是否已经解锁文章
|
|
|
+ *
|
|
|
+ * @param userId 用户id
|
|
|
+ * @param articleId 文章id 值0时返回所有已解锁文章
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link ArticleOutRes}>>>
|
|
|
+ */
|
|
|
+ @GetMapping("byUserIdGetUnlockState")
|
|
|
+ public Mono<RStatus<List<ArticleUnlockStateRes>>> byUserIdGetUnlockState(@NotNull @RequestParam("userId") String userId,
|
|
|
+ @NotNull @RequestParam("articleId") Long articleId){
|
|
|
+ return articleServiceInterface.byUserIdGetUnlockState(userId,articleId);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 随机获取域名和小程序appid
|
|
|
+ *
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link List}<{@link AppidDomainRes}>>>
|
|
|
+ */
|
|
|
+ @GetMapping("getdomain")
|
|
|
+ public Mono<RStatus<AppidDomainRes>> getdomain(){
|
|
|
+ return articleServiceInterface.getdomain();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据文章id获取内容(可以根据列表id集合进行下一页)
|
|
|
+ * @param articleId
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link ArticleOutRes}>>
|
|
|
+ */
|
|
|
+ @GetMapping("byArticleIdGet")
|
|
|
+ public Mono<RStatus<ArticleOutRes>> byArticleIdGet(@NotNull @RequestParam("articleId") Long articleId){
|
|
|
+ return articleServiceInterface.byArticleIdGet(articleId);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 随机下一页
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link ArticleOutRes}>>
|
|
|
+ */
|
|
|
+ @GetMapping("randomNextPage")
|
|
|
+ public Mono<RStatus<ArticleOutRes>> randomNextPage(){
|
|
|
+ return articleServiceInterface.randomNextPage();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 通过 userId 和文章 id 获取观看视频状态
|
|
|
+ * @param userId unique
|
|
|
+ * @param id 相册id
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link DataRes}>>
|
|
|
+ */
|
|
|
+ @GetMapping("byUserIdGetArticleState")
|
|
|
+ public Mono<RStatus<DataRes>> byUserIdGetArticleState(@RequestParam("userId") String userId,@RequestParam("id") Long id ){
|
|
|
+ return appletServiceInterface.getUniqueStateArticle(userId,id);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取打开广告地址
|
|
|
+ * @param userId 同一用户使用一条scheme链接
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link AppletH5Data}>>
|
|
|
+ */
|
|
|
+ @GetMapping("getOpenLink")
|
|
|
+ public Mono<RStatus<AppletH5Data>> getOpenLink(@RequestParam("userId") String userId){
|
|
|
+ return appletServiceInterface.getOpenLink(userId);
|
|
|
+ }
|
|
|
|
|
|
}
|