下架新增录入字段

This commit is contained in:
wangliwen 2022-08-17 15:43:27 +08:00
parent b7ce167d5f
commit 4028588ea7
6 changed files with 59 additions and 29 deletions

View File

@ -209,6 +209,8 @@ public class ResourceMountController {
} }
dto.setUndercarriageReason(tResourceUndercarriageApplyDTO.getReason()); dto.setUndercarriageReason(tResourceUndercarriageApplyDTO.getReason());
dto.setUndercarriageEnclosure(tResourceUndercarriageApplyDTO.getEnclosure()); dto.setUndercarriageEnclosure(tResourceUndercarriageApplyDTO.getEnclosure());
dto.setUndercarriageTitle(tResourceUndercarriageApplyDTO.getTitle());
dto.setUndercarriageUserPhone(tResourceUndercarriageApplyDTO.getPhone());
dto.setDelFlag(ResourceEntityDelFlag.NORMAL.getFlag()); // 设置为正常 dto.setDelFlag(ResourceEntityDelFlag.NORMAL.getFlag()); // 设置为正常
dto.setFlowType("资源下架"); dto.setFlowType("资源下架");
String userId = SecurityUser.getUserId().toString(); String userId = SecurityUser.getUserId().toString();

View File

@ -103,12 +103,17 @@ public class ResourceDTO extends AuditingBaseDTO implements Serializable {
@ApiModelProperty(value = "附件") @ApiModelProperty(value = "附件")
private String enclosure; private String enclosure;
@ApiModelProperty(value = "下架理由") @ApiModelProperty(value = "下架理由")
private String undercarriageReason; private String undercarriageReason;
@ApiModelProperty(value = "提起下架人员姓名") @ApiModelProperty(value = "提起下架人员姓名")
private String undercarriageUserName; private String undercarriageUserName;
@ApiModelProperty(value = "下架附件") @ApiModelProperty(value = "下架附件")
private String undercarriageEnclosure; private String undercarriageEnclosure;
@ApiModelProperty(value = "下架申请标题")
private String undercarriageTitle;
@ApiModelProperty(value = "下架申请电话")
private String undercarriageUserPhone;
@ApiModelProperty(value = "总体评价") @ApiModelProperty(value = "总体评价")
private Integer total; private Integer total;

View File

@ -140,6 +140,15 @@ public class ResourceEntity extends BaseEntity {
*/ */
private String undercarriageEnclosure; private String undercarriageEnclosure;
/**
* 下架申请标题
*/
private String undercarriageTitle;
/**
* 下架申请电话
*/
private String undercarriageUserPhone;
/** /**
* 置顶标识 * 置顶标识

View File

@ -26,4 +26,6 @@ public class TResourceUndercarriageApplyDTO extends AuditingBaseDTO implements S
private String reason; private String reason;
@ApiModelProperty(value = "下架附件") @ApiModelProperty(value = "下架附件")
private String enclosure; private String enclosure;
@ApiModelProperty(value = "下架标题")
private String title;
} }

View File

@ -0,0 +1,3 @@
alter table `tb_data_resource`
ADD COLUMN `undercarriage_title` varchar(255) NULL comment '下架申请标题' ,
ADD COLUMN `undercarriage_phone` varchar(255) NULL comment '下架申请电话';

View File

@ -39,6 +39,8 @@
<result property="applyNumber" column="apply_number"/> <result property="applyNumber" column="apply_number"/>
<result property="pinTop" column="pin_top"/> <result property="pinTop" column="pin_top"/>
<result property="pinTopTime" column="pin_top_time"/> <result property="pinTopTime" column="pin_top_time"/>
<result property="undercarriageTitle" column="undercarriage_title"/>
<result property="undercarriageUserPhone" column="undercarriage_phone"/>
</resultMap> </resultMap>
<resultMap id="resourceDTO" type="io.renren.modules.resource.dto.ResourceDTO"> <resultMap id="resourceDTO" type="io.renren.modules.resource.dto.ResourceDTO">
@ -85,6 +87,8 @@
<result property="applyNumber" column="apply_number"/> <result property="applyNumber" column="apply_number"/>
<result property="pinTop" column="pin_top"/> <result property="pinTop" column="pin_top"/>
<result property="pinTopTime" column="pin_top_time"/> <result property="pinTopTime" column="pin_top_time"/>
<result property="undercarriageTitle" column="undercarriage_title"/>
<result property="undercarriageUserPhone" column="undercarriage_phone"/>
</resultMap> </resultMap>
<update id="deleteByIds"> <update id="deleteByIds">
@ -139,7 +143,8 @@
AND user_id = #{dto.creator} AND user_id = #{dto.creator}
GROUP BY id) taa2 ON tdr.id = taa2.resource_id GROUP BY id) taa2 ON tdr.id = taa2.resource_id
LEFT JOIN ( SELECT resource_id, COUNT( approve_status ) approve_status FROM t_ability_application WHERE 1 = 1 LEFT JOIN ( SELECT resource_id, COUNT( approve_status ) approve_status FROM t_ability_application WHERE 1 = 1
AND del_flag = 0 AND user_id = #{dto.creator} AND approve_status = '通过' GROUP BY resource_id ) taa3 ON tdr.id = AND del_flag = 0 AND user_id = #{dto.creator} AND approve_status = '通过' GROUP BY resource_id ) taa3 ON tdr.id
=
taa3.resource_id taa3.resource_id
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
LEFT JOIN sys_region sr ON sd.district = sr.id LEFT JOIN sys_region sr ON sd.district = sr.id
@ -271,7 +276,7 @@
WHERE WHERE
1 = 1 1 = 1
AND tdr.del_flag = 0 AND tdr.del_flag = 0
AND tdr.type != '知识库' AND tdr.type != '知识库'
AND tdr.type != '赋能案例' AND tdr.type != '赋能案例'
<if test="type != null and type != ''"> <if test="type != null and type != ''">
AND MATCH (tdr.type) AGAINST ( #{type} IN BOOLEAN MODE) AND MATCH (tdr.type) AGAINST ( #{type} IN BOOLEAN MODE)
@ -426,7 +431,8 @@
AND user_id = #{dto.creator} AND user_id = #{dto.creator}
GROUP BY id) taa2 ON tdr.id = taa2.resource_id GROUP BY id) taa2 ON tdr.id = taa2.resource_id
LEFT JOIN ( SELECT resource_id, COUNT( approve_status ) approve_status FROM t_ability_application WHERE 1 = 1 LEFT JOIN ( SELECT resource_id, COUNT( approve_status ) approve_status FROM t_ability_application WHERE 1 = 1
AND del_flag = 0 AND user_id = #{dto.creator} AND approve_status = '通过' GROUP BY resource_id ) taa3 ON tdr.id = AND del_flag = 0 AND user_id = #{dto.creator} AND approve_status = '通过' GROUP BY resource_id ) taa3 ON tdr.id
=
taa3.resource_id taa3.resource_id
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
LEFT JOIN sys_region sr ON sd.district = sr.id LEFT JOIN sys_region sr ON sd.district = sr.id
@ -610,7 +616,8 @@
FROM FROM
( (
SELECT SELECT
( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS "type", ( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS
"type",
sd.NAME AS "deptName", sd.NAME AS "deptName",
IFNULL( tdr.deptCount, 0 ) AS "deptCount", IFNULL( tdr.deptCount, 0 ) AS "deptCount",
sd.id AS "deptId", sd.id AS "deptId",
@ -644,7 +651,8 @@
FROM FROM
( (
SELECT SELECT
( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS "type", ( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS
"type",
IFNULL( tdr.deptCount, 0 ) AS "deptCount" IFNULL( tdr.deptCount, 0 ) AS "deptCount"
FROM FROM
sys_dept sd sys_dept sd
@ -682,7 +690,8 @@
FROM FROM
( (
SELECT SELECT
( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS "type", ( CASE sd.type WHEN 1 THEN '省级' WHEN 2 THEN '市级' WHEN 3 THEN '区级' WHEN 4 THEN '企业' ELSE '其他' END ) AS
"type",
IFNULL( tdr.deptCount, 0) AS "deptCount", IFNULL( tdr.deptCount, 0) AS "deptCount",
IFNULL(sr.name, '暂无该地区') AS "districtName" IFNULL(sr.name, '暂无该地区') AS "districtName"
FROM FROM
@ -1512,7 +1521,7 @@
<select id="resourceInstallationOrDataResourceDetails" parameterType="java.util.Map" resultType="java.util.Map"> <select id="resourceInstallationOrDataResourceDetails" parameterType="java.util.Map" resultType="java.util.Map">
SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName
FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id
WHERE a.type = #{resourceType} AND a.del_flag = 0 WHERE a.type = #{resourceType} AND a.del_flag = 0
<if test="id != '0'.toString()"> <if test="id != '0'.toString()">
AND (b.ID = #{id} OR INSTR(b.pids,#{id})) AND (b.ID = #{id} OR INSTR(b.pids,#{id}))
@ -1522,40 +1531,40 @@
</select> </select>
<select id="selectAppList" resultType="java.util.Map"> <select id="selectAppList" resultType="java.util.Map">
SELECT SELECT
tdr.id, tdr.id,
tdr.`name`, tdr.`name`,
tdr.dept_id, tdr.dept_id,
sd.name AS "deptName", sd.name AS "deptName",
sd.sort AS "deptSort", sd.sort AS "deptSort",
sd.type AS "deptType", sd.type AS "deptType",
sr.sort AS "regionSort", sr.sort AS "regionSort",
tdr.visitor tdr.visitor
FROM FROM
tb_data_resource tdr tb_data_resource tdr
LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id LEFT JOIN sys_dept sd ON tdr.dept_id = sd.id
LEFT JOIN sys_region sr ON sd.district = sr.id LEFT JOIN sys_region sr ON sd.district = sr.id
WHERE WHERE
1 = 1 1 = 1
AND tdr.type = '应用资源' AND tdr.type = '应用资源'
AND tdr.del_flag = 0 AND tdr.del_flag = 0
<if test=" type != null and type != ''"> <if test=" type != null and type != ''">
AND sd.type = #{type} AND sd.type = #{type}
</if> </if>
ORDER BY ORDER BY
sd.type, sr.sort, sd.sort, tdr.dept_id, tdr.visitor DESC, tdr.id DESC sd.type, sr.sort, sd.sort, tdr.dept_id, tdr.visitor DESC, tdr.id DESC
LIMIT ${pageNum}, 9 LIMIT ${pageNum}, 9
</select> </select>
<select id="selectPicByResId" resultType="java.lang.String"> <select id="selectPicByResId" resultType="java.lang.String">
SELECT SELECT
tda.attr_value tda.attr_value
FROM FROM
tb_data_attr tda tb_data_attr tda
LEFT JOIN tb_data_resource tdr ON tda.data_resource_id = tdr.id LEFT JOIN tb_data_resource tdr ON tda.data_resource_id = tdr.id
WHERE WHERE
tda.attr_type = '应用图片' tda.attr_type = '应用图片'
AND tdr.id = #{id} AND tdr.id = #{id}
AND tda.del_flag = 0 AND tda.del_flag = 0
</select> </select>
<select id="selectTypeCountByName" resultType="java.util.Map"> <select id="selectTypeCountByName" resultType="java.util.Map">
SELECT SELECT