Sfoglia il codice sorgente

添加提现中的数据金额,总收益=提现中+已提现+可提现

hxl13994548489 2 anni fa
parent
commit
925272a90d

+ 7 - 1
src/main/java/com/ydtech/modules/admin/model/dto/MySumAmountDto.java

@@ -68,6 +68,11 @@ public class MySumAmountDto {
     private BigDecimal withdrawableAmount;
 
 
+    /***
+     * 提现中
+     */
+    @ApiModelProperty(value = "提现中")
+    private BigDecimal withdrawingAmount;
     /***
      * 车险收益
      */
@@ -78,7 +83,7 @@ public class MySumAmountDto {
     public MySumAmountDto() {
     }
 
-    public MySumAmountDto(BigDecimal advanceCarInsuranceAmount, BigDecimal paidUpCarInsuranceAmount, BigDecimal sumCarInsuranceAmount, BigDecimal advanceCollectionPromotionFeesAmount, BigDecimal paidPromotionFeesAmount, BigDecimal sumPromotionFeesAmount, BigDecimal withdrawnAmount, BigDecimal withdrawableAmount, BigDecimal sumDrawAmount) {
+    public MySumAmountDto(BigDecimal advanceCarInsuranceAmount, BigDecimal paidUpCarInsuranceAmount, BigDecimal sumCarInsuranceAmount, BigDecimal advanceCollectionPromotionFeesAmount, BigDecimal paidPromotionFeesAmount, BigDecimal sumPromotionFeesAmount, BigDecimal withdrawnAmount, BigDecimal withdrawableAmount, BigDecimal sumDrawAmount,BigDecimal withdrawingAmount) {
         this.advanceCarInsuranceAmount = advanceCarInsuranceAmount;
         this.paidUpCarInsuranceAmount = paidUpCarInsuranceAmount;
         this.sumCarInsuranceAmount = sumCarInsuranceAmount;
@@ -88,5 +93,6 @@ public class MySumAmountDto {
         this.withdrawnAmount = withdrawnAmount;
         this.withdrawableAmount = withdrawableAmount;
         this.sumDrawAmount = sumDrawAmount;
+        this.withdrawingAmount = withdrawingAmount;
     }
 }

+ 5 - 3
src/main/java/com/ydtech/modules/admin/service/impl/SysUserAccountServiceImpl.java

@@ -1450,16 +1450,18 @@ public class SysUserAccountServiceImpl extends ServiceImpl<SysUserAccountMapper,
         BigDecimal ysAndSsTGAmount=ysTGAmount.add(ssTGAmount);
 
         // 已提现金额   查询历史表中的审核状态为3的数据
-        BigDecimal ysTXAmount= insFeeOrderNewService.findMyAmountYTXmount(mySumAmountQueryDto.getUserId());
+        BigDecimal ysTXAmount= insFeeOrderNewService.findMyAmountYTXmount(mySumAmountQueryDto.getUserId(),"3");
         // 可提现金额    查询账户的钱
         mySumAmountQueryDto.setAuditstatus("1");
         SysUserAccount sysUserAccountEntity = baseMapper.getById(mySumAmountQueryDto.getUserId());
+
+        BigDecimal txzTXAmount= insFeeOrderNewService.findMyAmountYTXmount(mySumAmountQueryDto.getUserId(),"2");
         BigDecimal ssKTAmount =BigDecimal.ZERO;
         if(sysUserAccountEntity!=null){
             ssKTAmount = sysUserAccountEntity.getSumAmount()==null?BigDecimal.ZERO: sysUserAccountEntity.getSumAmount();
         }
-        BigDecimal sumAmount=ysTXAmount.add(ssKTAmount);
+        BigDecimal sumAmount=ysTXAmount.add(ssKTAmount).add(txzTXAmount);
 
-        return new MySumAmountDto(ysAmount,ssAmount,ysAndSsAmount,ysTGAmount,ssTGAmount,ysAndSsTGAmount,ysTXAmount,ssKTAmount,sumAmount);
+        return new MySumAmountDto(ysAmount,ssAmount,ysAndSsAmount,ysTGAmount,ssTGAmount,ysAndSsTGAmount,ysTXAmount,ssKTAmount,sumAmount,txzTXAmount);
     }
 }

+ 1 - 1
src/main/java/com/ydtech/modules/protocols/dao/InsFeeOrderNewMapper.java

@@ -143,7 +143,7 @@ public interface InsFeeOrderNewMapper extends BaseMapper<InsFeeOrderNew> {
      *  @Date: 2024/6/30 19:59
      *  @Description:  查询可提现的金额
      */
-    BigDecimal findMyAmountYTXmount(@Param("userId") String userId);
+    BigDecimal findMyAmountYTXmount(@Param("userId") String userId,@Param("status") String status);
 }
 
 

+ 1 - 1
src/main/java/com/ydtech/modules/protocols/service/InsFeeOrderNewService.java

@@ -160,5 +160,5 @@ public interface InsFeeOrderNewService extends IService<InsFeeOrderNew> {
      *  @Date: 2024/6/30 19:58
      *  @Description: 查询用户已提现的金额
      */
-    BigDecimal findMyAmountYTXmount(String userId);
+    BigDecimal findMyAmountYTXmount(String userId,String status);
 }

+ 2 - 2
src/main/java/com/ydtech/modules/protocols/service/impl/InsFeeOrderNewServiceImpl.java

@@ -190,7 +190,7 @@ public class InsFeeOrderNewServiceImpl extends ServiceImpl<InsFeeOrderNewMapper,
      *  @Description: 查询用户已提现的金额
      */
     @Override
-    public BigDecimal findMyAmountYTXmount(String userId) {
-        return baseMapper.findMyAmountYTXmount(userId);
+    public BigDecimal findMyAmountYTXmount(String userId,String status) {
+        return baseMapper.findMyAmountYTXmount(userId,status);
     }
 }

+ 1 - 1
src/main/resources/mapper/modules/ins/InsFeeOrderNewMapper.xml

@@ -1161,6 +1161,6 @@
             sys_amount_auditing au
         WHERE
             au.user_id = #{userId}
-          AND auditing_status = '3'
+          AND auditing_status = #{status}
     </select>
 </mapper>