Browse Source

增加返回插件类型和插件类型名称的字段

recovery
ma 5 years ago
parent
commit
2b08d0e01b
  1. 4
      tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java
  2. 5
      tall/src/main/java/com/ccsens/tall/web/PluginController.java
  3. 6
      tall/src/main/resources/mapper_dao/TaskPluginDao.xml

4
tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java

@ -138,6 +138,10 @@ public class PluginVo {
private String description; private String description;
@ApiModelProperty("插件作者") @ApiModelProperty("插件作者")
private Long pluginAuthor; private Long pluginAuthor;
@ApiModelProperty("插件类型")
private Byte pluginClass;
@ApiModelProperty("插件类型名称")
private String typeName;
@ApiModelProperty("插件预览图片") @ApiModelProperty("插件预览图片")
private List<FileVo.FilePosition> previewImgs = new ArrayList<>(); private List<FileVo.FilePosition> previewImgs = new ArrayList<>();
@JsonIgnore @JsonIgnore

5
tall/src/main/java/com/ccsens/tall/web/PluginController.java

@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
@Slf4j @Slf4j
@ -27,9 +28,9 @@ import java.util.List;
@RestController @RestController
@RequestMapping("/plugins") @RequestMapping("/plugins")
public class PluginController { public class PluginController {
@Autowired @Resource
private ITaskPluginService taskPluginService; private ITaskPluginService taskPluginService;
@Autowired @Resource
private ISysPluginService sysPluginService; private ISysPluginService sysPluginService;

6
tall/src/main/resources/mapper_dao/TaskPluginDao.xml

@ -10,6 +10,8 @@
tf.visit_location AS iconUrl, tf.visit_location AS iconUrl,
sp.description AS description, sp.description AS description,
sp.plugin_author AS pluginAuthor, sp.plugin_author AS pluginAuthor,
sp.plugin_class AS pluginClass,
pt.type_name AS typeName,
ptp.task_detail_id, ptp.task_detail_id,
ptp.member_role_id, ptp.member_role_id,
CONCAT_WS(',',GROUP_CONCAT(DISTINCT sp.plugin_icon),GROUP_CONCAT(DISTINCT pppf.file_id)) AS fileIdList CONCAT_WS(',',GROUP_CONCAT(DISTINCT sp.plugin_icon),GROUP_CONCAT(DISTINCT pppf.file_id)) AS fileIdList
@ -17,6 +19,7 @@
t_pro_task_plugin AS ptp t_pro_task_plugin AS ptp
LEFT JOIN t_sys_plugin AS sp ON ptp.plugin_id = sp.id AND sp.rec_status = 0 LEFT JOIN t_sys_plugin AS sp ON ptp.plugin_id = sp.id AND sp.rec_status = 0
LEFT JOIN t_file AS tf ON sp.plugin_icon = tf.id AND tf.rec_status = 0 LEFT JOIN t_file AS tf ON sp.plugin_icon = tf.id AND tf.rec_status = 0
LEFT JOIN t_sys_plugin_type AS pt ON pt.plugin_code = sp.plugin_class AND pt.rec_status = 0
LEFT JOIN t_pro_plugin_preview_file AS pppf ON sp.id = pppf.plugin_id AND pppf.rec_status = 0 LEFT JOIN t_pro_plugin_preview_file AS pppf ON sp.id = pppf.plugin_id AND pppf.rec_status = 0
AND sp.rec_status = 0 AND sp.rec_status = 0
WHERE WHERE
@ -39,11 +42,14 @@
sp.plugin_icon AS pluginIcon, sp.plugin_icon AS pluginIcon,
tf.visit_location AS iconUrl, tf.visit_location AS iconUrl,
sp.description AS description, sp.description AS description,
sp.plugin_class AS pluginClass,
pt.type_name AS typeName,
sp.plugin_author AS pluginAuthor, sp.plugin_author AS pluginAuthor,
CONCAT_WS(',',GROUP_CONCAT(DISTINCT sp.plugin_icon),GROUP_CONCAT(DISTINCT pppf.file_id)) AS fileIdList CONCAT_WS(',',GROUP_CONCAT(DISTINCT sp.plugin_icon),GROUP_CONCAT(DISTINCT pppf.file_id)) AS fileIdList
FROM FROM
t_sys_plugin AS sp t_sys_plugin AS sp
LEFT JOIN t_file AS tf ON sp.plugin_icon = tf.id LEFT JOIN t_file AS tf ON sp.plugin_icon = tf.id
LEFT JOIN t_sys_plugin_type AS pt ON pt.plugin_code = sp.plugin_class AND pt.rec_status = 0
LEFT JOIN t_pro_plugin_preview_file AS pppf ON sp.id = pppf.plugin_id AND pppf.rec_status = 0 LEFT JOIN t_pro_plugin_preview_file AS pppf ON sp.id = pppf.plugin_id AND pppf.rec_status = 0
WHERE WHERE
sp.id NOT IN ( sp.id NOT IN (

Loading…
Cancel
Save