diff --git a/platform-boot-started-productManagement/pom.xml b/platform-boot-started-productManagement/pom.xml
new file mode 100644
index 0000000..a96b691
--- /dev/null
+++ b/platform-boot-started-productManagement/pom.xml
@@ -0,0 +1,75 @@
+
+
+ 4.0.0
+
+ tech.abc
+ abc-development-platform
+ 5.1.0
+
+
+ platform-boot-started-productManagement
+ 5.1.0
+ platform-boot-started-productManagement
+ 产品管理模块
+
+
+
+ tech.abc
+ platform-common
+
+
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.1
+
+
+
+ 1.8
+ UTF-8
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.22.2
+
+
+ true
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*.xml
+
+
+
+
+ src/main/resources
+
+
+ *.yml
+
+ **/*.xlsx
+
+ *.xml
+
+
+
+
+
+
\ No newline at end of file
diff --git a/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/CompanyProductModelController.java b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/CompanyProductModelController.java
new file mode 100644
index 0000000..2b8c5f4
--- /dev/null
+++ b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/CompanyProductModelController.java
@@ -0,0 +1,238 @@
+package tech.abc.platform.productManagement.controller;
+
+
+import org.springframework.web.bind.annotation.RestController;
+import tech.abc.platform.common.base.BaseController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import tech.abc.platform.common.annotation.SystemLog;
+import tech.abc.platform.common.query.QueryGenerator;
+import tech.abc.platform.common.utils.ResultUtil;
+import tech.abc.platform.common.vo.PageInfo;
+import tech.abc.platform.common.vo.Result;
+import tech.abc.platform.common.vo.SortInfo;
+import tech.abc.platform.productManagement.entity.CompanyProductModel;
+import tech.abc.platform.productManagement.service.CompanyProductModelService;
+import tech.abc.platform.productManagement.vo.CompanyProductModelVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import tech.abc.platform.productManagement.vo.CompanyProductModelDetailsVO;
+import tech.abc.platform.productManagement.vo.ProductModelViewVO;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+* 前端控制器类
+*
+* @author ZHB
+* @date 2024-05-17
+*/
+@RestController
+@RequestMapping("/productManagement/companyProductModel")
+@Slf4j
+public class CompanyProductModelController extends BaseController {
+ @Autowired
+ private CompanyProductModelService companyProductModelService;
+
+ /**
+ * 新增
+ */
+ @PostMapping("/addModel")
+ @SystemLog(value = "-新增型号与规格")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModel:add')")
+ public ResponseEntity addModel(@Validated @RequestBody ProductModelViewVO vo) {
+ companyProductModelService.addModel(vo);
+ return ResultUtil.success();
+ }
+ /**
+ * 修改
+ */
+ @PutMapping("/modifyModel")
+ @SystemLog(value = "-修改型号与规格")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModel:modify')")
+ public ResponseEntity modifyModel(@Validated @RequestBody ProductModelViewVO vo) {
+ companyProductModelService.modifyModel(vo);
+ return ResultUtil.success();
+ }
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/getModelDetails/{id}")
+ @SystemLog(value = "-获取型号详情")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModel:query')")
+ public ResponseEntity getModelDetails(@PathVariable("id") String id) {
+ List detailsList=companyProductModelService.getModelDetails(id);
+ return ResultUtil.success(detailsList);
+ }
+ //region 基本操作
+ /**
+ * 初始化
+ */
+ @GetMapping("/init")
+ public ResponseEntity init() {
+ CompanyProductModel entity=companyProductModelService.init();
+ CompanyProductModelVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/")
+ @SystemLog(value = "-新增")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModel:add')")
+ public ResponseEntity add(@Validated @RequestBody CompanyProductModelVO vo) {
+ CompanyProductModel entity=convert2Entity(vo);
+ companyProductModelService.add(entity);
+ CompanyProductModelVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 修改
+ */
+ @PutMapping("/")
+ @SystemLog(value = "-修改")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModel:modify')")
+ public ResponseEntity modify(@Validated @RequestBody CompanyProductModelVO vo) {
+ CompanyProductModel entity=convert2Entity(vo);
+ companyProductModelService.modify(entity);
+ CompanyProductModelVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 删除数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @DeleteMapping("/{id}")
+ @SystemLog(value = "-删除")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModel:remove')")
+ public ResponseEntity remove(@PathVariable("id") String id) {
+ companyProductModelService.remove(id);
+ return ResultUtil.success();
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @SystemLog(value = "-分页")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModel:query')")
+ public ResponseEntity page(CompanyProductModelVO queryVO, PageInfo pageInfo, SortInfo sortInfo) {
+ //构造分页对象
+ IPage page = new Page(pageInfo.getPageNum(), pageInfo.getPageSize());
+
+
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(CompanyProductModel.class,queryVO,sortInfo);
+
+ //查询数据
+ companyProductModelService.page(page, queryWrapper);
+ //转换vo
+ IPage pageVO = mapperFacade.map(page, IPage.class);
+ List companyProductModelVOList=convert2VO(page.getRecords());
+ pageVO.setRecords(companyProductModelVOList);
+ return ResultUtil.success(pageVO);
+ }
+
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @SystemLog(value = "-列表")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModel:query')")
+ public ResponseEntity list(CompanyProductModelVO queryVO, SortInfo sortInfo) {
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(CompanyProductModel.class, queryVO,sortInfo);
+ List list= companyProductModelService.list(queryWrapper);
+ //转换vo
+ List companyProductModelVOList=convert2VO(list);
+ return ResultUtil.success(companyProductModelVOList);
+ }
+
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/{id}")
+ @SystemLog(value = "-详情")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModel:view')")
+ public ResponseEntity get(@PathVariable("id") String id) {
+ CompanyProductModel entity = companyProductModelService.query(id);
+ CompanyProductModelVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 复制新增数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @PostMapping("/{id}")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModel:addByCopy')")
+ public ResponseEntity addByCopy(@PathVariable("id") String id) {
+ companyProductModelService.addByCopy(id);
+ return ResultUtil.success();
+ }
+
+
+ /**
+ * 复制新增单条数据,返回复制后的对象
+ */
+ @PostMapping("/{id}/addSingleByCopy")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModel:addByCopy')")
+ public ResponseEntity addSingleByCopy(@PathVariable("id") String id) {
+ CompanyProductModel entity = companyProductModelService.addSingleByCopy(id);
+ CompanyProductModelVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+ //endregion
+
+ //region 扩展操作
+
+ //endregion
+
+ //region 辅助操作
+
+ /**
+ * 将单条实体转换为视图对象
+ *
+ * @param entity 实体
+ * @return {@link EntityVO} 视图对象
+ */
+ protected CompanyProductModelVO convert2VO(CompanyProductModel entity){
+ CompanyProductModelVO vo=mapperFacade.map(entity,CompanyProductModelVO.class);
+ return vo;
+ }
+
+ /**
+ * 将实体列表转换为视图对象列表
+ *
+ * @param entityList 实体列表
+ * @return {@link List}<{@link EntityVO}> 视图对象列表
+ */
+ protected List convert2VO(List entityList) {
+ List voList = new ArrayList<>(entityList.size());
+
+ entityList.stream().forEach(x -> {
+ CompanyProductModelVO vo = convert2VO(x);
+ voList.add(vo);
+ });
+ return voList;
+ }
+
+
+ private CompanyProductModel convert2Entity(CompanyProductModelVO vo){
+ CompanyProductModel entity=mapperFacade.map(vo,CompanyProductModel.class);
+ return entity;
+ }
+
+ //endregion
+ }
\ No newline at end of file
diff --git a/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/CompanyProductModelDetailsController.java b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/CompanyProductModelDetailsController.java
new file mode 100644
index 0000000..f0a01bb
--- /dev/null
+++ b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/CompanyProductModelDetailsController.java
@@ -0,0 +1,206 @@
+package tech.abc.platform.productManagement.controller;
+
+
+import org.springframework.web.bind.annotation.RestController;
+import tech.abc.platform.common.base.BaseController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import tech.abc.platform.common.annotation.SystemLog;
+import tech.abc.platform.common.query.QueryGenerator;
+import tech.abc.platform.common.utils.ResultUtil;
+import tech.abc.platform.common.vo.PageInfo;
+import tech.abc.platform.common.vo.Result;
+import tech.abc.platform.common.vo.SortInfo;
+import tech.abc.platform.productManagement.entity.CompanyProductModelDetails;
+import tech.abc.platform.productManagement.service.CompanyProductModelDetailsService;
+import tech.abc.platform.productManagement.vo.CompanyProductModelDetailsVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+* 前端控制器类
+*
+* @author ZHB
+* @date 2024-05-17
+*/
+@RestController
+@RequestMapping("/productManagement/companyProductModelDetails")
+@Slf4j
+public class CompanyProductModelDetailsController extends BaseController {
+ @Autowired
+ private CompanyProductModelDetailsService companyProductModelDetailsService;
+
+
+ //region 基本操作
+ /**
+ * 初始化
+ */
+ @GetMapping("/init")
+ public ResponseEntity init() {
+ CompanyProductModelDetails entity=companyProductModelDetailsService.init();
+ CompanyProductModelDetailsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/")
+ @SystemLog(value = "-新增")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModelDetails:add')")
+ public ResponseEntity add(@Validated @RequestBody CompanyProductModelDetailsVO vo) {
+ CompanyProductModelDetails entity=convert2Entity(vo);
+ companyProductModelDetailsService.add(entity);
+ CompanyProductModelDetailsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 修改
+ */
+ @PutMapping("/")
+ @SystemLog(value = "-修改")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModelDetails:modify')")
+ public ResponseEntity modify(@Validated @RequestBody CompanyProductModelDetailsVO vo) {
+ CompanyProductModelDetails entity=convert2Entity(vo);
+ companyProductModelDetailsService.modify(entity);
+ CompanyProductModelDetailsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 删除数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @DeleteMapping("/{id}")
+ @SystemLog(value = "-删除")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModelDetails:remove')")
+ public ResponseEntity remove(@PathVariable("id") String id) {
+ companyProductModelDetailsService.remove(id);
+ return ResultUtil.success();
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @SystemLog(value = "-分页")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModelDetails:query')")
+ public ResponseEntity page(CompanyProductModelDetailsVO queryVO, PageInfo pageInfo, SortInfo sortInfo) {
+ //构造分页对象
+ IPage page = new Page(pageInfo.getPageNum(), pageInfo.getPageSize());
+
+
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(CompanyProductModelDetails.class,queryVO,sortInfo);
+
+ //查询数据
+ companyProductModelDetailsService.page(page, queryWrapper);
+ //转换vo
+ IPage pageVO = mapperFacade.map(page, IPage.class);
+ List companyProductModelDetailsVOList=convert2VO(page.getRecords());
+ pageVO.setRecords(companyProductModelDetailsVOList);
+ return ResultUtil.success(pageVO);
+ }
+
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @SystemLog(value = "-列表")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModelDetails:query')")
+ public ResponseEntity list(CompanyProductModelDetailsVO queryVO, SortInfo sortInfo) {
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(CompanyProductModelDetails.class, queryVO,sortInfo);
+ List list= companyProductModelDetailsService.list(queryWrapper);
+ //转换vo
+ List companyProductModelDetailsVOList=convert2VO(list);
+ return ResultUtil.success(companyProductModelDetailsVOList);
+ }
+
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/{id}")
+ @SystemLog(value = "-详情")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModelDetails:view')")
+ public ResponseEntity get(@PathVariable("id") String id) {
+ CompanyProductModelDetails entity = companyProductModelDetailsService.query(id);
+ CompanyProductModelDetailsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 复制新增数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @PostMapping("/{id}")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModelDetails:addByCopy')")
+ public ResponseEntity addByCopy(@PathVariable("id") String id) {
+ companyProductModelDetailsService.addByCopy(id);
+ return ResultUtil.success();
+ }
+
+
+ /**
+ * 复制新增单条数据,返回复制后的对象
+ */
+ @PostMapping("/{id}/addSingleByCopy")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProductModelDetails:addByCopy')")
+ public ResponseEntity addSingleByCopy(@PathVariable("id") String id) {
+ CompanyProductModelDetails entity = companyProductModelDetailsService.addSingleByCopy(id);
+ CompanyProductModelDetailsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+ //endregion
+
+ //region 扩展操作
+
+ //endregion
+
+ //region 辅助操作
+
+ /**
+ * 将单条实体转换为视图对象
+ *
+ * @param entity 实体
+ * @return {@link EntityVO} 视图对象
+ */
+ protected CompanyProductModelDetailsVO convert2VO(CompanyProductModelDetails entity){
+ CompanyProductModelDetailsVO vo=mapperFacade.map(entity,CompanyProductModelDetailsVO.class);
+ return vo;
+ }
+
+ /**
+ * 将实体列表转换为视图对象列表
+ *
+ * @param entityList 实体列表
+ * @return {@link List}<{@link EntityVO}> 视图对象列表
+ */
+ protected List convert2VO(List entityList) {
+ List voList = new ArrayList<>(entityList.size());
+
+ entityList.stream().forEach(x -> {
+ CompanyProductModelDetailsVO vo = convert2VO(x);
+ voList.add(vo);
+ });
+ return voList;
+ }
+
+
+ private CompanyProductModelDetails convert2Entity(CompanyProductModelDetailsVO vo){
+ CompanyProductModelDetails entity=mapperFacade.map(vo,CompanyProductModelDetails.class);
+ return entity;
+ }
+
+ //endregion
+ }
\ No newline at end of file
diff --git a/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/CompanyProductsController.java b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/CompanyProductsController.java
new file mode 100644
index 0000000..717880e
--- /dev/null
+++ b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/CompanyProductsController.java
@@ -0,0 +1,214 @@
+package tech.abc.platform.productManagement.controller;
+
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.RestController;
+import tech.abc.platform.common.base.BaseController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import tech.abc.platform.common.annotation.SystemLog;
+import tech.abc.platform.common.query.QueryGenerator;
+import tech.abc.platform.common.utils.ResultUtil;
+import tech.abc.platform.common.vo.PageInfo;
+import tech.abc.platform.common.vo.Result;
+import tech.abc.platform.common.vo.SortInfo;
+import tech.abc.platform.productManagement.entity.CompanyProducts;
+import tech.abc.platform.productManagement.service.CompanyProductModelService;
+import tech.abc.platform.productManagement.service.CompanyProductsService;
+import tech.abc.platform.productManagement.vo.CompanyProductsVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+* 前端控制器类
+*
+* @author ZHB
+* @date 2024-05-09
+*/
+@RestController
+@RequestMapping("/productManagement/companyProducts")
+@Slf4j
+public class CompanyProductsController extends BaseController {
+ @Autowired
+ private CompanyProductsService companyProductsService;
+ @Autowired
+ private CompanyProductModelService companyProductModelService;
+
+
+ //region 基本操作
+ /**
+ * 初始化
+ */
+ @GetMapping("/init")
+ public ResponseEntity init() {
+ CompanyProducts entity=companyProductsService.init();
+ CompanyProductsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/")
+ @SystemLog(value = "-新增")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProducts:add')")
+ public ResponseEntity add(@Validated @RequestBody CompanyProductsVO vo) {
+ CompanyProducts entity=convert2Entity(vo);
+ companyProductsService.add(entity);
+ CompanyProductsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 修改
+ */
+ @PutMapping("/")
+ @SystemLog(value = "-修改")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProducts:modify')")
+ public ResponseEntity modify(@Validated @RequestBody CompanyProductsVO vo) {
+ CompanyProducts entity=convert2Entity(vo);
+ companyProductsService.modify(entity);
+ CompanyProductsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 删除数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @DeleteMapping("/{id}")
+ @SystemLog(value = "-删除")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProducts:remove')")
+ public ResponseEntity remove(@PathVariable("id") String id) {
+ companyProductsService.remove(id);
+ return ResultUtil.success();
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @SystemLog(value = "-分页")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProducts:query')")
+ public ResponseEntity page(CompanyProductsVO queryVO, PageInfo pageInfo, SortInfo sortInfo) {
+ //构造分页对象
+ IPage page = new Page(pageInfo.getPageNum(), pageInfo.getPageSize());
+
+
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(CompanyProducts.class,queryVO,sortInfo);
+
+ //查询数据
+ companyProductsService.page(page, queryWrapper);
+ //转换vo
+ IPage pageVO = mapperFacade.map(page, IPage.class);
+ List companyProductsVOList=convert2VO(page.getRecords());
+ pageVO.setRecords(companyProductsVOList);
+ return ResultUtil.success(pageVO);
+ }
+
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @SystemLog(value = "-列表")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProducts:query')")
+ public ResponseEntity list(CompanyProductsVO queryVO, SortInfo sortInfo) {
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(CompanyProducts.class, queryVO,sortInfo);
+ List list= companyProductsService.list(queryWrapper);
+ //转换vo
+ List companyProductsVOList=convert2VO(list);
+ return ResultUtil.success(companyProductsVOList);
+ }
+
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/{id}")
+ @SystemLog(value = "-详情")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProducts:view')")
+ public ResponseEntity get(@PathVariable("id") String id) {
+ CompanyProducts entity = companyProductsService.query(id);
+ CompanyProductsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 复制新增数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @PostMapping("/{id}")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProducts:addByCopy')")
+ public ResponseEntity addByCopy(@PathVariable("id") String id) {
+ companyProductsService.addByCopy(id);
+ return ResultUtil.success();
+ }
+
+
+ /**
+ * 复制新增单条数据,返回复制后的对象
+ */
+ @PostMapping("/{id}/addSingleByCopy")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:companyProducts:addByCopy')")
+ public ResponseEntity addSingleByCopy(@PathVariable("id") String id) {
+ CompanyProducts entity = companyProductsService.addSingleByCopy(id);
+ CompanyProductsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+ //endregion
+
+ //region 扩展操作
+
+ //endregion
+
+ //region 辅助操作
+
+ /**
+ * 将单条实体转换为视图对象
+ *
+ * @param entity 实体
+ * @return {@link EntityVO} 视图对象
+ */
+ protected CompanyProductsVO convert2VO(CompanyProducts entity){
+ CompanyProductsVO vo=mapperFacade.map(entity,CompanyProductsVO.class);
+ return vo;
+ }
+
+ /**
+ * 将实体列表转换为视图对象列表
+ *
+ * @param entityList 实体列表
+ * @return {@link List}<{@link EntityVO}> 视图对象列表
+ */
+ protected List convert2VO(List entityList) {
+ List voList = new ArrayList<>(entityList.size());
+
+ entityList.stream().forEach(x -> {
+ CompanyProductsVO vo = convert2VO(x);
+ if(StringUtils.isNotEmpty(vo.getModelId())){
+ String description = companyProductModelService.getById(vo.getModelId()).getDescription();
+ vo.setModelDescription(description);
+ }
+ voList.add(vo);
+ });
+ return voList;
+ }
+
+
+ private CompanyProducts convert2Entity(CompanyProductsVO vo){
+ CompanyProducts entity=mapperFacade.map(vo,CompanyProducts.class);
+ return entity;
+ }
+
+ //endregion
+ }
\ No newline at end of file
diff --git a/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/PersonProductModelController.java b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/PersonProductModelController.java
new file mode 100644
index 0000000..df54b7e
--- /dev/null
+++ b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/PersonProductModelController.java
@@ -0,0 +1,238 @@
+package tech.abc.platform.productManagement.controller;
+
+
+import org.springframework.web.bind.annotation.RestController;
+import tech.abc.platform.common.base.BaseController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import tech.abc.platform.common.annotation.SystemLog;
+import tech.abc.platform.common.query.QueryGenerator;
+import tech.abc.platform.common.utils.ResultUtil;
+import tech.abc.platform.common.vo.PageInfo;
+import tech.abc.platform.common.vo.Result;
+import tech.abc.platform.common.vo.SortInfo;
+import tech.abc.platform.productManagement.entity.PersonProductModel;
+import tech.abc.platform.productManagement.service.PersonProductModelService;
+import tech.abc.platform.productManagement.vo.PersonProductModelVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import tech.abc.platform.productManagement.vo.ProductModelViewVO;
+import tech.abc.platform.productManagement.vo.PersonProductModelDetailsVO;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+* 前端控制器类
+*
+* @author ZHB
+* @date 2024-05-17
+*/
+@RestController
+@RequestMapping("/productManagement/personProductModel")
+@Slf4j
+public class PersonProductModelController extends BaseController {
+ @Autowired
+ private PersonProductModelService personProductModelService;
+
+ /**
+ * 新增
+ */
+ @PostMapping("/addModel")
+ @SystemLog(value = "-新增型号与规格")
+ @PreAuthorize("hasPermission(null,'productManagement:personProductModel:add')")
+ public ResponseEntity addModel(@Validated @RequestBody ProductModelViewVO vo) {
+ personProductModelService.addModel(vo);
+ return ResultUtil.success();
+ }
+ /**
+ * 修改
+ */
+ @PutMapping("/modifyModel")
+ @SystemLog(value = "-修改型号与规格")
+ @PreAuthorize("hasPermission(null,'productManagement:personProductModel:modify')")
+ public ResponseEntity modifyModel(@Validated @RequestBody ProductModelViewVO vo) {
+ personProductModelService.modifyModel(vo);
+ return ResultUtil.success();
+ }
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/getModelDetails/{id}")
+ @SystemLog(value = "-获取型号详情")
+ @PreAuthorize("hasPermission(null,'productManagement:personProductModel:query')")
+ public ResponseEntity getModelDetails(@PathVariable("id") String id) {
+ List detailsList=personProductModelService.getModelDetails(id);
+ return ResultUtil.success(detailsList);
+ }
+ //region 基本操作
+ /**
+ * 初始化
+ */
+ @GetMapping("/init")
+ public ResponseEntity init() {
+ PersonProductModel entity=personProductModelService.init();
+ PersonProductModelVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/")
+ @SystemLog(value = "-新增")
+ @PreAuthorize("hasPermission(null,'productManagement:personProductModel:add')")
+ public ResponseEntity add(@Validated @RequestBody PersonProductModelVO vo) {
+ PersonProductModel entity=convert2Entity(vo);
+ personProductModelService.add(entity);
+ PersonProductModelVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 修改
+ */
+ @PutMapping("/")
+ @SystemLog(value = "-修改")
+ @PreAuthorize("hasPermission(null,'productManagement:personProductModel:modify')")
+ public ResponseEntity modify(@Validated @RequestBody PersonProductModelVO vo) {
+ PersonProductModel entity=convert2Entity(vo);
+ personProductModelService.modify(entity);
+ PersonProductModelVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 删除数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @DeleteMapping("/{id}")
+ @SystemLog(value = "-删除")
+ @PreAuthorize("hasPermission(null,'productManagement:personProductModel:remove')")
+ public ResponseEntity remove(@PathVariable("id") String id) {
+ personProductModelService.remove(id);
+ return ResultUtil.success();
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @SystemLog(value = "-分页")
+ @PreAuthorize("hasPermission(null,'productManagement:personProductModel:query')")
+ public ResponseEntity page(PersonProductModelVO queryVO, PageInfo pageInfo, SortInfo sortInfo) {
+ //构造分页对象
+ IPage page = new Page(pageInfo.getPageNum(), pageInfo.getPageSize());
+
+
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(PersonProductModel.class,queryVO,sortInfo);
+
+ //查询数据
+ personProductModelService.page(page, queryWrapper);
+ //转换vo
+ IPage pageVO = mapperFacade.map(page, IPage.class);
+ List personProductModelVOList=convert2VO(page.getRecords());
+ pageVO.setRecords(personProductModelVOList);
+ return ResultUtil.success(pageVO);
+ }
+
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @SystemLog(value = "-列表")
+ @PreAuthorize("hasPermission(null,'productManagement:personProductModel:query')")
+ public ResponseEntity list(PersonProductModelVO queryVO, SortInfo sortInfo) {
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(PersonProductModel.class, queryVO,sortInfo);
+ List list= personProductModelService.list(queryWrapper);
+ //转换vo
+ List personProductModelVOList=convert2VO(list);
+ return ResultUtil.success(personProductModelVOList);
+ }
+
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/{id}")
+ @SystemLog(value = "-详情")
+ @PreAuthorize("hasPermission(null,'productManagement:personProductModel:view')")
+ public ResponseEntity get(@PathVariable("id") String id) {
+ PersonProductModel entity = personProductModelService.query(id);
+ PersonProductModelVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 复制新增数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @PostMapping("/{id}")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:personProductModel:addByCopy')")
+ public ResponseEntity addByCopy(@PathVariable("id") String id) {
+ personProductModelService.addByCopy(id);
+ return ResultUtil.success();
+ }
+
+
+ /**
+ * 复制新增单条数据,返回复制后的对象
+ */
+ @PostMapping("/{id}/addSingleByCopy")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:personProductModel:addByCopy')")
+ public ResponseEntity addSingleByCopy(@PathVariable("id") String id) {
+ PersonProductModel entity = personProductModelService.addSingleByCopy(id);
+ PersonProductModelVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+ //endregion
+
+ //region 扩展操作
+
+ //endregion
+
+ //region 辅助操作
+
+ /**
+ * 将单条实体转换为视图对象
+ *
+ * @param entity 实体
+ * @return {@link EntityVO} 视图对象
+ */
+ protected PersonProductModelVO convert2VO(PersonProductModel entity){
+ PersonProductModelVO vo=mapperFacade.map(entity,PersonProductModelVO.class);
+ return vo;
+ }
+
+ /**
+ * 将实体列表转换为视图对象列表
+ *
+ * @param entityList 实体列表
+ * @return {@link List}<{@link EntityVO}> 视图对象列表
+ */
+ protected List convert2VO(List entityList) {
+ List voList = new ArrayList<>(entityList.size());
+
+ entityList.stream().forEach(x -> {
+ PersonProductModelVO vo = convert2VO(x);
+ voList.add(vo);
+ });
+ return voList;
+ }
+
+
+ private PersonProductModel convert2Entity(PersonProductModelVO vo){
+ PersonProductModel entity=mapperFacade.map(vo,PersonProductModel.class);
+ return entity;
+ }
+
+ //endregion
+ }
\ No newline at end of file
diff --git a/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/PersonProductModelDetailsController.java b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/PersonProductModelDetailsController.java
new file mode 100644
index 0000000..9cf717e
--- /dev/null
+++ b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/PersonProductModelDetailsController.java
@@ -0,0 +1,206 @@
+package tech.abc.platform.productManagement.controller;
+
+
+import org.springframework.web.bind.annotation.RestController;
+import tech.abc.platform.common.base.BaseController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import tech.abc.platform.common.annotation.SystemLog;
+import tech.abc.platform.common.query.QueryGenerator;
+import tech.abc.platform.common.utils.ResultUtil;
+import tech.abc.platform.common.vo.PageInfo;
+import tech.abc.platform.common.vo.Result;
+import tech.abc.platform.common.vo.SortInfo;
+import tech.abc.platform.productManagement.entity.PersonProductModelDetails;
+import tech.abc.platform.productManagement.service.PersonProductModelDetailsService;
+import tech.abc.platform.productManagement.vo.PersonProductModelDetailsVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+* 前端控制器类
+*
+* @author ZHB
+* @date 2024-05-17
+*/
+@RestController
+@RequestMapping("/costManagement/personProductModelDetails")
+@Slf4j
+public class PersonProductModelDetailsController extends BaseController {
+ @Autowired
+ private PersonProductModelDetailsService personProductModelDetailsService;
+
+
+ //region 基本操作
+ /**
+ * 初始化
+ */
+ @GetMapping("/init")
+ public ResponseEntity init() {
+ PersonProductModelDetails entity=personProductModelDetailsService.init();
+ PersonProductModelDetailsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/")
+ @SystemLog(value = "-新增")
+ @PreAuthorize("hasPermission(null,'costManagement:personProductModelDetails:add')")
+ public ResponseEntity add(@Validated @RequestBody PersonProductModelDetailsVO vo) {
+ PersonProductModelDetails entity=convert2Entity(vo);
+ personProductModelDetailsService.add(entity);
+ PersonProductModelDetailsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 修改
+ */
+ @PutMapping("/")
+ @SystemLog(value = "-修改")
+ @PreAuthorize("hasPermission(null,'costManagement:personProductModelDetails:modify')")
+ public ResponseEntity modify(@Validated @RequestBody PersonProductModelDetailsVO vo) {
+ PersonProductModelDetails entity=convert2Entity(vo);
+ personProductModelDetailsService.modify(entity);
+ PersonProductModelDetailsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 删除数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @DeleteMapping("/{id}")
+ @SystemLog(value = "-删除")
+ @PreAuthorize("hasPermission(null,'costManagement:personProductModelDetails:remove')")
+ public ResponseEntity remove(@PathVariable("id") String id) {
+ personProductModelDetailsService.remove(id);
+ return ResultUtil.success();
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @SystemLog(value = "-分页")
+ @PreAuthorize("hasPermission(null,'costManagement:personProductModelDetails:query')")
+ public ResponseEntity page(PersonProductModelDetailsVO queryVO, PageInfo pageInfo, SortInfo sortInfo) {
+ //构造分页对象
+ IPage page = new Page(pageInfo.getPageNum(), pageInfo.getPageSize());
+
+
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(PersonProductModelDetails.class,queryVO,sortInfo);
+
+ //查询数据
+ personProductModelDetailsService.page(page, queryWrapper);
+ //转换vo
+ IPage pageVO = mapperFacade.map(page, IPage.class);
+ List personProductModelDetailsVOList=convert2VO(page.getRecords());
+ pageVO.setRecords(personProductModelDetailsVOList);
+ return ResultUtil.success(pageVO);
+ }
+
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @SystemLog(value = "-列表")
+ @PreAuthorize("hasPermission(null,'costManagement:personProductModelDetails:query')")
+ public ResponseEntity list(PersonProductModelDetailsVO queryVO, SortInfo sortInfo) {
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(PersonProductModelDetails.class, queryVO,sortInfo);
+ List list= personProductModelDetailsService.list(queryWrapper);
+ //转换vo
+ List personProductModelDetailsVOList=convert2VO(list);
+ return ResultUtil.success(personProductModelDetailsVOList);
+ }
+
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/{id}")
+ @SystemLog(value = "-详情")
+ @PreAuthorize("hasPermission(null,'costManagement:personProductModelDetails:view')")
+ public ResponseEntity get(@PathVariable("id") String id) {
+ PersonProductModelDetails entity = personProductModelDetailsService.query(id);
+ PersonProductModelDetailsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 复制新增数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @PostMapping("/{id}")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'costManagement:personProductModelDetails:addByCopy')")
+ public ResponseEntity addByCopy(@PathVariable("id") String id) {
+ personProductModelDetailsService.addByCopy(id);
+ return ResultUtil.success();
+ }
+
+
+ /**
+ * 复制新增单条数据,返回复制后的对象
+ */
+ @PostMapping("/{id}/addSingleByCopy")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'costManagement:personProductModelDetails:addByCopy')")
+ public ResponseEntity addSingleByCopy(@PathVariable("id") String id) {
+ PersonProductModelDetails entity = personProductModelDetailsService.addSingleByCopy(id);
+ PersonProductModelDetailsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+ //endregion
+
+ //region 扩展操作
+
+ //endregion
+
+ //region 辅助操作
+
+ /**
+ * 将单条实体转换为视图对象
+ *
+ * @param entity 实体
+ * @return {@link EntityVO} 视图对象
+ */
+ protected PersonProductModelDetailsVO convert2VO(PersonProductModelDetails entity){
+ PersonProductModelDetailsVO vo=mapperFacade.map(entity,PersonProductModelDetailsVO.class);
+ return vo;
+ }
+
+ /**
+ * 将实体列表转换为视图对象列表
+ *
+ * @param entityList 实体列表
+ * @return {@link List}<{@link EntityVO}> 视图对象列表
+ */
+ protected List convert2VO(List entityList) {
+ List voList = new ArrayList<>(entityList.size());
+
+ entityList.stream().forEach(x -> {
+ PersonProductModelDetailsVO vo = convert2VO(x);
+ voList.add(vo);
+ });
+ return voList;
+ }
+
+
+ private PersonProductModelDetails convert2Entity(PersonProductModelDetailsVO vo){
+ PersonProductModelDetails entity=mapperFacade.map(vo,PersonProductModelDetails.class);
+ return entity;
+ }
+
+ //endregion
+ }
\ No newline at end of file
diff --git a/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/PersonProductsController.java b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/PersonProductsController.java
new file mode 100644
index 0000000..e84840f
--- /dev/null
+++ b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/PersonProductsController.java
@@ -0,0 +1,216 @@
+package tech.abc.platform.productManagement.controller;
+
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.RestController;
+import tech.abc.platform.common.base.BaseController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import tech.abc.platform.common.annotation.SystemLog;
+import tech.abc.platform.common.query.QueryGenerator;
+import tech.abc.platform.common.utils.ResultUtil;
+import tech.abc.platform.common.vo.PageInfo;
+import tech.abc.platform.common.vo.Result;
+import tech.abc.platform.common.vo.SortInfo;
+import tech.abc.platform.productManagement.entity.PersonProducts;
+import tech.abc.platform.productManagement.service.PersonProductModelService;
+import tech.abc.platform.productManagement.service.PersonProductsService;
+import tech.abc.platform.productManagement.vo.PersonProductsVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+* 前端控制器类
+*
+* @author ZHB
+* @date 2024-05-14
+*/
+@RestController
+@RequestMapping("/productManagement/personProducts")
+@Slf4j
+public class PersonProductsController extends BaseController {
+ @Autowired
+ private PersonProductsService personProductsService;
+ @Autowired
+ private PersonProductModelService personProductModelService;
+
+ //region 基本操作
+ /**
+ * 初始化
+ */
+ @GetMapping("/init")
+ public ResponseEntity init() {
+ PersonProducts entity=personProductsService.init();
+ PersonProductsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/")
+ @SystemLog(value = "-新增")
+ @PreAuthorize("hasPermission(null,'productManagement:personProducts:add')")
+ public ResponseEntity add(@Validated @RequestBody PersonProductsVO vo) {
+ PersonProducts entity=convert2Entity(vo);
+ personProductsService.add(entity);
+ PersonProductsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 修改
+ */
+ @PutMapping("/")
+ @SystemLog(value = "-修改")
+ @PreAuthorize("hasPermission(null,'productManagement:personProducts:modify')")
+ public ResponseEntity modify(@Validated @RequestBody PersonProductsVO vo) {
+ PersonProducts entity=convert2Entity(vo);
+ personProductsService.modify(entity);
+ PersonProductsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 删除数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @DeleteMapping("/{id}")
+ @SystemLog(value = "-删除")
+ @PreAuthorize("hasPermission(null,'productManagement:personProducts:remove')")
+ public ResponseEntity remove(@PathVariable("id") String id) {
+ personProductsService.remove(id);
+ return ResultUtil.success();
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @SystemLog(value = "-分页")
+ @PreAuthorize("hasPermission(null,'productManagement:personProducts:query')")
+ public ResponseEntity page(PersonProductsVO queryVO, PageInfo pageInfo, SortInfo sortInfo) {
+ //构造分页对象
+ IPage page = new Page(pageInfo.getPageNum(), pageInfo.getPageSize());
+
+
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(PersonProducts.class,queryVO,sortInfo);
+
+ //查询数据
+ personProductsService.page(page, queryWrapper);
+ //转换vo
+ IPage pageVO = mapperFacade.map(page, IPage.class);
+ List personProductsVOList=convert2VO(page.getRecords());
+ pageVO.setRecords(personProductsVOList);
+ return ResultUtil.success(pageVO);
+ }
+
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @SystemLog(value = "-列表")
+ @PreAuthorize("hasPermission(null,'productManagement:personProducts:query')")
+ public ResponseEntity list(PersonProductsVO queryVO, SortInfo sortInfo) {
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(PersonProducts.class, queryVO,sortInfo);
+ List list= personProductsService.list(queryWrapper);
+ //转换vo
+ List personProductsVOList=convert2VO(list);
+ return ResultUtil.success(personProductsVOList);
+ }
+
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/{id}")
+ @SystemLog(value = "-详情")
+ @PreAuthorize("hasPermission(null,'productManagement:personProducts:view')")
+ public ResponseEntity get(@PathVariable("id") String id) {
+ PersonProducts entity = personProductsService.query(id);
+ PersonProductsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 复制新增数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @PostMapping("/{id}")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:personProducts:addByCopy')")
+ public ResponseEntity addByCopy(@PathVariable("id") String id) {
+ personProductsService.addByCopy(id);
+ return ResultUtil.success();
+ }
+
+
+ /**
+ * 复制新增单条数据,返回复制后的对象
+ */
+ @PostMapping("/{id}/addSingleByCopy")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:personProducts:addByCopy')")
+ public ResponseEntity addSingleByCopy(@PathVariable("id") String id) {
+ PersonProducts entity = personProductsService.addSingleByCopy(id);
+ PersonProductsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+ //endregion
+
+ //region 扩展操作
+
+ //endregion
+
+ //region 辅助操作
+
+ /**
+ * 将单条实体转换为视图对象
+ *
+ * @param entity 实体
+ * @return {@link EntityVO} 视图对象
+ */
+ protected PersonProductsVO convert2VO(PersonProducts entity){
+ PersonProductsVO vo=mapperFacade.map(entity,PersonProductsVO.class);
+ return vo;
+ }
+
+ /**
+ * 将实体列表转换为视图对象列表
+ *
+ * @param entityList 实体列表
+ * @return {@link List}<{@link EntityVO}> 视图对象列表
+ */
+ protected List convert2VO(List entityList) {
+ List voList = new ArrayList<>(entityList.size());
+
+ entityList.stream().forEach(x -> {
+ PersonProductsVO vo = convert2VO(x);
+ String modelId = vo.getModelId();
+ //获取型号描述信息
+ if(StringUtils.isNotEmpty(modelId)){
+ String description = personProductModelService.getById(modelId).getDescription();
+ vo.setModelDescription(description);
+ }
+ voList.add(vo);
+ });
+ return voList;
+ }
+
+
+ private PersonProducts convert2Entity(PersonProductsVO vo){
+ PersonProducts entity=mapperFacade.map(vo,PersonProducts.class);
+ return entity;
+ }
+
+ //endregion
+ }
\ No newline at end of file
diff --git a/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/ProductModelTemplateController.java b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/ProductModelTemplateController.java
new file mode 100644
index 0000000..c4cdb70
--- /dev/null
+++ b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/ProductModelTemplateController.java
@@ -0,0 +1,214 @@
+package tech.abc.platform.productManagement.controller;
+
+
+import org.springframework.web.bind.annotation.RestController;
+import tech.abc.platform.common.base.BaseController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import tech.abc.platform.common.annotation.SystemLog;
+import tech.abc.platform.common.query.QueryGenerator;
+import tech.abc.platform.common.utils.ResultUtil;
+import tech.abc.platform.common.vo.PageInfo;
+import tech.abc.platform.common.vo.Result;
+import tech.abc.platform.common.vo.SortInfo;
+import tech.abc.platform.productManagement.entity.ProductModelTemplate;
+import tech.abc.platform.productManagement.service.ProductModelTemplateDetailsService;
+import tech.abc.platform.productManagement.service.ProductModelTemplateService;
+import tech.abc.platform.productManagement.vo.ProductModelTemplateVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+* 前端控制器类
+*
+* @author ZHB
+* @date 2024-05-16
+*/
+@RestController
+@RequestMapping("/productManagement/productModelTemplate")
+@Slf4j
+public class ProductModelTemplateController extends BaseController {
+ @Autowired
+ private ProductModelTemplateService productModelTemplateService;
+ @Autowired
+ private ProductModelTemplateDetailsService productModelTemplateDetailsService;
+
+ //region 基本操作
+ /**
+ * 初始化
+ */
+ @GetMapping("/init")
+ public ResponseEntity init() {
+ ProductModelTemplate entity=productModelTemplateService.init();
+ ProductModelTemplateVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/")
+ @SystemLog(value = "-新增")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplate:add')")
+ public ResponseEntity add(@Validated @RequestBody ProductModelTemplateVO vo) {
+ ProductModelTemplate entity=convert2Entity(vo);
+ productModelTemplateService.add(entity);
+ ProductModelTemplateVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 修改
+ */
+ @PutMapping("/")
+ @SystemLog(value = "-修改")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplate:modify')")
+ public ResponseEntity modify(@Validated @RequestBody ProductModelTemplateVO vo) {
+ ProductModelTemplate entity=convert2Entity(vo);
+ productModelTemplateService.modify(entity);
+ ProductModelTemplateVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 删除数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @DeleteMapping("/{id}")
+ @SystemLog(value = "-删除")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplate:remove')")
+ public ResponseEntity remove(@PathVariable("id") String id) {
+ productModelTemplateService.remove(id);
+ return ResultUtil.success();
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @SystemLog(value = "-分页")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplate:query')")
+ public ResponseEntity page(ProductModelTemplateVO queryVO, PageInfo pageInfo, SortInfo sortInfo) {
+ //构造分页对象
+ IPage page = new Page(pageInfo.getPageNum(), pageInfo.getPageSize());
+
+
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(ProductModelTemplate.class,queryVO,sortInfo);
+
+ //查询数据
+ productModelTemplateService.page(page, queryWrapper);
+ //转换vo
+ IPage pageVO = mapperFacade.map(page, IPage.class);
+ List productModelTemplateVOList=convert2VO(page.getRecords());
+ pageVO.setRecords(productModelTemplateVOList);
+ return ResultUtil.success(pageVO);
+ }
+
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @SystemLog(value = "-列表")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplate:query')")
+ public ResponseEntity list(ProductModelTemplateVO queryVO, SortInfo sortInfo) {
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(ProductModelTemplate.class, queryVO,sortInfo);
+ List list= productModelTemplateService.list(queryWrapper);
+ //转换vo
+ List productModelTemplateVOList=convert2VO(list);
+ return ResultUtil.success(productModelTemplateVOList);
+ }
+
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/{id}")
+ @SystemLog(value = "-详情")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplate:view')")
+ public ResponseEntity get(@PathVariable("id") String id) {
+ ProductModelTemplate entity = productModelTemplateService.query(id);
+ ProductModelTemplateVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 复制新增数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @PostMapping("/{id}")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplate:addByCopy')")
+ public ResponseEntity addByCopy(@PathVariable("id") String id) {
+ productModelTemplateService.addByCopy(id);
+ return ResultUtil.success();
+ }
+
+
+ /**
+ * 复制新增单条数据,返回复制后的对象
+ */
+ @PostMapping("/{id}/addSingleByCopy")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplate:addByCopy')")
+ public ResponseEntity addSingleByCopy(@PathVariable("id") String id) {
+ ProductModelTemplate entity = productModelTemplateService.addSingleByCopy(id);
+ ProductModelTemplateVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+ //endregion
+
+ //region 扩展操作
+
+ //endregion
+
+ //region 辅助操作
+
+ /**
+ * 将单条实体转换为视图对象
+ *
+ * @param entity 实体
+ * @return {@link EntityVO} 视图对象
+ */
+ protected ProductModelTemplateVO convert2VO(ProductModelTemplate entity){
+ ProductModelTemplateVO vo=mapperFacade.map(entity,ProductModelTemplateVO.class);
+ String id = vo.getId();
+ String description = productModelTemplateDetailsService.getDetailsDescriptionByModelId(id);
+ vo.setTemplateDetailsDescription(description);
+ return vo;
+ }
+
+ /**
+ * 将实体列表转换为视图对象列表
+ *
+ * @param entityList 实体列表
+ * @return {@link List}<{@link EntityVO}> 视图对象列表
+ */
+ protected List convert2VO(List entityList) {
+ List voList = new ArrayList<>(entityList.size());
+
+ entityList.stream().forEach(x -> {
+ ProductModelTemplateVO vo = convert2VO(x);
+ String id = vo.getId();
+ String description = productModelTemplateDetailsService.getDetailsDescriptionByModelId(id);
+ vo.setTemplateDetailsDescription(description);
+ voList.add(vo);
+ });
+ return voList;
+ }
+
+
+ private ProductModelTemplate convert2Entity(ProductModelTemplateVO vo){
+ ProductModelTemplate entity=mapperFacade.map(vo,ProductModelTemplate.class);
+ return entity;
+ }
+
+ //endregion
+ }
\ No newline at end of file
diff --git a/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/ProductModelTemplateDetailsController.java b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/ProductModelTemplateDetailsController.java
new file mode 100644
index 0000000..b79aaad
--- /dev/null
+++ b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/ProductModelTemplateDetailsController.java
@@ -0,0 +1,225 @@
+package tech.abc.platform.productManagement.controller;
+
+
+import org.springframework.web.bind.annotation.RestController;
+import tech.abc.platform.common.base.BaseController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import tech.abc.platform.common.annotation.SystemLog;
+import tech.abc.platform.common.query.QueryGenerator;
+import tech.abc.platform.common.utils.ResultUtil;
+import tech.abc.platform.common.vo.PageInfo;
+import tech.abc.platform.common.vo.Result;
+import tech.abc.platform.common.vo.SortInfo;
+import tech.abc.platform.productManagement.entity.ProductModelTemplateDetails;
+import tech.abc.platform.productManagement.service.ProductModelTemplateDetailsService;
+import tech.abc.platform.productManagement.vo.ProductModelTemplateDetailsVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+* 前端控制器类
+*
+* @author ZHB
+* @date 2024-05-16
+*/
+@RestController
+@RequestMapping("/productManagement/productModelTemplateDetails")
+@Slf4j
+public class ProductModelTemplateDetailsController extends BaseController {
+ @Autowired
+ private ProductModelTemplateDetailsService productModelTemplateDetailsService;
+
+ /**
+ * 新增
+ */
+ @PostMapping("/addList")
+ @SystemLog(value = "-新增型号规格明细")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplateDetails:add')")
+ public ResponseEntity addList(@Validated @RequestBody List vo) {
+ productModelTemplateDetailsService.addList(vo);
+ return ResultUtil.success();
+ }
+ /**
+ * 修改
+ */
+ @PutMapping("/modifyList")
+ @SystemLog(value = "-修改型号规格明细")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplateDetails:modify')")
+ public ResponseEntity modifyList(@Validated @RequestBody List vo) {
+ productModelTemplateDetailsService.modifyList(vo);
+ return ResultUtil.success();
+ }
+ //region 基本操作
+ /**
+ * 初始化
+ */
+ @GetMapping("/init")
+ public ResponseEntity init() {
+ ProductModelTemplateDetails entity=productModelTemplateDetailsService.init();
+ ProductModelTemplateDetailsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/")
+ @SystemLog(value = "-新增")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplateDetails:add')")
+ public ResponseEntity add(@Validated @RequestBody ProductModelTemplateDetailsVO vo) {
+ ProductModelTemplateDetails entity=convert2Entity(vo);
+ productModelTemplateDetailsService.add(entity);
+ ProductModelTemplateDetailsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 修改
+ */
+ @PutMapping("/")
+ @SystemLog(value = "-修改")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplateDetails:modify')")
+ public ResponseEntity modify(@Validated @RequestBody ProductModelTemplateDetailsVO vo) {
+ ProductModelTemplateDetails entity=convert2Entity(vo);
+ productModelTemplateDetailsService.modify(entity);
+ ProductModelTemplateDetailsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 删除数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @DeleteMapping("/{id}")
+ @SystemLog(value = "-删除")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplateDetails:remove')")
+ public ResponseEntity remove(@PathVariable("id") String id) {
+ productModelTemplateDetailsService.remove(id);
+ return ResultUtil.success();
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @SystemLog(value = "-分页")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplateDetails:query')")
+ public ResponseEntity page(ProductModelTemplateDetailsVO queryVO, PageInfo pageInfo, SortInfo sortInfo) {
+ //构造分页对象
+ IPage page = new Page(pageInfo.getPageNum(), pageInfo.getPageSize());
+
+
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(ProductModelTemplateDetails.class,queryVO,sortInfo);
+
+ //查询数据
+ productModelTemplateDetailsService.page(page, queryWrapper);
+ //转换vo
+ IPage pageVO = mapperFacade.map(page, IPage.class);
+ List productModelTemplateDetailsVOList=convert2VO(page.getRecords());
+ pageVO.setRecords(productModelTemplateDetailsVOList);
+ return ResultUtil.success(pageVO);
+ }
+
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @SystemLog(value = "-列表")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplateDetails:query')")
+ public ResponseEntity list(ProductModelTemplateDetailsVO queryVO, SortInfo sortInfo) {
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(ProductModelTemplateDetails.class, queryVO,sortInfo);
+ List list= productModelTemplateDetailsService.list(queryWrapper);
+ //转换vo
+ List productModelTemplateDetailsVOList=convert2VO(list);
+ return ResultUtil.success(productModelTemplateDetailsVOList);
+ }
+
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/{id}")
+ @SystemLog(value = "-详情")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplateDetails:view')")
+ public ResponseEntity get(@PathVariable("id") String id) {
+ ProductModelTemplateDetails entity = productModelTemplateDetailsService.query(id);
+ ProductModelTemplateDetailsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 复制新增数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @PostMapping("/{id}")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplateDetails:addByCopy')")
+ public ResponseEntity addByCopy(@PathVariable("id") String id) {
+ productModelTemplateDetailsService.addByCopy(id);
+ return ResultUtil.success();
+ }
+
+
+ /**
+ * 复制新增单条数据,返回复制后的对象
+ */
+ @PostMapping("/{id}/addSingleByCopy")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:productModelTemplateDetails:addByCopy')")
+ public ResponseEntity addSingleByCopy(@PathVariable("id") String id) {
+ ProductModelTemplateDetails entity = productModelTemplateDetailsService.addSingleByCopy(id);
+ ProductModelTemplateDetailsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+ //endregion
+
+ //region 扩展操作
+
+ //endregion
+
+ //region 辅助操作
+
+ /**
+ * 将单条实体转换为视图对象
+ *
+ * @param entity 实体
+ * @return {@link EntityVO} 视图对象
+ */
+ protected ProductModelTemplateDetailsVO convert2VO(ProductModelTemplateDetails entity){
+ ProductModelTemplateDetailsVO vo=mapperFacade.map(entity,ProductModelTemplateDetailsVO.class);
+ return vo;
+ }
+
+ /**
+ * 将实体列表转换为视图对象列表
+ *
+ * @param entityList 实体列表
+ * @return {@link List}<{@link EntityVO}> 视图对象列表
+ */
+ protected List convert2VO(List entityList) {
+ List voList = new ArrayList<>(entityList.size());
+
+ entityList.stream().forEach(x -> {
+ ProductModelTemplateDetailsVO vo = convert2VO(x);
+ voList.add(vo);
+ });
+ return voList;
+ }
+
+
+ private ProductModelTemplateDetails convert2Entity(ProductModelTemplateDetailsVO vo){
+ ProductModelTemplateDetails entity=mapperFacade.map(vo,ProductModelTemplateDetails.class);
+ return entity;
+ }
+
+ //endregion
+ }
\ No newline at end of file
diff --git a/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/SupplierInformationController.java b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/SupplierInformationController.java
new file mode 100644
index 0000000..4d12fb8
--- /dev/null
+++ b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/SupplierInformationController.java
@@ -0,0 +1,206 @@
+package tech.abc.platform.productManagement.controller;
+
+
+import org.springframework.web.bind.annotation.RestController;
+import tech.abc.platform.common.base.BaseController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import tech.abc.platform.common.annotation.SystemLog;
+import tech.abc.platform.common.query.QueryGenerator;
+import tech.abc.platform.common.utils.ResultUtil;
+import tech.abc.platform.common.vo.PageInfo;
+import tech.abc.platform.common.vo.Result;
+import tech.abc.platform.common.vo.SortInfo;
+import tech.abc.platform.productManagement.entity.SupplierInformation;
+import tech.abc.platform.productManagement.service.SupplierInformationService;
+import tech.abc.platform.productManagement.vo.SupplierInformationVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+* 前端控制器类
+*
+* @author ZHB
+* @date 2024-05-07
+*/
+@RestController
+@RequestMapping("/productManagement/supplierInformation")
+@Slf4j
+public class SupplierInformationController extends BaseController {
+ @Autowired
+ private SupplierInformationService supplierInformationService;
+
+
+ //region 基本操作
+ /**
+ * 初始化
+ */
+ @GetMapping("/init")
+ public ResponseEntity init() {
+ SupplierInformation entity=supplierInformationService.init();
+ SupplierInformationVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/")
+ @SystemLog(value = "-新增")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierInformation:add')")
+ public ResponseEntity add(@Validated @RequestBody SupplierInformationVO vo) {
+ SupplierInformation entity=convert2Entity(vo);
+ supplierInformationService.add(entity);
+ SupplierInformationVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 修改
+ */
+ @PutMapping("/")
+ @SystemLog(value = "-修改")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierInformation:modify')")
+ public ResponseEntity modify(@Validated @RequestBody SupplierInformationVO vo) {
+ SupplierInformation entity=convert2Entity(vo);
+ supplierInformationService.modify(entity);
+ SupplierInformationVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 删除数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @DeleteMapping("/{id}")
+ @SystemLog(value = "-删除")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierInformation:remove')")
+ public ResponseEntity remove(@PathVariable("id") String id) {
+ supplierInformationService.remove(id);
+ return ResultUtil.success();
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @SystemLog(value = "-分页")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierInformation:query')")
+ public ResponseEntity page(SupplierInformationVO queryVO, PageInfo pageInfo, SortInfo sortInfo) {
+ //构造分页对象
+ IPage page = new Page(pageInfo.getPageNum(), pageInfo.getPageSize());
+
+
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(SupplierInformation.class,queryVO,sortInfo);
+
+ //查询数据
+ supplierInformationService.page(page, queryWrapper);
+ //转换vo
+ IPage pageVO = mapperFacade.map(page, IPage.class);
+ List supplierInformationVOList=convert2VO(page.getRecords());
+ pageVO.setRecords(supplierInformationVOList);
+ return ResultUtil.success(pageVO);
+ }
+
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @SystemLog(value = "-列表")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierInformation:query')")
+ public ResponseEntity list(SupplierInformationVO queryVO, SortInfo sortInfo) {
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(SupplierInformation.class, queryVO,sortInfo);
+ List list= supplierInformationService.list(queryWrapper);
+ //转换vo
+ List supplierInformationVOList=convert2VO(list);
+ return ResultUtil.success(supplierInformationVOList);
+ }
+
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/{id}")
+ @SystemLog(value = "-详情")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierInformation:view')")
+ public ResponseEntity get(@PathVariable("id") String id) {
+ SupplierInformation entity = supplierInformationService.query(id);
+ SupplierInformationVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 复制新增数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @PostMapping("/{id}")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierInformation:addByCopy')")
+ public ResponseEntity addByCopy(@PathVariable("id") String id) {
+ supplierInformationService.addByCopy(id);
+ return ResultUtil.success();
+ }
+
+
+ /**
+ * 复制新增单条数据,返回复制后的对象
+ */
+ @PostMapping("/{id}/addSingleByCopy")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierInformation:addByCopy')")
+ public ResponseEntity addSingleByCopy(@PathVariable("id") String id) {
+ SupplierInformation entity = supplierInformationService.addSingleByCopy(id);
+ SupplierInformationVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+ //endregion
+
+ //region 扩展操作
+
+ //endregion
+
+ //region 辅助操作
+
+ /**
+ * 将单条实体转换为视图对象
+ *
+ * @param entity 实体
+ * @return {@link EntityVO} 视图对象
+ */
+ protected SupplierInformationVO convert2VO(SupplierInformation entity){
+ SupplierInformationVO vo=mapperFacade.map(entity,SupplierInformationVO.class);
+ return vo;
+ }
+
+ /**
+ * 将实体列表转换为视图对象列表
+ *
+ * @param entityList 实体列表
+ * @return {@link List}<{@link EntityVO}> 视图对象列表
+ */
+ protected List convert2VO(List entityList) {
+ List voList = new ArrayList<>(entityList.size());
+
+ entityList.stream().forEach(x -> {
+ SupplierInformationVO vo = convert2VO(x);
+ voList.add(vo);
+ });
+ return voList;
+ }
+
+
+ private SupplierInformation convert2Entity(SupplierInformationVO vo){
+ SupplierInformation entity=mapperFacade.map(vo,SupplierInformation.class);
+ return entity;
+ }
+
+ //endregion
+ }
\ No newline at end of file
diff --git a/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/SupplierProductModelController.java b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/SupplierProductModelController.java
new file mode 100644
index 0000000..315a176
--- /dev/null
+++ b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/SupplierProductModelController.java
@@ -0,0 +1,238 @@
+package tech.abc.platform.productManagement.controller;
+
+
+import org.springframework.web.bind.annotation.RestController;
+import tech.abc.platform.common.base.BaseController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import tech.abc.platform.common.annotation.SystemLog;
+import tech.abc.platform.common.query.QueryGenerator;
+import tech.abc.platform.common.utils.ResultUtil;
+import tech.abc.platform.common.vo.PageInfo;
+import tech.abc.platform.common.vo.Result;
+import tech.abc.platform.common.vo.SortInfo;
+import tech.abc.platform.productManagement.entity.SupplierProductModel;
+import tech.abc.platform.productManagement.service.SupplierProductModelService;
+import tech.abc.platform.productManagement.vo.SupplierProductModelDetailsVO;
+import tech.abc.platform.productManagement.vo.SupplierProductModelVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import tech.abc.platform.productManagement.vo.ProductModelViewVO;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+* 前端控制器类
+*
+* @author ZHB
+* @date 2024-05-14
+*/
+@RestController
+@RequestMapping("/productManagement/supplierProductModel")
+@Slf4j
+public class SupplierProductModelController extends BaseController {
+ @Autowired
+ private SupplierProductModelService supplierProductModelService;
+ //拓展操作
+ /**
+ * 新增
+ */
+ @PostMapping("/addModel")
+ @SystemLog(value = "-新增型号与规格")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModel:add')")
+ public ResponseEntity addModel(@Validated @RequestBody ProductModelViewVO vo) {
+ supplierProductModelService.addModel(vo);
+ return ResultUtil.success();
+ }
+ /**
+ * 修改
+ */
+ @PutMapping("/modifyModel")
+ @SystemLog(value = "-修改型号与规格")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModel:modify')")
+ public ResponseEntity modifyModel(@Validated @RequestBody ProductModelViewVO vo) {
+ supplierProductModelService.modifyModel(vo);
+ return ResultUtil.success();
+ }
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/getModelDetails/{id}")
+ @SystemLog(value = "-获取型号详情")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModel:query')")
+ public ResponseEntity getModelDetails(@PathVariable("id") String id) {
+ List detailsList=supplierProductModelService.getModelDetails(id);
+ return ResultUtil.success(detailsList);
+ }
+ //region 基本操作
+ /**
+ * 初始化
+ */
+ @GetMapping("/init")
+ public ResponseEntity init() {
+ SupplierProductModel entity=supplierProductModelService.init();
+ SupplierProductModelVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/")
+ @SystemLog(value = "-新增")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModel:add')")
+ public ResponseEntity add(@Validated @RequestBody SupplierProductModelVO vo) {
+ SupplierProductModel entity=convert2Entity(vo);
+ supplierProductModelService.add(entity);
+ SupplierProductModelVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 修改
+ */
+ @PutMapping("/")
+ @SystemLog(value = "-修改")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModel:modify')")
+ public ResponseEntity modify(@Validated @RequestBody SupplierProductModelVO vo) {
+ SupplierProductModel entity=convert2Entity(vo);
+ supplierProductModelService.modify(entity);
+ SupplierProductModelVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 删除数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @DeleteMapping("/{id}")
+ @SystemLog(value = "-删除")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModel:remove')")
+ public ResponseEntity remove(@PathVariable("id") String id) {
+ supplierProductModelService.remove(id);
+ return ResultUtil.success();
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @SystemLog(value = "-分页")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModel:query')")
+ public ResponseEntity page(SupplierProductModelVO queryVO, PageInfo pageInfo, SortInfo sortInfo) {
+ //构造分页对象
+ IPage page = new Page(pageInfo.getPageNum(), pageInfo.getPageSize());
+
+
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(SupplierProductModel.class,queryVO,sortInfo);
+
+ //查询数据
+ supplierProductModelService.page(page, queryWrapper);
+ //转换vo
+ IPage pageVO = mapperFacade.map(page, IPage.class);
+ List supplierProductModelVOList=convert2VO(page.getRecords());
+ pageVO.setRecords(supplierProductModelVOList);
+ return ResultUtil.success(pageVO);
+ }
+
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @SystemLog(value = "-列表")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModel:query')")
+ public ResponseEntity list(SupplierProductModelVO queryVO, SortInfo sortInfo) {
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(SupplierProductModel.class, queryVO,sortInfo);
+ List list= supplierProductModelService.list(queryWrapper);
+ //转换vo
+ List supplierProductModelVOList=convert2VO(list);
+ return ResultUtil.success(supplierProductModelVOList);
+ }
+
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/{id}")
+ @SystemLog(value = "-详情")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModel:view')")
+ public ResponseEntity get(@PathVariable("id") String id) {
+ SupplierProductModel entity = supplierProductModelService.query(id);
+ SupplierProductModelVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 复制新增数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @PostMapping("/{id}")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModel:addByCopy')")
+ public ResponseEntity addByCopy(@PathVariable("id") String id) {
+ supplierProductModelService.addByCopy(id);
+ return ResultUtil.success();
+ }
+
+
+ /**
+ * 复制新增单条数据,返回复制后的对象
+ */
+ @PostMapping("/{id}/addSingleByCopy")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModel:addByCopy')")
+ public ResponseEntity addSingleByCopy(@PathVariable("id") String id) {
+ SupplierProductModel entity = supplierProductModelService.addSingleByCopy(id);
+ SupplierProductModelVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+ //endregion
+
+ //region 扩展操作
+
+ //endregion
+
+ //region 辅助操作
+
+ /**
+ * 将单条实体转换为视图对象
+ *
+ * @param entity 实体
+ * @return {@link EntityVO} 视图对象
+ */
+ protected SupplierProductModelVO convert2VO(SupplierProductModel entity){
+ SupplierProductModelVO vo=mapperFacade.map(entity,SupplierProductModelVO.class);
+ return vo;
+ }
+
+ /**
+ * 将实体列表转换为视图对象列表
+ *
+ * @param entityList 实体列表
+ * @return {@link List}<{@link EntityVO}> 视图对象列表
+ */
+ protected List convert2VO(List entityList) {
+ List voList = new ArrayList<>(entityList.size());
+
+ entityList.stream().forEach(x -> {
+ SupplierProductModelVO vo = convert2VO(x);
+ voList.add(vo);
+ });
+ return voList;
+ }
+
+
+ private SupplierProductModel convert2Entity(SupplierProductModelVO vo){
+ SupplierProductModel entity=mapperFacade.map(vo,SupplierProductModel.class);
+ return entity;
+ }
+
+ //endregion
+ }
\ No newline at end of file
diff --git a/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/SupplierProductModelDetailsController.java b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/SupplierProductModelDetailsController.java
new file mode 100644
index 0000000..5f767f4
--- /dev/null
+++ b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/SupplierProductModelDetailsController.java
@@ -0,0 +1,205 @@
+package tech.abc.platform.productManagement.controller;
+
+
+import org.springframework.web.bind.annotation.RestController;
+import tech.abc.platform.common.base.BaseController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import tech.abc.platform.common.annotation.SystemLog;
+import tech.abc.platform.common.query.QueryGenerator;
+import tech.abc.platform.common.utils.ResultUtil;
+import tech.abc.platform.common.vo.PageInfo;
+import tech.abc.platform.common.vo.Result;
+import tech.abc.platform.common.vo.SortInfo;
+import tech.abc.platform.productManagement.entity.SupplierProductModelDetails;
+import tech.abc.platform.productManagement.service.SupplierProductModelDetailsService;
+import tech.abc.platform.productManagement.vo.SupplierProductModelDetailsVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+* 前端控制器类
+*
+* @author ZHB
+* @date 2024-05-14
+*/
+@RestController
+@RequestMapping("/productManagement/supplierProductModelDetails")
+@Slf4j
+public class SupplierProductModelDetailsController extends BaseController {
+ @Autowired
+ private SupplierProductModelDetailsService supplierProductModelDetailsService;
+
+ //region 基本操作
+ /**
+ * 初始化
+ */
+ @GetMapping("/init")
+ public ResponseEntity init() {
+ SupplierProductModelDetails entity=supplierProductModelDetailsService.init();
+ SupplierProductModelDetailsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/")
+ @SystemLog(value = "-新增")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModelDetails:add')")
+ public ResponseEntity add(@Validated @RequestBody SupplierProductModelDetailsVO vo) {
+ SupplierProductModelDetails entity=convert2Entity(vo);
+ supplierProductModelDetailsService.add(entity);
+ SupplierProductModelDetailsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 修改
+ */
+ @PutMapping("/")
+ @SystemLog(value = "-修改")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModelDetails:modify')")
+ public ResponseEntity modify(@Validated @RequestBody SupplierProductModelDetailsVO vo) {
+ SupplierProductModelDetails entity=convert2Entity(vo);
+ supplierProductModelDetailsService.modify(entity);
+ SupplierProductModelDetailsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 删除数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @DeleteMapping("/{id}")
+ @SystemLog(value = "-删除")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModelDetails:remove')")
+ public ResponseEntity remove(@PathVariable("id") String id) {
+ supplierProductModelDetailsService.remove(id);
+ return ResultUtil.success();
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @SystemLog(value = "-分页")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModelDetails:query')")
+ public ResponseEntity page(SupplierProductModelDetailsVO queryVO, PageInfo pageInfo, SortInfo sortInfo) {
+ //构造分页对象
+ IPage page = new Page(pageInfo.getPageNum(), pageInfo.getPageSize());
+
+
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(SupplierProductModelDetails.class,queryVO,sortInfo);
+
+ //查询数据
+ supplierProductModelDetailsService.page(page, queryWrapper);
+ //转换vo
+ IPage pageVO = mapperFacade.map(page, IPage.class);
+ List supplierProductModelDetailsVOList=convert2VO(page.getRecords());
+ pageVO.setRecords(supplierProductModelDetailsVOList);
+ return ResultUtil.success(pageVO);
+ }
+
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @SystemLog(value = "-列表")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModelDetails:query')")
+ public ResponseEntity list(SupplierProductModelDetailsVO queryVO, SortInfo sortInfo) {
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(SupplierProductModelDetails.class, queryVO,sortInfo);
+ List list= supplierProductModelDetailsService.list(queryWrapper);
+ //转换vo
+ List supplierProductModelDetailsVOList=convert2VO(list);
+ return ResultUtil.success(supplierProductModelDetailsVOList);
+ }
+
+ /**
+ * 获取单条数据
+ */
+ @GetMapping("/{id}")
+ @SystemLog(value = "-详情")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModelDetails:view')")
+ public ResponseEntity get(@PathVariable("id") String id) {
+ SupplierProductModelDetails entity = supplierProductModelDetailsService.query(id);
+ SupplierProductModelDetailsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 复制新增数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @PostMapping("/{id}")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModelDetails:addByCopy')")
+ public ResponseEntity addByCopy(@PathVariable("id") String id) {
+ supplierProductModelDetailsService.addByCopy(id);
+ return ResultUtil.success();
+ }
+
+
+ /**
+ * 复制新增单条数据,返回复制后的对象
+ */
+ @PostMapping("/{id}/addSingleByCopy")
+ @SystemLog(value = "-复制新增")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProductModelDetails:addByCopy')")
+ public ResponseEntity addSingleByCopy(@PathVariable("id") String id) {
+ SupplierProductModelDetails entity = supplierProductModelDetailsService.addSingleByCopy(id);
+ SupplierProductModelDetailsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+ //endregion
+
+ //region 扩展操作
+
+ //endregion
+
+ //region 辅助操作
+
+ /**
+ * 将单条实体转换为视图对象
+ *
+ * @param entity 实体
+ * @return {@link EntityVO} 视图对象
+ */
+ protected SupplierProductModelDetailsVO convert2VO(SupplierProductModelDetails entity){
+ SupplierProductModelDetailsVO vo=mapperFacade.map(entity,SupplierProductModelDetailsVO.class);
+ return vo;
+ }
+
+ /**
+ * 将实体列表转换为视图对象列表
+ *
+ * @param entityList 实体列表
+ * @return {@link List}<{@link EntityVO}> 视图对象列表
+ */
+ protected List convert2VO(List entityList) {
+ List voList = new ArrayList<>(entityList.size());
+
+ entityList.stream().forEach(x -> {
+ SupplierProductModelDetailsVO vo = convert2VO(x);
+ voList.add(vo);
+ });
+ return voList;
+ }
+
+
+ private SupplierProductModelDetails convert2Entity(SupplierProductModelDetailsVO vo){
+ SupplierProductModelDetails entity=mapperFacade.map(vo,SupplierProductModelDetails.class);
+ return entity;
+ }
+
+ //endregion
+ }
\ No newline at end of file
diff --git a/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/SupplierProductsController.java b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/SupplierProductsController.java
new file mode 100644
index 0000000..ffcae02
--- /dev/null
+++ b/platform-boot-started-productManagement/src/main/java/tech/abc/platform/productManagement/controller/SupplierProductsController.java
@@ -0,0 +1,217 @@
+package tech.abc.platform.productManagement.controller;
+
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.RestController;
+import tech.abc.platform.common.base.BaseController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import tech.abc.platform.common.annotation.SystemLog;
+import tech.abc.platform.common.query.QueryGenerator;
+import tech.abc.platform.common.utils.ResultUtil;
+import tech.abc.platform.common.vo.PageInfo;
+import tech.abc.platform.common.vo.Result;
+import tech.abc.platform.common.vo.SortInfo;
+import tech.abc.platform.productManagement.entity.SupplierProducts;
+import tech.abc.platform.productManagement.service.SupplierProductModelService;
+import tech.abc.platform.productManagement.service.SupplierProductsService;
+import tech.abc.platform.productManagement.vo.SupplierProductsVO;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+* 前端控制器类
+*
+* @author ZHB
+* @date 2024-05-08
+*/
+@RestController
+@RequestMapping("/productManagement/supplierProducts")
+@Slf4j
+public class SupplierProductsController extends BaseController {
+ @Autowired
+ private SupplierProductsService supplierProductsService;
+
+ @Autowired
+ private SupplierProductModelService supplierProductModelService;
+
+ //region 基本操作
+ /**
+ * 初始化
+ */
+ @GetMapping("/init")
+ public ResponseEntity init() {
+ SupplierProducts entity=supplierProductsService.init();
+ SupplierProductsVO vo = convert2VO(entity);
+ return ResultUtil.success(vo);
+ }
+
+ /**
+ * 新增
+ */
+ @PostMapping("/")
+ @SystemLog(value = "-新增")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProducts:add')")
+ public ResponseEntity add(@Validated @RequestBody SupplierProductsVO vo) {
+ SupplierProducts entity=convert2Entity(vo);
+ supplierProductsService.add(entity);
+ SupplierProductsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 修改
+ */
+ @PutMapping("/")
+ @SystemLog(value = "-修改")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProducts:modify')")
+ public ResponseEntity modify(@Validated @RequestBody SupplierProductsVO vo) {
+ SupplierProducts entity=convert2Entity(vo);
+ supplierProductsService.modify(entity);
+ SupplierProductsVO newVO = convert2VO(entity);
+ return ResultUtil.success(newVO);
+ }
+
+ /**
+ * 删除数据,单条数据标识,或多条数据标识用逗号间隔拼成的字符串
+ */
+ @DeleteMapping("/{id}")
+ @SystemLog(value = "-删除")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProducts:remove')")
+ public ResponseEntity remove(@PathVariable("id") String id) {
+ supplierProductsService.remove(id);
+ return ResultUtil.success();
+ }
+
+ /**
+ * 分页
+ */
+ @GetMapping("/page")
+ @SystemLog(value = "-分页")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProducts:query')")
+ public ResponseEntity page(SupplierProductsVO queryVO, PageInfo pageInfo, SortInfo sortInfo) {
+ //构造分页对象
+ IPage page = new Page(pageInfo.getPageNum(), pageInfo.getPageSize());
+
+
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(SupplierProducts.class,queryVO,sortInfo);
+
+ //查询数据
+ supplierProductsService.page(page, queryWrapper);
+ //转换vo
+ IPage pageVO = mapperFacade.map(page, IPage.class);
+ List supplierProductsVOList=convert2VO(page.getRecords());
+ pageVO.setRecords(supplierProductsVOList);
+ return ResultUtil.success(pageVO);
+ }
+
+
+ /**
+ * 列表
+ */
+ @GetMapping("/list")
+ @SystemLog(value = "-列表")
+ @PreAuthorize("hasPermission(null,'productManagement:supplierProducts:query')")
+ public ResponseEntity list(SupplierProductsVO queryVO, SortInfo sortInfo) {
+ //构造查询条件
+ QueryWrapper queryWrapper = QueryGenerator.generateQueryWrapper(SupplierProducts.class, queryVO,sortInfo);
+ List