Commit 3234e8d6 authored by Your Name's avatar Your Name
parents 9d1b5ab5 1ac6ae4f
package com.mortals.xhx.base.system.message.impl; package com.mortals.xhx.base.system.message.impl;
import cn.hutool.core.exceptions.ExceptionUtil;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -179,4 +180,21 @@ public class MessageServiceImpl implements MessageService { ...@@ -179,4 +180,21 @@ public class MessageServiceImpl implements MessageService {
sendTaskThreadPool.execute(sendTask); 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
...@@ -110,8 +110,9 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe ...@@ -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())). //productService.find(new ProductEntity()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getProductName())).
Rest<RespData<List<SkinBasePdu>>> resp = skinBaseFeign.list(new SkinBasePdu()); Rest<RespData<List<SkinBasePdu>>> resp = skinBaseFeign.list(new SkinBasePdu());
log.info("skinBaseFeignResp:{}",JSON.toJSONString(resp));
if (resp.getCode() == YesNoEnum.YES.getValue()) { 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); this.addDict(model, "skinProductCodeMap", skinProductCodeMap);
} }
super.init(model, context); super.init(model, context);
......
...@@ -45,7 +45,7 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product ...@@ -45,7 +45,7 @@ public class ProductController extends BaseCRUDJsonBodyMappingController<Product
//获取所有产品皮肤 分组显示 //获取所有产品皮肤 分组显示
Rest<RespData<List<SkinBasePdu>>> resp = skinBaseFeign.list(new SkinBasePdu()); Rest<RespData<List<SkinBasePdu>>> resp = skinBaseFeign.list(new SkinBasePdu());
if (resp.getCode() == YesNoEnum.YES.getValue()) { 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); this.addDict(model, "skinProductCodeMap", skinProductCodeMap);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment