- 4张表: voucher_template, voucher_rule, voucher_instance, voucher_usage_log - 可配置规则引擎: registry + validators + engine - 8种内置规则: min_amount, max_amount, applicable_product_type, applicable_product, exclude_product, max_usage_count, valid_period, user_level - CRUD定义 + API接口 + 前端页面 - SQL建表脚本 + RBAC权限配置 - 一次性使用,不找零
33 lines
1.2 KiB
JSON
33 lines
1.2 KiB
JSON
{
|
|
"tblname": "voucher_usage_log",
|
|
"alias": "voucher_usage_log_list",
|
|
"title": "代金券使用流水",
|
|
"params": {
|
|
"sortby": ["used_at desc"],
|
|
"data_filter": {
|
|
"AND": [
|
|
{"field": "instance_id", "op": "=", "var": "instance_id"},
|
|
{"field": "customer_id", "op": "=", "var": "customer_id"},
|
|
{"field": "order_id", "op": "=", "var": "order_id"}
|
|
]
|
|
},
|
|
"browserfields": {
|
|
"exclouded": [],
|
|
"alters": {
|
|
"instance_id": {
|
|
"uitype": "code",
|
|
"dataurl": "{{entire_url('../api/instance/voucher_instance_options.dspy')}}",
|
|
"data_field": "options",
|
|
"textField": "text",
|
|
"valueField": "value"
|
|
}
|
|
}
|
|
},
|
|
"editable": {
|
|
"new_data_url": "{{entire_url('../api/usage/voucher_usage_log_create.dspy')}}",
|
|
"update_data_url": "{{entire_url('../api/usage/voucher_usage_log_update.dspy')}}",
|
|
"delete_data_url": "{{entire_url('../api/usage/voucher_usage_log_delete.dspy')}}"
|
|
}
|
|
}
|
|
}
|