lisy
2023-06-16 28b988ca5dc4b51de34c6ebf996579723b2db414
other模块——门店实体的添加;account模块——查询附近门店接口
12个文件已修改
13个文件已添加
637 ■■■■■ 已修改文件
cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/enums/WeeksEnum.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/feignclient/course/CoursePaymentClient.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/feignclient/course/model/CourseOfStoreVo.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/model/vo/classDetails/WeekedCourse.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/util/LocalDateTimeUtils.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackagePaymentController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-course/src/main/java/com/dsh/course/feignclient/CoursePaymentClient.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-course/src/main/java/com/dsh/course/feignclient/model/CourseOfStoreVo.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-course/src/main/java/com/dsh/course/mapper/TCoursePackageMapper.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-course/src/main/java/com/dsh/course/service/TCoursePackageService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-course/src/main/java/com/dsh/course/util/LocalDateTimeUtils.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-course/src/main/resources/mapper/TCoursePackageMapper.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/entity/Store.java 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/entity/StoreConfig.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/mapper/StoreConfigMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/mapper/StoreMapper.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/service/StoreConfigService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/service/StoreService.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/service/impl/StoreConfigServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/service/impl/StoreServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/resources/mapper/StoreConfigMapper.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/resources/mapper/StoreMapper.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java
@@ -2,18 +2,20 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dsh.account.model.vo.classDetails.classInsVo.StuDetailsReq;
import com.dsh.account.util.DateUtil;
import com.dsh.account.entity.TStudent;
import com.dsh.account.model.vo.classDetails.classInsVo.ClassInfoVo;
import com.dsh.account.model.vo.classDetails.classInsVo.StuDetailsReq;
import com.dsh.account.model.vo.classDetails.classInsVo.StuListVo;
import com.dsh.account.model.vo.classDetails.classInsVo.StuPhysicalVo;
import com.dsh.account.service.TAppUserService;
import com.dsh.account.service.TStudentService;
import com.dsh.account.util.DateUtil;
import com.dsh.account.util.ResultUtil;
import com.dsh.account.util.TokenUtil;
import com.dsh.account.util.ToolUtil;
import io.swagger.annotations.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -21,10 +23,8 @@
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -157,7 +157,7 @@
     */
    @ResponseBody
    @PostMapping("/stu/lessonDetails")
    @ApiOperation(value = "该APP用户下的学员列表", tags = {"APP-开始上课-学员列表"}, notes = "")
    @ApiOperation(value = "课时详情", tags = {"APP-开始上课-课时详情"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
cloud-server-account/src/main/java/com/dsh/account/enums/WeeksEnum.java
New file
@@ -0,0 +1,35 @@
package com.dsh.account.enums;
import java.util.Objects;
public enum WeeksEnum {
    Mon(1,"M"),
    Tues(2,"T"),
    Wed(3,"W"),
    Thurs(4,"T"),
    Fri(5,"F"),
    Sat(6,"S"),
    Sun(7,"S"),
    ;
    Integer ins;
    String msg;
    WeeksEnum(Integer ins, String msg) {
        this.ins = ins;
        this.msg = msg;
    }
    public static String getStr(Integer wks){
        WeeksEnum[] values = WeeksEnum.values();
        for (WeeksEnum value : values) {
            if (Objects.equals(wks, value.ins)){
                return value.msg;
            }
        }
        return null;
    }
}
cloud-server-account/src/main/java/com/dsh/account/feignclient/course/CoursePaymentClient.java
@@ -1,5 +1,6 @@
package com.dsh.account.feignclient.course;
import com.dsh.account.feignclient.course.model.CourseOfStoreVo;
import com.dsh.account.feignclient.course.model.StuCourseResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
@@ -12,4 +13,8 @@
    @PostMapping("/coursePack/queryPayment")
    List<StuCourseResp> getStuCoursePayment();
    @PostMapping("/coursePack/storeOfCourse")
    List<CourseOfStoreVo> getStoreOfCourses();
}
cloud-server-account/src/main/java/com/dsh/account/feignclient/course/model/CourseOfStoreVo.java
New file
@@ -0,0 +1,43 @@
package com.dsh.account.feignclient.course.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class CourseOfStoreVo {
    @ApiModelProperty(value = "课包id")
    private Integer courseId;
    @ApiModelProperty(value = "课包名称")
    private String courseName;
    @ApiModelProperty(value = "课包开始时间")
    private String classStartTime;
    @ApiModelProperty(value = "课包结束时间")
    private String classEndTime;
    @ApiModelProperty(value = "课包 周列表 分号隔开")
    private String classWeeks;
    @ApiModelProperty(value = "门店id")
    private Integer storeId;
    @ApiModelProperty(value = "门店名称")
    private String storeName;
    @ApiModelProperty(value = "经度")
    private String lat;
    @ApiModelProperty(value = "纬度")
    private String lon;
    public CourseOfStoreVo(Integer courseId, String courseName, Integer storeId, String storeName) {
        this.courseId = courseId;
        this.courseName = courseName;
        this.storeId = storeId;
        this.storeName = storeName;
    }
}
cloud-server-account/src/main/java/com/dsh/account/model/vo/classDetails/WeekedCourse.java
@@ -8,12 +8,15 @@
@Data
public class WeekedCourse {
    @ApiModelProperty(value = "是否为当天")
    @ApiModelProperty(value = "是否为当天 1 是 2 否")
    private Integer isToday;
    @ApiModelProperty(value = "星期缩写")
    private String weekStr;
    @ApiModelProperty(value = "星期数值")
    private Integer weekNum;
    @ApiModelProperty(value = "日期")
    private String dayStr;
cloud-server-account/src/main/java/com/dsh/account/service/impl/TAppUserServiceImpl.java
@@ -3,21 +3,24 @@
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsh.account.entity.TAppUser;
import com.dsh.account.entity.TStudent;
import com.dsh.account.enums.WeeksEnum;
import com.dsh.account.feignclient.course.CoursePaymentClient;
import com.dsh.account.feignclient.course.model.CourseOfStoreVo;
import com.dsh.account.feignclient.course.model.StuCourseResp;
import com.dsh.account.mapper.TStudentMapper;
import com.dsh.account.feignclient.other.ImgConfigClient;
import com.dsh.account.feignclient.other.model.TImgConfig;
import com.dsh.account.mapper.TAppUserMapper;
import com.dsh.account.mapper.TStudentMapper;
import com.dsh.account.model.AddAppUserVo;
import com.dsh.account.model.LoginSMSCodeVo;
import com.dsh.account.model.LoginWeChatVo;
import com.dsh.account.model.vo.classDetails.CourseVenue;
import com.dsh.account.model.vo.classDetails.RegisteredCourse;
import com.dsh.account.service.TAppUserService;
import com.dsh.account.entity.TAppUser;
import com.dsh.account.entity.TStudent;
import com.dsh.account.mapper.TAppUserMapper;
import com.dsh.account.model.vo.classDetails.WeekedCourse;
import com.dsh.account.model.vo.classDetails.classInsVo.ClassInfoVo;
import com.dsh.account.service.TAppUserService;
import com.dsh.account.util.*;
import com.dsh.account.util.akeylogin.Md5Util;
import org.springframework.beans.factory.annotation.Autowired;
@@ -25,8 +28,10 @@
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
 * <p>
@@ -58,12 +63,12 @@
    @Autowired
    private JwtTokenUtil jwtTokenUtil;
    @Resource
    private CoursePaymentClient paymentClient;
    @Override
    public ClassInfoVo queryUserOfStus(Integer id,String longitude,String latitude) {
        TAppUser tAppUser = this.baseMapper.selectById(id);
@@ -109,7 +114,25 @@
                classInfoVo.setDeductedNums(deduct);
                classInfoVo.setRemainingNums(remain);
                List<CourseOfStoreVo> storeOfCourses = paymentClient.getStoreOfCourses();
                List<WeekedCourse> courses = new ArrayList<>();
                if (storeOfCourses.size() > 0){
                    Map<Integer, List<CourseOfStoreVo>> map = storeOfCourses.stream().collect(Collectors.groupingBy(CourseOfStoreVo::getStoreId));
                    for (Map.Entry<Integer, List<CourseOfStoreVo>> integerListEntry : map.entrySet()) {
                        WeekedCourse weekedCourse = new WeekedCourse();
                        Integer key = integerListEntry.getKey();
                        System.out.println(key);
                        List<CourseOfStoreVo> value = integerListEntry.getValue();
                        System.out.println(value);
                    }
                }
//                classInfoVo.setWeekCourseList();
            }else {
                classInfoVo.setIsThere(2);
@@ -122,6 +145,51 @@
        return null;
    }
    /**
     * 处理数据
     * @param storeOfCourses
     * @return
     */
    public List<WeekedCourse> dealDatas(List<CourseOfStoreVo> storeOfCourses){
        List<WeekedCourse> weekedCourses = new ArrayList<>();
        int weekStr = LocalDateTimeUtils.getWeekStr();
        for (int i = 1; i < 8; i++) {
            if (weekStr == i){
                for (CourseOfStoreVo storeOfCours : storeOfCourses) {
                    String[] split = storeOfCours.getClassWeeks().split(";");
                    List<String> list = Arrays.asList(split);
                    if (list.contains(weekStr)){
                        WeekedCourse weekedCourse = new WeekedCourse();
                        weekedCourse.setIsToday(1);
                        weekedCourse.setWeekNum(weekStr);
                        weekedCourse.setWeekStr(WeeksEnum.getStr(weekStr));
                        String weekOfDays = LocalDateTimeUtils.getWeekOfDays(weekStr);
                        weekedCourse.setDayStr(weekOfDays);
                        List<CourseVenue> courseVenues = new ArrayList<>();
//                        courseVenues.add();
                        weekedCourse.setDetails(courseVenues);
                    }
                }
            }else {
                for (CourseOfStoreVo storeOfCours : storeOfCourses) {
                    String[] split = storeOfCours.getClassWeeks().split(";");
                    List<String> list = Arrays.asList(split);
                    if (list.contains(i)){
                        WeekedCourse weekedCourse = new WeekedCourse();
                        weekedCourse.setIsToday(1);
                        weekedCourse.setWeekNum(weekStr);
                        weekedCourse.setWeekStr(WeeksEnum.getStr(weekStr));
                        String weekOfDays = LocalDateTimeUtils.getWeekOfDays(weekStr);
                        weekedCourse.setDayStr(weekOfDays);
                    }
                }
            }
        }
        return weekedCourses;
    }
    /**
cloud-server-account/src/main/java/com/dsh/account/util/LocalDateTimeUtils.java
@@ -1,9 +1,11 @@
package com.dsh.account.util;
import java.text.ParseException;
import java.time.DayOfWeek;
import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
/**
 * LocalDateTimeUtils
@@ -77,4 +79,31 @@
        Integer day=date.getDayOfMonth();
        return day < dayArr[month - 1] ? constellationArr[month - 1] : constellationArr[month];
    }
    /**
     * 获取当天的星期几
     * @return
     */
    public static int getWeekStr(){
        LocalDate today = LocalDate.now();
        DayOfWeek dayOfWeek = today.getDayOfWeek();
        return dayOfWeek.getValue();
    }
    public static String getWeekOfDays(int desiredDayOfWeek){
        // 获取当前日期
        LocalDate currentDate = LocalDate.now();
        // 获取当前周的第一天(默认以星期一为一周的开始)
        LocalDate firstDayOfWeek = currentDate.with(DayOfWeek.MONDAY);
        LocalDate desiredDate = firstDayOfWeek.plusDays(desiredDayOfWeek - 1);
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM.dd");
        return desiredDate.format(formatter);
    }
//
//    public static void main(String[] args) {
//        String weekOfDays = LocalDateTimeUtils.getWeekOfDays(4);
//        System.out.println(weekOfDays);
//    }
}
cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackagePaymentController.java
@@ -3,6 +3,7 @@
import com.dsh.course.entity.TCoursePackage;
import com.dsh.course.entity.TCoursePackagePayment;
import com.dsh.course.feignclient.model.CourseOfStoreVo;
import com.dsh.course.feignclient.model.StuCourseResp;
import com.dsh.course.service.TCoursePackageService;
import com.dsh.course.servs.CoursePackagePaymentRepository;
@@ -34,6 +35,8 @@
    /**
     * 获取 没有学员信息的图片配置
     * @param stuId 学员id
     * @return  课包列表
     */
    @PostMapping("/coursePack/queryPayment")
    public List<StuCourseResp> getStuCoursePackagePayment(Integer stuId){
@@ -53,4 +56,13 @@
        return resps;
    }
    /**
     *
     * 获取发布的 课包列表
     */
    @PostMapping("/coursePack/storeOfCourse")
    public List<CourseOfStoreVo> getStuCourseWithStores(){
        return tcpService.queryStoreOfCourse();
    }
}
cloud-server-course/src/main/java/com/dsh/course/feignclient/CoursePaymentClient.java
@@ -1,7 +1,8 @@
package com.dsh.course.feignclient;
import com.dsh.course.feignclient.model.StuCourseResp;
import com.dsh.course.feignclient.model.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
@@ -13,4 +14,7 @@
    @PostMapping("/coursePack/queryPayment")
    List<StuCourseResp> getStuCoursePayment();
    @PostMapping("/coursePack/storeOfCourse")
    List<CourseOfStoreVo> getStoreOfCourses();
}
cloud-server-course/src/main/java/com/dsh/course/feignclient/model/CourseOfStoreVo.java
New file
@@ -0,0 +1,37 @@
package com.dsh.course.feignclient.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class CourseOfStoreVo {
    @ApiModelProperty(value = "课包id")
    private Integer courseId;
    @ApiModelProperty(value = "课包名称")
    private String courseName;
    @ApiModelProperty(value = "课包开始时间")
    private String classStartTime;
    @ApiModelProperty(value = "课包结束时间")
    private String classEndTime;
    @ApiModelProperty(value = "课包 周列表 分号隔开")
    private String classWeeks;
    @ApiModelProperty(value = "门店id")
    private Integer storeId;
    @ApiModelProperty(value = "门店名称")
    private String storeName;
    @ApiModelProperty(value = "经度")
    private String lat;
    @ApiModelProperty(value = "纬度")
    private String lon;
}
cloud-server-course/src/main/java/com/dsh/course/mapper/TCoursePackageMapper.java
@@ -1,7 +1,10 @@
package com.dsh.course.mapper;
import com.dsh.course.entity.TCoursePackage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsh.course.entity.TCoursePackage;
import com.dsh.course.feignclient.model.CourseOfStoreVo;
import java.util.List;
/**
 * <p>
@@ -13,4 +16,6 @@
 */
