You've already forked FrameTour-BE
refactor(pricing): 重构适用商品类型处理逻辑
- 移除 ProductTypeListTypeHandler,直接在实体类中处理 JSON转换 - 为 PriceVoucherBatchConfig 添加 ObjectMapper 静态实例和日志记录 - 实现 JSON 字符串与 ProductType 列表之间的转换方法- 更新数据库映射,将 applicableProducts 映射为 JSON 字符串 - 优化 VoucherServiceImpl 中的产品适用性检查逻辑
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
<result column="broker_id" property="brokerId" />
|
||||
<result column="discount_type" property="discountType" />
|
||||
<result column="discount_value" property="discountValue" />
|
||||
<result column="applicable_products" property="applicableProductsJson" />
|
||||
<result column="total_count" property="totalCount" />
|
||||
<result column="used_count" property="usedCount" />
|
||||
<result column="claimed_count" property="claimedCount" />
|
||||
@@ -24,7 +25,7 @@
|
||||
|
||||
<!-- 基础字段 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, batch_name, scenic_id, broker_id, discount_type, discount_value,
|
||||
id, batch_name, scenic_id, broker_id, discount_type, discount_value, applicable_products,
|
||||
total_count, used_count, claimed_count, status, create_time, update_time,
|
||||
create_by, update_by, deleted, deleted_at
|
||||
</sql>
|
||||
@@ -71,7 +72,7 @@
|
||||
<!-- 根据券码查询对应的券码批次配置 -->
|
||||
<select id="selectByVoucherCode" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
b.id, b.batch_name, b.scenic_id, b.broker_id, b.discount_type, b.discount_value,
|
||||
b.id, b.batch_name, b.scenic_id, b.broker_id, b.discount_type, b.discount_value, b.applicable_products,
|
||||
b.total_count, b.used_count, b.claimed_count, b.status, b.create_time, b.update_time,
|
||||
b.create_by, b.update_by, b.deleted, b.deleted_at
|
||||
FROM price_voucher_batch_config b
|
||||
|
Reference in New Issue
Block a user