From 6de437634cdea0872519883808885915b1d89008 Mon Sep 17 00:00:00 2001 From: sonjinyon <2476687577@qq.com> Date: Wed, 16 Oct 2024 14:35:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A7=AF=E5=88=86=E5=95=86?= =?UTF-8?q?=E5=9F=8E=E8=AE=A2=E5=8D=95=E6=8F=90=E4=BA=A4=E6=8A=A5=E9=94=99?= =?UTF-8?q?,=E5=A2=9E=E5=8A=A0=E5=90=8E=E5=8F=B0=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/mall/promotion/pointorder/index.ts | 49 ++++ .../kefu/components/KeFuConversationList.vue | 22 +- .../kefu/components/KeFuMessageList.vue | 20 +- .../history/MemberBrowsingHistory.vue | 4 +- .../history/ProductBrowsingHistory.vue | 1 + .../kefu/components/message/OrderItem.vue | 45 ++- .../kefu/components/message/ProductItem.vue | 28 +- .../promotion/kefu/components/tools/emoji.ts | 11 +- .../src/views/mall/promotion/kefu/index.vue | 199 +++++++------ .../promotion/pointorder/PointOrderForm.vue | 123 ++++++++ .../views/mall/promotion/pointorder/index.vue | 220 ++++++++++++++ .../mybatis/core/mapper/BaseMapperX.java | 4 +- .../mybatis/core/util/JdbcUtils.java | 20 +- .../api/spu/dto/ProductSpuRespDTO.java | 9 + .../promotion/api/coupon/CouponApi.java | 10 + .../api/reward/RewardActivityApi.java | 2 + .../dto/RewardActivityMatchRespDTO.java | 63 +++- .../promotion/enums/ErrorCodeConstants.java | 3 + .../common/PromotionProductScopeEnum.java | 21 +- .../promotion/api/coupon/CouponApiImpl.java | 7 + .../api/discount/DiscountActivityApiImpl.java | 6 +- .../pointorder/PointOrderController.java | 95 ++++++ .../pointorder/vo/PointOrderPageReqVO.java | 41 +++ .../admin/pointorder/vo/PointOrderRespVO.java | 53 ++++ .../pointorder/vo/PointOrderSaveReqVO.java | 35 +++ .../dataobject/pointorder/PointOrderDO.java | 71 +++++ .../mysql/discount/DiscountProductMapper.java | 11 + .../mysql/pointorder/PointOrderMapper.java | 32 ++ .../service/pointorder/PointOrderService.java | 55 ++++ .../pointorder/PointOrderServiceImpl.java | 100 +++++++ .../trade/enums/ErrorCodeConstants.java | 4 + .../trade/enums/MessageTemplateConstants.java | 2 + .../enums/order/TradeOrderCancelTypeEnum.java | 4 +- .../trade/enums/order/TradeOrderTypeEnum.java | 6 +- .../yudao-module-trade-biz/pom.xml | 5 + .../aftersale/TradeAfterSaleController.http | 33 --- .../admin/order/TradeOrderController.java | 103 +------ .../app/cart/AppCartController.http | 42 --- .../app/order/AppTradeOrderController.http | 5 + .../app/order/AppTradeOrderController.java | 79 ++--- .../app/order/vo/AppPointOrderVO.java | 18 ++ .../vo/AppTradeOrderSettlementReqVO.java | 6 +- .../vo/AppTradeOrderSettlementRespVO.java | 56 +++- .../vo/AppTradeProductSettlementRespVO.java | 81 ++++++ .../convert/order/TradeOrderConvert.java | 4 +- .../dal/dataobject/order/TradeOrderDO.java | 30 ++ .../dataobject/order/TradeOrderItemDO.java | 2 + .../dal/mysql/order/TradeOrderMapper.java | 9 + .../client/impl/ExpressClientFactoryImpl.java | 2 +- .../service/order/TradeOrderQueryService.java | 6 + .../order/TradeOrderQueryServiceImpl.java | 11 + .../order/TradeOrderUpdateService.java | 10 + .../order/TradeOrderUpdateServiceImpl.java | 73 +++-- .../handler/TradeMemberPointOrderHandler.java | 8 +- .../order/handler/TradePointOrderHandler.java | 71 +++++ .../service/price/TradePriceService.java | 12 +- .../service/price/TradePriceServiceImpl.java | 33 ++- .../price/bo/TradePriceCalculateReqBO.java | 6 +- .../price/bo/TradePriceCalculateRespBO.java | 102 ++++++- ...adeCombinationActivityPriceCalculator.java | 1 - .../TradeCouponPriceCalculator.java | 86 ++++-- .../TradeDeliveryPriceCalculator.java | 26 +- .../TradeDiscountActivityPriceCalculator.java | 114 ++++++-- .../TradeMemberLevelPriceCalculator.java | 176 +++++------ .../TradePointActivityPriceCalculator.java | 95 ++++++ .../TradePointUsePriceCalculator.java | 70 ++--- .../calculator/TradePriceCalculator.java | 1 + .../TradePriceCalculatorHelper.java | 43 +-- .../TradeRewardActivityPriceCalculator.java | 7 +- .../TradeSeckillActivityPriceCalculator.java | 1 + .../price/TradePriceServiceImplTest.java | 274 +++++++++--------- .../TradeMemberLevelPriceCalculatorTest.java | 236 +++++++-------- .../SocialWxaSubscribeMessageSendReqDTO.java | 61 ++++ .../SocialWxaSubscribeTemplateRespDTO.java | 42 +++ .../system/enums/ErrorCodeConstants.java | 3 +- 75 files changed, 2510 insertions(+), 909 deletions(-) create mode 100644 yudao-admin-vue3/src/api/mall/promotion/pointorder/index.ts create mode 100644 yudao-admin-vue3/src/views/mall/promotion/pointorder/PointOrderForm.vue create mode 100644 yudao-admin-vue3/src/views/mall/promotion/pointorder/index.vue create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/pointorder/PointOrderController.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/pointorder/vo/PointOrderPageReqVO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/pointorder/vo/PointOrderRespVO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/pointorder/vo/PointOrderSaveReqVO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/pointorder/PointOrderDO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/mysql/pointorder/PointOrderMapper.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/pointorder/PointOrderService.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/pointorder/PointOrderServiceImpl.java delete mode 100644 yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/aftersale/TradeAfterSaleController.http delete mode 100644 yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/AppCartController.http create mode 100644 yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppPointOrderVO.java create mode 100644 yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/AppTradeProductSettlementRespVO.java create mode 100644 yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradePointOrderHandler.java create mode 100644 yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/price/calculator/TradePointActivityPriceCalculator.java create mode 100644 yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxaSubscribeMessageSendReqDTO.java create mode 100644 yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/api/social/dto/SocialWxaSubscribeTemplateRespDTO.java diff --git a/yudao-admin-vue3/src/api/mall/promotion/pointorder/index.ts b/yudao-admin-vue3/src/api/mall/promotion/pointorder/index.ts new file mode 100644 index 0000000..2e34857 --- /dev/null +++ b/yudao-admin-vue3/src/api/mall/promotion/pointorder/index.ts @@ -0,0 +1,49 @@ +import request from '@/config/axios' + +// 兑换记录 VO +export interface PointOrderVO { + id: number // id + orderNumber: string // 订单号 + userId: number // 用户id + productId: number // 商品id + integral: number // 兑换积分 + orderStatus: number // 订单状态 + orderTime: Date // 下单时间 + userName: string + productName: string + imageUrl: string + +} + +// 兑换记录 API +export const PointOrderApi = { + // 查询兑换记录分页 + getPointOrderPage: async (params: any) => { + return await request.get({ url: `/promotion/point-order/page`, params }) + }, + + // 查询兑换记录详情 + getPointOrder: async (id: number) => { + return await request.get({ url: `/promotion/point-order/get?id=` + id }) + }, + + // 新增兑换记录 + createPointOrder: async (data: PointOrderVO) => { + return await request.post({ url: `/promotion/point-order/create`, data }) + }, + + // 修改兑换记录 + updatePointOrder: async (data: PointOrderVO) => { + return await request.put({ url: `/promotion/point-order/update`, data }) + }, + + // 删除兑换记录 + deletePointOrder: async (id: number) => { + return await request.delete({ url: `/promotion/point-order/delete?id=` + id }) + }, + + // 导出兑换记录 Excel + exportPointOrder: async (params) => { + return await request.download({ url: `/promotion/point-order/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuConversationList.vue b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuConversationList.vue index 60188f3..6e01123 100644 --- a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuConversationList.vue +++ b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuConversationList.vue @@ -22,8 +22,8 @@
{{ item.userNickname }} - - {{ formatPast(item.lastMessageTime, 'YYYY-mm-dd') }} + + {{ formatPast(item.lastMessageTime, 'YYYY-MM-DD') }}
@@ -31,8 +31,9 @@ v-dompurify-html=" getConversationDisplayText(item.lastMessageContentType, item.lastMessageContent) " - class="last-message flex items-center color-[#989EA6]" - >
+ class="last-message flex items-center color-[var(--left-menu-text-color)]" + > + @@ -182,7 +183,7 @@ watch(showRightMenu, (val) => { &-conversation { height: 60px; padding: 10px; - background-color: #fff; + //background-color: #fff; transition: border-left 0.05s ease-in-out; /* 设置过渡效果 */ .username { @@ -196,6 +197,7 @@ watch(showRightMenu, (val) => { } .last-message { + font-size: 13px; width: 200px; overflow: hidden; // 隐藏超出的文本 white-space: nowrap; // 禁止换行 @@ -205,17 +207,17 @@ watch(showRightMenu, (val) => { .active { border-left: 5px #3271ff solid; - background-color: #eff0f1; + background-color: var(--login-bg-color); } .pinned { - background-color: #eff0f1; + background-color: var(--left-menu-bg-active-color); } .right-menu-ul { position: absolute; - background-color: #fff; - padding: 10px; + background-color: var(--app-content-bg-color); + padding: 5px; margin: 0; list-style-type: none; /* 移除默认的项目符号 */ border-radius: 12px; @@ -228,7 +230,7 @@ watch(showRightMenu, (val) => { border-radius: 12px; transition: background-color 0.3s; /* 平滑过渡 */ &:hover { - background-color: #e0e0e0; /* 悬停时的背景颜色 */ + background-color: var(--left-menu-bg-active-color); /* 悬停时的背景颜色 */ } } } diff --git a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuMessageList.vue b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuMessageList.vue index d3632e6..483fdc2 100644 --- a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuMessageList.vue +++ b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/KeFuMessageList.vue @@ -71,6 +71,7 @@ @@ -369,9 +370,10 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { position: absolute; bottom: 35px; right: 35px; - background-color: #fff; + background-color: var(--app-content-bg-color); padding: 10px; border-radius: 30px; + font-size: 12px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果 */ } @@ -392,7 +394,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { border-left: 5px solid transparent; border-bottom: 5px solid transparent; border-top: 5px solid transparent; - border-right: 5px solid #ffffff; + border-right: 5px solid var(--app-content-bg-color); } } } @@ -411,7 +413,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { right: -19px; top: calc(50% - 10px); position: absolute; - border-left: 5px solid #ffffff; + border-left: 5px solid var(--app-content-bg-color); border-bottom: 5px solid transparent; border-top: 5px solid transparent; border-right: 5px solid transparent; @@ -421,9 +423,9 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { // 消息气泡 .kefu-message { - color: #333; + color: #a9a9a9; border-radius: 5px; - box-shadow: 3px 5px 15px rgba(0, 0, 0, 0.2); + box-shadow: 3px 3px 5px rgba(220, 220, 220, 0.1); padding: 5px 10px; width: auto; max-width: 50%; @@ -431,7 +433,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { display: inline-block !important; position: relative; word-break: break-all; - background-color: #ffffff; + background-color: var(--app-content-bg-color); transition: all 0.2s; &:hover { @@ -445,7 +447,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { border-radius: 12rpx; padding: 8rpx 16rpx; margin-bottom: 16rpx; - background-color: #e8e8e8; + //background-color: #e8e8e8; color: #999; font-size: 24rpx; } @@ -453,7 +455,7 @@ const showTime = computed(() => (item: KeFuMessageRespVO, index: number) => { .chat-tools { width: 100%; - border: #e4e0e0 solid 1px; + border: var(--el-border-color) solid 1px; border-radius: 10px; height: 44px; } diff --git a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue index 972760e..52c1095 100644 --- a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue +++ b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue @@ -7,7 +7,7 @@
- + @@ -25,7 +25,7 @@ import OrderBrowsingHistory from './OrderBrowsingHistory.vue' import { KeFuConversationRespVO } from '@/api/mall/promotion/kefu/conversation' import { isEmpty } from '@/utils/is' import { debounce } from 'lodash-es' -import { ElScrollbar as ElScrollbarType } from 'element-plus/es/components/scrollbar' +import { ElScrollbar as ElScrollbarType } from 'element-plus/es/components/scrollbar/index' defineOptions({ name: 'MemberBrowsingHistory' }) diff --git a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue index c9bff18..8bc4aea 100644 --- a/yudao-admin-vue3/src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue +++ b/yudao-admin-vue3/src/views/mall/promotion/kefu/components/history/ProductBrowsingHistory.vue @@ -1,6 +1,7 @@