Sfoglia il codice sorgente

酒水菜单导入

qrs 2 settimane fa
parent
commit
4154f849bc
18 ha cambiato i file con 1015 aggiunte e 23 eliminazioni
  1. 2 2
      alien-entity/src/main/java/shop/alien/entity/store/vo/StoreMenuImportVo.java
  2. 1 1
      alien-store-platform/src/main/java/shop/alien/storeplatform/AlienStorePlatformApplication.java
  3. 5 5
      alien-store-platform/src/main/java/shop/alien/storeplatform/controller/StoreMenuPlatformController.java
  4. 186 0
      alien-store-platform/src/main/java/shop/alien/storeplatform/controller/StorePlatformBarMenuController.java
  5. 1 1
      alien-store-platform/src/main/java/shop/alien/storeplatform/entity/StorePlatformBathFacilityService.java
  6. 1 1
      alien-store-platform/src/main/java/shop/alien/storeplatform/entity/StorePlatformSportsEquipmentFacility.java
  7. 5 5
      alien-store-platform/src/main/java/shop/alien/storeplatform/entity/StorePlatformStoreMenu.java
  8. 1 1
      alien-store-platform/src/main/java/shop/alien/storeplatform/entity/StorePlatformStoreStaffConfig.java
  9. 9 0
      alien-store-platform/src/main/java/shop/alien/storeplatform/mapper/StorePlatformSportsEquipmentFacilityMapper.java
  10. 9 0
      alien-store-platform/src/main/java/shop/alien/storeplatform/mapper/StorePlatformStoreMenuMapper.java
  11. 91 0
      alien-store-platform/src/main/java/shop/alien/storeplatform/service/StorePlatformBarMenuService.java
  12. 7 7
      alien-store-platform/src/main/java/shop/alien/storeplatform/service/impl/StoreMenuPlatformServiceImpl.java
  13. 619 0
      alien-store-platform/src/main/java/shop/alien/storeplatform/service/impl/StorePlatformBarMenuServiceImpl.java
  14. 31 0
      alien-store-platform/src/main/java/shop/alien/storeplatform/vo/StorePlatformSportsEquipmentFacilityImportVo.java
  15. 47 0
      alien-store-platform/src/main/java/shop/alien/storeplatform/vo/StorePlatformStoreMenuImportVo.java
  16. BIN
      alien-store-platform/src/main/resources/templates/美食导入模板.xlsx
  17. BIN
      alien-store-platform/src/main/resources/templates/酒水餐食导入模板.xlsx
  18. BIN
      alien-store-platform/src/main/resources/templates/门店菜单导入模板.xlsx

+ 2 - 2
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreMenuImportVo.java

@@ -31,8 +31,8 @@ public class StoreMenuImportVo {
     @ApiModelProperty(value = "成本价")
     private BigDecimal costPrice;
 
-    @ApiModelProperty(value = "单位")
-    private String dishesUnit;
+//    @ApiModelProperty(value = "单位")
+//    private String dishesUnit;
 
     @ApiModelProperty(value = "图片")
     @ExcelImage

+ 1 - 1
alien-store-platform/src/main/java/shop/alien/storeplatform/AlienStorePlatformApplication.java

@@ -16,7 +16,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
         "shop.alien.config.properties",
         "shop.alien.config.redis"})
 @EnableSwaggerBootstrapUI
-@MapperScan({"shop.alien.mapper"})
+@MapperScan({"shop.alien.mapper", "shop.alien.storeplatform.mapper"})
 @SpringBootApplication
 @EnableFeignClients(basePackages = "shop.alien.storeplatform.feign")
 @EnableScheduling

+ 5 - 5
alien-store-platform/src/main/java/shop/alien/storeplatform/controller/StoreMenuPlatformController.java

@@ -136,7 +136,7 @@ public class StoreMenuPlatformController {
         return storeMenuService.importMenuFromExcel(file, storeId);
     }
 
