瀏覽代碼

feat 版本、菜品配料基础接口框架

classic_blue 1 月之前
父節點
當前提交
dab7ad941c
共有 14 個文件被更改,包括 432 次插入385 次删除
  1. 59 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/IngredientDto.java
  2. 77 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/VersionDto.java
  3. 16 21
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/IngredientService.java
  4. 1 5
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/PurchaseOrderItemService.java
  5. 1 4
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/PurchaseOrderService.java
  6. 12 17
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/VersionService.java
  7. 49 75
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/IngredientServiceImpl.java
  8. 18 70
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/VersionServiceImpl.java
  9. 59 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/vo/IngredientVo.java
  10. 77 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/vo/VersionVo.java
  11. 26 87
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendIngredientController.java
  12. 3 2
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendPurchaseOrderController.java
  13. 3 14
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendPurchaseOrderItemController.java
  14. 31 90
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendVersionController.java

+ 59 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/IngredientDto.java

@@ -0,0 +1,59 @@
+package com.fuint.common.dto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 菜品配料表实体
+ *
+ * @Created by pzg
+ * CopyRight https://www.fuint.cn
+ */
+@Getter
+@Setter
+@TableName("mt_ingredient")
+@ApiModel(value = "ingredient表对象", description = "ingredient表对象")
+public class IngredientDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+    @ApiModelProperty("创建用户id")
+    private String createUserId;
+
+    @ApiModelProperty("是否删除 0否 1是")
+    private Integer deleteFlag;
+
+    @ApiModelProperty("用量")
+    private Integer dosage;
+
+    @ApiModelProperty("菜品id")
+    private String goodsId;
+
+    @ApiModelProperty("id")
+    @TableId(value = "ID", type = IdType.AUTO)
+    private Long id;
+
+    @ApiModelProperty("材料id")
+    private Integer materialId;
+
+    @ApiModelProperty("项目标识")
+    private String project;
+
+    @ApiModelProperty("更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty("修改用户id")
+    private String updateUserId;
+
+}

+ 77 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/VersionDto.java

@@ -0,0 +1,77 @@
+package com.fuint.common.dto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 版本控制表实体
+ *
+ * @Created by pzg
+ * CopyRight https://www.fuint.cn
+ */
+@Getter
+@Setter
+@TableName("mt_version")
+@ApiModel(value = "version表对象", description = "version表对象")
+public class VersionDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+    @ApiModelProperty("创建用户id")
+    private String createUserId;
+
+    @ApiModelProperty("是否删除 0否 1是")
+    private Integer deleteFlag;
+
+    @ApiModelProperty("版本描述")
+    private String description;
+
+    @ApiModelProperty("下载地址")
+    private String downloadUrl;
+
+    @ApiModelProperty("生效日期")
+    private Date effectiveDate;
+
+    @ApiModelProperty("版本id")
+    @TableId(value = "ID", type = IdType.AUTO)
+    private Long id;
+
+    @ApiModelProperty("是否强制更新 0否 1是")
+    private Integer isMandatory;
+
+    @ApiModelProperty("版本名称")
+    private String name;
+
+    @ApiModelProperty("支持的平台列表")
+    private String platforms;
+
+    @ApiModelProperty("项目标识")
+    private String project;
+
+    @ApiModelProperty("发布日期")
+    private Date releaseDate;
+
+    @ApiModelProperty("0不更新1更新")
+    private Integer status;
+
+    @ApiModelProperty("版本类型")
+    private String type;
+
+    @ApiModelProperty("更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty("修改用户id")
+    private String updateUserId;
+
+}

+ 16 - 21
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/IngredientService.java

@@ -1,8 +1,11 @@
 package com.fuint.common.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.fuint.common.dto.IngredientDto;
+import com.fuint.common.vo.IngredientVo;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
+import com.fuint.framework.web.PageResult;
 import com.fuint.repository.model.MtIngredient;
 import com.fuint.framework.exception.BusinessCheckException;
 import java.util.List;
@@ -19,19 +22,19 @@ public interface IngredientService extends IService<MtIngredient> {
     /**
      * 分页查询列表
      *
-     * @param paginationRequest
+     * @param ingredientDto
      * @return
      */
-    PaginationResponse<MtIngredient> queryIngredientListByPagination(PaginationRequest paginationRequest) throws BusinessCheckException;
+    PageResult<IngredientDto> queryIngredientPageList(IngredientDto ingredientDto);
 
     /**
      * 添加菜品配料表
      *
-     * @param  mtIngredient
+     * @param  ingredientDto
      * @throws BusinessCheckException
      * @return
      */
-    MtIngredient addIngredient(MtIngredient mtIngredient) throws BusinessCheckException;
+    IngredientVo addIngredient(IngredientDto ingredientDto) throws BusinessCheckException;
 
     /**
      * 根据ID获取菜品配料表信息
@@ -40,32 +43,24 @@ public interface IngredientService extends IService<MtIngredient> {
      * @throws BusinessCheckException
      * @return
      */
-    MtIngredient queryIngredientById(Long id) throws BusinessCheckException;
-
-    /**
-     * 根据ID删除菜品配料表
-     *
-     * @param id ID
-     * @param operator 操作人
-     * @throws BusinessCheckException
-     * @return
-     */
-    void deleteIngredient(Long id, String operator) throws BusinessCheckException;
+    IngredientVo queryIngredientById(Long id) throws BusinessCheckException;
 
     /**
      * 更新菜品配料表
-     * @param  mtIngredient
+     * @param  ingredientDto
      * @throws BusinessCheckException
      * @return
      * */
-    MtIngredient updateIngredient(MtIngredient mtIngredient) throws BusinessCheckException;
+    IngredientVo updateIngredient(IngredientDto ingredientDto) throws BusinessCheckException;
 
     /**
-     * 根据条件搜索菜品配料表
+     * 根据ID删除菜品配料表
      *
-     * @param params 查询参数
+     * @param id ID
      * @throws BusinessCheckException
      * @return
-     * */
-    List<MtIngredient> queryIngredientListByParams(Map<String, Object> params) throws BusinessCheckException;
+     */
+    void deleteIngredientById(Long id);
+
+
 }

