Pārlūkot izejas kodu

feat(store): add business section management with three-level classification

- Implemented controller for querying business section categories
- Added service layer for business section data retrieval
- Created RESTful APIs for first, second, and third level category lists
- Built tree structure API for three-level cascading display
- Added full path query by dictionary ID
- Integrated Swagger documentation for all endpoints
- Included error handling and logging for each API
- Designed database interaction using MyBatis Plus
- Applied strategy pattern for scalable category management
- Supported complete classification hierarchy: sectors, sub-sectors, types
wxd 1 nedēļu atpakaļ
vecāks
revīzija
4c40d05aa0

+ 14 - 0
alien-entity/src/main/java/shop/alien/entity/store/StoreInfo.java

@@ -234,4 +234,18 @@ public class StoreInfo {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     @TableField("update_renew_contract_time")
     private Date  updateRenewContractTime;
+
+    @ApiModelProperty(value = "分类id(词典表 键为 business_classify)")
+    @TableField("business_classify")
+    private String businessClassify;
+
+    @ApiModelProperty(value = "分类名称")
+    @TableField("business_classify_name")
+    private String businessClassifyName;
+
+    @ApiModelProperty(value = "是否提供餐食 0 否 1 是")
+    @TableField("meal_provided")
+    private Integer mealProvided;
+
+
 }

+ 17 - 0
alien-entity/src/main/java/shop/alien/entity/store/dto/StoreInfoDto.java

@@ -179,4 +179,21 @@ public class StoreInfoDto {
     @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date foodLicenceExpirationTime;
+
+    @ApiModelProperty(value = "分类id(词典表 键为 business_classify)")
+    private  List<String> businessClassifyList;
+
+    @ApiModelProperty(value = "分类名称")
+    private String businessClassifyName;
+
+    @ApiModelProperty(value = "分类id(词典表 键为 business_classify)")
+    @TableField("business_classify")
+    private String businessClassify;
+
+    @ApiModelProperty(value = "是否提供餐食 0=不提供  1=提供")
+    @TableField("meal_provided")
+    private Integer mealProvided;
+
+    @ApiModelProperty(value = "娱乐经营许可证")
+    private List<String> entertainmentLicenseAddress;
 }

+ 3 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreMainInfoVo.java

@@ -83,6 +83,9 @@ public class StoreMainInfoVo extends StoreInfo {
     @ApiModelProperty(value = "经营种类ids")
     private List<String> businessTypesList;
 
+    @ApiModelProperty(value = "分类DistIds")
+    private List<String> businessClassifyList;
+
     @ApiModelProperty(value = "到期时间")
     private String expirationDate;
 

+ 178 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/controller/BusinessSectionController.java

@@ -0,0 +1,178 @@
+package shop.alien.storeplatform.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiOperationSupport;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+import shop.alien.entity.result.R;
+import shop.alien.entity.store.vo.StoreDictionaryVo;
+import shop.alien.storeplatform.service.BusinessSectionService;
+
+import java.util.List;
+
+/**
+ * 经营板块管理控制器(平台端)
+ * 提供经营板块的三级分类查询接口
+ * 
+ * <p>业务说明:
+ * <ul>
+ *   <li>一级分类:经营板块(特色美食、酒店/民宿、KTV等)</li>
+ *   <li>二级分类:各板块下的子分类</li>
+ *   <li>三级分类:各二级分类下的细分类</li>
+ * </ul>
+ * </p>
+ *
+ * @author alien-cloud
+ * @date 2025-12-01
+ */
+@Api(tags = {"商户平台-经营板块管理"})
+@Slf4j
+@CrossOrigin
+@RestController
+@RequestMapping("/businessSection")
+@RequiredArgsConstructor
+public class BusinessSectionController {
+
+    private final BusinessSectionService businessSectionService;
+
+    /**
+     * 查询经营板块一级分类列表
+     * 返回所有一级分类(特色美食、酒店/民宿、KTV、洗浴汗蒸等)
+     *
+     * @return R<List<StoreDictionaryVo>> 一级分类列表
+     * @author alien-cloud
+     * @date 2025-12-01
+     */
+    @ApiOperation("查询经营板块一级分类列表")
+    @ApiOperationSupport(order = 1)
+    @GetMapping("/getFirstLevelList")
+    public R<List<StoreDictionaryVo>> getFirstLevelList() {
+        log.info("BusinessSectionController.getFirstLevelList - 查询一级分类列表");
+        try {
+            List<StoreDictionaryVo> result = businessSectionService.getFirstLevelList();
+            log.info("BusinessSectionController.getFirstLevelList - 查询成功,共 {} 条数据", result.size());
+            return R.data(result);
+        } catch (Exception e) {
+            log.error("BusinessSectionController.getFirstLevelList ERROR: {}", e.getMessage(), e);
+            return R.fail("查询失败:" + e.getMessage());
+        }
+    }
+
+    /**
+     * 查询经营板块二级分类列表
+     * 根据一级分类ID查询对应的二级分类
+     *
+     * @param parentDictId 一级分类的字典ID(dict_id)
+     * @return R<List<StoreDictionaryVo>> 二级分类列表
+     * @author alien-cloud
+     * @date 2025-12-01
+     */
+    @ApiOperation("查询经营板块二级分类列表")
+    @ApiOperationSupport(order = 2)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "parentDictId", value = "一级分类字典ID(如:1-特色美食,2-酒店/民宿)", 
+                    dataType = "String", paramType = "query", required = true, example = "1")
+    })
+    @GetMapping("/getSecondLevelList")
+    public R<List<StoreDictionaryVo>> getSecondLevelList(
+            @RequestParam("parentDictId") String parentDictId) {
+        log.info("BusinessSectionController.getSecondLevelList - 查询二级分类列表,parentDictId={}", parentDictId);
+        try {
+            List<StoreDictionaryVo> result = businessSectionService.getSecondLevelList(parentDictId);
+            log.info("BusinessSectionController.getSecondLevelList - 查询成功,共 {} 条数据", result.size());
+            return R.data(result);
+        } catch (Exception e) {
+            log.error("BusinessSectionController.getSecondLevelList ERROR: parentDictId={}, error={}", 
+                    parentDictId, e.getMessage(), e);
+            return R.fail("查询失败:" + e.getMessage());
+        }
+    }
+
+    /**
+     * 查询经营板块三级分类列表
+     * 根据二级分类ID查询对应的三级分类
+     *
+     * @param parentDictId 二级分类的字典ID(dict_id)
+     * @return R<List<StoreDictionaryVo>> 三级分类列表
+     * @author alien-cloud
+     * @date 2025-12-01
+     */
+    @ApiOperation("查询经营板块三级分类列表")
+    @ApiOperationSupport(order = 3)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "parentDictId", value = "二级分类字典ID", 
+                    dataType = "String", paramType = "query", required = true, example = "11")
+    })
+    @GetMapping("/getThirdLevelList")
+    public R<List<StoreDictionaryVo>> getThirdLevelList(
+            @RequestParam("parentDictId") String parentDictId) {
+        log.info("BusinessSectionController.getThirdLevelList - 查询三级分类列表,parentDictId={}", parentDictId);
+        try {
+            List<StoreDictionaryVo> result = businessSectionService.getThirdLevelList(parentDictId);
+            log.info("BusinessSectionController.getThirdLevelList - 查询成功,共 {} 条数据", result.size());
+            return R.data(result);
+        } catch (Exception e) {
+            log.error("BusinessSectionController.getThirdLevelList ERROR: parentDictId={}, error={}", 
+                    parentDictId, e.getMessage(), e);
+            return R.fail("查询失败:" + e.getMessage());
+        }
+    }
+
+    /**
+     * 查询经营板块树形结构(三级联动)
+     * 返回完整的三级分类树形结构,包含所有层级的子节点
+     *
+     * @return R<List<StoreDictionaryVo>> 树形结构数据(包含一级、二级、三级)
+     * @author alien-cloud
+     * @date 2025-12-01
+     */
+    @ApiOperation("查询经营板块树形结构(三级联动)")
+    @ApiOperationSupport(order = 4)
+    @GetMapping("/getTreeStructure")
+    public R<List<StoreDictionaryVo>> getTreeStructure() {
+        log.info("BusinessSectionController.getTreeStructure - 查询三级树形结构");
+        try {
+            List<StoreDictionaryVo> result = businessSectionService.getTreeStructure();
+            log.info("BusinessSectionController.getTreeStructure - 查询成功");
+            return R.data(result);
+        } catch (Exception e) {
+            log.error("BusinessSectionController.getTreeStructure ERROR: {}", e.getMessage(), e);
+            return R.fail("查询失败:" + e.getMessage());
+        }
+    }
+
+    /**
+     * 根据字典ID查询完整路径
+     * 返回从一级到当前级别的完整分类路径
+     *
+     * @param dictId 字典ID
+     * @return R<List<StoreDictionaryVo>> 分类路径(从一级到当前级)
+     * @author alien-cloud
+     * @date 2025-12-01
+     */
+    @ApiOperation("根据字典ID查询完整路径")
+    @ApiOperationSupport(order = 5)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "dictId", value = "字典ID", 
+                    dataType = "String", paramType = "query", required = true, example = "1")
+    })
+    @GetMapping("/getFullPath")
+    public R<List<StoreDictionaryVo>> getFullPath(
+            @RequestParam("dictId") String dictId) {
+        log.info("BusinessSectionController.getFullPath - 查询完整路径,dictId={}", dictId);
+        try {
+            List<StoreDictionaryVo> result = businessSectionService.getFullPath(dictId);
+            log.info("BusinessSectionController.getFullPath - 查询成功");
+            return R.data(result);
+        } catch (Exception e) {
+            log.error("BusinessSectionController.getFullPath ERROR: dictId={}, error={}", 
+                    dictId, e.getMessage(), e);
+            return R.fail("查询失败:" + e.getMessage());
+        }
+    }
+}
+

