店铺管理初版

This commit is contained in:
xiaowang
2026-02-26 14:20:35 +08:00
parent 98c9463efa
commit 4275f1840c
9 changed files with 230 additions and 37 deletions
@@ -33,7 +33,7 @@ public class ShopDTO {
private String businessHours;
/**
* 店铺封面图文件ID
* 店铺图片文件ID集合,多个ID以逗号分隔
*/
private String coverImageFileId;
private String imageFileIds;
}
@@ -43,10 +43,10 @@ public class ShopDO extends BaseEntity {
private String businessHours;
/**
* 店铺封面图文件ID
* 店铺图片文件ID集合,多个ID以逗号分隔
*/
@TableField("cover_image_file_id")
private String coverImageFileId;
@TableField("image_file_ids")
private String imageFileIds;
/**
* 逻辑删除:0-未删,1-已删
@@ -37,7 +37,7 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopDO> implements
shopDO.setDescription(shopDTO.getDescription());
shopDO.setAddress(shopDTO.getAddress());
shopDO.setBusinessHours(shopDTO.getBusinessHours());
shopDO.setCoverImageFileId(shopDTO.getCoverImageFileId());
shopDO.setImageFileIds(shopDTO.getImageFileIds());
shopDO.setIsDelete(0);
shopMapper.insert(shopDO);
return shopDO.getId();
@@ -53,7 +53,7 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopDO> implements
shopDO.setDescription(shopDTO.getDescription());
shopDO.setAddress(shopDTO.getAddress());
shopDO.setBusinessHours(shopDTO.getBusinessHours());
shopDO.setCoverImageFileId(shopDTO.getCoverImageFileId());
shopDO.setImageFileIds(shopDTO.getImageFileIds());
return shopMapper.updateById(shopDO) > 0;
}
@@ -63,8 +63,7 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopDO> implements
if (shopDO == null) {
return false;
}
shopDO.setIsDelete(1);
return shopMapper.updateById(shopDO) > 0;
return this.removeById(id);
}
@Override
@@ -138,7 +137,8 @@ public class ShopServiceImpl extends ServiceImpl<ShopMapper, ShopDO> implements
shopVO.setDescription(shopDO.getDescription());
shopVO.setAddress(shopDO.getAddress());
shopVO.setBusinessHours(shopDO.getBusinessHours());
shopVO.setCoverImageFileId(shopDO.getCoverImageFileId());
shopVO.setImageFileIds(shopDO.getImageFileIds());
shopVO.setImageUrls(new java.util.ArrayList<>());
shopVO.setCreateTime(shopDO.getCreateTime());
shopVO.setUpdateTime(shopDO.getUpdateTime());
return shopVO;
@@ -40,14 +40,14 @@ public class ShopVO {
private String businessHours;
/**
* 店铺封面图文件ID
* 店铺图片文件ID集合,多个ID以逗号分隔
*/
private String coverImageFileId;
private String imageFileIds;
/**
* 店铺封面图URL
* 店铺图片URL列表
*/
private String coverImageUrl;
private java.util.List<String> imageUrls;
/**
* 创建时间