public interface TCoursePackageMapper extends BaseMapper<TCoursePackage> {
    List<CourseOfStoreVo> queryStoreOfCourse();
}
cloud-server-course/src/main/java/com/dsh/course/service/TCoursePackageService.java
@@ -1,7 +1,10 @@
package com.dsh.course.service;
import com.dsh.course.entity.TCoursePackage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsh.course.entity.TCoursePackage;
import com.dsh.course.feignclient.model.CourseOfStoreVo;
import java.util.List;
/**
 * <p>
@@ -13,4 +16,6 @@
 */
public interface TCoursePackageService extends IService<TCoursePackage> {
    List<CourseOfStoreVo> queryStoreOfCourse();
}
cloud-server-course/src/main/java/com/dsh/course/service/impl/TCoursePackageServiceImpl.java
@@ -1,10 +1,13 @@
package com.dsh.course.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsh.course.entity.TCoursePackage;
import com.dsh.course.mapper.TCoursePackageMapper;
import com.dsh.course.feignclient.model.CourseOfStoreVo;
import com.dsh.course.service.TCoursePackageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * <p>
@@ -17,4 +20,8 @@
@Service
public class TCoursePackageServiceImpl extends ServiceImpl<TCoursePackageMapper, TCoursePackage> implements TCoursePackageService {
    @Override
    public List<CourseOfStoreVo> queryStoreOfCourse() {
        return this.baseMapper.queryStoreOfCourse();
    }
}
cloud-server-course/src/main/java/com/dsh/course/util/LocalDateTimeUtils.java
@@ -1,6 +1,7 @@
package com.dsh.course.util;
import java.text.ParseException;
import java.time.DayOfWeek;
import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;
@@ -77,4 +78,16 @@
        Integer day=date.getDayOfMonth();
        return day < dayArr[month - 1] ? constellationArr[month - 1] : constellationArr[month];
    }
    /**
     * 获取当天的星期几
     * @return
     */
    public static int getWeekStr(){
        LocalDate today = LocalDate.now();
        DayOfWeek dayOfWeek = today.getDayOfWeek();
        return dayOfWeek.getValue();
    }
}
cloud-server-course/src/main/resources/mapper/TCoursePackageMapper.xml
@@ -34,5 +34,22 @@
        <result column="state" property="state" />
        <result column="insertTime" property="insertTime" />
    </resultMap>
    <select id="queryStoreOfCourse" resultType="com.dsh.course.feignclient.model.CourseOfStoreVo">
        SELECT tcp.id     as courseId,
               tcp.`name` as courseName,
               tcp.classStartTime,
               tcp.classEndTime,
               tcp.classWeeks,
               ts.id      as storeId,
               ts.`name`  as storeName,
               ts.lat,
               ts.lon
        FROM playpai_course.t_course_package as tcp
                 JOIN playpai_other.t_store as ts ON tcp.storeId = ts.id
        where tcp.`status` = 1
          and tcp.auditStatus = 2
          and tcp.`state` = 1
          and ts.`state` = 1
    </select>
