|
@ -5,11 +5,10 @@ import cn.hutool.core.collection.CollectionUtil; |
|
|
import cn.hutool.core.lang.Snowflake; |
|
|
import cn.hutool.core.lang.Snowflake; |
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
import cn.hutool.core.util.StrUtil; |
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
|
import com.ccsens.ptos_open.bean.dto.BusinessDto; |
|
|
import com.ccsens.ptos_open.bean.dto.PluginDto; |
|
|
import com.ccsens.ptos_open.bean.dto.PluginDto; |
|
|
import com.ccsens.ptos_open.bean.po.OpenPlugin; |
|
|
import com.ccsens.ptos_open.bean.po.*; |
|
|
import com.ccsens.ptos_open.bean.po.OpenPluginImg; |
|
|
import com.ccsens.ptos_open.bean.vo.BusinessVo; |
|
|
import com.ccsens.ptos_open.bean.po.OpenPluginImgExample; |
|
|
|
|
|
import com.ccsens.ptos_open.bean.po.OpenPluginWithBLOBs; |
|
|
|
|
|
import com.ccsens.ptos_open.bean.vo.PluginVo; |
|
|
import com.ccsens.ptos_open.bean.vo.PluginVo; |
|
|
import com.ccsens.ptos_open.persist.dao.PluginDao; |
|
|
import com.ccsens.ptos_open.persist.dao.PluginDao; |
|
|
import com.ccsens.ptos_open.persist.mapper.OpenPluginImgMapper; |
|
|
import com.ccsens.ptos_open.persist.mapper.OpenPluginImgMapper; |
|
@ -169,6 +168,35 @@ public class PluginService implements IPluginService { |
|
|
pluginDao.updateByPrimaryKeySelective(plugin); |
|
|
pluginDao.updateByPrimaryKeySelective(plugin); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public PluginVo.PluginInfo queryIdPlugin(PluginDto.QueryIdPlugin param, Long userId) { |
|
|
|
|
|
|
|
|
|
|
|
//查询插件信息
|
|
|
|
|
|
OpenPluginWithBLOBs openPlugin = pluginDao.selectByPrimaryKey(param.getId()); |
|
|
|
|
|
if(ObjectUtil.isNull(openPlugin)){ |
|
|
|
|
|
throw new BaseException(OpenCodeError.NOT_PLUGIN); |
|
|
|
|
|
} |
|
|
|
|
|
//返回插件信息
|
|
|
|
|
|
PluginVo.PluginInfo pluginInfo = new PluginVo.PluginInfo(); |
|
|
|
|
|
pluginInfo.setId(openPlugin.getId()); |
|
|
|
|
|
pluginInfo.setName(openPlugin.getName()); |
|
|
|
|
|
pluginInfo.setVersions(openPlugin.getVersions()); |
|
|
|
|
|
pluginInfo.setIntro(openPlugin.getIntro()); |
|
|
|
|
|
pluginInfo.setUpdatedTime(openPlugin.getUpdatedAt().getTime()); |
|
|
|
|
|
pluginInfo.setAuthorId(openPlugin.getCreatorId()); |
|
|
|
|
|
//作者id查user表
|
|
|
|
|
|
|
|
|
|
|
|
// pluginInfo.setAuthorName(openPlugin.);
|
|
|
|
|
|
//
|
|
|
|
|
|
// pluginInfo.setPreview(openPlugin.get);
|
|
|
|
|
|
//
|
|
|
|
|
|
// pluginInfo.setMine(openPlugin.get);
|
|
|
|
|
|
pluginInfo.setHtml(openPlugin.getHtml()); |
|
|
|
|
|
pluginInfo.setCss(openPlugin.getCss()); |
|
|
|
|
|
pluginInfo.setJs(openPlugin.getJs()); |
|
|
|
|
|
pluginInfo.setConfig(openPlugin.getConfig()); |
|
|
|
|
|
return pluginInfo; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|