Commit 43cb8b1f2163f0e052eab5e5dc3b23d9c9c8f154
1 parent
6695aeeb
【功能完善】商城: 客服
Showing
5 changed files
with
19 additions
and
7 deletions
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/history/ProductBrowseHistoryController.java
| @@ -51,7 +51,8 @@ public class ProductBrowseHistoryController { | @@ -51,7 +51,8 @@ public class ProductBrowseHistoryController { | ||
| 51 | convertSet(pageResult.getList(), ProductBrowseHistoryDO::getSpuId)); | 51 | convertSet(pageResult.getList(), ProductBrowseHistoryDO::getSpuId)); |
| 52 | return success(BeanUtils.toBean(pageResult, ProductBrowseHistoryRespVO.class, | 52 | return success(BeanUtils.toBean(pageResult, ProductBrowseHistoryRespVO.class, |
| 53 | vo -> Optional.ofNullable(spuMap.get(vo.getSpuId())) | 53 | vo -> Optional.ofNullable(spuMap.get(vo.getSpuId())) |
| 54 | - .ifPresent(spu -> vo.setSpuName(spu.getName()).setPicUrl(spu.getPicUrl()).setPrice(spu.getPrice())))); | 54 | + .ifPresent(spu -> vo.setSpuName(spu.getName()).setPicUrl(spu.getPicUrl()).setPrice(spu.getPrice()) |
| 55 | + .setSalesCount(spu.getSalesCount()).setStock(spu.getStock())))); | ||
| 55 | } | 56 | } |
| 56 | 57 | ||
| 57 | } | 58 | } |
| 58 | \ No newline at end of file | 59 | \ No newline at end of file |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/history/vo/ProductBrowseHistoryRespVO.java
| 1 | package cn.iocoder.yudao.module.product.controller.admin.history.vo; | 1 | package cn.iocoder.yudao.module.product.controller.admin.history.vo; |
| 2 | 2 | ||
| 3 | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | 3 | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
| 4 | -import com.alibaba.excel.annotation.ExcelProperty; | ||
| 5 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | 6 | ||
| 8 | -import java.time.LocalDateTime; | ||
| 9 | - | ||
| 10 | import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; | 7 | import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; |
| 11 | 8 | ||
| 12 | @Schema(description = "管理后台 - 商品浏览记录 Response VO") | 9 | @Schema(description = "管理后台 - 商品浏览记录 Response VO") |
| @@ -31,4 +28,10 @@ public class ProductBrowseHistoryRespVO { | @@ -31,4 +28,10 @@ public class ProductBrowseHistoryRespVO { | ||
| 31 | @Schema(description = "商品单价", example = "100") | 28 | @Schema(description = "商品单价", example = "100") |
| 32 | private Integer price; | 29 | private Integer price; |
| 33 | 30 | ||
| 31 | + @Schema(description = "商品销量", example = "100") | ||
| 32 | + private Integer salesCount; | ||
| 33 | + | ||
| 34 | + @Schema(description = "库存", example = "100") | ||
| 35 | + private Integer stock; | ||
| 36 | + | ||
| 34 | } | 37 | } |
| 35 | \ No newline at end of file | 38 | \ No newline at end of file |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/history/AppProductBrowseHistoryController.java
| @@ -71,7 +71,8 @@ public class AppProductBrowseHistoryController { | @@ -71,7 +71,8 @@ public class AppProductBrowseHistoryController { | ||
| 71 | Map<Long, ProductSpuDO> spuMap = convertMap(productSpuService.getSpuList(spuIds), ProductSpuDO::getId); | 71 | Map<Long, ProductSpuDO> spuMap = convertMap(productSpuService.getSpuList(spuIds), ProductSpuDO::getId); |
| 72 | return success(BeanUtils.toBean(pageResult, AppProductBrowseHistoryRespVO.class, | 72 | return success(BeanUtils.toBean(pageResult, AppProductBrowseHistoryRespVO.class, |
| 73 | vo -> Optional.ofNullable(spuMap.get(vo.getSpuId())) | 73 | vo -> Optional.ofNullable(spuMap.get(vo.getSpuId())) |
| 74 | - .ifPresent(spu -> vo.setSpuName(spu.getName()).setPicUrl(spu.getPicUrl()).setPrice(spu.getPrice())))); | 74 | + .ifPresent(spu -> vo.setSpuName(spu.getName()).setPicUrl(spu.getPicUrl()).setPrice(spu.getPrice()) |
| 75 | + .setSalesCount(spu.getSalesCount()).setStock(spu.getStock())))); | ||
| 75 | } | 76 | } |
| 76 | 77 | ||
| 77 | } | 78 | } |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/history/vo/AppProductBrowseHistoryRespVO.java
| @@ -26,4 +26,11 @@ public class AppProductBrowseHistoryRespVO { | @@ -26,4 +26,11 @@ public class AppProductBrowseHistoryRespVO { | ||
| 26 | @Schema(description = "商品单价", example = "100") | 26 | @Schema(description = "商品单价", example = "100") |
| 27 | private Integer price; | 27 | private Integer price; |
| 28 | 28 | ||
| 29 | + @Schema(description = "商品销量", example = "100") | ||
| 30 | + private Integer salesCount; | ||
| 31 | + | ||
| 32 | + @Schema(description = "库存", example = "100") | ||
| 33 | + private Integer stock; | ||
| 34 | + | ||
| 35 | + | ||
| 29 | } | 36 | } |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/service/kefu/KeFuMessageServiceImpl.java
| @@ -112,9 +112,9 @@ public class KeFuMessageServiceImpl implements KeFuMessageService { | @@ -112,9 +112,9 @@ public class KeFuMessageServiceImpl implements KeFuMessageService { | ||
| 112 | // 2.3 发送消息通知会员,管理员已读 -> 会员更新发送的消息状态 | 112 | // 2.3 发送消息通知会员,管理员已读 -> 会员更新发送的消息状态 |
| 113 | KeFuMessageDO keFuMessage = getFirst(filterList(messageList, message -> UserTypeEnum.MEMBER.getValue().equals(message.getSenderType()))); | 113 | KeFuMessageDO keFuMessage = getFirst(filterList(messageList, message -> UserTypeEnum.MEMBER.getValue().equals(message.getSenderType()))); |
| 114 | assert keFuMessage != null; // 断言避免警告 | 114 | assert keFuMessage != null; // 断言避免警告 |
| 115 | - getSelf().sendAsyncMessageToMember(keFuMessage.getSenderId(), KEFU_MESSAGE_ADMIN_READ, conversation); | 115 | + getSelf().sendAsyncMessageToMember(keFuMessage.getSenderId(), KEFU_MESSAGE_ADMIN_READ, conversation.getId()); |
| 116 | // 2.4 通知所有管理员消息已读 | 116 | // 2.4 通知所有管理员消息已读 |
| 117 | - getSelf().sendAsyncMessageToAdmin(KEFU_MESSAGE_ADMIN_READ, conversation); | 117 | + getSelf().sendAsyncMessageToAdmin(KEFU_MESSAGE_ADMIN_READ, conversation.getId()); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | private void validateReceiverExist(Long receiverId, Integer receiverType) { | 120 | private void validateReceiverExist(Long receiverId, Integer receiverType) { |