From c7b1f50f111123e1ddf0b45473ac426c46b341eb Mon Sep 17 00:00:00 2001 From: dataprince Date: Tue, 11 Jul 2023 17:26:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DemoCustomerController.java | 5 +++-- .../demo/controller/DemoProductController.java | 7 ++++--- .../demo/controller/DemoStudentController.java | 7 ++++--- .../com/ruoyi/demo/domain/DemoCustomer.java | 2 +- .../java/com/ruoyi/demo/domain/DemoGoods.java | 2 +- .../com/ruoyi/demo/domain/DemoProduct.java | 2 +- .../com/ruoyi/demo/domain/DemoStudent.java | 2 +- .../ruoyi/demo/mapper/DemoCustomerMapper.java | 18 +++++++++--------- .../ruoyi/demo/mapper/DemoProductMapper.java | 12 ++++++------ .../ruoyi/demo/mapper/DemoStudentMapper.java | 12 ++++++------ .../demo/service/IDemoCustomerService.java | 12 ++++++------ .../demo/service/IDemoProductService.java | 12 ++++++------ .../demo/service/IDemoStudentService.java | 12 ++++++------ .../service/impl/DemoCustomerServiceImpl.java | 6 +++--- .../service/impl/DemoProductServiceImpl.java | 6 +++--- .../service/impl/DemoStudentServiceImpl.java | 6 +++--- .../main/resources/vm/java/controller.java.vm | 5 +++-- .../src/main/resources/vm/java/domain.java.vm | 2 +- .../src/main/resources/vm/java/mapper.java.vm | 18 +++++++++--------- .../src/main/resources/vm/java/service.java.vm | 12 ++++++------ .../main/resources/vm/java/serviceImpl.java.vm | 6 +++--- .../main/resources/vm/java/sub-domain.java.vm | 2 +- 22 files changed, 86 insertions(+), 82 deletions(-) diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/DemoCustomerController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/DemoCustomerController.java index 02af4d6..f42166f 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/DemoCustomerController.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/DemoCustomerController.java @@ -3,7 +3,7 @@ package com.ruoyi.demo.controller; import java.util.List; import jakarta.servlet.http.HttpServletResponse; import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; +import jakarta.annotation.Resource; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -19,6 +19,7 @@ import com.ruoyi.common.enums.BusinessType; import com.ruoyi.demo.domain.DemoCustomer; import com.ruoyi.demo.service.IDemoCustomerService; import com.ruoyi.common.utils.poi.ExcelUtil; + import com.ruoyi.common.core.page.TableDataInfo; /** @@ -31,7 +32,7 @@ import com.ruoyi.common.core.page.TableDataInfo; @RequestMapping("/demo/customer") public class DemoCustomerController extends BaseController { - @Autowired + @Resource private IDemoCustomerService demoCustomerService; /** diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/DemoProductController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/DemoProductController.java index c40a969..aeecb6e 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/DemoProductController.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/DemoProductController.java @@ -3,7 +3,7 @@ package com.ruoyi.demo.controller; import java.util.List; import jakarta.servlet.http.HttpServletResponse; import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; +import jakarta.annotation.Resource; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -20,17 +20,18 @@ import com.ruoyi.demo.domain.DemoProduct; import com.ruoyi.demo.service.IDemoProductService; import com.ruoyi.common.utils.poi.ExcelUtil; + /** * 产品树表(mb)Controller * * @author 数据小王子 - * @date 2023-07-09 + * @date 2023-07-11 */ @RestController @RequestMapping("/demo/product") public class DemoProductController extends BaseController { - @Autowired + @Resource private IDemoProductService demoProductService; /** diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/DemoStudentController.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/DemoStudentController.java index add443b..e1324c8 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/DemoStudentController.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/controller/DemoStudentController.java @@ -3,7 +3,7 @@ package com.ruoyi.demo.controller; import java.util.List; import jakarta.servlet.http.HttpServletResponse; import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; +import jakarta.annotation.Resource; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -19,19 +19,20 @@ import com.ruoyi.common.enums.BusinessType; import com.ruoyi.demo.domain.DemoStudent; import com.ruoyi.demo.service.IDemoStudentService; import com.ruoyi.common.utils.poi.ExcelUtil; + import com.ruoyi.common.core.page.TableDataInfo; /** * 学生信息单表(mb)Controller * * @author 数据小王子 - * @date 2023-07-09 + * @date 2023-07-11 */ @RestController @RequestMapping("/demo/student") public class DemoStudentController extends BaseController { - @Autowired + @Resource private IDemoStudentService demoStudentService; /** diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoCustomer.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoCustomer.java index 1087eeb..fba44ee 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoCustomer.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoCustomer.java @@ -12,7 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity; * 客户主表(mb)对象 demo_customer * * @author 数据小王子 - * @date 2023-07-11 + * 2023-07-11 */ public class DemoCustomer extends BaseEntity { diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoGoods.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoGoods.java index edbc0ad..0f910a3 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoGoods.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoGoods.java @@ -12,7 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity; * 商品子对象 demo_goods * * @author 数据小王子 - * @date 2023-07-11 + * 2023-07-11 */ public class DemoGoods extends BaseEntity { diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoProduct.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoProduct.java index babe1b4..02eefc7 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoProduct.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoProduct.java @@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.TreeEntity; * 产品树表(mb)对象 demo_product * * @author 数据小王子 - * @date 2023-07-09 + * 2023-07-11 */ public class DemoProduct extends TreeEntity { diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoStudent.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoStudent.java index 2a678f6..d21bfb3 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoStudent.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/domain/DemoStudent.java @@ -11,7 +11,7 @@ import com.ruoyi.common.core.domain.BaseEntity; * 学生信息单表(mb)对象 demo_student * * @author 数据小王子 - * @date 2023-07-09 + * 2023-07-11 */ public class DemoStudent extends BaseEntity { diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/mapper/DemoCustomerMapper.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/mapper/DemoCustomerMapper.java index a23e583..21a7890 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/mapper/DemoCustomerMapper.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/mapper/DemoCustomerMapper.java @@ -8,7 +8,7 @@ import com.ruoyi.demo.domain.DemoGoods; * 客户主表(mb)Mapper接口 * * @author 数据小王子 - * @date 2023-07-11 + * 2023-07-11 */ public interface DemoCustomerMapper { @@ -26,7 +26,7 @@ public interface DemoCustomerMapper * @param demoCustomer 客户主表(mb) * @return 客户主表(mb)集合 */ - public List selectDemoCustomerList(DemoCustomer demoCustomer); + List selectDemoCustomerList(DemoCustomer demoCustomer); /** * 新增客户主表(mb) @@ -34,7 +34,7 @@ public interface DemoCustomerMapper * @param demoCustomer 客户主表(mb) * @return 结果 */ - public int insertDemoCustomer(DemoCustomer demoCustomer); + int insertDemoCustomer(DemoCustomer demoCustomer); /** * 修改客户主表(mb) @@ -42,7 +42,7 @@ public interface DemoCustomerMapper * @param demoCustomer 客户主表(mb) * @return 结果 */ - public int updateDemoCustomer(DemoCustomer demoCustomer); + int updateDemoCustomer(DemoCustomer demoCustomer); /** * 删除客户主表(mb) @@ -50,7 +50,7 @@ public interface DemoCustomerMapper * @param customerId 客户主表(mb)主键 * @return 结果 */ - public int deleteDemoCustomerByCustomerId(Long customerId); + int deleteDemoCustomerByCustomerId(Long customerId); /** * 批量删除客户主表(mb) @@ -58,7 +58,7 @@ public interface DemoCustomerMapper * @param customerIds 需要删除的数据主键集合 * @return 结果 */ - public int deleteDemoCustomerByCustomerIds(Long[] customerIds); + int deleteDemoCustomerByCustomerIds(Long[] customerIds); /** * 批量删除商品子 @@ -66,7 +66,7 @@ public interface DemoCustomerMapper * @param customerIds 需要删除的数据主键集合 * @return 结果 */ - public int deleteDemoGoodsByCustomerIds(Long[] customerIds); + int deleteDemoGoodsByCustomerIds(Long[] customerIds); /** * 批量新增商品子 @@ -74,7 +74,7 @@ public interface DemoCustomerMapper * @param demoGoodsList 商品子列表 * @return 结果 */ - public int batchDemoGoods(List demoGoodsList); + int batchDemoGoods(List demoGoodsList); /** @@ -83,5 +83,5 @@ public interface DemoCustomerMapper * @param customerId 客户主表(mb)ID * @return 结果 */ - public int deleteDemoGoodsByCustomerId(Long customerId); + int deleteDemoGoodsByCustomerId(Long customerId); } diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/mapper/DemoProductMapper.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/mapper/DemoProductMapper.java index 58f27ec..be23383 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/mapper/DemoProductMapper.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/mapper/DemoProductMapper.java @@ -7,7 +7,7 @@ import com.ruoyi.demo.domain.DemoProduct; * 产品树表(mb)Mapper接口 * * @author 数据小王子 - * @date 2023-07-09 + * 2023-07-11 */ public interface DemoProductMapper { @@ -25,7 +25,7 @@ public interface DemoProductMapper * @param demoProduct 产品树表(mb) * @return 产品树表(mb)集合 */ - public List selectDemoProductList(DemoProduct demoProduct); + List selectDemoProductList(DemoProduct demoProduct); /** * 新增产品树表(mb) @@ -33,7 +33,7 @@ public interface DemoProductMapper * @param demoProduct 产品树表(mb) * @return 结果 */ - public int insertDemoProduct(DemoProduct demoProduct); + int insertDemoProduct(DemoProduct demoProduct); /** * 修改产品树表(mb) @@ -41,7 +41,7 @@ public interface DemoProductMapper * @param demoProduct 产品树表(mb) * @return 结果 */ - public int updateDemoProduct(DemoProduct demoProduct); + int updateDemoProduct(DemoProduct demoProduct); /** * 删除产品树表(mb) @@ -49,7 +49,7 @@ public interface DemoProductMapper * @param productId 产品树表(mb)主键 * @return 结果 */ - public int deleteDemoProductByProductId(Long productId); + int deleteDemoProductByProductId(Long productId); /** * 批量删除产品树表(mb) @@ -57,5 +57,5 @@ public interface DemoProductMapper * @param productIds 需要删除的数据主键集合 * @return 结果 */ - public int deleteDemoProductByProductIds(Long[] productIds); + int deleteDemoProductByProductIds(Long[] productIds); } diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/mapper/DemoStudentMapper.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/mapper/DemoStudentMapper.java index 8fbc28e..bfa965c 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/mapper/DemoStudentMapper.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/mapper/DemoStudentMapper.java @@ -7,7 +7,7 @@ import com.ruoyi.demo.domain.DemoStudent; * 学生信息单表(mb)Mapper接口 * * @author 数据小王子 - * @date 2023-07-09 + * 2023-07-11 */ public interface DemoStudentMapper { @@ -25,7 +25,7 @@ public interface DemoStudentMapper * @param demoStudent 学生信息单表(mb) * @return 学生信息单表(mb)集合 */ - public List selectDemoStudentList(DemoStudent demoStudent); + List selectDemoStudentList(DemoStudent demoStudent); /** * 新增学生信息单表(mb) @@ -33,7 +33,7 @@ public interface DemoStudentMapper * @param demoStudent 学生信息单表(mb) * @return 结果 */ - public int insertDemoStudent(DemoStudent demoStudent); + int insertDemoStudent(DemoStudent demoStudent); /** * 修改学生信息单表(mb) @@ -41,7 +41,7 @@ public interface DemoStudentMapper * @param demoStudent 学生信息单表(mb) * @return 结果 */ - public int updateDemoStudent(DemoStudent demoStudent); + int updateDemoStudent(DemoStudent demoStudent); /** * 删除学生信息单表(mb) @@ -49,7 +49,7 @@ public interface DemoStudentMapper * @param studentId 学生信息单表(mb)主键 * @return 结果 */ - public int deleteDemoStudentByStudentId(Long studentId); + int deleteDemoStudentByStudentId(Long studentId); /** * 批量删除学生信息单表(mb) @@ -57,5 +57,5 @@ public interface DemoStudentMapper * @param studentIds 需要删除的数据主键集合 * @return 结果 */ - public int deleteDemoStudentByStudentIds(Long[] studentIds); + int deleteDemoStudentByStudentIds(Long[] studentIds); } diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/IDemoCustomerService.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/IDemoCustomerService.java index 06d1ee4..9ecbbb7 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/IDemoCustomerService.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/IDemoCustomerService.java @@ -7,7 +7,7 @@ import com.ruoyi.demo.domain.DemoCustomer; * 客户主表(mb)Service接口 * * @author 数据小王子 - * @date 2023-07-11 + * 2023-07-11 */ public interface IDemoCustomerService { @@ -25,7 +25,7 @@ public interface IDemoCustomerService * @param demoCustomer 客户主表(mb) * @return 客户主表(mb)集合 */ - public List selectDemoCustomerList(DemoCustomer demoCustomer); + List selectDemoCustomerList(DemoCustomer demoCustomer); /** * 新增客户主表(mb) @@ -33,7 +33,7 @@ public interface IDemoCustomerService * @param demoCustomer 客户主表(mb) * @return 结果 */ - public int insertDemoCustomer(DemoCustomer demoCustomer); + int insertDemoCustomer(DemoCustomer demoCustomer); /** * 修改客户主表(mb) @@ -41,7 +41,7 @@ public interface IDemoCustomerService * @param demoCustomer 客户主表(mb) * @return 结果 */ - public int updateDemoCustomer(DemoCustomer demoCustomer); + int updateDemoCustomer(DemoCustomer demoCustomer); /** * 批量删除客户主表(mb) @@ -49,7 +49,7 @@ public interface IDemoCustomerService * @param customerIds 需要删除的客户主表(mb)主键集合 * @return 结果 */ - public int deleteDemoCustomerByCustomerIds(Long[] customerIds); + int deleteDemoCustomerByCustomerIds(Long[] customerIds); /** * 删除客户主表(mb)信息 @@ -57,5 +57,5 @@ public interface IDemoCustomerService * @param customerId 客户主表(mb)主键 * @return 结果 */ - public int deleteDemoCustomerByCustomerId(Long customerId); + int deleteDemoCustomerByCustomerId(Long customerId); } diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/IDemoProductService.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/IDemoProductService.java index bc9ee2e..4b768f0 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/IDemoProductService.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/IDemoProductService.java @@ -7,7 +7,7 @@ import com.ruoyi.demo.domain.DemoProduct; * 产品树表(mb)Service接口 * * @author 数据小王子 - * @date 2023-07-09 + * 2023-07-11 */ public interface IDemoProductService { @@ -25,7 +25,7 @@ public interface IDemoProductService * @param demoProduct 产品树表(mb) * @return 产品树表(mb)集合 */ - public List selectDemoProductList(DemoProduct demoProduct); + List selectDemoProductList(DemoProduct demoProduct); /** * 新增产品树表(mb) @@ -33,7 +33,7 @@ public interface IDemoProductService * @param demoProduct 产品树表(mb) * @return 结果 */ - public int insertDemoProduct(DemoProduct demoProduct); + int insertDemoProduct(DemoProduct demoProduct); /** * 修改产品树表(mb) @@ -41,7 +41,7 @@ public interface IDemoProductService * @param demoProduct 产品树表(mb) * @return 结果 */ - public int updateDemoProduct(DemoProduct demoProduct); + int updateDemoProduct(DemoProduct demoProduct); /** * 批量删除产品树表(mb) @@ -49,7 +49,7 @@ public interface IDemoProductService * @param productIds 需要删除的产品树表(mb)主键集合 * @return 结果 */ - public int deleteDemoProductByProductIds(Long[] productIds); + int deleteDemoProductByProductIds(Long[] productIds); /** * 删除产品树表(mb)信息 @@ -57,5 +57,5 @@ public interface IDemoProductService * @param productId 产品树表(mb)主键 * @return 结果 */ - public int deleteDemoProductByProductId(Long productId); + int deleteDemoProductByProductId(Long productId); } diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/IDemoStudentService.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/IDemoStudentService.java index 8da13ff..482b0d3 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/IDemoStudentService.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/IDemoStudentService.java @@ -7,7 +7,7 @@ import com.ruoyi.demo.domain.DemoStudent; * 学生信息单表(mb)Service接口 * * @author 数据小王子 - * @date 2023-07-09 + * 2023-07-11 */ public interface IDemoStudentService { @@ -25,7 +25,7 @@ public interface IDemoStudentService * @param demoStudent 学生信息单表(mb) * @return 学生信息单表(mb)集合 */ - public List selectDemoStudentList(DemoStudent demoStudent); + List selectDemoStudentList(DemoStudent demoStudent); /** * 新增学生信息单表(mb) @@ -33,7 +33,7 @@ public interface IDemoStudentService * @param demoStudent 学生信息单表(mb) * @return 结果 */ - public int insertDemoStudent(DemoStudent demoStudent); + int insertDemoStudent(DemoStudent demoStudent); /** * 修改学生信息单表(mb) @@ -41,7 +41,7 @@ public interface IDemoStudentService * @param demoStudent 学生信息单表(mb) * @return 结果 */ - public int updateDemoStudent(DemoStudent demoStudent); + int updateDemoStudent(DemoStudent demoStudent); /** * 批量删除学生信息单表(mb) @@ -49,7 +49,7 @@ public interface IDemoStudentService * @param studentIds 需要删除的学生信息单表(mb)主键集合 * @return 结果 */ - public int deleteDemoStudentByStudentIds(Long[] studentIds); + int deleteDemoStudentByStudentIds(Long[] studentIds); /** * 删除学生信息单表(mb)信息 @@ -57,5 +57,5 @@ public interface IDemoStudentService * @param studentId 学生信息单表(mb)主键 * @return 结果 */ - public int deleteDemoStudentByStudentId(Long studentId); + int deleteDemoStudentByStudentId(Long studentId); } diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DemoCustomerServiceImpl.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DemoCustomerServiceImpl.java index c6cb7c7..d035017 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DemoCustomerServiceImpl.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DemoCustomerServiceImpl.java @@ -1,7 +1,7 @@ package com.ruoyi.demo.service.impl; import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import java.util.ArrayList; import com.ruoyi.common.utils.StringUtils; @@ -15,12 +15,12 @@ import com.ruoyi.demo.service.IDemoCustomerService; * 客户主表(mb)Service业务层处理 * * @author 数据小王子 - * @date 2023-07-11 + * 2023-07-11 */ @Service public class DemoCustomerServiceImpl implements IDemoCustomerService { - @Autowired + @Resource private DemoCustomerMapper demoCustomerMapper; /** diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DemoProductServiceImpl.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DemoProductServiceImpl.java index 4780bbf..bea662a 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DemoProductServiceImpl.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DemoProductServiceImpl.java @@ -1,7 +1,7 @@ package com.ruoyi.demo.service.impl; import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import com.ruoyi.demo.mapper.DemoProductMapper; import com.ruoyi.demo.domain.DemoProduct; @@ -11,12 +11,12 @@ import com.ruoyi.demo.service.IDemoProductService; * 产品树表(mb)Service业务层处理 * * @author 数据小王子 - * @date 2023-07-09 + * 2023-07-11 */ @Service public class DemoProductServiceImpl implements IDemoProductService { - @Autowired + @Resource private DemoProductMapper demoProductMapper; /** diff --git a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DemoStudentServiceImpl.java b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DemoStudentServiceImpl.java index 28a0924..6fafd52 100644 --- a/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DemoStudentServiceImpl.java +++ b/ruoyi-modules/ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DemoStudentServiceImpl.java @@ -1,7 +1,7 @@ package com.ruoyi.demo.service.impl; import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; import com.ruoyi.demo.mapper.DemoStudentMapper; import com.ruoyi.demo.domain.DemoStudent; @@ -11,12 +11,12 @@ import com.ruoyi.demo.service.IDemoStudentService; * 学生信息单表(mb)Service业务层处理 * * @author 数据小王子 - * @date 2023-07-09 + * 2023-07-11 */ @Service public class DemoStudentServiceImpl implements IDemoStudentService { - @Autowired + @Resource private DemoStudentMapper demoStudentMapper; /** diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/controller.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/controller.java.vm index b8457a3..551f77b 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/controller.java.vm +++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/controller.java.vm @@ -3,7 +3,7 @@ package ${packageName}.controller; import java.util.List; import jakarta.servlet.http.HttpServletResponse; import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; +import jakarta.annotation.Resource; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; @@ -19,6 +19,7 @@ import com.ruoyi.common.enums.BusinessType; import ${packageName}.domain.${ClassName}; import ${packageName}.service.I${ClassName}Service; import com.ruoyi.common.utils.poi.ExcelUtil; + #if($table.crud || $table.sub) import com.ruoyi.common.core.page.TableDataInfo; #elseif($table.tree) @@ -34,7 +35,7 @@ import com.ruoyi.common.core.page.TableDataInfo; @RequestMapping("/${moduleName}/${businessName}") public class ${ClassName}Controller extends BaseController { - @Autowired + @Resource private I${ClassName}Service ${className}Service; /** diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm index bd51c17..ec18923 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm +++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/domain.java.vm @@ -16,7 +16,7 @@ import com.ruoyi.common.core.domain.TreeEntity; * ${functionName}对象 ${tableName} * * @author ${author} - * @date ${datetime} + * ${datetime} */ #if($table.crud || $table.sub) #set($Entity="BaseEntity") diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm index 7e7d7c2..059d7b8 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm +++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm @@ -10,7 +10,7 @@ import ${packageName}.domain.${subClassName}; * ${functionName}Mapper接口 * * @author ${author} - * @date ${datetime} + * ${datetime} */ public interface ${ClassName}Mapper { @@ -28,7 +28,7 @@ public interface ${ClassName}Mapper * @param ${className} ${functionName} * @return ${functionName}集合 */ - public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); + List<${ClassName}> select${ClassName}List(${ClassName} ${className}); /** * 新增${functionName} @@ -36,7 +36,7 @@ public interface ${ClassName}Mapper * @param ${className} ${functionName} * @return 结果 */ - public int insert${ClassName}(${ClassName} ${className}); + int insert${ClassName}(${ClassName} ${className}); /** * 修改${functionName} @@ -44,7 +44,7 @@ public interface ${ClassName}Mapper * @param ${className} ${functionName} * @return 结果 */ - public int update${ClassName}(${ClassName} ${className}); + int update${ClassName}(${ClassName} ${className}); /** * 删除${functionName} @@ -52,7 +52,7 @@ public interface ${ClassName}Mapper * @param ${pkColumn.javaField} ${functionName}主键 * @return 结果 */ - public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); /** * 批量删除${functionName} @@ -60,7 +60,7 @@ public interface ${ClassName}Mapper * @param ${pkColumn.javaField}s 需要删除的数据主键集合 * @return 结果 */ - public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); + int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); #if($table.sub) /** @@ -69,7 +69,7 @@ public interface ${ClassName}Mapper * @param ${pkColumn.javaField}s 需要删除的数据主键集合 * @return 结果 */ - public int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); + int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); /** * 批量新增${subTable.functionName} @@ -77,7 +77,7 @@ public interface ${ClassName}Mapper * @param ${subclassName}List ${subTable.functionName}列表 * @return 结果 */ - public int batch${subClassName}(List<${subClassName}> ${subclassName}List); + int batch${subClassName}(List<${subClassName}> ${subclassName}List); /** @@ -86,6 +86,6 @@ public interface ${ClassName}Mapper * @param ${pkColumn.javaField} ${functionName}ID * @return 结果 */ - public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField}); + int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField}); #end } diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/service.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/service.java.vm index 264882b..212d068 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/service.java.vm +++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/service.java.vm @@ -7,7 +7,7 @@ import ${packageName}.domain.${ClassName}; * ${functionName}Service接口 * * @author ${author} - * @date ${datetime} + * ${datetime} */ public interface I${ClassName}Service { @@ -25,7 +25,7 @@ public interface I${ClassName}Service * @param ${className} ${functionName} * @return ${functionName}集合 */ - public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); + List<${ClassName}> select${ClassName}List(${ClassName} ${className}); /** * 新增${functionName} @@ -33,7 +33,7 @@ public interface I${ClassName}Service * @param ${className} ${functionName} * @return 结果 */ - public int insert${ClassName}(${ClassName} ${className}); + int insert${ClassName}(${ClassName} ${className}); /** * 修改${functionName} @@ -41,7 +41,7 @@ public interface I${ClassName}Service * @param ${className} ${functionName} * @return 结果 */ - public int update${ClassName}(${ClassName} ${className}); + int update${ClassName}(${ClassName} ${className}); /** * 批量删除${functionName} @@ -49,7 +49,7 @@ public interface I${ClassName}Service * @param ${pkColumn.javaField}s 需要删除的${functionName}主键集合 * @return 结果 */ - public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); + int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); /** * 删除${functionName}信息 @@ -57,5 +57,5 @@ public interface I${ClassName}Service * @param ${pkColumn.javaField} ${functionName}主键 * @return 结果 */ - public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); + int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); } diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm index 14746e1..a97e632 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm +++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm @@ -7,7 +7,7 @@ import com.ruoyi.common.utils.DateUtils; #break #end #end -import org.springframework.beans.factory.annotation.Autowired; +import jakarta.annotation.Resource; import org.springframework.stereotype.Service; #if($table.sub) import java.util.ArrayList; @@ -23,12 +23,12 @@ import ${packageName}.service.I${ClassName}Service; * ${functionName}Service业务层处理 * * @author ${author} - * @date ${datetime} + * ${datetime} */ @Service public class ${ClassName}ServiceImpl implements I${ClassName}Service { - @Autowired + @Resource private ${ClassName}Mapper ${className}Mapper; /** diff --git a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm index a3f53eb..7dd064a 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm +++ b/ruoyi-modules/ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm @@ -12,7 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity; * ${subTable.functionName}对象 ${subTableName} * * @author ${author} - * @date ${datetime} + * ${datetime} */ public class ${subClassName} extends BaseEntity {