feat(order-service): 增加资料提交后自定义说明
This commit is contained in:
@@ -15,6 +15,7 @@ export type OrderServiceProfileRow = {
|
||||
material_confirmation_json: Record<string, unknown>
|
||||
submit_text: string
|
||||
success_text: string
|
||||
post_submit_text: string
|
||||
status: string
|
||||
current_version_id: number | null
|
||||
current_version_no: number | null
|
||||
@@ -102,6 +103,7 @@ export async function upsertOrderServiceProfile(input: {
|
||||
materialConfirmation: Record<string, unknown>
|
||||
submitText: string
|
||||
successText: string
|
||||
postSubmitText: string
|
||||
adminUserId: number | null
|
||||
}): Promise<OrderServiceProfileRow> {
|
||||
const result = await query<OrderServiceProfileRow>(
|
||||
@@ -110,11 +112,11 @@ export async function upsertOrderServiceProfile(input: {
|
||||
category_id, name, title, description,
|
||||
guide_image_json, fields_json, screenshots_json, auto_publish_json,
|
||||
material_confirmation_json,
|
||||
submit_text, success_text, status, created_by_admin_user_id
|
||||
submit_text, success_text, post_submit_text, status, created_by_admin_user_id
|
||||
) VALUES (
|
||||
$1, $2, $3, $4,
|
||||
$5::jsonb, $6::jsonb, $7::jsonb, $8::jsonb, $9::jsonb,
|
||||
$10, $11, 'draft', $12
|
||||
$10, $11, $12, 'draft', $13
|
||||
)
|
||||
ON CONFLICT (category_id) DO UPDATE SET
|
||||
name = EXCLUDED.name,
|
||||
@@ -127,6 +129,7 @@ export async function upsertOrderServiceProfile(input: {
|
||||
material_confirmation_json = EXCLUDED.material_confirmation_json,
|
||||
submit_text = EXCLUDED.submit_text,
|
||||
success_text = EXCLUDED.success_text,
|
||||
post_submit_text = EXCLUDED.post_submit_text,
|
||||
current_version_id = CASE
|
||||
WHEN order_service_profiles.status = 'archived' THEN NULL
|
||||
ELSE order_service_profiles.current_version_id
|
||||
@@ -147,6 +150,7 @@ export async function upsertOrderServiceProfile(input: {
|
||||
JSON.stringify(input.materialConfirmation),
|
||||
input.submitText,
|
||||
input.successText,
|
||||
input.postSubmitText,
|
||||
input.adminUserId,
|
||||
],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user