mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 01:59:20 +08:00
fix(ecom): 移除推广费表的platform_id字段及外键约束
- ec_design.sql 移除 platform_id 字段及约束 - 实体/DTO/VO 同步移除 platformId / platformName - PromotionFeeServiceImpl 移除 PlatformService 依赖和平台名称填充逻辑 - 数据库已同步更新
This commit is contained in:
-6
@@ -28,12 +28,6 @@ public class CreatePromotionFeeDTO {
|
||||
@NotNull(message = "推广费类型ID不能为空")
|
||||
private Long feeTypeId;
|
||||
|
||||
/**
|
||||
* 平台ID
|
||||
*/
|
||||
@Schema(description = "平台ID", example = "1")
|
||||
private Long platformId;
|
||||
|
||||
/**
|
||||
* 商品ID(可选,关联到具体商品)
|
||||
*/
|
||||
|
||||
-6
@@ -24,12 +24,6 @@ public class PromotionFeeFilterDTO {
|
||||
@Schema(description = "推广费类型ID", example = "1")
|
||||
private Long feeTypeId;
|
||||
|
||||
/**
|
||||
* 平台ID
|
||||
*/
|
||||
@Schema(description = "平台ID", example = "1")
|
||||
private Long platformId;
|
||||
|
||||
/**
|
||||
* 商品ID(可选)
|
||||
*/
|
||||
|
||||
-6
@@ -35,12 +35,6 @@ public class UpdatePromotionFeeDTO {
|
||||
@NotNull(message = "推广费类型ID不能为空")
|
||||
private Long feeTypeId;
|
||||
|
||||
/**
|
||||
* 平台ID
|
||||
*/
|
||||
@Schema(description = "平台ID", example = "1")
|
||||
private Long platformId;
|
||||
|
||||
/**
|
||||
* 商品ID(可选,关联到具体商品)
|
||||
*/
|
||||
|
||||
-6
@@ -40,12 +40,6 @@ public class PromotionFeePO {
|
||||
@TableField("fee_type_id")
|
||||
private Long feeTypeId;
|
||||
|
||||
/**
|
||||
* 平台ID
|
||||
*/
|
||||
@TableField("platform_id")
|
||||
private Long platformId;
|
||||
|
||||
/**
|
||||
* 商品ID(可选)
|
||||
*/
|
||||
|
||||
-12
@@ -50,18 +50,6 @@ public class PromotionFeeVO {
|
||||
@Schema(description = "推广费类型名称", example = "直通车")
|
||||
private String feeTypeName;
|
||||
|
||||
/**
|
||||
* 平台ID
|
||||
*/
|
||||
@Schema(description = "平台ID", example = "1")
|
||||
private Long platformId;
|
||||
|
||||
/**
|
||||
* 平台名称
|
||||
*/
|
||||
@Schema(description = "平台名称", example = "淘宝")
|
||||
private String platformName;
|
||||
|
||||
/**
|
||||
* 商品ID(可选)
|
||||
*/
|
||||
|
||||
+1
-15
@@ -36,7 +36,7 @@ public class PromotionFeeServiceImpl implements PromotionFeeService {
|
||||
private final CurrentUserContext currentUserContext;
|
||||
private final ShopService shopService;
|
||||
private final PromotionFeeTypeService promotionFeeTypeService;
|
||||
private final PlatformService platformService;
|
||||
|
||||
|
||||
/**
|
||||
* 创建推广费记录
|
||||
@@ -127,9 +127,6 @@ public class PromotionFeeServiceImpl implements PromotionFeeService {
|
||||
if (filter.getFeeTypeId() != null) {
|
||||
wrapper.eq(PromotionFeePO::getFeeTypeId, filter.getFeeTypeId());
|
||||
}
|
||||
if (filter.getPlatformId() != null) {
|
||||
wrapper.eq(PromotionFeePO::getPlatformId, filter.getPlatformId());
|
||||
}
|
||||
if (filter.getProductId() != null) {
|
||||
wrapper.eq(PromotionFeePO::getProductId, filter.getProductId());
|
||||
}
|
||||
@@ -182,17 +179,6 @@ public class PromotionFeeServiceImpl implements PromotionFeeService {
|
||||
}
|
||||
}
|
||||
|
||||
// 填充平台名称
|
||||
if (po.getPlatformId() != null) {
|
||||
try {
|
||||
var platform = platformService.getById(po.getPlatformId());
|
||||
if (platform != null) {
|
||||
vo.setPlatformName(platform.getPlatformName());
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user