Browse Source

Merge remote-tracking branch 'origin/dev' into dev

zuy 2 năm trước cách đây
mục cha
commit
e90d5df371
20 tập tin đã thay đổi với 561 bổ sung10 xóa
  1. 2 1
      admin-web/src/views/admin/account/index.vue
  2. 51 0
      admin/src/main/java/com/kym/admin/controller/InvestorInfoController.java
  3. 35 0
      admin/src/main/java/com/kym/admin/controller/StatementsController.java
  4. 78 0
      entity/src/main/java/com/kym/entity/admin/InvestorInfo.java
  5. 146 0
      entity/src/main/java/com/kym/entity/admin/Statements.java
  6. 15 2
      entity/src/main/java/com/kym/entity/admin/StationStatDay.java
  7. 15 0
      entity/src/main/java/com/kym/entity/admin/StationStatMonth.java
  8. 1 0
      entity/src/main/java/com/kym/entity/admin/vo/CustomUserVo.java
  9. 16 0
      mapper/src/main/java/com/kym/mapper/admin/InvestorInfoMapper.java
  10. 16 0
      mapper/src/main/java/com/kym/mapper/admin/StatementsMapper.java
  11. 28 0
      mapper/src/main/resources/mappers/admin/InvestorInfoMapper.xml
  12. 38 0
      mapper/src/main/resources/mappers/admin/StatementsMapper.xml
  13. 4 1
      mapper/src/main/resources/mappers/admin/StationStatDayMapper.xml
  14. 4 1
      mapper/src/main/resources/mappers/admin/StationStatMonthMapper.xml
  15. 20 0
      service/src/main/java/com/kym/service/admin/InvestorInfoService.java
  16. 17 0
      service/src/main/java/com/kym/service/admin/StatementsService.java
  17. 0 5
      service/src/main/java/com/kym/service/admin/impl/ActivityServiceImpl.java
  18. 33 0
      service/src/main/java/com/kym/service/admin/impl/InvestorInfoServiceImpl.java
  19. 40 0
      service/src/main/java/com/kym/service/admin/impl/StatementsServiceImpl.java
  20. 2 0
      service/src/main/java/com/kym/service/miniapp/impl/UserServiceImpl.java

+ 2 - 1
admin-web/src/views/admin/account/index.vue

@@ -88,7 +88,7 @@
             :show-overflow-tooltip="!field.fixed&&field.width>150"
         >
           <template #default="{row}">
-            <template v-if="['rechargeAmount','totalMoney','refundAmount','balance','payAmount','discountAmount','refundDiscountAmount'].includes(field.prop)">
+            <template v-if="['rechargeAmount','totalMoney','refundAmount','balance','frozenAmount','payAmount','discountAmount','refundDiscountAmount'].includes(field.prop)">
               {{ u.fmt.fmtMoney(row[field.prop]) }}
             </template>
             <template v-else-if="'status'===field.prop">
