Compare commits

..

No commits in common. "3ebcf6e07e6afc0d8ef16a60c72d72b3b36e2f22" and "ab5cc0378616ac956409a63ffad19cc85679350e" have entirely different histories.

11 changed files with 23 additions and 112 deletions

View File

@ -2,8 +2,11 @@
* 后端采用Spring Boot、Spring Security、Redis & Jwt。 * 后端采用Spring Boot、Spring Security、Redis & Jwt。
* 权限认证使用Jwt支持多终端认证系统。 * 权限认证使用Jwt支持多终端认证系统。
* 支持加载动态权限菜单,多方式轻松权限控制。 * 支持加载动态权限菜单,多方式轻松权限控制。
* 高效率开发,使用代码生成器可以一键生成前后端代码。
* 提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev))版本[McWl-Vue3](https://gitcode.com/yangzongzhuan/McWl-Vue3),保持同步更新。
* 提供了单应用版本[McWl-Vue-fast](https://gitcode.com/yangzongzhuan/McWl-Vue-fast)Oracle版本[McWl-Vue-Oracle](https://gitcode.com/yangzongzhuan/McWl-Vue-Oracle),保持同步更新。
* 不分离版本,请移步[McWl](https://gitee.com/y_project/McWl),微服务版本,请移步[McWl-Cloud](https://gitee.com/y_project/McWl-Cloud)
* 阿里云折扣场:[点我进入](http://aly.mcwl.vip),腾讯云秒杀场:[点我进入](http://txy.mcwl.vip)  
## 内置功能 ## 内置功能
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。 1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。

View File

@ -1,4 +1,4 @@
package com.mcwl.system.init; package com.mcwl.web.controller.init;
import com.mcwl.common.core.domain.entity.SysDictData; import com.mcwl.common.core.domain.entity.SysDictData;
import com.mcwl.system.mapper.SysDictDataMapper; import com.mcwl.system.mapper.SysDictDataMapper;

View File

@ -134,16 +134,7 @@ public class MallProductController extends BaseController {
modelService.removeById(modelVersion.getId()); modelService.removeById(modelVersion.getId());
return AjaxResult.success(); return AjaxResult.success();
} }
/**
*
* @param id
* @return
*/
@GetMapping("/selectModelById")
public AjaxResult selectModelById(@RequestParam Long id){
return modelService.selectModelById(id);
}
/** /**
* - * -

View File

@ -10,14 +10,12 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Builder;
/** /**
* Entity * Entity
* *
* @author mcwl * @author mcwl
*/ */
public class BaseEntity implements Serializable public class BaseEntity implements Serializable
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -40,7 +40,7 @@
<dependency> <dependency>
<groupId>com.mcwl</groupId> <groupId>com.mcwl</groupId>
<artifactId>mcwl-system</artifactId> <artifactId>mcwl-admin</artifactId>
<version>3.8.8</version> <version>3.8.8</version>
</dependency> </dependency>

View File

@ -1,18 +1,11 @@
package com.mcwl.resource.domain; package com.mcwl.resource.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mcwl.common.core.domain.BaseEntity; import com.mcwl.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
/** /**
* *
@ -26,7 +19,6 @@ import java.util.List;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@Data @Data
@Builder
@TableName("model") @TableName("model")
public class ModelProduct extends BaseEntity { public class ModelProduct extends BaseEntity {
@ -35,6 +27,10 @@ public class ModelProduct extends BaseEntity {
*/ */
@TableId @TableId
private Long id; private Long id;
/**
* ID
*/
private Long versionId;
/** /**
* *
*/ */
@ -109,11 +105,4 @@ public class ModelProduct extends BaseEntity {
private String delFlag; private String delFlag;
/**
*
*/
@TableField(exist = false)
private List<String> styleList;
} }

View File

@ -2,7 +2,6 @@ package com.mcwl.resource.domain;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.mcwl.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@ -20,17 +19,13 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor @NoArgsConstructor
@Data @Data
@TableName("model_version") @TableName("model_version")
public class ModelVersion extends BaseEntity { public class ModelVersion {
/** /**
* ID * ID
*/ */
@TableId @TableId
private Long id; private Long id;
/**
*
*/
private Long modelId;
/** /**
* *
*/ */

View File

@ -34,6 +34,4 @@ public interface ModelService extends IService<ModelProduct> {
void updaModel(RequestModel requestModel); void updaModel(RequestModel requestModel);
AjaxResult selectModelById(Long id);
} }

View File

@ -27,6 +27,4 @@ public interface WorkFlowService extends IService<WorkFlow> {
AjaxResult selectWorkFlowById(Long id); AjaxResult selectWorkFlowById(Long id);
TableDataInfo listByPage(ModelImagePageRes imagePageRes); TableDataInfo listByPage(ModelImagePageRes imagePageRes);
} }

View File

@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mcwl.common.constant.DictConstants;
import com.mcwl.common.constant.HttpStatus; import com.mcwl.common.constant.HttpStatus;
import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.common.core.domain.AjaxResult;
import com.mcwl.common.core.domain.entity.SysUser; import com.mcwl.common.core.domain.entity.SysUser;
@ -19,19 +18,18 @@ import com.mcwl.resource.domain.ModelVersion;
import com.mcwl.resource.domain.dto.ModelImagePageRes; import com.mcwl.resource.domain.dto.ModelImagePageRes;
import com.mcwl.resource.domain.request.RequestModel; import com.mcwl.resource.domain.request.RequestModel;
import com.mcwl.resource.domain.vo.MallProductVo; 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.domain.vo.ModelVo;
import com.mcwl.resource.mapper.ModelMapper; import com.mcwl.resource.mapper.ModelMapper;
import com.mcwl.resource.mapper.ModelVersionMapper; import com.mcwl.resource.mapper.ModelVersionMapper;
import com.mcwl.resource.service.ModelService; 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 com.mcwl.system.service.ISysUserService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@ -50,8 +48,6 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
@Autowired @Autowired
private RedisCache redisCache; private RedisCache redisCache;
@Autowired
private ToActivityService toActivityService;
@Autowired @Autowired
private ModelVersionMapper modelVersionMapper; private ModelVersionMapper modelVersionMapper;
@Autowired @Autowired
@ -149,14 +145,6 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
@Override @Override
public AjaxResult addModel(RequestModel requestModel) { public AjaxResult addModel(RequestModel requestModel) {
//获取封面图
String filePath = requestModel.getModelVersionList().get(0).getFilePath();
String[] split = filePath.split(",");
ModelProduct modelProduct = requestModel.getModelProduct();
modelProduct.setSurfaceUrl(split[0]);
modelProduct.setCreateTime(new Date());
//添加模型表数据 //添加模型表数据
postMapper.insert(requestModel.getModelProduct()); postMapper.insert(requestModel.getModelProduct());
@ -188,52 +176,8 @@ public class ModelServiceImpl extends ServiceImpl<ModelMapper,ModelProduct> impl
modelVersion.setAuditSatus(3); modelVersion.setAuditSatus(3);
modelVersionMapper.updateById(modelVersion); modelVersionMapper.updateById(modelVersion);
} }
ModelProduct model = ModelProduct.builder().
id(requestModel.getModelVersionList().get(0).
getModelId()).build();
model.setUpdateTime(new Date());
postMapper.updateById(model);
} }
} }
@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);
}
} }

View File

@ -2,7 +2,6 @@ package com.mcwl.resource.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.core.metadata.OrderItem; import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -13,18 +12,20 @@ import com.mcwl.common.core.domain.AjaxResult;
import com.mcwl.common.core.domain.entity.SysUser; import com.mcwl.common.core.domain.entity.SysUser;
import com.mcwl.common.core.page.TableDataInfo; import com.mcwl.common.core.page.TableDataInfo;
import com.mcwl.common.utils.StringUtils; import com.mcwl.common.utils.StringUtils;
import com.mcwl.resource.domain.ModelProduct;
import com.mcwl.resource.domain.WorkFlow; import com.mcwl.resource.domain.WorkFlow;
import com.mcwl.resource.domain.WorkFlowVersion; import com.mcwl.resource.domain.WorkFlowVersion;
import com.mcwl.resource.domain.dto.ModelImagePageRes; import com.mcwl.resource.domain.dto.ModelImagePageRes;
import com.mcwl.resource.domain.request.RequestWorkFlow; 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.PageVo;
import com.mcwl.resource.domain.vo.WorkFlowVo; import com.mcwl.resource.domain.vo.WorkFlowVo;
import com.mcwl.resource.mapper.WorkFlowMapper; import com.mcwl.resource.mapper.WorkFlowMapper;
import com.mcwl.resource.mapper.WorkFlowVersionMapper; import com.mcwl.resource.mapper.WorkFlowVersionMapper;
import com.mcwl.resource.service.ToActivityService; import com.mcwl.resource.service.ToActivityService;
import com.mcwl.resource.service.WorkFlowService; import com.mcwl.resource.service.WorkFlowService;
import com.mcwl.system.init.DictInit;
import com.mcwl.system.service.ISysUserService; import com.mcwl.system.service.ISysUserService;
import com.mcwl.web.controller.init.DictInit;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -65,9 +66,8 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
String[] split = filePath.split(","); String[] split = filePath.split(",");
WorkFlow workFlow = requestWorkFlow.getWorkFlow(); requestWorkFlow.getWorkFlow().setCoverPath(split[0]);
workFlow .setCoverPath(split[0]); requestWorkFlow.getWorkFlow().setCreateTime(new Date());
workFlow.setCreateTime(new Date());
//添加模型表数据 //添加模型表数据
flowMapper.insert(requestWorkFlow.getWorkFlow()); flowMapper.insert(requestWorkFlow.getWorkFlow());
@ -81,14 +81,11 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
@Override @Override
public void updateWorkFlow(RequestWorkFlow requestWorkFlow) { public void updateWorkFlow(RequestWorkFlow requestWorkFlow) {
WorkFlow workFlows = requestWorkFlow.getWorkFlow();
//修改工作流的信息 //修改工作流的信息
if (ObjectUtils.isEmpty(workFlows)){ if (requestWorkFlow.getWorkFlow().getId() != null){
} requestWorkFlow.getWorkFlow().setAuditStatus(3);
if (StringUtils.isNotNull(workFlows.getId() )){
workFlows.setAuditStatus(3);
// flowMapper.updateWorkFlow(requestWorkFlow.getWorkFlow()); // flowMapper.updateWorkFlow(requestWorkFlow.getWorkFlow());
flowMapper.updateById(requestWorkFlow.getWorkFlow()); flowMapper.updateById(requestWorkFlow.getWorkFlow());
} }
@ -104,7 +101,7 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
} }
WorkFlow workFlow = WorkFlow.builder().id(requestWorkFlow.getWorkFlowVersionList().get(0).getWorkFlowId()) WorkFlow workFlow = WorkFlow.builder().id(requestWorkFlow.getWorkFlowVersionList().get(0).getWorkFlowId())
.updateTime(new Date()).build(); .createTime(new Date()).build();
//更新时间 //更新时间
flowMapper.updateById(workFlow); flowMapper.updateById(workFlow);
@ -234,6 +231,4 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
return rspData; return rspData;
} }
} }