From b414617794d2223c115faf15121efa750003a665 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期二, 14 一月 2025 20:39:18 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderPageListVo.java | 4 ++++
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java | 12 ++++++++----
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java | 6 +++++-
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopPointServiceImpl.java | 2 +-
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java | 11 ++++++-----
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml | 1 +
6 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
index e3d535c..694eda2 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -131,8 +131,8 @@
@ApiImplicitParams({
@ApiImplicitParam(value = "订单id", name = "id", required = true, dataType = "String"),
})
- @GetMapping("/writeOff/{id}/{shopId}/{technicianId}")
- public R<Void> writeOff(@PathVariable("id") String id, @PathVariable("shopId") Integer shopId, @PathVariable("technicianId") Integer technicianId){
+ @GetMapping("/writeOff/{id}/{shopId}")
+ public R<Void> writeOff(@PathVariable("id") String id, @PathVariable("shopId") Integer shopId, Integer technicianId){
orderService.writeOff(id, shopId, technicianId);
return R.ok();
}
@@ -301,8 +301,12 @@
.orderByAsc(Order::getCreateTime));
- Map<String, List<Order>> map = orderList.stream().collect(Collectors.groupingBy(item -> item.getCreateTime()
- .format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))));
+ Map<String, List<Order>> map = orderList.stream()
+ .collect(Collectors.groupingBy(
+ item -> item.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")),
+ TreeMap::new, // 使用 TreeMap 按键排序
+ Collectors.toList()
+ ));
List<OrderStatisticsDetail> orderStatisticsDetails = new ArrayList<>();
map.forEach((key, value) -> {
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
index 73e860a..68e163e 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -330,8 +330,12 @@
}
// RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderPageListVo.getId()).eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1"));
RefundPass one = refundPassService.lambdaQuery().eq(RefundPass::getOrderId, orderPageListVo.getId()).one();
-
orderPageListVo.setRefundPassId(null != one ? one.getId().toString() : null);
+
+ // 平台分佣
+ List<ShopBalanceStatement> data = shopBalanceStatementClient.getShopBalanceStatementList(Arrays.asList(1, 2, 3), Long.valueOf(orderPageListVo.getId())).getData();
+ BigDecimal reduce = data.stream().map(ShopBalanceStatement::getVariableAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+ orderPageListVo.setGetCommission(reduce);
}
return pageInfo.setRecords(list);
}
diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderPageListVo.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderPageListVo.java
index 152ef52..7e4070c 100644
--- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderPageListVo.java
+++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderPageListVo.java
@@ -37,6 +37,8 @@
private Integer status;
@ApiModelProperty("配送方式(1=自提,2=快递)")
private Integer distributionMode;
+ @ApiModelProperty("获得分佣")
+ private BigDecimal getCommission;
/**
* 用户id
*/
@@ -44,6 +46,8 @@
@ApiModelProperty("售后订单id")
private String refundPassId;
+ private Integer shopId;
+
public BigDecimal getGetPoint(){
return point;
}
diff --git a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
index 70f2159..02ed969 100644
--- a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
+++ b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
@@ -61,6 +61,7 @@
total_amount as orderMoney,
point,
order_status as status,
+ shop_id,
distribution_mode as distributionMode
from t_order where del_flag = 0 and pay_status = 2
<if test="null != item.code and '' != item.code">
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
index 0831a8d..5097827 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShareController.java
@@ -152,11 +152,12 @@
if(sysUser.getRoleType() == 2){
share.setObjectId(sysUser.getObjectId().longValue());
}
- if (sysUser.getRoleType() == 1){
- share.setAuditStatus(ShareAuditStatus.SUCCESS.getCode());
- }else{
- share.setAuditStatus(ShareAuditStatus.WAIT.getCode());
- }
+// if (sysUser.getRoleType() == 1){
+// share.setAuditStatus(ShareAuditStatus.SUCCESS.getCode());
+// }else{
+// share.setAuditStatus(ShareAuditStatus.WAIT.getCode());
+// }
+ share.setAuditStatus(ShareAuditStatus.WAIT.getCode());
share.setDelFlag(0);
shareService.save(share);
return R.ok();
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopPointServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopPointServiceImpl.java
index 9ff2204..d0ebce5 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopPointServiceImpl.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopPointServiceImpl.java
@@ -52,7 +52,7 @@
SysUser sysUser = sysUserClient.getSysUser(userid).getData();
List<Shop> shopList = shopService.list(new LambdaQueryWrapper<Shop>()
- .eq(Shop::getAppUserId,sysUser.getAppUserId()));
+ .eq(Shop::getAppUserId,sysUser.getObjectId()));
Integer sPoint = 0;
Integer shopCommissionPoint = 0;
Integer subShopCommissionPoint = 0;
--
Gitblit v1.7.1