20 changed files with 494 additions and 18 deletions
@ -0,0 +1,21 @@ |
|||
package com.bnyer.img.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
@Getter |
|||
@Setter |
|||
@ApiModel("banner响应类") |
|||
public class BannerDto implements Serializable { |
|||
|
|||
@ApiModelProperty(value="banner名称") |
|||
private String bannerName; |
|||
|
|||
@ApiModelProperty(value="平台渠道") |
|||
private String source; |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
package com.bnyer.img.dto; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableField; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.*; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
@Getter |
|||
@Setter |
|||
@ApiModel("抖音图片响应类") |
|||
public class TiktokImgDto implements Serializable { |
|||
|
|||
@ApiModelProperty(value="用户id") |
|||
private Long userId; |
|||
|
|||
@ApiModelProperty(value="分类id") |
|||
private Long typeId; |
|||
|
|||
@ApiModelProperty(value="状态(0->待审核;1->审核通过;2->审核拒绝)") |
|||
private String status; |
|||
|
|||
@ApiModelProperty(value="是否热门(0->冷门;1->热门)") |
|||
private String isHot; |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
package com.bnyer.img.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
@Getter |
|||
@Setter |
|||
@ApiModel("抖音用户响应类") |
|||
public class TiktokUserDto implements Serializable { |
|||
|
|||
@ApiModelProperty(value="用户昵称") |
|||
private String username; |
|||
|
|||
@ApiModelProperty(value="抖音号") |
|||
private String tiktokNumber; |
|||
|
|||
@ApiModelProperty(value="手机号") |
|||
private String phone; |
|||
|
|||
@ApiModelProperty(value="搜索码") |
|||
private String scanCode; |
|||
|
|||
@ApiModelProperty(value="邀请码") |
|||
private String inviteCode; |
|||
|
|||
@ApiModelProperty(value="是否活跃(0->不活跃;1->活跃 连续10天以上更新内容)") |
|||
private String isHot; |
|||
} |
|||
@ -1,4 +1,30 @@ |
|||
package com.bnyer.img.service; |
|||
|
|||
import com.bnyer.img.domain.TiktokCollection; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface TiktokCollectionService { |
|||
|
|||
/** |
|||
* 新增收藏 |
|||
* @param tiktokCollection 收藏对象 |
|||
* @return - |
|||
*/ |
|||
int insert(TiktokCollection tiktokCollection); |
|||
|
|||
/** |
|||
* 修改收藏 |
|||
* @param tiktokCollection 收藏对象 |
|||
* @return - |
|||
*/ |
|||
int update(TiktokCollection tiktokCollection); |
|||
|
|||
/** |
|||
* 批量删除收藏 |
|||
* @param ids 主键ids |
|||
* @return - |
|||
*/ |
|||
int delete(List<Long> ids); |
|||
|
|||
} |
|||
|
|||
@ -1,4 +1,56 @@ |
|||
package com.bnyer.img.service; |
|||
|
|||
import com.bnyer.img.domain.TiktokImg; |
|||
import com.bnyer.img.dto.TiktokImgDto; |
|||
import com.bnyer.img.vo.TiktokImgVo; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface TiktokImgService { |
|||
|
|||
/** |
|||
* 新增图片 |
|||
* @param tiktokImg 图片 |
|||
* @return - |
|||
*/ |
|||
int insert(TiktokImg tiktokImg); |
|||
|
|||
/** |
|||
* 修改图片 |
|||
* @param tiktokImg 图片 |
|||
* @return - |
|||
*/ |
|||
int update(TiktokImg tiktokImg); |
|||
|
|||
/** |
|||
* 批量删除ids |
|||
* @param ids 主键ids |
|||
* @return - |
|||
*/ |
|||
int delete(List<Long> ids); |
|||
|
|||
/** |
|||
* 查询抖音图片分页 |
|||
* @param dto 分页参数对象 |
|||
* @return - |
|||
*/ |
|||
List<TiktokImg> queryPage(TiktokImgDto dto); |
|||
|
|||
/** |
|||
* 查询指定用户对内的图片集合(待审核、通过审核的) |
|||
* @param userId 用户id |
|||
* @param typeId 分类id |
|||
* @return - |
|||
*/ |
|||
List<TiktokImgVo> queryInList(String userId,String typeId); |
|||
|
|||
/** |
|||
* 查询指定用户对外的图片集合(通过审核的) |
|||
* @param userId 用户id |
|||
* @param typeId 分类id |
|||
* @return - |
|||
*/ |
|||
List<TiktokImgVo> queryOutList(String userId,String typeId); |
|||
|
|||
|
|||
} |
|||
|
|||
@ -1,4 +1,44 @@ |
|||
package com.bnyer.img.service; |
|||
|
|||
import com.bnyer.img.domain.TiktokUser; |
|||
import com.bnyer.img.dto.TiktokUserDto; |
|||
import com.bnyer.img.vo.TiktokUserVo; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface TiktokUserService { |
|||
|
|||
/** |
|||
* 新增抖音用户 |
|||
* @param tiktokUser 抖音用户 |
|||
* @return - |
|||
*/ |
|||
int insert(TiktokUser tiktokUser); |
|||
|
|||
/** |
|||
* 修改抖音用户 |
|||
* @param tiktokUser 抖音用户 |
|||
* @return - |
|||
*/ |
|||
int update(TiktokUser tiktokUser); |
|||
|
|||
/** |
|||
* 【批量删除抖音用户 |
|||
* @param ids 主键Ids |
|||
* @return - |
|||
*/ |
|||
int delete(List<Long> ids); |
|||
|
|||
/** |
|||
* 查询抖音用户分页 |
|||
* @param dto 分页条件对象 |
|||
* @return - |
|||
*/ |
|||
List<TiktokUser> queryPage(TiktokUserDto dto); |
|||
|
|||
/** |
|||
* 查询小程序端用户图片列表 |
|||
* @return - |
|||
*/ |
|||
List<TiktokUserVo> queryUserList(); |
|||
} |
|||
|
|||
@ -1,10 +1,55 @@ |
|||
package com.bnyer.img.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.bnyer.common.core.utils.StringUtils; |
|||
import com.bnyer.img.domain.Banner; |
|||
import com.bnyer.img.dto.BannerDto; |
|||
import com.bnyer.img.mapper.BannerMapper; |
|||
import com.bnyer.img.service.BannerService; |
|||
import com.bnyer.img.vo.BannerVo; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Service |
|||
@Slf4j |
|||
public class BannerServiceImpl implements BannerService { |
|||
|
|||
@Autowired |
|||
private BannerMapper bannerMapper; |
|||
|
|||
@Override |
|||
public int insert(Banner banner) { |
|||
banner.setCreateTime(new Date()); |
|||
banner.setUpdateTime(new Date()); |
|||
return bannerMapper.insert(banner); |
|||
} |
|||
|
|||
@Override |
|||
public int update(Banner banner) { |
|||
banner.setUpdateTime(new Date()); |
|||
return bannerMapper.updateById(banner); |
|||
} |
|||
|
|||
@Override |
|||
public int delete(List<Long> ids) { |
|||
return bannerMapper.deleteBatchIds(ids); |
|||
} |
|||
|
|||
@Override |
|||
public List<Banner> queryPage(BannerDto dto) { |
|||
LambdaQueryWrapper<Banner> wrapper = new LambdaQueryWrapper<>(); |
|||
wrapper.like(StringUtils.isNotNull(dto.getBannerName()), Banner::getBannerName,dto.getBannerName()); |
|||
wrapper.eq(StringUtils.isNotNull(dto.getSource()), Banner::getSource, dto.getSource()); |
|||
wrapper.orderByDesc(Banner::getSort); |
|||
return bannerMapper.selectList(wrapper); |
|||
} |
|||
|
|||
@Override |
|||
public List<BannerVo> queryList(String source) { |
|||
return bannerMapper.queryList(source); |
|||
} |
|||
} |
|||
|
|||
@ -1,10 +1,37 @@ |
|||
package com.bnyer.img.service.impl; |
|||
|
|||
import com.bnyer.img.domain.TiktokCollection; |
|||
import com.bnyer.img.mapper.TiktokCollectionMapper; |
|||
import com.bnyer.img.service.TiktokCollectionService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Service |
|||
@Slf4j |
|||
public class TiktokCollectionServiceImpl implements TiktokCollectionService { |
|||
|
|||
@Autowired |
|||
private TiktokCollectionMapper tiktokCollectionMapper; |
|||
|
|||
@Override |
|||
public int insert(TiktokCollection tiktokCollection) { |
|||
tiktokCollection.setCreateTime(new Date()); |
|||
tiktokCollection.setUpdateTime(new Date()); |
|||
return tiktokCollectionMapper.insert(tiktokCollection); |
|||
} |
|||
|
|||
@Override |
|||
public int update(TiktokCollection tiktokCollection) { |
|||
tiktokCollection.setUpdateTime(new Date()); |
|||
return tiktokCollectionMapper.updateById(tiktokCollection); |
|||
} |
|||
|
|||
@Override |
|||
public int delete(List<Long> ids) { |
|||
return tiktokCollectionMapper.deleteBatchIds(ids); |
|||
} |
|||
} |
|||
|
|||
@ -1,10 +1,62 @@ |
|||
package com.bnyer.img.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.bnyer.common.core.utils.StringUtils; |
|||
import com.bnyer.img.domain.TiktokImg; |
|||
import com.bnyer.img.dto.TiktokImgDto; |
|||
import com.bnyer.img.mapper.TiktokImgMapper; |
|||
import com.bnyer.img.service.TiktokImgService; |
|||
import com.bnyer.img.vo.TiktokImgVo; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Service |
|||
@Slf4j |
|||
public class TiktokImgServiceImpl implements TiktokImgService { |
|||
|
|||
@Autowired |
|||
private TiktokImgMapper tiktokImgMapper; |
|||
|
|||
@Override |
|||
public int insert(TiktokImg tiktokImg) { |
|||
tiktokImg.setCreateTime(new Date()); |
|||
tiktokImg.setUpdateTime(new Date()); |
|||
return tiktokImgMapper.insert(tiktokImg); |
|||
} |
|||
|
|||
@Override |
|||
public int update(TiktokImg tiktokImg) { |
|||
tiktokImg.setUpdateTime(new Date()); |
|||
return tiktokImgMapper.updateById(tiktokImg); |
|||
} |
|||
|
|||
@Override |
|||
public int delete(List<Long> ids) { |
|||
return tiktokImgMapper.deleteBatchIds(ids); |
|||
} |
|||
|
|||
@Override |
|||
public List<TiktokImg> queryPage(TiktokImgDto dto) { |
|||
LambdaQueryWrapper<TiktokImg> wrapper = new LambdaQueryWrapper<>(); |
|||
wrapper.eq(dto.getUserId() != null, TiktokImg::getUserId, dto.getUserId()); |
|||
wrapper.eq(dto.getTypeId() != null, TiktokImg::getTypeId, dto.getTypeId()); |
|||
wrapper.eq(StringUtils.isNotNull(dto.getStatus()), TiktokImg::getStatus, dto.getStatus()); |
|||
wrapper.eq(StringUtils.isNotNull(dto.getIsHot()), TiktokImg::getIsHot, dto.getIsHot()); |
|||
wrapper.orderByDesc(TiktokImg::getSort); |
|||
return tiktokImgMapper.selectList(wrapper); |
|||
} |
|||
|
|||
@Override |
|||
public List<TiktokImgVo> queryInList(String userId, String typeId) { |
|||
return tiktokImgMapper.queryInList(userId,typeId); |
|||
} |
|||
|
|||
@Override |
|||
public List<TiktokImgVo> queryOutList(String userId, String typeId) { |
|||
return tiktokImgMapper.queryOutList(userId,typeId); |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,44 @@ |
|||
package com.bnyer.img.vo; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
@Getter |
|||
@Setter |
|||
@ApiModel("抖音图片响应类") |
|||
public class TiktokImgVo implements Serializable { |
|||
|
|||
@ApiModelProperty(value="id") |
|||
private Long id; |
|||
|
|||
@ApiModelProperty(value="图片地址") |
|||
private String imgUrl; |
|||
|
|||
@ApiModelProperty(value="用户id") |
|||
private Long userId; |
|||
|
|||
@ApiModelProperty(value="分类id") |
|||
private Long typeId; |
|||
|
|||
@ApiModelProperty(value="下载量") |
|||
private Integer downloadNum; |
|||
|
|||
@ApiModelProperty(value="点赞量") |
|||
private Integer greatNum; |
|||
|
|||
@ApiModelProperty(value="收藏量") |
|||
private Integer collectionNum; |
|||
|
|||
@ApiModelProperty(value="状态(0->待审核;1->审核通过)") |
|||
private String status; |
|||
|
|||
@ApiModelProperty(value="是否热门(0->冷门;1->热门)") |
|||
private String isHot; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
} |
|||
@ -0,0 +1,48 @@ |
|||
package com.bnyer.img.vo; |
|||
|
|||
import com.bnyer.img.domain.TiktokImg; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Getter; |
|||
import lombok.Setter; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
|
|||
@Getter |
|||
@Setter |
|||
@ApiModel("抖音用户响应类") |
|||
public class TiktokUserVo implements Serializable { |
|||
|
|||
@ApiModelProperty(value="id") |
|||
private Long id; |
|||
|
|||
@ApiModelProperty(value="用户昵称") |
|||
private String username; |
|||
|
|||
@ApiModelProperty(value="抖音id") |
|||
private String tiktokCode; |
|||
|
|||
@ApiModelProperty(value="抖音号") |
|||
private String tiktokNumber; |
|||
|
|||
@ApiModelProperty(value="手机号") |
|||
private String phone; |
|||
|
|||
@ApiModelProperty(value="搜索码") |
|||
private String scanCode; |
|||
|
|||
@ApiModelProperty(value="邀请码") |
|||
private String inviteCode; |
|||
|
|||
@ApiModelProperty(value="头像img地址") |
|||
private String img; |
|||
|
|||
@ApiModelProperty(value="是否活跃(0->不活跃;1->活跃 连续10天以上更新内容)") |
|||
private String isHot; |
|||
|
|||
List<TiktokImg> imgList; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
} |
|||
Loading…
Reference in new issue