xiangpei
8 天以前 468139d617c56536b07bd4ddcf52f5330c3449b8
视频播放记录
5个文件已修改
29 ■■■■■ 已修改文件
buyer-api/src/main/java/cn/lili/controller/member/FootprintController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/member/service/FootprintService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/member/serviceimpl/FootprintServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/resources/mapper/lmk/VideoMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
buyer-api/src/main/java/cn/lili/controller/member/FootprintController.java
@@ -1,10 +1,8 @@
package cn.lili.controller.member;
import cn.lili.base.Result;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.security.context.UserContext;
import cn.lili.common.utils.StringUtils;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.member.entity.dto.FootPrintQueryParams;
import cn.lili.modules.member.service.FootprintService;
@@ -14,7 +12,6 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.apache.catalina.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -67,10 +64,10 @@
    }
    @ApiOperation(value = "根据id删除")
    @ApiImplicitParam(name = "ids", value = "商品ID", required = true, allowMultiple = true, dataType = "String", paramType = "path")
    @DeleteMapping(value = "/delByIds/{ids}")
    public ResultMessage<Object> delAllByIds(@NotNull(message = "商品ID不能为空") @PathVariable("ids") List ids) {
        footprintService.deleteByIds(ids);
    @ApiImplicitParam(name = "ids", value = "关联ID", required = true, allowMultiple = true, dataType = "String", paramType = "path")
    @DeleteMapping(value = "/delByIds/{viewType}/{ids}")
    public ResultMessage<Object> delAllByIds(@NotNull(message = "关联ID不能为空") @PathVariable("ids") List ids, @PathVariable("viewType") String viewType) {
        footprintService.deleteByIds(ids, viewType);
        return ResultUtil.success();
    }
framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java
@@ -497,11 +497,17 @@
                videoEsQuery.setPageNumber((int) query.getPageNumber());
                videoEsQuery.setPageSize((int) query.getPageSize());
                return this.esSearch(videoEsQuery);
            case "goodsSimilarly":
            case "goodsSimilarly": // 悬挂相同商品的推荐视频
                GoodsSimilarlyQuery goodsSimilarlyQuery = new GoodsSimilarlyQuery();
                BeanUtils.copyProperties(query, goodsSimilarlyQuery);
                baseMapper.goodsSimilarlyPage(page, goodsSimilarlyQuery);
                break;
            case "history":
                VideoHistoryQuery videoHistoryQuery = new VideoHistoryQuery();
                BeanUtils.copyProperties(query, videoHistoryQuery);
                videoHistoryQuery.setUserId(UserContext.getCurrentUserId());
                baseMapper.getHistoryPage(page, videoHistoryQuery);
                break;
            default:
                break;
        }
framework/src/main/java/cn/lili/modules/member/service/FootprintService.java
@@ -37,9 +37,10 @@
     * 根据ID进行清除会员的历史足迹
     *
     * @param ids 商品ID列表
     * @param viewType 浏览类型
     * @return 处理结果
     */
    boolean deleteByIds(List<String> ids);
    boolean deleteByIds(List<String> ids, String viewType);
    /**
     * 获取会员浏览历史分页
framework/src/main/java/cn/lili/modules/member/serviceimpl/FootprintServiceImpl.java
@@ -52,9 +52,10 @@
    }
    @Override
    public boolean deleteByIds(List<String> ids) {
    public boolean deleteByIds(List<String> ids, String viewType) {
        LambdaQueryWrapper<FootPrint> lambdaQueryWrapper = Wrappers.lambdaQuery();
        lambdaQueryWrapper.eq(FootPrint::getMemberId, UserContext.getCurrentUser().getId());
        lambdaQueryWrapper.eq(FootPrint::getViewType, viewType);
        lambdaQueryWrapper.in(FootPrint::getRefId, ids);
        return this.remove(lambdaQueryWrapper);
    }
framework/src/main/resources/mapper/lmk/VideoMapper.xml
@@ -349,8 +349,8 @@
            LFP.play_at,
            LFP.update_time as playTime
        FROM
            lmk_video LV
                INNER JOIN li_foot_print LFP ON LFP.ref_id = LV.id AND LFP.view_type = 'video' AND LFP.delete_flag = 0 AND LFP.member_id = #{query.userId}
            li_foot_print LFP
                INNER JOIN lmk_video LV ON LFP.ref_id = LV.id AND LFP.view_type = 'video' AND LFP.delete_flag = 0 AND LFP.member_id = #{query.userId}
                LEFT JOIN li_member LM ON LV.author_id = LM.id
        WHERE
            LV.delete_flag = 0 AND LV.status = '1'