feat(resource):
parent
90de149f8f
commit
d49115ec61
|
@ -134,7 +134,16 @@ public class MallProductController extends BaseController {
|
|||
modelService.removeById(modelVersion.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
/**
|
||||
* 查询模型详情
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/selectModelById")
|
||||
public AjaxResult selectModelById(@RequestParam Long id){
|
||||
|
||||
return modelService.selectModelById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的发布-模型
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
<dependency>
|
||||
<groupId>com.mcwl</groupId>
|
||||
<artifactId>mcwl-admin</artifactId>
|
||||
<artifactId>mcwl-system</artifactId>
|
||||
<version>3.8.8</version>
|
||||
</dependency>
|
||||
|
||||
|
|
|
@ -108,14 +108,9 @@ public class ModelProduct extends BaseEntity {
|
|||
*/
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 翻译后主体
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<String> themeList;
|
||||
|
||||
/**
|
||||
* 翻译后风格
|
||||
* 翻译后标签
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<String> styleList;
|
||||
|
|
|
@ -34,4 +34,6 @@ public interface ModelService extends IService<ModelProduct> {
|
|||
|
||||
void updaModel(RequestModel requestModel);
|
||||
|
||||
AjaxResult selectModelById(Long id);
|
||||
|
||||
}
|
||||
|
|
|
@ -27,4 +27,6 @@ public interface WorkFlowService extends IService<WorkFlow> {
|
|||
AjaxResult selectWorkFlowById(Long id);
|
||||
|
||||
TableDataInfo listByPage(ModelImagePageRes imagePageRes);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
|||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mcwl.common.constant.DictConstants;
|
||||
import com.mcwl.common.constant.HttpStatus;
|
||||
import com.mcwl.common.core.domain.AjaxResult;
|
||||
import com.mcwl.common.core.domain.entity.SysUser;
|
||||
|
@ -15,16 +16,15 @@ import com.mcwl.common.utils.SecurityUtils;
|
|||
import com.mcwl.common.utils.StringUtils;
|
||||
import com.mcwl.resource.domain.ModelProduct;
|
||||
import com.mcwl.resource.domain.ModelVersion;
|
||||
import com.mcwl.resource.domain.WorkFlow;
|
||||
import com.mcwl.resource.domain.dto.ModelImagePageRes;
|
||||
import com.mcwl.resource.domain.request.RequestModel;
|
||||
import com.mcwl.resource.domain.vo.MallProductVo;
|
||||
import com.mcwl.resource.domain.vo.ModelImageVo;
|
||||
import com.mcwl.resource.domain.vo.ModelVo;
|
||||
import com.mcwl.resource.mapper.ModelMapper;
|
||||
|
||||
import com.mcwl.resource.mapper.ModelVersionMapper;
|
||||
import com.mcwl.resource.service.ModelService;
|
||||
import com.mcwl.resource.service.ToActivityService;
|
||||
import com.mcwl.system.init.DictInit;
|
||||
import com.mcwl.system.service.ISysUserService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -50,6 +50,8 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
|
|||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private ToActivityService toActivityService;
|
||||
@Autowired
|
||||
private ModelVersionMapper modelVersionMapper;
|
||||
@Autowired
|
||||
|
@ -151,7 +153,7 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
|
|||
String filePath = requestModel.getModelVersionList().get(0).getFilePath();
|
||||
String[] split = filePath.split(",");
|
||||
ModelProduct modelProduct = requestModel.getModelProduct();
|
||||
modelProduct.setCategory(split[0]);
|
||||
modelProduct.setSurfaceUrl(split[0]);
|
||||
modelProduct.setCreateTime(new Date());
|
||||
|
||||
|
||||
|
@ -197,4 +199,41 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult selectModelById(Long id) {
|
||||
//查询详情
|
||||
ModelProduct modelProduct = postMapper.selectById(id);
|
||||
|
||||
//翻译属性 垂类
|
||||
if (StringUtils.isNotEmpty(modelProduct.getCategory())){
|
||||
modelProduct.setCategory(DictInit.getDictValue(DictConstants.MODEL_CHILD_CATEGORY,modelProduct.getCategory()));
|
||||
}
|
||||
|
||||
|
||||
//标签
|
||||
if (StringUtils.isNotEmpty(modelProduct.getTags())){
|
||||
ArrayList<String> strings = new ArrayList<>();
|
||||
String[] split = modelProduct.getTags().split(",");
|
||||
for (String s : split) {
|
||||
if (s != ""){
|
||||
strings.add(s);
|
||||
}
|
||||
}
|
||||
modelProduct.setStyleList(strings);
|
||||
}
|
||||
|
||||
//功能
|
||||
if (StringUtils.isNotEmpty(modelProduct.getFunctions())){
|
||||
modelProduct.setCategory(DictInit.getDictValue(DictConstants.WORK_FLOW_FUNCTIONS,modelProduct.getFunctions()));
|
||||
}
|
||||
|
||||
//活动
|
||||
if (StringUtils.isNotEmpty(modelProduct.getActivityId())){
|
||||
modelProduct.setActivityId(toActivityService.getById(modelProduct.getActivityId()).getActivityName());
|
||||
}
|
||||
|
||||
return AjaxResult.success(modelProduct);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -13,20 +13,18 @@ import com.mcwl.common.core.domain.AjaxResult;
|
|||
import com.mcwl.common.core.domain.entity.SysUser;
|
||||
import com.mcwl.common.core.page.TableDataInfo;
|
||||
import com.mcwl.common.utils.StringUtils;
|
||||
import com.mcwl.resource.domain.ModelProduct;
|
||||
import com.mcwl.resource.domain.WorkFlow;
|
||||
import com.mcwl.resource.domain.WorkFlowVersion;
|
||||
import com.mcwl.resource.domain.dto.ModelImagePageRes;
|
||||
import com.mcwl.resource.domain.request.RequestWorkFlow;
|
||||
import com.mcwl.resource.domain.vo.ModelVo;
|
||||
import com.mcwl.resource.domain.vo.PageVo;
|
||||
import com.mcwl.resource.domain.vo.WorkFlowVo;
|
||||
import com.mcwl.resource.mapper.WorkFlowMapper;
|
||||
import com.mcwl.resource.mapper.WorkFlowVersionMapper;
|
||||
import com.mcwl.resource.service.ToActivityService;
|
||||
import com.mcwl.resource.service.WorkFlowService;
|
||||
import com.mcwl.system.init.DictInit;
|
||||
import com.mcwl.system.service.ISysUserService;
|
||||
import com.mcwl.web.controller.init.DictInit;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -236,4 +234,6 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
|
|||
return rspData;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.mcwl.web.controller.init;
|
||||
package com.mcwl.system.init;
|
||||
|
||||
import com.mcwl.common.core.domain.entity.SysDictData;
|
||||
import com.mcwl.system.mapper.SysDictDataMapper;
|
Loading…
Reference in New Issue