|
|
@ -6,13 +6,10 @@ import com.bnyer.common.core.web.domain.AjaxResult; |
|
|
import com.bnyer.common.core.web.page.TableDataInfo; |
|
|
import com.bnyer.common.core.web.page.TableDataInfo; |
|
|
import com.bnyer.img.constants.TiktokConstant; |
|
|
import com.bnyer.img.constants.TiktokConstant; |
|
|
import com.bnyer.img.domain.Feedback; |
|
|
import com.bnyer.img.domain.Feedback; |
|
|
import com.bnyer.img.domain.TiktokImg; |
|
|
|
|
|
import com.bnyer.img.dto.*; |
|
|
import com.bnyer.img.dto.*; |
|
|
import com.bnyer.img.service.*; |
|
|
import com.bnyer.img.service.*; |
|
|
import com.bnyer.img.service.TiktokLikeService; |
|
|
|
|
|
import com.bnyer.img.vo.CreatorVo; |
|
|
import com.bnyer.img.vo.CreatorVo; |
|
|
import com.bnyer.img.vo.TiktokImgVo; |
|
|
import com.bnyer.img.vo.TiktokImgVo; |
|
|
import com.bnyer.img.vo.TiktokUserVo; |
|
|
|
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.Api; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiParam; |
|
|
import io.swagger.annotations.ApiParam; |
|
|
@ -63,7 +60,7 @@ public class TiktokMiniController extends BaseController { |
|
|
@ApiOperation(value="新增feedback") |
|
|
@ApiOperation(value="新增feedback") |
|
|
@PostMapping(value = "/insertFeedback") |
|
|
@PostMapping(value = "/insertFeedback") |
|
|
public AjaxResult insertFeedback(@Validated @RequestBody @ApiParam("feedback对象") FeedBackDto dto){ |
|
|
public AjaxResult insertFeedback(@Validated @RequestBody @ApiParam("feedback对象") FeedBackDto dto){ |
|
|
log.info("新增feedback参数为:{}", JSON.toJSONString(dto)); |
|
|
log.info("【抖音图文小程序】新增反馈参数为:{}", JSON.toJSONString(dto)); |
|
|
Feedback feedback = dto.extractParam(); |
|
|
Feedback feedback = dto.extractParam(); |
|
|
feedback.setSource("0"); |
|
|
feedback.setSource("0"); |
|
|
return AjaxResult.success(feedBackService.insert(feedback)); |
|
|
return AjaxResult.success(feedBackService.insert(feedback)); |
|
|
@ -77,56 +74,21 @@ public class TiktokMiniController extends BaseController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//@TokenCheck
|
|
|
//@TokenCheck
|
|
|
@ApiOperation(value="新增TiktokImg") |
|
|
@ApiOperation(value="查询指定艺术家图片集合") |
|
|
@PostMapping(value = "/insertTiktokImg") |
|
|
|
|
|
public AjaxResult insertTiktokImg(@Validated @RequestBody @ApiParam("TiktokImg对象") TiktokImgMiniDto dto){ |
|
|
|
|
|
log.info("抖音小程序端用户【{}】新增TiktokImg参数为:{}",dto.getCreatorId(),JSON.toJSONString(dto)); |
|
|
|
|
|
TiktokImg tiktokImg = dto.extractParam(); |
|
|
|
|
|
tiktokImg.setStatus("0"); |
|
|
|
|
|
return AjaxResult.success(tiktokImgService.insert(tiktokImg)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//@TokenCheck
|
|
|
|
|
|
@ApiOperation(value="修改TiktokImg") |
|
|
|
|
|
@PostMapping(value = "/updateTiktokImg") |
|
|
|
|
|
public AjaxResult updateTiktokImg(@Validated @RequestBody @ApiParam("TiktokImg对象") TiktokImgMiniDto dto){ |
|
|
|
|
|
log.info("抖音小程序端用户【{}】修改TiktokImg参数为:{}",dto.getCreatorId(), JSON.toJSONString(dto)); |
|
|
|
|
|
TiktokImg tiktokImg = dto.extractParam(); |
|
|
|
|
|
tiktokImg.setStatus("0"); |
|
|
|
|
|
return AjaxResult.success(tiktokImgService.update(dto.extractParam())); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//@TokenCheck
|
|
|
|
|
|
@ApiOperation(value="删除TiktokImg") |
|
|
|
|
|
@GetMapping(value = "/deleteTiktokImg/{ids}") |
|
|
|
|
|
public AjaxResult deleteTiktokImg(@PathVariable @ApiParam("主键ids") List<Long> ids){ |
|
|
|
|
|
log.info("抖音小程序端删除TiktokImg参数为:{}", ids); |
|
|
|
|
|
return AjaxResult.success(tiktokImgService.delete(ids)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//@TokenCheck
|
|
|
|
|
|
@ApiOperation(value="查询指定用户对内的图片集合") |
|
|
|
|
|
@PostMapping(value = "/listTiktokImgIn") |
|
|
|
|
|
public AjaxResult listTiktokImgIn(@Validated @RequestBody @ApiParam("TiktokImg对象") TiktokImgListMiniDto dto){ |
|
|
|
|
|
return AjaxResult.success(tiktokImgService.queryInList(dto.getUserId(),dto.getTypeId())); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//@TokenCheck
|
|
|
|
|
|
@ApiOperation(value="查询指定用户对外的图片集合") |
|
|
|
|
|
@PostMapping(value = "/listTiktokImgOut") |
|
|
@PostMapping(value = "/listTiktokImgOut") |
|
|
public AjaxResult listTiktokImgOut(@Validated @RequestBody @ApiParam("TiktokImg对象") TiktokImgListMiniDto dto){ |
|
|
public AjaxResult listTiktokImgOut(@Validated @RequestBody @ApiParam("TiktokImg对象") TiktokImgListMiniDto dto){ |
|
|
return AjaxResult.success(tiktokImgService.queryOutList(dto.getUserId(),dto.getTypeId())); |
|
|
return AjaxResult.success(tiktokImgService.queryOutList(dto.getCreatorId(),dto.getTypeId())); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//@TokenCheck
|
|
|
//@TokenCheck
|
|
|
@ApiOperation(value="查询小程序审核通过图片详情") |
|
|
@ApiOperation(value="查询图片详情") |
|
|
@GetMapping(value = "/detailsTiktokImg/{id}") |
|
|
@GetMapping(value = "/detailsTiktokImg/{id}") |
|
|
public AjaxResult detailsTiktokImg(@ApiParam("图片id") @PathVariable Long id){ |
|
|
public AjaxResult detailsTiktokImg(@ApiParam("图片id") @PathVariable Long id){ |
|
|
return AjaxResult.success(tiktokImgService.queryImgDetails(String.valueOf(id))); |
|
|
return AjaxResult.success(tiktokImgService.queryImgDetails(String.valueOf(id))); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//@TokenCheck
|
|
|
//@TokenCheck
|
|
|
@ApiOperation(value="查询艺术家图片列表") |
|
|
@ApiOperation(value="艺术家界面查询艺术家图片列表") |
|
|
@GetMapping(value = "/creatorImgs") |
|
|
@GetMapping(value = "/creatorImgs") |
|
|
public AjaxResult creatorImgs(){ |
|
|
public AjaxResult creatorImgs(){ |
|
|
return AjaxResult.success(creatorService.queryThreeImgCreatorList()); |
|
|
return AjaxResult.success(creatorService.queryThreeImgCreatorList()); |
|
|
@ -136,7 +98,6 @@ public class TiktokMiniController extends BaseController { |
|
|
@ApiOperation(value="根据搜索码查询艺术家图片列表") |
|
|
@ApiOperation(value="根据搜索码查询艺术家图片列表") |
|
|
@PostMapping(value = "/creatorImgsDetails") |
|
|
@PostMapping(value = "/creatorImgsDetails") |
|
|
public AjaxResult creatorImgsDetails(@Validated @RequestBody @ApiParam("搜索码对象") CreatorImgsDetailsDto params){ |
|
|
public AjaxResult creatorImgsDetails(@Validated @RequestBody @ApiParam("搜索码对象") CreatorImgsDetailsDto params){ |
|
|
log.info("根据搜索码查询艺术家图片列表参数为:{}", params.getScanCode()); |
|
|
|
|
|
CreatorVo creatorVo = creatorService.queryCreatorImgListByScanCode(params.getScanCode()); |
|
|
CreatorVo creatorVo = creatorService.queryCreatorImgListByScanCode(params.getScanCode()); |
|
|
if(creatorVo == null){ |
|
|
if(creatorVo == null){ |
|
|
return AjaxResult.error(TiktokConstant.TIKTOK_CREATOR_NOT_EXIST,"该艺术家不存在!"); |
|
|
return AjaxResult.error(TiktokConstant.TIKTOK_CREATOR_NOT_EXIST,"该艺术家不存在!"); |
|
|
@ -148,8 +109,8 @@ public class TiktokMiniController extends BaseController { |
|
|
@ApiOperation(value="收藏") |
|
|
@ApiOperation(value="收藏") |
|
|
@PostMapping(value = "/tiktokCollect") |
|
|
@PostMapping(value = "/tiktokCollect") |
|
|
public AjaxResult tiktokCollect(@Validated @RequestBody @ApiParam("收藏对象") CollectionDto dto){ |
|
|
public AjaxResult tiktokCollect(@Validated @RequestBody @ApiParam("收藏对象") CollectionDto dto){ |
|
|
log.info("收藏参数为:{}", JSON.toJSONString(dto)); |
|
|
|
|
|
tiktokCollectionService.collect(dto.getUserId(),dto.getImgId()); |
|
|
tiktokCollectionService.collect(dto.getUserId(),dto.getImgId()); |
|
|
|
|
|
log.info("【抖音图文小程序】用户【{}】收藏了图片【{}】",dto.getUserId(),dto.getImgId()); |
|
|
return AjaxResult.success(); |
|
|
return AjaxResult.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -157,8 +118,8 @@ public class TiktokMiniController extends BaseController { |
|
|
@ApiOperation(value="取消收藏") |
|
|
@ApiOperation(value="取消收藏") |
|
|
@PostMapping(value = "/tiktokUnCollect") |
|
|
@PostMapping(value = "/tiktokUnCollect") |
|
|
public AjaxResult tiktokUnCollect(@Validated @RequestBody @ApiParam("收藏对象") CollectionDto dto){ |
|
|
public AjaxResult tiktokUnCollect(@Validated @RequestBody @ApiParam("收藏对象") CollectionDto dto){ |
|
|
log.info("取消收藏参数为:{}", JSON.toJSONString(dto)); |
|
|
|
|
|
tiktokCollectionService.unCollect(dto.getUserId(),dto.getImgId()); |
|
|
tiktokCollectionService.unCollect(dto.getUserId(),dto.getImgId()); |
|
|
|
|
|
log.info("【抖音图文小程序】用户【{}】取消收藏了图片【{}】",dto.getUserId(),dto.getImgId()); |
|
|
return AjaxResult.success(); |
|
|
return AjaxResult.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -166,7 +127,7 @@ public class TiktokMiniController extends BaseController { |
|
|
@ApiOperation(value="查询是否收藏过") |
|
|
@ApiOperation(value="查询是否收藏过") |
|
|
@PostMapping(value = "/judgeTiktokCollect") |
|
|
@PostMapping(value = "/judgeTiktokCollect") |
|
|
public AjaxResult judgeTiktokCollect(@Validated @RequestBody @ApiParam("收藏对象") CollectionDto dto){ |
|
|
public AjaxResult judgeTiktokCollect(@Validated @RequestBody @ApiParam("收藏对象") CollectionDto dto){ |
|
|
log.info("查询是否收藏过参数为:{}", JSON.toJSONString(dto)); |
|
|
log.info("【抖音图文小程序】查询是否收藏过参数为:{}", JSON.toJSONString(dto)); |
|
|
return AjaxResult.success(tiktokCollectionService.judgeCollect(dto.getUserId(),dto.getImgId())); |
|
|
return AjaxResult.success(tiktokCollectionService.judgeCollect(dto.getUserId(),dto.getImgId())); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -174,7 +135,7 @@ public class TiktokMiniController extends BaseController { |
|
|
@ApiOperation(value="查看用户收藏列表") |
|
|
@ApiOperation(value="查看用户收藏列表") |
|
|
@PostMapping(value = "/listTiktokCollection") |
|
|
@PostMapping(value = "/listTiktokCollection") |
|
|
public AjaxResult listTiktokCollection(@Validated @RequestBody @ApiParam("用户收藏对象") CollectionUserDto dto){ |
|
|
public AjaxResult listTiktokCollection(@Validated @RequestBody @ApiParam("用户收藏对象") CollectionUserDto dto){ |
|
|
log.info("查看用户收藏列表参数为:{}", JSON.toJSONString(dto)); |
|
|
log.info("【抖音图文小程序】查看用户【{}】收藏列表", dto.getUserId()); |
|
|
return AjaxResult.success(tiktokCollectionService.getCollectionByUserId(dto.getUserId())); |
|
|
return AjaxResult.success(tiktokCollectionService.getCollectionByUserId(dto.getUserId())); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -182,8 +143,8 @@ public class TiktokMiniController extends BaseController { |
|
|
@ApiOperation(value="点赞") |
|
|
@ApiOperation(value="点赞") |
|
|
@PostMapping(value = "/tiktokLike") |
|
|
@PostMapping(value = "/tiktokLike") |
|
|
public AjaxResult tiktokLike(@Validated @RequestBody @ApiParam("点赞对象") CollectionDto dto){ |
|
|
public AjaxResult tiktokLike(@Validated @RequestBody @ApiParam("点赞对象") CollectionDto dto){ |
|
|
log.info("点赞参数为:{}", JSON.toJSONString(dto)); |
|
|
|
|
|
tiktokLikeService.like(dto.getUserId(),dto.getImgId()); |
|
|
tiktokLikeService.like(dto.getUserId(),dto.getImgId()); |
|
|
|
|
|
log.info("【抖音图文小程序】用户【{}】点赞了图片【{}】",dto.getUserId(),dto.getImgId()); |
|
|
return AjaxResult.success(); |
|
|
return AjaxResult.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -191,8 +152,8 @@ public class TiktokMiniController extends BaseController { |
|
|
@ApiOperation(value="取消点赞") |
|
|
@ApiOperation(value="取消点赞") |
|
|
@PostMapping(value = "/tiktokUnLike") |
|
|
@PostMapping(value = "/tiktokUnLike") |
|
|
public AjaxResult tiktokUnLike(@Validated @RequestBody @ApiParam("点赞对象") CollectionDto dto){ |
|
|
public AjaxResult tiktokUnLike(@Validated @RequestBody @ApiParam("点赞对象") CollectionDto dto){ |
|
|
log.info("取消点赞参数为:{}", JSON.toJSONString(dto)); |
|
|
|
|
|
tiktokLikeService.unLike(dto.getUserId(),dto.getImgId()); |
|
|
tiktokLikeService.unLike(dto.getUserId(),dto.getImgId()); |
|
|
|
|
|
log.info("【抖音图文小程序】用户【{}】取消点赞了图片【{}】",dto.getUserId(),dto.getImgId()); |
|
|
return AjaxResult.success(); |
|
|
return AjaxResult.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -200,32 +161,23 @@ public class TiktokMiniController extends BaseController { |
|
|
@ApiOperation(value="查询是否点赞过") |
|
|
@ApiOperation(value="查询是否点赞过") |
|
|
@PostMapping(value = "/judgeTiktokLike") |
|
|
@PostMapping(value = "/judgeTiktokLike") |
|
|
public AjaxResult judgeTiktokLike(@Validated @RequestBody @ApiParam("点赞对象") CollectionDto dto){ |
|
|
public AjaxResult judgeTiktokLike(@Validated @RequestBody @ApiParam("点赞对象") CollectionDto dto){ |
|
|
log.info("查询是否点赞过参数为:{}", JSON.toJSONString(dto)); |
|
|
log.info("【抖音图文小程序】查询是否点赞过参数为:{}", JSON.toJSONString(dto)); |
|
|
return AjaxResult.success(tiktokLikeService.judgeLike(dto.getUserId(),dto.getImgId())); |
|
|
return AjaxResult.success(tiktokLikeService.judgeLike(dto.getUserId(),dto.getImgId())); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value="用户登录") |
|
|
@ApiOperation(value="用户登录") |
|
|
@PostMapping(value = "/loginTiktok") |
|
|
@PostMapping(value = "/loginTiktok") |
|
|
public AjaxResult loginTiktok(@Validated @RequestBody @ApiParam("登录对象") TiktokLoginDto dto){ |
|
|
public AjaxResult loginTiktok(@Validated @RequestBody @ApiParam("登录对象") TiktokLoginDto dto){ |
|
|
log.info("用户登录参数为:{}", JSON.toJSONString(dto)); |
|
|
log.info("【抖音图文小程序】用户【{}】授权登录了", dto.getCode()); |
|
|
return AjaxResult.success(tiktokUserService.login(dto)); |
|
|
return AjaxResult.success(tiktokUserService.login(dto)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//@TokenCheck
|
|
|
//@TokenCheck
|
|
|
@ApiOperation(value="查询小程序首页图片列表") |
|
|
@ApiOperation(value="查询首页图片列表") |
|
|
@PostMapping(value = "/imgLists") |
|
|
@PostMapping(value = "/imgLists") |
|
|
public TableDataInfo imgLists(){ |
|
|
public TableDataInfo imgLists(){ |
|
|
startPage(); |
|
|
startPage(); |
|
|
List<TiktokImgVo> tiktokImgVos = tiktokImgService.queryFrontPage(); |
|
|
List<TiktokImgVo> tiktokImgVos = tiktokImgService.queryFrontPage(); |
|
|
return getDataTable(tiktokImgVos); |
|
|
return getDataTable(tiktokImgVos); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//@TokenCheck
|
|
|
|
|
|
@ApiOperation(value="成为艺术家") |
|
|
|
|
|
@PostMapping(value = "/insertCreator") |
|
|
|
|
|
public AjaxResult insertCreator(@Validated @RequestBody @ApiParam("艺术家对象") CreatorDto dto){ |
|
|
|
|
|
log.info("成为艺术家参数为:{}", JSON.toJSONString(dto)); |
|
|
|
|
|
return AjaxResult.success(creatorService.insertCreator(dto)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|