feat(partner): complete proxy order with dual SMS and pickup
CI / verify (pull_request) Has been cancelled
CI / verify (pull_request) Has been cancelled
Add partner/customer SMS confirm, address auto-receive or on-site pickup, proxy placer fields, PARTNER_PROXY user source, and C-end badge. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -17,7 +17,7 @@ export interface AppConfig {
|
||||
aliyunSmsTemplateCode: string;
|
||||
/** 核销确认短信模板(REDEEM_PHONE_CONFIRM);env: ALIYUN_SMS_TEMPLATE_CONFIRM_REDEEM */
|
||||
aliyunSmsRedeemConfirmTemplateCode: string;
|
||||
/** 合伙人代下单短信模板(PARTNER_PROXY_ORDER);env: ALIYUN_SMS_TEMPLATE_PROXY_ORDER */
|
||||
/** 合伙人代下单短信模板(PARTNER_PROXY_ORDER / PARTNER_PROXY_CUSTOMER);env: ALIYUN_SMS_TEMPLATE_PROXY_ORDER */
|
||||
aliyunSmsProxyOrderTemplateCode: string;
|
||||
aliyunSmsAccessKeyId: string;
|
||||
aliyunSmsAccessKeySecret: string;
|
||||
|
||||
@@ -22,6 +22,7 @@ export enum UserSourceType {
|
||||
SHARE_LINK = 'SHARE_LINK',
|
||||
FRIEND_REFERRAL = 'FRIEND_REFERRAL',
|
||||
OFFLINE_EVENT = 'OFFLINE_EVENT',
|
||||
PARTNER_PROXY = 'PARTNER_PROXY',
|
||||
OTHER = 'OTHER',
|
||||
}
|
||||
|
||||
@@ -31,6 +32,7 @@ export const USER_SOURCE_TYPE_LABELS: Record<UserSourceType, string> = {
|
||||
[UserSourceType.SHARE_LINK]: '分享链接',
|
||||
[UserSourceType.FRIEND_REFERRAL]: '好友推荐',
|
||||
[UserSourceType.OFFLINE_EVENT]: '线下活动',
|
||||
[UserSourceType.PARTNER_PROXY]: '代下单',
|
||||
[UserSourceType.OTHER]: '其他',
|
||||
};
|
||||
|
||||
@@ -46,7 +48,9 @@ export enum SmsScene {
|
||||
REDEEM_PHONE_LOOKUP = 'REDEEM_PHONE_LOOKUP',
|
||||
/** 门店手机号核销:核销确认验证码(阿里云模板「核销确认」) */
|
||||
REDEEM_PHONE_CONFIRM = 'REDEEM_PHONE_CONFIRM',
|
||||
/** 合伙人代下单:线下代发货确认验证码(发至用户手机) */
|
||||
/** 合伙人代下单:客户手机号归属验证码(发至客户手机) */
|
||||
PARTNER_PROXY_CUSTOMER = 'PARTNER_PROXY_CUSTOMER',
|
||||
/** 合伙人代下单:线下确认验证码(发至合伙人手机) */
|
||||
PARTNER_PROXY_ORDER = 'PARTNER_PROXY_ORDER',
|
||||
/** 合伙人录店:门店登录手机号验证码(发至门店负责人手机) */
|
||||
PARTNER_STORE_OPEN = 'PARTNER_STORE_OPEN',
|
||||
|
||||
@@ -8,6 +8,10 @@ export interface OrderDto {
|
||||
quantity: number;
|
||||
productName: string;
|
||||
createdAt: string;
|
||||
orderType?: string;
|
||||
isProxyOrder?: boolean;
|
||||
proxyPartnerName?: string | null;
|
||||
proxyPartnerPhone?: string | null;
|
||||
}
|
||||
|
||||
export interface OrderPreviewRequest {
|
||||
@@ -39,12 +43,16 @@ export const FULFILLMENT_HOLD_REASON_LABELS: Record<string, string> = {
|
||||
LARGE_ORDER_GE_10_BOXES: '大单≥10箱,待总部确认推单/自配送',
|
||||
};
|
||||
|
||||
export type PartnerProxyDeliveryMode = 'ADDRESS' | 'ON_SITE_PICKUP';
|
||||
|
||||
export type PartnerProxyOrderProductOption = {
|
||||
id: string;
|
||||
name: string;
|
||||
spec: string;
|
||||
price: number;
|
||||
benefitAmount: number | null;
|
||||
coverUrl?: string | null;
|
||||
allowOnSitePickup?: boolean;
|
||||
};
|
||||
|
||||
export type PartnerProxyOrderPromoOption = {
|
||||
@@ -53,14 +61,27 @@ export type PartnerProxyOrderPromoOption = {
|
||||
name: string;
|
||||
};
|
||||
|
||||
export type PartnerProxyOrderStoreOption = {
|
||||
id: string;
|
||||
name: string;
|
||||
address?: string | null;
|
||||
phone?: string | null;
|
||||
province?: string | null;
|
||||
cityName?: string | null;
|
||||
district?: string | null;
|
||||
};
|
||||
|
||||
export type PartnerProxyOrderOptions = {
|
||||
products: PartnerProxyOrderProductOption[];
|
||||
promoCodes: PartnerProxyOrderPromoOption[];
|
||||
stores: PartnerProxyOrderStoreOption[];
|
||||
};
|
||||
|
||||
export type PartnerProxyOrderPreviewRequest = {
|
||||
productId: string;
|
||||
quantity: number;
|
||||
deliveryMode?: PartnerProxyDeliveryMode;
|
||||
storeId?: string;
|
||||
receiverCity?: string;
|
||||
receiverDistrict?: string;
|
||||
};
|
||||
@@ -69,18 +90,23 @@ export type PartnerProxyOrderPreviewResult = {
|
||||
productAmount: number;
|
||||
payAmount: number;
|
||||
benefitAmount: number;
|
||||
deliveryType: 'LOCAL' | 'CROSS_CITY';
|
||||
deliveryType: 'LOCAL' | 'CROSS_CITY' | 'ON_SITE_PICKUP';
|
||||
unitPrice: number;
|
||||
};
|
||||
|
||||
export type PartnerProxyOrderCreateRequest = {
|
||||
phone: string;
|
||||
smsCode: string;
|
||||
customerSmsCode: string;
|
||||
partnerSmsCode: string;
|
||||
deliveryMode: PartnerProxyDeliveryMode;
|
||||
/** 地址配送时必须为 true */
|
||||
autoReceive?: boolean;
|
||||
storeId?: string;
|
||||
receiverName?: string;
|
||||
province: string;
|
||||
city: string;
|
||||
district: string;
|
||||
addressDetail: string;
|
||||
province?: string;
|
||||
city?: string;
|
||||
district?: string;
|
||||
addressDetail?: string;
|
||||
productId: string;
|
||||
quantity: number;
|
||||
promoCodeId?: string;
|
||||
|
||||
Reference in New Issue
Block a user