+ 59 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/service/BusinessSectionService.java

@@ -0,0 +1,59 @@
+package shop.alien.storeplatform.service;
+
+import shop.alien.entity.store.vo.StoreDictionaryVo;
+
+import java.util.List;
+
+/**
+ * 经营板块服务接口
+ * 提供经营板块的三级分类查询服务
+ *
+ * @author alien-cloud
+ * @date 2025-12-01
+ */
+public interface BusinessSectionService {
+
+    /**
+     * 查询经营板块一级分类列表
+     * 返回所有一级分类(特色美食、酒店/民宿、KTV、洗浴汗蒸等)
+     *
+     * @return 一级分类列表
+     */
+    List<StoreDictionaryVo> getFirstLevelList();
+
+    /**
+     * 查询经营板块二级分类列表
+     * 根据一级分类的字典ID查询对应的二级分类
+     *
+     * @param parentDictId 一级分类的字典ID(dict_id)
+     * @return 二级分类列表
+     */
+    List<StoreDictionaryVo> getSecondLevelList(String parentDictId);
+
+    /**
+     * 查询经营板块三级分类列表
+     * 根据二级分类的字典ID查询对应的三级分类
+     *
+     * @param parentDictId 二级分类的字典ID(dict_id)
+     * @return 三级分类列表
+     */
+    List<StoreDictionaryVo> getThirdLevelList(String parentDictId);
+
+    /**
+     * 查询经营板块树形结构(三级联动)
+     * 返回完整的三级分类树形结构,包含所有层级的子节点
+     *
+     * @return 树形结构数据(包含一级、二级、三级)
+     */
+    List<StoreDictionaryVo> getTreeStructure();
+
+    /**
+     * 根据字典ID查询完整路径
+     * 返回从一级到当前级别的完整分类路径
+     *
+     * @param dictId 字典ID
+     * @return 分类路径(从一级到当前级)
+     */
+    List<StoreDictionaryVo> getFullPath(String dictId);
+}
+

+ 366 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/service/impl/BusinessSectionServiceImpl.java

