分销后台相关接口 现金充值 记录明细
This commit is contained in:
@@ -330,4 +330,9 @@ public class ShopInfo implements Serializable {
|
||||
@Column(ignore = true)
|
||||
private Integer tableClearTime;
|
||||
|
||||
/**
|
||||
* 运营端余额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.czg.account.entity.ShopInfo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -33,4 +34,6 @@ public interface ShopInfoService extends IService<ShopInfo> {
|
||||
Long getMainIdByShopId(Long shopId);
|
||||
|
||||
List<ShopInfo> getByMainIdOrList(Long mainShopId, List<Long> shopIdList, String shopName);
|
||||
|
||||
BigDecimal updateAmount(Long id, BigDecimal amount);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
|
||||
package com.czg.market.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.fastjson2.annotation.JSONField;
|
||||
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 MkDistributionAmountFlowDTO implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* recharge充值 refund退款 sub扣减
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 主店id
|
||||
*/
|
||||
private Long mainShopId;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 变动后金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 变动金额
|
||||
*/
|
||||
private BigDecimal changeAmount;
|
||||
|
||||
/**
|
||||
* 关联id
|
||||
*/
|
||||
private Long sourceId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 操作人账号
|
||||
*/
|
||||
private String opAccount;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
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;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 分销运营余额扣减记录 实体类。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-10-27
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Table("mk_distribution_amount_flow")
|
||||
@Accessors(chain = true)
|
||||
public class MkDistributionAmountFlow implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id(keyType = KeyType.Auto)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* manual_recharge充值 self_recharge自助充值 refund退款 manual_sub手动扣减 sub统扣减
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 主店id
|
||||
*/
|
||||
private Long mainShopId;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 变动后金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 变动金额
|
||||
*/
|
||||
private BigDecimal changeAmount;
|
||||
|
||||
/**
|
||||
* 关联id
|
||||
*/
|
||||
private Long sourceId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 操作人账号
|
||||
*/
|
||||
private String opAccount;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Column(onInsertValue = "now()")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -97,5 +97,6 @@ public class MkDistributionConfig implements Serializable {
|
||||
* 主店id
|
||||
*/
|
||||
private Long mainShopId;
|
||||
private Long shopId;
|
||||
|
||||
}
|
||||
|
||||
@@ -39,11 +39,7 @@ public class MkDistributionLevelConfig implements Serializable {
|
||||
*/
|
||||
private Long distributionConfigId;
|
||||
|
||||
/**
|
||||
* 主店id
|
||||
*/
|
||||
private Long mainShopId;
|
||||
|
||||
private Long shopId;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.czg.market.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.market.entity.MkDistributionAmountFlow;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 分销运营余额扣减记录 服务层。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-10-27
|
||||
*/
|
||||
public interface MkDistributionAmountFlowService extends IService<MkDistributionAmountFlow> {
|
||||
|
||||
Map<String, Object> pageInfo(Long shopId, String type, String key);
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
package com.czg.market.service;
|
||||
|
||||
import com.czg.market.dto.MkDistributionConfigDTO;
|
||||
import com.czg.order.dto.MkDistributionPayDTO;
|
||||
import com.czg.market.vo.MkDistributionConfigVO;
|
||||
import com.czg.market.vo.MkRedemptionConfigVO;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.czg.market.entity.MkDistributionConfig;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 分销配置 服务层。
|
||||
*
|
||||
@@ -16,4 +18,8 @@ public interface MkDistributionConfigService extends IService<MkDistributionConf
|
||||
MkDistributionConfigVO detail(Long mainShopId);
|
||||
|
||||
Boolean edit(Long shopId, MkDistributionConfigDTO dto);
|
||||
|
||||
Map<String, Object> pay(long userId, MkDistributionPayDTO payDTO);
|
||||
|
||||
Boolean cashPayOrder(long adminId, MkDistributionPayDTO payParam);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.czg.market.vo;
|
||||
|
||||
import com.czg.market.entity.MkDistributionAmountFlow;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MkDistributionAmountFlowVO extends MkDistributionAmountFlow implements Serializable {
|
||||
private String orderNo;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
package com.czg.order.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 分销配置 实体类。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-10-25
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class MkDistributionPayDTO implements Serializable {
|
||||
private Long shopId;
|
||||
private String platformType;
|
||||
private Long userId;
|
||||
private String payType;
|
||||
private String returnUrl;
|
||||
private String buyerRemark;
|
||||
private BigDecimal amount;
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.czg.system.service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 微信支付相关
|
||||
* @author Administrator
|
||||
*/
|
||||
public interface WxService {
|
||||
String getPhone(String code);
|
||||
|
||||
String getOpenId(String code);
|
||||
|
||||
Map<String, String> v3Pay(String openId, BigDecimal amount, String desc, String tradeNo, String type);
|
||||
}
|
||||
@@ -23,6 +23,41 @@ public interface TableValueConstant {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
interface DistributionConfig {
|
||||
@Getter
|
||||
enum OpenType {
|
||||
PAY("PAY", "支付购买"),
|
||||
COST("COST", "消费增积分");
|
||||
private final String code;
|
||||
private final String msg;
|
||||
|
||||
OpenType(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface DistributionAmountFlow {
|
||||
@Getter
|
||||
enum Type {
|
||||
MANUAL_RECHARGE("manual_recharge", "手动充值"),
|
||||
SUB("sub", "系统扣减"),
|
||||
MANUAL_SUB("manual_sub", "手动扣减"),
|
||||
SELF_RECHARGE("self_recharge", "自助充值");
|
||||
private final String code;
|
||||
private final String msg;
|
||||
|
||||
Type(String code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
interface EnableConfig {
|
||||
@Getter
|
||||
enum Type {
|
||||
|
||||
Reference in New Issue
Block a user