mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 02:39:19 +08:00
chore: 移除废弃的 logoImageId 字段及相关代码
- 删除 CompanyPO/CompanyDTO 中的 logoImageId 字段 - 删除 ShopPO/ShopDTO 中的 logoImageId 字段 - 删除 CompanyServiceImpl/ShopServiceImpl 中处理 logoImageId 的逻辑块
This commit is contained in:
-3
@@ -21,9 +21,6 @@ public class CreateShopDTO {
|
||||
/**
|
||||
* logo图片ID
|
||||
*/
|
||||
@Schema(description = "logo图片ID", example = "1")
|
||||
private Long logoImageId;
|
||||
|
||||
/**
|
||||
* 平台(如淘宝、京东、拼多多)
|
||||
*/
|
||||
|
||||
-3
@@ -21,9 +21,6 @@ public class UpdateShopDTO {
|
||||
/**
|
||||
* logo图片ID
|
||||
*/
|
||||
@Schema(description = "logo图片ID", example = "1")
|
||||
private Long logoImageId;
|
||||
|
||||
/**
|
||||
* 平台(如淘宝、京东、拼多多)
|
||||
*/
|
||||
|
||||
-3
@@ -35,9 +35,6 @@ public class ShopPO {
|
||||
/**
|
||||
* logo图片ID
|
||||
*/
|
||||
@TableField("logo_image_id")
|
||||
private Long logoImageId;
|
||||
|
||||
/**
|
||||
* 平台(如淘宝、京东、拼多多)
|
||||
*/
|
||||
|
||||
-19
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
-3
@@ -53,9 +53,6 @@ public class CreateCompanyDTO {
|
||||
/**
|
||||
* logo图片ID
|
||||
*/
|
||||
@Schema(description = "logo图片ID", example = "1")
|
||||
private Long logoImageId;
|
||||
|
||||
/**
|
||||
* 状态 (0-禁用 1-正常)
|
||||
*/
|
||||
|
||||
-3
@@ -39,9 +39,6 @@ public class UpdateCompanyDTO {
|
||||
/**
|
||||
* logo图片ID
|
||||
*/
|
||||
@Schema(description = "logo图片ID", example = "1")
|
||||
private Long logoImageId;
|
||||
|
||||
/**
|
||||
* 状态 (0-禁用 1-正常)
|
||||
*/
|
||||
|
||||
-6
@@ -62,12 +62,6 @@ public class CompanyPO {
|
||||
@TableField("logo")
|
||||
private String logo;
|
||||
|
||||
/**
|
||||
* logo图片ID
|
||||
*/
|
||||
@TableField("logo_image_id")
|
||||
private Long logoImageId;
|
||||
|
||||
/**
|
||||
* 状态 (0-禁用 1-正常)
|
||||
*/
|
||||
|
||||
-12
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user