From da30df12fc02f28a4b016c8c35a3b57e5c29fe35 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期二, 22 八月 2023 13:56:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 standard-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ProductServiceImpl.java |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 55 insertions(+), 1 deletions(-)

diff --git a/standard-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ProductServiceImpl.java b/standard-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ProductServiceImpl.java
index 8079756..49064d0 100644
--- a/standard-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ProductServiceImpl.java
+++ b/standard-server/src/main/java/com/yuanchu/limslaboratory/service/impl/ProductServiceImpl.java
@@ -1,14 +1,32 @@
 package com.yuanchu.limslaboratory.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.yuanchu.limslaboratory.mapper.ProductModelMapper;
+import com.yuanchu.limslaboratory.mapper.SpecificationsMapper;
 import com.yuanchu.limslaboratory.pojo.Product;
 import com.yuanchu.limslaboratory.mapper.ProductMapper;
+import com.yuanchu.limslaboratory.pojo.ProductModel;
 import com.yuanchu.limslaboratory.service.ProductService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yuanchu.limslaboratory.utils.MyUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import com.yuanchu.limslaboratory.service.UserService;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.ObjectUtils;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
 
 /**
  * <p>
- *  鏈嶅姟瀹炵幇绫�
+ * 鏈嶅姟瀹炵幇绫�
  * </p>
  *
  * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
@@ -17,4 +35,40 @@
 @Service
 public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements ProductService {
 
+    @Resource
+    private ProductMapper productMapper;
+
+    @Resource
+    ProductModelMapper productModelMapper;
+
+
+    @Override
+    public void deleteProductInformation(List<Integer> SpecificationsId) {
+        for (Integer materialId : SpecificationsId) {
+            LambdaUpdateWrapper<Product> wrapper = new LambdaUpdateWrapper<>();
+            wrapper.eq(Product::getSpecifications_id, materialId);
+            wrapper.set(Product::getState, 0);
+            productMapper.update(new Product(), wrapper);
+        }
+    }
+
+    //灞曠ず璇ュ瀷鍙蜂笅鐨勬楠岄」鐩姹�
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public List<Map<String, Object>> pageProductInformation(Integer specificationsId) {
+        return productMapper.pageProductInformation(specificationsId);
+    }
+
+    //濉啓鏍囧噯鍊间笌鍐呮帶鍊�,榧犳爣绉诲紑淇濆瓨
+    @Override
+    public Integer write(Integer id, String required, String internal) {
+        Product product = new Product();
+        product.setId(id);
+        product.setRequired(required);
+        product.setInternal(internal);
+        productMapper.updateById(product);
+        return 1;
+    }
+
+
 }

--
Gitblit v1.9.3