分账提现接口
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
|
||||
package com.czg.market.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
import jakarta.validation.constraints.DecimalMin;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.experimental.Accessors;
|
||||
import java.io.Serial;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 提现记录表 实体类。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-10-27
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class MkDistributionWithdrawFlowDTO implements Serializable {
|
||||
@NotNull
|
||||
private Long shopId;
|
||||
@NotNull(message = "提现金额不为空")
|
||||
@DecimalMin(value = "30", message = "提现金额不能小于30")
|
||||
private BigDecimal amount;
|
||||
}
|
||||
@@ -110,6 +110,4 @@ public class MkDistributionFlow implements Serializable {
|
||||
|
||||
private String nickName;
|
||||
|
||||
private String resp;
|
||||
private String packageInfo;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.czg.market.entity;
|
||||
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.KeyType;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 提现记录表 实体类。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-10-27
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("mk_distribution_withdraw_flow")
|
||||
public class MkDistributionWithdrawFlow implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 店铺用户id
|
||||
*/
|
||||
private Long shopUserId;
|
||||
|
||||
/**
|
||||
* 提现金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 手续费
|
||||
*/
|
||||
private BigDecimal serviceFee;
|
||||
|
||||
/**
|
||||
* 微信转账单号
|
||||
*/
|
||||
private String billNo;
|
||||
|
||||
/**
|
||||
* 提现必须参数
|
||||
*/
|
||||
private String packageInfo;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()", onUpdateValue = "now()")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* pending提现中 success可提现 finish已完成
|
||||
*/
|
||||
private String status;
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.czg.market.service;
|
||||
|
||||
import com.czg.market.dto.MkDistributionUserDTO;
|
||||
import com.czg.market.dto.MkDistributionWithdrawFlowDTO;
|
||||
import com.czg.market.entity.MkDistributionUser;
|
||||
import com.czg.market.vo.DistributionCenterShopVO;
|
||||
import com.czg.order.dto.MkDistributionPayDTO;
|
||||
@@ -93,4 +94,9 @@ public interface MkDistributionUserService extends IService<MkDistributionUser>
|
||||
*/
|
||||
void distribute(Long sourceId, String orderNo, BigDecimal amount, Long userId, Long shopId, String type);
|
||||
|
||||
void updateIncome(BigDecimal pendingIncome, BigDecimal receivedIncome, BigDecimal withdrawIncome, Long id);
|
||||
|
||||
|
||||
Boolean withdraw(long userId, MkDistributionWithdrawFlowDTO withdrawFlowDTO);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.czg.market.service;
|
||||
|
||||
import com.czg.market.dto.MkDistributionWithdrawFlowDTO;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.market.entity.MkDistributionWithdrawFlow;
|
||||
|
||||
/**
|
||||
* 提现记录表 服务层。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-10-27
|
||||
*/
|
||||
public interface MkDistributionWithdrawFlowService extends IService<MkDistributionWithdrawFlow> {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user