-    @ApiOperation("下载门店菜单导入模板")
+    @ApiOperation("下载美食导入模板")
     @ApiOperationSupport(order = 10)
     @GetMapping("/downloadTemplate")
     public void downloadTemplate(HttpServletResponse response) {
@@ -146,7 +146,7 @@ public class StoreMenuPlatformController {
         
         try {
             // 从resources/templates目录读取模板文件
-            Resource resource = new ClassPathResource("templates/门店菜单导入模板.xlsx");
+            Resource resource = new ClassPathResource("templates/美食导入模板.xlsx");
             inputStream = resource.getInputStream();
             
             // 设置响应头
@@ -154,7 +154,7 @@ public class StoreMenuPlatformController {
             response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
             response.setCharacterEncoding("utf-8");
             
-            String fileName = "门店菜单导入模板.xlsx";
+            String fileName = "美食导入模板.xlsx";
             String encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8.toString()).replaceAll("\\+", "%20");
             response.setHeader("Content-Disposition", "attachment;filename=\"" + encodedFileName + "\";filename*=utf-8''" + encodedFileName);
             
@@ -167,9 +167,9 @@ public class StoreMenuPlatformController {
             }
             outputStream.flush();
             
-            log.info("门店菜单导入模板下载成功");
+            log.info("美食导入模板下载成功");
         } catch (Exception e) {
-            log.error("下载门店菜单导入模板失败", e);
+            log.error("下载美食导入模板失败", e);
             throw new RuntimeException("下载模板失败:" + e.getMessage());
         } finally {
             try {

+ 186 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/controller/StorePlatformBarMenuController.java

@@ -0,0 +1,186 @@
+package shop.alien.storeplatform.controller;
+
+import io.swagger.annotations.*;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+import shop.alien.entity.result.R;
+import shop.alien.storeplatform.entity.StorePlatformStoreMenu;
+import shop.alien.storeplatform.service.StorePlatformBarMenuService;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
+
+/**
+ * 商户平台-酒吧菜单Controller
+ *
+ * @author system
+ * @since 2025-01-XX
+ */
+@Slf4j
+@Api(tags = {"商户平台-酒吧菜单"})
+@ApiSort(4)
+@CrossOrigin
+@RestController
+@RequestMapping("/barMenu")
+@RequiredArgsConstructor
+public class StorePlatformBarMenuController {
+
+    private final StorePlatformBarMenuService barMenuService;
+
+    @ApiOperation("根据ID查询菜单")
+    @ApiOperationSupport(order = 1)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "菜单ID", dataType = "Integer", paramType = "query", required = true)
+    })
+    @GetMapping("/getById")
+    public R<StorePlatformStoreMenu> getById(@RequestParam("id") Integer id) {
+        log.info("StorePlatformBarMenuController.getById id={}", id);
+        StorePlatformStoreMenu menu = barMenuService.getById(id);
+        if (menu == null) {
+            return R.fail("菜单不存在");
+        }
+        return R.data(menu);
+    }
+
+    @ApiOperation("根据门店ID查询菜单列表")
+    @ApiOperationSupport(order = 2)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "storeId", value = "门店ID", dataType = "Integer", paramType = "query", required = true)
+    })
+    @GetMapping("/getListByStoreId")
+    public R<List<StorePlatformStoreMenu>> getListByStoreId(@RequestParam("storeId") Integer storeId) {
+        log.info("StorePlatformBarMenuController.getListByStoreId storeId={}", storeId);
+        List<StorePlatformStoreMenu> list = barMenuService.getListByStoreId(storeId);
+        return R.data(list);
+    }
+
+    @ApiOperation("根据门店ID和菜单类型查询菜单列表")
+    @ApiOperationSupport(order = 3)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "storeId", value = "门店ID", dataType = "Integer", paramType = "query", required = true),
+            @ApiImplicitParam(name = "dishMenuType", value = "菜单类型:1-菜单,2-酒水", dataType = "String", paramType = "query")
+    })
+    @GetMapping("/getListByStoreIdAndType")
+    public R<List<StorePlatformStoreMenu>> getListByStoreIdAndType(@RequestParam("storeId") Integer storeId,
+                                                                   @RequestParam(value = "dishMenuType", required = false) String dishMenuType) {
+        log.info("StorePlatformBarMenuController.getListByStoreIdAndType storeId={}, dishMenuType={}", storeId, dishMenuType);
+        List<StorePlatformStoreMenu> list = barMenuService.getListByStoreIdAndType(storeId, dishMenuType);
+        return R.data(list);
+    }
+
+    @ApiOperation("新增菜单")
+    @ApiOperationSupport(order = 4)
+    @PostMapping("/save")
+    public R<String> save(@RequestBody StorePlatformStoreMenu storeMenu) {
+        log.info("StorePlatformBarMenuController.save storeMenu={}", storeMenu);
+        return barMenuService.saveMenu(storeMenu);
+    }
+
+    @ApiOperation("修改菜单")
+    @ApiOperationSupport(order = 5)
+    @PostMapping("/update")
+    public R<String> update(@RequestBody StorePlatformStoreMenu storeMenu) {
+        log.info("StorePlatformBarMenuController.update storeMenu={}", storeMenu);
+        return barMenuService.updateMenu(storeMenu);
+    }
+
+    @ApiOperation("新增或修改菜单")
+    @ApiOperationSupport(order = 6)
+    @PostMapping("/saveOrUpdate")
+    public R<String> saveOrUpdate(@RequestBody StorePlatformStoreMenu storeMenu) {
+        log.info("StorePlatformBarMenuController.saveOrUpdate storeMenu={}", storeMenu);
+        return barMenuService.saveOrUpdateMenu(storeMenu);
+    }
+
+    @ApiOperation("删除菜单")
+    @ApiOperationSupport(order = 7)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "菜单ID", dataType = "Integer", paramType = "query", required = true)
+    })
+    @GetMapping("/delete")
+    public R<String> delete(@RequestParam("id") Integer id) {
+        log.info("StorePlatformBarMenuController.delete id={}", id);
+        return barMenuService.deleteMenu(id);
+    }
+
+    @ApiOperation("批量删除菜单")
+    @ApiOperationSupport(order = 8)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "ids", value = "菜单ID列表", dataType = "List", paramType = "query", required = true)
+    })
+    @GetMapping("/deleteBatch")
+    public R<String> deleteBatch(@RequestParam("ids") List<Integer> ids) {
+        log.info("StorePlatformBarMenuController.deleteBatch ids={}", ids);
+        return barMenuService.deleteMenuBatch(ids);
+    }
+
+    @ApiOperation("Excel导入酒吧菜单")
+    @ApiOperationSupport(order = 9)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "file", value = "Excel文件", dataType = "file", paramType = "form", required = true),
+            @ApiImplicitParam(name = "storeId", value = "门店id", dataType = "Integer", paramType = "query", required = true)
+    })
+    @GetMapping("/importMenu")
+    public R<String> importMenu(@RequestParam("file") MultipartFile file,
+                                @RequestParam("storeId") Integer storeId) {
+        log.info("StorePlatformBarMenuController.importMenu storeId={}", storeId);
+        return barMenuService.importMenuFromExcel(file, storeId);
+    }
+
+    @ApiOperation("下载酒水餐食导入模板")
+    @ApiOperationSupport(order = 10)
+    @GetMapping("/downloadTemplate")
+    public void downloadTemplate(HttpServletResponse response) {
+        log.info("StoreMenuPlatformController.downloadTemplate");
+        InputStream inputStream = null;
+        OutputStream outputStream = null;
+
+        try {
+            // 从resources/templates目录读取模板文件
+            Resource resource = new ClassPathResource("templates/酒水餐食导入模板.xlsx");
+            inputStream = resource.getInputStream();
+
+            // 设置响应头
+            response.reset();
+            response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
+            response.setCharacterEncoding("utf-8");
+
+            String fileName = "酒水餐食导入模板.xlsx";
+            String encodedFileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8.toString()).replaceAll("\\+", "%20");
+            response.setHeader("Content-Disposition", "attachment;filename=\"" + encodedFileName + "\";filename*=utf-8''" + encodedFileName);
+
+            // 输出文件流
+            outputStream = response.getOutputStream();
+            byte[] buffer = new byte[1024];
+            int length;
+            while ((length = inputStream.read(buffer)) > 0) {
+                outputStream.write(buffer, 0, length);
+            }
+            outputStream.flush();
+
+            log.info("酒水餐食导入模板下载成功");
+        } catch (Exception e) {
+            log.error("下载酒水餐食导入模板失败", e);
+            throw new RuntimeException("下载模板失败:" + e.getMessage());
+        } finally {
+            try {
+                if (inputStream != null) {
+                    inputStream.close();
+                }
+                if (outputStream != null) {
+                    outputStream.close();
+                }
+            } catch (Exception e) {
+                log.error("关闭流失败", e);
+            }
+        }
+    }
+}

