bug修改

This commit is contained in:
guoshengxiong 2024-04-16 21:55:02 +08:00
parent 76d244fdb6
commit c344926b19
2 changed files with 16 additions and 5 deletions

View File

@ -9,7 +9,6 @@ import com.zhgd.xmgl.call.HikvisionCall;
import com.zhgd.xmgl.modules.basicdata.service.INoticeService; import com.zhgd.xmgl.modules.basicdata.service.INoticeService;
import com.zhgd.xmgl.modules.car.entity.CarInfo; import com.zhgd.xmgl.modules.car.entity.CarInfo;
import com.zhgd.xmgl.modules.project.entity.Project; import com.zhgd.xmgl.modules.project.entity.Project;
import com.zhgd.xmgl.modules.project.entity.ProjectUfaceConfig;
import com.zhgd.xmgl.modules.project.entity.ProjectVideoConfig; import com.zhgd.xmgl.modules.project.entity.ProjectVideoConfig;
import com.zhgd.xmgl.modules.video.entity.ProjectVideoHkVqd; import com.zhgd.xmgl.modules.video.entity.ProjectVideoHkVqd;
import com.zhgd.xmgl.modules.video.entity.VideoItem; import com.zhgd.xmgl.modules.video.entity.VideoItem;
@ -287,12 +286,12 @@ public class AsyncHikvision {
String msg = ""; String msg = "";
String sucSbStr = sucSb.toString(); String sucSbStr = sucSb.toString();
if (StringUtils.isNotBlank(sucSbStr)) { if (StringUtils.isNotBlank(sucSbStr)) {
sucSbStr += "下发成功:"; sucSbStr = "下发权限成功:" + sucSbStr;
msg += sucSbStr + ""; msg += sucSbStr + "";
} }
String failSbStr = failSb.toString(); String failSbStr = failSb.toString();
if (StringUtils.isNotBlank(failSbStr)) { if (StringUtils.isNotBlank(failSbStr)) {
failSbStr += "下发失败:"; failSbStr = "下发权限失败:" + failSbStr;
msg += failSbStr + ""; msg += failSbStr + "";
} }
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, type); noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, type);
@ -323,6 +322,7 @@ public class AsyncHikvision {
} }
} catch (Exception e) { } catch (Exception e) {
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), e.getMessage(), "人员下发设备提醒", "1"); noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), e.getMessage(), "人员下发设备提醒", "1");
return;
} }
if (SecurityUtils.getUser().getUserId() != null) { if (SecurityUtils.getUser().getUserId() != null) {
@ -331,12 +331,12 @@ public class AsyncHikvision {
String msg = ""; String msg = "";
String sucSbStr = sucSb.toString(); String sucSbStr = sucSb.toString();
if (StringUtils.isNotBlank(sucSbStr)) { if (StringUtils.isNotBlank(sucSbStr)) {
sucSbStr += "下发成功:"; sucSbStr += "移除权限成功:";
msg += sucSbStr + ""; msg += sucSbStr + "";
} }
String failSbStr = failSb.toString(); String failSbStr = failSb.toString();
if (StringUtils.isNotBlank(failSbStr)) { if (StringUtils.isNotBlank(failSbStr)) {
failSbStr += "下发失败:"; failSbStr += "移除权限失败:";
msg += failSbStr + ""; msg += failSbStr + "";
} }
noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, type); noticeService.addUserNotice(SecurityUtils.getUser().getUserId(), msg, title, type);

View File

@ -113,6 +113,8 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
private ProjectExternalSystemServiceMapper projectExternalSystemServiceMapper; private ProjectExternalSystemServiceMapper projectExternalSystemServiceMapper;
@Autowired @Autowired
private EmailUtils emailUtils; private EmailUtils emailUtils;
@Autowired
private XzSystemUserToCompanyProjectMapper xzSystemUserToCompanyProjectMapper;
/** /**
* 重置密码的邮箱验证码 * 重置密码的邮箱验证码
*/ */
@ -337,6 +339,15 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
result.put("scope", scope); result.put("scope", scope);
result.put("expire", false); result.put("expire", false);
result.put("systemLogoConfig", slc); result.put("systemLogoConfig", slc);
if (Objects.equals(systemUser.getAccountType(), 10)) {
XzSystemUserToCompanyProject xzSystemUserToCompanyProject = xzSystemUserToCompanyProjectMapper.selectOne(new LambdaQueryWrapper<XzSystemUserToCompanyProject>()
.eq(XzSystemUserToCompanyProject::getType, 2)
.last("limit 1")
);
if (xzSystemUserToCompanyProject != null) {
result.put("sn", xzSystemUserToCompanyProject.getSn());
}
}
return result; return result;
} }