From 4f90d2d933f4bad7d7af37dba67aa4b550524d6b Mon Sep 17 00:00:00 2001
From: master <master@163.com>
Date: 星期六, 09 四月 2022 16:29:36 +0800
Subject: [PATCH] 重写所有接口
---
src/app/modules/business/service/deviceinfo.ts | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/src/app/modules/business/service/deviceinfo.ts b/src/app/modules/business/service/deviceinfo.ts
index f88d5cc..819ef2b 100644
--- a/src/app/modules/business/service/deviceinfo.ts
+++ b/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);
+ }
}
--
Gitblit v1.9.1