Browse Source

新增审批审核接口

ghost 4 years ago
parent
commit
c99a11d0bd

+ 12 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/controller/PmsProductController.java

@@ -112,6 +112,18 @@ public class PmsProductController {
         }
     }
 
+    @ApiOperation("修改审核状态")
+    @PutMapping(value = "/update/verify/{id}")
+    @ResponseBody
+    public CommonResult verify(@PathVariable("id") Long id) {
+        int count = productService.verify(id);
+        if (count > 0) {
+            return CommonResult.success(count);
+        } else {
+            return CommonResult.failed();
+        }
+    }
+
     @ApiOperation("批量上下架")
     @RequestMapping(value = "/update/publishStatus", method = RequestMethod.POST)
     @ResponseBody

+ 2 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/PmsProductService.java

@@ -90,4 +90,6 @@ public interface PmsProductService {
     List<SelectVo> bigDataType();
 
     List<SelectVo> plOfProSelect(Long compId);
+
+    int verify(Long id);
 }

+ 11 - 0
forest-admin/admin-server/src/main/java/com/hwrj/cloud/admin/service/impl/PmsProductServiceImpl.java

@@ -390,4 +390,15 @@ public class PmsProductServiceImpl implements PmsProductService {
         return productExcelDao.plOfProSelect(compId);
     }
 
+    @Override
+    public int verify(Long id) {
+        PmsProduct product = new PmsProduct();
+        product.setVerifyStatus(1);
+        PmsProductExample example = new PmsProductExample();
+        example.createCriteria().andIdEqualTo(id);
+        List<PmsProductVertifyRecord> list = new ArrayList<>();
+        int count = productMapper.updateByExampleSelective(product, example);
+        return count;
+    }
+
 }