feat: 添加易码通数据源支持及相关功能优化
- 在config.yaml中移除硬编码的数据库密码,改为从环境变量读取 - 为前端表单字段选择器添加key属性,确保组件正确更新 - 扩展SQL构建器以支持易码通数据源的关联表查询 - 在前端添加易码通数据源相关字段和表选项 - 更新字段白名单和标签映射,包含易码通特有字段 - 优化数据库连接配置加载逻辑,支持环境变量覆盖
This commit is contained in:
parent
64063323c7
commit
4467bc536d
Binary file not shown.
|
|
@ -16,8 +16,6 @@ func main() {
|
||||||
_ = logging.Init("log")
|
_ = logging.Init("log")
|
||||||
log.Println("connecting YMT MySQL:", cfg.YMTDB.Host+":"+cfg.YMTDB.Port, "db", cfg.YMTDB.Name, "user", cfg.YMTDB.User)
|
log.Println("connecting YMT MySQL:", cfg.YMTDB.Host+":"+cfg.YMTDB.Port, "db", cfg.YMTDB.Name, "user", cfg.YMTDB.User)
|
||||||
log.Println("connecting Marketing MySQL:", cfg.MarketingDB.Host+":"+cfg.MarketingDB.Port, "db", cfg.MarketingDB.Name, "user", cfg.MarketingDB.User)
|
log.Println("connecting Marketing MySQL:", cfg.MarketingDB.Host+":"+cfg.MarketingDB.Port, "db", cfg.MarketingDB.Name, "user", cfg.MarketingDB.User)
|
||||||
log.Println("YMT DSN:", cfg.YMTDB.DSN())
|
|
||||||
log.Println("Marketing DSN:", cfg.MarketingDB.DSN())
|
|
||||||
if cfg.YMTDB.DSN() == "" {
|
if cfg.YMTDB.DSN() == "" {
|
||||||
log.Fatal("YMT MySQL DSN missing: host, port, user, name required")
|
log.Fatal("YMT MySQL DSN missing: host, port, user, name required")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,11 @@ app:
|
||||||
host: "192.168.6.92"
|
host: "192.168.6.92"
|
||||||
port: "3306"
|
port: "3306"
|
||||||
user: "root"
|
user: "root"
|
||||||
password: "lansexiongdi"
|
password: ""
|
||||||
name: "market"
|
name: "market"
|
||||||
ymt_db:
|
ymt_db:
|
||||||
host: "47.97.27.195"
|
host: "47.97.27.195"
|
||||||
port: "3306"
|
port: "3306"
|
||||||
user: "root"
|
user: "root"
|
||||||
password: "lansexiongdi6,"
|
password: ""
|
||||||
name: "merketing"
|
name: "merketing"
|
||||||
|
|
|
||||||
|
|
@ -264,6 +264,32 @@ func whitelist() map[string]bool {
|
||||||
"order.pay_amount": true,
|
"order.pay_amount": true,
|
||||||
"order.create_time": true,
|
"order.create_time": true,
|
||||||
"order.update_time": true,
|
"order.update_time": true,
|
||||||
|
"order.official_price": true,
|
||||||
|
"order.merchant_name": true,
|
||||||
|
"order.activity_name": true,
|
||||||
|
"order.goods_name": true,
|
||||||
|
"order.pay_time": true,
|
||||||
|
"order.coupon_id": true,
|
||||||
|
"order.discount_amount": true,
|
||||||
|
"order.supplier_product_name": true,
|
||||||
|
"order.is_inner": true,
|
||||||
|
"order.icon": true,
|
||||||
|
"order.cost_price": true,
|
||||||
|
"order.success_num": true,
|
||||||
|
"order.is_reset": true,
|
||||||
|
"order.is_retry": true,
|
||||||
|
"order.channel": true,
|
||||||
|
"order.is_store": true,
|
||||||
|
"order.trace_id": true,
|
||||||
|
"order.out_order_no": true,
|
||||||
|
"order.next_retry_time": true,
|
||||||
|
"order.recharge_suc_time": true,
|
||||||
|
"order.supplier_id": true,
|
||||||
|
"order.supplier_product_id": true,
|
||||||
|
"order.merchant_id": true,
|
||||||
|
"order.goods_id": true,
|
||||||
|
"order.activity_id": true,
|
||||||
|
"order.key_batch_name": true,
|
||||||
"order_detail.plan_title": true,
|
"order_detail.plan_title": true,
|
||||||
"order_detail.reseller_name": true,
|
"order_detail.reseller_name": true,
|
||||||
"order_detail.product_name": true,
|
"order_detail.product_name": true,
|
||||||
|
|
@ -273,15 +299,31 @@ func whitelist() map[string]bool {
|
||||||
"order_detail.create_time": true,
|
"order_detail.create_time": true,
|
||||||
"order_detail.update_time": true,
|
"order_detail.update_time": true,
|
||||||
"order_cash.channel": true,
|
"order_cash.channel": true,
|
||||||
|
"order_cash.order_no": true,
|
||||||
|
"order_cash.trade_no": true,
|
||||||
|
"order_cash.wechat_detail_id": true,
|
||||||
|
"order_cash.denomination": true,
|
||||||
|
"order_cash.account": true,
|
||||||
|
"order_cash.receive_name": true,
|
||||||
|
"order_cash.app_id": true,
|
||||||
"order_cash.cash_activity_id": true,
|
"order_cash.cash_activity_id": true,
|
||||||
"order_cash.receive_status": true,
|
"order_cash.receive_status": true,
|
||||||
"order_cash.receive_time": true,
|
"order_cash.receive_time": true,
|
||||||
|
"order_cash.success_time": true,
|
||||||
"order_cash.cash_packet_id": true,
|
"order_cash.cash_packet_id": true,
|
||||||
"order_cash.cash_id": true,
|
"order_cash.cash_id": true,
|
||||||
"order_cash.amount": true,
|
"order_cash.amount": true,
|
||||||
|
"order_cash.activity_id": true,
|
||||||
|
"order_cash.goods_id": true,
|
||||||
|
"order_cash.merchant_id": true,
|
||||||
|
"order_cash.supplier_id": true,
|
||||||
|
"order_cash.user_id": true,
|
||||||
"order_cash.status": true,
|
"order_cash.status": true,
|
||||||
"order_cash.expire_time": true,
|
"order_cash.expire_time": true,
|
||||||
|
"order_cash.create_time": true,
|
||||||
"order_cash.update_time": true,
|
"order_cash.update_time": true,
|
||||||
|
"order_cash.version": true,
|
||||||
|
"order_cash.is_confirm": true,
|
||||||
"order_voucher.channel": true,
|
"order_voucher.channel": true,
|
||||||
"order_voucher.channel_activity_id": true,
|
"order_voucher.channel_activity_id": true,
|
||||||
"order_voucher.channel_voucher_id": true,
|
"order_voucher.channel_voucher_id": true,
|
||||||
|
|
@ -332,6 +374,88 @@ func whitelist() map[string]bool {
|
||||||
"merchant_key_send.status": true,
|
"merchant_key_send.status": true,
|
||||||
"merchant_key_send.usage_time": true,
|
"merchant_key_send.usage_time": true,
|
||||||
"merchant_key_send.create_time": true,
|
"merchant_key_send.create_time": true,
|
||||||
|
"order_digit.order_no": true,
|
||||||
|
"order_digit.card_no": true,
|
||||||
|
"order_digit.account": true,
|
||||||
|
"order_digit.goods_id": true,
|
||||||
|
"order_digit.merchant_id": true,
|
||||||
|
"order_digit.supplier_id": true,
|
||||||
|
"order_digit.activity_id": true,
|
||||||
|
"order_digit.user_id": true,
|
||||||
|
"order_digit.success_time": true,
|
||||||
|
"order_digit.supplier_product_no": true,
|
||||||
|
"order_digit.order_type": true,
|
||||||
|
"order_digit.end_time": true,
|
||||||
|
"order_digit.create_time": true,
|
||||||
|
"order_digit.update_time": true,
|
||||||
|
"order_digit.code": true,
|
||||||
|
"order_digit.sms_channel": true,
|
||||||
|
"goods_voucher_batch.channel_batch_no": true,
|
||||||
|
"goods_voucher_batch.voucher_subject_id": true,
|
||||||
|
"goods_voucher_batch.id": true,
|
||||||
|
"goods_voucher_batch.goods_voucher_id": true,
|
||||||
|
"goods_voucher_batch.supplier_id": true,
|
||||||
|
"goods_voucher_batch.temp_no": true,
|
||||||
|
"goods_voucher_batch.index": true,
|
||||||
|
"goods_voucher_batch.create_time": true,
|
||||||
|
"goods_voucher_batch.update_time": true,
|
||||||
|
"goods_voucher_subject_config.id": true,
|
||||||
|
"goods_voucher_subject_config.name": true,
|
||||||
|
"goods_voucher_subject_config.type": true,
|
||||||
|
"goods_voucher_subject_config.create_time": true,
|
||||||
|
"merchant.id": true,
|
||||||
|
"merchant.name": true,
|
||||||
|
"merchant.user_id": true,
|
||||||
|
"merchant.merchant_no": true,
|
||||||
|
"merchant.subject": true,
|
||||||
|
"merchant.third_party": true,
|
||||||
|
"merchant.status": true,
|
||||||
|
"merchant.balance": true,
|
||||||
|
"merchant.total_consumption": true,
|
||||||
|
"merchant.contact_name": true,
|
||||||
|
"merchant.contact_phone": true,
|
||||||
|
"merchant.contact_email": true,
|
||||||
|
"merchant.create_time": true,
|
||||||
|
"merchant.update_time": true,
|
||||||
|
"activity.id": true,
|
||||||
|
"activity.name": true,
|
||||||
|
"activity.user_id": true,
|
||||||
|
"activity.merchant_id": true,
|
||||||
|
"activity.user_name": true,
|
||||||
|
"activity.activity_no": true,
|
||||||
|
"activity.status": true,
|
||||||
|
"activity.key_total_num": true,
|
||||||
|
"activity.key_generate_num": true,
|
||||||
|
"activity.key_usable_num": true,
|
||||||
|
"activity.domain_url": true,
|
||||||
|
"activity.theme_login_id": true,
|
||||||
|
"activity.theme_list_id": true,
|
||||||
|
"activity.theme_verify_id": true,
|
||||||
|
"activity.settlement_type": true,
|
||||||
|
"activity.key_expire_type": true,
|
||||||
|
"activity.key_valid_day": true,
|
||||||
|
"activity.key_begin_time": true,
|
||||||
|
"activity.key_end_time": true,
|
||||||
|
"activity.key_style": true,
|
||||||
|
"activity.begin_time": true,
|
||||||
|
"activity.end_time": true,
|
||||||
|
"activity.is_retry": true,
|
||||||
|
"activity.create_time": true,
|
||||||
|
"activity.update_time": true,
|
||||||
|
"activity.discard_time": true,
|
||||||
|
"activity.delete_time": true,
|
||||||
|
"activity.auto_charge": true,
|
||||||
|
"activity.stock": true,
|
||||||
|
"activity.approval_trade_no": true,
|
||||||
|
"activity.amount": true,
|
||||||
|
"activity.channels": true,
|
||||||
|
"activity.key_begin": true,
|
||||||
|
"activity.key_end": true,
|
||||||
|
"activity.key_unit": true,
|
||||||
|
"activity.key_pay_button_text": true,
|
||||||
|
"activity.goods_pay_button_text": true,
|
||||||
|
"activity.is_open_db_transaction": true,
|
||||||
|
"activity.bank_tag": true,
|
||||||
}
|
}
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
|
|
@ -362,6 +486,32 @@ func fieldLabels() map[string]string {
|
||||||
"order.pay_amount": "支付金额",
|
"order.pay_amount": "支付金额",
|
||||||
"order.create_time": "创建时间",
|
"order.create_time": "创建时间",
|
||||||
"order.update_time": "更新时间",
|
"order.update_time": "更新时间",
|
||||||
|
"order.official_price": "官方价",
|
||||||
|
"order.merchant_name": "分销商名称",
|
||||||
|
"order.activity_name": "活动名称",
|
||||||
|
"order.goods_name": "商品名称",
|
||||||
|
"order.pay_time": "支付时间",
|
||||||
|
"order.coupon_id": "优惠券ID",
|
||||||
|
"order.discount_amount": "优惠金额",
|
||||||
|
"order.supplier_product_name": "供应商产品名称",
|
||||||
|
"order.is_inner": "内部供应商订单",
|
||||||
|
"order.icon": "订单图片",
|
||||||
|
"order.cost_price": "成本价",
|
||||||
|
"order.success_num": "到账数量",
|
||||||
|
"order.is_reset": "是否重置",
|
||||||
|
"order.is_retry": "是否重试",
|
||||||
|
"order.channel": "支付渠道",
|
||||||
|
"order.is_store": "是否退还库存",
|
||||||
|
"order.trace_id": "TraceID",
|
||||||
|
"order.out_order_no": "外部订单号",
|
||||||
|
"order.next_retry_time": "下次重试时间",
|
||||||
|
"order.recharge_suc_time": "充值成功时间",
|
||||||
|
"order.supplier_id": "供应商ID",
|
||||||
|
"order.supplier_product_id": "供应商产品ID",
|
||||||
|
"order.merchant_id": "分销商ID",
|
||||||
|
"order.goods_id": "商品ID",
|
||||||
|
"order.activity_id": "活动ID",
|
||||||
|
"order.key_batch_name": "key批次名称",
|
||||||
"order_detail.plan_title": "计划标题",
|
"order_detail.plan_title": "计划标题",
|
||||||
"order_detail.reseller_name": "分销商名称",
|
"order_detail.reseller_name": "分销商名称",
|
||||||
"order_detail.product_name": "商品名称",
|
"order_detail.product_name": "商品名称",
|
||||||
|
|
@ -370,16 +520,32 @@ func fieldLabels() map[string]string {
|
||||||
"order_detail.cost_price": "成本价",
|
"order_detail.cost_price": "成本价",
|
||||||
"order_detail.create_time": "创建时间",
|
"order_detail.create_time": "创建时间",
|
||||||
"order_detail.update_time": "更新时间",
|
"order_detail.update_time": "更新时间",
|
||||||
|
"order_cash.order_no": "订单号",
|
||||||
|
"order_cash.trade_no": "交易号",
|
||||||
|
"order_cash.wechat_detail_id": "微信明细单号",
|
||||||
"order_cash.channel": "渠道",
|
"order_cash.channel": "渠道",
|
||||||
|
"order_cash.denomination": "红包面额",
|
||||||
|
"order_cash.account": "领取账号",
|
||||||
|
"order_cash.receive_name": "真实姓名",
|
||||||
|
"order_cash.app_id": "转账AppID",
|
||||||
"order_cash.cash_activity_id": "红包批次号",
|
"order_cash.cash_activity_id": "红包批次号",
|
||||||
"order_cash.receive_status": "领取状态",
|
"order_cash.receive_status": "领取状态",
|
||||||
"order_cash.receive_time": "拆红包时间",
|
"order_cash.receive_time": "拆红包时间",
|
||||||
|
"order_cash.success_time": "成功时间",
|
||||||
"order_cash.cash_packet_id": "红包ID",
|
"order_cash.cash_packet_id": "红包ID",
|
||||||
"order_cash.cash_id": "红包规则ID",
|
"order_cash.cash_id": "红包规则ID",
|
||||||
"order_cash.amount": "红包额度",
|
"order_cash.amount": "红包额度",
|
||||||
|
"order_cash.activity_id": "活动ID",
|
||||||
|
"order_cash.goods_id": "商品ID",
|
||||||
|
"order_cash.merchant_id": "分销商ID",
|
||||||
|
"order_cash.supplier_id": "供应商ID",
|
||||||
|
"order_cash.user_id": "创建者ID",
|
||||||
"order_cash.status": "状态",
|
"order_cash.status": "状态",
|
||||||
"order_cash.expire_time": "过期时间",
|
"order_cash.expire_time": "过期时间",
|
||||||
|
"order_cash.create_time": "创建时间",
|
||||||
"order_cash.update_time": "更新时间",
|
"order_cash.update_time": "更新时间",
|
||||||
|
"order_cash.version": "版本",
|
||||||
|
"order_cash.is_confirm": "是否确认",
|
||||||
"order_voucher.channel": "渠道",
|
"order_voucher.channel": "渠道",
|
||||||
"order_voucher.channel_activity_id": "渠道立减金批次",
|
"order_voucher.channel_activity_id": "渠道立减金批次",
|
||||||
"order_voucher.channel_voucher_id": "渠道立减金ID",
|
"order_voucher.channel_voucher_id": "渠道立减金ID",
|
||||||
|
|
@ -430,5 +596,87 @@ func fieldLabels() map[string]string {
|
||||||
"merchant_key_send.status": "状态",
|
"merchant_key_send.status": "状态",
|
||||||
"merchant_key_send.usage_time": "核销时间",
|
"merchant_key_send.usage_time": "核销时间",
|
||||||
"merchant_key_send.create_time": "创建时间",
|
"merchant_key_send.create_time": "创建时间",
|
||||||
|
"order_digit.order_no": "订单号",
|
||||||
|
"order_digit.card_no": "卡号",
|
||||||
|
"order_digit.account": "充值账号",
|
||||||
|
"order_digit.goods_id": "商品ID",
|
||||||
|
"order_digit.merchant_id": "分销商ID",
|
||||||
|
"order_digit.supplier_id": "供应商ID",
|
||||||
|
"order_digit.activity_id": "活动ID",
|
||||||
|
"order_digit.user_id": "创建者ID",
|
||||||
|
"order_digit.success_time": "到账时间",
|
||||||
|
"order_digit.supplier_product_no": "供应商产品编码",
|
||||||
|
"order_digit.order_type": "订单类型",
|
||||||
|
"order_digit.end_time": "卡密有效期",
|
||||||
|
"order_digit.create_time": "创建时间",
|
||||||
|
"order_digit.update_time": "更新时间",
|
||||||
|
"order_digit.code": "验证码",
|
||||||
|
"order_digit.sms_channel": "短信渠道",
|
||||||
|
"goods_voucher_batch.channel_batch_no": "渠道批次号",
|
||||||
|
"goods_voucher_batch.voucher_subject_id": "主体配置ID",
|
||||||
|
"goods_voucher_batch.id": "ID",
|
||||||
|
"goods_voucher_batch.goods_voucher_id": "立减金ID",
|
||||||
|
"goods_voucher_batch.supplier_id": "供应商ID",
|
||||||
|
"goods_voucher_batch.temp_no": "模板编号",
|
||||||
|
"goods_voucher_batch.index": "权重",
|
||||||
|
"goods_voucher_batch.create_time": "创建时间",
|
||||||
|
"goods_voucher_batch.update_time": "更新时间",
|
||||||
|
"goods_voucher_subject_config.id": "主体配置ID",
|
||||||
|
"goods_voucher_subject_config.name": "主体名称",
|
||||||
|
"goods_voucher_subject_config.type": "主体类型",
|
||||||
|
"goods_voucher_subject_config.create_time": "创建时间",
|
||||||
|
"merchant.id": "客户ID",
|
||||||
|
"merchant.name": "客户名称",
|
||||||
|
"merchant.user_id": "用户中心ID",
|
||||||
|
"merchant.merchant_no": "商户编码",
|
||||||
|
"merchant.subject": "客户主体",
|
||||||
|
"merchant.third_party": "来源类型",
|
||||||
|
"merchant.status": "状态",
|
||||||
|
"merchant.balance": "客户余额",
|
||||||
|
"merchant.total_consumption": "累计消费",
|
||||||
|
"merchant.contact_name": "联系人名称",
|
||||||
|
"merchant.contact_phone": "联系人电话",
|
||||||
|
"merchant.contact_email": "联系人Email",
|
||||||
|
"merchant.create_time": "创建时间",
|
||||||
|
"merchant.update_time": "编辑时间",
|
||||||
|
"activity.id": "活动ID",
|
||||||
|
"activity.name": "活动名称",
|
||||||
|
"activity.user_id": "创建者ID",
|
||||||
|
"activity.merchant_id": "客户ID",
|
||||||
|
"activity.user_name": "创建者名称",
|
||||||
|
"activity.activity_no": "活动编号",
|
||||||
|
"activity.status": "状态",
|
||||||
|
"activity.key_total_num": "Key码总量",
|
||||||
|
"activity.key_generate_num": "Key码已生成数量",
|
||||||
|
"activity.key_usable_num": "Key可使用次数",
|
||||||
|
"activity.domain_url": "域名",
|
||||||
|
"activity.theme_login_id": "登录模版ID",
|
||||||
|
"activity.theme_list_id": "列表模版ID",
|
||||||
|
"activity.theme_verify_id": "验证模版ID",
|
||||||
|
"activity.settlement_type": "结算方式",
|
||||||
|
"activity.key_expire_type": "Key有效期类型",
|
||||||
|
"activity.key_valid_day": "有效天数",
|
||||||
|
"activity.key_begin_time": "Key有效开始时间",
|
||||||
|
"activity.key_end_time": "Key有效结束时间",
|
||||||
|
"activity.key_style": "Key样式",
|
||||||
|
"activity.begin_time": "开始时间",
|
||||||
|
"activity.end_time": "结束时间",
|
||||||
|
"activity.is_retry": "是否自动重试",
|
||||||
|
"activity.create_time": "创建时间",
|
||||||
|
"activity.update_time": "修改时间",
|
||||||
|
"activity.discard_time": "作废时间",
|
||||||
|
"activity.delete_time": "删除时间",
|
||||||
|
"activity.auto_charge": "是否充值到账",
|
||||||
|
"activity.stock": "已使用库存",
|
||||||
|
"activity.approval_trade_no": "审批交易号",
|
||||||
|
"activity.amount": "支付金额",
|
||||||
|
"activity.channels": "支付渠道",
|
||||||
|
"activity.key_begin": "开始月份",
|
||||||
|
"activity.key_end": "截止月份",
|
||||||
|
"activity.key_unit": "时间单位",
|
||||||
|
"activity.key_pay_button_text": "Key支付按钮文本",
|
||||||
|
"activity.goods_pay_button_text": "商品支付按钮文本",
|
||||||
|
"activity.is_open_db_transaction": "是否开启事务",
|
||||||
|
"activity.bank_tag": "银行标识",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,17 @@ func Load() App {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LoadEnv()
|
||||||
|
if v := os.Getenv("MARKETING_DB_HOST"); v != "" { cfg.MarketingDB.Host = v }
|
||||||
|
if v := os.Getenv("MARKETING_DB_PORT"); v != "" { cfg.MarketingDB.Port = v }
|
||||||
|
if v := os.Getenv("MARKETING_DB_USER"); v != "" { cfg.MarketingDB.User = v }
|
||||||
|
if v := os.Getenv("MARKETING_DB_PASSWORD"); v != "" { cfg.MarketingDB.Password = v }
|
||||||
|
if v := os.Getenv("MARKETING_DB_NAME"); v != "" { cfg.MarketingDB.Name = v }
|
||||||
|
if v := os.Getenv("YMT_DB_HOST"); v != "" { cfg.YMTDB.Host = v }
|
||||||
|
if v := os.Getenv("YMT_DB_PORT"); v != "" { cfg.YMTDB.Port = v }
|
||||||
|
if v := os.Getenv("YMT_DB_USER"); v != "" { cfg.YMTDB.User = v }
|
||||||
|
if v := os.Getenv("YMT_DB_PASSWORD"); v != "" { cfg.YMTDB.Password = v }
|
||||||
|
if v := os.Getenv("YMT_DB_NAME"); v != "" { cfg.YMTDB.Name = v }
|
||||||
return cfg
|
return cfg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,26 @@ func BuildSQL(req BuildRequest, whitelist map[string]bool) (string, []interface{
|
||||||
} else {
|
} else {
|
||||||
sb.WriteString(" LEFT JOIN `order_voucher` ON `order_voucher`.order_number = `order`.order_number")
|
sb.WriteString(" LEFT JOIN `order_voucher` ON `order_voucher`.order_number = `order`.order_number")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// order_digit (ymt only)
|
||||||
|
if need["order_digit"] && req.MainTable == "order_info" {
|
||||||
|
sb.WriteString(" LEFT JOIN `order_digit` ON `order_digit`.order_no = `order_info`.order_no")
|
||||||
|
}
|
||||||
|
// goods_voucher_batch (ymt)
|
||||||
|
if need["goods_voucher_batch"] && req.MainTable == "order_info" {
|
||||||
|
sb.WriteString(" LEFT JOIN `goods_voucher_batch` ON `goods_voucher_batch`.channel_batch_no = `order_voucher`.channel_batch_no")
|
||||||
|
}
|
||||||
|
// goods_voucher_subject_config (ymt)
|
||||||
|
if need["goods_voucher_subject_config"] && req.MainTable == "order_info" {
|
||||||
|
sb.WriteString(" LEFT JOIN `goods_voucher_subject_config` ON `goods_voucher_subject_config`.id = `goods_voucher_batch`.voucher_subject_id")
|
||||||
|
}
|
||||||
|
// merchant (ymt)
|
||||||
|
if need["merchant"] && req.MainTable == "order_info" {
|
||||||
|
sb.WriteString(" LEFT JOIN `merchant` ON `merchant`.id = `order_info`.merchant_id")
|
||||||
|
}
|
||||||
|
// activity (ymt)
|
||||||
|
if need["activity"] && req.MainTable == "order_info" {
|
||||||
|
sb.WriteString(" LEFT JOIN `activity` ON `activity`.id = `order_info`.activity_id")
|
||||||
}
|
}
|
||||||
// plan
|
// plan
|
||||||
if req.MainTable == "order" {
|
if req.MainTable == "order" {
|
||||||
|
|
@ -342,6 +362,9 @@ func escape(s string) string {
|
||||||
if s == "key" {
|
if s == "key" {
|
||||||
return "`key`"
|
return "`key`"
|
||||||
}
|
}
|
||||||
|
if s == "index" {
|
||||||
|
return "`index`"
|
||||||
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
connecting YMT MySQL: 47.97.27.195:3306 db merketing user root
|
||||||
|
connecting Marketing MySQL: 192.168.6.92:3306 db market user root
|
||||||
|
YMT DSN: root:lansexiongdi6,@tcp(47.97.27.195:3306)/merketing?parseTime=True&loc=Local&charset=utf8mb4
|
||||||
|
Marketing DSN: root:lansexiongdi@tcp(192.168.6.92:3306)/market?parseTime=True&loc=Local&charset=utf8mb4
|
||||||
|
dial tcp 192.168.6.92:3306: connect: operation timed out
|
||||||
|
connecting YMT MySQL: 47.97.27.195:3306 db merketing user root
|
||||||
|
connecting Marketing MySQL: 192.168.6.92:3306 db market user root
|
||||||
|
server listening on :8077
|
||||||
|
connecting YMT MySQL: 47.97.27.195:3306 db merketing user root
|
||||||
|
connecting Marketing MySQL: 192.168.6.92:3306 db market user root
|
||||||
|
server listening on :8077
|
||||||
|
{"bytes":1040,"duration_ms":49,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:05:24+08:00"}
|
||||||
|
{"bytes":8025,"duration_ms":306,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:05:33+08:00"}
|
||||||
|
{"bytes":8025,"duration_ms":316,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:05:35+08:00"}
|
||||||
|
{"bytes":8025,"duration_ms":308,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:05:35+08:00"}
|
||||||
|
{"bytes":8025,"duration_ms":305,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:05:36+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":100,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:05:45+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":49,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:05:49+08:00"}
|
||||||
|
{"bytes":1207,"duration_ms":98,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:07:49+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":58,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:10:14+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":51,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:10:20+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":49,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:10:21+08:00"}
|
||||||
|
connecting YMT MySQL: 47.97.27.195:3306 db merketing user root
|
||||||
|
connecting Marketing MySQL: 192.168.6.92:3306 db market user root
|
||||||
|
server listening on :8077
|
||||||
|
{"bytes":1040,"duration_ms":60,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:17:14+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":61,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:18:15+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":52,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:18:17+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":57,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:18:18+08:00"}
|
||||||
|
connecting YMT MySQL: 47.97.27.195:3306 db merketing user root
|
||||||
|
connecting Marketing MySQL: 192.168.6.92:3306 db market user root
|
||||||
|
server listening on :8077
|
||||||
|
{"bytes":1040,"duration_ms":45,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:22:28+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":46,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:35:14+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":46,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:35:18+08:00"}
|
||||||
|
connecting YMT MySQL: 47.97.27.195:3306 db merketing user root
|
||||||
|
connecting Marketing MySQL: 192.168.6.92:3306 db market user root
|
||||||
|
server listening on :8077
|
||||||
|
{"bytes":1040,"duration_ms":50,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:38:17+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":50,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:52:58+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":51,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:52:59+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":51,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T10:53:05+08:00"}
|
||||||
|
connecting YMT MySQL: 47.97.27.195:3306 db merketing user root
|
||||||
|
connecting Marketing MySQL: 192.168.6.92:3306 db market user root
|
||||||
|
server listening on :8077
|
||||||
|
{"bytes":870,"duration_ms":104,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T11:06:30+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":74,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T11:06:46+08:00"}
|
||||||
|
connecting YMT MySQL: 47.97.27.195:3306 db merketing user root
|
||||||
|
connecting Marketing MySQL: 192.168.6.92:3306 db market user root
|
||||||
|
server listening on :8077
|
||||||
|
{"bytes":1040,"duration_ms":52,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T11:11:24+08:00"}
|
||||||
|
connecting YMT MySQL: 47.97.27.195:3306 db merketing user root
|
||||||
|
connecting Marketing MySQL: 192.168.6.92:3306 db market user root
|
||||||
|
server listening on :8077
|
||||||
|
{"bytes":1040,"duration_ms":51,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T11:15:30+08:00"}
|
||||||
|
{"bytes":1040,"duration_ms":93,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T11:15:56+08:00"}
|
||||||
|
connecting YMT MySQL: 47.97.27.195:3306 db merketing user root
|
||||||
|
connecting Marketing MySQL: 192.168.6.92:3306 db market user root
|
||||||
|
server listening on :8077
|
||||||
|
{"bytes":1040,"duration_ms":71,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T11:19:43+08:00"}
|
||||||
|
connecting YMT MySQL: 47.97.27.195:3306 db merketing user root
|
||||||
|
connecting Marketing MySQL: 192.168.6.92:3306 db market user root
|
||||||
|
server listening on :8077
|
||||||
|
{"bytes":1040,"duration_ms":48,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T11:25:04+08:00"}
|
||||||
|
trace_id=a89d208e57f34d306f9315a6fcce39f7 sql=INSERT INTO export_templates (name, datasource, main_table, fields_json, filters_json, file_format, visibility, owner_id, enabled, stats_enabled, last_validated_at, created_at, updated_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?) args=[易码通-立减金-订单导出 ymt order_info [91 34 111 114 100 101 114 46 111 114 100 101 114 95 110 117 109 98 101 114 34 44 34 111 114 100 101 114 46 107 101 121 34 44 34 111 114 100 101 114 46 111 117 116 95 116 114 97 100 101 95 110 111 34 44 34 111 114 100 101 114 46 116 121 112 101 34 44 34 111 114 100 101 114 46 115 116 97 116 117 115 34 44 34 111 114 100 101 114 46 99 111 110 116 114 97 99 116 95 112 114 105 99 101 34 44 34 111 114 100 101 114 46 110 117 109 34 44 34 111 114 100 101 114 46 112 97 121 95 97 109 111 117 110 116 34 44 34 111 114 100 101 114 46 112 97 121 95 115 116 97 116 117 115 34 44 34 111 114 100 101 114 46 99 114 101 97 116 101 95 116 105 109 101 34 44 34 111 114 100 101 114 46 111 102 102 105 99 105 97 108 95 112 114 105 99 101 34 44 34 111 114 100 101 114 46 109 101 114 99 104 97 110 116 95 110 97 109 101 34 44 34 111 114 100 101 114 46 97 99 116 105 118 105 116 121 95 110 97 109 101 34 44 34 111 114 100 101 114 46 103 111 111 100 115 95 110 97 109 101 34 44 34 111 114 100 101 114 46 112 97 121 95 116 105 109 101 34 44 34 111 114 100 101 114 46 100 105 115 99 111 117 110 116 95 97 109 111 117 110 116 34 44 34 111 114 100 101 114 46 99 111 115 116 95 112 114 105 99 101 34 44 34 111 114 100 101 114 46 115 117 99 99 101 115 115 95 110 117 109 34 44 34 111 114 100 101 114 46 99 104 97 110 110 101 108 34 44 34 111 114 100 101 114 46 111 117 116 95 111 114 100 101 114 95 110 111 34 44 34 111 114 100 101 114 46 114 101 99 104 97 114 103 101 95 115 117 99 95 116 105 109 101 34 44 34 111 114 100 101 114 46 107 101 121 95 98 97 116 99 104 95 110 97 109 101 34 44 34 97 99 116 105 118 105 116 121 46 115 101 116 116 108 101 109 101 110 116 95 116 121 112 101 34 44 34 111 114 100 101 114 95 118 111 117 99 104 101 114 46 99 104 97 110 110 101 108 95 97 99 116 105 118 105 116 121 95 105 100 34 44 34 111 114 100 101 114 95 118 111 117 99 104 101 114 46 99 104 97 110 110 101 108 95 118 111 117 99 104 101 114 95 105 100 34 44 34 111 114 100 101 114 95 118 111 117 99 104 101 114 46 115 116 97 116 117 115 34 44 34 111 114 100 101 114 95 118 111 117 99 104 101 114 46 114 101 99 101 105 118 101 95 109 111 100 101 34 44 34 111 114 100 101 114 95 118 111 117 99 104 101 114 46 103 114 97 110 116 95 116 105 109 101 34 44 34 111 114 100 101 114 95 118 111 117 99 104 101 114 46 117 115 97 103 101 95 116 105 109 101 34 44 34 111 114 100 101 114 95 118 111 117 99 104 101 114 46 111 118 101 114 100 117 101 95 116 105 109 101 34 44 34 111 114 100 101 114 95 118 111 117 99 104 101 114 46 114 101 102 117 110 100 95 97 109 111 117 110 116 34 44 34 111 114 100 101 114 95 118 111 117 99 104 101 114 46 97 99 99 111 117 110 116 95 110 111 34 44 34 103 111 111 100 115 95 118 111 117 99 104 101 114 95 98 97 116 99 104 46 99 104 97 110 110 101 108 95 98 97 116 99 104 95 110 111 34 44 34 103 111 111 100 115 95 118 111 117 99 104 101 114 95 98 97 116 99 104 46 116 101 109 112 95 110 111 34 44 34 103 111 111 100 115 95 118 111 117 99 104 101 114 95 115 117 98 106 101 99 116 95 99 111 110 102 105 103 46 110 97 109 101 34 44 34 111 114 100 101 114 95 118 111 117 99 104 101 114 46 99 104 97 110 110 101 108 34 93] [123 34 116 121 112 101 95 101 113 34 58 50 125] xlsx private 0 1 0 2025-11-27 11:31:11.386171 +0800 CST m=+625.521789542 2025-11-27 11:31:11.386171 +0800 CST m=+625.521789542 2025-11-27 11:31:11.386171 +0800 CST m=+625.521789542]
|
||||||
|
{"bytes":79,"duration_ms":99,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":201,"trace_id":"","ts":"2025-11-27T11:31:11+08:00"}
|
||||||
|
{"bytes":1371,"duration_ms":48,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T11:31:11+08:00"}
|
||||||
|
{"bytes":1272,"duration_ms":170,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T11:31:14+08:00"}
|
||||||
|
{"bytes":870,"duration_ms":99,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T11:31:19+08:00"}
|
||||||
|
{"bytes":1614,"duration_ms":11,"kind":"access","level":"INFO","method":"","path":"","query":"","remote":"","status":200,"trace_id":"","ts":"2025-11-27T11:31:19+08:00"}
|
||||||
|
|
@ -122,6 +122,7 @@
|
||||||
<el-cascader
|
<el-cascader
|
||||||
ref="fieldsCascader"
|
ref="fieldsCascader"
|
||||||
v-model="form.fieldsSel"
|
v-model="form.fieldsSel"
|
||||||
|
:key="form.datasource + '-' + String(form.orderType)"
|
||||||
:options="fieldOptions"
|
:options="fieldOptions"
|
||||||
:props="{ multiple: true, checkStrictly: false, expandTrigger: 'hover', checkOnClickNode: true, checkOnClickLeaf: true }"
|
:props="{ multiple: true, checkStrictly: false, expandTrigger: 'hover', checkOnClickNode: true, checkOnClickLeaf: true }"
|
||||||
:teleported="false"
|
:teleported="false"
|
||||||
|
|
@ -185,6 +186,7 @@
|
||||||
<el-cascader
|
<el-cascader
|
||||||
ref="editFieldsCascader"
|
ref="editFieldsCascader"
|
||||||
v-model="edit.fieldsSel"
|
v-model="edit.fieldsSel"
|
||||||
|
:key="edit.datasource + '-' + String(edit.orderType)"
|
||||||
:options="editFieldOptions"
|
:options="editFieldOptions"
|
||||||
:props="{ multiple: true, checkStrictly: false, expandTrigger: 'hover', checkOnClickNode: true, checkOnClickLeaf: true }"
|
:props="{ multiple: true, checkStrictly: false, expandTrigger: 'hover', checkOnClickNode: true, checkOnClickLeaf: true }"
|
||||||
:teleported="false"
|
:teleported="false"
|
||||||
|
|
|
||||||
177
web/main.js
177
web/main.js
|
|
@ -180,19 +180,56 @@ const { createApp, reactive } = Vue;
|
||||||
{ value: 'pay_amount', label: '支付金额' },
|
{ value: 'pay_amount', label: '支付金额' },
|
||||||
{ value: 'pay_status', label: '支付状态' },
|
{ value: 'pay_status', label: '支付状态' },
|
||||||
{ value: 'create_time', label: '创建时间' },
|
{ value: 'create_time', label: '创建时间' },
|
||||||
{ value: 'update_time', label: '更新时间' }
|
{ value: 'update_time', label: '更新时间' },
|
||||||
|
{ value: 'official_price', label: '官方价' },
|
||||||
|
{ value: 'merchant_name', label: '分销商名称' },
|
||||||
|
{ value: 'activity_name', label: '活动名称' },
|
||||||
|
{ value: 'goods_name', label: '商品名称' },
|
||||||
|
{ value: 'pay_time', label: '支付时间' },
|
||||||
|
{ value: 'coupon_id', label: '优惠券ID' },
|
||||||
|
{ value: 'discount_amount', label: '优惠金额' },
|
||||||
|
{ value: 'supplier_product_name', label: '供应商产品名称' },
|
||||||
|
{ value: 'is_inner', label: '内部供应商订单' },
|
||||||
|
{ value: 'icon', label: '订单图片' },
|
||||||
|
{ value: 'cost_price', label: '成本价' },
|
||||||
|
{ value: 'success_num', label: '到账数量' },
|
||||||
|
{ value: 'is_reset', label: '是否重置' },
|
||||||
|
{ value: 'is_retry', label: '是否重试' },
|
||||||
|
{ value: 'channel', label: '支付渠道' },
|
||||||
|
{ value: 'is_store', label: '是否退还库存' },
|
||||||
|
{ value: 'trace_id', label: 'TraceID' },
|
||||||
|
{ value: 'out_order_no', label: '外部订单号' },
|
||||||
|
{ value: 'next_retry_time', label: '下次重试时间' },
|
||||||
|
{ value: 'recharge_suc_time', label: '充值成功时间' },
|
||||||
|
{ value: 'supplier_id', label: '供应商ID' },
|
||||||
|
{ value: 'supplier_product_id', label: '供应商产品ID' },
|
||||||
|
{ value: 'merchant_id', label: '分销商ID(冗余)' },
|
||||||
|
{ value: 'goods_id', label: '商品ID(冗余)' },
|
||||||
|
{ value: 'activity_id', label: '活动ID(冗余)' },
|
||||||
|
{ value: 'key_batch_name', label: 'key批次名称' }
|
||||||
],
|
],
|
||||||
order_cash: [
|
order_cash: [
|
||||||
|
{ value: 'order_no', label: '订单号' },
|
||||||
|
{ value: 'trade_no', label: '交易号' },
|
||||||
|
{ value: 'wechat_detail_id', label: '微信明细单号' },
|
||||||
{ value: 'channel', label: '渠道' },
|
{ value: 'channel', label: '渠道' },
|
||||||
{ value: 'cash_activity_id', label: '红包批次号' },
|
{ value: 'denomination', label: '红包面额' },
|
||||||
|
{ value: 'account', label: '领取账号' },
|
||||||
|
{ value: 'receive_name', label: '真实姓名' },
|
||||||
|
{ value: 'app_id', label: '转账AppID' },
|
||||||
{ value: 'receive_status', label: '领取状态' },
|
{ value: 'receive_status', label: '领取状态' },
|
||||||
{ value: 'receive_time', label: '拆红包时间' },
|
{ value: 'merchant_id', label: '分销商ID' },
|
||||||
{ value: 'cash_packet_id', label: '红包ID' },
|
{ value: 'supplier_id', label: '供应商ID' },
|
||||||
{ value: 'cash_id', label: '红包规则ID' },
|
{ value: 'activity_id', label: '活动ID' },
|
||||||
{ value: 'amount', label: '红包额度' },
|
{ value: 'goods_id', label: '商品ID' },
|
||||||
{ value: 'status', label: '状态' },
|
{ value: 'user_id', label: '创建者ID' },
|
||||||
|
{ value: 'receive_time', label: '领取时间' },
|
||||||
|
{ value: 'success_time', label: '成功时间' },
|
||||||
{ value: 'expire_time', label: '过期时间' },
|
{ value: 'expire_time', label: '过期时间' },
|
||||||
{ value: 'update_time', label: '更新时间' }
|
{ value: 'create_time', label: '创建时间' },
|
||||||
|
{ value: 'update_time', label: '更新时间' },
|
||||||
|
{ value: 'version', label: '版本' },
|
||||||
|
{ value: 'is_confirm', label: '是否确认' }
|
||||||
],
|
],
|
||||||
order_voucher: [
|
order_voucher: [
|
||||||
{ value: 'channel', label: '渠道' },
|
{ value: 'channel', label: '渠道' },
|
||||||
|
|
@ -212,6 +249,99 @@ const { createApp, reactive } = Vue;
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 扩展易码通数据源的关联表字段
|
||||||
|
FIELDS_MAP.ymt.order_digit = [
|
||||||
|
{ value: 'order_no', label: '订单号' },
|
||||||
|
{ value: 'card_no', label: '卡号' },
|
||||||
|
{ value: 'account', label: '充值账号' },
|
||||||
|
{ value: 'goods_id', label: '商品ID' },
|
||||||
|
{ value: 'merchant_id', label: '分销商ID' },
|
||||||
|
{ value: 'supplier_id', label: '供应商ID' },
|
||||||
|
{ value: 'activity_id', label: '活动ID' },
|
||||||
|
{ value: 'user_id', label: '创建者ID' },
|
||||||
|
{ value: 'success_time', label: '到账时间' },
|
||||||
|
{ value: 'supplier_product_no', label: '供应商产品编码' },
|
||||||
|
{ value: 'order_type', label: '订单类型' },
|
||||||
|
{ value: 'end_time', label: '卡密有效期' },
|
||||||
|
{ value: 'create_time', label: '创建时间' },
|
||||||
|
{ value: 'update_time', label: '更新时间' },
|
||||||
|
{ value: 'code', label: '验证码' },
|
||||||
|
{ value: 'sms_channel', label: '短信渠道' }
|
||||||
|
]
|
||||||
|
FIELDS_MAP.ymt.goods_voucher_batch = [
|
||||||
|
{ value: 'channel_batch_no', label: '渠道批次号' },
|
||||||
|
{ value: 'voucher_subject_id', label: '主体配置ID' },
|
||||||
|
{ value: 'id', label: 'ID' },
|
||||||
|
{ value: 'goods_voucher_id', label: '立减金ID' },
|
||||||
|
{ value: 'supplier_id', label: '供应商ID' },
|
||||||
|
{ value: 'temp_no', label: '模板编号' },
|
||||||
|
{ value: 'index', label: '权重' },
|
||||||
|
{ value: 'create_time', label: '创建时间' },
|
||||||
|
{ value: 'update_time', label: '更新时间' }
|
||||||
|
]
|
||||||
|
FIELDS_MAP.ymt.goods_voucher_subject_config = [
|
||||||
|
{ value: 'id', label: '主体配置ID' },
|
||||||
|
{ value: 'name', label: '主体名称' },
|
||||||
|
{ value: 'type', label: '主体类型' },
|
||||||
|
{ value: 'create_time', label: '创建时间' }
|
||||||
|
]
|
||||||
|
FIELDS_MAP.ymt.merchant = [
|
||||||
|
{ value: 'id', label: '客户ID' },
|
||||||
|
{ value: 'user_id', label: '用户中心ID' },
|
||||||
|
{ value: 'merchant_no', label: '商户编码' },
|
||||||
|
{ value: 'name', label: '客户名称' },
|
||||||
|
{ value: 'subject', label: '客户主体' },
|
||||||
|
{ value: 'third_party', label: '来源类型' },
|
||||||
|
{ value: 'status', label: '状态' },
|
||||||
|
{ value: 'balance', label: '客户余额' },
|
||||||
|
{ value: 'total_consumption', label: '累计消费' },
|
||||||
|
{ value: 'contact_name', label: '联系人名称' },
|
||||||
|
{ value: 'contact_phone', label: '联系人电话' },
|
||||||
|
{ value: 'contact_email', label: '联系人Email' },
|
||||||
|
{ value: 'create_time', label: '创建时间' },
|
||||||
|
{ value: 'update_time', label: '编辑时间' }
|
||||||
|
]
|
||||||
|
FIELDS_MAP.ymt.activity = [
|
||||||
|
{ value: 'id', label: '活动ID' },
|
||||||
|
{ value: 'user_id', label: '创建者ID' },
|
||||||
|
{ value: 'merchant_id', label: '客户ID' },
|
||||||
|
{ value: 'user_name', label: '创建者名称' },
|
||||||
|
{ value: 'name', label: '活动名称' },
|
||||||
|
{ value: 'activity_no', label: '活动编号' },
|
||||||
|
{ value: 'status', label: '状态' },
|
||||||
|
{ value: 'key_total_num', label: 'Key码总量' },
|
||||||
|
{ value: 'key_generate_num', label: 'Key码已生成数量' },
|
||||||
|
{ value: 'key_usable_num', label: 'Key可使用次数' },
|
||||||
|
{ value: 'domain_url', label: '域名' },
|
||||||
|
{ value: 'theme_login_id', label: '登录模版ID' },
|
||||||
|
{ value: 'theme_list_id', label: '列表模版ID' },
|
||||||
|
{ value: 'theme_verify_id', label: '验证模版ID' },
|
||||||
|
{ value: 'settlement_type', label: '结算方式' },
|
||||||
|
{ value: 'key_expire_type', label: 'Key有效期类型' },
|
||||||
|
{ value: 'key_valid_day', label: '有效天数' },
|
||||||
|
{ value: 'key_begin_time', label: 'Key有效开始时间' },
|
||||||
|
{ value: 'key_end_time', label: 'Key有效结束时间' },
|
||||||
|
{ value: 'key_style', label: 'Key样式' },
|
||||||
|
{ value: 'begin_time', label: '开始时间' },
|
||||||
|
{ value: 'end_time', label: '结束时间' },
|
||||||
|
{ value: 'is_retry', label: '是否自动重试' },
|
||||||
|
{ value: 'create_time', label: '创建时间' },
|
||||||
|
{ value: 'update_time', label: '修改时间' },
|
||||||
|
{ value: 'discard_time', label: '作废时间' },
|
||||||
|
{ value: 'delete_time', label: '删除时间' },
|
||||||
|
{ value: 'auto_charge', label: '是否充值到账' },
|
||||||
|
{ value: 'stock', label: '已使用库存' },
|
||||||
|
{ value: 'approval_trade_no', label: '审批交易号' },
|
||||||
|
{ value: 'amount', label: '支付金额' },
|
||||||
|
{ value: 'channels', label: '支付渠道' },
|
||||||
|
{ value: 'key_begin', label: '开始月份' },
|
||||||
|
{ value: 'key_end', label: '截止月份' },
|
||||||
|
{ value: 'key_unit', label: '时间单位' },
|
||||||
|
{ value: 'key_pay_button_text', label: 'Key支付按钮文本' },
|
||||||
|
{ value: 'goods_pay_button_text', label: '商品支付按钮文本' },
|
||||||
|
{ value: 'is_open_db_transaction', label: '是否开启事务' },
|
||||||
|
{ value: 'bank_tag', label: '银行标识' }
|
||||||
|
]
|
||||||
const TABLE_LABELS = {
|
const TABLE_LABELS = {
|
||||||
order: '订单主表',
|
order: '订单主表',
|
||||||
order_detail: '订单详情',
|
order_detail: '订单详情',
|
||||||
|
|
@ -222,7 +352,12 @@ const { createApp, reactive } = Vue;
|
||||||
code_batch: '兑换码批次',
|
code_batch: '兑换码批次',
|
||||||
voucher: '立减金',
|
voucher: '立减金',
|
||||||
voucher_batch: '立减金批次',
|
voucher_batch: '立减金批次',
|
||||||
merchant_key_send: '开放平台发放记录'
|
merchant_key_send: '开放平台发放记录',
|
||||||
|
order_digit: '直充卡密订单',
|
||||||
|
merchant: '客户',
|
||||||
|
activity: '活动',
|
||||||
|
goods_voucher_batch: '立减金批次表',
|
||||||
|
goods_voucher_subject_config: '立减金主体配置'
|
||||||
}
|
}
|
||||||
const fieldOptions = Vue.computed(()=>{
|
const fieldOptions = Vue.computed(()=>{
|
||||||
const ds = state.form.datasource
|
const ds = state.form.datasource
|
||||||
|
|
@ -235,13 +370,22 @@ const { createApp, reactive } = Vue;
|
||||||
orderChildrenBase.push(...fieldsNode('order'))
|
orderChildrenBase.push(...fieldsNode('order'))
|
||||||
const orderChildrenFor = (t)=>{
|
const orderChildrenFor = (t)=>{
|
||||||
const ch = [...orderChildrenBase]
|
const ch = [...orderChildrenBase]
|
||||||
|
ch.push(node('merchant', fieldsNode('merchant')))
|
||||||
|
ch.push(node('activity', fieldsNode('activity')))
|
||||||
if(t===2){
|
if(t===2){
|
||||||
ch.push(node('order_voucher', fieldsNode('order_voucher')))
|
ch.push(node('order_voucher', fieldsNode('order_voucher')))
|
||||||
|
ch.push(node('goods_voucher_batch', fieldsNode('goods_voucher_batch')))
|
||||||
|
ch.push(node('goods_voucher_subject_config', fieldsNode('goods_voucher_subject_config')))
|
||||||
} else if(t===3){
|
} else if(t===3){
|
||||||
ch.push(node('order_cash', fieldsNode('order_cash')))
|
ch.push(node('order_cash', fieldsNode('order_cash')))
|
||||||
|
} else if(t===1){
|
||||||
|
ch.push(node('order_digit', fieldsNode('order_digit')))
|
||||||
} else if(!t){
|
} else if(!t){
|
||||||
ch.push(node('order_voucher', fieldsNode('order_voucher')))
|
ch.push(node('order_voucher', fieldsNode('order_voucher')))
|
||||||
ch.push(node('order_cash', fieldsNode('order_cash')))
|
ch.push(node('order_cash', fieldsNode('order_cash')))
|
||||||
|
ch.push(node('order_digit', fieldsNode('order_digit')))
|
||||||
|
ch.push(node('goods_voucher_batch', fieldsNode('goods_voucher_batch')))
|
||||||
|
ch.push(node('goods_voucher_subject_config', fieldsNode('goods_voucher_subject_config')))
|
||||||
}
|
}
|
||||||
return ch
|
return ch
|
||||||
}
|
}
|
||||||
|
|
@ -305,10 +449,16 @@ const { createApp, reactive } = Vue;
|
||||||
state.form.main_table = (ds==='ymt' ? 'order_info' : 'order')
|
state.form.main_table = (ds==='ymt' ? 'order_info' : 'order')
|
||||||
state.form.orderType = 1
|
state.form.orderType = 1
|
||||||
})
|
})
|
||||||
|
Vue.watch(()=>state.form.orderType, ()=>{
|
||||||
|
state.form.fieldsSel = []
|
||||||
|
})
|
||||||
Vue.watch(()=>state.edit.datasource, (ds)=>{
|
Vue.watch(()=>state.edit.datasource, (ds)=>{
|
||||||
state.edit.fieldsSel = []
|
state.edit.fieldsSel = []
|
||||||
state.edit.main_table = (ds==='ymt' ? 'order_info' : 'order')
|
state.edit.main_table = (ds==='ymt' ? 'order_info' : 'order')
|
||||||
})
|
})
|
||||||
|
Vue.watch(()=>state.edit.orderType, ()=>{
|
||||||
|
state.edit.fieldsSel = []
|
||||||
|
})
|
||||||
const orderLeafPaths = (ds)=>{
|
const orderLeafPaths = (ds)=>{
|
||||||
const FM = FIELDS_MAP[ds] || {}
|
const FM = FIELDS_MAP[ds] || {}
|
||||||
const arr = (FM.order || []).map(f=>['order', f.value])
|
const arr = (FM.order || []).map(f=>['order', f.value])
|
||||||
|
|
@ -390,13 +540,22 @@ const { createApp, reactive } = Vue;
|
||||||
orderChildrenBase.push(...fieldsNode('order'))
|
orderChildrenBase.push(...fieldsNode('order'))
|
||||||
const orderChildrenFor = (t)=>{
|
const orderChildrenFor = (t)=>{
|
||||||
const ch = [...orderChildrenBase]
|
const ch = [...orderChildrenBase]
|
||||||
|
ch.push(node('merchant', fieldsNode('merchant')))
|
||||||
|
ch.push(node('activity', fieldsNode('activity')))
|
||||||
if(t===2){
|
if(t===2){
|
||||||
ch.push(node('order_voucher', fieldsNode('order_voucher')))
|
ch.push(node('order_voucher', fieldsNode('order_voucher')))
|
||||||
|
ch.push(node('goods_voucher_batch', fieldsNode('goods_voucher_batch')))
|
||||||
|
ch.push(node('goods_voucher_subject_config', fieldsNode('goods_voucher_subject_config')))
|
||||||
} else if(t===3){
|
} else if(t===3){
|
||||||
ch.push(node('order_cash', fieldsNode('order_cash')))
|
ch.push(node('order_cash', fieldsNode('order_cash')))
|
||||||
|
} else if(t===1){
|
||||||
|
ch.push(node('order_digit', fieldsNode('order_digit')))
|
||||||
} else if(!t){
|
} else if(!t){
|
||||||
ch.push(node('order_voucher', fieldsNode('order_voucher')))
|
ch.push(node('order_voucher', fieldsNode('order_voucher')))
|
||||||
ch.push(node('order_cash', fieldsNode('order_cash')))
|
ch.push(node('order_cash', fieldsNode('order_cash')))
|
||||||
|
ch.push(node('order_digit', fieldsNode('order_digit')))
|
||||||
|
ch.push(node('goods_voucher_batch', fieldsNode('goods_voucher_batch')))
|
||||||
|
ch.push(node('goods_voucher_subject_config', fieldsNode('goods_voucher_subject_config')))
|
||||||
}
|
}
|
||||||
return ch
|
return ch
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue