add:添加sqlite保存激活记录
This commit is contained in:
26
electron/controller/activateRecord.ts
Normal file
26
electron/controller/activateRecord.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import {activateRecordService} from "../service/database/activateRecord";
|
||||
|
||||
class ActivateRecordController {
|
||||
|
||||
async list(args: { macAddress: string, modules: string[] }): Promise<any> {
|
||||
const {macAddress, modules} = args
|
||||
return activateRecordService.list(macAddress, modules)
|
||||
}
|
||||
|
||||
async save(args: {
|
||||
macAddress: string,
|
||||
applicationCode: string,
|
||||
modules: string[],
|
||||
activationCode: string,
|
||||
createTime: string,
|
||||
remark: string
|
||||
}): Promise<any> {
|
||||
const { modules} = args
|
||||
return activateRecordService.save({...args, module : modules.join(',')})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ActivateRecordController.toString = () => '[class ActivateRecordController]';
|
||||
|
||||
export default ActivateRecordController;
|
||||
Reference in New Issue
Block a user