From a29c25dc89727a0c5a42b9c689b123f690b97584 Mon Sep 17 00:00:00 2001 From: Augcl <17674666882@163.com> Date: Sat, 24 Aug 2024 16:04:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E5=86=97=E4=BD=99=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/frontController/FrontController.java | 241 +++++++++++---------- .../api/mapper/xml/ApiOwClassificationMapper.xml | 29 ++- .../demo/officialWebsite/api/utils/Utils.java | 66 +++--- .../src/main/resources/application-dev.yml | 10 +- 4 files changed, 200 insertions(+), 146 deletions(-) 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 index 7e2ebc0..8468993 100644 --- 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 @@ -31,136 +31,147 @@ public class FrontController { /*******************************************************************************************************************/ /***********************************************图片部分************************************************************/ //图片信息查询公共方法 - public List queryImageUtil(String classificationId, int pageNo, int pageSize){ + @AutoLog(value = "图片信息查询公共方法") + @ApiOperation(value = "图片信息查询公共方法", notes = "参数说明:classificationId-父级图片编号(首页_轮播图), pageNo-页码, pageSize-页面数据条数范围;" + + "接口可供调用处:首页_轮播图、首页-定制软件开发、首页-软件产品开发、关于我们-轮播图、关于我们-信息展示、" + + "服务项目-轮播图、服务项目-信息展示、联系我们-加入我们的团队") + @RequestMapping(value = "/queryImage", method = {RequestMethod.GET}) + public List queryImage(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); - } +// @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){ + @AutoLog(value = "软件信息查询公共方法") + @ApiOperation(value = "软件信息查询公共方法", notes = "参数说明:classificationId-父级图片编号(首页_轮播图), pageNo-页码, pageSize-页面数据条数范围;" + + "接口可供调用处:首页-案例展示、案例展示-系统平台、案例展示-APP、案例展示-电商平台、案例展示-小程序、案例展示-网站建设") + @RequestMapping(value = "/queryProgram", method = {RequestMethod.GET}) + public List queryProgram(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); - } +// public List queryProgramUtil1(HashMap map){ +// 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.queryProgramUtil(classificationId,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/xml/ApiOwClassificationMapper.xml b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/mapper/xml/ApiOwClassificationMapper.xml index 34bbfc0..3a13c3f 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 @@ -37,8 +37,35 @@ insert into ow_classification (id,create_by,create_time,update_by,update_time,sys_org_code,has_child,pid,name) values - (#{id},#{createBy},#{createTime},#{updateBy},#{updateTime},#{sysOrgCode},#{hasChild},#{pid},#{name}); + (#{id},#{createBy},#{createTime},#{updateBy},#{updateTime},#{sysOrgCode},#{hasChild},#{pid},#{name}) + diff --git a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/utils/Utils.java b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/utils/Utils.java index 265dd40..0b86f5d 100644 --- a/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/utils/Utils.java +++ b/jeecg-module-officialWebsit/src/main/java/org/jeecg/modules/demo/officialWebsite/api/utils/Utils.java @@ -21,6 +21,7 @@ public class Utils { int beginIndex = (pageNo-1)*pageSize; apiOwImageBean.setPageNo(beginIndex); apiOwImageBean.setPageSize(pageSize); + apiOwImageBean.setClassification_id(type); return apiOwImageBean; } @@ -38,32 +39,45 @@ public class Utils { int beginIndex = (pageNo-1)*pageSize; productBean.setPageNo(beginIndex); productBean.setPageSize(pageSize); + productBean.setClassificationId(type); return productBean; } - public static ApiOwProductBean split1(HashMap map){ - //获取前端传递的数据 - int count = (int) map.get("count"); - int pageNo = (int) map.get("pageNo"); - int pageSize = (int) map.get("pageSize"); - String isHot = (String) map.get("isHot"); - ApiOwProductBean apiOwProductBean = (ApiOwProductBean) map.get("apiOwProductBean"); - - //计算总页数 - 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); - if("1".equals(isHot)){apiOwProductBean.setIsHot(isHot);} - - return apiOwProductBean; - } +// +// public static ApiOwProductBean split1(HashMap map){ +// //获取前端传递的数据 +// int count = (int) map.get("count"); +// int pageNo = (int) map.get("pageNo"); +// int pageSize = (int) map.get("pageSize"); +// String isHot = (String) map.get("isHot"); +// ApiOwProductBean apiOwProductBean = (ApiOwProductBean) map.get("apiOwProductBean"); +// +// //计算总页数 +// 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); +// if("1".equals(isHot)){apiOwProductBean.setIsHot(isHot);} +// +// return apiOwProductBean; +// } +// +// public static HashMap getMap(HashMap map, String ... params){ +// +// //将传递参数存入map +// for (String param : params) { +// String[] result = param.split(":"); +// map.put(result[0],result[1]); +// } +// +// return map; +// } } diff --git a/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml b/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml index 26411c0..64cfc34 100644 --- a/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml +++ b/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml @@ -187,10 +187,11 @@ jeecg: excludeUrls: /test/jeecgDemo/demo3,/test/jeecgDemo/redisDemo/**,/category/**,/visual/**,/map/**,/jmreport/bigscreen2/** #阿里云oss存储和大鱼短信秘钥配置 oss: - accessKey: ?? - secretKey: ?? - endpoint: oss-cn-beijing.aliyuncs.com - bucketName: jeecgdev + accessKey: LTAI5t6xqHCQ3qJnbgxaVciZ + secretKey: h5QnNmYLMdXRTBhgFJzsUCi9zcFbWy + endpoint: oss-cn-guangzhou.aliyuncs.com + bucketName: augcl + staticDomain: https://augcl.oss-cn-guangzhou.aliyuncs.com/ # ElasticSearch 6设置 elasticsearch: cluster-name: jeecg-ES @@ -237,6 +238,7 @@ cas: logging: level: org.jeecg.modules.system.mapper: info + org.jeecg.modules.demo.officialWebsite.api.mapper: debug #swagger knife4j: #开启增强配置