@@ -0,0 +1,366 @@
+package shop.alien.storeplatform.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import shop.alien.entity.store.StoreDictionary;
+import shop.alien.entity.store.vo.StoreDictionaryVo;
+import shop.alien.mapper.StoreDictionaryMapper;
+import shop.alien.storeplatform.service.BusinessSectionService;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 经营板块服务实现类
+ * 提供经营板块的三级分类查询服务实现
+ *
+ * @author alien-cloud
+ * @date 2025-12-01
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class BusinessSectionServiceImpl implements BusinessSectionService {
+
+    private final StoreDictionaryMapper storeDictionaryMapper;
+
+    /**
+     * 类型名称常量:经营板块
+     */
+    private static final String TYPE_NAME = "business_section";
+    /**
+     * 类型名称常量:二级
+     */
+    private static final String BUSINESS_TYPE = "business_type";
+    /**
+     * 类型名称常量:三级 分类
+     */
+    private static final String BUSINESS_CLASSIFY = "business_classify";
+
+    /**
+     * 一级分类的根节点 dict_id(经营板块根节点)
+     */
+    private static final String ROOT_DICT_ID = "0";
+
+    /**
+     * 查询经营板块一级分类列表
+     *
+     * @return 一级分类列表
+     */
+    @Override
+    public List<StoreDictionaryVo> getFirstLevelList() {
+        log.info("BusinessSectionServiceImpl.getFirstLevelList - 开始查询一级分类");
+
+//        // 1. 查询根节点(dict_id = 0)
+//        StoreDictionary root = storeDictionaryMapper.selectOne(
+//                new LambdaQueryWrapper<StoreDictionary>()
+//                        .eq(StoreDictionary::getTypeName, TYPE_NAME)
+//                        .isNull(StoreDictionary::getParentId)
+//                        .eq(StoreDictionary::getDeleteFlag, 0)
+//        );
+//
+//        if (root == null) {
+//            log.warn("BusinessSectionServiceImpl.getFirstLevelList - 未找到经营板块根节点");
+//            return new ArrayList<>();
+//        }
+
+        // 2. 查询一级分类(parent_id = 根节点的id,且 dict_id != 0)
+        List<StoreDictionary> firstLevelList = storeDictionaryMapper.selectList(
+                new LambdaQueryWrapper<StoreDictionary>()
+                        .eq(StoreDictionary::getTypeName, TYPE_NAME)
+                        .isNull(StoreDictionary::getParentId)
+                        .eq(StoreDictionary::getDeleteFlag, 0)
+                        .orderByAsc(StoreDictionary::getDictId)
+        );
+
+        // 3. 转换为 VO
+        List<StoreDictionaryVo> voList = convertToVoList(firstLevelList);
+
+        log.info("BusinessSectionServiceImpl.getFirstLevelList - 查询成功,共 {} 条数据", voList.size());
+        return voList;
+    }
+
+    /**
+     * 查询经营板块二级分类列表
+     *
+     * @param parentDictId 一级分类的字典ID(dict_id)
+     * @return 二级分类列表
+     */
+    @Override
+    public List<StoreDictionaryVo> getSecondLevelList(String parentDictId) {
+        log.info("BusinessSectionServiceImpl.getSecondLevelList - 开始查询二级分类,parentDictId={}", parentDictId);
+
+        // 1. 根据 dict_id 查询父节点
+//        StoreDictionary parent = storeDictionaryMapper.selectOne(
+//                new LambdaQueryWrapper<StoreDictionary>()
+//                        .eq(StoreDictionary::getTypeName, BUSINESS_TYPE)
+//                        .eq(StoreDictionary::getId, parentDictId)
+//                        .eq(StoreDictionary::getDeleteFlag, 0)
+//        );
+//
+//        if (parent == null) {
+//            log.warn("BusinessSectionServiceImpl.getSecondLevelList - 未找到父节点,parentDictId={}", parentDictId);
+//            return new ArrayList<>();
+//        }
+
+        // 获取一级分类id
+        Integer id = storeDictionaryMapper.selectOne(
+                new LambdaQueryWrapper<StoreDictionary>()
+                        .eq(StoreDictionary::getTypeName, TYPE_NAME)
+                        .eq(StoreDictionary::getDictId, parentDictId)
+                        .eq(StoreDictionary::getDeleteFlag, 0)
+        ).getId();
+
+        // 2. 查询二级分类(parent_id = 父节点的id)
+        List<StoreDictionary> secondLevelList = storeDictionaryMapper.selectList(
+                new LambdaQueryWrapper<StoreDictionary>()
+                        .eq(StoreDictionary::getTypeName, BUSINESS_TYPE)
+                        .eq(StoreDictionary::getParentId, id)
+                        .eq(StoreDictionary::getDeleteFlag, 0)
+                        .orderByAsc(StoreDictionary::getDictId)
+        );
+
+        // 3. 转换为 VO
+        List<StoreDictionaryVo> voList = convertToVoList(secondLevelList);
+
+        log.info("BusinessSectionServiceImpl.getSecondLevelList - 查询成功,共 {} 条数据", voList.size());
+        return voList;
+    }
+
+    /**
+     * 查询经营板块三级分类列表
+     *
+     * @param parentDictId 二级分类的字典ID(dict_id)
+     * @return 三级分类列表
+     */
+    @Override
+    public List<StoreDictionaryVo> getThirdLevelList(String parentDictId) {
+        log.info("BusinessSectionServiceImpl.getThirdLevelList - 开始查询三级分类,parentDictId={}", parentDictId);
+
+//        // 1. 根据 dict_id 查询父节点
+//        StoreDictionary parent = storeDictionaryMapper.selectOne(
+//                new LambdaQueryWrapper<StoreDictionary>()
+//                        .eq(StoreDictionary::getTypeName, BUSINESS_CLASSIFY)
+//                        .eq(StoreDictionary::getId, parentDictId)
+//                        .eq(StoreDictionary::getDeleteFlag, 0)
+//        );
+//
+//        if (parent == null) {
+//            log.warn("BusinessSectionServiceImpl.getThirdLevelList - 未找到父节点,parentDictId={}", parentDictId);
+//            return new ArrayList<>();
+//        }
+
+        // 获取二级分类id
+        Integer businessTypeId = storeDictionaryMapper.selectOne(
+                new LambdaQueryWrapper<StoreDictionary>()
+                        .eq(StoreDictionary::getTypeName, BUSINESS_TYPE)
+                        .eq(StoreDictionary::getDictId, parentDictId)
+                        .eq(StoreDictionary::getDeleteFlag, 0)
+        ).getId();
+
+        // 2. 查询三级分类(parent_id = 父节点的id)
+        List<StoreDictionary> thirdLevelList = storeDictionaryMapper.selectList(
+                new LambdaQueryWrapper<StoreDictionary>()
+                        .eq(StoreDictionary::getTypeName, BUSINESS_CLASSIFY)
+                        .eq(StoreDictionary::getParentId, businessTypeId)
+                        .eq(StoreDictionary::getDeleteFlag, 0)
+                        .orderByAsc(StoreDictionary::getDictId)
+        );
+
+        // 3. 转换为 VO
+        List<StoreDictionaryVo> voList = convertToVoList(thirdLevelList);
+
+        log.info("BusinessSectionServiceImpl.getThirdLevelList - 查询成功,共 {} 条数据", voList.size());
+        return voList;
+    }
+
+    /**
+     * 查询经营板块树形结构(三级联动)
+     *
+     * @return 树形结构数据(包含一级、二级、三级)
+     */
+    @Override
+    public List<StoreDictionaryVo> getTreeStructure() {
+        log.info("BusinessSectionServiceImpl.getTreeStructure - 开始查询三级树形结构");
+
+        // 1. 查询所有经营板块数据(排除根节点)
+        List<StoreDictionary> allList = storeDictionaryMapper.selectList(
+                new LambdaQueryWrapper<StoreDictionary>()
+                        .eq(StoreDictionary::getTypeName, TYPE_NAME)
+                        .eq(StoreDictionary::getDeleteFlag, 0)
+                        .orderByAsc(StoreDictionary::getParentId)
+                        .orderByAsc(StoreDictionary::getDictId)
+        );
+
+        if (allList == null || allList.isEmpty()) {
+            log.warn("BusinessSectionServiceImpl.getTreeStructure - 未查询到任何数据");
+            return new ArrayList<>();
+        }
+
+        // 2. 转换为 VO 列表
+        List<StoreDictionaryVo> allVoList = convertToVoList(allList);
+
+        // 3. 构建树形结构
+        List<StoreDictionaryVo> treeList = buildTree(allVoList, allList);
+
+        log.info("BusinessSectionServiceImpl.getTreeStructure - 查询成功,共 {} 个一级分类", treeList.size());
+        return treeList;
+    }
+
+    /**
+     * 根据字典ID查询完整路径
+     *
+     * @param dictId 字典ID
+     * @return 分类路径(从一级到当前级)
+     */
+    @Override
+    public List<StoreDictionaryVo> getFullPath(String dictId) {
+        log.info("BusinessSectionServiceImpl.getFullPath - 开始查询完整路径,dictId={}", dictId);
+
+        List<StoreDictionaryVo> pathList = new ArrayList<>();
+
+        // 1. 查询当前节点
+        StoreDictionary current = storeDictionaryMapper.selectOne(
+                new LambdaQueryWrapper<StoreDictionary>()
+                        .eq(StoreDictionary::getTypeName, TYPE_NAME)
+                        .eq(StoreDictionary::getId, dictId)
+                        .eq(StoreDictionary::getDeleteFlag, 0)
+        );
+
+        if (current == null) {
+            log.warn("BusinessSectionServiceImpl.getFullPath - 未找到节点,dictId={}", dictId);
+            return pathList;
+        }
+
+        // 2. 递归查询父节点,构建路径
+        buildPath(current, pathList);
+
+        // 3. 反转列表(从一级到当前级)
+        List<StoreDictionaryVo> result = new ArrayList<>();
+        for (int i = pathList.size() - 1; i >= 0; i--) {
+            result.add(pathList.get(i));
+        }
+
+        log.info("BusinessSectionServiceImpl.getFullPath - 查询成功,路径长度={}", result.size());
+        return result;
+    }
+
+    /**
+     * 构建树形结构
+     *
+     * @param allVoList 所有VO列表
+     * @param allList   所有实体列表
+     * @return 树形结构
+     */
+    private List<StoreDictionaryVo> buildTree(List<StoreDictionaryVo> allVoList, 
+                                               List<StoreDictionary> allList) {
+        // 1. 找出一级分类(查询根节点的id)
+        StoreDictionary root = storeDictionaryMapper.selectOne(
+                new LambdaQueryWrapper<StoreDictionary>()
+                        .eq(StoreDictionary::getTypeName, TYPE_NAME)
+                        .eq(StoreDictionary::getDictId, ROOT_DICT_ID)
+                        .eq(StoreDictionary::getDeleteFlag, 0)
+        );
+
+        if (root == null) {
+            return new ArrayList<>();
+        }
+
+        Integer rootId = root.getId();
+
+        // 2. 找出一级分类
+        List<StoreDictionaryVo> firstLevelList = allVoList.stream()
+                .filter(vo -> {
+                    StoreDictionary entity = allList.stream()
+                            .filter(e -> e.getId().equals(vo.getId()))
+                            .findFirst()
+                            .orElse(null);
+                    return entity != null && rootId.equals(entity.getParentId());
+                })
+                .collect(Collectors.toList());
+
+        // 3. 为每个一级分类填充子节点
+        for (StoreDictionaryVo firstLevel : firstLevelList) {
+            // 查询二级分类
+            List<StoreDictionaryVo> secondLevelList = allVoList.stream()
+                    .filter(vo -> {
+                        StoreDictionary entity = allList.stream()
+                                .filter(e -> e.getId().equals(vo.getId()))
+                                .findFirst()
+                                .orElse(null);
+                        return entity != null && firstLevel.getId().equals(entity.getParentId());
+                    })
+                    .collect(Collectors.toList());
+
+            // 为每个二级分类填充三级分类
+            for (StoreDictionaryVo secondLevel : secondLevelList) {
+                List<StoreDictionaryVo> thirdLevelList = allVoList.stream()
+                        .filter(vo -> {
+                            StoreDictionary entity = allList.stream()
+                                    .filter(e -> e.getId().equals(vo.getId()))
+                                    .findFirst()
+                                    .orElse(null);
+                            return entity != null && secondLevel.getId().equals(entity.getParentId());
+                        })
+                        .collect(Collectors.toList());
+
+                secondLevel.setSubDataList(thirdLevelList.isEmpty() ? null : thirdLevelList);
+            }
+
+            firstLevel.setSubDataList(secondLevelList.isEmpty() ? null : secondLevelList);
+        }
+
+        return firstLevelList;
+    }
+
+    /**
+     * 递归构建路径
+     *
+     * @param current  当前节点
+     * @param pathList 路径列表
+     */
+    private void buildPath(StoreDictionary current, List<StoreDictionaryVo> pathList) {
+        if (current == null) {
+            return;
+        }
+
+        // 跳过根节点
+        if (ROOT_DICT_ID.equals(current.getDictId())) {
+            return;
+        }
+
+        // 添加当前节点
+        StoreDictionaryVo vo = new StoreDictionaryVo();
+        BeanUtils.copyProperties(current, vo);
+        pathList.add(vo);
+
+        // 递归查询父节点
+        if (current.getParentId() != null) {
+            StoreDictionary parent = storeDictionaryMapper.selectById(current.getParentId());
+            buildPath(parent, pathList);
+        }
+    }
+
+    /**
+     * 实体列表转 VO 列表
+     *
+     * @param entityList 实体列表
+     * @return VO列表
+     */
+    private List<StoreDictionaryVo> convertToVoList(List<StoreDictionary> entityList) {
+        if (entityList == null || entityList.isEmpty()) {
+            return new ArrayList<>();
+        }
+
+        return entityList.stream().map(entity -> {
+            StoreDictionaryVo vo = new StoreDictionaryVo();
+            BeanUtils.copyProperties(entity, vo);
+            return vo;
+        }).collect(Collectors.toList());
+    }
+}
+

