下架支持附件

This commit is contained in:
wangliwen 2022-07-21 09:40:55 +08:00
parent 7632d92ac2
commit 162b016d36
6 changed files with 17 additions and 2 deletions

View File

@ -190,6 +190,7 @@ public class ResourceMountController {
throw new RuntimeException("该资源已发起下架"); throw new RuntimeException("该资源已发起下架");
} }
dto.setUndercarriageReason(tResourceUndercarriageApplyDTO.getReason()); dto.setUndercarriageReason(tResourceUndercarriageApplyDTO.getReason());
dto.setUndercarriageEnclosure(tResourceUndercarriageApplyDTO.getEnclosure());
dto.setDelFlag(ResourceEntityDelFlag.NORMAL.getFlag()); // 设置为正常 dto.setDelFlag(ResourceEntityDelFlag.NORMAL.getFlag()); // 设置为正常
String userId = SecurityUser.getUserId().toString(); String userId = SecurityUser.getUserId().toString();
Optional<SysUserDTO> userDTO = Optional.ofNullable(sysUserService.get(Long.valueOf(userId))); Optional<SysUserDTO> userDTO = Optional.ofNullable(sysUserService.get(Long.valueOf(userId)));

View File

@ -103,6 +103,8 @@ public class ResourceDTO extends AuditingBaseDTO implements Serializable {
private String undercarriageReason; private String undercarriageReason;
@ApiModelProperty(value = "提起下架人员姓名") @ApiModelProperty(value = "提起下架人员姓名")
private String undercarriageUserName; private String undercarriageUserName;
@ApiModelProperty(value = "下架附件")
private String undercarriageEnclosure;
@ApiModelProperty(value = "总体评价") @ApiModelProperty(value = "总体评价")
private Integer total; private Integer total;

View File

@ -134,6 +134,12 @@ public class ResourceEntity extends BaseEntity {
*/ */
private String undercarriageUserName; private String undercarriageUserName;
/**
* 下架附件
*/
private String undercarriageEnclosure;
@TableField(value = "info_list", typeHandler = FastjsonTypeHandler.class) @TableField(value = "info_list", typeHandler = FastjsonTypeHandler.class)
private List<AttrEntity> infoList; private List<AttrEntity> infoList;

View File

@ -24,4 +24,6 @@ public class TResourceUndercarriageApplyDTO extends AuditingBaseDTO implements S
private List<Map<String, String>> resource; private List<Map<String, String>> resource;
@ApiModelProperty(value = "下架原因") @ApiModelProperty(value = "下架原因")
private String reason; private String reason;
@ApiModelProperty(value = "下架附件")
private String enclosure;
} }

View File

@ -0,0 +1 @@
alter table `tb_data_resource` ADD COLUMN `undercarriage_enclosure` longtext NULL comment '下架附件';

View File

@ -33,6 +33,7 @@
<result property="enclosure" column="enclosure"/> <result property="enclosure" column="enclosure"/>
<result property="undercarriageReason" column="undercarriage_reason"/> <result property="undercarriageReason" column="undercarriage_reason"/>
<result property="undercarriageUserName" column="undercarriage_user_name"/> <result property="undercarriageUserName" column="undercarriage_user_name"/>
<result property="undercarriageEnclosure" column="undercarriage_enclosure"/>
<result property="infoList" column="info_list" <result property="infoList" column="info_list"
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/> typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
<result property="applyNumber" column="apply_number"/> <result property="applyNumber" column="apply_number"/>
@ -68,6 +69,7 @@
<result property="enclosure" column="enclosure"/> <result property="enclosure" column="enclosure"/>
<result property="undercarriageReason" column="undercarriage_reason"/> <result property="undercarriageReason" column="undercarriage_reason"/>
<result property="undercarriageUserName" column="undercarriage_user_name"/> <result property="undercarriageUserName" column="undercarriage_user_name"/>
<result property="undercarriageEnclosure" column="undercarriage_enclosure"/>
<!-- 自定义字段 --> <!-- 自定义字段 -->
<result property="deptName" column="deptName"/> <result property="deptName" column="deptName"/>
<result property="isCollect" column="isCollect"/> <result property="isCollect" column="isCollect"/>
@ -289,7 +291,7 @@
IFNULL( trc.collectCount, 0 ) AS "collectCount", IFNULL( trc.collectCount, 0 ) AS "collectCount",
sd.NAME AS "deptName", sd.NAME AS "deptName",
IFNULL( trc2.isCollect, 'false' ) AS "isCollect", IFNULL( trc2.isCollect, 'false' ) AS "isCollect",
IF( IFNULL(taa2.approve_status, 0) &lt; 1, '未申请', '已申请' ) AS "applyState" IF( IFNULL(taa2.approve_status, 0) &lt; 1, '未申请', '已申请' ) AS "applyState"
FROM FROM
tb_data_resource tdr tb_data_resource tdr
LEFT JOIN ( SELECT resource_id, AVG( score ) AS "score" FROM tb_resource_score WHERE 1 = 1 AND del_flag = 0 LEFT JOIN ( SELECT resource_id, AVG( score ) AS "score" FROM tb_resource_score WHERE 1 = 1 AND del_flag = 0
@ -1436,7 +1438,8 @@
</select> </select>
<select id="selectDevelopDocResource" resultType="java.util.Map"> <select id="selectDevelopDocResource" resultType="java.util.Map">
SELECT tdr.id, tdr.name as title, tdr.type, tda.attr_value as doc FROM tb_data_resource tdr right join tb_data_attr tda on tdr.id=tda.data_resource_id SELECT tdr.id, tdr.name as title, tdr.type, tda.attr_value as doc FROM tb_data_resource tdr right join
tb_data_attr tda on tdr.id=tda.data_resource_id
where tdr.del_flag != 1 and tda.attr_type='技术文档' where tdr.del_flag != 1 and tda.attr_type='技术文档'
</select> </select>