You've already forked FrameTour-BE
- 在OrderServiceImpl中增加对商品类型13(AI相机照片集)的处理逻辑 - 新增listAiCamImageByFaceRelation方法用于查询AI相机图片数据 - 扩展订单详情展示逻辑,支持AI相机照片集的封面和拍摄时间显示 - 更新OrderMapper.xml,新增member_source_aicam_data查询片段 - 修改SQL映射,增加对goods_type=13情况的字段匹配规则 - 完善商品名称和订单类型的设置逻辑,区分AI相机照片集与其他类型
169 lines
5.1 KiB
Java
169 lines
5.1 KiB
Java
package com.ycwl.basic.mapper;
|
|
|
|
import com.ycwl.basic.model.pc.source.entity.MemberSourceEntity;
|
|
import com.ycwl.basic.model.pc.source.entity.SourceEntity;
|
|
import com.ycwl.basic.model.pc.source.entity.SourceWatermarkEntity;
|
|
import com.ycwl.basic.model.pc.source.req.SourceReqQuery;
|
|
import com.ycwl.basic.model.pc.source.resp.SourceRespVO;
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @Author:longbinbin
|
|
* @Date:2024/12/2 11:21
|
|
* 视频源
|
|
*/
|
|
@Mapper
|
|
public interface SourceMapper {
|
|
List<SourceRespVO> list(SourceReqQuery sourceReqQuery);
|
|
|
|
SourceRespVO getById(Long id);
|
|
SourceRespVO userGetById(Long id, Long userId);
|
|
|
|
List<SourceEntity> listBySampleIds(List<Long> sourceIds);
|
|
|
|
int add(SourceEntity source);
|
|
|
|
int deleteById(Long id);
|
|
|
|
int update(SourceEntity source);
|
|
|
|
/**
|
|
* @param sourceReqQuery
|
|
* @return
|
|
*/
|
|
List<SourceRespVO> listGroupByType(SourceReqQuery sourceReqQuery);
|
|
|
|
/**
|
|
* 用户素材数量
|
|
*
|
|
* @param userId
|
|
* @return
|
|
*/
|
|
int countByMemberId(String userId);
|
|
|
|
List<SourceEntity> listVideoBySampleIds(List<Long> sampleId);
|
|
|
|
SourceEntity findBySampleId(Long faceSampleId);
|
|
|
|
int addRelation(MemberSourceEntity source);
|
|
|
|
List<SourceRespVO> listUser(SourceReqQuery sourceReqQuery);
|
|
Integer countUser(SourceReqQuery sourceReqQuery);
|
|
SourceRespVO listUserOne(Long userId, Long sourceId);
|
|
|
|
int addRelations(List<MemberSourceEntity> list);
|
|
|
|
List<MemberSourceEntity> filterExistingRelations(List<MemberSourceEntity> list);
|
|
|
|
boolean sourceExists(Long sourceId);
|
|
|
|
List<MemberSourceEntity> filterValidSourceRelations(List<MemberSourceEntity> list);
|
|
|
|
int updateRelation(MemberSourceEntity memberSourceEntity);
|
|
int freeRelations(List<Long> ids, int type);
|
|
|
|
List<SourceRespVO> queryByRelation(SourceReqQuery sourceReqQuery);
|
|
|
|
/**
|
|
* 按 faceId 和 type 分组查询源素材,每组返回最新的一条记录
|
|
* @param sourceReqQuery 查询参数
|
|
* @return 分组后的素材列表
|
|
*/
|
|
List<SourceRespVO> queryGroupedByFaceAndType(SourceReqQuery sourceReqQuery);
|
|
|
|
SourceEntity querySameVideo(Long faceSampleId, Long deviceId);
|
|
|
|
int hasRelationTo(Long memberId, Long sourceId, int type);
|
|
|
|
List<SourceEntity> listVideoByScenicFaceRelation(Long scenicId, Long faceId);
|
|
List<SourceEntity> listVideoByFaceRelation(Long faceId);
|
|
|
|
List<SourceEntity> listImageByFaceRelation(Long faceId);
|
|
List<SourceEntity> listAiCamImageByFaceRelation(Long faceId);
|
|
List<MemberSourceEntity> listByFaceRelation(Long faceId, Integer type);
|
|
|
|
SourceEntity getEntity(Long id);
|
|
|
|
int deleteNotRelateSource(int type, Date endDate);
|
|
|
|
int deleteNotBuyRelations(Long scenicId, Date endDate);
|
|
|
|
int deleteNotBuyFaceRelation(Long userId, Long faceId);
|
|
List<SourceWatermarkEntity> listSourceWatermark(List<Long> sourceIds, Long faceId, String watermarkType);
|
|
|
|
void addSourceWatermark(Long sourceId, Long faceId, String type, String url);
|
|
|
|
int deleteUselessSource();
|
|
|
|
int updateMemberIdByFaceId(Long faceId, Long memberId);
|
|
|
|
/**
|
|
* 根据faceId查询type=2的source列表
|
|
* @param faceId 人脸ID
|
|
* @return type=2的source列表
|
|
*/
|
|
List<SourceEntity> listImageSourcesByFaceId(Long faceId);
|
|
|
|
/**
|
|
* 从ZT-Source消息添加素材
|
|
* @param source 素材实体
|
|
* @return 影响行数
|
|
*/
|
|
int addFromZTSource(SourceEntity source);
|
|
|
|
SourceEntity getBySampleIdAndType(Long faceSampleId, Integer type);
|
|
|
|
/**
|
|
* 统计faceId关联的不同设备数量
|
|
* @param faceId 人脸ID
|
|
* @return 设备数量
|
|
*/
|
|
Integer countDistinctDevicesByFaceId(Long faceId);
|
|
|
|
/**
|
|
* 根据faceId和设备索引获取source
|
|
* @param faceId 人脸ID
|
|
* @param deviceIndex 设备索引(从0开始)
|
|
* @param type 素材类型(1-视频,2-图片)
|
|
* @param sortStrategy 排序策略
|
|
* @return source实体
|
|
*/
|
|
SourceEntity getSourceByFaceAndDeviceIndex(Long faceId, Integer deviceIndex, Integer type, String sortStrategy);
|
|
|
|
/**
|
|
* 获取faceId关联的所有设备ID列表
|
|
* @param faceId 人脸ID
|
|
* @return 设备ID列表
|
|
*/
|
|
List<Long> getDeviceIdsByFaceId(Long faceId);
|
|
|
|
/**
|
|
* 根据faceId和设备ID获取source
|
|
* @param faceId 人脸ID
|
|
* @param deviceId 设备ID
|
|
* @param type 素材类型(1-视频,2-图片)
|
|
* @param sortStrategy 排序策略
|
|
* @return source实体
|
|
*/
|
|
SourceEntity getSourceByFaceAndDeviceId(Long faceId, Long deviceId, Integer type, String sortStrategy);
|
|
|
|
/**
|
|
* 根据faceSampleId列表和type查询source列表
|
|
* @param faceSampleIds faceSampleId列表
|
|
* @param type 素材类型
|
|
* @return source实体列表
|
|
*/
|
|
List<SourceEntity> listByFaceSampleIdsAndType(List<Long> faceSampleIds, Integer type);
|
|
|
|
/**
|
|
* 删除指定faceId和type的member_source关联记录
|
|
* @param faceId 人脸ID
|
|
* @param type 素材类型
|
|
* @return 删除的记录数
|
|
*/
|
|
int deleteRelationsByFaceIdAndType(Long faceId, Integer type);
|
|
}
|