zjy před 3 týdny
rodič
revize
d39fd7607a

+ 68 - 0
alien-entity/src/main/java/shop/alien/entity/store/StoreLicenseHistory.java

@@ -0,0 +1,68 @@
+package shop.alien.entity.store;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 商户证照历史记录
+ *
+ * @author system
+ * @since 2025-11-24
+ */
+@Data
+@JsonInclude
+@TableName("store_license_history")
+@ApiModel(value = "StoreLicenseHistory对象", description = "商户证照历史记录")
+public class StoreLicenseHistory extends Model<StoreLicenseHistory> {
+
+    @ApiModelProperty(value = "主键")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty(value = "商户ID")
+    @TableField("store_id")
+    private Integer storeId;
+
+    @ApiModelProperty(value = "证照类型: 1-合同管理, 2-食品经营许可证")
+    @TableField("license_status")
+    private Integer licenseStatus;
+
+    @ApiModelProperty(value = "审核状态: 1-审核中, 2-审核拒绝, 3-审核通过")
+    @TableField("license_execute_status")
+    private Integer licenseExecuteStatus;
+
+    @ApiModelProperty(value = "图片URL")
+    @TableField("img_url")
+    private String imgUrl;
+
+    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
+    @TableField("delete_flag")
+    @TableLogic
+    private Integer deleteFlag;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(value = "created_time", fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createdTime;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField("created_user_id")
+    private Integer createdUserId;
+
+    @ApiModelProperty(value = "修改时间")
+    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updatedTime;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField("updated_user_id")
+    private Integer updatedUserId;
+}
+

+ 57 - 0
alien-entity/src/main/java/shop/alien/entity/store/dto/StoreLicenseHistoryDTO.java

@@ -0,0 +1,57 @@
+package shop.alien.entity.store.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * 商户证照历史记录DTO
+ *
+ * @author system
+ * @since 2025-11-24
+ */
+@Data
+@JsonInclude
+@ApiModel(value = "StoreLicenseHistoryDTO对象", description = "商户证照历史记录DTO")
+public class StoreLicenseHistoryDTO {
+
+    @ApiModelProperty(value = "主键")
+    private Integer id;
+
+    @ApiModelProperty(value = "商户ID", required = true)
+    private Integer storeId;
+
+    @ApiModelProperty(value = "证照类型: 1-合同管理, 2-食品经营许可证", required = true)
+    private Integer licenseStatus;
+
+    @ApiModelProperty(value = "审核状态: 1-审核中, 2-审核拒绝, 3-审核通过", required = true)
+    private Integer licenseExecuteStatus;
+
+    @ApiModelProperty(value = "图片URL", required = true)
+    private String imgUrl;
+
+    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
+    private Integer deleteFlag;
+
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createdTime;
+
+    @ApiModelProperty(value = "创建人ID")
+    private Integer createdUserId;
+
+    @ApiModelProperty(value = "修改时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updatedTime;
+
+    @ApiModelProperty(value = "修改人ID")
+    private Integer updatedUserId;
+}
+

+ 63 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreLicenseHistoryVO.java

@@ -0,0 +1,63 @@
+package shop.alien.entity.store.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 商户证照历史记录VO
+ *
+ * @author system
+ * @since 2025-11-24
+ */
+@Data
+@JsonInclude
+@ApiModel(value = "StoreLicenseHistoryVO对象", description = "商户证照历史记录VO")
+public class StoreLicenseHistoryVO {
+
+    @ApiModelProperty(value = "主键")
+    private Integer id;
+
+    @ApiModelProperty(value = "商户ID")
+    private Integer storeId;
+
+    @ApiModelProperty(value = "商户名称")
+    private String storeName;
+
+    @ApiModelProperty(value = "证照类型: 1-合同管理, 2-食品经营许可证")
+    private Integer licenseStatus;
+
+    @ApiModelProperty(value = "证照类型名称")
+    private String licenseStatusName;
+
+    @ApiModelProperty(value = "审核状态: 1-审核中, 2-审核拒绝, 3-审核通过")
+    private Integer licenseExecuteStatus;
+
+    @ApiModelProperty(value = "审核状态名称")
+    private String licenseExecuteStatusName;
+
+    @ApiModelProperty(value = "图片URL")
+    private String imgUrl;
+
+    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
+    private Integer deleteFlag;
+
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createdTime;
+
+    @ApiModelProperty(value = "创建人ID")
+    private Integer createdUserId;
+
+    @ApiModelProperty(value = "修改时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updatedTime;
+
+    @ApiModelProperty(value = "修改人ID")
+    private Integer updatedUserId;
+}
+

+ 17 - 0
alien-entity/src/main/java/shop/alien/mapper/StoreLicenseHistoryMapper.java

@@ -0,0 +1,17 @@
+package shop.alien.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import shop.alien.entity.store.StoreLicenseHistory;
+
+/**
+ * 商户证照历史记录 Mapper 接口
+ *
+ * @author system
+ * @since 2025-11-24
+ */
+@Mapper
+public interface StoreLicenseHistoryMapper extends BaseMapper<StoreLicenseHistory> {
+
+}
+

+ 171 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/controller/StoreLicenseHistoryController.java

@@ -0,0 +1,171 @@
+package shop.alien.storeplatform.controller;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.swagger.annotations.*;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import shop.alien.entity.result.R;
+import shop.alien.entity.store.StoreLicenseHistory;
+import shop.alien.entity.store.dto.StoreLicenseHistoryDTO;
+import shop.alien.entity.store.vo.StoreLicenseHistoryVO;
+import shop.alien.storeplatform.service.StoreLicenseHistoryService;
+
+import java.util.List;
+
+/**
+ * 商户证照历史记录 Controller
+ *
+ * @author system
+ * @since 2025-11-24
+ */
+@Slf4j
+@Api(tags = {"商家端-证照历史管理"})
+@ApiSort(5)
+@CrossOrigin
+@RestController
+@RequestMapping("/storeLicenseHistory")
+@RequiredArgsConstructor
+public class StoreLicenseHistoryController {
+
+    private final StoreLicenseHistoryService storeLicenseHistoryService;
+
+    @ApiOperation("创建证照历史记录")
+    @ApiOperationSupport(order = 1)
+    @PostMapping("/create")
+    public R<StoreLicenseHistory> createLicenseHistory(@RequestBody @Validated StoreLicenseHistoryDTO dto) {
+        log.info("StoreLicenseHistoryController.createLicenseHistory: dto={}", dto);
+        try {
+            StoreLicenseHistory result = storeLicenseHistoryService.createLicenseHistory(dto);
+            return R.data(result, "创建成功");
+        } catch (Exception e) {
+            log.error("StoreLicenseHistoryController.createLicenseHistory ERROR: {}", e.getMessage(), e);
+            return R.fail(e.getMessage());
+        }
+    }
+
+    @ApiOperation("更新证照历史记录")
+    @ApiOperationSupport(order = 2)
+    @PutMapping("/update")
+    public R<Boolean> updateLicenseHistory(@RequestBody @Validated StoreLicenseHistoryDTO dto) {
+        log.info("StoreLicenseHistoryController.updateLicenseHistory: dto={}", dto);
+        try {
+            boolean result = storeLicenseHistoryService.updateLicenseHistory(dto);
+            if (result) {
+                return R.data(true, "更新成功");
+            }
+            return R.fail("更新失败");
+        } catch (Exception e) {
+            log.error("StoreLicenseHistoryController.updateLicenseHistory ERROR: {}", e.getMessage(), e);
+            return R.fail(e.getMessage());
+        }
+    }
+
+    @ApiOperation("删除证照历史记录")
+    @ApiOperationSupport(order = 3)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "记录ID", dataType = "Integer", paramType = "query", required = true)
+    })
+    @DeleteMapping("/delete")
+    public R<Boolean> deleteLicenseHistory(@RequestParam("id") Integer id) {
+        log.info("StoreLicenseHistoryController.deleteLicenseHistory: id={}", id);
+        try {
+            boolean result = storeLicenseHistoryService.deleteLicenseHistory(id);
+            if (result) {
+                return R.data(true, "删除成功");
+            }
+            return R.fail("删除失败");
+        } catch (Exception e) {
+            log.error("StoreLicenseHistoryController.deleteLicenseHistory ERROR: {}", e.getMessage(), e);
+            return R.fail(e.getMessage());
+        }
+    }
+
+    @ApiOperation("根据ID获取证照历史记录详情")
+    @ApiOperationSupport(order = 4)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "记录ID", dataType = "Integer", paramType = "query", required = true)
+    })
+    @GetMapping("/getById")
+    public R<StoreLicenseHistoryVO> getLicenseHistoryById(@RequestParam("id") Integer id) {
+        log.info("StoreLicenseHistoryController.getLicenseHistoryById: id={}", id);
+        try {
+            StoreLicenseHistoryVO result = storeLicenseHistoryService.getLicenseHistoryById(id);
+            if (result != null) {
+                return R.data(result);
+            }
+            return R.fail("记录不存在");
+        } catch (Exception e) {
+            log.error("StoreLicenseHistoryController.getLicenseHistoryById ERROR: {}", e.getMessage(), e);
+            return R.fail(e.getMessage());
+        }
+    }
+
+    @ApiOperation("根据商户ID获取证照历史记录列表")
+    @ApiOperationSupport(order = 5)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "storeId", value = "商户ID", dataType = "Integer", paramType = "query", required = true)
+    })
+    @GetMapping("/listByStoreId")
+    public R<List<StoreLicenseHistoryVO>> getLicenseHistoryListByStoreId(@RequestParam("storeId") Integer storeId) {
+        log.info("StoreLicenseHistoryController.getLicenseHistoryListByStoreId: storeId={}", storeId);
+        try {
+            List<StoreLicenseHistoryVO> result = storeLicenseHistoryService.getLicenseHistoryListByStoreId(storeId);
+            return R.data(result);
+        } catch (Exception e) {
+            log.error("StoreLicenseHistoryController.getLicenseHistoryListByStoreId ERROR: {}", e.getMessage(), e);
+            return R.fail(e.getMessage());
+        }
+    }
+
+    @ApiOperation("根据商户ID和证照类型获取证照历史记录列表")
+    @ApiOperationSupport(order = 6)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "storeId", value = "商户ID", dataType = "Integer", paramType = "query", required = true),
+            @ApiImplicitParam(name = "licenseStatus", value = "证照类型: 1-合同管理, 2-食品经营许可证", dataType = "Integer", paramType = "query", required = true)
+    })
+    @GetMapping("/listByStoreIdAndType")
+    public R<List<StoreLicenseHistoryVO>> getLicenseHistoryListByStoreIdAndType(
+            @RequestParam("storeId") Integer storeId,
+            @RequestParam("licenseStatus") Integer licenseStatus) {
+        log.info("StoreLicenseHistoryController.getLicenseHistoryListByStoreIdAndType: storeId={}, licenseStatus={}", 
+                 storeId, licenseStatus);
+        try {
+            List<StoreLicenseHistoryVO> result = storeLicenseHistoryService.getLicenseHistoryListByStoreIdAndType(storeId, licenseStatus);
+            return R.data(result);
+        } catch (Exception e) {
+            log.error("StoreLicenseHistoryController.getLicenseHistoryListByStoreIdAndType ERROR: {}", e.getMessage(), e);
+            return R.fail(e.getMessage());
+        }
+    }
+
+    @ApiOperation("分页查询证照历史记录")
+    @ApiOperationSupport(order = 7)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "current", value = "当前页", dataType = "Long", paramType = "query", required = true, defaultValue = "1"),
+            @ApiImplicitParam(name = "size", value = "每页大小", dataType = "Long", paramType = "query", required = true, defaultValue = "10"),
+            @ApiImplicitParam(name = "storeId", value = "商户ID(可选)", dataType = "Integer", paramType = "query", required = false),
+            @ApiImplicitParam(name = "licenseStatus", value = "证照类型(可选): 1-合同管理, 2-食品经营许可证", dataType = "Integer", paramType = "query", required = false),
+            @ApiImplicitParam(name = "licenseExecuteStatus", value = "审核状态(可选): 1-审核中, 2-审核拒绝, 3-审核通过", dataType = "Integer", paramType = "query", required = false)
+    })
+    @GetMapping("/page")
+    public R<Page<StoreLicenseHistoryVO>> getLicenseHistoryPage(
+            @RequestParam(value = "current", defaultValue = "1") Long current,
+            @RequestParam(value = "size", defaultValue = "10") Long size,
+            @RequestParam(value = "storeId", required = false) Integer storeId,
+            @RequestParam(value = "licenseStatus", required = false) Integer licenseStatus,
+            @RequestParam(value = "licenseExecuteStatus", required = false) Integer licenseExecuteStatus) {
+        log.info("StoreLicenseHistoryController.getLicenseHistoryPage: current={}, size={}, storeId={}, licenseStatus={}, licenseExecuteStatus={}", 
+                 current, size, storeId, licenseStatus, licenseExecuteStatus);
+        try {
+            Page<StoreLicenseHistory> page = new Page<>(current, size);
+            Page<StoreLicenseHistoryVO> result = storeLicenseHistoryService.getLicenseHistoryPage(page, storeId, licenseStatus, licenseExecuteStatus);
+            return R.data(result);
+        } catch (Exception e) {
+            log.error("StoreLicenseHistoryController.getLicenseHistoryPage ERROR: {}", e.getMessage(), e);
+            return R.fail(e.getMessage());
+        }
+    }
+}
+