+ 1 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/PurchaseOrderItemService.java

@@ -3,13 +3,9 @@ package com.fuint.common.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.fuint.common.dto.MtPurchaseOrderItemDto;
 import com.fuint.common.vo.MtPurchaseOrderItemVo;
-import com.fuint.framework.pagination.PaginationRequest;
-import com.fuint.framework.pagination.PaginationResponse;
+import com.fuint.common.vo.MtPurchaseOrderItemVo;
 import com.fuint.framework.web.PageResult;
 import com.fuint.repository.model.MtPurchaseOrderItem;
-import com.fuint.framework.exception.BusinessCheckException;
-import java.util.List;
-import java.util.Map;
 
 /**
  * 材料采购订单项表业务接口

+ 1 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/PurchaseOrderService.java

@@ -3,13 +3,10 @@ package com.fuint.common.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.fuint.common.dto.MtPurchaseOrderDto;
 import com.fuint.common.vo.MtPurchaseOrderVo;
-import com.fuint.framework.pagination.PaginationRequest;
-import com.fuint.framework.pagination.PaginationResponse;
+import com.fuint.common.vo.MtPurchaseOrderVo;
 import com.fuint.framework.web.PageResult;
 import com.fuint.repository.model.MtPurchaseOrder;
 import com.fuint.framework.exception.BusinessCheckException;
-import java.util.List;
-import java.util.Map;
 
 /**
  * 采购订单表业务接口

+ 12 - 17
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/VersionService.java

@@ -1,8 +1,11 @@
 package com.fuint.common.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.fuint.common.dto.VersionDto;
+import com.fuint.common.vo.VersionVo;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
+import com.fuint.framework.web.PageResult;
 import com.fuint.repository.model.MtVersion;
 import com.fuint.framework.exception.BusinessCheckException;
 import java.util.List;
@@ -19,19 +22,19 @@ public interface VersionService extends IService<MtVersion> {
     /**
      * 分页查询列表
      *
-     * @param paginationRequest
+     * @param versionDto
      * @return
      */
-    PaginationResponse<MtVersion> queryVersionListByPagination(PaginationRequest paginationRequest) throws BusinessCheckException;
+    PageResult<VersionVo> queryVersionPageList(VersionDto versionDto) throws BusinessCheckException;
 
     /**
      * 添加版本控制表
      *
-     * @param  mtVersion
+     * @param  versionDto
      * @throws BusinessCheckException
      * @return
      */
-    MtVersion addVersion(MtVersion mtVersion) throws BusinessCheckException;
+    VersionVo addVersion(VersionDto versionDto) throws BusinessCheckException;
 
     /**
      * 根据ID获取版本控制表信息
@@ -40,32 +43,24 @@ public interface VersionService extends IService<MtVersion> {
      * @throws BusinessCheckException
      * @return
      */
-    MtVersion queryVersionById(Long id) throws BusinessCheckException;
+    VersionVo queryVersionById(Long id) throws BusinessCheckException;
 
     /**
      * 根据ID删除版本控制表
      *
      * @param id ID
-     * @param operator 操作人
      * @throws BusinessCheckException
      * @return
      */
-    void deleteVersion(Long id, String operator) throws BusinessCheckException;
+    void deleteVersionById(Long id) throws BusinessCheckException;
 
     /**
      * 更新版本控制表
-     * @param  mtVersion
+     * @param  versionDto
      * @throws BusinessCheckException
      * @return
      * */
-    MtVersion updateVersion(MtVersion mtVersion) throws BusinessCheckException;
+    VersionVo updateVersion(VersionDto versionDto) throws BusinessCheckException;
+
 
-    /**
-     * 根据条件搜索版本控制表
-     *
-     * @param params 查询参数
-     * @throws BusinessCheckException
-     * @return
-     * */
-    List<MtVersion> queryVersionListByParams(Map<String, Object> params) throws BusinessCheckException;
 }

+ 49 - 75
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/IngredientServiceImpl.java

@@ -1,12 +1,19 @@
 package com.fuint.common.service.impl;
 
