peng
2025-10-27 2a7b0a64b14b22ec45f8a0f6e4764bc3cd16919c
调整
9个文件已修改
157 ■■■■■ 已修改文件
framework/src/main/java/cn/lili/modules/lmk/domain/form/WxVideoForm.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/service/impl/MySubscribeServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/resources/mapper/lmk/MySubscribeMapper.xml 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/resources/mapper/lmk/PrizeDrawMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/resources/mapper/lmk/ScanPrizeMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/resources/mapper/lmk/VideoMapper.xml 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manager-api/src/main/java/cn/lili/controller/store/StoreManagerController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/domain/form/WxVideoForm.java
@@ -42,6 +42,11 @@
//    @NotBlank(message = "视频封面不能为空", groups = {Add.class, Update.class})
    private String cover;
    @ApiModelProperty("权重")
//    @NotBlank(message = "权重", groups = {Add.class, Update.class})
    private Double weight;
    @ApiModelProperty("视频内容类型:视频、图片")
    @NotBlank(message = "视频类型不能为空")
    private String videoContentType;
framework/src/main/java/cn/lili/modules/lmk/service/impl/MySubscribeServiceImpl.java
@@ -1,6 +1,8 @@
package cn.lili.modules.lmk.service.impl;
import cn.lili.common.security.context.UserContext;
import cn.lili.common.utils.StringUtils;
import cn.lili.utils.COSUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.lili.modules.lmk.domain.entity.MySubscribe;
import cn.lili.modules.lmk.mapper.MySubscribeMapper;
@@ -29,6 +31,7 @@
    private final MySubscribeMapper mySubscribeMapper;
    private final COSUtil cosUtil;
    /**
     * 分页查询
     * @param query
@@ -39,6 +42,12 @@
        query.setUserId(UserContext.getCurrentUserId());
        IPage<MySubscribeVO> page = PageUtil.getPage(query, MySubscribeVO.class);
        baseMapper.getPage(page, query);
        page.getRecords().forEach(mySubscribeVO -> {
            String subscribeUserAvatar = mySubscribeVO.getSubscribeUserAvatar();
            if (StringUtils.isNotBlank(subscribeUserAvatar)&&!subscribeUserAvatar.contains("http")) {
                mySubscribeVO.setSubscribeUserAvatar(cosUtil.getPreviewUrl(subscribeUserAvatar));
            }
        });
        return Result.ok().data(page.getRecords()).total(page.getTotal());
    }
framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java
@@ -989,6 +989,9 @@
        } else {
            vo.setLikeNum(0L);
        }
        if (StringUtils.isNotBlank(vo.getAvatar())&&!vo.getAvatar().contains("http")) {
            vo.setAvatar(cosUtil.getPreviewUrl(vo.getAvatar()));
        }
        return Result.ok().data(vo);
    }
@@ -1016,7 +1019,9 @@
                v.setCommentNum(this.getCommentNum(v.getId(), v.getCommentNum()));
                v.setCollectNum(this.getCollectNum(v.getId(), v.getCollectNum()));
                v.setThumbsUpNum(this.getThumbsUpNum(v.getId(), v.getThumbsUpNum()));
                if (StringUtils.isNotBlank(v.getAuthorAvatar())&&!v.getAuthorAvatar().contains("http")) {
                v.setAuthorAvatar(cosUtil.getPreviewUrl(v.getAuthorAvatar()));
                }
                if (VideoContentTypeEnum.VIDEO.getValue().equals(v.getVideoContentType())) {
                    v.setVideoUrl(cosUtil.getPreviewUrl(v.getVideoFileKey()));
                    v.setCoverUrl(cosUtil.getPreviewUrl(v.getCoverFileKey()));
framework/src/main/java/cn/lili/modules/search/serviceimpl/EsGoodsSearchServiceImpl.java
@@ -98,7 +98,9 @@
        }
        NativeSearchQueryBuilder searchQueryBuilder = createSearchQueryBuilder(searchDTO, pageVo);
        if (Objects.nonNull(searchDTO.getCanFilter()) && searchDTO.getCanFilter()) {
            // 使用sn字段排序并在折叠时选择sn最小的记录
            searchQueryBuilder.withCollapseField("goodsId.keyword");
            searchQueryBuilder.withSort(SortBuilders.fieldSort("sn.keyword").order(SortOrder.ASC));
        }
        NativeSearchQuery searchQuery = searchQueryBuilder.build();
        searchQuery.setTrackTotalHits(true);
framework/src/main/resources/mapper/lmk/MySubscribeMapper.xml
@@ -29,6 +29,19 @@
    </select>
<!--    <select id="getPage" resultMap="BaseResultMap">-->
<!--        SELECT-->
<!--            LMS.subscribe_user_id,-->
<!--            LMS.id,-->
<!--            LM.nick_name,-->
<!--            LM.face-->
<!--        FROM-->
<!--            lmk_my_subscribe LMS-->
<!--                LEFT JOIN li_member LM ON LMS.subscribe_user_id = LM.id-->
<!--        WHERE-->
<!--            LMS.delete_flag = 0 AND LMS.user_id = #{query.userId}-->
<!--    </select> -->
    <select id="getPage" resultMap="BaseResultMap">
        SELECT
            LMS.subscribe_user_id,
@@ -39,7 +52,20 @@
            lmk_my_subscribe LMS
                LEFT JOIN li_member LM ON LMS.subscribe_user_id = LM.id
        WHERE
            LMS.delete_flag = 0 AND LMS.user_id = #{query.userId}
            LM.id IS NOT NULL
              and LMS.delete_flag = 0 AND LMS.user_id = #{query.userId}
        UNION ALL
        SELECT
            LMS.subscribe_user_id,
            LMS.id,
            LM.nick_name,
            LM.avatar face
        FROM
            lmk_my_subscribe LMS
                LEFT JOIN li_admin_user LM ON LMS.subscribe_user_id = LM.id
        WHERE
            LM.id IS NOT NULL
        and  LMS.delete_flag = 0 AND LMS.user_id = #{query.userId}
    </select>
    <select id="getSubscribesByUserId" parameterType="string" resultType="string">
framework/src/main/resources/mapper/lmk/PrizeDrawMapper.xml
@@ -57,6 +57,8 @@
        <if test="query.prizeType != null and query.prizeType != ''">
            AND LPD.prize_type = #{query.prizeType}
        </if>
        order by
        LPD.create_time DESC
    </select>
    <resultMap id="grantRecordMap" type="cn.lili.modules.lmk.domain.vo.GrantRecordVO">
    <result property="nickname" column="nick_name"/>
framework/src/main/resources/mapper/lmk/ScanPrizeMapper.xml
@@ -54,6 +54,8 @@
            lmk_scan_prize LSP
        WHERE
            LSP.delete_flag = 0
        order by
            LSP.create_time DESC
    </select>
    <resultMap id="getStorePrizeMap" type="cn.lili.modules.lmk.domain.vo.StorePrizeVO">
        <id column="id" property="id"/>
framework/src/main/resources/mapper/lmk/VideoMapper.xml
@@ -230,6 +230,7 @@
            <if test="query.title != null and query.title != ''">AND LV.title LIKE CONCAT('%', #{query.title}, '%')</if>
            <if test="query.authorId != null and query.authorId != ''">AND LV.author_id = #{query.authorId}</if>
            <if test="query.status != null and query.status != ''">AND LV.status = #{query.status}</if>
        order by LV.create_time DESC
    </select>
<!-- todo 备份原有的失去了文件-->
@@ -337,6 +338,7 @@
          AND LM.id IS NOT NULL
        ORDER BY
            recommend DESC,
            weight DESC,
            create_time DESC
    </select>
    <select id="recommendVideoByVideoId" resultMap="WxResultMap">
@@ -661,8 +663,46 @@
            collection="videoIds" open="(" close=")" separator="," item="videoId">#{videoId}</foreach>
    </select>
<!--    <select id="getAuthorVideoPage" resultMap="WxResultMap">-->
<!--        SELECT-->
<!--            LV.author_id,-->
<!--            LV.cover_url,-->
<!--            LV.video_fit,-->
<!--            LV.video_duration,-->
<!--            LV.video_file_key,-->
<!--            LV.title,-->
<!--            LV.goods_view_num,-->
<!--            LV.goods_order_num,-->
<!--            LV.recommend,-->
<!--            LV.status,-->
<!--            LV.play_num,-->
<!--            LV.comment_num,-->
<!--            LV.collect_num,-->
<!--            LV.thumbs_up_num,-->
<!--            LV.weight,-->
<!--            LV.audit_pass_time,-->
<!--            LV.update_time,-->
<!--            LV.video_content_type,-->
<!--            LV.video_type,-->
<!--            LV.video_imgs,-->
<!--            LV.id,-->
<!--            LM.nick_name as authorName,-->
<!--            LM.face as authorAvatar-->
<!--        FROM-->
<!--            lmk_video LV-->
<!--                LEFT JOIN li_member LM ON LV.author_id = LM.id-->
<!--        WHERE-->
<!--            LV.delete_flag = 0-->
<!--            <if test="!query.authorSelf">-->
<!--                AND LV.status = '1'-->
<!--            </if>-->
<!--            AND LV.author_id = #{query.authorId}-->
<!--            AND LV.video_type = #{query.videoType}-->
<!--        ORDER BY-->
<!--            LV.collect_num DESC-->
<!--    </select>-->
    <select id="getAuthorVideoPage" resultMap="WxResultMap">
        SELECT
      select  * from (SELECT
            LV.author_id,
            LV.cover_url,
            LV.video_fit,
@@ -672,7 +712,7 @@
            LV.goods_view_num,
            LV.goods_order_num,
            LV.recommend,
            LV.status,
            LV.STATUS,
            LV.play_num,
            LV.comment_num,
            LV.collect_num,
@@ -684,8 +724,8 @@
            LV.video_type,
            LV.video_imgs,
            LV.id,
            LM.nick_name as authorName,
            LM.face as authorAvatar
            LM.nick_name AS authorName,
            LM.face AS authorAvatar
        FROM
            lmk_video LV
                LEFT JOIN li_member LM ON LV.author_id = LM.id
@@ -696,8 +736,45 @@
            </if>
            AND LV.author_id = #{query.authorId}
            AND LV.video_type = #{query.videoType}
        and lm.id IS NOT NULL
        UNION ALL
        SELECT
            LV.author_id,
            LV.cover_url,
            LV.video_fit,
            LV.video_duration,
            LV.video_file_key,
            LV.title,
            LV.goods_view_num,
            LV.goods_order_num,
            LV.recommend,
            LV.STATUS,
            LV.play_num,
            LV.comment_num,
            LV.collect_num,
            LV.thumbs_up_num,
            LV.weight,
            LV.audit_pass_time,
            LV.update_time,
            LV.video_content_type,
            LV.video_type,
            LV.video_imgs,
            LV.id,
            LM.nick_name AS authorName,
            LM.avatar AS authorAvatar
        FROM
            lmk_video LV
                LEFT JOIN li_admin_user LM ON LV.author_id = LM.id
        WHERE
        LV.delete_flag = 0
        <if test="!query.authorSelf">
            AND LV.status = '1'
        </if>
        AND LV.author_id = #{query.authorId}
        AND LV.video_type = #{query.videoType}
        and   lm.id IS NOT NULL) t
        ORDER BY
            LV.collect_num DESC
        t.collect_num DESC
    </select>
    <select id="getAuthorCollectVideoPage" resultMap="WxResultMap">
manager-api/src/main/java/cn/lili/controller/store/StoreManagerController.java
@@ -2,6 +2,7 @@
import cn.lili.common.aop.annotation.DemoSite;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.utils.StringUtils;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.store.entity.dos.Store;
@@ -13,12 +14,14 @@
import cn.lili.modules.store.entity.vos.StoreVO;
import cn.lili.modules.store.service.StoreDetailService;
import cn.lili.modules.store.service.StoreService;
import cn.lili.utils.COSUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import jodd.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -47,6 +50,8 @@
    @Autowired
    private StoreDetailService storeDetailService;
    @Autowired
    private COSUtil cosUtil;
    @ApiOperation(value = "获取店铺分页列表")
    @GetMapping("/all")
    public ResultMessage<List<Store>> getAll() {
@@ -64,7 +69,17 @@
    @GetMapping(value = "/get/detail/{storeId}")
    public ResultMessage<StoreDetailVO> detail(@PathVariable String storeId) {
        // todo 对于刚提交审核的信息需要等待缓存失效后才能操作,否则缓存信息还在
        return ResultUtil.data(storeDetailService.getStoreDetailVO(storeId));
        StoreDetailVO storeDetailVO = storeDetailService.getStoreDetailVO(storeId);
        if (StringUtils.isNotBlank(storeDetailVO.getStoreLogo())&&!storeDetailVO.getStoreLogo().contains("http")) {
            storeDetailVO.setStoreLogo(cosUtil.getPreviewUrl(storeDetailVO.getStoreLogo()));
        }
        if (StringUtils.isNotBlank(storeDetailVO.getLegalPhoto())&&!storeDetailVO.getLegalPhoto().contains("http")) {
            storeDetailVO.setLegalPhoto(cosUtil.getPreviewUrl(storeDetailVO.getLegalPhoto()));
        }
        if (StringUtils.isNotBlank(storeDetailVO.getLicencePhoto())&&!storeDetailVO.getLicencePhoto().contains("http")) {
            storeDetailVO.setLicencePhoto(cosUtil.getPreviewUrl(storeDetailVO.getLicencePhoto()));
        }
        return ResultUtil.data(storeDetailVO);
    }
    @ApiOperation(value = "添加店铺")