Commit f11adc48 by 桂前礼

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

parent ba02a19b
...@@ -99,7 +99,7 @@ public interface RightsSettingBiz { ...@@ -99,7 +99,7 @@ public interface RightsSettingBiz {
* @Param [rightsSettingId, wechatUserId, type] * @Param [rightsSettingId, wechatUserId, type]
* @return com.pcloud.book.rightsSetting.entity.RightsSetting * @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); RightsSetting getRightsSettingGiftCoupons(Long rightsSettingId, Long wechatUserId, Integer readType);
......
package com.pcloud.book.rightsSetting.entity; package com.pcloud.book.rightsSetting.entity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.pcloud.common.page.PageBeanNew;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import lombok.Data;
@Data @Data
public class RightsSettingTitle implements Serializable { public class RightsSettingTitle implements Serializable {
...@@ -36,6 +37,11 @@ public class RightsSettingTitle implements Serializable { ...@@ -36,6 +37,11 @@ public class RightsSettingTitle implements Serializable {
private String serveType; private String serveType;
/** /**
* 分页
*/
private PageBeanNew<RightsNowItem> rightsSettingItemList4Page;
/**
* 列表 * 列表
*/ */
private List<RightsNowItem> rightsSettingItemList; private List<RightsNowItem> rightsSettingItemList;
......
package com.pcloud.book.rightsSetting.facade; package com.pcloud.book.rightsSetting.facade;
import com.pcloud.book.applet.vo.AppletNewsShowStateVO;
import com.pcloud.book.base.exception.BookBizException; import com.pcloud.book.base.exception.BookBizException;
import com.pcloud.book.rightsSetting.biz.RightsSettingBiz; import com.pcloud.book.rightsSetting.biz.RightsSettingBiz;
import com.pcloud.book.rightsSetting.dto.RightsSettingDto; import com.pcloud.book.rightsSetting.dto.RightsSettingDto;
...@@ -16,8 +15,9 @@ import com.pcloud.common.utils.ListUtils; ...@@ -16,8 +15,9 @@ import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.SessionUtil; import com.pcloud.common.utils.SessionUtil;
import com.pcloud.common.utils.cookie.Cookie; import com.pcloud.common.utils.cookie.Cookie;
import com.pcloud.common.utils.string.StringUtil; import com.pcloud.common.utils.string.StringUtil;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger; import io.swagger.annotations.ApiParam;
import lombok.SneakyThrows;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.CookieValue;
...@@ -29,13 +29,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -29,13 +29,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import javax.validation.constraints.Min; import javax.validation.constraints.Min;
import java.util.List;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.SneakyThrows;
@RequestMapping("rightsSetting") @RequestMapping("rightsSetting")
@RestController("rightsSettingFacede") @RestController("rightsSettingFacede")
...@@ -167,17 +162,20 @@ public class RightsSettingFacede { ...@@ -167,17 +162,20 @@ public class RightsSettingFacede {
@SneakyThrows @SneakyThrows
@ApiOperation("根据权益id和类型获取即享权益项") @ApiOperation("根据权益id和类型获取即享权益项")
@GetMapping("getRightsSettingRightsNowItemsByType") @GetMapping("getRightsSettingRightsNowItemsByType")
public ResponseDto<RightsSetting> getRightsSettingRightsNowItemsByType( @CookieValue("userInfo") String userInfo, public ResponseDto<RightsSetting> getRightsSettingRightsNowItemsByType(@CookieValue("userInfo") String userInfo,
@RequestParam("rightsSettingId") @Min(value = 1, @RequestParam("rightsSettingId") @Min(value = 1,
message = "权益id不能小于1") Long rightsSettingId, message = "权益id不能小于1") Long rightsSettingId,
@RequestParam("rightsSettingType") @Min(value = 1, @RequestParam("rightsSettingType") @Min(value = 1,
message = "权益类型不能小于1") Integer rightsSettingType , message = "权益类型不能小于1") Integer rightsSettingType,
@RequestParam(value = "adviserId",required = false) Long adviserId, @RequestParam(value = "adviserId", required = false) Long adviserId,
@RequestParam(value = "bookId", required = false)Long bookId, @RequestParam(value = "bookId", required = false) Long bookId,
@RequestParam(value = "channelId", required = false)Long channelId, @RequestParam(value = "channelId", required = false) Long channelId,
@RequestParam(value = "readType",required = false)@ApiParam("阅读方式1轻松2高效3深度") Integer readType) { @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); 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获取即享权益项专享礼包") @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