From ff8974cadbce590b1d6127fbce4f333e6eb43843 Mon Sep 17 00:00:00 2001
From: mors <3067699729@qq.com>
Date: Mon, 9 Jan 2023 11:32:52 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=96=E5=8F=B7=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=20=E5=88=97=E8=A1=A8=E9=97=AE=E9=A2=98=E5=8F=8A?=
=?UTF-8?q?=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/process/ZyClothsTypeList.vue | 19 ++++++++++++-------
.../modules/ZyClothsStyleForm.vue | 3 ++-
.../controller/ZyStyleModularController.java | 2 --
.../mapper/ZyStyleModularMapper.java | 2 ++
.../impl/ZyStyleModularServiceImpl.java | 3 +--
.../controller/ZyClothsTypeController.java | 2 +-
.../demo/base/mapper/ZyClothsTypeMapper.java | 4 +++-
.../service/impl/ZyClothsTypeServiceImpl.java | 5 ++++-
.../ZyStyleAccessoriesController.java | 4 ++--
.../impl/ZyStyleAccessoriesServiceImpl.java | 4 ++--
.../controller/ZyClothsStyleController.java | 19 ++++++++++++-------
.../controller/ZyStyleFabricController.java | 2 +-
.../impl/ZyStyleFabricServiceImpl.java | 2 +-
.../mapper/ZyStyleModelMapper.java | 2 ++
.../service/impl/ZyStyleModelServiceImpl.java | 4 ++--
.../controller/ZyStyleModuleController.java | 13 +++++++------
.../mapper/ZyStyleModuleMapper.java | 2 ++
.../impl/ZyStyleModuleServiceImpl.java | 4 ++--
18 files changed, 58 insertions(+), 38 deletions(-)
diff --git a/ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue b/ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue
index d4dc5ee1..33eb1989 100644
--- a/ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue
+++ b/ant-design-vue-jeecg/src/views/process/ZyClothsTypeList.vue
@@ -4,12 +4,12 @@
-
+
-
+
-->
-
+
-
+
+
+
+
-
+
-
+
查询
重置
diff --git a/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue b/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
index 9f0637f6..7b7f469d 100644
--- a/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
+++ b/ant-design-vue-jeecg/src/views/zyclothsstyle/modules/ZyClothsStyleForm.vue
@@ -7,7 +7,8 @@
-
+
+
diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java
index 454504ee..6078289e 100644
--- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java
+++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/controller/ZyStyleModularController.java
@@ -54,8 +54,6 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyStyleModularController extends JeecgController {
@Autowired
private IZyStyleModularService zyStyleModularService;
- @Resource
- private ZyStyleModularMapper zyStyleModularMapper;
/**
* 分页列表查询
*
diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java
index 1467a7ff..0ee72a63 100644
--- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java
+++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/mapper/ZyStyleModularMapper.java
@@ -2,6 +2,7 @@ package org.jeecg.modules.demo.zyStyleModular.mapper;
import java.util.List;
+import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.zyStyleModular.entity.ZyStyleModular;
@@ -13,6 +14,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @Date: 2022-11-14
* @Version: V1.0
*/
+@Mapper
public interface ZyStyleModularMapper extends BaseMapper {
List selectListByStyleId(String styleId);
diff --git a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java
index 6b5359f9..b422a786 100644
--- a/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/zyStyleModular/service/impl/ZyStyleModularServiceImpl.java
@@ -21,8 +21,7 @@ import java.util.List;
@Service
public class ZyStyleModularServiceImpl extends ServiceImpl implements IZyStyleModularService {
-
- @Resource
+ @Autowired
private ZyStyleModularMapper zyStyleModularMapper;
@Override
diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
index 7e3b0594..5140b48f 100644
--- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
+++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
@@ -38,7 +38,7 @@ import java.util.List;
public class ZyClothsTypeController extends JeecgController {
@Autowired
private IZyClothsTypeService zyClothsTypeService;
- @Resource
+ @Autowired
private ZyClothsTypeMapper zyClothsTypeMapper;
/**
diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java
index 81f91c5b..67c240e2 100644
--- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java
+++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/mapper/ZyClothsTypeMapper.java
@@ -2,6 +2,7 @@ package org.jeecg.modules.demo.base.mapper;
import java.util.List;
+import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.demo.base.entity.ZyClothsType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -12,6 +13,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @Date: 2021-11-10
* @Version: V1.0
*/
+@Mapper
public interface ZyClothsTypeMapper extends BaseMapper {
List selectNumsList();
@@ -37,6 +39,6 @@ public interface ZyClothsTypeMapper extends BaseMapper {
String selectNumOne(String id);
/**根据type_id拿到类型名称*/
- @Select("select type_name from zy_cloths_type where type_id = #{id} ")
+ @Select("select type_name from zy_cloths_type where id = #{id} ")
String getNameByTypeId(String id);
}
diff --git a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
index 81c8a4b0..89fa7cec 100644
--- a/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/service/impl/ZyClothsTypeServiceImpl.java
@@ -50,6 +50,7 @@ public class ZyClothsTypeServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ZyClothsStyle::getTypeName, zyClothsStyle.getTypeName());
- List zyClothsStyleList = zyClothsStyleService.list(queryWrapper);
- for (ZyClothsStyle zy : zyClothsStyleList) {
- if (zyClothsStyle.getStyleNames().equals(zy.getStyleNames())) {
- return Result.error("添加失败!数据已存在");
- }
- }
+ int a = zyClothsStyleService.count(queryWrapper);
+ if (a >= 1)
+ return Result.error("存在以添加过的数据!");
+// for (ZyClothsStyle zy : zyClothsStyleList) {
+// if (zyClothsStyle.getStyleNames().equals(zy.getStyleNames())) {
+// return Result.error("添加失败!数据已存在");
+// }
+// }
zyClothsStyleService.save(zyClothsStyle);
return Result.OK("添加成功!");
}
@@ -211,7 +216,7 @@ public class ZyClothsStyleController extends JeecgController edit(@RequestBody ZyClothsStyle zyClothsStyle) {
- if (StringUtils.isEmpty(zyClothsStyle.getEnterpriseId())){
+ if (StringUtils.isEmpty(zyClothsStyle.getEnterpriseId())) {
return Result.error("企业不能为空");
}
zyClothsStyleService.updateById(zyClothsStyle);
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java
index fb4a3d8f..1af3c5b1 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylefabric/controller/ZyStyleFabricController.java
@@ -50,7 +50,7 @@ public class ZyStyleFabricController extends JeecgController {
@Select("SELECT * FROM zy_style_model WHERE style_id = #{id}")
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java
index 110e2773..d6879795 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/service/impl/ZyStyleModelServiceImpl.java
@@ -33,9 +33,9 @@ public class ZyStyleModelServiceImpl extends ServiceImpl queryPageList(ZyStyleModule zyStyleModule2,
- @RequestParam(name = "id" )String id,String modularId,
+ @RequestParam(name = "id", required = false) String id,
+ @RequestParam(name = "modularId", required = false) String modularId,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//System.err.println("ZyStyleModule 款式模块表 传来的 " + id);
QueryWrapper queryWrapper = new QueryWrapper<>();
- queryWrapper.eq(StringUtils.hasText(id),"style_id", id);
- queryWrapper.eq(StringUtils.hasText(modularId),"modular_id", modularId);
+ queryWrapper.eq(StringUtils.hasText(id), "style_id", id);
+ queryWrapper.eq(StringUtils.hasText(modularId), "modular_id", modularId);
Page page = new Page<>(pageNo, pageSize);
IPage pageList = zyStyleModuleService.page(page, queryWrapper);
@@ -149,7 +150,7 @@ public class ZyStyleModuleController extends JeecgController detail(@RequestParam(name = "id", required = true) String id) {
- System.out.println("款式模块表 /detail controller层接受到的id: : "+id);
+ System.out.println("款式模块表 /detail controller层接受到的id: : " + id);
ZyStyleModuleDetailVO detailVO = zyStyleModuleService.queryDetail(id);
return Result.OK(detailVO);
}
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java
index 6a38d675..3f378a26 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/mapper/ZyStyleModuleMapper.java
@@ -2,6 +2,7 @@ package org.jeecg.modules.zystylemodule.mapper;
import java.util.List;
+import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -14,6 +15,7 @@ import org.jeecg.modules.zystylemodule.entity.ZyStyleModule;
* @Date: 2022-09-08
* @Version: V1.0
*/
+@Mapper
public interface ZyStyleModuleMapper extends BaseMapper {
/**根据服装款式的id style_id 查询所有*/
diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/impl/ZyStyleModuleServiceImpl.java b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/impl/ZyStyleModuleServiceImpl.java
index 7d22ff3d..8a77c2a4 100644
--- a/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/impl/ZyStyleModuleServiceImpl.java
+++ b/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodule/service/impl/ZyStyleModuleServiceImpl.java
@@ -38,9 +38,9 @@ public class ZyStyleModuleServiceImpl extends ServiceImpl