Quellcode durchsuchen

用户端详情 服务设施 商家资质档案

qinxuyang vor 3 Monaten
Ursprung
Commit
2aa708d992

+ 27 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreQualificationInfoVo.java

@@ -0,0 +1,27 @@
+package shop.alien.entity.store.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import shop.alien.entity.store.StoreImg;
+
+import java.util.List;
+
+/**
+ * 门店资质信息 VO
+ *
+ * @author system
+ * @since 2025-01-01
+ */
+@Data
+@ApiModel(value = "StoreQualificationInfoVo对象", description = "门店资质信息")
+@JsonInclude(JsonInclude.Include.ALWAYS)
+public class StoreQualificationInfoVo {
+
+    @ApiModelProperty(value = "营业执照列表(img_type = 14)")
+    private List<StoreImg> businessLicenseList;
+
+    @ApiModelProperty(value = "其他资质证明图片列表(img_type = 35)")
+    private List<StoreImg> otherQualificationList;
+}

+ 33 - 0
alien-entity/src/main/java/shop/alien/mapper/StoreQualificationMapper.java

@@ -0,0 +1,33 @@
+package shop.alien.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import shop.alien.entity.store.StoreImg;
+
+import java.util.List;
+
+/**
+ * 门店资质信息 Mapper 接口
+ *
+ * @author system
+ * @since 2025-01-01
+ */
+public interface StoreQualificationMapper {
+    
+    /**
+     * 根据门店id和图片类型查询图片列表
+     *
+     * @param storeId 门店id
+     * @param imgType 图片类型
+     * @return 图片列表
+     */
+    List<StoreImg> selectStoreImgsByType(@Param("storeId") Integer storeId, @Param("imgType") Integer imgType);
+    
+    /**
+     * 根据门店id和多个图片类型查询图片列表
+     *
+     * @param storeId 门店id
+     * @param imgTypes 图片类型数组
+     * @return 图片列表
+     */
+    List<StoreImg> selectStoreImgsByTypes(@Param("storeId") Integer storeId, @Param("imgTypes") Integer[] imgTypes);
+}

+ 21 - 0
alien-entity/src/main/java/shop/alien/mapper/StoreTagDetailMapper.java

@@ -0,0 +1,21 @@
+package shop.alien.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import shop.alien.entity.store.TagStoreRelation;
+
+/**
+ * 店铺标签详情 Mapper 接口
+ *
+ * @author system
+ * @since 2025-01-01
+ */
+public interface StoreTagDetailMapper {
+    
+    /**
+     * 根据门店id查询店铺标签详情
+     *
+     * @param storeId 门店id
+     * @return 店铺标签详情
+     */
+    TagStoreRelation selectStoreTagDetailByStoreId(@Param("storeId") Integer storeId);
+}

+ 67 - 0
alien-entity/src/main/resources/mapper/StoreQualificationMapper.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="shop.alien.mapper.StoreQualificationMapper">
+
+    <!-- 根据门店id和图片类型查询图片列表 -->
+    <select id="selectStoreImgsByType" resultType="shop.alien.entity.store.StoreImg">
+        SELECT
+            id,
+            store_id AS storeId,
+            img_type AS imgType,
+            img_description AS imgDescription,
+            img_sort AS imgSort,
+            img_url AS imgUrl,
+            is_extract AS isExtract,
+            color_code AS colorCode,
+            delete_flag AS deleteFlag,
+            created_time AS createdTime,
+            created_user_id AS createdUserId,
+            updated_time AS updatedTime,
+            updated_user_id AS updatedUserId,
+            business_id AS businessId
+        FROM
+            store_img
+        WHERE
+            store_id = #{storeId}
+            AND img_type = #{imgType}
+            AND delete_flag = 0
+        ORDER BY
+            img_sort ASC,
+            created_time DESC
+    </select>
+
+    <!-- 根据门店id和多个图片类型查询图片列表 -->
+    <select id="selectStoreImgsByTypes" resultType="shop.alien.entity.store.StoreImg">
+        SELECT
+            id,
+            store_id AS storeId,
+            img_type AS imgType,
+            img_description AS imgDescription,
+            img_sort AS imgSort,
+            img_url AS imgUrl,
+            is_extract AS isExtract,
+            color_code AS colorCode,
+            delete_flag AS deleteFlag,
+            created_time AS createdTime,
+            created_user_id AS createdUserId,
+            updated_time AS updatedTime,
+            updated_user_id AS updatedUserId,
+            business_id AS businessId
+        FROM
+            store_img
+        WHERE
+            store_id = #{storeId}
+            AND img_type IN
+            <foreach collection="imgTypes" item="imgType" open="(" separator="," close=")">
+                #{imgType}
+            </foreach>
+            AND delete_flag = 0
+        ORDER BY
+            img_type ASC,
+            img_sort ASC,
+            created_time DESC
+    </select>
+
+</mapper>

