Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
energyai_java
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
葛齐林
energyai_java
Commits
575c3990
Commit
575c3990
authored
Mar 22, 2021
by
co_dengxiongwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备控制
parent
87d3fea3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
0 deletions
+76
-0
EquipmentController.java
...form/admin/modules/eq/controller/EquipmentController.java
+76
-0
No files found.
microservice-admin/src/main/java/com/devplatform/admin/modules/eq/controller/EquipmentController.java
0 → 100644
View file @
575c3990
package
com
.
devplatform
.
admin
.
modules
.
eq
.
controller
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.devplatform.admin.common.utils.AbstractController
;
import
com.devplatform.admin.modules.liresource.bean.LiResource
;
import
com.devplatform.admin.modules.liresource.model.LiResourceModel
;
import
com.devplatform.admin.modules.liresource.service.LiResourceService
;
import
com.devplatform.common.util.R
;
import
com.devplatform.common.util.StringUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* 设备控制
* <br>
* @author 代码生成器产生
*/
@Api
(
tags
={
"设备接口"
})
@RestController
@RequestMapping
(
"/equipment"
)
public
class
EquipmentController
extends
AbstractController
{
@Autowired
private
LiResourceService
liResourceService
;
/**
* 列表页面列表数据获取
* @param model 承接对象
* @return
*/
@ApiOperation
(
value
=
"根据条件获取资源点表数据列表"
,
notes
=
"根据条件获取资源点表数据列表"
)
@ApiImplicitParam
(
name
=
"model"
,
value
=
"参数"
,
required
=
true
,
dataType
=
"LiRoomModel"
)
@PostMapping
(
"/list"
)
public
R
list
(
@RequestBody
LiResourceModel
model
)
{
List
<
LiResource
>
list
=
liResourceService
.
list
(
new
LambdaQueryWrapper
<
LiResource
>());
return
R
.
ok
().
put
(
"list"
,
list
);
}
/**
* 列表页面列表数据获取
* @param model 承接对象
* @return
*/
@ApiOperation
(
value
=
"根据条件获取资源点表分页数据列表"
,
notes
=
"根据条件获取资源点表分页数据列表"
)
@ApiImplicitParam
(
name
=
"model"
,
value
=
"参数"
,
required
=
true
,
dataType
=
"LiRoomModel"
)
@PostMapping
(
"/pageList"
)
public
R
pageList
(
@RequestBody
LiResourceModel
model
)
{
//如果model参数中没有设置排序方式,则默认以创建时间倒序排列
if
(
StringUtil
.
isEmpty
(
model
.
getSort
())){
model
.
setSort
(
"create_time desc"
);
}
//按条件查询分页数据
// List<LiResource> list = liResourceService.queryPageList(model);
//将查询结果中数据和数量封装起来做为接口返回值
// return R.ok().put("page", getMyPage(list,model));
return
R
.
ok
().
put
(
"page"
,
null
);
}
/**
* 根据ID获取资源点表对象
* @param id 对象主键
* @return
*/
@ApiOperation
(
value
=
"根据ID获取资源点表对象"
,
notes
=
"根据ID获取资源点表对象"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"主键"
,
required
=
true
,
dataType
=
"String"
)
@GetMapping
(
"/getId/{id}"
)
public
R
getId
(
@PathVariable
String
id
)
{
LiResource
bean
=
liResourceService
.
getById
(
id
);
return
R
.
ok
().
put
(
"bean"
,
bean
);
}
}
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