master
2022-04-09 4f90d2d933f4bad7d7af37dba67aa4b550524d6b
重写所有接口
1个文件已修改
23 ■■■■■ 已修改文件
src/app/modules/business/service/deviceinfo.ts 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/app/modules/business/service/deviceinfo.ts
@@ -25,4 +25,27 @@
    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);
  }
}