|
@@ -11,6 +11,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -261,13 +262,20 @@ public class ProductPageApi {
|
|
@ApiImplicitParam(required = false, name = "pageSize", value = "每页数量")
|
|
@ApiImplicitParam(required = false, name = "pageSize", value = "每页数量")
|
|
})
|
|
})
|
|
@GetMapping("/product/archive")
|
|
@GetMapping("/product/archive")
|
|
- public ResponseJson<PaginationVo<ArchiveVo>> getProductArchive(String keyword, Integer productType, Integer pageNum, Integer pageSize) {
|
|
|
|
|
|
+ public ResponseJson<PaginationVo<ArchiveVo>> getProductArchive(String keyword, Integer productType,
|
|
|
|
+ @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
|
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
|
|
return pageService.getProductArchive(keyword, productType, pageNum, pageSize);
|
|
return pageService.getProductArchive(keyword, productType, pageNum, pageSize);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 商品资料详情
|
|
* 商品资料详情
|
|
*/
|
|
*/
|
|
|
|
+ @ApiOperation("商品资料详情")
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(required = false, name = "archiveId", value = "资料id"),
|
|
|
|
+ @ApiImplicitParam(required = false, name = "userId", value = "用户id"),
|
|
|
|
+ })
|
|
@GetMapping("/product/archive/detail")
|
|
@GetMapping("/product/archive/detail")
|
|
public ResponseJson<ArchiveDetailVo> getArchiveDetail(Integer archiveId, Integer userId) {
|
|
public ResponseJson<ArchiveDetailVo> getArchiveDetail(Integer archiveId, Integer userId) {
|
|
if (null == archiveId || null == userId) {
|
|
if (null == archiveId || null == userId) {
|
|
@@ -278,9 +286,24 @@ public class ProductPageApi {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 超级会员优惠商品页面
|
|
* 超级会员优惠商品页面
|
|
|
|
+ * @param userId 用户id
|
|
|
|
+ * @param source 来源 : 1 网站 ; 2 小程序
|
|
|
|
+ * @return
|
|
*/
|
|
*/
|
|
|
|
+ @ApiOperation("商品资料详情")
|
|
|
|
+ @ApiImplicitParams({
|
|
|
|
+ @ApiImplicitParam(required = false, name = "userId", value = "用户id"),
|
|
|
|
+ @ApiImplicitParam(required = false, name = "source", value = "来源 : 1 网站 ; 2 小程序"),
|
|
|
|
+ @ApiImplicitParam(required = false, name = "pageNum", value = "页码"),
|
|
|
|
+ @ApiImplicitParam(required = false, name = "pageSize", value = "每页数量")
|
|
|
|
+ })
|
|
@GetMapping("/svip/product/page")
|
|
@GetMapping("/svip/product/page")
|
|
- public ResponseJson<Map<String,Object>> getSvipProductPage(){
|
|
|
|
- return null;
|
|
|
|
|
|
+ public ResponseJson<Map<String, Object>> getSvipProductPage(Integer userId, Integer source,
|
|
|
|
+ @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
|
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
|
|
|
|
+ if (null == userId || source == null) {
|
|
|
|
+ return ResponseJson.error("参数错误", null);
|
|
|
|
+ }
|
|
|
|
+ return pageService.getSvipProductPage(userId, source, pageNum, pageSize);
|
|
}
|
|
}
|
|
}
|
|
}
|