From 2dbc49184bd74845c8da694c20d6fd03d7ac87e0 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 21 九月 2023 16:16:21 +0800
Subject: [PATCH] 修改 9.21
---
standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java | 39 +--------------------------------------
1 files changed, 1 insertions(+), 38 deletions(-)
diff --git a/standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java b/standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java
index 7c484bb..77dfdb1 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/service/impl/ProductServiceImpl.java
@@ -1,8 +1,6 @@
package com.yuanchu.mom.service.impl;
-import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.yuanchu.mom.mapper.TechniqueMapper;
import com.yuanchu.mom.mapper.TechnologyMapper;
import com.yuanchu.mom.pojo.Product;
import com.yuanchu.mom.pojo.dto.ProductDto;
@@ -11,7 +9,6 @@
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
-
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@@ -29,9 +26,6 @@
@Resource
TechnologyMapper technologyMapper;
-
- @Resource
- TechniqueMapper techniqueMapper;
//鏍规嵁鍨嬪彿id鏌ヨ椤圭洰(鎶�鏈寚鏍�)
@Override
@@ -67,20 +61,6 @@
@Override
public String addProduct(ProductDto productDto) {
Product product = new Product();
- String required = productDto.getRequired();
- String internal = productDto.getInternal();
- if (ObjectUtils.isNotEmpty(required)) {
- char requ = required.charAt(0);
- if (requ != '>' && requ != '<' && requ != '=') {
- return "鏍囧噯鍊艰緭鍏ユ牸寮忔湁闂!";
- }
- }
- if (ObjectUtils.isNotEmpty(internal)) {
- char inter = internal.charAt(0);
- if (inter != '>' && inter != '<' && inter != '=') {
- return "鍐呮帶鍊艰緭鍏ユ牸寮忔湁闂!";
- }
- }
BeanUtils.copyProperties(productDto, product);
productMapper.insert(product);
return "鏂板鎴愬姛!";
@@ -89,19 +69,6 @@
//濉啓鏍囧噯鍊间笌鍐呮帶鍊�,榧犳爣绉诲紑淇濆瓨
@Override
public String write(Integer id, String required, String internal) {
- //鏍¢獙鏍囧噯鍊�,鍐呮帶鍊兼牸寮�
- if (ObjectUtils.isNotEmpty(internal)) {
- char inter = internal.charAt(0);
- if (inter != '>' && inter != '<' && inter != '=') {
- return "鍐呮帶鍊艰緭鍏ユ牸寮忔湁闂!";
- }
- }
- if (ObjectUtils.isNotEmpty(required)) {
- char requ = required.charAt(0);
- if (requ != '>' && requ != '<' && requ != '=') {
- return "鏍囧噯鍊艰緭鍏ユ牸寮忔湁闂!";
- }
- }
Product product = new Product();
product.setId(id);
product.setRequired(required);
@@ -119,8 +86,6 @@
product.setId(id);
product.setState(0);
productMapper.updateById(product);
- //鍒犻櫎鐢熶骇宸ヨ壓
- techniqueMapper.delByProId(id);
}
//鎵归噺鍒犻櫎
@@ -129,11 +94,9 @@
public void delAllPro(String ids) {
//鎵归噺鍒犻櫎鎶�鏈寚鏍�
productMapper.delAllPro(ids);
- //鍒犻櫎鐢熶骇宸ヨ壓
- techniqueMapper.delAll(ids);
}
- //鏌ヨ鏍囧噯BOM鎶�鏈寚鏍囦腑璇ュ瀷鍙峰伐鑹轰笅鏈�鏂扮増鏈殑妫�楠岄」鐩�
+ //鏍规嵁宸ヨ壓璺嚎id鏌ヨ鎶�鏈寚鏍�
@Override
public List<Product> selProByVerSpe(Integer technologyId) {
return productMapper.selProByVerSpe(technologyId);
--
Gitblit v1.9.3