Merge branch 'dev' into docker_package
This commit is contained in:
commit
e78b5ca35f
|
@ -360,11 +360,18 @@ public class CensusControllerV3 {
|
|||
@ApiImplicitParam(name = "resourceType",value = "资源类型(组件服务、应用资源、基础设施、数据资源、知识库)", paramType = "query", dataType = "String")
|
||||
})
|
||||
public Result<List<Map<String,Object>>> applicationReleaseCapabilitySet(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
Object[] ps = {params.get("id"),params.get("resourceType")};
|
||||
List<Map<String, Object>> result = jdbcTemplate.queryForList("SELECT COUNT(b.id) as num,b.attr_value as publisher from tb_data_resource a inner join tb_data_attr b\n" +
|
||||
"on a.id = b.data_resource_id \n" +
|
||||
"where a.del_flag = 0 and a.dept_id = ? and a.type = ? and b.attr_type = '发布端'\n" +
|
||||
"group by b.attr_value", ps);
|
||||
Object[] ps = {params.get("resourceType"),params.get("id"),params.get("id")};
|
||||
List<Map<String, Object>> result = jdbcTemplate.queryForList("select m.attr_value as publisher,count(m.id) as num from \n" +
|
||||
"(\n" +
|
||||
"SELECT a.id,substring_index( a.attr_value, ';', b.help_topic_id +1 ),substring_index( substring_index( a.attr_value, ';', b.help_topic_id+1 ), ';',- 1 ) AS attr_value FROM \n" +
|
||||
"(\n" +
|
||||
"select a.id,c.attr_value from tb_data_resource a inner join sys_dept b on a.dept_id = b.id inner join tb_data_attr c \n" +
|
||||
"on a.id = c.data_resource_id where a.del_flag = 0 and a.type = ? and (b.id = ? or instr(b.pids,?)) and c.attr_type = '发布端' and c.del_flag = 0\n" +
|
||||
"and c.attr_value is not null\n" +
|
||||
") a\n" +
|
||||
"INNER JOIN mysql.help_topic b ON b.help_topic_id < ( length( a.attr_value ) - length( REPLACE ( a.attr_value, ';', '' ) ) +1 )\n" +
|
||||
"\n" +
|
||||
") m GROUP BY m.attr_value", ps);
|
||||
|
||||
return new Result<List<Map<String,Object>>>().ok(result);
|
||||
}
|
||||
|
|
|
@ -1,17 +1,3 @@
|
|||
-- 删除索引
|
||||
alter table `tb_resource_collection` drop index `resourceid`;
|
||||
alter table `tb_resource_car` drop index `resourceid`;
|
||||
alter table `tb_resource_score` drop index `resourceid`;
|
||||
alter table `tb_resource_browse` drop index `resourceid`;
|
||||
alter table `t_ability_application` drop index `resourceid`;
|
||||
alter table `t_ability_application` drop index `userId`;
|
||||
alter table `tb_data_resource` drop index `type`;
|
||||
alter table `tb_data_attr` drop index `attr_value`;
|
||||
alter table `tb_data_resource` drop index `name`;
|
||||
alter table `tb_data_resource` drop index `deptId`;
|
||||
alter table `sys_dept` drop index `type`;
|
||||
alter table `sys_dept` drop index `district`;
|
||||
alter table `tb_resource_collection` drop index `userId`;
|
||||
-- 创建索引
|
||||
alter table `tb_resource_collection` ADD INDEX `resourceid`(`resource_id`) USING BTREE comment '收藏的资源id';
|
||||
alter table `tb_resource_car` ADD INDEX `resourceid`(`resource_id`) USING BTREE comment '加入申购车的id';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
alter table `t_ability_application`
|
||||
ADD COLUMN `title` longtext NULL comment '能力申请标题' AFTER `cameraList`,
|
||||
ADD COLUMN `title` longtext NULL comment '能力申请标题',
|
||||
ADD COLUMN `application_system` varchar(255) NULL comment '应用系统' AFTER `title`,
|
||||
ADD COLUMN `application_scene` varchar(255) NULL comment '应用场景' AFTER `application_system`,
|
||||
ADD COLUMN `application_background` longtext NULL comment '应用背景' AFTER `application_scene`,
|
||||
|
|
Loading…
Reference in New Issue