店铺信息增加额外参数, 增加sysmail的定义
This commit is contained in:
parent
280a8251b7
commit
f74a27ca41
@ -82,7 +82,11 @@ class ShopController extends BaseController {
|
|||||||
@router('post /api/:accountid/shop')
|
@router('post /api/:accountid/shop')
|
||||||
async shopInfo(req) {
|
async shopInfo(req) {
|
||||||
let { sid } = req.params
|
let { sid } = req.params
|
||||||
if (!sid || !validShopId(sid)) {
|
if (!sid) {
|
||||||
|
throw new ZError(10, `shopInfo 没有店铺id: ${sid}`)
|
||||||
|
}
|
||||||
|
sid = sid.split('|')[0]
|
||||||
|
if (!validShopId(sid)) {
|
||||||
throw new ZError(10, `shopInfo 没有店铺id或者店铺id格式不正确: ${sid}`)
|
throw new ZError(10, `shopInfo 没有店铺id或者店铺id格式不正确: ${sid}`)
|
||||||
}
|
}
|
||||||
let rspData: any = {}
|
let rspData: any = {}
|
||||||
|
18
src/models/content/SysMail.ts
Normal file
18
src/models/content/SysMail.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { dbconn } from '../../decorators/dbconn'
|
||||||
|
import { getModelForClass, modelOptions, prop } from '@typegoose/typegoose'
|
||||||
|
import { Severity } from '@typegoose/typegoose/lib/internal/constants'
|
||||||
|
import { BaseModule } from '../Base'
|
||||||
|
|
||||||
|
@dbconn()
|
||||||
|
@modelOptions({
|
||||||
|
schemaOptions: { collection: 'sys_mail', timestamps: true },
|
||||||
|
options: { allowMixed: Severity.ALLOW },
|
||||||
|
})
|
||||||
|
export class SysMailClass extends BaseModule {
|
||||||
|
@prop()
|
||||||
|
public title: string
|
||||||
|
|
||||||
|
@prop()
|
||||||
|
public content: string
|
||||||
|
}
|
||||||
|
export const SysMail = getModelForClass(SysMailClass, { existingConnection: SysMailClass.db })
|
Loading…
x
Reference in New Issue
Block a user