+ 50 - 0
alien-entity/src/main/resources/mapper/StoreTagDetailMapper.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="shop.alien.mapper.StoreTagDetailMapper">
+
+    <!-- 根据门店id查询店铺标签详情 -->
+    <select id="selectStoreTagDetailByStoreId" resultType="shop.alien.entity.store.TagStoreRelation">
+        SELECT
+            id,
+            store_id AS storeId,
+            tag_column_a AS tagColumn1,
+            tag_column_b AS tagColumn2,
+            tag_column_c AS tagColumn3,
+            tag_column_d AS tagColumn4,
+            tag_column_e AS tagColumn5,
+            tag_column_f AS tagColumn6,
+            tag_column_g AS tagColumn7,
+            tag_column_h AS tagColumn8,
+            tag_column_i AS tagColumn9,
+            tag_column_j AS tagColumn10,
+            tag_column_k AS tagColumn11,
+            tag_column_l AS tagColumn12,
+            tag_column_m AS tagColumn13,
+            tag_column_n AS tagColumn14,
+            tag_column_o AS tagColumn15,
+            tag_column_p AS tagColumn16,
+            tag_column_q AS tagColumn17,
+            tag_column_r AS tagColumn18,
+            tag_column_s AS tagColumn19,
+            tag_column_t AS tagColumn20,
+            tag_column_u AS tagColumn21,
+            tag_column_v AS tagColumn22,
+            tag_column_w AS tagColumn23,
+            tag_column_x AS tagColumn24,
+            tag_column_y AS tagColumn25,
+            created_time AS createdTime,
+            created_user_id AS createdUserId,
+            updated_time AS updatedTime,
+            updated_user_id AS updatedUserId,
+            delete_flag AS deleteFlag
+        FROM
+            tag_store_relation
+        WHERE
+            store_id = #{storeId}
+            AND delete_flag = 0
+        LIMIT 1
+    </select>
+
+</mapper>

+ 13 - 0
alien-store/src/main/java/shop/alien/store/controller/StoreInfoController.java

@@ -21,6 +21,7 @@ import shop.alien.mapper.*;
 import shop.alien.mapper.storePlantform.StoreLicenseHistoryMapper;
 import shop.alien.store.config.BaseRedisService;
 import shop.alien.store.service.StoreInfoService;
+import shop.alien.store.service.StoreQualificationService;
 
 import java.io.IOException;
 import java.util.*;
