This commit is contained in:
xs 2024-11-08 19:02:58 +08:00
parent 008a7bed2d
commit 657e9578cb
31 changed files with 641 additions and 19 deletions

View File

@ -0,0 +1,32 @@
package com.xiaoshuai.c202201020323.smallcourse.controller;
import com.xiaoshuai.c202201020323.smallcourse.model.Att;
import com.xiaoshuai.c202201020323.smallcourse.service.IAttService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Controller
@RequestMapping("/api")
public class AttController {
@Autowired
public IAttService attService;
@ResponseBody
@RequestMapping("/att")
public List att(){
List<Att> list = attService.list();
return list;
}
}

View File

@ -0,0 +1,30 @@
package com.xiaoshuai.c202201020323.smallcourse.controller;
import com.xiaoshuai.c202201020323.smallcourse.service.IFindService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Controller
@RequestMapping("/api")
public class FindController {
@Autowired
public IFindService findService;
@ResponseBody
@RequestMapping("/find")
public List find(){
List<com.xiaoshuai.c202201020323.smallcourse.model.Find> list = findService.list();
return list;
}
}

View File

@ -0,0 +1,31 @@
package com.xiaoshuai.c202201020323.smallcourse.controller;
import com.xiaoshuai.c202201020323.smallcourse.model.Model;
import com.xiaoshuai.c202201020323.smallcourse.service.IModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Controller
@RequestMapping("/api")
public class ModelController {
@Autowired
public IModelService modelService;
@ResponseBody
@RequestMapping("/model")
public List model(){
List<Model> list = modelService.list();
return list;
}
}

View File

@ -0,0 +1,30 @@
package com.xiaoshuai.c202201020323.smallcourse.controller;
import com.xiaoshuai.c202201020323.smallcourse.service.IMyselfCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Controller
@RequestMapping("/api")
public class MyselfCityController {
@Autowired
public IMyselfCityService myselfCityService;
@ResponseBody
@RequestMapping("/myselfCity")
public List myselfCity(){
List<com.xiaoshuai.c202201020323.smallcourse.model.MyselfCity> list = myselfCityService.list();
return list;
}
}

View File

@ -0,0 +1,31 @@
package com.xiaoshuai.c202201020323.smallcourse.controller;
import com.xiaoshuai.c202201020323.smallcourse.model.School;
import com.xiaoshuai.c202201020323.smallcourse.service.ISchoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
/**
* <p>
* 前端控制器
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Controller
@RequestMapping("/api")
public class SchoolController {
@Autowired
public ISchoolService schoolService;
@ResponseBody
@RequestMapping("/school")
public List school(){
List<School> list = schoolService.list();
return list;
}
}

View File

@ -0,0 +1,18 @@
package com.xiaoshuai.c202201020323.smallcourse.dao;
import com.xiaoshuai.c202201020323.smallcourse.model.Att;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Mapper
public interface AttMapper extends BaseMapper<Att> {
}

View File

@ -0,0 +1,18 @@
package com.xiaoshuai.c202201020323.smallcourse.dao;
import com.xiaoshuai.c202201020323.smallcourse.model.Find;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Mapper
public interface FindMapper extends BaseMapper<Find> {
}

View File

@ -0,0 +1,18 @@
package com.xiaoshuai.c202201020323.smallcourse.dao;
import com.xiaoshuai.c202201020323.smallcourse.model.Model;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Mapper
public interface ModelMapper extends BaseMapper<Model> {
}

View File

@ -0,0 +1,18 @@
package com.xiaoshuai.c202201020323.smallcourse.dao;
import com.xiaoshuai.c202201020323.smallcourse.model.MyselfCity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Mapper
public interface MyselfCityMapper extends BaseMapper<MyselfCity> {
}

View File

@ -0,0 +1,18 @@
package com.xiaoshuai.c202201020323.smallcourse.dao;
import com.xiaoshuai.c202201020323.smallcourse.model.School;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Mapper
public interface SchoolMapper extends BaseMapper<School> {
}

View File

@ -0,0 +1,37 @@
package com.xiaoshuai.c202201020323.smallcourse.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
*
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Getter
@Setter
public class Att implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String head;
private String vip;
private String name;
private String time;
private String comment;
private String video;
}

View File

@ -0,0 +1,45 @@
package com.xiaoshuai.c202201020323.smallcourse.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
*
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Getter
@Setter
public class Find implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String name;
private String image1;
private String image2;
@TableField(value = "videoImg")
private String videoImg;
private String comment;
private String title;
private String number;
private String time;
}

View File

@ -0,0 +1,37 @@
package com.xiaoshuai.c202201020323.smallcourse.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
*
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Getter
@Setter
public class Model implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String re;
private String name;
private String num;
private String comment;
private String image;
private String video;
}

View File

@ -0,0 +1,33 @@
package com.xiaoshuai.c202201020323.smallcourse.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
*
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Getter
@Setter
@TableName("myself_city")
public class MyselfCity implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String position;
private String comment;
private String video;
}

View File

@ -0,0 +1,33 @@
package com.xiaoshuai.c202201020323.smallcourse.model;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Getter;
import lombok.Setter;
/**
* <p>
*
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Getter
@Setter
public class School implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String watch;
private String collect;
private String comment;
private String video;
}

View File

@ -0,0 +1,16 @@
package com.xiaoshuai.c202201020323.smallcourse.service;
import com.xiaoshuai.c202201020323.smallcourse.model.Att;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author xiao
* @since 2024-11-08
*/
public interface IAttService extends IService<Att> {
}

View File

