Browse Source

店铺模块

zhangyu 1 tuần trước cách đây
mục cha
commit
4e5242ea78

+ 2 - 0
src/main/java/com/futu/goose/course/service/impl/CourseServiceImpl.java

@@ -6,6 +6,7 @@ import com.futu.goose.course.service.CourseService;
 import com.futu.goose.course.mapper.CourseMapper;
 import com.futu.goose.utils.EsSyncUtils;
 import com.futu.goose.utils.Result;
+import org.apache.lucene.analysis.snowball.SnowballFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -25,6 +26,7 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course>
     private EsSyncUtils esSyncUtils;
     @Override
     public List<Course> listcourse() {
+
         esSyncUtils.syncDataToEs(courseMapper,"course");
        return courseMapper.selectList(null);
     }

+ 0 - 40
src/main/java/com/futu/goose/dto/CourseCreationDTO.java

@@ -1,40 +0,0 @@
-package com.futu.goose.dto;
-
-import com.futu.goose.course.pojo.Course;
-import lombok.Data;
-
-import java.util.Date;
-@Data
-public class CourseCreationDTO {
-//    课程表
-    /**
-     * 课程名称
-     */
-    private String courseName;
-
-    /**
-     * 课程简介
-     */
-    private String courseIntroduction;
-
-    /**
-     * 课程总时长(分钟)
-     */
-    private Integer courseDuration;
-
-    /**
-     * 课程难度级别(如 1 - 初级,2 - 中级,3 - 高级)
-     */
-    private Integer courseLevel;
-
-    /**
-     * 课程创建时间
-     */
-    private Date createTime;
-
-    /**
-     * 课程更新时间
-     */
-    private Date updateTime;
-
-}

+ 42 - 0
src/main/java/com/futu/goose/store/controller/ShopController.java

@@ -0,0 +1,42 @@
+package com.futu.goose.store.controller;
+
+import com.futu.goose.store.pojo.Shop;
+import com.futu.goose.store.service.ShopService;
+import com.futu.goose.utils.RedisClient;
+import com.futu.goose.utils.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/shop")
+public class ShopController {
+    @Autowired
+    private ShopService shopService;
+    @Autowired
+    private RedisClient redisClient;
+
+    /**
+     * 商铺列表
+     * @param shopName
+     * @return
+     */
+    @RequestMapping("fontShopbyshopName")
+    public Result fontShopbyshopName(@RequestParam("shopName") String shopName){
+     return shopService.fontShopbyshopName(shopName);
+    }
+
+    /**
+     * 创建新商铺
+     * @param shop
+     * @return
+     */
+    @RequestMapping("addshop")
+    public Result addshop(@RequestBody Shop shop){
+        shop.setUserId((Long) redisClient.get("uid"));
+        shopService.addshop(shop);
+    return new Result(true,"添加成功");
+    }
+}

+ 20 - 0
src/main/java/com/futu/goose/store/mapper/ShopMapper.java

@@ -0,0 +1,20 @@
+package com.futu.goose.store.mapper;
+
+import com.futu.goose.store.pojo.Shop;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @author 张大宇
+* @description 针对表【shop(售课系统店铺表)】的数据库操作Mapper
+* @createDate 2025-05-12 10:25:17
+* @Entity com.futu.goose.store.pojo.Shop
+*/
+@Mapper
+public interface ShopMapper extends BaseMapper<Shop> {
+
+}
+
+
+
+

+ 254 - 0
src/main/java/com/futu/goose/store/pojo/Shop.java

