| | |
| | | await this.Devicegroup.insert(param) |
| | | return await super.add(param) |
| | | } |
| | | |
| | | |
| | | async delete(logic_id: any) { |
| | | console.log(this.ctx, "ddd") |
| | | await this.nativeQuery( |
| | | 'DELETE t_base_deviceinfo,t_base_device_group FROM t_base_deviceinfo,t_base_device_group WHERE t_base_deviceinfo.logic_id = t_base_device_group.logic_id AND t_base_deviceinfo.id in (?)', |
| | | [logic_id] |
| | | ); |
| | | await this.Basedeviceinfo.delete(logic_id) |
| | | |
| | | } |
| | | |
| | | |
| | | async page(query) { |
| | | console.log(query) |
| | | // const { keyWord, status, departmentIds = [] } = query; |
| | | // const permsDepartmentArr = await this.Basedeviceinfo.id( |
| | | // this.ctx.admin.userId |
| | | // ); // 部门权限 |
| | | const sql = ` |
| | | SELECT a.*,b.configurator FROM t_base_deviceinfo a,t_base_device_group b WHERE 1 = 1`; |
| | | return this.sqlRenderPage(sql, query); |
| | | } |
| | | } |