refactor: sms

This commit is contained in:
xingyu
2022-11-15 20:43:02 +08:00
parent 12ac097b47
commit 09e61f7ef3
12 changed files with 361 additions and 487 deletions

View File

@ -1,8 +1,23 @@
import request from '@/config/axios'
import type { SmsChannelVO } from './types'
export type SmsChannelVO = {
id: number
status: number
signature: string
remark: string
apiKey: string
apiSecret: string
callbackUrl: string
createTime: string
}
export interface SmsChannelPageReqVO extends PageParam {
signature?: string
code?: string
status?: number
}
// 查询短信渠道列表
export const getSmsChannelPageApi = (params) => {
export const getSmsChannelPageApi = (params: SmsChannelPageReqVO) => {
return request.get({ url: '/system/sms-channel/page', params })
}

View File

@ -1,10 +0,0 @@
export type SmsChannelVO = {
id: number
status: number
signature: string
remark: string
apiKey: string
apiSecret: string
callbackUrl: string
createTime: string
}

View File

@ -1,11 +1,38 @@
import request from '@/config/axios'
export type SmsLogVO = {
id: number
idchannelId: number
templateId: number
mobile: string
userId: number
userType: number
sendStatus: number
receiveStatus: number
templateType: number
templateContent: string
templateParams: Map<string, object>
apiTemplateId: string
sendTime: string
createTime: string
}
export interface SmsLogPageReqVO extends PageParam {
signature?: string
code?: string
status?: number
}
export interface SmsLogExportReqVO {
code?: string
name?: string
status?: number
}
// 查询短信日志列表
export const getSmsLogPageApi = (params) => {
export const getSmsLogPageApi = (params: SmsLogPageReqVO) => {
return request.get({ url: '/system/sms-log/page', params })
}
// 导出短信日志
export const exportSmsLogApi = (params) => {
export const exportSmsLogApi = (params: SmsLogExportReqVO) => {
return request.download({ url: '/system/sms-log/export', params })
}

View File

@ -1,9 +0,0 @@
export type SmsLogVO = {
id: number
idchannelId: number
templateId: number
mobile: string
sendStatus: number
receiveStatus: number
createTime: string
}

View File

@ -1,5 +1,23 @@
import request from '@/config/axios'
import type { SmsTemplateVO } from './types'
export type SmsTemplateVO = {
id: number
type: number
status: number
code: string
name: string
content: string
remark: string
apiTemplateId: string
channelId: number
channelCode: string
createTime: string
}
export type SmsSendVO = {
mobile: string
templateCode: string
templateParams: string
}
// 查询短信模板列表
export const getSmsTemplatePageApi = (params) => {

View File

@ -1,19 +0,0 @@
export type SmsTemplateVO = {
id: number
type: number
status: number
code: string
name: string
content: string
remark: string
apiTemplateId: string
channelId: number
channelCode: string
createTime: string
}
export type SmsSendVO = {
mobile: string
templateCode: string
templateParams: string
}