Compare commits

...

36 Commits

Author SHA1 Message Date
wangliwen de75da4b68 各地配置外置 2022-06-22 19:33:20 +08:00
dinggang 2d18cbbf9a npe 2022-06-22 18:40:11 +08:00
dinggang 83d9b7b4db ... 2022-06-22 17:36:36 +08:00
dinggang c4a121464b 资源云图-数据资源增加数据 2022-06-22 17:19:42 +08:00
huangweixiong fd406c9bfd Merge branch 'master' of http://221.0.232.152:9393/ability-center/share-platform
* 'master' of http://221.0.232.152:9393/ability-center/share-platform:
  去除市局部门搜索条件
  ...
  ...
  标识为已读支持批量
  站内信来源标注为 其它
  npe
  。。。
  ...
  站内信通知区分来源
  sql
  我的通知来源分类
  配置统计时,资源是否归属上级

# Conflicts:
#	renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java
2022-06-22 17:16:58 +08:00
dinggang ab9e30b755 去除市局部门搜索条件 2022-06-22 17:00:37 +08:00
huangweixiong cf658307a8 去除部门搜索 2022-06-22 17:00:35 +08:00
wangliwen f667967d7e ... 2022-06-22 16:23:12 +08:00
wangliwen 75683440de ... 2022-06-22 13:54:47 +08:00
wangliwen e12f4f0a62 标识为已读支持批量 2022-06-22 11:23:25 +08:00
wangliwen f2ec0b118d 站内信来源标注为 其它 2022-06-22 11:14:20 +08:00
wangliwen 2189f6a3f0 npe 2022-06-22 11:00:02 +08:00
wangliwen 5333b18711 。。。 2022-06-22 10:51:42 +08:00
wangliwen aaeda5f9bd ... 2022-06-22 10:45:42 +08:00
wangliwen 40817f2ddf 站内信通知区分来源 2022-06-22 10:22:48 +08:00
wangliwen 8ac9091f9b sql 2022-06-22 09:57:38 +08:00
wangliwen c81aaa34b0 我的通知来源分类 2022-06-22 09:49:17 +08:00
wangliwen 1c9a83fcd2 Merge branch 'master' of http://221.0.232.152:9393/ability-center/share-platform 2022-06-22 09:12:02 +08:00
wangliwen 6a07620ba3 配置统计时,资源是否归属上级 2022-06-22 09:11:39 +08:00
huangweixiong 5b2f0bef95 Merge branch 'master' of http://221.0.232.152:9393/ability-center/share-platform
* 'master' of http://221.0.232.152:9393/ability-center/share-platform:
  总应用数目
  知识库 文件类型导入问题
2022-06-21 21:31:42 +08:00
huangweixiong b531192f91 市局数据资源实现 2022-06-21 21:31:23 +08:00
wangliwen 3dc4676491 Merge remote-tracking branch 'origin/master' 2022-06-21 21:12:41 +08:00
huangweixiong 8e87eb848f Merge branch 'master' of http://221.0.232.152:9393/ability-center/share-platform
* 'master' of http://221.0.232.152:9393/ability-center/share-platform:
  修改数据资源对接方式
2022-06-21 20:54:04 +08:00
huangweixiong b1e489bc27 Merge branch 'master' of http://221.0.232.152:9393/ability-center/share-platform
* 'master' of http://221.0.232.152:9393/ability-center/share-platform: (49 commits)
  标识所有未读资源为已读
  排查加日志
  屮
  。。。
  通知的历史数据 来源处理
  通知来源类型
  基础设施
  用户表加字段
  云图数据资源总况
  1、修改获取金宏数据库中用户名和地区信息,将 JhUserTask和JhDeptTask删除,改为在SysUserController中分别通过/getDeptInfoFromJH和/getUserInfoFromJH手动调用。
  。。。
  1、将金宏数据库中用户和地区信息整合进来,并做成任务调度 JhUserTask和JhDeptTask,需要通过前端配置一下才能启动。
  基础设施统计接口
  。。。
  ...
  获取预览地址接口
  视频预览 工厂模式下各区域的实现
  ....
  ...
  现有区域配置文件 加入
  ...

# Conflicts:
#	renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java
2022-06-21 20:53:46 +08:00
dinggang 27218ae82b 修改数据资源对接方式 2022-06-21 20:47:58 +08:00
huangweixiong 2a5334dc81 资源目录分页,排序,模糊查询 2022-06-21 20:47:14 +08:00
wangliwen e057a5550c 总应用数目 2022-06-21 19:59:18 +08:00
wangliwen 0c8b2f1f57 知识库 文件类型导入问题 2022-06-21 19:34:01 +08:00
wangliwen 64e37fcbb8 标识所有未读资源为已读 2022-06-21 19:09:49 +08:00
wangliwen 36db201d67 排查加日志 2022-06-21 18:41:30 +08:00
wangliwen 0462d36d97 2022-06-21 18:34:03 +08:00
wangliwen f1f404c45b 。。。 2022-06-21 18:28:26 +08:00
wangliwen 848ee0cb4e 通知的历史数据 来源处理 2022-06-21 17:53:29 +08:00
wangliwen 5627a804da 通知来源类型 2022-06-21 17:41:14 +08:00
wangliwen 6d400ff9ae 基础设施 2022-06-21 17:00:56 +08:00
wangliwen b029bac595 用户表加字段 2022-06-21 16:24:24 +08:00
35 changed files with 600 additions and 130 deletions

View File

@ -0,0 +1 @@
baotou.hlsurl=http://10.110.205.1:18088/server/device/hisdeviceapplylist/url/%s

View File

