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

修改内部系统访问地址

parent 7e85df3b
......@@ -56,7 +56,21 @@
{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: "操作",
width: 240,
......
......@@ -15,6 +15,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.annotation.Order;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
......@@ -87,10 +88,13 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
String userKey = getTokenKey(uuid);
// Rest<String> rest = userFeign.getToken(userKey);
// String userStr = rest.getData();
cacheService.select(portalDb);
/* cacheService.select(portalDb);
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)) {
UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class);
userEntity.setToken(token);
......
......@@ -202,6 +202,19 @@ public class BlackPlanRecoginze extends EventTypeAbstract {
monitorAlarmRecordEntity.setMonitorDevice(eventData.getResInfo().stream().map(i -> i.getIndexCode()).collect(Collectors.joining(",")));
monitorAlarmRecordEntity.setCheckInMethod(CheckInMethodEnum.自动签到.getValue());
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.setCreateUserName("system");
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