commit
9429ce5503
Binary file not shown.
Binary file not shown.
@ -0,0 +1,53 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_X">
|
||||||
|
<output url="file://$MODULE_DIR$/target/classes" />
|
||||||
|
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||||
|
<orderEntry type="library" scope="RUNTIME" name="Maven: org.springframework.boot:spring-boot-devtools:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.spring4all:swagger-spring-boot-starter:1.6.0.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.5" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.13" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.7.0" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>2.2.9.RELEASE</version>
|
||||||
|
<relativePath/> <!-- lookup parent from repository -->
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<groupId>com.hc</groupId>
|
||||||
|
<artifactId>fenis-trip</artifactId>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<name>fenis-trip</name>
|
||||||
|
<description>Demo project for Spring Boot</description>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>trip-business</module>
|
||||||
|
<module>trip-core</module>
|
||||||
|
<module>trip-web</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
<pagehelper.version>1.2.5</pagehelper.version>
|
||||||
|
<mybatis.version>2.1.4</mybatis.version>
|
||||||
|
<druid.version>1.2.5</druid.version>
|
||||||
|
<tk.version>4.1.5</tk.version>
|
||||||
|
<qiniu.version>[7.2.0, 7.2.99]</qiniu.version>
|
||||||
|
<auth0.jwt.version>3.3.0</auth0.jwt.version>
|
||||||
|
<fastjson.version>1.2.70</fastjson.version>
|
||||||
|
<alipay.version>4.9.9</alipay.version>
|
||||||
|
<weixin.miniapp.version>3.0.0</weixin.miniapp.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-devtools</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--api文档-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.spring4all</groupId>
|
||||||
|
<artifactId>swagger-spring-boot-starter</artifactId>
|
||||||
|
<version>1.6.0.RELEASE</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.hc</groupId>
|
||||||
|
<artifactId>fenis-trip</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>trip-business</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<name>trip-business</name>
|
||||||
|
<description>Demo project for Spring Boot</description>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.hc</groupId>
|
||||||
|
<artifactId>trip-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.pagehelper</groupId>
|
||||||
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||||
|
<version>${pagehelper.version}</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||||
|
<groupId>org.mybatis.spring.boot</groupId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.Banner;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告表
|
||||||
|
* (Banner)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:19:19
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface BannerMapper extends Mapper<Banner> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.News;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻表
|
||||||
|
* (News)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:03:23
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface NewsMapper extends Mapper<News> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.NewsTag;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻标签表(NewsTag)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:03:24
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface NewsTagMapper extends Mapper<NewsTag> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.NewsTagRelax;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (NewsTagRelax)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:03:25
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface NewsTagRelaxMapper extends Mapper<NewsTagRelax> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.Roles;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (Roles)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 15:08:18
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface RolesMapper extends Mapper<Roles> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.Scenery;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点表(Scenery)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 09:27:40
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface SceneryMapper extends Mapper<Scenery> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.SceneryPicture;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点图片表(SceneryPicture)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 15:26:10
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface SceneryPictureMapper extends Mapper<SceneryPicture> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.SceneryTag;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点标签(SceneryTag)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 15:26:10
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface SceneryTagMapper extends Mapper<SceneryTag> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.SceneryTickets;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点门票表(SceneryTickets)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 09:34:29
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface SceneryTicketsMapper extends Mapper<SceneryTickets> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.SceneryTicketsType;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票类型表(SceneryTicketsType)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 09:39:56
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface SceneryTicketsTypeMapper extends Mapper<SceneryTicketsType> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.SceneryVideo;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点视频表(SceneryVideo)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 15:26:48
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface SceneryVideoMapper extends Mapper<SceneryVideo> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.UserOrderDetail;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单详情表(UserOrderDetail)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:28
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface UserOrderDetailMapper extends Mapper<UserOrderDetail> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.UserOrders;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单表(UserOrders)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:29
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface UserOrdersMapper extends Mapper<UserOrders> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.UserShop;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购物车表(UserShop)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:30
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface UserShopMapper extends Mapper<UserShop> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.UserTickets;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户门票(UserTickets)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:30
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface UserTicketsMapper extends Mapper<UserTickets> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.Users;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (Users)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 17:45:10
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface UsersMapper extends Mapper<Users> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过用户openid 获取用户信息
|
||||||
|
*
|
||||||
|
* @param openId 微信用户标识
|
||||||
|
* @return 实例对象数组
|
||||||
|
*/
|
||||||
|
List<Users> selectUserByOpenId(String openId);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.hc.tripbusiness.mapper;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.UsersRole;
|
||||||
|
import com.hc.tripcore.utils.mapper.Mapper;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (UsersRole)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 15:08:37
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface UsersRoleMapper extends Mapper<UsersRole> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,74 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告表
|
||||||
|
* (Banner)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:19:19
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Banner implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 667839688154296150L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID主键
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "ID主键")
|
||||||
|
private Integer bannerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主题
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "主题", required = true)
|
||||||
|
@NotNull
|
||||||
|
private String bannerTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告连接
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "广告连接", required = true)
|
||||||
|
@NotNull
|
||||||
|
private String bannerUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 索引
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "索引")
|
||||||
|
private Integer bannerIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 点击后跳转的目的链接
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "点击后跳转的目的链接", required = true)
|
||||||
|
private String targetUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻表
|
||||||
|
* (News)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:03:22
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class News implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 235012938178936468L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "新闻id")
|
||||||
|
private Integer newsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标题", required = true)
|
||||||
|
@NotNull
|
||||||
|
private String newsTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题配图
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标题配图", required = true)
|
||||||
|
@NotNull
|
||||||
|
private String newsLogo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻内容
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "新闻内容", required = true)
|
||||||
|
@NotNull
|
||||||
|
private String newsContent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻标签表(NewsTag)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:03:24
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class NewsTag implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -39154458050657705L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键id")
|
||||||
|
private Integer tagId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "类别名称", required = true)
|
||||||
|
@NotNull
|
||||||
|
private String tagName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (NewsTagRelax)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:03:25
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class NewsTagRelax implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 917744923319773742L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Integer newsTagRelaxId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标签id", required = true)
|
||||||
|
@NotNull
|
||||||
|
private Integer tagId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "新闻id", required = true)
|
||||||
|
@NotNull
|
||||||
|
private Integer newsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (Roles)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 15:08:17
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Roles implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -66181277016540076L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "角色名称", required = true)
|
||||||
|
@NotNull
|
||||||
|
private String name;
|
||||||
|
}
|
@ -0,0 +1,109 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点表(Scenery)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 09:27:39
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "景点表")
|
||||||
|
public class Scenery implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 912947094192635315L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Integer sceneryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景区名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "景区名称", required = true)
|
||||||
|
@NotNull
|
||||||
|
private String sceneryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点公告
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "景点公告", required = true)
|
||||||
|
private String sceneryNotes;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "景点排序")
|
||||||
|
private Integer sceneryIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点介绍
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "景点介绍", required = true)
|
||||||
|
private String sceneryIntroduce;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点Logo
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "景点Logo", required = true)
|
||||||
|
private String sceneryLogo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开放时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "开放时间")
|
||||||
|
private Long startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "结束时间")
|
||||||
|
private Long endTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "联系电话")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 官网
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "官网")
|
||||||
|
private String website;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交通
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "交通")
|
||||||
|
private String traffic;
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点图片表(SceneryPicture)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 15:26:10
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "景点图片表")
|
||||||
|
public class SceneryPicture implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -40027829476880747L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Integer sceneryPictureId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "图片名称", required = true)
|
||||||
|
private String pictureName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "图片地址", required = true)
|
||||||
|
private String pictureUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片介绍
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "图片介绍", required = true)
|
||||||
|
private String pictureIntroduce;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "图片排序")
|
||||||
|
private Integer pictureIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "景区id", required = true)
|
||||||
|
@NotNull
|
||||||
|
private Integer sceneryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点标签(SceneryTag)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 15:26:10
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "景点标签表")
|
||||||
|
public class SceneryTag implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -57206923209950362L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Integer sceneryTagId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景区标签
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "景区标签", required = true)
|
||||||
|
@NotNull
|
||||||
|
private String tagName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
}
|
@ -0,0 +1,93 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点门票表(SceneryTickets)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 09:34:29
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "门票表")
|
||||||
|
public class SceneryTickets implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -56795734829011871L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键", required = true)
|
||||||
|
private Integer sceneryTicketId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景区门票类型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "景区门票类型", required = true)
|
||||||
|
@NotNull
|
||||||
|
private Integer ticketsTypeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票名字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "门票名字", required = true)
|
||||||
|
private String ticketsName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票价格
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "门票价格", required = true)
|
||||||
|
private Double ticketsPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票介绍
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "门票介绍", required = true)
|
||||||
|
private String ticketIntroduce;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票logo
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "门票logo", required = true)
|
||||||
|
private String ticketsLogo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景区id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "景区id", required = true)
|
||||||
|
@NotNull
|
||||||
|
private Integer sceneryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "销售数量 ", required = true)
|
||||||
|
private Integer ticketSellNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
}
|
@ -0,0 +1,56 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票类型表(SceneryTicketsType)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 09:39:56
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "门票类型表")
|
||||||
|
public class SceneryTicketsType implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -56522778678792842L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Integer ticketsTypeId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票类型名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "门票类型名称", required = true)
|
||||||
|
@NotNull
|
||||||
|
private String ticketName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
}
|
@ -0,0 +1,81 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点视频表(SceneryVideo)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 15:26:47
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "景点视频表")
|
||||||
|
public class SceneryVideo implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -13473191696203048L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Integer sceneryVideoId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "视频名称", required = true)
|
||||||
|
@NotNull
|
||||||
|
private String videoName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 视频介绍
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "视频介绍", required = true)
|
||||||
|
private String videoIntroduce;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序字段
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "排序字段")
|
||||||
|
private Integer videoIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 资源地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "资源地址", required = true)
|
||||||
|
private String videoUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 外键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "外键", required = true)
|
||||||
|
@NotNull
|
||||||
|
private Integer sceneryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单详情表(UserOrderDetail)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:27
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UserOrderDetail implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 884717817060295517L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键id")
|
||||||
|
private Integer orderDetailId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "订单id", required = true)
|
||||||
|
private Integer orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "门票id", required = true)
|
||||||
|
private Integer sceneryTicketId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购买数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "购买数量", required = true)
|
||||||
|
private Integer num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
}
|
@ -0,0 +1,113 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import tk.mybatis.mapper.annotation.Version;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单表(UserOrders)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:29
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UserOrders implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 654720203617863422L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键id")
|
||||||
|
private Integer ordersId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "订单号", required = true)
|
||||||
|
private String orderNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户id", required = true)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品介绍
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "商品介绍", required = true)
|
||||||
|
private String body;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "订单名称", required = true)
|
||||||
|
private String subject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单总金额
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "订单总金额", required = true)
|
||||||
|
private Double totalAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单状态
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "订单状态", required = true)
|
||||||
|
private Integer orderStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否删除", required = true)
|
||||||
|
private Integer isDe;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付宝交易号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "支付宝交易号", required = true)
|
||||||
|
private String aliTradeNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信交易号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "微信交易号", required = true)
|
||||||
|
private String wxTradeNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发票id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发票id", required = true)
|
||||||
|
private Integer userInvoicesId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乐观锁
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "乐观锁")
|
||||||
|
@Version
|
||||||
|
private Integer version;
|
||||||
|
}
|
@ -0,0 +1,64 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购物车表(UserShop)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:30
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UserShop implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -18437284989870592L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Integer userShopId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户id", required = true)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "门票id", required = true)
|
||||||
|
private Integer sceneryTicketId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数量id", required = true)
|
||||||
|
private Integer num;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import tk.mybatis.mapper.annotation.Version;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户门票(UserTickets)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:30
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UserTickets implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 689996508632270417L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键id")
|
||||||
|
private Integer userTicketsId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "门票id", required = true)
|
||||||
|
private String sceneryTicketId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票密码(保留)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "票密码(保留)", required = true)
|
||||||
|
private String ticketsPass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 票号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "票号", required = true)
|
||||||
|
private String ticketsNo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二维码地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "二维码地址", required = true)
|
||||||
|
private String ticketsCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票得有效期时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "门票得有效期时间", required = true)
|
||||||
|
private Long ticketsTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户id", required = true)
|
||||||
|
private Integer userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否使用
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否使用", required = true)
|
||||||
|
private Boolean isUse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 使用时间戳
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "使用时间戳", required = true)
|
||||||
|
private Long usedTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Long createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "修改时间")
|
||||||
|
private Long updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乐观锁
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "乐观锁")
|
||||||
|
@Version
|
||||||
|
private Integer version;
|
||||||
|
}
|
@ -0,0 +1,71 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (Users)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 14:47:03
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@ApiModel(value = "用户表")
|
||||||
|
public class Users implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 942617439502094031L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户名")
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 密码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "密码")
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信用户标识
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "微信用户标识", required = true)
|
||||||
|
private String openid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户头像
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户头像")
|
||||||
|
private String userLogo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 社区昵称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "社区昵称")
|
||||||
|
private String nickname;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 性别
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "性别")
|
||||||
|
private String gender;
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package com.hc.tripbusiness.model;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (UsersRole)实体类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 15:08:37
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UsersRole implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -33538509975795305L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色信息
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "角色信息", required = true)
|
||||||
|
@NotNull
|
||||||
|
private Integer roleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户信息
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户信息", required = true)
|
||||||
|
@NotNull
|
||||||
|
private Integer userId;
|
||||||
|
}
|
@ -0,0 +1,57 @@
|
|||||||
|
package com.hc.tripbusiness.model.jwt;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.Users;
|
||||||
|
import com.hc.tripbusiness.model.login.AccessEntity;
|
||||||
|
import com.hc.tripbusiness.model.login.AuthEntity;
|
||||||
|
import com.hc.tripbusiness.model.login.TokenEntity;
|
||||||
|
import com.hc.tripcore.utils.redis.RedisUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.util.SerializationUtils;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class GenerateAuthToken {
|
||||||
|
|
||||||
|
private final RedisUtil redisUtil;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public GenerateAuthToken(RedisUtil redisUtil) {
|
||||||
|
this.redisUtil = redisUtil;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AccessEntity generateToken(AuthEntity auth, Users user) {
|
||||||
|
|
||||||
|
AccessEntity accessEntity = new AccessEntity();
|
||||||
|
accessEntity.setAuth(auth);
|
||||||
|
TokenEntity tokenEntity = new TokenEntity();
|
||||||
|
// 默认超时 8 小时
|
||||||
|
tokenEntity.setExpires(60 * 60 * 8);
|
||||||
|
String token = JWTUtil.sign(auth.getUserName(), auth.getPassword());
|
||||||
|
tokenEntity.setId(token);
|
||||||
|
|
||||||
|
|
||||||
|
accessEntity.setToken(tokenEntity);
|
||||||
|
String accessEntityStr = null;
|
||||||
|
try {
|
||||||
|
accessEntityStr = new String(Objects.requireNonNull(SerializationUtils.serialize(accessEntity)));
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.warn("{}-{}用户登录出错", auth.getUserName(), auth.getPassword());
|
||||||
|
}
|
||||||
|
// 写入到 redis
|
||||||
|
redisUtil.set(accessEntity.getToken().getId(),
|
||||||
|
accessEntityStr,
|
||||||
|
accessEntity.getToken().getExpires());
|
||||||
|
|
||||||
|
if (user != null) {
|
||||||
|
tokenEntity.setPermissionLevel(4);
|
||||||
|
accessEntity.setUser(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
log.info("用户登录成功 user={}", auth.getUserName());
|
||||||
|
return accessEntity;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,74 @@
|
|||||||
|
package com.hc.tripbusiness.model.jwt;
|
||||||
|
|
||||||
|
import com.auth0.jwt.JWT;
|
||||||
|
import com.auth0.jwt.JWTVerifier;
|
||||||
|
import com.auth0.jwt.algorithms.Algorithm;
|
||||||
|
import com.auth0.jwt.exceptions.JWTDecodeException;
|
||||||
|
import com.auth0.jwt.interfaces.DecodedJWT;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class JWTUtil {
|
||||||
|
|
||||||
|
// 过期时间8小时0分钟
|
||||||
|
|
||||||
|
private static final long EXPIRE_TIME = 8 * 60 * 60 * 1000 ;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验token是否正确
|
||||||
|
*
|
||||||
|
* @param token 密钥
|
||||||
|
* @param secret 用户的密码
|
||||||
|
* @return 是否正确
|
||||||
|
*/
|
||||||
|
public static boolean verify(String token, String userName, String secret) {
|
||||||
|
try {
|
||||||
|
Algorithm algorithm = Algorithm.HMAC256(secret);
|
||||||
|
JWTVerifier verifier = JWT.require(algorithm)
|
||||||
|
.withClaim("userName", userName)
|
||||||
|
.build();
|
||||||
|
DecodedJWT jwt = verifier.verify(token);
|
||||||
|
return true;
|
||||||
|
} catch (Exception exception) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得token中的信息无需secret解密也能获得
|
||||||
|
*
|
||||||
|
* @return token中包含的用户名
|
||||||
|
*/
|
||||||
|
public static String getUserName(String token) {
|
||||||
|
try {
|
||||||
|
DecodedJWT jwt = JWT.decode(token);
|
||||||
|
return jwt.getClaim("userName").asString();
|
||||||
|
} catch (JWTDecodeException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成签名,2小时后过期
|
||||||
|
*
|
||||||
|
* @param userName 用户名
|
||||||
|
* @param secret 用户的密码
|
||||||
|
* @return 加密的token
|
||||||
|
*/
|
||||||
|
public static String sign(String userName, String secret) {
|
||||||
|
try {
|
||||||
|
Date date = new Date(System.currentTimeMillis() + EXPIRE_TIME);
|
||||||
|
Algorithm algorithm = Algorithm.HMAC256(secret);
|
||||||
|
// 附带userName信息
|
||||||
|
return JWT.create()
|
||||||
|
.withClaim("userName", userName)
|
||||||
|
.withExpiresAt(date)
|
||||||
|
.sign(algorithm);
|
||||||
|
} catch (UnsupportedEncodingException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.hc.tripbusiness.model.login;
|
||||||
|
|
||||||
|
import com.hc.tripbusiness.model.Users;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@ApiModel
|
||||||
|
@Data
|
||||||
|
public class AccessEntity implements Serializable{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 序列化标识
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -5164168823800497252L;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户信息")
|
||||||
|
private AuthEntity auth;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "token",example = "e781d000-0498-46d3-90df-96edfd95bcd6")
|
||||||
|
private TokenEntity token;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "user")
|
||||||
|
private Users user;
|
||||||
|
|
||||||
|
// @ApiModelProperty(value = "userAdmin")
|
||||||
|
// private UserAdmin userAdmin;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package com.hc.tripbusiness.model.login;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class AuthEntity implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -9061398570055647081L;
|
||||||
|
|
||||||
|
@NotNull(message = "用户名不可以为空")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@NotNull(message = "密码不可以为空")
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
@NotNull(message = "登录类型不可以为空")
|
||||||
|
private Integer loginType;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.Banner;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告表
|
||||||
|
* (Banner)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:19:19
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface BannerService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param bannerId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
Banner queryById(Integer bannerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param banner 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
Banner insert(Banner banner);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param banner 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
Banner update(Banner banner);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param bannerId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer bannerId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.News;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻表
|
||||||
|
* (News)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:03:23
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface NewsService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param newsId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
News queryById(Integer newsId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param news 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
News insert(News news);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param news 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
News update(News news);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param newsId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer newsId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.NewsTagRelax;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (NewsTagRelax)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:03:25
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface NewsTagRelaxService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param newsTagRelaxId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
NewsTagRelax queryById(Integer newsTagRelaxId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param newsTagRelax 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
NewsTagRelax insert(NewsTagRelax newsTagRelax);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param newsTagRelax 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
NewsTagRelax update(NewsTagRelax newsTagRelax);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param newsTagRelaxId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer newsTagRelaxId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.NewsTag;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻标签表(NewsTag)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:03:24
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface NewsTagService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param tagId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
NewsTag queryById(Integer tagId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param newsTag 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
NewsTag insert(NewsTag newsTag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param newsTag 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
NewsTag update(NewsTag newsTag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param tagId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer tagId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.Roles;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (Roles)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 15:08:18
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface RolesService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
Roles queryById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param roles 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
Roles insert(Roles roles);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param roles 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
Roles update(Roles roles);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.SceneryPicture;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点图片表(SceneryPicture)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 15:26:10
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface SceneryPictureService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param sceneryPictureId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryPicture queryById(Integer sceneryPictureId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param sceneryPicture 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryPicture insert(SceneryPicture sceneryPicture);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param sceneryPicture 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryPicture update(SceneryPicture sceneryPicture);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param sceneryPictureId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer sceneryPictureId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.Scenery;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点表(Scenery)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 09:27:40
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface SceneryService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param sceneryId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
Scenery queryById(Integer sceneryId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param scenery 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
Scenery insert(Scenery scenery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param scenery 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
Scenery update(Scenery scenery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param sceneryId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer sceneryId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.SceneryTag;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点标签(SceneryTag)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 15:26:11
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface SceneryTagService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param sceneryTagId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryTag queryById(Integer sceneryTagId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param sceneryTag 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryTag insert(SceneryTag sceneryTag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param sceneryTag 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryTag update(SceneryTag sceneryTag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param sceneryTagId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer sceneryTagId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.SceneryTickets;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点门票表(SceneryTickets)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 09:34:29
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface SceneryTicketsService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param sceneryTicketId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryTickets queryById(Integer sceneryTicketId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param sceneryTickets 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryTickets insert(SceneryTickets sceneryTickets);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param sceneryTickets 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryTickets update(SceneryTickets sceneryTickets);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param sceneryTicketId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer sceneryTicketId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.SceneryTicketsType;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票类型表(SceneryTicketsType)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 09:39:56
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface SceneryTicketsTypeService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param ticketsTypeId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryTicketsType queryById(Integer ticketsTypeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param sceneryTicketsType 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryTicketsType insert(SceneryTicketsType sceneryTicketsType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param sceneryTicketsType 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryTicketsType update(SceneryTicketsType sceneryTicketsType);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param ticketsTypeId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer ticketsTypeId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.SceneryVideo;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点视频表(SceneryVideo)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 15:26:48
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface SceneryVideoService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param sceneryVideoId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryVideo queryById(Integer sceneryVideoId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param sceneryVideo 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryVideo insert(SceneryVideo sceneryVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param sceneryVideo 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
SceneryVideo update(SceneryVideo sceneryVideo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param sceneryVideoId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer sceneryVideoId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.UserOrderDetail;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单详情表(UserOrderDetail)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:28
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface UserOrderDetailService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param orderDetailId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UserOrderDetail queryById(Integer orderDetailId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param userOrderDetail 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UserOrderDetail insert(UserOrderDetail userOrderDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param userOrderDetail 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UserOrderDetail update(UserOrderDetail userOrderDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param orderDetailId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer orderDetailId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.UserOrders;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单表(UserOrders)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:29
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface UserOrdersService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param ordersId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UserOrders queryById(Integer ordersId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param userOrders 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UserOrders insert(UserOrders userOrders);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param userOrders 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UserOrders update(UserOrders userOrders);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param ordersId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer ordersId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.UserShop;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购物车表(UserShop)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:30
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface UserShopService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param userShopId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UserShop queryById(Integer userShopId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param userShop 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UserShop insert(UserShop userShop);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param userShop 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UserShop update(UserShop userShop);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param userShopId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer userShopId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.UserTickets;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户门票(UserTickets)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:30
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface UserTicketsService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param userTicketsId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UserTickets queryById(Integer userTicketsId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param userTickets 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UserTickets insert(UserTickets userTickets);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param userTickets 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UserTickets update(UserTickets userTickets);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param userTicketsId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer userTicketsId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.UsersRole;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (UsersRole)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 15:08:37
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface UsersRoleService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UsersRole queryById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param usersRole 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UsersRole insert(UsersRole usersRole);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param usersRole 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
UsersRole update(UsersRole usersRole);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,78 @@
|
|||||||
|
package com.hc.tripbusiness.service;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.Users;
|
||||||
|
import com.hc.tripbusiness.model.login.AccessEntity;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (Users)表服务接口
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 17:45:10
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public interface UsersService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
Users queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param users 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
Users insert(Users users);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param users 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
Users update(Users users);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
PageInfo queryAllByLimit(int page, int size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 微信官方用户登录
|
||||||
|
*
|
||||||
|
* @param appid
|
||||||
|
* @param code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String login(String appid, String code);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 依据openId 获取用户信息
|
||||||
|
*
|
||||||
|
* @param openId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
AccessEntity selectUserByOpenId(String openId);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.Banner;
|
||||||
|
import com.hc.tripbusiness.mapper.BannerMapper;
|
||||||
|
import com.hc.tripbusiness.service.BannerService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告表
|
||||||
|
* (Banner)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:19:20
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("bannerService")
|
||||||
|
public class BannerServiceImpl implements BannerService {
|
||||||
|
|
||||||
|
private final BannerMapper bannerMapper;
|
||||||
|
|
||||||
|
public BannerServiceImpl(BannerMapper bannerMapper) {
|
||||||
|
this.bannerMapper = bannerMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param bannerId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Banner queryById(Integer bannerId) {
|
||||||
|
return this.bannerMapper.selectByPrimaryKey(bannerId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param banner 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Banner insert(Banner banner) {
|
||||||
|
banner.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.bannerMapper.insert(banner);
|
||||||
|
return banner;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param banner 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Banner update(Banner banner) {
|
||||||
|
banner.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.bannerMapper.updateByPrimaryKeySelective(banner);
|
||||||
|
return this.queryById(banner.getBannerId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param bannerId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer bannerId) {
|
||||||
|
return this.bannerMapper.deleteByPrimaryKey(bannerId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.bannerMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.News;
|
||||||
|
import com.hc.tripbusiness.mapper.NewsMapper;
|
||||||
|
import com.hc.tripbusiness.service.NewsService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻表
|
||||||
|
* (News)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:03:23
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("newsService")
|
||||||
|
public class NewsServiceImpl implements NewsService {
|
||||||
|
|
||||||
|
private final NewsMapper newsMapper;
|
||||||
|
|
||||||
|
public NewsServiceImpl(NewsMapper newsMapper) {
|
||||||
|
this.newsMapper = newsMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param newsId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public News queryById(Integer newsId) {
|
||||||
|
return this.newsMapper.selectByPrimaryKey(newsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param news 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public News insert(News news) {
|
||||||
|
news.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.newsMapper.insert(news);
|
||||||
|
return news;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param news 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public News update(News news) {
|
||||||
|
news.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.newsMapper.updateByPrimaryKeySelective(news);
|
||||||
|
return this.queryById(news.getNewsId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param newsId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer newsId) {
|
||||||
|
return this.newsMapper.deleteByPrimaryKey(newsId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.newsMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.NewsTagRelax;
|
||||||
|
import com.hc.tripbusiness.mapper.NewsTagRelaxMapper;
|
||||||
|
import com.hc.tripbusiness.service.NewsTagRelaxService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (NewsTagRelax)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:03:25
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("newsTagRelaxService")
|
||||||
|
public class NewsTagRelaxServiceImpl implements NewsTagRelaxService {
|
||||||
|
|
||||||
|
private final NewsTagRelaxMapper newsTagRelaxMapper;
|
||||||
|
|
||||||
|
public NewsTagRelaxServiceImpl(NewsTagRelaxMapper newsTagRelaxMapper) {
|
||||||
|
this.newsTagRelaxMapper = newsTagRelaxMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param newsTagRelaxId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public NewsTagRelax queryById(Integer newsTagRelaxId) {
|
||||||
|
return this.newsTagRelaxMapper.selectByPrimaryKey(newsTagRelaxId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param newsTagRelax 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public NewsTagRelax insert(NewsTagRelax newsTagRelax) {
|
||||||
|
newsTagRelax.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.newsTagRelaxMapper.insert(newsTagRelax);
|
||||||
|
return newsTagRelax;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param newsTagRelax 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public NewsTagRelax update(NewsTagRelax newsTagRelax) {
|
||||||
|
newsTagRelax.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.newsTagRelaxMapper.updateByPrimaryKeySelective(newsTagRelax);
|
||||||
|
return this.queryById(newsTagRelax.getNewsTagRelaxId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param newsTagRelaxId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer newsTagRelaxId) {
|
||||||
|
return this.newsTagRelaxMapper.deleteByPrimaryKey(newsTagRelaxId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.newsTagRelaxMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.NewsTag;
|
||||||
|
import com.hc.tripbusiness.mapper.NewsTagMapper;
|
||||||
|
import com.hc.tripbusiness.service.NewsTagService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新闻标签表(NewsTag)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 14:03:24
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("newsTagService")
|
||||||
|
public class NewsTagServiceImpl implements NewsTagService {
|
||||||
|
|
||||||
|
private final NewsTagMapper newsTagMapper;
|
||||||
|
|
||||||
|
public NewsTagServiceImpl(NewsTagMapper newsTagMapper) {
|
||||||
|
this.newsTagMapper = newsTagMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param tagId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public NewsTag queryById(Integer tagId) {
|
||||||
|
return this.newsTagMapper.selectByPrimaryKey(tagId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param newsTag 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public NewsTag insert(NewsTag newsTag) {
|
||||||
|
newsTag.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.newsTagMapper.insert(newsTag);
|
||||||
|
return newsTag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param newsTag 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public NewsTag update(NewsTag newsTag) {
|
||||||
|
newsTag.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.newsTagMapper.updateByPrimaryKeySelective(newsTag);
|
||||||
|
return this.queryById(newsTag.getTagId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param tagId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer tagId) {
|
||||||
|
return this.newsTagMapper.deleteByPrimaryKey(tagId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.newsTagMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.Roles;
|
||||||
|
import com.hc.tripbusiness.mapper.RolesMapper;
|
||||||
|
import com.hc.tripbusiness.service.RolesService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (Roles)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 15:08:18
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("rolesService")
|
||||||
|
public class RolesServiceImpl implements RolesService {
|
||||||
|
|
||||||
|
private final RolesMapper rolesMapper;
|
||||||
|
|
||||||
|
public RolesServiceImpl(RolesMapper rolesMapper) {
|
||||||
|
this.rolesMapper = rolesMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Roles queryById(Integer id) {
|
||||||
|
return this.rolesMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param roles 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Roles insert(Roles roles) {
|
||||||
|
this.rolesMapper.insert(roles);
|
||||||
|
return roles;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param roles 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Roles update(Roles roles) {
|
||||||
|
this.rolesMapper.updateByPrimaryKeySelective(roles);
|
||||||
|
return this.queryById(roles.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer id) {
|
||||||
|
return this.rolesMapper.deleteByPrimaryKey(id) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.rolesMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.SceneryPicture;
|
||||||
|
import com.hc.tripbusiness.mapper.SceneryPictureMapper;
|
||||||
|
import com.hc.tripbusiness.service.SceneryPictureService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点图片表(SceneryPicture)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 15:26:10
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("sceneryPictureService")
|
||||||
|
public class SceneryPictureServiceImpl implements SceneryPictureService {
|
||||||
|
|
||||||
|
private final SceneryPictureMapper sceneryPictureMapper;
|
||||||
|
|
||||||
|
public SceneryPictureServiceImpl(SceneryPictureMapper sceneryPictureMapper) {
|
||||||
|
this.sceneryPictureMapper = sceneryPictureMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param sceneryPictureId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryPicture queryById(Integer sceneryPictureId) {
|
||||||
|
return this.sceneryPictureMapper.selectByPrimaryKey(sceneryPictureId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param sceneryPicture 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryPicture insert(SceneryPicture sceneryPicture) {
|
||||||
|
sceneryPicture.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.sceneryPictureMapper.insert(sceneryPicture);
|
||||||
|
return sceneryPicture;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param sceneryPicture 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryPicture update(SceneryPicture sceneryPicture) {
|
||||||
|
sceneryPicture.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.sceneryPictureMapper.updateByPrimaryKeySelective(sceneryPicture);
|
||||||
|
return this.queryById(sceneryPicture.getSceneryPictureId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param sceneryPictureId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer sceneryPictureId) {
|
||||||
|
return this.sceneryPictureMapper.deleteByPrimaryKey(sceneryPictureId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.sceneryPictureMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.Scenery;
|
||||||
|
import com.hc.tripbusiness.mapper.SceneryMapper;
|
||||||
|
import com.hc.tripbusiness.service.SceneryService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点表(Scenery)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 09:27:40
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("sceneryService")
|
||||||
|
public class SceneryServiceImpl implements SceneryService {
|
||||||
|
|
||||||
|
private final SceneryMapper sceneryMapper;
|
||||||
|
|
||||||
|
public SceneryServiceImpl(SceneryMapper sceneryMapper) {
|
||||||
|
this.sceneryMapper = sceneryMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param sceneryId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Scenery queryById(Integer sceneryId) {
|
||||||
|
return this.sceneryMapper.selectByPrimaryKey(sceneryId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param scenery 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Scenery insert(Scenery scenery) {
|
||||||
|
scenery.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.sceneryMapper.insert(scenery);
|
||||||
|
return scenery;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param scenery 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Scenery update(Scenery scenery) {
|
||||||
|
scenery.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.sceneryMapper.updateByPrimaryKeySelective(scenery);
|
||||||
|
return this.queryById(scenery.getSceneryId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param sceneryId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer sceneryId) {
|
||||||
|
return this.sceneryMapper.deleteByPrimaryKey(sceneryId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.sceneryMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.SceneryTag;
|
||||||
|
import com.hc.tripbusiness.mapper.SceneryTagMapper;
|
||||||
|
import com.hc.tripbusiness.service.SceneryTagService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点标签(SceneryTag)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 15:26:11
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("sceneryTagService")
|
||||||
|
public class SceneryTagServiceImpl implements SceneryTagService {
|
||||||
|
|
||||||
|
private final SceneryTagMapper sceneryTagMapper;
|
||||||
|
|
||||||
|
public SceneryTagServiceImpl(SceneryTagMapper sceneryTagMapper) {
|
||||||
|
this.sceneryTagMapper = sceneryTagMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param sceneryTagId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryTag queryById(Integer sceneryTagId) {
|
||||||
|
return this.sceneryTagMapper.selectByPrimaryKey(sceneryTagId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param sceneryTag 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryTag insert(SceneryTag sceneryTag) {
|
||||||
|
sceneryTag.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.sceneryTagMapper.insert(sceneryTag);
|
||||||
|
return sceneryTag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param sceneryTag 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryTag update(SceneryTag sceneryTag) {
|
||||||
|
sceneryTag.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.sceneryTagMapper.updateByPrimaryKeySelective(sceneryTag);
|
||||||
|
return this.queryById(sceneryTag.getSceneryTagId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param sceneryTagId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer sceneryTagId) {
|
||||||
|
return this.sceneryTagMapper.deleteByPrimaryKey(sceneryTagId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.sceneryTagMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.SceneryTickets;
|
||||||
|
import com.hc.tripbusiness.mapper.SceneryTicketsMapper;
|
||||||
|
import com.hc.tripbusiness.service.SceneryTicketsService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点门票表(SceneryTickets)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 09:34:29
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("sceneryTicketsService")
|
||||||
|
public class SceneryTicketsServiceImpl implements SceneryTicketsService {
|
||||||
|
|
||||||
|
private final SceneryTicketsMapper sceneryTicketsMapper;
|
||||||
|
|
||||||
|
public SceneryTicketsServiceImpl(SceneryTicketsMapper sceneryTicketsMapper) {
|
||||||
|
this.sceneryTicketsMapper = sceneryTicketsMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param sceneryTicketId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryTickets queryById(Integer sceneryTicketId) {
|
||||||
|
return this.sceneryTicketsMapper.selectByPrimaryKey(sceneryTicketId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param sceneryTickets 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryTickets insert(SceneryTickets sceneryTickets) {
|
||||||
|
sceneryTickets.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.sceneryTicketsMapper.insert(sceneryTickets);
|
||||||
|
return sceneryTickets;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param sceneryTickets 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryTickets update(SceneryTickets sceneryTickets) {
|
||||||
|
sceneryTickets.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.sceneryTicketsMapper.updateByPrimaryKeySelective(sceneryTickets);
|
||||||
|
return this.queryById(sceneryTickets.getSceneryTicketId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param sceneryTicketId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer sceneryTicketId) {
|
||||||
|
return this.sceneryTicketsMapper.deleteByPrimaryKey(sceneryTicketId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.sceneryTicketsMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.SceneryTicketsType;
|
||||||
|
import com.hc.tripbusiness.mapper.SceneryTicketsTypeMapper;
|
||||||
|
import com.hc.tripbusiness.service.SceneryTicketsTypeService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门票类型表(SceneryTicketsType)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 09:39:56
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("sceneryTicketsTypeService")
|
||||||
|
public class SceneryTicketsTypeServiceImpl implements SceneryTicketsTypeService {
|
||||||
|
|
||||||
|
private final SceneryTicketsTypeMapper sceneryTicketsTypeMapper;
|
||||||
|
|
||||||
|
public SceneryTicketsTypeServiceImpl(SceneryTicketsTypeMapper sceneryTicketsTypeMapper) {
|
||||||
|
this.sceneryTicketsTypeMapper = sceneryTicketsTypeMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param ticketsTypeId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryTicketsType queryById(Integer ticketsTypeId) {
|
||||||
|
return this.sceneryTicketsTypeMapper.selectByPrimaryKey(ticketsTypeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param sceneryTicketsType 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryTicketsType insert(SceneryTicketsType sceneryTicketsType) {
|
||||||
|
sceneryTicketsType.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.sceneryTicketsTypeMapper.insert(sceneryTicketsType);
|
||||||
|
return sceneryTicketsType;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param sceneryTicketsType 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryTicketsType update(SceneryTicketsType sceneryTicketsType) {
|
||||||
|
sceneryTicketsType.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.sceneryTicketsTypeMapper.updateByPrimaryKeySelective(sceneryTicketsType);
|
||||||
|
return this.queryById(sceneryTicketsType.getTicketsTypeId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param ticketsTypeId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer ticketsTypeId) {
|
||||||
|
return this.sceneryTicketsTypeMapper.deleteByPrimaryKey(ticketsTypeId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.sceneryTicketsTypeMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.SceneryVideo;
|
||||||
|
import com.hc.tripbusiness.mapper.SceneryVideoMapper;
|
||||||
|
import com.hc.tripbusiness.service.SceneryVideoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 景点视频表(SceneryVideo)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-27 15:26:48
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("sceneryVideoService")
|
||||||
|
public class SceneryVideoServiceImpl implements SceneryVideoService {
|
||||||
|
|
||||||
|
private final SceneryVideoMapper sceneryVideoMapper;
|
||||||
|
|
||||||
|
public SceneryVideoServiceImpl(SceneryVideoMapper sceneryVideoMapper) {
|
||||||
|
this.sceneryVideoMapper = sceneryVideoMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param sceneryVideoId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryVideo queryById(Integer sceneryVideoId) {
|
||||||
|
return this.sceneryVideoMapper.selectByPrimaryKey(sceneryVideoId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param sceneryVideo 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryVideo insert(SceneryVideo sceneryVideo) {
|
||||||
|
sceneryVideo.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.sceneryVideoMapper.insert(sceneryVideo);
|
||||||
|
return sceneryVideo;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param sceneryVideo 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SceneryVideo update(SceneryVideo sceneryVideo) {
|
||||||
|
sceneryVideo.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.sceneryVideoMapper.updateByPrimaryKeySelective(sceneryVideo);
|
||||||
|
return this.queryById(sceneryVideo.getSceneryVideoId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param sceneryVideoId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer sceneryVideoId) {
|
||||||
|
return this.sceneryVideoMapper.deleteByPrimaryKey(sceneryVideoId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.sceneryVideoMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.UserOrderDetail;
|
||||||
|
import com.hc.tripbusiness.mapper.UserOrderDetailMapper;
|
||||||
|
import com.hc.tripbusiness.service.UserOrderDetailService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单详情表(UserOrderDetail)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:28
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("userOrderDetailService")
|
||||||
|
public class UserOrderDetailServiceImpl implements UserOrderDetailService {
|
||||||
|
|
||||||
|
private final UserOrderDetailMapper userOrderDetailMapper;
|
||||||
|
|
||||||
|
public UserOrderDetailServiceImpl(UserOrderDetailMapper userOrderDetailMapper) {
|
||||||
|
this.userOrderDetailMapper = userOrderDetailMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param orderDetailId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserOrderDetail queryById(Integer orderDetailId) {
|
||||||
|
return this.userOrderDetailMapper.selectByPrimaryKey(orderDetailId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param userOrderDetail 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserOrderDetail insert(UserOrderDetail userOrderDetail) {
|
||||||
|
userOrderDetail.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.userOrderDetailMapper.insert(userOrderDetail);
|
||||||
|
return userOrderDetail;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param userOrderDetail 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserOrderDetail update(UserOrderDetail userOrderDetail) {
|
||||||
|
userOrderDetail.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.userOrderDetailMapper.updateByPrimaryKeySelective(userOrderDetail);
|
||||||
|
return this.queryById(userOrderDetail.getOrderDetailId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param orderDetailId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer orderDetailId) {
|
||||||
|
return this.userOrderDetailMapper.deleteByPrimaryKey(orderDetailId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.userOrderDetailMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.UserOrders;
|
||||||
|
import com.hc.tripbusiness.mapper.UserOrdersMapper;
|
||||||
|
import com.hc.tripbusiness.service.UserOrdersService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单表(UserOrders)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:29
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("userOrdersService")
|
||||||
|
public class UserOrdersServiceImpl implements UserOrdersService {
|
||||||
|
|
||||||
|
private final UserOrdersMapper userOrdersMapper;
|
||||||
|
|
||||||
|
public UserOrdersServiceImpl(UserOrdersMapper userOrdersMapper) {
|
||||||
|
this.userOrdersMapper = userOrdersMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param ordersId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserOrders queryById(Integer ordersId) {
|
||||||
|
return this.userOrdersMapper.selectByPrimaryKey(ordersId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param userOrders 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserOrders insert(UserOrders userOrders) {
|
||||||
|
userOrders.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.userOrdersMapper.insert(userOrders);
|
||||||
|
return userOrders;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param userOrders 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserOrders update(UserOrders userOrders) {
|
||||||
|
userOrders.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.userOrdersMapper.updateByPrimaryKeySelective(userOrders);
|
||||||
|
return this.queryById(userOrders.getOrdersId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param ordersId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer ordersId) {
|
||||||
|
return this.userOrdersMapper.deleteByPrimaryKey(ordersId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.userOrdersMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.UserShop;
|
||||||
|
import com.hc.tripbusiness.mapper.UserShopMapper;
|
||||||
|
import com.hc.tripbusiness.service.UserShopService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 购物车表(UserShop)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:30
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("userShopService")
|
||||||
|
public class UserShopServiceImpl implements UserShopService {
|
||||||
|
|
||||||
|
private final UserShopMapper userShopMapper;
|
||||||
|
|
||||||
|
public UserShopServiceImpl(UserShopMapper userShopMapper) {
|
||||||
|
this.userShopMapper = userShopMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param userShopId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserShop queryById(Integer userShopId) {
|
||||||
|
return this.userShopMapper.selectByPrimaryKey(userShopId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param userShop 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserShop insert(UserShop userShop) {
|
||||||
|
userShop.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.userShopMapper.insert(userShop);
|
||||||
|
return userShop;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param userShop 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserShop update(UserShop userShop) {
|
||||||
|
userShop.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.userShopMapper.updateByPrimaryKeySelective(userShop);
|
||||||
|
return this.queryById(userShop.getUserShopId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param userShopId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer userShopId) {
|
||||||
|
return this.userShopMapper.deleteByPrimaryKey(userShopId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.userShopMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.UserTickets;
|
||||||
|
import com.hc.tripbusiness.mapper.UserTicketsMapper;
|
||||||
|
import com.hc.tripbusiness.service.UserTicketsService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户门票(UserTickets)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 17:01:31
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("userTicketsService")
|
||||||
|
public class UserTicketsServiceImpl implements UserTicketsService {
|
||||||
|
|
||||||
|
private final UserTicketsMapper userTicketsMapper;
|
||||||
|
|
||||||
|
public UserTicketsServiceImpl(UserTicketsMapper userTicketsMapper) {
|
||||||
|
this.userTicketsMapper = userTicketsMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param userTicketsId 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserTickets queryById(Integer userTicketsId) {
|
||||||
|
return this.userTicketsMapper.selectByPrimaryKey(userTicketsId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param userTickets 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserTickets insert(UserTickets userTickets) {
|
||||||
|
userTickets.setCreateTime(System.currentTimeMillis());
|
||||||
|
this.userTicketsMapper.insert(userTickets);
|
||||||
|
return userTickets;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param userTickets 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UserTickets update(UserTickets userTickets) {
|
||||||
|
userTickets.setUpdateTime(System.currentTimeMillis());
|
||||||
|
this.userTicketsMapper.updateByPrimaryKeySelective(userTickets);
|
||||||
|
return this.queryById(userTickets.getUserTicketsId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param userTicketsId 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer userTicketsId) {
|
||||||
|
return this.userTicketsMapper.deleteByPrimaryKey(userTicketsId) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.userTicketsMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.model.UsersRole;
|
||||||
|
import com.hc.tripbusiness.mapper.UsersRoleMapper;
|
||||||
|
import com.hc.tripbusiness.service.UsersRoleService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (UsersRole)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-30 15:08:37
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Service("usersRoleService")
|
||||||
|
public class UsersRoleServiceImpl implements UsersRoleService {
|
||||||
|
|
||||||
|
private final UsersRoleMapper usersRoleMapper;
|
||||||
|
|
||||||
|
public UsersRoleServiceImpl(UsersRoleMapper usersRoleMapper) {
|
||||||
|
this.usersRoleMapper = usersRoleMapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UsersRole queryById(Integer id) {
|
||||||
|
return this.usersRoleMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param usersRole 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UsersRole insert(UsersRole usersRole) {
|
||||||
|
this.usersRoleMapper.insert(usersRole);
|
||||||
|
return usersRole;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param usersRole 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public UsersRole update(UsersRole usersRole) {
|
||||||
|
this.usersRoleMapper.updateByPrimaryKeySelective(usersRole);
|
||||||
|
return this.queryById(usersRole.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer id) {
|
||||||
|
return this.usersRoleMapper.deleteByPrimaryKey(id) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.usersRoleMapper::selectAll);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,150 @@
|
|||||||
|
package com.hc.tripbusiness.service.impl;
|
||||||
|
|
||||||
|
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||||
|
import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult;
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.hc.tripbusiness.mapper.UsersMapper;
|
||||||
|
import com.hc.tripbusiness.model.Users;
|
||||||
|
import com.hc.tripbusiness.model.jwt.GenerateAuthToken;
|
||||||
|
import com.hc.tripbusiness.model.login.AccessEntity;
|
||||||
|
import com.hc.tripbusiness.model.login.AuthEntity;
|
||||||
|
import com.hc.tripbusiness.service.UsersService;
|
||||||
|
import com.hc.tripcore.utils.enums.InfoEnum;
|
||||||
|
import com.hc.tripcore.utils.exception.ResponseException;
|
||||||
|
import com.hc.tripcore.utils.tool.JsonUtils;
|
||||||
|
import com.hc.tripcore.utils.wechat.WxMaConfiguration;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import me.chanjar.weixin.common.exception.WxErrorException;
|
||||||
|
import org.apache.commons.lang3.RandomStringUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* (Users)表服务实现类
|
||||||
|
*
|
||||||
|
* @author java
|
||||||
|
* @since 2021-04-25 17:45:11
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service("usersService")
|
||||||
|
public class UsersServiceImpl implements UsersService {
|
||||||
|
|
||||||
|
private final UsersMapper usersMapper;
|
||||||
|
|
||||||
|
private final GenerateAuthToken generateAuthToken;
|
||||||
|
|
||||||
|
public UsersServiceImpl(UsersMapper usersMapper, GenerateAuthToken generateAuthToken) {
|
||||||
|
this.usersMapper = usersMapper;
|
||||||
|
this.generateAuthToken = generateAuthToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Users queryById(Long id) {
|
||||||
|
return this.usersMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param users 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Users insert(Users users) {
|
||||||
|
this.usersMapper.insert(users);
|
||||||
|
return users;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param users 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Users update(Users users) {
|
||||||
|
this.usersMapper.updateByPrimaryKeySelective(users);
|
||||||
|
return this.queryById(users.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Long id) {
|
||||||
|
return this.usersMapper.deleteByPrimaryKey(id) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询多条数据
|
||||||
|
*
|
||||||
|
* @param page 页码
|
||||||
|
* @param size 查询条数
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PageInfo queryAllByLimit(int page, int size) {
|
||||||
|
return PageHelper.startPage(page, size).doSelectPageInfo(this.usersMapper::selectAll);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String login(String appid, String code) {
|
||||||
|
|
||||||
|
if (StringUtils.isBlank(code)) {
|
||||||
|
return "empty jscode";
|
||||||
|
}
|
||||||
|
|
||||||
|
final WxMaService wxService = WxMaConfiguration.getMaService(appid);
|
||||||
|
try {
|
||||||
|
WxMaJscode2SessionResult session = wxService.getUserService().getSessionInfo(code);
|
||||||
|
log.info(session.getSessionKey());
|
||||||
|
log.info(session.getOpenid());
|
||||||
|
|
||||||
|
//TODO 可以增加自己的逻辑,关联业务相关数据
|
||||||
|
|
||||||
|
List<Users> users = usersMapper.selectUserByOpenId(session.getOpenid());
|
||||||
|
if (CollectionUtils.isEmpty(users)) {
|
||||||
|
Users user = new Users();
|
||||||
|
user.setOpenid(session.getOpenid());
|
||||||
|
usersMapper.insert(user);
|
||||||
|
}
|
||||||
|
|
||||||
|
return JsonUtils.toJson(session);
|
||||||
|
} catch (WxErrorException e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
return e.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AccessEntity selectUserByOpenId(String openId) {
|
||||||
|
|
||||||
|
List<Users> users = usersMapper.selectUserByOpenId(openId);
|
||||||
|
if (CollectionUtils.isEmpty(users)) {
|
||||||
|
throw new ResponseException(InfoEnum.LOGIN_USER_NAME_ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
Users user = users.get(0);
|
||||||
|
AuthEntity authEntity = new AuthEntity();
|
||||||
|
authEntity.setUserName(openId);
|
||||||
|
authEntity.setPassword(RandomStringUtils.randomAlphanumeric(10));
|
||||||
|
authEntity.setLoginType(1);
|
||||||
|
return generateAuthToken.generateToken(authEntity, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.BannerMapper">
|
||||||
|
|
||||||
|
<resultMap type="banner" id="BannerMap">
|
||||||
|
<result property="bannerId" column="banner_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="bannerTitle" column="banner_title" jdbcType="VARCHAR"/>
|
||||||
|
<result property="bannerUrl" column="banner_url" jdbcType="VARCHAR"/>
|
||||||
|
<result property="bannerIndex" column="banner_index" jdbcType="INTEGER"/>
|
||||||
|
<result property="targetUrl" column="target_url" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
banner_id,
|
||||||
|
banner_title,
|
||||||
|
banner_url,
|
||||||
|
banner_index,
|
||||||
|
target_url,
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,23 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.NewsMapper">
|
||||||
|
|
||||||
|
<resultMap type="news" id="NewsMap">
|
||||||
|
<result property="newsId" column="news_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="newsTitle" column="news_title" jdbcType="VARCHAR"/>
|
||||||
|
<result property="newsLogo" column="news_logo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="newsContent" column="news_content" jdbcType="BLOB"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
news_id,
|
||||||
|
news_title,
|
||||||
|
news_logo,
|
||||||
|
news_content,
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,19 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.NewsTagMapper">
|
||||||
|
|
||||||
|
<resultMap type="newsTag" id="NewsTagMap">
|
||||||
|
<result property="tagId" column="tag_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="tagName" column="tag_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
tag_id,
|
||||||
|
tag_name,
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,21 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.NewsTagRelaxMapper">
|
||||||
|
|
||||||
|
<resultMap type="newsTagRelax" id="NewsTagRelaxMap">
|
||||||
|
<result property="newsTagRelaxId" column="news_tag_relax_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="tagId" column="tag_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="newsId" column="news_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
news_tag_relax_id,
|
||||||
|
tag_id,
|
||||||
|
news_id,
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,15 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.RolesMapper">
|
||||||
|
|
||||||
|
<resultMap type="roles" id="RolesMap">
|
||||||
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||||
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,
|
||||||
|
`name`
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,37 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.SceneryMapper">
|
||||||
|
|
||||||
|
<resultMap type="scenery" id="SceneryMap">
|
||||||
|
<result property="sceneryId" column="scenery_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="sceneryName" column="scenery_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="sceneryNotes" column="scenery_notes" jdbcType="VARCHAR"/>
|
||||||
|
<result property="sceneryIndex" column="scenery_index" jdbcType="INTEGER"/>
|
||||||
|
<result property="sceneryIntroduce" column="scenery_introduce" jdbcType="VARCHAR"/>
|
||||||
|
<result property="sceneryLogo" column="scenery_logo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="startTime" column="start_time" jdbcType="INTEGER"/>
|
||||||
|
<result property="endTime" column="end_time" jdbcType="INTEGER"/>
|
||||||
|
<result property="phone" column="phone" jdbcType="VARCHAR"/>
|
||||||
|
<result property="website" column="website" jdbcType="VARCHAR"/>
|
||||||
|
<result property="traffic" column="traffic" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
scenery_id,
|
||||||
|
scenery_name,
|
||||||
|
scenery_notes,
|
||||||
|
scenery_index,
|
||||||
|
scenery_introduce,
|
||||||
|
scenery_logo,
|
||||||
|
create_time,
|
||||||
|
update_time,
|
||||||
|
start_time,
|
||||||
|
end_time,
|
||||||
|
phone,
|
||||||
|
website,
|
||||||
|
traffic
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,27 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.SceneryPictureMapper">
|
||||||
|
|
||||||
|
<resultMap type="sceneryPicture" id="SceneryPictureMap">
|
||||||
|
<result property="sceneryPictureId" column="scenery_picture_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="pictureName" column="picture_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pictureUrl" column="picture_url" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pictureIntroduce" column="picture_introduce" jdbcType="VARCHAR"/>
|
||||||
|
<result property="pictureIndex" column="picture_index" jdbcType="INTEGER"/>
|
||||||
|
<result property="sceneryId" column="scenery_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
scenery_picture_id,
|
||||||
|
picture_name,
|
||||||
|
picture_url,
|
||||||
|
picture_introduce,
|
||||||
|
picture_index,
|
||||||
|
scenery_id,
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,19 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.SceneryTagMapper">
|
||||||
|
|
||||||
|
<resultMap type="sceneryTag" id="SceneryTagMap">
|
||||||
|
<result property="sceneryTagId" column="scenery_tag_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="tagName" column="tag_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
scenery_tag_id,
|
||||||
|
tag_name,
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,31 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.SceneryTicketsMapper">
|
||||||
|
|
||||||
|
<resultMap type="sceneryTickets" id="SceneryTicketsMap">
|
||||||
|
<result property="sceneryTicketId" column="scenery_ticket_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="ticketsTypeId" column="tickets_type_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="ticketsName" column="tickets_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ticketsPrice" column="tickets_price" jdbcType="DOUBLE"/>
|
||||||
|
<result property="ticketIntroduce" column="ticket_introduce" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ticketsLogo" column="tickets_logo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="sceneryId" column="scenery_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="ticketSellNum" column="ticket_sell_num" jdbcType="INTEGER"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
scenery_ticket_id,
|
||||||
|
tickets_type_id,
|
||||||
|
tickets_name,
|
||||||
|
tickets_price,
|
||||||
|
ticket_introduce,
|
||||||
|
tickets_logo,
|
||||||
|
scenery_id,
|
||||||
|
ticket_sell_num,
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,19 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.SceneryTicketsTypeMapper">
|
||||||
|
|
||||||
|
<resultMap type="sceneryTicketsType" id="SceneryTicketsTypeMap">
|
||||||
|
<result property="ticketsTypeId" column="tickets_type_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="ticketName" column="ticket_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
tickets_type_id,
|
||||||
|
ticket_name,
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,27 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.SceneryVideoMapper">
|
||||||
|
|
||||||
|
<resultMap type="sceneryVideo" id="SceneryVideoMap">
|
||||||
|
<result property="sceneryVideoId" column="scenery_video_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="videoName" column="video_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="videoIntroduce" column="video_introduce" jdbcType="VARCHAR"/>
|
||||||
|
<result property="videoIndex" column="video_index" jdbcType="INTEGER"/>
|
||||||
|
<result property="videoUrl" column="video_url" jdbcType="VARCHAR"/>
|
||||||
|
<result property="sceneryId" column="scenery_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
scenery_video_id,
|
||||||
|
video_name,
|
||||||
|
video_introduce,
|
||||||
|
video_index,
|
||||||
|
video_url,
|
||||||
|
scenery_id,
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,23 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.UserOrderDetailMapper">
|
||||||
|
|
||||||
|
<resultMap type="userOrderDetail" id="UserOrderDetailMap">
|
||||||
|
<result property="orderDetailId" column="order_detail_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="orderId" column="order_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="sceneryTicketId" column="scenery_ticket_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="num" column="num" jdbcType="INTEGER"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
order_detail_id,
|
||||||
|
order_id,
|
||||||
|
scenery_ticket_id,
|
||||||
|
num,
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,39 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.UserOrdersMapper">
|
||||||
|
|
||||||
|
<resultMap type="userOrders" id="UserOrdersMap">
|
||||||
|
<result property="ordersId" column="orders_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="orderNo" column="order_no" jdbcType="VARCHAR"/>
|
||||||
|
<result property="userId" column="user_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="body" column="body" jdbcType="VARCHAR"/>
|
||||||
|
<result property="subject" column="subject" jdbcType="VARCHAR"/>
|
||||||
|
<result property="totalAmount" column="total_amount" jdbcType="NUMERIC"/>
|
||||||
|
<result property="orderStatus" column="order_status" jdbcType="INTEGER"/>
|
||||||
|
<result property="isDe" column="is_de" jdbcType="INTEGER"/>
|
||||||
|
<result property="aliTradeNo" column="ali_trade_no" jdbcType="VARCHAR"/>
|
||||||
|
<result property="wxTradeNo" column="wx_trade_no" jdbcType="VARCHAR"/>
|
||||||
|
<result property="userInvoicesId" column="user_invoices_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="version" column="version" jdbcType="INTEGER"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
orders_id,
|
||||||
|
order_no,
|
||||||
|
user_id,
|
||||||
|
`body`,
|
||||||
|
`subject`,
|
||||||
|
total_amount,
|
||||||
|
order_status,
|
||||||
|
is_de,
|
||||||
|
ali_trade_no,
|
||||||
|
wx_trade_no,
|
||||||
|
user_invoices_id,
|
||||||
|
create_time,
|
||||||
|
update_time,
|
||||||
|
version
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,23 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.UserShopMapper">
|
||||||
|
|
||||||
|
<resultMap type="userShop" id="UserShopMap">
|
||||||
|
<result property="userShopId" column="user_shop_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="userId" column="user_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="sceneryTicketId" column="scenery_ticket_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="num" column="num" jdbcType="INTEGER"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
user_shop_id,
|
||||||
|
user_id,
|
||||||
|
scenery_ticket_id,
|
||||||
|
num,
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,35 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.UserTicketsMapper">
|
||||||
|
|
||||||
|
<resultMap type="userTickets" id="UserTicketsMap">
|
||||||
|
<result property="userTicketsId" column="user_tickets_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="sceneryTicketId" column="scenery_ticket_id" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ticketsPass" column="tickets_pass" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ticketsNo" column="tickets_no" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ticketsCode" column="tickets_code" jdbcType="VARCHAR"/>
|
||||||
|
<result property="ticketsTime" column="tickets_time" jdbcType="INTEGER"/>
|
||||||
|
<result property="userId" column="user_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="isUse" column="is_use" jdbcType="VARCHAR"/>
|
||||||
|
<result property="usedTime" column="used_time" jdbcType="INTEGER"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="BIGINT"/>
|
||||||
|
<result property="version" column="version" jdbcType="INTEGER"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
user_tickets_id,
|
||||||
|
scenery_ticket_id,
|
||||||
|
tickets_pass,
|
||||||
|
tickets_no,
|
||||||
|
tickets_code,
|
||||||
|
tickets_time,
|
||||||
|
user_id,
|
||||||
|
is_use,
|
||||||
|
used_time,
|
||||||
|
create_time,
|
||||||
|
update_time,
|
||||||
|
version
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,32 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.UsersMapper">
|
||||||
|
|
||||||
|
<resultMap type="users" id="UsersMap">
|
||||||
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||||
|
<result property="username" column="username" jdbcType="VARCHAR"/>
|
||||||
|
<result property="password" column="password" jdbcType="VARCHAR"/>
|
||||||
|
<result property="userLogo" column="user_logo" jdbcType="VARCHAR"/>
|
||||||
|
<result property="nickname" column="nickname" jdbcType="VARCHAR"/>
|
||||||
|
<result property="gender" column="gender" jdbcType="VARCHAR"/>
|
||||||
|
<result property="openid" column="openid" jdbcType="VARCHAR"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,
|
||||||
|
username,
|
||||||
|
`password`,
|
||||||
|
user_logo,
|
||||||
|
nickname,
|
||||||
|
gender,
|
||||||
|
openid
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectUserByOpenId" resultMap="UsersMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
FROM users
|
||||||
|
WHERE openid = #{openId,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,17 @@
|
|||||||
|
<?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.hc.tripbusiness.mapper.UsersRoleMapper">
|
||||||
|
|
||||||
|
<resultMap type="usersRole" id="UsersRoleMap">
|
||||||
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||||
|
<result property="roleId" column="role_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="userId" column="user_id" jdbcType="INTEGER"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,
|
||||||
|
role_id,
|
||||||
|
user_id
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE configuration
|
||||||
|
PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||||
|
<configuration>
|
||||||
|
<!-- 核心配置文件 -->
|
||||||
|
<settings>
|
||||||
|
<!--驼峰式文件映射-->
|
||||||
|
<setting name="mapUnderscoreToCamelCase" value="true"/>
|
||||||
|
<!--sql log 日志打印-->
|
||||||
|
<!-- <setting name="logImpl" value="STDOUT_LOGGING" />-->
|
||||||
|
</settings>
|
||||||
|
|
||||||
|
<typeAliases>
|
||||||
|
<package name="com.hc.tripbusiness.model"/>
|
||||||
|
</typeAliases>
|
||||||
|
|
||||||
|
</configuration>
|
@ -0,0 +1,113 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||||
|
<component name="FacetManager">
|
||||||
|
<facet type="Spring" name="Spring">
|
||||||
|
<configuration />
|
||||||
|
</facet>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_X">
|
||||||
|
<output url="file://$MODULE_DIR$/target/classes" />
|
||||||
|
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="module" module-name="trip-core" />
|
||||||
|
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.4" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.5" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.1.4" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.6" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.6" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: tk.mybatis:mapper:4.1.5" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: redis.clients:jedis:3.1.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.37" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.20.Final" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.qiniu:qiniu-java-sdk:7.2.29" level="project" />
|
||||||
|
<orderEntry type="library" scope="RUNTIME" name="Maven: com.squareup.okhttp3:okhttp:3.14.9" level="project" />
|
||||||
|
<orderEntry type="library" scope="RUNTIME" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.auth0:java-jwt:3.3.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.5" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.5" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.5" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.12" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.jdom:jdom:2.0.2" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.alipay.sdk:alipay-sdk-java:4.9.9" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.50" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.62" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-miniapp:3.0.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-common:3.0.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.9" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.12" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.5" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.5" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.4" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.8.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
|
||||||
|
<orderEntry type="library" scope="RUNTIME" name="Maven: org.springframework.boot:spring-boot-devtools:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.9.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.spring4all:swagger-spring-boot-starter:1.6.0.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.13" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
|
||||||
|
<orderEntry type="library" name="Maven: io.springfox:springfox-bean-validators:2.7.0" level="project" />
|
||||||
|
</component>
|
||||||
|
</module>
|
@ -0,0 +1,118 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.hc</groupId>
|
||||||
|
<artifactId>fenis-trip</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
<artifactId>trip-core</artifactId>
|
||||||
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
|
<name>trip-core</name>
|
||||||
|
<description>Demo project for Spring Boot</description>
|
||||||
|
<properties>
|
||||||
|
<java.version>11</java.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mybatis.spring.boot</groupId>
|
||||||
|
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||||
|
<version>${mybatis.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>tk.mybatis</groupId>
|
||||||
|
<artifactId>mapper</artifactId>
|
||||||
|
<version>${tk.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>io.lettuce</groupId>
|
||||||
|
<artifactId>lettuce-core</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>redis.clients</groupId>
|
||||||
|
<artifactId>jedis</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-lang3</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.commons</groupId>
|
||||||
|
<artifactId>commons-pool2</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!--SpringBoot参数校验-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.qiniu</groupId>
|
||||||
|
<artifactId>qiniu-java-sdk</artifactId>
|
||||||
|
<version>${qiniu.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- JWT -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.auth0</groupId>
|
||||||
|
<artifactId>java-jwt</artifactId>
|
||||||
|
<version>${auth0.jwt.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpcore</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
|
<artifactId>httpclient</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.jdom/jdom -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.jdom</groupId>
|
||||||
|
<artifactId>jdom</artifactId>
|
||||||
|
<version>2.0.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- https://mvnrepository.com/artifact/commons-httpclient/commons-httpclient -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-httpclient</groupId>
|
||||||
|
<artifactId>commons-httpclient</artifactId>
|
||||||
|
<version>3.1</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.alipay.sdk</groupId>
|
||||||
|
<artifactId>alipay-sdk-java</artifactId>
|
||||||
|
<version>${alipay.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.binarywang</groupId>
|
||||||
|
<artifactId>weixin-java-miniapp</artifactId>
|
||||||
|
<version>${weixin.miniapp.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</project>
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.hc.tripcore.utils.constants;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 10696
|
||||||
|
* @since 2020/11/26 14:49
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface OrderConstants {
|
||||||
|
|
||||||
|
String ORDER_REFUND = "10000";
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package com.hc.tripcore.utils.enums;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author JIA
|
||||||
|
* 自定义错误枚举类
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
public enum ErrorEnum {
|
||||||
|
|
||||||
|
/* 系统级别 */
|
||||||
|
|
||||||
|
ERROR_REQUEST(100,"请求失败"),
|
||||||
|
ERROR_BAD_REQUEST(400,"请求语法错误"),
|
||||||
|
ERROR_UNAUTHORIZED(401,"未授权"),
|
||||||
|
ERROR_FORBIDDEN(403,"服务器拒绝请求"),
|
||||||
|
ERROR_NOT_FOUND(404,"请求资源不存在"),
|
||||||
|
ERROR_METHOD_NOT_AllOWED(405,"指定的请求方法,被禁用"),
|
||||||
|
ERROR_REQUEST_TIMEOUT(408,"请求超时"),
|
||||||
|
ERROR_REQUEST_ENTITY_TOO_LARGE(413,"请求实体过大,超出处理能力"),
|
||||||
|
ERROR_REQUEST_URI_TOO_LONG(414,"请求URL太长,拒绝访问")
|
||||||
|
|
||||||
|
;
|
||||||
|
private final Integer key;
|
||||||
|
private final String msg;
|
||||||
|
|
||||||
|
ErrorEnum(Integer key, String msg) {
|
||||||
|
this.key = key;
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue