update permission and product
This commit is contained in:
@@ -2,7 +2,7 @@ import type { Model } from "timi-web-api";
|
||||
import type { GaoPackageConfig } from "@/types/Package";
|
||||
|
||||
export type EventStatus = "DRAFT" | "ACTIVE" | "INACTIVE" | "DELETED";
|
||||
export type EventBizType = "GENERAL" | "PACKAGE_PURCHASE";
|
||||
export type EventBizType = "GENERAL" | "PACKAGE_PURCHASE" | "LEGACY_CONSUMPTION";
|
||||
|
||||
export type EventValueType = "NONE" | "NUMBER";
|
||||
export type EventValueUnit = "CENT" | "COUNT";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import type { Attachment, Model, PageResult, User } from "timi-web-api";
|
||||
import type { Customer } from "@/types/Customer";
|
||||
import type { EventRecord } from "@/types/EventRecord";
|
||||
import type { OrderFulfillment } from "@/types/Fulfillment";
|
||||
|
||||
export type PackageConfigStatus = "DRAFT" | "ACTIVE" | "INACTIVE";
|
||||
@@ -64,7 +63,6 @@ export type GaoCustomerPackage = {
|
||||
remark?: string | null;
|
||||
customer?: Customer;
|
||||
cancelOperator?: Partial<User>;
|
||||
purchaseEventRecord?: EventRecord;
|
||||
itemList?: CustomerPackageItem[];
|
||||
fulfillmentList?: OrderFulfillment[];
|
||||
} & Model;
|
||||
@@ -83,7 +81,7 @@ export type PackageAttachment = Partial<Attachment> & { tempFileId?: string; att
|
||||
|
||||
export type PackagePurchaseRequest = {
|
||||
requestNo: string;
|
||||
eventId: string;
|
||||
packageConfigId: string;
|
||||
customerId: string;
|
||||
saleAmount: number;
|
||||
purchasedAt?: number;
|
||||
|
||||
+21
-38
@@ -2,41 +2,20 @@ import type { BasePage, Model } from "timi-web-api";
|
||||
import type { Customer } from "@/types/Customer";
|
||||
|
||||
export type PointRuleStatus = "DRAFT" | "ACTIVE" | "INACTIVE" | "DELETED";
|
||||
export type PointRuleTriggerType = "EVERY_TIME" | "FIRST_TIME" | "AFTER_COUNT_EVERY_TIME" | "SOURCE_VALUE" | "CUSTOMER_EVENT_VALUE_TIER";
|
||||
export type PointRuleMode = "FIXED" | "SOURCE_VALUE" | "TIER";
|
||||
|
||||
/** 规则模式:简单规则固定积分值;脚本规则由 Groovy 脚本决定 */
|
||||
export type PointRuleMode = "SIMPLE" | "GROOVY";
|
||||
|
||||
/** 直接触发来源类型:事件登记 / 订单首次全额实收 */
|
||||
export type PointRuleTriggerSourceType = "EVENT_RECORD" | "SALES_ORDER_PAID";
|
||||
|
||||
/** 触发对象筛选类型 */
|
||||
export type PointRuleTriggerRefType = "EVENT";
|
||||
|
||||
export type PointLedgerChangeType = "EARN" | "CONSUME" | "REVOKE" | "ADJUST";
|
||||
export type PointLedgerDirection = "INCREASE" | "DECREASE";
|
||||
export type PointAction = Extract<PointLedgerChangeType, "EARN" | "CONSUME">;
|
||||
|
||||
export type PointRuleCondition = {
|
||||
min?: number;
|
||||
max?: number;
|
||||
threshold?: number;
|
||||
includeCurrent?: boolean;
|
||||
scope?: "CUSTOMER_EVENT";
|
||||
sourceEventId?: string;
|
||||
sourceValueField?: "numberValue";
|
||||
window?: {
|
||||
type: "ROLLING";
|
||||
amount: number;
|
||||
unit: "YEAR";
|
||||
};
|
||||
tiers?: PointRuleTier[];
|
||||
};
|
||||
|
||||
export type PointRuleTier = {
|
||||
min: number;
|
||||
max?: number | null;
|
||||
pointValue: number;
|
||||
};
|
||||
|
||||
export type PointRuleTierForm = {
|
||||
key: number;
|
||||
minText: string;
|
||||
maxText: string;
|
||||
pointAction: PointAction;
|
||||
pointValueText: string;
|
||||
};
|
||||
export type PointLedgerTriggerSourceType = PointRuleTriggerSourceType;
|
||||
|
||||
export type PointAccount = {
|
||||
storeId?: string;
|
||||
@@ -65,8 +44,11 @@ export type PointLedger = {
|
||||
balanceBefore?: number;
|
||||
balanceAfter?: number;
|
||||
ruleId?: string;
|
||||
eventId?: string;
|
||||
eventRecordId?: string;
|
||||
triggerSourceType?: PointLedgerTriggerSourceType;
|
||||
triggerSourceId?: string;
|
||||
salesOrderId?: string;
|
||||
groovyScriptVersionId?: string;
|
||||
ruleSnapshot?: Record<string, unknown> | null;
|
||||
sourcePayload?: Record<string, unknown>;
|
||||
idempotencyKey?: string;
|
||||
remark?: string;
|
||||
@@ -86,13 +68,14 @@ export type PointLedgerPage = {
|
||||
|
||||
export type PointRule = {
|
||||
storeId?: string;
|
||||
eventId?: string;
|
||||
ruleMode?: PointRuleMode;
|
||||
triggerSourceType?: PointRuleTriggerSourceType;
|
||||
triggerRefType?: PointRuleTriggerRefType;
|
||||
triggerRefId?: string;
|
||||
name: string;
|
||||
status?: PointRuleStatus;
|
||||
triggerType?: PointRuleTriggerType;
|
||||
pointMode?: PointRuleMode;
|
||||
pointValue?: number | null;
|
||||
conditionJson?: PointRuleCondition;
|
||||
groovyScriptId?: string;
|
||||
beginAt?: number;
|
||||
endAt?: number;
|
||||
priority?: number;
|
||||
|
||||
@@ -42,6 +42,7 @@ export type SalesOrder = {
|
||||
sourceEventRecordId?: string;
|
||||
requestNo?: string;
|
||||
purchasedAt?: number;
|
||||
paidAt?: number | null;
|
||||
operatorUserId?: string;
|
||||
cancelledAt?: number;
|
||||
cancelOperatorUserId?: string;
|
||||
|
||||
@@ -11,7 +11,6 @@ export type Store = {
|
||||
address?: string;
|
||||
remark?: string;
|
||||
autoClosedDay?: boolean;
|
||||
directProductSaleEventId?: string;
|
||||
sort?: number;
|
||||
} & Model;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user