Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
3234e8d6
Commit
3234e8d6
authored
Aug 18, 2022
by
Your Name
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/device-new-platform
parents
9d1b5ab5
1ac6ae4f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
device-manager/src/main/java/com/mortals/xhx/base/system/message/impl/MessageServiceImpl.java
...tals/xhx/base/system/message/impl/MessageServiceImpl.java
+18
-0
device-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
...a/com/mortals/xhx/module/device/web/DeviceController.java
+2
-1
device-manager/src/main/java/com/mortals/xhx/module/product/web/ProductController.java
...com/mortals/xhx/module/product/web/ProductController.java
+1
-1
No files found.
device-manager/src/main/java/com/mortals/xhx/base/system/message/impl/MessageServiceImpl.java
View file @
3234e8d6
package
com.mortals.xhx.base.system.message.impl
;
import
cn.hutool.core.exceptions.ExceptionUtil
;
import
cn.hutool.core.util.IdUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
...
...
@@ -179,4 +180,21 @@ public class MessageServiceImpl implements MessageService {
sendTaskThreadPool
.
execute
(
sendTask
);
}
public
static
void
main
(
String
[]
args
)
{
try
{
Integer
a
=
1
;
Integer
b
=
0
;
int
i
=
a
/
b
;
}
catch
(
Exception
e
)
{
String
stacktrace
=
ExceptionUtil
.
stacktraceToString
(
e
.
fillInStackTrace
());
System
.
out
.
println
(
stacktrace
);
}
}
}
\ No newline at end of file
device-manager/src/main/java/com/mortals/xhx/module/device/web/DeviceController.java
View file @
3234e8d6
...
...
@@ -110,8 +110,9 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
//返回产品列表及其样式
//productService.find(new ProductEntity()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getProductName())).
Rest
<
RespData
<
List
<
SkinBasePdu
>>>
resp
=
skinBaseFeign
.
list
(
new
SkinBasePdu
());
log
.
info
(
"skinBaseFeignResp:{}"
,
JSON
.
toJSONString
(
resp
));
if
(
resp
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
Map
<
String
,
Map
<
String
,
String
>>
skinProductCodeMap
=
resp
.
getData
().
getData
().
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getProductCode
(),
Collectors
.
toMap
(
a
->
a
.
getImageResolution
(),
b
->
b
.
getImageResolutionValue
(),(
o
,
n
)->
n
)));
Map
<
String
,
Map
<
String
,
String
>>
skinProductCodeMap
=
resp
.
getData
().
getData
().
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getProductCode
(),
Collectors
.
toMap
(
a
->
a
.
getImageResolution
()
==
null
?
""
:
a
.
getImageResolution
()
,
b
->
b
.
getImageResolutionValue
(),(
o
,
n
)->
n
)));
this
.
addDict
(
model
,
"skinProductCodeMap"
,
skinProductCodeMap
);
}
super
.
init
(
model
,
context
);
...
...
device-manager/src/main/java/com/mortals/xhx/module/product/web/ProductController.java
View file @
3234e8d6
...
...
@@ -45,7 +45,7 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
//获取所有产品皮肤 分组显示
Rest
<
RespData
<
List
<
SkinBasePdu
>>>
resp
=
skinBaseFeign
.
list
(
new
SkinBasePdu
());
if
(
resp
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
Map
<
String
,
Map
<
String
,
String
>>
skinProductCodeMap
=
resp
.
getData
().
getData
().
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getProductCode
(),
Collectors
.
toMap
(
a
->
a
.
getImageResolution
(),
b
->
b
.
getImageResolutionValue
(),(
o
,
n
)->
n
)));
Map
<
String
,
Map
<
String
,
String
>>
skinProductCodeMap
=
resp
.
getData
().
getData
().
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getProductCode
(),
Collectors
.
toMap
(
a
->
a
.
getImageResolution
()
==
null
?
""
:
a
.
getImageResolution
()
,
b
->
b
.
getImageResolutionValue
(),(
o
,
n
)->
n
)));
this
.
addDict
(
model
,
"skinProductCodeMap"
,
skinProductCodeMap
);
}
...
...
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