Commit 372c3a76 authored by hezhen's avatar hezhen

手机上

parent ee01af8c
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ace-security</artifactId>
<groupId>com.github.wxiaoqi</groupId>
<version>2.0-SNAPSHOT</version>
</parent>
<groupId>com.xxfc.platform</groupId>
<modules>
<module>xx-tour-api</module>
<module>xx-tour-server</module>
</modules>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<artifactId>xx-tour</artifactId>
</project>
\ No newline at end of file
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.xxfc.common</groupId>
<artifactId>xx-common-platform-web</artifactId>
<version>2.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxfc.platform</groupId>
<artifactId>xx-tour-server</artifactId>
<dependencies>
<!-- 自己项目 -->
<dependency>
<groupId>com.xxfc.platform</groupId>
<artifactId>xx-tour-api</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- 此插件用来生成通用mapper的代码 -->
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<configurationFile>
${basedir}/src/main/resources/builder/generatorConfig.xml
</configurationFile>
<overwrite>true</overwrite>
<verbose>true</verbose>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.30</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper</artifactId>
<version>${mapper.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package com.xxfc.platform.tour;
import com.ace.cache.EnableAceCache;
import com.github.wxiaoqi.security.auth.client.EnableAceAuthClient;
import com.spring4all.swagger.EnableSwagger2Doc;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableDiscoveryClient
@EnableScheduling
@EnableAceAuthClient
@EnableFeignClients({"com.github.wxiaoqi.security.auth.client.feign", "com.xxfc.platform.tour.feign"})
@EnableAceCache
@tk.mybatis.spring.annotation.MapperScan(basePackages = "com.xxfc.platform.tour.mapper")
public class TourApplication {
public static void main(String[] args) {
SpringApplication.run(TourApplication.class, args);
}
}
package com.xxfc.platform.tour.biz;
import com.xxfc.platform.tour.mapper.TourBannerMapper;
import org.springframework.stereotype.Service;
import com.xxfc.platform.tour.entity.TourBanner;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
/**
* 首页banner图
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Service
public class TourBannerBiz extends BaseBiz<TourBannerMapper,TourBanner> {
}
\ No newline at end of file
package com.xxfc.platform.tour.biz;
import com.xxfc.platform.tour.mapper.TourGoodBannerMapper;
import org.springframework.stereotype.Service;
import com.xxfc.platform.tour.entity.TourGoodBanner;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
/**
* 商品轮播图
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Service
public class TourGoodBannerBiz extends BaseBiz<TourGoodBannerMapper,TourGoodBanner> {
}
\ No newline at end of file
package com.xxfc.platform.tour.biz;
import com.xxfc.platform.tour.mapper.TourGoodMapper;
import org.springframework.stereotype.Service;
import com.xxfc.platform.tour.entity.TourGood;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
/**
* 旅游商品表
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Service
public class TourGoodBiz extends BaseBiz<TourGoodMapper,TourGood> {
}
\ No newline at end of file
package com.xxfc.platform.tour.biz;
import com.xxfc.platform.tour.mapper.TourGoodSiteMapper;
import org.springframework.stereotype.Service;
import com.xxfc.platform.tour.entity.TourGoodSite;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
/**
* 路线站点表
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Service
public class TourGoodSiteBiz extends BaseBiz<TourGoodSiteMapper,TourGoodSite> {
}
\ No newline at end of file
package com.xxfc.platform.tour.biz;
import com.xxfc.platform.tour.mapper.TourGoodSpeMapper;
import org.springframework.stereotype.Service;
import com.xxfc.platform.tour.entity.TourGoodSpe;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
/**
* 旅游商品规格表
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Service
public class TourGoodSpeBiz extends BaseBiz<TourGoodSpeMapper,TourGoodSpe> {
}
\ No newline at end of file
package com.xxfc.platform.tour.biz;
import com.xxfc.platform.tour.mapper.TourGoodSpePriceMapper;
import org.springframework.stereotype.Service;
import com.xxfc.platform.tour.entity.TourGoodSpePrice;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
/**
* 旅游商品规格价格表
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Service
public class TourGoodSpePriceBiz extends BaseBiz<TourGoodSpePriceMapper,TourGoodSpePrice> {
}
\ No newline at end of file
package com.xxfc.platform.tour.biz;
import com.xxfc.platform.tour.mapper.TourGoodTagMapper;
import org.springframework.stereotype.Service;
import com.xxfc.platform.tour.entity.TourGoodTag;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
/**
* 商品标签表
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Service
public class TourGoodTagBiz extends BaseBiz<TourGoodTagMapper,TourGoodTag> {
}
\ No newline at end of file
package com.xxfc.platform.tour.biz;
import com.xxfc.platform.tour.mapper.TourTagBannerMapper;
import org.springframework.stereotype.Service;
import com.xxfc.platform.tour.entity.TourTagBanner;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
/**
* 标签轮播图
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Service
public class TourTagBannerBiz extends BaseBiz<TourTagBannerMapper,TourTagBanner> {
}
\ No newline at end of file
package com.xxfc.platform.tour.biz;
import com.xxfc.platform.tour.mapper.TourTagMapper;
import org.springframework.stereotype.Service;
import com.xxfc.platform.tour.entity.TourTag;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
/**
* 旅游路线标签
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Service
public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> {
}
\ No newline at end of file
package com.xxfc.platform.tour.biz;
import com.xxfc.platform.tour.mapper.TourUserMapper;
import org.springframework.stereotype.Service;
import com.xxfc.platform.tour.entity.TourUser;
import com.github.wxiaoqi.security.common.biz.BaseBiz;
/**
* 出游人信息表
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-06 11:41:51
*/
@Service
public class TourUserBiz extends BaseBiz<TourUserMapper,TourUser> {
}
\ No newline at end of file
package com.xxfc.platform.tour.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
/**
* ${DESCRIPTION}
*
* @author wanghaobin
* @create 2017-06-21 8:39
*/
@Configuration
@Primary
public class RedisConfiguration {
@Bean
public RedisTemplate<String, Object> customRedisTemplate(RedisConnectionFactory factory) {
RedisTemplate redisTemplate = new RedisTemplate();
redisTemplate.setConnectionFactory(factory);
RedisSerializer<String> stringSerializer = new StringRedisSerializer();
redisTemplate.setKeySerializer(stringSerializer);
redisTemplate.setValueSerializer(stringSerializer);
redisTemplate.setHashKeySerializer(stringSerializer);
redisTemplate.setHashValueSerializer(stringSerializer);
redisTemplate.afterPropertiesSet();
return redisTemplate;
}
}
package com.xxfc.platform.tour.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
@Configuration
public class RestConfiguration {
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
}
package com.xxfc.platform.tour.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Parameter;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.ArrayList;
import java.util.List;
/**
* @Description : swagger配置配置
* @Author : Mars
* @Date : 2017年9月6日
*/
@Configuration
@EnableSwagger2
public class SwaggerConfig {
/**
* Every Docket bean is picked up by the swagger-mvc framework - allowing for multiple
* swagger groups i.e. same code base multiple swagger resource listings.
*/
@Bean
public Docket customDocket(){
ParameterBuilder ticketPar = new ParameterBuilder();
List<Parameter> pars = new ArrayList<Parameter>();
ticketPar.name("Authorization").description("user Authorization")
.modelRef(new ModelRef("string")).parameterType("header")
.required(false).build(); //header中的ticket参数非必填,传空也可以
pars.add(ticketPar.build()); //根据每个方法名也知道当前方法在设置什么参数
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.xxfc.platform.tour"))
//.apis(RequestHandlerSelectors.any())
.build()
.globalOperationParameters(pars)
.apiInfo(apiInfo());
}
ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("api swagger document")
.description("前后端联调swagger api 文档")
.version("2.1.5.5")
.build();
}
}
\ No newline at end of file
package com.xxfc.platform.app.config;
import com.github.wxiaoqi.security.auth.client.interceptor.ServiceAuthRestInterceptor;
import com.github.wxiaoqi.security.auth.client.interceptor.UserAuthRestInterceptor;
import com.github.wxiaoqi.security.common.handler.GlobalExceptionHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.util.ArrayList;
import java.util.Collections;
@Configuration("tourWebConfig")
@Primary
public class WebConfiguration implements WebMvcConfigurer {
@Bean
GlobalExceptionHandler getGlobalExceptionHandler() {
return new GlobalExceptionHandler();
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(getServiceAuthRestInterceptor()).
addPathPatterns(getIncludePathPatterns());
registry.addInterceptor(getUserAuthRestInterceptor()).
addPathPatterns(getIncludePathPatterns());
}
@Bean
ServiceAuthRestInterceptor getServiceAuthRestInterceptor() {
return new ServiceAuthRestInterceptor();
}
@Bean
UserAuthRestInterceptor getUserAuthRestInterceptor() {
return new UserAuthRestInterceptor();
}
/**
* 需要用户和服务认证判断的路径
* @return
*/
private ArrayList<String> getIncludePathPatterns() {
ArrayList<String> list = new ArrayList<>();
String[] urls = {
"/tour/**"
};
Collections.addAll(list, urls);
return list;
}
}
package com.xxfc.platform.tour.rest;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.tour.biz.TourBannerBiz;
import com.xxfc.platform.tour.entity.TourBanner;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("tourBanner")
public class TourBannerController extends BaseController<TourBannerBiz,TourBanner> {
}
\ No newline at end of file
package com.xxfc.platform.tour.rest;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.tour.biz.TourGoodBannerBiz;
import com.xxfc.platform.tour.entity.TourGoodBanner;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("tourGoodBanner")
public class TourGoodBannerController extends BaseController<TourGoodBannerBiz,TourGoodBanner> {
}
\ No newline at end of file
package com.xxfc.platform.tour.rest;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.tour.biz.TourGoodBiz;
import com.xxfc.platform.tour.entity.TourGood;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("tourGood")
public class TourGoodController extends BaseController<TourGoodBiz,TourGood> {
}
\ No newline at end of file
package com.xxfc.platform.tour.rest;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.tour.biz.TourGoodSiteBiz;
import com.xxfc.platform.tour.entity.TourGoodSite;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("tourGoodSite")
public class TourGoodSiteController extends BaseController<TourGoodSiteBiz,TourGoodSite> {
}
\ No newline at end of file
package com.xxfc.platform.tour.rest;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.tour.biz.TourGoodSpeBiz;
import com.xxfc.platform.tour.entity.TourGoodSpe;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("tourGoodSpe")
public class TourGoodSpeController extends BaseController<TourGoodSpeBiz,TourGoodSpe> {
}
\ No newline at end of file
package com.xxfc.platform.tour.rest;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.tour.biz.TourGoodSpePriceBiz;
import com.xxfc.platform.tour.entity.TourGoodSpePrice;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("tourGoodSpePrice")
public class TourGoodSpePriceController extends BaseController<TourGoodSpePriceBiz,TourGoodSpePrice> {
}
\ No newline at end of file
package com.xxfc.platform.tour.rest;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.tour.biz.TourGoodTagBiz;
import com.xxfc.platform.tour.entity.TourGoodTag;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("tourGoodTag")
public class TourGoodTagController extends BaseController<TourGoodTagBiz,TourGoodTag> {
}
\ No newline at end of file
package com.xxfc.platform.tour.rest;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.tour.biz.TourTagBannerBiz;
import com.xxfc.platform.tour.entity.TourTagBanner;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("tourTagBanner")
public class TourTagBannerController extends BaseController<TourTagBannerBiz,TourTagBanner> {
}
\ No newline at end of file
package com.xxfc.platform.tour.rest;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.tour.biz.TourTagBiz;
import com.xxfc.platform.tour.entity.TourTag;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("tourTag")
public class TourTagController extends BaseController<TourTagBiz,TourTag> {
}
\ No newline at end of file
package com.xxfc.platform.tour.rest;
import com.github.wxiaoqi.security.common.rest.BaseController;
import com.xxfc.platform.tour.biz.TourUserBiz;
import com.xxfc.platform.tour.entity.TourUser;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("tourUser")
public class TourUserController extends BaseController<TourUserBiz,TourUser> {
}
\ No newline at end of file
#spring:
# application:
# name: vehicle
# cloud:
# nacos:
# config:
# server-addr: 127.0.0.1:8848
# file-extension: yaml
# profiles:
# active: dev
spring:
profiles:
active: dev
application:
name: xx-tour
cloud:
nacos:
config:
file-extension: yaml
---
spring:
profiles: dev
cloud:
nacos:
config:
server-addr: 127.0.0.1:8848
---
spring:
profiles: pro
cloud:
nacos:
config:
server-addr: 10.5.52.2:8848
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!--<properties resource="dev.properties"/>-->
<context id="Mysql" targetRuntime="MyBatis3Simple" defaultModelType="flat">
<property name="beginningDelimiter" value="`"/>
<property name="endingDelimiter" value="`"/>
<property name="mergeable" value="false"></property>
<plugin type="tk.mybatis.mapper.generator.MapperPlugin">
<property name="mappers" value="tk.mybatis.mapper.common.Mapper"/>
</plugin>
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/vehicle?useUnicode=true&amp;characterEncoding=UTF8"
userId="root"
password="xx2019fc">
</jdbcConnection>
<javaModelGenerator targetPackage="${targetModelPackage}" targetProject="${targetJavaProject}"/>
<sqlMapGenerator targetPackage="${targetXMLPackage}" targetProject="${targetResourcesProject}"/>
<javaClientGenerator targetPackage="${targetMapperPackage}" targetProject="${targetJavaProject}"
type="XMLMAPPER"/>
<!-- <table tableName="vehicle" domainObjectName="Vehicle">-->
<!-- </table>-->
<!-- <table tableName="vehicle_book_info" domainObjectName="VehicleBookInfo">-->
<!-- </table>-->
<!-- <table tableName="vehicle_book_record" domainObjectName="VehicleBookRecord">-->
<!-- </table>-->
<!-- <table tableName="branch_company" domainObjectName="BranchCompany">-->
<!-- </table>-->
<!-- <table tableName="branch_company_stock_info" domainObjectName="BranchCompanyStockInfo"></table>-->
<!-- <table tableName="branch_company_stock_apply_info" domainObjectName="BranchCompanyStockApplyInfo"></table>-->
<table tableName="vehicle_upkeep_item" domainObjectName="VehicleUpkeepItem"></table>
<table tableName="vehicle_upkeep_log" domainObjectName="VehicleUpkeepLog"></table>
</context>
</generatorConfiguration>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment