From 015f6921c0cc90566eb46b3bed48e7d71714ca61 Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期二, 29 七月 2025 11:46:43 +0800 Subject: [PATCH] 订单查询问题 --- framework/src/main/java/cn/lili/modules/store/service/StoreDetailService.java | 2 + buyer-api/src/main/java/cn/lili/controller/order/OrderBuyerController.java | 3 + framework/src/main/java/cn/lili/modules/store/mapper/StoreDetailMapper.java | 7 +++ framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreDetailServiceImpl.java | 4 ++ framework/src/main/java/cn/lili/modules/order/order/service/OrderService.java | 7 +-- framework/src/main/java/cn/lili/modules/order/order/serviceimpl/OrderServiceImpl.java | 2 framework/src/main/resources/mapper/lmk/VideoMapper.xml | 34 +++++++++++++++++ lmk-job/src/main/java/cn/lili/handler/impl/order/OrderEveryDayTaskExecute.java | 4 + framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java | 7 +++ framework/src/main/java/cn/lili/modules/lmk/domain/query/VideoQuery.java | 6 +- framework/src/main/java/cn/lili/modules/lmk/mapper/VideoMapper.java | 2 + 11 files changed, 67 insertions(+), 11 deletions(-) diff --git a/buyer-api/src/main/java/cn/lili/controller/order/OrderBuyerController.java b/buyer-api/src/main/java/cn/lili/controller/order/OrderBuyerController.java index e0f12d8..94faaa2 100644 --- a/buyer-api/src/main/java/cn/lili/controller/order/OrderBuyerController.java +++ b/buyer-api/src/main/java/cn/lili/controller/order/OrderBuyerController.java @@ -12,6 +12,7 @@ import cn.lili.modules.order.order.entity.dos.Order; import cn.lili.modules.order.order.entity.dos.OrderPackage; import cn.lili.modules.order.order.entity.dto.OrderSearchParams; +import cn.lili.modules.order.order.entity.dto.OrderSearchXcxParams; import cn.lili.modules.order.order.entity.enums.OrderStatusEnum; import cn.lili.modules.order.order.entity.vo.OrderDetailVO; import cn.lili.modules.order.order.entity.vo.OrderSimpleVO; @@ -85,7 +86,7 @@ @ApiOperation(value = "鏌ヨ浼氬憳璁㈠崟鍒楄〃") @GetMapping("/xcx") - public ResultMessage<IPage<OrderSimpleXcxVO>> queryXcxMineOrder(OrderSearchParams orderSearchParams) { + public ResultMessage<IPage<OrderSimpleXcxVO>> queryXcxMineOrder(OrderSearchXcxParams orderSearchParams) { AuthUser currentUser = Objects.requireNonNull(UserContext.getCurrentUser()); orderSearchParams.setMemberId(currentUser.getId()); return ResultUtil.data(orderService.queryByXcxParams(orderSearchParams)); diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/query/VideoQuery.java b/framework/src/main/java/cn/lili/modules/lmk/domain/query/VideoQuery.java index 23800fd..8a36dc6 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/domain/query/VideoQuery.java +++ b/framework/src/main/java/cn/lili/modules/lmk/domain/query/VideoQuery.java @@ -28,10 +28,10 @@ @ApiModelProperty("瑙嗛鏉ユ簮锛歳ecommend鎺ㄨ崘銆乤uthor鏌愪綔鑰呯殑瑙嗛銆乧ollect鏌愪綔鑰呮敹钘忕殑瑙嗛銆乴ike鏌愪綔鑰呯偣璧炵殑瑙嗛銆乻earch鎼滅储銆乬oodsSimilarly鏌ユ寕鍚屼竴鍟嗗搧鐨勮棰�") private String videoFrom; + @ApiModelProperty("瑙嗛id") + private String videoId; - - - + /** * @see cn.lili.modules.lmk.enums.general.VideoTypeEnum */ diff --git a/framework/src/main/java/cn/lili/modules/lmk/mapper/VideoMapper.java b/framework/src/main/java/cn/lili/modules/lmk/mapper/VideoMapper.java index 829acb3..d6fad30 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/mapper/VideoMapper.java +++ b/framework/src/main/java/cn/lili/modules/lmk/mapper/VideoMapper.java @@ -47,6 +47,8 @@ */ IPage recommendVideo(IPage page, @Param("query") VideoQuery query); + WxVideoVO recommendVideoByVideoId( @Param("query") VideoQuery query); + List<WxVideoVO> recommendVideoList(@Param("query") VideoQuery query); IPage recommendHealthVideo(IPage page, @Param("query") WxHealthVideoQuery query); diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java index 77b88bc..8de5366 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java @@ -558,8 +558,15 @@ case "recommend":// 鍔犺浇鎺ㄨ崘瑙嗛 baseMapper.recommendVideo(page, query); //鎺ㄨ崘瑙嗛閲嶆柊鎺掑簭 + WxVideoVO wxVideoVO = null; + if (StringUtils.isNotBlank(query.getVideoId())) { + wxVideoVO = baseMapper.recommendVideoByVideoId(query); + } List<WxVideoVO> records = page.getRecords(); Collections.shuffle(records); + if (wxVideoVO!=null) { + records.set(0, wxVideoVO); + } break; case "author": // 鍔犺浇瑙嗛涓婚〉鎴戝彂甯冪殑瑙嗛 AuthorVideoQuery query1 = new AuthorVideoQuery(); diff --git a/framework/src/main/java/cn/lili/modules/order/order/service/OrderService.java b/framework/src/main/java/cn/lili/modules/order/order/service/OrderService.java index 8978fad..4e230ac 100644 --- a/framework/src/main/java/cn/lili/modules/order/order/service/OrderService.java +++ b/framework/src/main/java/cn/lili/modules/order/order/service/OrderService.java @@ -3,10 +3,7 @@ import cn.lili.modules.member.entity.dto.MemberAddressDTO; import cn.lili.modules.order.cart.entity.dto.TradeDTO; import cn.lili.modules.order.order.entity.dos.Order; -import cn.lili.modules.order.order.entity.dto.OrderMessage; -import cn.lili.modules.order.order.entity.dto.OrderSearchParams; -import cn.lili.modules.order.order.entity.dto.PartDeliveryParamsDTO; -import cn.lili.modules.order.order.entity.dto.SupplierOrderSearchParams; +import cn.lili.modules.order.order.entity.dto.*; import cn.lili.modules.order.order.entity.vo.OrderDetailVO; import cn.lili.modules.order.order.entity.vo.OrderSimpleVO; import cn.lili.modules.order.order.entity.vo.OrderSimpleXcxVO; @@ -60,7 +57,7 @@ * @param orderSearchParams 鏌ヨ鍙傛暟 * @return 绠�鐭鍗曞垎椤� */ - IPage<OrderSimpleXcxVO> queryByXcxParams(OrderSearchParams orderSearchParams); + IPage<OrderSimpleXcxVO> queryByXcxParams(OrderSearchXcxParams orderSearchParams); IPage<OrderSimpleXcxVO> querySupplierOrderParams(SupplierOrderSearchParams orderSearchParams); diff --git a/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/OrderServiceImpl.java b/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/OrderServiceImpl.java index 74ee3e3..aa53528 100644 --- a/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/OrderServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/OrderServiceImpl.java @@ -237,7 +237,7 @@ } @Override - public IPage<OrderSimpleXcxVO> queryByXcxParams(OrderSearchParams orderSearchParams) { + public IPage<OrderSimpleXcxVO> queryByXcxParams(OrderSearchXcxParams orderSearchParams) { QueryWrapper queryWrapper = orderSearchParams.queryWrapper(); queryWrapper.groupBy("o.id"); queryWrapper.orderByDesc("o.id"); diff --git a/framework/src/main/java/cn/lili/modules/store/mapper/StoreDetailMapper.java b/framework/src/main/java/cn/lili/modules/store/mapper/StoreDetailMapper.java index ade1762..5a97809 100644 --- a/framework/src/main/java/cn/lili/modules/store/mapper/StoreDetailMapper.java +++ b/framework/src/main/java/cn/lili/modules/store/mapper/StoreDetailMapper.java @@ -73,6 +73,13 @@ "OR settlement_cycle LIKE concat('%,',#{day})"+ "OR settlement_cycle = #{day}") List<StoreSettlementDay> getSettlementStore(int day); + /** + * 鑾峰彇寰呯粨绠楀簵閾哄垪琛� + * + * @return 寰呯粨绠楀簵閾哄垪琛� + */ + @Select("SELECT store_id,settlement_day FROM li_store_detail ") + List<StoreSettlementDay> getAllSettlementStore(); /** * 淇敼搴楅摵鐨勭粨绠楁棩 diff --git a/framework/src/main/java/cn/lili/modules/store/service/StoreDetailService.java b/framework/src/main/java/cn/lili/modules/store/service/StoreDetailService.java index 134f97a..0e85b6b 100644 --- a/framework/src/main/java/cn/lili/modules/store/service/StoreDetailService.java +++ b/framework/src/main/java/cn/lili/modules/store/service/StoreDetailService.java @@ -131,6 +131,8 @@ */ List<StoreSettlementDay> getSettlementStore(int day); + List<StoreSettlementDay> getAllSettlementStore(); + /** * 淇敼搴楅摵鐨勭粨绠楁棩 * diff --git a/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreDetailServiceImpl.java b/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreDetailServiceImpl.java index 2044577..0dae80f 100644 --- a/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreDetailServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreDetailServiceImpl.java @@ -142,6 +142,10 @@ public List<StoreSettlementDay> getSettlementStore(int day) { return this.baseMapper.getSettlementStore(day); } + @Override + public List<StoreSettlementDay> getAllSettlementStore() { + return this.baseMapper.getAllSettlementStore(); + } @Override public StoreDeliverGoodsAddressDTO getStoreDeliverGoodsAddressDto() { diff --git a/framework/src/main/resources/mapper/lmk/VideoMapper.xml b/framework/src/main/resources/mapper/lmk/VideoMapper.xml index 77fe601..1da37db 100644 --- a/framework/src/main/resources/mapper/lmk/VideoMapper.xml +++ b/framework/src/main/resources/mapper/lmk/VideoMapper.xml @@ -267,6 +267,40 @@ ORDER BY LV.create_time DESC </select> + <select id="recommendVideoByVideoId" 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.create_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 AND LV.status = '1' AND LV.id = #{query.videoId} + ORDER BY + LV.create_time DESC + </select> <select id="recommendVideoList" resultMap="WxResultMap"> SELECT LV.author_id, diff --git a/lmk-job/src/main/java/cn/lili/handler/impl/order/OrderEveryDayTaskExecute.java b/lmk-job/src/main/java/cn/lili/handler/impl/order/OrderEveryDayTaskExecute.java index 40a1d6b..3474af1 100644 --- a/lmk-job/src/main/java/cn/lili/handler/impl/order/OrderEveryDayTaskExecute.java +++ b/lmk-job/src/main/java/cn/lili/handler/impl/order/OrderEveryDayTaskExecute.java @@ -269,7 +269,9 @@ int day = DateUtil.date().dayOfMonth(); //鑾峰彇寰呯粨绠楀晢瀹跺垪琛� - List<StoreSettlementDay> storeList = storeDetailService.getSettlementStore(day); +// List<StoreSettlementDay> storeList = storeDetailService.getSettlementStore(day); + //鐩存帴浠庢墍鏈夊晢瀹朵腑鍘荤粨绠椾笉鍦ㄦ牴鎹ぉ鏁板幓缁撶畻 + List<StoreSettlementDay> storeList = storeDetailService.getAllSettlementStore(); //鑾峰彇褰撳墠鏃堕棿 DateTime endTime = DateUtil.date(); -- Gitblit v1.8.0