+ 44 - 1
alien-store-platform/src/main/java/shop/alien/storeplatform/service/impl/StoreManageServiceImpl.java

@@ -114,13 +114,30 @@ public class StoreManageServiceImpl implements StoreManageService {
             StoreDictionary typeDict = storeDictionaryMapper.selectOne(
                     new LambdaQueryWrapper<StoreDictionary>()
                             .eq(StoreDictionary::getDictId, businessType)
-                            .eq(StoreDictionary::getParentId, businessSectionDict.getId())
+                            .eq(StoreDictionary::getTypeName, "business_type")
             );
             if (typeDict != null) {
                 businessTypeNames.add(typeDict.getDictDetail());
             }
         }
 
+        // 3. 获取分类
+        List<String> businessClassifyNameList = new ArrayList<>();
+        List<String> businessClassifys = storeInfoDto.getBusinessTypes();
+        // 7.1 设置业务分类(business_classify)
+        if (storeInfoDto.getBusinessClassify() != null) {
+            for (String businessClassify : businessClassifys) {
+                StoreDictionary typeDict = storeDictionaryMapper.selectOne(
+                        new LambdaQueryWrapper<StoreDictionary>()
+                                .eq(StoreDictionary::getDictId, businessClassify)
+                                .eq(StoreDictionary::getTypeName, "business_classify")
+                );
+                if (typeDict != null) {
+                    businessClassifyNameList.add(typeDict.getDictDetail());
+                }
+            }
+        }
+
         // 3. 构建店铺信息对象
         StoreInfo storeInfo = new StoreInfo();
         BeanUtils.copyProperties(storeInfoDto, storeInfo);
