RelCatalogProductEntity。更新。

master
Tom Li 2 weeks ago
parent 1c0767d144
commit d6544a787f
  1. 161
      src/main/java/org/springblade/modules/jinchao/controller/RelCatalogProductController.java
  2. 85
      src/main/java/org/springblade/modules/jinchao/excel/RelCatalogProductExcel.java
  3. 62
      src/main/java/org/springblade/modules/jinchao/mapper/RelCatalogProductMapper.java
  4. 30
      src/main/java/org/springblade/modules/jinchao/mapper/RelCatalogProductMapper.xml
  5. 45
      src/main/java/org/springblade/modules/jinchao/pojo/dto/RelCatalogProductDTO.java
  6. 60
      src/main/java/org/springblade/modules/jinchao/pojo/entity/RelCatalogProductEntity.java
  7. 45
      src/main/java/org/springblade/modules/jinchao/pojo/vo/RelCatalogProductVO.java
  8. 61
      src/main/java/org/springblade/modules/jinchao/service/IRelCatalogProductService.java
  9. 63
      src/main/java/org/springblade/modules/jinchao/service/impl/RelCatalogProductServiceImpl.java
  10. 59
      src/main/java/org/springblade/modules/jinchao/wrapper/RelCatalogProductWrapper.java

@ -0,0 +1,161 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.jinchao.controller;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import jakarta.validation.Valid;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.secure.annotation.IsAdmin;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.jinchao.pojo.entity.RelCatalogProductEntity;
import org.springblade.modules.jinchao.pojo.vo.RelCatalogProductVO;
import org.springblade.modules.jinchao.excel.RelCatalogProductExcel;
import org.springblade.modules.jinchao.wrapper.RelCatalogProductWrapper;
import org.springblade.modules.jinchao.service.IRelCatalogProductService;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import java.util.Map;
import java.util.List;
import jakarta.servlet.http.HttpServletResponse;
/**
* [产品目录][产品]关联表 控制器
*
* @author BladeX
* @since 2025-12-03
*/
@RestController
@AllArgsConstructor
@RequestMapping("jinchao/relCatalogProduct")
@Tag(name = "[产品目录][产品]关联表", description = "[产品目录][产品]关联表接口")
public class RelCatalogProductController extends BladeController {
private final IRelCatalogProductService relCatalogProductService;
/**
* [产品目录][产品]关联表 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@Operation(summary = "详情", description = "传入relCatalogProduct")
public R<RelCatalogProductVO> detail(RelCatalogProductEntity relCatalogProduct) {
RelCatalogProductEntity detail = relCatalogProductService.getOne(Condition.getQueryWrapper(relCatalogProduct));
return R.data(RelCatalogProductWrapper.build().entityVO(detail));
}
/**
* [产品目录][产品]关联表 分页
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@Operation(summary = "分页", description = "传入relCatalogProduct")
public R<IPage<RelCatalogProductVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> relCatalogProduct, Query query) {
IPage<RelCatalogProductEntity> pages = relCatalogProductService.page(Condition.getPage(query), Condition.getQueryWrapper(relCatalogProduct, RelCatalogProductEntity.class));
return R.data(RelCatalogProductWrapper.build().pageVO(pages));
}
/**
* [产品目录][产品]关联表 自定义分页
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@Operation(summary = "分页", description = "传入relCatalogProduct")
public R<IPage<RelCatalogProductVO>> page(RelCatalogProductVO relCatalogProduct, Query query) {
IPage<RelCatalogProductVO> pages = relCatalogProductService.selectRelCatalogProductPage(Condition.getPage(query), relCatalogProduct);
return R.data(pages);
}
/**
* [产品目录][产品]关联表 新增
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入relCatalogProduct")
public R save(@Valid @RequestBody RelCatalogProductEntity relCatalogProduct) {
return R.status(relCatalogProductService.save(relCatalogProduct));
}
/**
* [产品目录][产品]关联表 修改
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@Operation(summary = "修改", description = "传入relCatalogProduct")
public R update(@Valid @RequestBody RelCatalogProductEntity relCatalogProduct) {
return R.status(relCatalogProductService.updateById(relCatalogProduct));
}
/**
* [产品目录][产品]关联表 新增或修改
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@Operation(summary = "新增或修改", description = "传入relCatalogProduct")
public R submit(@Valid @RequestBody RelCatalogProductEntity relCatalogProduct) {
return R.status(relCatalogProductService.saveOrUpdate(relCatalogProduct));
}
/**
* [产品目录][产品]关联表 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@Operation(summary = "逻辑删除", description = "传入ids")
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(relCatalogProductService.deleteLogic(Func.toLongList(ids)));
}
/**
* 导出数据
*/
@IsAdmin
@GetMapping("/export-relCatalogProduct")
@ApiOperationSupport(order = 9)
@Operation(summary = "导出数据", description = "传入relCatalogProduct")
public void exportRelCatalogProduct(@Parameter(hidden = true) @RequestParam Map<String, Object> relCatalogProduct, BladeUser bladeUser, HttpServletResponse response) {
QueryWrapper<RelCatalogProductEntity> queryWrapper = Condition.getQueryWrapper(relCatalogProduct, RelCatalogProductEntity.class);
//if (!AuthUtil.isAdministrator()) {
// queryWrapper.lambda().eq(RelCatalogProduct::getTenantId, bladeUser.getTenantId());
//}
//queryWrapper.lambda().eq(RelCatalogProductEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
List<RelCatalogProductExcel> list = relCatalogProductService.exportRelCatalogProduct(queryWrapper);
ExcelUtil.export(response, "[产品目录][产品]关联表数据" + DateUtil.time(), "[产品目录][产品]关联表数据表", list, RelCatalogProductExcel.class);
}
}

