|
|
|
@ -20,6 +20,7 @@ import org.checkerframework.checker.units.qual.A; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.data.redis.core.Cursor; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
@ -42,6 +43,7 @@ public class TiktokImgServiceImpl implements TiktokImgService { |
|
|
|
private RedisService redisService; |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public int insert(TiktokImg tiktokImg) { |
|
|
|
tiktokImg.setCreateTime(new Date()); |
|
|
|
tiktokImg.setUpdateTime(new Date()); |
|
|
|
@ -49,12 +51,14 @@ public class TiktokImgServiceImpl implements TiktokImgService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public int update(TiktokImg tiktokImg) { |
|
|
|
tiktokImg.setUpdateTime(new Date()); |
|
|
|
return tiktokImgMapper.updateById(tiktokImg); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public int delete(List<Long> ids) { |
|
|
|
int delete = tiktokImgMapper.deleteBatchIds(ids); |
|
|
|
LambdaQueryWrapper<TiktokLike> likeWrapper = new LambdaQueryWrapper<>(); |
|
|
|
@ -103,6 +107,7 @@ public class TiktokImgServiceImpl implements TiktokImgService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public int changeStatus(Long id, String status) { |
|
|
|
LambdaUpdateWrapper<TiktokImg> wrapper = new LambdaUpdateWrapper<>(); |
|
|
|
wrapper.eq(TiktokImg::getId, id); |
|
|
|
@ -112,6 +117,7 @@ public class TiktokImgServiceImpl implements TiktokImgService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public int changeJudge(Long id, String status) { |
|
|
|
LambdaUpdateWrapper<TiktokImg> wrapper = new LambdaUpdateWrapper<>(); |
|
|
|
wrapper.eq(TiktokImg::getId, id); |
|
|
|
@ -121,6 +127,7 @@ public class TiktokImgServiceImpl implements TiktokImgService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public int changeHot(Long id, String status) { |
|
|
|
LambdaUpdateWrapper<TiktokImg> wrapper = new LambdaUpdateWrapper<>(); |
|
|
|
wrapper.eq(TiktokImg::getId, id); |
|
|
|
|