From 9dd551d5bafcaf6ac9d014a682a0dcfbe1016162 Mon Sep 17 00:00:00 2001 From: Augcl <17674666882@163.com> Date: Wed, 21 Aug 2024 22:53:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E5=BC=80Swagger=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/jeecg/config/Swagger2Config.java | 2 +- .../java/org/jeecg/config/shiro/ShiroConfig.java | 3 + .../api/bean/ApiOwClassificationBean.java | 30 ++++ .../officialWebsite/api/bean/ApiOwImageBean.java | 56 +++++-- .../officialWebsite/api/bean/ApiOwParamBean.java | 22 +++ .../officialWebsite/api/bean/ApiOwProductBean.java | 37 +++++ .../controller/ApiOwClassificationController.java | 23 +++ .../api/controller/ApiOwImageController.java | 24 +++ .../api/controller/ApiOwParamController.java | 22 +++ .../api/controller/ApiOwProductController.java | 22 +++ .../api/frontController/FrontController.java | 167 +++++++++++++++++++++ .../api/mapper/ApiOwClassificationMapper.java | 3 + .../api/mapper/ApiOwImageMapper.java | 4 + .../api/mapper/ApiOwParamMapper.java | 3 + .../api/mapper/ApiOwProductMapper.java | 3 + .../api/mapper/xml/ApiOwClassificationMapper.xml | 15 ++ .../api/mapper/xml/ApiOwImageMapper.xml | 20 +++ .../api/mapper/xml/ApiOwParamMapper.xml | 19 +++ .../api/mapper/xml/ApiOwProductMapper.xml | 25 +++ .../api/service/ApiOwClassificationService.java | 3 + .../api/service/ApiOwImageService.java | 4 + .../api/service/ApiOwParamService.java | 3 + .../api/service/ApiOwProductService.java | 3 + .../impl/ApiOwClassificationServiceImpl.java | 6 + .../api/service/impl/ApiOwImageServiceImpl.java | 7 + .../api/service/impl/ApiOwParamServiceImpl.java | 6 + .../api/service/impl/ApiOwProductServiceImpl.java | 6 + .../demo/officialWebsite/api/utils/Utils.java | 69 +++++++++ .../src/main/resources/application-dev.yml | 4 +- .../src/main/resources/application-prod.yml | 12 +- 30 files changed, 602 insertions(+), 21 deletions(-) create mode 100644 jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/frontController/FrontController.java create mode 100644 jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/utils/Utils.java diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger2Config.java b/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger2Config.java index b8500a4..030a932 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger2Config.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/config/Swagger2Config.java @@ -68,7 +68,7 @@ public class Swagger2Config implements WebMvcConfigurer { .apiInfo(apiInfo()) .select() //此包路径下的类,才生成接口文档 - .apis(RequestHandlerSelectors.basePackage("org.jeecg.modules.demo.officialWebsite.api")) + .apis(RequestHandlerSelectors.basePackage("org.jeecg.modules.demo.officialWebsite.api.frontController")) //加了ApiOperation注解的类,才生成接口文档 .apis(RequestHandlerSelectors.withClassAnnotation(RestController.class)) .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index c916e9d..1cab9ec 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -77,6 +77,9 @@ public class ShiroConfig { } // 配置不会被拦截的链接 顺序判断 + //前端接口 + filterChainDefinitionMap.put("/display/**", "anon"); //officialWebsite-owParam + //officialWebsite filterChainDefinitionMap.put("/apiOwClassification/**", "anon"); //officialWebsite-owClassification filterChainDefinitionMap.put("/apiOwImage/**", "anon"); //officialWebsite-owImage diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwClassificationBean.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwClassificationBean.java index 95d58c8..8098295 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwClassificationBean.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwClassificationBean.java @@ -1,22 +1,37 @@ package org.jeecg.modules.demo.officialWebsite.api.bean; +import io.swagger.annotations.ApiModelProperty; import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; public class ApiOwClassificationBean { + @ApiModelProperty(value = "主键") private String id; + @ApiModelProperty(value = "创建人") private String createBy; @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建时间") private Date createTime; + @ApiModelProperty(value = "更新人") private String updateBy; @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新时间") private Date updateTime; + @ApiModelProperty(value = "所属部门") private String sysOrgCode; + @ApiModelProperty(value = "父级编号") private String pid; + @ApiModelProperty(value = "是否有子节点") private String hasChild; + @ApiModelProperty(value = "分类名称") private String name; + @ApiModelProperty(value = "页码", required = true) + private int pageNo; + @ApiModelProperty(value = "查询范围大小", required = true) + private int pageSize; + //无参构造 public ApiOwClassificationBean() { } @@ -106,4 +121,19 @@ public class ApiOwClassificationBean { this.name = name; } + public int getPageNo() { + return pageNo; + } + + public void setPageNo(int pageNo) { + this.pageNo = pageNo; + } + + public int getPageSize() { + return pageSize; + } + + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } } diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwImageBean.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwImageBean.java index c8c7c3d..c53e406 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwImageBean.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwImageBean.java @@ -1,25 +1,44 @@ package org.jeecg.modules.demo.officialWebsite.api.bean; +import com.mchange.v1.cachedstore.Vacuumable; +import io.swagger.annotations.ApiModelProperty; import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; public class ApiOwImageBean{ - private String id; //图片id - private String createBy; //创建人 + @ApiModelProperty(value = "主键") + private String id; + @ApiModelProperty(value = "创建人") + private String createBy; @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date createTime; //创建时间 - private String updateBy; //更新人 + @ApiModelProperty(value = "创建时间") + private Date createTime; + @ApiModelProperty(value = "更新人") + private String updateBy; @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date updateTime; //更新时间 - private String sysOrgCode; //所属部门 - private String imageAddress; //图片地址 - private String imagePosition; //图片坐标 - private String imageTitle; //图片标题 - private String imageShortTitle; //图片短标题 - private String imageDescribe; //图片描述 - private String classificationId; //图片父级编号 + @ApiModelProperty(value = "更新时间") + private Date updateTime; + @ApiModelProperty(value = "所属部门") + private String sysOrgCode; + @ApiModelProperty(value = "图片地址") + private String imageAddress; + @ApiModelProperty(value = "图片坐标") + private String imagePosition; + @ApiModelProperty(value = "图片标题") + private String imageTitle; + @ApiModelProperty(value = "图片短标题") + private String imageShortTitle; + @ApiModelProperty(value = "图片描述") + private String imageDescribe; + @ApiModelProperty(value = "父级分类编号") + private String classificationId; + + @ApiModelProperty(value = "当前页码", required = true) + private int pageNo; + @ApiModelProperty(value = "页面数据条数", required = true) + private int pageSize; //无参构造 public ApiOwImageBean() { @@ -137,6 +156,19 @@ public class ApiOwImageBean{ this.classificationId = classificationId; } + public int getPageNo() { + return pageNo; + } + public void setPageNo(int pageNo) { + this.pageNo = pageNo; + } + public int getPageSize() { + return pageSize; + } + + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } } diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwParamBean.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwParamBean.java index 0745e1f..5f1fd3a 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwParamBean.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwParamBean.java @@ -1,5 +1,6 @@ package org.jeecg.modules.demo.officialWebsite.api.bean; +import io.swagger.annotations.ApiModelProperty; import org.springframework.format.annotation.DateTimeFormat; public class ApiOwParamBean { @@ -16,6 +17,12 @@ public class ApiOwParamBean { private String paramValue; private String paramDesc; + @ApiModelProperty(value = "当前页码", required = true) + private int pageNo; + @ApiModelProperty(value = "页面数据条数范围", required = true) + private int pageSize; + + //无参构造 public ApiOwParamBean() { } @@ -105,4 +112,19 @@ public class ApiOwParamBean { this.paramDesc = paramDesc; } + public int getPageNo() { + return pageNo; + } + + public void setPageNo(int pageNo) { + this.pageNo = pageNo; + } + + public int getPageSize() { + return pageSize; + } + + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } } diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwProductBean.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwProductBean.java index 021d09e..e9d4f11 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwProductBean.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/bean/ApiOwProductBean.java @@ -1,29 +1,50 @@ package org.jeecg.modules.demo.officialWebsite.api.bean; +import io.swagger.annotations.ApiModelProperty; import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; public class ApiOwProductBean { + @ApiModelProperty(value = "主键") private String id; + @ApiModelProperty(value = "创建人") private String createBy; @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建时间") private Date createTime; + @ApiModelProperty(value = "更新人") private String updateBy; @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新时间") private Date updateTime; + @ApiModelProperty(value = "所属部门") private String sysOrgCode; + @ApiModelProperty(value = "产品图片地址") private String productImageAddress; + @ApiModelProperty(value = "产品图片坐标") private String productImagePosition; + @ApiModelProperty(value = "产品标题") private String productTitle; + @ApiModelProperty(value = "产品短标题") private String productShortTitle; + @ApiModelProperty(value = "产品描述") private String productDescribe; + @ApiModelProperty(value = "父级分类编号", required = true) private String classificationId; + @ApiModelProperty(value = "是否为热门产品:1-是 0-否") private String isHot; + @ApiModelProperty(value = "产品慕课地址") private String productAddressMc; + @ApiModelProperty(value = "产品网站地址") private String productAddressNet; + @ApiModelProperty(value = "当前页码", required = true) + private int pageNo; + @ApiModelProperty(value = "页码数据条数范围", required = true) + private int pageSize; + //无参构造 public ApiOwProductBean() { } @@ -166,4 +187,20 @@ public class ApiOwProductBean { public void setProductAddressNet(String productAddressNet) { this.productAddressNet = productAddressNet; } + + public int getPageNo() { + return pageNo; + } + + public void setPageNo(int pageNo) { + this.pageNo = pageNo; + } + + public int getPageSize() { + return pageSize; + } + + public void setPageSize(int pageSize) { + this.pageSize = pageSize; + } } diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwClassificationController.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwClassificationController.java index 53dbaf3..be9d449 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwClassificationController.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwClassificationController.java @@ -20,6 +20,29 @@ public class ApiOwClassificationController { @Resource private ApiOwClassificationService apiOwClassificationService; + //分页查询 + @AutoLog(value = "图片分类表-分页查询") + @ApiOperation(value = "图片分类表-分页查询", notes = "分页查询") + @RequestMapping(value = "/querySplit", method = {RequestMethod.GET}) + public List querySplit(ApiOwClassificationBean apiOwClassificationBean,int pageNo, int pageSize){ + + //数据总量 + int count = apiOwClassificationService.queryAllClassification(apiOwClassificationBean).size(); + //计算总页数 + int pageCount = count%pageSize==0?count/pageSize:count/pageSize+1; + //边界判断 + if(pageNo < 1){ + pageNo = 1; + }else if(pageNo > pageCount){ + pageNo = pageCount; + } + //查询开始下标 + int beginIndex = (pageNo-1)*pageSize; + apiOwClassificationBean.setPageNo(beginIndex); + apiOwClassificationBean.setPageSize(pageSize); + return apiOwClassificationService.querySplit(apiOwClassificationBean); + } + //查询所有分类 @AutoLog(value = "图片分类表-查询所有") @ApiOperation(value="图片分类表-查询所有", notes="根据传入的参数进行条件查询") diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwImageController.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwImageController.java index 3dd7d5b..39de917 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwImageController.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwImageController.java @@ -4,6 +4,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.modules.demo.officialWebsite.api.bean.ApiOwClassificationBean; import org.jeecg.modules.demo.officialWebsite.api.bean.ApiOwImageBean; import org.jeecg.modules.demo.officialWebsite.api.service.ApiOwImageService; import org.springframework.web.bind.annotation.*; @@ -20,6 +21,29 @@ public class ApiOwImageController { @Resource private ApiOwImageService apiOwImageService; + //分页查询 + @AutoLog(value = "图片分类表-分页查询") + @ApiOperation(value = "图片分类表-分页查询", notes = "分页查询") + @RequestMapping(value = "/querySplit", method = {RequestMethod.GET}) + public List querySplit(ApiOwImageBean apiOwImageBean, int pageNo, int pageSize){ + + //数据总量 + int count = apiOwImageService.queryAll(apiOwImageBean).size(); + //计算总页数 + int pageCount = count%pageSize==0?count/pageSize:count/pageSize+1; + //边界判断 + if(pageNo < 1){ + pageNo = 1; + }else if(pageNo > pageCount){ + pageNo = pageCount; + } + //查询开始下标 + int beginIndex = (pageNo-1)*pageSize; + apiOwImageBean.setPageNo(beginIndex); + apiOwImageBean.setPageSize(pageSize); + return apiOwImageService.querySplit(apiOwImageBean); + } + @AutoLog(value = "图片信息表-查询所有") @ApiOperation(value="图片信息表-查询所有", notes="根据传入的参数进行条件查询") @GetMapping(value = "/queryAll") diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwParamController.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwParamController.java index 775ad1b..e6bbbe8 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwParamController.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwParamController.java @@ -22,6 +22,28 @@ public class ApiOwParamController { @Resource private ApiOwParamService apiOwParamService; + //分页查询 + @AutoLog(value = "参数配置表-分页查询") + @ApiOperation(value = "参数配置表-分页查询", notes = "根据传入参数进行查询") + @RequestMapping(value = "/querySplit", method = {RequestMethod.GET}) + public List querySplit(ApiOwParamBean apiOwParamBean, int pageNo, int pageSize){ + //数据总量 + int count = apiOwParamService.queryAll(apiOwParamBean).size(); + //计算总页数 + int pageCount = count%pageSize==0?count/pageSize:count/pageSize+1; + //边界判断 + if(pageNo < 1){ + pageNo = 1; + }else if(pageNo > pageCount){ + pageNo = pageCount; + } + //查询开始下标 + int beginIndex = (pageNo-1)*pageSize; + apiOwParamBean.setPageNo(beginIndex); + apiOwParamBean.setPageSize(pageSize); + return apiOwParamService.querySplit(apiOwParamBean); + } + //查询所有 @AutoLog(value = "参数配置表-查询所有") @ApiOperation(value = "参数配置表-查询所有", notes = "根据传入参数进行查询") diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwProductController.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwProductController.java index 4f1817a..59ac072 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwProductController.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/controller/ApiOwProductController.java @@ -23,6 +23,28 @@ public class ApiOwProductController { @Resource private ApiOwProductService apiOwProductService; + //查询所有 + @AutoLog(value = "产品信息表-分页查询") + @ApiOperation(value = "产品信息表-分页查询", notes = "分页查询") + @RequestMapping(value = "/querySplit", method = {RequestMethod.GET}) + public List querySplit(ApiOwProductBean apiOwProductBean, int pageNo, int pageSize){ + //数据总量 + int count = apiOwProductService.queryAll(apiOwProductBean).size(); + //计算总页数 + int pageCount = count%pageSize==0?count/pageSize:count/pageSize+1; + //边界判断 + if(pageNo < 1){ + pageNo = 1; + }else if(pageNo > pageCount){ + pageNo = pageCount; + } + //查询开始下标 + int beginIndex = (pageNo-1)*pageSize; + apiOwProductBean.setPageNo(beginIndex); + apiOwProductBean.setPageSize(pageSize); + return apiOwProductService.querySplit(apiOwProductBean); + } + //查询所有 @AutoLog(value = "产品信息表-查询所有") @ApiOperation(value = "产品信息表-查询所有", notes = "查询所有") diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/frontController/FrontController.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/frontController/FrontController.java new file mode 100644 index 0000000..7e2ebc0 --- /dev/null +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/frontController/FrontController.java @@ -0,0 +1,167 @@ +package org.jeecg.modules.demo.officialWebsite.api.frontController; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.modules.demo.officialWebsite.api.bean.ApiOwImageBean; +import org.jeecg.modules.demo.officialWebsite.api.bean.ApiOwProductBean; +import org.jeecg.modules.demo.officialWebsite.api.service.ApiOwImageService; +import org.jeecg.modules.demo.officialWebsite.api.service.ApiOwProductService; +import org.jeecg.modules.demo.officialWebsite.api.utils.Utils; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.List; + +@Api(tags = "前端展示页面") +@RestController +@RequestMapping(value = "/display") +@Slf4j +public class FrontController { + + @Resource + private ApiOwImageService apiOwImageService; + @Resource + private ApiOwProductService apiOwProductService; + + /*******************************************************************************************************************/ + /***********************************************图片部分************************************************************/ + //图片信息查询公共方法 + public List queryImageUtil(String classificationId, int pageNo, int pageSize){ + ApiOwImageBean apiOwImageBean = new ApiOwImageBean(); + int count = apiOwImageService.queryAll(apiOwImageBean).size(); + ApiOwImageBean apiOwImageBean1 = Utils.split(apiOwImageBean, classificationId, count,pageNo,pageSize); + return apiOwImageService.querySplit(apiOwImageBean1); + } + + @AutoLog(value = "首页-轮播图") + @ApiOperation(value = "首页-轮播图", notes = "classificationId-父级图片编号(首页_轮播图); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryFirstPageBanner", method = {RequestMethod.GET}) + public List queryFirstPageBanner(String classificationId, int pageNo, int pageSize){ + return this.queryImageUtil(classificationId,pageNo,pageSize); + } + + @AutoLog(value = "首页-定制软件开发") + @ApiOperation(value = "首页-定制软件开发", notes = "classificationId-父级图片编号(定制软件开发); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryCustomieSoftware", method = {RequestMethod.GET}) + public List queryCustomieSoftware(String classificationId, int pageNo, int pageSize){ + return this.queryImageUtil(classificationId,pageNo,pageSize); + } + + @AutoLog(value = "首页-软件产品开发") + @ApiOperation(value = "首页-软件产品开发", notes = "classificationId-父级图片编号(软件产品开发); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/querySoftware", method = {RequestMethod.GET}) + public List querySoftware(String classificationId,int pageNo, int pageSize){ + return this.queryImageUtil(classificationId,pageNo,pageSize); + } + + @AutoLog(value = "关于我们-轮播图") + @ApiOperation(value = "关于我们-轮播图", notes = "classificationId-父级图片编号(关于我们_轮播图); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryAboutUsBanner", method = {RequestMethod.GET}) + public List queryAboutUsBanner(String classificationId,int pageNo, int pageSize){ + return this.queryImageUtil(classificationId,pageNo,pageSize); + } + + @AutoLog(value = "关于我们-信息展示") + @ApiOperation(value = "关于我们-信息展示", notes = "classificationId-父级图片编号(关于我们_信息展示); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryAboutUsInfo", method = {RequestMethod.GET}) + public List query6(String classificationId,int pageNo, int pageSize){ + return this.queryImageUtil(classificationId,pageNo,pageSize); + } + + @AutoLog(value = "服务项目-轮播图") + @ApiOperation(value = "服务项目-轮播图", notes = "classificationId-父级图片编号(服务项目_轮播图); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryServeBanner", method = {RequestMethod.GET}) + public List queryServeBanner(String classificationId,int pageNo, int pageSize){ + return this.queryImageUtil(classificationId,pageNo,pageSize); + } + + @AutoLog(value = "服务项目-信息展示") + @ApiOperation(value = "服务项目-信息展示", notes = "classificationId-父级图片编号(服务项目_信息展示); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryServeInfo", method = {RequestMethod.GET}) + public List query8(String classificationId,int pageNo, int pageSize){ + return this.queryImageUtil(classificationId,pageNo,pageSize); + } + + @AutoLog(value = "联系我们-加入我们的团队") + @ApiOperation(value = "联系我们-加入我们的团队", notes = "classificationId-父级编号(联系我们-加入我们的团队); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryJoinUs", method = {RequestMethod.GET}) + public List queryJoinUs(String classificationId,int pageNo, int pageSize){ + return this.queryImageUtil(classificationId,pageNo,pageSize); + } + + /*******************************************************************************************************************/ + /***********************************************程序部分************************************************************/ + //程序信息查询公共方法 + public List queryProgramUtil(String classificationId, int pageNo, int pageSize){ + ApiOwProductBean apiOwProductBean = new ApiOwProductBean(); + int count = apiOwProductService.queryAll(apiOwProductBean).size(); + ApiOwProductBean apiOwProductBean1 = Utils.split(apiOwProductBean, classificationId,count,pageNo,pageSize); + return apiOwProductService.querySplit(apiOwProductBean1); + } + public List queryProgramUtil1(String classificationId,String isHot, int pageNo, int pageSize){ + HashMap map = new HashMap<>(); + ApiOwProductBean apiOwProductBean = new ApiOwProductBean(); + //查询数据总量 + int count = apiOwProductService.queryAll(apiOwProductBean).size(); + //将参数打包 + map.put("classificationId",classificationId); + map.put("isHot",isHot); + map.put("pageNo",pageNo); + map.put("pageSize",pageSize); + map.put("count",count); + map.put("apiOwProductBean",apiOwProductBean); + ApiOwProductBean apiOwProductBean1 = Utils.split1(map); + return apiOwProductService.querySplit(apiOwProductBean1); + } + + + @AutoLog(value = "首页-案例展示") + @ApiOperation(value = "首页-案例展示", notes = "classificationId-父级图片编号(案例展示); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryExample", method = {RequestMethod.GET}) + public List queryExample(String classificationId, String isHot, int pageNo, int pageSize){ + return this.queryProgramUtil1(classificationId,isHot,pageNo,pageSize); + } + + @AutoLog(value = "案例展示-系统平台") + @ApiOperation(value = "案例展示-系统平台", notes = "classificationId-父级产品编号(案例展示_系统平台); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryExampleSystem", method = {RequestMethod.GET}) + public List queryExampleSystem(String classificationId,int pageNo, int pageSize){ + return this.queryProgramUtil(classificationId,pageNo,pageSize); + } + + @AutoLog(value = "案例展示-APP") + @ApiOperation(value = "案例展示-APP", notes = "classificationId-父级产品编号(案例展示_APP); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryExampleApp", method = {RequestMethod.GET}) + public List queryExampleApp(String classificationId,int pageNo, int pageSize){ + return this.queryProgramUtil(classificationId,pageNo,pageSize); + } + + @AutoLog(value = "案例展示-电商平台") + @ApiOperation(value = "案例展示-电商平台", notes = "classificationId-父级产品编号(案例展示_电商平台); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryExampleRetailer", method = {RequestMethod.GET}) + public List queryExampleRetailer(String classificationId,int pageNo, int pageSize){ + return this.queryProgramUtil(classificationId,pageNo,pageSize); + } + + @AutoLog(value = "案例展示-小程序") + @ApiOperation(value = "案例展示-小程序", notes = "classificationId-父级产品编号(案例展示_小程序); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryExampleProgram", method = {RequestMethod.GET}) + public List queryExampleProgram(String classificationId,int pageNo, int pageSize){ + return this.queryProgramUtil(classificationId,pageNo,pageSize); + } + + @AutoLog(value = "案例展示-网站建设") + @ApiOperation(value = "案例展示-网站建设", notes = "classificationId-父级产品编号(案例展示_网站建设); pageNo-页码; pageSize-页面数据条数范围") + @RequestMapping(value = "/queryExampleWebsite", method = {RequestMethod.GET}) + public List queryExampleWebsite(String classificationId,int pageNo, int pageSize){ + return this.queryProgramUtil(classificationId,pageNo,pageSize); + } + + + +} diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwClassificationMapper.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwClassificationMapper.java index d5077ef..8aee50d 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwClassificationMapper.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwClassificationMapper.java @@ -8,6 +8,9 @@ import java.util.List; @Mapper public interface ApiOwClassificationMapper { + //分页查询 + public List querySplit(ApiOwClassificationBean apiOwClassificationBean); + //查询所有 public List queryAllClassification(ApiOwClassificationBean apiOwClassificationBean); diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwImageMapper.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwImageMapper.java index f311943..73f0917 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwImageMapper.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwImageMapper.java @@ -1,6 +1,7 @@ package org.jeecg.modules.demo.officialWebsite.api.mapper; import org.apache.ibatis.annotations.Mapper; +import org.jeecg.modules.demo.officialWebsite.api.bean.ApiOwClassificationBean; import org.jeecg.modules.demo.officialWebsite.api.bean.ApiOwImageBean; import java.util.List; @@ -8,6 +9,9 @@ import java.util.List; @Mapper public interface ApiOwImageMapper { + //分页查询 + public List querySplit(ApiOwImageBean apiOwImageBean); + //查询所有 public List queryAll(ApiOwImageBean apiOwImageBean); diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwParamMapper.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwParamMapper.java index 69a77ac..2d226ef 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwParamMapper.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwParamMapper.java @@ -8,6 +8,9 @@ import java.util.List; @Mapper public interface ApiOwParamMapper { + //分页查询 + public List querySplit(ApiOwParamBean apiOwParamBean); + //查询所有 public List queryAll(ApiOwParamBean apiOwParamBean); diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwProductMapper.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwProductMapper.java index 17aa921..0f0411a 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwProductMapper.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/ApiOwProductMapper.java @@ -8,6 +8,9 @@ import java.util.List; @Mapper public interface ApiOwProductMapper { + //分页查询 + public List querySplit(ApiOwProductBean apiOwProductBean); + //查询所有 public List queryAll(ApiOwProductBean apiOwProductBean); diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/xml/ApiOwClassificationMapper.xml b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/xml/ApiOwClassificationMapper.xml index abfc5f3..34bbfc0 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/xml/ApiOwClassificationMapper.xml +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/xml/ApiOwClassificationMapper.xml @@ -2,6 +2,21 @@ + + + + select id,create_by,create_time,update_by,update_time,sys_org_code,image_address,image_position,image_title,image_short_title,image_describe,classification_id + from ow_image + + and id = #{id} + and create_by = #{createBy} + and update_by = #{updateBy} + and sys_org_code = #{sysOrgCode} + and image_address = #{imageAddress} + and image_position = #{imagePosition} + and image_title = #{imageTitle} + and image_short_title = #{imageShortTitle} + and image_describe = #{imageDescribe} + and classification_id = #{classificationId} + + order by id asc + limit #{pageNo},#{pageSize} + + + select id,create_by,create_time,update_by,update_time,sys_org_code,param_code,param_value,param_desc + from ow_param + + and id = #{id} + and create_by = #{createBy} + and create_time = #{createTime} + and update_by = #{updateBy} + and update_time = #{updateTime} + and sys_org_code = #{sysOrgCode} + and param_code = #{paramCode} + and param_value = #{paramValue} + and param_desc = #{paramDesc} + + order by id asc + limit #{pageNo},#{pageSize} + + + select id,create_by,create_time,update_by,update_time,sys_org_code,product_image_address,product_image_position,product_title,product_short_title,product_describe,classification_id,is_hot,product_address_mc,product_address_net + from ow_product + + and id = #{id} + and create_by = #{createBy} + and create_time = #{createTime} + and update_by = #{updateBy} + and update_time = #{updateTime} + and sys_org_code = #{sysOrgCode} + and product_image_address = #{productImageAddress} + and product_image_position = #{productImagePosition} + and product_title = #{productTitle} + and product_short_title = #{productShortTitle} + and product_describe = #{productDescribe} + and classification_id = #{classificationId} + and is_hot = #{isHot} + and product_address_mc = #{productAddressMc} + and product_address_net = #{productAddressNet} + + order by id asc + limit #{pageNo},#{pageSize} + +