@@ -149,6 +166,10 @@ public class StoreManageServiceImpl implements StoreManageService {
         storeInfo.setBusinessTypes(String.join(",", businessTypes));
         storeInfo.setBusinessTypesName(String.join(",", businessTypeNames));
 
+        // 分类设置
+        storeInfo.setBusinessClassify(String.join(",", businessClassifys));
+        storeInfo.setBusinessClassifyName(String.join(",", businessClassifyNameList));
+
         // 8. 设置审批状态为待审批
         storeInfo.setStoreApplicationStatus(0);
 
@@ -305,6 +326,28 @@ public class StoreManageServiceImpl implements StoreManageService {
             storeImg.setImgUrl(storeInfoDto.getFoodLicenceUrl());
             storeImgMapper.insert(storeImg);
         }
+
+        // 4. 保存 娱乐经营许可证 图片 (imgType=31)
+        List<String> entertainmentLicenseAddress = storeInfoDto.getEntertainmentLicenseAddress();
+        if (!CollectionUtils.isEmpty(entertainmentLicenseAddress)) {
+            // 先删除已存在的合同图片
+            storeImgMapper.delete(
+                    new LambdaQueryWrapper<StoreImg>()
+                            .eq(StoreImg::getStoreId, storeId)
+                            .eq(StoreImg::getImgType, 31)
+            );
+
+            // 插入娱乐经营许可证
+            for (int i = 0; i < entertainmentLicenseAddress.size(); i++) {
+                StoreImg storeImg = new StoreImg();
+                storeImg.setStoreId(storeId);
+                storeImg.setImgType(31);
+                storeImg.setImgSort(i);
+                storeImg.setImgDescription("娱乐经营许可证");
+                storeImg.setImgUrl(entertainmentLicenseAddress.get(i));
+                storeImgMapper.insert(storeImg);
+            }
+        }
     }
 
     /**

+ 5 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/service/impl/StorePlatformRenovationServiceImpl.java

@@ -85,6 +85,11 @@ public class StorePlatformRenovationServiceImpl extends ServiceImpl<StoreInfoMap
             String[] strings = storeInfo.getBusinessTypes().split(",");
             storeMainInfoVo.setBusinessTypesList(Arrays.stream(strings).collect(Collectors.toList()));
         }
+        // 分类
+        if (storeInfo.getBusinessClassify() != null) {
+            String[] strings = storeInfo.getBusinessClassify().split(",");
+            storeMainInfoVo.setBusinessClassifyList(Arrays.stream(strings).collect(Collectors.toList()));
+        }
         //门店标签
         storeMainInfoVo.setStoreLabel(storeLabelMapper.selectOne(new LambdaQueryWrapper<StoreLabel>().eq(StoreLabel::getStoreId, id)));
         //营业时间

+ 658 - 0
alien-store-platform/接口文档/OCR识别接口文档.md

@@ -0,0 +1,658 @@
+# OCR 识别接口文档
+
+## 接口概述
+
+本接口提供阿里云 OCR(Optical Character Recognition,光学字符识别)服务,支持多种证件和文档的智能识别,包括身份证、营业执照、食品经营许可证等。
+
+**接口路径**: `POST /ali/ocrRequestUrl`  
+**接口描述**: 调用阿里云 OCR 识别服务,支持批量图片识别  
+**请求方式**: POST  
+**Content-Type**: application/json  
+**登录验证**: ✅ 需要
+
+---
+
+## 请求参数
+
+### 请求体 (JSON)
+
+| 参数名 | 类型 | 必填 | 说明 | 示例值 |
+|--------|------|------|------|--------|
+| imageUrls | String | 是 | 图片URL地址,多个用逗号分隔 | `https://example.com/image1.jpg,https://example.com/image2.jpg` |
+| ocrType | String | 是 | OCR识别类型 | `idCard`, `businessLicense`, `foodLicense` |
+| storeId | String | 否 | 店铺ID(用于记录识别来源) | `103` |
+| userId | String | 否 | 用户ID(用于记录识别来源) | `12345` |
+| storeUserId | String | 否 | 店铺用户ID(用于记录识别来源) | `67890` |
+
+### OCR 类型说明
+
+| ocrType 值 | 识别类型 | 说明 |
+|-----------|----------|------|
+| `idCard` | 身份证识别 | 识别身份证正反面信息 |
+| `businessLicense` | 营业执照识别 | 识别营业执照信息 |
+| `foodLicense` | 食品经营许可证识别 | 识别食品经营许可证信息 |
+
+---
+
+## 请求示例
+
+### 示例 1: 身份证识别(单张)
+
+```http
+POST /ali/ocrRequestUrl
+Content-Type: application/json
+
+{
+    "imageUrls": "https://example.com/idcard-front.jpg",
+    "ocrType": "idCard",
+    "storeId": "103",
+    "userId": "12345",
+    "storeUserId": "67890"
+}
+```
+
+```bash
+curl -X POST "http://localhost:8080/ali/ocrRequestUrl" \
+  -H "Content-Type: application/json" \
+  -H "Authorization: Bearer YOUR_TOKEN" \
+  -d '{
+    "imageUrls": "https://example.com/idcard-front.jpg",
+    "ocrType": "idCard",
+    "storeId": "103"
+  }'
+```
+
+---
+
+### 示例 2: 营业执照识别(批量)
+
+```http
+POST /ali/ocrRequestUrl
+Content-Type: application/json
+
+{
+    "imageUrls": "https://example.com/license1.jpg,https://example.com/license2.jpg",
+    "ocrType": "businessLicense",
+    "storeId": "103",
+    "storeUserId": "67890"
+}
+```
+
+---
+
+### 示例 3: 食品经营许可证识别
+
+```http
+POST /ali/ocrRequestUrl
+Content-Type: application/json
+
+{
+    "imageUrls": "https://example.com/food-license.jpg",
+    "ocrType": "foodLicense",
+    "storeId": "103"
+}
+```
+
+---
+
+## 响应参数
+
+### 成功响应
+
+#### 响应结构
+
+```json
+{
+    "code": 200,
+    "success": true,
+    "data": [
+        {
+            // OCR识别结果(根据不同类型返回不同字段)
+        }
+    ],
+    "msg": "操作成功"
+}
+```
+
+---
+
+### 身份证识别响应字段
+
+```json
+{
+    "code": 200,
+    "success": true,
+    "data": [
+        {
+            "name": "张三",
+            "gender": "男",
+            "nationality": "汉",
+            "birthDate": "19900101",
+            "address": "北京市朝阳区XX街道XX号",
+            "idNumber": "110101199001011234",
+            "issueAuthority": "北京市公安局朝阳分局",
+            "validDate": "2020.01.01-2030.01.01"
+        }
+    ],
+    "msg": "操作成功"
+}
+```
+
+#### 字段说明
+
+| 字段名 | 类型 | 说明 |
+|--------|------|------|
+| name | String | 姓名 |
+| gender | String | 性别 |
+| nationality | String | 民族 |
+| birthDate | String | 出生日期(格式:yyyyMMdd) |
+| address | String | 地址 |
+| idNumber | String | 身份证号码 |
+| issueAuthority | String | 签发机关(反面) |
+| validDate | String | 有效期限(反面) |
+
+---
+
+### 营业执照识别响应字段
+
+```json
+{
+    "code": 200,
+    "success": true,
+    "data": [
+        {
+            "name": "北京XX科技有限公司",
+            "creditCode": "91110000MA01ABC123",
+            "legalPerson": "李四",
+            "address": "北京市海淀区XX路XX号",
+            "registerDate": "2020-01-01",
+            "registerCapital": "100万元人民币",
+            "businessScope": "技术开发、技术咨询...",
+            "validPeriod": "2020-01-01至2040-01-01",
+            "type": "有限责任公司",
+            "establishDate": "2020-01-01"
+        }
+    ],
+    "msg": "操作成功"
+}
+```
+
+#### 字段说明
+
+| 字段名 | 类型 | 说明 |
+|--------|------|------|
+| name | String | 企业名称 |
+| creditCode | String | 统一社会信用代码 |
+| legalPerson | String | 法定代表人 |
+| address | String | 注册地址 |
+| registerDate | String | 注册日期 |
+| registerCapital | String | 注册资本 |
+| businessScope | String | 经营范围 |
+| validPeriod | String | 营业期限 |
+| type | String | 企业类型 |
+| establishDate | String | 成立日期 |
+
+---
+
+### 食品经营许可证识别响应字段
+
+```json
+{
+    "code": 200,
+    "success": true,
+    "data": [
+        {
+            "licenseName": "食品经营许可证",
+            "businessLicenseName": "北京XX餐饮有限公司",
+            "businessAddress": "北京市朝阳区XX街XX号",
+            "legalPerson": "王五",
+            "creditCode": "91110000MA01XYZ456",
+            "businessItem": "热食类食品制售",
+            "licenseNumber": "JY11234567890123",
+            "validPeriod": "2020-01-01至2025-01-01",
+            "issueDate": "2020-01-01",
+            "issueAuthority": "北京市朝阳区市场监督管理局"
+        }
+    ],
+    "msg": "操作成功"
+}
+```
+
+#### 字段说明
+
+| 字段名 | 类型 | 说明 |
+|--------|------|------|
+| licenseName | String | 许可证名称 |
+| businessLicenseName | String | 经营者名称 |
+| businessAddress | String | 经营场所 |
+| legalPerson | String | 法定代表人(负责人) |
+| creditCode | String | 社会信用代码 |
+| businessItem | String | 经营项目 |
+| licenseNumber | String | 许可证编号 |
+| validPeriod | String | 有效期限 |
+| issueDate | String | 发证日期 |
+| issueAuthority | String | 发证机关 |
+
+---
+
+### 失败响应
+
+```json
+{
+    "code": 500,
+    "success": false,
+    "data": null,
+    "msg": "身份证识别失败" // 或其他错误信息
+}
+```
+
+#### 常见错误信息
+
+| 错误信息 | 原因 | 解决方案 |
+|---------|------|---------|
+| OCR识别返回结果为空 | 图片质量差或格式错误 | 上传清晰的图片 |
+| 身份证识别失败 | 图片不是身份证或无法识别 | 检查图片内容 |
+| 营业执照识别失败 | 图片不是营业执照或无法识别 | 检查图片内容 |
+| 图片URL无法访问 | 图片链接失效或网络问题 | 检查图片URL |
+| OCR识别异常 | 系统异常或参数错误 | 检查请求参数 |
+
+---
+
+## 业务流程
+
+### 识别流程图
+
+```
+用户上传图片 
+    ↓
+前端获取图片URL
+    ↓
+调用 /ali/ocrRequestUrl 接口
+    ↓
+根据 ocrType 选择识别策略
+    ↓
+调用阿里云OCR服务
+    ↓
+解析识别结果
+    ↓
+保存识别记录到数据库
+    ↓
+返回识别结果
+```
+
+### 核心业务逻辑
+
+1. **参数接收**: 接收图片URL列表和识别类型
+2. **策略选择**: 根据 ocrType 选择对应的识别策略
+3. **批量识别**: 遍历图片URL列表,逐一调用阿里云OCR
+4. **结果解析**: 解析阿里云返回的JSON数据
+5. **数据存储**: 保存识别结果到 `ocr_image_upload` 表
+6. **结果返回**: 返回识别结果数组
+
+---
+
+## 技术实现
+
+### 技术架构
+
+```
+Controller层 (AliController)
+    ↓
+Service层 (AliApi)
+    ↓
+策略模式 (OcrStrategy)
+    ├── IdCardOcrStrategy (身份证识别)
+    ├── BusinessLicenseOcrStrategy (营业执照识别)
+    └── FoodManageLicenseOcrStrategy (食品许可证识别)
+    ↓
+阿里云OCR API
+```
+
+### 关键类说明
+
+| 类名 | 说明 | 路径 |
+|------|------|------|
+| AliController | 控制器,接收请求 | `shop.alien.store.controller.AliController` |
+| AliApi | 服务类,业务逻辑 | `shop.alien.store.util.ali.AliApi` |
+| OcrStrategy | 策略接口 | `shop.alien.store.util.ali.ocr.OcrStrategy` |
+| AbstractOcrStrategy | 策略抽象类 | `shop.alien.store.util.ali.ocr.AbstractOcrStrategy` |
+| IdCardOcrStrategy | 身份证识别策略 | `shop.alien.store.util.ali.ocr.strategy.IdCardOcrStrategy` |
+| BusinessLicenseOcrStrategy | 营业执照识别策略 | `shop.alien.store.util.ali.ocr.strategy.BusinessLicenseOcrStrategy` |
+| FoodManageLicenseOcrStrategy | 食品许可证识别策略 | `shop.alien.store.util.ali.ocr.strategy.FoodManageLicenseOcrStrategy` |
+
+### 核心代码
+
+#### Controller 层
+
+```java
+@ApiOperation("调用OCR识别接口")
+@PostMapping("/ocrRequestUrl")
+public R ocrRequestUrl(@RequestBody Map<String, String> params) {
+    try {
+        return aliApi.ocrRequestParams(params);
+    } catch (Exception e) {
+        return R.fail(e.getMessage());
+    }
+}
+```
+
+#### Service 层
+
+```java
+public R ocrRequestParams(Map<String, String> params) throws Exception {
+    // 根据 ocrType 获取对应的识别策略
+    OcrStrategy strategy = ocrStrategyFactory.getStrategy(params.get("ocrType"));
+    // 执行识别
+    return strategy.recognizeParams(params);
+}
+```
+
+#### 策略实现(以身份证为例)
+
+```java
+@Override
+public R recognizeParams(Map<String, String> params) throws Exception {
+    String[] imageUrls = params.get("imageUrls").split(",");
+    JSONArray resultArray = new JSONArray();
+    
+    for (String imageUrl : imageUrls) {
+        // 创建阿里云OCR客户端
+        Client client = createOcrClient();
+        
+        // 创建识别请求
+        RecognizeIdcardRequest request = new RecognizeIdcardRequest()
+                .setUrl(imageUrl);
+        
+        // 调用识别接口
+        RecognizeIdcardResponse response = client.recognizeIdcardWithOptions(
+                request, new RuntimeOptions());
+        
+        // 解析结果
+        RecognizeIdcardResponseBody body = response.getBody();
+        JSONObject jsonObject = JSONObject.parseObject(body.getData());
+        
+        // 保存识别记录
+        OcrImageUpload ocrImageUpload = new OcrImageUpload();
+        ocrImageUpload.setImageUrl(imageUrl);
+        ocrImageUpload.setOcrResult(jsonObject.getJSONObject("data").toJSONString());
+        ocrImageUpload.setOcrType(OcrTypeEnum.ID_CARD.getCode());
+        saveOcrImage(ocrImageUpload);
+        
+        // 添加到结果集
+        resultArray.add(jsonObject.getJSONObject("data"));
+    }
+    
+    return R.data(resultArray);
+}
+```
+
+---
+
+## 数据库设计
+
+### ocr_image_upload 表
+
+OCR识别记录表,用于保存每次识别的结果。
+
+| 字段名 | 类型 | 说明 |
+|--------|------|------|
+| id | INT | 主键ID |
+| user_id | VARCHAR | 用户ID |
+| store_id | VARCHAR | 店铺ID |
+| store_user_id | VARCHAR | 店铺用户ID |
+| image_url | VARCHAR | 图片URL |
+| ocr_result | TEXT | OCR识别结果(JSON格式) |
+| ocr_type | VARCHAR | OCR类型 |
+| create_time | DATETIME | 创建时间 |
+| update_time | DATETIME | 更新时间 |
+
+---
+
+## 配置说明
+
+### 阿里云 OCR 配置
+
+在 `application.yml` 中配置阿里云 OCR 参数:
+
+```yaml
+ali:
+  ocr:
+    accessKeyId: YOUR_ACCESS_KEY_ID
+    accessKeySecret: YOUR_ACCESS_KEY_SECRET
+    endpoint: ocr-api.cn-hangzhou.aliyuncs.com
+```
+
+### 配置项说明
+
+| 配置项 | 说明 | 示例值 |
+|--------|------|--------|
+| accessKeyId | 阿里云访问密钥ID | `LTAI4G...` |
+| accessKeySecret | 阿里云访问密钥Secret | `xxx...` |
+| endpoint | OCR服务端点 | `ocr-api.cn-hangzhou.aliyuncs.com` |
+
+---
+
+## 使用限制
+
+### 图片要求
+
+| 项目 | 要求 |
+|------|------|
+| **格式** | JPG、PNG、BMP、PDF |
+| **大小** | 不超过 4MB |
+| **分辨率** | 建议大于 600x600 像素 |
+| **清晰度** | 图片清晰,无模糊、反光 |
+| **完整性** | 证件信息完整,无遮挡 |
+
+### 调用限制
+
+| 项目 | 限制 |
+|------|------|
+| **QPS限制** | 根据阿里云账户配置 |
+| **并发数** | 建议不超过10个并发请求 |
+| **批量数量** | 单次请求建议不超过5张图片 |
+
+---
+
+## 注意事项
+
+### 1. 图片URL要求
+
+⚠️ **图片URL必须可公网访问**
+
+```java
+// ✅ 正确:公网可访问的URL
+"imageUrls": "https://cdn.example.com/image.jpg"
+
+// ❌ 错误:本地路径
+"imageUrls": "file:///C:/Users/image.jpg"
+
+// ❌ 错误:内网地址
+"imageUrls": "http://192.168.1.100/image.jpg"
+```
+
+### 2. 批量识别建议
+
+⚠️ **批量识别时注意错误处理**
+
+```java
+// 当前实现:遇到错误会中断整个批量
+// 建议:改进为部分失败不影响其他图片识别
+```
+
+### 3. 数据隐私
+
+⚠️ **敏感信息处理**
+
+- 识别结果包含个人身份信息,需妥善保存
+- 建议加密存储敏感字段
+- 遵守数据保护法规
+
+### 4. 成本控制
+
+⚠️ **接口调用成本**
+
+- 阿里云OCR按调用次数计费
+- 建议添加调用频率限制
+- 避免重复识别相同图片
+
+---
+
+## 错误处理
+
+### 异常类型
+
+| 异常类型 | 说明 | 处理方式 |
+|---------|------|---------|
+| TeaException | 阿里云API异常 | 记录日志,返回友好提示 |
+| Exception | 通用异常 | 记录详细日志,返回错误信息 |
+| NullPointerException | 空指针异常 | 参数校验,防止空值 |
+
+### 异常处理代码
+
+```java
+try {
+    // OCR识别逻辑
+} catch (TeaException error) {
+    log.error("OCR识别失败: code={}, message={}", 
+              error.getCode(), error.getMessage());
+    return R.fail("身份证识别失败");
+} catch (Exception error) {
+    log.error("OCR识别异常", error);
+    return R.fail("身份证识别异常");
+}
+```
+
+---
+
+## 性能优化建议
+
+### 1. 图片预处理
+
+```java
+// 建议:上传前压缩图片
+- 控制图片大小在 1MB 以内
+- 分辨率调整到 1200x1200 左右
+- 使用 JPG 格式(压缩率更高)
+```
+
+### 2. 异步处理
+
+```java
+// 建议:批量识别时使用异步
+@Async
+public CompletableFuture<R> recognizeAsync(String imageUrl) {
+    // 异步识别逻辑
+}
+```
+
+### 3. 缓存机制
+
+```java
+// 建议:相同图片不重复识别
+@Cacheable(value = "ocrResult", key = "#imageUrl")
+public R recognizeWithCache(String imageUrl, String ocrType) {
+    // 识别逻辑
+}
+```
+
+---
+
+## 测试建议
+
+### 测试场景
+
+| 测试场景 | 测试目的 | 预期结果 |
+|---------|---------|---------|
+| **正常识别** | 验证识别准确性 | 返回正确的识别结果 |
+| **图片模糊** | 验证容错能力 | 返回友好错误提示 |
+| **批量识别** | 验证批量处理 | 所有图片都能识别 |
+| **无效URL** | 验证参数校验 | 返回错误信息 |
+| **并发请求** | 验证并发安全 | 结果正确,无遗漏 |
+
+### 测试用例
+
+```bash
+# 测试1:身份证识别
+curl -X POST "http://localhost:8080/ali/ocrRequestUrl" \
+  -H "Content-Type: application/json" \
+  -d '{
+    "imageUrls": "https://example.com/idcard.jpg",
+    "ocrType": "idCard",
+    "storeId": "103"
+  }'
+
+# 测试2:营业执照批量识别
+curl -X POST "http://localhost:8080/ali/ocrRequestUrl" \
+  -H "Content-Type: application/json" \
+  -d '{
+    "imageUrls": "https://example.com/license1.jpg,https://example.com/license2.jpg",
+    "ocrType": "businessLicense",
+    "storeId": "103"
+  }'
+```
+
+---
+
+## 相关接口
+
+### 其他 OCR 接口
+
+| 接口路径 | 说明 | 区别 |
+|---------|------|------|
+| GET /ali/ocrRequest | OCR识别方式一 | 通过图片ID识别 |
+| POST /ali/ocrRequestByBase64 | OCR识别方式二 | 通过Base64编码识别 |
+| POST /ali/secondClient | 二手委托人识别 | 专用于二手业务 |
+
+---
+
+## 更新日志
+
+### v1.0 (2025-11-18)
+
+**初始版本**:
+- ✅ 支持身份证识别
+- ✅ 支持营业执照识别
+- ✅ 支持食品经营许可证识别
+- ✅ 支持批量图片识别
+- ✅ 自动保存识别记录
+- ✅ 采用策略模式设计
+
+**开发团队**:lyx
+
+---
+
+### v1.1 (预计)
+
+**计划功能**:
+- 🔜 增加图片缓存机制
+- 🔜 支持异步批量识别
+- 🔜 增加识别结果校验
+- 🔜 优化错误处理逻辑
+- 🔜 增加调用频率限制
+
+---
+
+## 相关文档
+
+- [阿里云OCR API文档](https://help.aliyun.com/document_detail/442275.html)
+- [身份证识别文档](https://help.aliyun.com/document_detail/442322.html)
+- [营业执照识别文档](https://help.aliyun.com/document_detail/442338.html)
+
+---
+
+## 联系方式
+
+| 角色 | 负责内容 | 联系方式 |
+|------|---------|---------|
+| 后端开发 | 接口开发与维护 | - |
+| 技术负责人 | 技术方案审核 | - |
+| 产品经理 | 业务需求对接 | - |
+
+---
+
+**文档版本**: v1.0  
+**最后更新**: 2025-11-28  
+**维护人员**: AI Assistant  
+**接口状态**: ✅ 已上线
+