@@ -0,0 +1,254 @@
+package com.futu.goose.store.pojo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 售课系统店铺表
+ * @TableName shop
+ */
+@TableName(value ="shop")
+@Data
+public class Shop implements Serializable {
+    /**
+     * 店铺ID,主键
+     */
+    @TableId(type = IdType.AUTO)
+    private Long shopId;
+
+    /**
+     * 店铺名称
+     */
+    private String shopName;
+
+    /**
+     * 店铺logo URL
+     */
+    private String shopLogo;
+
+    /**
+     * 店铺描述
+     */
+    private String shopDesc;
+
+    /**
+     * 店主用户ID
+     */
+    private Long userId;
+
+    /**
+     * 店铺分类ID
+     */
+    private Integer categoryId;
+
+    /**
+     * 状态:0-禁用,1-正常,2-审核中,3-审核失败
+     */
+    private Integer status;
+
+    /**
+     * 联系电话
+     */
+    private String contactPhone;
+
+    /**
+     * 联系邮箱
+     */
+    private String contactEmail;
+
+    /**
+     * 省份
+     */
+    private String province;
+
+    /**
+     * 城市
+     */
+    private String city;
+
+    /**
+     * 区县
+     */
+    private String district;
+
+    /**
+     * 详细地址
+     */
+    private String address;
+
+    /**
+     * 经度
+     */
+    private BigDecimal longitude;
+
+    /**
+     * 纬度
+     */
+    private BigDecimal latitude;
+
+    /**
+     * 店铺横幅图片,JSON格式存储多个URL
+     */
+    private String bannerImages;
+
+    /**
+     * 社交媒体链接,JSON格式存储
+     */
+    private String socialMedia;
+
+    /**
+     * 营业时间
+     */
+    private String openingHours;
+
+    /**
+     * SEO标题
+     */
+    private String seoTitle;
+
+    /**
+     * SEO关键词
+     */
+    private String seoKeywords;
+
+
+    /**
+     * SEO描述
+     */
+    private String seoDescription;
+
+    /**7
+     * 店铺评分,0-5分
+     */
+    private BigDecimal rating;
+
+    /**
+     * 总销量
+     */
+    private Integer salesCount;
+
+    /**
+     * 课程数量
+     */
+    private Integer courseCount;
+
+    /**
+     * 关注人数
+     */
+    private Integer followerCount;
+
+    /**
+     * 浏览人数
+     */
+    private Integer viewCount;
+
+    /**
+     * 创建时间
+     */
+    private Date createdAt;
+
+    /**
+     * 更新时间
+     */
+    private Date updatedAt;
+
+    /**
+     * 删除时间,软删除标志
+     */
+    private Date deletedAt;
+
+    /**
+     * 店铺网站URL
+     */
+    private String shopWebsite;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        Shop other = (Shop) that;
+        return (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
+                && (this.getShopName() == null ? other.getShopName() == null : this.getShopName().equals(other.getShopName()))
+                && (this.getShopLogo() == null ? other.getShopLogo() == null : this.getShopLogo().equals(other.getShopLogo()))
+                && (this.getShopDesc() == null ? other.getShopDesc() == null : this.getShopDesc().equals(other.getShopDesc()))
+                && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
+                && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId()))
+                && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+                && (this.getContactPhone() == null ? other.getContactPhone() == null : this.getContactPhone().equals(other.getContactPhone()))
+                && (this.getContactEmail() == null ? other.getContactEmail() == null : this.getContactEmail().equals(other.getContactEmail()))
+                && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
+                && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
+                && (this.getDistrict() == null ? other.getDistrict() == null : this.getDistrict().equals(other.getDistrict()))
+                && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
+                && (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
+                && (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()))
+                && (this.getBannerImages() == null ? other.getBannerImages() == null : this.getBannerImages().equals(other.getBannerImages()))
+                && (this.getSocialMedia() == null ? other.getSocialMedia() == null : this.getSocialMedia().equals(other.getSocialMedia()))
+                && (this.getOpeningHours() == null ? other.getOpeningHours() == null : this.getOpeningHours().equals(other.getOpeningHours()))
+                && (this.getSeoTitle() == null ? other.getSeoTitle() == null : this.getSeoTitle().equals(other.getSeoTitle()))
+                && (this.getSeoKeywords() == null ? other.getSeoKeywords() == null : this.getSeoKeywords().equals(other.getSeoKeywords()))
+                && (this.getSeoDescription() == null ? other.getSeoDescription() == null : this.getSeoDescription().equals(other.getSeoDescription()))
+                && (this.getRating() == null ? other.getRating() == null : this.getRating().equals(other.getRating()))
+                && (this.getSalesCount() == null ? other.getSalesCount() == null : this.getSalesCount().equals(other.getSalesCount()))
+                && (this.getCourseCount() == null ? other.getCourseCount() == null : this.getCourseCount().equals(other.getCourseCount()))
+                && (this.getFollowerCount() == null ? other.getFollowerCount() == null : this.getFollowerCount().equals(other.getFollowerCount()))
+                && (this.getViewCount() == null ? other.getViewCount() == null : this.getViewCount().equals(other.getViewCount()))
+                && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
+                && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()))
+                && (this.getDeletedAt() == null ? other.getDeletedAt() == null : this.getDeletedAt().equals(other.getDeletedAt()))
+                && (this.getShopWebsite() == null ? other.getShopWebsite() == null : this.getShopWebsite().equals(other.getShopWebsite()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
+        result = prime * result + ((getShopName() == null) ? 0 : getShopName().hashCode());
+        result = prime * result + ((getShopLogo() == null) ? 0 : getShopLogo().hashCode());
+        result = prime * result + ((getShopDesc() == null) ? 0 : getShopDesc().hashCode());
+        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
+        result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode());
+        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+        result = prime * result + ((getContactPhone() == null) ? 0 : getContactPhone().hashCode());
+        result = prime * result + ((getContactEmail() == null) ? 0 : getContactEmail().hashCode());
+        result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode());
+        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
+        result = prime * result + ((getDistrict() == null) ? 0 : getDistrict().hashCode());
+        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
+        result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
+        result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
+        result = prime * result + ((getBannerImages() == null) ? 0 : getBannerImages().hashCode());
+        result = prime * result + ((getSocialMedia() == null) ? 0 : getSocialMedia().hashCode());
+        result = prime * result + ((getOpeningHours() == null) ? 0 : getOpeningHours().hashCode());
+        result = prime * result + ((getSeoTitle() == null) ? 0 : getSeoTitle().hashCode());
+        result = prime * result + ((getSeoKeywords() == null) ? 0 : getSeoKeywords().hashCode());
+        result = prime * result + ((getSeoDescription() == null) ? 0 : getSeoDescription().hashCode());
+        result = prime * result + ((getRating() == null) ? 0 : getRating().hashCode());
+        result = prime * result + ((getSalesCount() == null) ? 0 : getSalesCount().hashCode());
+        result = prime * result + ((getCourseCount() == null) ? 0 : getCourseCount().hashCode());
+        result = prime * result + ((getFollowerCount() == null) ? 0 : getFollowerCount().hashCode());
+        result = prime * result + ((getViewCount() == null) ? 0 : getViewCount().hashCode());
+        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
+        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
+        result = prime * result + ((getDeletedAt() == null) ? 0 : getDeletedAt().hashCode());
+        result = prime * result + ((getShopWebsite() == null) ? 0 : getShopWebsite().hashCode());
+        return result;
+    }
+}