+import cn.hutool.core.lang.Assert;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.dto.IngredientDto;
+import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.vo.IngredientVo;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
+import com.fuint.framework.web.PageResult;
 import com.fuint.repository.model.MtIngredient;
 import com.fuint.common.service.IngredientService;
 import com.fuint.common.enums.StatusEnum;
@@ -37,50 +44,37 @@ public class IngredientServiceImpl extends ServiceImpl<MtIngredientMapper, MtIng
 
     private MtIngredientMapper mtIngredientMapper;
 
+
+
+
     /**
-     * 分页查询数据列表
+     * 根据条件搜索菜品配料分页列表
      *
-     * @param paginationRequest
+     * @param  ingredientDto 查询参数
+     * @throws BusinessCheckException
      * @return
-     */
+     * */
     @Override
-    public PaginationResponse<MtIngredient> queryIngredientListByPagination(PaginationRequest paginationRequest) {
-        Page<MtIngredient> pageHelper = PageHelper.startPage(paginationRequest.getCurrentPage(), paginationRequest.getPageSize());
-        LambdaQueryWrapper<MtIngredient> lambdaQueryWrapper = Wrappers.lambdaQuery();
-
-        lambdaQueryWrapper.orderByAsc(MtIngredient::getId);
-        List<MtIngredient> dataList = mtIngredientMapper.selectList(lambdaQueryWrapper);
-
-        PageRequest pageRequest = PageRequest.of(paginationRequest.getCurrentPage(), paginationRequest.getPageSize());
-        PageImpl pageImpl = new PageImpl(dataList, pageRequest, pageHelper.getTotal());
-        PaginationResponse<MtIngredient> paginationResponse = new PaginationResponse(pageImpl, MtIngredient.class);
-        paginationResponse.setTotalPages(pageHelper.getPages());
-        paginationResponse.setTotalElements(pageHelper.getTotal());
-        paginationResponse.setContent(dataList);
-
-        return paginationResponse;
+    public PageResult<IngredientDto> queryIngredientPageList(IngredientDto ingredientDto) {
+        AccountInfo accountInfo = AuthUserUtil.get();
+        Assert.isTrue(ObjectUtils.isNotEmpty(accountInfo), "请登录");
+        Assert.isTrue(accountInfo.getStoreId()!=0, "暂无该餐厅权限");
     }
 
+
     /**
      * 添加菜品配料表
      *
-     * @param mtIngredient 菜品配料表信息
+     * @param ingredientDto 菜品配料表信息
      * @return
      */
+
     @Override
-    @OperationServiceLog(description = "新增菜品配料表")
-    public MtIngredient addIngredient(MtIngredient mtIngredient) throws BusinessCheckException {
-
-        mtIngredient.setUpdateTime(new Date());
-        mtIngredient.setCreateTime(new Date());
-        Integer id = mtIngredientMapper.insert(mtIngredient);
-        if (id > 0) {
-            return mtIngredient;
-        } else {
-            throw new BusinessCheckException("新增菜品配料表数据失败");
-        }
+    public IngredientVo addIngredient(IngredientDto ingredientDto) throws BusinessCheckException {
+        return null;
     }
 
+
     /**
      * 根据ID获菜品配料表取息
      *
@@ -88,67 +82,47 @@ public class IngredientServiceImpl extends ServiceImpl<MtIngredientMapper, MtIng
      * @return
      */
     @Override
-    public MtIngredient queryIngredientById(Long id) {
-        return mtIngredientMapper.selectById(id);
+    public IngredientVo queryIngredientById(Long id) throws BusinessCheckException {
+        return null;
     }
 
+
     /**
-     * 根据ID删除菜品配料表
+     * 修改菜品配料表数据
      *
-     * @param id 菜品配料表ID
-     * @param operator 操作人
+     * @param ingredientDto
+     * @throws BusinessCheckException
      * @return
      */
     @Override
-    @Transactional(rollbackFor = Exception.class)
-    @OperationServiceLog(description = "删除菜品配料表")
-    public void deleteIngredient(Long id, String operator) {
-        MtIngredient mtIngredient = queryIngredientById(id);
-        if (null == mtIngredient) {
-            return;
-        }
-
-        mtIngredient.setUpdateTime(new Date());
-        mtIngredientMapper.updateById(mtIngredient);
+    public IngredientVo updateIngredient(IngredientDto ingredientDto) throws BusinessCheckException {
+        return null;
     }
 
+
+
     /**
-     * 修改菜品配料表数据
+     * 根据ID删除菜品配料表
      *
-     * @param mtIngredient
-     * @throws BusinessCheckException
+     * @param id 菜品配料表ID
      * @return
      */
     @Override
-    @Transactional(rollbackFor = Exception.class)
-    @OperationServiceLog(description = "更新菜品配料表")
-    public MtIngredient updateIngredient(MtIngredient mtIngredient) throws BusinessCheckException {
-        mtIngredient = queryIngredientById(mtIngredient.getId());
-        if (mtIngredient == null) {
-            throw new BusinessCheckException("该菜品配料表状态异常");
-        }
-        mtIngredient.setUpdateTime(new Date());
-        mtIngredientMapper.updateById(mtIngredient);
-        return mtIngredient;
+    public void deleteIngredientById(Long id) {
+
     }
 
-   /**
-    * 根据条件搜索菜品配料表
-    *
-    * @param  params 查询参数
-    * @throws BusinessCheckException
-    * @return
-    * */
-    @Override
-    public List<MtIngredient> queryIngredientListByParams(Map<String, Object> params) {
-        String status =  params.get("status") == null ? StatusEnum.ENABLED.getKey(): params.get("status").toString();
-        String storeId =  params.get("storeId") == null ? "" : params.get("storeId").toString();
-        String merchantId =  params.get("merchantId") == null ? "" : params.get("merchantId").toString();
 
-        LambdaQueryWrapper<MtIngredient> lambdaQueryWrapper = Wrappers.lambdaQuery();
 
-        lambdaQueryWrapper.orderByAsc(MtIngredient::getId);
-        List<MtIngredient> dataList = mtIngredientMapper.selectList(lambdaQueryWrapper);
-        return dataList;
-    }
+
+
+
+
+
+
+
+
+
+
+
 }

+ 18 - 70
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/VersionServiceImpl.java

@@ -3,10 +3,13 @@ package com.fuint.common.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fuint.common.dto.VersionDto;
+import com.fuint.common.vo.VersionVo;
 import com.fuint.framework.annoation.OperationServiceLog;
 import com.fuint.framework.exception.BusinessCheckException;
 import com.fuint.framework.pagination.PaginationRequest;
 import com.fuint.framework.pagination.PaginationResponse;
+import com.fuint.framework.web.PageResult;
 import com.fuint.repository.model.MtVersion;
 import com.fuint.common.service.VersionService;
 import com.fuint.common.enums.StatusEnum;
@@ -40,46 +43,24 @@ public class VersionServiceImpl extends ServiceImpl<MtVersionMapper, MtVersion>
     /**
      * 分页查询数据列表
      *
-     * @param paginationRequest
+     * @param versionDto
      * @return
      */
     @Override
-    public PaginationResponse<MtVersion> queryVersionListByPagination(PaginationRequest paginationRequest) {
-        Page<MtVersion> pageHelper = PageHelper.startPage(paginationRequest.getCurrentPage(), paginationRequest.getPageSize());
-        LambdaQueryWrapper<MtVersion> lambdaQueryWrapper = Wrappers.lambdaQuery();
-        lambdaQueryWrapper.ne(MtVersion::getStatus, StatusEnum.DISABLE.getKey());
-
-        lambdaQueryWrapper.orderByAsc(MtVersion::getId);
-        List<MtVersion> dataList = mtVersionMapper.selectList(lambdaQueryWrapper);
-
-        PageRequest pageRequest = PageRequest.of(paginationRequest.getCurrentPage(), paginationRequest.getPageSize());
-        PageImpl pageImpl = new PageImpl(dataList, pageRequest, pageHelper.getTotal());
-        PaginationResponse<MtVersion> paginationResponse = new PaginationResponse(pageImpl, MtVersion.class);
-        paginationResponse.setTotalPages(pageHelper.getPages());
-        paginationResponse.setTotalElements(pageHelper.getTotal());
-        paginationResponse.setContent(dataList);
-
-        return paginationResponse;
+    public PageResult<VersionVo> queryVersionPageList(VersionDto versionDto) throws BusinessCheckException {
+        return null;
     }
 
     /**
      * 添加版本控制表
      *
-     * @param mtVersion 版本控制表信息
+     * @param versionDto 版本控制表信息
      * @return
      */
-    @Override
     @OperationServiceLog(description = "新增版本控制表")
-    public MtVersion addVersion(MtVersion mtVersion) throws BusinessCheckException {
-
-        mtVersion.setUpdateTime(new Date());
-        mtVersion.setCreateTime(new Date());
-        Integer id = mtVersionMapper.insert(mtVersion);
-        if (id > 0) {
-            return mtVersion;
-        } else {
-            throw new BusinessCheckException("新增版本控制表数据失败");
-        }
+    @Override
+    public VersionVo addVersion(VersionDto versionDto) throws BusinessCheckException {
+        return null;
     }
 
     /**
@@ -89,71 +70,38 @@ public class VersionServiceImpl extends ServiceImpl<MtVersionMapper, MtVersion>
      * @return
      */
     @Override
-    public MtVersion queryVersionById(Long id) {
-        return mtVersionMapper.selectById(id);
+    public VersionVo queryVersionById(Long id) throws BusinessCheckException {
+        return null;
     }
 
+
     /**
      * 根据ID删除版本控制表
      *
      * @param id 版本控制表ID
-     * @param operator 操作人
      * @return
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
     @OperationServiceLog(description = "删除版本控制表")
-    public void deleteVersion(Long id, String operator) {
-        MtVersion mtVersion = queryVersionById(id);
-        if (null == mtVersion) {
-            return;
-        }
+    public void deleteVersionById(Long id) throws BusinessCheckException {
 
-        mtVersion.setUpdateTime(new Date());
-        mtVersionMapper.updateById(mtVersion);
     }
 
+
     /**
      * 修改版本控制表数据
      *
-     * @param mtVersion
+     * @param versionDto
      * @throws BusinessCheckException
      * @return
      */
     @Override
     @Transactional(rollbackFor = Exception.class)
     @OperationServiceLog(description = "更新版本控制表")
-    public MtVersion updateVersion(MtVersion mtVersion) throws BusinessCheckException {
-        mtVersion = queryVersionById(mtVersion.getId());
-        if (mtVersion == null) {
-            throw new BusinessCheckException("该版本控制表状态异常");
-        }
-        mtVersion.setUpdateTime(new Date());
-        mtVersionMapper.updateById(mtVersion);
-        return mtVersion;
+    public VersionVo updateVersion(VersionDto versionDto) throws BusinessCheckException {
+        return null;
     }
 
-   /**
-    * 根据条件搜索版本控制表
-    *
-    * @param  params 查询参数
-    * @throws BusinessCheckException
-    * @return
-    * */
-    @Override
-    public List<MtVersion> queryVersionListByParams(Map<String, Object> params) {
-        String status =  params.get("status") == null ? StatusEnum.ENABLED.getKey(): params.get("status").toString();
-        String storeId =  params.get("storeId") == null ? "" : params.get("storeId").toString();
-        String merchantId =  params.get("merchantId") == null ? "" : params.get("merchantId").toString();
-
-        LambdaQueryWrapper<MtVersion> lambdaQueryWrapper = Wrappers.lambdaQuery();
-        if (StringUtils.isNotBlank(status)) {
-            lambdaQueryWrapper.eq(MtVersion::getStatus, status);
-        }
-
 
-        lambdaQueryWrapper.orderByAsc(MtVersion::getId);
-        List<MtVersion> dataList = mtVersionMapper.selectList(lambdaQueryWrapper);
-        return dataList;
-    }
 }

+ 59 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/vo/IngredientVo.java

@@ -0,0 +1,59 @@
+package com.fuint.common.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 菜品配料表实体
+ *
+ * @Created by pzg
+ * CopyRight https://www.fuint.cn
+ */
+@Getter
+@Setter
+@TableName("mt_ingredient")
+@ApiModel(value = "ingredient表对象", description = "ingredient表对象")
+public class IngredientVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+    @ApiModelProperty("创建用户id")
+    private String createUserId;
+
+    @ApiModelProperty("是否删除 0否 1是")
+    private Integer deleteFlag;
+
+    @ApiModelProperty("用量")
+    private Integer dosage;
+
+    @ApiModelProperty("菜品id")
+    private String goodsId;
+
+    @ApiModelProperty("id")
+    @TableId(value = "ID", type = IdType.AUTO)
+    private Long id;
+
+    @ApiModelProperty("材料id")
+    private Integer materialId;
+
+    @ApiModelProperty("项目标识")
+    private String project;
+
+    @ApiModelProperty("更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty("修改用户id")
+    private String updateUserId;
+
+}

+ 77 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/vo/VersionVo.java

@@ -0,0 +1,77 @@
+package com.fuint.common.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 版本控制表实体
+ *
+ * @Created by pzg
+ * CopyRight https://www.fuint.cn
+ */
+@Getter
+@Setter
+@TableName("mt_version")
+@ApiModel(value = "version表对象", description = "version表对象")
+public class VersionVo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+
+    @ApiModelProperty("创建用户id")
+    private String createUserId;
+
+    @ApiModelProperty("是否删除 0否 1是")
+    private Integer deleteFlag;
+
+    @ApiModelProperty("版本描述")
+    private String description;
+
+    @ApiModelProperty("下载地址")
+    private String downloadUrl;
+
+    @ApiModelProperty("生效日期")
+    private Date effectiveDate;
+
+    @ApiModelProperty("版本id")
+    @TableId(value = "ID", type = IdType.AUTO)
+    private Long id;
+
+    @ApiModelProperty("是否强制更新 0否 1是")
+    private Integer isMandatory;
+
+    @ApiModelProperty("版本名称")
+    private String name;
+
+    @ApiModelProperty("支持的平台列表")
+    private String platforms;
+
+    @ApiModelProperty("项目标识")
+    private String project;
+
+    @ApiModelProperty("发布日期")
+    private Date releaseDate;
+
+    @ApiModelProperty("0不更新1更新")
+    private Integer status;
+
+    @ApiModelProperty("版本类型")
+    private String type;
+
+    @ApiModelProperty("更新时间")
+    private Date updateTime;
+
+    @ApiModelProperty("修改用户id")
+    private String updateUserId;
+
+}

+ 26 - 87
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendIngredientController.java

@@ -1,8 +1,11 @@
 package com.fuint.module.backendApi.controller;
 
 import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.dto.IngredientDto;
 import com.fuint.common.util.TokenUtil;
+import com.fuint.common.vo.IngredientVo;
 import com.fuint.framework.web.BaseController;
+import com.fuint.framework.web.PageResult;
 import com.fuint.framework.web.ResponseObject;
 import com.fuint.common.Constants;
 import com.fuint.common.enums.StatusEnum;
@@ -48,56 +51,9 @@ public class BackendIngredientController extends BaseController {
     @RequestMapping(value = "/list", method = RequestMethod.GET)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('ingredient:list')")
-    public ResponseObject list(HttpServletRequest request) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        Integer page = request.getParameter("page") == null ? Constants.PAGE_NUMBER : Integer.parseInt(request.getParameter("page"));
-        Integer pageSize = request.getParameter("pageSize") == null ? Constants.PAGE_SIZE : Integer.parseInt(request.getParameter("pageSize"));
-        String title = request.getParameter("title");
-        String status = request.getParameter("status");
-        String searchStoreId = request.getParameter("storeId");
-
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        Long storeId;
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        } else {
-            storeId = accountInfo.getStoreId();
-        }
-
-        PaginationRequest paginationRequest = new PaginationRequest();
-        paginationRequest.setCurrentPage(page);
-        paginationRequest.setPageSize(pageSize);
-
-        Map<String, Object> params = new HashMap<>();
-        if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
-            params.put("merchantId", accountInfo.getMerchantId());
-        }
-        if (StringUtil.isNotEmpty(title)) {
-            params.put("title", title);
-        }
-        if (StringUtil.isNotEmpty(status)) {
-            params.put("status", status);
-        }
-        if (StringUtil.isNotEmpty(searchStoreId)) {
-            params.put("storeId", searchStoreId);
-        }
-        if (storeId != null && storeId > 0) {
-            params.put("storeId", storeId);
-        }
-        paginationRequest.setSearchParams(params);
-        PaginationResponse<MtIngredient> paginationResponse = ingredientService.queryIngredientListByPagination(paginationRequest);
-
-        Map<String, Object> paramsStore = new HashMap<>();
-        paramsStore.put("status", StatusEnum.ENABLED.getKey());
-        if (accountInfo.getStoreId() != null && accountInfo.getStoreId() > 0) {
-            paramsStore.put("storeId", accountInfo.getStoreId().toString());
-        }
-        if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
-            paramsStore.put("merchantId", accountInfo.getMerchantId());
-        }
-
-        Map<String, Object> result = new HashMap<>();
-        result.put("paginationResponse", paginationResponse);
+    public ResponseObject list(HttpServletRequest request, IngredientDto ingredientDto) throws BusinessCheckException {
+
+        PageResult<IngredientDto> result = ingredientService.queryIngredientPageList(ingredientDto);
 
         return getSuccessResult(result);
     }
@@ -108,27 +64,28 @@ public class BackendIngredientController extends BaseController {
      * @return
      */
     @ApiOperation(value = "更新菜品配料表状态")
-    @RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
+    @RequestMapping(value = "/updateIngredient", method = RequestMethod.POST)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('ingredient:edit')")
-    public ResponseObject updateStatus(HttpServletRequest request, @RequestBody Map<String, Object> params) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        String status = params.get("status") != null ? params.get("status").toString() : StatusEnum.ENABLED.getKey();
-        Long id = params.get("id") == null ? 0 : Long.parseLong(params.get("id").toString());
+    public ResponseObject updateStatus(HttpServletRequest request, @RequestBody IngredientDto ingredientDto) throws BusinessCheckException {
 
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        }
+        ingredientService.updateIngredient(ingredientDto);
 
-        MtIngredient mtIngredient = ingredientService.queryIngredientById(id);
-        if (mtIngredient == null) {
-            return getFailureResult(201);
-        }
+        return getSuccessResult(true);
+    }
 
-        String operator = accountInfo.getAccountName();
+    /**
+     * 更删除菜品配料表
+     *
+     * @return
+     */
+    @ApiOperation(value = "删除菜品配料表状态")
+    @RequestMapping(value = "/deleteIngredientById/{id}", method = RequestMethod.POST)
+    @CrossOrigin
+    @PreAuthorize("@pms.hasPermission('ingredient:edit')")
+    public ResponseObject deleteIngredientById(HttpServletRequest request, @PathVariable("id") Long id) throws BusinessCheckException {
 
-        ingredientService.updateIngredient(mtIngredient);
+        ingredientService.deleteIngredientById(id);
 
         return getSuccessResult(true);
     }
@@ -143,19 +100,9 @@ public class BackendIngredientController extends BaseController {
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('ingredient:add')")
-    public ResponseObject saveHandler(HttpServletRequest request, @RequestBody Map<String, Object> params) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        String id = params.get("id") == null ? "" : params.get("id").toString();
-        String status = params.get("status") == null ? "" : params.get("status").toString();
-        String storeId = params.get("storeId") == null ? "0" : params.get("storeId").toString();
-
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        }
-
-        MtIngredient info = new MtIngredient();
+    public ResponseObject saveHandler(HttpServletRequest request, @RequestBody IngredientDto ingredientDto) throws BusinessCheckException {
 
+        ingredientService.addIngredient(ingredientDto);
 
         return getSuccessResult(true);
     }
@@ -170,17 +117,9 @@ public class BackendIngredientController extends BaseController {
     @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('ingredient:list')")
-    public ResponseObject info(HttpServletRequest request, @PathVariable("id") Integer id) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        }
-
-        MtIngredient ingredientInfo = ingredientService.queryIngredientById(Long.valueOf(id));
+    public ResponseObject info(HttpServletRequest request, @PathVariable("id") Long id) throws BusinessCheckException {
 
-        Map<String, Object> result = new HashMap<>();
-        result.put("ingredientInfo", ingredientInfo);
+        IngredientVo result = ingredientService.queryIngredientById(Long.valueOf(id));
 
         return getSuccessResult(result);
     }

+ 3 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendPurchaseOrderController.java

@@ -2,6 +2,7 @@ package com.fuint.module.backendApi.controller;
 
 import com.fuint.common.dto.MtPurchaseOrderDto;
 import com.fuint.common.vo.MtPurchaseOrderVo;
+import com.fuint.common.vo.PurchaseOrderVo;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.PageResult;
 import com.fuint.framework.web.ResponseObject;
@@ -41,7 +42,7 @@ public class BackendPurchaseOrderController extends BaseController {
     @RequestMapping(value = "/list", method = RequestMethod.GET)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('purchase_order:list')")
-    public ResponseObject list(HttpServletRequest request, @RequestBody MtPurchaseOrderDto mtPurchaseOrderDto) throws BusinessCheckException {
+    public ResponseObject list(HttpServletRequest request, @RequestParam MtPurchaseOrderDto mtPurchaseOrderDto) throws BusinessCheckException {
 
         PageResult<MtPurchaseOrderVo> pageVoList = purchaseOrderService.queryOrderPageList(mtPurchaseOrderDto);
 
@@ -86,7 +87,7 @@ public class BackendPurchaseOrderController extends BaseController {
     @ApiOperation(value = "获取采购订单表详情")
     @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
     @CrossOrigin
-    @PreAuthorize("@pms.hasPermission('purchase_order:detail')")
+    @PreAuthorize("@pms.hasPermission('purchase_order:list')")
     public ResponseObject info(HttpServletRequest request, @PathVariable("id") Long id) throws BusinessCheckException {
 
         MtPurchaseOrderVo vo = purchaseOrderService.queryPurchaseOrderById(id);

+ 3 - 14
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendPurchaseOrderItemController.java

@@ -1,29 +1,18 @@
 package com.fuint.module.backendApi.controller;
 
-import com.fuint.common.dto.AccountInfo;
 import com.fuint.common.dto.MtPurchaseOrderItemDto;
-import com.fuint.common.util.TokenUtil;
 import com.fuint.common.vo.MtPurchaseOrderItemVo;
 import com.fuint.framework.web.BaseController;
 import com.fuint.framework.web.PageResult;
 import com.fuint.framework.web.ResponseObject;
-import com.fuint.common.Constants;
-import com.fuint.common.enums.StatusEnum;
 import com.fuint.common.service.PurchaseOrderItemService;
-import com.fuint.framework.pagination.PaginationRequest;
-import com.fuint.framework.pagination.PaginationResponse;
 import com.fuint.framework.exception.BusinessCheckException;
-import com.fuint.repository.model.MtPurchaseOrderItem;
-import com.fuint.utils.StringUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
 
 /**
  * 材料采购订单项表管理类controller
@@ -52,7 +41,7 @@ public class BackendPurchaseOrderItemController extends BaseController {
     @RequestMapping(value = "/list", method = RequestMethod.GET)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('purchase_order_item:list')")
-    public ResponseObject list(HttpServletRequest request, @RequestBody MtPurchaseOrderItemDto mtPurchaseOrderItemDto) throws BusinessCheckException {
+    public ResponseObject list(HttpServletRequest request, @RequestParam MtPurchaseOrderItemDto mtPurchaseOrderItemDto) throws BusinessCheckException {
 
         PageResult<MtPurchaseOrderItemVo> result = purchaseOrderItemService.queryPurchaseOrderItemListByParam(mtPurchaseOrderItemDto);
 
@@ -102,9 +91,9 @@ public class BackendPurchaseOrderItemController extends BaseController {
     @PreAuthorize("@pms.hasPermission('purchase_order_item:add')")
     public ResponseObject addOrderItem(HttpServletRequest request, @RequestBody MtPurchaseOrderItemDto mtPurchaseOrderItemDto) throws BusinessCheckException {
 
-        MtPurchaseOrderItemVo mtPurchaseOrderItemVo = purchaseOrderItemService.addOrderItem(mtPurchaseOrderItemDto);
+        MtPurchaseOrderItemVo purchaseOrderItemVo = purchaseOrderItemService.addOrderItem(mtPurchaseOrderItemDto);
 
-        return getSuccessResult(mtPurchaseOrderItemVo);
+        return getSuccessResult(purchaseOrderItemVo);
     }
 
 

+ 31 - 90
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendVersionController.java

@@ -1,8 +1,12 @@
 package com.fuint.module.backendApi.controller;
 
 import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.dto.VersionDto;
+import com.fuint.common.dto.VersionDto;
 import com.fuint.common.util.TokenUtil;
+import com.fuint.common.vo.VersionVo;
 import com.fuint.framework.web.BaseController;
+import com.fuint.framework.web.PageResult;
 import com.fuint.framework.web.ResponseObject;
 import com.fuint.common.Constants;
 import com.fuint.common.enums.StatusEnum;
@@ -48,60 +52,12 @@ public class BackendVersionController extends BaseController {
     @RequestMapping(value = "/list", method = RequestMethod.GET)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('version:list')")
-    public ResponseObject list(HttpServletRequest request) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        Integer page = request.getParameter("page") == null ? Constants.PAGE_NUMBER : Integer.parseInt(request.getParameter("page"));
-        Integer pageSize = request.getParameter("pageSize") == null ? Constants.PAGE_SIZE : Integer.parseInt(request.getParameter("pageSize"));
-        String title = request.getParameter("title");
-        String status = request.getParameter("status");
-        String searchStoreId = request.getParameter("storeId");
-
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        Long storeId;
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        } else {
-            storeId = accountInfo.getStoreId();
-        }
-
-        PaginationRequest paginationRequest = new PaginationRequest();
-        paginationRequest.setCurrentPage(page);
-        paginationRequest.setPageSize(pageSize);
-
-        Map<String, Object> params = new HashMap<>();
-        if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
-            params.put("merchantId", accountInfo.getMerchantId());
-        }
-        if (StringUtil.isNotEmpty(title)) {
-            params.put("title", title);
-        }
-        if (StringUtil.isNotEmpty(status)) {
-            params.put("status", status);
-        }
-        if (StringUtil.isNotEmpty(searchStoreId)) {
-            params.put("storeId", searchStoreId);
-        }
-        if (storeId != null && storeId > 0) {
-            params.put("storeId", storeId);
-        }
-        paginationRequest.setSearchParams(params);
-        PaginationResponse<MtVersion> paginationResponse = versionService.queryVersionListByPagination(paginationRequest);
-
-        Map<String, Object> paramsStore = new HashMap<>();
-        paramsStore.put("status", StatusEnum.ENABLED.getKey());
-        if (accountInfo.getStoreId() != null && accountInfo.getStoreId() > 0) {
-            paramsStore.put("storeId", accountInfo.getStoreId().toString());
-        }
-        if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
-            paramsStore.put("merchantId", accountInfo.getMerchantId());
-        }
-
-        Map<String, Object> result = new HashMap<>();
-        result.put("paginationResponse", paginationResponse);
+    public ResponseObject list(HttpServletRequest request, VersionDto versionDto) throws BusinessCheckException {
+
+        PageResult<VersionVo> result = versionService.queryVersionPageList(versionDto);
 
         return getSuccessResult(result);
     }
-
     /**
      * 更新版本控制表状态
      *
@@ -111,24 +67,9 @@ public class BackendVersionController extends BaseController {
     @RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('version:edit')")
-    public ResponseObject updateStatus(HttpServletRequest request, @RequestBody Map<String, Object> params) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        String status = params.get("status") != null ? params.get("status").toString() : StatusEnum.ENABLED.getKey();
-        Long id = params.get("id") == null ? 0 : Long.parseLong(params.get("id").toString());
-
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        }
-
-        MtVersion mtVersion = versionService.queryVersionById(id);
-        if (mtVersion == null) {
-            return getFailureResult(201);
-        }
-
-        String operator = accountInfo.getAccountName();
+    public ResponseObject updateStatus(HttpServletRequest request, @RequestBody VersionDto versionDto) throws BusinessCheckException {
 
-        versionService.updateVersion(mtVersion);
+        versionService.updateVersion(versionDto);
 
         return getSuccessResult(true);
     }
@@ -143,18 +84,10 @@ public class BackendVersionController extends BaseController {
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('version:add')")
-    public ResponseObject saveHandler(HttpServletRequest request, @RequestBody Map<String, Object> params) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        String id = params.get("id") == null ? "" : params.get("id").toString();
-        String status = params.get("status") == null ? "" : params.get("status").toString();
-        String storeId = params.get("storeId") == null ? "0" : params.get("storeId").toString();
-
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        }
-
-        MtVersion info = new MtVersion();
+    public ResponseObject saveHandler(HttpServletRequest request, @RequestBody VersionDto versionDto) throws BusinessCheckException {
+
+        versionService.addVersion(versionDto);
+
         return getSuccessResult(true);
     }
 
@@ -168,18 +101,26 @@ public class BackendVersionController extends BaseController {
     @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('version:list')")
-    public ResponseObject info(HttpServletRequest request, @PathVariable("id") Integer id) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        }
+    public ResponseObject info(HttpServletRequest request, @PathVariable("id") Long id) throws BusinessCheckException {
 
-        MtVersion versionInfo = versionService.queryVersionById(Long.valueOf(id));
-
-        Map<String, Object> result = new HashMap<>();
-        result.put("versionInfo", versionInfo);
+        VersionVo result = versionService.queryVersionById(id);
 
         return getSuccessResult(result);
     }
+    /**
+     *"删除版本控制表
+     *
+     * @param request HttpServletRequest对象
+     * @return
+     */
+    @ApiOperation(value = "删除版本控制表")
+    @RequestMapping(value = "/delete", method = RequestMethod.POST)
+    @CrossOrigin
+    @PreAuthorize("@pms.hasPermission('version:update')")
+    public ResponseObject deleteVersionById(HttpServletRequest request, @PathVariable("id") Long id) throws BusinessCheckException {
+
+        versionService.deleteVersionById(id);
+
+        return getSuccessResult(true);
+    }
 }