合并 internal → main: 退款/提现/激活/CI 全面优化 #4

Open
shanshanzhong147 wants to merge 76 commits from internal into main
Showing only changes of commit 08434cfa32 - Show all commits
@@ -142,7 +142,7 @@ func (l *QueryCommissionReturnLogLogic) queryCommissionReturnLogRecordsByEventTy
UserID: row.ObjectID,
Amount: content.Amount,
EventType: content.Type,
Content: row.Content,
Content: commissionReturnLogContentText(content.Type, content.OrderNo),
CreatedAt: timestamp,
UpdatedAt: timestamp,
})
@@ -163,3 +163,21 @@ func isCommissionReturnEventType(eventType uint16) bool {
return false
}
}
// commissionReturnLogContentText 把佣金回退事件的原始 JSON 转成前端友好文字。
// 333 订单退款回佣 - 附订单号便于追溯;337/338 提现相关 - 跟订单无关。
func commissionReturnLogContentText(eventType uint16, orderNo string) string {
switch eventType {
case log.CommissionTypeRefund:
if strings.TrimSpace(orderNo) != "" {
return "订单退款回佣(订单号 " + orderNo + ")"
}
return "订单退款回佣"
case log.CommissionTypeWithdrawReject:
return "提现申请被驳回,佣金已退回"
case log.CommissionTypeWithdrawCancel:
return "已取消提现,佣金已退回"
default:
return "佣金调整"
}
}