+ 17 - 0
src/main/java/com/futu/goose/store/service/ShopService.java

@@ -0,0 +1,17 @@
+package com.futu.goose.store.service;
+
+import com.futu.goose.store.pojo.Shop;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.futu.goose.utils.Result;
+
+/**
+* @author 张大宇
+* @description 针对表【shop(售课系统店铺表)】的数据库操作Service
+* @createDate 2025-05-12 10:25:17
+*/
+public interface ShopService extends IService<Shop> {
+
+    Result fontShopbyshopName(String shopName);
+
+    void addshop(Shop shop);
+}

+ 48 - 0
src/main/java/com/futu/goose/store/service/impl/ShopServiceImpl.java

@@ -0,0 +1,48 @@
+package com.futu.goose.store.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.futu.goose.store.pojo.Shop;
+import com.futu.goose.store.service.ShopService;
+import com.futu.goose.store.mapper.ShopMapper;
+import com.futu.goose.utils.Result;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+* @author 张大宇
+* @description 针对表【shop(售课系统店铺表)】的数据库操作Service实现
+* @createDate 2025-05-12 10:25:17
+*/
+@Service
+public class ShopServiceImpl extends ServiceImpl<ShopMapper, Shop>
+    implements ShopService{
+    @Autowired
+    private ShopMapper shopMapper;
+    @Override
+    public Result fontShopbyshopName(String shopName) {
+        QueryWrapper<Shop> wrapper = new QueryWrapper<>();
+        if (shopName==null){
+            List<Shop> shops = shopMapper.selectList(null);
+            return new Result(true,"查询成功",shops);
+        }
+        List<Shop> shops = shopMapper.selectList(wrapper.lambda().like(Shop::getShopName, shopName));
+        return new Result(true,"查询成功",shops);
+    }
+
+    @Override
+    public void addshop(Shop shop) {
+        try {
+            shopMapper.insert(shop);
+        }catch (Exception e){
+            e.printStackTrace();
+            throw new RuntimeException("添加失败");
+        }
+    }
+}
+
+
+
+