@ -0,0 +1,16 @@
package com.xiaoshuai.c202201020323.smallcourse.service;
import com.xiaoshuai.c202201020323.smallcourse.model.Find;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author xiao
* @since 2024-11-08
*/
public interface IFindService extends IService<Find> {
}

View File

@ -0,0 +1,16 @@
package com.xiaoshuai.c202201020323.smallcourse.service;
import com.xiaoshuai.c202201020323.smallcourse.model.Model;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author xiao
* @since 2024-11-08
*/
public interface IModelService extends IService<Model> {
}

View File

@ -0,0 +1,16 @@
package com.xiaoshuai.c202201020323.smallcourse.service;
import com.xiaoshuai.c202201020323.smallcourse.model.MyselfCity;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author xiao
* @since 2024-11-08
*/
public interface IMyselfCityService extends IService<MyselfCity> {
}

View File

@ -0,0 +1,16 @@
package com.xiaoshuai.c202201020323.smallcourse.service;
import com.xiaoshuai.c202201020323.smallcourse.model.School;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 服务类
* </p>
*
* @author xiao
* @since 2024-11-08
*/
public interface ISchoolService extends IService<School> {
}

View File

@ -0,0 +1,20 @@
package com.xiaoshuai.c202201020323.smallcourse.service.impl;
import com.xiaoshuai.c202201020323.smallcourse.model.Att;
import com.xiaoshuai.c202201020323.smallcourse.dao.AttMapper;
import com.xiaoshuai.c202201020323.smallcourse.service.IAttService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Service
public class AttServiceImpl extends ServiceImpl<AttMapper, Att> implements IAttService {
}

View File

@ -0,0 +1,20 @@
package com.xiaoshuai.c202201020323.smallcourse.service.impl;
import com.xiaoshuai.c202201020323.smallcourse.model.Find;
import com.xiaoshuai.c202201020323.smallcourse.dao.FindMapper;
import com.xiaoshuai.c202201020323.smallcourse.service.IFindService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Service
public class FindServiceImpl extends ServiceImpl<FindMapper, Find> implements IFindService {
}

View File

@ -0,0 +1,20 @@
package com.xiaoshuai.c202201020323.smallcourse.service.impl;
import com.xiaoshuai.c202201020323.smallcourse.model.Model;
import com.xiaoshuai.c202201020323.smallcourse.dao.ModelMapper;
import com.xiaoshuai.c202201020323.smallcourse.service.IModelService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Service
public class ModelServiceImpl extends ServiceImpl<ModelMapper, Model> implements IModelService {
}

View File

@ -0,0 +1,20 @@
package com.xiaoshuai.c202201020323.smallcourse.service.impl;
import com.xiaoshuai.c202201020323.smallcourse.model.MyselfCity;
import com.xiaoshuai.c202201020323.smallcourse.dao.MyselfCityMapper;
import com.xiaoshuai.c202201020323.smallcourse.service.IMyselfCityService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Service
public class MyselfCityServiceImpl extends ServiceImpl<MyselfCityMapper, MyselfCity> implements IMyselfCityService {
}

View File

@ -0,0 +1,20 @@
package com.xiaoshuai.c202201020323.smallcourse.service.impl;
import com.xiaoshuai.c202201020323.smallcourse.model.School;
import com.xiaoshuai.c202201020323.smallcourse.dao.SchoolMapper;
import com.xiaoshuai.c202201020323.smallcourse.service.ISchoolService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
* <p>
* 服务实现类
* </p>
*
* @author xiao
* @since 2024-11-08
*/
@Service
public class SchoolServiceImpl extends ServiceImpl<SchoolMapper, School> implements ISchoolService {
}

View File

@ -1,29 +1,17 @@
# update to localhost
# server.port=80
spring.application.name=springboot spring.application.name=springboot
# file path
spring.web.resources.static-locations=classpath:/img/,\
file:C:/Users/Administrator/Pictures/Saved Pictures
# file size
spring.servlet.multipart.max-file-size=1024MB
spring.servlet.multipart.max-request-size=10000000MB
# ??????
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# ?????
spring.datasource.name=defaultDataSource spring.datasource.name=defaultDataSource
# ???????
spring.datasource.url=jdbc:mysql://106.53.194.250:63306/mybatis202201020323?serverTimezone=UTC spring.datasource.url=jdbc:mysql://106.53.194.250:63306/smallcoursedesign202201020323?serverTimezone=UTC
# ??????&???
spring.datasource.username=202201020323 spring.datasource.username=202201020323
spring.datasource.password=@hnucm1254 spring.datasource.password=@hnucm1254
#??????????MyBatis??
#??Mybatis?Mapper??
mybatis-plus.mapper-locations=classpath:mapper/*.xml mybatis-plus.mapper-locations=classpath:mapper/*.xml
#??Mybatis?????
mybatis-plus.type-aliases-package=com.xiaoshuai.springboot.springboot.model mybatis-plus.type-aliases-package=com.xiaoshuai.c202201020323.smallcourse.model
logging.level.com.xiaoshuai.springboot.springboot = debug logging.level.com.xiaoshuai.springboot.springboot = debug

View File

@ -0,0 +1,5 @@
<?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.xiaoshuai.c202201020323.smallcourse.dao.AttMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.xiaoshuai.c202201020323.smallcourse.dao.FindMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.xiaoshuai.c202201020323.smallcourse.dao.ModelMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.xiaoshuai.c202201020323.smallcourse.dao.MyselfCityMapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?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.xiaoshuai.c202201020323.smallcourse.dao.SchoolMapper">
</mapper>