Merge branch 'master' of http://124.222.105.7:3000/dianliang/dl_site_system
This commit is contained in:
commit
6b4643e4c0
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
<name>ruoyi</name>
|
<name>ruoyi</name>
|
||||||
<url>http://www.ruoyi.vip</url>
|
<url>http://www.ruoyi.vip</url>
|
||||||
<description>通告快接管理后台</description>
|
<description>成事达管理后台</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<ruoyi.version>3.8.9</ruoyi.version>
|
<ruoyi.version>3.8.9</ruoyi.version>
|
||||||
|
@ -0,0 +1,268 @@
|
|||||||
|
package com.ruoyi.base.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.ruoyi.base.domain.BasePic;
|
||||||
|
import com.ruoyi.base.domain.BaseSiteInfo;
|
||||||
|
import com.ruoyi.base.service.IBasePicService;
|
||||||
|
import com.ruoyi.base.service.IBaseSiteInfoService;
|
||||||
|
import com.ruoyi.busi.domain.BusiCategory;
|
||||||
|
import com.ruoyi.busi.domain.BusiProdNew;
|
||||||
|
import com.ruoyi.busi.service.IBusiCategoryService;
|
||||||
|
import com.ruoyi.busi.service.IBusiProdNewService;
|
||||||
|
import com.ruoyi.busi.vo.BusiCategoryVO;
|
||||||
|
import com.ruoyi.busi.vo.ProdNewVO;
|
||||||
|
import com.ruoyi.busi.vo.WebDetailVO;
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.R;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import static com.ruoyi.constant.DictConstants.DATA_TYPE_NEWS;
|
||||||
|
import static com.ruoyi.constant.DictConstants.DATA_TYPE_PRODUCT;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Web 专用Controller
|
||||||
|
*
|
||||||
|
* @author vinjor-m
|
||||||
|
* @date 2025-06-23
|
||||||
|
*/
|
||||||
|
@Api("站点接口")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/web")
|
||||||
|
public class WebController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private IBasePicService basePicService;
|
||||||
|
@Autowired
|
||||||
|
private IBusiCategoryService categoryService;
|
||||||
|
@Autowired
|
||||||
|
private IBaseSiteInfoService siteInfoService;
|
||||||
|
@Autowired
|
||||||
|
private IBusiProdNewService prodNewService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导航栏接口--所有分类
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 10:04 2025/7/8
|
||||||
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
|
**/
|
||||||
|
@ApiOperation("获取站点分类树--所有分类")
|
||||||
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
|
@GetMapping("/category")
|
||||||
|
public R<List<BusiCategoryVO>> categoryList(@RequestParam(required = true) String tenantId){
|
||||||
|
BusiCategory category = new BusiCategory();
|
||||||
|
category.setTenantId(tenantId);
|
||||||
|
return R.ok(categoryService.treeCategory(category));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取站点产品分类树--产品分类
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 10:04 2025/7/8
|
||||||
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
|
**/
|
||||||
|
@ApiOperation("获取站点产品分类树--产品分类")
|
||||||
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
|
@GetMapping("/prodCategory")
|
||||||
|
public R<List<BusiCategoryVO>> prodCategoryList(@RequestParam(required = true) String tenantId){
|
||||||
|
BusiCategory category = new BusiCategory();
|
||||||
|
category.setTenantId(tenantId);
|
||||||
|
category.setCatgType("cp");
|
||||||
|
List<BusiCategoryVO> list = categoryService.treeCategory(category);
|
||||||
|
//最顶级的产品分类不反回
|
||||||
|
return R.ok(list.get(0).getChildren());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 15:44 2025/7/8
|
||||||
|
* @param id 查询单个分类栏目详情--单页面栏目和询盘栏目使用
|
||||||
|
* @return com.ruoyi.common.core.domain.R<com.ruoyi.busi.domain.BusiCategory>
|
||||||
|
**/
|
||||||
|
@ApiOperation("查询单个分类栏目详情--单页面栏目和询盘栏目使用")
|
||||||
|
@ApiImplicitParam(name = "id", value = "主键ID", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
|
@GetMapping("/categoryInfo")
|
||||||
|
public R<BusiCategory> categoryInfo(@RequestParam(required = true) String id){
|
||||||
|
return R.ok(categoryService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 轮播图
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 10:04 2025/7/8
|
||||||
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
|
**/
|
||||||
|
@ApiOperation("轮播图")
|
||||||
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
|
@GetMapping("/pic")
|
||||||
|
public R<List<BasePic>> picList(@RequestParam(required = true) String tenantId){
|
||||||
|
return R.ok(basePicService.list(tenantId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司介绍-富文本-首页展示区域
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 10:04 2025/7/8
|
||||||
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
|
**/
|
||||||
|
@ApiOperation("公司介绍-富文本-首页展示区域")
|
||||||
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
|
@GetMapping("/indexCompanyInfo")
|
||||||
|
public R<String> indexCompanyInfo(@RequestParam(required = true) String tenantId){
|
||||||
|
BaseSiteInfo baseSiteInfo = siteInfoService.getSiteInfo(tenantId);
|
||||||
|
return R.ok(baseSiteInfo.getCompanyInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 热门产品-前10
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 10:04 2025/7/8
|
||||||
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
|
**/
|
||||||
|
@ApiOperation("热门产品-前10")
|
||||||
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
|
@GetMapping("/hotProduct")
|
||||||
|
public R<List<BusiProdNew>> hotProduct(@RequestParam(required = true) String tenantId){
|
||||||
|
return R.ok(prodNewService.hotProdOrNews(tenantId,DATA_TYPE_PRODUCT,true));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 普通产品-前10
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 10:04 2025/7/8
|
||||||
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
|
**/
|
||||||
|
@ApiOperation("普通产品-前10")
|
||||||
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
|
@GetMapping("/product")
|
||||||
|
public R<List<BusiProdNew>> product(@RequestParam(required = true) String tenantId){
|
||||||
|
return R.ok(prodNewService.hotProdOrNews(tenantId,DATA_TYPE_PRODUCT,false));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 热门新闻-前10
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 10:04 2025/7/8
|
||||||
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
|
**/
|
||||||
|
@ApiOperation("热门新闻-前10")
|
||||||
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
|
@GetMapping("/hotNews")
|
||||||
|
public R<List<BusiProdNew>> hotNews(@RequestParam(required = true) String tenantId){
|
||||||
|
return R.ok(prodNewService.hotProdOrNews(tenantId,DATA_TYPE_NEWS,true));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面底部
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 10:04 2025/7/8
|
||||||
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
|
**/
|
||||||
|
@ApiOperation("页面底部")
|
||||||
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
|
@GetMapping("/footerInfo")
|
||||||
|
public R<BaseSiteInfo> footerInfo(@RequestParam(required = true) String tenantId){
|
||||||
|
return R.ok(siteInfoService.getSiteInfo(tenantId));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品列表分页
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 15:17 2025/7/8
|
||||||
|
* @param tenantId 租户id
|
||||||
|
* @param catgId 分类ID
|
||||||
|
* @param pageNum
|
||||||
|
* @param pageSize
|
||||||
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
|
**/
|
||||||
|
@ApiOperation("产品列表分页")
|
||||||
|
@ApiImplicitParams(value = {
|
||||||
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class),
|
||||||
|
@ApiImplicitParam(name = "pageNum", value = "页码(1开始)", required = true, dataType = "int", paramType = "query", dataTypeClass = Integer.class),
|
||||||
|
@ApiImplicitParam(name = "pageSize", value = "每页显示数量", required = true, dataType = "int", paramType = "query", dataTypeClass = Integer.class),
|
||||||
|
@ApiImplicitParam(name = "catgId", value = "分类id", required = false, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
|
})
|
||||||
|
@GetMapping("/prodPageList")
|
||||||
|
public R<IPage<BusiProdNew>> prodPageList(String tenantId,String catgId,
|
||||||
|
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
Page<BusiProdNew> page = new Page<>(pageNum, pageSize);
|
||||||
|
LambdaQueryWrapper<BusiProdNew> queryWrapper = new LambdaQueryWrapper<BusiProdNew>()
|
||||||
|
.eq(BusiProdNew::getDataType,DATA_TYPE_PRODUCT)
|
||||||
|
.eq(BusiProdNew::getIfPublic,true)
|
||||||
|
.eq(BusiProdNew::getTenantId,tenantId);
|
||||||
|
if(StringUtils.isNotEmpty(catgId)){
|
||||||
|
List<String> catgIdList= new ArrayList<>();
|
||||||
|
catgIdList.add(catgId);
|
||||||
|
catgIdList.addAll(categoryService.getAllChildrenId(catgId));
|
||||||
|
queryWrapper.in(BusiProdNew::getCatgId,catgIdList);
|
||||||
|
}
|
||||||
|
queryWrapper.orderByDesc(BusiProdNew::getSort);
|
||||||
|
return R.ok(prodNewService.page(page,queryWrapper));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻列表分页
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 15:17 2025/7/8
|
||||||
|
* @param tenantId 租户id
|
||||||
|
* @param catgId 分类ID
|
||||||
|
* @param pageNum
|
||||||
|
* @param pageSize
|
||||||
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
|
**/
|
||||||
|
@ApiOperation("新闻列表分页")
|
||||||
|
@ApiImplicitParams(value = {
|
||||||
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class),
|
||||||
|
@ApiImplicitParam(name = "pageNum", value = "页码(1开始)", required = true, dataType = "int", paramType = "query", dataTypeClass = Integer.class),
|
||||||
|
@ApiImplicitParam(name = "pageSize", value = "每页显示数量", required = true, dataType = "int", paramType = "query", dataTypeClass = Integer.class),
|
||||||
|
@ApiImplicitParam(name = "catgId", value = "分类id", required = false, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
|
})
|
||||||
|
@GetMapping("/newsPageList")
|
||||||
|
public R<IPage<BusiProdNew>> newsPageList(String tenantId,String catgId,
|
||||||
|
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
|
Page<BusiProdNew> page = new Page<>(pageNum, pageSize);
|
||||||
|
LambdaQueryWrapper<BusiProdNew> queryWrapper = new LambdaQueryWrapper<BusiProdNew>()
|
||||||
|
.eq(BusiProdNew::getDataType,DATA_TYPE_NEWS)
|
||||||
|
.eq(BusiProdNew::getIfPublic,true)
|
||||||
|
.eq(BusiProdNew::getTenantId,tenantId);
|
||||||
|
if(StringUtils.isNotEmpty(catgId)){
|
||||||
|
List<String> catgIdList= new ArrayList<>();
|
||||||
|
catgIdList.add(catgId);
|
||||||
|
catgIdList.addAll(categoryService.getAllChildrenId(catgId));
|
||||||
|
queryWrapper.in(BusiProdNew::getCatgId,catgIdList);
|
||||||
|
}
|
||||||
|
queryWrapper.orderByDesc(BusiProdNew::getSort);
|
||||||
|
return R.ok(prodNewService.page(page,queryWrapper));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品或新闻详情
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 10:04 2025/7/8
|
||||||
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
|
**/
|
||||||
|
@ApiOperation("产品或新闻详情")
|
||||||
|
@ApiImplicitParam(name = "id", value = "产品或新闻ID", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
|
@GetMapping("/prodNewsInfo")
|
||||||
|
public R<WebDetailVO> prodNewsInfo(@RequestParam(required = true) String id){
|
||||||
|
WebDetailVO webDetailVO = new WebDetailVO();
|
||||||
|
return R.ok(prodNewService.getProdNewInfo(id));
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,8 @@ import com.ruoyi.common.annotation.Excel;
|
|||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import com.ruoyi.common.core.domain.DlBaseEntity;
|
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||||
|
|
||||||
@ -20,28 +22,34 @@ import com.ruoyi.common.core.domain.DlBaseEntity;
|
|||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ApiModel(value = "BasePic", description = "轮播图")
|
||||||
public class BasePic extends DlBaseEntity
|
public class BasePic extends DlBaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 主键 */
|
/** 主键 */
|
||||||
@TableId(type = IdType.ASSIGN_UUID)
|
@TableId(type = IdType.ASSIGN_UUID)
|
||||||
|
@ApiModelProperty("主键")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/** 标题 */
|
/** 标题 */
|
||||||
@Excel(name = "标题")
|
@Excel(name = "标题")
|
||||||
|
@ApiModelProperty("标题")
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
/** 排序 */
|
/** 排序 */
|
||||||
@Excel(name = "排序")
|
@Excel(name = "排序")
|
||||||
|
@ApiModelProperty("排序")
|
||||||
private Long sort;
|
private Long sort;
|
||||||
|
|
||||||
/** 图片 */
|
/** 图片 */
|
||||||
@Excel(name = "图片")
|
@Excel(name = "图片")
|
||||||
|
@ApiModelProperty("图片路径")
|
||||||
private String pic;
|
private String pic;
|
||||||
|
|
||||||
/** 站点唯一编码(租户id) */
|
/** 站点唯一编码(租户id) */
|
||||||
@Excel(name = "站点唯一编码", readConverterExp = "租=户id")
|
@Excel(name = "站点唯一编码", readConverterExp = "租=户id")
|
||||||
|
@ApiModelProperty("站点唯一编码")
|
||||||
private String tenantId;
|
private String tenantId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@ import com.ruoyi.common.annotation.Excel;
|
|||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import com.ruoyi.common.core.domain.DlBaseEntity;
|
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||||
|
|
||||||
@ -20,64 +22,84 @@ import com.ruoyi.common.core.domain.DlBaseEntity;
|
|||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ApiModel(value = "BaseSiteInfo", description = "站点信息实体")
|
||||||
public class BaseSiteInfo extends DlBaseEntity
|
public class BaseSiteInfo extends DlBaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 主键 */
|
/** 主键 */
|
||||||
@TableId(type = IdType.ASSIGN_UUID)
|
@TableId(type = IdType.ASSIGN_UUID)
|
||||||
|
@ApiModelProperty("主键")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/** 公司名称 */
|
/** 公司名称 */
|
||||||
@Excel(name = "公司名称")
|
@Excel(name = "公司名称")
|
||||||
|
@ApiModelProperty("公司名称")
|
||||||
private String companyName;
|
private String companyName;
|
||||||
|
|
||||||
/** 传真号码 */
|
/** 传真号码 */
|
||||||
@Excel(name = "传真号码")
|
@Excel(name = "传真号码")
|
||||||
|
@ApiModelProperty("传真号码")
|
||||||
private String faxNumber;
|
private String faxNumber;
|
||||||
|
|
||||||
/** 品牌名称 */
|
/** 品牌名称 */
|
||||||
@Excel(name = "品牌名称")
|
@Excel(name = "品牌名称")
|
||||||
|
@ApiModelProperty("品牌名称")
|
||||||
private String brandName;
|
private String brandName;
|
||||||
|
|
||||||
/** 手机号码(发询盘短信要用到,格式:+8618612345678 或者 +886970123456) */
|
/** 手机号码(发询盘短信要用到,格式:+8618612345678 或者 +886970123456) */
|
||||||
@Excel(name = "手机号码(发询盘短信要用到,格式:+8618612345678 或者 +886970123456)")
|
@Excel(name = "手机号码(发询盘短信要用到,格式:+8618612345678 或者 +886970123456)")
|
||||||
|
@ApiModelProperty("手机号码")
|
||||||
private String tel;
|
private String tel;
|
||||||
|
|
||||||
/** Email(询盘用) */
|
/** Email(询盘用) */
|
||||||
@Excel(name = "Email", readConverterExp = "询=盘用")
|
@Excel(name = "Email", readConverterExp = "询=盘用")
|
||||||
|
@ApiModelProperty("Email")
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
/** Teams账号(询盘用) */
|
/** Teams账号(询盘用) */
|
||||||
@Excel(name = "Teams账号", readConverterExp = "询=盘用")
|
@Excel(name = "Teams账号", readConverterExp = "询=盘用")
|
||||||
|
@ApiModelProperty("Teams账号")
|
||||||
private String teams;
|
private String teams;
|
||||||
|
|
||||||
/** 版权文字 */
|
/** 版权文字 */
|
||||||
@Excel(name = "版权文字")
|
@Excel(name = "版权文字")
|
||||||
|
@ApiModelProperty("版权文字")
|
||||||
private String copyright;
|
private String copyright;
|
||||||
|
|
||||||
/** 联系地址 */
|
/** 联系地址 */
|
||||||
@Excel(name = "联系地址")
|
@Excel(name = "联系地址")
|
||||||
|
@ApiModelProperty("联系地址")
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
/** 站点icon */
|
/** 站点icon */
|
||||||
@Excel(name = "站点icon")
|
@Excel(name = "站点icon")
|
||||||
|
@ApiModelProperty("站点icon")
|
||||||
private String icon;
|
private String icon;
|
||||||
|
|
||||||
/** 站点logo */
|
/** 站点logo */
|
||||||
@Excel(name = "站点logo")
|
@Excel(name = "站点logo")
|
||||||
|
@ApiModelProperty("站点logo")
|
||||||
private String logo;
|
private String logo;
|
||||||
|
|
||||||
/** 站点二维码(或手机访问二维码) */
|
/** 站点二维码(或手机访问二维码) */
|
||||||
@Excel(name = "站点二维码", readConverterExp = "或=手机访问二维码")
|
@Excel(name = "站点二维码", readConverterExp = "或=手机访问二维码")
|
||||||
|
@ApiModelProperty("站点二维码")
|
||||||
private String qrCode;
|
private String qrCode;
|
||||||
|
|
||||||
/** 站点联系方式html */
|
/** 站点联系方式html */
|
||||||
@Excel(name = "站点联系方式html")
|
@Excel(name = "站点联系方式html")
|
||||||
|
@ApiModelProperty("站点联系方式html")
|
||||||
private String contactUs;
|
private String contactUs;
|
||||||
|
|
||||||
|
/** 公司介绍 */
|
||||||
|
@Excel(name = "公司介绍")
|
||||||
|
@ApiModelProperty("公司介绍")
|
||||||
|
private String companyInfo;
|
||||||
|
|
||||||
/** 站点唯一编码(租户id) */
|
/** 站点唯一编码(租户id) */
|
||||||
@Excel(name = "站点唯一编码", readConverterExp = "租=户id")
|
@Excel(name = "站点唯一编码", readConverterExp = "租=户id")
|
||||||
|
@ApiModelProperty("站点唯一编码")
|
||||||
private String tenantId;
|
private String tenantId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,4 +15,13 @@ import com.ruoyi.base.domain.BasePic;
|
|||||||
public interface IBasePicService extends IService<BasePic>
|
public interface IBasePicService extends IService<BasePic>
|
||||||
{
|
{
|
||||||
IPage<BasePic> queryListPage(BasePic pageReqVO, Page<BasePic> page);
|
IPage<BasePic> queryListPage(BasePic pageReqVO, Page<BasePic> page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询轮播图列表,不分页
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 10:33 2025/7/8
|
||||||
|
* @param tenantId 租户id
|
||||||
|
* @return java.util.List<com.ruoyi.base.domain.BasePic>
|
||||||
|
**/
|
||||||
|
List<BasePic> list(String tenantId);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.base.service.impl;
|
package com.ruoyi.base.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -27,4 +29,20 @@ public class BasePicServiceImpl extends ServiceImpl<BasePicMapper,BasePic> impl
|
|||||||
public IPage<BasePic> queryListPage(BasePic pageReqVO, Page<BasePic> page) {
|
public IPage<BasePic> queryListPage(BasePic pageReqVO, Page<BasePic> page) {
|
||||||
return basePicMapper.queryListPage(pageReqVO, page);
|
return basePicMapper.queryListPage(pageReqVO, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询轮播图列表,不分页
|
||||||
|
*
|
||||||
|
* @param tenantId 租户id
|
||||||
|
* @return java.util.List<com.ruoyi.base.domain.BasePic>
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 10:33 2025/7/8
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public List<BasePic> list(String tenantId) {
|
||||||
|
LambdaQueryWrapper<BasePic> queryWrapper = new LambdaQueryWrapper<BasePic>()
|
||||||
|
.eq(BasePic::getTenantId,tenantId)
|
||||||
|
.orderByDesc(BasePic::getSort);
|
||||||
|
return this.list(queryWrapper);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@ import com.ruoyi.common.annotation.Excel;
|
|||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import com.ruoyi.common.core.domain.DlBaseEntity;
|
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||||
|
|
||||||
@ -20,32 +22,34 @@ import com.ruoyi.common.core.domain.DlBaseEntity;
|
|||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ApiModel(value = "BusiCategory", description = "网站栏目分类")
|
||||||
public class BusiCategory extends DlBaseEntity
|
public class BusiCategory extends DlBaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 主键 */
|
/** 主键 */
|
||||||
@TableId(type = IdType.ASSIGN_UUID)
|
@TableId(type = IdType.ASSIGN_UUID)
|
||||||
|
@ApiModelProperty("主键")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/** 栏目code */
|
|
||||||
@Excel(name = "栏目code")
|
|
||||||
private String code;
|
|
||||||
|
|
||||||
/** 栏目名称 */
|
/** 栏目名称 */
|
||||||
@Excel(name = "栏目名称")
|
@Excel(name = "栏目名称")
|
||||||
|
@ApiModelProperty("栏目名称")
|
||||||
private String catgName;
|
private String catgName;
|
||||||
|
|
||||||
/** 栏目级别 */
|
/** 栏目级别 */
|
||||||
@Excel(name = "栏目级别")
|
@Excel(name = "栏目级别")
|
||||||
|
@ApiModelProperty("栏目级别")
|
||||||
private Long catgLevel;
|
private Long catgLevel;
|
||||||
|
|
||||||
/** 栏目类型(一级才栏目才设置) */
|
/** 栏目类型(一级才栏目才设置) */
|
||||||
@Excel(name = "栏目类型(一级才栏目才设置)")
|
@Excel(name = "栏目类型(一级才栏目才设置)")
|
||||||
|
@ApiModelProperty("栏目类型(一级才栏目才设置)")
|
||||||
private String catgType;
|
private String catgType;
|
||||||
|
|
||||||
/** 上级栏目id */
|
/** 上级栏目id */
|
||||||
@Excel(name = "上级栏目id")
|
@Excel(name = "上级栏目id")
|
||||||
|
@ApiModelProperty("上级栏目id")
|
||||||
private String parentId;
|
private String parentId;
|
||||||
|
|
||||||
/** 直接下级产品数 */
|
/** 直接下级产品数 */
|
||||||
@ -58,34 +62,42 @@ public class BusiCategory extends DlBaseEntity
|
|||||||
|
|
||||||
/** 页面title */
|
/** 页面title */
|
||||||
@Excel(name = "页面title")
|
@Excel(name = "页面title")
|
||||||
|
@ApiModelProperty("页面title")
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
/** 页面keyword */
|
/** 页面keyword */
|
||||||
@Excel(name = "页面keyword")
|
@Excel(name = "页面keyword")
|
||||||
|
@ApiModelProperty("页面keyword")
|
||||||
private String keyword;
|
private String keyword;
|
||||||
|
|
||||||
/** 页面description */
|
/** 页面description */
|
||||||
@Excel(name = "页面description")
|
@Excel(name = "页面description")
|
||||||
|
@ApiModelProperty("页面description")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
/** 排序 */
|
/** 排序 */
|
||||||
@Excel(name = "排序")
|
@Excel(name = "排序")
|
||||||
|
@ApiModelProperty("排序")
|
||||||
private Long sort;
|
private Long sort;
|
||||||
|
|
||||||
/** 内容html(适用于单页面+询盘) */
|
/** 内容html(适用于单页面+询盘) */
|
||||||
@Excel(name = "内容html", readConverterExp = "适=用于单页面+询盘")
|
@Excel(name = "内容html", readConverterExp = "适=用于单页面+询盘")
|
||||||
|
@ApiModelProperty("内容html")
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
/** 产品上方内容html(适用于产品) */
|
/** 产品上方内容html(适用于产品) */
|
||||||
@Excel(name = "产品上方内容html", readConverterExp = "适=用于产品")
|
@Excel(name = "产品上方内容html", readConverterExp = "适=用于产品")
|
||||||
|
@ApiModelProperty("产品上方内容html")
|
||||||
private String prodUp;
|
private String prodUp;
|
||||||
|
|
||||||
/** 产品下方内容html(适用于产品) */
|
/** 产品下方内容html(适用于产品) */
|
||||||
@Excel(name = "产品下方内容html", readConverterExp = "适=用于产品")
|
@Excel(name = "产品下方内容html", readConverterExp = "适=用于产品")
|
||||||
|
@ApiModelProperty("产品下方内容html")
|
||||||
private String prodDown;
|
private String prodDown;
|
||||||
|
|
||||||
/** 站点唯一编码(租户id) */
|
/** 站点唯一编码(租户id) */
|
||||||
@Excel(name = "站点唯一编码", readConverterExp = "租=户id")
|
@Excel(name = "站点唯一编码", readConverterExp = "租=户id")
|
||||||
|
@ApiModelProperty("站点唯一编码")
|
||||||
private String tenantId;
|
private String tenantId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@ import com.ruoyi.common.annotation.Excel;
|
|||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
import com.ruoyi.common.core.domain.DlBaseEntity;
|
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||||
|
|
||||||
@ -22,72 +24,91 @@ import java.util.Date;
|
|||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
|
@ApiModel(value = "BusiProdNew", description = "产品或新闻实体")
|
||||||
public class BusiProdNew extends DlBaseEntity
|
public class BusiProdNew extends DlBaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 主键 */
|
/** 主键 */
|
||||||
@TableId(type = IdType.ASSIGN_UUID)
|
@TableId(type = IdType.ASSIGN_UUID)
|
||||||
|
@ApiModelProperty("主键")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/** 所属栏目id */
|
/** 所属栏目id */
|
||||||
@Excel(name = "所属栏目id")
|
@Excel(name = "所属栏目id")
|
||||||
|
@ApiModelProperty("所属栏目id")
|
||||||
private String catgId;
|
private String catgId;
|
||||||
|
|
||||||
/** 数据类型 */
|
/** 数据类型 */
|
||||||
@Excel(name = "数据类型")
|
@Excel(name = "数据类型")
|
||||||
|
@ApiModelProperty("数据类型")
|
||||||
private String dataType;
|
private String dataType;
|
||||||
|
|
||||||
/** 产品名称或文章标题 */
|
/** 产品名称或文章标题 */
|
||||||
@Excel(name = "产品名称或文章标题")
|
@Excel(name = "产品名称或文章标题")
|
||||||
|
@ApiModelProperty("产品名称或文章标题")
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
/** 页面title */
|
/** 页面title */
|
||||||
@Excel(name = "页面title")
|
@Excel(name = "页面title")
|
||||||
|
@ApiModelProperty("页面title")
|
||||||
private String prodTitle;
|
private String prodTitle;
|
||||||
|
|
||||||
/** 页面keyword */
|
/** 页面keyword */
|
||||||
@Excel(name = "页面keyword")
|
@Excel(name = "页面keyword")
|
||||||
|
@ApiModelProperty("页面keyword")
|
||||||
private String prodKeyword;
|
private String prodKeyword;
|
||||||
|
|
||||||
/** 页面description */
|
/** 页面description */
|
||||||
@Excel(name = "页面description")
|
@Excel(name = "页面description")
|
||||||
|
@ApiModelProperty("页面description")
|
||||||
private String prodDescription;
|
private String prodDescription;
|
||||||
|
|
||||||
/** 文章来源 */
|
/** 文章来源 */
|
||||||
@Excel(name = "文章来源")
|
@Excel(name = "文章来源")
|
||||||
|
@ApiModelProperty("文章来源")
|
||||||
private String newsFrom;
|
private String newsFrom;
|
||||||
|
|
||||||
/** 文章发布日期 */
|
/** 文章发布日期 */
|
||||||
@Excel(name = "文章发布日期")
|
@Excel(name = "文章发布日期")
|
||||||
|
@ApiModelProperty("文章发布日期")
|
||||||
private Date publicDate;
|
private Date publicDate;
|
||||||
|
|
||||||
/** 产品主图或文章图片 */
|
/** 产品主图或文章图片 */
|
||||||
@Excel(name = "产品主图或文章图片")
|
@Excel(name = "产品主图或文章图片")
|
||||||
|
@ApiModelProperty("产品主图或文章图片")
|
||||||
private String mainPic;
|
private String mainPic;
|
||||||
|
|
||||||
/** 产品图(多张) */
|
/** 产品图(多张) */
|
||||||
@Excel(name = "产品图", readConverterExp = "多=张")
|
@Excel(name = "产品图", readConverterExp = "多张")
|
||||||
|
@ApiModelProperty("产品图")
|
||||||
private String pics;
|
private String pics;
|
||||||
|
|
||||||
/** 产品简介或文章简介(支持换行符) */
|
/** 产品简介或文章简介(支持换行符) */
|
||||||
@Excel(name = "产品简介或文章简介", readConverterExp = "支=持换行符")
|
@Excel(name = "产品简介或文章简介", readConverterExp = "支=持换行符")
|
||||||
|
@ApiModelProperty("产品简介或文章简介")
|
||||||
private String description;
|
private String description;
|
||||||
|
|
||||||
/** 产品内容或文章内容(富文本) */
|
/** 产品内容或文章内容(富文本) */
|
||||||
|
@ApiModelProperty("产品内容或文章内容(富文本)")
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
/** 排序 */
|
/** 排序 */
|
||||||
|
@ApiModelProperty("排序")
|
||||||
private Long sort;
|
private Long sort;
|
||||||
|
|
||||||
/** 是否首页推荐显示 */
|
/** 是否首页推荐显示 */
|
||||||
@Excel(name = "是否首页推荐显示")
|
@Excel(name = "是否首页推荐显示")
|
||||||
|
@ApiModelProperty("是否首页推荐显示")
|
||||||
private Boolean ifReco;
|
private Boolean ifReco;
|
||||||
|
|
||||||
/** 是否发布(未发布的在草稿箱) */
|
/** 是否发布(未发布的在草稿箱) */
|
||||||
@Excel(name = "是否发布", readConverterExp = "未=发布的在草稿箱")
|
@Excel(name = "是否发布", readConverterExp = "未=发布的在草稿箱")
|
||||||
|
@ApiModelProperty("是否发布")
|
||||||
private Boolean ifPublic;
|
private Boolean ifPublic;
|
||||||
|
|
||||||
/** 站点唯一编码(租户id) */
|
/** 站点唯一编码(租户id) */
|
||||||
|
@ApiModelProperty("站点唯一编码(租户id)")
|
||||||
private String tenantId;
|
private String tenantId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,9 @@ package com.ruoyi.busi.mapper;
|
|||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.ruoyi.busi.domain.BusiCategory;
|
import com.ruoyi.busi.domain.BusiCategory;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 网站栏目Mapper接口
|
* 网站栏目Mapper接口
|
||||||
@ -12,4 +15,6 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
*/
|
*/
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface BusiCategoryMapper extends BaseMapper<BusiCategory> {
|
public interface BusiCategoryMapper extends BaseMapper<BusiCategory> {
|
||||||
|
|
||||||
|
List<String> selectAllChildren(@Param("id")String id);
|
||||||
}
|
}
|
||||||
|
@ -29,4 +29,18 @@ public interface BusiProdNewMapper extends BaseMapper<BusiProdNew>
|
|||||||
* @return java.util.List<com.ruoyi.busi.vo.ProdNewVO>
|
* @return java.util.List<com.ruoyi.busi.vo.ProdNewVO>
|
||||||
**/
|
**/
|
||||||
List<ProdNewVO> getCatgAmount(@Param("tenantId")String tenantId);
|
List<ProdNewVO> getCatgAmount(@Param("tenantId")String tenantId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询上一个下一个产品或新闻
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 16:16 2025/7/8
|
||||||
|
* @param dataType 数据类型
|
||||||
|
* @param sort 排序
|
||||||
|
* @param sortType 上一个或下一个
|
||||||
|
* @param tenantId 站点ID
|
||||||
|
* @param catgId 分类ID
|
||||||
|
* @return com.ruoyi.busi.domain.BusiProdNew
|
||||||
|
**/
|
||||||
|
BusiProdNew selectPreOrNext(@Param("dataType") String dataType,@Param("sort") Long sort,@Param("sortType") String sortType,
|
||||||
|
@Param("tenantId") String tenantId,@Param("catgId") String catgId);
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,13 @@ public interface IBusiCategoryService extends IService<BusiCategory> {
|
|||||||
**/
|
**/
|
||||||
void setCategoryAmount(List<ProdNewVO> list,String tenantId);
|
void setCategoryAmount(List<ProdNewVO> list,String tenantId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 15:30 2025/7/8
|
||||||
|
* @param id 查询的栏目ID
|
||||||
|
* @return java.util.List<java.lang.String>
|
||||||
|
**/
|
||||||
|
List<String> getAllChildrenId(String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.ruoyi.busi.domain.BusiProdNew;
|
import com.ruoyi.busi.domain.BusiProdNew;
|
||||||
import com.ruoyi.busi.vo.ProdNewVO;
|
import com.ruoyi.busi.vo.ProdNewVO;
|
||||||
|
import com.ruoyi.busi.vo.WebDetailVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品、文章Service接口
|
* 产品、文章Service接口
|
||||||
@ -44,4 +45,22 @@ public interface IBusiProdNewService extends IService<BusiProdNew>
|
|||||||
* @return java.util.Map<java.lang.String,java.lang.Object>
|
* @return java.util.Map<java.lang.String,java.lang.Object>
|
||||||
**/
|
**/
|
||||||
Map<String,Object> getIndexData(String tenantId);
|
Map<String,Object> getIndexData(String tenantId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页查询热门产品
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 11:33 2025/7/8
|
||||||
|
* @param tenantId 租户id
|
||||||
|
* @return java.util.List<com.ruoyi.busi.domain.BusiProdNew>
|
||||||
|
**/
|
||||||
|
List<BusiProdNew> hotProdOrNews(String tenantId,String dateType,Boolean ifHot);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web站点查看详情
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 16:10 2025/7/8
|
||||||
|
* @param id TODO
|
||||||
|
* @return com.ruoyi.busi.vo.WebDetailVO
|
||||||
|
**/
|
||||||
|
WebDetailVO getProdNewInfo(String id);
|
||||||
}
|
}
|
||||||
|
@ -184,4 +184,15 @@ public class BusiCategoryServiceImpl extends ServiceImpl<BusiCategoryMapper, Bus
|
|||||||
}
|
}
|
||||||
return roots;
|
return roots;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id 查询的栏目ID
|
||||||
|
* @return java.util.List<java.lang.String>
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 15:30 2025/7/8
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public List<String> getAllChildrenId(String id) {
|
||||||
|
return baseMapper.selectAllChildren(id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,8 +8,12 @@ import java.util.Map;
|
|||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||||
|
import com.ruoyi.busi.domain.BusiProdRandom;
|
||||||
|
import com.ruoyi.busi.mapper.BusiProdRandomMapper;
|
||||||
import com.ruoyi.busi.service.IBusiCategoryService;
|
import com.ruoyi.busi.service.IBusiCategoryService;
|
||||||
import com.ruoyi.busi.vo.ProdNewVO;
|
import com.ruoyi.busi.vo.ProdNewVO;
|
||||||
|
import com.ruoyi.busi.vo.ProdRandomVO;
|
||||||
|
import com.ruoyi.busi.vo.WebDetailVO;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -36,6 +40,8 @@ public class BusiProdNewServiceImpl extends ServiceImpl<BusiProdNewMapper,BusiPr
|
|||||||
private BusiProdNewMapper busiProdNewMapper;
|
private BusiProdNewMapper busiProdNewMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBusiCategoryService categoryService;
|
private IBusiCategoryService categoryService;
|
||||||
|
@Autowired
|
||||||
|
private BusiProdRandomMapper prodRandomMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<ProdNewVO> queryListPage(ProdNewVO pageReqVO, Page<BusiProdNew> page) {
|
public IPage<ProdNewVO> queryListPage(ProdNewVO pageReqVO, Page<BusiProdNew> page) {
|
||||||
@ -129,4 +135,49 @@ public class BusiProdNewServiceImpl extends ServiceImpl<BusiProdNewMapper,BusiPr
|
|||||||
rtnMap.put("newsEdit",newsEdit);
|
rtnMap.put("newsEdit",newsEdit);
|
||||||
return rtnMap;
|
return rtnMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页查询热门产品
|
||||||
|
*
|
||||||
|
* @param tenantId 租户id
|
||||||
|
* @return java.util.List<com.ruoyi.busi.domain.BusiProdNew>
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 11:33 2025/7/8
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public List<BusiProdNew> hotProdOrNews(String tenantId,String dateType,Boolean ifHot) {
|
||||||
|
Page<BusiProdNew> page = new Page<>(1, 10);
|
||||||
|
LambdaQueryWrapper<BusiProdNew> queryWrapper = new LambdaQueryWrapper<BusiProdNew>()
|
||||||
|
.eq(BusiProdNew::getTenantId,tenantId)
|
||||||
|
.eq(BusiProdNew::getDataType,dateType)
|
||||||
|
.eq(BusiProdNew::getIfPublic,true)
|
||||||
|
.eq(BusiProdNew::getIfReco,ifHot)
|
||||||
|
.orderByDesc(BusiProdNew::getSort);
|
||||||
|
return this.page(page,queryWrapper).getRecords();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* web站点查看详情
|
||||||
|
*
|
||||||
|
* @param id TODO
|
||||||
|
* @return com.ruoyi.busi.vo.WebDetailVO
|
||||||
|
* @author vinjor-M
|
||||||
|
* @date 16:07 2025/7/8
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public WebDetailVO getProdNewInfo(String id) {
|
||||||
|
WebDetailVO webDetailVO = new WebDetailVO();
|
||||||
|
BusiProdNew prodNew = this.getById(id);
|
||||||
|
webDetailVO.setBusiProdNew(prodNew);
|
||||||
|
//关联的产品
|
||||||
|
BusiProdRandom prodRandom = new ProdRandomVO();
|
||||||
|
prodRandom.setProdId(id);
|
||||||
|
List<ProdNewVO> randomList = prodRandomMapper.selectRandomList(prodRandom);
|
||||||
|
webDetailVO.setRandomList(randomList);
|
||||||
|
//上一个产品或新闻
|
||||||
|
webDetailVO.setPrevious(busiProdNewMapper.selectPreOrNext(prodNew.getDataType(),prodNew.getSort(),"previous",prodNew.getTenantId(),prodNew.getCatgId()));
|
||||||
|
//下一个产品或新闻
|
||||||
|
webDetailVO.setNext(busiProdNewMapper.selectPreOrNext(prodNew.getDataType(),prodNew.getSort(),"next",prodNew.getTenantId(),prodNew.getCatgId()));
|
||||||
|
return webDetailVO;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,10 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
|||||||
import com.ruoyi.busi.domain.BusiCategory;
|
import com.ruoyi.busi.domain.BusiCategory;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.core.domain.DlBaseEntity;
|
import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -16,6 +19,8 @@ import java.util.List;
|
|||||||
* @author PQZ
|
* @author PQZ
|
||||||
* @date 14:03 2025/6/23
|
* @date 14:03 2025/6/23
|
||||||
**/
|
**/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel(value = "BusiCategoryVO", description = "网站栏目分类")
|
||||||
@Data
|
@Data
|
||||||
public class BusiCategoryVO extends BusiCategory {
|
public class BusiCategoryVO extends BusiCategory {
|
||||||
|
|
||||||
@ -24,5 +29,6 @@ public class BusiCategoryVO extends BusiCategory {
|
|||||||
/**
|
/**
|
||||||
* 子集
|
* 子集
|
||||||
*/
|
*/
|
||||||
|
@ApiModelProperty("子级栏目")
|
||||||
private List<BusiCategoryVO> children = new ArrayList<>();
|
private List<BusiCategoryVO> children = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.ruoyi.busi.vo;
|
||||||
|
|
||||||
|
import com.ruoyi.busi.domain.BusiCategory;
|
||||||
|
import com.ruoyi.busi.domain.BusiProdNew;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModel(value = "WebDetailVO", description = "产品或新闻详情")
|
||||||
|
@Data
|
||||||
|
public class WebDetailVO {
|
||||||
|
/**
|
||||||
|
* 产品或文章详情
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("产品或文章详情")
|
||||||
|
private BusiProdNew busiProdNew;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联的产品列表
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("关联的产品列表")
|
||||||
|
private List<ProdNewVO> randomList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上一个产品或新闻
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("上一个产品或新闻")
|
||||||
|
private BusiProdNew previous;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下一个产品或新闻
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("下一个产品或新闻")
|
||||||
|
private BusiProdNew next;
|
||||||
|
}
|
@ -113,9 +113,9 @@ public class SwaggerConfig
|
|||||||
// 用ApiInfoBuilder进行定制
|
// 用ApiInfoBuilder进行定制
|
||||||
return new ApiInfoBuilder()
|
return new ApiInfoBuilder()
|
||||||
// 设置标题
|
// 设置标题
|
||||||
.title("标题:通告快接管理后台_接口文档")
|
.title("标题:成事达管理后台_接口文档")
|
||||||
// 描述
|
// 描述
|
||||||
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
|
// .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
|
||||||
// 作者信息
|
// 作者信息
|
||||||
.contact(new Contact(ruoyiConfig.getName(), null, null))
|
.contact(new Contact(ruoyiConfig.getName(), null, null))
|
||||||
// 版本
|
// 版本
|
||||||
|
@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="logo" column="logo" />
|
<result property="logo" column="logo" />
|
||||||
<result property="qrCode" column="qr_code" />
|
<result property="qrCode" column="qr_code" />
|
||||||
<result property="contactUs" column="contact_us" />
|
<result property="contactUs" column="contact_us" />
|
||||||
|
<result property="companyInfo" column="company_info" />
|
||||||
<result property="tenantId" column="tenant_id" />
|
<result property="tenantId" column="tenant_id" />
|
||||||
<result property="creator" column="creator" />
|
<result property="creator" column="creator" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectBaseSiteInfoVo">
|
<sql id="selectBaseSiteInfoVo">
|
||||||
select id, company_name, fax_number, brand_name, tel, email, teams, copyright, address, icon, logo, qr_code, contact_us, tenant_id, creator, create_time, updater, update_time, del_flag from dl_base_site_info
|
select id, company_name, fax_number, brand_name, tel, email, teams, copyright, address, icon, logo, qr_code, contact_us,company_info, tenant_id, creator, create_time, updater, update_time, del_flag from dl_base_site_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="queryListPage" parameterType="BaseSiteInfo" resultMap="BaseSiteInfoResult">
|
<select id="queryListPage" parameterType="BaseSiteInfo" resultMap="BaseSiteInfoResult">
|
||||||
|
@ -6,7 +6,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<resultMap type="BusiCategory" id="BusiCategoryResult">
|
<resultMap type="BusiCategory" id="BusiCategoryResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="code" column="code" />
|
|
||||||
<result property="catgName" column="catg_name" />
|
<result property="catgName" column="catg_name" />
|
||||||
<result property="catgLevel" column="catg_level" />
|
<result property="catgLevel" column="catg_level" />
|
||||||
<result property="catgType" column="catg_type" />
|
<result property="catgType" column="catg_type" />
|
||||||
@ -29,7 +28,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectBusiCategoryVo">
|
<sql id="selectBusiCategoryVo">
|
||||||
select id, code, catg_name, catg_level, catg_type, parent_id, prods_junior, prods_all, title, keyword, description, sort, content, prod_up, prod_down, tenant_id, creator, create_time, updater, update_time, del_flag from dl_busi_category
|
select id, catg_name, catg_level, catg_type, parent_id, prods_junior, prods_all, title, keyword, description, sort, content, prod_up, prod_down, tenant_id, creator, create_time, updater, update_time, del_flag from dl_busi_category
|
||||||
</sql>
|
</sql>
|
||||||
|
<select id="selectAllChirdren" resultType="java.lang.String">
|
||||||
|
SELECT
|
||||||
|
id
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
t1.id,
|
||||||
|
IF
|
||||||
|
( find_in_set( parent_id, @pids ) > 0, @pids := concat( @pids, ',', id ), - 1 ) AS ischild
|
||||||
|
FROM
|
||||||
|
( SELECT id, parent_id FROM dl_busi_category t ORDER BY id, parent_id ) t1,
|
||||||
|
( SELECT @pids := #{id} ) t2
|
||||||
|
) t3
|
||||||
|
WHERE
|
||||||
|
ischild != -1
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -133,4 +133,23 @@
|
|||||||
GROUP BY
|
GROUP BY
|
||||||
catg_id
|
catg_id
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectPreOrNext" resultType="com.ruoyi.busi.domain.BusiProdNew">
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
dl_busi_prod_new
|
||||||
|
WHERE
|
||||||
|
del_flag = '0'
|
||||||
|
AND tenant_id = #{tenantId}
|
||||||
|
AND data_type = #{dataType}
|
||||||
|
AND catg_id = #{catgId}
|
||||||
|
<if test="'previous'==sortType">
|
||||||
|
AND sort > #{sort}
|
||||||
|
ORDER BY sort LIMIT 1
|
||||||
|
</if>
|
||||||
|
<if test="'next'==sortType">
|
||||||
|
AND sort < #{sort}
|
||||||
|
ORDER BY sort DESC LIMIT 1
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -38,8 +38,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
LEFT JOIN dl_busi_category dbc ON dbpn.catg_id = dbc.id
|
LEFT JOIN dl_busi_category dbc ON dbpn.catg_id = dbc.id
|
||||||
WHERE
|
WHERE
|
||||||
dbpr.prod_id = #{map.prodId}
|
dbpr.prod_id = #{map.prodId}
|
||||||
AND dbpr.tenant_id =#{map.tenantId}
|
|
||||||
AND dbpn.tenant_id =#{map.tenantId}
|
|
||||||
AND dbpr.del_flag = '0'
|
AND dbpr.del_flag = '0'
|
||||||
ORDER BY
|
ORDER BY
|
||||||
dbpn.sort DESC
|
dbpn.sort DESC
|
||||||
|
@ -113,8 +113,7 @@ public class SecurityConfig
|
|||||||
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
// 对于登录login 注册register 验证码captchaImage 允许匿名访问
|
||||||
requests.antMatchers("/login","/wxLogin", "/register", "/captchaImage","/sys/ueditor/exec","/ws/asset/**").permitAll()
|
requests.antMatchers("/login","/wxLogin", "/register", "/captchaImage","/sys/ueditor/exec","/ws/asset/**").permitAll()
|
||||||
//相关配置参数可匿名访问
|
//相关配置参数可匿名访问
|
||||||
.antMatchers("/base/config/getConfigByCode").permitAll()
|
.antMatchers("/web/**").permitAll()
|
||||||
.antMatchers("/base/category/getByCodeInfo").permitAll()
|
|
||||||
// 静态资源,可匿名访问
|
// 静态资源,可匿名访问
|
||||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||||
.antMatchers("/swagger-ui.html", "/system/config/configKey/isOpenZf","/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
.antMatchers("/swagger-ui.html", "/system/config/configKey/isOpenZf","/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||||
|
@ -90,7 +90,14 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="站点联系方式" prop="contactUs">
|
<el-form-item label="站点联系方式" prop="contactUs">
|
||||||
<editor v-model="form.contactUs" :min-height="400"/>
|
<editor v-model="form.contactUs" :min-height="200"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="公司介绍" prop="companyInfo">
|
||||||
|
<editor v-model="form.companyInfo" :min-height="400"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -122,6 +129,7 @@ export default {
|
|||||||
logo: null,
|
logo: null,
|
||||||
qrCode: null,
|
qrCode: null,
|
||||||
contactUs: null,
|
contactUs: null,
|
||||||
|
companyInfo: null,
|
||||||
tenantId: null,
|
tenantId: null,
|
||||||
creator: null,
|
creator: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
@ -156,7 +164,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
mounted() {
|
||||||
this.getDataInfo()
|
this.getDataInfo()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Loading…
Reference in New Issue
Block a user