</mapper>
cloud-server-other/src/main/java/com/dsh/other/entity/Store.java
New file
@@ -0,0 +1,123 @@
package com.dsh.other.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.math.BigDecimal;
/**
 * <p>
 * 门店信息
 * </p>
 *
 * @author jqs
 * @since 2023-06-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_store")
public class Store extends Model<Store> {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 门店名称
     */
    private String name;
    /**
     * 门店店长id
     */
    private Integer storeStaffId;
    /**
     * 城市管理员id
     */
    private Integer cityManagerId;
    /**
     * 省
     */
    private String province;
    /**
     * 省编号
     */
    private String provinceCode;
    /**
     * 市
     */
    private String city;
    /**
     * 市编号
     */
    private String cityCode;
    /**
     * 联系电话
     */
    private String phone;
    /**
     * 详细地址
     */
    private String address;
    /**
     * 纬度
     */
    private String lat;
    /**
     * 经度
     */
    private String lon;
    /**
     * 营业开始时间
     */
    private String startTime;
    /**
     * 营业结束时间
     */
    private String endTime;
    /**
     * 封面图
     */
    private String coverDrawing;
    /**
     * 实景图
     */
    private String realPicture;
    /**
     * 门店介绍
     */
    private String introduce;
    /**
     * 福利图片
     */
    private String welfarePicture;
    /**
     * 开始上课图片
     */
    private String classPicture;
    /**
     * 评分
     */
    private BigDecimal score;
    /**
     * 状态(1=正常,2=冻结,3=删除)
     */
    private Integer state;
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
cloud-server-other/src/main/java/com/dsh/other/entity/StoreConfig.java
New file
@@ -0,0 +1,61 @@
package com.dsh.other.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
 * <p>
 * 门店基础配置
 * </p>
 *
 * @author jqs
 * @since 2023-06-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_store_config")