@ -0,0 +1,7 @@
tsingtao-xha.cloudhls=http://10.10.30.9:8001/hx-weatherwarning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls
tsingtao-xha.localhls=http://10.134.135.9:8001/hx-weatherwarning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls
tsingtao-xha.cloudcam=http://10.10.30.9:8001/hx-weather-warning/camera/getCameraListByName?name=%s&pageNo=%d&pageSize=%d
tsingtao-xha.localcam=http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=%s&pageNo=%d&pageSize=%d
tsingtao-xha.resourcecount=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=&type=&orderField=requestNum&orderType=desc&pageNum=1&pageSize=10&serviceType=data&rq=1655106309671.43
tsingtao-xha.resourceapplyinfo=http://10.134.135.24:30058/shareportal/platform/index/abilityMarket/count
tsingtao-xha.sjzy=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=%s&type=&orderField=%s&orderType=%s&pageNum=%s&pageSize=%s&serviceType=data&rq=1655106309671.43

View File

View File

@ -304,7 +304,8 @@
<!-- 排除生产环境配置 -->
<exclude>application-prod.yml</exclude>
<!-- 排除flyway管理的sql -->
<!-- <exclude>db/*.sql</exclude>-->
<exclude>db/*.sql</exclude>
<exclude>domain/**</exclude>
</excludes>
</resource>
<resource>

View File

@ -172,6 +172,7 @@ public class ActivitiNoticeAspect {
dto.setSenderDate(new Date());
dto.setCreator(sysUserService.getByUsername("admin").getId());
dto.setCreateDate(new Date());
dto.setFrom("通知");
sysNoticeService.save(dto);
}).thenRunAsync(() -> {
// 防止重放
@ -319,6 +320,7 @@ public class ActivitiNoticeAspect {
String finalCreator = creator;
CompletableFuture.runAsync(() -> { // 发起人
SysUserDTO assignee = sysUserService.get(Long.valueOf(delegateTask.getAssignee()));
logger.error("审核人:" + assignee.getId());
String content = "【通知】您发起的流程 " + activitiNoticeOperation.process() + " 当前审核节点为:" + activitiNoticeOperation.value() + ";当前审核人为:\"" + assignee.getDeptName() + "\"审核负责人\"" + assignee.getRealName() + "\"";
SysNoticeDTO dto = new SysNoticeDTO();
dto.setType(2);

View File

@ -10,6 +10,8 @@ import io.renren.common.constant.Constant;
import io.renren.common.domain.Tsingtao_xhaProperties;
import io.renren.common.utils.Result;
import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.renren.modules.resource.dataResource.domain.TsingtaoDataResourceService;
import io.renren.modules.resource.dto.GetDataResourceListDto;
import io.renren.modules.resource.service.ResourceService;
import io.renren.modules.resourceBrowse.service.ResourceBrowseService;
import io.renren.modules.sys.dto.SysDeptDTO;
@ -20,6 +22,7 @@ import io.swagger.annotations.ApiOperation;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -42,6 +45,8 @@ import java.util.stream.Collectors;
public class CensusControllerV2 {
@Value("${project.place}")
private Integer projectPlace;
@Value("${project.higher}")
private Boolean higher;
private static final Logger logger = LoggerFactory.getLogger(CensusControllerV2.class);
@Autowired
@ -116,7 +121,7 @@ public class CensusControllerV2 {
List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
CompletableFuture<Void> allApplicationAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总应用数目
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='应用资源';", Long.class);
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='应用资源' AND del_flag = 0;", Long.class);
}).thenAccept(sum -> {
result.add(new HashMap<String, Object>() {
{
@ -175,7 +180,7 @@ public class CensusControllerV2 {
String sql = String.format("SELECT COUNT(id) FROM tb_data_resource WHERE dept_id = %s AND type = '应用资源' AND del_flag = 0;", index.get("id").toString());
logger.info(sql);
Long count = jdbcTemplate.queryForObject(sql, Long.class);
if (!"0".equals(index.get("pid").toString())) { // 有上级部门
if (!"0".equals(index.get("pid").toString()) && higher) { // 有上级部门 配置资源归属上级
Optional<SysDeptDTO> sysDeptDTO =
Optional.ofNullable(sysDeptService.get(Long.valueOf(index.get("pid").toString())));
if (sysDeptDTO.isPresent() && sysDeptDTO.get().getType() != null && sysDeptDTO.get().getType() >= 2) {
@ -195,7 +200,7 @@ public class CensusControllerV2 {
re.put("deptName", sysDeptService.get(Long.valueOf(index)).getName());
re.put("count", i.get(index).stream().mapToLong(index_ -> index_.values().stream().mapToLong(count_ -> count_).sum()).sum());
return re;
}).collect(Collectors.toList());
}).filter(index -> ObjectUtils.allNotNull(index)).collect(Collectors.toList());
result.sort(Comparator.comparing(x -> {
ObjectMapper mapper = new ObjectMapper();
try {
@ -314,6 +319,7 @@ public class CensusControllerV2 {
List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
CompletableFuture<Void> allAmount = null;
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
case TSINGTAO: // 青岛市局
case BAOTOU: { // 包头
allAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总基础设施数目
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type = '基础设施' AND del_flag = 0", Long.class);
@ -327,26 +333,15 @@ public class CensusControllerV2 {
});
}
break;
case TSINGTAO: { // 青岛大数据局
allAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总基础设施数目
return jdbcTemplate.queryForObject("SELECT COUNT(*) FROM t_camera;", Long.class);
}).thenAccept(sum -> {
result.add(new HashMap<String, Object>() {
{
put("amount", sum);
put("type", "视频资源数量");
}
});
});
}
break;
case TSINGTAO_XHA: { // 青岛西海岸
allAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总基础设施数目
List<Long> result_ = new CopyOnWriteArrayList<>();
CompletableFuture cloud =
CompletableFuture.runAsync(() -> { // 云脑专网
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder().url(tsingtao_xhaProperties.getCloudcam()).build();
String url = String.format(tsingtao_xhaProperties.getCloudcam(), "", 1, 10);
logger.info(url);
Request request = new Request.Builder().url(url).build();
try (Response response = client.newCall(request).execute()) {
if (response.isSuccessful()) {
JSONObject jsonObject = JSON.parseObject(response.body().string());
@ -354,16 +349,18 @@ public class CensusControllerV2 {
result_.add(jsonObject.getJSONObject("data").getLongValue("total"));
}
} else {
logger.error("包头获取失败");
logger.error("青岛西海岸获取失败");
}
} catch (Exception exception) {
logger.error("包头失败", exception);
logger.error("青岛西海岸失败", exception);
}
});
CompletableFuture local =
CompletableFuture.runAsync(() -> { // 金宏网
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder().url(tsingtao_xhaProperties.getLocalcam()).build();
String url = String.format(tsingtao_xhaProperties.getLocalcam(), "", 1, 10);
logger.info(url);
Request request = new Request.Builder().url(url).build();
try (Response response = client.newCall(request).execute()) {
if (response.isSuccessful()) {
JSONObject jsonObject = JSON.parseObject(response.body().string());
@ -371,10 +368,10 @@ public class CensusControllerV2 {
result_.add(jsonObject.getJSONObject("data").getLongValue("total"));
}
} else {
logger.error("包头获取失败");
logger.error("青岛西海岸获取失败");
}
} catch (Exception exception) {
logger.error("包头失败", exception);
logger.error("青岛西海岸失败", exception);
}
});
CompletableFuture.allOf(cloud, local);
@ -431,15 +428,21 @@ public class CensusControllerV2 {
}
break;
case TSINGTAO: { // TODO 青岛大数据局
TsingtaoDataResourceService tsingtaoDataResourceService = new TsingtaoDataResourceService();
GetDataResourceListDto getDataResourceListDto = new GetDataResourceListDto();
getDataResourceListDto.setPageNum(1);
getDataResourceListDto.setPageSize(5);
JSONObject dataResource = (JSONObject) tsingtaoDataResourceService.getDataResource(getDataResourceListDto);
JSONObject data = dataResource.getJSONObject("data");
result.add(new HashMap<String, Object>() {
{
put("amount", 0L);
put("amount", data.get("rows"));
put("type", "总数据量");
}
});
result.add(new HashMap<String, Object>() {
{
put("amount", 0l);
put("amount", 0L);
put("type", "总申请次数");
}
});
@ -451,7 +454,7 @@ public class CensusControllerV2 {
});
result.add(new HashMap<String, Object>() {
{
put("resourceTop5", new ArrayList<>());
put("resourceTop5", data.get("data"));
}
});
}
@ -468,10 +471,10 @@ public class CensusControllerV2 {
total = jsonObject.getJSONObject("data").getLongValue("total");
}
} else {
logger.error("包头获取失败");
logger.error("青岛西海岸获取失败");
}
} catch (Exception exception) {
logger.error("包头失败", exception);
logger.error("青岛西海岸失败", exception);
}
return total;
}).thenAccept(sum -> {
@ -515,10 +518,10 @@ public class CensusControllerV2 {
}
} else {
logger.error("包头获取失败");
logger.error("青岛西海岸获取失败");
}
} catch (Exception exception) {
logger.error("包头失败", exception);
logger.error("青岛西海岸失败", exception);
}
});
}

View File

@ -12,7 +12,7 @@ import org.springframework.stereotype.Component;
*/
@Data
@Component
@PropertySource("classpath:/domain/baotou.properties")
@PropertySource("file:config/domain/baotou.properties")
@ConfigurationProperties(prefix = "baotou")
public class BaoTouProperties {
private String hlsurl;

View File

@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
*/
@Data
@Component
@PropertySource("classpath:/domain/tsingtao.properties")
@PropertySource("file:config/domain/tsingtao.properties")
@ConfigurationProperties(prefix = "tsingtao")
public class TsingtaoProperties {

View File

@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
*/
@Data
@Component
@PropertySource("classpath:/domain/tsingtao-xha.properties")
@PropertySource("file:config/domain/tsingtao-xha.properties")
@ConfigurationProperties(prefix = "tsingtao-xha")
public class Tsingtao_xhaProperties {
private String cloudhls;
@ -20,4 +20,5 @@ public class Tsingtao_xhaProperties {
private String localcam;
private String resourcecount;
private String resourceapplyinfo;
private String sjzy;
}

View File

@ -91,6 +91,7 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao
dto.setSenderDate(new Date());
dto.setCreator(sysUserService.getByUsername("admin").getId());
dto.setCreateDate(new Date());
dto.setFrom("评论");
sysNoticeService.save(dto);
});
}

