ResourceEntity 增加infoList json字段
This commit is contained in:
parent
5b66808e7c
commit
0063546e5e
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE `share_platform`.`tb_data_resource` ADD COLUMN `info_list` json NULL COMMENT '属性信息';
|
|
@ -1,11 +1,15 @@
|
||||||
package io.renren.modules.resource.entity;
|
package io.renren.modules.resource.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||||
import io.renren.common.entity.BaseEntity;
|
import io.renren.common.entity.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 资源表
|
* 资源表
|
||||||
|
@ -130,4 +134,7 @@ public class ResourceEntity extends BaseEntity {
|
||||||
* 提起下架人员
|
* 提起下架人员
|
||||||
*/
|
*/
|
||||||
private String undercarriageUserName;
|
private String undercarriageUserName;
|
||||||
|
|
||||||
|
@TableField(value = "info_list", typeHandler = FastjsonTypeHandler.class)
|
||||||
|
private List<AttrEntity> infoList;
|
||||||
}
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE `share_platform`.`tb_data_resource` ADD COLUMN `info_list` json NULL COMMENT '属性信息';
|
|
@ -33,6 +33,8 @@
|
||||||
<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="infoList" column="info_list"
|
||||||
|
typeHandler="com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="resourceDTO" type="io.renren.modules.resource.dto.ResourceDTO">
|
<resultMap id="resourceDTO" type="io.renren.modules.resource.dto.ResourceDTO">
|
||||||
|
@ -103,7 +105,7 @@
|
||||||
|
|
||||||
<select id="selectWithAttrs" resultMap="resourceDTO">
|
<select id="selectWithAttrs" resultMap="resourceDTO">
|
||||||
SELECT
|
SELECT
|
||||||
tdr.*,
|
DISTINCT tdr.*,
|
||||||
IFNULL(taa2.approve_status, '未申请') AS "applyState",
|
IFNULL(taa2.approve_status, '未申请') AS "applyState",
|
||||||
IFNULL(trs.score, 0 ) AS "score",
|
IFNULL(trs.score, 0 ) AS "score",
|
||||||
IFNULL(taa.applyCount, 0 ) AS "applyCount",
|
IFNULL(taa.applyCount, 0 ) AS "applyCount",
|
||||||
|
@ -567,7 +569,8 @@
|
||||||
tdav.data_resource_id AS resourceId
|
tdav.data_resource_id AS resourceId
|
||||||
FROM
|
FROM
|
||||||
tb_data_attr tdav
|
tb_data_attr tdav
|
||||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value, ';', '' ) ) + 1 )
|
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value,
|
||||||
|
';', '' ) ) + 1 )
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
AND tdav.attr_type = '应用领域'
|
AND tdav.attr_type = '应用领域'
|
||||||
|
@ -830,7 +833,8 @@
|
||||||
COUNT( tdav.data_resource_id ) AS "count"
|
COUNT( tdav.data_resource_id ) AS "count"
|
||||||
FROM
|
FROM
|
||||||
tb_data_attr tdav
|
tb_data_attr tdav
|
||||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value, ';', '' ) ) + 1 )
|
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value,
|
||||||
|
';', '' ) ) + 1 )
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
AND tdav.attr_type = '应用领域'
|
AND tdav.attr_type = '应用领域'
|
||||||
|
@ -850,7 +854,8 @@
|
||||||
COUNT( tdav.data_resource_id ) AS "count"
|
COUNT( tdav.data_resource_id ) AS "count"
|
||||||
FROM
|
FROM
|
||||||
tb_data_attr tdav
|
tb_data_attr tdav
|
||||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value, ';', '' ) ) + 1 )
|
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value,
|
||||||
|
';', '' ) ) + 1 )
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
AND tdav.attr_type = '应用领域'
|
AND tdav.attr_type = '应用领域'
|
||||||
|
@ -883,7 +888,8 @@
|
||||||
COUNT( tdav.data_resource_id ) AS "total"
|
COUNT( tdav.data_resource_id ) AS "total"
|
||||||
FROM
|
FROM
|
||||||
tb_data_attr tdav
|
tb_data_attr tdav
|
||||||
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value, ';', '' ) ) + 1 )
|
JOIN mysql.help_topic b ON b.help_topic_id < ( LENGTH( tdav.attr_value ) - LENGTH( REPLACE ( tdav.attr_value,
|
||||||
|
';', '' ) ) + 1 )
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
AND tdav.attr_type = '应用领域'
|
AND tdav.attr_type = '应用领域'
|
||||||
|
|
Loading…
Reference in New Issue