|
|
@ -1,6 +1,8 @@ |
|
|
package com.bnyer.img.controller; |
|
|
package com.bnyer.img.controller; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.collection.CollectionUtil; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
|
|
import com.bnyer.common.core.exception.ServiceException; |
|
|
import com.bnyer.common.core.web.controller.BaseController; |
|
|
import com.bnyer.common.core.web.controller.BaseController; |
|
|
import com.bnyer.common.core.web.domain.AjaxResult; |
|
|
import com.bnyer.common.core.web.domain.AjaxResult; |
|
|
import com.bnyer.common.core.web.page.TableDataInfo; |
|
|
import com.bnyer.common.core.web.page.TableDataInfo; |
|
|
@ -8,9 +10,7 @@ import com.bnyer.img.constants.TiktokConstant; |
|
|
import com.bnyer.img.domain.Feedback; |
|
|
import com.bnyer.img.domain.Feedback; |
|
|
import com.bnyer.img.dto.*; |
|
|
import com.bnyer.img.dto.*; |
|
|
import com.bnyer.img.service.*; |
|
|
import com.bnyer.img.service.*; |
|
|
import com.bnyer.img.vo.CreatorTypeImgsVo; |
|
|
import com.bnyer.img.vo.*; |
|
|
import com.bnyer.img.vo.TiktokImgVo; |
|
|
|
|
|
import com.bnyer.img.vo.TypeImgVo; |
|
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
@ -20,6 +20,7 @@ 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.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
@ -98,14 +99,31 @@ public class TiktokMiniController extends BaseController { |
|
|
@PostMapping(value = "/creatorImgsPage") |
|
|
@PostMapping(value = "/creatorImgsPage") |
|
|
public TableDataInfo creatorImgsPage(@RequestBody @ApiParam("分页对象") BasePageDto dto){ |
|
|
public TableDataInfo creatorImgsPage(@RequestBody @ApiParam("分页对象") BasePageDto dto){ |
|
|
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); |
|
|
PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); |
|
|
return getDataTable(creatorService.queryThreeImgCreatorList()); |
|
|
//List<CreatorVo> list = new ArrayList<>();
|
|
|
|
|
|
List<CreatorVo> creatorVos = creatorService.queryThreeImgCreatorList(); |
|
|
|
|
|
// for (CreatorVo creatorVo : creatorVos) {
|
|
|
|
|
|
// if(CollectionUtil.isNotEmpty(creatorVo.getImgList())){
|
|
|
|
|
|
// list.add(creatorVo);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
//TODO 此处图片列表为空时,去除为空的部分分页会有BUG
|
|
|
|
|
|
return getDataTable(creatorVos); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//@TokenCheck
|
|
|
|
|
|
@ApiOperation(value="根据搜索码和分类id查询艺术家图片分页") |
|
|
|
|
|
@PostMapping(value = "/typeImgsPage") |
|
|
|
|
|
public TableDataInfo typeImgsPage(@Validated @RequestBody @ApiParam("搜索码对象") CreatorImgsDetailsDto params){ |
|
|
|
|
|
PageHelper.startPage(params.getPageNum(), params.getPageSize()); |
|
|
|
|
|
List<TiktokImgVo> imgList = tiktokImgService.queryImgsByScanCodeAndTypeId(params.getScanCode(), params.getTypeId()); |
|
|
|
|
|
return getDataTable(imgList); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//@TokenCheck
|
|
|
//@TokenCheck
|
|
|
@ApiOperation(value="根据搜索码查询艺术家图片列表") |
|
|
@ApiOperation(value="根据搜索码查询艺术家详情") |
|
|
@PostMapping(value = "/creatorImgsDetails") |
|
|
@PostMapping(value = "/creatorDetails") |
|
|
public AjaxResult creatorImgsDetails(@Validated @RequestBody @ApiParam("搜索码对象") CreatorImgsDetailsDto params){ |
|
|
public AjaxResult creatorDetails(@Validated @RequestBody @ApiParam("搜索码对象") CreatorDetailsDto params){ |
|
|
CreatorTypeImgsVo creatorVo = creatorService.queryCreatorImgListByScanCode(params.getScanCode()); |
|
|
CreatorDetailsVo creatorVo = creatorService.queryCreatorDetailsByScanCode(params.getScanCode()); |
|
|
if(creatorVo == null){ |
|
|
if(creatorVo == null){ |
|
|
return AjaxResult.error(TiktokConstant.TIKTOK_CREATOR_NOT_EXIST,"该艺术家不存在!"); |
|
|
return AjaxResult.error(TiktokConstant.TIKTOK_CREATOR_NOT_EXIST,"该艺术家不存在!"); |
|
|
} |
|
|
} |
|
|
|