网络文章表添加文章评价状态

dongdingding
董丁丁 2 years ago
parent 1553ada443
commit 8270d62984

@ -104,4 +104,25 @@ public class ZongzhiScreenSaftyController {
/**
*
*/
@ApiOperation(value = "隐患处置最新隐患", response = ZongzhiHazardDisposalResponse.class)
@GetMapping("/hazarddisposal")
private AjaxResult getHazardDisposal() {
return AjaxResult.success(zongzhiScreenSaftyService.getHazardDisposal());
}
/**
*
*/
@ApiOperation(value = "隐患处置通报处置", response = ZongzhiNotificationResponse.class)
@GetMapping("/notification ")
private AjaxResult getNotification() {
return AjaxResult.success(zongzhiScreenSaftyService.getNotification());
}
} }

@ -0,0 +1,37 @@
package com.ruoyi.screen.domain.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
*/
@Data
@ApiModel("隐患处置最新隐患响应类")
public class ZongzhiHazardDisposalResponse {
/**
*
*/
@ApiModelProperty(value = "隐患名称")
private String riskName;
/**
*1. 2. 3.
*/
@ApiModelProperty(value = "等级1.低级 2.中级 3.高级")
private Integer level;
/**
*
*/
@ApiModelProperty(value = "单位名称")
private String unitName;
/**
*1.2.3.
*/
@ApiModelProperty(value = "隐患来源1.众测2.态势感知平台3.网信办")
private Integer riskSource;
}

@ -0,0 +1,33 @@
package com.ruoyi.screen.domain.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
*/
@Data
@ApiModel("隐患处置通报处置响应类")
public class ZongzhiNotificationResponse {
/**
*
*/
@ApiModelProperty(value = "单位名称")
private String unitName;
/**
*1.2.
*/
@ApiModelProperty(value = "处置情况1.已归档2.未归档")
private Integer state;
/**
*IP/
*/
@ApiModelProperty(value = "目标IP/域名")
private String ipDns;
}

@ -52,4 +52,17 @@ public interface ZongzhiScreenSaftyMapper {
* *
*/ */
public List<ZongzhiSafetyHazardResponse> getSafetyHazard(); public List<ZongzhiSafetyHazardResponse> getSafetyHazard();
/**
*
*/
public List<ZongzhiHazardDisposalResponse> getHazardDisposal();
/**
*
*/
public List<ZongzhiNotificationResponse> getNotification();
} }

@ -52,4 +52,20 @@ public interface ZongzhiScreenSaftyService {
* *
*/ */
public List<ZongzhiSafetyHazardResponse> getSafetyHazard(); public List<ZongzhiSafetyHazardResponse> getSafetyHazard();
/**
*
*/
public List<ZongzhiHazardDisposalResponse> getHazardDisposal();
/**
*
*/
public List<ZongzhiNotificationResponse> getNotification();
} }

@ -49,4 +49,14 @@ public class ZongzhiScreenSaftyServiceImpl implements ZongzhiScreenSaftyService
public List<ZongzhiSafetyHazardResponse> getSafetyHazard() { public List<ZongzhiSafetyHazardResponse> getSafetyHazard() {
return zongzhiScreenSaftyMapper.getSafetyHazard(); return zongzhiScreenSaftyMapper.getSafetyHazard();
} }
@Override
public List<ZongzhiHazardDisposalResponse> getHazardDisposal() {
return zongzhiScreenSaftyMapper.getHazardDisposal();
}
@Override
public List<ZongzhiNotificationResponse> getNotification() {
return zongzhiScreenSaftyMapper.getNotification();
}
} }

@ -3,6 +3,7 @@ package com.ruoyi.zongzhi.domain;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.models.auth.In;
import lombok.Data; import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
@ -71,6 +72,13 @@ public class TcNetworkArticle extends BaseEntity {
@ApiModelProperty(value = "文章地址") @ApiModelProperty(value = "文章地址")
private String url; private String url;
/**
*
*/
@Excel(name = "文章评价状态")
@ApiModelProperty(value = "文章评价状态")
private Integer status;
/** /**
* ID * ID
*/ */
@ -85,4 +93,6 @@ public class TcNetworkArticle extends BaseEntity {
@ApiModelProperty(value = "修改人ID") @ApiModelProperty(value = "修改人ID")
private Long updateId; private Long updateId;
} }

@ -48,4 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getSafetyHazard" resultType="com.ruoyi.screen.domain.response.ZongzhiSafetyHazardResponse"> <select id="getSafetyHazard" resultType="com.ruoyi.screen.domain.response.ZongzhiSafetyHazardResponse">
select type,count(*) as count from tc_safety_danger GROUP BY type select type,count(*) as count from tc_safety_danger GROUP BY type
</select> </select>
<select id="getHazardDisposal" resultType="com.ruoyi.screen.domain.response.ZongzhiHazardDisposalResponse">
select risk_name as riskName, level, unit_name AS unitName, risk_source AS riskSource
from tc_safety_danger
</select>
<select id="getNotification" resultType="com.ruoyi.screen.domain.response.ZongzhiNotificationResponse">
select unit_name as unitName , ip_dns as ipDns, state from tc_safety_danger
</select>
</mapper> </mapper>

@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="status" column="status" />
</resultMap> </resultMap>
<sql id="selectTcNetworkArticleVo"> <sql id="selectTcNetworkArticleVo">
@ -34,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="releaseTime != null "> and release_time = #{releaseTime}</if> <if test="releaseTime != null "> and release_time = #{releaseTime}</if>
<if test="source != null and source != ''"> and source = #{source}</if> <if test="source != null and source != ''"> and source = #{source}</if>
<if test="url != null and url != ''"> and url = #{url}</if> <if test="url != null and url != ''"> and url = #{url}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="createId != null "> and create_id = #{createId}</if> <if test="createId != null "> and create_id = #{createId}</if>
<if test="updateId != null "> and update_id = #{updateId}</if> <if test="updateId != null "> and update_id = #{updateId}</if>
</where> </where>
@ -54,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="releaseTime != null">release_time,</if> <if test="releaseTime != null">release_time,</if>
<if test="source != null">source,</if> <if test="source != null">source,</if>
<if test="url != null">url,</if> <if test="url != null">url,</if>
<if test="status != null">status,</if>
<if test="createId != null">create_id,</if> <if test="createId != null">create_id,</if>
<if test="createBy != null">create_by,</if> <if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
@ -70,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="releaseTime != null">#{releaseTime},</if> <if test="releaseTime != null">#{releaseTime},</if>
<if test="source != null">#{source},</if> <if test="source != null">#{source},</if>
<if test="url != null">#{url},</if> <if test="url != null">#{url},</if>
<if test="status != null">#{status},</if>
<if test="createId != null">#{createId},</if> <if test="createId != null">#{createId},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
@ -89,6 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="releaseTime != null">release_time = #{releaseTime},</if> <if test="releaseTime != null">release_time = #{releaseTime},</if>
<if test="source != null">source = #{source},</if> <if test="source != null">source = #{source},</if>
<if test="url != null">url = #{url},</if> <if test="url != null">url = #{url},</if>
<if test="status != null">status = #{status},</if>
<if test="createId != null">create_id = #{createId},</if> <if test="createId != null">create_id = #{createId},</if>
<if test="createBy != null">create_by = #{createBy},</if> <if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>

Loading…
Cancel
Save