+ 79 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/service/StoreLicenseHistoryService.java

@@ -0,0 +1,79 @@
+package shop.alien.storeplatform.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import shop.alien.entity.store.StoreLicenseHistory;
+import shop.alien.entity.store.dto.StoreLicenseHistoryDTO;
+import shop.alien.entity.store.vo.StoreLicenseHistoryVO;
+
+import java.util.List;
+
+/**
+ * 商户证照历史记录 Service 接口
+ *
+ * @author system
+ * @since 2025-11-24
+ */
+public interface StoreLicenseHistoryService {
+
+    /**
+     * 创建证照历史记录
+     *
+     * @param dto 证照历史记录DTO
+     * @return 创建结果
+     */
+    StoreLicenseHistory createLicenseHistory(StoreLicenseHistoryDTO dto);
+
+    /**
+     * 更新证照历史记录
+     *
+     * @param dto 证照历史记录DTO
+     * @return 更新结果
+     */
+    boolean updateLicenseHistory(StoreLicenseHistoryDTO dto);
+
+    /**
+     * 根据ID删除证照历史记录
+     *
+     * @param id 记录ID
+     * @return 删除结果
+     */
+    boolean deleteLicenseHistory(Integer id);
+
+    /**
+     * 根据ID获取证照历史记录详情
+     *
+     * @param id 记录ID
+     * @return 证照历史记录详情
+     */
+    StoreLicenseHistoryVO getLicenseHistoryById(Integer id);
+
+    /**
+     * 根据商户ID获取证照历史记录列表
+     *
+     * @param storeId 商户ID
+     * @return 证照历史记录列表
+     */
+    List<StoreLicenseHistoryVO> getLicenseHistoryListByStoreId(Integer storeId);
+
+    /**
+     * 根据商户ID和证照类型获取证照历史记录列表
+     *
+     * @param storeId       商户ID
+     * @param licenseStatus 证照类型
+     * @return 证照历史记录列表
+     */
+    List<StoreLicenseHistoryVO> getLicenseHistoryListByStoreIdAndType(Integer storeId, Integer licenseStatus);
+
+    /**
+     * 分页查询证照历史记录
+     *
+     * @param page          分页对象
+     * @param storeId       商户ID(可选)
+     * @param licenseStatus 证照类型(可选)
+     * @param licenseExecuteStatus 审核状态(可选)
+     * @return 分页结果
+     */
+    Page<StoreLicenseHistoryVO> getLicenseHistoryPage(Page<StoreLicenseHistory> page, Integer storeId, 
+                                                       Integer licenseStatus, Integer licenseExecuteStatus);
+}
+

