diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwPortalConfigController.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwPortalConfigController.java index 5cd01c6..c6961b2 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwPortalConfigController.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwPortalConfigController.java @@ -103,7 +103,7 @@ public class HwPortalConfigController extends BaseController /** - * 获取部门树列表 + * 获取门户网站配置树列表 */ @RequiresPermissions("portal:portalConfig:list") @GetMapping("/portalConfigTypeTree") diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwProductCaseInfoController.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwProductCaseInfoController.java index 84ce2cd..f544f2c 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwProductCaseInfoController.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwProductCaseInfoController.java @@ -7,7 +7,9 @@ import com.ruoyi.common.core.web.page.TableDataInfo; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.portal.domain.HwPortalConfigType; import com.ruoyi.portal.domain.HwProductCaseInfo; +import com.ruoyi.portal.service.IHwPortalConfigTypeService; import com.ruoyi.portal.service.IHwProductCaseInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -28,6 +30,9 @@ public class HwProductCaseInfoController extends BaseController @Autowired private IHwProductCaseInfoService hwProductCaseInfoService; + @Autowired + private IHwPortalConfigTypeService hwPortalConfigTypeService; + /** * 查询案例内容列表 */ @@ -95,4 +100,18 @@ public class HwProductCaseInfoController extends BaseController { return toAjax(hwProductCaseInfoService.deleteHwProductCaseInfoByCaseInfoIds(caseInfoIds)); } + + + /** + * 查询门户网站配置类型s树列表 + */ + /** + * 获取门户网站配置树列表 + */ + @RequiresPermissions("portal:productCaseInfo:list") + @GetMapping("/portalConfigTypeTree") + public AjaxResult portalConfigTypeTree(HwPortalConfigType hwPortalConfigType) { + + return success(hwPortalConfigTypeService.selectPortalConfigTypeTreeList(hwPortalConfigType)); + } } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwProductInfoController.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwProductInfoController.java index 1d7c867..f39f20c 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwProductInfoController.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/controller/HwProductInfoController.java @@ -7,7 +7,9 @@ import com.ruoyi.common.core.web.page.TableDataInfo; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.portal.domain.HwPortalConfigType; import com.ruoyi.portal.domain.HwProductInfo; +import com.ruoyi.portal.service.IHwPortalConfigTypeService; import com.ruoyi.portal.service.IHwProductInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -28,6 +30,10 @@ public class HwProductInfoController extends BaseController @Autowired private IHwProductInfoService hwProductInfoService; + @Autowired + private IHwPortalConfigTypeService hwPortalConfigTypeService; + + /** * 查询产品信息配置列表 */ @@ -36,7 +42,7 @@ public class HwProductInfoController extends BaseController public TableDataInfo list(HwProductInfo hwProductInfo) { startPage(); - List list = hwProductInfoService.selectHwProductInfoList(hwProductInfo); + List list = hwProductInfoService.selectHwProductInfoJoinList(hwProductInfo); return getDataTable(list); } @@ -95,4 +101,18 @@ public class HwProductInfoController extends BaseController { return toAjax(hwProductInfoService.deleteHwProductInfoByProductInfoIds(productInfoIds)); } + + + /** + * 查询门户网站配置类型s树列表 + */ + /** + * 获取门户网站配置树列表 + */ + @RequiresPermissions("portal:productInfo:list") + @GetMapping("/portalConfigTypeTree") + public AjaxResult portalConfigTypeTree(HwPortalConfigType hwPortalConfigType) { + + return success(hwPortalConfigTypeService.selectPortalConfigTypeTreeList(hwPortalConfigType)); + } } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwProductInfo.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwProductInfo.java index 685cb80..7f81024 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwProductInfo.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/domain/HwProductInfo.java @@ -49,6 +49,7 @@ public class HwProductInfo extends BaseEntity private Long parentId; + private String configTypeName; public void setProductInfoId(Long productInfoId) { this.productInfoId = productInfoId; @@ -131,6 +132,14 @@ public class HwProductInfo extends BaseEntity this.parentId = parentId; } + public String getConfigTypeName() { + return configTypeName; + } + + public void setConfigTypeName(String configTypeName) { + this.configTypeName = configTypeName; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwPortalConfigTypeMapper.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwPortalConfigTypeMapper.java index de83bf6..0bafad3 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwPortalConfigTypeMapper.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwPortalConfigTypeMapper.java @@ -59,4 +59,6 @@ public interface HwPortalConfigTypeMapper * @return 结果 */ public int deleteHwPortalConfigTypeByConfigTypeIds(Long[] configTypeIds); + + } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwProductCaseInfoMapper.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwProductCaseInfoMapper.java index ca3668c..b82eb81 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwProductCaseInfoMapper.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwProductCaseInfoMapper.java @@ -59,4 +59,12 @@ public interface HwProductCaseInfoMapper * @return 结果 */ public int deleteHwProductCaseInfoByCaseInfoIds(Long[] caseInfoIds); + + /** + * 查询案例内容列表,Join portalConfigType + * + * @param hwProductCaseInfo 案例内容 + * @return 案例内容集合 + */ + public List selectHwProductCaseInfoJoinList(HwProductCaseInfo hwProductCaseInfo); } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwProductInfoMapper.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwProductInfoMapper.java index 95cb22d..8f71294 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwProductInfoMapper.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/mapper/HwProductInfoMapper.java @@ -68,4 +68,12 @@ public interface HwProductInfoMapper */ public List selectHwProductInfoJoinDetailList(HwProductInfo hwProductInfo); + /** + * 查询产品信息配置列表,join portalConfigType门户网站配置类型 + * + * @param hwProductInfo 产品信息配置 + * @return 产品信息配置集合 + */ + public List selectHwProductInfoJoinList(HwProductInfo hwProductInfo); + } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/IHwProductCaseInfoService.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/IHwProductCaseInfoService.java index b229a24..1adafb9 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/IHwProductCaseInfoService.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/IHwProductCaseInfoService.java @@ -66,4 +66,12 @@ public interface IHwProductCaseInfoService * @return */ public HwProductCaseInfo getTypicalHomeCaseInfo(HwProductCaseInfo hwProductCaseInfo); + + /** + * 查询案例内容列表,join portalConfigType + * + * @param hwProductCaseInfo 案例内容 + * @return 案例内容 + */ + public List selectHwProductCaseInfoJoinList(HwProductCaseInfo hwProductCaseInfo); } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/IHwProductInfoService.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/IHwProductInfoService.java index 640cf39..5b9c3f5 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/IHwProductInfoService.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/IHwProductInfoService.java @@ -67,4 +67,12 @@ public interface IHwProductInfoService * @return 产品信息配置 */ public List selectHwProductInfoJoinDetailList(HwProductInfo hwProductInfo); + + /** + * 查询产品信息配置列表,join portalConfigType + * + * @param hwProductInfo 产品信息配置 + * @return 产品信息配置 + */ + public List selectHwProductInfoJoinList(HwProductInfo hwProductInfo); } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwPortalConfigTypeServiceImpl.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwPortalConfigTypeServiceImpl.java index bc2f148..e6587b0 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwPortalConfigTypeServiceImpl.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwPortalConfigTypeServiceImpl.java @@ -125,7 +125,6 @@ public class HwPortalConfigTypeServiceImpl implements IHwPortalConfigTypeService @Override public List selectPortalConfigTypeTreeList(HwPortalConfigType portalConfigType) { List portalConfigTypes = this.selectHwPortalConfigTypeList(portalConfigType); - System.out.println("1"); return buildPortalConfigTypeTreeSelect(portalConfigTypes); } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductCaseInfoServiceImpl.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductCaseInfoServiceImpl.java index c36954d..f1fc9e8 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductCaseInfoServiceImpl.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductCaseInfoServiceImpl.java @@ -113,4 +113,17 @@ public class HwProductCaseInfoServiceImpl implements IHwProductCaseInfoService } return new HwProductCaseInfo(); } + + + /** + * 查询案例内容列表,join portalConfigType + * + * @param hwProductCaseInfo 案例内容 + * @return 案例内容 + */ + @Override + public List selectHwProductCaseInfoJoinList(HwProductCaseInfo hwProductCaseInfo) + { + return hwProductCaseInfoMapper.selectHwProductCaseInfoJoinList(hwProductCaseInfo); + } } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductInfoDetailServiceImpl.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductInfoDetailServiceImpl.java index 4628754..8210496 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductInfoDetailServiceImpl.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductInfoDetailServiceImpl.java @@ -1,6 +1,8 @@ package com.ruoyi.portal.service.impl; import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.common.security.utils.SecurityUtils; +import com.ruoyi.portal.domain.HwPortalConfigType; import com.ruoyi.portal.domain.HwProductInfoDetail; import com.ruoyi.portal.mapper.HwProductInfoDetailMapper; import com.ruoyi.portal.service.IHwProductInfoDetailService; @@ -54,7 +56,18 @@ public class HwProductInfoDetailServiceImpl implements IHwProductInfoDetailServi @Override public int insertHwProductInfoDetail(HwProductInfoDetail hwProductInfoDetail) { + if (hwProductInfoDetail.getParentId() == null) { + hwProductInfoDetail.setParentId(0L); + hwProductInfoDetail.setAncestors("0"); + } else { + HwProductInfoDetail info = hwProductInfoDetailMapper.selectHwProductInfoDetailByProductInfoDetailId(hwProductInfoDetail.getParentId()); + + hwProductInfoDetail.setAncestors(info.getAncestors() + "," + hwProductInfoDetail.getParentId()); + } + hwProductInfoDetail.setCreateTime(DateUtils.getNowDate()); + hwProductInfoDetail.setCreateBy(SecurityUtils.getUsername()); + return hwProductInfoDetailMapper.insertHwProductInfoDetail(hwProductInfoDetail); } diff --git a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductInfoServiceImpl.java b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductInfoServiceImpl.java index c545ce4..d50c3ff 100644 --- a/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductInfoServiceImpl.java +++ b/ruoyi-modules/hw-portal/src/main/java/com/ruoyi/portal/service/impl/HwProductInfoServiceImpl.java @@ -176,4 +176,17 @@ public class HwProductInfoServiceImpl implements IHwProductInfoService private boolean hasChild(List list, HwProductInfoDetail t) { return getChildList(list, t).size() > 0 ? true : false; } + + + /** + * 查询产品信息配置列表,join portalConfigType + * + * @param hwProductInfo 产品信息配置 + * @return 产品信息配置 + */ + @Override + public List selectHwProductInfoJoinList(HwProductInfo hwProductInfo) + { + return hwProductInfoMapper.selectHwProductInfoJoinList(hwProductInfo); + } } diff --git a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwProductCaseInfoMapper.xml b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwProductCaseInfoMapper.xml index 40000c3..cfad79f 100644 --- a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwProductCaseInfoMapper.xml +++ b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwProductCaseInfoMapper.xml @@ -102,4 +102,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{caseInfoId} + + + + + select hpci.case_info_id, hpci.case_info_title, hpci.config_type_id, hpci.typical_flag, hpci.case_info_desc, hpci.case_info_pic, hpci.create_time, + hpci.create_by, hpci.update_time, hpci.update_by,hpct.config_type_name from hw_product_case_info hpci left join hw_portal_config_type hpct on hpci.config_type_id=hpct.config_type_id + + + + + \ No newline at end of file diff --git a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwProductInfoDetailMapper.xml b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwProductInfoDetailMapper.xml index a36e983..12ca796 100644 --- a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwProductInfoDetailMapper.xml +++ b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwProductInfoDetailMapper.xml @@ -30,8 +30,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and parent_id = #{parentId} and product_info_id = #{productInfoId} and config_modal = #{configModal} - and product_info_detail_title = #{productInfoDetailTitle} - and product_info_detail_desc = #{productInfoDetailDesc} + and product_info_detail_title like concat('%', #{productInfoDetailTitle}, '%') + and product_info_detail_desc like concat('%', #{productInfoDetailDesc}, '%') and product_info_detail_order = #{productInfoDetailOrder} and product_info_detail_pic = #{productInfoDetailPic} and ancestors = #{ancestors} diff --git a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwProductInfoMapper.xml b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwProductInfoMapper.xml index 4e3d3aa..140a890 100644 --- a/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwProductInfoMapper.xml +++ b/ruoyi-modules/hw-portal/src/main/resources/mapper/portal/HwProductInfoMapper.xml @@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -49,8 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and config_type_id = #{configTypeId} and tab_flag = #{tabFlag} and config_modal = #{configModal} - and product_info_etitle = #{productInfoEtitle} - and product_info_ctitle = #{productInfoCtitle} + and product_info_etitle like concat('%', #{productInfoEtitle}, '%') + and product_info_ctitle like concat('%', #{productInfoCtitle}, '%') and product_info_order = #{productInfoOrder} @@ -135,4 +136,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + + + select hpi.product_info_id, hpi.config_type_id, hpi.tab_flag, hpi.config_modal, hpi.product_info_etitle, hpi.product_info_ctitle, hpi.product_info_order, + hpi.create_time, hpi.create_by, hpi.update_time, hpi.update_by,hpct.config_type_name from hw_product_info hpi left join hw_portal_config_type hpct on hpi.config_type_id=hpct.config_type_id + + + + \ No newline at end of file diff --git a/ruoyi-ui/src/api/portal/productCaseInfo.js b/ruoyi-ui/src/api/portal/productCaseInfo.js index ff55da2..3d71c3e 100644 --- a/ruoyi-ui/src/api/portal/productCaseInfo.js +++ b/ruoyi-ui/src/api/portal/productCaseInfo.js @@ -42,3 +42,13 @@ export function delProductCaseInfo(caseInfoId) { method: 'delete' }) } + + +// 查询门户网站配置类型下拉树结构 +export function portalConfigTypeTree(query) { + return request({ + url: '/portal/productCaseInfo/portalConfigTypeTree', + method: 'get', + params: query + }) +} diff --git a/ruoyi-ui/src/api/portal/productInfo.js b/ruoyi-ui/src/api/portal/productInfo.js index 2bdc9cf..b2151ec 100644 --- a/ruoyi-ui/src/api/portal/productInfo.js +++ b/ruoyi-ui/src/api/portal/productInfo.js @@ -42,3 +42,13 @@ export function delProductInfo(productInfoId) { method: 'delete' }) } + + +// 查询门户网站配置类型下拉树结构 +export function portalConfigTypeTree(query) { + return request({ + url: '/portal/productInfo/portalConfigTypeTree', + method: 'get', + params: query + }) +} diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 0551bd9..699fb21 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -304,6 +304,22 @@ export const dynamicRoutes = [ ] }, + { + path: '/portal/case-info-detail', + component: Layout, + hidden: true, + permissions: ['portal:productCaseInfo:edit'], + children: [ + { + path: 'detail/:caseInfoId(\\d+)', + component: () => import('@/views/portal/productCaseInfo/caseInfoDetail.vue'), + name: 'CaseInfoDetail', + meta: { title: '案例内容', activeMenu: '/portal/productCaseInfo',isCache:true } + } + ] + }, + + { path: '/portal/about-us-info-detail', component: Layout, diff --git a/ruoyi-ui/src/views/portal/portalConfigType/index.vue b/ruoyi-ui/src/views/portal/portalConfigType/index.vue index a72bcb1..f7bd7bc 100644 --- a/ruoyi-ui/src/views/portal/portalConfigType/index.vue +++ b/ruoyi-ui/src/views/portal/portalConfigType/index.vue @@ -107,7 +107,7 @@ - + diff --git a/ruoyi-ui/src/views/portal/productCaseInfo/caseInfoDetail.vue b/ruoyi-ui/src/views/portal/productCaseInfo/caseInfoDetail.vue new file mode 100644 index 0000000..83e4a5e --- /dev/null +++ b/ruoyi-ui/src/views/portal/productCaseInfo/caseInfoDetail.vue @@ -0,0 +1,449 @@ + + + diff --git a/ruoyi-ui/src/views/portal/productCaseInfo/index.vue b/ruoyi-ui/src/views/portal/productCaseInfo/index.vue index eddbb73..0268a69 100644 --- a/ruoyi-ui/src/views/portal/productCaseInfo/index.vue +++ b/ruoyi-ui/src/views/portal/productCaseInfo/index.vue @@ -1,6 +1,36 @@