You've already forked FrameTour-BE
用户UID
This commit is contained in:
@ -11,7 +11,6 @@ import com.ycwl.basic.model.jwt.JwtInfo;
|
||||
import com.ycwl.basic.model.mobile.order.IsBuyRespVO;
|
||||
import com.ycwl.basic.model.mobile.scenic.ScenicAppVO;
|
||||
import com.ycwl.basic.model.mobile.scenic.ScenicDeviceCountVO;
|
||||
import com.ycwl.basic.model.mobile.scenic.ScenicIndexVO;
|
||||
import com.ycwl.basic.model.mobile.scenic.account.ScenicLoginReq;
|
||||
import com.ycwl.basic.model.mobile.scenic.account.ScenicLoginRespVO;
|
||||
import com.ycwl.basic.model.mobile.scenic.content.ContentPageVO;
|
||||
@ -26,7 +25,6 @@ import com.ycwl.basic.model.pc.source.resp.SourceRespVO;
|
||||
import com.ycwl.basic.model.pc.task.entity.TaskEntity;
|
||||
import com.ycwl.basic.model.pc.video.entity.MemberVideoEntity;
|
||||
import com.ycwl.basic.model.pc.video.entity.VideoEntity;
|
||||
import com.ycwl.basic.model.pc.video.resp.VideoRespVO;
|
||||
import com.ycwl.basic.repository.ScenicRepository;
|
||||
import com.ycwl.basic.repository.VideoRepository;
|
||||
import com.ycwl.basic.repository.VideoTaskRepository;
|
||||
@ -100,14 +98,9 @@ public class AppScenicServiceImpl implements AppScenicService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResponse<List<ScenicAppVO>> scenicList(ScenicIndexVO scenicIndexVO) {
|
||||
List<ScenicAppVO> dataList = scenicMapper.scenicListByLnLa(scenicIndexVO);
|
||||
return ApiResponse.success(dataList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ContentPageVO> faceContentList(Long userId, Long faceId) {
|
||||
public List<ContentPageVO> faceContentList(Long faceId) {
|
||||
FaceRespVO faceRespVO = faceMapper.getById(faceId);
|
||||
Long userId = faceRespVO.getMemberId();
|
||||
if (faceRespVO == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@ -188,9 +181,11 @@ public class AppScenicServiceImpl implements AppScenicService {
|
||||
}
|
||||
sourceList.stream().collect(Collectors.groupingBy(SourceRespVO::getType)).forEach((type, list) -> {
|
||||
if (type == 1) {
|
||||
sourceVideoContent.setSourceType(1);
|
||||
sourceVideoContent.setLockType(-1);
|
||||
sourceVideoContent.setTemplateCoverUrl(list.get(0).getUrl());
|
||||
} else {
|
||||
sourceImageContent.setSourceType(2);
|
||||
sourceImageContent.setLockType(-1);
|
||||
sourceImageContent.setTemplateCoverUrl(list.get(0).getUrl());
|
||||
}
|
||||
@ -229,7 +224,7 @@ public class AppScenicServiceImpl implements AppScenicService {
|
||||
@Override
|
||||
public ApiResponse<List<ContentPageVO>> contentListUseDefaultFace() {
|
||||
FaceRespVO lastFaceByUserId = faceMapper.findLastFaceByUserId(BaseContextHandler.getUserId());
|
||||
List<ContentPageVO> contentPageVOS = faceContentList(lastFaceByUserId.getMemberId(), lastFaceByUserId.getId());
|
||||
List<ContentPageVO> contentPageVOS = faceContentList(lastFaceByUserId.getId());
|
||||
return ApiResponse.success(contentPageVOS);
|
||||
}
|
||||
|
||||
|
@ -253,8 +253,9 @@ public class GoodsServiceImpl implements GoodsService {
|
||||
* @return 0没有任务 1 合成中 2 合成成功
|
||||
*/
|
||||
@Override
|
||||
public VideoTaskStatusVO getTaskStatusByFaceId(Long userId, Long faceId) {
|
||||
public VideoTaskStatusVO getTaskStatusByFaceId(Long faceId) {
|
||||
FaceEntity face = faceRepository.getFace(faceId);
|
||||
Long userId = face.getMemberId();
|
||||
VideoTaskStatusVO response = new VideoTaskStatusVO();
|
||||
response.setFaceId(faceId);
|
||||
if (face == null) {
|
||||
@ -318,12 +319,12 @@ public class GoodsServiceImpl implements GoodsService {
|
||||
@Override
|
||||
public VideoTaskStatusVO getAllTaskStatus(Long userId) {
|
||||
FaceRespVO lastFaceByUserId = faceMapper.findLastFaceByUserId(String.valueOf(userId));
|
||||
return getTaskStatusByFaceId(userId, lastFaceByUserId.getId());
|
||||
return getTaskStatusByFaceId(lastFaceByUserId.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public VideoTaskStatusVO getTaskStatusByTemplateId(Long userId, Long faceId, Long templateId) {
|
||||
List<MemberVideoEntity> taskList = videoMapper.listRelationByFaceAndTemplate(userId, faceId, templateId);
|
||||
public VideoTaskStatusVO getTaskStatusByTemplateId(Long faceId, Long templateId) {
|
||||
List<MemberVideoEntity> taskList = videoMapper.listRelationByFaceAndTemplate(faceId, templateId);
|
||||
VideoTaskStatusVO response = new VideoTaskStatusVO();
|
||||
response.setFaceId(faceId);
|
||||
response.setTemplateId(templateId);
|
||||
@ -397,12 +398,12 @@ public class GoodsServiceImpl implements GoodsService {
|
||||
response.setStatus(-2);
|
||||
return response;
|
||||
}
|
||||
return getTaskStatusByFaceId(userId, faceVO.getId());
|
||||
return getTaskStatusByFaceId(faceVO.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResponse<GoodsDetailVO> sourceGoodsInfo(Long userId, Long sourceId) {
|
||||
SourceRespVO sourceRespVO = sourceMapper.listUserOne(userId, sourceId);
|
||||
public ApiResponse<GoodsDetailVO> sourceGoodsInfo(Long sourceId) {
|
||||
SourceRespVO sourceRespVO = sourceMapper.getById(sourceId);
|
||||
if (sourceRespVO == null) {
|
||||
sourceRespVO = sourceMapper.getById(sourceId);
|
||||
if (sourceRespVO == null) {
|
||||
|
@ -3,7 +3,6 @@ package com.ycwl.basic.service.mobile;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ycwl.basic.model.mobile.scenic.ScenicAppVO;
|
||||
import com.ycwl.basic.model.mobile.scenic.ScenicDeviceCountVO;
|
||||
import com.ycwl.basic.model.mobile.scenic.ScenicIndexVO;
|
||||
import com.ycwl.basic.model.mobile.scenic.account.ScenicLoginReq;
|
||||
import com.ycwl.basic.model.mobile.scenic.account.ScenicLoginRespVO;
|
||||
import com.ycwl.basic.model.mobile.scenic.content.ContentPageVO;
|
||||
@ -25,16 +24,7 @@ public interface AppScenicService {
|
||||
|
||||
ApiResponse<ScenicRespVO> getDetails(Long id);
|
||||
|
||||
/**
|
||||
* 首页景区列表,按照距离排序
|
||||
*
|
||||
* @param scenicIndexVO
|
||||
* @return
|
||||
*/
|
||||
ApiResponse<List<ScenicAppVO>> scenicList(ScenicIndexVO scenicIndexVO);
|
||||
|
||||
|
||||
List<ContentPageVO> faceContentList(Long userId, Long faceId);
|
||||
List<ContentPageVO> faceContentList(Long faceId);
|
||||
|
||||
ApiResponse<ScenicLoginRespVO> login(ScenicLoginReq scenicLoginReq) throws Exception;
|
||||
|
||||
|
@ -40,9 +40,9 @@ public interface GoodsService {
|
||||
* @return
|
||||
*/
|
||||
VideoTaskStatusVO getAllTaskStatus(Long userId);
|
||||
VideoTaskStatusVO getTaskStatusByFaceId(Long userId ,Long faceId);
|
||||
VideoTaskStatusVO getTaskStatusByTemplateId(Long userId, Long faceId, Long templateId);
|
||||
VideoTaskStatusVO getTaskStatusByFaceId(Long faceId);
|
||||
VideoTaskStatusVO getTaskStatusByTemplateId(Long faceId, Long templateId);
|
||||
VideoTaskStatusVO getTaskStatusByScenicId(Long userId, Long scenicId);
|
||||
|
||||
ApiResponse<GoodsDetailVO> sourceGoodsInfo(Long userId, Long sourceId);
|
||||
ApiResponse<GoodsDetailVO> sourceGoodsInfo(Long sourceId);
|
||||
}
|
||||
|
@ -605,7 +605,7 @@ public class TaskTaskServiceImpl implements TaskService {
|
||||
if (scenicConfig != null && Integer.valueOf(2).equals(scenicConfig.getTemplateNewVideoType())) {
|
||||
log.info("景区{}启用:templateNewVideoType:全新视频不需要重新购买", task.getScenicId());
|
||||
// 全新视频,不需要重新购买,旧视频在我的里面查看
|
||||
List<MemberVideoEntity> entityList = videoMapper.listRelationByFaceAndTemplate(face.getMemberId(), face.getId(), task.getTemplateId());
|
||||
List<MemberVideoEntity> entityList = videoMapper.listRelationByFaceAndTemplate(face.getId(), task.getTemplateId());
|
||||
Optional<MemberVideoEntity> buy = entityList.stream().filter(item -> Integer.valueOf(1).equals(item.getIsBuy())).findAny();
|
||||
if (buy.isPresent()) {
|
||||
log.info("人脸{},模板{},已经被购买过,{}", face.getId(), task.getTemplateId(), buy.get());
|
||||
|
Reference in New Issue
Block a user