chore: 移除废弃的 logoImageId 字段及相关代码

- 删除 CompanyPO/CompanyDTO 中的 logoImageId 字段
- 删除 ShopPO/ShopDTO 中的 logoImageId 字段
- 删除 CompanyServiceImpl/ShopServiceImpl 中处理 logoImageId 的逻辑块
This commit is contained in:
小蟑螂
2026-03-31 21:47:32 +08:00
parent 50db11b15a
commit 376f82eeaf
8 changed files with 0 additions and 52 deletions
@@ -21,9 +21,6 @@ public class CreateShopDTO {
/**
* logo图片ID
*/
@Schema(description = "logo图片ID", example = "1")
private Long logoImageId;
/**
* 平台(如淘宝、京东、拼多多)
*/
@@ -21,9 +21,6 @@ public class UpdateShopDTO {
/**
* logo图片ID
*/
@Schema(description = "logo图片ID", example = "1")
private Long logoImageId;
/**
* 平台(如淘宝、京东、拼多多)
*/
@@ -35,9 +35,6 @@ public class ShopPO {
/**
* logo图片ID
*/
@TableField("logo_image_id")
private Long logoImageId;
/**
* 平台(如淘宝、京东、拼多多)
*/
@@ -111,11 +111,6 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopPO> implements
// 设置公司ID
shop.setCompanyId(companyId);
// 处理logo图片关联
if (createShopDTO.getLogoImageId() != null) {
shop.setLogoImageId(createShopDTO.getLogoImageId());
}
// 设置创建人ID
shop.setCreateBy(currentUserContext.getCurrentUserId());
@@ -159,11 +154,6 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopPO> implements
shop.setId(id);
shop.setCompanyId(companyId);
// 处理logo图片关联
if (updateShopDTO.getLogoImageId() != null) {
shop.setLogoImageId(updateShopDTO.getLogoImageId());
}
// 设置更新人ID
shop.setUpdateBy(currentUserContext.getCurrentUserId());
@@ -272,15 +262,6 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopPO> implements
ShopVO shopVO = new ShopVO();
BeanUtils.copyProperties(shop, shopVO);
// 查询logo文件信息并生成访问URL
if (shop.getLogoImageId() != null) {
SysFilePO logoFile = sysFileMapper.selectById(shop.getLogoImageId());
if (logoFile != null && logoFile.getDeleteTime() == null) {
String logoUrl = SysFileUtils.getFileAccessUrl(logoFile.getStoragePath(), logoFile.getStorageType());
shopVO.setLogo(logoUrl);
}
}
return shopVO;
}
@@ -53,9 +53,6 @@ public class CreateCompanyDTO {
/**
* logo图片ID
*/
@Schema(description = "logo图片ID", example = "1")
private Long logoImageId;
/**
* 状态 (0-禁用 1-正常)
*/
@@ -39,9 +39,6 @@ public class UpdateCompanyDTO {
/**
* logo图片ID
*/
@Schema(description = "logo图片ID", example = "1")
private Long logoImageId;
/**
* 状态 (0-禁用 1-正常)
*/
@@ -62,12 +62,6 @@ public class CompanyPO {
@TableField("logo")
private String logo;
/**
* logo图片ID
*/
@TableField("logo_image_id")
private Long logoImageId;
/**
* 状态 (0-禁用 1-正常)
*/
@@ -101,12 +101,6 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, CompanyPO> im
CompanyPO company = new CompanyPO();
BeanUtils.copyProperties(createCompanyDTO, company);
// 处理logo图片ID
if (createCompanyDTO.getLogoImageId() != null) {
company.setLogoImageId(createCompanyDTO.getLogoImageId());
company.setLogo(sysFileService.getFileAccessUrl(createCompanyDTO.getLogoImageId()));
}
// 设置默认值
if (company.getStatus() == null) {
company.setStatus(1);
@@ -187,12 +181,6 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, CompanyPO> im
// 设置公司ID(必须在updateById之前设置)
company.setId(id);
// 处理logo图片ID
if (updateCompanyDTO.getLogoImageId() != null) {
company.setLogoImageId(updateCompanyDTO.getLogoImageId());
company.setLogo(sysFileService.getFileAccessUrl(updateCompanyDTO.getLogoImageId()));
}
// 设置更新人ID
company.setUpdateBy(currentUserContext.getCurrentUserId());