+ 1 - 1
alien-store-platform/src/main/java/shop/alien/storeplatform/entity/BathFacilityService.java → alien-store-platform/src/main/java/shop/alien/storeplatform/entity/StorePlatformBathFacilityService.java

@@ -20,7 +20,7 @@ import java.util.Date;
 @JsonInclude
 @TableName("bath_facility_service")
 @ApiModel(value = "BathFacilityService对象", description = "洗浴设施及服务表")
-public class BathFacilityService implements Serializable {
+public class StorePlatformBathFacilityService implements Serializable {
 
     private static final long serialVersionUID = 1L;
 

+ 1 - 1
alien-store-platform/src/main/java/shop/alien/storeplatform/entity/SportsEquipmentFacility.java → alien-store-platform/src/main/java/shop/alien/storeplatform/entity/StorePlatformSportsEquipmentFacility.java

@@ -20,7 +20,7 @@ import java.util.Date;
 @JsonInclude
 @TableName("sports_equipment_facility")
 @ApiModel(value = "SportsEquipmentFacility对象", description = "运动器材设施表")
-public class SportsEquipmentFacility implements Serializable {
+public class StorePlatformSportsEquipmentFacility implements Serializable {
 
     private static final long serialVersionUID = 1L;
 

+ 5 - 5
alien-store-platform/src/main/java/shop/alien/storeplatform/entity/StoreMenu.java → alien-store-platform/src/main/java/shop/alien/storeplatform/entity/StorePlatformStoreMenu.java

@@ -20,7 +20,7 @@ import java.util.Date;
 @JsonInclude
 @TableName("store_menu")
 @ApiModel(value = "StoreMenu对象", description = "门店菜单")
-public class StoreMenu {
+public class StorePlatformStoreMenu {
 
     @ApiModelProperty(value = "主键")
     @TableId(value = "id", type = IdType.AUTO)
@@ -36,7 +36,7 @@ public class StoreMenu {
 
     @ApiModelProperty(value = "菜单类型:1-菜单,2-酒水")
     @TableField("dish_menu_type")
-    private String dishMenuType;
+    private Integer dishMenuType;
 
     @ApiModelProperty(value = "名称")
     @TableField("dish_name")
@@ -94,14 +94,14 @@ public class StoreMenu {
     private String description;
 
     @ApiModelProperty(value = "酒精度")
-    @TableField("alcoholVolume")
+    @TableField("alcohol_volume")
     private String alcoholVolume;
 
-    @ApiModelProperty(value = "类")
+    @ApiModelProperty(value = "类")
     @TableField("category")
     private String category;
 
-    @ApiModelProperty(value = "味")
+    @ApiModelProperty(value = "味")
     @TableField("flavor")
     private String flavor;
 

+ 1 - 1
alien-store-platform/src/main/java/shop/alien/storeplatform/entity/StoreStaffConfig.java → alien-store-platform/src/main/java/shop/alien/storeplatform/entity/StorePlatformStoreStaffConfig.java

@@ -21,7 +21,7 @@ import java.util.Date;
 @JsonInclude
 @TableName("store_staff_config")
 @ApiModel(value = "StoreStaffConfig对象", description = "员工管理")
-public class StoreStaffConfig extends Model<StoreStaffConfig> {
+public class StorePlatformStoreStaffConfig extends Model<StorePlatformStoreStaffConfig> {
 
     private static final long serialVersionUID = 1L;
 

+ 9 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/mapper/StorePlatformSportsEquipmentFacilityMapper.java

@@ -0,0 +1,9 @@
+package shop.alien.storeplatform.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import shop.alien.storeplatform.entity.StorePlatformSportsEquipmentFacility;
+
+@Mapper
+public interface StorePlatformSportsEquipmentFacilityMapper extends BaseMapper<StorePlatformSportsEquipmentFacility> {
+}

+ 9 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/mapper/StorePlatformStoreMenuMapper.java

@@ -0,0 +1,9 @@
+package shop.alien.storeplatform.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import shop.alien.storeplatform.entity.StorePlatformStoreMenu;
+
+@Mapper
+public interface StorePlatformStoreMenuMapper extends BaseMapper<StorePlatformStoreMenu> {
+}

+ 91 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/service/StorePlatformBarMenuService.java

@@ -0,0 +1,91 @@
+package shop.alien.storeplatform.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springframework.web.multipart.MultipartFile;
+import shop.alien.entity.result.R;
+import shop.alien.storeplatform.entity.StorePlatformStoreMenu;
+
+import java.util.List;
+
+/**
+ * 商户平台-酒吧菜单服务类
+ *
+ * @author system
+ * @since 2025-01-XX
+ */
+public interface StorePlatformBarMenuService extends IService<StorePlatformStoreMenu> {
+
+    /**
+     * 根据ID查询菜单
+     *
+     * @param id 菜单ID
+     * @return 菜单信息
+     */
+    StorePlatformStoreMenu getById(Integer id);
+
+    /**
+     * 根据门店ID查询菜单列表
+     *
+     * @param storeId 门店ID
+     * @return 菜单列表
+     */
+    List<StorePlatformStoreMenu> getListByStoreId(Integer storeId);
+
+    /**
+     * 根据门店ID和菜单类型查询菜单列表
+     *
+     * @param storeId     门店ID
+     * @param dishMenuType 菜单类型:1-菜单,2-酒水
+     * @return 菜单列表
+     */
+    List<StorePlatformStoreMenu> getListByStoreIdAndType(Integer storeId, String dishMenuType);
+
+    /**
+     * 新增菜单
+     *
+     * @param storeMenu 菜单信息
+     * @return 操作结果
+     */
+    R<String> saveMenu(StorePlatformStoreMenu storeMenu);
+
+    /**
+     * 修改菜单
+     *
+     * @param storeMenu 菜单信息
+     * @return 操作结果
+     */
+    R<String> updateMenu(StorePlatformStoreMenu storeMenu);
+
+    /**
+     * 新增或修改菜单
+     *
+     * @param storeMenu 菜单信息
+     * @return 操作结果
+     */
+    R<String> saveOrUpdateMenu(StorePlatformStoreMenu storeMenu);
+
+    /**
+     * 删除菜单(逻辑删除)
+     *
+     * @param id 菜单ID
+     * @return 操作结果
+     */
+    R<String> deleteMenu(Integer id);
+
+    /**
+     * 批量删除菜单(逻辑删除)
+     *
+     * @param ids 菜单ID列表
+     * @return 操作结果
+     */
+    R<String> deleteMenuBatch(List<Integer> ids);
+
+    /**
+     * Excel导入酒吧菜单
+     *
+     * @param file     Excel文件
+     * @param storeId  门店id
+     * @return 导入结果
+     */
+    R<String> importMenuFromExcel(MultipartFile file, Integer storeId);
+}

+ 7 - 7
alien-store-platform/src/main/java/shop/alien/storeplatform/service/impl/StoreMenuPlatformServiceImpl.java

@@ -330,7 +330,7 @@ public class StoreMenuPlatformServiceImpl extends ServiceImpl<StoreMenuMapper, S
             Sheet sheet = workbook.getSheetAt(0);
 
             // 获取表头
-            Row headerRow = sheet.getRow(0);
+            Row headerRow = sheet.getRow(5);
             if (headerRow == null) {
                 return R.fail("Excel文件格式不正确,缺少表头");
             }
@@ -352,7 +352,7 @@ public class StoreMenuPlatformServiceImpl extends ServiceImpl<StoreMenuMapper, S
             Map<Integer, byte[]> imageMap = extractImagesFromSheet(sheet);
 
             // 读取数据行
-            for (int rowIndex = 1; rowIndex <= sheet.getLastRowNum(); rowIndex++) {
+            for (int rowIndex = 6; rowIndex <= sheet.getLastRowNum(); rowIndex++) {
                 Row row = sheet.getRow(rowIndex);
                 if (row == null) {
                     continue;
@@ -526,7 +526,7 @@ public class StoreMenuPlatformServiceImpl extends ServiceImpl<StoreMenuMapper, S
         storeMenu.setDishName(excelVo.getDishName());
         storeMenu.setDishPrice(excelVo.getDishPrice());
         storeMenu.setCostPrice(excelVo.getCostPrice());
-        storeMenu.setDishesUnit(excelVo.getDishesUnit());
+//        storeMenu.setDishesUnit(excelVo.getDishesUnit());
         storeMenu.setDescription(excelVo.getDescription());
         storeMenu.setDishType(excelVo.getDishType());
 
@@ -566,12 +566,12 @@ public class StoreMenuPlatformServiceImpl extends ServiceImpl<StoreMenuMapper, S
         // 简单的匹配逻辑,可以根据实际需求调整
         Map<String, String> fieldMapping = new HashMap<>();
         fieldMapping.put("dishName", "菜品名称");
-        fieldMapping.put("dishPrice", "价格");
-        fieldMapping.put("costPrice", "成本价");
-        fieldMapping.put("dishesUnit", "单位");
+        fieldMapping.put("dishPrice", "价格(¥)");
+        fieldMapping.put("costPrice", "成本价(¥)");
+//        fieldMapping.put("dishesUnit", "单位");
         fieldMapping.put("img", "图片");
         fieldMapping.put("description", "描述");
-        fieldMapping.put("dishType", "是否推荐");
+        fieldMapping.put("dishType", "是否设为推荐(是/否)");
 
         String expectedHeader = fieldMapping.get(fieldName);
         return expectedHeader != null && expectedHeader.equals(headerName);

+ 619 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/service/impl/StorePlatformBarMenuServiceImpl.java

@@ -0,0 +1,619 @@
+package shop.alien.storeplatform.service.impl;
+
+import cn.hutool.core.collection.CollectionUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.xssf.usermodel.*;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+import shop.alien.entity.result.R;
+import shop.alien.entity.store.StoreImg;
+import shop.alien.entity.store.excelVo.util.ExcelImage;
+import shop.alien.mapper.StoreImgMapper;
+import shop.alien.storeplatform.entity.StorePlatformStoreMenu;
+import shop.alien.storeplatform.feign.AlienStoreFeign;
+import shop.alien.storeplatform.mapper.StorePlatformStoreMenuMapper;
+import shop.alien.storeplatform.service.StorePlatformBarMenuService;
+import shop.alien.storeplatform.util.FileUploadUtil;
+import shop.alien.storeplatform.vo.StorePlatformStoreMenuImportVo;
+import shop.alien.util.ali.AliOSSUtil;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Field;
+import java.math.BigDecimal;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * 商户平台-酒吧菜单服务实现类
+ *
+ * @author system
+ * @since 2025-01-XX
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class StorePlatformBarMenuServiceImpl extends ServiceImpl<StorePlatformStoreMenuMapper, StorePlatformStoreMenu> implements StorePlatformBarMenuService {
+
+    private final StorePlatformStoreMenuMapper storeMenuMapper;
+
+    private final StoreImgMapper storeImgMapper;
+
+    private final AliOSSUtil aliOSSUtil;
+
+    private final AlienStoreFeign alienStoreFeign;
+
+    @Override
+    public StorePlatformStoreMenu getById(Integer id) {
+        log.info("StorePlatformBarMenuServiceImpl.getById id={}", id);
+        if (id == null) {
+            throw new RuntimeException("菜单ID不能为空");
+        }
+        return super.getById(id);
+    }
+
+    @Override
+    public List<StorePlatformStoreMenu> getListByStoreId(Integer storeId) {
+        log.info("StorePlatformBarMenuServiceImpl.getListByStoreId storeId={}", storeId);
+        if (storeId == null) {
+            throw new RuntimeException("门店ID不能为空");
+        }
+        LambdaQueryWrapper<StorePlatformStoreMenu> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(StorePlatformStoreMenu::getStoreId, storeId)
+                .eq(StorePlatformStoreMenu::getDeleteFlag, 0)
+                .orderByAsc(StorePlatformStoreMenu::getSort);
+        List<StorePlatformStoreMenu> list = this.list(queryWrapper);
+        return list.stream()
+                .sorted(Comparator.comparing(StorePlatformStoreMenu::getSort))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public List<StorePlatformStoreMenu> getListByStoreIdAndType(Integer storeId, String dishMenuType) {
+        log.info("StorePlatformBarMenuServiceImpl.getListByStoreIdAndType storeId={}, dishMenuType={}", storeId, dishMenuType);
+        if (storeId == null) {
+            throw new RuntimeException("门店ID不能为空");
+        }
+        LambdaQueryWrapper<StorePlatformStoreMenu> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(StorePlatformStoreMenu::getStoreId, storeId)
+                .eq(StorePlatformStoreMenu::getDeleteFlag, 0);
+        if (StringUtils.isNotEmpty(dishMenuType)) {
+            queryWrapper.eq(StorePlatformStoreMenu::getDishMenuType, dishMenuType);
+        }
+        queryWrapper.orderByAsc(StorePlatformStoreMenu::getSort);
+        List<StorePlatformStoreMenu> list = this.list(queryWrapper);
+        return list.stream()
+                .sorted(Comparator.comparing(StorePlatformStoreMenu::getSort))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public R<String> saveMenu(StorePlatformStoreMenu storeMenu) {
+        log.info("StorePlatformBarMenuServiceImpl.saveMenu storeMenu={}", storeMenu);
+        if (storeMenu == null) {
+            return R.fail("菜单信息不能为空");
+        }
+        if (storeMenu.getStoreId() == null) {
+            return R.fail("门店ID不能为空");
+        }
+        if (StringUtils.isEmpty(storeMenu.getDishName())) {
+            return R.fail("菜单名称不能为空");
+        }
+
+        // 设置排序
+        LambdaQueryWrapper<StorePlatformStoreMenu> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(StorePlatformStoreMenu::getStoreId, storeMenu.getStoreId())
+                .eq(StorePlatformStoreMenu::getDeleteFlag, 0);
+        List<StorePlatformStoreMenu> menuList = this.list(queryWrapper);
+        if (CollectionUtil.isNotEmpty(menuList)) {
+            int maxSort = menuList.stream()
+                    .map(StorePlatformStoreMenu::getSort)
+                    .max(Integer::compareTo)
+                    .orElse(0);
+            storeMenu.setSort(maxSort + 1);
+        } else {
+            storeMenu.setSort(1);
+        }
+
+        boolean flag = this.save(storeMenu);
+        if (!flag) {
+            return R.fail("新增菜单失败");
+        }
+        return R.success("新增菜单成功");
+    }
+
+    @Override
+    public R<String> updateMenu(StorePlatformStoreMenu storeMenu) {
+        log.info("StorePlatformBarMenuServiceImpl.updateMenu storeMenu={}", storeMenu);
+        if (storeMenu == null || storeMenu.getId() == null) {
+            return R.fail("菜单信息或菜单ID不能为空");
+        }
+        if (StringUtils.isEmpty(storeMenu.getDishName())) {
+            return R.fail("菜单名称不能为空");
+        }
+
+        boolean flag = this.updateById(storeMenu);
+        if (!flag) {
+            return R.fail("修改菜单失败");
+        }
+        return R.success("修改菜单成功");
+    }
+
+    @Override
+    public R<String> saveOrUpdateMenu(StorePlatformStoreMenu storeMenu) {
+        log.info("StorePlatformBarMenuServiceImpl.saveOrUpdateMenu storeMenu={}", storeMenu);
+        if (storeMenu == null) {
+            return R.fail("菜单信息不能为空");
+        }
+
+        if (storeMenu.getId() != null) {
+            // 修改
+            return updateMenu(storeMenu);
+        } else {
+            // 新增
+            return saveMenu(storeMenu);
+        }
+    }
+
+    @Override
+    public R<String> deleteMenu(Integer id) {
+        log.info("StorePlatformBarMenuServiceImpl.deleteMenu id={}", id);
+        if (id == null) {
+            return R.fail("菜单ID不能为空");
+        }
+
+        boolean flag = this.removeById(id);
+        if (!flag) {
+            return R.fail("删除菜单失败");
+        }
+        return R.success("删除菜单成功");
+    }
+
+    @Override
+    public R<String> deleteMenuBatch(List<Integer> ids) {
+        log.info("StorePlatformBarMenuServiceImpl.deleteMenuBatch ids={}", ids);
+        if (CollectionUtil.isEmpty(ids)) {
+            return R.fail("菜单ID列表不能为空");
+        }
+
+        boolean flag = this.removeByIds(ids);
+        if (!flag) {
+            return R.fail("批量删除菜单失败");
+        }
+        return R.success("批量删除菜单成功");
+    }
+
+    /**
+     * Excel导入酒吧菜单
+     *
+     * @param file     Excel文件
+     * @param storeId  门店id
+     * @return 导入结果
+     */
+    @Override
+    public R<String> importMenuFromExcel(MultipartFile file, Integer storeId) {
+        log.info("StorePlatformBarMenuServiceImpl.importMenuFromExcel storeId={}", storeId);
+
+        if (file == null || file.isEmpty()) {
+            return R.fail("上传文件为空");
+        }
+
+        String fileName = file.getOriginalFilename();
+        if (fileName == null || (!fileName.endsWith(".xlsx") && !fileName.endsWith(".xls"))) {
+            return R.fail("文件格式不正确,请上传Excel文件");
+        }
+
+        if (storeId == null) {
+            return R.fail("门店ID不能为空");
+        }
+
+        List<String> errorMessages = new ArrayList<>();
+        int successCount = 0;
+        int totalCount = 0;
+
+        try (InputStream inputStream = file.getInputStream();
+             XSSFWorkbook workbook = new XSSFWorkbook(inputStream)) {
+            Sheet sheet = workbook.getSheetAt(0);
+
+            // 获取表头(假设表头在第5行,索引为5)
+            Row headerRow = sheet.getRow(5);
+            if (headerRow == null) {
+                return R.fail("Excel文件格式不正确,缺少表头");
+            }
+
+            // 构建字段映射(表头名称 -> 列索引)
+            Map<String, Integer> headerMap = new HashMap<>();
+            Field[] fields = StorePlatformStoreMenuImportVo.class.getDeclaredFields();
+            for (int i = 0; i < headerRow.getLastCellNum(); i++) {
+                Cell cell = headerRow.getCell(i);
+                if (cell != null) {
+                    String headerName = getCellValueAsString(cell);
+                    if (StringUtils.isNotEmpty(headerName)) {
+                        headerMap.put(headerName.trim(), i);
+                    }
+                }
+            }
+
+            // 获取图片映射(行索引 -> 图片字节数组)
+            Map<Integer, byte[]> imageMap = extractImagesFromSheet(sheet);
+
+            // 读取数据行(从第6行开始,索引为6)
+            for (int rowIndex = 6; rowIndex <= sheet.getLastRowNum(); rowIndex++) {
+                Row row = sheet.getRow(rowIndex);
+                if (row == null) {
+                    continue;
+                }
+
+                // 检查是否为空行
+                boolean isEmptyRow = true;
+                for (int i = 0; i < row.getLastCellNum(); i++) {
+                    Cell cell = row.getCell(i);
+                    if (cell != null && cell.getCellType() != CellType.BLANK) {
+                        String cellValue = getCellValueAsString(cell);
+                        if (StringUtils.isNotEmpty(cellValue)) {
+                            isEmptyRow = false;
+                            break;
+                        }
+                    }
+                }
+                if (isEmptyRow) {
+                    continue;
+                }
+
+                totalCount++;
+                StorePlatformStoreMenuImportVo excelVo = new StorePlatformStoreMenuImportVo();
+
+                // 读取每个字段
+                for (Field field : fields) {
+                    field.setAccessible(true);
+                    String fieldName = field.getName();
+                    Integer colIndex = null;
+
+                    // 根据字段名查找对应的表头
+                    for (Map.Entry<String, Integer> entry : headerMap.entrySet()) {
+                        String headerName = entry.getKey();
+                        if (isFieldMatch(fieldName, headerName)) {
+                            colIndex = entry.getValue();
+                            break;
+                        }
+                    }
+
+                    if (colIndex == null) {
+                        continue;
+                    }
+
+                    Cell cell = row.getCell(colIndex);
+                    if (cell == null && !field.isAnnotationPresent(ExcelImage.class)) {
+                        continue;
+                    }
+
+                    try {
+                        if (field.isAnnotationPresent(ExcelImage.class)) {
+                            // 处理图片字段
+                            byte[] imageBytes = imageMap.get(rowIndex);
+                            if (imageBytes != null && imageBytes.length > 0) {
+                                String imageName = "barMenu_" + storeId + "_" + System.currentTimeMillis() + "_" + rowIndex + ".jpg";
+                                MultipartFile multipartFile = new ByteArrayMultipartFile(imageBytes, imageName);
+                                JSONObject jsonObject = alienStoreFeign.uploadFile(multipartFile);
+                                if (200 == jsonObject.getIntValue("code")) {
+                                    field.set(excelVo, jsonObject.getJSONArray("data").get(0));
+                                } else {
+                                    field.set(excelVo, "");
+                                }
+//                                // 上传图片到OSS
+//                                String imageUrl = uploadImageToOSS(imageBytes, storeId, rowIndex);
+//                                field.set(excelVo, imageUrl);
+                            }
+                        } else {
+                            // 处理普通字段
+                            String cellValue = getCellValueAsString(cell);
+                            if (StringUtils.isNotEmpty(cellValue)) {
+                                setFieldValue(excelVo, field, cellValue.trim());
+                            }
+                        }
+                    } catch (Exception e) {
+                        log.warn("读取字段{}失败:{}", fieldName, e.getMessage());
+                    }
+                }
+
+                // 处理导入数据
+                try {
+                    validateAndSaveMenu(excelVo, storeId, rowIndex + 1);
+                    successCount++;
+                } catch (Exception e) {
+                    errorMessages.add(String.format("第%d行:%s", rowIndex + 1, e.getMessage()));
+                    log.error("导入第{}行数据失败", rowIndex + 1, e);
+                }
+            }
+        } catch (Exception e) {
+            log.error("导入Excel失败", e);
+            return R.fail("导入失败:" + e.getMessage());
+        }
+
+        // 构建返回消息
+        StringBuilder message = new StringBuilder();
+        message.append(String.format("导入完成:成功%d条,失败%d条", successCount, totalCount - successCount));
+        if (!errorMessages.isEmpty()) {
+            message.append("\n失败详情:\n");
+            for (int i = 0; i < Math.min(errorMessages.size(), 10); i++) {
+                message.append(errorMessages.get(i)).append("\n");
+            }
+            if (errorMessages.size() > 10) {
+                message.append("...还有").append(errorMessages.size() - 10).append("条错误信息");
+            }
+        }
+
+        return R.success(message.toString());
+    }
+
+    /**
+     * 从Sheet中提取图片
+     */
+    private Map<Integer, byte[]> extractImagesFromSheet(Sheet sheet) {
+        Map<Integer, byte[]> imageMap = new HashMap<>();
+        if (sheet instanceof XSSFSheet) {
+            XSSFSheet xssfSheet = (XSSFSheet) sheet;
+            XSSFDrawing drawing = xssfSheet.getDrawingPatriarch();
+            if (drawing != null) {
+                List<XSSFShape> shapes = drawing.getShapes();
+                for (XSSFShape shape : shapes) {
+                    if (shape instanceof XSSFPicture) {
+                        XSSFPicture picture = (XSSFPicture) shape;
+                        XSSFClientAnchor anchor = (XSSFClientAnchor) picture.getAnchor();
+                        int rowIndex = anchor.getRow1();
+                        try {
+                            // 直接使用 getData() 方法获取图片字节数组
+                            byte[] imageBytes = picture.getPictureData().getData();
+                            imageMap.put(rowIndex, imageBytes);
+                        } catch (Exception e) {
+                            log.warn("提取第{}行图片失败:{}", rowIndex, e.getMessage());
+                        }
+                    }
+                }
+            }
+        }
+        return imageMap;
+    }
+
+    /**
+     * 上传图片到OSS
+     */
+    private String uploadImageToOSS(byte[] imageBytes, Integer storeId, int rowIndex) {
+        try {
+            // 生成文件名
+            String fileName = "bar_menu_" + storeId + "_" + System.currentTimeMillis() + "_" + rowIndex + ".jpg";
+            String prefix = "image/";
+
+            // 创建临时MultipartFile
+            MultipartFile multipartFile = new ByteArrayMultipartFile(imageBytes, fileName);
+
+            // 上传到OSS
+            return aliOSSUtil.uploadFile(multipartFile, prefix + fileName);
+        } catch (Exception e) {
+            log.error("上传图片失败", e);
+            throw new RuntimeException("上传图片失败:" + e.getMessage());
+        }
+    }
+
+    /**
+     * 校验并保存菜单
+     */
+    private void validateAndSaveMenu(StorePlatformStoreMenuImportVo excelVo, Integer storeId, int rowNum) {
+        // 校验必填字段
+        if (StringUtils.isEmpty(excelVo.getDishName())) {
+            throw new RuntimeException("名称不能为空");
+        }
+
+        if (excelVo.getDishPrice() == null || excelVo.getDishPrice().compareTo(BigDecimal.ZERO) <= 0) {
+            throw new RuntimeException("价格必须大于0");
+        }
+
+        // 创建StorePlatformStoreMenu对象
+        StorePlatformStoreMenu storeMenu = new StorePlatformStoreMenu();
+        storeMenu.setStoreId(storeId);
+        storeMenu.setDishMenuType(excelVo.getDishMenuType() != null ? excelVo.getDishMenuType() : 0);
+        storeMenu.setDishName(excelVo.getDishName());
+        storeMenu.setDishPrice(excelVo.getDishPrice());
+        storeMenu.setCostPrice(excelVo.getCostPrice());
+        storeMenu.setCategory(excelVo.getCategory());
+        storeMenu.setAlcoholVolume(excelVo.getAlcoholVolume());
+        storeMenu.setFlavor(excelVo.getFlavor());
+        storeMenu.setDescription(excelVo.getDescription());
+        storeMenu.setDishType(excelVo.getDishType() != null ? excelVo.getDishType() : 0);
+
+        // 处理图片
+        if (StringUtils.isNotEmpty(excelVo.getImg())) {
+            StoreImg storeImg = new StoreImg();
+            storeImg.setStoreId(storeId);
+            storeImg.setImgType(7); // 菜单图片类型
+            storeImg.setImgUrl(excelVo.getImg());
+            storeImg.setImgDescription(excelVo.getDishName());
+            storeImgMapper.insert(storeImg);
+            storeMenu.setImgId(storeImg.getId());
+        }
+
+        // 设置排序
+        LambdaQueryWrapper<StorePlatformStoreMenu> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(StorePlatformStoreMenu::getStoreId, storeId)
+                .eq(StorePlatformStoreMenu::getDeleteFlag, 0);
+        List<StorePlatformStoreMenu> menuList = this.list(queryWrapper);
+        if (CollectionUtil.isNotEmpty(menuList)) {
+            int maxSort = menuList.stream()
+                    .map(StorePlatformStoreMenu::getSort)
+                    .max(Integer::compareTo)
+                    .orElse(0);
+            storeMenu.setSort(maxSort + 1);
+        } else {
+            storeMenu.setSort(1);
+        }
+
+        // 保存菜单
+        boolean flag = this.save(storeMenu);
+        if (!flag) {
+            throw new RuntimeException("保存菜单失败");
+        }
+    }
+
+    /**
+     * 判断字段名是否匹配表头
+     */
+    private boolean isFieldMatch(String fieldName, String headerName) {
+        // 字段映射表
+        Map<String, String> fieldMapping = new HashMap<>();
+        fieldMapping.put("dishMenuType", "类型(酒水/餐食)");
+        fieldMapping.put("dishName", "名称");
+        fieldMapping.put("dishPrice", "价格(¥)");
+        fieldMapping.put("costPrice", "成本价(¥)");
+        fieldMapping.put("category", "品类");
+        fieldMapping.put("alcoholVolume", "酒精度(%vol)");
+        fieldMapping.put("flavor", "风味");
+        fieldMapping.put("img", "图片");
+        fieldMapping.put("description", "描述");
+        fieldMapping.put("dishType", "是否设为推荐(是/否)");
+
+        String expectedHeader = fieldMapping.get(fieldName);
+        return expectedHeader != null && expectedHeader.equals(headerName);
+    }
+
+    /**
+     * 设置字段值
+     */
+    private void setFieldValue(StorePlatformStoreMenuImportVo excelVo, Field field, String cellValue) throws Exception {
+        Class<?> fieldType = field.getType();
+        String fieldName = field.getName();
+
+        if (fieldType == BigDecimal.class) {
+            try {
+                BigDecimal value = new BigDecimal(cellValue);
+                if (value.scale() > 2) {
+                    throw new RuntimeException("价格或者成本价格式错误, 请输入数字, 小数点保留两位以内");
+                }
+                field.set(excelVo, value);
+            } catch (NumberFormatException e) {
+                throw new RuntimeException("价格或者成本价格式错误, 请输入数字, 小数点保留两位以内");
+            }
+        } else if (fieldType == Integer.class) {
+            // 处理 dishType 字段:将"是"/"否"转换为1/0
+            if ("dishType".equals(fieldName)) {
+                String trimmedValue = cellValue.trim();
+                if ("是".equals(trimmedValue)) {
+                    field.set(excelVo, 1);
+                } else if ("否".equals(trimmedValue)) {
+                    field.set(excelVo, 0);
+                } else {
+                    throw new RuntimeException("是否推荐字段格式错误,请输入'是'或'否'");
+                }
+            } else if ("dishMenuType".equals(fieldName)) {
+                String trimmedValue = cellValue.trim();
+                if ("餐食".equals(trimmedValue)) {
+                    field.set(excelVo, 1);
+                } else if ("酒水".equals(trimmedValue)) {
+                    field.set(excelVo, 2);
+                } else {
+                    throw new RuntimeException("类型字段格式错误,请输入'酒水'或'餐食'");
+                }
+            } else {
+                try {
+                    field.set(excelVo, Integer.parseInt(cellValue));
+                } catch (NumberFormatException e) {
+                    throw new RuntimeException("数字格式错误:" + cellValue);
+                }
+            }
+        } else {
+            // String类型
+            field.set(excelVo, cellValue);
+        }
+    }
+
+    /**
+     * 获取单元格值(字符串格式)
+     */
+    private String getCellValueAsString(Cell cell) {
+        if (cell == null) {
+            return null;
+        }
+
+        switch (cell.getCellType()) {
+            case STRING:
+                return cell.getStringCellValue();
+            case NUMERIC:
+                if (DateUtil.isCellDateFormatted(cell)) {
+                    return cell.getDateCellValue().toString();
+                } else {
+                    // 处理数字,避免科学计数法
+                    double numericValue = cell.getNumericCellValue();
+                    if (numericValue == (long) numericValue) {
+                        return String.valueOf((long) numericValue);
+                    } else {
+                        return String.valueOf(numericValue);
+                    }
+                }
+            case BOOLEAN:
+                return String.valueOf(cell.getBooleanCellValue());
+            case FORMULA:
+                return cell.getCellFormula();
+            default:
+                return null;
+        }
+    }
+
+    /**
+     * 临时MultipartFile实现类,用于上传字节数组
+     */
+    private static class ByteArrayMultipartFile implements MultipartFile {
+        private final byte[] content;
+        private final String fileName;
+
+        public ByteArrayMultipartFile(byte[] content, String fileName) {
+            this.content = content;
+            this.fileName = fileName;
+        }
+
+        @Override
+        public String getName() {
+            return "file";
+        }
+
+        @Override
+        public String getOriginalFilename() {
+            return fileName;
+        }
+
+        @Override
+        public String getContentType() {
+            return "image/jpeg";
+        }
+
+        @Override
+        public boolean isEmpty() {
+            return content == null || content.length == 0;
+        }
+
+        @Override
+        public long getSize() {
+            return content.length;
+        }
+
+        @Override
+        public byte[] getBytes() throws IOException {
+            return content;
+        }
+
+        @Override
+        public InputStream getInputStream() throws IOException {
+            return new ByteArrayInputStream(content);
+        }
+
+        @Override
+        public void transferTo(java.io.File dest) throws IOException, IllegalStateException {
+            java.nio.file.Files.write(dest.toPath(), content);
+        }
+    }
+}

+ 31 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/vo/StorePlatformSportsEquipmentFacilityImportVo.java

@@ -0,0 +1,31 @@
+package shop.alien.storeplatform.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@JsonInclude
+@ApiModel(value = "StorePlatformSportsEquipmentFacilityImportVo对象")
+public class StorePlatformSportsEquipmentFacilityImportVo {
+
+    @ApiModelProperty(value = "设施分类(1:有氧区, 2:力量区, 3:单功能机械区)")
+    private Integer facilityCategory;
+
+    @ApiModelProperty(value = "设施名称")
+    private String facilityName;
+
+    @ApiModelProperty(value = "数量")
+    private Integer quantity;
+
+    @ApiModelProperty(value = "品牌")
+    private String brand;
+
+    @ApiModelProperty(value = "描述")
+    private String description;
+
+    @ApiModelProperty(value = "是否显示在店铺详情(0:隐藏, 1:显示)")
+    private Integer displayInStoreDetail;
+
+}

+ 47 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/vo/StorePlatformStoreMenuImportVo.java

@@ -0,0 +1,47 @@
+package shop.alien.storeplatform.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import shop.alien.entity.store.excelVo.util.ExcelImage;
+
+import java.math.BigDecimal;
+
+@Data
+@JsonInclude
+@ApiModel(value = "StorePlatformStoreMenuImportVo对象")
+public class StorePlatformStoreMenuImportVo {
+    @ApiModelProperty(value = "菜单类型:1-餐食,2-酒水")
+    private Integer dishMenuType;
+
+    @ApiModelProperty(value = "名称")
+    private String dishName;
+
+    @ApiModelProperty(value = "价格")
+    private BigDecimal dishPrice;
+
+    @ApiModelProperty(value = "成本价")
+    private BigDecimal costPrice;
+
+    @ApiModelProperty(value = "品类")
+    private String category;
+
+    @ApiModelProperty(value = "酒精度")
+    private String alcoholVolume;
+
+    @ApiModelProperty(value = "风味")
+    private String flavor;
+
+    @ApiModelProperty(value = "图片")
+    @ExcelImage
+    private String img;
+
+    @ApiModelProperty(value = "描述")
+    private String description;
+
+    @ApiModelProperty(value = "是否推荐, 0:非推荐, 1:推荐")
+    private Integer dishType;
+
+}

BIN
alien-store-platform/src/main/resources/templates/美食导入模板.xlsx


BIN
alien-store-platform/src/main/resources/templates/酒水餐食导入模板.xlsx


BIN
alien-store-platform/src/main/resources/templates/门店菜单导入模板.xlsx