Compare commits
No commits in common. "71ec511819f778f4ad1ed6fcbfe40a0cdeb3f6b2" and "3ee97a885a2271afbd22f07bb057ea233f88b025" have entirely different histories.
71ec511819
...
3ee97a885a
@ -172,13 +172,10 @@ public class WebController extends BaseController {
|
|||||||
* @date 10:04 2025/7/8
|
* @date 10:04 2025/7/8
|
||||||
**/
|
**/
|
||||||
@ApiOperation("热门产品-前10")
|
@ApiOperation("热门产品-前10")
|
||||||
@ApiImplicitParams(value = {
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class),
|
|
||||||
@ApiImplicitParam(name = "showPlat", value = "平台标识(网站|App)", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
|
||||||
})
|
|
||||||
@GetMapping("/hotProduct")
|
@GetMapping("/hotProduct")
|
||||||
public R<List<BusiProdNew>> hotProduct(@RequestParam(required = true) String tenantId,@RequestParam(required = true) String showPlat) {
|
public R<List<BusiProdNew>> hotProduct(@RequestParam(required = true) String tenantId) {
|
||||||
return R.ok(prodNewService.hotProdOrNews(tenantId, DATA_TYPE_PRODUCT, true,showPlat));
|
return R.ok(prodNewService.hotProdOrNews(tenantId, DATA_TYPE_PRODUCT, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -189,13 +186,10 @@ public class WebController extends BaseController {
|
|||||||
* @date 10:04 2025/7/8
|
* @date 10:04 2025/7/8
|
||||||
**/
|
**/
|
||||||
@ApiOperation("普通产品-前10")
|
@ApiOperation("普通产品-前10")
|
||||||
@ApiImplicitParams(value = {
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class),
|
|
||||||
@ApiImplicitParam(name = "showPlat", value = "平台标识(网站|App)", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
|
||||||
})
|
|
||||||
@GetMapping("/product")
|
@GetMapping("/product")
|
||||||
public R<List<BusiProdNew>> product(@RequestParam(required = true) String tenantId,@RequestParam(required = true) String showPlat) {
|
public R<List<BusiProdNew>> product(@RequestParam(required = true) String tenantId) {
|
||||||
return R.ok(prodNewService.hotProdOrNews(tenantId, DATA_TYPE_PRODUCT, false,showPlat));
|
return R.ok(prodNewService.hotProdOrNews(tenantId, DATA_TYPE_PRODUCT, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -206,13 +200,10 @@ public class WebController extends BaseController {
|
|||||||
* @date 10:04 2025/7/8
|
* @date 10:04 2025/7/8
|
||||||
**/
|
**/
|
||||||
@ApiOperation("热门新闻-前10")
|
@ApiOperation("热门新闻-前10")
|
||||||
@ApiImplicitParams(value = {
|
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class),
|
|
||||||
@ApiImplicitParam(name = "showPlat", value = "平台标识(网站|App)", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
|
||||||
})
|
|
||||||
@GetMapping("/hotNews")
|
@GetMapping("/hotNews")
|
||||||
public R<List<BusiProdNew>> hotNews(@RequestParam(required = true) String tenantId,@RequestParam(required = true) String showPlat) {
|
public R<List<BusiProdNew>> hotNews(@RequestParam(required = true) String tenantId) {
|
||||||
return R.ok(prodNewService.hotProdOrNews(tenantId, DATA_TYPE_NEWS, true,showPlat));
|
return R.ok(prodNewService.hotProdOrNews(tenantId, DATA_TYPE_NEWS, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -246,18 +237,16 @@ public class WebController extends BaseController {
|
|||||||
@ApiImplicitParam(name = "pageNum", value = "页码(1开始)", required = true, dataType = "int", paramType = "query", dataTypeClass = Integer.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 = "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),
|
@ApiImplicitParam(name = "catgId", value = "分类id", required = false, dataType = "string", paramType = "query", dataTypeClass = String.class),
|
||||||
@ApiImplicitParam(name = "text", value = "搜索内容", required = false, dataType = "string", paramType = "query", dataTypeClass = String.class),
|
@ApiImplicitParam(name = "text", value = "搜索内容", required = false, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
@ApiImplicitParam(name = "showPlat", value = "平台标识(网站|App)", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
|
||||||
})
|
})
|
||||||
@GetMapping("/prodPageList")
|
@GetMapping("/prodPageList")
|
||||||
public R<IPage<BusiProdNew>> prodPageList(String tenantId, @RequestParam(required = false) String catgId, @RequestParam(required = false) String text,String showPlat,
|
public R<IPage<BusiProdNew>> prodPageList(String tenantId, String catgId, String text,
|
||||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
Page<BusiProdNew> page = new Page<>(pageNum, pageSize);
|
Page<BusiProdNew> page = new Page<>(pageNum, pageSize);
|
||||||
LambdaQueryWrapper<BusiProdNew> queryWrapper = new LambdaQueryWrapper<BusiProdNew>()
|
LambdaQueryWrapper<BusiProdNew> queryWrapper = new LambdaQueryWrapper<BusiProdNew>()
|
||||||
.eq(BusiProdNew::getDataType, DATA_TYPE_PRODUCT)
|
.eq(BusiProdNew::getDataType, DATA_TYPE_PRODUCT)
|
||||||
.eq(BusiProdNew::getIfPublic, true)
|
.eq(BusiProdNew::getIfPublic, true)
|
||||||
.like(BusiProdNew::getShowPlat,showPlat)
|
|
||||||
.eq(BusiProdNew::getTenantId, tenantId);
|
.eq(BusiProdNew::getTenantId, tenantId);
|
||||||
if (StringUtils.isNotEmpty(text)) {
|
if (StringUtils.isNotEmpty(text)) {
|
||||||
queryWrapper.and(wq -> wq
|
queryWrapper.and(wq -> wq
|
||||||
@ -302,18 +291,16 @@ public class WebController extends BaseController {
|
|||||||
@ApiImplicitParam(name = "pageNum", value = "页码(1开始)", required = true, dataType = "int", paramType = "query", dataTypeClass = Integer.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 = "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),
|
@ApiImplicitParam(name = "catgId", value = "分类id", required = false, dataType = "string", paramType = "query", dataTypeClass = String.class),
|
||||||
@ApiImplicitParam(name = "text", value = "搜索内容", required = false, dataType = "string", paramType = "query", dataTypeClass = String.class),
|
@ApiImplicitParam(name = "text", value = "搜索内容", required = false, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
@ApiImplicitParam(name = "showPlat", value = "平台标识(网站|App)", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
|
||||||
})
|
})
|
||||||
@GetMapping("/newsPageList")
|
@GetMapping("/newsPageList")
|
||||||
public R<IPage<BusiProdNew>> newsPageList(String tenantId, @RequestParam(required = false) String catgId, @RequestParam(required = false) String text,String showPlat,
|
public R<IPage<BusiProdNew>> newsPageList(String tenantId, String catgId, String text,
|
||||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
Page<BusiProdNew> page = new Page<>(pageNum, pageSize);
|
Page<BusiProdNew> page = new Page<>(pageNum, pageSize);
|
||||||
LambdaQueryWrapper<BusiProdNew> queryWrapper = new LambdaQueryWrapper<BusiProdNew>()
|
LambdaQueryWrapper<BusiProdNew> queryWrapper = new LambdaQueryWrapper<BusiProdNew>()
|
||||||
.eq(BusiProdNew::getDataType, DATA_TYPE_NEWS)
|
.eq(BusiProdNew::getDataType, DATA_TYPE_NEWS)
|
||||||
.eq(BusiProdNew::getIfPublic, true)
|
.eq(BusiProdNew::getIfPublic, true)
|
||||||
.like(BusiProdNew::getShowPlat,showPlat)
|
|
||||||
.eq(BusiProdNew::getTenantId, tenantId);
|
.eq(BusiProdNew::getTenantId, tenantId);
|
||||||
if (StringUtils.isNotEmpty(text)) {
|
if (StringUtils.isNotEmpty(text)) {
|
||||||
queryWrapper.and(wq -> wq
|
queryWrapper.and(wq -> wq
|
||||||
@ -367,15 +354,14 @@ public class WebController extends BaseController {
|
|||||||
@ApiImplicitParam(name = "tenantId", value = "站点唯一码", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class),
|
@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 = "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 = "pageSize", value = "每页显示数量", required = true, dataType = "int", paramType = "query", dataTypeClass = Integer.class),
|
||||||
@ApiImplicitParam(name = "text", value = "搜索内容", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class),
|
@ApiImplicitParam(name = "text", value = "搜索内容", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
||||||
@ApiImplicitParam(name = "showPlat", value = "平台标识(网站|App)", required = true, dataType = "string", paramType = "query", dataTypeClass = String.class)
|
|
||||||
})
|
})
|
||||||
@GetMapping("/searchText")
|
@GetMapping("/searchText")
|
||||||
public R<IPage<BusiProdNew>> searchText(String tenantId, String text,String showPlat,
|
public R<IPage<BusiProdNew>> searchText(String tenantId, String text,
|
||||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
Page<BusiProdNew> page = new Page<>(pageNum, pageSize);
|
Page<BusiProdNew> page = new Page<>(pageNum, pageSize);
|
||||||
return R.ok(prodNewService.searchTextAll(tenantId, text, page,showPlat));
|
return R.ok(prodNewService.searchTextAll(tenantId, text, page));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5,10 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.ruoyi.base.service.IBasePicsService;
|
import com.ruoyi.base.service.IBasePicsService;
|
||||||
import com.ruoyi.busi.domain.BusiProdNew;
|
import com.ruoyi.busi.domain.BusiProdNew;
|
||||||
import com.ruoyi.busi.domain.BusiProdRandom;
|
import com.ruoyi.busi.domain.BusiProdRandom;
|
||||||
import com.ruoyi.busi.domain.BusiRelation;
|
|
||||||
import com.ruoyi.busi.service.IBusiProdNewService;
|
import com.ruoyi.busi.service.IBusiProdNewService;
|
||||||
import com.ruoyi.busi.service.IBusiProdRandomService;
|
import com.ruoyi.busi.service.IBusiProdRandomService;
|
||||||
import com.ruoyi.busi.service.IBusiRelationService;
|
|
||||||
import com.ruoyi.busi.utils.SimHash;
|
import com.ruoyi.busi.utils.SimHash;
|
||||||
import com.ruoyi.busi.utils.TextPreprocessor;
|
import com.ruoyi.busi.utils.TextPreprocessor;
|
||||||
import com.ruoyi.busi.vo.ProdNewVO;
|
import com.ruoyi.busi.vo.ProdNewVO;
|
||||||
@ -17,7 +15,6 @@ import com.ruoyi.common.annotation.Log;
|
|||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@ -46,8 +43,6 @@ public class BusiNewController extends BaseController
|
|||||||
private IBasePicsService basePicsService;
|
private IBasePicsService basePicsService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBusiProdRandomService prodRandomService;
|
private IBusiProdRandomService prodRandomService;
|
||||||
@Autowired
|
|
||||||
private IBusiRelationService relationService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询新闻列表
|
* 查询新闻列表
|
||||||
@ -126,13 +121,6 @@ public class BusiNewController extends BaseController
|
|||||||
});
|
});
|
||||||
basePicsService.saveBatch(prodNewVO.getFileList());
|
basePicsService.saveBatch(prodNewVO.getFileList());
|
||||||
}
|
}
|
||||||
//默认负责人就是当前用户
|
|
||||||
BusiRelation relation = new BusiRelation();
|
|
||||||
relation.setUserId(SecurityUtils.getUserId());
|
|
||||||
relation.setProdId(prodNewVO.getId());
|
|
||||||
relation.setTenantId(prodNewVO.getTenantId());
|
|
||||||
relationService.save(relation);
|
|
||||||
|
|
||||||
busiProdNewService.setAmount(prodNewVO.getTenantId());
|
busiProdNewService.setAmount(prodNewVO.getTenantId());
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
@ -10,14 +10,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.ruoyi.base.service.IBasePicsService;
|
import com.ruoyi.base.service.IBasePicsService;
|
||||||
import com.ruoyi.busi.domain.BusiProdRandom;
|
import com.ruoyi.busi.domain.BusiProdRandom;
|
||||||
import com.ruoyi.busi.domain.BusiRelation;
|
|
||||||
import com.ruoyi.busi.service.IBusiProdRandomService;
|
import com.ruoyi.busi.service.IBusiProdRandomService;
|
||||||
import com.ruoyi.busi.service.IBusiRelationService;
|
|
||||||
import com.ruoyi.busi.utils.SimHash;
|
import com.ruoyi.busi.utils.SimHash;
|
||||||
import com.ruoyi.busi.utils.TextPreprocessor;
|
import com.ruoyi.busi.utils.TextPreprocessor;
|
||||||
import com.ruoyi.busi.vo.ProdNewVO;
|
import com.ruoyi.busi.vo.ProdNewVO;
|
||||||
import com.ruoyi.busi.vo.ProdRandomVO;
|
import com.ruoyi.busi.vo.ProdRandomVO;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -57,8 +54,6 @@ public class BusiProdController extends BaseController
|
|||||||
private IBasePicsService basePicsService;
|
private IBasePicsService basePicsService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBusiProdRandomService prodRandomService;
|
private IBusiProdRandomService prodRandomService;
|
||||||
@Autowired
|
|
||||||
private IBusiRelationService relationService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询产品列表
|
* 查询产品列表
|
||||||
@ -137,13 +132,6 @@ public class BusiProdController extends BaseController
|
|||||||
});
|
});
|
||||||
basePicsService.saveBatch(prodNewVO.getFileList());
|
basePicsService.saveBatch(prodNewVO.getFileList());
|
||||||
}
|
}
|
||||||
//默认负责人就是当前用户
|
|
||||||
BusiRelation relation = new BusiRelation();
|
|
||||||
relation.setUserId(SecurityUtils.getUserId());
|
|
||||||
relation.setProdId(prodNewVO.getId());
|
|
||||||
relation.setTenantId(prodNewVO.getTenantId());
|
|
||||||
relationService.save(relation);
|
|
||||||
|
|
||||||
busiProdNewService.setAmount(prodNewVO.getTenantId());
|
busiProdNewService.setAmount(prodNewVO.getTenantId());
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ public class BusiRelationController extends BaseController
|
|||||||
List<BusiRelation> busiRelationList = new ArrayList<>();
|
List<BusiRelation> busiRelationList = new ArrayList<>();
|
||||||
userIdList.forEach(item->{
|
userIdList.forEach(item->{
|
||||||
BusiRelation relation = new BusiRelation();
|
BusiRelation relation = new BusiRelation();
|
||||||
relation.setUserId(Long.valueOf(item));
|
relation.setUserId(item);
|
||||||
relation.setProdId(busiRelation.getProdId());
|
relation.setProdId(busiRelation.getProdId());
|
||||||
relation.setTenantId(busiRelation.getTenantId());
|
relation.setTenantId(busiRelation.getTenantId());
|
||||||
busiRelationList.add(relation);
|
busiRelationList.add(relation);
|
||||||
|
@ -30,7 +30,7 @@ public class BusiRelation extends DlBaseEntity
|
|||||||
|
|
||||||
/** 用户id */
|
/** 用户id */
|
||||||
@Excel(name = "用户id")
|
@Excel(name = "用户id")
|
||||||
private Long userId;
|
private String userId;
|
||||||
|
|
||||||
/** 产品、新闻id */
|
/** 产品、新闻id */
|
||||||
@Excel(name = "产品、新闻id")
|
@Excel(name = "产品、新闻id")
|
||||||
|
@ -54,7 +54,7 @@ public interface IBusiProdNewService extends IService<BusiProdNew>
|
|||||||
* @param tenantId 租户id
|
* @param tenantId 租户id
|
||||||
* @return java.util.List<com.ruoyi.busi.domain.BusiProdNew>
|
* @return java.util.List<com.ruoyi.busi.domain.BusiProdNew>
|
||||||
**/
|
**/
|
||||||
List<BusiProdNew> hotProdOrNews(String tenantId,String dateType,Boolean ifHot,String showPlat);
|
List<BusiProdNew> hotProdOrNews(String tenantId,String dateType,Boolean ifHot);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web站点查看详情
|
* web站点查看详情
|
||||||
@ -74,7 +74,7 @@ public interface IBusiProdNewService extends IService<BusiProdNew>
|
|||||||
* @param page 分页对象
|
* @param page 分页对象
|
||||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<com.ruoyi.busi.vo.ProdNewVO>
|
* @return com.baomidou.mybatisplus.core.metadata.IPage<com.ruoyi.busi.vo.ProdNewVO>
|
||||||
**/
|
**/
|
||||||
IPage<BusiProdNew> searchTextAll(String tenantId, String text,Page<BusiProdNew> page,String showPlat);
|
IPage<BusiProdNew> searchTextAll(String tenantId, String text,Page<BusiProdNew> page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 相似度检测
|
* 相似度检测
|
||||||
|
@ -146,14 +146,13 @@ public class BusiProdNewServiceImpl extends ServiceImpl<BusiProdNewMapper,BusiPr
|
|||||||
* @date 11:33 2025/7/8
|
* @date 11:33 2025/7/8
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public List<BusiProdNew> hotProdOrNews(String tenantId,String dateType,Boolean ifHot,String showPlat) {
|
public List<BusiProdNew> hotProdOrNews(String tenantId,String dateType,Boolean ifHot) {
|
||||||
Page<BusiProdNew> page = new Page<>(1, 10);
|
Page<BusiProdNew> page = new Page<>(1, 10);
|
||||||
LambdaQueryWrapper<BusiProdNew> queryWrapper = new LambdaQueryWrapper<BusiProdNew>()
|
LambdaQueryWrapper<BusiProdNew> queryWrapper = new LambdaQueryWrapper<BusiProdNew>()
|
||||||
.eq(BusiProdNew::getTenantId,tenantId)
|
.eq(BusiProdNew::getTenantId,tenantId)
|
||||||
.eq(BusiProdNew::getDataType,dateType)
|
.eq(BusiProdNew::getDataType,dateType)
|
||||||
.eq(BusiProdNew::getIfPublic,true)
|
.eq(BusiProdNew::getIfPublic,true)
|
||||||
.eq(BusiProdNew::getIfReco,ifHot)
|
.eq(BusiProdNew::getIfReco,ifHot)
|
||||||
.like(BusiProdNew::getShowPlat,showPlat)
|
|
||||||
.orderByDesc(BusiProdNew::getSort);
|
.orderByDesc(BusiProdNew::getSort);
|
||||||
//查所有栏目
|
//查所有栏目
|
||||||
BusiCategory category = new BusiCategory();
|
BusiCategory category = new BusiCategory();
|
||||||
@ -203,11 +202,10 @@ public class BusiProdNewServiceImpl extends ServiceImpl<BusiProdNewMapper,BusiPr
|
|||||||
* @date 13:55 2025/7/9
|
* @date 13:55 2025/7/9
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public IPage<BusiProdNew> searchTextAll(String tenantId, String text, Page<BusiProdNew> page,String showPlat) {
|
public IPage<BusiProdNew> searchTextAll(String tenantId, String text, Page<BusiProdNew> page) {
|
||||||
LambdaQueryWrapper<BusiProdNew> queryWrapper = new LambdaQueryWrapper<BusiProdNew>()
|
LambdaQueryWrapper<BusiProdNew> queryWrapper = new LambdaQueryWrapper<BusiProdNew>()
|
||||||
.eq(BusiProdNew::getTenantId,tenantId)
|
.eq(BusiProdNew::getTenantId,tenantId)
|
||||||
.eq(BusiProdNew::getIfPublic,true)
|
.eq(BusiProdNew::getIfPublic,true)
|
||||||
.like(BusiProdNew::getShowPlat,showPlat)
|
|
||||||
.and(wq->wq
|
.and(wq->wq
|
||||||
.like(BusiProdNew::getTitle,text)
|
.like(BusiProdNew::getTitle,text)
|
||||||
.or().like(BusiProdNew::getDescription,text)
|
.or().like(BusiProdNew::getDescription,text)
|
||||||
|
@ -4,16 +4,6 @@
|
|||||||
<el-form-item label="分类" prop="catgId">
|
<el-form-item label="分类" prop="catgId">
|
||||||
<treeselect style="width: 200px" v-model="queryParams.catgId" :options="catgOptions" :normalizer="normalizer" :noResultsText="'暂无数据'" placeholder="选择分类" />
|
<treeselect style="width: 200px" v-model="queryParams.catgId" :options="catgOptions" :normalizer="normalizer" :noResultsText="'暂无数据'" placeholder="选择分类" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="展示平台" prop="showPlat">
|
|
||||||
<el-select v-model="queryParams.showPlat" placeholder="请选择展示平台" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.show_plateform"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="新闻标题" prop="title">
|
<el-form-item label="新闻标题" prop="title">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.title"
|
v-model="queryParams.title"
|
||||||
@ -85,7 +75,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="新闻负责人" align="center" prop="leaderName" />
|
<el-table-column label="新闻负责人" align="center" prop="leaderName" />
|
||||||
<el-table-column label="展示平台" align="center" prop="showPlat" />
|
|
||||||
<!-- <el-table-column label="产品简介" align="center" prop="description" />-->
|
<!-- <el-table-column label="产品简介" align="center" prop="description" />-->
|
||||||
<el-table-column width="100" label="排序" align="center" prop="sort">
|
<el-table-column width="100" label="排序" align="center" prop="sort">
|
||||||
<template slot="header" slot-scope="scope">
|
<template slot="header" slot-scope="scope">
|
||||||
@ -201,7 +190,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "New",
|
name: "New",
|
||||||
dicts: ['sys_yes_no','show_plateform'],
|
dicts: ['sys_yes_no'],
|
||||||
components: { selectAllUser,selectProduct,randomProduct ,Treeselect},
|
components: { selectAllUser,selectProduct,randomProduct ,Treeselect},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -202,21 +202,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="展示平台" prop="showPlat">
|
|
||||||
<el-checkbox-group v-model="showPlatList" @change="changeCheckBox">
|
|
||||||
<el-checkbox v-for="dict in dict.type.show_plateform" :label="dict.label" :value="dict.value"></el-checkbox>
|
|
||||||
</el-checkbox-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="24">
|
|
||||||
<el-form-item label="新闻内容">
|
|
||||||
<editor :key="showKeywords" v-model="form.content" :min-height="192"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-form-item label="新闻内容">
|
||||||
|
<editor :key="showKeywords" v-model="form.content" :min-height="192"/>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -259,7 +248,6 @@ import SimilarityNew from './similarityNew'
|
|||||||
export default {
|
export default {
|
||||||
name: 'newForm',
|
name: 'newForm',
|
||||||
components: { SimilarityNew, Treeselect, selectPic , Hamburger , countTo},
|
components: { SimilarityNew, Treeselect, selectPic , Hamburger , countTo},
|
||||||
dicts: ['show_plateform'],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//光标位置--简介
|
//光标位置--简介
|
||||||
@ -281,7 +269,6 @@ export default {
|
|||||||
prodTitle: null,
|
prodTitle: null,
|
||||||
prodKeyword: null,
|
prodKeyword: null,
|
||||||
prodDescription: null,
|
prodDescription: null,
|
||||||
showPlat: '网站,App',
|
|
||||||
newsFrom: null,
|
newsFrom: null,
|
||||||
publicDate: null,
|
publicDate: null,
|
||||||
mainPic: null,
|
mainPic: null,
|
||||||
@ -300,8 +287,6 @@ export default {
|
|||||||
//当前上传的所有图片
|
//当前上传的所有图片
|
||||||
fileList: []
|
fileList: []
|
||||||
},
|
},
|
||||||
//选中的展示平台
|
|
||||||
showPlatList:['网站','App'],
|
|
||||||
formSeo: {
|
formSeo: {
|
||||||
title: '',
|
title: '',
|
||||||
needUrl: true,
|
needUrl: true,
|
||||||
@ -342,9 +327,6 @@ export default {
|
|||||||
],
|
],
|
||||||
description: [
|
description: [
|
||||||
{ required: true, message: '请输入新闻简介', trigger: 'blur' }
|
{ required: true, message: '请输入新闻简介', trigger: 'blur' }
|
||||||
],
|
|
||||||
showPlat: [
|
|
||||||
{ required: true, message: '请选择展示平台', trigger: 'blur' }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
rulesSeo:{
|
rulesSeo:{
|
||||||
@ -376,12 +358,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
|
||||||
* 选中展示平台
|
|
||||||
*/
|
|
||||||
changeCheckBox(value){
|
|
||||||
this.form.showPlat = value.join(",")
|
|
||||||
},
|
|
||||||
useProdName(){
|
useProdName(){
|
||||||
this.formSeo.title = this.form.title
|
this.formSeo.title = this.form.title
|
||||||
},
|
},
|
||||||
@ -495,7 +471,6 @@ export default {
|
|||||||
getProdInfo(id, type) {
|
getProdInfo(id, type) {
|
||||||
getProdNew(id).then(response => {
|
getProdNew(id).then(response => {
|
||||||
this.form = response.data
|
this.form = response.data
|
||||||
this.showPlatList = this.form.showPlat.split(',')
|
|
||||||
if (this.form.pics && this.form.pics.length > 0) {
|
if (this.form.pics && this.form.pics.length > 0) {
|
||||||
this.canPicsNum = this.picsNum - this.form.pics.split(',').length
|
this.canPicsNum = this.picsNum - this.form.pics.split(',').length
|
||||||
}
|
}
|
||||||
|
@ -4,16 +4,6 @@
|
|||||||
<el-form-item label="分类" prop="catgId">
|
<el-form-item label="分类" prop="catgId">
|
||||||
<treeselect style="width: 200px" v-model="queryParams.catgId" :options="catgOptions" :normalizer="normalizer" :noResultsText="'暂无数据'" placeholder="选择分类" />
|
<treeselect style="width: 200px" v-model="queryParams.catgId" :options="catgOptions" :normalizer="normalizer" :noResultsText="'暂无数据'" placeholder="选择分类" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="展示平台" prop="showPlat">
|
|
||||||
<el-select v-model="queryParams.showPlat" placeholder="请选择展示平台" clearable>
|
|
||||||
<el-option
|
|
||||||
v-for="dict in dict.type.show_plateform"
|
|
||||||
:key="dict.value"
|
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="产品名称" prop="title">
|
<el-form-item label="产品名称" prop="title">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.title"
|
v-model="queryParams.title"
|
||||||
@ -84,8 +74,7 @@
|
|||||||
<image-preview :src="scope.row.mainPic" :width="50" :height="50"/>
|
<image-preview :src="scope.row.mainPic" :width="50" :height="50"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="产品负责人" align="center" prop="leaderName" :min-width="100" />
|
<el-table-column label="产品负责人" align="center" prop="leaderName" :min-width="200" />
|
||||||
<el-table-column label="展示平台" align="center" prop="showPlat" />
|
|
||||||
<!-- <el-table-column label="产品简介" align="center" prop="description" />-->
|
<!-- <el-table-column label="产品简介" align="center" prop="description" />-->
|
||||||
<el-table-column width="100" label="排序" align="center" prop="sort">
|
<el-table-column width="100" label="排序" align="center" prop="sort">
|
||||||
<template slot="header" slot-scope="scope">
|
<template slot="header" slot-scope="scope">
|
||||||
@ -201,7 +190,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Prod",
|
name: "Prod",
|
||||||
dicts: ['sys_yes_no','show_plateform'],
|
dicts: ['sys_yes_no'],
|
||||||
components: { selectAllUser ,selectProduct,randomProduct,Treeselect},
|
components: { selectAllUser ,selectProduct,randomProduct,Treeselect},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -172,20 +172,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="展示平台" prop="showPlat">
|
<el-form-item label="首页显示" prop="ifReco">
|
||||||
<el-checkbox-group v-model="showPlatList" @change="changeCheckBox">
|
|
||||||
<el-checkbox v-for="dict in dict.type.show_plateform" :label="dict.label" :value="dict.value"></el-checkbox>
|
|
||||||
</el-checkbox-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="网站首页显示" prop="ifReco">
|
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<span>网站首页显示</span>
|
<span>首页显示</span>
|
||||||
<el-tooltip class="item" effect="dark" content="开启后将在网站首页优先显示"
|
<el-tooltip class="item" effect="dark" content="开启后将在首页优先显示"
|
||||||
placement="bottom"
|
placement="bottom"
|
||||||
>
|
>
|
||||||
<i class="el-icon-question"></i>
|
<i class="el-icon-question"></i>
|
||||||
@ -198,13 +189,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-form-item label="产品内容">
|
||||||
<el-col :span="24">
|
<editor :key="showKeywords" v-model="form.content" :min-height="192"/>
|
||||||
<el-form-item label="产品内容">
|
</el-form-item>
|
||||||
<editor :key="showKeywords" v-model="form.content" :min-height="192"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -247,7 +234,6 @@ import SimilarityProduct from './similarityProduct'
|
|||||||
export default {
|
export default {
|
||||||
name: 'prodForm',
|
name: 'prodForm',
|
||||||
components: { SimilarityProduct, Treeselect, selectPic, Hamburger , countTo},
|
components: { SimilarityProduct, Treeselect, selectPic, Hamburger , countTo},
|
||||||
dicts: ['show_plateform'],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//光标位置--简介
|
//光标位置--简介
|
||||||
@ -269,7 +255,6 @@ export default {
|
|||||||
prodTitle: null,
|
prodTitle: null,
|
||||||
prodKeyword: null,
|
prodKeyword: null,
|
||||||
prodDescription: null,
|
prodDescription: null,
|
||||||
showPlat: '网站,App',
|
|
||||||
newsFrom: null,
|
newsFrom: null,
|
||||||
mainPic: null,
|
mainPic: null,
|
||||||
pics: null,
|
pics: null,
|
||||||
@ -287,8 +272,6 @@ export default {
|
|||||||
//当前上传的所有图片
|
//当前上传的所有图片
|
||||||
fileList: []
|
fileList: []
|
||||||
},
|
},
|
||||||
//选中的展示平台
|
|
||||||
showPlatList:['网站','App'],
|
|
||||||
formSeo: {
|
formSeo: {
|
||||||
title: '',
|
title: '',
|
||||||
needUrl: true,
|
needUrl: true,
|
||||||
@ -323,9 +306,6 @@ export default {
|
|||||||
],
|
],
|
||||||
description: [
|
description: [
|
||||||
{ required: true, message: '请输入产品简介', trigger: 'blur' }
|
{ required: true, message: '请输入产品简介', trigger: 'blur' }
|
||||||
],
|
|
||||||
showPlat: [
|
|
||||||
{ required: true, message: '请选择展示平台', trigger: 'blur' }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
rulesSeo:{
|
rulesSeo:{
|
||||||
@ -357,12 +337,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
|
||||||
* 选中展示平台
|
|
||||||
*/
|
|
||||||
changeCheckBox(value){
|
|
||||||
this.form.showPlat = value.join(",")
|
|
||||||
},
|
|
||||||
useProdName(){
|
useProdName(){
|
||||||
this.formSeo.title = this.form.title
|
this.formSeo.title = this.form.title
|
||||||
},
|
},
|
||||||
@ -476,7 +450,6 @@ export default {
|
|||||||
getProdInfo(id, type) {
|
getProdInfo(id, type) {
|
||||||
getProdNew(id).then(response => {
|
getProdNew(id).then(response => {
|
||||||
this.form = response.data
|
this.form = response.data
|
||||||
this.showPlatList = this.form.showPlat.split(',')
|
|
||||||
if (this.form.pics && this.form.pics.length > 0) {
|
if (this.form.pics && this.form.pics.length > 0) {
|
||||||
this.canPicsNum = this.picsNum - this.form.pics.split(',').length
|
this.canPicsNum = this.picsNum - this.form.pics.split(',').length
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user