Files
zkxw/web-admin/src/api/storage-entry-sms-notification.ts
T
2026-05-25 15:14:06 +08:00

45 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import request from '@/utils/http'
type PageList<T> = {
list: T[]
total: number
page: number
pageSize: number
totalPages: number
}
/** 查询列表(联查 storage_release_review + sms_notification) */
export function fetchStorageEntrySmsList(params?: {
page?: number
pageSize?: number
keyword?: string
storageStatus?: string
smsNotified?: string
storageTimeStart?: string
storageTimeEnd?: string
}) {
return request.get<PageList<Record<string, unknown>>>({
url: '/web/admin/storage-entry-sms-notifications/list',
params
})
}
/** 切换通知状态 */
export function fetchToggleStorageEntrySmsNotified(
id: string,
data: { smsNotified: number; storageReviewId?: string }
) {
return request.put({
url: `/web/admin/storage-entry-sms-notifications/${id}/toggle-status`,
data
})
}
/** 生成短信内容 */
export function fetchGenerateStorageEntrySms(id: string, storageReviewId?: string) {
return request.post<{ smsContent: string }>({
url: `/web/admin/storage-entry-sms-notifications/${id}/generate-sms`,
params: storageReviewId ? { storageReviewId } : undefined
})
}