亚威资源申请列表参数动态化

This commit is contained in:
huangweixiong 2022-11-09 10:07:39 +08:00
parent 01ba9b232a
commit 2bf3d0b73d
1 changed files with 22 additions and 4 deletions

View File

@ -19,8 +19,13 @@ import io.renren.modules.resource.excel.ResourceExcelImportListener;
import io.renren.modules.resource.service.ResourceService; import io.renren.modules.resource.service.ResourceService;
import io.renren.modules.resource.videoPreview.AbstractVideoPreviewService; import io.renren.modules.resource.videoPreview.AbstractVideoPreviewService;
import io.renren.modules.resource.videoPreview.VideoPreviewFactory; import io.renren.modules.resource.videoPreview.VideoPreviewFactory;
import io.renren.modules.security.user.SecurityUser;
import io.renren.modules.sys.dao.SysUserDao;
import io.renren.modules.sys.dto.SysDeptDTO; import io.renren.modules.sys.dto.SysDeptDTO;
import io.renren.modules.sys.dto.SysUserDTO;
import io.renren.modules.sys.entity.SysUserEntity;
import io.renren.modules.sys.service.SysDeptService; import io.renren.modules.sys.service.SysDeptService;
import io.renren.modules.sys.service.SysUserService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -109,6 +114,8 @@ public class ResourceController {
@Autowired @Autowired
private SysDeptService sysDeptService; private SysDeptService sysDeptService;
private SysUserDao sysUserDao;
@Resource(name = "${hisense.gateway.name}") @Resource(name = "${hisense.gateway.name}")
private ApiGateway apiGateway; private ApiGateway apiGateway;
@ -450,15 +457,26 @@ public class ResourceController {
if (page == null) page = 1; if (page == null) page = 1;
if (size == null) size = 10; if (size == null) size = 10;
Long userId = SecurityUser.getUserId();
if (userId == null){
return new Result<>().error("请登录");
}
SysUserEntity sysUser = sysUserDao.getById(userId);
if (sysUser == null || sysUser.getGuid() == null) {
return new Result<>().error("该账号没有权限");
}
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx"; String url = "http://15.72.158.81/zyjk/ZywMessage.asmx";
String parame = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + String parame = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" + "<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
" <soap:Body>\n" + " <soap:Body>\n" +
" <ZySPPort xmlns=\"http://tempuri.org/\">\n" + " <ZySPPort xmlns=\"http://tempuri.org/\">\n" +
" <userguid>e8d2fb43-f512-4918-ab47-1141b925af10</userguid>\n" + // " <userguid>e8d2fb43-f512-4918-ab47-1141b925af10</userguid>\n" +
" <pagenum>1</pagenum>\n" + String.format("<userguid>%s</userguid>", sysUser.getGuid()) +
" <pagesize>10</pagesize>\n" + String.format("<pagenum>%d</pagenum>", page) +
" <title></title>\n" + String.format("<pagesize>%d</pagesize>", size) +
title != null ? String.format("<title>%s</title>", title) : "" +
" </ZySPPort>\n" + " </ZySPPort>\n" +
" </soap:Body>\n" + " </soap:Body>\n" +
"</soap:Envelope>"; "</soap:Envelope>";