+ 241 - 0
alien-store-platform/src/main/java/shop/alien/storeplatform/service/impl/StoreLicenseHistoryServiceImpl.java

@@ -0,0 +1,241 @@
+package shop.alien.storeplatform.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import shop.alien.entity.result.BusinessException;
+import shop.alien.entity.store.StoreLicenseHistory;
+import shop.alien.entity.store.StoreInfo;
+import shop.alien.entity.store.dto.StoreLicenseHistoryDTO;
+import shop.alien.entity.store.vo.StoreLicenseHistoryVO;
+import shop.alien.mapper.StoreLicenseHistoryMapper;
+import shop.alien.mapper.StoreInfoMapper;
+import shop.alien.storeplatform.service.StoreLicenseHistoryService;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 商户证照历史记录 Service 实现类
+ *
+ * @author system
+ * @since 2025-11-24
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class StoreLicenseHistoryServiceImpl implements StoreLicenseHistoryService {
+
+    private final StoreLicenseHistoryMapper storeLicenseHistoryMapper;
+    private final StoreInfoMapper storeInfoMapper;
+
+    @Override
+    public StoreLicenseHistory createLicenseHistory(StoreLicenseHistoryDTO dto) {
+        log.info("StoreLicenseHistoryServiceImpl.createLicenseHistory: dto={}", dto);
+        
+        // 验证商户是否存在
+        StoreInfo storeInfo = storeInfoMapper.selectById(dto.getStoreId());
+        if (storeInfo == null) {
+            throw new BusinessException("商户不存在");
+        }
+
+        // 验证证照类型
+        if (dto.getLicenseStatus() == null || (dto.getLicenseStatus() != 1 && dto.getLicenseStatus() != 2)) {
+            throw new BusinessException("证照类型无效");
+        }
+
+        // 验证审核状态
+        if (dto.getLicenseExecuteStatus() == null || 
+            (dto.getLicenseExecuteStatus() < 1 || dto.getLicenseExecuteStatus() > 3)) {
+            throw new BusinessException("审核状态无效");
+        }
+
+        StoreLicenseHistory entity = new StoreLicenseHistory();
+        BeanUtils.copyProperties(dto, entity);
+        
+        int result = storeLicenseHistoryMapper.insert(entity);
+        if (result > 0) {
+            return entity;
+        }
+        throw new BusinessException("创建证照历史记录失败");
+    }
+
+    @Override
+    public boolean updateLicenseHistory(StoreLicenseHistoryDTO dto) {
+        log.info("StoreLicenseHistoryServiceImpl.updateLicenseHistory: dto={}", dto);
+        
+        if (dto.getId() == null) {
+            throw new BusinessException("记录ID不能为空");
+        }
+
+        StoreLicenseHistory existingRecord = storeLicenseHistoryMapper.selectById(dto.getId());
+        if (existingRecord == null) {
+            throw new BusinessException("证照历史记录不存在");
+        }
+
+        StoreLicenseHistory entity = new StoreLicenseHistory();
+        BeanUtils.copyProperties(dto, entity);
+        
+        int result = storeLicenseHistoryMapper.updateById(entity);
+        return result > 0;
+    }
+
+    @Override
+    public boolean deleteLicenseHistory(Integer id) {
+        log.info("StoreLicenseHistoryServiceImpl.deleteLicenseHistory: id={}", id);
+        
+        if (id == null) {
+            throw new BusinessException("记录ID不能为空");
+        }
+
+        StoreLicenseHistory existingRecord = storeLicenseHistoryMapper.selectById(id);
+        if (existingRecord == null) {
+            throw new BusinessException("证照历史记录不存在");
+        }
+
+        // 逻辑删除
+        int result = storeLicenseHistoryMapper.deleteById(id);
+        return result > 0;
+    }
+
+    @Override
+    public StoreLicenseHistoryVO getLicenseHistoryById(Integer id) {
+        log.info("StoreLicenseHistoryServiceImpl.getLicenseHistoryById: id={}", id);
+        
+        if (id == null) {
+            throw new BusinessException("记录ID不能为空");
+        }
+
+        StoreLicenseHistory entity = storeLicenseHistoryMapper.selectById(id);
+        if (entity == null) {
+            return null;
+        }
+
+        return convertToVO(entity);
+    }
+
+    @Override
+    public List<StoreLicenseHistoryVO> getLicenseHistoryListByStoreId(Integer storeId) {
+        log.info("StoreLicenseHistoryServiceImpl.getLicenseHistoryListByStoreId: storeId={}", storeId);
+        
+        if (storeId == null) {
+            throw new BusinessException("商户ID不能为空");
+        }
+
+        LambdaQueryWrapper<StoreLicenseHistory> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(StoreLicenseHistory::getStoreId, storeId)
+               .orderByDesc(StoreLicenseHistory::getCreatedTime);
+        
+        List<StoreLicenseHistory> list = storeLicenseHistoryMapper.selectList(wrapper);
+        return list.stream().map(this::convertToVO).collect(Collectors.toList());
+    }
+
+    @Override
+    public List<StoreLicenseHistoryVO> getLicenseHistoryListByStoreIdAndType(Integer storeId, Integer licenseStatus) {
+        log.info("StoreLicenseHistoryServiceImpl.getLicenseHistoryListByStoreIdAndType: storeId={}, licenseStatus={}", 
+                 storeId, licenseStatus);
+        
+        if (storeId == null) {
+            throw new BusinessException("商户ID不能为空");
+        }
+        if (licenseStatus == null) {
+            throw new BusinessException("证照类型不能为空");
+        }
+
+        LambdaQueryWrapper<StoreLicenseHistory> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(StoreLicenseHistory::getStoreId, storeId)
+               .eq(StoreLicenseHistory::getLicenseStatus, licenseStatus)
+               .orderByDesc(StoreLicenseHistory::getCreatedTime);
+        
+        List<StoreLicenseHistory> list = storeLicenseHistoryMapper.selectList(wrapper);
+        return list.stream().map(this::convertToVO).collect(Collectors.toList());
+    }
+
+    @Override
+    public Page<StoreLicenseHistoryVO> getLicenseHistoryPage(Page<StoreLicenseHistory> page, Integer storeId,
+                                                              Integer licenseStatus, Integer licenseExecuteStatus) {
+        log.info("StoreLicenseHistoryServiceImpl.getLicenseHistoryPage: page={}, storeId={}, licenseStatus={}, licenseExecuteStatus={}", 
+                 page, storeId, licenseStatus, licenseExecuteStatus);
+        
+        LambdaQueryWrapper<StoreLicenseHistory> wrapper = new LambdaQueryWrapper<>();
+        
+        if (storeId != null) {
+            wrapper.eq(StoreLicenseHistory::getStoreId, storeId);
+        }
+        if (licenseStatus != null) {
+            wrapper.eq(StoreLicenseHistory::getLicenseStatus, licenseStatus);
+        }
+        if (licenseExecuteStatus != null) {
+            wrapper.eq(StoreLicenseHistory::getLicenseExecuteStatus, licenseExecuteStatus);
+        }
+        
+        wrapper.orderByDesc(StoreLicenseHistory::getCreatedTime);
+        
+        IPage<StoreLicenseHistory> entityPage = storeLicenseHistoryMapper.selectPage(page, wrapper);
+        
+        // 转换为VO
+        Page<StoreLicenseHistoryVO> voPage = new Page<>(entityPage.getCurrent(), entityPage.getSize(), entityPage.getTotal());
+        List<StoreLicenseHistoryVO> voList = entityPage.getRecords().stream()
+                .map(this::convertToVO)
+                .collect(Collectors.toList());
+        voPage.setRecords(voList);
+        
+        return voPage;
+    }
+
+    /**
+     * 实体转VO
+     */
+    private StoreLicenseHistoryVO convertToVO(StoreLicenseHistory entity) {
+        StoreLicenseHistoryVO vo = new StoreLicenseHistoryVO();
+        BeanUtils.copyProperties(entity, vo);
+        
+        // 获取商户名称
+        if (entity.getStoreId() != null) {
+            StoreInfo storeInfo = storeInfoMapper.selectById(entity.getStoreId());
+            if (storeInfo != null) {
+                vo.setStoreName(storeInfo.getStoreName());
+            }
+        }
+        
+        // 设置证照类型名称
+        if (entity.getLicenseStatus() != null) {
+            switch (entity.getLicenseStatus()) {
+                case 1:
+                    vo.setLicenseStatusName("合同管理");
+                    break;
+                case 2:
+                    vo.setLicenseStatusName("食品经营许可证");
+                    break;
+                default:
+                    vo.setLicenseStatusName("未知");
+                    break;
+            }
+        }
+        
+        // 设置审核状态名称
+        if (entity.getLicenseExecuteStatus() != null) {
+            switch (entity.getLicenseExecuteStatus()) {
+                case 1:
+                    vo.setLicenseExecuteStatusName("审核中");
+                    break;
+                case 2:
+                    vo.setLicenseExecuteStatusName("审核拒绝");
+                    break;
+                case 3:
+                    vo.setLicenseExecuteStatusName("审核通过");
+                    break;
+                default:
+                    vo.setLicenseExecuteStatusName("未知");
+                    break;
+            }
+        }
+        
+        return vo;
+    }
+}
+