新增:自动化规则支持拍下未付款自动改价
- 新增 order_created 触发器,识别买家拍下待付款交易卡片 - 新增 MTOP 订单改价接口 mtop.taobao.idle.trade.user.adjust.price(含 token 重签与凭证恢复) - 新增 adjust_price 自动化动作,目标价格按整数分校验与执行,错误按三态收口 - 应用层规则校验限定改价动作只用于拍下未付款规则,可附带买家提醒文案 - 前端规则页新增拍下改价类型、目标价格与可选提醒编辑器
This commit is contained in:
1 parent
c3020bde09
commit
7c4a944b43
39 files changed
+1218
-160
No files matched your search
@@ -81,7 +81,7 @@ func (s *Server) listAutomationRules(w http.ResponseWriter, r *http.Request) {
|
||||
triggerType := strings.TrimSpace(query.Get("trigger_type"))
|
||||
if triggerType != "" {
|
||||
switch triggerType {
|
||||
case automationapp.TriggerOrderPaid, automationapp.TriggerBuyerReviewed, automationapp.TriggerReviewMissingTimeout:
|
||||
case automationapp.TriggerOrderCreated, automationapp.TriggerOrderPaid, automationapp.TriggerBuyerReviewed, automationapp.TriggerReviewMissingTimeout:
|
||||
default:
|
||||
writeErr(w, http.StatusBadRequest, "不支持的触发类型")
|
||||
return
|
||||
@@ -269,7 +269,7 @@ func automationRuleDraft(req automationRuleRequest) automationapp.RuleDraft {
|
||||
// defaultAutomationRuleName 保留旧测试和兼容调用所需的默认名称函数。
|
||||
func defaultAutomationRuleName(triggerType, itemID string) string {
|
||||
// name 保存按触发类型选择的默认规则名称,必要时附加商品标识。
|
||||
name := map[string]string{automationapp.TriggerOrderPaid: "付款后自动发货", automationapp.TriggerBuyerReviewed: "评价后发送赠品", automationapp.TriggerReviewMissingTimeout: "超时未评价求评价"}[triggerType]
|
||||
name := map[string]string{automationapp.TriggerOrderCreated: "拍下未付款自动改价", automationapp.TriggerOrderPaid: "付款后自动发货", automationapp.TriggerBuyerReviewed: "评价后发送赠品", automationapp.TriggerReviewMissingTimeout: "超时未评价求评价"}[triggerType]
|
||||
if name == "" {
|
||||
name = "自动化规则"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user