|
@@ -47,10 +47,7 @@ import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
import org.springframework.util.Assert;
|
|
import org.springframework.util.Assert;
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -835,6 +832,17 @@ public class AuthServiceImpl implements AuthService {
|
|
// response.sendRedirect(code);
|
|
// response.sendRedirect(code);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 清除抖音授权token缓存
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/clean/douyin/redis")
|
|
|
|
+ public ResponseJson cleanDYRedis(){
|
|
|
|
+ redisService.remove("DYaccessToken");
|
|
|
|
+ redisService.remove("DyrefreshToken");
|
|
|
|
+ redisService.remove("DyopenId");
|
|
|
|
+ return ResponseJson.success();
|
|
|
|
+ }
|
|
/**
|
|
/**
|
|
* 根据用户的code值获取AcessToken
|
|
* 根据用户的code值获取AcessToken
|
|
* ccode 用户授权登录code
|
|
* ccode 用户授权登录code
|
|
@@ -1357,10 +1365,15 @@ public class AuthServiceImpl implements AuthService {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public ResponseJson<PageInfo<ChallengeRoundVo>> getPublishedVideo(String mobile,String authParty,Integer status,Integer cursor,Integer count,Integer authUserId,Integer pageNum,Integer pageSize){
|
|
|
|
|
|
+ public ResponseJson<PageInfo<ChallengeRoundVo>> getPublishedVideo(String mobile,String authParty,Integer status,Integer cursor,Integer count,Integer authUserId,Integer pageNum,Integer pageSize,String startTIme,String endTime){
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
PageHelper.startPage(pageNum, pageSize);
|
|
|
|
+ List<ChallengeRoundVo> listChallengeRoundVo=null;
|
|
ChallengeActivityVo activityTime = authMapper.getActivityTime(authUserId);
|
|
ChallengeActivityVo activityTime = authMapper.getActivityTime(authUserId);
|
|
- List<ChallengeRoundVo> listChallengeRoundVo=authMapper.getPublishedVideo(mobile,authParty,status,authUserId,activityTime.getStartTime(),activityTime.getEndTime());
|
|
|
|
|
|
+ if(StringUtils.isNotEmpty(startTIme)&&StringUtils.isNotEmpty(endTime)){
|
|
|
|
+ listChallengeRoundVo=authMapper.getPublishedVideo(mobile,authParty,status,authUserId,startTIme,endTime);
|
|
|
|
+ }else{
|
|
|
|
+ listChallengeRoundVo=authMapper.getPublishedVideo(mobile,authParty,status,authUserId,activityTime.getStartTime(),activityTime.getEndTime());
|
|
|
|
+ }
|
|
PageInfo<ChallengeRoundVo> pageData = new PageInfo<>(listChallengeRoundVo);
|
|
PageInfo<ChallengeRoundVo> pageData = new PageInfo<>(listChallengeRoundVo);
|
|
//调用抖音api获取视频数据
|
|
//调用抖音api获取视频数据
|
|
String dyopenId=null;
|
|
String dyopenId=null;
|
|
@@ -1422,7 +1435,12 @@ public class AuthServiceImpl implements AuthService {
|
|
}
|
|
}
|
|
PageInfo<ChallengeRoundVo> pageDa = new PageInfo<>(collect);
|
|
PageInfo<ChallengeRoundVo> pageDa = new PageInfo<>(collect);
|
|
//获取不排名的数据
|
|
//获取不排名的数据
|
|
- List<ChallengeRoundVo> publishedVideoListNoRanking = authMapper.getPublishedVideoNoRanking(mobile,authParty,status,authUserId,activityTime.getStartTime(),activityTime.getEndTime());
|
|
|
|
|
|
+ List<ChallengeRoundVo> publishedVideoListNoRanking=null;
|
|
|
|
+ if(StringUtils.isNotEmpty(startTIme)&&StringUtils.isNotEmpty(endTime)){
|
|
|
|
+ publishedVideoListNoRanking = authMapper.getPublishedVideoNoRanking(mobile,authParty,status,authUserId,startTIme,endTime);
|
|
|
|
+ }else{
|
|
|
|
+ publishedVideoListNoRanking = authMapper.getPublishedVideoNoRanking(mobile,authParty,status,authUserId,activityTime.getStartTime(),activityTime.getEndTime());
|
|
|
|
+ }
|
|
//获取不排名的数据
|
|
//获取不排名的数据
|
|
if(publishedVideoListNoRanking.size()>0&&listChallengeRoundVo.size()>0){
|
|
if(publishedVideoListNoRanking.size()>0&&listChallengeRoundVo.size()>0){
|
|
for (ChallengeRoundVo noRanking:publishedVideoListNoRanking) {
|
|
for (ChallengeRoundVo noRanking:publishedVideoListNoRanking) {
|
|
@@ -1495,7 +1513,7 @@ public class AuthServiceImpl implements AuthService {
|
|
String releaseTime = sf.format(date).replace("T", "");
|
|
String releaseTime = sf.format(date).replace("T", "");
|
|
ChallengeActivityVo activityTime = authMapper.getActivityTime(authUserId);
|
|
ChallengeActivityVo activityTime = authMapper.getActivityTime(authUserId);
|
|
//如果当前时间大于结束时间则活动状态置为未开启状态
|
|
//如果当前时间大于结束时间则活动状态置为未开启状态
|
|
- if(activityTime!=null){
|
|
|
|
|
|
+ if(activityTime!=null&&StringUtils.isNotEmpty(activityTime.getEndTime())){
|
|
if(activityTime.getEndTime().compareTo(releaseTime)<0){
|
|
if(activityTime.getEndTime().compareTo(releaseTime)<0){
|
|
activityTime.setStatus(0);
|
|
activityTime.setStatus(0);
|
|
authMapper.upStatusById(activityTime.getId());
|
|
authMapper.upStatusById(activityTime.getId());
|