You've already forked FrameTour-BE
- 在 PricingManagementServiceImpl 中实现 quickSetupProductPrice 方法,用于快速设置商品价格 - 在 IPricingManagementService 接口中添加 quickSetupProductPrice 方法的声明 - 在 TemplateServiceImpl 中调用 quickSetupProductPrice 方法,为模板设置价格
112 lines
2.8 KiB
Java
112 lines
2.8 KiB
Java
package com.ycwl.basic.pricing.service;
|
|
|
|
import com.ycwl.basic.pricing.entity.*;
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
/**
|
|
* 价格管理服务接口(用于配置管理,手动处理时间字段)
|
|
*/
|
|
public interface IPricingManagementService {
|
|
|
|
/**
|
|
* 创建商品价格配置
|
|
*/
|
|
Long createProductConfig(PriceProductConfig config);
|
|
|
|
/**
|
|
* 更新商品价格配置
|
|
*/
|
|
boolean updateProductConfig(PriceProductConfig config);
|
|
|
|
/**
|
|
* 创建阶梯定价配置
|
|
*/
|
|
Long createTierConfig(PriceTierConfig config);
|
|
|
|
/**
|
|
* 更新阶梯定价配置
|
|
*/
|
|
boolean updateTierConfig(PriceTierConfig config);
|
|
|
|
/**
|
|
* 创建优惠券配置
|
|
*/
|
|
Long createCouponConfig(PriceCouponConfig config);
|
|
|
|
/**
|
|
* 更新优惠券配置
|
|
*/
|
|
boolean updateCouponConfig(PriceCouponConfig config);
|
|
|
|
/**
|
|
* 创建优惠券领用记录
|
|
*/
|
|
Long createCouponClaimRecord(PriceCouponClaimRecord record);
|
|
|
|
/**
|
|
* 更新优惠券领用记录
|
|
*/
|
|
boolean updateCouponClaimRecord(PriceCouponClaimRecord record);
|
|
|
|
/**
|
|
* 创建一口价配置
|
|
*/
|
|
Long createBundleConfig(PriceBundleConfig config);
|
|
|
|
/**
|
|
* 更新一口价配置
|
|
*/
|
|
boolean updateBundleConfig(PriceBundleConfig config);
|
|
|
|
// ==================== 状态管理 ====================
|
|
|
|
/**
|
|
* 更新商品配置状态
|
|
*/
|
|
boolean updateProductConfigStatus(Long id, Boolean isActive);
|
|
|
|
/**
|
|
* 更新阶梯配置状态
|
|
*/
|
|
boolean updateTierConfigStatus(Long id, Boolean isActive);
|
|
|
|
/**
|
|
* 更新一口价配置状态
|
|
*/
|
|
boolean updateBundleConfigStatus(Long id, Boolean isActive);
|
|
|
|
// ==================== 删除操作 ====================
|
|
|
|
/**
|
|
* 删除商品配置
|
|
*/
|
|
boolean deleteProductConfig(Long id);
|
|
|
|
/**
|
|
* 删除阶梯配置
|
|
*/
|
|
boolean deleteTierConfig(Long id);
|
|
|
|
/**
|
|
* 删除一口价配置
|
|
*/
|
|
boolean deleteBundleConfig(Long id);
|
|
|
|
// ==================== 快速设置价格 ====================
|
|
|
|
/**
|
|
* 快速设置商品基础价格(内部方法,如果存在则更新,不存在则新增)
|
|
* @param productType 商品类型
|
|
* @param productId 商品ID
|
|
* @param scenicId 景区ID
|
|
* @param productName 商品名称
|
|
* @param basePrice 基础价格
|
|
* @param originalPrice 原价(可选,可为null)
|
|
* @param unit 价格单位(可选,可为null,默认为"元")
|
|
* @return 配置的ID
|
|
*/
|
|
Long quickSetupProductPrice(String productType, String productId, String scenicId,
|
|
String productName, BigDecimal basePrice,
|
|
BigDecimal originalPrice, String unit);
|
|
} |