View File

@ -17,10 +17,15 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Arrays;
import java.util.Map;
@ -33,10 +38,13 @@ import java.util.Map;
@RequestMapping("sys/notice")
@Api(tags = "通知管理")
public class SysNoticeController {
private static Logger logger = LoggerFactory.getLogger(SysNoticeController.class);
@Autowired
private SysNoticeService sysNoticeService;
@Autowired
private SysNoticeUserService sysNoticeUserService;
@Autowired
private JdbcTemplate jdbcTemplate;
@GetMapping("page")
@ApiOperation("分页")
@ -75,7 +83,8 @@ public class SysNoticeController {
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "readStatus", value = "阅读状态 0未读 1已读", paramType = "query", dataType = "Integer")
@ApiImplicitParam(name = "readStatus", value = "阅读状态 0未读 1已读", paramType = "query", dataType = "Integer"),
@ApiImplicitParam(name = "from", value = "通知来源 (通知、评论、其他)", paramType = "query", dataType = "String")
})
public Result<PageData<SysNoticeDTO>> myNoticePage(@ApiIgnore @RequestParam Map<String, Object> params) {
PageData<SysNoticeDTO> page = sysNoticeService.getMyNoticePage(params);
@ -85,9 +94,26 @@ public class SysNoticeController {
@PutMapping("mynotice/read/{noticeId}")
@ApiOperation("标记我的通知为已读")
public Result read(@PathVariable("noticeId") Long noticeId) {
sysNoticeUserService.updateReadStatus(SecurityUser.getUserId(), noticeId);
public Result read(@PathVariable("noticeId") String noticeId) {
if (StringUtils.isNotEmpty(noticeId) && noticeId.contains(";")) {
String[] noticeIds = noticeId.split(";");
Arrays.asList(noticeIds).stream().distinct().forEach(index -> {
try {
sysNoticeUserService.updateReadStatus(SecurityUser.getUserId(), Long.valueOf(index));
} catch (Exception exception) {
logger.error("标识已读失败", exception);
}
});
} else {
sysNoticeUserService.updateReadStatus(SecurityUser.getUserId(), Long.valueOf(noticeId));
}
return new Result();
}
@PutMapping("mynotice/readall")
@ApiOperation("标记我的所有未读通知为已读")
public Result readAll() {
jdbcTemplate.update(String.format("UPDATE sys_notice_user SET read_status = 1,read_date =NOW() WHERE receiver_id = %s AND read_status = 0;"), SecurityUser.getUserId().toString());
return new Result();
}

View File

@ -48,4 +48,6 @@ public class SysNoticeDTO implements Serializable {
private Date readDate;
@ApiModelProperty(value = "阅读状态 0未读 1已读")
private Integer readStatus;
@ApiModelProperty(value = "通知来源 (通知、评论、其他)")
private String from;
}

View File

@ -10,59 +10,63 @@ import java.util.Date;
/**
* 通知管理
*
*/
@Data
@EqualsAndHashCode(callSuper=false)
@EqualsAndHashCode(callSuper = false)
@TableName("sys_notice")
public class SysNoticeEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
/**
* 通知类型
*/
private Integer type;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 接收者 0全部 1部门
*/
private Integer receiverType;
/**
* 接收者ID用逗号分开
*/
private String receiverTypeIds;
/**
* 发送状态 0草稿 1已发布
*/
private Integer status;
/**
* 发送者
*/
private String senderName;
/**
* 发送时间
*/
private Date senderDate;
/**
* 接收者
*/
@TableField(exist = false)
private String receiverName;
/**
* 阅读状态 0未读 1已读
*/
@TableField(exist = false)
private Integer readStatus;
/**
* 阅读时间
*/
@TableField(exist = false)
private Date readDate;
/**
* 通知类型
*/
private Integer type;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 接收者 0全部 1部门
*/
private Integer receiverType;
/**
* 接收者ID用逗号分开
*/
private String receiverTypeIds;
/**
* 发送状态 0草稿 1已发布
*/
private Integer status;
/**
* 发送者
*/
private String senderName;
/**
* 发送时间
*/
private Date senderDate;
/**
* 接收者
*/
@TableField(exist = false)
private String receiverName;
/**
* 阅读状态 0未读 1已读
*/
@TableField(exist = false)
private Integer readStatus;
/**
* 阅读时间
*/
@TableField(exist = false)
private Date readDate;
/**
* 通知来源 (通知评论其他)
*/
private String from;
}

View File

@ -44,10 +44,17 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
@Override
public QueryWrapper<SysNoticeEntity> getWrapper(Map<String, Object> params) {
String type = (String) params.get("type");
QueryWrapper<SysNoticeEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(type), "type", type);
params.keySet().stream().filter(index -> null != params.get(index)).forEach(index -> {
switch (index) {
case "type":
wrapper.eq(StringUtils.isNotBlank((String) params.get("type")), "type", (String) params.get("type"));
break;
case "from":
wrapper.eq(StringUtils.isNotBlank((String) params.get("from")), "`from`", (String) params.get("from"));
break;
}
});
wrapper.orderByDesc(Constant.CREATE_DATE);
return wrapper;
}
@ -79,6 +86,7 @@ public class SysNoticeServiceImpl extends CrudServiceImpl<SysNoticeDao, SysNotic
@Transactional(rollbackFor = Exception.class)
public void save(SysNoticeDTO dto) {
SysNoticeEntity entity = ConvertUtils.sourceToTarget(dto, SysNoticeEntity.class);
entity.setFrom("其它"); // 站内信通知来源 (通知评论其它)
//更新发送者信息
if (dto.getStatus() == NoticeStatusEnum.SEND.value() && StringUtils.isEmpty(dto.getSenderName())) {

View File

@ -10,15 +10,15 @@ import io.renren.common.utils.Result;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.modules.resource.dataResource.AbstractDataResourceService;
import io.renren.modules.resource.dataResource.DataResourceFactory;
import io.renren.modules.resource.dto.GetDataResourceListDto;
import io.renren.modules.resource.dto.ResourceDTO;
import io.renren.modules.resource.excel.ResourceExcelImportListener;
import io.renren.modules.resource.service.ResourceService;
import io.swagger.annotations.*;
import io.renren.modules.resource.videoPreview.AbstractVideoPreviewService;
import io.renren.modules.resource.videoPreview.VideoPreviewFactory;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -38,6 +38,7 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.*;
@ -301,19 +302,34 @@ public class ResourceController {
@GetMapping("ZywMessage/list")
@ApiOperation("资源列表转发")
public Result ZywMessageList(Integer page, Integer size) {
public Result ZywMessageList(@ApiParam("页数") Integer page,
@ApiParam("页大小") Integer size,
@ApiParam("排序字段fbrq发布日期syqk申请数量") String pxcol,
@ApiParam("排序方式取值asc/desc") String order,
@ApiParam("部门") String bmname,
@ApiParam("资源模糊搜索") String zyname) {
if (page == null) page = 1;
if (size == null) size = 10;
if (pxcol == null) pxcol = "fbrq";
if (order == null) order = "desc";
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx";
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:Body>\n" +
" <ZWCJ_mainPort xmlns=\"http://tempuri.org/\">\n" +
" <soap:Body><ZWCJ_mainPort xmlns=\"http://tempuri.org/\">\n" +
String.format("<pagenum>%d</pagenum>\n <pagesize>%d</pagesize>\n", page, size) +
" </ZWCJ_mainPort>\n" +
" </soap:Body>\n" +
"</soap:Envelope>";
String.format("<pxcol>%s</pxcol>\n <order>%s</order>\n", pxcol, order);
if (bmname != null) {
parame = parame + String.format("<bmname>%s</bmname>", bmname);
}
if (zyname != null) {
parame = parame + String.format("<zyname>%s</zyname>", zyname);
}
parame = parame + "</ZWCJ_mainPort></soap:Body></soap:Envelope>";
HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.set("SOAPAction", "http://tempuri.org/ZWCJ_mainPort");
requestHeaders.setContentType(MediaType.TEXT_XML);
requestHeaders.setContentType(new MediaType("text", "xml", Charset.forName("utf-8")));
HttpEntity<String> requestEntity = new HttpEntity(parame, requestHeaders);
try {
String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody();
@ -323,8 +339,6 @@ public class ResourceController {
HashMap result = JSONObject.parseObject(json, HashMap.class);
List<Map> rows = (List<Map>) result.get("data");
List<Object> objects = rows.stream()
.filter(item -> item.get("main") != null)
.map(item -> item.get("main"))
@ -401,15 +415,25 @@ public class ResourceController {
}
*/
@GetMapping("getHls")
@ApiOperation("对接知识库数据")
@GetMapping("/hls/getHls")
public Result<String> getHls(String key) {
Optional<AbstractVideoPreviewService> factory = VideoPreviewFactory.build();
if (factory.isPresent()) {
String hls = factory.get().getHls(key);
return new Result<String>().ok(hls);
}
return null;
return new Result<String>().ok(null);
}
@PostMapping("/getDataResource")
@ApiOperation("获取数据资源")
public Result<Object> getDataResource(@RequestBody GetDataResourceListDto dto) {
Optional<AbstractDataResourceService> factory = DataResourceFactory.build();
if (factory.isPresent()) {
Object dataResource = factory.get().getDataResource(dto);
return new Result<Object>().ok(dataResource);
}
return null;
}
}

View File

@ -0,0 +1,20 @@
package io.renren.modules.resource.dataResource;
import io.renren.modules.resource.dto.GetDataResourceListDto;
import java.util.Map;
/**
* 视频预览抽象类
*/
public abstract class AbstractDataResourceService {
/**
* 获取数据资源列表
*
* @param Map 查询参数集合
* @return
*/
public abstract Object getDataResource(GetDataResourceListDto dto);
}

View File

@ -0,0 +1,61 @@
package io.renren.modules.resource.dataResource;
import io.renren.common.constant.Constant;
import io.renren.common.domain.BaoTouProperties;
import io.renren.common.domain.TsingtaoProperties;
import io.renren.common.domain.Tsingtao_xhaProperties;
import io.renren.common.utils.SpringContextUtils;
import io.renren.modules.resource.dataResource.domain.TsingtaoDataResourceService;
import io.renren.modules.resource.dataResource.domain.TsingtaoXHADataResourceService;
import io.renren.modules.resource.service.ResourceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Optional;
/**
* 数据资源工厂类
*/
public final class DataResourceFactory {
private static final Logger logger = LoggerFactory.getLogger(DataResourceFactory.class);
private static ResourceService resourceService;
private static int projectPlace;
private static TsingtaoProperties tsingtaoProperties; // 青岛市区配置
private static Tsingtao_xhaProperties tsingtao_xhaProperties; // 青岛西海岸配置
static {
DataResourceFactory.resourceService = SpringContextUtils.getBean(ResourceService.class);
DataResourceFactory.projectPlace = resourceService.getProjectPlace();
DataResourceFactory.tsingtaoProperties = SpringContextUtils.getBean(TsingtaoProperties.class);
DataResourceFactory.tsingtao_xhaProperties = SpringContextUtils.getBean(Tsingtao_xhaProperties.class);
}
/**
* 获取数据资源服务实现
*
* @return
*/
public static Optional<AbstractDataResourceService> build() {
AbstractDataResourceService abstractDataResourceService = null;
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
case TSINGTAO: { // 青岛市局
abstractDataResourceService = new TsingtaoDataResourceService();
}
break;
case TSINGTAO_XHA: { // 青岛西海岸
abstractDataResourceService = new TsingtaoXHADataResourceService(tsingtao_xhaProperties);
}
break;
case UNKNOWN: { // 未知区域
logger.error("区域未知");
}
break;
}
return Optional.ofNullable(abstractDataResourceService);
}
}

View File

@ -0,0 +1,85 @@
package io.renren.modules.resource.dataResource.domain;
import com.alibaba.fastjson.JSONObject;
import io.renren.common.utils.SpringContextUtils;
import io.renren.modules.resource.dataResource.AbstractDataResourceService;
import io.renren.modules.resource.dto.GetDataResourceListDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.client.RestTemplate;
import java.nio.charset.Charset;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 青岛市局数据资源
*/
public class TsingtaoDataResourceService extends AbstractDataResourceService {
private static final Logger logger = LoggerFactory.getLogger(TsingtaoDataResourceService.class);
private static RestTemplate restTemplate;
static {
TsingtaoDataResourceService.restTemplate = SpringContextUtils.getBean(RestTemplate.class);
}
@Override
public Object getDataResource(GetDataResourceListDto dto) {
Integer page = dto.getPageNum();
Integer size = dto.getPageSize();
String pxcol = dto.getOrderField();
String order = dto.getOrderType();
String zyname = dto.getServiceName();
if (page == null) page = 1;
if (size == null) size = 10;
if (pxcol == null) pxcol = "fbrq";
if (order == null) order = "desc";
String url = "http://15.72.158.81/zyjk/ZywMessage.asmx";
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:Body><ZWCJ_mainPort xmlns=\"http://tempuri.org/\">\n" +
String.format("<pagenum>%d</pagenum>\n <pagesize>%d</pagesize>\n",page, size) +
String.format("<pxcol>%s</pxcol>\n <order>%s</order>\n",pxcol, order);
// if (bmname != null){
// parame = parame + String.format("<bmname>%s</bmname>",bmname);
// }
if (zyname != null) {
parame = parame + String.format("<zyname>%s</zyname>",zyname);
}
parame = parame + "</ZWCJ_mainPort></soap:Body></soap:Envelope>";
HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.set("SOAPAction", "http://tempuri.org/ZWCJ_mainPort");
requestHeaders.setContentType(new MediaType("text","xml", Charset.forName("utf-8")));
HttpEntity<String> requestEntity = new HttpEntity(parame, requestHeaders);
try {
String body = restTemplate.postForEntity(url, requestEntity, String.class).getBody();
String startTag = "<ZWCJ_mainPortResult>";
String endTag = "</ZWCJ_mainPortResult>";
String json = body.substring(body.indexOf(startTag) + startTag.length(), body.indexOf(endTag));
HashMap result = JSONObject.parseObject(json, HashMap.class);
List<Map> rows = (List<Map>) result.get("data");
List<Object> objects = rows.stream()
.filter(item -> item.get("main") != null)
.map(item -> item.get("main"))
.collect(Collectors.toList());
result.put("data", objects);
return result;
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}

View File

@ -0,0 +1,46 @@
package io.renren.modules.resource.dataResource.domain;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import io.renren.common.domain.Tsingtao_xhaProperties;
import io.renren.modules.resource.dataResource.AbstractDataResourceService;
import io.renren.modules.resource.dto.GetDataResourceListDto;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 青岛西海岸数据资源
*/
public class TsingtaoXHADataResourceService extends AbstractDataResourceService {
private static final Logger logger = LoggerFactory.getLogger(TsingtaoXHADataResourceService.class);
Tsingtao_xhaProperties tsingtao_xhaProperties;
public TsingtaoXHADataResourceService(Tsingtao_xhaProperties tsingtao_xhaProperties) {
this.tsingtao_xhaProperties = tsingtao_xhaProperties;
}
@Override
public Object getDataResource(GetDataResourceListDto dto){
JSONObject result = null;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder().url(String.format(tsingtao_xhaProperties.getSjzy(),
dto.getServiceName(), dto.getOrderField(), dto.getOrderType(), dto.getPageNum(), dto.getPageSize())).build();
try (Response response = client.newCall(request).execute()) {
if (response.isSuccessful()) {
JSONObject jsonObject = JSON.parseObject(response.body().string());
if (jsonObject.containsKey("data")) {
result = jsonObject.getJSONObject("data");
}
} else {
logger.error("西海岸数据资源列表获取失败");
}
} catch (Exception exception) {
logger.error("西海岸数据资源列表获取失败", exception);
}
return result;
}
}

View File

@ -0,0 +1,21 @@
package io.renren.modules.resource.dto;
import lombok.Data;
/**
* 数据资源查询参数对象
*/
@Data
public class GetDataResourceListDto {
//名称模糊查询
private String serviceName;
//排序字段
private String orderField;
//排序方式descasc
private String orderType;
//分页页数
private Integer pageNum;
//分页大小
private Integer pageSize;
}

View File

@ -338,7 +338,7 @@ public class ResourceExcelImportListener extends AnalysisEventListener<Map<Integ
AttrEntity attrEntity = new AttrEntity();
attrEntity.setAttrType("文件类型");
attrEntity.setAttrValue(date.get(6));
attrEntity.setAttrValue(date.get(5));
infoList.add(attrEntity);

View File

@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.renren.common.constant.Constant;
import io.renren.common.domain.Tsingtao_xhaProperties;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.resource.dao.AttrDao;
import io.renren.modules.resource.dao.ResourceDao;
@ -38,6 +40,8 @@ import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.*;
@ -113,6 +117,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
@Autowired
private JdbcTemplate jdbcTemplate;
@Autowired
private Tsingtao_xhaProperties tsingtao_xhaProperties;
@Override
public QueryWrapper<ResourceEntity> getWrapper(Map<String, Object> params) {
QueryWrapper<ResourceEntity> wrapper = new QueryWrapper<>();
@ -221,24 +228,142 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
String orderField = StringUtils.isBlank(jsonObject.getString("orderField")) ? "total" : jsonObject.getString("orderField");
String orderType = StringUtils.isBlank(jsonObject.getString("orderType")) ? "DESC" : jsonObject.getString("orderType");
Page<ResourceDTO> resultPage = new Page<>(pageNum, pageSize);
if (resourceDTO.getInfoList().isEmpty()) {
List<ResourceDTO> resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType);
resultPage.setRecords(resourceDTOS);
resultPage.setTotal(resourceDao.selectDTOPage(resourceDTO, 0, 100000, orderField, orderType).size());
} else {
List<ResourceDTO> resourceDTOS = resourceDao.selectWithAttrs(resourceDTO, orderField, orderType);
int j = Math.min(pageNum * pageSize, resourceDTOS.size());
if (resourceDTOS.isEmpty()) {
resultPage.setRecords(null);
resultPage.setTotal(0);
} else {
ArrayList<ResourceDTO> recordLists = new ArrayList<>();
for (int i = (pageNum - 1) * pageSize; i < j; i++) {
recordLists.add(resourceDTOS.get(i));
switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
case TSINGTAO:
case BAOTOU: { // 包头青岛
logger.info("包头、青岛");
if (resourceDTO.getInfoList().isEmpty()) {
List<ResourceDTO> resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType);
resultPage.setRecords(resourceDTOS);
resultPage.setTotal(resourceDao.selectDTOPage(resourceDTO, 0, 100000, orderField, orderType).size());
} else {
List<ResourceDTO> resourceDTOS = resourceDao.selectWithAttrs(resourceDTO, orderField, orderType);
int j = Math.min(pageNum * pageSize, resourceDTOS.size());
if (resourceDTOS.isEmpty()) {
resultPage.setRecords(null);
resultPage.setTotal(0);
} else {
ArrayList<ResourceDTO> recordLists = new ArrayList<>();
for (int i = (pageNum - 1) * pageSize; i < j; i++) {
recordLists.add(resourceDTOS.get(i));
}
resultPage.setRecords(recordLists);
resultPage.setTotal(resourceDTOS.size());
}
}
resultPage.setRecords(recordLists);
resultPage.setTotal(resourceDTOS.size());
}
break;
case TSINGTAO_XHA: {
if ("基础设施".equals(resourceDTO.getType())) { // 基础设施
logger.info("西海岸基础设施");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
CompletableFuture cloud =
CompletableFuture.runAsync(() -> { // 云脑专网
OkHttpClient client = new OkHttpClient();
String url = String.format(tsingtao_xhaProperties.getCloudcam(), resourceDTO.getName(), pageNum, pageSize);
logger.info(url);
Request request = new Request.Builder().url(url).build();
try (Response response = client.newCall(request).execute()) {
if (response.isSuccessful()) {
JSONObject jsonObject_ = JSON.parseObject(response.body().string());
if (jsonObject_.containsKey("data")) {
if (jsonObject_.getJSONObject("data").containsKey("list")) {
resultPage.setTotal(jsonObject_.getJSONObject("data").getLongValue("total"));
resultPage.setRecords(jsonObject_.getJSONObject("data").getJSONArray("list").stream().map(index -> (JSONObject) JSON.toJSON(index))
.map(index -> {
ResourceDTO resourceDTO1 = new ResourceDTO();
resourceDTO1.setId(Long.valueOf(index.getString("id")));
resourceDTO1.setDelFlag(index.getIntValue("delFlag"));
resourceDTO1.setLink(index.getString("cameraIndexCode"));
resourceDTO1.setName(index.getString("name"));
resourceDTO1.setType("基础设施");
try {
resourceDTO1.setCreateDate(sdf.parse(index.getString("createdTime")));
} catch (ParseException e) {
logger.error("时间异常");
resourceDTO1.setCreateDate(new Date());
}
return resourceDTO1;
}).collect(Collectors.toList()));
} else {
resultPage.setRecords(null);
resultPage.setTotal(0);
}
}
} else {
logger.error("获取失败");
}
} catch (Exception exception) {
logger.error("失败", exception);
}
});
CompletableFuture local =
CompletableFuture.runAsync(() -> { // 金宏网
OkHttpClient client = new OkHttpClient();
String url = String.format(tsingtao_xhaProperties.getLocalcam(), resourceDTO.getName(), pageNum, pageSize);
logger.info(url);
Request request = new Request.Builder().url(url).build();
try (Response response = client.newCall(request).execute()) {
if (response.isSuccessful()) {
JSONObject jsonObject_ = JSON.parseObject(response.body().string());
if (jsonObject_.containsKey("data")) {
if (jsonObject_.getJSONObject("data").containsKey("list")) {
resultPage.setTotal(jsonObject_.getJSONObject("data").getLongValue("total"));
resultPage.setRecords(jsonObject_.getJSONObject("data").getJSONArray("list").stream().map(index -> (JSONObject) JSON.toJSON(index))
.map(index -> {
ResourceDTO resourceDTO1 = new ResourceDTO();
resourceDTO1.setId(Long.valueOf(index.getString("id")));
resourceDTO1.setDelFlag(index.getIntValue("delFlag"));
resourceDTO1.setLink(index.getString("cameraIndexCode"));
resourceDTO1.setName(index.getString("name"));
resourceDTO1.setType("基础设施");
try {
resourceDTO1.setCreateDate(sdf.parse(index.getString("createdTime")));
} catch (ParseException e) {
logger.error("时间异常");
resourceDTO1.setCreateDate(new Date());
}
return resourceDTO1;
}).collect(Collectors.toList()));
} else {
resultPage.setRecords(null);
resultPage.setTotal(0);
}
}
} else {
logger.error("获取失败");
}
} catch (Exception exception) {
logger.error("失败", exception);
}
});
CompletableFuture.allOf(cloud, local);
} else {
logger.info("西海岸基普通");
if (resourceDTO.getInfoList().isEmpty()) {
List<ResourceDTO> resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType);
resultPage.setRecords(resourceDTOS);
resultPage.setTotal(resourceDao.selectDTOPage(resourceDTO, 0, 100000, orderField, orderType).size());
} else {
List<ResourceDTO> resourceDTOS = resourceDao.selectWithAttrs(resourceDTO, orderField, orderType);
int j = Math.min(pageNum * pageSize, resourceDTOS.size());
if (resourceDTOS.isEmpty()) {
resultPage.setRecords(null);
resultPage.setTotal(0);
} else {
ArrayList<ResourceDTO> recordLists = new ArrayList<>();
for (int i = (pageNum - 1) * pageSize; i < j; i++) {
recordLists.add(resourceDTOS.get(i));
}
resultPage.setRecords(recordLists);
resultPage.setTotal(resourceDTOS.size());
}
}
}
}
break;
}
return resultPage;
}
@ -390,6 +515,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
HashMap<Object, Object> areaMap = new HashMap<>();
areaMap.put("type", "区级");
Integer integer = resourceDao.selectTypeCountByDept("区级", jsonObject.getString("type"));
if (null == integer) {
integer = 0;
}
areaMap.put("total", integer);
ArrayList<Map> areaListTemp = new ArrayList<>();
areaTypeList.orElse(new HashMap<>()).forEach((key, value) -> {

View File

@ -1,6 +1,5 @@
package io.renren.modules.resource.videoPreview;
import io.renren.common.constant.Constant;
import io.renren.common.domain.BaoTouProperties;
import io.renren.common.domain.TsingtaoProperties;

View File

@ -10,6 +10,7 @@ import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.resource.service.ResourceService;
import io.renren.modules.resourceBrowse.dto.ResourceBrowseDTO;
import io.renren.modules.resourceBrowse.excel.ResourceBrowseExcel;
import io.renren.modules.resourceBrowse.service.ResourceBrowseService;
@ -38,6 +39,8 @@ import java.util.Map;
public class ResourceBrowseController {
@Autowired
private ResourceBrowseService resourceBrowseService;
@Autowired
private ResourceService resourceService;
@GetMapping("/page")
@ApiOperation("分页")
@ -45,12 +48,12 @@ public class ResourceBrowseController {
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String"),
})
//@RequiresPermissions("resourceBrowse:resourcebrowse:page")
public Result<PageData<ResourceBrowseDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<ResourceBrowseDTO> page = resourceBrowseService.page(params);
page.getList().forEach(item -> item.setResourceDTO(resourceService.get(item.getResourceId())));
return new Result<PageData<ResourceBrowseDTO>>().ok(page);
}

View File

@ -1,5 +1,6 @@
package io.renren.modules.resourceBrowse.dto;
import io.renren.modules.resource.dto.ResourceDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -41,4 +42,9 @@ public class ResourceBrowseDTO implements Serializable {
@ApiModelProperty(value = "备用字段3")
private String note3;
@ApiModelProperty(value = "能力信息")
private ResourceDTO resourceDTO;
}

View File

@ -25,6 +25,7 @@ public class ResourceBrowseServiceImpl extends CrudServiceImpl<ResourceBrowseDao
@Autowired
private ResourceBrowseDao resourceBrowseDao;
@Value("${system.startDay}")
private String systemDay;

View File

@ -34,6 +34,8 @@ spring:
wall:
config:
multi-statement-allow: true
flyway:
enabled: false
#上传的静态资源配置
resource:
root_url: 15.2.21.238

View File

@ -1,6 +1,8 @@
project:
# 平台部署位置 0青岛市区 1青岛西海岸 2包头
# 平台部署位置 0青岛市区 1青岛西海岸 2包头
place: 0
# 是否将资源归为上级
higher: false
# 大数据部门相关配置
big_date:
name: 青岛市大数据发展管理局

View File

@ -51,6 +51,7 @@
<include>*.properties</include>
<include>*.json</include>
<include>db/*.sql</include>
<include>domain/**</include>
</includes>
<excludes>
<exclude>application-prod.yml</exclude>

View File

@ -0,0 +1,3 @@
UPDATE sys_notice SET `from` = '评论' WHERE title LIKE '需求%';
UPDATE sys_notice SET `from` = '通知' WHERE title LIKE '流程%';
UPDATE sys_notice SET `from` = '其他' WHERE title IS NULL;

View File

@ -0,0 +1 @@
ALTER TABLE `sys_user` ADD COLUMN `guid` varchar(100) NULL;

View File

@ -0,0 +1 @@
ALTER TABLE `sys_notice` ADD COLUMN `from` varchar(255) NULL COMMENT '通知来源';

View File

@ -1,6 +1,7 @@
tsingtao-xha.cloudhls=http://10.10.30.9:8001/hx-weatherwarning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls
tsingtao-xha.localhls=http://10.134.135.9:8001/hx-weatherwarning/camera/getCameraLiveStreamByCode?cameraCode=%s&protocol=hls
tsingtao-xha.cloudcam=http://10.10.30.9:8001/hx-weather-warning/camera/getCameraListByName?name=&pageNo=1&pageSize=10
tsingtao-xha.localcam=http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=&pageNo=1&pageSize=10
tsingtao-xha.cloudcam=http://10.10.30.9:8001/hx-weather-warning/camera/getCameraListByName?name=%s&pageNo=%d&pageSize=%d
tsingtao-xha.localcam=http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=%s&pageNo=%d&pageSize=%d
tsingtao-xha.resourcecount=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=&type=&orderField=requestNum&orderType=desc&pageNum=1&pageSize=10&serviceType=data&rq=1655106309671.43
tsingtao-xha.resourceapplyinfo=http://10.134.135.24:30058/shareportal/platform/index/abilityMarket/count
tsingtao-xha.sjzy=http://10.16.3.224:30090/api/share-portal/platform/catalogue/query?catalogueId=&departmentId=&serviceName=%s&type=&orderField=%s&orderType=%s&pageNum=%s&pageSize=%s&serviceType=data&rq=1655106309671.43

View File

@ -11,11 +11,15 @@
<!-- 获取我的通知列表 -->
<select id="getMyNoticeList" resultType="io.renren.modules.notice.entity.SysNoticeEntity">
select t2.id, t2.title, t2.type, t2.sender_name, t2.sender_date, t1.read_status, t2.content from sys_notice_user t1, sys_notice t2
select t2.id, t2.title, t2.type, t2.sender_name, t2.sender_date, t1.read_status, t2.content ,t2.`from` from
sys_notice_user t1, sys_notice t2
where t1.notice_id = t2.id and t1.receiver_id = #{receiverId}
<if test="readStatus != null">
AND read_status = #{readStatus}
</if>
<if test="from != null">
AND `from` = #{from}
</if>
order by t2.create_date desc
</select>
</mapper>

View File

@ -215,6 +215,11 @@ public interface Constant {
}
}
/**
* 项目部署地点
*/
String PROJECT_PLACE = "PROJECT_PLACE";
/**
* 项目运行地点
*/