@@ -42,6 +43,8 @@ public class StoreInfoController {
 
     private final StoreInfoService storeInfoService;
 
+    private final StoreQualificationService storeQualificationService;
+
     private final TagsMainMapper tagsMainMapper;
 
     private final WebAuditMapper webAuditMapper;
@@ -1036,6 +1039,16 @@ public class StoreInfoController {
         StoreInfoVo storeDetail = storeInfoService.getClientStoreDetail(id, userId, jingdu, weidu);
         return R.data(storeDetail);
     }
+
+    @ApiOperation(value = "查询当前门店的资质信息", notes = "查询营业执照和其他资质证明图片")
+    @ApiOperationSupport(order = 18)
+    @GetMapping("/getStoreQualificationInfo")
+    @ResponseBody
+    public R<StoreQualificationInfoVo> getStoreQualificationInfo(@RequestParam("storeId") Integer storeId) {
+        log.info("StoreInfoController.getStoreQualificationInfo?storeId={}", storeId);
+        StoreQualificationInfoVo qualificationInfo = storeQualificationService.getStoreQualificationInfo(storeId);
+        return R.data(qualificationInfo);
+    }
     /**
      * 查询四种类型店铺(酒吧、ktv、洗浴汗蒸、按摩足浴)并按距离筛选
      *

+ 11 - 0
alien-store/src/main/java/shop/alien/store/controller/TagCategoryController.java

@@ -11,6 +11,7 @@ import shop.alien.entity.store.vo.TagCategoryVo;
 import shop.alien.store.service.StoreTagBusinessRelationService;
 import shop.alien.store.service.StoreTagService;
 import shop.alien.store.service.TagStoreRelationService;
+import shop.alien.store.service.StoreTagDetailService;
 
 import java.util.List;
 
@@ -31,6 +32,7 @@ public class TagCategoryController {
     private final StoreTagService tagCategoryService;
     private final StoreTagBusinessRelationService storeTagBusinessRelationService;
     private final TagStoreRelationService tagStoreRelationService;
+    private final StoreTagDetailService storeTagDetailService;
 
     @ApiOperation("创建标签")
     @ApiOperationSupport(order = 1)
@@ -139,4 +141,13 @@ public class TagCategoryController {
         TagStoreRelation tagStoreRelation = tagStoreRelationService.getTagStoreRelationByStoreId(storeId);
         return R.data(tagStoreRelation);
     }
+
+    @ApiOperation(value = "店铺标签详情接口", notes = "根据门店id查询店铺标签详情(tag_store_relation)")
+    @ApiOperationSupport(order = 11)
+    @GetMapping("/getStoreTagDetail")
+    public R<TagStoreRelation> getStoreTagDetail(@RequestParam(required = true) Integer storeId) {
+        log.info("TagCategoryController.getStoreTagDetail?storeId={}", storeId);
+        TagStoreRelation tagStoreRelation = storeTagDetailService.getStoreTagDetailByStoreId(storeId);
+        return R.data(tagStoreRelation);
+    }
 }

+ 21 - 0
alien-store/src/main/java/shop/alien/store/service/StoreQualificationService.java

@@ -0,0 +1,21 @@
+package shop.alien.store.service;
+
+import shop.alien.entity.store.vo.StoreQualificationInfoVo;
+
+/**
+ * 门店资质信息服务接口
+ *
+ * @author system
+ * @since 2025-01-01
+ */
+public interface StoreQualificationService {
+    
+    /**
+     * 根据门店id查询资质信息
+     * 包括:营业执照、食品经营许可证、娱乐经营许可证
+     *
+     * @param storeId 门店id
+     * @return 门店资质信息
+     */
+    StoreQualificationInfoVo getStoreQualificationInfo(Integer storeId);
+}

+ 20 - 0
alien-store/src/main/java/shop/alien/store/service/StoreTagDetailService.java

@@ -0,0 +1,20 @@
+package shop.alien.store.service;
+
+import shop.alien.entity.store.TagStoreRelation;
+
+/**
+ * 店铺标签详情服务接口
+ *
+ * @author system
+ * @since 2025-01-01
+ */
+public interface StoreTagDetailService {
+    
+    /**
+     * 根据门店id查询店铺标签详情
+     *
+     * @param storeId 门店id
+     * @return 店铺标签详情
+     */
+    TagStoreRelation getStoreTagDetailByStoreId(Integer storeId);
+}

+ 51 - 0
alien-store/src/main/java/shop/alien/store/service/impl/StoreQualificationServiceImpl.java

@@ -0,0 +1,51 @@
+package shop.alien.store.service.impl;
+
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import shop.alien.entity.store.StoreImg;
+import shop.alien.entity.store.vo.StoreQualificationInfoVo;
+import shop.alien.mapper.StoreQualificationMapper;
+import shop.alien.store.service.StoreQualificationService;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 门店资质信息服务实现类
+ *
+ * @author system
+ * @since 2025-01-01
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class StoreQualificationServiceImpl implements StoreQualificationService {
+    
+    private final StoreQualificationMapper storeQualificationMapper;
+    
+    @Override
+    public StoreQualificationInfoVo getStoreQualificationInfo(Integer storeId) {
+        log.info("StoreQualificationServiceImpl.getStoreQualificationInfo?storeId={}", storeId);
+        if (storeId == null) {
+            log.warn("门店ID为空");
+            return new StoreQualificationInfoVo();
+        }
+        
+        StoreQualificationInfoVo result = new StoreQualificationInfoVo();
+        
+        // 查询营业执照(img_type = 14)
+        List<StoreImg> businessLicenseList = storeQualificationMapper.selectStoreImgsByType(storeId, 14);
+        result.setBusinessLicenseList(businessLicenseList != null ? businessLicenseList : new ArrayList<>());
+        
+        // 查询其他资质证明图片(img_type = 35)
+        List<StoreImg> otherQualificationList = storeQualificationMapper.selectStoreImgsByType(storeId, 35);
+        result.setOtherQualificationList(otherQualificationList != null ? otherQualificationList : new ArrayList<>());
+        
+        log.info("查询门店资质信息完成 - 营业执照: {}条, 其他资质证明图片: {}条", 
+                result.getBusinessLicenseList().size(), 
+                result.getOtherQualificationList().size());
+        
+        return result;
+    }
+}

+ 34 - 0
alien-store/src/main/java/shop/alien/store/service/impl/StoreTagDetailServiceImpl.java

@@ -0,0 +1,34 @@
+package shop.alien.store.service.impl;
+
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import shop.alien.entity.store.TagStoreRelation;
+import shop.alien.mapper.StoreTagDetailMapper;
+import shop.alien.store.service.StoreTagDetailService;
+
+/**
+ * 店铺标签详情服务实现类
+ *
+ * @author system
+ * @since 2025-01-01
+ */
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class StoreTagDetailServiceImpl implements StoreTagDetailService {
+    
+    private final StoreTagDetailMapper storeTagDetailMapper;
+    
+    @Override
+    public TagStoreRelation getStoreTagDetailByStoreId(Integer storeId) {
+        log.info("StoreTagDetailServiceImpl.getStoreTagDetailByStoreId?storeId={}", storeId);
+        if (storeId == null) {
+            log.warn("店铺ID为空");
+            return null;
+        }
+        TagStoreRelation tagStoreRelation = storeTagDetailMapper.selectStoreTagDetailByStoreId(storeId);
+        log.info("查询店铺标签详情结果: {}", tagStoreRelation != null ? "查询成功" : "未找到数据");
+        return tagStoreRelation;
+    }
+}