Commit 9b8d611f by 田超

Merge branch 'feature/1003400' into 'master'

feat: [1003400、1003401] 资讯及网课可展示的数量、点击按钮查看更多

See merge request rays/pcloud-book!890
parents ba02a19b f11adc48
......@@ -99,7 +99,7 @@ public interface RightsSettingBiz {
* @Param [rightsSettingId, wechatUserId, type]
* @return com.pcloud.book.rightsSetting.entity.RightsSetting
**/
RightsSetting getRightsSettingRightsNowItemsByType(Long rightsSettingId, Long wechatUserId, Integer type, Long adviserId, Long bookId, Long channelId, Integer readType);
RightsSetting getRightsSettingRightsNowItemsByType(Long rightsSettingId, Long wechatUserId, Integer type, Long adviserId, Long bookId, Long channelId, Integer readType, Integer currentPage, Integer numPerPage);
RightsSetting getRightsSettingGiftCoupons(Long rightsSettingId, Long wechatUserId, Integer readType);
......
package com.pcloud.book.rightsSetting.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pcloud.common.page.PageBeanNew;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import lombok.Data;
@Data
public class RightsSettingTitle implements Serializable {
......@@ -36,6 +37,11 @@ public class RightsSettingTitle implements Serializable {
private String serveType;
/**
* 分页
*/
private PageBeanNew<RightsNowItem> rightsSettingItemList4Page;
/**
* 列表
*/
private List<RightsNowItem> rightsSettingItemList;
......
package com.pcloud.book.rightsSetting.facade;
import com.pcloud.book.applet.vo.AppletNewsShowStateVO;
import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.book.rightsSetting.biz.RightsSettingBiz;
import com.pcloud.book.rightsSetting.dto.RightsSettingDto;
......@@ -16,8 +15,9 @@ import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.SessionUtil;
import com.pcloud.common.utils.cookie.Cookie;
import com.pcloud.common.utils.string.StringUtil;
import org.slf4j.Logger;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.CookieValue;
......@@ -29,13 +29,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import javax.validation.constraints.Min;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.SneakyThrows;
import java.util.List;
@RequestMapping("rightsSetting")
@RestController("rightsSettingFacede")
......@@ -167,17 +162,20 @@ public class RightsSettingFacede {
@SneakyThrows
@ApiOperation("根据权益id和类型获取即享权益项")
@GetMapping("getRightsSettingRightsNowItemsByType")
public ResponseDto<RightsSetting> getRightsSettingRightsNowItemsByType( @CookieValue("userInfo") String userInfo,
public ResponseDto<RightsSetting> getRightsSettingRightsNowItemsByType(@CookieValue("userInfo") String userInfo,
@RequestParam("rightsSettingId") @Min(value = 1,
message = "权益id不能小于1") Long rightsSettingId,
@RequestParam("rightsSettingType") @Min(value = 1,
message = "权益类型不能小于1") Integer rightsSettingType ,
@RequestParam(value = "adviserId",required = false) Long adviserId,
@RequestParam(value = "bookId", required = false)Long bookId,
@RequestParam(value = "channelId", required = false)Long channelId,
@RequestParam(value = "readType",required = false)@ApiParam("阅读方式1轻松2高效3深度") Integer readType) {
message = "权益类型不能小于1") Integer rightsSettingType,
@RequestParam(value = "adviserId", required = false) Long adviserId,
@RequestParam(value = "bookId", required = false) Long bookId,
@RequestParam(value = "channelId", required = false) Long channelId,
@RequestParam(value = "readType", required = false) @ApiParam("阅读方式1轻松2高效3深度") Integer readType,
@RequestParam(value = "numPerPage", required = false) Integer numPerPage,
@RequestParam(value = "currentPage", required = false) Integer currentPage
) {
Long wechatUserId = Cookie.getId(userInfo, Cookie._WECHAT_USER_ID);
return new ResponseDto<>(rightsSettingBiz.getRightsSettingRightsNowItemsByType(rightsSettingId, wechatUserId, rightsSettingType,adviserId,bookId,channelId,readType));
return new ResponseDto<>(rightsSettingBiz.getRightsSettingRightsNowItemsByType(rightsSettingId, wechatUserId, rightsSettingType, adviserId, bookId, channelId, readType, currentPage, numPerPage));
}
@ApiOperation("根据权益id获取即享权益项专享礼包")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment