Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
pms
Commits
0d859e2f
提交
0d859e2f
authored
5月 19, 2023
作者:
张小凤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
new model and bind (add)
上级
34e024d8
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
56 行增加
和
0 行删除
+56
-0
WebDeviceController.java
...main/java/com/mmc/pms/controller/WebDeviceController.java
+12
-0
WebDeviceDao.java
src/main/java/com/mmc/pms/dao/WebDeviceDao.java
+4
-0
WebDeviceServiceImpl.java
...n/java/com/mmc/pms/service/Impl/WebDeviceServiceImpl.java
+26
-0
WebDeviceService.java
src/main/java/com/mmc/pms/service/WebDeviceService.java
+4
-0
WebDeviceDao.xml
src/main/resources/mapper/WebDeviceDao.xml
+10
-0
没有找到文件。
src/main/java/com/mmc/pms/controller/WebDeviceController.java
浏览文件 @
0d859e2f
...
...
@@ -50,6 +50,18 @@ public class WebDeviceController {
return
webDeviceService
.
model
();
}
@ApiOperation
(
"设备品牌"
)
@GetMapping
(
"/deviceBrand"
)
public
ResultBody
<
BrandDTO
>
deviceBrand
()
{
return
webDeviceService
.
deviceBrand
();
}
@ApiOperation
(
"设备型号"
)
@GetMapping
(
"/deviceModel"
)
public
ResultBody
<
ModelDTO
>
deviceModel
()
{
return
webDeviceService
.
deviceModel
();
}
@ApiOperation
(
value
=
"设备详情"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"/detail"
)
...
...
src/main/java/com/mmc/pms/dao/WebDeviceDao.java
浏览文件 @
0d859e2f
...
...
@@ -20,8 +20,12 @@ public interface WebDeviceDao {
List
<
Brand
>
brand
();
List
<
Brand
>
deviceBrand
();
List
<
Model
>
model
();
List
<
Model
>
deviceModel
();
List
<
DeviceListDO
>
deviceList
(
Integer
districtId
,
Integer
categoryId
,
Integer
brandId
,
Integer
modelId
);
...
...
src/main/java/com/mmc/pms/service/Impl/WebDeviceServiceImpl.java
浏览文件 @
0d859e2f
...
...
@@ -62,6 +62,19 @@ public class WebDeviceServiceImpl implements WebDeviceService {
}
@Override
public
ResultBody
deviceBrand
()
{
List
<
Brand
>
brand
=
webDeviceDao
.
deviceBrand
();
List
<
BrandDTO
>
collect
=
brand
.
stream
()
.
map
(
t
->
{
return
t
.
brandDTO
();
})
.
collect
(
Collectors
.
toList
());
return
ResultBody
.
success
(
collect
);
}
@Override
public
ResultBody
model
()
{
List
<
Model
>
model
=
webDeviceDao
.
model
();
List
<
ModelDTO
>
collect
=
...
...
@@ -75,6 +88,19 @@ public class WebDeviceServiceImpl implements WebDeviceService {
}
@Override
public
ResultBody
deviceModel
()
{
List
<
Model
>
model
=
webDeviceDao
.
deviceModel
();
List
<
ModelDTO
>
collect
=
model
.
stream
()
.
map
(
t
->
{
return
t
.
modelDTO
();
})
.
collect
(
Collectors
.
toList
());
return
ResultBody
.
success
(
collect
);
}
@Override
public
ResultBody
deviceList
(
Integer
districtId
,
Integer
categoryId
,
Integer
brandId
,
Integer
modelId
)
{
List
<
DeviceListDO
>
deviceList
=
...
...
src/main/java/com/mmc/pms/service/WebDeviceService.java
浏览文件 @
0d859e2f
...
...
@@ -17,8 +17,12 @@ public interface WebDeviceService {
ResultBody
brand
();
ResultBody
deviceBrand
();
ResultBody
model
();
ResultBody
deviceModel
();
ResultBody
deviceList
(
Integer
districtId
,
Integer
categoryId
,
Integer
brandId
,
Integer
modelId
);
ResultBody
update
(
LeaseVo
param
);
...
...
src/main/resources/mapper/WebDeviceDao.xml
浏览文件 @
0d859e2f
...
...
@@ -79,11 +79,21 @@
from brand;
</select>
<select
id=
"deviceBrand"
resultType=
"com.mmc.pms.entity.Brand"
>
select id, `name`
from device_brand;
</select>
<select
id=
"model"
resultType=
"com.mmc.pms.entity.Model"
>
select id, `name`
from model;
</select>
<select
id=
"deviceModel"
resultType=
"com.mmc.pms.entity.Model"
>
select id, `name`
from device_model;
</select>
<select
id=
"deviceList"
resultType=
"com.mmc.pms.entity.DeviceListDO"
>
SELECT d.id,
d.`name` AS deviceName,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论