public class StoreConfig extends Model<StoreConfig> {
    private static final long serialVersionUID = 1L;
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 门店id
     */
    private Integer storeId;
    /**
     * 数据类型(1=报名玩湃课程,2=预约场地,3=报名赛事及活动,4=免费福利,5=线上课程积分,6=购买优惠门票,7=看视频得奖励,8=智慧球场)
     */
    private Integer type;
    /**
     * 是否开启(0=否,1=是)
     */
    private Integer isOpen;
    /**
     * 排序
     */
    private Integer sort;
    /**
     * 背景图
     */
    private String backgroundImage;
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
cloud-server-other/src/main/java/com/dsh/other/mapper/StoreConfigMapper.java
New file
@@ -0,0 +1,17 @@
package com.dsh.other.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsh.other.entity.StoreConfig;
/**
 * <p>
 * 门店基础配置 Mapper 接口
 * </p>
 *
 * @author jqs
 * @since 2023-06-14
 */
public interface StoreConfigMapper extends BaseMapper<StoreConfig> {
}
cloud-server-other/src/main/java/com/dsh/other/mapper/StoreMapper.java
New file
@@ -0,0 +1,17 @@
package com.dsh.other.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsh.other.entity.Store;
/**
 * <p>
 * 门店信息 Mapper 接口
 * </p>
 *
 * @author jqs
 * @since 2023-06-14
 */
public interface StoreMapper extends BaseMapper<Store> {
}
cloud-server-other/src/main/java/com/dsh/other/service/StoreConfigService.java
New file
@@ -0,0 +1,17 @@
package com.dsh.other.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsh.other.entity.StoreConfig;
/**
 * <p>
 * 门店基础配置 服务类
 * </p>
 *
 * @author jqs
 * @since 2023-06-14
 */
public interface StoreConfigService extends IService<StoreConfig> {
}
cloud-server-other/src/main/java/com/dsh/other/service/StoreService.java
New file
@@ -0,0 +1,17 @@
package com.dsh.other.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dsh.other.entity.Store;
/**
 * <p>
 * 门店信息 服务类
 * </p>
 *
 * @author jqs
 * @since 2023-06-14
 */
public interface StoreService extends IService<Store> {
}
cloud-server-other/src/main/java/com/dsh/other/service/impl/StoreConfigServiceImpl.java
New file
@@ -0,0 +1,21 @@
package com.dsh.other.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsh.other.entity.StoreConfig;
import com.dsh.other.mapper.StoreConfigMapper;
import com.dsh.other.service.StoreConfigService;
import org.springframework.stereotype.Service;
/**
 * <p>
 * 门店基础配置 服务实现类
 * </p>
 *
 * @author jqs
 * @since 2023-06-14
 */
@Service
public class StoreConfigServiceImpl extends ServiceImpl<StoreConfigMapper, StoreConfig> implements StoreConfigService {
}
cloud-server-other/src/main/java/com/dsh/other/service/impl/StoreServiceImpl.java
New file
@@ -0,0 +1,21 @@
package com.dsh.other.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dsh.other.entity.Store;
import com.dsh.other.mapper.StoreMapper;
import com.dsh.other.service.StoreService;
import org.springframework.stereotype.Service;
/**
 * <p>
 * 门店信息 服务实现类
 * </p>
 *
 * @author jqs
 * @since 2023-06-14
 */
@Service
public class StoreServiceImpl extends ServiceImpl<StoreMapper,Store> implements StoreService {
}
cloud-server-other/src/main/resources/mapper/StoreConfigMapper.xml
New file
@@ -0,0 +1,8 @@
<?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.dsh.other.mapper.StoreConfigMapper">
    <!-- 开启二级缓存 -->
    <cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>
</mapper>
cloud-server-other/src/main/resources/mapper/StoreMapper.xml
New file
@@ -0,0 +1,8 @@
<?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.dsh.other.mapper.StoreMapper">
    <!-- 开启二级缓存 -->
    <cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>
</mapper>