Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
11f9750f
authored
Dec 17, 2024
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【代码优化】IOT: 产品物模型代码评审问题优化
parent
9f819db1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/api/iot/thinkmodel/index.ts
+6
-6
No files found.
src/api/iot/thinkmodel/index.ts
View file @
11f9750f
...
@@ -55,34 +55,34 @@ export enum ProductFunctionAccessModeEnum {
...
@@ -55,34 +55,34 @@ export enum ProductFunctionAccessModeEnum {
export
const
ThinkModelApi
=
{
export
const
ThinkModelApi
=
{
// 查询产品物模型分页
// 查询产品物模型分页
getThinkModelPage
:
async
(
params
:
any
)
=>
{
getThinkModelPage
:
async
(
params
:
any
)
=>
{
return
await
request
.
get
({
url
:
`/iot/product-thin
g
-model/page`
,
params
})
return
await
request
.
get
({
url
:
`/iot/product-thin
k
-model/page`
,
params
})
},
},
// 获得产品物模型
// 获得产品物模型
getThinkModelListByProductId
:
async
(
params
:
any
)
=>
{
getThinkModelListByProductId
:
async
(
params
:
any
)
=>
{
return
await
request
.
get
({
return
await
request
.
get
({
url
:
`/iot/product-thin
g
-model/list-by-product-id`
,
url
:
`/iot/product-thin
k
-model/list-by-product-id`
,
params
params
})
})
},
},
// 查询产品物模型详情
// 查询产品物模型详情
getThinkModel
:
async
(
id
:
number
)
=>
{
getThinkModel
:
async
(
id
:
number
)
=>
{
return
await
request
.
get
({
url
:
`/iot/product-thin
g
-model/get?id=`
+
id
})
return
await
request
.
get
({
url
:
`/iot/product-thin
k
-model/get?id=`
+
id
})
},
},
// 新增产品物模型
// 新增产品物模型
createThinkModel
:
async
(
data
:
ThinkModelData
)
=>
{
createThinkModel
:
async
(
data
:
ThinkModelData
)
=>
{
return
await
request
.
post
({
url
:
`/iot/product-thin
g
-model/create`
,
data
})
return
await
request
.
post
({
url
:
`/iot/product-thin
k
-model/create`
,
data
})
},
},
// 修改产品物模型
// 修改产品物模型
updateThinkModel
:
async
(
data
:
ThinkModelData
)
=>
{
updateThinkModel
:
async
(
data
:
ThinkModelData
)
=>
{
return
await
request
.
put
({
url
:
`/iot/product-thin
g
-model/update`
,
data
})
return
await
request
.
put
({
url
:
`/iot/product-thin
k
-model/update`
,
data
})
},
},
// 删除产品物模型
// 删除产品物模型
deleteThinkModel
:
async
(
id
:
number
)
=>
{
deleteThinkModel
:
async
(
id
:
number
)
=>
{
return
await
request
.
delete
({
url
:
`/iot/product-thin
g
-model/delete?id=`
+
id
})
return
await
request
.
delete
({
url
:
`/iot/product-thin
k
-model/delete?id=`
+
id
})
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment