| @ -1,5 +1,6 @@ | |||
| NODE_ENV=development | |||
| VUE_APP_API_BASE_URL=http://localhost:8000/education-admin/ | |||
| VUE_APP_API_BASE_URL=https://www.jgyt.chat/education-admin/ | |||
| //VUE_APP_API_BASE_URL=http://localhost:8000/education-admin/ | |||
| VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas | |||
| VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview | |||
| @ -1,4 +1,5 @@ | |||
| NODE_ENV=production | |||
| VUE_APP_API_BASE_URL=http://localhost:8000/education-admin/ | |||
| VUE_APP_API_BASE_URL=https://www.jgyt.chat/education-admin/ | |||
| //VUE_APP_API_BASE_URL=http://localhost:8000/education-admin/ | |||
| VUE_APP_CAS_BASE_URL=http://localhost:8888/cas | |||
| VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview | |||
| @ -0,0 +1,19 @@ | |||
| package org.jeecg.modules.api.bean; | |||
| import io.swagger.annotations.ApiModelProperty; | |||
| import lombok.Data; | |||
| @Data | |||
| public class PageBean { | |||
| /**显示条数*/ | |||
| @ApiModelProperty(value = "显示条数" ) | |||
| private Integer pageSize; | |||
| /**当前页*/ | |||
| @ApiModelProperty(value = "当前页" ) | |||
| private Integer pageNo; | |||
| public PageBean() { | |||
| this.pageNo = 1; | |||
| this.pageSize = 1000; | |||
| } | |||
| } | |||
| @ -0,0 +1,82 @@ | |||
| package org.jeecg.modules.api.educationController; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| import org.jeecg.common.api.vo.Result; | |||
| import org.jeecg.modules.api.bean.PageBean; | |||
| import org.jeecg.modules.api.service.ConfigService; | |||
| 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; | |||
| @Api(tags="系统配置-相关接口") | |||
| @RestController | |||
| @RequestMapping("/education/config") | |||
| @Slf4j | |||
| public class ConfigController { | |||
| /******************************************************************************************************************/ | |||
| //配置信息 | |||
| @Resource | |||
| private ConfigService configService; | |||
| /******************************************************************************************************************/ | |||
| //查看系统配置列表 | |||
| @ApiOperation(value="系统配置-查询系统配置列表", notes="系统配置-查询系统配置列表") | |||
| @RequestMapping(value = "/queryConfigList", method = {RequestMethod.GET}) | |||
| public Result<?> queryConfigList(PageBean pageBean){ | |||
| return configService.queryConfigList(pageBean); | |||
| } | |||
| //查看系统配置详情 | |||
| @ApiOperation(value="系统配置-查询系统配置详情", notes="系统配置-查询系统配置详情") | |||
| @RequestMapping(value = "/queryConfigByParamCode", method = {RequestMethod.GET}) | |||
| public Result<?> queryConfigByParamCode(String paramCode){ | |||
| return configService.queryConfigByParamCode(paramCode); | |||
| } | |||
| //查看概述说明列表 | |||
| @ApiOperation(value="系统配置-查询概述说明列表", notes="系统配置-查询概述说明列表") | |||
| @RequestMapping(value = "/querySummaryList", method = {RequestMethod.GET}) | |||
| public Result<?> querySummaryList(PageBean pageBean){ | |||
| return configService.querySummaryList(pageBean); | |||
| } | |||
| //查看概述说明详情 | |||
| @ApiOperation(value="系统配置-查询概述说明详情", notes="系统配置-查询概述说明详情") | |||
| @RequestMapping(value = "/querySummaryByParamCode", method = {RequestMethod.GET}) | |||
| public Result<?> querySummaryByParamCode(String paramCode){ | |||
| return configService.querySummaryByParamCode(paramCode); | |||
| } | |||
| //获取论文分类列表 | |||
| @ApiOperation(value="系统配置-获取论文分类列表", notes="系统配置-获取论文分类列表") | |||
| @RequestMapping(value = "/queryCategoryThesisList", method = {RequestMethod.GET}) | |||
| public Result<?> queryCategoryThesisList(String pid, PageBean pageBean){ | |||
| return configService.queryCategoryThesisList(pid, pageBean); | |||
| } | |||
| //获取服务分类列表 | |||
| @ApiOperation(value="系统配置-获取服务分类列表", notes="系统配置-获取服务分类列表") | |||
| @RequestMapping(value = "/queryCategoryServiceList", method = {RequestMethod.GET}) | |||
| public Result<?> queryCategoryServiceList(PageBean pageBean){ | |||
| return configService.queryCategoryServiceList(pageBean); | |||
| } | |||
| //获取专业分类列表 | |||
| @ApiOperation(value="系统配置-获取专业分类列表", notes="系统配置-获取专业分类列表") | |||
| @RequestMapping(value = "/queryCategoryMajorList", method = {RequestMethod.GET}) | |||
| public Result<?> queryCategoryMajorList(PageBean pageBean){ | |||
| return configService.queryCategoryMajorList(pageBean); | |||
| } | |||
| //获取阶段分类列表 | |||
| @ApiOperation(value="系统配置-获取阶段分类列表", notes="系统配置-获取阶段分类列表") | |||
| @RequestMapping(value = "/queryCategoryPeriodList", method = {RequestMethod.GET}) | |||
| public Result<?> queryCategoryPeriodList(PageBean pageBean){ | |||
| return configService.queryCategoryPeriodList(pageBean); | |||
| } | |||
| } | |||
| @ -0,0 +1,64 @@ | |||
| package org.jeecg.modules.api.educationController; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| import org.jeecg.common.api.vo.Result; | |||
| import org.jeecg.modules.api.bean.PageBean; | |||
| import org.jeecg.modules.api.service.IndexService; | |||
| import org.jeecg.modules.educationArticle.entity.EducationArticle; | |||
| import org.jeecg.modules.educationBanner.entity.EducationBanner; | |||
| import org.jeecg.modules.educationThesis.entity.EducationThesis; | |||
| 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; | |||
| @Api(tags="首页-相关接口") | |||
| @RestController | |||
| @RequestMapping("/education/index") | |||
| @Slf4j | |||
| public class IndexController { | |||
| /******************************************************************************************************************/ | |||
| @Resource | |||
| private IndexService indexService; | |||
| /******************************************************************************************************************/ | |||
| //获取banner图列表 | |||
| @ApiOperation(value="首页-获取banner图列表", notes="type:0-首页 1-案例 2-服务 3-其他") | |||
| @RequestMapping(value = "/queryBannerList", method = {RequestMethod.GET}) | |||
| public Result<?> queryBannerList(EducationBanner educationBanner, PageBean pageBean){ | |||
| return indexService.queryBannerList(educationBanner, pageBean); | |||
| } | |||
| //获取论文文章列表 | |||
| @ApiOperation(value="首页-获取论文文章列表", notes="首页-获取论文文章列表") | |||
| @RequestMapping(value = "/queryThesisList", method = {RequestMethod.GET}) | |||
| public Result<?> queryThesisList(EducationThesis educationThesis, PageBean pageBean){ | |||
| return indexService.queryThesisList(educationThesis, pageBean); | |||
| } | |||
| //获取论文文章详情 | |||
| @ApiOperation(value="首页-获取论文文章详情", notes="首页-获取论文文章详情") | |||
| @RequestMapping(value = "/queryThesisById", method = {RequestMethod.GET}) | |||
| public Result<?> queryThesisById(String thesisId){ | |||
| return indexService.queryThesisById(thesisId); | |||
| } | |||
| //获取案例文章列表 | |||
| @ApiOperation(value="首页-获取案例文章列表", notes="首页-获取案例文章列表") | |||
| @RequestMapping(value = "/queryAriticleList", method = {RequestMethod.GET}) | |||
| public Result<?> queryAriticleList(EducationArticle educationArticle, PageBean pageBean){ | |||
| return indexService.queryAriticleList(educationArticle, pageBean); | |||
| } | |||
| //获取案例文章详情 | |||
| @ApiOperation(value="首页-获取案例文章详情", notes="首页-获取案例文章详情") | |||
| @RequestMapping(value = "/queryAriticleById", method = {RequestMethod.GET}) | |||
| public Result<?> queryAriticleById(String articleId){ | |||
| return indexService.queryAriticleById(articleId); | |||
| } | |||
| } | |||
| @ -0,0 +1,28 @@ | |||
| package org.jeecg.modules.api.service; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.jeecg.common.api.vo.Result; | |||
| import org.jeecg.modules.api.bean.PageBean; | |||
| import org.springframework.web.bind.annotation.RequestMapping; | |||
| import org.springframework.web.bind.annotation.RequestMethod; | |||
| public interface ConfigService { | |||
| //查询系统配置列表 | |||
| public Result<?> queryConfigList(PageBean pageBean); | |||
| //查询系统配置详情 | |||
| public Result<?> queryConfigByParamCode(String paramCode); | |||
| //查看概述说明列表 | |||
| public Result<?> querySummaryList(PageBean pageBean); | |||
| //查看概述说明详情 | |||
| public Result<?> querySummaryByParamCode(String paramCode); | |||
| //获取论文分类列表 | |||
| public Result<?> queryCategoryThesisList(String pid, PageBean pageBean); | |||
| //获取服务分类列表 | |||
| public Result<?> queryCategoryServiceList(PageBean pageBean); | |||
| //获取专业分类列表 | |||
| public Result<?> queryCategoryMajorList(PageBean pageBean); | |||
| //获取阶段分类列表 | |||
| public Result<?> queryCategoryPeriodList(PageBean pageBean); | |||
| } | |||
| @ -0,0 +1,29 @@ | |||
| package org.jeecg.modules.api.service; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.jeecg.common.api.vo.Result; | |||
| import org.jeecg.modules.api.bean.PageBean; | |||
| import org.jeecg.modules.educationArticle.entity.EducationArticle; | |||
| import org.jeecg.modules.educationBanner.entity.EducationBanner; | |||
| import org.jeecg.modules.educationThesis.entity.EducationThesis; | |||
| import org.springframework.web.bind.annotation.RequestMapping; | |||
| import org.springframework.web.bind.annotation.RequestMethod; | |||
| public interface IndexService { | |||
| //获取banner图列表 | |||
| public Result<?> queryBannerList(EducationBanner educationBanner, PageBean pageBean); | |||
| //获取论文文章列表 | |||
| public Result<?> queryThesisList(EducationThesis educationThesis, PageBean pageBean); | |||
| //获取论文文章详情 | |||
| public Result<?> queryThesisById(String thesisId); | |||
| //获取案例文章列表 | |||
| public Result<?> queryAriticleList(EducationArticle educationArticle, PageBean pageBean); | |||
| //获取案例文章详情 | |||
| public Result<?> queryAriticleById(String articleId); | |||
| } | |||
| @ -0,0 +1,308 @@ | |||
| package org.jeecg.modules.api.service.impl; | |||
| import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; | |||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| import org.apache.commons.lang.StringUtils; | |||
| import org.jeecg.common.api.vo.Result; | |||
| import org.jeecg.modules.api.bean.PageBean; | |||
| import org.jeecg.modules.api.service.ConfigService; | |||
| import org.jeecg.modules.educationCategoryMajor.entity.EducationCategoryMajor; | |||
| import org.jeecg.modules.educationCategoryMajor.service.IEducationCategoryMajorService; | |||
| import org.jeecg.modules.educationCategoryPeriod.entity.EducationCategoryPeriod; | |||
| import org.jeecg.modules.educationCategoryPeriod.service.IEducationCategoryPeriodService; | |||
| import org.jeecg.modules.educationCategoryService.entity.EducationCategoryService; | |||
| import org.jeecg.modules.educationCategoryService.service.IEducationCategoryServiceService; | |||
| import org.jeecg.modules.educationCategoryThesis.entity.EducationCategoryThesis; | |||
| import org.jeecg.modules.educationCategoryThesis.service.IEducationCategoryThesisService; | |||
| import org.jeecg.modules.educationConfig.entity.EducationConfig; | |||
| import org.jeecg.modules.educationConfig.service.IEducationConfigService; | |||
| import org.jeecg.modules.educationSummary.entity.EducationSummary; | |||
| import org.jeecg.modules.educationSummary.service.IEducationSummaryService; | |||
| import org.springframework.stereotype.Service; | |||
| import javax.annotation.Resource; | |||
| @Service | |||
| @Slf4j | |||
| public class ConfigServiceImpl implements ConfigService { | |||
| /******************************************************************************************************************/ | |||
| //系统配置信息 | |||
| @Resource | |||
| private IEducationConfigService educationConfigService; | |||
| //概述说明信息 | |||
| @Resource | |||
| private IEducationSummaryService educationSummaryService; | |||
| //概述说明信息 | |||
| @Resource | |||
| private IEducationCategoryThesisService educationCategoryThesisService; | |||
| //概述说明信息 | |||
| @Resource | |||
| private IEducationCategoryServiceService educationCategoryServiceService; | |||
| //概述说明信息 | |||
| @Resource | |||
| private IEducationCategoryMajorService educationCategoryMajorService; | |||
| //概述说明信息 | |||
| @Resource | |||
| private IEducationCategoryPeriodService educationCategoryPeriodService; | |||
| /******************************************************************************************************************/ | |||
| //查询系统配置列表 | |||
| @Override | |||
| public Result<?> queryConfigList(PageBean pageBean) { | |||
| log.info("开始查询系统配置列表"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| //分页信息 | |||
| Page<EducationConfig> page = null; | |||
| //查询信息 | |||
| LambdaQueryChainWrapper<EducationConfig> query = null; | |||
| //返回信息 | |||
| Page<EducationConfig> pageList = null; | |||
| try{ | |||
| //分页 | |||
| page = new Page<EducationConfig>(pageBean.getPageNo(), pageBean.getPageSize()); | |||
| query = educationConfigService | |||
| .lambdaQuery(); | |||
| //组装查询条件 | |||
| //按照创建时间降序排列 | |||
| query.orderByDesc(EducationConfig::getCreateTime); | |||
| //获取系统配置列表信息 | |||
| pageList = query.page(page); | |||
| log.info("系统配置查询结束"); | |||
| return Result.OK("系统配置列表", pageList); | |||
| }catch (Exception e){ | |||
| log.error("系统配置查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("系统配置列表查询失败"); | |||
| } | |||
| } | |||
| //查询系统配置详情 | |||
| @Override | |||
| public Result<?> queryConfigByParamCode(String paramCode) { | |||
| log.info("开始查询系统配置详情"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| try{ | |||
| EducationConfig config = educationConfigService | |||
| .lambdaQuery() | |||
| .eq(EducationConfig::getParamCode, paramCode) | |||
| .one(); | |||
| log.info("系统配置详情查询结束"); | |||
| return Result.OK("配置详情", config); | |||
| }catch (Exception e){ | |||
| log.error("系统配置详情查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("配置详情查询失败"); | |||
| } | |||
| } | |||
| //查询概述说明列表 | |||
| @Override | |||
| public Result<?> querySummaryList(PageBean pageBean) { | |||
| log.info("开始查询概述说明列表"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| //分页信息 | |||
| Page<EducationSummary> page = null; | |||
| //查询信息 | |||
| LambdaQueryChainWrapper<EducationSummary> query = null; | |||
| //返回信息 | |||
| Page<EducationSummary> pageList = null; | |||
| try{ | |||
| //分页 | |||
| page = new Page<EducationSummary>(pageBean.getPageNo(), pageBean.getPageSize()); | |||
| query = educationSummaryService | |||
| .lambdaQuery(); | |||
| //组装查询条件 | |||
| //按照创建时间降序排列 | |||
| query.orderByDesc(EducationSummary::getCreateTime); | |||
| //获取概述说明列表信息 | |||
| pageList = query.page(page); | |||
| log.info("概述说明查询结束"); | |||
| return Result.OK("概述说明列表", pageList); | |||
| }catch (Exception e){ | |||
| log.error("概述说明查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("概述说明列表查询失败"); | |||
| } | |||
| } | |||
| //查询概述说明详情 | |||
| @Override | |||
| public Result<?> querySummaryByParamCode(String paramCode) { | |||
| log.info("开始查询概述说明详情"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| try{ | |||
| EducationSummary config = educationSummaryService | |||
| .lambdaQuery() | |||
| .eq(EducationSummary::getParamCode, paramCode) | |||
| .one(); | |||
| log.info("概述说明详情查询结束"); | |||
| return Result.OK("概述说明详情", config); | |||
| }catch (Exception e){ | |||
| log.error("概述说明详情查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("概述说明详情查询失败"); | |||
| } | |||
| } | |||
| //获取论文分类列表 | |||
| @Override | |||
| public Result<?> queryCategoryThesisList(String pid, PageBean pageBean) { | |||
| log.info("开始查询论文分类列表"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| //分页信息 | |||
| Page<EducationCategoryThesis> page = null; | |||
| //查询信息 | |||
| LambdaQueryChainWrapper<EducationCategoryThesis> query = null; | |||
| //返回信息 | |||
| Page<EducationCategoryThesis> pageList = null; | |||
| try{ | |||
| //分页 | |||
| page = new Page<EducationCategoryThesis>(pageBean.getPageNo(), pageBean.getPageSize()); | |||
| query = educationCategoryThesisService | |||
| .lambdaQuery(); | |||
| //组装查询条件 | |||
| if(StringUtils.isNotEmpty(pid)){ | |||
| query.eq(EducationCategoryThesis::getPid, pid); | |||
| } | |||
| //按照创建时间降序排列 | |||
| query.orderByDesc(EducationCategoryThesis::getCreateTime); | |||
| //获取论文分类列表信息 | |||
| pageList = query.page(page); | |||
| log.info("论文分类查询结束"); | |||
| return Result.OK("论文分类列表", pageList); | |||
| }catch (Exception e){ | |||
| log.error("论文分类查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("论文分类列表查询失败"); | |||
| } | |||
| } | |||
| //获取服务分类列表 | |||
| @Override | |||
| public Result<?> queryCategoryServiceList(PageBean pageBean) { | |||
| log.info("开始查询服务分类列表"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| //分页信息 | |||
| Page<EducationCategoryService> page = null; | |||
| //查询信息 | |||
| LambdaQueryChainWrapper<EducationCategoryService> query = null; | |||
| //返回信息 | |||
| Page<EducationCategoryService> pageList = null; | |||
| try{ | |||
| //分页 | |||
| page = new Page<EducationCategoryService>(pageBean.getPageNo(), pageBean.getPageSize()); | |||
| query = educationCategoryServiceService | |||
| .lambdaQuery(); | |||
| //组装查询条件 | |||
| //按照创建时间降序排列 | |||
| query.orderByDesc(EducationCategoryService::getCreateTime); | |||
| //获取服务分类列表信息 | |||
| pageList = query.page(page); | |||
| log.info("服务分类查询结束"); | |||
| return Result.OK("服务分类列表", pageList); | |||
| }catch (Exception e){ | |||
| log.error("服务分类查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("服务分类列表查询失败"); | |||
| } | |||
| } | |||
| //获取专业分类列表 | |||
| @Override | |||
| public Result<?> queryCategoryMajorList(PageBean pageBean) { | |||
| log.info("开始查询专业分类列表"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| //分页信息 | |||
| Page<EducationCategoryMajor> page = null; | |||
| //查询信息 | |||
| LambdaQueryChainWrapper<EducationCategoryMajor> query = null; | |||
| //返回信息 | |||
| Page<EducationCategoryMajor> pageList = null; | |||
| try{ | |||
| //分页 | |||
| page = new Page<EducationCategoryMajor>(pageBean.getPageNo(), pageBean.getPageSize()); | |||
| query = educationCategoryMajorService | |||
| .lambdaQuery(); | |||
| //组装查询条件 | |||
| //按照创建时间降序排列 | |||
| query.orderByDesc(EducationCategoryMajor::getCreateTime); | |||
| //获取专业分类列表信息 | |||
| pageList = query.page(page); | |||
| log.info("专业分类查询结束"); | |||
| return Result.OK("专业分类列表", pageList); | |||
| }catch (Exception e){ | |||
| log.error("专业分类查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("专业分类列表查询失败"); | |||
| } | |||
| } | |||
| //获取阶段分类列表 | |||
| @Override | |||
| public Result<?> queryCategoryPeriodList(PageBean pageBean) { | |||
| log.info("开始查询阶段分类列表"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| //分页信息 | |||
| Page<EducationCategoryPeriod> page = null; | |||
| //查询信息 | |||
| LambdaQueryChainWrapper<EducationCategoryPeriod> query = null; | |||
| //返回信息 | |||
| Page<EducationCategoryPeriod> pageList = null; | |||
| try{ | |||
| //分页 | |||
| page = new Page<EducationCategoryPeriod>(pageBean.getPageNo(), pageBean.getPageSize()); | |||
| query = educationCategoryPeriodService | |||
| .lambdaQuery(); | |||
| //组装查询条件 | |||
| //按照创建时间降序排列 | |||
| query.orderByDesc(EducationCategoryPeriod::getCreateTime); | |||
| //获取阶段分类列表信息 | |||
| pageList = query.page(page); | |||
| log.info("阶段分类查询结束"); | |||
| return Result.OK("阶段分类列表", pageList); | |||
| }catch (Exception e){ | |||
| log.error("阶段分类查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("阶段分类列表查询失败"); | |||
| } | |||
| } | |||
| } | |||
| @ -0,0 +1,283 @@ | |||
| package org.jeecg.modules.api.service.impl; | |||
| import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; | |||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
| import lombok.extern.slf4j.Slf4j; | |||
| import org.apache.commons.lang.StringUtils; | |||
| import org.jeecg.common.api.vo.Result; | |||
| import org.jeecg.config.shiro.ShiroRealm; | |||
| import org.jeecg.modules.api.bean.PageBean; | |||
| import org.jeecg.modules.api.service.IndexService; | |||
| import org.jeecg.modules.educationArticle.entity.EducationArticle; | |||
| import org.jeecg.modules.educationArticle.service.IEducationArticleService; | |||
| import org.jeecg.modules.educationBanner.entity.EducationBanner; | |||
| import org.jeecg.modules.educationBanner.service.IEducationBannerService; | |||
| import org.jeecg.modules.educationThesis.entity.*; | |||
| import org.jeecg.modules.educationThesis.service.*; | |||
| import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; | |||
| import org.springframework.stereotype.Service; | |||
| import javax.annotation.Resource; | |||
| import java.util.ArrayList; | |||
| import java.util.List; | |||
| @Service | |||
| @Slf4j | |||
| public class IndexServiceImpl implements IndexService { | |||
| /******************************************************************************************************************/ | |||
| //轮播图信息 | |||
| @Resource | |||
| private IEducationBannerService educationBannerService; | |||
| //论文文章信息 | |||
| @Resource | |||
| private IEducationThesisService educationThesisService; | |||
| //案例文章信息 | |||
| @Resource | |||
| private IEducationArticleService educationArticleService; | |||
| //发表方向信息 | |||
| @Resource | |||
| private IEducationTargetService educationTargetService; | |||
| //师资力量信息 | |||
| @Resource | |||
| private IEducationTeacherService educationTeacherService; | |||
| //课程安排信息 | |||
| @Resource | |||
| private IEducationCourseService educationCourseService; | |||
| //期刊推荐信息 | |||
| @Resource | |||
| private IEducationPeriodicalService educationPeriodicalService; | |||
| //附加材料信息 | |||
| @Resource | |||
| private IEducationDocumentService educationDocumentService; | |||
| /******************************************************************************************************************/ | |||
| //获取banner图列表 | |||
| @Override | |||
| public Result<?> queryBannerList(EducationBanner educationBanner, PageBean pageBean) { | |||
| log.info("开始查询轮播图信息"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| //分页信息 | |||
| Page<EducationBanner> page = null; | |||
| //查询信息 | |||
| LambdaQueryChainWrapper<EducationBanner> query = null; | |||
| //返回信息 | |||
| Page<EducationBanner> pageList = null; | |||
| try{ | |||
| //分页 | |||
| page = new Page<EducationBanner>(pageBean.getPageNo(), pageBean.getPageSize()); | |||
| query = educationBannerService | |||
| .lambdaQuery(); | |||
| //组装查询条件 | |||
| if(StringUtils.isNotBlank(educationBanner.getTitle())){ | |||
| //标题 | |||
| query.like(EducationBanner::getTitle, educationBanner.getTitle()); | |||
| } | |||
| if(StringUtils.isNotBlank(educationBanner.getType())){ | |||
| //分类 | |||
| query.eq(EducationBanner::getType, educationBanner.getType()); | |||
| } | |||
| //按照排序编号升序排列 | |||
| query.orderByAsc(EducationBanner::getOrderNo); | |||
| //获取轮播图信息 | |||
| pageList = query.page(page); | |||
| log.info("轮播图信息查询结束"); | |||
| return Result.OK("轮播图列表", pageList); | |||
| }catch (Exception e){ | |||
| log.info("轮播图信息查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("轮播图列表查询失败"); | |||
| } | |||
| } | |||
| //获取论文文章列表 | |||
| @Override | |||
| public Result<?> queryThesisList(EducationThesis educationThesis, PageBean pageBean) { | |||
| log.info("开始查询论文文章信息"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| //分页信息 | |||
| Page<EducationThesis> page = null; | |||
| //查询信息 | |||
| LambdaQueryChainWrapper<EducationThesis> query = null; | |||
| //返回信息 | |||
| Page<EducationThesis> pageList = null; | |||
| try{ | |||
| //分页 | |||
| page = new Page<EducationThesis>(pageBean.getPageNo(), pageBean.getPageSize()); | |||
| query = educationThesisService | |||
| .lambdaQuery(); | |||
| //组装查询条件 | |||
| if(StringUtils.isNotBlank(educationThesis.getTitle())){ | |||
| //标题 | |||
| query.like(EducationThesis::getTitle, educationThesis.getTitle()); | |||
| } | |||
| if(StringUtils.isNotBlank(educationThesis.getCategoryOne())){ | |||
| //论文一级分类 | |||
| query.eq(EducationThesis::getCategoryOne, educationThesis.getCategoryOne()); | |||
| } | |||
| if(StringUtils.isNotBlank(educationThesis.getCategoryTwo())){ | |||
| //论文二级分类 | |||
| query.eq(EducationThesis::getCategoryTwo, educationThesis.getCategoryTwo()); | |||
| } | |||
| //按照创建时间降序排列 | |||
| query.orderByDesc(EducationThesis::getCreateTime); | |||
| //获取论文文章信息 | |||
| pageList = query.page(page); | |||
| log.info("论文文章信息查询结束"); | |||
| return Result.OK("论文文章列表", pageList); | |||
| }catch (Exception e){ | |||
| log.info("论文文章信息列表查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("论文文章列表查询失败"); | |||
| } | |||
| } | |||
| //获取论文文章详情 | |||
| @Override | |||
| public Result<?> queryThesisById(String thesisId) { | |||
| log.info("开始查询论文文章信息"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| try{ | |||
| //1、查询论文文章详情 | |||
| EducationThesis one = educationThesisService.getById(thesisId); | |||
| if(null == one){ | |||
| log.info("论文文章不存在,请检查论文文章编号:{}", thesisId); | |||
| return Result.OK("论文文章不存在,请检查论文文章编号:{}", thesisId); | |||
| } | |||
| //发表方向 | |||
| List<EducationTarget> targetList = educationTargetService | |||
| .lambdaQuery() | |||
| .eq(EducationTarget::getThesisId, thesisId) | |||
| .list(); | |||
| one.setEducationTargetList(targetList); | |||
| //师资力量 | |||
| List<EducationTeacher> teacherList = educationTeacherService | |||
| .lambdaQuery() | |||
| .eq(EducationTeacher::getThesisId, thesisId) | |||
| .list(); | |||
| one.setEducationTeacherList(teacherList); | |||
| //课程安排 | |||
| List<EducationCourse> courseList = educationCourseService | |||
| .lambdaQuery() | |||
| .eq(EducationCourse::getThesisId, thesisId) | |||
| .list(); | |||
| one.setEducationCourseList(courseList); | |||
| //期刊推荐 | |||
| List<EducationPeriodical> periodicalList = educationPeriodicalService | |||
| .lambdaQuery() | |||
| .eq(EducationPeriodical::getThesisId, thesisId) | |||
| .list(); | |||
| one.setEducationPeriodicalList(periodicalList); | |||
| //附加材料 | |||
| List<EducationDocument> documentList = educationDocumentService | |||
| .lambdaQuery() | |||
| .eq(EducationDocument::getThesisId, thesisId) | |||
| .list(); | |||
| one.setEducationDocumentList(documentList); | |||
| //2、返回案例文章信息 | |||
| log.info("论文文章信息查询结束"); | |||
| return Result.OK("论文文章信息", one); | |||
| }catch (Exception e){ | |||
| log.info("论文文章信息查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("论文文章信息查询失败"); | |||
| } | |||
| } | |||
| //获取案例文章列表 | |||
| @Override | |||
| public Result<?> queryAriticleList(EducationArticle educationArticle, PageBean pageBean) { | |||
| log.info("开始查询案例文章信息"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| //分页信息 | |||
| Page<EducationArticle> page = null; | |||
| //查询信息 | |||
| LambdaQueryChainWrapper<EducationArticle> query = null; | |||
| //返回信息 | |||
| Page<EducationArticle> pageList = null; | |||
| try{ | |||
| //分页 | |||
| page = new Page<EducationArticle>(pageBean.getPageNo(), pageBean.getPageSize()); | |||
| query = educationArticleService | |||
| .lambdaQuery(); | |||
| //组装查询条件 | |||
| if(StringUtils.isNotBlank(educationArticle.getTitle())){ | |||
| //标题 | |||
| query.like(EducationArticle::getTitle, educationArticle.getTitle()); | |||
| } | |||
| if(StringUtils.isNotBlank(educationArticle.getCategoryServiceId())){ | |||
| //服务分类 | |||
| query.eq(EducationArticle::getCategoryServiceId, educationArticle.getCategoryServiceId()); | |||
| } | |||
| if(StringUtils.isNotBlank(educationArticle.getCategoryMajorId())){ | |||
| //专业分类 | |||
| query.eq(EducationArticle::getCategoryMajorId, educationArticle.getCategoryMajorId()); | |||
| } | |||
| if(StringUtils.isNotBlank(educationArticle.getCategoryPeriodId())){ | |||
| //阶段分类 | |||
| query.eq(EducationArticle::getCategoryPeriodId, educationArticle.getCategoryPeriodId()); | |||
| } | |||
| //按照创建时间降序排列 | |||
| query.orderByDesc(EducationArticle::getCreateTime); | |||
| //获取案例文章信息 | |||
| pageList = query.page(page); | |||
| log.info("案例文章信息查询结束"); | |||
| return Result.OK("案例文章列表", pageList); | |||
| }catch (Exception e){ | |||
| log.info("案例文章信息列表查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("案例文章列表查询失败"); | |||
| } | |||
| } | |||
| //获取案例文章详情 | |||
| @Override | |||
| public Result<?> queryAriticleById(String articleId) { | |||
| log.info("开始查询案例文章信息"); | |||
| //返回信息 | |||
| String massege = ""; | |||
| try{ | |||
| //1、查询案例文章详情 | |||
| EducationArticle one = educationArticleService.getById(articleId); | |||
| if(null == one){ | |||
| log.info("案例文章不存在,请检查案例文章编号:{}", articleId); | |||
| return Result.OK("案例文章不存在,请检查案例文章编号:{}", articleId); | |||
| } | |||
| //2、返回案例文章信息 | |||
| log.info("案例文章信息查询结束"); | |||
| return Result.OK("案例文章信息", one); | |||
| }catch (Exception e){ | |||
| log.info("案例文章信息查询失败"); | |||
| e.printStackTrace(); | |||
| return Result.error("案例文章信息查询失败"); | |||
| } | |||
| } | |||
| } | |||