软件购买可购产品列表在生产端只能查看登录产品的数据

This commit is contained in:
gaoqr
2025-10-13 13:55:32 +08:00
parent 11b1cb13d4
commit 252cc678ad
@@ -4,6 +4,7 @@ import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.framework.security.core.util.SecurityFrameworkUtils;
import com.cf.imes.module.system.controller.admin.funds.products.vo.product.ProductPageReqVO;
import com.cf.imes.module.system.controller.admin.funds.products.vo.product.ProductRespVO;
import com.cf.imes.module.system.controller.admin.funds.products.vo.product.ProductSaveReqVO;
@@ -89,6 +90,10 @@ public class ProductsController {
public CommonResult<PageResult<ProductRespVO>> getAvailableProductsPage(@Valid ProductPageReqVO pageReqVO) {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
pageReqVO.setStatus(ProductStatusEnum.PRODUCT_UPDATES.getStatus());
// 生产端查询当前登录的产品
if (!SecurityFrameworkUtils.isManageEndPoint()) {
pageReqVO.setId(SecurityFrameworkUtils.getProductId());
}
PageResult<ProductsDO> pageResult = productsService.getPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ProductRespVO.class));
}