Commit feaad36a authored by 赵啸非's avatar 赵啸非

修改内部系统访问地址

parent 7e85df3b
...@@ -56,7 +56,21 @@ ...@@ -56,7 +56,21 @@
{label: "签到方式", prop: "checkInMethod",formatter: this.formatter}, {label: "签到方式", prop: "checkInMethod",formatter: this.formatter},
{label: "监测凭证", prop: "monitorCertificate"}, {
label: "监测凭证",
prop: "monitorCertificate",
formatter: (row) => {
return row.monitorCertificate != "" ? (
<el-image
style="width: 70px; height: 70px"
src={row.monitorCertificate}
preview-src-list={[row.monitorCertificate]}
></el-image>
) : (
"--"
);
},
},
{ {
label: "操作", label: "操作",
width: 240, width: 240,
......
...@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -87,10 +88,13 @@ public class AuthTokenServiceImpl implements IAuthTokenService { ...@@ -87,10 +88,13 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
String userKey = getTokenKey(uuid); String userKey = getTokenKey(uuid);
// Rest<String> rest = userFeign.getToken(userKey); // Rest<String> rest = userFeign.getToken(userKey);
// String userStr = rest.getData(); // String userStr = rest.getData();
cacheService.select(portalDb); /* cacheService.select(portalDb);
String userStr = cacheService.get(userKey); String userStr = cacheService.get(userKey);
cacheService.select(db); cacheService.select(db);*/
RedisTemplate<String, String> redisTemplate = cacheService.selectDbRedisTemplate(portalDb);
String userStr =redisTemplate.opsForValue().get(userKey);
if (StringUtils.isNotEmpty(userStr)) { if (StringUtils.isNotEmpty(userStr)) {
UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class); UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class);
userEntity.setToken(token); userEntity.setToken(token);
......
...@@ -202,6 +202,19 @@ public class BlackPlanRecoginze extends EventTypeAbstract { ...@@ -202,6 +202,19 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
monitorAlarmRecordEntity.setMonitorDevice(eventData.getResInfo().stream().map(i -> i.getIndexCode()).collect(Collectors.joining(","))); monitorAlarmRecordEntity.setMonitorDevice(eventData.getResInfo().stream().map(i -> i.getIndexCode()).collect(Collectors.joining(",")));
monitorAlarmRecordEntity.setCheckInMethod(CheckInMethodEnum.自动签到.getValue()); monitorAlarmRecordEntity.setCheckInMethod(CheckInMethodEnum.自动签到.getValue());
monitorAlarmRecordEntity.setPicUri(faceMatch.getFacePicUrl()); monitorAlarmRecordEntity.setPicUri(faceMatch.getFacePicUrl());
//保存faceurl
ImgReq imgReq = new ImgReq();
imgReq.setUrl(faceMatch.getFacePicUrl());
Rest<String> rest = faceService.downloadPicture(imgReq);
if (YesNoEnum.YES.getValue() == rest.getCode()) {
byte[] bytes = Base64.decode(rest.getData());
if (!org.springframework.util.ObjectUtils.isEmpty(bytes)) {
InputStream inputStream = new ByteArrayInputStream(bytes);
MultipartFile file = ServletUtils.getMultipartFile(inputStream, "snap.jpg");
String filePath = uploadService.saveFileUpload(file, "file/fileupload/snap/" + DateUtil.today(), null);
monitorAlarmRecordEntity.setMonitorCertificate(filePath);
}
}
monitorAlarmRecordEntity.setCreateTime(new Date()); monitorAlarmRecordEntity.setCreateTime(new Date());
monitorAlarmRecordEntity.setCreateUserName("system"); monitorAlarmRecordEntity.setCreateUserName("system");
monitorAlarmRecordEntity.setCreateUserId(1L); monitorAlarmRecordEntity.setCreateUserId(1L);
......
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