优化代码
This commit is contained in:
parent
88d1974e2b
commit
c7b1f50f11
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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<DemoCustomer> selectDemoCustomerList(DemoCustomer demoCustomer);
|
||||
List<DemoCustomer> 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<DemoGoods> demoGoodsList);
|
||||
int batchDemoGoods(List<DemoGoods> demoGoodsList);
|
||||
|
||||
|
||||
/**
|
||||
@ -83,5 +83,5 @@ public interface DemoCustomerMapper
|
||||
* @param customerId 客户主表(mb)ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDemoGoodsByCustomerId(Long customerId);
|
||||
int deleteDemoGoodsByCustomerId(Long customerId);
|
||||
}
|
||||
|
@ -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<DemoProduct> selectDemoProductList(DemoProduct demoProduct);
|
||||
List<DemoProduct> 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);
|
||||
}
|
||||
|
@ -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<DemoStudent> selectDemoStudentList(DemoStudent demoStudent);
|
||||
List<DemoStudent> 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);
|
||||
}
|
||||
|
@ -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<DemoCustomer> selectDemoCustomerList(DemoCustomer demoCustomer);
|
||||
List<DemoCustomer> 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);
|
||||
}
|
||||
|
@ -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<DemoProduct> selectDemoProductList(DemoProduct demoProduct);
|
||||
List<DemoProduct> 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);
|
||||
}
|
||||
|
@ -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<DemoStudent> selectDemoStudentList(DemoStudent demoStudent);
|
||||
List<DemoStudent> 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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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});
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -12,7 +12,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
* ${subTable.functionName}对象 ${subTableName}
|
||||
*
|
||||
* @author ${author}
|
||||
* @date ${datetime}
|
||||
* ${datetime}
|
||||
*/
|
||||
public class ${subClassName} extends BaseEntity
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user