|
@@ -91,6 +91,10 @@ public class LapiServiceImpl implements ILapiService {
|
|
|
if (deviceList.size() <= 0) {
|
|
|
throw new Exception("人员与设备绑定错误");
|
|
|
}
|
|
|
+ String base64Data = OSSUtil.downloadToBase64(personInfo.getFaceImageUrl());
|
|
|
+ if (base64Data.length()>512*1024 || base64Data.length()<10*1024){
|
|
|
+ throw new Exception("人员照片大小限定为10k~512k");
|
|
|
+ }
|
|
|
List<LapiMsgResult> lapiMsgResults = new ArrayList<>();
|
|
|
for (DeviceInfo deviceInfo : deviceList) {
|
|
|
HashMap<String, Object> map = new HashMap<>();
|
|
@@ -118,7 +122,7 @@ public class LapiServiceImpl implements ILapiService {
|
|
|
map3.put("FaceID", personInfo.getId());
|
|
|
map3.put("Name", personInfo.getId() + ".jpg");
|
|
|
|
|
|
- String base64Data = OSSUtil.downloadToBase64(personInfo.getFaceImageUrl());
|
|
|
+
|
|
|
|
|
|
map3.put("Size", base64Data.length());
|
|
|
map3.put("Data", base64Data);
|