@@ -155,6 +155,7 @@ const state = reactive({
       // {label: '用户名',width: 150,  prop: 'userName', resizable: true, fixed: 'left'},
       {label: '手机号', width: 120, prop: 'mobilePhone', resizable: true, fixed: 'left'},
       {label: '余额', width: 80, prop: 'balance', resizable: true, fixed: 'left'},
+      {label: '冻结余额', width: 90, prop: 'frozenAmount', resizable: true, fixed: 'left'},
       {label: '状态', width: 80, prop: 'status', align: 'center'},
       {label: '注册时间', width: 160, prop: 'registerTime', resizable: true},
       {label: '充值次数', width: 90, prop: 'rechargeTimes', resizable: true},

+ 51 - 0
admin/src/main/java/com/kym/admin/controller/InvestorInfoController.java

@@ -0,0 +1,51 @@
+package com.kym.admin.controller;
+
+import com.kym.common.R;
+import com.kym.entity.admin.InvestorInfo;
+import com.kym.entity.admin.queryParams.CommonQueryParam;
+import com.kym.service.admin.InvestorInfoService;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * <p>
+ * 投资者-物业信息表 前端控制器
+ * </p>
+ *
+ * @author skyline
+ * @since 2023-12-27
+ */
+@RestController
+@RequestMapping("/investorInfo")
+public class InvestorInfoController {
+
+    private InvestorInfoService investorInfoService;
+
+    public InvestorInfoController(InvestorInfoService investorInfoService) {
+        this.investorInfoService = investorInfoService;
+    }
+
+    /**
+     * 新增
+     *
+     * @param investorInfo
+     */
+    @PostMapping("/create")
+    R<?> create(@RequestBody InvestorInfo investorInfo) {
+        investorInfoService.save(investorInfo);
+        return R.success();
+    }
+
+    // 修改
+    @PostMapping("/update")
+    R<?> update(@RequestBody InvestorInfo investorInfo) {
+        investorInfoService.updateById(investorInfo);
+        return R.success();
+    }
+
+    // 查询详情
+    @GetMapping("/list")
+    R<?> list(@ModelAttribute CommonQueryParam params) {
+        return R.success(investorInfoService.list(params));
+    }
+
+}

+ 35 - 0
admin/src/main/java/com/kym/admin/controller/StatementsController.java

@@ -0,0 +1,35 @@
+package com.kym.admin.controller;
+
+import com.kym.common.R;
+import com.kym.entity.admin.Statements;
+import com.kym.service.admin.StatementsService;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 客户对账单 前端控制器
+ * </p>
+ *
+ * @author skyline
+ * @since 2023-12-27
+ */
+@RestController
+@RequestMapping("/statements")
+public class StatementsController {
+
+    private  final StatementsService statementsService;
+
+    public StatementsController(StatementsService statementsService) {
+        this.statementsService = statementsService;
+    }
+
+    @PostMapping("/create")
+    R<?> create(@RequestBody Statements statements) {
+        statementsService.createStatements(statements);
+        return R.success();
+    }
+
+}

+ 78 - 0
entity/src/main/java/com/kym/entity/admin/InvestorInfo.java

@@ -0,0 +1,78 @@
+package com.kym.entity.admin;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.kym.entity.BaseEntity;
+import java.io.Serializable;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 投资者-物业信息表
+ * </p>
+ *
+ * @author skyline
+ * @since 2023-12-27
+ */
+@Getter
+@Setter
+@TableName("t_investor_info")
+public class InvestorInfo extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 客户用户id
+     */
+    private Long adminUserId;
+
+    /**
+     * 客户姓名
+     */
+    private String adminUserName;
+
+    /**
+     * 站点id
+     */
+    private String stationId;
+
+    /**
+     * 增值税率 0.06表示6%
+     */
+    private Double vatRate;
+
+    /**
+     * 分成比例 0.45表示45%
+     */
+    private Double splittingProportion;
+
+    /**
+     * 账户名
+     */
+    private String accountName;
+
+    /**
+     * 电话号码
+     */
+    private String telephone;
+
+    /**
+     * 开户行名称
+     */
+    private String bankName;
+
+    /**
+     * 银行卡号
+     */
+    private String bankCardNo;
+
+    /**
+     * 状态:0-无效,1-有效
+     */
+    private Byte status;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}

+ 146 - 0
entity/src/main/java/com/kym/entity/admin/Statements.java

@@ -0,0 +1,146 @@
+package com.kym.entity.admin;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.kym.entity.BaseEntity;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.experimental.Accessors;
+
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 客户对账单
+ * </p>
+ *
+ * @author skyline
+ * @since 2023-12-27
+ */
+@Getter
+@Setter
+@TableName("t_statements")
+@Accessors(chain = true)
+public class Statements extends BaseEntity {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 客户用户id
+     */
+    private Long adminUserId;
+
+    /**
+     * 客户姓名
+     */
+    private String adminUserName;
+
+    /**
+     * 站点id
+     */
+    private String stationId;
+
+    /**
+     * 站点名称
+     */
+    private String stationName;
+
+    /**
+     * 开始时间
+     */
+    private LocalDateTime startTime;
+
+    /**
+     * 结束时间
+     */
+    private LocalDateTime endTime;
+
+    /**
+     * 订单电量
+     */
+    private Double totalPower;
+
+    /**
+     * 实际抄表电量
+     */
+    private Double actualPower;
+
+    /**
+     * 电损电量
+     */
+    private Double elecLossPower;
+
+    /**
+     * 订单金额(分)
+     */
+    private Integer totalMoney;
+
+    /**
+     * 订单电费金额(分)
+     */
+    private Integer elecMoney;
+
+    /**
+     * 实际抄表电费金额(分)
+     */
+    private Integer actualElecMoney;
+
+    /**
+     * 电损电费金额(分)
+     */
+    private Integer elecLossMoney;
+
+    /**
+     * 服务费金额(分)
+     */
+    private Integer serviceMoney;
+
+    /**
+     * 优惠金额(分)
+     */
+    private Integer discountAmount;
+
+    /**
+     * 服务费优惠金额(分)
+     */
+    private Integer serviceMoneyDiscount;
+
+    /**
+     * 实际参与分成的服务费(分)
+     */
+    private Integer actualServiceMoney;
+
+    /**
+     * 分成比例 0.45表示45%
+     */
+    private Double splittingProportion;
+
+    /**
+     * 分成金额(分)
+     */
+    private Integer splittingAmount;
+
+    /**
+     * 增值税率 0.06表示6%
+     */
+    private Double vatRate;
+
+    /**
+     * 增值税额(分)
+     */
+    private Integer vatAmount;
+
+    /**
+     * 实际分成金额
+     */
+    private Integer actualSplittingAmount;
+
+    /**
+     * 状态:0-无效,1-有效
+     */
+    private Byte status;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}

+ 15 - 2
entity/src/main/java/com/kym/entity/admin/StationStatDay.java

@@ -2,8 +2,6 @@ package com.kym.entity.admin;
 
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.kym.entity.BaseEntity;
-import java.io.Serializable;
-import java.time.LocalDate;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.experimental.Accessors;
@@ -64,6 +62,16 @@ public class StationStatDay extends BaseEntity {
      */
     private Integer serviceMoney;
 
+    /**
+     * 服务费优惠金额
+     */
+    private Integer serviceMoneyDiscount;
+
+    /**
+     * 总优惠金额
+     */
+    private Integer discountAmount;
+
     /**
      * 订单平均充电量
      */
@@ -78,4 +86,9 @@ public class StationStatDay extends BaseEntity {
      * 单枪平均日充电量
      */
     private Double avgConnectorElec;
+
+    /**
+     * 设备使用率
+     */
+    private Double connectorUsageRate;
 }

+ 15 - 0
entity/src/main/java/com/kym/entity/admin/StationStatMonth.java

@@ -64,6 +64,16 @@ public class StationStatMonth extends BaseEntity {
      */
     private Integer serviceMoney;
 
+    /**
+     * 服务费优惠金额
+     */
+    private Integer serviceMoneyDiscount;
+
+    /**
+     * 总优惠金额
+     */
+    private Integer discountAmount;
+
     /**
      * 订单平均充电量
      */
@@ -78,4 +88,9 @@ public class StationStatMonth extends BaseEntity {
      * 单枪平均日充电量
      */
     private Double avgConnectorElec;
+
+    /**
+     * 设备使用率
+     */
+    private Double connectorUsageRate;
 }

+ 1 - 0
entity/src/main/java/com/kym/entity/admin/vo/CustomUserVo.java

@@ -28,6 +28,7 @@ public class CustomUserVo {
     private int payAmount;
     private int discountAmount;
     private int balance;
+    private int frozenAmount;
     private Long refundTimes;
     private int refundAmount;
     /**

+ 16 - 0
mapper/src/main/java/com/kym/mapper/admin/InvestorInfoMapper.java

@@ -0,0 +1,16 @@
+package com.kym.mapper.admin;
+
+import com.kym.entity.admin.InvestorInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 投资者-物业信息表 Mapper 接口
+ * </p>
+ *
+ * @author skyline
+ * @since 2023-12-27
+ */
+public interface InvestorInfoMapper extends BaseMapper<InvestorInfo> {
+
+}

+ 16 - 0
mapper/src/main/java/com/kym/mapper/admin/StatementsMapper.java

@@ -0,0 +1,16 @@
+package com.kym.mapper.admin;
+
+import com.kym.entity.admin.Statements;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 客户对账单 Mapper 接口
+ * </p>
+ *
+ * @author skyline
+ * @since 2023-12-27
+ */
+public interface StatementsMapper extends BaseMapper<Statements> {
+
+}

+ 28 - 0
mapper/src/main/resources/mappers/admin/InvestorInfoMapper.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.kym.mapper.admin.InvestorInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.kym.entity.admin.InvestorInfo">
+        <result column="id" property="id" />
+        <result column="admin_user_id" property="adminUserId" />
+        <result column="admin_user_name" property="adminUserName" />
+        <result column="station_id" property="stationId" />
+        <result column="vat_rate" property="vatRate" />
+        <result column="splitting_proportion" property="splittingProportion" />
+        <result column="account_name" property="accountName" />
+        <result column="telephone" property="telephone" />
+        <result column="bank_name" property="bankName" />
+        <result column="bank_card_no" property="bankCardNo" />
+        <result column="status" property="status" />
+        <result column="remark" property="remark" />
+        <result column="create_time" property="createTime" />
+        <result column="update_time" property="updateTime" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id,admin_user_id, admin_user_name, station_id, vat_rate, splitting_proportion, account_name, telephone, bank_name, bank_card_no, status, remark,create_time,update_time
+    </sql>
+
+</mapper>

+ 38 - 0
mapper/src/main/resources/mappers/admin/StatementsMapper.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.kym.mapper.admin.StatementsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.kym.entity.admin.Statements">
+        <result column="admin_user_id" property="adminUserId" />
+        <result column="admin_user_name" property="adminUserName" />
+        <result column="station_id" property="stationId" />
+        <result column="station_name" property="stationName" />
+        <result column="start_time" property="startTime" />
+        <result column="end_time" property="endTime" />
+        <result column="total_power" property="totalPower" />
+        <result column="actual_power" property="actualPower" />
+        <result column="elec_loss_power" property="elecLossPower" />
+        <result column="total_money" property="totalMoney" />
+        <result column="elec_money" property="elecMoney" />
+        <result column="actual_elec_money" property="actualElecMoney" />
+        <result column="elec_loss_money" property="elecLossMoney" />
+        <result column="service_money" property="serviceMoney" />
+        <result column="discount_amount" property="discountAmount" />
+        <result column="service_money_discount" property="serviceMoneyDiscount" />
+        <result column="actual_service_money" property="actualServiceMoney" />
+        <result column="splitting_proportion" property="splittingProportion" />
+        <result column="splitting_amount" property="splittingAmount" />
+        <result column="vat_rate" property="vatRate" />
+        <result column="vat_amount" property="vatAmount" />
+        <result column="actual_splitting_amount" property="actualSplittingAmount" />
+        <result column="status" property="status" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        admin_user_id, admin_user_name, station_id, station_name, start_time, end_time, total_power, actual_power, elec_loss_power, total_money, elec_money, actual_elec_money, elec_loss_money, service_money, discount_amount, service_money_discount, actual_service_money, splitting_proportion, splitting_amount, vat_rate, vat_amount, actual_splitting_amount, status, remark
+    </sql>
+
+</mapper>

+ 4 - 1
mapper/src/main/resources/mappers/admin/StationStatDayMapper.xml

@@ -13,16 +13,19 @@
         <result column="total_money" property="totalMoney" />
         <result column="elec_money" property="elecMoney" />
         <result column="service_money" property="serviceMoney" />
+        <result column="service_money_discount" property="serviceMoneyDiscount" />
+        <result column="discount_amount" property="discountAmount" />
         <result column="avg_order_elec" property="avgOrderElec" />
         <result column="avg_order_money" property="avgOrderMoney" />
         <result column="avg_connector_elec" property="avgConnectorElec" />
+        <result column="connector_usage_rate" property="connectorUsageRate" />
         <result column="create_time" property="createTime" />
         <result column="update_time" property="updateTime" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id,station_id, stat_day, charge_users, valid_orders, total_power, total_money, elec_money, service_money, avg_order_elec, avg_order_money, avg_connector_elec,create_time, update_time
+        id,station_id, stat_day, charge_users, valid_orders, total_power, total_money, elec_money, service_money,service_money_discount,discount_amount, avg_order_elec, avg_order_money, avg_connector_elec,connector_usage_rate,create_time, update_time
     </sql>
 
 </mapper>

+ 4 - 1
mapper/src/main/resources/mappers/admin/StationStatMonthMapper.xml

@@ -13,16 +13,19 @@
         <result column="total_money" property="totalMoney" />
         <result column="elec_money" property="elecMoney" />
         <result column="service_money" property="serviceMoney" />
+        <result column="service_money_discount" property="serviceMoneyDiscount" />
+        <result column="discount_amount" property="discountAmount" />
         <result column="avg_order_elec" property="avgOrderElec" />
         <result column="avg_order_money" property="avgOrderMoney" />
         <result column="avg_connector_elec" property="avgConnectorElec" />
+        <result column="connector_usage_rate" property="connectorUsageRate" />
         <result column="create_time" property="createTime" />
         <result column="update_time" property="updateTime" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id,station_id, stat_month, charge_users, valid_orders, total_power, total_money, elec_money, service_money, avg_order_elec, avg_order_money, avg_connector_elec,create_time, update_time
+        id,station_id, stat_month, charge_users, valid_orders, total_power, total_money, elec_money, service_money,service_money_discount,discount_amount, avg_order_elec, avg_order_money, avg_connector_elec,connector_usage_rate,create_time, update_time
     </sql>
 
 </mapper>

+ 20 - 0
service/src/main/java/com/kym/service/admin/InvestorInfoService.java

@@ -0,0 +1,20 @@
+package com.kym.service.admin;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.kym.entity.admin.InvestorInfo;
+import com.kym.entity.admin.queryParams.CommonQueryParam;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 投资者-物业信息表 服务类
+ * </p>
+ *
+ * @author skyline
+ * @since 2023-12-27
+ */
+public interface InvestorInfoService extends IService<InvestorInfo> {
+
+    List<InvestorInfo> list(CommonQueryParam params);
+}

+ 17 - 0
service/src/main/java/com/kym/service/admin/StatementsService.java

@@ -0,0 +1,17 @@
+package com.kym.service.admin;
+
+import com.kym.entity.admin.Statements;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 客户对账单 服务类
+ * </p>
+ *
+ * @author skyline
+ * @since 2023-12-27
+ */
+public interface StatementsService extends IService<Statements> {
+
+    void createStatements(Statements statements);
+}

+ 0 - 5
service/src/main/java/com/kym/service/admin/impl/ActivityServiceImpl.java

@@ -45,11 +45,6 @@ import static com.kym.entity.admin.Activity.DISCOUNT_TYPE_服务费折扣权益;
 @Slf4j
 public class ActivityServiceImpl extends MPJBaseServiceImpl<ActivityMapper, Activity> implements ActivityService {
 
-    /**
-     * 线程池
-     */
-    private final ExecutorService executor = Executors.newFixedThreadPool(2);
-
     private final ActivityStationService activityStationService;
     private final RechargeRightsService rechargeRightsService;
     private final UserRechargeRightsService userRechargeRightsService;

+ 33 - 0
service/src/main/java/com/kym/service/admin/impl/InvestorInfoServiceImpl.java

@@ -0,0 +1,33 @@
+package com.kym.service.admin.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.kym.common.utils.CommUtil;
+import com.kym.entity.admin.InvestorInfo;
+import com.kym.entity.admin.queryParams.CommonQueryParam;
+import com.kym.mapper.admin.InvestorInfoMapper;
+import com.kym.service.admin.InvestorInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 投资者-物业信息表 服务实现类
+ * </p>
+ *
+ * @author skyline
+ * @since 2023-12-27
+ */
+@Service
+@DS("db-admin")
+public class InvestorInfoServiceImpl extends ServiceImpl<InvestorInfoMapper, InvestorInfo> implements InvestorInfoService {
+
+    @Override
+    public List<InvestorInfo> list(CommonQueryParam params) {
+        return lambdaQuery()
+                .like(CommUtil.isEmptyOrNull(params.getMobilePhone()),InvestorInfo::getTelephone, params.getMobilePhone())
+                .like(CommUtil.isEmptyOrNull(params.getUsername()),InvestorInfo::getAdminUserName, params.getUsername())
+                .list();
+    }
+}

+ 40 - 0
service/src/main/java/com/kym/service/admin/impl/StatementsServiceImpl.java

@@ -0,0 +1,40 @@
+package com.kym.service.admin.impl;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.kym.entity.admin.InvestorInfo;
+import com.kym.entity.admin.Statements;
+import com.kym.mapper.admin.StatementsMapper;
+import com.kym.service.admin.InvestorInfoService;
+import com.kym.service.admin.StatementsService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 客户对账单 服务实现类
+ * </p>
+ *
+ * @author skyline
+ * @since 2023-12-27
+ */
+@Service
+@DS("db-admin")
+public class StatementsServiceImpl extends ServiceImpl<StatementsMapper, Statements> implements StatementsService {
+
+    private final InvestorInfoService investorInfoService;
+
+    public StatementsServiceImpl(InvestorInfoService investorInfoService) {
+        this.investorInfoService = investorInfoService;
+    }
+
+    @Override
+    public void createStatements(Statements statements) {
+        var investmentInfo = investorInfoService.lambdaQuery().eq(InvestorInfo::getAdminUserId, statements.getAdminUserId()).one();
+        statements.setAdminUserName(investmentInfo.getAdminUserName())
+               .setStationId(statements.getStationId())
+                .setStationName(statements.getStationName())
+                .setVatRate(investmentInfo.getVatRate())
+                .setSplittingProportion(investmentInfo.getSplittingProportion());
+        // TODO: 2023-12-28 其他数据字段填充 
+    }
+}

+ 2 - 0
service/src/main/java/com/kym/service/miniapp/impl/UserServiceImpl.java

@@ -254,6 +254,7 @@ public class UserServiceImpl extends MPJBaseServiceImpl<UserMapper, User> implem
         // 用户余额,退款次数,退款金额
         var account = accountService.lambdaQuery().in(Account::getUserId, result.stream().map(CustomUserVo::getUserId).toList()).list();
         var user2Balance = account.stream().collect(Collectors.groupingBy(Account::getUserId, Collectors.summingInt(Account::getBalance)));
+        var user2FrozenAmount = account.stream().collect(Collectors.groupingBy(Account::getUserId, Collectors.summingInt(Account::getFrozenAmount)));
         var refund = refundLogService.lambdaQuery().in(RefundLog::getUserId, result.stream().map(CustomUserVo::getUserId).toList()).list();
         // refund按照用户维度计算退款次数和退款总金额
         var user2RefundAmount = refund.stream().collect(Collectors.groupingBy(RefundLog::getUserId, Collectors.summingInt(RefundLog::getRefund)));
@@ -263,6 +264,7 @@ public class UserServiceImpl extends MPJBaseServiceImpl<UserMapper, User> implem
         // 将用户余额,退款次数,退款金额放入result中
         var res = result.stream().peek(vo-> {
             vo.setBalance(user2Balance.getOrDefault(vo.getUserId(), 0));
+            vo.setFrozenAmount(user2FrozenAmount.getOrDefault(vo.getUserId(), 0));
             vo.setRefundTimes(user2RefundTimes.getOrDefault(vo.getUserId(), 0L));
             vo.setRefundAmount(user2RefundAmount.getOrDefault(vo.getUserId(), 0));
             vo.setRefundDiscountAmount(user2RefundDiscountAmount.getOrDefault(vo.getUserId(), 0));