27 lines
762 B
TypeScript
27 lines
762 B
TypeScript
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;
|