@ -0,0 +1,85 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.jinchao.excel;
import lombok.Data;
import cn.idev.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.write.style.ColumnWidth;
import cn.idev.excel.annotation.write.style.ContentRowHeight;
import cn.idev.excel.annotation.write.style.HeadRowHeight;
import java.io.Serializable;
import java.io.Serial;
/**
* [产品目录][产品]关联表 Excel实体类
*
* @author BladeX
* @since 2025-12-03
*/
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class RelCatalogProductExcel implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ColumnWidth(20)
@ExcelProperty("主键")
private Long id;
/**
* 租户ID
*/
@ColumnWidth(20)
@ExcelProperty("租户ID")
private String tenantId;
/**
* 小类[产品目录]id
*/
@ColumnWidth(20)
@ExcelProperty("小类[产品目录]id")
private Long catalogId;
/**
* [产品]id
*/
@ColumnWidth(20)
@ExcelProperty("[产品]id")
private Long productId;
/**
* 是否已删除
*/
@ColumnWidth(20)
@ExcelProperty("是否已删除")
private Integer isDeleted;
}

@ -0,0 +1,62 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.jinchao.mapper;
import org.springblade.modules.jinchao.pojo.entity.RelCatalogProductEntity;
import org.springblade.modules.jinchao.pojo.vo.RelCatalogProductVO;
import org.springblade.modules.jinchao.excel.RelCatalogProductExcel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* [产品目录][产品]关联表 Mapper 接口
*
* @author BladeX
* @since 2025-12-03
*/
public interface RelCatalogProductMapper extends BaseMapper<RelCatalogProductEntity> {
/**
* 自定义分页
*
* @param page 分页参数
* @param relCatalogProduct 查询参数
* @return List<RelCatalogProductVO>
*/
List<RelCatalogProductVO> selectRelCatalogProductPage(IPage page, RelCatalogProductVO relCatalogProduct);
/**
* 获取导出数据
*
* @param queryWrapper 查询条件
* @return List<RelCatalogProductExcel>
*/
List<RelCatalogProductExcel> exportRelCatalogProduct(@Param("ew") Wrapper<RelCatalogProductEntity> queryWrapper);
}

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.jinchao.mapper.RelCatalogProductMapper">
<!-- 通用查询映射结果 -->
<resultMap id="relCatalogProductResultMap" type="org.springblade.modules.jinchao.pojo.entity.RelCatalogProductEntity">
<result column="id" property="id"/>
<result column="tenant_id" property="tenantId"/>
<result column="catalog_id" property="catalogId"/>
<result column="product_id" property="productId"/>
<result column="create_user" property="createUser"/>
<result column="create_dept" property="createDept"/>
<result column="create_time" property="createTime"/>
<result column="update_user" property="updateUser"/>
<result column="update_time" property="updateTime"/>
<result column="status" property="status"/>
<result column="is_deleted" property="isDeleted"/>
</resultMap>
<select id="selectRelCatalogProductPage" resultMap="relCatalogProductResultMap">
select * from jc_rel_catalog_product where is_deleted = 0
</select>
<select id="exportRelCatalogProduct" resultType="org.springblade.modules.jinchao.excel.RelCatalogProductExcel">
SELECT * FROM jc_rel_catalog_product ${ew.customSqlSegment}
</select>
</mapper>

@ -0,0 +1,45 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.jinchao.pojo.dto;
import org.springblade.modules.jinchao.pojo.entity.RelCatalogProductEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
/**
* [产品目录][产品]关联表 数据传输对象实体类
*
* @author BladeX
* @since 2025-12-03
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class RelCatalogProductDTO extends RelCatalogProductEntity {
@Serial
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,60 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.jinchao.pojo.entity;
import lombok.Data;
import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import java.io.Serial;
/**
* [产品目录][产品]关联表 实体类
*
* @author BladeX
* @since 2025-12-03
*/
@Data
@TableName("jc_rel_catalog_product")
@Schema(description = "RelCatalogProduct对象")
@EqualsAndHashCode(callSuper = true)
public class RelCatalogProductEntity extends TenantEntity {
@Serial
private static final long serialVersionUID = 1L;
/**
* 小类[产品目录]id
*/
@Schema(description = "小类[产品目录]id")
private Long catalogId;
/**
* [产品]id
*/
@Schema(description = "[产品]id")
private Long productId;
}