+ 3 - 3
src/main/java/com/futu/goose/user/controller/MinioController.java

@@ -14,10 +14,10 @@ public class MinioController {
     @Autowired
     private MinioUtils minioUtils;
     @RequestMapping("upload")
-    public Result upload(@RequestParam("file") MultipartFile file, @RequestParam("objectName") String objectName){
+    public Result upload(@RequestParam("file") MultipartFile file){
         try {
-            minioUtils.uploadImage(file);
-            return new Result(true,"上传成功");
+            String s = minioUtils.uploadImage(file);
+            return new Result(true,"上传成功",s);
         }catch (Exception e){
             e.printStackTrace();
             return new Result(false,"上传失败");

+ 7 - 2
src/main/java/com/futu/goose/user/service/impl/TUserServiceImpl.java

@@ -81,10 +81,12 @@ public class TUserServiceImpl extends ServiceImpl<TUserMapper, TUser>
 
         // 密码加密
         user.setPassword(DigestUtils.md5DigestAsHex((user.getPassword() + salt).getBytes(StandardCharsets.UTF_8)));
-
+        //雪花算法
+        user.setId(SnowflakeIdGenerator.getSnowId());
         // 插入用户数据
         userMapper.insert(user);
-
+        redisClient.set("uid",  user.getId());
+        redisClient.expire("uid", 60*60);
         return ResponseResult.okResult(200, "注册成功");
     }
 
@@ -117,7 +119,10 @@ public class TUserServiceImpl extends ServiceImpl<TUserMapper, TUser>
         TUser user1 = userMapper.selectOne(queryWrapper);
         if (user1 == null) {
             user.setUsername("");
+            user.setId(SnowflakeIdGenerator.getSnowId());
             userMapper.insert(user);
+            redisClient.set("uid",  user.getId());
+            redisClient.expire("uid", 60*60);
             Long id = user.getId();
             String token = AppJwtUtil.getToken(id);
             HashMap<String, String> map = new HashMap<>();

+ 136 - 0
src/main/java/com/futu/goose/utils/SnowflakeIdGenerator.java

@@ -0,0 +1,136 @@
+package com.futu.goose.utils;
+
+import java.time.LocalDateTime;
+import java.time.ZoneOffset;
+
+public class SnowflakeIdGenerator {
+    // 基础配置(Java 8+)
+    private static final long EPOCH = 1288834974657L; // 2010-11-04 00:00:00 UTC
+    private static final int DATACENTER_ID_BITS = 5;
+    private static final int WORKER_ID_BITS = 5;
+    private static final int SEQUENCE_BITS = 12;
+    // 位运算掩码
+    private static final long DATACENTER_ID_MASK = (1L << DATACENTER_ID_BITS) - 1;
+    private static final long WORKER_ID_MASK = (1L << WORKER_ID_BITS) - 1;
+    private static final long SEQUENCE_MASK = (1L << SEQUENCE_BITS) - 1;
+
+    // 位移偏移量
+    private static final int WORKER_ID_SHIFT = SEQUENCE_BITS;
+    private static final int DATACENTER_ID_SHIFT = SEQUENCE_BITS + WORKER_ID_BITS;
+    private static final int TIMESTAMP_SHIFT = SEQUENCE_BITS + WORKER_ID_BITS + DATACENTER_ID_BITS;
+
+    private final long datacenterId;
+    private final long workerId;
+    private long sequence = 0L;
+    private long lastTimestamp = -1L;
+
+    private final Object lock = new Object();
+
+    public SnowflakeIdGenerator(long datacenterId, long workerId) {
+        if ((datacenterId & DATACENTER_ID_MASK) != datacenterId) {
+            throw new IllegalArgumentException("DataCenter ID 必须在 0-31 之间");
+        }
+        if ((workerId & WORKER_ID_MASK) != workerId) {
+            throw new IllegalArgumentException("Worker ID 必须在 0-31 之间");
+        }
+        this.datacenterId = datacenterId;
+        this.workerId = workerId;
+    }
+
+    public synchronized long nextId() {
+        long currentTimestamp = timeGen();
+
+        if (currentTimestamp < lastTimestamp) {
+            throw new IllegalStateException(
+                    String.format("时钟回退 %d 毫秒,禁止生成ID(上次: %d,当前: %d)",
+                            lastTimestamp - currentTimestamp, lastTimestamp, currentTimestamp));
+        }
+
+        if (currentTimestamp == lastTimestamp) {
+            sequence = (sequence + 1) & SEQUENCE_MASK;
+            if (sequence == 0) {
+                currentTimestamp = waitNextMillis(lastTimestamp);
+            }
+        } else {
+            sequence = 0;
+        }
+
+        lastTimestamp = currentTimestamp;
+
+        return ((currentTimestamp - EPOCH) << TIMESTAMP_SHIFT) |
+                (datacenterId << DATACENTER_ID_SHIFT) |
+                (workerId << WORKER_ID_SHIFT) |
+                sequence;
+    }
+
+    private long waitNextMillis(long lastTimestamp) {
+        long timestamp = timeGen();
+        while (timestamp <= lastTimestamp) {
+            timestamp = System.currentTimeMillis(); // 改用更可靠的时间源
+        }
+        return timestamp;
+    }
+
+    private long timeGen() {
+        return System.currentTimeMillis();
+    }
+
+    // 添加 parseId 方法
+    public static SnowflakeMeta parseId(long snowflakeId) {
+        long sequence = snowflakeId & SEQUENCE_MASK;
+        long workerId = (snowflakeId >> WORKER_ID_SHIFT) & WORKER_ID_MASK;
+        long datacenterId = (snowflakeId >> DATACENTER_ID_SHIFT) & DATACENTER_ID_MASK;
+        long timestamp = (snowflakeId >> TIMESTAMP_SHIFT) + EPOCH;
+
+        return new SnowflakeMeta(
+                timestamp,
+                datacenterId,
+                workerId,
+                sequence,
+                LocalDateTime.ofEpochSecond(timestamp / 1000, 0, ZoneOffset.ofHours(8))
+        );
+    }
+    public static Long getSnowId(){
+        SnowflakeIdGenerator generator=new SnowflakeIdGenerator(1,1);
+        Long id=generator.nextId();
+        SnowflakeMeta meta=SnowflakeIdGenerator.parseId(id);
+        return id;
+    }
+    // ---------------- 修复:添加完整的getter方法 ----------------
+    public static class SnowflakeMeta {
+        private final long timestamp;
+        private final long datacenterId;
+        private final long workerId;
+        private final long sequence;
+        private final LocalDateTime dateTime;
+
+        public SnowflakeMeta(long timestamp, long datacenterId, long workerId, long sequence, LocalDateTime dateTime) {
+            this.timestamp = timestamp;
+            this.datacenterId = datacenterId;
+            this.workerId = workerId;
+            this.sequence = sequence;
+            this.dateTime = dateTime;
+        }
+
+        // 显式定义getter(修复爆红)
+        public long getTimestamp() {
+            return timestamp;
+        }
+
+        public long getDatacenterId() {
+            return datacenterId;
+        }
+
+        public long getWorkerId() {
+            return workerId;
+        }
+
+        public long getSequence() {
+            return sequence;
+        }
+
+        public LocalDateTime getDateTime() {
+            return dateTime;
+        }
+    }
+}

+ 51 - 0
src/main/resources/mapper/ShopMapper.xml

@@ -0,0 +1,51 @@
+<?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="com.futu.goose.store.mapper.ShopMapper">
+
+    <resultMap id="BaseResultMap" type="com.futu.goose.store.pojo.Shop">
+            <id property="shopId" column="shop_id" jdbcType="BIGINT"/>
+            <result property="shopName" column="shop_name" jdbcType="VARCHAR"/>
+            <result property="shopLogo" column="shop_logo" jdbcType="VARCHAR"/>
+            <result property="shopDesc" column="shop_desc" jdbcType="VARCHAR"/>
+            <result property="userId" column="user_id" jdbcType="BIGINT"/>
+            <result property="categoryId" column="category_id" jdbcType="INTEGER"/>
+            <result property="status" column="status" jdbcType="TINYINT"/>
+            <result property="contactPhone" column="contact_phone" jdbcType="VARCHAR"/>
+            <result property="contactEmail" column="contact_email" jdbcType="VARCHAR"/>
+            <result property="province" column="province" jdbcType="VARCHAR"/>
+            <result property="city" column="city" jdbcType="VARCHAR"/>
+            <result property="district" column="district" jdbcType="VARCHAR"/>
+            <result property="address" column="address" jdbcType="VARCHAR"/>
+            <result property="longitude" column="longitude" jdbcType="DECIMAL"/>
+            <result property="latitude" column="latitude" jdbcType="DECIMAL"/>
+            <result property="bannerImages" column="banner_images" jdbcType="VARCHAR"/>
+            <result property="socialMedia" column="social_media" jdbcType="VARCHAR"/>
+            <result property="openingHours" column="opening_hours" jdbcType="VARCHAR"/>
+            <result property="seoTitle" column="seo_title" jdbcType="VARCHAR"/>
+            <result property="seoKeywords" column="seo_keywords" jdbcType="VARCHAR"/>
+            <result property="seoDescription" column="seo_description" jdbcType="VARCHAR"/>
+            <result property="rating" column="rating" jdbcType="DECIMAL"/>
+            <result property="salesCount" column="sales_count" jdbcType="INTEGER"/>
+            <result property="courseCount" column="course_count" jdbcType="INTEGER"/>
+            <result property="followerCount" column="follower_count" jdbcType="INTEGER"/>
+            <result property="viewCount" column="view_count" jdbcType="INTEGER"/>
+            <result property="createdAt" column="created_at" jdbcType="TIMESTAMP"/>
+            <result property="updatedAt" column="updated_at" jdbcType="TIMESTAMP"/>
+            <result property="deletedAt" column="deleted_at" jdbcType="TIMESTAMP"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        shop_id,shop_name,shop_logo,
+        shop_desc,user_id,category_id,
+        status,contact_phone,contact_email,
+        province,city,district,
+        address,longitude,latitude,
+        banner_images,social_media,opening_hours,
+        seo_title,seo_keywords,seo_description,
+        rating,sales_count,course_count,
+        follower_count,view_count,created_at,
+        updated_at,deleted_at
+    </sql>
+</mapper>