@ -0,0 +1,45 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.jinchao.pojo.vo;
import org.springblade.modules.jinchao.pojo.entity.RelCatalogProductEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serial;
/**
* [产品目录][产品]关联表 视图实体类
*
* @author BladeX
* @since 2025-12-03
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class RelCatalogProductVO extends RelCatalogProductEntity {
@Serial
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,61 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.jinchao.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.springblade.modules.jinchao.pojo.entity.RelCatalogProductEntity;
import org.springblade.modules.jinchao.pojo.vo.RelCatalogProductVO;
import org.springblade.modules.jinchao.excel.RelCatalogProductExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
* [产品目录][产品]关联表 服务类
*
* @author BladeX
* @since 2025-12-03
*/
public interface IRelCatalogProductService extends BaseService<RelCatalogProductEntity> {
/**
* 自定义分页
*
* @param page 分页参数
* @param relCatalogProduct 查询参数
* @return IPage<RelCatalogProductVO>
*/
IPage<RelCatalogProductVO> selectRelCatalogProductPage(IPage<RelCatalogProductVO> page, RelCatalogProductVO relCatalogProduct);
/**
* 导出数据
*
* @param queryWrapper 查询条件
* @return List<RelCatalogProductExcel>
*/
List<RelCatalogProductExcel> exportRelCatalogProduct(Wrapper<RelCatalogProductEntity> queryWrapper);
}

@ -0,0 +1,63 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.jinchao.service.impl;
import org.springblade.modules.jinchao.pojo.entity.RelCatalogProductEntity;
import org.springblade.modules.jinchao.pojo.vo.RelCatalogProductVO;
import org.springblade.modules.jinchao.excel.RelCatalogProductExcel;
import org.springblade.modules.jinchao.mapper.RelCatalogProductMapper;
import org.springblade.modules.jinchao.service.IRelCatalogProductService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;
/**
* [产品目录][产品]关联表 服务实现类
*
* @author BladeX
* @since 2025-12-03
*/
@Service
public class RelCatalogProductServiceImpl extends BaseServiceImpl<RelCatalogProductMapper, RelCatalogProductEntity> implements IRelCatalogProductService {
@Override
public IPage<RelCatalogProductVO> selectRelCatalogProductPage(IPage<RelCatalogProductVO> page, RelCatalogProductVO relCatalogProduct) {
return page.setRecords(baseMapper.selectRelCatalogProductPage(page, relCatalogProduct));
}
@Override
public List<RelCatalogProductExcel> exportRelCatalogProduct(Wrapper<RelCatalogProductEntity> queryWrapper) {
List<RelCatalogProductExcel> relCatalogProductList = baseMapper.exportRelCatalogProduct(queryWrapper);
//relCatalogProductList.forEach(relCatalogProduct -> {
// relCatalogProduct.setTypeName(DictCache.getValue(DictEnum.YES_NO, RelCatalogProduct.getType()));
//});
return relCatalogProductList;
}
}

@ -0,0 +1,59 @@
/**
* BladeX Commercial License Agreement
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
* <p>
* Use of this software is governed by the Commercial License Agreement
* obtained after purchasing a license from BladeX.
* <p>
* 1. This software is for development use only under a valid license
* from BladeX.
* <p>
* 2. Redistribution of this software's source code to any third party
* without a commercial license is strictly prohibited.
* <p>
* 3. Licensees may copyright their own code but cannot use segments
* from this software for such purposes. Copyright of this software
* remains with BladeX.
* <p>
* Using this software signifies agreement to this License, and the software
* must not be used for illegal purposes.
* <p>
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
* not liable for any claims arising from secondary or illegal development.
* <p>
* Author: Chill Zhuang (bladejava@qq.com)
*/
package org.springblade.modules.jinchao.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.modules.jinchao.pojo.entity.RelCatalogProductEntity;
import org.springblade.modules.jinchao.pojo.vo.RelCatalogProductVO;
import java.util.Objects;
/**
* [产品目录][产品]关联表 包装类,返回视图层所需的字段
*
* @author BladeX
* @since 2025-12-03
*/
public class RelCatalogProductWrapper extends BaseEntityWrapper<RelCatalogProductEntity, RelCatalogProductVO> {
public static RelCatalogProductWrapper build() {
return new RelCatalogProductWrapper();
}
@Override
public RelCatalogProductVO entityVO(RelCatalogProductEntity relCatalogProduct) {
RelCatalogProductVO relCatalogProductVO = Objects.requireNonNull(BeanUtil.copyProperties(relCatalogProduct, RelCatalogProductVO.class));
//User createUser = UserCache.getUser(relCatalogProduct.getCreateUser());
//User updateUser = UserCache.getUser(relCatalogProduct.getUpdateUser());
//relCatalogProductVO.setCreateUserName(createUser.getName());
//relCatalogProductVO.setUpdateUserName(updateUser.getName());
return relCatalogProductVO;
}
}
Loading…
Cancel
Save