New 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"> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | |
| | | <artifactId>guns-admin</artifactId> |
| | | <name>guns-admin</name> |
| | | <description>guns 的spring boot版本</description> |
| | | <parent> |
| | | <groupId>com.stylefeng</groupId> |
| | | <artifactId>guns-parent</artifactId> |
| | | <version>1.0.0</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <packaging>war</packaging> |
| | | |
| | | <properties> |
| | | <hutool.version>5.3.8</hutool.version> |
| | | </properties> |
| | | |
| | | <dependencies> |
| | | |
| | | <!-- hutool工具类--> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-core</artifactId> |
| | | <version>${hutool.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-crypto</artifactId> |
| | | <version>${hutool.version}</version> |
| | | </dependency> |
| | | <!--<dependency> |
| | | <groupId>org.springframework.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-netflix-hystrix</artifactId> |
| | | </dependency>--> |
| | | |
| | | <dependency> |
| | | <groupId>com.stylefeng</groupId> |
| | | <artifactId>guns-core</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.stylefeng</groupId> |
| | | <artifactId>guns-generator</artifactId> |
| | | </dependency> |
| | | |
| | | <!--spring boot依赖--> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-aop</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-web</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-cache</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-validation</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-test</artifactId> |
| | | <scope>test</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-devtools</artifactId> |
| | | <optional>true</optional> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>redis.clients</groupId> |
| | | <artifactId>jedis</artifactId> |
| | | <version>2.9.0</version> |
| | | </dependency> |
| | | |
| | | <!-- 导入Excel数据依赖 start --> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi</artifactId> |
| | | <version>5.0.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>5.0.0</version> |
| | | </dependency> |
| | | |
| | | <!--shiro依赖--> |
| | | <dependency> |
| | | <groupId>org.apache.shiro</groupId> |
| | | <artifactId>shiro-core</artifactId> |
| | | <exclusions> |
| | | <exclusion> |
| | | <artifactId>slf4j-api</artifactId> |
| | | <groupId>org.slf4j</groupId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.shiro</groupId> |
| | | <artifactId>shiro-spring</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.shiro</groupId> |
| | | <artifactId>shiro-ehcache</artifactId> |
| | | <exclusions> |
| | | <exclusion> |
| | | <artifactId>slf4j-api</artifactId> |
| | | <groupId>org.slf4j</groupId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.ehcache</groupId> |
| | | <artifactId>ehcache</artifactId> |
| | | </dependency> |
| | | |
| | | <!--极光推送--> |
| | | <dependency> |
| | | <groupId>cn.jpush.api</groupId> |
| | | <artifactId>jpush-client</artifactId> |
| | | <version>3.2.17</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.jpush.api</groupId> |
| | | <artifactId>jiguang-common</artifactId> |
| | | <version>1.1.1</version> |
| | | </dependency> |
| | | |
| | | <!--需要分布式session的话需要放开注释--> |
| | | <!--<dependency>--> |
| | | <!--<groupId>org.springframework.session</groupId>--> |
| | | <!--<artifactId>spring-session-data-redis</artifactId>--> |
| | | <!--</dependency>--> |
| | | <!--<dependency>--> |
| | | <!--<groupId>org.springframework.boot</groupId>--> |
| | | <!--<artifactId>spring-boot-starter-data-redis</artifactId>--> |
| | | <!--</dependency>--> |
| | | |
| | | <dependency> |
| | | <groupId>com.github.penggle</groupId> |
| | | <artifactId>kaptcha</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.zxing</groupId> |
| | | <artifactId>core</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ibeetl</groupId> |
| | | <artifactId>beetl</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger2</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger-ui</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>io.jsonwebtoken</groupId> |
| | | <artifactId>jjwt</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>commons-io</groupId> |
| | | <artifactId>commons-io</artifactId> |
| | | <version>2.6</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.aliyun.oss</groupId> |
| | | <artifactId>aliyun-sdk-oss</artifactId> |
| | | <version>2.5.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.code.gson</groupId> |
| | | <artifactId>gson</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.quartz-scheduler</groupId> |
| | | <artifactId>quartz</artifactId> |
| | | <version>2.2.1</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.rongcloud.im</groupId> |
| | | <artifactId>server-sdk-java</artifactId> |
| | | <version>3.0.4</version> |
| | | </dependency> |
| | | |
| | | |
| | | <dependency> |
| | | <groupId>org.apache.httpcomponents</groupId> |
| | | <artifactId>httpclient</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>commons-httpclient</groupId> |
| | | <artifactId>commons-httpclient</artifactId> |
| | | <version>3.1</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.apache.httpcomponents</groupId> |
| | | <artifactId>httpmime</artifactId> |
| | | <version>4.5.6</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | </dependency> |
| | | <!--引入本地工行支付jar end--> |
| | | </dependencies> |
| | | |
| | | |
| | | |
| | | |
| | | <build> |
| | | <!--<plugins>--> |
| | | <!--<plugin>--> |
| | | <!--<groupId>org.springframework.boot</groupId>--> |
| | | <!--<artifactId>spring-boot-maven-plugin</artifactId>--> |
| | | <!--<configuration>--> |
| | | <!--<fork>true</fork><!– 如果没有该项配置,肯呢个devtools不会起作用,即应用不会restart –>--> |
| | | <!--</configuration>--> |
| | | <!--</plugin>--> |
| | | <!--<plugin>--> |
| | | <!--<groupId>org.apache.maven.plugins</groupId>--> |
| | | <!--<artifactId>maven-surefire-plugin</artifactId>--> |
| | | <!--<configuration>--> |
| | | <!--<skip>true</skip>--> |
| | | <!--</configuration>--> |
| | | <!--</plugin>--> |
| | | <!--</plugins>--> |
| | | |
| | | <!--打包war包引入本地jar的打包方式--> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-war-plugin</artifactId> |
| | | <configuration> |
| | | <!-- 设置成false,否则检查web.xml是否存在。因为springboot是没有web.xml的 --> |
| | | <failOnMissingWebXml>false</failOnMissingWebXml> |
| | | <!--打包后的项目名--> |
| | | <!--<warName>example</warName>--> |
| | | <!--<webResources>--> |
| | | <!--<resource>--> |
| | | <!--把本地lib里面的jar复制到lib--> |
| | | <!--<directory>${project.basedir}/lib</directory>--> |
| | | <!--<targetPath>WEB-INF/lib/</targetPath>--> |
| | | <!--<includes>--> |
| | | <!--<include>**/*.jar</include>--> |
| | | <!--</includes>--> |
| | | <!--</resource>--> |
| | | <!--</webResources>--> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | |
| | | <resources> |
| | | <resource> |
| | | <directory>lib</directory> |
| | | <targetPath>/BOOT-INF/lib/</targetPath> |
| | | <includes> |
| | | <include>**/*.jar</include> |
| | | </includes> |
| | | </resource> |
| | | <resource> |
| | | <directory>src/main/webapp</directory> |
| | | </resource> |
| | | <resource> |
| | | <directory>src/main/resources</directory> |
| | | <filtering>true</filtering> |
| | | </resource> |
| | | <resource> |
| | | <directory>src/main/java</directory> |
| | | <includes> |
| | | <include>**/*.xml</include> |
| | | </includes> |
| | | </resource> |
| | | </resources> |
| | | </build> |
| | | |
| | | </project> |
New file |
| | |
| | | package com.stylefeng.guns; |
| | | |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import org.apache.http.client.HttpClient; |
| | | import org.apache.http.config.SocketConfig; |
| | | import org.apache.http.impl.client.HttpClientBuilder; |
| | | import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; |
| | | import org.springframework.http.converter.StringHttpMessageConverter; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.nio.charset.StandardCharsets; |
| | | |
| | | /** |
| | | * SpringBoot方式启动类 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/21 12:06 |
| | | */ |
| | | @EnableScheduling//开启定时任务 |
| | | @SpringBootApplication |
| | | public class GunsApplication { |
| | | |
| | | private final static Logger logger = LoggerFactory.getLogger(GunsApplication.class); |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(GunsApplication.class, args); |
| | | logger.info("GunsApplication is success!"); |
| | | } |
| | | |
| | | @Bean //通过ip地址调用 |
| | | public RestTemplate restTemplate() { |
| | | PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(); |
| | | connectionManager.setDefaultSocketConfig(SocketConfig.custom().setTcpNoDelay(true).build()); |
| | | connectionManager.setDefaultMaxPerRoute(100);//最大并发连接 |
| | | connectionManager.setMaxTotal(200); // 总的最大连接数 |
| | | HttpClient httpClient = HttpClientBuilder.create().setConnectionManager(connectionManager).build(); |
| | | HttpComponentsClientHttpRequestFactory httpRequestFactory = new HttpComponentsClientHttpRequestFactory(httpClient); |
| | | httpRequestFactory.setConnectionRequestTimeout(30 * 1000); |
| | | httpRequestFactory.setConnectTimeout(30 * 3000); |
| | | httpRequestFactory.setReadTimeout(30 * 3000); |
| | | RestTemplate restTemplate = new RestTemplate(httpRequestFactory); |
| | | restTemplate.getMessageConverters().set(1, new StringHttpMessageConverter(StandardCharsets.UTF_8)); |
| | | return restTemplate; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns; |
| | | |
| | | import org.springframework.boot.builder.SpringApplicationBuilder; |
| | | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; |
| | | |
| | | /** |
| | | * Guns Web程序启动类 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-21 9:43 |
| | | */ |
| | | public class GunsServletInitializer extends SpringBootServletInitializer { |
| | | |
| | | @Override |
| | | protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { |
| | | return builder.sources(GunsApplication.class); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.config; |
| | | |
| | | import net.sf.ehcache.CacheManager; |
| | | import org.springframework.cache.annotation.EnableCaching; |
| | | import org.springframework.cache.ehcache.EhCacheCacheManager; |
| | | import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.core.io.ClassPathResource; |
| | | |
| | | /** |
| | | * ehcache配置 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-20 23:11 |
| | | */ |
| | | @Configuration |
| | | @EnableCaching |
| | | public class EhCacheConfig { |
| | | |
| | | /** |
| | | * EhCache的配置 |
| | | */ |
| | | @Bean |
| | | public EhCacheCacheManager cacheManager(CacheManager cacheManager) { |
| | | return new EhCacheCacheManager(cacheManager); |
| | | } |
| | | |
| | | /** |
| | | * EhCache的配置 |
| | | */ |
| | | @Bean |
| | | public EhCacheManagerFactoryBean ehcache() { |
| | | EhCacheManagerFactoryBean ehCacheManagerFactoryBean = new EhCacheManagerFactoryBean(); |
| | | ehCacheManagerFactoryBean.setConfigLocation(new ClassPathResource("ehcache.xml")); |
| | | return ehCacheManagerFactoryBean; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.config; |
| | | |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.context.annotation.PropertySource; |
| | | import redis.clients.jedis.JedisPool; |
| | | import redis.clients.jedis.JedisPoolConfig; |
| | | |
| | | @Configuration |
| | | @PropertySource("classpath:redis.properties") |
| | | public class RedisConfig { |
| | | @Value("${spring.redis.host}") |
| | | private String host; |
| | | |
| | | @Value("${spring.redis.port}") |
| | | private int port; |
| | | |
| | | @Value("${spring.redis.timeout}") |
| | | private int timeout; |
| | | |
| | | @Value("${spring.redis.jedis.pool.max-idle}") |
| | | private int maxIdle; |
| | | |
| | | @Value("${spring.redis.jedis.pool.max-wait}") |
| | | private long maxWaitMillis; |
| | | |
| | | @Value("${spring.redis.password}") |
| | | private String password; |
| | | |
| | | @Value("${spring.redis.block-when-exhausted}") |
| | | private boolean blockWhenExhausted; |
| | | |
| | | @Bean |
| | | public JedisPool redisPoolFactory() throws Exception{ |
| | | JedisPoolConfig jedisPoolConfig = new JedisPoolConfig(); |
| | | jedisPoolConfig.setMaxIdle(maxIdle); |
| | | jedisPoolConfig.setMaxWaitMillis(maxWaitMillis); |
| | | // 连接耗尽时是否阻塞, false报异常,ture阻塞直到超时, 默认true |
| | | jedisPoolConfig.setBlockWhenExhausted(blockWhenExhausted); |
| | | // 是否启用pool的jmx管理功能, 默认true |
| | | jedisPoolConfig.setJmxEnabled(true); |
| | | JedisPool jedisPool = new JedisPool(jedisPoolConfig, host, port, timeout, password); |
| | | return jedisPool; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.config; |
| | | |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | |
| | | /** |
| | | * spring session配置 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-07-13 21:05 |
| | | */ |
| | | //@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 1800) //session过期时间 如果部署多机环境,需要打开注释 |
| | | @ConditionalOnProperty(prefix = "guns", name = "spring-session-open", havingValue = "true") |
| | | public class SpringSessionConfig { |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.config; |
| | | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import springfox.documentation.builders.ApiInfoBuilder; |
| | | import springfox.documentation.builders.PathSelectors; |
| | | import springfox.documentation.builders.RequestHandlerSelectors; |
| | | import springfox.documentation.service.ApiInfo; |
| | | import springfox.documentation.spi.DocumentationType; |
| | | import springfox.documentation.spring.web.plugins.Docket; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | /** |
| | | * swagger配置类 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017年6月1日19:42:59 |
| | | */ |
| | | @Configuration |
| | | @EnableSwagger2 |
| | | @ConditionalOnProperty(prefix = "guns", name = "swagger-open", havingValue = "true") |
| | | public class SwaggerConfig{ |
| | | |
| | | @Bean |
| | | public Docket createRestApi() { |
| | | return new Docket(DocumentationType.SWAGGER_2) |
| | | .apiInfo(apiInfo()) |
| | | .select() |
| | | .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) //这里采用包含注解的方式来确定要显示的接口 |
| | | //.apis(RequestHandlerSelectors.basePackage("com.stylefeng.guns.controller.system.controller")) //这里采用包扫描的方式来确定要显示的接口 |
| | | .paths(PathSelectors.any()) |
| | | .build(); |
| | | } |
| | | |
| | | private ApiInfo apiInfo() { |
| | | return new ApiInfoBuilder() |
| | | .title("Guns Doc") |
| | | .description("Guns Api文档") |
| | | .termsOfServiceUrl("http://git.oschina.net/naan1993/guns") |
| | | .contact("stylefeng") |
| | | .version("2.0") |
| | | .build(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.config.datasource; |
| | | |
| | | import com.alibaba.druid.pool.DruidDataSource; |
| | | import com.baomidou.mybatisplus.plugins.OptimisticLockerInterceptor; |
| | | import com.baomidou.mybatisplus.plugins.PaginationInterceptor; |
| | | import com.stylefeng.guns.core.config.properties.DruidProperties; |
| | | import com.stylefeng.guns.core.config.properties.MutiDataSourceProperties; |
| | | import com.stylefeng.guns.core.datascope.DataScopeInterceptor; |
| | | import com.stylefeng.guns.core.mutidatasource.DynamicDataSource; |
| | | import com.stylefeng.guns.core.mutidatasource.aop.MultiSourceExAop; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.jdbc.datasource.DataSourceTransactionManager; |
| | | import org.springframework.transaction.annotation.EnableTransactionManagement; |
| | | |
| | | import java.sql.SQLException; |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * 多数据源配置<br/> |
| | | * <p> |
| | | * 注:由于引入多数据源,所以让spring事务的aop要在多数据源切换aop的后面 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/20 21:58 |
| | | */ |
| | | @Configuration |
| | | @ConditionalOnProperty(prefix = "guns.muti-datasource", name = "open", havingValue = "true") |
| | | @EnableTransactionManagement(order = 2) |
| | | @MapperScan(basePackages = {"com.stylefeng.guns.modular.system.dao"}) |
| | | public class MultiDataSourceConfig { |
| | | |
| | | @Bean |
| | | @ConfigurationProperties(prefix = "guns.muti-datasource") |
| | | public MutiDataSourceProperties mutiDataSourceProperties() { |
| | | return new MutiDataSourceProperties(); |
| | | } |
| | | |
| | | @Bean |
| | | public MultiSourceExAop multiSourceExAop() { |
| | | return new MultiSourceExAop(); |
| | | } |
| | | |
| | | /** |
| | | * guns的数据源 |
| | | */ |
| | | private DruidDataSource dataSource(DruidProperties druidProperties) { |
| | | DruidDataSource dataSource = new DruidDataSource(); |
| | | druidProperties.config(dataSource); |
| | | return dataSource; |
| | | } |
| | | |
| | | /** |
| | | * 多数据源,第二个数据源 |
| | | */ |
| | | private DruidDataSource bizDataSource(DruidProperties druidProperties, MutiDataSourceProperties mutiDataSourceProperties) { |
| | | DruidDataSource dataSource = new DruidDataSource(); |
| | | druidProperties.config(dataSource); |
| | | mutiDataSourceProperties.config(dataSource); |
| | | return dataSource; |
| | | } |
| | | |
| | | /** |
| | | * 多数据源连接池配置 |
| | | */ |
| | | @Bean |
| | | public DynamicDataSource mutiDataSource(DruidProperties druidProperties, MutiDataSourceProperties mutiDataSourceProperties) { |
| | | |
| | | DruidDataSource dataSourceGuns = dataSource(druidProperties); |
| | | DruidDataSource bizDataSource = bizDataSource(druidProperties, mutiDataSourceProperties); |
| | | |
| | | try { |
| | | dataSourceGuns.init(); |
| | | bizDataSource.init(); |
| | | } catch (SQLException sql) { |
| | | sql.printStackTrace(); |
| | | } |
| | | |
| | | DynamicDataSource dynamicDataSource = new DynamicDataSource(); |
| | | HashMap<Object, Object> hashMap = new HashMap<>(); |
| | | hashMap.put(mutiDataSourceProperties.getDataSourceNames()[0], dataSourceGuns); |
| | | hashMap.put(mutiDataSourceProperties.getDataSourceNames()[1], bizDataSource); |
| | | dynamicDataSource.setTargetDataSources(hashMap); |
| | | dynamicDataSource.setDefaultTargetDataSource(dataSourceGuns); |
| | | return dynamicDataSource; |
| | | } |
| | | |
| | | /** |
| | | * mybatis-plus分页插件 |
| | | */ |
| | | @Bean |
| | | public PaginationInterceptor paginationInterceptor() { |
| | | return new PaginationInterceptor(); |
| | | } |
| | | |
| | | /** |
| | | * 数据范围mybatis插件 |
| | | */ |
| | | @Bean |
| | | public DataScopeInterceptor dataScopeInterceptor() { |
| | | return new DataScopeInterceptor(); |
| | | } |
| | | |
| | | /** |
| | | * 乐观锁mybatis插件 |
| | | */ |
| | | @Bean |
| | | public OptimisticLockerInterceptor optimisticLockerInterceptor() { |
| | | return new OptimisticLockerInterceptor(); |
| | | } |
| | | |
| | | /** |
| | | * 事务配置 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2018/6/27 23:11 |
| | | */ |
| | | @Bean |
| | | public DataSourceTransactionManager dataSourceTransactionManager(DynamicDataSource mutiDataSource) { |
| | | return new DataSourceTransactionManager(mutiDataSource); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.config.datasource; |
| | | |
| | | import com.alibaba.druid.pool.DruidDataSource; |
| | | import com.baomidou.mybatisplus.plugins.OptimisticLockerInterceptor; |
| | | import com.baomidou.mybatisplus.plugins.PaginationInterceptor; |
| | | import com.stylefeng.guns.core.config.properties.DruidProperties; |
| | | import com.stylefeng.guns.core.datascope.DataScopeInterceptor; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.transaction.annotation.EnableTransactionManagement; |
| | | |
| | | /** |
| | | * 多数据源配置 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/20 21:58 |
| | | */ |
| | | @Configuration |
| | | @ConditionalOnProperty(prefix = "guns.muti-datasource", name = "open", havingValue = "false", matchIfMissing = true) |
| | | @EnableTransactionManagement |
| | | @MapperScan(basePackages = {"com.stylefeng.guns.modular.system.dao"}) |
| | | public class SingleDataSourceConfig { |
| | | |
| | | /** |
| | | * 单数据源连接池配置 |
| | | */ |
| | | @Bean |
| | | public DruidDataSource dataSource(DruidProperties druidProperties) { |
| | | DruidDataSource dataSource = new DruidDataSource(); |
| | | druidProperties.config(dataSource); |
| | | return dataSource; |
| | | } |
| | | |
| | | /** |
| | | * mybatis-plus分页插件 |
| | | */ |
| | | @Bean |
| | | public PaginationInterceptor paginationInterceptor() { |
| | | return new PaginationInterceptor(); |
| | | } |
| | | |
| | | /** |
| | | * 数据范围mybatis插件 |
| | | */ |
| | | @Bean |
| | | public DataScopeInterceptor dataScopeInterceptor() { |
| | | return new DataScopeInterceptor(); |
| | | } |
| | | |
| | | /** |
| | | * 乐观锁mybatis插件 |
| | | */ |
| | | @Bean |
| | | public OptimisticLockerInterceptor optimisticLockerInterceptor() { |
| | | return new OptimisticLockerInterceptor(); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.stylefeng.guns.config.properties; |
| | | |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.util.Properties; |
| | | |
| | | /** |
| | | * beetl配置(如果需要配置别的配置可参照这个形式自己添加) |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-24 20:37 |
| | | */ |
| | | @Configuration |
| | | @ConfigurationProperties(prefix = BeetlProperties.BEETLCONF_PREFIX) |
| | | public class BeetlProperties { |
| | | |
| | | public static final String BEETLCONF_PREFIX = "beetl"; |
| | | |
| | | private String delimiterStatementStart; |
| | | |
| | | private String delimiterStatementEnd; |
| | | |
| | | private String resourceTagroot; |
| | | |
| | | private String resourceTagsuffix; |
| | | |
| | | private String resourceAutoCheck; |
| | | |
| | | @Value("${spring.mvc.view.prefix}") |
| | | private String prefix; |
| | | |
| | | public Properties getProperties(){ |
| | | Properties properties = new Properties(); |
| | | if(ToolUtil.isNotEmpty(delimiterStatementStart)){ |
| | | if(delimiterStatementStart.startsWith("\\")){ |
| | | delimiterStatementStart = delimiterStatementStart.substring(1); |
| | | } |
| | | properties.setProperty("DELIMITER_STATEMENT_START",delimiterStatementStart); |
| | | } |
| | | if(ToolUtil.isNotEmpty(delimiterStatementEnd)){ |
| | | properties.setProperty("DELIMITER_STATEMENT_END",delimiterStatementEnd); |
| | | }else{ |
| | | properties.setProperty("DELIMITER_STATEMENT_END","null"); |
| | | } |
| | | if(ToolUtil.isNotEmpty(resourceTagroot)){ |
| | | properties.setProperty("RESOURCE.tagRoot",resourceTagroot); |
| | | } |
| | | if(ToolUtil.isNotEmpty(resourceTagsuffix)){ |
| | | properties.setProperty("RESOURCE.tagSuffix",resourceTagsuffix); |
| | | } |
| | | if(ToolUtil.isNotEmpty(resourceAutoCheck)){ |
| | | properties.setProperty("RESOURCE.autoCheck",resourceAutoCheck); |
| | | } |
| | | return properties; |
| | | } |
| | | |
| | | public String getPrefix() { |
| | | return prefix; |
| | | } |
| | | |
| | | public String getDelimiterStatementStart() { |
| | | return delimiterStatementStart; |
| | | } |
| | | |
| | | public void setDelimiterStatementStart(String delimiterStatementStart) { |
| | | this.delimiterStatementStart = delimiterStatementStart; |
| | | } |
| | | |
| | | public String getDelimiterStatementEnd() { |
| | | return delimiterStatementEnd; |
| | | } |
| | | |
| | | public void setDelimiterStatementEnd(String delimiterStatementEnd) { |
| | | this.delimiterStatementEnd = delimiterStatementEnd; |
| | | } |
| | | |
| | | public String getResourceTagroot() { |
| | | return resourceTagroot; |
| | | } |
| | | |
| | | public void setResourceTagroot(String resourceTagroot) { |
| | | this.resourceTagroot = resourceTagroot; |
| | | } |
| | | |
| | | public String getResourceTagsuffix() { |
| | | return resourceTagsuffix; |
| | | } |
| | | |
| | | public void setResourceTagsuffix(String resourceTagsuffix) { |
| | | this.resourceTagsuffix = resourceTagsuffix; |
| | | } |
| | | |
| | | public String getResourceAutoCheck() { |
| | | return resourceAutoCheck; |
| | | } |
| | | |
| | | public void setResourceAutoCheck(String resourceAutoCheck) { |
| | | this.resourceAutoCheck = resourceAutoCheck; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.config.properties; |
| | | |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.File; |
| | | |
| | | import static com.stylefeng.guns.core.util.ToolUtil.getTempPath; |
| | | import static com.stylefeng.guns.core.util.ToolUtil.isEmpty; |
| | | |
| | | /** |
| | | * guns项目配置 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/23 22:31 |
| | | */ |
| | | @Component |
| | | @ConfigurationProperties(prefix = GunsProperties.PREFIX) |
| | | public class GunsProperties { |
| | | |
| | | public static final String PREFIX = "guns"; |
| | | |
| | | private Boolean kaptchaOpen = false; |
| | | |
| | | private Boolean swaggerOpen = false; |
| | | |
| | | // 文件上传位置配置 |
| | | private String fileUploadPath; |
| | | |
| | | // 文件服务器访问地址 |
| | | private String pictureServerAddress; |
| | | |
| | | private Boolean haveCreatePath = false; |
| | | |
| | | private Boolean springSessionOpen = false; |
| | | |
| | | /** |
| | | * session 失效时间(默认为30分钟 单位:秒) |
| | | */ |
| | | private Integer sessionInvalidateTime = 30 * 60; |
| | | |
| | | /** |
| | | * session 验证失效时间(默认为15分钟 单位:秒) |
| | | */ |
| | | private Integer sessionValidationInterval = 15 * 60; |
| | | /** |
| | | *前端接口调用基础路径 |
| | | */ |
| | | private String restUrl; |
| | | |
| | | public String getFileUploadPath() { |
| | | //如果没有写文件上传路径,保存到临时目录 |
| | | if (isEmpty(fileUploadPath)) { |
| | | return getTempPath(); |
| | | } else { |
| | | //判断有没有结尾符,没有得加上 |
| | | if (!fileUploadPath.endsWith(File.separator)) { |
| | | fileUploadPath = fileUploadPath + File.separator; |
| | | } |
| | | //判断目录存不存在,不存在得加上 |
| | | if (!haveCreatePath) { |
| | | File file = new File(fileUploadPath); |
| | | file.mkdirs(); |
| | | haveCreatePath = true; |
| | | } |
| | | return fileUploadPath; |
| | | } |
| | | } |
| | | |
| | | public void setFileUploadPath(String fileUploadPath) { |
| | | this.fileUploadPath = fileUploadPath; |
| | | } |
| | | |
| | | public String getPictureServerAddress() { |
| | | return pictureServerAddress; |
| | | } |
| | | |
| | | public void setPictureServerAddress(String pictureServerAddress) { |
| | | this.pictureServerAddress = pictureServerAddress; |
| | | } |
| | | |
| | | public Boolean getKaptchaOpen() { |
| | | return kaptchaOpen; |
| | | } |
| | | |
| | | public void setKaptchaOpen(Boolean kaptchaOpen) { |
| | | this.kaptchaOpen = kaptchaOpen; |
| | | } |
| | | |
| | | public Boolean getSwaggerOpen() { |
| | | return swaggerOpen; |
| | | } |
| | | |
| | | public void setSwaggerOpen(Boolean swaggerOpen) { |
| | | this.swaggerOpen = swaggerOpen; |
| | | } |
| | | |
| | | public Boolean getSpringSessionOpen() { |
| | | return springSessionOpen; |
| | | } |
| | | |
| | | public void setSpringSessionOpen(Boolean springSessionOpen) { |
| | | this.springSessionOpen = springSessionOpen; |
| | | } |
| | | |
| | | public Integer getSessionInvalidateTime() { |
| | | return sessionInvalidateTime; |
| | | } |
| | | |
| | | public void setSessionInvalidateTime(Integer sessionInvalidateTime) { |
| | | this.sessionInvalidateTime = sessionInvalidateTime; |
| | | } |
| | | |
| | | public Integer getSessionValidationInterval() { |
| | | return sessionValidationInterval; |
| | | } |
| | | |
| | | public void setSessionValidationInterval(Integer sessionValidationInterval) { |
| | | this.sessionValidationInterval = sessionValidationInterval; |
| | | } |
| | | |
| | | public String getRestUrl() { |
| | | return restUrl; |
| | | } |
| | | |
| | | public void setRestUrl(String restUrl) { |
| | | this.restUrl = restUrl; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.config.web; |
| | | |
| | | import com.stylefeng.guns.config.properties.BeetlProperties; |
| | | import com.stylefeng.guns.core.beetl.BeetlConfiguration; |
| | | import org.beetl.core.resource.ClasspathResourceLoader; |
| | | import org.beetl.ext.spring.BeetlSpringViewResolver; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | /** |
| | | * web 配置类 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2016年11月12日 下午5:03:32 |
| | | */ |
| | | @Configuration |
| | | public class BeetlConfig { |
| | | |
| | | @Autowired |
| | | BeetlProperties beetlProperties; |
| | | |
| | | /** |
| | | * beetl的配置 |
| | | */ |
| | | @Bean(initMethod = "init") |
| | | public BeetlConfiguration beetlConfiguration() { |
| | | BeetlConfiguration beetlConfiguration = new BeetlConfiguration(); |
| | | beetlConfiguration.setResourceLoader(new ClasspathResourceLoader(BeetlConfig.class.getClassLoader(), beetlProperties.getPrefix())); |
| | | beetlConfiguration.setConfigProperties(beetlProperties.getProperties()); |
| | | return beetlConfiguration; |
| | | } |
| | | |
| | | /** |
| | | * beetl的视图解析器 |
| | | */ |
| | | @Bean |
| | | public BeetlSpringViewResolver beetlViewResolver() { |
| | | BeetlSpringViewResolver beetlSpringViewResolver = new BeetlSpringViewResolver(); |
| | | beetlSpringViewResolver.setConfig(beetlConfiguration()); |
| | | beetlSpringViewResolver.setContentType("text/html;charset=UTF-8"); |
| | | beetlSpringViewResolver.setOrder(0); |
| | | return beetlSpringViewResolver; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.config.web; |
| | | |
| | | import com.stylefeng.guns.config.properties.GunsProperties; |
| | | import com.stylefeng.guns.core.intercept.GunsUserFilter; |
| | | import com.stylefeng.guns.core.shiro.ShiroDbRealm; |
| | | import org.apache.shiro.cache.CacheManager; |
| | | import org.apache.shiro.cache.ehcache.EhCacheManager; |
| | | import org.apache.shiro.codec.Base64; |
| | | import org.apache.shiro.session.mgt.SessionManager; |
| | | import org.apache.shiro.spring.LifecycleBeanPostProcessor; |
| | | import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor; |
| | | import org.apache.shiro.spring.web.ShiroFilterFactoryBean; |
| | | import org.apache.shiro.web.mgt.CookieRememberMeManager; |
| | | import org.apache.shiro.web.mgt.DefaultWebSecurityManager; |
| | | import org.apache.shiro.web.servlet.Cookie; |
| | | import org.apache.shiro.web.servlet.ShiroHttpSession; |
| | | import org.apache.shiro.web.servlet.SimpleCookie; |
| | | import org.apache.shiro.web.session.mgt.DefaultWebSessionManager; |
| | | import org.apache.shiro.web.session.mgt.ServletContainerSessionManager; |
| | | import org.springframework.beans.factory.config.MethodInvokingFactoryBean; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.cache.ehcache.EhCacheManagerFactoryBean; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import javax.servlet.Filter; |
| | | import java.util.HashMap; |
| | | import java.util.LinkedHashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * shiro权限管理的配置 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2016年11月14日 下午3:03:44 |
| | | */ |
| | | @Configuration |
| | | public class ShiroConfig { |
| | | |
| | | /** |
| | | * 安全管理器 |
| | | */ |
| | | @Bean |
| | | public DefaultWebSecurityManager securityManager(CookieRememberMeManager rememberMeManager, CacheManager cacheShiroManager, SessionManager sessionManager) { |
| | | DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(); |
| | | securityManager.setRealm(this.shiroDbRealm()); |
| | | securityManager.setCacheManager(cacheShiroManager); |
| | | securityManager.setRememberMeManager(rememberMeManager); |
| | | securityManager.setSessionManager(sessionManager); |
| | | return securityManager; |
| | | } |
| | | |
| | | /** |
| | | * spring session管理器(多机环境) |
| | | */ |
| | | @Bean |
| | | @ConditionalOnProperty(prefix = "guns", name = "spring-session-open", havingValue = "true") |
| | | public ServletContainerSessionManager servletContainerSessionManager() { |
| | | return new ServletContainerSessionManager(); |
| | | } |
| | | |
| | | /** |
| | | * session管理器(单机环境) |
| | | */ |
| | | @Bean |
| | | @ConditionalOnProperty(prefix = "guns", name = "spring-session-open", havingValue = "false") |
| | | public DefaultWebSessionManager defaultWebSessionManager(CacheManager cacheShiroManager, GunsProperties gunsProperties) { |
| | | DefaultWebSessionManager sessionManager = new DefaultWebSessionManager(); |
| | | sessionManager.setCacheManager(cacheShiroManager); |
| | | sessionManager.setSessionValidationInterval(gunsProperties.getSessionValidationInterval() * 1000); |
| | | sessionManager.setGlobalSessionTimeout(gunsProperties.getSessionInvalidateTime() * 1000); |
| | | sessionManager.setDeleteInvalidSessions(true); |
| | | sessionManager.setSessionValidationSchedulerEnabled(true); |
| | | Cookie cookie = new SimpleCookie(ShiroHttpSession.DEFAULT_SESSION_ID_NAME); |
| | | cookie.setName("shiroCookie"); |
| | | cookie.setHttpOnly(true); |
| | | sessionManager.setSessionIdCookie(cookie); |
| | | return sessionManager; |
| | | } |
| | | |
| | | /** |
| | | * 缓存管理器 使用Ehcache实现 |
| | | */ |
| | | @Bean |
| | | public CacheManager getCacheShiroManager(EhCacheManagerFactoryBean ehcache) { |
| | | EhCacheManager ehCacheManager = new EhCacheManager(); |
| | | ehCacheManager.setCacheManager(ehcache.getObject()); |
| | | return ehCacheManager; |
| | | } |
| | | |
| | | /** |
| | | * 项目自定义的Realm |
| | | */ |
| | | @Bean |
| | | public ShiroDbRealm shiroDbRealm() { |
| | | return new ShiroDbRealm(); |
| | | } |
| | | |
| | | /** |
| | | * rememberMe管理器, cipherKey生成见{@code Base64Test.java} |
| | | */ |
| | | @Bean |
| | | public CookieRememberMeManager rememberMeManager(SimpleCookie rememberMeCookie) { |
| | | CookieRememberMeManager manager = new CookieRememberMeManager(); |
| | | manager.setCipherKey(Base64.decode("Z3VucwAAAAAAAAAAAAAAAA==")); |
| | | manager.setCookie(rememberMeCookie); |
| | | return manager; |
| | | } |
| | | |
| | | /** |
| | | * 记住密码Cookie |
| | | */ |
| | | @Bean |
| | | public SimpleCookie rememberMeCookie() { |
| | | SimpleCookie simpleCookie = new SimpleCookie("rememberMe"); |
| | | simpleCookie.setHttpOnly(true); |
| | | simpleCookie.setMaxAge(7 * 24 * 60 * 60);//7天 |
| | | return simpleCookie; |
| | | } |
| | | |
| | | /** |
| | | * Shiro的过滤器链 |
| | | */ |
| | | @Bean |
| | | public ShiroFilterFactoryBean shiroFilter(DefaultWebSecurityManager securityManager) { |
| | | ShiroFilterFactoryBean shiroFilter = new ShiroFilterFactoryBean(); |
| | | shiroFilter.setSecurityManager(securityManager); |
| | | /** |
| | | * 默认的登陆访问url |
| | | */ |
| | | shiroFilter.setLoginUrl("/login"); |
| | | /** |
| | | * 登陆成功后跳转的url |
| | | */ |
| | | shiroFilter.setSuccessUrl("/"); |
| | | /** |
| | | * 没有权限跳转的url |
| | | */ |
| | | shiroFilter.setUnauthorizedUrl("/global/error"); |
| | | |
| | | /** |
| | | * 覆盖默认的user拦截器(默认拦截器解决不了ajax请求 session超时的问题,若有更好的办法请及时反馈作者) |
| | | */ |
| | | HashMap<String, Filter> myFilters = new HashMap<>(); |
| | | myFilters.put("user", new GunsUserFilter()); |
| | | shiroFilter.setFilters(myFilters); |
| | | |
| | | /** |
| | | * 配置shiro拦截器链 |
| | | * |
| | | * anon 不需要认证 |
| | | * authc 需要认证 |
| | | * user 验证通过或RememberMe登录的都可以 |
| | | * |
| | | * 当应用开启了rememberMe时,用户下次访问时可以是一个user,但不会是authc,因为authc是需要重新认证的 |
| | | * |
| | | * 顺序从上到下,优先级依次降低 |
| | | * |
| | | * api开头的接口,走rest api鉴权,不走shiro鉴权 |
| | | * |
| | | */ |
| | | Map<String, String> hashMap = new LinkedHashMap<>(); |
| | | hashMap.put("/static/**", "anon"); |
| | | hashMap.put("/gunsApi/**", "anon"); |
| | | hashMap.put("/login", "anon"); |
| | | hashMap.put("/global/sessionError", "anon"); |
| | | hashMap.put("/kaptcha", "anon"); |
| | | hashMap.put("/**", "user"); |
| | | shiroFilter.setFilterChainDefinitionMap(hashMap); |
| | | return shiroFilter; |
| | | } |
| | | |
| | | /** |
| | | * 在方法中 注入 securityManager,进行代理控制 |
| | | */ |
| | | @Bean |
| | | public MethodInvokingFactoryBean methodInvokingFactoryBean(DefaultWebSecurityManager securityManager) { |
| | | MethodInvokingFactoryBean bean = new MethodInvokingFactoryBean(); |
| | | bean.setStaticMethod("org.apache.shiro.SecurityUtils.setSecurityManager"); |
| | | bean.setArguments(new Object[]{securityManager}); |
| | | return bean; |
| | | } |
| | | |
| | | /** |
| | | * Shiro生命周期处理器: |
| | | * 用于在实现了Initializable接口的Shiro bean初始化时调用Initializable接口回调(例如:UserRealm) |
| | | * 在实现了Destroyable接口的Shiro bean销毁时调用 Destroyable接口回调(例如:DefaultSecurityManager) |
| | | */ |
| | | @Bean |
| | | public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() { |
| | | return new LifecycleBeanPostProcessor(); |
| | | } |
| | | |
| | | /** |
| | | * 启用shrio授权注解拦截方式,AOP式方法级权限检查 |
| | | */ |
| | | @Bean |
| | | public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager) { |
| | | AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = |
| | | new AuthorizationAttributeSourceAdvisor(); |
| | | authorizationAttributeSourceAdvisor.setSecurityManager(securityManager); |
| | | return authorizationAttributeSourceAdvisor; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.config.web; |
| | | |
| | | import com.alibaba.druid.pool.DruidDataSource; |
| | | import com.alibaba.druid.support.http.StatViewServlet; |
| | | import com.alibaba.druid.support.http.WebStatFilter; |
| | | import com.alibaba.druid.support.spring.stat.BeanTypeAutoProxyCreator; |
| | | import com.alibaba.druid.support.spring.stat.DruidStatInterceptor; |
| | | import com.google.code.kaptcha.impl.DefaultKaptcha; |
| | | import com.google.code.kaptcha.util.Config; |
| | | import com.stylefeng.guns.config.properties.GunsProperties; |
| | | import com.stylefeng.guns.core.intercept.RestApiInteceptor; |
| | | import com.stylefeng.guns.core.listener.ConfigListener; |
| | | import com.stylefeng.guns.core.xss.XssFilter; |
| | | import org.springframework.aop.Advisor; |
| | | import org.springframework.aop.support.DefaultPointcutAdvisor; |
| | | import org.springframework.aop.support.JdkRegexpMethodPointcut; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.web.servlet.FilterRegistrationBean; |
| | | import org.springframework.boot.web.servlet.ServletListenerRegistrationBean; |
| | | import org.springframework.boot.web.servlet.ServletRegistrationBean; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.context.request.RequestContextListener; |
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
| | | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Properties; |
| | | |
| | | /** |
| | | * web 配置类 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2016年11月12日 下午5:03:32 |
| | | */ |
| | | @Configuration |
| | | public class WebConfig extends WebMvcConfigurerAdapter { |
| | | |
| | | @Autowired |
| | | private GunsProperties gunsProperties; |
| | | |
| | | /** |
| | | * 增加swagger的支持 |
| | | */ |
| | | @Override |
| | | public void addResourceHandlers(ResourceHandlerRegistry registry) { |
| | | if (gunsProperties.getSwaggerOpen()) { |
| | | registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); |
| | | registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 增加对rest api鉴权的spring mvc拦截器 |
| | | */ |
| | | @Override |
| | | public void addInterceptors(InterceptorRegistry registry) { |
| | | registry.addInterceptor(new RestApiInteceptor()).addPathPatterns("/gunsApi/**"); |
| | | } |
| | | |
| | | /** |
| | | * druidServlet注册 |
| | | */ |
| | | @Bean |
| | | public ServletRegistrationBean druidServletRegistration() { |
| | | ServletRegistrationBean registration = new ServletRegistrationBean(new StatViewServlet()); |
| | | registration.addUrlMappings("/druid/*"); |
| | | return registration; |
| | | } |
| | | |
| | | /** |
| | | * druid监控 配置URI拦截策略 |
| | | */ |
| | | @Bean |
| | | public FilterRegistrationBean druidStatFilter() { |
| | | FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new WebStatFilter()); |
| | | //添加过滤规则. |
| | | filterRegistrationBean.addUrlPatterns("/*"); |
| | | //添加不需要忽略的格式信息. |
| | | filterRegistrationBean.addInitParameter( |
| | | "exclusions", "/static/*,*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid,/druid/*"); |
| | | //用于session监控页面的用户名显示 需要登录后主动将username注入到session里 |
| | | filterRegistrationBean.addInitParameter("principalSessionName", "username"); |
| | | return filterRegistrationBean; |
| | | } |
| | | |
| | | /** |
| | | * druid数据库连接池监控 |
| | | */ |
| | | @Bean |
| | | public DruidStatInterceptor druidStatInterceptor() { |
| | | return new DruidStatInterceptor(); |
| | | } |
| | | |
| | | @Bean |
| | | public JdkRegexpMethodPointcut druidStatPointcut() { |
| | | JdkRegexpMethodPointcut druidStatPointcut = new JdkRegexpMethodPointcut(); |
| | | String patterns = "com.stylefeng.guns.controller.*.service.*"; |
| | | //可以set多个 |
| | | druidStatPointcut.setPatterns(patterns); |
| | | return druidStatPointcut; |
| | | } |
| | | |
| | | /** |
| | | * druid数据库连接池监控 |
| | | */ |
| | | @Bean |
| | | public BeanTypeAutoProxyCreator beanTypeAutoProxyCreator() { |
| | | BeanTypeAutoProxyCreator beanTypeAutoProxyCreator = new BeanTypeAutoProxyCreator(); |
| | | beanTypeAutoProxyCreator.setTargetBeanType(DruidDataSource.class); |
| | | beanTypeAutoProxyCreator.setInterceptorNames("druidStatInterceptor"); |
| | | return beanTypeAutoProxyCreator; |
| | | } |
| | | |
| | | /** |
| | | * druid 为druidStatPointcut添加拦截 |
| | | * |
| | | * @return |
| | | */ |
| | | @Bean |
| | | public Advisor druidStatAdvisor() { |
| | | return new DefaultPointcutAdvisor(druidStatPointcut(), druidStatInterceptor()); |
| | | } |
| | | |
| | | /** |
| | | * xssFilter注册 |
| | | */ |
| | | @Bean |
| | | public FilterRegistrationBean xssFilterRegistration() { |
| | | XssFilter xssFilter = new XssFilter(); |
| | | xssFilter.setUrlExclusion(Arrays.asList("/tAgreement/updateAppParam","/tAdvertisement/add","/tAdvertisement/update","/tNotices/addSystem","/tNotices/updateSystem" |
| | | ,"/tIntegralGoods/add","/tIntegralGoods/update")); |
| | | FilterRegistrationBean registration = new FilterRegistrationBean(xssFilter); |
| | | registration.addUrlPatterns("/*"); |
| | | return registration; |
| | | } |
| | | |
| | | /** |
| | | * RequestContextListener注册 |
| | | */ |
| | | @Bean |
| | | public ServletListenerRegistrationBean<RequestContextListener> requestContextListenerRegistration() { |
| | | return new ServletListenerRegistrationBean<>(new RequestContextListener()); |
| | | } |
| | | |
| | | /** |
| | | * ConfigListener注册 |
| | | */ |
| | | @Bean |
| | | public ServletListenerRegistrationBean<ConfigListener> configListenerRegistration() { |
| | | return new ServletListenerRegistrationBean<>(new ConfigListener()); |
| | | } |
| | | |
| | | /** |
| | | * 验证码生成相关 |
| | | */ |
| | | @Bean |
| | | public DefaultKaptcha kaptcha() { |
| | | Properties properties = new Properties(); |
| | | properties.put("kaptcha.border", "no"); |
| | | properties.put("kaptcha.border.color", "105,179,90"); |
| | | properties.put("kaptcha.textproducer.font.color", "blue"); |
| | | properties.put("kaptcha.image.width", "125"); |
| | | properties.put("kaptcha.image.height", "45"); |
| | | properties.put("kaptcha.textproducer.font.size", "45"); |
| | | properties.put("kaptcha.session.key", "code"); |
| | | properties.put("kaptcha.textproducer.char.length", "4"); |
| | | properties.put("kaptcha.textproducer.font.names", "宋体,楷体,微软雅黑"); |
| | | Config config = new Config(properties); |
| | | DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); |
| | | defaultKaptcha.setConfig(config); |
| | | return defaultKaptcha; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.aop; |
| | | |
| | | import com.stylefeng.guns.core.common.exception.BizExceptionEnum; |
| | | import com.stylefeng.guns.core.common.exception.InvalidKaptchaException; |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.exception.GunsException; |
| | | import com.stylefeng.guns.core.log.LogManager; |
| | | import com.stylefeng.guns.core.log.factory.LogTaskFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import org.apache.shiro.authc.AuthenticationException; |
| | | import org.apache.shiro.authc.CredentialsException; |
| | | import org.apache.shiro.authc.DisabledAccountException; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.ControllerAdvice; |
| | | import org.springframework.web.bind.annotation.ExceptionHandler; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.ResponseStatus; |
| | | |
| | | import java.lang.reflect.UndeclaredThrowableException; |
| | | |
| | | import static com.stylefeng.guns.core.support.HttpKit.getIp; |
| | | import static com.stylefeng.guns.core.support.HttpKit.getRequest; |
| | | |
| | | /** |
| | | * 全局的的异常拦截器(拦截所有的控制器)(带有@RequestMapping注解的方法上都会拦截) |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2016年11月12日 下午3:19:56 |
| | | */ |
| | | @ControllerAdvice |
| | | @Order(-1) |
| | | public class GlobalExceptionHandler { |
| | | |
| | | private Logger log = LoggerFactory.getLogger(this.getClass()); |
| | | |
| | | /** |
| | | * 拦截业务异常 |
| | | */ |
| | | @ExceptionHandler(GunsException.class) |
| | | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) |
| | | @ResponseBody |
| | | public ErrorTip notFount(GunsException e) { |
| | | LogManager.me().executeLog(LogTaskFactory.exceptionLog(ShiroKit.getUser().getId(), e)); |
| | | getRequest().setAttribute("tip", e.getMessage()); |
| | | log.error("业务异常:", e); |
| | | return new ErrorTip(e.getCode(), e.getMessage()); |
| | | } |
| | | |
| | | /** |
| | | * 用户未登录异常 |
| | | */ |
| | | @ExceptionHandler(AuthenticationException.class) |
| | | @ResponseStatus(HttpStatus.UNAUTHORIZED) |
| | | public String unAuth(AuthenticationException e) { |
| | | log.error("用户未登陆:", e); |
| | | return "/login.html"; |
| | | } |
| | | |
| | | /** |
| | | * 账号被冻结异常 |
| | | */ |
| | | @ExceptionHandler(DisabledAccountException.class) |
| | | @ResponseStatus(HttpStatus.UNAUTHORIZED) |
| | | public String accountLocked(DisabledAccountException e, Model model) { |
| | | String username = getRequest().getParameter("username"); |
| | | LogManager.me().executeLog(LogTaskFactory.loginLog(username, "账号被冻结", getIp())); |
| | | model.addAttribute("tips", "账号被冻结"); |
| | | return "/login.html"; |
| | | } |
| | | |
| | | /** |
| | | * 账号密码错误异常 |
| | | */ |
| | | @ExceptionHandler(CredentialsException.class) |
| | | @ResponseStatus(HttpStatus.UNAUTHORIZED) |
| | | public String credentials(CredentialsException e, Model model) { |
| | | String username = getRequest().getParameter("username"); |
| | | LogManager.me().executeLog(LogTaskFactory.loginLog(username, "账号密码错误", getIp())); |
| | | model.addAttribute("tips", "账号密码错误"); |
| | | return "/login.html"; |
| | | } |
| | | |
| | | /** |
| | | * 验证码错误异常 |
| | | */ |
| | | @ExceptionHandler(InvalidKaptchaException.class) |
| | | @ResponseStatus(HttpStatus.BAD_REQUEST) |
| | | public String credentials(InvalidKaptchaException e, Model model) { |
| | | String username = getRequest().getParameter("username"); |
| | | LogManager.me().executeLog(LogTaskFactory.loginLog(username, "验证码错误", getIp())); |
| | | model.addAttribute("tips", "验证码错误"); |
| | | return "/login.html"; |
| | | } |
| | | |
| | | /** |
| | | * 无权访问该资源异常 |
| | | */ |
| | | @ExceptionHandler(UndeclaredThrowableException.class) |
| | | @ResponseStatus(HttpStatus.UNAUTHORIZED) |
| | | @ResponseBody |
| | | public ErrorTip credentials(UndeclaredThrowableException e) { |
| | | getRequest().setAttribute("tip", "权限异常"); |
| | | log.error("权限异常!", e); |
| | | return new ErrorTip(BizExceptionEnum.NO_PERMITION.getCode(), BizExceptionEnum.NO_PERMITION.getMessage()); |
| | | } |
| | | |
| | | /** |
| | | * 拦截未知的运行时异常 |
| | | */ |
| | | @ExceptionHandler(RuntimeException.class) |
| | | @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) |
| | | @ResponseBody |
| | | public ErrorTip notFount(RuntimeException e) { |
| | | LogManager.me().executeLog(LogTaskFactory.exceptionLog(ShiroKit.getUser().getId(), e)); |
| | | getRequest().setAttribute("tip", "服务器未知运行时异常"); |
| | | log.error("运行时异常:", e); |
| | | return new ErrorTip(BizExceptionEnum.SERVER_ERROR.getCode(), BizExceptionEnum.SERVER_ERROR.getMessage()); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.aop; |
| | | |
| | | import com.stylefeng.guns.core.common.annotion.BussinessLog; |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | import com.stylefeng.guns.core.log.LogManager; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.log.factory.LogTaskFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.support.HttpKit; |
| | | import com.stylefeng.guns.core.util.Contrast; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.Signature; |
| | | import org.aspectj.lang.annotation.Around; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.annotation.Pointcut; |
| | | import org.aspectj.lang.reflect.MethodSignature; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.lang.reflect.Method; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 日志记录 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2016年12月6日 下午8:48:30 |
| | | */ |
| | | @Aspect |
| | | @Component |
| | | public class LogAop { |
| | | |
| | | private Logger log = LoggerFactory.getLogger(this.getClass()); |
| | | |
| | | @Pointcut(value = "@annotation(com.stylefeng.guns.core.common.annotion.BussinessLog)") |
| | | public void cutService() { |
| | | } |
| | | |
| | | @Around("cutService()") |
| | | public Object recordSysLog(ProceedingJoinPoint point) throws Throwable { |
| | | |
| | | //先执行业务 |
| | | Object result = point.proceed(); |
| | | |
| | | try { |
| | | handle(point); |
| | | } catch (Exception e) { |
| | | log.error("日志记录出错!", e); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | private void handle(ProceedingJoinPoint point) throws Exception { |
| | | |
| | | //获取拦截的方法名 |
| | | Signature sig = point.getSignature(); |
| | | MethodSignature msig = null; |
| | | if (!(sig instanceof MethodSignature)) { |
| | | throw new IllegalArgumentException("该注解只能用于方法"); |
| | | } |
| | | msig = (MethodSignature) sig; |
| | | Object target = point.getTarget(); |
| | | Method currentMethod = target.getClass().getMethod(msig.getName(), msig.getParameterTypes()); |
| | | String methodName = currentMethod.getName(); |
| | | |
| | | //如果当前用户未登录,不做日志 |
| | | ShiroUser user = ShiroKit.getUser(); |
| | | if (null == user) { |
| | | return; |
| | | } |
| | | |
| | | //获取拦截方法的参数 |
| | | String className = point.getTarget().getClass().getName(); |
| | | Object[] params = point.getArgs(); |
| | | |
| | | //获取操作名称 |
| | | BussinessLog annotation = currentMethod.getAnnotation(BussinessLog.class); |
| | | String bussinessName = annotation.value(); |
| | | String key = annotation.key(); |
| | | Class dictClass = annotation.dict(); |
| | | |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (Object param : params) { |
| | | sb.append(param); |
| | | sb.append(" & "); |
| | | } |
| | | |
| | | //如果涉及到修改,比对变化 |
| | | String msg; |
| | | if (bussinessName.indexOf("修改") != -1 || bussinessName.indexOf("编辑") != -1) { |
| | | Object obj1 = LogObjectHolder.me().get(); |
| | | Map<String, String> obj2 = HttpKit.getRequestParameters(); |
| | | msg = Contrast.contrastObj(dictClass, key, obj1, obj2); |
| | | } else { |
| | | Map<String, String> parameters = HttpKit.getRequestParameters(); |
| | | AbstractDictMap dictMap = (AbstractDictMap) dictClass.newInstance(); |
| | | msg = Contrast.parseMutiKey(dictMap,key,parameters); |
| | | } |
| | | |
| | | LogManager.me().executeLog(LogTaskFactory.bussinessLog(user.getId(), bussinessName, className, methodName, msg)); |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com). |
| | | * <p> |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * <p> |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * <p> |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.stylefeng.guns.core.aop; |
| | | |
| | | import com.stylefeng.guns.core.common.annotion.Permission; |
| | | import com.stylefeng.guns.core.shiro.check.PermissionCheckManager; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.annotation.Around; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.annotation.Pointcut; |
| | | import org.aspectj.lang.reflect.MethodSignature; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.naming.NoPermissionException; |
| | | import java.lang.reflect.Method; |
| | | |
| | | /** |
| | | * AOP 权限自定义检查 |
| | | */ |
| | | @Aspect |
| | | @Component |
| | | @Order(200) |
| | | public class PermissionAop { |
| | | |
| | | @Pointcut(value = "@annotation(com.stylefeng.guns.core.common.annotion.Permission)") |
| | | private void cutPermission() { |
| | | |
| | | } |
| | | |
| | | @Around("cutPermission()") |
| | | public Object doPermission(ProceedingJoinPoint point) throws Throwable { |
| | | MethodSignature ms = (MethodSignature) point.getSignature(); |
| | | Method method = ms.getMethod(); |
| | | Permission permission = method.getAnnotation(Permission.class); |
| | | Object[] permissions = permission.value(); |
| | | if (permissions == null || permissions.length == 0) { |
| | | //检查全体角色 |
| | | boolean result = PermissionCheckManager.checkAll(); |
| | | if (result) { |
| | | return point.proceed(); |
| | | } else { |
| | | throw new NoPermissionException(); |
| | | } |
| | | } else { |
| | | //检查指定角色 |
| | | boolean result = PermissionCheckManager.check(permissions); |
| | | if (result) { |
| | | return point.proceed(); |
| | | } else { |
| | | throw new NoPermissionException(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.beetl; |
| | | |
| | | import com.stylefeng.guns.core.tag.DictSelectorTag; |
| | | import com.stylefeng.guns.core.util.KaptchaUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import org.beetl.core.Context; |
| | | import org.beetl.core.Function; |
| | | import org.beetl.core.Tag; |
| | | import org.beetl.core.TagFactory; |
| | | import org.beetl.ext.spring.BeetlGroupUtilConfiguration; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.core.env.Environment; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | |
| | | /** |
| | | * beetl拓展配置,绑定一些工具类,方便在模板中直接调用 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2018/2/22 21:03 |
| | | */ |
| | | public class BeetlConfiguration extends BeetlGroupUtilConfiguration { |
| | | |
| | | @Autowired |
| | | Environment env; |
| | | |
| | | @Autowired |
| | | ApplicationContext applicationContext; |
| | | |
| | | @Autowired |
| | | DictSelectorTag dictSelectorTag; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void initOther() { |
| | | groupTemplate.registerFunctionPackage("shiro", new ShiroExt()); |
| | | groupTemplate.registerFunctionPackage("tool", new ToolUtil()); |
| | | groupTemplate.registerFunctionPackage("kaptcha", new KaptchaUtil()); |
| | | groupTemplate.registerTagFactory("dictSelector", new TagFactory() { |
| | | @Override |
| | | public Tag createTag() { |
| | | return dictSelectorTag; |
| | | } |
| | | }); |
| | | |
| | | groupTemplate.registerFunction("env", new Function() { |
| | | @Override |
| | | public String call(Object[] paras, Context ctx) { |
| | | String key = (String)paras[0]; |
| | | String value = env.getProperty(key); |
| | | if(value!=null) { |
| | | return getStr(value); |
| | | } |
| | | if(paras.length==2) { |
| | | return (String)paras[1]; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | protected String getStr(String str) { |
| | | try { |
| | | return new String(str.getBytes("iso8859-1"),"UTF-8"); |
| | | } catch (UnsupportedEncodingException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com). |
| | | * <p> |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * <p> |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * <p> |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.stylefeng.guns.core.beetl; |
| | | |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.beetl.core.GroupTemplate; |
| | | |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | |
| | | public class ShiroExt { |
| | | private static final String NAMES_DELIMETER = ","; |
| | | |
| | | /** |
| | | * 获取当前 Subject |
| | | * |
| | | * @return Subject |
| | | */ |
| | | protected static Subject getSubject() { |
| | | return SecurityUtils.getSubject(); |
| | | } |
| | | |
| | | /** |
| | | * 获取封装的 ShiroUser |
| | | * |
| | | * @return ShiroUser |
| | | */ |
| | | public ShiroUser getUser() { |
| | | if (isGuest()) { |
| | | return null; |
| | | } else { |
| | | return (ShiroUser) getSubject().getPrincipals().getPrimaryPrincipal(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否属于该角色?,使用时与lacksRole 搭配使用 |
| | | * |
| | | * @param roleName 角色名 |
| | | * @return 属于该角色:true,否则false |
| | | */ |
| | | public boolean hasRole(String roleName) { |
| | | return getSubject() != null && roleName != null |
| | | && roleName.length() > 0 && getSubject().hasRole(roleName); |
| | | } |
| | | |
| | | /** |
| | | * 与hasRole标签逻辑相反,当用户不属于该角色时验证通过。 |
| | | * |
| | | * @param roleName 角色名 |
| | | * @return 不属于该角色:true,否则false |
| | | */ |
| | | public boolean lacksRole(String roleName) { |
| | | return !hasRole(roleName); |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否属于以下任意一个角色。 |
| | | * |
| | | * @param roleNames 角色列表 |
| | | * @return 属于:true,否则false |
| | | */ |
| | | public boolean hasAnyRoles(String roleNames) { |
| | | boolean hasAnyRole = false; |
| | | Subject subject = getSubject(); |
| | | if (subject != null && roleNames != null && roleNames.length() > 0) { |
| | | for (String role : roleNames.split(NAMES_DELIMETER)) { |
| | | if (subject.hasRole(role.trim())) { |
| | | hasAnyRole = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return hasAnyRole; |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否属于以下所有角色。 |
| | | * |
| | | * @param roleNames 角色列表 |
| | | * @return 属于:true,否则false |
| | | */ |
| | | public boolean hasAllRoles(String roleNames) { |
| | | boolean hasAllRole = true; |
| | | Subject subject = getSubject(); |
| | | if (subject != null && roleNames != null && roleNames.length() > 0) { |
| | | for (String role : roleNames.split(NAMES_DELIMETER)) { |
| | | if (!subject.hasRole(role.trim())) { |
| | | hasAllRole = false; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return hasAllRole; |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否拥有指定权限,使用时与lacksPermission 搭配使用 |
| | | * |
| | | * @param permission 权限名 |
| | | * @return 拥有权限:true,否则false |
| | | */ |
| | | public boolean hasPermission(String permission) { |
| | | return getSubject() != null && permission != null |
| | | && permission.length() > 0 |
| | | && getSubject().isPermitted(permission); |
| | | } |
| | | |
| | | /** |
| | | * 与hasPermission标签逻辑相反,当前用户没有制定权限时,验证通过。 |
| | | * |
| | | * @param permission 权限名 |
| | | * @return 拥有权限:true,否则false |
| | | */ |
| | | public boolean lacksPermission(String permission) { |
| | | return !hasPermission(permission); |
| | | } |
| | | |
| | | /** |
| | | * 已认证通过的用户。不包含已记住的用户,这是与user标签的区别所在。与notAuthenticated搭配使用 |
| | | * |
| | | * @return 通过身份验证:true,否则false |
| | | */ |
| | | public boolean authenticated() { |
| | | return getSubject() != null && getSubject().isAuthenticated(); |
| | | } |
| | | |
| | | /** |
| | | * 未认证通过用户,与authenticated标签相对应。与guest标签的区别是,该标签包含已记住用户。。 |
| | | * |
| | | * @return 没有通过身份验证:true,否则false |
| | | */ |
| | | public boolean notAuthenticated() { |
| | | return !authenticated(); |
| | | } |
| | | |
| | | /** |
| | | * 认证通过或已记住的用户。与guset搭配使用。 |
| | | * |
| | | * @return 用户:true,否则 false |
| | | */ |
| | | public boolean isUser() { |
| | | return getSubject() != null && getSubject().getPrincipal() != null; |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否为“访客”,即未认证(包含未记住)的用户。用user搭配使用 |
| | | * |
| | | * @return 访客:true,否则false |
| | | */ |
| | | public boolean isGuest() { |
| | | return !isUser(); |
| | | } |
| | | |
| | | /** |
| | | * 输出当前用户信息,通常为登录帐号信息。 |
| | | * |
| | | * @return 当前用户信息 |
| | | */ |
| | | public String principal() { |
| | | if (getSubject() != null) { |
| | | Object principal = getSubject().getPrincipal(); |
| | | return principal.toString(); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | GroupTemplate gt = new GroupTemplate(); |
| | | gt.registerFunctionPackage("shiro", new ShiroExt()); |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.annotion; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.SystemDict; |
| | | |
| | | import java.lang.annotation.*; |
| | | |
| | | /** |
| | | * 标记需要做业务日志的方法 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-03-31 12:46 |
| | | */ |
| | | @Inherited |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | | @Target({ElementType.METHOD}) |
| | | public @interface BussinessLog { |
| | | |
| | | /** |
| | | * 业务的名称,例如:"修改菜单" |
| | | */ |
| | | String value() default ""; |
| | | |
| | | /** |
| | | * 被修改的实体的唯一标识,例如:菜单实体的唯一标识为"id" |
| | | */ |
| | | String key() default "id"; |
| | | |
| | | /** |
| | | * 字典(用于查找key的中文名称和字段的中文名称) |
| | | */ |
| | | Class<? extends AbstractDictMap> dict() default SystemDict.class; |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.annotion; |
| | | |
| | | import java.lang.annotation.*; |
| | | |
| | | /** |
| | | * 权限注解 用于检查权限 规定访问权限 |
| | | * |
| | | * @example @Permission({role1,role2}) |
| | | * @example @Permission |
| | | */ |
| | | @Inherited |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | | @Target({ElementType.METHOD}) |
| | | public @interface Permission { |
| | | |
| | | /** |
| | | * <p>角色英文名称</p> |
| | | * <p>使用注解时加上这个值表示限制只有某个角色的才可以访问对应的资源</p> |
| | | * <p>常用在某些资源限制只有超级管理员角色才可访问</p> |
| | | */ |
| | | String[] value() default {}; |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant; |
| | | |
| | | /** |
| | | * 系统常量 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017年2月12日 下午9:42:53 |
| | | */ |
| | | public interface Const { |
| | | |
| | | /** |
| | | * 系统默认的管理员密码 |
| | | */ |
| | | String DEFAULT_PWD = "111111"; |
| | | |
| | | /** |
| | | * 管理员角色的名字 |
| | | */ |
| | | String ADMIN_NAME = "administrator"; |
| | | |
| | | /** |
| | | * 管理员id |
| | | */ |
| | | Integer ADMIN_ID = 1; |
| | | |
| | | /** |
| | | * 超级管理员角色id |
| | | */ |
| | | Integer ADMIN_ROLE_ID = 1; |
| | | |
| | | /** |
| | | * 接口文档的菜单名 |
| | | */ |
| | | String API_MENU_NAME = "接口文档"; |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant; |
| | | |
| | | /** |
| | | * |
| | | * 多数据源的枚举 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017年3月5日 上午10:15:02 |
| | | */ |
| | | public interface DatasourceEnum { |
| | | |
| | | String DATA_SOURCE_GUNS = "dataSourceGuns"; //guns数据源 |
| | | |
| | | String DATA_SOURCE_BIZ = "dataSourceBiz"; //其他业务的数据源 |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant; |
| | | |
| | | /** |
| | | * jwt相关配置 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-08-23 9:23 |
| | | */ |
| | | public interface JwtConstants { |
| | | |
| | | String AUTH_HEADER = "Authorization"; |
| | | |
| | | String SECRET = "defaultSecret"; |
| | | |
| | | Long EXPIRATION = 604800L; |
| | | |
| | | String AUTH_PATH = "/gunsApi/auth"; |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.cache; |
| | | |
| | | /** |
| | | * 所有缓存名称的集合 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-04-24 21:56 |
| | | */ |
| | | public interface Cache { |
| | | |
| | | /** |
| | | * 常量缓存 |
| | | */ |
| | | String CONSTANT = "CONSTANT"; |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.cache; |
| | | |
| | | /** |
| | | * 缓存标识前缀集合,常用在ConstantFactory类中 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-04-25 9:37 |
| | | */ |
| | | public interface CacheKey { |
| | | |
| | | /** |
| | | * 角色名称(多个) |
| | | */ |
| | | String ROLES_NAME = "roles_name_"; |
| | | |
| | | /** |
| | | * 角色名称(单个) |
| | | */ |
| | | String SINGLE_ROLE_NAME = "single_role_name_"; |
| | | |
| | | /** |
| | | * 角色英文名称 |
| | | */ |
| | | String SINGLE_ROLE_TIP = "single_role_tip_"; |
| | | |
| | | /** |
| | | * 部门名称 |
| | | */ |
| | | String DEPT_NAME = "dept_name_"; |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 用于删除业务的字典 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class DeleteDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("roleId","角色名称"); |
| | | put("deptId", "部门名称"); |
| | | put("menuId", "菜单名称"); |
| | | put("dictId", "字典名称"); |
| | | put("noticeId", "标题"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | putFieldWrapperMethodName("roleId","getCacheObject"); |
| | | putFieldWrapperMethodName("deptId","getCacheObject"); |
| | | putFieldWrapperMethodName("menuId","getCacheObject"); |
| | | putFieldWrapperMethodName("dictId","getCacheObject"); |
| | | putFieldWrapperMethodName("noticeId","getCacheObject"); |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 部门的映射 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class DeptDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("deptId", "部门名称"); |
| | | put("num", "部门排序"); |
| | | put("pid", "上级名称"); |
| | | put("simplename", "部门简称"); |
| | | put("fullname", "部门全称"); |
| | | put("tips", "备注"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | putFieldWrapperMethodName("deptId", "getDeptName"); |
| | | putFieldWrapperMethodName("pid", "getDeptName"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.Dict; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 车牌品牌日志记录 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class BrandDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("id","车辆品牌id"); |
| | | put("addTime","添加时间"); |
| | | put("name","品牌名称"); |
| | | put("brandImg","品牌图片(多个用逗号隔开)"); |
| | | put("state","状态(1正常,2停用)"); |
| | | put("specialMode","专车计费"); |
| | | put("charteredMode","包车计费"); |
| | | put("seatNum","座位数"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.Dict; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 车辆日志记录 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class CarDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("id","车辆id"); |
| | | put("addTime","添加时间"); |
| | | put("carImg","车辆图片"); |
| | | put("plateNumber","车牌号"); |
| | | put("licenseNumber","行驶证编号"); |
| | | put("licenseImg","行驶证照片"); |
| | | put("brandId","关联品牌id"); |
| | | put("color","车辆颜色"); |
| | | put("serviceMode","服务模式(1专车,2包车)"); |
| | | put("state","状态(1正常,2停用)"); |
| | | put("insuranceNumber","保险编号"); |
| | | put("insuranceImg","保险图片"); |
| | | put("insuranceDate","保险到期时间"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.Dict; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 司机日志记录 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class DriverDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("id","司机id"); |
| | | put("addTime","添加时间"); |
| | | put("name","司机姓名"); |
| | | put("headImg","头像"); |
| | | put("phone","电话"); |
| | | put("sex","性别"); |
| | | put("password","登录密码"); |
| | | put("state","状态(1正常,2停用)"); |
| | | put("serviceMode","服务模式(1专车,2包车)"); |
| | | put("driveNumber","驾驶证编号"); |
| | | put("driveImg","驾驶证照片"); |
| | | put("carId","车辆id"); |
| | | put("driverId","司机id"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.Dict; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 评价标签日志记录 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class LabelDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("id","标签id"); |
| | | put("appLabelId","标签id"); |
| | | put("addTime","添加时间"); |
| | | put("name","标签名称"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.Dict; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 系统通知日志记录 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class NoticeDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("id","通知id"); |
| | | put("addTime","添加时间"); |
| | | put("title","标题"); |
| | | put("issue","是否发布(1未发布,2已发布)"); |
| | | put("content","内容"); |
| | | put("sendType","发送对象(1用户,2司机 ,3用户和司机)"); |
| | | put("sendTime","发送时间"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.Dict; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 日志记录 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class ObjectDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("appOrderTopupId","充值订单id"); |
| | | put("id","提现记录id"); |
| | | put("appInvoiceId","发票记录id"); |
| | | put("appOrderEvaluateId","订单评价id"); |
| | | put("appComplaintId","投诉id"); |
| | | put("appFeedbackId","意见反馈id"); |
| | | put("appDriverRecruitId","司机招募id"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.Dict; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 订单日志记录 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class OrderDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("id","订单id"); |
| | | put("appOrderId","订单id"); |
| | | put("addTime","添加时间"); |
| | | put("orderNum","订单编号"); |
| | | put("userName","乘车人名称"); |
| | | put("userPhone","乘车人手机"); |
| | | put("number","乘车人数"); |
| | | put("chargeMode","计费方式(1时间,2里程)"); |
| | | put("rideTime","乘车时间"); |
| | | put("startName","起点名称"); |
| | | put("endName","终点名称"); |
| | | put("driverId","接单司机id"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.Dict; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 用户日志记录 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class UserAuthenticationDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("id","实名认证id"); |
| | | put("state","审核状态(1待审核,2审核成功,3审核失败)"); |
| | | put("isDelete","是否删除(1正常,2删除)"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.Dict; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 用户日志记录 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class UserDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("id","用户id"); |
| | | put("state","用户状态(1正常,2冻结)"); |
| | | put("gold","用户金币数"); |
| | | put("balance","用户余额数"); |
| | | put("nickName","用户昵称"); |
| | | put("phone","用户手机号"); |
| | | put("level","等级(1普通用户,2白银会员,3黄金会员,4白金会员)"); |
| | | put("sex","性别"); |
| | | put("birthday","生日"); |
| | | put("industry","行业"); |
| | | put("job","职业"); |
| | | put("company","公司"); |
| | | put("education","学历"); |
| | | put("signature","个性签名"); |
| | | put("addTime","添加时间"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.Dict; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 版本控制日志记录 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class VersionDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("id","版本id"); |
| | | put("createDate","添加时间"); |
| | | put("type","类型(1用户端,2司机端)"); |
| | | put("versions","版本号"); |
| | | put("mark","版本描述"); |
| | | put("state","是否强制更新 1否,2 是"); |
| | | put("url","版本链接"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 字典map |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:43 |
| | | */ |
| | | public class DictMap extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("dictId","字典名称"); |
| | | put("dictName","字典名称"); |
| | | put("dictValues","字典内容"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 日志的字典 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class LogDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("tips","备注"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 菜单的字典 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class MenuDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("menuId","菜单id"); |
| | | put("id","菜单id"); |
| | | put("code","菜单编号"); |
| | | put("pcode","菜单父编号"); |
| | | put("name","菜单名称"); |
| | | put("icon","菜单图标"); |
| | | put("url","url地址"); |
| | | put("num","菜单排序号"); |
| | | put("levels","菜单层级"); |
| | | put("tips","备注"); |
| | | put("status","菜单状态"); |
| | | put("isopen","是否打开"); |
| | | put("",""); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 通知的映射 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class NoticeMap extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("title", "标题"); |
| | | put("content", "内容"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 角色的字典 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class RoleDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("roleId","角色名称"); |
| | | put("num","角色排序"); |
| | | put("pid","角色的父级"); |
| | | put("name","角色名称"); |
| | | put("deptid","部门名称"); |
| | | put("tips","备注"); |
| | | put("ids","资源名称"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | putFieldWrapperMethodName("pid","getSingleRoleName"); |
| | | putFieldWrapperMethodName("deptid","getDeptName"); |
| | | putFieldWrapperMethodName("roleId","getSingleRoleName"); |
| | | putFieldWrapperMethodName("ids","getMenuNames"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 用户的字典 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:01 |
| | | */ |
| | | public class UserDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | put("userId","账号"); |
| | | put("avatar","头像"); |
| | | put("account","账号"); |
| | | put("name","名字"); |
| | | put("birthday","生日"); |
| | | put("sex","性别"); |
| | | put("email","电子邮件"); |
| | | put("phone","电话"); |
| | | put("roleid","角色名称"); |
| | | put("deptid","部门名称"); |
| | | put("roleIds","角色名称集合"); |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | putFieldWrapperMethodName("sex","getSexName"); |
| | | putFieldWrapperMethodName("deptid","getDeptName"); |
| | | putFieldWrapperMethodName("roleid","getSingleRoleName"); |
| | | putFieldWrapperMethodName("userId","getUserAccountById"); |
| | | putFieldWrapperMethodName("roleIds","getRoleName"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.base; |
| | | |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * 字典映射抽象类 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 14:58 |
| | | */ |
| | | public abstract class AbstractDictMap { |
| | | |
| | | protected HashMap<String, String> dictory = new HashMap<>(); |
| | | protected HashMap<String, String> fieldWarpperDictory = new HashMap<>(); |
| | | |
| | | public AbstractDictMap(){ |
| | | put("id","主键id"); |
| | | init(); |
| | | initBeWrapped(); |
| | | } |
| | | |
| | | /** |
| | | * 初始化字段英文名称和中文名称对应的字典 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/9 19:39 |
| | | */ |
| | | public abstract void init(); |
| | | |
| | | /** |
| | | * 初始化需要被包装的字段(例如:性别为1:男,2:女,需要被包装为汉字) |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/9 19:35 |
| | | */ |
| | | protected abstract void initBeWrapped(); |
| | | |
| | | public String get(String key) { |
| | | return this.dictory.get(key); |
| | | } |
| | | |
| | | public void put(String key, String value) { |
| | | this.dictory.put(key, value); |
| | | } |
| | | |
| | | public String getFieldWarpperMethodName(String key){ |
| | | return this.fieldWarpperDictory.get(key); |
| | | } |
| | | |
| | | public void putFieldWrapperMethodName(String key,String methodName){ |
| | | this.fieldWarpperDictory.put(key,methodName); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.base; |
| | | |
| | | /** |
| | | * 系统相关的字典 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:48 |
| | | */ |
| | | public class SystemDict extends AbstractDictMap { |
| | | |
| | | @Override |
| | | public void init() { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | protected void initBeWrapped() { |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.dictmap.factory; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.factory.ConstantFactory; |
| | | import com.stylefeng.guns.core.common.constant.factory.IConstantFactory; |
| | | import com.stylefeng.guns.core.common.exception.BizExceptionEnum; |
| | | import com.stylefeng.guns.core.exception.GunsException; |
| | | |
| | | import java.lang.reflect.Method; |
| | | |
| | | /** |
| | | * 字典字段的包装器(从ConstantFactory中获取包装值) |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-06 15:12 |
| | | */ |
| | | public class DictFieldWarpperFactory { |
| | | |
| | | public static Object createFieldWarpper(Object parameter, String methodName) { |
| | | IConstantFactory constantFactory = ConstantFactory.me(); |
| | | try { |
| | | Method method = IConstantFactory.class.getMethod(methodName, parameter.getClass()); |
| | | return method.invoke(constantFactory, parameter); |
| | | } catch (Exception e) { |
| | | try { |
| | | Method method = IConstantFactory.class.getMethod(methodName, Integer.class); |
| | | return method.invoke(constantFactory, Integer.parseInt(parameter.toString())); |
| | | } catch (Exception e1) { |
| | | throw new GunsException(BizExceptionEnum.ERROR_WRAPPER_FIELD); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.factory; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.context.annotation.DependsOn; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.stylefeng.guns.core.common.constant.cache.Cache; |
| | | import com.stylefeng.guns.core.common.constant.cache.CacheKey; |
| | | import com.stylefeng.guns.core.common.constant.state.ManagerStatus; |
| | | import com.stylefeng.guns.core.common.constant.state.MenuStatus; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.support.StrKit; |
| | | import com.stylefeng.guns.core.util.Convert; |
| | | import com.stylefeng.guns.core.util.SpringContextHolder; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.DeptMapper; |
| | | import com.stylefeng.guns.modular.system.dao.DictMapper; |
| | | import com.stylefeng.guns.modular.system.dao.MenuMapper; |
| | | import com.stylefeng.guns.modular.system.dao.NoticeMapper; |
| | | import com.stylefeng.guns.modular.system.dao.RoleMapper; |
| | | import com.stylefeng.guns.modular.system.dao.UserMapper; |
| | | import com.stylefeng.guns.modular.system.model.Dept; |
| | | import com.stylefeng.guns.modular.system.model.Dict; |
| | | import com.stylefeng.guns.modular.system.model.Menu; |
| | | import com.stylefeng.guns.modular.system.model.Notice; |
| | | import com.stylefeng.guns.modular.system.model.Role; |
| | | import com.stylefeng.guns.modular.system.model.User; |
| | | |
| | | /** |
| | | * 常量的生产工厂 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017年2月13日 下午10:55:21 |
| | | */ |
| | | @Component |
| | | @DependsOn("springContextHolder") |
| | | public class ConstantFactory implements IConstantFactory { |
| | | |
| | | private RoleMapper roleMapper = SpringContextHolder.getBean(RoleMapper.class); |
| | | private DeptMapper deptMapper = SpringContextHolder.getBean(DeptMapper.class); |
| | | private DictMapper dictMapper = SpringContextHolder.getBean(DictMapper.class); |
| | | private UserMapper userMapper = SpringContextHolder.getBean(UserMapper.class); |
| | | private MenuMapper menuMapper = SpringContextHolder.getBean(MenuMapper.class); |
| | | private NoticeMapper noticeMapper = SpringContextHolder.getBean(NoticeMapper.class); |
| | | |
| | | public static IConstantFactory me() { |
| | | return SpringContextHolder.getBean("constantFactory"); |
| | | } |
| | | |
| | | /** |
| | | * 根据用户id获取用户名称 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/9 23:41 |
| | | */ |
| | | @Override |
| | | public String getUserNameById(Integer userId) { |
| | | User user = userMapper.selectById(userId); |
| | | if (user != null) { |
| | | return user.getName(); |
| | | } else { |
| | | return "--"; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据用户id获取用户账号 |
| | | * |
| | | * @author stylefeng |
| | | * @date 2017年5月16日21:55:371 |
| | | */ |
| | | @Override |
| | | public String getUserAccountById(Integer userId) { |
| | | User user = userMapper.selectById(userId); |
| | | if (user != null) { |
| | | return user.getAccount(); |
| | | } else { |
| | | return "--"; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 通过角色ids获取角色名称 |
| | | */ |
| | | @Override |
| | | @Cacheable(value = Cache.CONSTANT, key = "'" + CacheKey.ROLES_NAME + "'+#roleIds") |
| | | public String getRoleName(String roleIds) { |
| | | Integer[] roles = Convert.toIntArray(roleIds); |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (int role : roles) { |
| | | Role roleObj = roleMapper.selectById(role); |
| | | if (ToolUtil.isNotEmpty(roleObj) && ToolUtil.isNotEmpty(roleObj.getName())) { |
| | | sb.append(roleObj.getName()).append(","); |
| | | } |
| | | } |
| | | return StrKit.removeSuffix(sb.toString(), ","); |
| | | } |
| | | |
| | | /** |
| | | * 通过角色id获取角色名称 |
| | | */ |
| | | @Override |
| | | @Cacheable(value = Cache.CONSTANT, key = "'" + CacheKey.SINGLE_ROLE_NAME + "'+#roleId") |
| | | public String getSingleRoleName(Integer roleId) { |
| | | if (0 == roleId) { |
| | | return "--"; |
| | | } |
| | | Role roleObj = roleMapper.selectById(roleId); |
| | | if (ToolUtil.isNotEmpty(roleObj) && ToolUtil.isNotEmpty(roleObj.getName())) { |
| | | return roleObj.getName(); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * 通过角色id获取角色英文名称 |
| | | */ |
| | | @Override |
| | | @Cacheable(value = Cache.CONSTANT, key = "'" + CacheKey.SINGLE_ROLE_TIP + "'+#roleId") |
| | | public String getSingleRoleTip(Integer roleId) { |
| | | if (0 == roleId) { |
| | | return "--"; |
| | | } |
| | | Role roleObj = roleMapper.selectById(roleId); |
| | | if (ToolUtil.isNotEmpty(roleObj) && ToolUtil.isNotEmpty(roleObj.getName())) { |
| | | return roleObj.getTips(); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * 获取部门名称 |
| | | */ |
| | | @Override |
| | | @Cacheable(value = Cache.CONSTANT, key = "'" + CacheKey.DEPT_NAME + "'+#deptId") |
| | | public String getDeptName(Integer deptId) { |
| | | Dept dept = deptMapper.selectById(deptId); |
| | | if (ToolUtil.isNotEmpty(dept) && ToolUtil.isNotEmpty(dept.getFullname())) { |
| | | return dept.getFullname(); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * 获取菜单的名称们(多个) |
| | | */ |
| | | @Override |
| | | public String getMenuNames(String menuIds) { |
| | | Integer[] menus = Convert.toIntArray(menuIds); |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (int menu : menus) { |
| | | Menu menuObj = menuMapper.selectById(menu); |
| | | if (ToolUtil.isNotEmpty(menuObj) && ToolUtil.isNotEmpty(menuObj.getName())) { |
| | | sb.append(menuObj.getName()).append(","); |
| | | } |
| | | } |
| | | return StrKit.removeSuffix(sb.toString(), ","); |
| | | } |
| | | |
| | | /** |
| | | * 获取菜单名称 |
| | | */ |
| | | @Override |
| | | public String getMenuName(Long menuId) { |
| | | if (ToolUtil.isEmpty(menuId)) { |
| | | return ""; |
| | | } else { |
| | | Menu menu = menuMapper.selectById(menuId); |
| | | if (menu == null) { |
| | | return ""; |
| | | } else { |
| | | return menu.getName(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取菜单名称通过编号 |
| | | */ |
| | | @Override |
| | | public String getMenuNameByCode(String code) { |
| | | if (ToolUtil.isEmpty(code)) { |
| | | return ""; |
| | | } else { |
| | | Menu param = new Menu(); |
| | | param.setCode(code); |
| | | Menu menu = menuMapper.selectOne(param); |
| | | if (menu == null) { |
| | | return ""; |
| | | } else { |
| | | return menu.getName(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取字典名称 |
| | | */ |
| | | @Override |
| | | public String getDictName(Integer dictId) { |
| | | if (ToolUtil.isEmpty(dictId)) { |
| | | return ""; |
| | | } else { |
| | | Dict dict = dictMapper.selectById(dictId); |
| | | if (dict == null) { |
| | | return ""; |
| | | } else { |
| | | return dict.getName(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取通知标题 |
| | | */ |
| | | @Override |
| | | public String getNoticeTitle(Integer dictId) { |
| | | if (ToolUtil.isEmpty(dictId)) { |
| | | return ""; |
| | | } else { |
| | | Notice notice = noticeMapper.selectById(dictId); |
| | | if (notice == null) { |
| | | return ""; |
| | | } else { |
| | | return notice.getTitle(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 根据字典名称和字典中的值获取对应的名称 |
| | | */ |
| | | @Override |
| | | public String getDictsByName(String name, Integer val) { |
| | | Dict temp = new Dict(); |
| | | temp.setName(name); |
| | | Dict dict = dictMapper.selectOne(temp); |
| | | if (dict == null) { |
| | | return ""; |
| | | } else { |
| | | Wrapper<Dict> wrapper = new EntityWrapper<>(); |
| | | wrapper = wrapper.eq("pid", dict.getId()); |
| | | List<Dict> dicts = dictMapper.selectList(wrapper); |
| | | for (Dict item : dicts) { |
| | | if (item.getNum() != null && item.getNum().equals(val)) { |
| | | return item.getName(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取性别名称 |
| | | */ |
| | | @Override |
| | | public String getSexName(Integer sex) { |
| | | return getDictsByName("性别", sex); |
| | | } |
| | | |
| | | /** |
| | | * 获取用户登录状态 |
| | | */ |
| | | @Override |
| | | public String getStatusName(Integer status) { |
| | | return ManagerStatus.valueOf(status); |
| | | } |
| | | |
| | | /** |
| | | * 获取菜单状态 |
| | | */ |
| | | @Override |
| | | public String getMenuStatusName(Integer status) { |
| | | return MenuStatus.valueOf(status); |
| | | } |
| | | |
| | | /** |
| | | * 查询字典 |
| | | */ |
| | | @Override |
| | | public List<Dict> findInDict(Integer id) { |
| | | if (ToolUtil.isEmpty(id)) { |
| | | return null; |
| | | } else { |
| | | EntityWrapper<Dict> wrapper = new EntityWrapper<>(); |
| | | List<Dict> dicts = dictMapper.selectList(wrapper.eq("pid", id)); |
| | | if (dicts == null || dicts.size() == 0) { |
| | | return null; |
| | | } else { |
| | | return dicts; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取被缓存的对象(用户删除业务) |
| | | */ |
| | | @Override |
| | | public String getCacheObject(String para) { |
| | | return LogObjectHolder.me().get().toString(); |
| | | } |
| | | |
| | | /** |
| | | * 获取子部门id |
| | | */ |
| | | @Override |
| | | public List<Integer> getSubDeptId(Integer deptid) { |
| | | Wrapper<Dept> wrapper = new EntityWrapper<>(); |
| | | wrapper = wrapper.like("pids", "%[" + deptid + "]%"); |
| | | List<Dept> depts = this.deptMapper.selectList(wrapper); |
| | | |
| | | ArrayList<Integer> deptids = new ArrayList<>(); |
| | | |
| | | if(depts != null && depts.size() > 0){ |
| | | for (Dept dept : depts) { |
| | | deptids.add(dept.getId()); |
| | | } |
| | | } |
| | | |
| | | return deptids; |
| | | } |
| | | |
| | | /** |
| | | * 获取所有父部门id |
| | | */ |
| | | @Override |
| | | public List<Integer> getParentDeptIds(Integer deptid) { |
| | | Dept dept = deptMapper.selectById(deptid); |
| | | String pids = dept.getPids(); |
| | | String[] split = pids.split(","); |
| | | ArrayList<Integer> parentDeptIds = new ArrayList<>(); |
| | | for (String s : split) { |
| | | parentDeptIds.add(Integer.valueOf(StrKit.removeSuffix(StrKit.removePrefix(s, "["), "]"))); |
| | | } |
| | | return parentDeptIds; |
| | | } |
| | | |
| | | /** |
| | | * 根据用户Id获取用户昵称 |
| | | */ |
| | | @Override |
| | | public String getTUserNickNameById(Integer userId) { |
| | | /* TUser user = tUserMapper.selectById(userId); |
| | | if (user != null) { |
| | | return user.getNickName(); |
| | | } else { |
| | | return "--"; |
| | | }*/ |
| | | return "--"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.factory; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.Dict; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 常量生产工厂的接口 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-06-14 21:12 |
| | | */ |
| | | public interface IConstantFactory { |
| | | |
| | | /** |
| | | * 根据用户id获取用户名称 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/9 23:41 |
| | | */ |
| | | String getUserNameById(Integer userId); |
| | | |
| | | /** |
| | | * 根据用户id获取用户账号 |
| | | * |
| | | * @author stylefeng |
| | | * @date 2017年5月16日21:55:371 |
| | | */ |
| | | String getUserAccountById(Integer userId); |
| | | |
| | | /** |
| | | * 通过角色ids获取角色名称 |
| | | */ |
| | | String getRoleName(String roleIds); |
| | | |
| | | /** |
| | | * 通过角色id获取角色名称 |
| | | */ |
| | | String getSingleRoleName(Integer roleId); |
| | | |
| | | /** |
| | | * 通过角色id获取角色英文名称 |
| | | */ |
| | | String getSingleRoleTip(Integer roleId); |
| | | |
| | | /** |
| | | * 获取部门名称 |
| | | */ |
| | | String getDeptName(Integer deptId); |
| | | |
| | | /** |
| | | * 获取菜单的名称们(多个) |
| | | */ |
| | | String getMenuNames(String menuIds); |
| | | |
| | | /** |
| | | * 获取菜单名称 |
| | | */ |
| | | String getMenuName(Long menuId); |
| | | |
| | | /** |
| | | * 获取菜单名称通过编号 |
| | | */ |
| | | String getMenuNameByCode(String code); |
| | | |
| | | /** |
| | | * 获取字典名称 |
| | | */ |
| | | String getDictName(Integer dictId); |
| | | |
| | | /** |
| | | * 获取通知标题 |
| | | */ |
| | | String getNoticeTitle(Integer dictId); |
| | | |
| | | /** |
| | | * 根据字典名称和字典中的值获取对应的名称 |
| | | */ |
| | | String getDictsByName(String name, Integer val); |
| | | |
| | | /** |
| | | * 获取性别名称 |
| | | */ |
| | | String getSexName(Integer sex); |
| | | |
| | | /** |
| | | * 获取用户登录状态 |
| | | */ |
| | | String getStatusName(Integer status); |
| | | |
| | | /** |
| | | * 获取菜单状态 |
| | | */ |
| | | String getMenuStatusName(Integer status); |
| | | |
| | | /** |
| | | * 查询字典 |
| | | */ |
| | | List<Dict> findInDict(Integer id); |
| | | |
| | | /** |
| | | * 获取被缓存的对象(用户删除业务) |
| | | */ |
| | | String getCacheObject(String para); |
| | | |
| | | /** |
| | | * 获取子部门id |
| | | */ |
| | | List<Integer> getSubDeptId(Integer deptid); |
| | | |
| | | /** |
| | | * 获取所有父部门id |
| | | */ |
| | | List<Integer> getParentDeptIds(Integer deptid); |
| | | |
| | | /** |
| | | * 根据用户Id获取用户昵称 |
| | | */ |
| | | String getTUserNickNameById(Integer userId); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.factory; |
| | | |
| | | import com.stylefeng.guns.core.support.StrKit; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 组合字符串生产者 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-04-27 16:42 |
| | | */ |
| | | public class MutiStrFactory { |
| | | |
| | | /** |
| | | * 每个条目之间的分隔符 |
| | | */ |
| | | public static final String ITEM_SPLIT = ";"; |
| | | |
| | | /** |
| | | * 属性之间的分隔符 |
| | | */ |
| | | public static final String ATTR_SPLIT = ":"; |
| | | |
| | | /** |
| | | * 拼接字符串的id |
| | | */ |
| | | public static final String MUTI_STR_ID = "ID"; |
| | | |
| | | /** |
| | | * 拼接字符串的CODE |
| | | */ |
| | | public static final String MUTI_STR_CODE = "CODE"; |
| | | |
| | | /** |
| | | * 拼接字符串的NAME |
| | | */ |
| | | public static final String MUTI_STR_NAME = "NAME"; |
| | | |
| | | /** |
| | | * 拼接字符串的NUM |
| | | */ |
| | | public static final String MUTI_STR_NUM = "NUM"; |
| | | |
| | | /** |
| | | * 解析一个组合字符串(例如: "1:启用;2:禁用;3:冻结" 这样的字符串) |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2017/4/27 16:44 |
| | | */ |
| | | public static List<Map<String,String>> parseKeyValue(String mutiString){ |
| | | if(ToolUtil.isEmpty(mutiString)){ |
| | | return new ArrayList<>(); |
| | | }else{ |
| | | ArrayList<Map<String,String>> results = new ArrayList<>(); |
| | | String[] items = StrKit.split(StrKit.removeSuffix(mutiString, ITEM_SPLIT), ITEM_SPLIT); |
| | | for (String item : items) { |
| | | String[] attrs = item.split(ATTR_SPLIT); |
| | | HashMap<String, String> itemMap = new HashMap<>(); |
| | | itemMap.put(MUTI_STR_CODE,attrs[0]); |
| | | itemMap.put(MUTI_STR_NAME,attrs[1]); |
| | | itemMap.put(MUTI_STR_NUM,attrs[2]); |
| | | results.add(itemMap); |
| | | } |
| | | return results; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 解析id:key:value这样类型的字符串 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2017/4/28 11:06 |
| | | */ |
| | | public static List<Map<String,String>> parseIdKeyValue(String mutiString){ |
| | | if(ToolUtil.isEmpty(mutiString)){ |
| | | return new ArrayList<>(); |
| | | }else{ |
| | | ArrayList<Map<String,String>> results = new ArrayList<>(); |
| | | String[] items = StrKit.split(StrKit.removeSuffix(mutiString, ITEM_SPLIT), ITEM_SPLIT); |
| | | for (String item : items) { |
| | | String[] attrs = item.split(ATTR_SPLIT); |
| | | HashMap<String, String> itemMap = new HashMap<>(); |
| | | itemMap.put(MUTI_STR_CODE,attrs[0]); |
| | | itemMap.put(MUTI_STR_NAME,attrs[1]); |
| | | itemMap.put(MUTI_STR_NUM,attrs[2]); |
| | | results.add(itemMap); |
| | | } |
| | | return results; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.factory; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.common.constant.state.Order; |
| | | import com.stylefeng.guns.core.support.HttpKit; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | | * BootStrap Table默认的分页参数创建 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-04-05 22:25 |
| | | */ |
| | | public class PageFactory<T> { |
| | | |
| | | public Page<T> defaultPage() { |
| | | HttpServletRequest request = HttpKit.getRequest(); |
| | | int limit = Integer.valueOf(request.getParameter("limit")); //每页多少条数据 |
| | | int offset = Integer.valueOf(request.getParameter("offset")); //每页的偏移量(本页当前有多少条) |
| | | String sort = request.getParameter("sort"); //排序字段名称 |
| | | String order = request.getParameter("order"); //asc或desc(升序或降序) |
| | | if (ToolUtil.isEmpty(sort)) { |
| | | Page<T> page = new Page<>((offset / limit + 1), limit); |
| | | page.setOpenSort(false); |
| | | return page; |
| | | } else { |
| | | Page<T> page = new Page<>((offset / limit + 1), limit, sort); |
| | | if (Order.ASC.getDes().equals(order)) { |
| | | page.setAsc(true); |
| | | } else { |
| | | page.setAsc(false); |
| | | } |
| | | return page; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.state; |
| | | |
| | | /** |
| | | * 业务日志类型 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2017年1月22日 下午12:14:59 |
| | | */ |
| | | public enum BizLogType { |
| | | |
| | | ALL(0, null),//全部日志 |
| | | BUSSINESS(1, "业务日志"), |
| | | EXCEPTION(2, "异常日志"); |
| | | |
| | | Integer val; |
| | | String message; |
| | | |
| | | BizLogType(Integer val, String message) { |
| | | this.val = val; |
| | | this.message = message; |
| | | } |
| | | |
| | | public String getMessage() { |
| | | return message; |
| | | } |
| | | |
| | | public void setMessage(String message) { |
| | | this.message = message; |
| | | } |
| | | |
| | | public Integer getVal() { |
| | | return val; |
| | | } |
| | | |
| | | public void setVal(Integer val) { |
| | | this.val = val; |
| | | } |
| | | |
| | | public static String valueOf(Integer value) { |
| | | if (value == null) { |
| | | return null; |
| | | } else { |
| | | for (BizLogType bizLogType : BizLogType.values()) { |
| | | if (bizLogType.getVal().equals(value)) { |
| | | return bizLogType.getMessage(); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.state; |
| | | |
| | | /** |
| | | * 是否是菜单的枚举 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017年6月1日22:50:11 |
| | | */ |
| | | public enum ExpenseState { |
| | | |
| | | SUBMITING(1, "待提交"), |
| | | CHECKING(2, "待审核"), |
| | | PASS(3, "审核通过"), |
| | | UN_PASS(4, "未通过"); |
| | | |
| | | int code; |
| | | String message; |
| | | |
| | | ExpenseState(int code, String message) { |
| | | this.code = code; |
| | | this.message = message; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(int code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getMessage() { |
| | | return message; |
| | | } |
| | | |
| | | public void setMessage(String message) { |
| | | this.message = message; |
| | | } |
| | | |
| | | public static String valueOf(Integer status) { |
| | | if (status == null) { |
| | | return ""; |
| | | } else { |
| | | for (ExpenseState s : ExpenseState.values()) { |
| | | if (s.getCode() == status) { |
| | | return s.getMessage(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.state; |
| | | |
| | | /** |
| | | * 业务是否成功的日志记录 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2017年1月22日 下午12:14:59 |
| | | */ |
| | | public enum LogSucceed { |
| | | |
| | | SUCCESS("成功"), |
| | | FAIL("失败"); |
| | | |
| | | String message; |
| | | |
| | | LogSucceed(String message) { |
| | | this.message = message; |
| | | } |
| | | |
| | | public String getMessage() { |
| | | return message; |
| | | } |
| | | |
| | | public void setMessage(String message) { |
| | | this.message = message; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.state; |
| | | |
| | | /** |
| | | * 日志类型 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2017年1月22日 下午12:14:59 |
| | | */ |
| | | public enum LogType { |
| | | |
| | | LOGIN("登录日志"), |
| | | LOGIN_FAIL("登录失败日志"), |
| | | EXIT("退出日志"), |
| | | EXCEPTION("异常日志"), |
| | | BUSSINESS("业务日志"); |
| | | |
| | | String message; |
| | | |
| | | LogType(String message) { |
| | | this.message = message; |
| | | } |
| | | |
| | | public String getMessage() { |
| | | return message; |
| | | } |
| | | |
| | | public void setMessage(String message) { |
| | | this.message = message; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.state; |
| | | |
| | | /** |
| | | * 管理员的状态 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2017年1月10日 下午9:54:13 |
| | | */ |
| | | public enum ManagerStatus { |
| | | |
| | | OK(1, "启用"), FREEZED(2, "冻结"), DELETED(3, "被删除"); |
| | | |
| | | int code; |
| | | String message; |
| | | |
| | | ManagerStatus(int code, String message) { |
| | | this.code = code; |
| | | this.message = message; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(int code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getMessage() { |
| | | return message; |
| | | } |
| | | |
| | | public void setMessage(String message) { |
| | | this.message = message; |
| | | } |
| | | |
| | | public static String valueOf(Integer value) { |
| | | if (value == null) { |
| | | return ""; |
| | | } else { |
| | | for (ManagerStatus ms : ManagerStatus.values()) { |
| | | if (ms.getCode() == value) { |
| | | return ms.getMessage(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.state; |
| | | |
| | | /** |
| | | * 菜单是否打开的状态 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2017年4月8日10:12:15 |
| | | */ |
| | | public enum MenuOpenStatus { |
| | | |
| | | OPEN(1, "打开"), |
| | | CLOSE(0, "关闭"); |
| | | |
| | | int code; |
| | | String message; |
| | | |
| | | MenuOpenStatus(int code, String message) { |
| | | this.code = code; |
| | | this.message = message; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(int code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getMessage() { |
| | | return message; |
| | | } |
| | | |
| | | public void setMessage(String message) { |
| | | this.message = message; |
| | | } |
| | | |
| | | public static String valueOf(Integer status) { |
| | | if (status == null) { |
| | | return ""; |
| | | } else { |
| | | for (MenuOpenStatus s : MenuOpenStatus.values()) { |
| | | if (s.getCode() == status) { |
| | | return s.getMessage(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.state; |
| | | |
| | | /** |
| | | * 菜单的状态 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2017年1月22日 下午12:14:59 |
| | | */ |
| | | public enum MenuStatus { |
| | | |
| | | ENABLE(1, "启用"), |
| | | DISABLE(0, "禁用"); |
| | | |
| | | int code; |
| | | String message; |
| | | |
| | | MenuStatus(int code, String message) { |
| | | this.code = code; |
| | | this.message = message; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(int code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public String getMessage() { |
| | | return message; |
| | | } |
| | | |
| | | public void setMessage(String message) { |
| | | this.message = message; |
| | | } |
| | | |
| | | public static String valueOf(Integer status) { |
| | | if (status == null) { |
| | | return ""; |
| | | } else { |
| | | for (MenuStatus s : MenuStatus.values()) { |
| | | if (s.getCode() == status) { |
| | | return s.getMessage(); |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.constant.state; |
| | | |
| | | /** |
| | | * 数据库排序 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2017年5月31日20:48:41 |
| | | */ |
| | | public enum Order { |
| | | |
| | | ASC("asc"), DESC("desc"); |
| | | |
| | | private String des; |
| | | |
| | | Order(String des) { |
| | | this.des = des; |
| | | } |
| | | |
| | | public String getDes() { |
| | | return des; |
| | | } |
| | | |
| | | public void setDes(String des) { |
| | | this.des = des; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.exception; |
| | | |
| | | import com.stylefeng.guns.core.exception.ServiceExceptionEnum; |
| | | |
| | | /** |
| | | * @author fengshuonan |
| | | * @Description 所有业务异常的枚举 |
| | | * @date 2016年11月12日 下午5:04:51 |
| | | */ |
| | | public enum BizExceptionEnum implements ServiceExceptionEnum { |
| | | |
| | | /** |
| | | * 字典 |
| | | */ |
| | | DICT_EXISTED(400, "字典已经存在"), |
| | | ERROR_CREATE_DICT(500, "创建字典失败"), |
| | | ERROR_WRAPPER_FIELD(500, "包装字典属性失败"), |
| | | ERROR_CODE_EMPTY(500, "字典类型不能为空"), |
| | | |
| | | /** |
| | | * 文件上传 |
| | | */ |
| | | FILE_READING_ERROR(400, "FILE_READING_ERROR!"), |
| | | FILE_NOT_FOUND(400, "FILE_NOT_FOUND!"), |
| | | UPLOAD_ERROR(500, "上传图片出错"), |
| | | |
| | | /** |
| | | * 权限和数据问题 |
| | | */ |
| | | DB_RESOURCE_NULL(400, "数据库中没有该资源"), |
| | | NO_PERMITION(405, "权限异常"), |
| | | REQUEST_INVALIDATE(400, "请求数据格式不正确"), |
| | | INVALID_KAPTCHA(400, "验证码不正确"), |
| | | CANT_DELETE_ADMIN(600, "不能删除超级管理员"), |
| | | CANT_FREEZE_ADMIN(600, "不能冻结超级管理员"), |
| | | CANT_CHANGE_ADMIN(600, "不能修改超级管理员角色"), |
| | | |
| | | /** |
| | | * 账户问题 |
| | | */ |
| | | USER_ALREADY_REG(401, "该用户已经注册"), |
| | | NO_THIS_USER(400, "没有此用户"), |
| | | USER_NOT_EXISTED(400, "没有此用户"), |
| | | ACCOUNT_FREEZED(401, "账号被冻结"), |
| | | OLD_PWD_NOT_RIGHT(402, "原密码不正确"), |
| | | TWO_PWD_NOT_MATCH(405, "两次输入密码不一致"), |
| | | |
| | | /** |
| | | * 错误的请求 |
| | | */ |
| | | MENU_PCODE_COINCIDENCE(400, "菜单编号和副编号不能一致"), |
| | | EXISTED_THE_MENU(400, "菜单编号重复,不能添加"), |
| | | DICT_MUST_BE_NUMBER(400, "字典的值必须为数字"), |
| | | REQUEST_NULL(400, "请求有错误"), |
| | | SESSION_TIMEOUT(400, "会话超时"), |
| | | SERVER_ERROR(500, "服务器异常"), |
| | | |
| | | /** |
| | | * token异常 |
| | | */ |
| | | TOKEN_EXPIRED(700, "token过期"), |
| | | TOKEN_ERROR(700, "token验证失败"), |
| | | |
| | | /** |
| | | * 签名异常 |
| | | */ |
| | | SIGN_ERROR(700, "签名验证失败"), |
| | | |
| | | /** |
| | | * 其他 |
| | | */ |
| | | AUTH_REQUEST_ERROR(400, "账号密码错误"); |
| | | |
| | | BizExceptionEnum(int code, String message) { |
| | | this.code = code; |
| | | this.message = message; |
| | | } |
| | | |
| | | private Integer code; |
| | | |
| | | private String message; |
| | | |
| | | @Override |
| | | public Integer getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(Integer code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | @Override |
| | | public String getMessage() { |
| | | return message; |
| | | } |
| | | |
| | | public void setMessage(String message) { |
| | | this.message = message; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.common.exception; |
| | | |
| | | /** |
| | | * 验证码错误异常 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-05-05 23:52 |
| | | */ |
| | | public class InvalidKaptchaException extends RuntimeException { |
| | | } |
New file |
| | |
| | | /* |
| | | * Licensed to the Apache Software Foundation (ASF) under one |
| | | * or more contributor license agreements. See the NOTICE file |
| | | * distributed with this work for additional information |
| | | * regarding copyright ownership. The ASF licenses this file |
| | | * to you under the Apache License, Version 2.0 (the |
| | | * "License"); you may not use this file except in compliance |
| | | * with the License. You may obtain a copy of the License at |
| | | * |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * |
| | | * Unless required by applicable law or agreed to in writing, |
| | | * software distributed under the License is distributed on an |
| | | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| | | * KIND, either express or implied. See the License for the |
| | | * specific language governing permissions and limitations |
| | | * under the License. |
| | | */ |
| | | package com.stylefeng.guns.core.intercept; |
| | | |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.apache.shiro.web.filter.AccessControlFilter; |
| | | import org.apache.shiro.web.util.WebUtils; |
| | | |
| | | import javax.servlet.ServletRequest; |
| | | import javax.servlet.ServletResponse; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * Filter that allows access to resources if the accessor is a known user, which is defined as |
| | | * having a known principal. This means that any user who is authenticated or remembered via a |
| | | * 'remember me' feature will be allowed access from this filter. |
| | | * <p/> |
| | | * If the accessor is not a known user, then they will be redirected to the {@link #setLoginUrl(String) loginUrl}</p> |
| | | * |
| | | * @since 0.9 |
| | | */ |
| | | public class GunsUserFilter extends AccessControlFilter { |
| | | |
| | | /** |
| | | * Returns <code>true</code> if the request is a |
| | | * {@link #isLoginRequest(javax.servlet.ServletRequest, javax.servlet.ServletResponse) loginRequest} or |
| | | * if the current {@link #getSubject(javax.servlet.ServletRequest, javax.servlet.ServletResponse) subject} |
| | | * is not <code>null</code>, <code>false</code> otherwise. |
| | | * |
| | | * @return <code>true</code> if the request is a |
| | | * {@link #isLoginRequest(javax.servlet.ServletRequest, javax.servlet.ServletResponse) loginRequest} or |
| | | * if the current {@link #getSubject(javax.servlet.ServletRequest, javax.servlet.ServletResponse) subject} |
| | | * is not <code>null</code>, <code>false</code> otherwise. |
| | | */ |
| | | protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) { |
| | | if (isLoginRequest(request, response)) { |
| | | return true; |
| | | } else { |
| | | Subject subject = getSubject(request, response); |
| | | // If principal is not null, then the user is known and should be allowed access. |
| | | return subject.getPrincipal() != null; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * This default implementation simply calls |
| | | * {@link #saveRequestAndRedirectToLogin(javax.servlet.ServletRequest, javax.servlet.ServletResponse) saveRequestAndRedirectToLogin} |
| | | * and then immediately returns <code>false</code>, thereby preventing the chain from continuing so the redirect may |
| | | * execute. |
| | | */ |
| | | protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception { |
| | | HttpServletRequest httpServletRequest = WebUtils.toHttp(request); |
| | | HttpServletResponse httpServletResponse = WebUtils.toHttp(response); |
| | | |
| | | /** |
| | | * 如果是ajax请求则不进行跳转 |
| | | */ |
| | | if (httpServletRequest.getHeader("x-requested-with") != null |
| | | && httpServletRequest.getHeader("x-requested-with").equalsIgnoreCase("XMLHttpRequest")) { |
| | | httpServletResponse.setHeader("sessionstatus", "timeout"); |
| | | return false; |
| | | } else { |
| | | |
| | | /** |
| | | * 第一次点击页面 |
| | | */ |
| | | String referer = httpServletRequest.getHeader("Referer"); |
| | | if (referer == null) { |
| | | saveRequestAndRedirectToLogin(request, response); |
| | | return false; |
| | | } else { |
| | | |
| | | /** |
| | | * 从别的页面跳转过来的 |
| | | */ |
| | | if (ShiroKit.getSession().getAttribute("sessionFlag") == null) { |
| | | httpServletRequest.setAttribute("tips", "请重新登录"); |
| | | httpServletRequest.getRequestDispatcher("/login").forward(request, response); |
| | | return false; |
| | | } else { |
| | | saveRequestAndRedirectToLogin(request, response); |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.intercept; |
| | | |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.common.constant.JwtConstants; |
| | | import com.stylefeng.guns.core.common.exception.BizExceptionEnum; |
| | | import com.stylefeng.guns.core.util.JwtTokenUtil; |
| | | import com.stylefeng.guns.core.util.RenderUtil; |
| | | import io.jsonwebtoken.JwtException; |
| | | import org.springframework.web.method.HandlerMethod; |
| | | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | |
| | | /** |
| | | * Rest Api接口鉴权 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2018/7/20 23:11 |
| | | */ |
| | | public class RestApiInteceptor extends HandlerInterceptorAdapter { |
| | | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { |
| | | if (handler instanceof org.springframework.web.servlet.resource.ResourceHttpRequestHandler) { |
| | | return true; |
| | | } |
| | | HandlerMethod handlerMethod = (HandlerMethod) handler; |
| | | return check(request, response, handlerMethod); |
| | | } |
| | | |
| | | private boolean check(HttpServletRequest request, HttpServletResponse response, HandlerMethod handlerMethod) { |
| | | if (request.getServletPath().equals(JwtConstants.AUTH_PATH)) { |
| | | return true; |
| | | } |
| | | final String requestHeader = request.getHeader(JwtConstants.AUTH_HEADER); |
| | | String authToken; |
| | | if (requestHeader != null && requestHeader.startsWith("Bearer ")) { |
| | | authToken = requestHeader.substring(7); |
| | | |
| | | //验证token是否过期,包含了验证jwt是否正确 |
| | | try { |
| | | boolean flag = JwtTokenUtil.isTokenExpired(authToken); |
| | | if (flag) { |
| | | RenderUtil.renderJson(response, new ErrorTip(BizExceptionEnum.TOKEN_EXPIRED.getCode(), BizExceptionEnum.TOKEN_EXPIRED.getMessage())); |
| | | return false; |
| | | } |
| | | } catch (JwtException e) { |
| | | //有异常就是token解析失败 |
| | | RenderUtil.renderJson(response, new ErrorTip(BizExceptionEnum.TOKEN_ERROR.getCode(), BizExceptionEnum.TOKEN_ERROR.getMessage())); |
| | | return false; |
| | | } |
| | | } else { |
| | | //header没有带Bearer字段 |
| | | RenderUtil.renderJson(response, new ErrorTip(BizExceptionEnum.TOKEN_ERROR.getCode(), BizExceptionEnum.TOKEN_ERROR.getMessage())); |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.intercept; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.util.HttpSessionHolder; |
| | | import org.aspectj.lang.ProceedingJoinPoint; |
| | | import org.aspectj.lang.annotation.Around; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.annotation.Pointcut; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 静态调用session的拦截器 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2016年11月13日 下午10:15:42 |
| | | */ |
| | | @Aspect |
| | | @Component |
| | | public class SessionHolderInterceptor extends BaseController { |
| | | |
| | | @Pointcut("execution(* com.stylefeng.guns.*..controller.*.*(..))") |
| | | public void cutService() { |
| | | } |
| | | |
| | | @Around("cutService()") |
| | | public Object sessionKit(ProceedingJoinPoint point) throws Throwable { |
| | | HttpSessionHolder.put(super.getHttpServletRequest().getSession()); |
| | | try { |
| | | return point.proceed(); |
| | | } finally { |
| | | HttpSessionHolder.remove(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com). |
| | | * <p> |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * <p> |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * <p> |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.stylefeng.guns.core.listener; |
| | | |
| | | import javax.servlet.ServletContext; |
| | | import javax.servlet.ServletContextEvent; |
| | | import javax.servlet.ServletContextListener; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * ServletContext监听器 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2018/2/22 21:07 |
| | | */ |
| | | public class ConfigListener implements ServletContextListener { |
| | | |
| | | private static Map<String, String> conf = new HashMap<>(); |
| | | |
| | | public static Map<String, String> getConf() { |
| | | return conf; |
| | | } |
| | | |
| | | @Override |
| | | public void contextDestroyed(ServletContextEvent arg0) { |
| | | conf.clear(); |
| | | } |
| | | |
| | | @Override |
| | | public void contextInitialized(ServletContextEvent evt) { |
| | | ServletContext sc = evt.getServletContext(); |
| | | |
| | | //项目发布,当前运行环境的绝对路径 |
| | | conf.put("realPath", sc.getRealPath("/").replaceFirst("/", "")); |
| | | |
| | | //servletContextPath,默认"" |
| | | conf.put("contextPath", sc.getContextPath()); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.log; |
| | | |
| | | import java.util.TimerTask; |
| | | import java.util.concurrent.ScheduledThreadPoolExecutor; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * 日志管理器 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-03-30 16:29 |
| | | */ |
| | | public class LogManager { |
| | | |
| | | //日志记录操作延时 |
| | | private final int OPERATE_DELAY_TIME = 10; |
| | | |
| | | //异步操作记录日志的线程池 |
| | | private ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(10); |
| | | |
| | | private LogManager() { |
| | | } |
| | | |
| | | public static LogManager logManager = new LogManager(); |
| | | |
| | | public static LogManager me() { |
| | | return logManager; |
| | | } |
| | | |
| | | public void executeLog(TimerTask task) { |
| | | executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.log; |
| | | |
| | | import com.stylefeng.guns.core.util.SpringContextHolder; |
| | | import org.springframework.context.annotation.Scope; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.context.WebApplicationContext; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 被修改的bean临时存放的地方 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-03-31 11:19 |
| | | */ |
| | | @Component |
| | | @Scope(scopeName = WebApplicationContext.SCOPE_SESSION) |
| | | public class LogObjectHolder implements Serializable{ |
| | | |
| | | private Object object = null; |
| | | |
| | | public void set(Object obj) { |
| | | this.object = obj; |
| | | } |
| | | |
| | | public Object get() { |
| | | return object; |
| | | } |
| | | |
| | | public static LogObjectHolder me(){ |
| | | LogObjectHolder bean = SpringContextHolder.getBean(LogObjectHolder.class); |
| | | return bean; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.log.factory; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.state.LogSucceed; |
| | | import com.stylefeng.guns.core.common.constant.state.LogType; |
| | | import com.stylefeng.guns.modular.system.model.LoginLog; |
| | | import com.stylefeng.guns.modular.system.model.OperationLog; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 日志对象创建工厂 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2016年12月6日 下午9:18:27 |
| | | */ |
| | | public class LogFactory { |
| | | |
| | | /** |
| | | * 创建操作日志 |
| | | */ |
| | | public static OperationLog createOperationLog(LogType logType, Integer userId, String bussinessName, String clazzName, String methodName, String msg, LogSucceed succeed) { |
| | | OperationLog operationLog = new OperationLog(); |
| | | operationLog.setLogtype(logType.getMessage()); |
| | | operationLog.setLogname(bussinessName); |
| | | operationLog.setUserid(userId); |
| | | operationLog.setClassname(clazzName); |
| | | operationLog.setMethod(methodName); |
| | | operationLog.setCreatetime(new Date()); |
| | | operationLog.setSucceed(succeed.getMessage()); |
| | | operationLog.setMessage(msg); |
| | | return operationLog; |
| | | } |
| | | |
| | | /** |
| | | * 创建登录日志 |
| | | */ |
| | | public static LoginLog createLoginLog(LogType logType, Integer userId, String msg, String ip) { |
| | | LoginLog loginLog = new LoginLog(); |
| | | loginLog.setLogname(logType.getMessage()); |
| | | loginLog.setUserid(userId); |
| | | loginLog.setCreatetime(new Date()); |
| | | loginLog.setSucceed(LogSucceed.SUCCESS.getMessage()); |
| | | loginLog.setIp(ip); |
| | | loginLog.setMessage(msg); |
| | | return loginLog; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.log.factory; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.state.LogSucceed; |
| | | import com.stylefeng.guns.core.common.constant.state.LogType; |
| | | import com.stylefeng.guns.modular.system.dao.LoginLogMapper; |
| | | import com.stylefeng.guns.modular.system.dao.OperationLogMapper; |
| | | import com.stylefeng.guns.modular.system.model.LoginLog; |
| | | import com.stylefeng.guns.modular.system.model.OperationLog; |
| | | import com.stylefeng.guns.core.db.Db; |
| | | import com.stylefeng.guns.core.log.LogManager; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | import java.util.TimerTask; |
| | | |
| | | /** |
| | | * 日志操作任务创建工厂 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2016年12月6日 下午9:18:27 |
| | | */ |
| | | public class LogTaskFactory { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(LogManager.class); |
| | | private static LoginLogMapper loginLogMapper = Db.getMapper(LoginLogMapper.class); |
| | | private static OperationLogMapper operationLogMapper = Db.getMapper(OperationLogMapper.class); |
| | | |
| | | public static TimerTask loginLog(final Integer userId, final String ip) { |
| | | return new TimerTask() { |
| | | @Override |
| | | public void run() { |
| | | try { |
| | | LoginLog loginLog = LogFactory.createLoginLog(LogType.LOGIN, userId, null, ip); |
| | | loginLogMapper.insert(loginLog); |
| | | } catch (Exception e) { |
| | | logger.error("创建登录日志异常!", e); |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | |
| | | public static TimerTask loginLog(final String username, final String msg, final String ip) { |
| | | return new TimerTask() { |
| | | @Override |
| | | public void run() { |
| | | LoginLog loginLog = LogFactory.createLoginLog( |
| | | LogType.LOGIN_FAIL, null, "账号:" + username + "," + msg, ip); |
| | | try { |
| | | loginLogMapper.insert(loginLog); |
| | | } catch (Exception e) { |
| | | logger.error("创建登录失败异常!", e); |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | |
| | | public static TimerTask exitLog(final Integer userId, final String ip) { |
| | | return new TimerTask() { |
| | | @Override |
| | | public void run() { |
| | | LoginLog loginLog = LogFactory.createLoginLog(LogType.EXIT, userId, null,ip); |
| | | try { |
| | | loginLogMapper.insert(loginLog); |
| | | } catch (Exception e) { |
| | | logger.error("创建退出日志异常!", e); |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | |
| | | public static TimerTask bussinessLog(final Integer userId, final String bussinessName, final String clazzName, final String methodName, final String msg) { |
| | | return new TimerTask() { |
| | | @Override |
| | | public void run() { |
| | | OperationLog operationLog = LogFactory.createOperationLog( |
| | | LogType.BUSSINESS, userId, bussinessName, clazzName, methodName, msg, LogSucceed.SUCCESS); |
| | | try { |
| | | operationLogMapper.insert(operationLog); |
| | | } catch (Exception e) { |
| | | logger.error("创建业务日志异常!", e); |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | |
| | | public static TimerTask exceptionLog(final Integer userId, final Exception exception) { |
| | | return new TimerTask() { |
| | | @Override |
| | | public void run() { |
| | | String msg = ToolUtil.getExceptionMsg(exception); |
| | | OperationLog operationLog = LogFactory.createOperationLog( |
| | | LogType.EXCEPTION, userId, "", null, null, msg, LogSucceed.FAIL); |
| | | try { |
| | | operationLogMapper.insert(operationLog); |
| | | } catch (Exception e) { |
| | | logger.error("创建异常日志异常!", e); |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.shiro; |
| | | |
| | | import com.stylefeng.guns.core.shiro.factory.IShiro; |
| | | import com.stylefeng.guns.core.shiro.factory.ShiroFactroy; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.User; |
| | | import org.apache.shiro.authc.AuthenticationException; |
| | | import org.apache.shiro.authc.AuthenticationInfo; |
| | | import org.apache.shiro.authc.AuthenticationToken; |
| | | import org.apache.shiro.authc.UsernamePasswordToken; |
| | | import org.apache.shiro.authc.credential.CredentialsMatcher; |
| | | import org.apache.shiro.authc.credential.HashedCredentialsMatcher; |
| | | import org.apache.shiro.authz.AuthorizationInfo; |
| | | import org.apache.shiro.authz.SimpleAuthorizationInfo; |
| | | import org.apache.shiro.realm.AuthorizingRealm; |
| | | import org.apache.shiro.subject.PrincipalCollection; |
| | | |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | public class ShiroDbRealm extends AuthorizingRealm { |
| | | |
| | | /** |
| | | * 登录认证 |
| | | */ |
| | | @Override |
| | | protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authcToken) |
| | | throws AuthenticationException { |
| | | IShiro shiroFactory = ShiroFactroy.me(); |
| | | UsernamePasswordToken token = (UsernamePasswordToken) authcToken; |
| | | User user = shiroFactory.user(token.getUsername()); |
| | | ShiroUser shiroUser = shiroFactory.shiroUser(user); |
| | | return shiroFactory.info(shiroUser, user, super.getName()); |
| | | } |
| | | |
| | | /** |
| | | * 权限认证 |
| | | */ |
| | | @Override |
| | | protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { |
| | | IShiro shiroFactory = ShiroFactroy.me(); |
| | | ShiroUser shiroUser = (ShiroUser) principals.getPrimaryPrincipal(); |
| | | List<Integer> roleList = shiroUser.getRoleList(); |
| | | |
| | | Set<String> permissionSet = new HashSet<>(); |
| | | Set<String> roleNameSet = new HashSet<>(); |
| | | |
| | | for (Integer roleId : roleList) { |
| | | List<String> permissions = shiroFactory.findPermissionsByRoleId(roleId); |
| | | if (permissions != null) { |
| | | for (String permission : permissions) { |
| | | if (ToolUtil.isNotEmpty(permission)) { |
| | | permissionSet.add(permission); |
| | | } |
| | | } |
| | | } |
| | | String roleName = shiroFactory.findRoleNameByRoleId(roleId); |
| | | roleNameSet.add(roleName); |
| | | } |
| | | |
| | | SimpleAuthorizationInfo info = new SimpleAuthorizationInfo(); |
| | | info.addStringPermissions(permissionSet); |
| | | info.addRoles(roleNameSet); |
| | | return info; |
| | | } |
| | | |
| | | /** |
| | | * 设置认证加密方式 |
| | | */ |
| | | @Override |
| | | public void setCredentialsMatcher(CredentialsMatcher credentialsMatcher) { |
| | | HashedCredentialsMatcher md5CredentialsMatcher = new HashedCredentialsMatcher(); |
| | | md5CredentialsMatcher.setHashAlgorithmName(ShiroKit.hashAlgorithmName); |
| | | md5CredentialsMatcher.setHashIterations(ShiroKit.hashIterations); |
| | | super.setCredentialsMatcher(md5CredentialsMatcher); |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com). |
| | | * <p> |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * <p> |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * <p> |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.stylefeng.guns.core.shiro; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.Const; |
| | | import com.stylefeng.guns.core.common.constant.factory.ConstantFactory; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.crypto.hash.Md5Hash; |
| | | import org.apache.shiro.crypto.hash.SimpleHash; |
| | | import org.apache.shiro.session.Session; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.apache.shiro.util.ByteSource; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * shiro工具类 |
| | | * |
| | | * @author dafei, Chill Zhuang |
| | | */ |
| | | public class ShiroKit { |
| | | |
| | | private static final String NAMES_DELIMETER = ","; |
| | | |
| | | /** |
| | | * 加盐参数 |
| | | */ |
| | | public final static String hashAlgorithmName = "MD5"; |
| | | |
| | | /** |
| | | * 循环次数 |
| | | */ |
| | | public final static int hashIterations = 1024; |
| | | |
| | | /** |
| | | * shiro密码加密工具类 |
| | | * |
| | | * @param credentials 密码 |
| | | * @param saltSource 密码盐 |
| | | * @return |
| | | */ |
| | | public static String md5(String credentials, String saltSource) { |
| | | ByteSource salt = new Md5Hash(saltSource); |
| | | return new SimpleHash(hashAlgorithmName, credentials, salt, hashIterations).toString(); |
| | | } |
| | | |
| | | /** |
| | | * 获取随机盐值 |
| | | * @param length |
| | | * @return |
| | | */ |
| | | public static String getRandomSalt(int length) { |
| | | return ToolUtil.getRandomString(length); |
| | | } |
| | | |
| | | /** |
| | | * 获取当前 Subject |
| | | * |
| | | * @return Subject |
| | | */ |
| | | public static Subject getSubject() { |
| | | return SecurityUtils.getSubject(); |
| | | } |
| | | |
| | | /** |
| | | * 获取封装的 ShiroUser |
| | | * |
| | | * @return ShiroUser |
| | | */ |
| | | public static ShiroUser getUser() { |
| | | if (isGuest()) { |
| | | return null; |
| | | } else { |
| | | return (ShiroUser) getSubject().getPrincipals().getPrimaryPrincipal(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 从shiro获取session |
| | | * |
| | | */ |
| | | public static Session getSession() { |
| | | return getSubject().getSession(); |
| | | } |
| | | |
| | | /** |
| | | * 获取shiro指定的sessionKey |
| | | * |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | public static <T> T getSessionAttr(String key) { |
| | | Session session = getSession(); |
| | | return session != null ? (T) session.getAttribute(key) : null; |
| | | } |
| | | |
| | | /** |
| | | * 设置shiro指定的sessionKey |
| | | * |
| | | */ |
| | | public static void setSessionAttr(String key, Object value) { |
| | | Session session = getSession(); |
| | | session.setAttribute(key, value); |
| | | } |
| | | |
| | | /** |
| | | * 移除shiro指定的sessionKey |
| | | */ |
| | | public static void removeSessionAttr(String key) { |
| | | Session session = getSession(); |
| | | if (session != null) |
| | | session.removeAttribute(key); |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否属于该角色?,使用时与lacksRole 搭配使用 |
| | | * |
| | | * @param roleName |
| | | * 角色名 |
| | | * @return 属于该角色:true,否则false |
| | | */ |
| | | public static boolean hasRole(String roleName) { |
| | | return getSubject() != null && roleName != null |
| | | && roleName.length() > 0 && getSubject().hasRole(roleName); |
| | | } |
| | | |
| | | /** |
| | | * 与hasRole标签逻辑相反,当用户不属于该角色时验证通过。 |
| | | * |
| | | * @param roleName |
| | | * 角色名 |
| | | * @return 不属于该角色:true,否则false |
| | | */ |
| | | public static boolean lacksRole(String roleName) { |
| | | return !hasRole(roleName); |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否属于以下任意一个角色。 |
| | | * |
| | | * @param roleNames |
| | | * 角色列表 |
| | | * @return 属于:true,否则false |
| | | */ |
| | | public static boolean hasAnyRoles(String roleNames) { |
| | | boolean hasAnyRole = false; |
| | | Subject subject = getSubject(); |
| | | if (subject != null && roleNames != null && roleNames.length() > 0) { |
| | | for (String role : roleNames.split(NAMES_DELIMETER)) { |
| | | if (subject.hasRole(role.trim())) { |
| | | hasAnyRole = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return hasAnyRole; |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否属于以下所有角色。 |
| | | * |
| | | * @param roleNames |
| | | * 角色列表 |
| | | * @return 属于:true,否则false |
| | | */ |
| | | public static boolean hasAllRoles(String roleNames) { |
| | | boolean hasAllRole = true; |
| | | Subject subject = getSubject(); |
| | | if (subject != null && roleNames != null && roleNames.length() > 0) { |
| | | for (String role : roleNames.split(NAMES_DELIMETER)) { |
| | | if (!subject.hasRole(role.trim())) { |
| | | hasAllRole = false; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | return hasAllRole; |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否拥有指定权限,使用时与lacksPermission 搭配使用 |
| | | * |
| | | * @param permission |
| | | * 权限名 |
| | | * @return 拥有权限:true,否则false |
| | | */ |
| | | public static boolean hasPermission(String permission) { |
| | | return getSubject() != null && permission != null |
| | | && permission.length() > 0 |
| | | && getSubject().isPermitted(permission); |
| | | } |
| | | |
| | | /** |
| | | * 与hasPermission标签逻辑相反,当前用户没有制定权限时,验证通过。 |
| | | * |
| | | * @param permission |
| | | * 权限名 |
| | | * @return 拥有权限:true,否则false |
| | | */ |
| | | public static boolean lacksPermission(String permission) { |
| | | return !hasPermission(permission); |
| | | } |
| | | |
| | | /** |
| | | * 已认证通过的用户。不包含已记住的用户,这是与user标签的区别所在。与notAuthenticated搭配使用 |
| | | * |
| | | * @return 通过身份验证:true,否则false |
| | | */ |
| | | public static boolean isAuthenticated() { |
| | | return getSubject() != null && getSubject().isAuthenticated(); |
| | | } |
| | | |
| | | /** |
| | | * 未认证通过用户,与authenticated标签相对应。与guest标签的区别是,该标签包含已记住用户。。 |
| | | * |
| | | * @return 没有通过身份验证:true,否则false |
| | | */ |
| | | public static boolean notAuthenticated() { |
| | | return !isAuthenticated(); |
| | | } |
| | | |
| | | /** |
| | | * 认证通过或已记住的用户。与guset搭配使用。 |
| | | * |
| | | * @return 用户:true,否则 false |
| | | */ |
| | | public static boolean isUser() { |
| | | return getSubject() != null && getSubject().getPrincipal() != null; |
| | | } |
| | | |
| | | /** |
| | | * 验证当前用户是否为“访客”,即未认证(包含未记住)的用户。用user搭配使用 |
| | | * |
| | | * @return 访客:true,否则false |
| | | */ |
| | | public static boolean isGuest() { |
| | | return !isUser(); |
| | | } |
| | | |
| | | /** |
| | | * 输出当前用户信息,通常为登录帐号信息。 |
| | | * |
| | | * @return 当前用户信息 |
| | | */ |
| | | public static String principal() { |
| | | if (getSubject() != null) { |
| | | Object principal = getSubject().getPrincipal(); |
| | | return principal.toString(); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * 获取当前用户的部门数据范围的集合 |
| | | */ |
| | | public static List<Integer> getDeptDataScope() { |
| | | Integer deptId = getUser().getDeptId(); |
| | | List<Integer> subDeptIds = ConstantFactory.me().getSubDeptId(deptId); |
| | | subDeptIds.add(deptId); |
| | | return subDeptIds; |
| | | } |
| | | |
| | | /** |
| | | * 判断当前用户是否是超级管理员 |
| | | */ |
| | | public static boolean isAdmin() { |
| | | List<Integer> roleList = ShiroKit.getUser().getRoleList(); |
| | | for (Integer integer : roleList) { |
| | | String singleRoleTip = ConstantFactory.me().getSingleRoleTip(integer); |
| | | if (singleRoleTip.equals(Const.ADMIN_NAME)) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.shiro; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 自定义Authentication对象,使得Subject除了携带用户的登录名外还可以携带更多信息 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2016年12月5日 上午10:26:43 |
| | | */ |
| | | public class ShiroUser implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | public Integer id; // 主键ID |
| | | public String account; // 账号 |
| | | public String name; // 姓名 |
| | | public Integer deptId; // 部门id |
| | | public List<Integer> roleList; // 角色集 |
| | | public String deptName; // 部门名称 |
| | | public List<String> roleNames; // 角色名称集 |
| | | public Integer roleType; // 角色类型 1=平台 2=分公司 3=加盟商 |
| | | public Integer objectId; // 对象ID |
| | | |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getAccount() { |
| | | return account; |
| | | } |
| | | |
| | | public void setAccount(String account) { |
| | | this.account = account; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public Integer getDeptId() { |
| | | return deptId; |
| | | } |
| | | |
| | | public void setDeptId(Integer deptId) { |
| | | this.deptId = deptId; |
| | | } |
| | | |
| | | public List<Integer> getRoleList() { |
| | | return roleList; |
| | | } |
| | | |
| | | public void setRoleList(List<Integer> roleList) { |
| | | this.roleList = roleList; |
| | | } |
| | | |
| | | public String getDeptName() { |
| | | return deptName; |
| | | } |
| | | |
| | | public void setDeptName(String deptName) { |
| | | this.deptName = deptName; |
| | | } |
| | | |
| | | public List<String> getRoleNames() { |
| | | return roleNames; |
| | | } |
| | | |
| | | public void setRoleNames(List<String> roleNames) { |
| | | this.roleNames = roleNames; |
| | | } |
| | | |
| | | public Integer getRoleType() { |
| | | return roleType; |
| | | } |
| | | |
| | | public void setRoleType(Integer roleType) { |
| | | this.roleType = roleType; |
| | | } |
| | | |
| | | public Integer getObjectId() { |
| | | return objectId; |
| | | } |
| | | |
| | | public void setObjectId(Integer objectId) { |
| | | this.objectId = objectId; |
| | | } |
| | | } |
New file |
| | |
| | | /** |
| | | * Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com). |
| | | * <p> |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * <p> |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * <p> |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.stylefeng.guns.core.shiro.check; |
| | | |
| | | /** |
| | | * 检查用接口 |
| | | */ |
| | | public interface ICheck { |
| | | |
| | | /** |
| | | * 检查当前登录用户是否拥有指定的角色访问当 |
| | | */ |
| | | boolean check(Object[] permissions); |
| | | |
| | | /** |
| | | * 检查当前登录用户是否拥有当前请求的servlet的权限 |
| | | */ |
| | | boolean checkAll(); |
| | | } |
New file |
| | |
| | | /** |
| | | * Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com). |
| | | * <p> |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * <p> |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * <p> |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.stylefeng.guns.core.shiro.check; |
| | | |
| | | import com.stylefeng.guns.core.listener.ConfigListener; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.support.CollectionKit; |
| | | import com.stylefeng.guns.core.support.HttpKit; |
| | | import com.stylefeng.guns.core.util.SpringContextHolder; |
| | | import org.springframework.context.annotation.DependsOn; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | | * 权限自定义检查 |
| | | */ |
| | | @Service |
| | | @DependsOn("springContextHolder") |
| | | @Transactional(readOnly = true) |
| | | public class PermissionCheckFactory implements ICheck { |
| | | |
| | | public static ICheck me() { |
| | | return SpringContextHolder.getBean(ICheck.class); |
| | | } |
| | | |
| | | @Override |
| | | public boolean check(Object[] permissions) { |
| | | ShiroUser user = ShiroKit.getUser(); |
| | | if (null == user) { |
| | | return false; |
| | | } |
| | | String join = CollectionKit.join(permissions, ","); |
| | | if (ShiroKit.hasAnyRoles(join)) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public boolean checkAll() { |
| | | HttpServletRequest request = HttpKit.getRequest(); |
| | | ShiroUser user = ShiroKit.getUser(); |
| | | if (null == user) { |
| | | return false; |
| | | } |
| | | String requestURI = request.getRequestURI().replaceFirst(ConfigListener.getConf().get("contextPath"), ""); |
| | | String[] str = requestURI.split("/"); |
| | | if (str.length > 3) { |
| | | requestURI = "/" + str[1] + "/" + str[2]; |
| | | } |
| | | if (ShiroKit.hasPermission(requestURI)) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | /** |
| | | * Copyright (c) 2015-2017, Chill Zhuang 庄骞 (smallchill@163.com). |
| | | * <p> |
| | | * Licensed under the Apache License, Version 2.0 (the "License"); |
| | | * you may not use this file except in compliance with the License. |
| | | * You may obtain a copy of the License at |
| | | * <p> |
| | | * http://www.apache.org/licenses/LICENSE-2.0 |
| | | * <p> |
| | | * Unless required by applicable law or agreed to in writing, software |
| | | * distributed under the License is distributed on an "AS IS" BASIS, |
| | | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| | | * See the License for the specific language governing permissions and |
| | | * limitations under the License. |
| | | */ |
| | | package com.stylefeng.guns.core.shiro.check; |
| | | |
| | | import com.stylefeng.guns.core.util.SpringContextHolder; |
| | | |
| | | /** |
| | | * 权限检查管理器(入口) |
| | | */ |
| | | public class PermissionCheckManager { |
| | | private final static PermissionCheckManager me = new PermissionCheckManager(); |
| | | |
| | | private ICheck defaultCheckFactory = SpringContextHolder.getBean(ICheck.class); |
| | | |
| | | public static PermissionCheckManager me() { |
| | | return me; |
| | | } |
| | | |
| | | private PermissionCheckManager() { |
| | | } |
| | | |
| | | public PermissionCheckManager(ICheck checkFactory) { |
| | | this.defaultCheckFactory = checkFactory; |
| | | } |
| | | |
| | | public void setDefaultCheckFactory(ICheck defaultCheckFactory) { |
| | | this.defaultCheckFactory = defaultCheckFactory; |
| | | } |
| | | |
| | | public static boolean check(Object[] permissions) { |
| | | return me.defaultCheckFactory.check(permissions); |
| | | } |
| | | |
| | | public static boolean checkAll() { |
| | | return me.defaultCheckFactory.checkAll(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.shiro.factory; |
| | | |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.modular.system.model.User; |
| | | import org.apache.shiro.authc.SimpleAuthenticationInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 定义shirorealm所需数据的接口 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2016年12月5日 上午10:23:34 |
| | | */ |
| | | public interface IShiro { |
| | | |
| | | /** |
| | | * 根据账号获取登录用户 |
| | | * |
| | | * @param account 账号 |
| | | */ |
| | | User user(String account); |
| | | |
| | | /** |
| | | * 根据系统用户获取Shiro的用户 |
| | | * |
| | | * @param user 系统用户 |
| | | */ |
| | | ShiroUser shiroUser(User user); |
| | | |
| | | /** |
| | | * 获取权限列表通过角色id |
| | | * |
| | | * @param roleId 角色id |
| | | */ |
| | | List<String> findPermissionsByRoleId(Integer roleId); |
| | | |
| | | /** |
| | | * 根据角色id获取角色名称 |
| | | * |
| | | * @param roleId 角色id |
| | | */ |
| | | String findRoleNameByRoleId(Integer roleId); |
| | | |
| | | /** |
| | | * 获取shiro的认证信息 |
| | | */ |
| | | SimpleAuthenticationInfo info(ShiroUser shiroUser, User user, String realmName); |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.shiro.factory; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.factory.ConstantFactory; |
| | | import com.stylefeng.guns.core.common.constant.state.ManagerStatus; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.Convert; |
| | | import com.stylefeng.guns.core.util.SpringContextHolder; |
| | | import com.stylefeng.guns.modular.system.dao.MenuMapper; |
| | | import com.stylefeng.guns.modular.system.dao.UserMapper; |
| | | import com.stylefeng.guns.modular.system.model.User; |
| | | import org.apache.shiro.authc.CredentialsException; |
| | | import org.apache.shiro.authc.LockedAccountException; |
| | | import org.apache.shiro.authc.SimpleAuthenticationInfo; |
| | | import org.apache.shiro.crypto.hash.Md5Hash; |
| | | import org.apache.shiro.util.ByteSource; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.DependsOn; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @DependsOn("springContextHolder") |
| | | @Transactional(readOnly = true) |
| | | public class ShiroFactroy implements IShiro { |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private MenuMapper menuMapper; |
| | | |
| | | public static IShiro me() { |
| | | return SpringContextHolder.getBean(IShiro.class); |
| | | } |
| | | |
| | | @Override |
| | | public User user(String account) { |
| | | |
| | | User user = userMapper.getByAccount(account); |
| | | |
| | | // 账号不存在 |
| | | if (null == user) { |
| | | throw new CredentialsException(); |
| | | } |
| | | // 账号被冻结 |
| | | if (user.getStatus() != ManagerStatus.OK.getCode()) { |
| | | throw new LockedAccountException(); |
| | | } |
| | | return user; |
| | | } |
| | | |
| | | @Override |
| | | public ShiroUser shiroUser(User user) { |
| | | ShiroUser shiroUser = new ShiroUser(); |
| | | |
| | | shiroUser.setId(user.getId()); |
| | | shiroUser.setAccount(user.getAccount()); |
| | | shiroUser.setDeptId(user.getDeptid()); |
| | | shiroUser.setDeptName(ConstantFactory.me().getDeptName(user.getDeptid())); |
| | | shiroUser.setName(user.getName()); |
| | | |
| | | Integer[] roleArray = Convert.toIntArray(user.getRoleid()); |
| | | List<Integer> roleList = new ArrayList<Integer>(); |
| | | List<String> roleNameList = new ArrayList<String>(); |
| | | for (int roleId : roleArray) { |
| | | roleList.add(roleId); |
| | | roleNameList.add(ConstantFactory.me().getSingleRoleName(roleId)); |
| | | } |
| | | shiroUser.setRoleList(roleList); |
| | | shiroUser.setRoleNames(roleNameList); |
| | | |
| | | return shiroUser; |
| | | } |
| | | |
| | | @Override |
| | | public List<String> findPermissionsByRoleId(Integer roleId) { |
| | | return menuMapper.getResUrlsByRoleId(roleId); |
| | | } |
| | | |
| | | @Override |
| | | public String findRoleNameByRoleId(Integer roleId) { |
| | | return ConstantFactory.me().getSingleRoleTip(roleId); |
| | | } |
| | | |
| | | @Override |
| | | public SimpleAuthenticationInfo info(ShiroUser shiroUser, User user, String realmName) { |
| | | String credentials = user.getPassword(); |
| | | |
| | | // 密码加盐处理 |
| | | String source = user.getSalt(); |
| | | ByteSource credentialsSalt = new Md5Hash(source); |
| | | return new SimpleAuthenticationInfo(shiroUser, credentials, credentialsSalt, realmName); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.tag; |
| | | |
| | | import com.stylefeng.guns.core.common.exception.BizExceptionEnum; |
| | | import com.stylefeng.guns.core.exception.GunsException; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.Dict; |
| | | import com.stylefeng.guns.modular.system.service.IDictService; |
| | | import org.beetl.core.Tag; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Scope; |
| | | import org.springframework.stereotype.Component; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 字典标签渲染 |
| | | * |
| | | * @author zhangjiajia |
| | | * @Date 2018年6月4日17:33:32 |
| | | */ |
| | | @Component |
| | | @Scope("prototype") |
| | | public class DictSelectorTag extends Tag { |
| | | |
| | | @Autowired |
| | | IDictService iDictService; |
| | | |
| | | @Override |
| | | public void render(){ |
| | | //String tagName = (String) this.args[0]; |
| | | Map attrs = (Map) args[1]; |
| | | if(ToolUtil.isEmpty(attrs.get("code"))){ |
| | | throw new GunsException(BizExceptionEnum.ERROR_CODE_EMPTY); |
| | | } |
| | | |
| | | //字典类型编码 |
| | | String code = attrs.get("code").toString(); |
| | | //控件显示类型select 选择框,radio 单选按钮,checkbox 多选按钮 |
| | | String type = ToolUtil.isNotEmpty(attrs.get("type"))?attrs.get("type").toString():"select"; |
| | | //开启多选 |
| | | String multiple = ToolUtil.isNotEmpty(attrs.get("multiple"))?attrs.get("multiple").toString():""; |
| | | //字典名称 |
| | | String label = ToolUtil.isNotEmpty(attrs.get("label"))?attrs.get("label").toString():""; |
| | | //提示 |
| | | String placeholder = (ToolUtil.isNotEmpty(attrs.get("placeholder"))?attrs.get("placeholder").toString():""); |
| | | //宽度 |
| | | String width = ToolUtil.isNotEmpty(attrs.get("width"))?attrs.get("width").toString():"248"; |
| | | //默认值 |
| | | String value = ToolUtil.isNotEmpty(attrs.get("value"))?attrs.get("value").toString():""; |
| | | //id |
| | | String id = ToolUtil.isNotEmpty(attrs.get("id"))?attrs.get("id").toString():""; |
| | | //name |
| | | String name = ToolUtil.isNotEmpty(attrs.get("name"))?attrs.get("name").toString():""; |
| | | //分割线 |
| | | String underline = ToolUtil.isNotEmpty(attrs.get("underline"))?attrs.get("underline").toString():""; |
| | | //onchange事件 |
| | | String onchange = ToolUtil.isNotEmpty(attrs.get("onchange"))?attrs.get("onchange").toString():""; |
| | | //readonly属性 |
| | | String readonly = ToolUtil.isNotEmpty(attrs.get("readonly"))?attrs.get("readonly").toString():""; |
| | | //disabled属性 |
| | | String disabled = ToolUtil.isNotEmpty(attrs.get("disabled"))?attrs.get("disabled").toString():""; |
| | | //searchnum 下拉选项数量达到多少启用搜索,默认10 |
| | | int searchnum = ToolUtil.isNum(attrs.get("searchnum"))?Integer.parseInt(attrs.get("searchnum").toString()):10; |
| | | //根据code查询字典数据 |
| | | List<Dict> list = iDictService.selectByParentCode(code); |
| | | |
| | | StringBuffer html = new StringBuffer(); |
| | | html.append("<div class=\"form-group\">\r\n"); |
| | | html.append("<label class=\"col-sm-3 control-label\">"+label+"</label>\r\n"); |
| | | html.append("<div class=\"col-sm-9\">\r\n"); |
| | | |
| | | //单选按钮 |
| | | if("radio".equals(type)) { |
| | | |
| | | list.forEach(obj->{ |
| | | html.append("<label class=\"radio-inline i-checks\">\r\n<input type=\"radio\" "); |
| | | //判断控件是否禁用 |
| | | if("true".equals(disabled)||"disabled".equals(disabled)) { |
| | | html.append("disabled "); |
| | | }else{ |
| | | if(ToolUtil.isNotEmpty(name)){ |
| | | html.append("name=\""+name+"\" "); |
| | | } |
| | | } |
| | | if("true".equals(readonly)||"disabled".equals(readonly)) { |
| | | html.append("disabled "); |
| | | } |
| | | if(ToolUtil.isNotEmpty(value)&&value.equals(obj.getCode())){ |
| | | html.append("checked "); |
| | | } |
| | | |
| | | html.append("value=\""+obj.getCode()+"\" >"+obj.getName()+"</label>\r\n"); |
| | | }); |
| | | |
| | | //多选按钮 |
| | | }else if("checkbox".equals(type)){ |
| | | list.forEach(obj->{ |
| | | html.append("<label class=\"checkbox-inline i-checks\">\r\n<input type=\"checkbox\" "); |
| | | //判断控件是否禁用 |
| | | if("true".equals(disabled)||"disabled".equals(disabled)) { |
| | | html.append("disabled "); |
| | | }else{ |
| | | if(ToolUtil.isNotEmpty(name)){ |
| | | html.append("name=\""+name+"\" "); |
| | | } |
| | | } |
| | | if("true".equals(readonly)||"disabled".equals(readonly)) { |
| | | html.append("disabled "); |
| | | } |
| | | if(ToolUtil.isNotEmpty(value)&&value.equals(obj.getCode())){ |
| | | html.append("checked "); |
| | | } |
| | | |
| | | html.append("value=\""+obj.getCode()+"\" >"+obj.getName()+"</label>\r\n"); |
| | | }); |
| | | |
| | | //默认select |
| | | }else{ |
| | | //开启多选 |
| | | if("true".equals(multiple)){ |
| | | if(list.size()>=searchnum) { |
| | | html.append("<select multiple "); |
| | | }else{ |
| | | html.append("<select multiple=\"multiple\" size=\"10\" "); |
| | | } |
| | | }else{ |
| | | html.append("<select "); |
| | | } |
| | | |
| | | //判断控件是否启用提示 |
| | | if(ToolUtil.isNotEmpty(placeholder)){ |
| | | html.append(" data-placeholder=\""+placeholder+"\" "); |
| | | } |
| | | |
| | | //判断控件是否禁用 |
| | | if("true".equals(disabled)||"disabled".equals(disabled)) { |
| | | html.append("disabled=\"disabled\" "); |
| | | }else{ |
| | | //启用 |
| | | if(ToolUtil.isNotEmpty(id)){ |
| | | html.append("id=\""+id+"\" "); |
| | | } |
| | | |
| | | if(ToolUtil.isNotEmpty(name)){ |
| | | html.append("name=\""+name+"\" "); |
| | | } |
| | | } |
| | | |
| | | //判断是否启用搜索框 |
| | | //判断下拉数据,如果查询出来的条数达到启用搜索的数量就启用 |
| | | |
| | | |
| | | if(list.size()>=searchnum){ |
| | | html.append("class=\"form-control chosen-select\" style=\"width:"+width+"px\" tabindex=\"1\" \r\n"); |
| | | } else{ |
| | | html.append("class=\"form-control\" style=\"width:"+width+"px\" \r\n"); |
| | | } |
| | | |
| | | //判断控件是否只读 |
| | | if("true".equals(readonly)||"readonly".equals(readonly)) { |
| | | if(list.size()>=searchnum) { |
| | | html.append("disabled=\"disabled\" "); |
| | | }else{ |
| | | html.append("onfocus=\"this.defaultIndex=this.selectedIndex;\" onchange=\"this.selectedIndex=this.defaultIndex;\" "); |
| | | } |
| | | } |
| | | |
| | | //判断是否绑定onchange事件 |
| | | if(ToolUtil.isNotEmpty(onchange)){ |
| | | html.append("onchange=\""+onchange+"($(this).children('option:selected').val())\" "); |
| | | } |
| | | |
| | | html.append(">"); |
| | | if(ToolUtil.isNotEmpty(placeholder)){ |
| | | html.append("<option value=\"\">"+placeholder+"</option>\r\n"); |
| | | } |
| | | //将查询出来的数据添加到select中 |
| | | list.forEach(obj->{ |
| | | if(ToolUtil.isNotEmpty(value)&&value.equals(obj.getCode())){ |
| | | html.append("<option selected value=\""+obj.getCode()+"\">"+obj.getName()+"</option>\r\n"); |
| | | }else{ |
| | | html.append("<option value=\""+obj.getCode()+"\">"+obj.getName()+"</option>\r\n"); |
| | | } |
| | | }); |
| | | html.append("</select>\r\n"); |
| | | } |
| | | |
| | | html.append("</div>\r\n</div>\r\n"); |
| | | //判断是否添加分割线 |
| | | if(ToolUtil.isNotEmpty(underline) && "true".equals(underline)) { |
| | | html.append("<div class=\"hr-line-dashed\" ></div >\r\n"); |
| | | } |
| | | |
| | | try{ |
| | | this.ctx.byteWriter.writeString(html.toString()); |
| | | }catch (IOException e){ |
| | | throw new RuntimeException("输出字典标签错误"); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.util; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.Const; |
| | | import com.stylefeng.guns.config.properties.GunsProperties; |
| | | import com.stylefeng.guns.core.node.MenuNode; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * api接口文档显示过滤 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-08-17 16:55 |
| | | */ |
| | | public class ApiMenuFilter extends MenuNode { |
| | | |
| | | public static List<MenuNode> build(List<MenuNode> nodes) { |
| | | |
| | | //如果关闭了接口文档,则不显示接口文档菜单 |
| | | GunsProperties gunsProperties = SpringContextHolder.getBean(GunsProperties.class); |
| | | if (!gunsProperties.getSwaggerOpen()) { |
| | | List<MenuNode> menuNodesCopy = new ArrayList<>(); |
| | | for (MenuNode menuNode : nodes) { |
| | | if (Const.API_MENU_NAME.equals(menuNode.getName())) { |
| | | continue; |
| | | } else { |
| | | menuNodesCopy.add(menuNode); |
| | | } |
| | | } |
| | | nodes = menuNodesCopy; |
| | | } |
| | | |
| | | return nodes; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.util; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.dictmap.base.AbstractDictMap; |
| | | import com.stylefeng.guns.core.common.constant.dictmap.factory.DictFieldWarpperFactory; |
| | | import com.stylefeng.guns.core.support.StrKit; |
| | | |
| | | import java.beans.PropertyDescriptor; |
| | | import java.lang.reflect.Field; |
| | | import java.lang.reflect.Method; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 对比两个对象的变化的工具类 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2017/3/31 10:36 |
| | | */ |
| | | public class Contrast { |
| | | |
| | | //记录每个修改字段的分隔符 |
| | | public static final String separator = ";;;"; |
| | | |
| | | /** |
| | | * 比较两个对象,并返回不一致的信息 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/9 19:34 |
| | | */ |
| | | public static String contrastObj(Object pojo1, Object pojo2) { |
| | | String str = ""; |
| | | try { |
| | | Class clazz = pojo1.getClass(); |
| | | Field[] fields = pojo1.getClass().getDeclaredFields(); |
| | | int i = 1; |
| | | for (Field field : fields) { |
| | | if ("serialVersionUID".equals(field.getName())) { |
| | | continue; |
| | | } |
| | | PropertyDescriptor pd = new PropertyDescriptor(field.getName(), clazz); |
| | | Method getMethod = pd.getReadMethod(); |
| | | Object o1 = getMethod.invoke(pojo1); |
| | | Object o2 = getMethod.invoke(pojo2); |
| | | if (o1 == null || o2 == null) { |
| | | continue; |
| | | } |
| | | if (o1 instanceof Date) { |
| | | o1 = DateUtil.getDay((Date) o1); |
| | | } |
| | | if (!o1.toString().equals(o2.toString())) { |
| | | if (i != 1) { |
| | | str += separator; |
| | | } |
| | | str += "字段名称" + field.getName() + ",旧值:" + o1 + ",新值:" + o2; |
| | | i++; |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return str; |
| | | } |
| | | |
| | | /** |
| | | * 比较两个对象pojo1和pojo2,并输出不一致信息 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/9 19:34 |
| | | */ |
| | | public static String contrastObj(Class dictClass, String key, Object pojo1, Map<String, String> pojo2) throws IllegalAccessException, InstantiationException { |
| | | AbstractDictMap dictMap = (AbstractDictMap) dictClass.newInstance(); |
| | | String str = parseMutiKey(dictMap, key, pojo2) + separator; |
| | | try { |
| | | Class clazz = pojo1.getClass(); |
| | | Field[] fields = pojo1.getClass().getDeclaredFields(); |
| | | int i = 1; |
| | | for (Field field : fields) { |
| | | if ("serialVersionUID".equals(field.getName())) { |
| | | continue; |
| | | } |
| | | PropertyDescriptor pd = new PropertyDescriptor(field.getName(), clazz); |
| | | Method getMethod = pd.getReadMethod(); |
| | | Object o1 = getMethod.invoke(pojo1); |
| | | Object o2 = pojo2.get(StrKit.firstCharToLowerCase(getMethod.getName().substring(3))); |
| | | if (o1 == null || o2 == null) { |
| | | continue; |
| | | } |
| | | if (o1 instanceof Date) { |
| | | o1 = DateUtil.getDay((Date) o1); |
| | | } else if (o1 instanceof Integer) { |
| | | o2 = Integer.parseInt(o2.toString()); |
| | | } |
| | | if (!o1.toString().equals(o2.toString())) { |
| | | if (i != 1) { |
| | | str += separator; |
| | | } |
| | | String fieldName = dictMap.get(field.getName()); |
| | | String fieldWarpperMethodName = dictMap.getFieldWarpperMethodName(field.getName()); |
| | | if (fieldWarpperMethodName != null) { |
| | | Object o1Warpper = DictFieldWarpperFactory.createFieldWarpper(o1, fieldWarpperMethodName); |
| | | Object o2Warpper = DictFieldWarpperFactory.createFieldWarpper(o2, fieldWarpperMethodName); |
| | | str += "字段名称:" + fieldName + ",旧值:" + o1Warpper + ",新值:" + o2Warpper; |
| | | } else { |
| | | str += "字段名称:" + fieldName + ",旧值:" + o1 + ",新值:" + o2; |
| | | } |
| | | i++; |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return str; |
| | | } |
| | | |
| | | /** |
| | | * 比较两个对象pojo1和pojo2,并输出不一致信息 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/9 19:34 |
| | | */ |
| | | public static String contrastObjByName(Class dictClass, String key, Object pojo1, Map<String, String> pojo2) throws IllegalAccessException, InstantiationException { |
| | | AbstractDictMap dictMap = (AbstractDictMap) dictClass.newInstance(); |
| | | String str = parseMutiKey(dictMap, key, pojo2) + separator; |
| | | try { |
| | | Class clazz = pojo1.getClass(); |
| | | Field[] fields = pojo1.getClass().getDeclaredFields(); |
| | | int i = 1; |
| | | for (Field field : fields) { |
| | | if ("serialVersionUID".equals(field.getName())) { |
| | | continue; |
| | | } |
| | | String prefix = "get"; |
| | | int prefixLength = 3; |
| | | if (field.getType().getName().equals("java.lang.Boolean")) { |
| | | prefix = "is"; |
| | | prefixLength = 2; |
| | | } |
| | | Method getMethod = null; |
| | | try { |
| | | getMethod = clazz.getDeclaredMethod(prefix + StrKit.firstCharToUpperCase(field.getName())); |
| | | } catch (java.lang.NoSuchMethodException e) { |
| | | System.err.println("this className:" + clazz.getName() + " is not methodName: " + e.getMessage()); |
| | | continue; |
| | | } |
| | | Object o1 = getMethod.invoke(pojo1); |
| | | Object o2 = pojo2.get(StrKit.firstCharToLowerCase(getMethod.getName().substring(prefixLength))); |
| | | if (o1 == null || o2 == null) { |
| | | continue; |
| | | } |
| | | if (o1 instanceof Date) { |
| | | o1 = DateUtil.getDay((Date) o1); |
| | | } else if (o1 instanceof Integer) { |
| | | o2 = Integer.parseInt(o2.toString()); |
| | | } |
| | | if (!o1.toString().equals(o2.toString())) { |
| | | if (i != 1) { |
| | | str += separator; |
| | | } |
| | | String fieldName = dictMap.get(field.getName()); |
| | | String fieldWarpperMethodName = dictMap.getFieldWarpperMethodName(field.getName()); |
| | | if (fieldWarpperMethodName != null) { |
| | | Object o1Warpper = DictFieldWarpperFactory.createFieldWarpper(o1, fieldWarpperMethodName); |
| | | Object o2Warpper = DictFieldWarpperFactory.createFieldWarpper(o2, fieldWarpperMethodName); |
| | | str += "字段名称:" + fieldName + ",旧值:" + o1Warpper + ",新值:" + o2Warpper; |
| | | } else { |
| | | str += "字段名称:" + fieldName + ",旧值:" + o1 + ",新值:" + o2; |
| | | } |
| | | i++; |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return str; |
| | | } |
| | | |
| | | /** |
| | | * 解析多个key(逗号隔开的) |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2017/5/16 22:19 |
| | | */ |
| | | public static String parseMutiKey(AbstractDictMap dictMap, String key, Map<String, String> requests) { |
| | | StringBuilder sb = new StringBuilder(); |
| | | if (key.indexOf(",") != -1) { |
| | | String[] keys = key.split(","); |
| | | for (String item : keys) { |
| | | String fieldWarpperMethodName = dictMap.getFieldWarpperMethodName(item); |
| | | String value = requests.get(item); |
| | | if (fieldWarpperMethodName != null) { |
| | | Object valueWarpper = DictFieldWarpperFactory.createFieldWarpper(value, fieldWarpperMethodName); |
| | | sb.append(dictMap.get(item) + "=" + valueWarpper + ","); |
| | | } else { |
| | | if(item.equals("addTime") || item.equals("createDate")){ |
| | | value= com.stylefeng.guns.modular.system.util.DateUtil.todayStr("yyyy-MM-dd HH:mm"); |
| | | } |
| | | sb.append(dictMap.get(item) + "=" + value + ","); |
| | | } |
| | | } |
| | | return StrKit.removeSuffix(sb.toString(), ","); |
| | | } else { |
| | | String fieldWarpperMethodName = dictMap.getFieldWarpperMethodName(key); |
| | | String value = requests.get(key); |
| | | if (fieldWarpperMethodName != null) { |
| | | Object valueWarpper = DictFieldWarpperFactory.createFieldWarpper(value, fieldWarpperMethodName); |
| | | sb.append(dictMap.get(key) + "=" + valueWarpper); |
| | | } else { |
| | | sb.append(dictMap.get(key) + "=" + value); |
| | | } |
| | | return sb.toString(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.util; |
| | | |
| | | import com.stylefeng.guns.core.common.constant.JwtConstants; |
| | | import io.jsonwebtoken.*; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p>jwt token工具类</p> |
| | | * <pre> |
| | | * jwt的claim里一般包含以下几种数据: |
| | | * 1. iss -- token的发行者 |
| | | * 2. sub -- 该JWT所面向的用户 |
| | | * 3. aud -- 接收该JWT的一方 |
| | | * 4. exp -- token的失效时间 |
| | | * 5. nbf -- 在此时间段之前,不会被处理 |
| | | * 6. iat -- jwt发布时间 |
| | | * 7. jti -- jwt唯一标识,防止重复使用 |
| | | * </pre> |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2017/8/25 10:59 |
| | | */ |
| | | @Component |
| | | public class JwtTokenUtil { |
| | | |
| | | /** |
| | | * 获取用户名从token中 |
| | | */ |
| | | public static String getUsernameFromToken(String token) { |
| | | return getClaimFromToken(token).getSubject(); |
| | | } |
| | | |
| | | /** |
| | | * 获取jwt发布时间 |
| | | */ |
| | | public static Date getIssuedAtDateFromToken(String token) { |
| | | return getClaimFromToken(token).getIssuedAt(); |
| | | } |
| | | |
| | | /** |
| | | * 获取jwt失效时间 |
| | | */ |
| | | public static Date getExpirationDateFromToken(String token) { |
| | | return getClaimFromToken(token).getExpiration(); |
| | | } |
| | | |
| | | /** |
| | | * 获取jwt接收者 |
| | | */ |
| | | public static String getAudienceFromToken(String token) { |
| | | return getClaimFromToken(token).getAudience(); |
| | | } |
| | | |
| | | /** |
| | | * 获取私有的jwt claim |
| | | */ |
| | | public static String getPrivateClaimFromToken(String token, String key) { |
| | | return getClaimFromToken(token).get(key).toString(); |
| | | } |
| | | |
| | | /** |
| | | * 获取jwt的payload部分 |
| | | */ |
| | | public static Claims getClaimFromToken(String token) { |
| | | return Jwts.parser() |
| | | .setSigningKey(JwtConstants.SECRET) |
| | | .parseClaimsJws(token) |
| | | .getBody(); |
| | | } |
| | | |
| | | /** |
| | | * 解析token是否正确,不正确会报异常<br> |
| | | */ |
| | | public static void parseToken(String token) throws JwtException { |
| | | Jwts.parser().setSigningKey(JwtConstants.SECRET).parseClaimsJws(token).getBody(); |
| | | } |
| | | |
| | | /** |
| | | * <pre> |
| | | * 验证token是否失效 |
| | | * true:过期 false:没过期 |
| | | * </pre> |
| | | */ |
| | | public static Boolean isTokenExpired(String token) { |
| | | try { |
| | | final Date expiration = getExpirationDateFromToken(token); |
| | | return expiration.before(new Date()); |
| | | } catch (ExpiredJwtException expiredJwtException) { |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 生成token(通过用户名和签名时候用的随机数) |
| | | */ |
| | | public static String generateToken(String userId) { |
| | | Map<String, Object> claims = new HashMap<>(); |
| | | return doGenerateToken(claims, userId); |
| | | } |
| | | |
| | | /** |
| | | * 生成token |
| | | */ |
| | | private static String doGenerateToken(Map<String, Object> claims, String subject) { |
| | | final Date createdDate = new Date(); |
| | | final Date expirationDate = new Date(createdDate.getTime() + JwtConstants.EXPIRATION * 1000); |
| | | |
| | | return Jwts.builder() |
| | | .setClaims(claims) |
| | | .setSubject(subject) |
| | | .setIssuedAt(createdDate) |
| | | .setExpiration(expirationDate) |
| | | .signWith(SignatureAlgorithm.HS512, JwtConstants.SECRET) |
| | | .compact(); |
| | | } |
| | | |
| | | /** |
| | | * 获取混淆MD5签名用的随机字符串 |
| | | */ |
| | | public static String getRandomKey() { |
| | | return ToolUtil.getRandomString(6); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.util; |
| | | |
| | | import com.stylefeng.guns.config.properties.GunsProperties; |
| | | |
| | | /** |
| | | * 验证码工具类 |
| | | */ |
| | | public class KaptchaUtil { |
| | | |
| | | /** |
| | | * 获取验证码开关 |
| | | */ |
| | | public static Boolean getKaptchaOnOff() { |
| | | return SpringContextHolder.getBean(GunsProperties.class).getKaptchaOpen(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.util; |
| | | |
| | | import com.obs.services.ObsClient; |
| | | import com.obs.services.model.ObjectMetadata; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.UUID; |
| | | |
| | | public class ObsUploadUtil { |
| | | //OBS图片访问域名 |
| | | public static String endPoint = "obs.cn-east-3.myhuaweicloud.com"; |
| | | public static String accessKeyId = "HB7DOVELEVWYYUS7QHYX"; |
| | | public static String accessKeySecret = "nEwDoSdLRkA1BRfW17pMZL9RlnrVywuTeHSkMn7y"; |
| | | public static String bucketName = "mian-ju-mi-liao"; |
| | | public static String oss_domain = "https://mian-ju-mi-liao.obs.cn-east-3.myhuaweicloud.com/"; |
| | | |
| | | |
| | | // 创建ObsClient实例 |
| | | public static ObsClient obsClient = new ObsClient(accessKeyId, accessKeySecret, endPoint); |
| | | |
| | | public static String obsUpload(HttpServletRequest request, MultipartFile file) throws IOException{ |
| | | //CommonsMultipartFile file = (CommonsMultipartFile)multipartFile; |
| | | String fileName = ""; |
| | | if(file!=null && !"".equals(file.getOriginalFilename()) && file.getOriginalFilename()!=null){ |
| | | InputStream content = file.getInputStream();//获得指定文件的输入流 |
| | | ObjectMetadata meta = new ObjectMetadata();// 创建上传Object的Metadata |
| | | meta.setContentLength(file.getSize()); // 必须设置ContentLength |
| | | String originalFilename = file.getOriginalFilename(); |
| | | fileName = UUID.randomUUID().toString().replaceAll("-","") + originalFilename.subSequence(originalFilename.lastIndexOf("."), originalFilename.length()); |
| | | obsClient.putObject(bucketName,"admin/"+fileName,content,meta);// 上传Object. |
| | | if(fileName != null && !"".equals(fileName)){ |
| | | System.out.println(fileName); |
| | | fileName = oss_domain+"admin/"+fileName; |
| | | } |
| | | } |
| | | return fileName; |
| | | } |
| | | |
| | | /** |
| | | * 删除某个Object |
| | | * |
| | | * @param bucketUrl |
| | | * @return |
| | | */ |
| | | public static boolean deleteObject(String bucketUrl) { |
| | | try { |
| | | bucketUrl=bucketUrl.replace(oss_domain+"web",""); |
| | | // 删除Object. |
| | | obsClient.deleteObject(bucketName, bucketUrl); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | | } finally { |
| | | //ossClient.shutdown(); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | // public static void createBucket(String bucketName) |
| | | // { |
| | | // //初始化 OSSClient |
| | | //// ossClient = new OssClient(endPoint, accessKeyId, accessKeySecret); |
| | | // |
| | | // // 新建一个Bucket |
| | | // Bucket bucket = ossClient.createBucket(bucketName); |
| | | // System.out.println(bucket.getName()); |
| | | // System.out.println(bucket.getCreationDate()); |
| | | // } |
| | | // |
| | | // public static void main(String[] args) { |
| | | // OssUploadUtil.createBucket("ssfdfsd"); |
| | | // } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.util; |
| | | |
| | | import com.obs.services.ObsClient; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.UUID; |
| | | |
| | | public class OssUploadUtil { |
| | | public static String endPoint = "obs.cn-south-1.myhuaweicloud.com"; |
| | | public static String accessKeyId = "MLJEFPYY0LJKAVA5C4YI"; |
| | | public static String accessKeySecret = "C8PmdLHAW7OOKR1fbEGYrqIiTh4yaLrRzA0uVZ89"; |
| | | public static String bucketName = "qinqinzhuanche"; |
| | | public static String oss_domain = "https://qinqinzhuanche.obs.cn-south-1.myhuaweicloud.com/"; |
| | | // 创建ObsClient实例 |
| | | public static ObsClient obsClient = new ObsClient(accessKeyId, accessKeySecret, endPoint); |
| | | |
| | | public static String ossUpload(HttpServletRequest request,MultipartFile file) throws IOException{ |
| | | //CommonsMultipartFile file = (CommonsMultipartFile)multipartFile; |
| | | String fileName = ""; |
| | | if(file!=null && !"".equals(file.getOriginalFilename()) && file.getOriginalFilename()!=null){ |
| | | InputStream content = file.getInputStream();//获得指定文件的输入流 |
| | | com.obs.services.model.ObjectMetadata meta = new com.obs.services.model.ObjectMetadata();// 创建上传Object的Metadata |
| | | meta.setContentLength(file.getSize()); // 必须设置ContentLength |
| | | String originalFilename = file.getOriginalFilename(); |
| | | fileName = UUID.randomUUID().toString().replaceAll("-","") + originalFilename.subSequence(originalFilename.lastIndexOf("."), originalFilename.length()); |
| | | obsClient.putObject(bucketName,fileName,content,meta);// 上传Object. |
| | | if(fileName != null && !"".equals(fileName)){ |
| | | System.out.println(fileName); |
| | | fileName = oss_domain+fileName; |
| | | } |
| | | } |
| | | return fileName; |
| | | } |
| | | |
| | | /** |
| | | * 删除某个Object |
| | | * |
| | | * @param bucketUrl |
| | | * @return |
| | | */ |
| | | public static boolean deleteObject(String bucketUrl) { |
| | | try { |
| | | bucketUrl=bucketUrl.replace(oss_domain+"web",""); |
| | | // 删除Object. |
| | | obsClient.deleteObject(bucketName, bucketUrl); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return false; |
| | | } finally { |
| | | //ossClient.shutdown(); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.util; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import java.net.URLEncoder; |
| | | import java.text.DecimalFormat; |
| | | import java.text.NumberFormat; |
| | | import java.text.ParseException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | |
| | | /** |
| | | * 基本数据处理工具类 |
| | | */ |
| | | public class SinataUtil { |
| | | |
| | | |
| | | /** |
| | | * List集合分页<br/> |
| | | * 创建人:Mryang<br/> |
| | | * 时间:2016年7月28日-下午2:58:14 <br/> |
| | | * @param <T> |
| | | * @param pageNo |
| | | * @param pageSize |
| | | * @param list |
| | | * @throws Exception List<UserOrderList> <br/> |
| | | */ |
| | | public static <T> List<T> listpage(int pageNo, int pageSize, List<T> list) throws Exception { |
| | | List<T> result = new ArrayList<T>(); |
| | | if (list != null && list.size() > 0) { |
| | | int allCount = list.size(); |
| | | if(pageNo > 1 && allCount < pageSize) { |
| | | return new ArrayList<>(); |
| | | } |
| | | int pageCount = (allCount + pageSize - 1) / pageSize; |
| | | if (pageNo >= pageCount) { |
| | | pageNo = pageCount; |
| | | } |
| | | int start = (pageNo - 1) * pageSize; |
| | | int end = pageNo * pageSize; |
| | | if (end >= allCount) { |
| | | end = allCount; |
| | | } |
| | | for (int i = start; i < end; i++) { |
| | | result.add(list.get(i)); |
| | | } |
| | | } |
| | | return (result != null && result.size() > 0) ? result : new ArrayList<T>(); |
| | | } |
| | | |
| | | /** |
| | | * Double类型取整 |
| | | * @param num |
| | | * @return |
| | | */ |
| | | public static String doubleTrans(double num) { |
| | | return String.valueOf((long) num); |
| | | } |
| | | |
| | | /** |
| | | * Double类型保留1位小数 |
| | | * |
| | | * @param num |
| | | * @return |
| | | */ |
| | | public static String doubleRetainOne(double num) { |
| | | DecimalFormat dfs = new DecimalFormat("0.0"); |
| | | return dfs.format(num); |
| | | } |
| | | |
| | | /** |
| | | * 5位随机数 |
| | | * @return |
| | | */ |
| | | public static synchronized String getFive() { |
| | | int i=(int)((Math.random()*9+1)*10000); |
| | | return i+""; |
| | | } |
| | | /** |
| | | * Double类型保留2位小数 |
| | | * |
| | | * @param num |
| | | * @return |
| | | */ |
| | | public static String doubleRetainTwo(double num) { |
| | | DecimalFormat dfs = new DecimalFormat("0.00"); |
| | | String.format("%.2f", num); |
| | | return dfs.format(num); |
| | | } |
| | | |
| | | /** |
| | | * Double类型保留1位小数(四舍五入) |
| | | * |
| | | * @param num |
| | | * @return |
| | | */ |
| | | public static String doubleForwardOne(double num) { |
| | | return String.format("%.1f", num); |
| | | } |
| | | |
| | | /** |
| | | * Double类型保留2位小数(四舍五入) |
| | | * |
| | | * @param num |
| | | * @return |
| | | */ |
| | | public static String doubleForwardTwo(double num) { |
| | | return String.format("%.2f", num); |
| | | } |
| | | |
| | | /** |
| | | * 字符串转换成Ascii |
| | | * |
| | | * @param value |
| | | * @return |
| | | */ |
| | | public static String stringToAscii(String value) { |
| | | StringBuffer sbu = new StringBuffer(); |
| | | char[] chars = value.toCharArray(); |
| | | for (int i = 0; i < chars.length; i++) { |
| | | if (i != chars.length - 1) { |
| | | sbu.append((int) chars[i]); |
| | | } else { |
| | | sbu.append((int) chars[i]); |
| | | } |
| | | } |
| | | return sbu.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 小数转换为百分比 |
| | | * |
| | | * @param decimal |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | public static String decTurnPercent(double decimal) { |
| | | NumberFormat num = NumberFormat.getPercentInstance(); |
| | | num.setMaximumIntegerDigits(3); |
| | | num.setMaximumFractionDigits(2); |
| | | return num.format(decimal); |
| | | } |
| | | |
| | | /** |
| | | * Ascii转换成字符串 |
| | | * |
| | | * @param value |
| | | * @return |
| | | */ |
| | | public static String asciiToString(String value) { |
| | | String[] chars = value.split(","); |
| | | StringBuffer sbu = new StringBuffer(); |
| | | for (int i = 0; i < chars.length; i++) { |
| | | sbu.append((char) Integer.parseInt(chars[i])); |
| | | } |
| | | return sbu.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 字符串转换unicode |
| | | * |
| | | * @param string |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | public static String string2Unicode(String string) { |
| | | StringBuffer unicode = new StringBuffer(); |
| | | for (int i = 0; i < string.length(); i++) { |
| | | // 取出每一个字符 |
| | | char c = string.charAt(i); |
| | | // 转换为unicode |
| | | unicode.append("\\u" + Integer.toHexString(c)); |
| | | } |
| | | return unicode.toString(); |
| | | } |
| | | |
| | | /** |
| | | * unicode 转字符串 |
| | | * |
| | | * @param unicode |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | public static String unicode2String(String unicode) { |
| | | StringBuffer string = new StringBuffer(); |
| | | String[] hex = unicode.split("\\\\u"); |
| | | for (int i = 1; i < hex.length; i++) { |
| | | // 转换出每一个代码点 |
| | | int data = Integer.parseInt(hex[i], 16); |
| | | // 追加成string |
| | | string.append((char) data); |
| | | } |
| | | return string.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 字符串编码转换的实现方法 |
| | | * |
| | | * @param str |
| | | * 待转换编码的字符串 |
| | | * @param newCharset |
| | | * 目标编码 |
| | | * @return |
| | | * @throws UnsupportedEncodingException |
| | | */ |
| | | public static String changeCharset(String str, String newCharset) throws UnsupportedEncodingException { |
| | | if (str != null) { |
| | | // 用默认字符编码解码字符串。 |
| | | byte[] bs = str.getBytes(); |
| | | // 用新的字符编码生成字符串 |
| | | return new String(bs, newCharset); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 注: \n 回车( ) \t 水平制表符( ) \s 空格(\u0008) \r 换行( ) |
| | | * |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static String replaceBlank(String str) { |
| | | String dest = ""; |
| | | if (str != null) { |
| | | Pattern p = Pattern.compile("\\s*|\t|\r|\n"); |
| | | Matcher m = p.matcher(str); |
| | | dest = m.replaceAll(""); |
| | | } |
| | | return dest; |
| | | } |
| | | |
| | | /** |
| | | * 判断该字符串不能为空 |
| | | * |
| | | * @param str |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | public static boolean isNotEmpty(Object str) { |
| | | return !isEmpty(str); |
| | | } |
| | | |
| | | |
| | | public static boolean isNotEmptyUndefined(Object str) { |
| | | return !isEmpty(str) && !str.toString().equals("undefined"); |
| | | } |
| | | |
| | | /** |
| | | * 字符串编码转换的实现方法 |
| | | * |
| | | * @param str |
| | | * 待转换编码的字符串 |
| | | * @param oldCharset |
| | | * 原编码 |
| | | * @param newCharset |
| | | * 目标编码 |
| | | * @return |
| | | * @throws UnsupportedEncodingException |
| | | */ |
| | | public static String changeCharset(String str, String oldCharset, String newCharset) throws UnsupportedEncodingException { |
| | | if (str != null) { |
| | | // 用旧的字符编码解码字符串。解码可能会出现异常。 |
| | | byte[] bs = str.getBytes(oldCharset); |
| | | // 用新的字符编码生成字符串 |
| | | return new String(bs, newCharset); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 给手机号码加分割符 |
| | | * |
| | | * @param phone |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | public static String splitPhone(String phone) { |
| | | if (isNotEmpty(phone)) { |
| | | String strone = phone.substring(0, 3); |
| | | String strtwo = phone.substring(strone.length(), 7); |
| | | String strthree = phone.substring(strtwo.length() + strone.length(), phone.length()); |
| | | return strone + "-" + strtwo + "-" + strthree; |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * 非空判断 |
| | | * |
| | | * @param str |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | public static boolean isEmpty(Object str) { |
| | | return str == null || str.toString().length() == 0 || str.equals("") || str.toString().matches("\\s*"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 将List<{@link Object}>转换成List<{@link T}> |
| | | * |
| | | * @param list |
| | | * 将要转换的对象 |
| | | * @param clazs |
| | | * 需要转换的泛型对象 |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | public static <T> List<T> fromToObject(List<?> list, Class<T> clazs) { |
| | | List<T> t = new ArrayList<T>(); |
| | | for (Object object : list) { |
| | | t.add((T) object); |
| | | } |
| | | return t; |
| | | } |
| | | |
| | | /** |
| | | * 生成 uuid, 即用来标识一笔单,也用做 nonce_str |
| | | * @return |
| | | */ |
| | | public static String generateUUID() { |
| | | return UUID.randomUUID().toString().replaceAll("-", "").substring(0, 32); |
| | | } |
| | | |
| | | /** |
| | | * 将List<{@link Object}>转换成List<{@link Map<String, Object>}> |
| | | * |
| | | * @param list |
| | | * @return |
| | | * @author TaoNingBo |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | public static List<Map<String, Object>> fromToObject_M(List<?> list) { |
| | | List<Map<String, Object>> t = new ArrayList<Map<String, Object>>(); |
| | | for (Object object : list) { |
| | | t.add((Map<String, Object>) object); |
| | | } |
| | | return t; |
| | | } |
| | | |
| | | /** |
| | | * URL编码 |
| | | * |
| | | * @param url |
| | | * @return |
| | | */ |
| | | @SuppressWarnings("deprecation") |
| | | public static String URLEncode(String url) { |
| | | try { |
| | | return URLEncoder.encode(url, "UTF-8"); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return URLEncoder.encode(url); |
| | | } |
| | | |
| | | /** |
| | | * URL解码 |
| | | * |
| | | * @param url |
| | | * @return |
| | | */ |
| | | @SuppressWarnings("deprecation") |
| | | public static String URLDecode(String url) { |
| | | try { |
| | | return URLDecoder.decode(url, "UTF-8"); |
| | | } catch (UnsupportedEncodingException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return URLDecoder.decode(url); |
| | | } |
| | | public static void main(String[] args) throws ParseException { |
| | | |
| | | System.out.println(doubleRetainTwo(0.0)); |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.core.util; |
| | | |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | public class WoUtil { |
| | | public static Workbook ImportFile(MultipartFile importFile) { |
| | | Workbook book = null; |
| | | if(importFile == null) |
| | | { |
| | | //throw new WoException(SysConstant.ERR_EXCEL_NULL); |
| | | } |
| | | String fileName = importFile.getOriginalFilename(); |
| | | try { |
| | | if(fileName.endsWith(".xlsx")) //当表格的后缀是".xlsx时" |
| | | { |
| | | book = new XSSFWorkbook(importFile.getInputStream()); |
| | | }else |
| | | { |
| | | book = new HSSFWorkbook(importFile.getInputStream()); |
| | | } |
| | | } catch (IOException e) { |
| | | //throw new WoException(e,SysConstant.ERR_EXCEL_NO); |
| | | } |
| | | return book; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.api; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.JwtTokenUtil; |
| | | import com.stylefeng.guns.modular.system.dao.UserMapper; |
| | | import com.stylefeng.guns.modular.system.model.User; |
| | | import org.apache.shiro.authc.SimpleAuthenticationInfo; |
| | | import org.apache.shiro.authc.UsernamePasswordToken; |
| | | import org.apache.shiro.authc.credential.HashedCredentialsMatcher; |
| | | import org.apache.shiro.crypto.hash.Md5Hash; |
| | | import org.apache.shiro.util.ByteSource; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.HashMap; |
| | | |
| | | /** |
| | | * 接口控制器提供 |
| | | * |
| | | * @author stylefeng |
| | | * @Date 2018/7/20 23:39 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/gunsApi") |
| | | public class ApiController extends BaseController { |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | /** |
| | | * api登录接口,通过账号密码获取token |
| | | */ |
| | | @RequestMapping("/auth") |
| | | public Object auth(@RequestParam("username") String username, |
| | | @RequestParam("password") String password) { |
| | | |
| | | //封装请求账号密码为shiro可验证的token |
| | | UsernamePasswordToken usernamePasswordToken = new UsernamePasswordToken(username, password.toCharArray()); |
| | | |
| | | //获取数据库中的账号密码,准备比对 |
| | | User user = userMapper.getByAccount(username); |
| | | |
| | | String credentials = user.getPassword(); |
| | | String salt = user.getSalt(); |
| | | ByteSource credentialsSalt = new Md5Hash(salt); |
| | | SimpleAuthenticationInfo simpleAuthenticationInfo = new SimpleAuthenticationInfo( |
| | | new ShiroUser(), credentials, credentialsSalt, ""); |
| | | |
| | | //校验用户账号密码 |
| | | HashedCredentialsMatcher md5CredentialsMatcher = new HashedCredentialsMatcher(); |
| | | md5CredentialsMatcher.setHashAlgorithmName(ShiroKit.hashAlgorithmName); |
| | | md5CredentialsMatcher.setHashIterations(ShiroKit.hashIterations); |
| | | boolean passwordTrueFlag = md5CredentialsMatcher.doCredentialsMatch( |
| | | usernamePasswordToken, simpleAuthenticationInfo); |
| | | |
| | | if (passwordTrueFlag) { |
| | | HashMap<String, Object> result = new HashMap<>(); |
| | | result.put("token", JwtTokenUtil.generateToken(String.valueOf(user.getId()))); |
| | | return result; |
| | | } else { |
| | | return new ErrorTip(500, "账号密码错误!"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 测试接口是否走鉴权 |
| | | */ |
| | | @RequestMapping(value = "/test", method = RequestMethod.POST) |
| | | public Object test() { |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.stylefeng.guns.modular.code.controller; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.config.properties.DruidProperties; |
| | | import com.stylefeng.guns.generator.action.config.WebGeneratorConfig; |
| | | import com.stylefeng.guns.generator.action.model.GenQo; |
| | | import com.stylefeng.guns.modular.code.factory.DefaultTemplateFactory; |
| | | import com.stylefeng.guns.modular.code.service.TableService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | /** |
| | | * 代码生成控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2017年11月30日16:39:19 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/code") |
| | | public class CodeController extends BaseController { |
| | | |
| | | private static String PREFIX = "/code"; |
| | | |
| | | @Autowired |
| | | private TableService tableService; |
| | | |
| | | @Autowired |
| | | private DruidProperties druidProperties; |
| | | |
| | | /** |
| | | * 跳转到代码生成主页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String blackboard(Model model) { |
| | | model.addAttribute("tables", tableService.getAllTables()); |
| | | model.addAttribute("params", DefaultTemplateFactory.getDefaultParams()); |
| | | model.addAttribute("templates", DefaultTemplateFactory.getDefaultTemplates()); |
| | | return PREFIX + "/code.html"; |
| | | } |
| | | |
| | | /** |
| | | * 生成代码 |
| | | */ |
| | | @ApiOperation("生成代码") |
| | | @RequestMapping(value = "/generate", method = RequestMethod.POST) |
| | | @ResponseBody |
| | | public Object generate(GenQo genQo) { |
| | | genQo.setUrl(druidProperties.getUrl()); |
| | | genQo.setUserName(druidProperties.getUsername()); |
| | | genQo.setPassword(druidProperties.getPassword()); |
| | | WebGeneratorConfig webGeneratorConfig = new WebGeneratorConfig(genQo); |
| | | webGeneratorConfig.doMpGeneration(); |
| | | webGeneratorConfig.doGunsGeneration(); |
| | | return SUCCESS_TIP; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.code.factory; |
| | | |
| | | |
| | | import com.stylefeng.guns.GunsApplication; |
| | | import com.stylefeng.guns.core.CoreFlag; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.generator.action.model.GenQo; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 模板种类构建器 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-12-04-下午2:59 |
| | | */ |
| | | public class DefaultTemplateFactory { |
| | | |
| | | /** |
| | | * 获取所有的模板种类 |
| | | */ |
| | | public static List<Map<String,Object>> getDefaultTemplates(){ |
| | | ArrayList<Map<String, Object>> templates = new ArrayList<>(); |
| | | templates.add(create("controllerSwitch","controller-控制器模板")); |
| | | templates.add(create("entitySwitch","entity-实体模板")); |
| | | templates.add(create("serviceSwitch","service-service模板")); |
| | | templates.add(create("daoSwitch","dao-dao模板")); |
| | | templates.add(create("indexPageSwitch","indexPage-首页模板")); |
| | | templates.add(create("addPageSwitch","addPage-添加页面模板")); |
| | | templates.add(create("editPageSwitch","editPage-编辑页面模板")); |
| | | templates.add(create("jsSwitch","indexJs-主页js模板")); |
| | | templates.add(create("infoJsSwitch","infoJs-详情页js模板")); |
| | | templates.add(create("sqlSwitch","sql-sql语句模板")); |
| | | return templates; |
| | | } |
| | | |
| | | /** |
| | | * 获取默认的参数 |
| | | */ |
| | | public static GenQo getDefaultParams(){ |
| | | GenQo genQo = new GenQo(); |
| | | genQo.setProjectPath(ToolUtil.getWebRootPath(null)); |
| | | genQo.setAuthor("stylefeng"); |
| | | genQo.setProjectPackage(GunsApplication.class.getPackage().getName()); |
| | | genQo.setCorePackage(CoreFlag.class.getPackage().getName()); |
| | | genQo.setIgnoreTabelPrefix("sys_"); |
| | | genQo.setModuleName("system"); |
| | | genQo.setParentMenuName("系统管理"); |
| | | return genQo; |
| | | } |
| | | |
| | | private static Map<String,Object> create(String key,String desc){ |
| | | HashMap<String, Object> template = new HashMap<>(); |
| | | template.put("key",key); |
| | | template.put("desc",desc); |
| | | return template; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.code.service; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.SqlRunner; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 获取数据库所有的表 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-12-04-下午1:37 |
| | | */ |
| | | @Service |
| | | public class TableService { |
| | | |
| | | @Value("${spring.datasource.db-name}") |
| | | private String dbName; |
| | | |
| | | /** |
| | | * 获取当前数据库所有的表信息 |
| | | */ |
| | | public List<Map<String, Object>> getAllTables() { |
| | | String sql = "select TABLE_NAME as tableName,TABLE_COMMENT as tableComment from information_schema.`TABLES` where TABLE_SCHEMA = '" + dbName + "'"; |
| | | return SqlRunner.db().selectList(sql); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.config; |
| | | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 项目中需继承此类 |
| | | * |
| | | * @author lihen |
| | | */ |
| | | @Component |
| | | @ConfigurationProperties(prefix = "wx.conf") |
| | | public class WxConfig { |
| | | |
| | | /** |
| | | * 获取 App ID |
| | | * |
| | | * @return App ID |
| | | */ |
| | | @JsonProperty("appId") |
| | | public String appId; |
| | | |
| | | /** |
| | | * 获取 Secret |
| | | * |
| | | * @return Secret |
| | | */ |
| | | @JsonProperty("secret") |
| | | public String secret; |
| | | |
| | | public String getAppId() { |
| | | return appId; |
| | | } |
| | | |
| | | public void setAppId(String appId) { |
| | | this.appId = appId; |
| | | } |
| | | |
| | | public String getSecret() { |
| | | return secret; |
| | | } |
| | | |
| | | public void setSecret(String secret) { |
| | | this.secret = secret; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.model.THtml; |
| | | import com.stylefeng.guns.modular.system.service.ITHtmlService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | /** |
| | | * 数据统计 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-24 10:50:08 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/dataStatistics") |
| | | public class DataStatisticsController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ITHtmlService tHtmlService; |
| | | |
| | | /** |
| | | * 代理商统计 |
| | | */ |
| | | @RequestMapping(value = "/agentData") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tHtmlService.selectList(null); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-17 20:51:18 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/driverActivity") |
| | | public class DriverActivityController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/driverActivity/"; |
| | | |
| | | @Autowired |
| | | private IDriverActivityService driverActivityService; |
| | | |
| | | @Autowired |
| | | private IDriverActivityOnlineService driverActivityOnlineService; |
| | | |
| | | @Autowired |
| | | private IDriverActivityOrderService driverActivityOrderService; |
| | | |
| | | @Autowired |
| | | private IDriverActivityRegisteredService driverActivityRegisteredService; |
| | | |
| | | @Autowired |
| | | private IDriverActivityHistoryService driverActivityHistoryService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "driverActivity.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/driverActivity_add") |
| | | public String driverActivityAdd() { |
| | | return PREFIX + "driverActivity_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转领取统计 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/receiveRecord") |
| | | public String receiveRecord(Model model,Integer activityId){ |
| | | model.addAttribute("activityId",activityId); |
| | | DriverActivity driverActivity = driverActivityService.selectById(activityId); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | model.addAttribute("startTime", sdf.format(driverActivity.getStartTime())); |
| | | model.addAttribute("endTime", sdf.format(driverActivity.getEndTime())); |
| | | DriverActivityRegistered driverActivityRegistered = driverActivityRegisteredService.selectOne(new EntityWrapper<DriverActivityRegistered>().eq("driverActivityId",activityId).eq("type",1)); |
| | | model.addAttribute("id1",driverActivityRegistered.getId()); |
| | | driverActivityRegistered = driverActivityRegisteredService.selectOne(new EntityWrapper<DriverActivityRegistered>().eq("driverActivityId",activityId).eq("type",2)); |
| | | model.addAttribute("id2",driverActivityRegistered.getId()); |
| | | DriverActivityOnline driverActivityOnline = driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",activityId).eq("type",1)); |
| | | model.addAttribute("id3",driverActivityOnline.getId()); |
| | | //统计专车在线 |
| | | driverActivityOnline = driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",activityId).eq("type",2)); |
| | | model.addAttribute("id4",driverActivityOnline.getId()); |
| | | driverActivityOnline = driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",activityId).eq("type",3)); |
| | | model.addAttribute("id5",driverActivityOnline.getId()); |
| | | DriverActivityOrder driverActivityOrder = driverActivityOrderService.selectOne(new EntityWrapper<DriverActivityOrder>().eq("driverActivityId",activityId)); |
| | | model.addAttribute("id6",driverActivityOrder.getId()); |
| | | return PREFIX + "receiveRecord.html"; |
| | | } |
| | | |
| | | @RequestMapping(value = "/receiveRecordDetail") |
| | | @ResponseBody |
| | | public Object receiveRecordDetail(String createTime,Integer activityId) { |
| | | Date startTimes = null; |
| | | Date endTimes = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | startTimes = DateUtil.getDate_str3(timeArray[0]+" 00:00:00"); |
| | | endTimes = DateUtil.getDate_str3(timeArray[1]+" 23:59:59"); |
| | | }else{ |
| | | DriverActivity driverActivity = driverActivityService.selectById(activityId); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | startTimes=driverActivity.getStartTime(); |
| | | endTimes=driverActivity.getEndTime(); |
| | | } |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | DriverActivityRegistered driverActivityRegistered = driverActivityRegisteredService.selectOne(new EntityWrapper<DriverActivityRegistered>().eq("driverActivityId",activityId) |
| | | .eq("type",1).where("startTime >= '" + sdf.format(startTimes) + "' and endTime < '" + sdf.format(endTimes) + "'").orderBy("insertTime desc limit 0, 1")); |
| | | //统计邀请司机注册 |
| | | List<DriverActivityHistory> historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>() |
| | | .between("insertTime",startTimes,endTimes).eq("type",1).eq("activityId",driverActivityRegistered.getId()).eq("carryOut",2)); |
| | | Double totalMOney=0d; |
| | | Double money=0d; |
| | | Integer number=0; |
| | | for(DriverActivityHistory history:historyList){ |
| | | totalMOney+=history.getMoney(); |
| | | money+=history.getMoney(); |
| | | number+=1; |
| | | } |
| | | map.put("money1",money); |
| | | map.put("number1",number); |
| | | driverActivityRegistered = driverActivityRegisteredService.selectOne(new EntityWrapper<DriverActivityRegistered>().eq("driverActivityId",activityId) |
| | | .eq("type",2).where("startTime >= '" + sdf.format(startTimes) + "' and endTime < '" + sdf.format(endTimes) + "'").orderBy("insertTime desc limit 0, 1")); |
| | | //统计邀请用户注册 |
| | | historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",2).eq("activityId",driverActivityRegistered.getId()).eq("carryOut",2)); |
| | | money=0d; |
| | | number=0; |
| | | for(DriverActivityHistory history:historyList){ |
| | | totalMOney+=history.getMoney(); |
| | | money+=history.getMoney(); |
| | | number+=1; |
| | | } |
| | | map.put("money2",money); |
| | | map.put("number2",number); |
| | | DriverActivityOnline driverActivityOnline = driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",activityId) |
| | | .eq("type",1).where("startTime >= '" + sdf.format(startTimes) + "' and endTime < '" + sdf.format(endTimes) + "'").orderBy("insertTime desc limit 0, 1")); |
| | | //统计专车在线 |
| | | historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",3).eq("activityId",driverActivityOnline.getId()).eq("carryOut",2)); |
| | | money=0d; |
| | | number=0; |
| | | for(DriverActivityHistory history:historyList){ |
| | | totalMOney+=history.getMoney(); |
| | | money+=history.getMoney(); |
| | | number+=1; |
| | | } |
| | | map.put("money3",money); |
| | | map.put("number3",number); |
| | | driverActivityOnline = driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",activityId) |
| | | .eq("type",2).where("startTime >= '" + sdf.format(startTimes) + "' and endTime < '" + sdf.format(endTimes) + "'").orderBy("insertTime desc limit 0, 1")); |
| | | //统计出租车在线 |
| | | historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",3).eq("activityId",driverActivityOnline.getId()).eq("carryOut",2)); |
| | | money=0d; |
| | | number=0; |
| | | for(DriverActivityHistory history:historyList){ |
| | | totalMOney+=history.getMoney(); |
| | | money+=history.getMoney(); |
| | | number+=1; |
| | | } |
| | | map.put("money4",money); |
| | | map.put("number4",number); |
| | | driverActivityOnline = driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",activityId) |
| | | .eq("type",3).where("startTime >= '" + sdf.format(startTimes) + "' and endTime < '" + sdf.format(endTimes) + "'").orderBy("insertTime desc limit 0, 1")); |
| | | //统计城际在线 |
| | | historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",3).eq("activityId",driverActivityOnline.getId()).eq("carryOut",2)); |
| | | money=0d; |
| | | number=0; |
| | | for(DriverActivityHistory history:historyList){ |
| | | totalMOney+=history.getMoney(); |
| | | money+=history.getMoney(); |
| | | number+=1; |
| | | } |
| | | map.put("money5",money); |
| | | map.put("number5",number); |
| | | DriverActivityOrder driverActivityOrder = driverActivityOrderService.selectOne(new EntityWrapper<DriverActivityOrder>() |
| | | .eq("driverActivityId",activityId).where("startTime >= '" + sdf.format(startTimes) + "' and endTime < '" + sdf.format(endTimes) + "'").orderBy("insertTime desc limit 0, 1")); |
| | | //统计订单数 |
| | | historyList = driverActivityHistoryService.selectList(new EntityWrapper<DriverActivityHistory>().between("insertTime",startTimes,endTimes).eq("type",4).eq("activityId",driverActivityOrder.getId()).eq("carryOut",2)); |
| | | money=0d; |
| | | number=0; |
| | | for(DriverActivityHistory history:historyList){ |
| | | totalMOney+=history.getMoney(); |
| | | money+=history.getMoney(); |
| | | number+=1; |
| | | } |
| | | map.put("money6",money); |
| | | map.put("number6",number); |
| | | map.put("totalMOney",totalMOney); |
| | | return map; |
| | | } |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/driverActivity_update/{driverActivityId}") |
| | | public String driverActivityUpdate(@PathVariable Integer driverActivityId, Model model) { |
| | | DriverActivity driverActivity = driverActivityService.selectById(driverActivityId); |
| | | model.addAttribute("item",driverActivity); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | model.addAttribute("startTime", sdf.format(driverActivity.getStartTime())); |
| | | model.addAttribute("endTime", sdf.format(driverActivity.getEndTime())); |
| | | model.addAttribute("online1",driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",driverActivityId).eq("type",1))); |
| | | model.addAttribute("online2",driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",driverActivityId).eq("type",2))); |
| | | model.addAttribute("online3",driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",driverActivityId).eq("type",3))); |
| | | DriverActivityOrder driverActivityOrder = driverActivityOrderService.selectOne(new EntityWrapper<DriverActivityOrder>().eq("driverActivityId",driverActivityId)); |
| | | if(driverActivityOrder!=null){ |
| | | model.addAttribute("startTime1", driverActivityOrder.getStart()+" - "+driverActivityOrder.getEnd()); |
| | | }else{ |
| | | model.addAttribute("startTime1", ""); |
| | | } |
| | | model.addAttribute("order",driverActivityOrder); |
| | | model.addAttribute("regist1",driverActivityRegisteredService.selectOne(new EntityWrapper<DriverActivityRegistered>().eq("driverActivityId",driverActivityId).eq("type",1))); |
| | | model.addAttribute("regist2",driverActivityRegisteredService.selectOne(new EntityWrapper<DriverActivityRegistered>().eq("driverActivityId",driverActivityId).eq("type",2))); |
| | | |
| | | LogObjectHolder.me().set(driverActivity); |
| | | return PREFIX + "driverActivity_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,String name) { |
| | | ShiroUser user = ShiroKit.getUser(); |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(driverActivityService.getList(page,beginTime,endTime,name,user.getRoleType(),user.getObjectId())); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(String staTime, String startTime, String num1, Double num2 |
| | | , Double num3 |
| | | , Integer num4 |
| | | , Double num5 |
| | | , Integer num6 |
| | | , Double num7 |
| | | , Integer num8 |
| | | , Double num9 |
| | | , Integer num10 |
| | | , Double num11) { |
| | | |
| | | driverActivityService.insertOrUpdate(null,staTime,startTime, num1, num2 |
| | | , num3 |
| | | , num4 |
| | | , num5 |
| | | , num6 |
| | | , num7 |
| | | , num8 |
| | | , num9 |
| | | , num10 |
| | | , num11); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer driverActivityId) { |
| | | driverActivityService.deleteById(driverActivityId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(Integer id,String staTime, String startTime, String num1, Double num2 |
| | | , Double num3 |
| | | , Integer num4 |
| | | , Double num5 |
| | | , Integer num6 |
| | | , Double num7 |
| | | , Integer num8 |
| | | , Double num9 |
| | | , Integer num10 |
| | | , Double num11) { |
| | | driverActivityService.insertOrUpdate(id,staTime,startTime, num1, num2 |
| | | , num3 |
| | | , num4 |
| | | , num5 |
| | | , num6 |
| | | , num7 |
| | | , num8 |
| | | , num9 |
| | | , num10 |
| | | , num11); |
| | | return SUCCESS_TIP; |
| | | } |
| | | @RequestMapping(value = "/updateStatus") |
| | | @ResponseBody |
| | | public Object updateStatus(DriverActivity driverActivity) { |
| | | driverActivityService.updateById(driverActivity); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | @RequestMapping("/driverActivity_detail/{driverActivityId}") |
| | | public String driverActivityDetail(@PathVariable Integer driverActivityId, Model model) { |
| | | DriverActivity driverActivity = driverActivityService.selectById(driverActivityId); |
| | | model.addAttribute("item",driverActivity); |
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | model.addAttribute("startTime", sdf.format(driverActivity.getStartTime())); |
| | | model.addAttribute("endTime", sdf.format(driverActivity.getEndTime())); |
| | | |
| | | model.addAttribute("online1",driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",driverActivityId).eq("type",1))); |
| | | model.addAttribute("online2",driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",driverActivityId).eq("type",2))); |
| | | model.addAttribute("online3",driverActivityOnlineService.selectOne(new EntityWrapper<DriverActivityOnline>().eq("driverActivityId",driverActivityId).eq("type",3))); |
| | | model.addAttribute("order",driverActivityOrderService.selectOne(new EntityWrapper<DriverActivityOrder>().eq("driverActivityId",driverActivityId))); |
| | | model.addAttribute("regist1",driverActivityRegisteredService.selectOne(new EntityWrapper<DriverActivityRegistered>().eq("driverActivityId",driverActivityId).eq("type",1))); |
| | | model.addAttribute("regist2",driverActivityRegisteredService.selectOne(new EntityWrapper<DriverActivityRegistered>().eq("driverActivityId",driverActivityId).eq("type",2))); |
| | | LogObjectHolder.me().set(driverActivity); |
| | | return PREFIX + "driverActivity_detail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到立即处理页面 |
| | | */ |
| | | @RequestMapping("/driverActivity_immediately/{id}") |
| | | public String driverActivityImmediately(@PathVariable Integer id, Model model) { |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "driverActivity_immediately.html"; |
| | | } |
| | | /** |
| | | * 立即处理操作 |
| | | */ |
| | | @RequestMapping(value = "/immediately") |
| | | @ResponseBody |
| | | public Object immediately(@RequestParam Integer id,@RequestParam Integer state,@RequestParam String remark) { |
| | | DriverActivity driverActivity = driverActivityService.selectById(id); |
| | | if (SinataUtil.isNotEmpty(driverActivity)){ |
| | | driverActivity.setStatus(state); |
| | | driverActivity.setRemark(remark); |
| | | driverActivityService.updateById(driverActivity); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.DriverActivityHistory; |
| | | import com.stylefeng.guns.modular.system.service.IDriverActivityHistoryService; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-17 20:51:26 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/driverActivityHistory") |
| | | public class DriverActivityHistoryController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/driverActivityHistory/"; |
| | | |
| | | @Autowired |
| | | private IDriverActivityHistoryService driverActivityHistoryService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model,Integer type,Integer activityId) { |
| | | model.addAttribute("type",type); |
| | | model.addAttribute("activityId",activityId); |
| | | return PREFIX + "driverActivityHistory.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/driverActivityHistory_add") |
| | | public String driverActivityHistoryAdd() { |
| | | return PREFIX + "driverActivityHistory_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/driverActivityHistory_update/{driverActivityHistoryId}") |
| | | public String driverActivityHistoryUpdate(@PathVariable Integer driverActivityHistoryId, Model model) { |
| | | DriverActivityHistory driverActivityHistory = driverActivityHistoryService.selectById(driverActivityHistoryId); |
| | | model.addAttribute("item",driverActivityHistory); |
| | | LogObjectHolder.me().set(driverActivityHistory); |
| | | return PREFIX + "driverActivityHistory_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(Integer type,Integer activityId) { |
| | | |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(driverActivityHistoryService.getList(page,activityId,type)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(DriverActivityHistory driverActivityHistory) { |
| | | driverActivityHistoryService.insert(driverActivityHistory); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer driverActivityHistoryId) { |
| | | driverActivityHistoryService.deleteById(driverActivityHistoryId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(DriverActivityHistory driverActivityHistory) { |
| | | driverActivityHistoryService.updateById(driverActivityHistory); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{driverActivityHistoryId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("driverActivityHistoryId") Integer driverActivityHistoryId) { |
| | | return driverActivityHistoryService.selectById(driverActivityHistoryId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.DriverActivityOnline; |
| | | import com.stylefeng.guns.modular.system.service.IDriverActivityOnlineService; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-17 20:51:31 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/driverActivityOnline") |
| | | public class DriverActivityOnlineController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/driverActivityOnline/"; |
| | | |
| | | @Autowired |
| | | private IDriverActivityOnlineService driverActivityOnlineService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "driverActivityOnline.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/driverActivityOnline_add") |
| | | public String driverActivityOnlineAdd() { |
| | | return PREFIX + "driverActivityOnline_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/driverActivityOnline_update/{driverActivityOnlineId}") |
| | | public String driverActivityOnlineUpdate(@PathVariable Integer driverActivityOnlineId, Model model) { |
| | | DriverActivityOnline driverActivityOnline = driverActivityOnlineService.selectById(driverActivityOnlineId); |
| | | model.addAttribute("item",driverActivityOnline); |
| | | LogObjectHolder.me().set(driverActivityOnline); |
| | | return PREFIX + "driverActivityOnline_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return driverActivityOnlineService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(DriverActivityOnline driverActivityOnline) { |
| | | driverActivityOnlineService.insert(driverActivityOnline); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer driverActivityOnlineId) { |
| | | driverActivityOnlineService.deleteById(driverActivityOnlineId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(DriverActivityOnline driverActivityOnline) { |
| | | driverActivityOnlineService.updateById(driverActivityOnline); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{driverActivityOnlineId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("driverActivityOnlineId") Integer driverActivityOnlineId) { |
| | | return driverActivityOnlineService.selectById(driverActivityOnlineId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.DriverActivityOrder; |
| | | import com.stylefeng.guns.modular.system.service.IDriverActivityOrderService; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-17 20:51:36 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/driverActivityOrder") |
| | | public class DriverActivityOrderController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/driverActivityOrder/"; |
| | | |
| | | @Autowired |
| | | private IDriverActivityOrderService driverActivityOrderService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "driverActivityOrder.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/driverActivityOrder_add") |
| | | public String driverActivityOrderAdd() { |
| | | return PREFIX + "driverActivityOrder_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/driverActivityOrder_update/{driverActivityOrderId}") |
| | | public String driverActivityOrderUpdate(@PathVariable Integer driverActivityOrderId, Model model) { |
| | | DriverActivityOrder driverActivityOrder = driverActivityOrderService.selectById(driverActivityOrderId); |
| | | model.addAttribute("item",driverActivityOrder); |
| | | LogObjectHolder.me().set(driverActivityOrder); |
| | | return PREFIX + "driverActivityOrder_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return driverActivityOrderService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(DriverActivityOrder driverActivityOrder) { |
| | | driverActivityOrderService.insert(driverActivityOrder); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer driverActivityOrderId) { |
| | | driverActivityOrderService.deleteById(driverActivityOrderId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(DriverActivityOrder driverActivityOrder) { |
| | | driverActivityOrderService.updateById(driverActivityOrder); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{driverActivityOrderId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("driverActivityOrderId") Integer driverActivityOrderId) { |
| | | return driverActivityOrderService.selectById(driverActivityOrderId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.DriverActivityRegistered; |
| | | import com.stylefeng.guns.modular.system.service.IDriverActivityRegisteredService; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-17 20:51:43 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/driverActivityRegistered") |
| | | public class DriverActivityRegisteredController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/driverActivityRegistered/"; |
| | | |
| | | @Autowired |
| | | private IDriverActivityRegisteredService driverActivityRegisteredService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "driverActivityRegistered.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/driverActivityRegistered_add") |
| | | public String driverActivityRegisteredAdd() { |
| | | return PREFIX + "driverActivityRegistered_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/driverActivityRegistered_update/{driverActivityRegisteredId}") |
| | | public String driverActivityRegisteredUpdate(@PathVariable Integer driverActivityRegisteredId, Model model) { |
| | | DriverActivityRegistered driverActivityRegistered = driverActivityRegisteredService.selectById(driverActivityRegisteredId); |
| | | model.addAttribute("item",driverActivityRegistered); |
| | | LogObjectHolder.me().set(driverActivityRegistered); |
| | | return PREFIX + "driverActivityRegistered_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return driverActivityRegisteredService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(DriverActivityRegistered driverActivityRegistered) { |
| | | driverActivityRegisteredService.insert(driverActivityRegistered); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer driverActivityRegisteredId) { |
| | | driverActivityRegisteredService.deleteById(driverActivityRegisteredId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(DriverActivityRegistered driverActivityRegistered) { |
| | | driverActivityRegisteredService.updateById(driverActivityRegistered); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{driverActivityRegisteredId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("driverActivityRegisteredId") Integer driverActivityRegisteredId) { |
| | | return driverActivityRegisteredService.selectById(driverActivityRegisteredId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.sun.org.apache.regexp.internal.RE; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 首页统计 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/home") |
| | | public class HomeController { |
| | | |
| | | @Autowired |
| | | private ITUserService tUserService; |
| | | |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | |
| | | @Autowired |
| | | private ITOrderTaxiService tOrderTaxiService; |
| | | |
| | | @Autowired |
| | | private ITCarService tCarService; |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | @Autowired |
| | | private ITCompanyService tCompanyService; |
| | | |
| | | @Autowired |
| | | private ITCarBrandService carBrandService; |
| | | |
| | | @Autowired |
| | | private ITCarModelService carModelService; |
| | | |
| | | private List<TCompany> companys = null; |
| | | |
| | | |
| | | @Autowired |
| | | private ITOrderPrivateCarService itOrderPrivateCarService; |
| | | |
| | | @Autowired |
| | | private ITOrderCrossCityService itOrderCrossCityService; |
| | | |
| | | @Autowired |
| | | private ITOrderLogisticsService itOrderLogisticsService; |
| | | |
| | | @Autowired |
| | | private IDriverOnlineService driverOnlineService; |
| | | |
| | | |
| | | @RequestMapping("/openNetCarInfo") |
| | | public Object openNetCarInfo(Integer id, Model model){ |
| | | model.addAttribute("id", id); |
| | | return "/netCarInfo.html"; |
| | | } |
| | | |
| | | @RequestMapping("/showDriverOnline") |
| | | public String showDriverOnline(){ |
| | | return "/driverOnline.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getSumData") |
| | | public Object getSumData(Integer companyId, Date addDate, Date start, Date end){ |
| | | Integer id = ShiroKit.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | if(companyId == null && user.getRoleType() != 1){ |
| | | companyId = user.getObjectId(); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | Date date = new Date(); |
| | | Calendar calendar1 = Calendar.getInstance(); |
| | | Calendar calendar2 = Calendar.getInstance(); |
| | | Calendar calendar3 = Calendar.getInstance(); |
| | | Calendar calendar4 = Calendar.getInstance(); |
| | | if(addDate == null){ |
| | | calendar1.setTime(date); |
| | | calendar2.setTime(date); |
| | | }else{ |
| | | calendar1.setTime(addDate); |
| | | calendar2.setTime(addDate); |
| | | } |
| | | if(start == null || end == null){ |
| | | calendar3.setTime(date); |
| | | calendar4.setTime(date); |
| | | }else{ |
| | | calendar3.setTime(start); |
| | | calendar4.setTime(end); |
| | | } |
| | | calendar1.set(Calendar.HOUR_OF_DAY, 00); |
| | | calendar1.set(Calendar.MINUTE, 00); |
| | | calendar1.set(Calendar.SECOND, 00); |
| | | calendar2.set(Calendar.HOUR_OF_DAY, 23); |
| | | calendar2.set(Calendar.MINUTE, 59); |
| | | calendar2.set(Calendar.SECOND, 59); |
| | | calendar3.set(Calendar.HOUR_OF_DAY, 00); |
| | | calendar3.set(Calendar.MINUTE, 00); |
| | | calendar3.set(Calendar.SECOND, 00); |
| | | calendar4.set(Calendar.HOUR_OF_DAY, 23); |
| | | calendar4.set(Calendar.MINUTE, 59); |
| | | calendar4.set(Calendar.SECOND, 59); |
| | | |
| | | //【今日运行情况】 |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | Wrapper<TUser> ne = new EntityWrapper<TUser>().between("insertTime", calendar1.getTime(), calendar2.getTime()).ne("flag", 3); |
| | | if(companyId != null){ |
| | | ne.eq("companyId", companyId); |
| | | } |
| | | int i = tUserService.selectCount(ne); |
| | | map1.put("passengerInfo", i); //新增用户 |
| | | |
| | | Wrapper<TDriver> ne1 = new EntityWrapper<TDriver>().ne("state", 1).eq("authState", 2).ne("flag", 3); |
| | | if(companyId != null){ |
| | | ne1.eq("companyId", companyId).or().eq("franchiseeId", companyId); |
| | | } |
| | | List<TDriver> tDrivers = tDriverService.selectList(ne1); |
| | | String keys = ""; |
| | | for(TDriver driver : tDrivers){ |
| | | keys += "DRIVER" + driver.getId() + ","; |
| | | } |
| | | String value = redisUtil.getValue(keys.substring(0, keys.length() - 1)); |
| | | JSONArray jsonArray = JSON.parseArray(value); |
| | | int size = driverOnlineService.queryOnlineDriverCount(null, null); |
| | | map1.put("netcardriver", size); //在线司机 |
| | | |
| | | Wrapper<TOrderTaxi> travelTime1 = new EntityWrapper<TOrderTaxi>().between("travelTime", calendar1.getTime(), calendar2.getTime()); |
| | | if(companyId != null){ |
| | | travelTime1.eq("companyId", companyId); |
| | | } |
| | | int i1 = tOrderTaxiService.selectCount(travelTime1); |
| | | map1.put("orderDetail2", i1); //出租车订单 |
| | | |
| | | Wrapper<TOrderPrivateCar> zcTodayTme = new EntityWrapper<TOrderPrivateCar>().between("travelTime", calendar1.getTime(), calendar2.getTime()); |
| | | if(companyId != null){ |
| | | zcTodayTme.eq("companyId", companyId); |
| | | } |
| | | int zcTodayNum = itOrderPrivateCarService.selectCount(zcTodayTme); |
| | | map1.put("orderDetail1", zcTodayNum); //专车订单 |
| | | |
| | | Wrapper<TOrderCrossCity> kcTodayTme = new EntityWrapper<TOrderCrossCity>().between("travelTime", calendar1.getTime(), calendar2.getTime()); |
| | | if(companyId != null){ |
| | | kcTodayTme.eq("companyId", companyId); |
| | | } |
| | | int kcTodayNum = itOrderCrossCityService.selectCount(kcTodayTme); |
| | | map1.put("orderDetail3", kcTodayNum); //跨城订单 |
| | | |
| | | Wrapper<TOrderLogistics> tcxTodayTme = new EntityWrapper<TOrderLogistics>().between("travelTime", calendar1.getTime(), calendar2.getTime()); |
| | | if(companyId != null){ |
| | | tcxTodayTme.eq("companyId", companyId); |
| | | } |
| | | tcxTodayTme.eq("type",4); |
| | | int tcxTodayNum = itOrderLogisticsService.selectCount(tcxTodayTme); |
| | | map1.put("orderDetail4", tcxTodayNum); //同城物流订单 |
| | | |
| | | Wrapper<TOrderLogistics> kcxTodayTme = new EntityWrapper<TOrderLogistics>().between("travelTime", calendar1.getTime(), calendar2.getTime()); |
| | | if(companyId != null){ |
| | | kcxTodayTme.eq("companyId", companyId); |
| | | } |
| | | tcxTodayTme.eq("type",5); |
| | | int kcxTodayNum = itOrderLogisticsService.selectCount(kcxTodayTme); |
| | | map1.put("orderDetail5", kcxTodayNum); //跨城物流订单 |
| | | |
| | | map.put("operationStatus", map1); |
| | | |
| | | //【全部运营总数据】 |
| | | map1 = new HashMap<>(); |
| | | Wrapper<TUser> flag1 = new EntityWrapper<TUser>().ne("flag", 3); |
| | | if(companyId != null){ |
| | | flag1.eq("companyId", companyId); |
| | | } |
| | | int flag = tUserService.selectCount(flag1); |
| | | map1.put("passengerInfoSum", flag); //总用户 |
| | | |
| | | Wrapper<TDriver> ne4 = new EntityWrapper<TDriver>().eq("authState", 2).ne("flag", 3); |
| | | if(companyId != null){ |
| | | ne4.eq("companyId", companyId).or().eq("franchiseeId", companyId); |
| | | } |
| | | int i2 = tDriverService.selectCount(ne4); |
| | | map1.put("netcarDriverSum", i2); //总司机 |
| | | |
| | | Wrapper<TCar> state3 = new EntityWrapper<TCar>().eq("state", 1); |
| | | if(companyId != null){ |
| | | state3.eq("companyId", companyId).or().eq("franchiseeId", companyId); |
| | | } |
| | | int state1 = tCarService.selectCount(state3); |
| | | map1.put("netCarSum", state1); //总车辆 |
| | | |
| | | Integer i3 = tOrderTaxiService.getAllOrderNum(companyId,null,null); |
| | | map1.put("orderDetailSum", i3); //总订单 |
| | | |
| | | Double allTradeMoney = tOrderTaxiService.getAllTradeMoney(companyId, null, null); |
| | | Double allIncomeMoney = tOrderTaxiService.getAllIncomeMoney(companyId, null, null); |
| | | map1.put("paiceSum", allTradeMoney); //交易总金额 |
| | | map1.put("paySum", allIncomeMoney); //总收益 |
| | | map.put("operationSum", map1); |
| | | |
| | | //【运营数据增长查询】 |
| | | map1 = new HashMap<>(); |
| | | Wrapper<TUser> ne2 = new EntityWrapper<TUser>().between("insertTime", calendar3.getTime(), calendar4.getTime()).ne("flag", 3); |
| | | if(companyId != null){ |
| | | ne2.eq("companyId", companyId); |
| | | } |
| | | int i4 = tUserService.selectCount(ne2); |
| | | map1.put("passengerInfoSum", i4); |
| | | |
| | | Wrapper<TDriver> ne3 = new EntityWrapper<TDriver>().between("insertTime", calendar3.getTime(), calendar4.getTime()).eq("authState", 2).ne("flag", 3); |
| | | if(companyId != null){ |
| | | ne3.eq("companyId", companyId).or().eq("franchiseeId", companyId); |
| | | } |
| | | int i5 = tDriverService.selectCount(ne3); |
| | | map1.put("netcarDriverSum", i5); |
| | | |
| | | Wrapper<TOrderPrivateCar> zcTodayTmeByConditions = new EntityWrapper<TOrderPrivateCar>().between("travelTime", calendar3.getTime(), calendar4.getTime()); |
| | | if(companyId != null){ |
| | | zcTodayTmeByConditions.eq("companyId", companyId); |
| | | } |
| | | int zcTodayNum1 = itOrderPrivateCarService.selectCount(zcTodayTmeByConditions); |
| | | map1.put("orderDetail1", zcTodayNum1); //专车订单 |
| | | |
| | | Wrapper<TOrderTaxi> travelTime2 = new EntityWrapper<TOrderTaxi>().between("travelTime", calendar3.getTime(), calendar4.getTime()); |
| | | if(companyId != null){ |
| | | travelTime2.eq("companyId", companyId); |
| | | } |
| | | int travelTime = tOrderTaxiService.selectCount(travelTime2); |
| | | map1.put("orderDetail2", travelTime); //出租车订单 |
| | | |
| | | Wrapper<TOrderCrossCity> kcTodayTmeByConditions = new EntityWrapper<TOrderCrossCity>().between("travelTime", calendar3.getTime(), calendar4.getTime()); |
| | | if(companyId != null){ |
| | | kcTodayTmeByConditions.eq("companyId", companyId); |
| | | } |
| | | int kcTodayNum1 = itOrderCrossCityService.selectCount(kcTodayTmeByConditions); |
| | | map1.put("orderDetail3", kcTodayNum1); //跨城订单 |
| | | |
| | | Wrapper<TOrderLogistics> tcxTodayTmeByConditions = new EntityWrapper<TOrderLogistics>().between("travelTime", calendar3.getTime(), calendar4.getTime()); |
| | | if(companyId != null){ |
| | | tcxTodayTmeByConditions.eq("companyId", companyId); |
| | | } |
| | | tcxTodayTmeByConditions.eq("type",4); |
| | | int tcxTodayNum1 = itOrderLogisticsService.selectCount(tcxTodayTmeByConditions); |
| | | map1.put("orderDetail4", tcxTodayNum1); //同城物流订单 |
| | | |
| | | Wrapper<TOrderLogistics> kcxTodayTmeByConditions = new EntityWrapper<TOrderLogistics>().between("travelTime", calendar3.getTime(), calendar4.getTime()); |
| | | if(companyId != null){ |
| | | kcxTodayTmeByConditions.eq("companyId", companyId); |
| | | } |
| | | kcxTodayTmeByConditions.eq("type",5); |
| | | int kcxTodayNum1 = itOrderLogisticsService.selectCount(kcxTodayTmeByConditions); |
| | | map1.put("orderDetail5", kcxTodayNum1); //跨城物流订单 |
| | | |
| | | String startTime = null; |
| | | if (SinataUtil.isNotEmpty(start)){ |
| | | startTime = DateUtil.format(start, "yyyy-MM-dd"); |
| | | } |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(end)){ |
| | | endTime = DateUtil.format(end, "yyyy-MM-dd"); |
| | | } |
| | | Double allTradeMoneyByTime = tOrderTaxiService.getAllTradeMoney(companyId, startTime, endTime); |
| | | Double allIncomeMoneyByTime = tOrderTaxiService.getAllIncomeMoney(companyId, startTime, endTime); |
| | | map1.put("paiceSum", allTradeMoneyByTime); //交易总金额 |
| | | map1.put("paySum", allIncomeMoneyByTime); //总收益 |
| | | map.put("operationGrow", map1); |
| | | |
| | | |
| | | //【运营总趋势】 |
| | | Integer[] states = new Integer[]{8, 9}; |
| | | map1 = new HashMap<>(); |
| | | List<Integer> m1 = new ArrayList<>(); |
| | | List<Integer> m2 = new ArrayList<>(); |
| | | List<Integer> m3 = new ArrayList<>(); |
| | | List<Integer> m4 = new ArrayList<>(); |
| | | List<Integer> m5 = new ArrayList<>(); |
| | | List<Integer> m6 = new ArrayList<>(); |
| | | List<Integer> m7 = new ArrayList<>(); |
| | | for(int j = 30; j > 0; j--){ |
| | | Calendar s1 = Calendar.getInstance(); |
| | | s1.setTime(date); |
| | | s1.set(s1.get(Calendar.YEAR), s1.get(Calendar.MONTH), s1.get(Calendar.DAY_OF_MONTH) - j, 0, 0, 1); |
| | | Calendar e1 = Calendar.getInstance(); |
| | | e1.setTime(date); |
| | | e1.set(e1.get(Calendar.YEAR), e1.get(Calendar.MONTH), e1.get(Calendar.DAY_OF_MONTH) - j, 23, 59, 59); |
| | | |
| | | //出租车订单趋势图 |
| | | Wrapper<TOrderTaxi> in = new EntityWrapper<TOrderTaxi>().between("travelTime", s1.getTime(), e1.getTime()).in("state", states); |
| | | if(companyId != null){ |
| | | in.eq("companyId", companyId); |
| | | } |
| | | int i6 = tOrderTaxiService.selectCount(in); |
| | | m1.add(i6); |
| | | |
| | | //用户注册趋势图 |
| | | Wrapper<TUser> ne5 = new EntityWrapper<TUser>().between("insertTime", s1.getTime(), e1.getTime()).ne("flag", 3); |
| | | if(companyId != null){ |
| | | ne5.eq("companyId", companyId); |
| | | } |
| | | int i7 = tUserService.selectCount(ne5); |
| | | m2.add(i7); |
| | | |
| | | //订单数趋势图 |
| | | String startTime1 = DateUtil.format(s1.getTime(), "yyyy-MM-dd"); |
| | | String endTime1 = DateUtil.format(e1.getTime(), "yyyy-MM-dd"); |
| | | Integer allOrderNum = tOrderTaxiService.getAllOrderNum(companyId, startTime1, endTime1); |
| | | m3.add(allOrderNum); |
| | | |
| | | //专车订单趋势图 |
| | | Wrapper<TOrderPrivateCar> inZC = new EntityWrapper<TOrderPrivateCar>().between("travelTime", s1.getTime(), e1.getTime()).in("state", states); |
| | | if(companyId != null){ |
| | | inZC.eq("companyId", companyId); |
| | | } |
| | | int zc = itOrderPrivateCarService.selectCount(inZC); |
| | | m4.add(zc); |
| | | |
| | | //跨城订单趋势图 |
| | | Wrapper<TOrderCrossCity> inKC = new EntityWrapper<TOrderCrossCity>().between("travelTime", s1.getTime(), e1.getTime()).in("state", states); |
| | | if(companyId != null){ |
| | | inKC.eq("companyId", companyId); |
| | | } |
| | | int kc = itOrderCrossCityService.selectCount(inKC); |
| | | m5.add(kc); |
| | | |
| | | //同城物流订单趋势图 |
| | | Wrapper<TOrderLogistics> inTCX = new EntityWrapper<TOrderLogistics>().between("travelTime", s1.getTime(), e1.getTime()).in("state", states); |
| | | if(companyId != null){ |
| | | inTCX.eq("companyId", companyId); |
| | | } |
| | | inTCX.eq("type",4); |
| | | int tcx = itOrderLogisticsService.selectCount(inTCX); |
| | | m6.add(tcx); |
| | | |
| | | //跨城物流订单趋势图 |
| | | Wrapper<TOrderLogistics> inKCX = new EntityWrapper<TOrderLogistics>().between("travelTime", s1.getTime(), e1.getTime()).in("state", states); |
| | | if(companyId != null){ |
| | | inKCX.eq("companyId", companyId); |
| | | } |
| | | inKCX.eq("type",5); |
| | | int kcx = itOrderLogisticsService.selectCount(inKCX); |
| | | m7.add(kcx); |
| | | |
| | | } |
| | | map1.put("orderDetail5", m7); //跨城物流订单数趋势图 |
| | | map1.put("orderDetail4", m6); //同城物流订单数趋势图 |
| | | map1.put("orderDetail3", m5); //跨城订单数趋势图 |
| | | map1.put("orderDetail1", m4); //专车订单数趋势图 |
| | | map1.put("orderDetailSum", m3); //全部订单数趋势图 |
| | | map1.put("passengerInfoSum", m2); //用户注册趋势图 |
| | | map1.put("orderDetail2", m1); //出租车订单趋势图 |
| | | map.put("operationTrend", map1); |
| | | |
| | | return map; |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getDriverPosition") |
| | | public Object getDriverPosition(Integer companyId){ |
| | | Integer id = ShiroKit.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | if(companyId == null && user.getRoleType() != 1){ |
| | | companyId = user.getObjectId(); |
| | | } |
| | | Wrapper<TDriver> ne = new EntityWrapper<TDriver>().eq("authState", 2).eq("state", 2).ne("flag", 3); |
| | | if(companyId != null){ |
| | | ne.eq("companyId", companyId).or().eq("franchiseeId", companyId); |
| | | } |
| | | List<TDriver> tDrivers = tDriverService.selectList(ne); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Object> list = new ArrayList<>(); |
| | | for(TDriver tDriver : tDrivers){ |
| | | Map<String, Object> d = new HashMap<>(); |
| | | String value = redisUtil.getValue("DRIVER" + tDriver.getId()); |
| | | if(ToolUtil.isEmpty(value)){ |
| | | continue; |
| | | } |
| | | d.put("driver", tDriver); |
| | | d.put("lon", value.split(",")[0]); |
| | | d.put("lat", value.split(",")[1]); |
| | | list.add(d); |
| | | } |
| | | map.put("driver", list); |
| | | |
| | | Map<String, Object> map2 = new HashMap<>(); |
| | | Wrapper<TOrderTaxi> eq = new EntityWrapper<TOrderTaxi>().eq("state", 1).eq("isDelete", 1); |
| | | if(companyId != null){ |
| | | eq.eq("companyId", companyId); |
| | | } |
| | | List<TOrderTaxi> tOrderTaxis = tOrderTaxiService.selectList(eq); |
| | | list = new ArrayList<>(); |
| | | for(TOrderTaxi t : tOrderTaxis){ |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | map1.put("start", t.getStartAddress()); |
| | | map1.put("end", t.getEndAddress()); |
| | | map1.put("travelTime", t.getTravelTime()); |
| | | map1.put("carModel", ""); |
| | | map1.put("num", 1); |
| | | list.add(map1); |
| | | } |
| | | map2.put("chuzu", list); |
| | | map.put("order", map2); |
| | | |
| | | return map; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getAllOrder") |
| | | public Object getAllOrder(){ |
| | | List<TOrderTaxi> tOrderTaxis = tOrderTaxiService.selectList(new EntityWrapper<TOrderTaxi>().eq("isDelete", 1)); |
| | | List list = new ArrayList<>(); |
| | | for(TOrderTaxi t : tOrderTaxis){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("lon", t.getStartLon()); |
| | | map.put("lat", t.getStartLat()); |
| | | list.add(map); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getCompanyInfoByUserId") |
| | | public Object getCompanyInfoByUserId(){ |
| | | Integer id = ShiroKit.getUser().getId(); |
| | | User user = userService.selectById(id); |
| | | companys = new ArrayList<>(); |
| | | List<TCompany> ids = new ArrayList<>(); |
| | | TCompany tCompany = null; |
| | | if(user.getRoleType() == 1 && user.getObjectId() == null){ |
| | | tCompany = tCompanyService.selectById(1); |
| | | }else{ |
| | | tCompany = tCompanyService.selectById(user.getObjectId()); |
| | | } |
| | | ids.add(tCompany); |
| | | companys.addAll(ids); |
| | | this.getCompanyIds(ids); |
| | | return companys; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/getDriverInfo", method = RequestMethod.POST) |
| | | public Object getDriverInfo(Integer driverId){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | TDriver tDriver = tDriverService.selectById(driverId); |
| | | // TCar tCar = tCarService.selectById(tDriver.getCarId()); |
| | | TCarBrand tCarBrand = null; |
| | | TCarModel tCarModel = null; |
| | | // if(null != tCar){ |
| | | // tCarBrand = carBrandService.selectById(tCar.getCarBrandId()); |
| | | // tCarModel = carModelService.selectById(tCar.getCarModelId()); |
| | | // } |
| | | Integer[] states = new Integer[]{2, 3, 4, 5, 6, 11}; |
| | | Wrapper<TOrderTaxi> state4 = new EntityWrapper<TOrderTaxi>().in("state", states).eq("driverId", driverId).eq("isDelete", 1); |
| | | List<TOrderTaxi> tOrderTaxis = tOrderTaxiService.selectList(state4); |
| | | map.put("netcarDriver", tDriver); |
| | | // map.put("netcar", tCar); |
| | | map.put("carBrand", null != tCarBrand ? tCarBrand.getName() : ""); |
| | | map.put("carModel", null != tCarModel ? tCarModel.getName() : ""); |
| | | map.put("order", tOrderTaxis); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | |
| | | public void getCompanyIds(List<TCompany> ids){ |
| | | List<TCompany> ids_ = new ArrayList<>(); |
| | | for(TCompany id : ids){ |
| | | if(id.getId() == 1){ |
| | | List<TCompany> tCompanies = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("superiorId", id.getId()).or().isNull("superiorId").eq("state", 0).ne("flag", 3).ne("type", 1)); |
| | | ids_.addAll(tCompanies); |
| | | companys.addAll(tCompanies); |
| | | }else{ |
| | | List<TCompany> tCompanies = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("superiorId", id.getId()).eq("state", 0).ne("flag", 3)); |
| | | ids_.addAll(tCompanies); |
| | | companys.addAll(tCompanies); |
| | | } |
| | | } |
| | | if(ids_.size() == 0){ |
| | | return; |
| | | } |
| | | this.getCompanyIds(ids_); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryOnlineDriver", method = RequestMethod.POST) |
| | | public Object queryOnlineDriver(String name, String phone, Integer offset, Integer limit){ |
| | | try { |
| | | return driverOnlineService.queryOnlineDriver(name, phone, offset, limit); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.TCompany; |
| | | import com.stylefeng.guns.modular.system.service.ITCompanyService; |
| | | import com.stylefeng.guns.modular.system.service.IUserActivityDiscount1Service; |
| | | import com.stylefeng.guns.modular.system.service.IUserCouponRecordService; |
| | | import com.stylefeng.guns.modular.system.service.IUserRedPacketRecordService; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.net.URLEncoder; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 报表控制器 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/report") |
| | | public class ReportController { |
| | | |
| | | private String PREFIX = "/system/report/"; |
| | | |
| | | @Autowired |
| | | private ITCompanyService companyService; |
| | | |
| | | @Autowired |
| | | private IUserCouponRecordService userCouponRecordService; |
| | | |
| | | @Autowired |
| | | private IUserRedPacketRecordService redPacketRecordService; |
| | | |
| | | @Autowired |
| | | private IUserActivityDiscount1Service userActivityDiscount1Service; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到日常运营数据汇总页 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/showOperationalData") |
| | | public String showOperationalData(Model model){ |
| | | List<TCompany> tCompanies = companyService.selectList(new EntityWrapper<TCompany>().eq("state", 0).ne("flag", 3)); |
| | | model.addAttribute("company", tCompanies); |
| | | return PREFIX + "operationalData.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到优惠券统计页 |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @RequestMapping("/showCouponStatistics") |
| | | public String showCouponStatistics(Model model){ |
| | | List<TCompany> tCompanies = companyService.selectList(new EntityWrapper<TCompany>().eq("state", 0).ne("flag", 3)); |
| | | model.addAttribute("company", tCompanies); |
| | | return PREFIX + "couponStatistics.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到优惠券统计详情页 |
| | | * @param type |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @RequestMapping("/showCouponStatisticsInfo") |
| | | public String showCouponStatisticsInfo(Integer type, Model model){ |
| | | List<TCompany> tCompanies = companyService.selectList(new EntityWrapper<TCompany>().eq("state", 0).ne("flag", 3)); |
| | | model.addAttribute("company", tCompanies); |
| | | model.addAttribute("type", type); |
| | | return PREFIX + "couponStatisticsInfo.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取日常运营数据 |
| | | * @param type |
| | | * @param time |
| | | * @param companyId |
| | | * @param offset |
| | | * @param limit |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryOperationalData", method = RequestMethod.POST) |
| | | public Object queryOperationalData(Integer type, String time, Integer companyId, Integer offset, Integer limit){ |
| | | try { |
| | | String start = null; |
| | | String end = null; |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | start = time.split(" - ")[0]; |
| | | end = time.split(" - ")[1]; |
| | | } |
| | | return companyService.queryOperationalData(type, start, end, companyId, offset, limit); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 下载日常运营数据汇总表 |
| | | * @param type |
| | | * @param time |
| | | * @param companyId |
| | | * @param response |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/downloadOperationalData", method = RequestMethod.GET) |
| | | public void downloadOperationalData(Integer type, String time, Integer companyId, HttpServletResponse response){ |
| | | try { |
| | | String start = null; |
| | | String end = null; |
| | | if(ToolUtil.isNotEmpty(time)){ |
| | | start = time.split(" - ")[0]; |
| | | end = time.split(" - ")[1]; |
| | | } |
| | | HSSFWorkbook hssfWorkbook = companyService.downloadOperationalData(type, start, end, companyId); |
| | | response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("日常运营数据汇总表.xls", "utf-8")); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | ServletOutputStream out = response.getOutputStream(); |
| | | hssfWorkbook.write(out); |
| | | out.flush(); |
| | | out.close(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取优惠券统计 |
| | | * @param type |
| | | * @param name |
| | | * @param time |
| | | * @param companyId |
| | | * @param offset |
| | | * @param limit |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryCouponRegister", method = RequestMethod.POST) |
| | | public Object queryCouponRegister(Integer type, String name, String time, Integer companyId, Integer offset, Integer limit){ |
| | | try { |
| | | return userCouponRecordService.queryCouponRegister(type, name, time, companyId, offset, limit); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 下载优惠券领取数据 |
| | | * @param type |
| | | * @param name |
| | | * @param time |
| | | * @param companyId |
| | | * @param response |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/downloadCouponRegister", method = RequestMethod.GET) |
| | | public void downloadCouponRegister(Integer type, String name, String time, Integer companyId, HttpServletResponse response){ |
| | | try { |
| | | String na = ""; |
| | | if(type == 2){ |
| | | na = "注册优惠券奖励"; |
| | | } |
| | | if(type == 3){ |
| | | na = "邀请优惠券奖励"; |
| | | } |
| | | if(type == 4){ |
| | | na = "充值优惠券奖励"; |
| | | } |
| | | HSSFWorkbook hssfWorkbook = userCouponRecordService.downloadCouponRegister(type, name, time, companyId); |
| | | response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode(na + ".xls", "utf-8")); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | ServletOutputStream out = response.getOutputStream(); |
| | | hssfWorkbook.write(out); |
| | | out.flush(); |
| | | out.close(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取红包统计数据 |
| | | * @param name |
| | | * @param time |
| | | * @param companyId |
| | | * @param offset |
| | | * @param limit |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryRedEnvelopes", method = RequestMethod.POST) |
| | | public Object queryRedEnvelopes(String name, String time, Integer companyId, Integer offset, Integer limit){ |
| | | try { |
| | | return redPacketRecordService.queryRedEnvelopes(name, time, companyId, offset, limit); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 下载红包奖励 |
| | | * @param name |
| | | * @param time |
| | | * @param companyId |
| | | * @param response |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/downloadRedEnvelopes", method = RequestMethod.GET) |
| | | public void downloadRedEnvelopes(String name, String time, Integer companyId, HttpServletResponse response){ |
| | | try { |
| | | HSSFWorkbook hssfWorkbook = redPacketRecordService.downloadRedEnvelopes(name, time, companyId); |
| | | response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("红包奖励.xls", "utf-8")); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | ServletOutputStream out = response.getOutputStream(); |
| | | hssfWorkbook.write(out); |
| | | out.flush(); |
| | | out.close(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取折扣统计 |
| | | * @param name |
| | | * @param time |
| | | * @param companyId |
| | | * @param offset |
| | | * @param limit |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryDiscount1", method = RequestMethod.POST) |
| | | public Object queryDiscount1(String name, String time, Integer companyId, Integer offset, Integer limit){ |
| | | try { |
| | | return userActivityDiscount1Service.queryDiscount1(name, time, companyId, offset, limit); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 下载折扣优惠活动 |
| | | * @param name |
| | | * @param time |
| | | * @param companyId |
| | | * @param response |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/downloadDiscount1", method = RequestMethod.GET) |
| | | public void downloadDiscount1(String name, String time, Integer companyId, HttpServletResponse response){ |
| | | try { |
| | | HSSFWorkbook hssfWorkbook = userActivityDiscount1Service.downloadDiscount1(name, time, companyId); |
| | | response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("折扣优惠活动.xls", "utf-8")); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | ServletOutputStream out = response.getOutputStream(); |
| | | hssfWorkbook.write(out); |
| | | out.flush(); |
| | | out.close(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取优惠券统计明细 |
| | | * @param type |
| | | * @param name |
| | | * @param time |
| | | * @param companyId |
| | | * @param offset |
| | | * @param limit |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryCouponRegisterInfo", method = RequestMethod.POST) |
| | | public Object queryCouponRegisterInfo(Integer type, String name, String time, Integer companyId, Integer offset, Integer limit){ |
| | | try { |
| | | type += 1; |
| | | return userCouponRecordService.queryCouponRegisterInfo(type, name, time, companyId, offset, limit); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取充值赠送优惠券明细 |
| | | * @param name |
| | | * @param time |
| | | * @param companyId |
| | | * @param offset |
| | | * @param limit |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryCouponRegisterInfo1", method = RequestMethod.POST) |
| | | public Object queryCouponRegisterInfo1(String name, String time, Integer companyId, Integer offset, Integer limit){ |
| | | try { |
| | | return userCouponRecordService.queryCouponRegisterInfo1( name, time, companyId, offset, limit); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取折扣优惠详情 |
| | | * @param time |
| | | * @param companyId |
| | | * @param offset |
| | | * @param limit |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryDiscountInfo", method = RequestMethod.POST) |
| | | public Object queryDiscountInfo(String name, String time, Integer companyId, Integer offset, Integer limit){ |
| | | try { |
| | | return userActivityDiscount1Service.queryDiscountInfo(name, time, companyId, offset, limit); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取红包领取详情 |
| | | * @param name |
| | | * @param time |
| | | * @param companyId |
| | | * @param offset |
| | | * @param limit |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryRedEnvelopesInfo", method = RequestMethod.POST) |
| | | public Object queryRedEnvelopesInfo(String name, String time, Integer companyId, Integer offset, Integer limit){ |
| | | try { |
| | | return redPacketRecordService.queryRedEnvelopesInfo(name, time, companyId, offset, limit); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 优惠明细下载 |
| | | * @param type |
| | | * @param name |
| | | * @param time |
| | | * @param companyId |
| | | * @param response |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/downloadCouponStatisticsInfo", method = RequestMethod.GET) |
| | | public void downloadCouponStatisticsInfo(Integer type, String name, String time, Integer companyId, HttpServletResponse response){ |
| | | try { |
| | | if(type == 1 || type == 2){ |
| | | type += 1; |
| | | HSSFWorkbook hssfWorkbook = userCouponRecordService.downloadCouponRegisterInfo(type, name, time, companyId); |
| | | response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode((type == 2 ? "注册奖励明细" : "邀请奖励明细") + ".xls", "utf-8")); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | ServletOutputStream out = response.getOutputStream(); |
| | | hssfWorkbook.write(out); |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | if(type == 3){ |
| | | HSSFWorkbook hssfWorkbook = userCouponRecordService.downloadCouponRegisterInfo1(name, time, companyId); |
| | | response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("充值奖励明细.xls", "utf-8")); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | ServletOutputStream out = response.getOutputStream(); |
| | | hssfWorkbook.write(out); |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | if(type == 4){ |
| | | HSSFWorkbook hssfWorkbook = userActivityDiscount1Service.downloadDiscountInfo(name, time, companyId); |
| | | response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("折扣优惠明细.xls", "utf-8")); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | ServletOutputStream out = response.getOutputStream(); |
| | | hssfWorkbook.write(out); |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | if(type == 5){ |
| | | HSSFWorkbook hssfWorkbook = redPacketRecordService.downloadRedEnvelopesInfo(name, time, companyId); |
| | | response.setHeader("Content-Disposition", "attachment; filename=" + URLEncoder.encode("红包优惠明细.xls", "utf-8")); |
| | | response.setContentType("application/vnd.ms-excel"); |
| | | ServletOutputStream out = response.getOutputStream(); |
| | | hssfWorkbook.write(out); |
| | | out.flush(); |
| | | out.close(); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.SysCouponRecord; |
| | | import com.stylefeng.guns.modular.system.model.TUser; |
| | | import com.stylefeng.guns.modular.system.model.UserCouponRecord; |
| | | import com.stylefeng.guns.modular.system.service.ISysCouponRecordService; |
| | | import com.stylefeng.guns.modular.system.service.ITUserService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.SysCouponActivity; |
| | | import com.stylefeng.guns.modular.system.service.ISysCouponActivityService; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-17 09:14:59 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/sysCouponActivity") |
| | | public class SysCouponActivityController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/sysCouponActivity/"; |
| | | |
| | | @Autowired |
| | | private ISysCouponActivityService sysCouponActivityService; |
| | | |
| | | @Autowired |
| | | private ITUserService userService; |
| | | |
| | | @Autowired |
| | | private ISysCouponRecordService couponRecordService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "sysCouponActivity.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到选择优惠券页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/sysCouponRecord") |
| | | public String sysCouponRecord() { |
| | | return PREFIX + "sysCouponRecord.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到选择用户页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("user") |
| | | public String user() { |
| | | return PREFIX + "tUser.html"; |
| | | } |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/sysCouponActivity_add") |
| | | public String sysCouponActivityAdd() { |
| | | return PREFIX + "sysCouponActivity_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/sysCouponActivity_update/{sysCouponActivityId}") |
| | | public String sysCouponActivityUpdate(@PathVariable Integer sysCouponActivityId, Model model) { |
| | | SysCouponActivity sysCouponActivity = sysCouponActivityService.selectById(sysCouponActivityId); |
| | | model.addAttribute("item",sysCouponActivity); |
| | | if(sysCouponActivity.getSendType()==2){ |
| | | model.addAttribute("sendUserInfoList",JSON.parseArray(sysCouponActivity.getSendUserId())); |
| | | }else{ |
| | | model.addAttribute("sendUserInfoList",new ArrayList<>()); |
| | | } |
| | | LogObjectHolder.me().set(sysCouponActivity); |
| | | return PREFIX + "sysCouponActivity_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,Integer couponUseType,Integer status) { |
| | | Date startTimes = null; |
| | | Date endTimes = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | startTimes = DateUtil.getDate_str3(timeArray[0]+" 00:00:00"); |
| | | endTimes = DateUtil.getDate_str3(timeArray[1]+" 23:59:59"); |
| | | } |
| | | Page<SysCouponActivity> page = new PageFactory<SysCouponActivity>().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<SysCouponActivity>(); |
| | | if(SinataUtil.isNotEmpty(createTime)){ |
| | | wrapper.between("insertTime",startTimes,endTimes); |
| | | } |
| | | if(SinataUtil.isNotEmpty(couponUseType)){wrapper.eq("couponUseType",couponUseType);} |
| | | if(SinataUtil.isNotEmpty(status)){wrapper.eq("status",status);} |
| | | ShiroUser user = ShiroKit.getUser(); |
| | | if(user.getRoleType()!=1){ |
| | | wrapper.eq("companyId",user.getObjectId()); |
| | | wrapper.eq("companyType",user.getRoleType()); |
| | | } |
| | | wrapper.ne("status",4); |
| | | wrapper.orderBy("id",false); |
| | | return super.packForBT(sysCouponActivityService.selectPage(page,wrapper)); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(SysCouponActivity sysCouponActivity,Integer activityId) { |
| | | SysCouponRecord sysCouponRecord = couponRecordService.selectById(activityId); |
| | | sysCouponActivity.setCouponType(sysCouponRecord.getCouponType()); |
| | | sysCouponActivity.setCouponUseType(sysCouponRecord.getCouponUseType()); |
| | | sysCouponActivity.setMoney(sysCouponRecord.getMoney()); |
| | | sysCouponActivity.setFullMoney(sysCouponRecord.getFullMoney()); |
| | | sysCouponActivity.setInsertTime(new Date()); |
| | | sysCouponActivity.setCouponId(activityId); |
| | | sysCouponActivity.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | sysCouponActivity.setCompanyType(ShiroKit.getUser().getRoleType()); |
| | | sysCouponActivity.setStatus(sysCouponActivity.getCompanyType()==1?3:1); |
| | | sysCouponActivityService.insert(sysCouponActivity); |
| | | if(sysCouponActivity.getCompanyType()==1){ |
| | | //定时发送优惠券 |
| | | Timer timer = new Timer(); |
| | | timer.schedule(new timerTaskTest(sysCouponActivity.getId()),30*1000);//timer.schedule(执行的方法,延迟多久执行(ms)) |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | /** |
| | | * 跳转到立即处理页面 |
| | | */ |
| | | @RequestMapping("/sysCouponActivity_immediately/{id}") |
| | | public String sysCouponActivityImmediately(@PathVariable Integer id, Model model) { |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "sysCouponActivity_immediately.html"; |
| | | } |
| | | /** |
| | | * 立即处理操作 |
| | | */ |
| | | @RequestMapping(value = "/immediately") |
| | | @ResponseBody |
| | | public Object immediately(@RequestParam Integer id,@RequestParam Integer state,@RequestParam String remark) { |
| | | SysCouponActivity sysCouponActivity = sysCouponActivityService.selectById(id); |
| | | if (SinataUtil.isNotEmpty(sysCouponActivity)){ |
| | | sysCouponActivity.setStatus(state); |
| | | sysCouponActivity.setRemark(remark); |
| | | sysCouponActivityService.updateById(sysCouponActivity); |
| | | if(state==3){ |
| | | //定时发送优惠券 |
| | | Timer timer = new Timer(); |
| | | timer.schedule(new timerTaskTest(id),30*1000);//timer.schedule(执行的方法,延迟多久执行(ms)) |
| | | } |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | class timerTaskTest extends TimerTask { |
| | | private Integer id; |
| | | |
| | | public timerTaskTest(Integer id) { |
| | | this.id = id; |
| | | } |
| | | @Override |
| | | public void run() { |
| | | SysCouponActivity sysCouponActivity = sysCouponActivityService.selectById(id); |
| | | UserCouponRecord userCouponRecord = new UserCouponRecord(); |
| | | userCouponRecord.setMoney(sysCouponActivity.getMoney()); |
| | | userCouponRecord.setFullMoney(sysCouponActivity.getFullMoney()); |
| | | Date nowDay = new Date(); |
| | | userCouponRecord.setInsertTime(nowDay); |
| | | userCouponRecord.setExpirationTime(new Date(nowDay.getTime()+sysCouponActivity.getEffective()*24*3600*1000L)); |
| | | userCouponRecord.setCompanyId(sysCouponActivity.getCompanyId()); |
| | | userCouponRecord.setState(1); |
| | | userCouponRecord.setCouponType(sysCouponActivity.getCouponType()); |
| | | userCouponRecord.setCouponUseType(sysCouponActivity.getCouponUseType()); |
| | | userCouponRecord.setCouponActivityId(sysCouponActivity.getId()); |
| | | userCouponRecord.setActivityType(1); |
| | | //判断发送类型1=全部用户,2=选择用户 |
| | | if(sysCouponActivity.getSendType()==1){ |
| | | Wrapper wrapper = new EntityWrapper<TUser>(); |
| | | if(sysCouponActivity.getCompanyType()!=1){ |
| | | wrapper.eq("companyId",sysCouponActivity.getCompanyId()); |
| | | } |
| | | List<TUser> list = userService.selectList(wrapper); |
| | | for(TUser user:list){ |
| | | userCouponRecord.setUserId(user.getId()); |
| | | for (int i=0;i<sysCouponActivity.getNumber();i++){ |
| | | userCouponRecord.insert(); |
| | | } |
| | | } |
| | | sysCouponActivity.setSendUserNum(list.size()); |
| | | sysCouponActivity.updateById(); |
| | | }else{ |
| | | JSONArray userId = JSON.parseArray(sysCouponActivity.getSendUserId()); |
| | | for(int j=0;j<userId.size();j++){ |
| | | userCouponRecord.setUserId(userId.getJSONObject(j).getInteger("userId")); |
| | | for (int i=0;i<sysCouponActivity.getNumber();i++){ |
| | | userCouponRecord.insert(); |
| | | } |
| | | } |
| | | sysCouponActivity.setSendUserNum(userId.size()); |
| | | sysCouponActivity.updateById(); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer sysCouponActivityId) { |
| | | SysCouponActivity sysCouponActivity = new SysCouponActivity(); |
| | | sysCouponActivity.setId(sysCouponActivityId); |
| | | sysCouponActivity.setStatus(4); |
| | | sysCouponActivityService.updateById(sysCouponActivity); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(SysCouponActivity sysCouponActivity,Integer activityId) { |
| | | SysCouponRecord sysCouponRecord = couponRecordService.selectById(activityId); |
| | | sysCouponActivity.setCouponType(sysCouponRecord.getCouponType()); |
| | | sysCouponActivity.setCouponUseType(sysCouponRecord.getCouponUseType()); |
| | | sysCouponActivity.setMoney(sysCouponRecord.getMoney()); |
| | | sysCouponActivity.setFullMoney(sysCouponRecord.getFullMoney()); |
| | | sysCouponActivity.setInsertTime(new Date()); |
| | | sysCouponActivity.setCouponId(activityId); |
| | | sysCouponActivity.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | sysCouponActivity.setCompanyType(ShiroKit.getUser().getRoleType()); |
| | | sysCouponActivity.setStatus(sysCouponActivity.getCompanyType()==1?3:1); |
| | | sysCouponActivityService.updateById(sysCouponActivity); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{sysCouponActivityId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("sysCouponActivityId") Integer sysCouponActivityId) { |
| | | return sysCouponActivityService.selectById(sysCouponActivityId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.SysRedPacketRecord; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.SysCouponRecord; |
| | | import com.stylefeng.guns.modular.system.service.ISysCouponRecordService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-15 17:42:16 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/sysCouponRecord") |
| | | public class SysCouponRecordController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/sysCouponRecord/"; |
| | | |
| | | @Autowired |
| | | private ISysCouponRecordService sysCouponRecordService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "sysCouponRecord.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/sysCouponRecord_add") |
| | | public String sysCouponRecordAdd() { |
| | | return PREFIX + "sysCouponRecord_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/sysCouponRecord_update/{sysCouponRecordId}") |
| | | public String sysCouponRecordUpdate(@PathVariable Integer sysCouponRecordId, Model model) { |
| | | SysCouponRecord sysCouponRecord = sysCouponRecordService.selectById(sysCouponRecordId); |
| | | model.addAttribute("item",sysCouponRecord); |
| | | LogObjectHolder.me().set(sysCouponRecord); |
| | | return PREFIX + "sysCouponRecord_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,Integer couponUseType,Integer couponType) { |
| | | |
| | | Date startTimes = null; |
| | | Date endTimes = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | startTimes = DateUtil.getDate_str3(timeArray[0]+" 00:00:00"); |
| | | endTimes = DateUtil.getDate_str3(timeArray[1]+" 23:59:59"); |
| | | } |
| | | Page<SysCouponRecord> page = new PageFactory<SysCouponRecord>().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<SysCouponRecord>(); |
| | | if(SinataUtil.isNotEmpty(createTime)){ |
| | | wrapper.between("insertTime",startTimes,endTimes); |
| | | } |
| | | if(SinataUtil.isNotEmpty(couponUseType)){ |
| | | wrapper.eq("couponUseType",couponUseType); |
| | | } |
| | | if(SinataUtil.isNotEmpty(couponType)){ |
| | | wrapper.eq("couponType",couponType); |
| | | } |
| | | wrapper.eq("companyId",ShiroKit.getUser().getObjectId()); |
| | | wrapper.eq("companyType",ShiroKit.getUser().getRoleType()); |
| | | wrapper.orderBy("id",false); |
| | | return super.packForBT(sysCouponRecordService.selectPage(page,wrapper)); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(SysCouponRecord sysCouponRecord) { |
| | | sysCouponRecord.setInsertTime(new Date()); |
| | | sysCouponRecord.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | sysCouponRecord.setCompanyType(ShiroKit.getUser().getRoleType()); |
| | | sysCouponRecordService.insert(sysCouponRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer sysCouponRecordId) { |
| | | sysCouponRecordService.deleteById(sysCouponRecordId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(SysCouponRecord sysCouponRecord) { |
| | | sysCouponRecordService.updateById(sysCouponRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{sysCouponRecordId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("sysCouponRecordId") Integer sysCouponRecordId) { |
| | | return sysCouponRecordService.selectById(sysCouponRecordId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.SysRedPacketRecord; |
| | | import com.stylefeng.guns.modular.system.service.ISysRedPacketRecordService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-13 10:50:42 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/sysRedPacketRecord") |
| | | public class SysRedPacketRecordController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/sysRedPacketRecord/"; |
| | | |
| | | @Autowired |
| | | private ISysRedPacketRecordService sysRedPacketRecordService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "sysRedPacketRecord.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/sysRedPacketRecord_add") |
| | | public String sysRedPacketRecordAdd() { |
| | | return PREFIX + "sysRedPacketRecord_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/sysRedPacketRecord_update/{sysRedPacketRecordId}") |
| | | public String sysRedPacketRecordUpdate(@PathVariable Integer sysRedPacketRecordId, Model model) { |
| | | SysRedPacketRecord sysRedPacketRecord = sysRedPacketRecordService.selectById(sysRedPacketRecordId); |
| | | model.addAttribute("item",sysRedPacketRecord); |
| | | LogObjectHolder.me().set(sysRedPacketRecord); |
| | | return PREFIX + "sysRedPacketRecord_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime) { |
| | | Date startTimes = null; |
| | | Date endTimes = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | startTimes = DateUtil.getDate_str3(timeArray[0]+" 00:00:00"); |
| | | endTimes = DateUtil.getDate_str3(timeArray[1]+" 23:59:59"); |
| | | } |
| | | Page<SysRedPacketRecord> page = new PageFactory<SysRedPacketRecord>().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<SysRedPacketRecord>(); |
| | | if(SinataUtil.isNotEmpty(createTime)){ |
| | | wrapper.between("insertTime",startTimes,endTimes); |
| | | } |
| | | wrapper.eq("companyId",ShiroKit.getUser().getObjectId()); |
| | | wrapper.eq("companyType",ShiroKit.getUser().getRoleType()); |
| | | wrapper.orderBy("id",false); |
| | | return super.packForBT(sysRedPacketRecordService.selectPage(page,wrapper)); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(SysRedPacketRecord sysRedPacketRecord) { |
| | | sysRedPacketRecord.setInsertTime(new Date()); |
| | | sysRedPacketRecord.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | sysRedPacketRecord.setCompanyType(ShiroKit.getUser().getRoleType()); |
| | | sysRedPacketRecordService.insert(sysRedPacketRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer sysRedPacketRecordId) { |
| | | sysRedPacketRecordService.deleteById(sysRedPacketRecordId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(SysRedPacketRecord sysRedPacketRecord) { |
| | | sysRedPacketRecordService.updateById(sysRedPacketRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{sysRedPacketRecordId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("sysRedPacketRecordId") Integer sysRedPacketRecordId) { |
| | | return sysRedPacketRecordService.selectById(sysRedPacketRecordId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TRegion; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TAdvertisement; |
| | | import com.stylefeng.guns.modular.system.service.ITAdvertisementService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 广告设置控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-02 09:36:03 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tAdvertisement") |
| | | public class TAdvertisementController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tAdvertisement/"; |
| | | |
| | | @Autowired |
| | | private ITAdvertisementService tAdvertisementService; |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | |
| | | /** |
| | | * 跳转到广告设置首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tAdvertisement.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加广告设置 |
| | | */ |
| | | @RequestMapping("/tAdvertisement_add") |
| | | public String tAdvertisementAdd(Model model) { |
| | | List<TRegion> list = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "tAdvertisement_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改广告设置 |
| | | */ |
| | | @RequestMapping("/tAdvertisement_update/{tAdvertisementId}") |
| | | public String tAdvertisementUpdate(@PathVariable Integer tAdvertisementId, Model model) { |
| | | TAdvertisement tAdvertisement = tAdvertisementService.selectById(tAdvertisementId); |
| | | model.addAttribute("item",tAdvertisement); |
| | | LogObjectHolder.me().set(tAdvertisement); |
| | | |
| | | List<TRegion> list = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "tAdvertisement_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取广告设置列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String name, |
| | | Integer type) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tAdvertisementService.getAdvertisementList(page,beginTime,endTime,type,name)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增广告设置 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TAdvertisement tAdvertisement) { |
| | | tAdvertisement.setInsertTime(new Date()); |
| | | tAdvertisement.setInsertUser(ShiroKit.getUser().getId()); |
| | | tAdvertisementService.insert(tAdvertisement); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除广告设置 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tAdvertisementId) { |
| | | tAdvertisementService.deleteById(tAdvertisementId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 操作广告设置 |
| | | */ |
| | | @RequestMapping(value = "/opt") |
| | | @ResponseBody |
| | | public Object opt(@RequestParam Integer tAdvertisementId,@RequestParam Integer optType) { |
| | | TAdvertisement tAdvertisement = tAdvertisementService.selectById(tAdvertisementId); |
| | | if (SinataUtil.isNotEmpty(tAdvertisement)){ |
| | | if (1 == optType.intValue()){ //上线 |
| | | tAdvertisement.setState(1); |
| | | }else if (2 == optType.intValue()){ //下线 |
| | | tAdvertisement.setState(2); |
| | | } |
| | | tAdvertisement.setUpdateTime(new Date()); |
| | | tAdvertisement.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tAdvertisementService.updateById(tAdvertisement); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改广告设置 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TAdvertisement tAdvertisement) { |
| | | tAdvertisement.setUpdateTime(new Date()); |
| | | tAdvertisement.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tAdvertisementService.updateById(tAdvertisement); |
| | | return SUCCESS_TIP; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.SuccessTip; |
| | | import com.stylefeng.guns.core.common.constant.state.ManagerStatus; |
| | | import com.stylefeng.guns.core.exception.GunsException; |
| | | import com.stylefeng.guns.core.exception.ServiceExceptionEnum; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TAgentResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import com.stylefeng.guns.modular.system.enums.OrderStateEnum; |
| | | import com.stylefeng.guns.modular.system.enums.PayStatusEnum; |
| | | import com.stylefeng.guns.modular.system.enums.UserTypeEnum; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hdf.extractor.TC; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-20 09:18:08 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tAgent") |
| | | public class TAgentController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tAgent/"; |
| | | |
| | | @Autowired |
| | | private ITAgentService tAgentService; |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | @Autowired |
| | | private ITDriverWorkService tDriverWorkService; |
| | | @Autowired |
| | | private IUserService userService; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | model.addAttribute("userType", Objects.requireNonNull(ShiroKit.getUser()).getRoleType()); |
| | | return PREFIX + "tAgent.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tAgent_add") |
| | | public String tAgentAdd() { |
| | | return PREFIX + "tAgent_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tAgent_update/{tAgentId}") |
| | | public String tAgentUpdate(@PathVariable Integer tAgentId, Model model) { |
| | | TAgent tAgent = tAgentService.selectById(tAgentId); |
| | | model.addAttribute("item",tAgent); |
| | | LogObjectHolder.me().set(tAgent); |
| | | return PREFIX + "tAgent_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转详情页面 |
| | | */ |
| | | @RequestMapping("/agentDetail") |
| | | public String agentDetail(Integer agentId, Model model) { |
| | | tAgentService.detail(agentId,model); |
| | | return PREFIX + "tAgentDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转区域页面 |
| | | */ |
| | | @RequestMapping("/areaDetail") |
| | | public String areaDetail(String area,String areaId,Model model) { |
| | | String[] split1 = areaId.split("/"); |
| | | List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("province",tRegions); |
| | | List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | // 查询市 |
| | | List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", split1[0])); |
| | | model.addAttribute("cityList",tRegions1); |
| | | if(StringUtils.hasLength(area) && StringUtils.hasLength(areaId)){ |
| | | String[] split = area.split("/"); |
| | | model.addAttribute("provinceName",split[0]); |
| | | model.addAttribute("cityName",split[1]); |
| | | |
| | | model.addAttribute("provinceId",split1[0]); |
| | | model.addAttribute("cityId",split1[1]); |
| | | }else { |
| | | model.addAttribute("provinceName",""); |
| | | model.addAttribute("cityName",""); |
| | | |
| | | model.addAttribute("provinceId",""); |
| | | model.addAttribute("cityId",""); |
| | | } |
| | | return PREFIX + "tAgentArea.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String principal,String principalPhone,String createTime,Integer status) { |
| | | EntityWrapper<TAgent> wrapper = tAgentService.getAgentWrapper(principal,principalPhone,createTime,status); |
| | | List<TAgent> tAgents = tAgentService.selectList(wrapper); |
| | | // 代理商列表数据封装(导出共用) |
| | | return tAgentService.getAgentResp(tAgents); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tAgentService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW) |
| | | public Object add(TAgent tAgent) { |
| | | |
| | | String[] split1 = tAgent.getArea().split("/"); |
| | | |
| | | int count = tAgentService.selectCount(new EntityWrapper<TAgent>().eq("provinceName", split1[0]).eq("cityName",split1[1])); |
| | | if(count>0){ |
| | | return new SuccessTip(500,"该代理商已存在!"); |
| | | } |
| | | |
| | | int count1 = userService.selectCount(new EntityWrapper<User>().eq("account", tAgent.getAccount())); |
| | | if (count1 > 0){ |
| | | return new SuccessTip(500,"该账号已存在!"); |
| | | } |
| | | |
| | | tAgent.setPrincipal(tAgent.getPrincipal().replace(" ","")); |
| | | |
| | | |
| | | String[] split = tAgent.getAreaId().split("/"); |
| | | // 查询省市 |
| | | // 黑龙江省/大兴安岭地区 |
| | | // 702/852 |
| | | TRegion province = tRegionService.selectById(split[0]); |
| | | tAgent.setProvinceName(province.getName()); |
| | | tAgent.setProvinceCode(province.getCode()); |
| | | TRegion city = tRegionService.selectById(split[1]); |
| | | tAgent.setCityName(city.getName()); |
| | | tAgent.setCityCode(city.getCode()); |
| | | tAgentService.insert(tAgent); |
| | | |
| | | //添加User对象 |
| | | User user = new User(); |
| | | user.setAccount(tAgent.getAccount()); |
| | | user.setSalt(ShiroKit.getRandomSalt(5)); |
| | | user.setPassword(ShiroKit.md5(tAgent.getPassword(), user.getSalt())); |
| | | user.setStatus(ManagerStatus.OK.getCode()); |
| | | user.setRoleid("2"); |
| | | user.setDeptid(25); |
| | | user.setCreatetime(new Date()); |
| | | user.setRoleType(3); |
| | | user.setObjectId(tAgent.getId()); |
| | | user.setName(tAgent.getPrincipal()); |
| | | user.setSex(1); |
| | | userService.insert(user); |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tAgentId) { |
| | | tAgentService.deleteById(tAgentId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改用户状态 |
| | | */ |
| | | @RequestMapping(value = "/update-status") |
| | | @ResponseBody |
| | | public Object updateStatus(Integer id,Integer status) { |
| | | TAgent tAgent = tAgentService.selectById(id); |
| | | if(1 == status){ |
| | | tAgent.setStatus(2); |
| | | } |
| | | if(2 == status){ |
| | | tAgent.setStatus(1); |
| | | } |
| | | tAgentService.updateById(tAgent); |
| | | // 冻结下面所有的司机 |
| | | List<TDriver> list = tDriverService.selectList(new EntityWrapper<TDriver>() |
| | | .eq("agentId", id)); |
| | | for (TDriver tDriver : list) { |
| | | if(1 == status){ |
| | | tDriver.setStatus(2); |
| | | String value = redisUtil.getValue("DRIVER_" + tDriver.getPhone()); |
| | | redisUtil.remove(value); |
| | | redisUtil.remove("DRIVER_" + tDriver.getPhone()); |
| | | TDriverWork tDriverWork = tDriverWorkService.selectOne(new EntityWrapper<TDriverWork>() |
| | | .eq("driverId", tDriver.getId()) |
| | | .eq("status", 1) |
| | | .orderBy("workTime", false) |
| | | .last("LIMIT 1")); |
| | | if(Objects.nonNull(tDriverWork)){ |
| | | tDriverWork.setStatus(2); |
| | | tDriverWork.setOffWorkTime(new Date()); |
| | | tDriverWorkService.updateById(tDriverWork); |
| | | } |
| | | } |
| | | if(2 == status){ |
| | | tDriver.setStatus(1); |
| | | } |
| | | } |
| | | if(!CollectionUtils.isEmpty(list)){ |
| | | tDriverService.updateBatchById(list); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TAgent tAgent) { |
| | | tAgent.setPrincipal(tAgent.getPrincipal().replace(" ","")); |
| | | tAgentService.updateById(tAgent); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tAgentId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tAgentId") Integer tAgentId) { |
| | | return tAgentService.selectById(tAgentId); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "省市区查询",notes="省市区查询") |
| | | @RequestMapping(value = "/area") |
| | | @ResponseBody |
| | | public Object area() { |
| | | return tRegionService.getAreaList(); |
| | | } |
| | | |
| | | @ApiOperation(value = "省查询",notes="省查询") |
| | | @RequestMapping(value = "/areaProvince") |
| | | @ResponseBody |
| | | public Object areaProvince(Model model) { |
| | | return tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | } |
| | | |
| | | @ApiOperation(value = "市区查询",notes="市区查询") |
| | | @RequestMapping(value = "/areaCity") |
| | | @ResponseBody |
| | | public Object areaCity(Integer parentId) { |
| | | return tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id",parentId)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "导出代理商列表",notes="导出代理商列表") |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void export(String principal,String principalPhone,Integer status,String createTime, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "Agent"+time1+".xls"; |
| | | String[] title = new String[] {"时间","姓名","联系电话","代理区域","客服电话","订单数量", |
| | | "有效订单","已发放优惠券","已使用优惠券","累计优惠券金额","司机充值","司机数","状态"}; |
| | | EntityWrapper<TAgent> wrapper = tAgentService.getAgentWrapper(principal,principalPhone,createTime,status); |
| | | // 是否异常 |
| | | List<TAgent> list = tAgentService.selectList(wrapper); |
| | | |
| | | List<TAgentResp> agentResp = tAgentService.getAgentResp(list); |
| | | |
| | | String[][] values = new String[agentResp.size()][]; |
| | | for (int i = 0; i < agentResp.size(); i++) { |
| | | TAgentResp d = agentResp.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getCreateTime()); |
| | | values[i][1] = d.getPrincipal(); |
| | | values[i][2] = d.getPrincipalPhone(); |
| | | values[i][3] = d.getProvinceName()+d.getCityName(); |
| | | values[i][4] = StringUtils.hasLength(d.getServiceCalls())?d.getServiceCalls():""; |
| | | values[i][5] = String.valueOf(d.getOrderSum()); |
| | | values[i][6] = String.valueOf(d.getValidOrder()); |
| | | values[i][7] = String.valueOf(d.getIssuedCoupon()); |
| | | values[i][8] = String.valueOf(d.getUsedCoupon()); |
| | | values[i][9] = String.valueOf(d.getCouponPriceSum()); |
| | | values[i][10] = String.valueOf(d.getDriverRecharge() == null ? "0":d.getDriverRecharge()); |
| | | values[i][11] = String.valueOf(d.getDriverCount()); |
| | | Integer status1 = d.getStatus(); |
| | | if(1 == status1){ |
| | | values[i][12] = "正常"; |
| | | }else if(2 == status1){ |
| | | values[i][12] = "冻结"; |
| | | }else { |
| | | values[i][12] = "删除"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.modular.system.util.AddAdminLogUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TAgreement; |
| | | import com.stylefeng.guns.modular.system.service.ITAgreementService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 用户端协议管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-01 17:42:20 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tAgreement") |
| | | public class TAgreementController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tAgreement/"; |
| | | |
| | | @Autowired |
| | | private ITAgreementService tAgreementService; |
| | | |
| | | /** |
| | | * 跳转到用户端协议管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | //注册协议 |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType", 1).eq("type", 6)); |
| | | //用户协议 |
| | | TAgreement two = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType", 1).eq("type", 2)); |
| | | //隐私协议 |
| | | TAgreement three = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType", 1).eq("type", 1)); |
| | | model.addAttribute("one",one); |
| | | model.addAttribute("two",two); |
| | | model.addAttribute("three",three); |
| | | return PREFIX + "tAgreement.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到司机端协议管理首页 |
| | | */ |
| | | @RequestMapping("/driver") |
| | | public String driverIndex(Model model) { |
| | | //注册协议 |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType", 2).eq("type", 6)); |
| | | //用户协议 |
| | | TAgreement two = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType", 2).eq("type", 2)); |
| | | //隐私协议 |
| | | TAgreement three = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("useType", 2).eq("type", 1)); |
| | | model.addAttribute("one",one); |
| | | model.addAttribute("two",two); |
| | | model.addAttribute("three",three); |
| | | return PREFIX + "tAgreementDriver.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到取消订单说明协议管理首页 |
| | | */ |
| | | @RequestMapping("/order") |
| | | public String orderIndex(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 7)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "tAgreementOrder.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到用户指南设置协议管理首页 |
| | | */ |
| | | @RequestMapping("/user") |
| | | public String userIndex(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 3)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "tAgreementUser.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到法律法规设置协议管理首页 |
| | | */ |
| | | @RequestMapping("/law") |
| | | public String lawIndex(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 4)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "tAgreementLaw.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到关于我们设置协议管理首页 |
| | | */ |
| | | @RequestMapping("/me") |
| | | public String meIndex(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 5)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "tAgreementMe.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到充值领券规则设置协议管理首页 |
| | | */ |
| | | @RequestMapping("/recharge") |
| | | public String rechargeIndex(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 8)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "tAgreementRecharge.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到司机注册协议设置管理首页 |
| | | */ |
| | | @RequestMapping("/driverRegister") |
| | | public String driverRegister(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 9)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "driverRegister.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到改派说明设置管理首页 |
| | | */ |
| | | @RequestMapping("/instructions") |
| | | public String instructions(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 10)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "instructions.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到跨城出行乘车须知 |
| | | */ |
| | | @RequestMapping("/corssHtml") |
| | | public String corssHtml(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 11)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "corssHtml.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到常见问题 |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @RequestMapping("/showCommonProblem") |
| | | public String showCommonProblem(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 12)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "commonProblem.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到计价规则 |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @RequestMapping("/showPricingRules") |
| | | public String showPricingRules(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 13)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "pricingRules.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到包车协议 |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @RequestMapping("/showCharterCar") |
| | | public String showCharterCar(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 14)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "tAgreementCharterCar.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到小件物流协议 |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @RequestMapping("/showSmallPieceLogistics") |
| | | public String showSmallPieceLogistics(Model model) { |
| | | TAgreement one = tAgreementService.selectOne(new EntityWrapper<TAgreement>().eq("type", 15)); |
| | | model.addAttribute("one",one); |
| | | return PREFIX + "tAgreementSmallPieceLogistics.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改协议 |
| | | */ |
| | | @RequestMapping(value = "/updateAppParam") |
| | | @ResponseBody |
| | | public Object updateAppParam(@RequestParam Integer id,@RequestParam String context) { |
| | | TAgreement agreement = tAgreementService.selectById(id); |
| | | agreement.setContent(context); |
| | | agreement.setUpdateTime(new Date()); |
| | | agreement.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tAgreementService.updateById(agreement); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加用户端协议管理 |
| | | */ |
| | | @RequestMapping("/tAgreement_add") |
| | | public String tAgreementAdd() { |
| | | return PREFIX + "tAgreement_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改用户端协议管理 |
| | | */ |
| | | @RequestMapping("/tAgreement_update/{tAgreementId}") |
| | | public String tAgreementUpdate(@PathVariable Integer tAgreementId, Model model) { |
| | | TAgreement tAgreement = tAgreementService.selectById(tAgreementId); |
| | | model.addAttribute("item",tAgreement); |
| | | LogObjectHolder.me().set(tAgreement); |
| | | return PREFIX + "tAgreement_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取用户端协议管理列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tAgreementService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增用户端协议管理 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TAgreement tAgreement) { |
| | | tAgreementService.insert(tAgreement); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除用户端协议管理 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tAgreementId) { |
| | | tAgreementService.deleteById(tAgreementId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改用户端协议管理 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TAgreement tAgreement) { |
| | | tAgreementService.updateById(tAgreement); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 用户端协议管理详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tAgreementId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tAgreementId") Integer tAgreementId) { |
| | | return tAgreementService.selectById(tAgreementId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TAppUserResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import com.stylefeng.guns.modular.system.enums.CouponStatusEnum; |
| | | import com.stylefeng.guns.modular.system.enums.OrderStateEnum; |
| | | import com.stylefeng.guns.modular.system.exports.TAppUserExceptionExport; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.ITAppUserService; |
| | | import com.stylefeng.guns.modular.system.service.ITCouponService; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderService; |
| | | import com.stylefeng.guns.modular.system.service.ITUserToCouponService; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-14 08:55:42 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tAppUser") |
| | | public class TAppUserController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tAppUser/"; |
| | | |
| | | @Autowired |
| | | private ITAppUserService tAppUserService; |
| | | @Autowired |
| | | private ITCouponService tCouponService; |
| | | @Autowired |
| | | private ITOrderService tOrderService; |
| | | @Autowired |
| | | private ITUserToCouponService tUserToCouponService; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tAppUser.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tAppUser_add") |
| | | public String tAppUserAdd() { |
| | | return PREFIX + "tAppUser_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 赠送优惠券查询页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/sendCoupon") |
| | | public String sendCoupon( String userIds,Model model) { |
| | | model.addAttribute("userIds",userIds); |
| | | return PREFIX + "tCoupon.html"; |
| | | } |
| | | |
| | | /** |
| | | * 赠送优惠券查询页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/sendCouponException") |
| | | public String sendCouponException( String userIds,Model model) { |
| | | model.addAttribute("userIds",userIds); |
| | | return PREFIX + "tCouponException.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转异常用户页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tAppUser_exception") |
| | | public String tAppUserException(Integer isException,Model model) { |
| | | isException = 2; |
| | | model.addAttribute("isException",isException); |
| | | return PREFIX + "tAppUserException.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转冻结页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tAppUser_start_and_stop") |
| | | public String tAppUserStartAndStop( Integer id, |
| | | Model model) { |
| | | TAppUser tAppUser = tAppUserService.selectById(id); |
| | | |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("status",tAppUser.getStatus()); |
| | | return PREFIX + "tAppUserStartAndStop.html"; |
| | | } |
| | | |
| | | /** |
| | | * 异常页面跳转冻结页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tAppUserException_start_and_stop") |
| | | public String tAppUserExceptionStartAndStop( Integer id, |
| | | Model model) { |
| | | TAppUser tAppUser = tAppUserService.selectById(id); |
| | | |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("status",tAppUser.getStatus()); |
| | | return PREFIX + "tAppUserStartAndStopException.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tAppUser_update/{tAppUserId}") |
| | | public String tAppUserUpdate(@PathVariable Integer tAppUserId, Model model) { |
| | | TAppUser tAppUser = tAppUserService.selectById(tAppUserId); |
| | | model.addAttribute("item",tAppUser); |
| | | LogObjectHolder.me().set(tAppUser); |
| | | return PREFIX + "tAppUser_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转详情页面 |
| | | */ |
| | | @RequestMapping("/userDetail") |
| | | public String userDetail(Integer tAppUserId, Model model) { |
| | | tAppUserService.detail(tAppUserId,model); |
| | | return PREFIX + "tAppUserDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 异常页面跳转详情页面 |
| | | */ |
| | | @RequestMapping("/userDetailException") |
| | | public String userDetailException(Integer tAppUserId, Model model) { |
| | | tAppUserService.detail(tAppUserId,model); |
| | | return PREFIX + "tAppUserDetailException.html"; |
| | | } |
| | | |
| | | @ApiOperation(value = "异常用户页面列表") |
| | | @RequestMapping("/exceptionUserList") |
| | | @ResponseBody |
| | | public Object exceptionUserList(String createTime, |
| | | String nickname, |
| | | String phone, |
| | | Integer id, |
| | | Integer status) { |
| | | |
| | | EntityWrapper<TAppUser> wrapper = tAppUserService.getUserListWrapper(createTime,nickname,phone,id,status); |
| | | // 是否异常 |
| | | wrapper.eq("is_exception",2); |
| | | wrapper.orderBy("createTime",false); |
| | | List<TAppUser> tAppUsers = tAppUserService.selectList(wrapper); |
| | | |
| | | return tAppUserService.getTAppUserResp(tAppUsers); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "用户页面列表") |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object getList(String createTime, |
| | | String nickname, |
| | | String phone, |
| | | Integer id, |
| | | Integer status) { |
| | | EntityWrapper<TAppUser> wrapper = tAppUserService.getUserListWrapper(createTime,nickname,phone,id,status); |
| | | wrapper.ne("is_exception",2); |
| | | wrapper.orderBy("createTime",false); |
| | | return tAppUserService.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tAppUserService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TAppUser tAppUser) { |
| | | tAppUserService.insert(tAppUser); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tAppUserId) { |
| | | tAppUserService.deleteById(tAppUserId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改用户状态 |
| | | */ |
| | | @RequestMapping(value = "/update-status") |
| | | @ResponseBody |
| | | public Object updateStatus(Integer id, |
| | | Integer status, |
| | | String remark) { |
| | | TAppUser tAppUser = tAppUserService.selectById(id); |
| | | if(1 == status){ |
| | | tAppUser.setStatus(2); |
| | | String value = redisUtil.getValue("USER_" + tAppUser.getPhone()); |
| | | redisUtil.remove(value); |
| | | redisUtil.remove("USER_" + tAppUser.getPhone()); |
| | | } |
| | | if(2 == status){ |
| | | tAppUser.setStatus(1); |
| | | } |
| | | tAppUser.setRemark(remark); |
| | | tAppUserService.updateById(tAppUser); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TAppUser tAppUser) { |
| | | tAppUserService.updateById(tAppUser); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tAppUserId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tAppUserId") Integer tAppUserId) { |
| | | return tAppUserService.selectById(tAppUserId); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出用户列表",notes="导出用户列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | @RequestMapping(value = "/export-userInfo") |
| | | @ResponseBody |
| | | public void exportUserInfo(String createTime, |
| | | String nickname, |
| | | String phone, |
| | | Integer id, |
| | | Integer status, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "UserInfo"+time1+".xls"; |
| | | String[] title = new String[] {"用户ID","用户昵称","手机号","性别","头像","微信openid", |
| | | "微信unionid","紧急联系人","紧急联系电话","账户余额","用户标签id","状态","添加时间"}; |
| | | EntityWrapper<TAppUser> wrapper = tAppUserService.getUserListWrapper(createTime,nickname,phone,id,status); |
| | | wrapper.ne("is_exception",2); |
| | | // 是否异常 |
| | | List<TAppUser> list = tAppUserService.selectList(wrapper); |
| | | |
| | | String[][] values = new String[list.size()][]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | TAppUser d = list.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = String.valueOf(d.getId()); |
| | | values[i][1] = d.getNickname(); |
| | | values[i][2] = d.getPhone(); |
| | | Integer sex = d.getSex(); |
| | | if(Objects.nonNull(sex)){ |
| | | if(1 == sex){ |
| | | values[i][3] = "男"; |
| | | }else if(2 == sex){ |
| | | values[i][3] = "女"; |
| | | } |
| | | }else { |
| | | values[i][3] = "未知"; |
| | | } |
| | | values[i][4] = d.getAvatar(); |
| | | values[i][5] = d.getOpenid(); |
| | | values[i][6] = d.getUnionid(); |
| | | values[i][7] = d.getEmergencyContact(); |
| | | values[i][8] = d.getEmergencyPhone(); |
| | | values[i][9] = String.valueOf(d.getAccountBalance()); |
| | | values[i][10] = String.valueOf(Objects.nonNull(d.getUserTagId())?d.getUserTagId():""); |
| | | Integer status1 = d.getStatus(); |
| | | if(1 == status1){ |
| | | values[i][11] = "正常"; |
| | | }else if(2 == status1){ |
| | | values[i][11] = "冻结"; |
| | | }else { |
| | | values[i][11] = "删除"; |
| | | } |
| | | values[i][12] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getCreateTime()); |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "导出异常用户列表",notes="导出异常用户列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | @RequestMapping(value = "/export-exceptionUserInfo") |
| | | @ResponseBody |
| | | public void exportExceptionUserInfo(String createTime, |
| | | String nickname, |
| | | String phone, |
| | | Integer id, |
| | | Integer status, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "ExceptionUserInfo"+time1+".xls"; |
| | | String[] title = new String[] {"注册时间","用户ID","用户昵称","手机号","剩余优惠券","优惠券总数", |
| | | "消费次数","历史消费","最后一次消费时间","状态"}; |
| | | EntityWrapper<TAppUser> wrapper = tAppUserService.getUserListWrapper(createTime,nickname,phone,id,status); |
| | | // 是否异常 |
| | | wrapper.eq("is_exception",2); |
| | | List<TAppUser> list = tAppUserService.selectList(wrapper); |
| | | |
| | | /*List<TAppUserExceptionExport> exportList = new ArrayList<>(list.size()); |
| | | for (TAppUser tAppUser : list) { |
| | | TAppUserExceptionExport export = new TAppUserExceptionExport(); |
| | | BeanUtils.copyProperties(tAppUser,export); |
| | | // 查询优惠券 |
| | | List<TCoupon> tCoupons = tCouponService.selectList(new EntityWrapper<TCoupon>().eq("user_id", tAppUser.getId())); |
| | | // 优惠券总数 |
| | | export.setCouponsSum(tCoupons.size()); |
| | | tCoupons = tCoupons.stream().filter(coupon->coupon.getCouponStatus().equals(CouponStatusEnum.NOT_USED.getCode())).collect(Collectors.toList()); |
| | | // 剩余优惠券 |
| | | export.setRemainingCoupons(tCoupons.size()); |
| | | // 查询消费记录 |
| | | exportList.add(export); |
| | | }*/ |
| | | List<TAppUserResp> tAppUserRespList = tAppUserService.getTAppUserResp(list); |
| | | List<TAppUserExceptionExport> exportList = new ArrayList<>(list.size()); |
| | | for (TAppUserResp tAppUserResp : tAppUserRespList) { |
| | | TAppUserExceptionExport export = new TAppUserExceptionExport(); |
| | | BeanUtils.copyProperties(tAppUserResp,export); |
| | | // 优惠券总数 |
| | | export.setCouponsSum(tAppUserResp.getCouponSum()); |
| | | // 剩余优惠券 |
| | | export.setRemainingCoupons(tAppUserResp.getNotUsedCount()); |
| | | export.setConsumptionTimes(tAppUserResp.getConsumeSum()); |
| | | export.setHistoricalConsumption(tAppUserResp.getConsumePrice()); |
| | | export.setLastConsumptionTime(tAppUserResp.getLastConsumptionTime()); |
| | | exportList.add(export); |
| | | } |
| | | String[][] values = new String[list.size()][]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | TAppUserExceptionExport d = exportList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getCreateTime()); |
| | | values[i][1] = d.getId().toString(); |
| | | values[i][2] = d.getNickname(); |
| | | values[i][3] = d.getPhone(); |
| | | values[i][4] = String.valueOf(d.getRemainingCoupons()); |
| | | values[i][5] = String.valueOf(d.getCouponsSum()); |
| | | values[i][6] = String.valueOf(Objects.nonNull(d.getConsumptionTimes())?d.getConsumptionTimes():0); |
| | | values[i][7] = String.valueOf(Objects.nonNull(d.getHistoricalConsumption())?d.getHistoricalConsumption():0); |
| | | if(Objects.nonNull(d.getLastConsumptionTime())){ |
| | | values[i][8] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getLastConsumptionTime()); |
| | | }else { |
| | | values[i][8] = ""; |
| | | } |
| | | Integer status1 = d.getStatus(); |
| | | if(1 == status1){ |
| | | values[i][9] = "正常"; |
| | | }else if(2 == status1){ |
| | | values[i][9] = "冻结"; |
| | | }else { |
| | | values[i][9] = "删除"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import com.stylefeng.guns.modular.system.enums.TBillStateEnum; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderService; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TBill; |
| | | import com.stylefeng.guns.modular.system.service.ITBillService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-14 15:15:19 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tBill") |
| | | public class TBillController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tBill/"; |
| | | |
| | | @Autowired |
| | | private ITBillService tBillService; |
| | | @Autowired |
| | | private ITOrderService tOrderService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tBill.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tBill_add") |
| | | public String tBillAdd() { |
| | | return PREFIX + "tBill_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tBill_update/{tBillId}") |
| | | public String tBillUpdate(@PathVariable Integer tBillId, Model model) { |
| | | TBill tBill = tBillService.selectById(tBillId); |
| | | model.addAttribute("item",tBill); |
| | | LogObjectHolder.me().set(tBill); |
| | | return PREFIX + "tBill_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,String addresseePhone,Integer state,Integer billType,Integer billHeaderType) { |
| | | // EntityWrapper<TBill> wrapper = tBillService.getPageListWrapper(createTime,addresseePhone,state,billType,billHeaderType); |
| | | // return tBillService.selectList(wrapper); |
| | | return tBillService.getPageList(createTime,addresseePhone,state,billType,billHeaderType); |
| | | } |
| | | |
| | | /** |
| | | * 确认通过发票 |
| | | */ |
| | | @RequestMapping(value = "/confirm") |
| | | @ResponseBody |
| | | public Object confirm(Integer tBillId) { |
| | | TBill tBill = tBillService.selectById(tBillId); |
| | | tBill.setState(TBillStateEnum.FINISH_BILL.getCode()); |
| | | tBillService.updateById(tBill); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 开通发票失败 |
| | | */ |
| | | @RequestMapping(value = "/cancel") |
| | | @ResponseBody |
| | | public Object cancel(Integer tBillId) { |
| | | TBill tBill = tBillService.selectById(tBillId); |
| | | tBill.setState(TBillStateEnum.FAIL_BILL.getCode()); |
| | | tBillService.updateById(tBill); |
| | | TOrder tOrder = tOrderService.selectById(tBill.getOrderId()); |
| | | if(Objects.nonNull(tOrder)){ |
| | | tOrder.setIsInvoice(0); |
| | | tOrderService.updateById(tOrder); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tBillService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TBill tBill) { |
| | | tBillService.insert(tBill); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tBillId) { |
| | | tBillService.deleteById(tBillId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TBill tBill) { |
| | | tBillService.updateById(tBill); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tBillId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tBillId") Integer tBillId) { |
| | | return tBillService.selectById(tBillId); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出发票列表",notes="导出发票列表") |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void export(String createTime,String addresseePhone,Integer state,Integer billType,Integer billHeaderType, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "BillInfo"+time1+".xls"; |
| | | String[] title = new String[] {"申请时间","发票类型","抬头类型","发票抬头","公司税号","发票内容", |
| | | "发票金额","收件人姓名","收件人电话","收件人邮箱","开票状态"}; |
| | | EntityWrapper<TBill> wrapper = tBillService.getPageListWrapper(createTime,addresseePhone,state,billType,billHeaderType); |
| | | List<TBill> tBills = tBillService.selectList(wrapper); |
| | | String[][] values = new String[tBills.size()][]; |
| | | for (int i = 0; i < tBills.size(); i++) { |
| | | TBill d = tBills.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); |
| | | Integer billType1 = d.getBillType(); |
| | | if(1 == billType1){ |
| | | values[i][1] = "电子发票"; |
| | | } |
| | | Integer billHeaderType1 = d.getBillHeaderType(); |
| | | if(1 == billHeaderType1){ |
| | | values[i][2] = "公司"; |
| | | } else if (2 == billHeaderType1) { |
| | | values[i][2] = "个人"; |
| | | } |
| | | values[i][3] = d.getCompanyName(); |
| | | values[i][4] = d.getCompanyTaxNumber(); |
| | | values[i][5] = d.getBillContent(); |
| | | values[i][6] = String.valueOf(Objects.nonNull(d.getBillAmount())?d.getBillAmount(): BigDecimal.ZERO); |
| | | values[i][7] = d.getAddresseeName(); |
| | | values[i][8] = d.getAddresseePhone(); |
| | | values[i][9] = d.getAddresseeEmail(); |
| | | Integer state1 = d.getState(); |
| | | if(1 == state1){ |
| | | values[i][10] = "待开票"; |
| | | } else if (2 == state1) { |
| | | values[i][10] = "已开票"; |
| | | } else if (3 == state1) { |
| | | values[i][10] = "开票失败"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.SuccessTip; |
| | | import com.stylefeng.guns.core.common.constant.state.ManagerStatus; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TBranchOfficeResp; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverResp; |
| | | import com.stylefeng.guns.modular.system.enums.StatusEnum; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-21 11:17:18 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tBranchOffice") |
| | | public class TBranchOfficeController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tBranchOffice/"; |
| | | |
| | | @Autowired |
| | | private ITBranchOfficeService tBranchOfficeService; |
| | | @Autowired |
| | | private ITSystemConfigService tSystemConfigService; |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | @Autowired |
| | | private ITDriverWorkService tDriverWorkService; |
| | | @Autowired |
| | | private IUserService userService; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | model.addAttribute("userType", Objects.requireNonNull(ShiroKit.getUser()).getRoleType()); |
| | | return PREFIX + "tBranchOffice.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tBranchOffice_add") |
| | | public String tBranchOfficeAdd() { |
| | | return PREFIX + "tBranchOffice_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tBranchOffice_update/{tBranchOfficeId}") |
| | | public String tBranchOfficeUpdate(@PathVariable Integer tBranchOfficeId, Model model) { |
| | | |
| | | TBranchOffice tBranchOffice = tBranchOfficeService.selectById(tBranchOfficeId); |
| | | TBranchOfficeResp tBranchOfficeResp = new TBranchOfficeResp(); |
| | | BeanUtils.copyProperties(tBranchOffice,tBranchOfficeResp); |
| | | |
| | | // 查询区域 |
| | | TRegion city = tRegionService.selectOne(new EntityWrapper<TRegion>().eq("code", tBranchOffice.getCityCode()) |
| | | .last("LIMIT 1")); |
| | | TRegion district = tRegionService.selectOne(new EntityWrapper<TRegion>().eq("code", tBranchOffice.getDistrictCode()) |
| | | .last("LIMIT 1")); |
| | | |
| | | if(StringUtils.hasLength(tBranchOffice.getDistrictName())){ |
| | | tBranchOfficeResp.setArea(tBranchOffice.getProvinceName()+"/"+tBranchOffice.getCityName()+"/"+tBranchOffice.getDistrictName()); |
| | | }else { |
| | | tBranchOfficeResp.setArea(tBranchOffice.getProvinceName()+"/"+tBranchOffice.getCityName()); |
| | | } |
| | | |
| | | if(Objects.nonNull(city)){ |
| | | if(Objects.nonNull(district)){ |
| | | tBranchOfficeResp.setAreaId(city.getParentId()+"/"+city.getId()+"/"+district.getId()); |
| | | }else { |
| | | tBranchOfficeResp.setAreaId(city.getParentId()+"/"+city.getId()); |
| | | } |
| | | } |
| | | |
| | | model.addAttribute("item",tBranchOfficeResp); |
| | | LogObjectHolder.me().set(tBranchOffice); |
| | | return PREFIX + "tBranchOffice_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到详情 |
| | | */ |
| | | @RequestMapping("/tBranchOfficeDetail") |
| | | public String tBranchOfficeDetail(Integer tBranchOfficeId, Model model) { |
| | | tBranchOfficeService.tBranchOfficeDetail(tBranchOfficeId,model); |
| | | TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 3)); |
| | | JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); |
| | | model.addAttribute("num2",jsonObject.getInteger("num2")); |
| | | model.addAttribute("num3",jsonObject.getInteger("num3")); |
| | | return PREFIX + "tBranchOfficeDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转区域页面新增 |
| | | */ |
| | | @RequestMapping("/areaPageAdd") |
| | | public String areaPageAdd(String area,String areaId,Model model) { |
| | | String[] split1 = areaId.split("/"); |
| | | List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("provinceList",tRegions); |
| | | List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | // 查询市 |
| | | List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", split1[0])); |
| | | model.addAttribute("cityList",tRegions1); |
| | | |
| | | // 查询区 |
| | | List<Integer> cityIds = tRegions1.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | List<TRegion> tRegions2 = tRegionService.selectList(new EntityWrapper<TRegion>().in("parent_id", cityIds)); |
| | | model.addAttribute("districtList",tRegions2); |
| | | |
| | | if(StringUtils.hasLength(area) && StringUtils.hasLength(areaId)){ |
| | | String[] split = area.split("/"); |
| | | model.addAttribute("provinceName",split[0]); |
| | | model.addAttribute("cityName",split[1]); |
| | | if(split.length>2){ |
| | | model.addAttribute("districtName",split[2]); |
| | | }else { |
| | | model.addAttribute("districtName",""); |
| | | } |
| | | |
| | | model.addAttribute("provinceId",split1[0]); |
| | | model.addAttribute("cityId",split1[1]); |
| | | if(split1.length>2) { |
| | | model.addAttribute("districtId", split1[2]); |
| | | }else { |
| | | model.addAttribute("districtId", ""); |
| | | } |
| | | }else { |
| | | model.addAttribute("provinceName",""); |
| | | model.addAttribute("cityName","split[1]"); |
| | | model.addAttribute("districtName",""); |
| | | |
| | | model.addAttribute("provinceId",""); |
| | | model.addAttribute("cityId","split1[1]"); |
| | | model.addAttribute("districtId", ""); |
| | | } |
| | | return PREFIX + "tBranchOfficeAreaAdd.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转区域页面编辑 |
| | | */ |
| | | @RequestMapping("/areaPageUpdate") |
| | | public String areaPageUpdate(String area,String areaId,Model model) { |
| | | |
| | | String[] split = area.split("/"); |
| | | model.addAttribute("provinceName",split[0]); |
| | | model.addAttribute("cityName",split[1]); |
| | | if(split.length>2){ |
| | | model.addAttribute("districtName",split[2]); |
| | | }else { |
| | | model.addAttribute("districtName",""); |
| | | } |
| | | |
| | | String[] split1 = areaId.split("/"); |
| | | String provinceId = split1[0]; |
| | | model.addAttribute("provinceId",split1[0]); |
| | | model.addAttribute("cityId",split1[1]); |
| | | if(split1.length>2) { |
| | | model.addAttribute("districtId", split1[2]); |
| | | }else { |
| | | model.addAttribute("districtId", ""); |
| | | } |
| | | |
| | | List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("provinceList",tRegions); |
| | | // List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | // 查询市 |
| | | List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", provinceId)); |
| | | model.addAttribute("cityList",tRegions1); |
| | | |
| | | // 查询区 |
| | | List<Integer> cityIds = tRegions1.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | List<TRegion> tRegions2 = tRegionService.selectList(new EntityWrapper<TRegion>().in("parent_id", cityIds)); |
| | | model.addAttribute("districtList",tRegions2); |
| | | |
| | | return PREFIX + "tBranchOfficeAreaUpdate.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String branchOfficeName,String principal,String principalPhone,Integer operatingBusiness ,Integer status) { |
| | | List<TBranchOfficeResp> tBranchOfficeRespList = tBranchOfficeService.getPageList(branchOfficeName,principal,principalPhone,operatingBusiness,status); |
| | | for (TBranchOfficeResp tBranchOfficeResp : tBranchOfficeRespList) { |
| | | tBranchOfficeResp.setUserType(Objects.requireNonNull(ShiroKit.getUser()).getRoleType()); |
| | | } |
| | | // 分公司查询优惠券,订单,司机等信息 |
| | | tBranchOfficeService.queryOtherInfo(tBranchOfficeRespList); |
| | | return tBranchOfficeRespList; |
| | | } |
| | | |
| | | @ApiOperation(value = "市区查询",notes="市区查询") |
| | | @RequestMapping(value = "/areaCity") |
| | | @ResponseBody |
| | | public Object areaCity(Integer parentId,Model model) { |
| | | List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", parentId)); |
| | | /*if(CollectionUtils.isEmpty(tRegions) && StringUtils.hasLength(parentName)){ |
| | | TRegion parent = tRegionService.selectOne(new EntityWrapper<TRegion>().eq("name", parentName)); |
| | | tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", parentId)); |
| | | }*/ |
| | | model.addAttribute("list",tRegions); |
| | | return tRegions; |
| | | } |
| | | |
| | | /** |
| | | * 启用分公司 |
| | | */ |
| | | @RequestMapping(value = "/start") |
| | | @ResponseBody |
| | | public Object start(Integer id) { |
| | | TBranchOffice tBranchOffice = tBranchOfficeService.selectById(id); |
| | | tBranchOffice.setStatus(StatusEnum.NORMAL.getCode()); |
| | | tBranchOfficeService.updateById(tBranchOffice); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 冻结分公司 |
| | | */ |
| | | @RequestMapping(value = "/stop") |
| | | @ResponseBody |
| | | public Object updateStatus(Integer id) { |
| | | TBranchOffice tBranchOffice = tBranchOfficeService.selectById(id); |
| | | tBranchOffice.setStatus(StatusEnum.FREEZE.getCode()); |
| | | tBranchOfficeService.updateById(tBranchOffice); |
| | | List<TDriver> list = tDriverService.selectList(new EntityWrapper<TDriver>() |
| | | .eq("branchOfficeId", tBranchOffice.getId())); |
| | | for (TDriver tDriver : list) { |
| | | String value = redisUtil.getValue("DRIVER_" + tDriver.getPhone()); |
| | | redisUtil.remove(value); |
| | | redisUtil.remove("DRIVER_" + tDriver.getPhone()); |
| | | TDriverWork tDriverWork = tDriverWorkService.selectOne(new EntityWrapper<TDriverWork>() |
| | | .eq("driverId", tDriver.getId()) |
| | | .eq("status", 1) |
| | | .orderBy("workTime", false) |
| | | .last("LIMIT 1")); |
| | | if(Objects.nonNull(tDriverWork)){ |
| | | tDriverWork.setStatus(2); |
| | | tDriverWork.setOffWorkTime(new Date()); |
| | | tDriverWorkService.updateById(tDriverWork); |
| | | } |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tBranchOfficeService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW) |
| | | public Object add(TBranchOffice tBranchOffice) { |
| | | int count = tBranchOfficeService.selectCount(new EntityWrapper<TBranchOffice>().eq("branchOfficeName", tBranchOffice.getBranchOfficeName())); |
| | | if(count>0){ |
| | | return new SuccessTip(500,"该分公司名称已存在!"); |
| | | } |
| | | int count1 = userService.selectCount(new EntityWrapper<User>().eq("account", tBranchOffice.getAccount())); |
| | | if (count1 > 0){ |
| | | return new SuccessTip(500,"该账号已存在!"); |
| | | } |
| | | |
| | | Object o = tBranchOfficeService.addOrUpdate(tBranchOffice); |
| | | if(Objects.nonNull(o)){ |
| | | return o; |
| | | } |
| | | tBranchOffice.setPrincipal(tBranchOffice.getPrincipal().replace(" ","")); |
| | | tBranchOffice.setStatus(StatusEnum.NORMAL.getCode()); |
| | | |
| | | tBranchOfficeService.insert(tBranchOffice); |
| | | |
| | | //添加User对象 |
| | | User user = new User(); |
| | | user.setAccount(tBranchOffice.getAccount()); |
| | | user.setSalt(ShiroKit.getRandomSalt(5)); |
| | | user.setPassword(ShiroKit.md5(tBranchOffice.getPassword(), user.getSalt())); |
| | | user.setStatus(ManagerStatus.OK.getCode()); |
| | | user.setRoleid("3"); |
| | | user.setDeptid(25); |
| | | user.setCreatetime(new Date()); |
| | | user.setRoleType(2); |
| | | user.setObjectId(tBranchOffice.getId()); |
| | | user.setName(tBranchOffice.getPrincipal()); |
| | | user.setSex(1); |
| | | userService.insert(user); |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tBranchOfficeId) { |
| | | TBranchOffice tBranchOffice = tBranchOfficeService.selectById(tBranchOfficeId); |
| | | tBranchOffice.setStatus(StatusEnum.DELETE.getCode()); |
| | | tBranchOfficeService.updateById(tBranchOffice); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class,propagation = Propagation.REQUIRES_NEW) |
| | | public Object update(TBranchOffice tBranchOffice) { |
| | | TBranchOffice branchOffice = tBranchOfficeService.selectById(tBranchOffice.getId()); |
| | | User user = userService.selectOne(new EntityWrapper<User>() |
| | | .eq("role_type", 2) |
| | | .eq("object_id", branchOffice.getId()) |
| | | .last("LIMIT 1")); |
| | | //判断账号是否已存在 |
| | | if (SinataUtil.isNotEmpty(tBranchOffice.getAccount()) && SinataUtil.isNotEmpty(tBranchOffice.getPassword())){ |
| | | if(Objects.isNull(user)){ |
| | | //添加User对象 |
| | | user.setAccount(tBranchOffice.getAccount()); |
| | | user.setSalt(ShiroKit.getRandomSalt(5)); |
| | | user.setPassword(ShiroKit.md5(tBranchOffice.getPassword(), user.getSalt())); |
| | | user.setStatus(ManagerStatus.OK.getCode()); |
| | | user.setRoleid("3"); |
| | | user.setDeptid(25); |
| | | user.setCreatetime(new Date()); |
| | | user.setRoleType(2); |
| | | user.setObjectId(tBranchOffice.getId()); |
| | | user.setName(tBranchOffice.getPrincipal()); |
| | | user.setSex(1); |
| | | userService.insert(user); |
| | | }else { |
| | | if (!tBranchOffice.getAccount().equals(user.getAccount())){ |
| | | //判断账号是否已存在 |
| | | int count = userService.selectCount(new EntityWrapper<User>().eq("account", tBranchOffice.getAccount())); |
| | | if (count > 0){ |
| | | return new SuccessTip(500,"该账号已存在!"); |
| | | } |
| | | } |
| | | user.setAccount(tBranchOffice.getAccount()); |
| | | user.setPassword(ShiroKit.md5(user.getPassword(), user.getSalt())); |
| | | userService.updateById(user); |
| | | } |
| | | } |
| | | |
| | | TBranchOffice office = tBranchOfficeService.selectOne(new EntityWrapper<TBranchOffice>().eq("branchOfficeName", tBranchOffice.getBranchOfficeName()) |
| | | .last("LIMIT 1")); |
| | | if(Objects.nonNull(office) && !tBranchOffice.getId().equals(office.getId())){ |
| | | return new SuccessTip(500,"该分公司名称已存在!"); |
| | | } |
| | | // Object ocr = ocr("E:\\071bf986db0b00355c0ed190bbd3b16.png"); |
| | | // System.err.println(ocr); |
| | | Object o = tBranchOfficeService.addOrUpdate(tBranchOffice); |
| | | if(Objects.nonNull(o)){ |
| | | return o; |
| | | } |
| | | tBranchOffice.setPrincipal(tBranchOffice.getPrincipal().replace(" ","")); |
| | | tBranchOfficeService.updateById(tBranchOffice); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tBranchOfficeId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tBranchOfficeId") Integer tBranchOfficeId) { |
| | | return tBranchOfficeService.selectById(tBranchOfficeId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.SuccessTip; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.enums.StatusEnum; |
| | | import com.stylefeng.guns.modular.system.model.TSystemBulletin; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TBroadcast; |
| | | import com.stylefeng.guns.modular.system.service.ITBroadcastService; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-16 10:38:00 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tBroadcast") |
| | | public class TBroadcastController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tBroadcast/"; |
| | | |
| | | @Autowired |
| | | private ITBroadcastService tBroadcastService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tBroadcast.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tBroadcast_add") |
| | | public String tBroadcastAdd() { |
| | | return PREFIX + "tBroadcast_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tBroadcast_update/{tBroadcastId}") |
| | | public String tBroadcastUpdate(@PathVariable Integer tBroadcastId, Model model) { |
| | | TBroadcast tBroadcast = tBroadcastService.selectById(tBroadcastId); |
| | | model.addAttribute("item",tBroadcast); |
| | | LogObjectHolder.me().set(tBroadcast); |
| | | return PREFIX + "tBroadcast_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,String content) { |
| | | |
| | | EntityWrapper<TBroadcast> wrapper = new EntityWrapper<>(); |
| | | |
| | | if(StringUtils.hasLength(content)){ |
| | | wrapper.like("content",content); |
| | | } |
| | | if(StringUtils.hasLength(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); |
| | | Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); |
| | | wrapper.between("createTime",startTime,endTime); |
| | | } |
| | | wrapper.ne("status", StatusEnum.DELETE.getCode()); |
| | | return tBroadcastService.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tBroadcastService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TBroadcast tBroadcast) { |
| | | Boolean exit = tBroadcastService.isExit(tBroadcast.getId(), tBroadcast.getSort()); |
| | | if(exit){ |
| | | return new SuccessTip(500,"该排序已存在!"); |
| | | } |
| | | tBroadcast.setStatus(StatusEnum.NORMAL.getCode()); |
| | | tBroadcast.setCreateTime(new Date()); |
| | | tBroadcastService.insert(tBroadcast); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tBroadcastId) { |
| | | TBroadcast tBroadcast = tBroadcastService.selectById(tBroadcastId); |
| | | if(1 == tBroadcast.getUpDown()){ |
| | | return new SuccessTip(500,"上架中的广播不可删除!"); |
| | | } |
| | | tBroadcast.setStatus(StatusEnum.DELETE.getCode()); |
| | | tBroadcastService.updateById(tBroadcast); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TBroadcast tBroadcast) { |
| | | Boolean exit = tBroadcastService.isExit(tBroadcast.getId(), tBroadcast.getSort()); |
| | | if(exit){ |
| | | return new SuccessTip(500,"该排序已存在!"); |
| | | } |
| | | tBroadcastService.updateById(tBroadcast); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 上架 |
| | | */ |
| | | @RequestMapping(value = "/up") |
| | | @ResponseBody |
| | | public Object up(Integer id) { |
| | | |
| | | int count = tBroadcastService.selectCount(new EntityWrapper<TBroadcast>() |
| | | .eq("upDown", 1) |
| | | .ne("status", StatusEnum.DELETE.getCode())); |
| | | if(count>4){ |
| | | return new SuccessTip(500,"最多可上架5条广播!"); |
| | | } |
| | | TBroadcast tBroadcast = tBroadcastService.selectById(id); |
| | | tBroadcast.setUpDown(1); |
| | | tBroadcastService.updateById(tBroadcast); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 下架 |
| | | */ |
| | | @RequestMapping(value = "/down") |
| | | @ResponseBody |
| | | public Object down(Integer id) { |
| | | TBroadcast tBroadcast = tBroadcastService.selectById(id); |
| | | tBroadcast.setUpDown(2); |
| | | tBroadcastService.updateById(tBroadcast); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tBroadcastId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tBroadcastId") Integer tBroadcastId) { |
| | | return tBroadcastService.selectById(tBroadcastId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TCancelOrder; |
| | | import com.stylefeng.guns.modular.system.service.ITCancelOrderService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-27 15:52:01 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tCancelOrder") |
| | | public class TCancelOrderController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tCancelOrder/"; |
| | | |
| | | @Autowired |
| | | private ITCancelOrderService tCancelOrderService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tCancelOrder.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tCancelOrder_add") |
| | | public String tCancelOrderAdd() { |
| | | return PREFIX + "tCancelOrder_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tCancelOrder_update/{tCancelOrderId}") |
| | | public String tCancelOrderUpdate(@PathVariable Integer tCancelOrderId, Model model) { |
| | | TCancelOrder tCancelOrder = tCancelOrderService.selectById(tCancelOrderId); |
| | | model.addAttribute("item",tCancelOrder); |
| | | LogObjectHolder.me().set(tCancelOrder); |
| | | return PREFIX + "tCancelOrder_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转详情页面 |
| | | */ |
| | | @RequestMapping("/cancelOrderDetail") |
| | | public String cancelOrderDetail(Integer cancelOrderId, Model model) { |
| | | tCancelOrderService.cancelOrderDetail(cancelOrderId,model); |
| | | return PREFIX + "tCancelOrderDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tCancelOrderService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "获取取消订单列表") |
| | | @RequestMapping(value = "/cancelOrderList") |
| | | @ResponseBody |
| | | public Object cancelOrderList(String createTime, |
| | | String code, |
| | | Integer source, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state, |
| | | String driverName) { |
| | | return tCancelOrderService.getCancelOrderList(createTime, code, source, userName, userPhone, state, driverName); |
| | | } |
| | | /** |
| | | * 获取取消订单列表(订单异常详情页面使用) |
| | | */ |
| | | @ApiOperation(value = "获取取消订单列表(订单异常详情页面使用)") |
| | | @RequestMapping(value = "/userCancelOrderList") |
| | | @ResponseBody |
| | | public Object userCancelOrderList(Integer userId,Integer orderId) { |
| | | return tCancelOrderService.userCancelOrderList(userId,orderId); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TCancelOrder tCancelOrder) { |
| | | tCancelOrderService.insert(tCancelOrder); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tCancelOrderId) { |
| | | tCancelOrderService.deleteById(tCancelOrderId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TCancelOrder tCancelOrder) { |
| | | tCancelOrderService.updateById(tCancelOrder); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tCancelOrderId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tCancelOrderId") Integer tCancelOrderId) { |
| | | return tCancelOrderService.selectById(tCancelOrderId); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出取消订单列表",notes="导出取消订单列表") |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void export(String createTime, |
| | | String code, |
| | | Integer source, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state, |
| | | String driverName, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "CancelOrderInfo"+time1+".xls"; |
| | | String[] title = new String[] {"下单时间","订单编号","订单来源","下单用户昵称", |
| | | "下单用户手机","起点地址","终点地址","接单司机","司机电话","转单原因","取消时间"}; |
| | | List<TOrderResp> orderList = tCancelOrderService.getCancelOrderList(createTime, code, source, userName, userPhone, state, driverName); |
| | | String[][] values = new String[orderList.size()][]; |
| | | for (int i = 0; i < orderList.size(); i++) { |
| | | TOrderResp d = orderList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getPlaceTime()); |
| | | values[i][1] = d.getCode(); |
| | | Integer source1 = d.getSource(); |
| | | if(1 == source1){ |
| | | values[i][2] = "小程序"; |
| | | }else if(2 == source1){ |
| | | values[i][2] = "司机创建"; |
| | | } |
| | | values[i][3] = d.getUserName(); |
| | | values[i][4] = d.getUserPhone(); |
| | | values[i][5] = d.getStartAddress(); |
| | | values[i][6] = d.getEndAddress(); |
| | | values[i][7] = d.getDriverName(); |
| | | values[i][8] = d.getDriverPhone(); |
| | | values[i][9] = d.getCause(); |
| | | values[i][10] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TCarBrand; |
| | | import com.stylefeng.guns.modular.system.service.ITCarBrandService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 车辆品牌管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-05 13:52:25 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tCarBrand") |
| | | public class TCarBrandController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tCarBrand/"; |
| | | |
| | | @Autowired |
| | | private ITCarBrandService tCarBrandService; |
| | | |
| | | /** |
| | | * 跳转到车辆品牌管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tCarBrand.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加车辆品牌管理 |
| | | */ |
| | | @RequestMapping("/tCarBrand_add") |
| | | public String tCarBrandAdd() { |
| | | return PREFIX + "tCarBrand_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改车辆品牌管理 |
| | | */ |
| | | @RequestMapping("/tCarBrand_update/{tCarBrandId}") |
| | | public String tCarBrandUpdate(@PathVariable Integer tCarBrandId, Model model) { |
| | | TCarBrand tCarBrand = tCarBrandService.selectById(tCarBrandId); |
| | | model.addAttribute("item",tCarBrand); |
| | | LogObjectHolder.me().set(tCarBrand); |
| | | return PREFIX + "tCarBrand_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取车辆品牌管理列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime, |
| | | String name) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tCarBrandService.getCarBrandList(page,beginTime,endTime,name)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增车辆品牌管理 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TCarBrand tCarBrand) { |
| | | tCarBrand.setInsertTime(new Date()); |
| | | tCarBrand.setState(1); |
| | | tCarBrandService.insert(tCarBrand); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除车辆品牌管理 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tCarBrandId) { |
| | | TCarBrand tCarBrand = tCarBrandService.selectById(tCarBrandId); |
| | | tCarBrand.setState(2); |
| | | tCarBrandService.updateById(tCarBrand); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改车辆品牌管理 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TCarBrand tCarBrand) { |
| | | tCarBrandService.updateById(tCarBrand); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.ExcelExportUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.WoUtil; |
| | | import com.stylefeng.guns.modular.system.dao.CarInsuranceMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.apache.commons.lang.time.DateUtils; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 车辆管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-05 17:25:12 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tCar") |
| | | public class TCarController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tCar/"; |
| | | |
| | | @Autowired |
| | | private ITCarService tCarService; |
| | | |
| | | @Autowired |
| | | private ITCompanyService tCompanyService; |
| | | |
| | | @Autowired |
| | | private ITCarServiceService tCarServiceService; |
| | | |
| | | @Autowired |
| | | private ITDriverLineService tDriverLineService; |
| | | |
| | | @Autowired |
| | | private ITCarBrandService tCarBrandService; |
| | | |
| | | @Autowired |
| | | private ITCarModelService tCarModelService; |
| | | |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | |
| | | @Autowired |
| | | private ITCompanyService itCompanyService; |
| | | |
| | | @Autowired |
| | | private ITCarServiceService itCarServiceService; |
| | | |
| | | @Autowired |
| | | private ITServerCarmodelService itServerCarmodelService; |
| | | |
| | | @Resource |
| | | private CarInsuranceMapper carInsuranceMapper; |
| | | |
| | | /** |
| | | * 跳转到车辆管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tCar.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加车辆管理 |
| | | */ |
| | | @RequestMapping("/tCar_add") |
| | | public String tCarAdd(Model model) { |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList",companyList); |
| | | |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | model.addAttribute("roleType",roleType); |
| | | if (2 == roleType){ |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",ShiroKit.getUser().getObjectId())); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | }else{ |
| | | model.addAttribute("franchiseeList",null); |
| | | } |
| | | //查询当前用户所属分公司/加盟商 |
| | | model.addAttribute("objectName",tCompanyService.selectById(ShiroKit.getUser().getObjectId()).getName()); |
| | | |
| | | //车辆品牌 |
| | | List<TCarBrand> brandList = tCarBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1)); |
| | | model.addAttribute("brandList",brandList); |
| | | //车辆类型 |
| | | /*List<TCarModel> modelList = tCarModelService.selectList(new EntityWrapper<TCarModel>().eq("state", 1)); |
| | | model.addAttribute("modelList",modelList);*/ |
| | | |
| | | List<TServerCarmodel> zcModelList = itServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 1).eq("state", 1)); |
| | | model.addAttribute("zcModelList",zcModelList); |
| | | List<TServerCarmodel> kcModelList = itServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 2).eq("state", 1)); |
| | | model.addAttribute("kcModelList",kcModelList); |
| | | return PREFIX + "tCar_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 查询车辆类型 |
| | | * @param carBrandId |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/brandChange") |
| | | @ResponseBody |
| | | public Object brandChange(@RequestParam Integer carBrandId) { |
| | | List<TCarModel> list = new ArrayList<>(); |
| | | if (SinataUtil.isNotEmpty(carBrandId)){ |
| | | list = tCarModelService.selectList(new EntityWrapper<TCarModel>().eq("state",1).eq("brandId", carBrandId)); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改车辆管理 |
| | | */ |
| | | @RequestMapping("/tCar_update/{tCarId}") |
| | | public String tCarUpdate(@PathVariable Integer tCarId, Model model) { |
| | | TCar tCar = tCarService.selectById(tCarId); |
| | | model.addAttribute("item",tCar); |
| | | LogObjectHolder.me().set(tCar); |
| | | |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | model.addAttribute("roleType",roleType); |
| | | model.addAttribute("objectName",tCompanyService.selectById(ShiroKit.getUser().getObjectId()).getName()); |
| | | |
| | | if (1 == roleType){ |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList",companyList); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",tCar.getCompanyId())); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | }else if (2 == roleType){ |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",ShiroKit.getUser().getObjectId())); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | } |
| | | |
| | | //查询平台ID |
| | | TCompany company = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1)); |
| | | //判断是平台司机还是加盟司机 |
| | | if ((SinataUtil.isEmpty(tCar.getCompanyId()) || tCar.getCompanyId() == 0 || tCar.getCompanyId() == company.getId()) && (SinataUtil.isEmpty(tCar.getFranchiseeId()) || tCar.getFranchiseeId() == 0)){ |
| | | model.addAttribute("companyType",1); |
| | | }else{ |
| | | model.addAttribute("companyType",2); |
| | | } |
| | | |
| | | //获取经营业务 |
| | | List<TCarService> serviceList = tCarServiceService.selectList(new EntityWrapper<TCarService>().eq("carId", tCar.getId())); |
| | | Integer one = 1; |
| | | Integer two = 1; |
| | | Integer three = 1; |
| | | Integer four = 1; |
| | | Integer five = 1; |
| | | Integer six = 1; |
| | | Integer zcModel = 0; |
| | | Integer kcModel = 0; |
| | | for (TCarService obj : serviceList){ |
| | | if (obj.getType() == 1){ |
| | | one = 2; |
| | | zcModel = obj.getServerCarModelId(); |
| | | } |
| | | if (obj.getType() == 2){ |
| | | two = 2; |
| | | } |
| | | if (obj.getType() == 3){ |
| | | three = 2; |
| | | kcModel = obj.getServerCarModelId(); |
| | | } |
| | | if (obj.getType() == 4){ |
| | | four = 2; |
| | | } |
| | | if (obj.getType() == 5){ |
| | | five = 2; |
| | | } |
| | | if (obj.getType() == 6){ |
| | | six = 2; |
| | | } |
| | | } |
| | | model.addAttribute("one",one); |
| | | model.addAttribute("two",two); |
| | | model.addAttribute("three",three); |
| | | model.addAttribute("four",four); |
| | | model.addAttribute("five",five); |
| | | model.addAttribute("six",six); |
| | | model.addAttribute("zcModel",zcModel); |
| | | model.addAttribute("kcModel",kcModel); |
| | | |
| | | List<TServerCarmodel> zcModelList = itServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 1).eq("state", 1)); |
| | | model.addAttribute("zcModelList",zcModelList); |
| | | List<TServerCarmodel> kcModelList = itServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 2).eq("state", 1)); |
| | | model.addAttribute("kcModelList",kcModelList); |
| | | |
| | | //车辆品牌 |
| | | List<TCarBrand> brandList = tCarBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1)); |
| | | model.addAttribute("brandList",brandList); |
| | | //车辆类型 |
| | | List<TCarModel> modelList = tCarModelService.selectList(new EntityWrapper<TCarModel>().eq("brandId",tCar.getCarBrandId()).eq("state", 1)); |
| | | model.addAttribute("modelList",modelList); |
| | | return PREFIX + "tCar_edit.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到保险列表页 |
| | | * @param carId |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @RequestMapping("/carInsurance") |
| | | public String carInsurance(Integer carId, Model model){ |
| | | model.addAttribute("carId", carId); |
| | | return PREFIX + "carInsurance.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加页面 |
| | | * @param carId |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @RequestMapping("/showAddCarInsurance") |
| | | public String showAddCarInsurance(Integer carId, Model model){ |
| | | model.addAttribute("carId", carId); |
| | | model.addAttribute("id", ""); |
| | | return PREFIX + "carInsuranceInfo.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到编辑页 |
| | | * @param id |
| | | * @param carId |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @RequestMapping("/showEditCarInsurance") |
| | | public String showEditCarInsurance(Integer id, Integer carId, Model model){ |
| | | model.addAttribute("carId", carId); |
| | | model.addAttribute("id", id); |
| | | return PREFIX + "carInsuranceInfo.html"; |
| | | } |
| | | |
| | | /** |
| | | * 添加保险数据 |
| | | * @param carInsurance |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/saveCarInsurance", method = RequestMethod.POST) |
| | | public ResultUtil saveCarInsurance(CarInsurance carInsurance){ |
| | | if(carInsurance.getId() == null){ |
| | | carInsuranceMapper.insert(carInsurance); |
| | | }else{ |
| | | carInsuranceMapper.updateById(carInsurance); |
| | | } |
| | | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | /** |
| | | * 获取保险详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryCarInsurance", method = RequestMethod.POST) |
| | | public ResultUtil queryCarInsurance(Integer id){ |
| | | CarInsurance carInsurance = carInsuranceMapper.selectById(id); |
| | | return ResultUtil.success(carInsurance); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取保险列表 |
| | | * @param carId |
| | | * @param offset |
| | | * @param limit |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryInsuranceList", method = RequestMethod.POST) |
| | | public Object queryInsuranceList(Integer carId, Integer offset,Integer limit){ |
| | | try { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = carInsuranceMapper.queryInsuranceList(carId, offset, limit); |
| | | int i = carInsuranceMapper.queryInsuranceListCount(carId); |
| | | map.put("rows", list); |
| | | map.put("total", i); |
| | | return map; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除保险 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/delCarInsurance", method = RequestMethod.POST) |
| | | public ResultUtil delCarInsurance(Integer id){ |
| | | carInsuranceMapper.deleteById(id); |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取车辆管理列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime, |
| | | String id, |
| | | String brandName, |
| | | String modelName, |
| | | String carColor, |
| | | String serverStr, |
| | | String carLicensePlate, |
| | | String driverName, |
| | | String companyName, |
| | | String franchiseeName) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tCarService.getCarList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),beginTime,endTime,id,brandName,modelName,carColor,serverStr,carLicensePlate,driverName,companyName,franchiseeName)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增车辆管理 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TCar tCar,@RequestParam String serverBox,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId,String zcModel,String kcModel) { |
| | | if (1 == roleType){ //平台 |
| | | if (2 == companyType.intValue()){ |
| | | if (SinataUtil.isNotEmpty(oneId)){ |
| | | tCar.setCompanyId(oneId); |
| | | } |
| | | if (SinataUtil.isNotEmpty(twoId)){ |
| | | tCar.setFranchiseeId(twoId); |
| | | } |
| | | }else if (1 == companyType.intValue()){ |
| | | TCompany company = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1)); |
| | | tCar.setCompanyId(company.getId()); |
| | | tCar.setFranchiseeId(0); |
| | | } |
| | | tCar.setAddType(2); |
| | | tCar.setIsPlatCar(1); |
| | | }else if (2 == roleType){ //分公司 |
| | | if (SinataUtil.isNotEmpty(ShiroKit.getUser().getObjectId())){ |
| | | tCar.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(franchiseeId)){ |
| | | tCar.setFranchiseeId(franchiseeId); |
| | | } |
| | | tCar.setIsPlatCar(2); |
| | | tCar.setAddType(3); |
| | | tCar.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | }else if (3 == roleType){ //加盟商 |
| | | TCompany tCompany = tCompanyService.selectById(ShiroKit.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(tCompany)){ |
| | | tCar.setCompanyId(tCompany.getSuperiorId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(ShiroKit.getUser().getObjectId())){ |
| | | tCar.setFranchiseeId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | tCar.setIsPlatCar(2); |
| | | tCar.setAddType(4); |
| | | tCar.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | tCar.setInsertTime(new Date()); |
| | | tCar.setState(1); |
| | | tCarService.insert(tCar); |
| | | |
| | | //添加经营业务 |
| | | String[] serverArray = serverBox.split(","); |
| | | for (int i=0;i<serverArray.length;i++){ |
| | | TCarService service = new TCarService(); |
| | | service.setCarId(tCar.getId()); |
| | | service.setType(Integer.valueOf(serverArray[i])); |
| | | if (1 == service.getType()){ |
| | | service.setServerCarModelId(Integer.valueOf(zcModel)); |
| | | }else if (3 == service.getType()){ |
| | | service.setServerCarModelId(Integer.valueOf(kcModel)); |
| | | } |
| | | tCarServiceService.insert(service); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除车辆管理 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tCarId) { |
| | | TCar tCar = tCarService.selectById(tCarId); |
| | | tCar.setState(2); |
| | | tCarService.updateById(tCar); |
| | | |
| | | //清除相对应的司机关联车辆ID |
| | | List<TDriver> list = tDriverService.selectList(new EntityWrapper<TDriver>().eq("carId", tCarId)); |
| | | for (TDriver obj : list){ |
| | | // obj.setCarId(null); |
| | | tDriverService.updateById(obj); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改车辆管理 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TCar tCar,@RequestParam String serverBox,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId,String zcModel,String kcModel) { |
| | | if (1 == roleType){ //平台 |
| | | if (2 == companyType.intValue()){ |
| | | if (SinataUtil.isNotEmpty(oneId)){ |
| | | tCar.setCompanyId(oneId); |
| | | } |
| | | if (SinataUtil.isNotEmpty(twoId)){ |
| | | tCar.setFranchiseeId(twoId); |
| | | } |
| | | }else if (1 == companyType.intValue()){ |
| | | TCompany company = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1)); |
| | | tCar.setCompanyId(company.getId()); |
| | | tCar.setFranchiseeId(0); |
| | | } |
| | | }else if (2 == roleType){ //分公司 |
| | | if (SinataUtil.isNotEmpty(ShiroKit.getUser().getObjectId())){ |
| | | tCar.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(franchiseeId)){ |
| | | tCar.setFranchiseeId(franchiseeId); |
| | | } |
| | | }else if (3 == roleType){ //加盟商 |
| | | TCompany tCompany = tCompanyService.selectById(ShiroKit.getUser().getObjectId()); |
| | | if (SinataUtil.isNotEmpty(tCompany)){ |
| | | tCar.setCompanyId(tCompany.getSuperiorId()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(ShiroKit.getUser().getObjectId())){ |
| | | tCar.setFranchiseeId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | } |
| | | |
| | | //删除业务 |
| | | tCarServiceService.delete(new EntityWrapper<TCarService>().eq("carId",tCar.getId())); |
| | | |
| | | //添加经营业务 |
| | | String[] serverArray = serverBox.split(","); |
| | | for (int i=0;i<serverArray.length;i++){ |
| | | TCarService service = new TCarService(); |
| | | service.setCarId(tCar.getId()); |
| | | service.setType(Integer.valueOf(serverArray[i])); |
| | | if (1 == service.getType()){ |
| | | service.setServerCarModelId(Integer.valueOf(zcModel)); |
| | | }else if (3 == service.getType()){ |
| | | service.setServerCarModelId(Integer.valueOf(kcModel)); |
| | | } |
| | | tCarServiceService.insert(service); |
| | | } |
| | | |
| | | tCarService.updateById(tCar); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 车辆管理详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tCarId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tCarId") Integer tCarId) { |
| | | return tCarService.selectById(tCarId); |
| | | } |
| | | |
| | | /** |
| | | * 下载模板 |
| | | * @param request |
| | | * @param response |
| | | */ |
| | | @RequestMapping(value = "/uploadCarModel") |
| | | public void uploadCarModel(HttpServletRequest request, HttpServletResponse response) { |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<List<String>>(); |
| | | |
| | | // 首行【封装】 |
| | | List<String> shellList = new ArrayList<String>(); |
| | | shellList.add("所属机构[平台车辆/加盟车辆]"); |
| | | shellList.add("所属分公司[提示:加盟车辆选填]"); |
| | | shellList.add("所属加盟商[提示:加盟车辆选填]"); |
| | | shellList.add("服务模式:专车[是/否]"); |
| | | shellList.add("服务模式:出租车[是/否]"); |
| | | shellList.add("服务模式:跨城出行[是/否]"); |
| | | shellList.add("服务模式:小件同城物流[是/否]"); |
| | | shellList.add("服务模式:小件跨城物流[是/否]"); |
| | | shellList.add("服务模式:包车[是/否]"); |
| | | shellList.add("车辆品牌"); |
| | | shellList.add("车辆类型"); |
| | | shellList.add("车辆颜色[黑色/银色/白色/红色/黄色/橙色/蓝色]"); |
| | | shellList.add("车牌号"); |
| | | shellList.add("行驶证编号"); |
| | | shellList.add("年检到期时间[例如 2020-02-02]"); |
| | | shellList.add("商业保险到期时间[例如 2020-02-02]"); |
| | | dataList.add(shellList); |
| | | |
| | | try { |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet("平台导入车辆模板"+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), "平台导入车辆模板", dataList, request, response); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导入操作 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @RequestMapping(value="/exportCar",method = RequestMethod.POST) |
| | | @ResponseBody |
| | | public Object exportCar(HttpServletRequest request){ |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | MultipartFile file = (MultipartFile) multipartRequest.getFile("myfile"); |
| | | try { |
| | | //定时五秒后执行 |
| | | /*Map<String,Object> maps=new HashMap<>(); |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | maps.put("book",book); |
| | | QuartzManager.addJob(AddContract.class, (AddContract.name+new Date().getTime()).toUpperCase(), TimeJobType.ADMIN,DateUtil.getDate_strYMdHms(new Date().getTime() + 1*1000) , maps);*/ |
| | | |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | Sheet sh = book.getSheetAt(0); //获取到第一个表 |
| | | for (int i = 1; i <= sh.getLastRowNum(); i++) { |
| | | Row row = sh.getRow(i); |
| | | |
| | | Cell cell0 = row.getCell(0); //所属机构[平台车辆/加盟车辆] |
| | | String zero = null; |
| | | if (SinataUtil.isNotEmpty(cell0)){ |
| | | zero = String.valueOf(cell0.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell1 = row.getCell(1); //所属分公司[提示:加盟车辆选填] |
| | | String one = null; |
| | | if (SinataUtil.isNotEmpty(cell1)){ |
| | | one = String.valueOf(cell1.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell2 = row.getCell(2); //所属加盟商[提示:加盟车辆选填] |
| | | String two = null; |
| | | if (SinataUtil.isNotEmpty(cell2)){ |
| | | two = String.valueOf(cell2.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell3 = row.getCell(3); //服务模式:专车[是/否] |
| | | String three = null; |
| | | if (SinataUtil.isNotEmpty(cell3)){ |
| | | three = String.valueOf(cell3.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell4 = row.getCell(4); //服务模式:出租车[是/否] |
| | | String four = null; |
| | | if (SinataUtil.isNotEmpty(cell4)){ |
| | | four = String.valueOf(cell4.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell5 = row.getCell(5); //服务模式:跨城出行[是/否] |
| | | String five = null; |
| | | if (SinataUtil.isNotEmpty(cell5)){ |
| | | five = String.valueOf(cell5.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell6 = row.getCell(6); //服务模式:小件跨城物流[是/否] |
| | | String six = null; |
| | | if (SinataUtil.isNotEmpty(cell6)){ |
| | | six = String.valueOf(cell6.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell7 = row.getCell(7); //服务模式:小件跨城物流[是/否] |
| | | String seven = null; |
| | | if (SinataUtil.isNotEmpty(cell7)){ |
| | | seven = String.valueOf(cell7.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell8 = row.getCell(8); //服务模式:包车[是/否] |
| | | String eight = null; |
| | | if (SinataUtil.isNotEmpty(cell8)){ |
| | | eight = String.valueOf(cell8.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell9 = row.getCell(9); //车辆品牌 |
| | | String nine = null; |
| | | if (SinataUtil.isNotEmpty(cell9)){ |
| | | nine = String.valueOf(cell9.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell10 = row.getCell(10); //车辆类型 |
| | | String ten = null; |
| | | if (SinataUtil.isNotEmpty(cell10)){ |
| | | ten = String.valueOf(cell10.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell11 = row.getCell(11); //车辆颜色[黑色/银色/白色/红色/黄色/橙色/蓝色] |
| | | String eleven = null; |
| | | if (SinataUtil.isNotEmpty(cell11)){ |
| | | eleven = String.valueOf(cell11.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell12 = row.getCell(12); //车牌号 |
| | | String twelve = null; |
| | | if (SinataUtil.isNotEmpty(cell12)){ |
| | | twelve = String.valueOf(cell12.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell13 = row.getCell(13); //行驶证编号 |
| | | String thirteen = null; |
| | | if (SinataUtil.isNotEmpty(cell13)){ |
| | | thirteen = String.valueOf(cell13.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell14 = row.getCell(14); //年检到期时间 |
| | | String fourteen = null; |
| | | if (SinataUtil.isNotEmpty(cell14)){ |
| | | fourteen = String.valueOf(cell14.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell15 = row.getCell(15); //商业保险到期时间 |
| | | String fifteen = null; |
| | | if (SinataUtil.isNotEmpty(cell15)){ |
| | | fifteen = String.valueOf(cell15.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(three) || SinataUtil.isEmpty(four) |
| | | || SinataUtil.isEmpty(five) || SinataUtil.isEmpty(six) || SinataUtil.isEmpty(seven) |
| | | || SinataUtil.isEmpty(eight) || SinataUtil.isEmpty(nine) || SinataUtil.isEmpty(ten) |
| | | || SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen) |
| | | || SinataUtil.isEmpty(fourteen) || SinataUtil.isEmpty(fifteen)){ |
| | | return new ErrorTip(500, "单元格不能为空"); |
| | | }else{ |
| | | //判断所属机构 |
| | | if (!zero.equals("平台车辆") && !zero.equals("加盟车辆")){ |
| | | return new ErrorTip(500, "所属机构内容不正确"); |
| | | } |
| | | //判断服务模式【专车】 |
| | | if (!three.equals("是") && !three.equals("否")){ |
| | | return new ErrorTip(500, "服务模式【专车】内容不正确"); |
| | | } |
| | | //判断服务模式【出租车】 |
| | | if (!four.equals("是") && !four.equals("否")){ |
| | | return new ErrorTip(500, "服务模式【出租车】内容不正确"); |
| | | } |
| | | //判断服务模式【跨城出行】 |
| | | if (!five.equals("是") && !five.equals("否")){ |
| | | return new ErrorTip(500, "服务模式【跨城出行】内容不正确"); |
| | | } |
| | | //判断服务模式【小件同城物流】 |
| | | if (!six.equals("是") && !six.equals("否")){ |
| | | return new ErrorTip(500, "服务模式【小件同城物流】内容不正确"); |
| | | } |
| | | //判断服务模式【小件跨城物流】 |
| | | if (!seven.equals("是") && !seven.equals("否")){ |
| | | return new ErrorTip(500, "服务模式【小件跨城物流】内容不正确"); |
| | | } |
| | | //判断服务模式【包车】 |
| | | if (!eight.equals("是") && !eight.equals("否")){ |
| | | return new ErrorTip(500, "服务模式【包车】内容不正确"); |
| | | } |
| | | //判断车辆颜色 |
| | | if (!eleven.equals("黑色") && !eleven.equals("银色") && !eleven.equals("白色") && !eleven.equals("红色") && !eleven.equals("黄色") && !eleven.equals("橙色") && !eleven.equals("蓝色")){ |
| | | return new ErrorTip(500, "车辆颜色内容不正确"); |
| | | } |
| | | //判断年检到期时间格式是否正确 |
| | | try { |
| | | if (!isValidDate(fourteen)) { |
| | | fourteen = importByExcelForDate(fourteen); |
| | | } |
| | | }catch (Exception e){ |
| | | return new ErrorTip(500, "年检到期时间格式不正确"); |
| | | } |
| | | //判断商业保险到期时间格式是否正确 |
| | | try { |
| | | if (!isValidDate(fifteen)) { |
| | | fifteen = importByExcelForDate(fifteen); |
| | | } |
| | | }catch (Exception e){ |
| | | return new ErrorTip(500, "商业保险到期时间格式不正确"); |
| | | } |
| | | |
| | | //查找平台公司 |
| | | TCompany platCompany = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1).notIn("flag", "3").last(" limit 1")); |
| | | Integer companyId = platCompany.getId(); |
| | | Integer franchiseeId = 0; |
| | | if ("加盟车辆".equals(zero)){ |
| | | //判断所属分公司是否存在 |
| | | if (SinataUtil.isNotEmpty(one)){ |
| | | TCompany company = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("name", one).eq("type", 2).notIn("flag", "3").last(" limit 1")); |
| | | if (SinataUtil.isNotEmpty(company)){ |
| | | companyId = company.getId(); |
| | | //判断加盟商是否存在 |
| | | if (SinataUtil.isNotEmpty(two)){ |
| | | TCompany franchisee = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("superiorId",company.getId()).eq("name", two).eq("type", 3).notIn("flag", "3").last(" limit 1")); |
| | | if (SinataUtil.isNotEmpty(franchisee)){ |
| | | franchiseeId = franchisee.getId(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | Integer carBrandId = null; |
| | | Integer carModelId = null; |
| | | //查找品牌 |
| | | if (SinataUtil.isNotEmpty(nine)){ |
| | | TCarBrand carBrand = tCarBrandService.selectOne(new EntityWrapper<TCarBrand>().eq("name", nine).eq("state", 1).last(" limit 1")); |
| | | if (SinataUtil.isNotEmpty(carBrand)){ |
| | | carBrandId = carBrand.getId(); |
| | | if (SinataUtil.isNotEmpty(ten)){ |
| | | //查找类型 |
| | | TCarModel carModel = tCarModelService.selectOne(new EntityWrapper<TCarModel>().eq("brandId", carBrand.getId()).eq("name", ten).eq("state", 1).last(" limit 1")); |
| | | if (SinataUtil.isNotEmpty(carModel)){ |
| | | carModelId = carModel.getId(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //添加车辆对象 |
| | | TCar car = new TCar(); |
| | | if ("平台车辆".equals(zero)){ |
| | | car.setIsPlatCar(1); |
| | | }else if ("加盟车辆".equals(zero)){ |
| | | car.setIsPlatCar(2); |
| | | } |
| | | car.setCompanyId(companyId); |
| | | car.setFranchiseeId(franchiseeId); |
| | | car.setCarColor(eleven); |
| | | car.setCarBrandId(carBrandId); |
| | | car.setCarModelId(carModelId); |
| | | car.setCarLicensePlate(twelve); |
| | | car.setDrivingLicenseNumber(thirteen); |
| | | car.setAnnualInspectionTime(DateUtil.parseDate(fourteen)); |
| | | car.setCommercialInsuranceTime(DateUtil.parseDate(fifteen)); |
| | | car.setInsertTime(new Date()); |
| | | car.setState(1); |
| | | if (ShiroKit.getUser().getRoleType() == 1){ |
| | | car.setAddType(2); |
| | | }else if (ShiroKit.getUser().getRoleType() == 2){ |
| | | car.setAddType(3); |
| | | car.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | }else if (ShiroKit.getUser().getRoleType() == 3){ |
| | | car.setAddType(4); |
| | | car.setAddObjectId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | tCarService.insert(car); |
| | | |
| | | //添加专车服务模式 |
| | | if ("是".equals(three)){ |
| | | TCarService service = new TCarService(); |
| | | service.setCarId(car.getId()); |
| | | service.setType(1); |
| | | tCarServiceService.insert(service); |
| | | } |
| | | //添加出租车服务模式 |
| | | if ("是".equals(four)){ |
| | | TCarService service = new TCarService(); |
| | | service.setCarId(car.getId()); |
| | | service.setType(2); |
| | | tCarServiceService.insert(service); |
| | | } |
| | | //添加跨城出行服务模式 |
| | | if ("是".equals(five)){ |
| | | TCarService service = new TCarService(); |
| | | service.setCarId(car.getId()); |
| | | service.setType(3); |
| | | tCarServiceService.insert(service); |
| | | } |
| | | //添加小件同城物流服务模式 |
| | | if ("是".equals(six)){ |
| | | TCarService service = new TCarService(); |
| | | service.setCarId(car.getId()); |
| | | service.setType(4); |
| | | tCarServiceService.insert(service); |
| | | } |
| | | //添加小件跨城物流服务模式 |
| | | if ("是".equals(seven)){ |
| | | TCarService service = new TCarService(); |
| | | service.setCarId(car.getId()); |
| | | service.setType(5); |
| | | tCarServiceService.insert(service); |
| | | } |
| | | //添加包车服务模式 |
| | | if ("是".equals(eight)){ |
| | | TCarService service = new TCarService(); |
| | | service.setCarId(car.getId()); |
| | | service.setType(6); |
| | | tCarServiceService.insert(service); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 判断日期是否满足yyyy-MM-dd格式 |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static boolean isValidDate(String str) { |
| | | boolean convertSuccess=true; |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | format.setLenient(false); |
| | | format.parse(str); |
| | | } catch (Exception e) { |
| | | convertSuccess=false; |
| | | } |
| | | return convertSuccess; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 转换日期 |
| | | * @return |
| | | */ |
| | | public static String importByExcelForDate(String value) {//value就是它的天数 |
| | | String currentCellValue = ""; |
| | | if(value != null && !value.equals("")){ |
| | | Calendar calendar = new GregorianCalendar(1900,0,-1); |
| | | Date d = calendar.getTime(); |
| | | Date dd = DateUtils.addDays(d,Integer.valueOf(value)); |
| | | DateFormat formater = new SimpleDateFormat("yyyy-MM-dd"); |
| | | currentCellValue = formater.format(dd); |
| | | } |
| | | return currentCellValue; |
| | | } |
| | | |
| | | /** |
| | | * 导出车辆信息 |
| | | */ |
| | | @RequestMapping(value = "/outCar") |
| | | public void outCar(HttpServletRequest request, HttpServletResponse response) { |
| | | List<Map<String,Object>> listMap = tCarService.getCarListNoPage(ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId()); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |
| | | |
| | | //第一行显示【封装】 |
| | | List<String> twoList = new ArrayList<String>(); |
| | | twoList.add("总计:"); |
| | | twoList.add(String.valueOf(listMap.size())+"条"); |
| | | dataList.add(twoList); |
| | | |
| | | // 列【封装】 |
| | | List<String> shellList = new ArrayList<String>(); |
| | | shellList.add("添加时间"); |
| | | shellList.add("车辆ID"); |
| | | shellList.add("所属分公司"); |
| | | shellList.add("所属加盟商"); |
| | | shellList.add("车辆品牌"); |
| | | shellList.add("车辆类型"); |
| | | shellList.add("颜色"); |
| | | shellList.add("服务模式"); |
| | | shellList.add("车牌号"); |
| | | shellList.add("行驶证号码"); |
| | | shellList.add("座位数"); |
| | | shellList.add("关联司机"); |
| | | shellList.add("年检到期时间"); |
| | | shellList.add("商业保险到期时间"); |
| | | dataList.add(shellList); |
| | | |
| | | for (Map<String,Object> object : listMap){ |
| | | // 详细数据列【封装】 |
| | | shellList = new ArrayList<String>(); |
| | | if(SinataUtil.isNotEmpty(object.get("insertTime"))){ |
| | | shellList.add(DateUtil.formatDate(DateUtil.parse(object.get("insertTime").toString(),"YYYY-MM-dd HH:mm:ss.S"), "YYYY-MM-dd HH:mm:ss")); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | shellList.add(String.valueOf(object.get("id"))); |
| | | if(SinataUtil.isNotEmpty(object.get("companyName"))){ |
| | | shellList.add(object.get("companyName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("franchiseeName"))){ |
| | | shellList.add(object.get("franchiseeName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("brandName"))){ |
| | | shellList.add(object.get("brandName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("modelName"))){ |
| | | shellList.add(object.get("modelName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("carColor"))){ |
| | | shellList.add(object.get("carColor").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("serverStr"))){ |
| | | shellList.add(object.get("serverStr").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("carLicensePlate"))){ |
| | | shellList.add(object.get("carLicensePlate").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("drivingLicenseNumber"))){ |
| | | shellList.add(object.get("drivingLicenseNumber").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("seat"))){ |
| | | shellList.add(object.get("seat").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("driverName"))){ |
| | | shellList.add(object.get("driverName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("annualInspectionTime"))){ |
| | | shellList.add(DateUtil.formatDate(DateUtil.parse(object.get("annualInspectionTime").toString(),"YYYY-MM-dd HH:mm:ss.S"), "YYYY-MM-dd HH:mm:ss")); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("commercialInsuranceTime"))){ |
| | | shellList.add(DateUtil.formatDate(DateUtil.parse(object.get("commercialInsuranceTime").toString(),"YYYY-MM-dd HH:mm:ss.S"), "YYYY-MM-dd HH:mm:ss")); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | dataList.add(shellList); |
| | | } |
| | | try { |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet("车辆信息导出记录"+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), "车辆信息导出记录", dataList,request, response); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TCarBrand; |
| | | import com.stylefeng.guns.modular.system.service.ITCarBrandService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TCarModel; |
| | | import com.stylefeng.guns.modular.system.service.ITCarModelService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 车辆类型管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-05 14:31:28 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tCarModel") |
| | | public class TCarModelController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tCarModel/"; |
| | | |
| | | @Autowired |
| | | private ITCarModelService tCarModelService; |
| | | |
| | | @Autowired |
| | | private ITCarBrandService tCarBrandService; |
| | | |
| | | /** |
| | | * 跳转到车辆类型管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tCarModel.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加车辆类型管理 |
| | | */ |
| | | @RequestMapping("/tCarModel_add") |
| | | public String tCarModelAdd(Model model) { |
| | | List<TCarBrand> brandList = tCarBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1).orderBy("insertTime", false)); |
| | | model.addAttribute("brandList",brandList); |
| | | return PREFIX + "tCarModel_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改车辆类型管理 |
| | | */ |
| | | @RequestMapping("/tCarModel_update/{tCarModelId}") |
| | | public String tCarModelUpdate(@PathVariable Integer tCarModelId, Model model) { |
| | | TCarModel tCarModel = tCarModelService.selectById(tCarModelId); |
| | | model.addAttribute("item",tCarModel); |
| | | LogObjectHolder.me().set(tCarModel); |
| | | |
| | | List<TCarBrand> brandList = tCarBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1).orderBy("insertTime", false)); |
| | | model.addAttribute("brandList",brandList); |
| | | return PREFIX + "tCarModel_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取车辆类型管理列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime, |
| | | String name) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tCarModelService.getCarModelList(page,beginTime,endTime,name)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增车辆类型管理 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TCarModel tCarModel) { |
| | | tCarModel.setInsertTime(new Date()); |
| | | tCarModel.setState(1); |
| | | tCarModelService.insert(tCarModel); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除车辆类型管理 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tCarModelId) { |
| | | TCarModel tCarModel = tCarModelService.selectById(tCarModelId); |
| | | tCarModel.setState(2); |
| | | tCarModelService.updateById(tCarModel); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改车辆类型管理 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TCarModel tCarModel) { |
| | | tCarModelService.updateById(tCarModel); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TCashWithdrawal; |
| | | import com.stylefeng.guns.modular.system.service.ITCashWithdrawalService; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-23 10:14:44 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tCashWithdrawal") |
| | | public class TCashWithdrawalController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tCashWithdrawal/"; |
| | | |
| | | @Autowired |
| | | private ITCashWithdrawalService tCashWithdrawalService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tCashWithdrawal.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tCashWithdrawal_add") |
| | | public String tCashWithdrawalAdd() { |
| | | return PREFIX + "tCashWithdrawal_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tCashWithdrawal_update/{tCashWithdrawalId}") |
| | | public String tCashWithdrawalUpdate(@PathVariable Integer tCashWithdrawalId, Model model) { |
| | | TCashWithdrawal tCashWithdrawal = tCashWithdrawalService.selectById(tCashWithdrawalId); |
| | | model.addAttribute("item",tCashWithdrawal); |
| | | LogObjectHolder.me().set(tCashWithdrawal); |
| | | return PREFIX + "tCashWithdrawal_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tCashWithdrawalService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TCashWithdrawal tCashWithdrawal) { |
| | | tCashWithdrawalService.insert(tCashWithdrawal); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tCashWithdrawalId) { |
| | | tCashWithdrawalService.deleteById(tCashWithdrawalId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TCashWithdrawal tCashWithdrawal) { |
| | | tCashWithdrawalService.updateById(tCashWithdrawal); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tCashWithdrawalId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tCashWithdrawalId") Integer tCashWithdrawalId) { |
| | | return tCashWithdrawalService.selectById(tCashWithdrawalId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.SuccessTip; |
| | | import com.stylefeng.guns.modular.system.controller.util.LabelReplaceUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TCommercial; |
| | | import com.stylefeng.guns.modular.system.service.ITCommercialService; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-16 10:38:08 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tCommercial") |
| | | public class TCommercialController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tCommercial/"; |
| | | |
| | | @Autowired |
| | | private ITCommercialService tCommercialService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tCommercial.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tCommercial_add") |
| | | public String tCommercialAdd() { |
| | | return PREFIX + "tCommercial_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tCommercial_update/{tCommercialId}") |
| | | public String tCommercialUpdate(@PathVariable Integer tCommercialId, Model model) { |
| | | TCommercial tCommercial = tCommercialService.selectById(tCommercialId); |
| | | model.addAttribute("item",tCommercial); |
| | | LogObjectHolder.me().set(tCommercial); |
| | | return PREFIX + "tCommercial_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tCommercialService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TCommercial tCommercial) { |
| | | tCommercial.setHtml(LabelReplaceUtil.replace(tCommercial.getHtml())); |
| | | tCommercial.setCreateTime(new Date()); |
| | | tCommercialService.insert(tCommercial); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tCommercialId) { |
| | | tCommercialService.deleteById(tCommercialId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 上线 |
| | | */ |
| | | @RequestMapping(value = "/onLine") |
| | | @ResponseBody |
| | | public Object onLine(@RequestParam Integer tCommercialId) { |
| | | TCommercial tCommercial = tCommercialService.selectById(tCommercialId); |
| | | Boolean exit = tCommercialService.isExit(tCommercialId, 1); |
| | | if(exit){ |
| | | return new SuccessTip(500,"最多可上架4个弹窗广告!"); |
| | | } |
| | | tCommercial.setOnOffLine(1); |
| | | tCommercialService.updateById(tCommercial); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 下线 |
| | | */ |
| | | @RequestMapping(value = "/offLine") |
| | | @ResponseBody |
| | | public Object offLine(@RequestParam Integer tCommercialId) { |
| | | TCommercial tCommercial = tCommercialService.selectById(tCommercialId); |
| | | tCommercial.setOnOffLine(2); |
| | | tCommercialService.updateById(tCommercial); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TCommercial tCommercial) { |
| | | if(0 == tCommercial.getIsJump()){ |
| | | tCommercial.setJumpType(0); |
| | | tCommercial.setJumpUrl(""); |
| | | } |
| | | tCommercial.setHtml(LabelReplaceUtil.replace(tCommercial.getHtml())); |
| | | tCommercialService.updateById(tCommercial); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tCommercialId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tCommercialId") Integer tCommercialId) { |
| | | return tCommercialService.selectById(tCommercialId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.ITCompanyCityService; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | import com.stylefeng.guns.modular.system.service.IUserService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.service.ITCompanyService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 分公司管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-06 09:15:48 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tCompany") |
| | | public class TCompanyController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tCompany/"; |
| | | |
| | | @Autowired |
| | | private ITCompanyService tCompanyService; |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | @Autowired |
| | | private ITCompanyCityService tCompanyCityService; |
| | | |
| | | /** |
| | | * 跳转到修改平台信息 |
| | | */ |
| | | @RequestMapping("/admin_update") |
| | | public String tCompanyUpdate(Model model) { |
| | | TCompany tCompany = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type",1).notIn("flag",3)); |
| | | model.addAttribute("item",tCompany); |
| | | LogObjectHolder.me().set(tCompany); |
| | | |
| | | //省 |
| | | List<TRegion> provinceList = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("provinceList",provinceList); |
| | | |
| | | //系统用户对象 |
| | | User user = userService.selectOne(new EntityWrapper<User>().eq("roleType", 1).eq("objectId", tCompany.getId())); |
| | | model.addAttribute("user",user); |
| | | |
| | | //经营区域 |
| | | List<Map<String, Object>> scopeList = tCompanyService.getCompanyScopeById(tCompany.getId()); |
| | | model.addAttribute("scopeList",scopeList); |
| | | return PREFIX + "platformEdit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到分公司管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tCompany.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到加盟商管理首页 |
| | | */ |
| | | @RequestMapping("/franchisee") |
| | | public String franchisee() { |
| | | return PREFIX + "franchisee.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加分公司管理 |
| | | */ |
| | | @RequestMapping("/tCompany_add") |
| | | public String tCompanyAdd(Model model) { |
| | | List<TRegion> provinceList = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("provinceList",provinceList); |
| | | return PREFIX + "tCompany_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加加盟商司管理 |
| | | */ |
| | | @RequestMapping("/tCompany_addFranchisee") |
| | | public String tCompany_addFranchisee(Model model) { |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if (1 == roleType){ |
| | | //查询分公司 |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList",companyList); |
| | | }else if (2 == roleType){ |
| | | TCompany tCompany = tCompanyService.selectById(ShiroKit.getUser().getObjectId()); |
| | | model.addAttribute("company",tCompany); |
| | | } |
| | | model.addAttribute("roleType",roleType); |
| | | return PREFIX + "tCompany_addFranchisee.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到查看分公司详情 |
| | | */ |
| | | @RequestMapping("/tCompany_detail/{tCompanyId}") |
| | | public String tCompany_detail(@PathVariable Integer tCompanyId, Model model) { |
| | | TCompany tCompany = tCompanyService.selectById(tCompanyId); |
| | | model.addAttribute("item",tCompany); |
| | | LogObjectHolder.me().set(tCompany); |
| | | |
| | | //省 |
| | | List<TRegion> provinceList = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("provinceList",provinceList); |
| | | |
| | | //系统用户对象 |
| | | User user = userService.selectOne(new EntityWrapper<User>().eq("roleType", 2).eq("objectId", tCompanyId)); |
| | | model.addAttribute("user",user); |
| | | |
| | | //经营区域 |
| | | List<Map<String, Object>> scopeList = tCompanyService.getCompanyScopeById(tCompanyId); |
| | | model.addAttribute("scopeList",scopeList); |
| | | |
| | | return PREFIX + "tCompany_detail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改分公司管理 |
| | | */ |
| | | @RequestMapping("/tCompany_update/{tCompanyId}") |
| | | public String tCompanyUpdate(@PathVariable Integer tCompanyId, Model model) { |
| | | TCompany tCompany = tCompanyService.selectById(tCompanyId); |
| | | model.addAttribute("item",tCompany); |
| | | LogObjectHolder.me().set(tCompany); |
| | | |
| | | //省 |
| | | List<TRegion> provinceList = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("provinceList",provinceList); |
| | | |
| | | //系统用户对象 |
| | | User user = userService.selectOne(new EntityWrapper<User>().eq("roleType", 2).eq("objectId", tCompanyId)); |
| | | model.addAttribute("user",user); |
| | | |
| | | //经营区域 |
| | | List<Map<String, Object>> scopeList = tCompanyService.getCompanyScopeById(tCompanyId); |
| | | model.addAttribute("scopeList",scopeList); |
| | | return PREFIX + "tCompany_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到查看加盟商 |
| | | */ |
| | | @RequestMapping("/tCompany_detailFranchisee/{tCompanyId}") |
| | | public String tCompany_detailFranchisee(@PathVariable Integer tCompanyId, Model model) { |
| | | TCompany tCompany = tCompanyService.selectById(tCompanyId); |
| | | model.addAttribute("item",tCompany); |
| | | LogObjectHolder.me().set(tCompany); |
| | | |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | model.addAttribute("roleType",roleType); |
| | | |
| | | TCompany obj = tCompanyService.selectById(tCompany.getSuperiorId()); |
| | | if (SinataUtil.isNotEmpty(obj)){ |
| | | model.addAttribute("companyName",obj.getName()); |
| | | }else { |
| | | model.addAttribute("companyName","平台"); |
| | | } |
| | | |
| | | |
| | | //系统用户对象 |
| | | User user = userService.selectOne(new EntityWrapper<User>().eq("roleType", 3).eq("objectId", tCompanyId)); |
| | | model.addAttribute("user",user); |
| | | return PREFIX + "tCompany_detailFranchisee.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改分公司管理 |
| | | */ |
| | | @RequestMapping("/tCompany_updateFranchisee/{tCompanyId}") |
| | | public String tCompany_updateFranchisee(@PathVariable Integer tCompanyId, Model model) { |
| | | TCompany tCompany = tCompanyService.selectById(tCompanyId); |
| | | model.addAttribute("item",tCompany); |
| | | LogObjectHolder.me().set(tCompany); |
| | | |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if (1 == roleType){ |
| | | //查询分公司 |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList",companyList); |
| | | }else if (2 == roleType){ |
| | | TCompany obj = tCompanyService.selectById(ShiroKit.getUser().getObjectId()); |
| | | model.addAttribute("company",obj); |
| | | } |
| | | model.addAttribute("roleType",roleType); |
| | | |
| | | //系统用户对象 |
| | | User user = userService.selectOne(new EntityWrapper<User>().eq("roleType", 3).eq("objectId", tCompanyId)); |
| | | model.addAttribute("user",user); |
| | | |
| | | return PREFIX + "tCompany_updateFranchisee.html"; |
| | | } |
| | | |
| | | @RequestMapping(value = "/change") |
| | | @ResponseBody |
| | | public Object change(@RequestParam Integer code) { |
| | | List<TRegion> list = new ArrayList<>(); |
| | | if (SinataUtil.isNotEmpty(code)){ |
| | | TRegion region = tRegionService.selectOne(new EntityWrapper<TRegion>().eq("code", code)); |
| | | list = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", region.getId())); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 获取分公司管理列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String name, |
| | | String principalName, |
| | | String principalPhone, |
| | | String adminName, |
| | | String adminPhone, |
| | | String serviceStr, |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tCompanyService.getCompanyList(page,beginTime,endTime,name,principalName,principalPhone,adminName,adminPhone,serviceStr,state)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 获取分公司管理列表 |
| | | */ |
| | | @RequestMapping(value = "/listFranchisee") |
| | | @ResponseBody |
| | | public Object listFranchisee(String insertTime, |
| | | String name, |
| | | String account, |
| | | String principalName, |
| | | String principalPhone, |
| | | String serviceStr, |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() == 3){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tCompanyService.getFranchiseeList(page,beginTime,endTime,name,account,principalName,principalPhone,serviceStr,state,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId())); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增分公司管理 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TCompany tCompany,@RequestParam String subArr,String account,String password) { |
| | | //判断账号是否已存在 |
| | | int count = userService.selectCount(new EntityWrapper<User>().eq("account", account)); |
| | | if (count > 0){ |
| | | return "error"; |
| | | } |
| | | tCompany.setType(2); //2:分公司 |
| | | tCompany.setState(0); //0:正常 |
| | | tCompany.setInsertTime(new Date()); |
| | | tCompanyService.insert(tCompany); |
| | | |
| | | //添加User对象 |
| | | User user = new User(); |
| | | user.setAccount(account); |
| | | user.setSalt(ShiroKit.getRandomSalt(5)); |
| | | user.setPassword(ShiroKit.md5(password, user.getSalt())); |
| | | user.setRoleid("2"); |
| | | user.setDeptid(25); |
| | | user.setStatus(1); |
| | | user.setCreatetime(new Date()); |
| | | user.setRoleType(2); |
| | | user.setObjectId(tCompany.getId()); |
| | | user.setName(tCompany.getName()); |
| | | user.setSex(1); |
| | | userService.insert(user); |
| | | |
| | | //添加经营区域 |
| | | addSocpe(subArr,tCompany.getId()); |
| | | return SUCCESS_TIP; |
| | | } |
| | | //添加经营区域 |
| | | public void addSocpe(String subArr,Integer id){ |
| | | JSONArray jsonArray = JSON.parseArray(subArr); |
| | | tCompanyCityService.delete(new EntityWrapper<TCompanyCity>().eq("companyId", id)); |
| | | int size = jsonArray.size(); |
| | | for (int i = 0; i < size; i++){ |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | TCompanyCity tCompanyCity = tCompanyCityService.selectOne(new EntityWrapper<TCompanyCity>().eq("id", jsonObject.getInteger("recordId")).eq("companyId", id)); |
| | | if (SinataUtil.isEmpty(tCompanyCity)){ |
| | | tCompanyCity = new TCompanyCity(); |
| | | tCompanyCity.setProvinceCode(jsonObject.getInteger("provinceCode")); |
| | | tCompanyCity.setCityCode(jsonObject.getInteger("cityCode")); |
| | | tCompanyCity.setAreaCode(jsonObject.getInteger("areaCode")); |
| | | tCompanyCity.setCompanyId(id); |
| | | tCompanyCity.setState(1); |
| | | tCompanyCityService.insert(tCompanyCity); |
| | | }else{ |
| | | tCompanyCity.setProvinceCode(jsonObject.getInteger("provinceCode")); |
| | | tCompanyCity.setCityCode(jsonObject.getInteger("cityCode")); |
| | | tCompanyCity.setAreaCode(jsonObject.getInteger("areaCode")); |
| | | tCompanyCityService.updateById(tCompanyCity); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 新增加盟商管理 |
| | | */ |
| | | @RequestMapping(value = "/addFranchisee") |
| | | @ResponseBody |
| | | public Object addFranchisee(TCompany tCompany,String account,String password) { |
| | | //判断账号是否已存在 |
| | | int count = userService.selectCount(new EntityWrapper<User>().eq("account", account)); |
| | | if (count > 0){ |
| | | return "error"; |
| | | } |
| | | tCompany.setType(3); //2:分公司 |
| | | if (ShiroKit.getUser().getRoleType() == 2){ |
| | | tCompany.setSuperiorId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | tCompany.setState(0); //0:正常 |
| | | tCompany.setInsertTime(new Date()); |
| | | tCompanyService.insert(tCompany); |
| | | |
| | | //添加User对象 |
| | | User user = new User(); |
| | | user.setAccount(account); |
| | | user.setSalt(ShiroKit.getRandomSalt(5)); |
| | | user.setPassword(ShiroKit.md5(password, user.getSalt())); |
| | | user.setRoleid("3"); |
| | | user.setDeptid(26); |
| | | user.setStatus(1); |
| | | user.setCreatetime(new Date()); |
| | | user.setRoleType(3); |
| | | user.setObjectId(tCompany.getId()); |
| | | user.setName(tCompany.getName()); |
| | | user.setSex(1); |
| | | userService.insert(user); |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除分公司管理 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tCompanyId) { |
| | | TCompany tCompany = tCompanyService.selectById(tCompanyId); |
| | | tCompany.setFlag("3"); |
| | | tCompanyService.updateById(tCompany); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改分公司管理 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TCompany tCompany,@RequestParam String subArr,String account,String password,Integer userId) { |
| | | //判断账号 |
| | | User user = userService.selectById(userId); |
| | | if (SinataUtil.isNotEmpty(account) && SinataUtil.isNotEmpty(password)){ |
| | | if (!user.getAccount().equals(account)){ |
| | | //判断账号是否已存在 |
| | | int count = userService.selectCount(new EntityWrapper<User>().eq("account", account)); |
| | | if (count > 0){ |
| | | return "error"; |
| | | } |
| | | } |
| | | //修改账号密码 |
| | | user.setAccount(account); |
| | | user.setSalt(ShiroKit.getRandomSalt(5)); |
| | | user.setPassword(ShiroKit.md5(password, user.getSalt())); |
| | | } |
| | | tCompanyService.updateById(tCompany); |
| | | user.setName(tCompany.getName()); |
| | | userService.updateById(user); |
| | | |
| | | //添加经营区域 |
| | | addSocpe(subArr,tCompany.getId()); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改加盟商管理 |
| | | */ |
| | | @RequestMapping(value = "/updateFranchisee") |
| | | @ResponseBody |
| | | public Object updateFranchisee(TCompany tCompany,String account,String password,Integer userId) { |
| | | //判断账号 |
| | | User user = userService.selectById(userId); |
| | | if (!user.getAccount().equals(account)){ |
| | | //判断账号是否已存在 |
| | | int count = userService.selectCount(new EntityWrapper<User>().eq("account", account)); |
| | | if (count > 0){ |
| | | return "error"; |
| | | } |
| | | } |
| | | tCompanyService.updateById(tCompany); |
| | | |
| | | //修改账号密码 |
| | | user.setAccount(account); |
| | | user.setSalt(ShiroKit.getRandomSalt(5)); |
| | | user.setPassword(ShiroKit.md5(password, user.getSalt())); |
| | | user.setName(tCompany.getName()); |
| | | userService.updateById(user); |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.SuccessTip; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TComplaint; |
| | | import com.stylefeng.guns.modular.system.service.ITComplaintService; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-02 10:14:46 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tComplaint") |
| | | public class TComplaintController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tComplaint/"; |
| | | |
| | | @Autowired |
| | | private ITComplaintService tComplaintService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tComplaint.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tComplaint_add") |
| | | public String tComplaintAdd() { |
| | | return PREFIX + "tComplaint_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tComplaint_update/{tComplaintId}") |
| | | public String tComplaintUpdate(@PathVariable Integer tComplaintId, Model model) { |
| | | TComplaint tComplaint = tComplaintService.selectById(tComplaintId); |
| | | model.addAttribute("item",tComplaint); |
| | | LogObjectHolder.me().set(tComplaint); |
| | | return PREFIX + "tComplaint_edit.html"; |
| | | } |
| | | /** |
| | | * 跳转到投诉处理 |
| | | */ |
| | | @RequestMapping("/immediatelyAudit") |
| | | public String immediatelyAudit(Integer tComplaintId,Model model) { |
| | | model.addAttribute("tComplaintId",tComplaintId); |
| | | return PREFIX + "tComplaintAudit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | */ |
| | | @RequestMapping(value = "/audit") |
| | | @ResponseBody |
| | | public Object audit(Integer tComplaintId,String notes) { |
| | | TComplaint tComplaint = tComplaintService.selectById(tComplaintId); |
| | | tComplaint.setNotes(notes); |
| | | tComplaint.setState(2); |
| | | // 审核用户id |
| | | Subject subject = ShiroKit.getSubject(); |
| | | ShiroUser shiroUser = (ShiroUser)subject.getPrincipal(); |
| | | tComplaint.setAuditId(shiroUser.getId()); |
| | | tComplaint.setAuditPersonName(shiroUser.getName()); |
| | | tComplaint.setAuditTime(new Date()); |
| | | tComplaintService.updateById(tComplaint); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,String userName,String userPhone,String driverPhone,Integer state) { |
| | | return tComplaintService.getPageList(createTime,userName,userPhone,driverPhone,state); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tComplaintService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TComplaint tComplaint) { |
| | | tComplaintService.insert(tComplaint); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tComplaintId) { |
| | | tComplaintService.deleteById(tComplaintId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TComplaint tComplaint) { |
| | | tComplaintService.updateById(tComplaint); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tComplaintId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tComplaintId") Integer tComplaintId) { |
| | | return tComplaintService.selectById(tComplaintId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.SuccessTip; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.controller.req.CouponSendReq; |
| | | import com.stylefeng.guns.modular.system.enums.CouponStatusEnum; |
| | | import com.stylefeng.guns.modular.system.enums.StatusEnum; |
| | | import com.stylefeng.guns.modular.system.model.TAgent; |
| | | import com.stylefeng.guns.modular.system.model.TUserToCoupon; |
| | | import com.stylefeng.guns.modular.system.service.ITUserToCouponService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hdf.extractor.TC; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.Assert; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TCoupon; |
| | | import com.stylefeng.guns.modular.system.service.ITCouponService; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-14 10:59:23 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tCoupon") |
| | | public class TCouponController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tCoupon/"; |
| | | |
| | | @Autowired |
| | | private ITCouponService tCouponService; |
| | | @Autowired |
| | | private ITUserToCouponService tUserToCouponService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tCoupon.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tCoupon_add") |
| | | public String tCouponAdd() { |
| | | return PREFIX + "tCoupon_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tCoupon_update/{tCouponId}") |
| | | public String tCouponUpdate(@PathVariable Integer tCouponId, Model model) { |
| | | TCoupon tCoupon = tCouponService.selectById(tCouponId); |
| | | model.addAttribute("item",tCoupon); |
| | | LogObjectHolder.me().set(tCoupon); |
| | | return PREFIX + "tCoupon_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(Integer couponType,Integer couponServiceType,String createTime) { |
| | | EntityWrapper<TCoupon> wrapper = new EntityWrapper<>(); |
| | | if(Objects.nonNull(couponType)){ |
| | | wrapper.eq("coupon_type",couponType); |
| | | } |
| | | if(Objects.nonNull(couponServiceType)){ |
| | | wrapper.eq("coupon_service_type",couponServiceType); |
| | | } |
| | | // 开始,结束时间 |
| | | if(StringUtils.hasLength(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); |
| | | Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); |
| | | wrapper.between("create_time",startTime,endTime); |
| | | } |
| | | wrapper.ne("status", StatusEnum.DELETE.getCode()); |
| | | wrapper.orderBy(true,"create_time",false); |
| | | return tCouponService.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取活动券列表 |
| | | */ |
| | | @RequestMapping(value = "/activityCouponList") |
| | | @ResponseBody |
| | | public Object activityCouponList(String couponName) { |
| | | EntityWrapper<TCoupon> wrapper = new EntityWrapper<>(); |
| | | if(StringUtils.hasLength(couponName)){ |
| | | wrapper.like("coupon_name",couponName); |
| | | } |
| | | wrapper.eq("coupon_type",1); |
| | | wrapper.eq("coupon_state",1); |
| | | wrapper.orderBy(true,"create_time",false); |
| | | return tCouponService.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tCouponService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TCoupon tCoupon) { |
| | | // 校验是否添加的是同类型同名称的优惠券 |
| | | Boolean isExit = tCouponService.isExit(tCoupon); |
| | | if(isExit){ |
| | | return new SuccessTip(500,"该优惠券名称与类型已存在!"); |
| | | } |
| | | // 如果是新人优惠券,查询是否存在已启用的新人优惠券 |
| | | if(tCoupon.getCouponType() == 2){ |
| | | int count = tCouponService.selectCount(new EntityWrapper<TCoupon>() |
| | | .eq("coupon_type", 2) |
| | | .eq("coupon_state", 1) |
| | | .eq("status", true)); |
| | | if(count>0){ |
| | | return new SuccessTip(500,"已存在已启用的新人优惠券!"); |
| | | } |
| | | } |
| | | tCouponService.insert(tCoupon); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tCouponId) { |
| | | /*TCoupon tCoupon = tCouponService.selectById(tCouponId); |
| | | tCoupon.setCouponStatus(StatusEnum.DELETE.getCode()); |
| | | tCouponService.updateById(tCoupon);*/ |
| | | tCouponService.deleteById(tCouponId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改优惠券状态 |
| | | */ |
| | | @RequestMapping(value = "/update-status") |
| | | @ResponseBody |
| | | public Object updateStatus(Integer id,Integer status) { |
| | | TCoupon tCoupon = tCouponService.selectById(id); |
| | | |
| | | // 查询已启用的新人券数量 |
| | | int count = tCouponService.selectCount(new EntityWrapper<TCoupon>().eq("coupon_state", 1) |
| | | .eq("coupon_type",2)); |
| | | |
| | | // 判断是否为新人券,新人券只可启用一条记录 |
| | | if(count > 0 && 2 == tCoupon.getCouponType() && 2 == status){ |
| | | return new SuccessTip(500,"已有启动的新人券!"); |
| | | } |
| | | |
| | | if(1 == status){ |
| | | tCoupon.setCouponState(2); |
| | | } |
| | | if(2 == status){ |
| | | tCoupon.setCouponState(1); |
| | | } |
| | | tCouponService.updateById(tCoupon); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TCoupon tCoupon) { |
| | | tCouponService.updateById(tCoupon); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tCouponId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tCouponId") Integer tCouponId) { |
| | | return tCouponService.selectById(tCouponId); |
| | | } |
| | | |
| | | /** |
| | | * 发放优惠券 |
| | | */ |
| | | @ApiOperation(value = "发放优惠券") |
| | | @RequestMapping(value = "/sendCouponToUser") |
| | | @ResponseBody |
| | | public Object sendCouponToUser(CouponSendReq couponSendReq) { |
| | | |
| | | List<Integer> userIds = couponSendReq.getUserIds(); |
| | | |
| | | // 查询选择的优惠券 |
| | | TCoupon tCoupon = tCouponService.selectById(couponSendReq.getCouponId()); |
| | | |
| | | List<TUserToCoupon> tUserToCoupons = new ArrayList<>(userIds.size()); |
| | | |
| | | for (Integer userId : userIds) { |
| | | // 创建用户优惠券关联表 |
| | | TUserToCoupon tUserToCoupon = new TUserToCoupon(); |
| | | tUserToCoupon.setCouponId(tCoupon.getId()); |
| | | tUserToCoupon.setUserId(userId); |
| | | tUserToCoupon.setCouponTotal(1); |
| | | tUserToCoupon.setValidCount(1); |
| | | Date expireTime = Date.from(LocalDate.now().plusDays(tCoupon.getCouponValidity()).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()); |
| | | tUserToCoupon.setExpireTime(expireTime); |
| | | |
| | | // 添加发放人id和类型 |
| | | if(ShiroKit.getUser().getRoleType() == 1){ |
| | | tUserToCoupon.setObjectId(1); |
| | | }else { |
| | | tUserToCoupon.setObjectId(ShiroKit.getUser().getObjectId()); |
| | | } |
| | | tUserToCoupon.setRoleType(ShiroKit.getUser().getRoleType()); |
| | | |
| | | tUserToCoupons.add(tUserToCoupon); |
| | | } |
| | | tUserToCouponService.insertBatch(tUserToCoupons); |
| | | |
| | | // 查询该优惠券的列表 |
| | | /*List<TCoupon> tCoupons = tCouponService.selectList(new EntityWrapper<TCoupon>().eq("coupon_name", couponSendReq.getCouponName()) |
| | | .eq("coupon_status",CouponStatusEnum.UNISSUED.getCode())); |
| | | Assert.isTrue(!CollectionUtils.isEmpty(tCoupons),"该优惠券不存在!"); |
| | | List<TCoupon> tCouponList = new ArrayList<>(); |
| | | // 判断是选中的人多还是优惠券的数量较多 |
| | | if(tCoupons.size() > userIds.size()){ |
| | | for (Integer userId : userIds) { |
| | | Iterator<TCoupon> iterator = tCoupons.iterator(); |
| | | while (iterator.hasNext()){ |
| | | TCoupon next = iterator.next(); |
| | | next.setCouponStatus(CouponStatusEnum.NOT_USED.getCode()); |
| | | next.setUserId(userId); |
| | | tCouponList.add(next); |
| | | iterator.remove(); |
| | | break; |
| | | } |
| | | } |
| | | }else { |
| | | for (TCoupon tCoupon : tCoupons) { |
| | | Iterator<Integer> iterator = userIds.iterator(); |
| | | while (iterator.hasNext()){ |
| | | tCoupon.setCouponStatus(CouponStatusEnum.NOT_USED.getCode()); |
| | | tCoupon.setUserId(iterator.next()); |
| | | tCouponList.add(tCoupon); |
| | | iterator.remove(); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if(!CollectionUtils.isEmpty(tCouponList)){ |
| | | tCouponService.updateBatchById(tCouponList); |
| | | }*/ |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.SuccessTip; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverCommissionResp; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import com.stylefeng.guns.modular.system.controller.util.HttpUtils; |
| | | import com.stylefeng.guns.modular.system.controller.util.TokenUtils; |
| | | import com.stylefeng.guns.modular.system.controller.util.UUIDUtil; |
| | | import com.stylefeng.guns.modular.system.enums.UserTypeEnum; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.model.TDriverWork; |
| | | import com.stylefeng.guns.modular.system.model.TRechargeRecord; |
| | | import com.stylefeng.guns.modular.system.model.TRegion; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.Period; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-20 09:07:06 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tDriver") |
| | | public class TDriverController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tDriver/"; |
| | | |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | |
| | | @Autowired |
| | | private ITAgentService tAgentService; |
| | | |
| | | @Autowired |
| | | private ITBranchOfficeService tBranchOfficeService; |
| | | @Autowired |
| | | private RedisTemplate<String,String> redisTemplate; |
| | | @Autowired |
| | | private HttpUtils httpUtils; |
| | | @Autowired |
| | | private TokenUtils tokenUtils; |
| | | @Autowired |
| | | private ITDriverWorkService tDriverWorkService; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | @Autowired |
| | | private ITRechargeRecordService tRechargeRecordService; |
| | | |
| | | private Logger log = LoggerFactory.getLogger(this.getClass()); |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tDriver.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到佣金首页 |
| | | */ |
| | | @RequestMapping("/commission") |
| | | public String commissionIndex() { |
| | | return PREFIX + "tDriverCommission.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tDriver_add") |
| | | public String tDriverAdd() { |
| | | return PREFIX + "tDriver_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tDriver_update") |
| | | public String tDriverUpdate( Integer tDriverId, Model model) { |
| | | TDriver tDriver = tDriverService.selectById(tDriverId); |
| | | TDriverResp tDriverResp = new TDriverResp(); |
| | | BeanUtils.copyProperties(tDriver,tDriverResp); |
| | | |
| | | // 查询邀请人 |
| | | TDriver tDriver1 = tDriverService.selectById(tDriver.getInviterId()); |
| | | if(Objects.nonNull(tDriver1)){ |
| | | tDriverResp.setInviterName(tDriver1.getName()); |
| | | tDriverResp.setInviterPhone(tDriver1.getPhone()); |
| | | } |
| | | |
| | | // 查询区域 |
| | | TRegion district = tRegionService.selectOne(new EntityWrapper<TRegion>().eq("code", tDriver.getAreaCode()) |
| | | .last("LIMIT 1")); |
| | | TRegion city = tRegionService.selectOne(new EntityWrapper<TRegion>().eq("code", tDriver.getCityCode()) |
| | | .last("LIMIT 1")); |
| | | |
| | | tDriverResp.setArea(tDriver.getProvinceName()+"/"+tDriver.getCityName()+"/"+tDriver.getAreaName()); |
| | | if(Objects.nonNull(district) && Objects.nonNull(city)){ |
| | | tDriverResp.setAreaId(city.getParentId()+"/"+city.getId()+"/"+district.getId()); |
| | | } |
| | | |
| | | model.addAttribute("item",tDriverResp); |
| | | LogObjectHolder.me().set(tDriver); |
| | | return PREFIX + "tDriver_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转冻结页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tDriver_start_and_stop") |
| | | public String tAppUserStartAndStop( Integer id, |
| | | Model model) { |
| | | TDriver tDriver = tDriverService.selectById(id); |
| | | |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("status",tDriver.getStatus()); |
| | | return PREFIX + "tDriverStartAndStop.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转充值页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/rechargeBalancePage") |
| | | public String rechargeBalancePage( Integer id, |
| | | Model model) { |
| | | model.addAttribute("id",id); |
| | | return PREFIX + "tDriverRechargeBalancePage.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转异常页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tDriver_exception") |
| | | public String tDriverException(Model model) { |
| | | model.addAttribute("isException",2); |
| | | return PREFIX + "tDriverException.html"; |
| | | } |
| | | /** |
| | | * 跳转异常启用冻结页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tDriverException_start_and_stop") |
| | | public String tDriverExceptionStartAndStop(Integer id,Model model) { |
| | | TDriver tDriver = tDriverService.selectById(id); |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("status",tDriver.getStatus()); |
| | | return PREFIX + "tDriverExceptionStartAndStop.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转审核页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/auditPage") |
| | | public String auditPage( Integer id,Model model) { |
| | | tDriverService.auditPage(id,model); |
| | | return PREFIX + "tDriverAudit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转详情页面 |
| | | */ |
| | | @RequestMapping("/driverDetail") |
| | | public String driverDetail(Integer tDriverId, Model model) { |
| | | tDriverService.auditPage(tDriverId,model); |
| | | return PREFIX + "tDriverDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 佣金跳转详情页面 |
| | | */ |
| | | @RequestMapping("/commission/driverCommissionDetail") |
| | | public String driverCommissionDetail(Integer tDriverId,Integer levelFlag, Model model) { |
| | | tDriverService.driverCommissionDetail(tDriverId,levelFlag,model); |
| | | return PREFIX + "tDriverCommissionDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转区域页面编辑 |
| | | */ |
| | | @RequestMapping("/areaPageUpdate") |
| | | public String areaPageUpdate(String area,String areaId,Model model) { |
| | | |
| | | String[] split = area.split("/"); |
| | | model.addAttribute("provinceName",split[0]); |
| | | model.addAttribute("cityName",split[1]); |
| | | model.addAttribute("districtName",split[2]); |
| | | |
| | | String[] split1 = areaId.split("/"); |
| | | model.addAttribute("provinceId",split1[0]); |
| | | model.addAttribute("cityId",split1[1]); |
| | | model.addAttribute("districtId",split1[2]); |
| | | |
| | | |
| | | List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("provinceList",tRegions); |
| | | List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | |
| | | |
| | | // 查询市 |
| | | List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", split1[0])); |
| | | model.addAttribute("cityList",tRegions1); |
| | | |
| | | // 查询区 |
| | | List<Integer> cityIds = tRegions1.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | List<TRegion> tRegions2 = tRegionService.selectList(new EntityWrapper<TRegion>().in("parent_id", cityIds)); |
| | | model.addAttribute("districtList",tRegions2); |
| | | |
| | | return PREFIX + "tDriverAreaUpdate.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转区域页面新增 |
| | | */ |
| | | @RequestMapping("/areaPageAdd") |
| | | public String areaPageAdd(String area,String areaId,Model model) { |
| | | String[] split1 = areaId.split("/"); |
| | | List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("provinceList",tRegions); |
| | | List<Integer> provinceIds = tRegions.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | // 查询市 |
| | | List<TRegion> tRegions1 = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", split1[0])); |
| | | model.addAttribute("cityList",tRegions1); |
| | | |
| | | // 查询区 |
| | | List<Integer> cityIds = tRegions1.stream().map(TRegion::getId).collect(Collectors.toList()); |
| | | List<TRegion> tRegions2 = tRegionService.selectList(new EntityWrapper<TRegion>().in("parent_id", cityIds)); |
| | | model.addAttribute("districtList",tRegions2); |
| | | |
| | | if(StringUtils.hasLength(area) && StringUtils.hasLength(areaId)){ |
| | | String[] split = area.split("/"); |
| | | model.addAttribute("provinceName",split[0]); |
| | | model.addAttribute("cityName",split[1]); |
| | | if(split.length>2){ |
| | | model.addAttribute("districtName",split[2]); |
| | | }else { |
| | | model.addAttribute("districtName",""); |
| | | } |
| | | |
| | | model.addAttribute("provinceId",split1[0]); |
| | | model.addAttribute("cityId",split1[1]); |
| | | if(split1.length>2) { |
| | | model.addAttribute("districtId", split1[2]); |
| | | }else { |
| | | model.addAttribute("districtId", ""); |
| | | } |
| | | }else { |
| | | model.addAttribute("provinceName",""); |
| | | model.addAttribute("cityName","split[1]"); |
| | | model.addAttribute("districtName",""); |
| | | |
| | | model.addAttribute("provinceId",""); |
| | | model.addAttribute("cityId","split1[1]"); |
| | | model.addAttribute("districtId", ""); |
| | | } |
| | | return PREFIX + "tDriverAreaAdd.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,String phone,Integer status) { |
| | | EntityWrapper<TDriver> wrapper = tDriverService.getPageList(createTime,phone,status); |
| | | wrapper.orderBy("createTime",false); |
| | | List<TDriver> tDrivers = tDriverService.selectList(wrapper); |
| | | List<TDriverResp> tDriverResp = tDriverService.getTDriverResp(tDrivers); |
| | | for (TDriverResp driverResp : tDriverResp) { |
| | | TDriverWork tDriverWork = tDriverWorkService.selectOne(new EntityWrapper<TDriverWork>() |
| | | .eq("driverId", driverResp.getId()) |
| | | .orderBy("workTime", false) |
| | | .last("LIMIT 1")); |
| | | if(Objects.nonNull(tDriverWork)){ |
| | | // 如果是下班状态,计算未上线天数,,如果为上班状态,则设置为0 |
| | | if(tDriverWork.getStatus() == 1){ |
| | | driverResp.setNotOnlineCount(0); |
| | | }else { |
| | | Period period = Period.between(DateUtil.dateToLocalDate(tDriverWork.getOffWorkTime()), LocalDate.now()); |
| | | driverResp.setNotOnlineCount(period.getYears()*365 + period.getMonths()*30 + Math.abs(period.getDays())); |
| | | } |
| | | }else { |
| | | if(Objects.nonNull(driverResp.getApprovalTime())){ |
| | | // 没有上班记录,计算审核时间 |
| | | Period period = Period.between(DateUtil.dateToLocalDate(driverResp.getApprovalTime()), LocalDate.now()); |
| | | driverResp.setNotOnlineCount(period.getYears()*365 + period.getMonths()*30 + Math.abs(period.getDays())); |
| | | }else { |
| | | driverResp.setNotOnlineCount(0); |
| | | } |
| | | } |
| | | } |
| | | return tDriverResp; |
| | | } |
| | | /** |
| | | * 获取佣金列表 |
| | | */ |
| | | @RequestMapping(value = "/commission/list") |
| | | @ResponseBody |
| | | public Object commissionList(String name,String phone,Integer status) { |
| | | EntityWrapper<TDriver> wrapper = tDriverService.getCommissionPageList(name,phone,status); |
| | | List<TDriver> tDrivers = tDriverService.selectList(wrapper); |
| | | List<TDriverCommissionResp> commissionResp = tDriverService.getTDriverCommissionResp(tDrivers); |
| | | for (TDriverCommissionResp tDriverCommissionResp : commissionResp) { |
| | | tDriverCommissionResp.setLevelFlag(0); |
| | | } |
| | | return commissionResp; |
| | | } |
| | | /** |
| | | * 获取异常列表 |
| | | */ |
| | | @RequestMapping(value = "/exceptionList") |
| | | @ResponseBody |
| | | public Object exceptionList(String createTime,String phone,Integer status) { |
| | | EntityWrapper<TDriver> wrapper = tDriverService.getPageList(createTime,phone,status); |
| | | wrapper.eq("isException",2); |
| | | wrapper.orderBy("createTime",false); |
| | | List<TDriver> tDrivers = tDriverService.selectList(wrapper); |
| | | List<TDriverResp> tDriverResp = tDriverService.getTDriverResp(tDrivers); |
| | | for (TDriverResp driverResp : tDriverResp) { |
| | | TDriverWork tDriverWork = tDriverWorkService.selectOne(new EntityWrapper<TDriverWork>() |
| | | .eq("driverId", driverResp.getId()) |
| | | .orderBy("workTime", false) |
| | | .last("LIMIT 1")); |
| | | if(Objects.nonNull(tDriverWork)){ |
| | | // 如果是下班状态,计算未上线天数,,如果为上班状态,则设置为0 |
| | | if(tDriverWork.getStatus() == 1){ |
| | | driverResp.setNotOnlineCount(0); |
| | | }else { |
| | | Period period = Period.between(DateUtil.dateToLocalDate(tDriverWork.getOffWorkTime()), LocalDate.now()); |
| | | driverResp.setNotOnlineCount(period.getYears()*365 + period.getMonths()*30 + Math.abs(period.getDays())); |
| | | } |
| | | }else { |
| | | if(Objects.nonNull(driverResp.getApprovalTime())){ |
| | | // 没有上班记录,计算审核时间 |
| | | Period period = Period.between(DateUtil.dateToLocalDate(driverResp.getApprovalTime()), LocalDate.now()); |
| | | driverResp.setNotOnlineCount(period.getYears()*365 + period.getMonths()*30 + Math.abs(period.getDays())); |
| | | }else { |
| | | driverResp.setNotOnlineCount(0); |
| | | } |
| | | } |
| | | } |
| | | return tDriverResp; |
| | | } |
| | | |
| | | /** |
| | | * 佣金关联列表 |
| | | */ |
| | | @RequestMapping(value = "/commission/connect/list") |
| | | @ResponseBody |
| | | public Object commissionConnectList(String driverId,Integer levelFlag) { |
| | | // 查询当前用户的用户信息 |
| | | TDriver tDriver = tDriverService.selectById(driverId); |
| | | |
| | | EntityWrapper<TDriver> wrapper = new EntityWrapper<>(); |
| | | if(StringUtils.hasLength(driverId)){ |
| | | wrapper.eq("inviterId",driverId); |
| | | } |
| | | wrapper.orderBy("createTime",false); |
| | | List<TDriver> list = tDriverService.selectList(wrapper); |
| | | List<TDriverCommissionResp> commissionResp = new ArrayList<>(); |
| | | try{ |
| | | commissionResp = tDriverService.getTDriverCommissionResp(list); |
| | | for (TDriverCommissionResp tDriverCommissionResp : commissionResp) { |
| | | if(Objects.nonNull(tDriver)){ |
| | | tDriverCommissionResp.setInviterName(tDriver.getName()); |
| | | tDriverCommissionResp.setInviterPhone(tDriver.getPhone()); |
| | | if(levelFlag == 0){ |
| | | tDriverCommissionResp.setLevelFlag(1); |
| | | tDriverCommissionResp.setLevel("一级"); |
| | | } |
| | | if(levelFlag == 1){ |
| | | tDriverCommissionResp.setLevelFlag(2); |
| | | tDriverCommissionResp.setLevel("二级"); |
| | | } |
| | | if(levelFlag == 2){ |
| | | tDriverCommissionResp.setLevelFlag(3); |
| | | tDriverCommissionResp.setLevel("三级"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | return commissionResp; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tDriverService.selectList(null); |
| | | } |
| | | /** |
| | | * ocr |
| | | */ |
| | | @RequestMapping(value = "/ocr") |
| | | @ResponseBody |
| | | public JSONObject ocr(MultipartFile multipartFile) { |
| | | /*String accessToken = redisTemplate.opsForValue().get(TokenUtils.ACCESS_TOKEN_CACHE_KEY); |
| | | if (!StringUtils.hasLength(accessToken)) { |
| | | accessToken = tokenUtils.getSimpleAccessToken(); |
| | | } |
| | | File file = new File(imgUrl); |
| | | String url = Constant.OCR_URL.replace("MODE", "scan").replace("ACCESS_TOKEN", accessToken); |
| | | String result = httpUtils.registRequest(url, file); |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | System.err.println(jsonObject); |
| | | return jsonObject;*/ |
| | | String originalFilename = multipartFile.getOriginalFilename(); |
| | | String[] filename = originalFilename.split("\\."); |
| | | log.info("tupian::"+filename[0]+"//"+filename[1]); |
| | | File file= null; |
| | | try { |
| | | file = File.createTempFile(filename[0], "."+filename[1]); |
| | | multipartFile.transferTo(file); |
| | | file.deleteOnExit(); |
| | | log.info("file:"+file.getName()); |
| | | } catch (IOException e) { |
| | | log.error("ocr识别失败:{}",e.getMessage()); |
| | | } |
| | | return tDriverService.ocr(file); |
| | | } |
| | | |
| | | /** |
| | | * 审核 |
| | | */ |
| | | @RequestMapping(value = "/auditSubmit") |
| | | @ResponseBody |
| | | public Object auditSubmit(Integer id,Integer approvalStatus,String approvalNotes) { |
| | | TDriver tDriver = tDriverService.selectById(id); |
| | | tDriver.setApprovalStatus(approvalStatus); |
| | | tDriver.setApprovalNotes(approvalNotes); |
| | | // 审核用户id |
| | | Subject subject = ShiroKit.getSubject(); |
| | | ShiroUser shiroUser = (ShiroUser)subject.getPrincipal(); |
| | | tDriver.setApprovalUserId(shiroUser.getId()); |
| | | tDriver.setApprovalTime(new Date()); |
| | | tDriverService.updateById(tDriver); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TDriver tDriver) { |
| | | |
| | | int count = tDriverService.selectCount(new EntityWrapper<TDriver>().eq("phone", tDriver.getPhone())); |
| | | if(count>0){ |
| | | return new SuccessTip(500,"该司机已存在!"); |
| | | } |
| | | Object o = tDriverService.addOrUpdate(tDriver); |
| | | if(Objects.nonNull(o)){ |
| | | return o; |
| | | } |
| | | // 默认值板块 |
| | | tDriver.setName(tDriver.getName().replace(" ","")); |
| | | tDriver.setEmergencyContact(tDriver.getEmergencyContact().replace(" ","")); |
| | | tDriver.setCode(UUIDUtil.getNumberRandom(16)); |
| | | tDriver.setBalance(BigDecimal.ZERO); |
| | | tDriver.setBackgroundBalance(BigDecimal.ZERO); |
| | | tDriver.setCommission(BigDecimal.ZERO); |
| | | tDriverService.insert(tDriver); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tDriverId) { |
| | | tDriverService.deleteById(tDriverId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改司机状态 |
| | | */ |
| | | @RequestMapping(value = "/update-status") |
| | | @ResponseBody |
| | | public Object updateStatus(Integer id,Integer status, |
| | | String remark) { |
| | | TDriver tDriver = tDriverService.selectById(id); |
| | | if(1 == status){ |
| | | tDriver.setStatus(2); |
| | | String value = redisUtil.getValue("DRIVER_" + tDriver.getPhone()); |
| | | redisUtil.remove(value); |
| | | redisUtil.remove("DRIVER_" + tDriver.getPhone()); |
| | | TDriverWork tDriverWork = tDriverWorkService.selectOne(new EntityWrapper<TDriverWork>() |
| | | .eq("driverId", tDriver.getId()) |
| | | .eq("status", 1) |
| | | .orderBy("workTime", false) |
| | | .last("LIMIT 1")); |
| | | if(Objects.nonNull(tDriverWork)){ |
| | | tDriverWork.setStatus(2); |
| | | tDriverWork.setOffWorkTime(new Date()); |
| | | tDriverWorkService.updateById(tDriverWork); |
| | | } |
| | | } |
| | | if(2 == status){ |
| | | tDriver.setStatus(1); |
| | | } |
| | | tDriver.setRemark(remark); |
| | | tDriverService.updateById(tDriver); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 充值余额 |
| | | */ |
| | | @ApiOperation(value = "充值余额") |
| | | @RequestMapping(value = "/recharge-balance") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @ResponseBody |
| | | public Object rechargeBalance(Integer id, String money) { |
| | | TDriver tDriver = tDriverService.selectById(id); |
| | | tDriver.setBackgroundBalance(new BigDecimal(money).add(tDriver.getBackgroundBalance())); |
| | | tDriverService.updateById(tDriver); |
| | | |
| | | // 添加充值记录 |
| | | TRechargeRecord tRechargeRecord = new TRechargeRecord(); |
| | | tRechargeRecord.setType(UserTypeEnum.AGENT.getCode()); |
| | | tRechargeRecord.setUserId(id); |
| | | tRechargeRecord.setCode(UUIDUtil.getNumberRandom(16)); |
| | | tRechargeRecord.setAmount(new BigDecimal(money)); |
| | | tRechargeRecord.setPayType(2); |
| | | tRechargeRecord.setPayTime(new Date()); |
| | | tRechargeRecord.setPayStatus(2); |
| | | tRechargeRecord.setCreateTime(new Date()); |
| | | Integer id1 = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); |
| | | tRechargeRecord.setAgentId(id1); |
| | | tRechargeRecordService.insert(tRechargeRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TDriver tDriver) { |
| | | TDriver driver = tDriverService.selectOne(new EntityWrapper<TDriver>().eq("phone", tDriver.getPhone()) |
| | | .last("LIMIT 1")); |
| | | if(Objects.nonNull(driver) && !tDriver.getId().equals(driver.getId())){ |
| | | return new SuccessTip(500,"该司机已存在!"); |
| | | } |
| | | // Object ocr = ocr("E:\\071bf986db0b00355c0ed190bbd3b16.png"); |
| | | // System.err.println(ocr); |
| | | Object o = tDriverService.addOrUpdate(tDriver); |
| | | if(Objects.nonNull(o)){ |
| | | return o; |
| | | } |
| | | tDriver.setName(tDriver.getName().replace(" ","")); |
| | | tDriver.setEmergencyContact(tDriver.getEmergencyContact().replace(" ","")); |
| | | tDriverService.updateById(tDriver); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tDriverId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tDriverId") Integer tDriverId) { |
| | | return tDriverService.selectById(tDriverId); |
| | | } |
| | | |
| | | @ApiOperation(value = "省查询",notes="省查询") |
| | | @RequestMapping(value = "/areaProvince") |
| | | @ResponseBody |
| | | public Object areaProvince(Model model) { |
| | | return tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | } |
| | | |
| | | @ApiOperation(value = "市区查询",notes="市区查询") |
| | | @RequestMapping(value = "/areaCity") |
| | | @ResponseBody |
| | | public Object areaCity(Integer parentId,Model model) { |
| | | List<TRegion> tRegions = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", parentId)); |
| | | model.addAttribute("list",tRegions); |
| | | return tRegions; |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "导出司机列表",notes="导出司机列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void export(String createTime,String phone,Integer status,HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "DriverInfo"+time1+".xls"; |
| | | String[] title = new String[] {"编号","姓名","手机号","性别","驾驶证号码","身份证号码", |
| | | "身份证","所属代理商","所属分公司","钱包余额","累计订单量","当月订单量","积分","拒单次数","状态","审核状态","添加时间"}; |
| | | EntityWrapper<TDriver> wrapper = tDriverService.getPageList(createTime,phone,status); |
| | | wrapper.orderBy("createTime",false); |
| | | List<TDriver> tDrivers = tDriverService.selectList(wrapper); |
| | | List<TDriverResp> tDriverResp = tDriverService.getTDriverResp(tDrivers); |
| | | |
| | | String[][] values = new String[tDriverResp.size()][]; |
| | | for (int i = 0; i < tDriverResp.size(); i++) { |
| | | TDriverResp d = tDriverResp.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = d.getCode(); |
| | | values[i][1] = d.getName(); |
| | | values[i][2] = d.getPhone(); |
| | | Integer sex = d.getSex(); |
| | | if(Objects.isNull(sex)){ |
| | | values[i][3] = "未知"; |
| | | }else if(1 == sex){ |
| | | values[i][3] = "男"; |
| | | }else if(2 == sex){ |
| | | values[i][3] = "女"; |
| | | } |
| | | values[i][4] = d.getDriverLicenseNumber(); |
| | | values[i][5] = d.getIdcard(); |
| | | if(StringUtils.hasLength(d.getIdcardFront())){ |
| | | values[i][6] = "已上传"; |
| | | }else { |
| | | values[i][6] = "未上传"; |
| | | } |
| | | values[i][7] = d.getAgentName(); |
| | | values[i][8] = d.getBranchName(); |
| | | values[i][9] = String.valueOf(d.getBalance()); |
| | | values[i][10] = String.valueOf(d.getCumulativeOrderCount()); |
| | | values[i][11] = String.valueOf(d.getMonthOrderCount()); |
| | | values[i][12] = String.valueOf(d.getIntegral()); |
| | | values[i][13] = String.valueOf(d.getRefusalCount()); |
| | | Integer status1 = d.getStatus(); |
| | | if(1 == status1){ |
| | | values[i][14] = "正常"; |
| | | }else if(2 == status1){ |
| | | values[i][14] = "冻结"; |
| | | }else { |
| | | values[i][14] = "删除"; |
| | | } |
| | | Integer approvalStatus = d.getApprovalStatus(); |
| | | if(1 == approvalStatus){ |
| | | values[i][15] = "待审核"; |
| | | }else if(2 == approvalStatus){ |
| | | values[i][15] = "已同意"; |
| | | }else { |
| | | values[i][15] = "已拒绝"; |
| | | } |
| | | values[i][16] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getCreateTime()); |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "导出司机异常列表",notes="导出司机异常列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | @RequestMapping(value = "/export-exception") |
| | | @ResponseBody |
| | | public void exportException(String createTime,String phone,Integer status,HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "DriverExceptionInfo"+time1+".xls"; |
| | | String[] title = new String[] {"编号","姓名","手机号","性别","驾驶证号码","身份证号码", |
| | | "身份证","累计订单量","当月订单量","积分","连续未上线(天)","状态","添加时间"}; |
| | | EntityWrapper<TDriver> wrapper = tDriverService.getPageList(createTime,phone,status); |
| | | wrapper.eq("isException",2); |
| | | wrapper.orderBy("createTime",false); |
| | | List<TDriver> tDrivers = tDriverService.selectList(wrapper); |
| | | List<TDriverResp> tDriverResp = tDriverService.getTDriverResp(tDrivers); |
| | | for (TDriverResp driverResp : tDriverResp) { |
| | | TDriverWork tDriverWork = tDriverWorkService.selectOne(new EntityWrapper<TDriverWork>() |
| | | .eq("driverId", driverResp.getId()) |
| | | .orderBy("workTime", false) |
| | | .last("LIMIT 1")); |
| | | if(Objects.nonNull(tDriverWork)){ |
| | | // 如果是下班状态,计算未上线天数,,如果为上班状态,则设置为0 |
| | | if(tDriverWork.getStatus() == 1){ |
| | | driverResp.setNotOnlineCount(0); |
| | | }else { |
| | | Period period = Period.between(DateUtil.dateToLocalDate(tDriverWork.getOffWorkTime()), LocalDate.now()); |
| | | driverResp.setNotOnlineCount(Math.abs(period.getDays())); |
| | | } |
| | | }else { |
| | | // 没有上班记录,计算审核时间 |
| | | Period period = Period.between(DateUtil.dateToLocalDate(driverResp.getApprovalTime()), LocalDate.now()); |
| | | driverResp.setNotOnlineCount(Math.abs(period.getDays())); |
| | | } |
| | | } |
| | | |
| | | String[][] values = new String[tDriverResp.size()][]; |
| | | for (int i = 0; i < tDriverResp.size(); i++) { |
| | | TDriverResp d = tDriverResp.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = d.getCode(); |
| | | values[i][1] = d.getName(); |
| | | values[i][2] = d.getPhone(); |
| | | Integer sex = d.getSex(); |
| | | if(Objects.isNull(sex)){ |
| | | values[i][3] = "未知"; |
| | | }else if(1 == sex){ |
| | | values[i][3] = "男"; |
| | | }else if(2 == sex){ |
| | | values[i][3] = "女"; |
| | | } |
| | | values[i][4] = d.getDriverLicenseNumber(); |
| | | values[i][5] = d.getIdcard(); |
| | | if(StringUtils.hasLength(d.getIdcardFront())){ |
| | | values[i][6] = "已上传"; |
| | | }else { |
| | | values[i][6] = "未上传"; |
| | | } |
| | | values[i][7] = String.valueOf(d.getCumulativeOrderCount()); |
| | | values[i][8] = String.valueOf(d.getMonthOrderCount()); |
| | | values[i][9] = String.valueOf(d.getIntegral()); |
| | | values[i][10] = String.valueOf(Objects.isNull(d.getNotOnlineCount())?0:d.getNotOnlineCount()); |
| | | values[i][11] = "异常"; |
| | | values[i][12] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getCreateTime()); |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | @ApiOperation(value = "导出司机佣金列表",notes="导出司机佣金列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | @RequestMapping(value = "/export-commission") |
| | | @ResponseBody |
| | | public void exportCommission(String name,String phone,Integer status,HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "CommissionInfo"+time1+".xls"; |
| | | String[] title = new String[] {"姓名","手机号","所属代理商","推广人数","关联人数", |
| | | "累计获得佣金","可提现佣金","已提现金额","状态"}; |
| | | EntityWrapper<TDriver> wrapper = tDriverService.getCommissionPageList(name,phone,status); |
| | | // wrapper.ne("isException",2); |
| | | // 是否异常 |
| | | List<TDriver> list = tDriverService.selectList(wrapper); |
| | | |
| | | List<TDriverCommissionResp> commissionResp = tDriverService.getTDriverCommissionResp(list); |
| | | |
| | | String[][] values = new String[commissionResp.size()][]; |
| | | for (int i = 0; i < commissionResp.size(); i++) { |
| | | TDriverCommissionResp d = commissionResp.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = d.getName(); |
| | | values[i][1] = d.getPhone(); |
| | | values[i][2] = d.getAgentName(); |
| | | values[i][3] = String.valueOf(Objects.isNull(d.getNumberPromoters()) ? 0:d.getNumberPromoters()); |
| | | values[i][4] = String.valueOf(d.getConnectedPersons()); |
| | | values[i][5] = String.valueOf(d.getAccumulatedCommission()); |
| | | values[i][6] = String.valueOf(Objects.isNull(d.getCommission())?0:d.getCommission()); |
| | | values[i][7] = String.valueOf(d.getWithdrawnAmount()); |
| | | Integer status1 = d.getStatus(); |
| | | if(1 == status1){ |
| | | values[i][8] = "正常"; |
| | | }else if(2 == status1){ |
| | | values[i][8] = "冻结"; |
| | | }else if(3 == status1){ |
| | | values[i][8] = "已删除"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TDriverWork; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverWorkService; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-04-04 14:41:55 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tDriverWork") |
| | | public class TDriverWorkController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tDriverWork/"; |
| | | |
| | | @Autowired |
| | | private ITDriverWorkService tDriverWorkService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tDriverWork.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tDriverWork_add") |
| | | public String tDriverWorkAdd() { |
| | | return PREFIX + "tDriverWork_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tDriverWork_update/{tDriverWorkId}") |
| | | public String tDriverWorkUpdate(@PathVariable Integer tDriverWorkId, Model model) { |
| | | TDriverWork tDriverWork = tDriverWorkService.selectById(tDriverWorkId); |
| | | model.addAttribute("item",tDriverWork); |
| | | LogObjectHolder.me().set(tDriverWork); |
| | | return PREFIX + "tDriverWork_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tDriverWorkService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TDriverWork tDriverWork) { |
| | | tDriverWorkService.insert(tDriverWork); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tDriverWorkId) { |
| | | tDriverWorkService.deleteById(tDriverWorkId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TDriverWork tDriverWork) { |
| | | tDriverWorkService.updateById(tDriverWork); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tDriverWorkId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tDriverWorkId") Integer tDriverWorkId) { |
| | | return tDriverWorkService.selectById(tDriverWorkId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.enums.StatusEnum; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TEdition; |
| | | import com.stylefeng.guns.modular.system.service.ITEditionService; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-14 09:44:02 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tEdition") |
| | | public class TEditionController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tEdition/"; |
| | | |
| | | @Autowired |
| | | private ITEditionService tEditionService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tEdition.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tEdition_add") |
| | | public String tEditionAdd() { |
| | | return PREFIX + "tEdition_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tEdition_update/{tEditionId}") |
| | | public String tEditionUpdate(@PathVariable Integer tEditionId, Model model) { |
| | | TEdition tEdition = tEditionService.selectById(tEditionId); |
| | | model.addAttribute("item",tEdition); |
| | | LogObjectHolder.me().set(tEdition); |
| | | return PREFIX + "tEdition_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,String editionNo) { |
| | | EntityWrapper<TEdition> wrapper = new EntityWrapper<>(); |
| | | if(StringUtils.hasLength(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); |
| | | Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); |
| | | wrapper.between("createTime",startTime,endTime); |
| | | } |
| | | if(StringUtils.hasLength(editionNo)){ |
| | | wrapper.like("editionNo",editionNo); |
| | | } |
| | | wrapper.ne("status", StatusEnum.DELETE.getCode()); |
| | | wrapper.orderBy("createTime",false); |
| | | return tEditionService.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tEditionService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TEdition tEdition) { |
| | | tEditionService.insert(tEdition); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tEditionId) { |
| | | TEdition tEdition = tEditionService.selectById(tEditionId); |
| | | tEdition.setStatus(StatusEnum.DELETE.getCode()); |
| | | tEditionService.updateById(tEdition); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TEdition tEdition) { |
| | | tEditionService.updateById(tEdition); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tEditionId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tEditionId") Integer tEditionId) { |
| | | return tEditionService.selectById(tEditionId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TEvaluateResp; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TEvaluate; |
| | | import com.stylefeng.guns.modular.system.service.ITEvaluateService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-27 14:03:41 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tEvaluate") |
| | | public class TEvaluateController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tEvaluate/"; |
| | | |
| | | @Autowired |
| | | private ITEvaluateService tEvaluateService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tEvaluate.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tEvaluate_add") |
| | | public String tEvaluateAdd() { |
| | | return PREFIX + "tEvaluate_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tEvaluate_update/{tEvaluateId}") |
| | | public String tEvaluateUpdate(@PathVariable Integer tEvaluateId, Model model) { |
| | | TEvaluate tEvaluate = tEvaluateService.selectById(tEvaluateId); |
| | | model.addAttribute("item",tEvaluate); |
| | | LogObjectHolder.me().set(tEvaluate); |
| | | return PREFIX + "tEvaluate_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转详情页面 |
| | | */ |
| | | @RequestMapping("/evaluateDetail") |
| | | public String evaluateDetail(Integer evaluateId, Model model) { |
| | | tEvaluateService.evaluateDetail(evaluateId,model); |
| | | return PREFIX + "tEvaluateDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,String userName,String driverName ,Integer score) { |
| | | return tEvaluateService.selectPageList(createTime,userName,driverName,null,score); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tEvaluateService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TEvaluate tEvaluate) { |
| | | tEvaluateService.insert(tEvaluate); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tEvaluateId) { |
| | | tEvaluateService.deleteById(tEvaluateId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TEvaluate tEvaluate) { |
| | | tEvaluateService.updateById(tEvaluate); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tEvaluateId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tEvaluateId") Integer tEvaluateId) { |
| | | return tEvaluateService.selectById(tEvaluateId); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出评价列表",notes="导出评价列表") |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void export(String createTime,String userName,String driverName,Integer score, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "EvaluateInfo"+time1+".xls"; |
| | | String[] title = new String[] {"评价时间","订单编号","评论用户", |
| | | "评论用户手机号","评论司机","司机手机号","评价分数","评价内容"}; |
| | | List<TEvaluateResp> list = tEvaluateService.selectPageList(createTime, userName, driverName, null, score); |
| | | String[][] values = new String[list.size()][]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | TEvaluateResp d = list.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); |
| | | values[i][1] = d.getCode(); |
| | | values[i][2] = d.getUserName(); |
| | | values[i][3] = d.getUserPhone(); |
| | | values[i][4] = d.getDriverName(); |
| | | values[i][5] = d.getDriverPhone(); |
| | | values[i][6] = String.valueOf(Objects.nonNull(d.getScore())?d.getScore(): ""); |
| | | Integer score1 = d.getScore(); |
| | | if(Objects.nonNull(score1)){ |
| | | if(1 == score1){ |
| | | values[i][6] = "非常差"; |
| | | }else if (2 == score1){ |
| | | values[i][6] = "差"; |
| | | }else if (3 == score1){ |
| | | values[i][6] = "一般"; |
| | | }else if (4 == score1){ |
| | | values[i][6] = "满意"; |
| | | }else if (5 == score1){ |
| | | values[i][6] = "非常满意"; |
| | | } |
| | | }else { |
| | | values[i][6] = ""; |
| | | } |
| | | values[i][7] = d.getEvaluate(); |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TSystemNotice; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemNoticeService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TFeedback; |
| | | import com.stylefeng.guns.modular.system.service.ITFeedbackService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 反馈管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-10 10:24:59 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tFeedback") |
| | | public class TFeedbackController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tFeedback/"; |
| | | |
| | | @Autowired |
| | | private ITFeedbackService tFeedbackService; |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService tSystemNoticeService; |
| | | |
| | | /** |
| | | * 跳转到司机反馈管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tFeedback.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到用户反馈管理首页 |
| | | */ |
| | | @RequestMapping("/userFeedback") |
| | | public String userFeedback() { |
| | | return PREFIX + "userFeedback.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加反馈管理 |
| | | */ |
| | | @RequestMapping("/tFeedback_add") |
| | | public String tFeedbackAdd() { |
| | | return PREFIX + "tFeedback_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改反馈管理 |
| | | */ |
| | | @RequestMapping("/tFeedback_immediately/{tFeedbackId}/{type}") |
| | | public String tFeedbackUpdate(@PathVariable Integer tFeedbackId, @PathVariable Integer type, Model model) { |
| | | model.addAttribute("tFeedbackId",tFeedbackId); |
| | | model.addAttribute("type",type); |
| | | return PREFIX + "tFeedback_immediately.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | | @RequestMapping("/lookDetail/{id}/{type}") |
| | | public String lookDetail(@PathVariable Integer id, @PathVariable Integer type, Model model) { |
| | | TFeedback tFeedback = tFeedbackService.selectById(id); |
| | | String str = ""; |
| | | if (1 == type){ |
| | | str = tFeedback.getContent(); |
| | | }else if (2 == type){ |
| | | str = tFeedback.getRemark(); |
| | | } |
| | | model.addAttribute("str",str); |
| | | return "/system/tComplaint/lookDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取司机反馈管理列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String driverName, |
| | | String driverPhone, |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tFeedbackService.getFeedbackList(page,beginTime,endTime,2,driverName,driverPhone,state)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 获取用户反馈管理列表 |
| | | */ |
| | | @RequestMapping(value = "/listUser") |
| | | @ResponseBody |
| | | public Object listUser(String insertTime, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tFeedbackService.getFeedbackList(page,beginTime,endTime,1,userName,userPhone,state)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 立即处理操作 |
| | | */ |
| | | @RequestMapping(value = "/immediately") |
| | | @ResponseBody |
| | | public Object immediately(@RequestParam Integer id,@RequestParam String remark) { |
| | | TFeedback tFeedback = tFeedbackService.selectById(id); |
| | | if (SinataUtil.isNotEmpty(tFeedback)){ |
| | | tFeedback.setCldate(new Date()); |
| | | tFeedback.setRemark(remark); |
| | | tFeedback.setHandleUserId(ShiroKit.getUser().getId()); |
| | | tFeedback.setState(2); |
| | | tFeedbackService.updateById(tFeedback); |
| | | |
| | | //增加系统消息 |
| | | TSystemNotice notice = new TSystemNotice(); |
| | | notice.setType(2); |
| | | notice.setUserType(tFeedback.getType()); |
| | | notice.setContent("反馈处理结果:【"+remark+"】。"); |
| | | notice.setUserId(tFeedback.getUserId()); |
| | | notice.setInsertTime(new Date()); |
| | | notice.setRead(1); |
| | | tSystemNoticeService.insert(notice); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.GunsApplication; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.state.Order; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TOrderServerResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.HttpUtils; |
| | | import com.stylefeng.guns.modular.system.enums.OrderStateEnum; |
| | | import com.stylefeng.guns.modular.system.enums.StatusEnum; |
| | | import com.stylefeng.guns.modular.system.model.TAgent; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.model.TDriverWork; |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import com.stylefeng.guns.modular.system.pojo.GaoDePoJo; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.Duration; |
| | | import java.time.LocalDate; |
| | | import java.time.Period; |
| | | import java.util.*; |
| | | import java.util.concurrent.atomic.AtomicInteger; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-14 15:15:19 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tHomePage") |
| | | public class THomePageController extends BaseController { |
| | | |
| | | private final static Logger log = LoggerFactory.getLogger(THomePageController.class); |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | | @Autowired |
| | | private ITAgentService tAgentService; |
| | | @Autowired |
| | | private ITDriverService tDriverService; |
| | | @Autowired |
| | | private ITOrderService tOrderService; |
| | | @Autowired |
| | | private ITRevenueService tRevenueService; |
| | | @Autowired |
| | | private ITDriverWorkService tDriverWorkService; |
| | | @Autowired |
| | | private GaoDePoJo gaoDePoJo; |
| | | @Autowired |
| | | private HttpUtils httpUtils; |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | private String PREFIX = "/system/tHomePage/"; |
| | | |
| | | /** |
| | | * 跳转到地图 |
| | | */ |
| | | @RequestMapping("/map") |
| | | public String map(Integer agentId,Integer type,Model model) { |
| | | |
| | | Integer objectId = ShiroKit.getUser().getObjectId(); |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if(roleType == 3 && Objects.nonNull(objectId)){ |
| | | agentId = objectId; |
| | | } |
| | | |
| | | // 查询所有代理商 |
| | | List<TAgent> agentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .ne("status", StatusEnum.DELETE.getCode()) |
| | | .ne("principal","")); |
| | | model.addAttribute("agentList",agentList); |
| | | // 查询广东省广州市的地址解析 |
| | | Map<String, String> map = geocode("广东省广州市"); |
| | | model.addAttribute("addressLon",map.get("addressLon")); |
| | | model.addAttribute("addressLat",map.get("addressLat")); |
| | | // 查询广东全区域数据 查询广东所有的代理商 |
| | | List<TAgent> tAgentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .eq("provinceCode", "440000")); |
| | | List<Integer> ids = tAgentList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | // 查询统计在线司机,待接单,服务中,已完成,已取消 |
| | | List<TDriver> onLineDriver = tDriverService.selectList(new EntityWrapper<TDriver>() |
| | | .in("agentId", ids)); |
| | | List<TAgent> tAgentAllList = tAgentService.selectList(new EntityWrapper<TAgent>()); |
| | | List<Integer> allIds = tAgentAllList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | tOrderService.getDataStatisticsCountByIds(allIds,model); |
| | | |
| | | // 查询服务中的订单列表 |
| | | List<TOrderServerResp> orderServerRespList = tOrderService.getDataStatisticsServerListByIds(allIds); |
| | | List<TOrder> orderList = tOrderService.selectList(new EntityWrapper<TOrder>()); |
| | | // 查询司机 |
| | | for (TOrderServerResp tOrderServerResp : orderServerRespList) { |
| | | TDriver tDriver = tDriverService.selectById(tOrderServerResp.getDriverId()); |
| | | tOrderServerResp.setAvatar(tDriver.getAvatar()); |
| | | tOrderServerResp.setDriverName(tDriver.getName()); |
| | | List<TOrder> collect = orderList.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) && |
| | | (order.getState().equals(OrderStateEnum.WAIT_PAY.getCode()) |
| | | || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) |
| | | || order.getState().equals(OrderStateEnum.FINISH.getCode()))).collect(Collectors.toList()); |
| | | // 驾龄 |
| | | Period period = Period.between(LocalDate.now(), DateUtil.dateToLocalDate(tDriver.getFirstCertificateTime())); |
| | | tOrderServerResp.setDrivingExperience(Math.max(Math.abs(period.getYears()), 1)); |
| | | // 代驾次数 |
| | | tOrderServerResp.setValetDrivingCount(collect.size()); |
| | | // 行驶时间 |
| | | long goTime = 0; |
| | | for (TOrder tOrder : collect) { |
| | | // 下车时间 |
| | | Date getoffTime = tOrder.getGetoffTime(); |
| | | // 上车时间 |
| | | Date boardingTime = tOrder.getBoardingTime(); |
| | | long minutes = Duration.between(DateUtil.dateToLocalDate(getoffTime), DateUtil.dateToLocalDate(boardingTime)).toMinutes(); |
| | | goTime += Math.abs(minutes); |
| | | } |
| | | tOrderServerResp.setGoTime(Long.valueOf(goTime).intValue()); |
| | | // 行驶里程 |
| | | int sum = collect.stream().mapToInt(TOrder::getActualMileage).sum(); |
| | | tOrderServerResp.setMileageTraveled(sum/1000); |
| | | } |
| | | model.addAttribute("serverList",orderServerRespList); |
| | | // 查询今天所有订单 |
| | | List<TOrder> allList = tOrderService.getDataStatisticsAllListByIds(ids,type); |
| | | List<List<String>> list = new ArrayList<>(allList.size()); |
| | | for (TOrder tOrder : allList) { |
| | | List<String> obj = new ArrayList<>(3); |
| | | obj.add(tOrder.getStartLng()); |
| | | obj.add(tOrder.getStartLat()); |
| | | obj.add(String.valueOf(tOrder.getState())); |
| | | list.add(obj); |
| | | } |
| | | model.addAttribute("allList",list); |
| | | List<List<String>> list1 = new ArrayList<>(); |
| | | AtomicInteger count = new AtomicInteger(0); |
| | | for (TDriver tDriver : onLineDriver) { |
| | | |
| | | String value1 = redisUtil.getValue("DRIVER_" + tDriver.getPhone()); |
| | | String value2 = redisUtil.getValue(value1); |
| | | if(ToolUtil.isNotEmpty(value2)){ |
| | | count.addAndGet(1); |
| | | } |
| | | |
| | | List<String> obj = new ArrayList<>(3); |
| | | String value = redisUtil.getValue("DRIVER" + tDriver.getId()); |
| | | if(ToolUtil.isEmpty(value)){ |
| | | continue; |
| | | } |
| | | obj.add(value.split(",")[0]);// 经度 |
| | | obj.add(value.split(",")[1]);// 纬度 |
| | | obj.add(String.valueOf(tDriver.getServerStatus()));// 服务状态 |
| | | list1.add(obj); |
| | | } |
| | | model.addAttribute("onLineDriverCount",count.get()); |
| | | // 拿到所有在线司机地址 |
| | | model.addAttribute("onLineDriver",list1); |
| | | return PREFIX + "tHomePageMap.html"; |
| | | } |
| | | |
| | | @RequestMapping("/getMap") |
| | | @ResponseBody |
| | | public Object getMap(Integer agentId,Integer type,Model model) { |
| | | Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if(roleType == 3 && Objects.nonNull(objectId)){ |
| | | agentId = objectId; |
| | | } |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | // 查询所有代理商 |
| | | List<TAgent> agentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .ne("status", StatusEnum.DELETE.getCode()) |
| | | .ne("principal","")); |
| | | |
| | | map.put("agentList",agentList); |
| | | if(Objects.nonNull(agentId)){ |
| | | // 查询当前代理商 |
| | | TAgent tAgent = tAgentService.selectById(agentId); |
| | | Map<String, String> mapAddress = geocode(tAgent.getProvinceName()+tAgent.getCityName()); |
| | | map.put("addressLon",mapAddress.get("addressLon")); |
| | | map.put("addressLat",mapAddress.get("addressLat")); |
| | | // 查询统计在线司机,待接单,服务中,已完成,已取消 |
| | | List<TDriver> onLineDriver = tDriverService.selectList(new EntityWrapper<TDriver>() |
| | | .eq("agentId", agentId)); |
| | | List<TAgent> tAgentAllList = tAgentService.selectList(new EntityWrapper<TAgent>()); |
| | | List<Integer> allIds = tAgentAllList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | tOrderService.getDataStatisticsCountByIdsGetMap(allIds,map); |
| | | |
| | | // 查询服务中的订单列表 |
| | | List<TOrderServerResp> orderServerRespList = tOrderService.getDataStatisticsServerListByIds(allIds); |
| | | List<TOrder> orderList = tOrderService.selectList(new EntityWrapper<TOrder>()); |
| | | // 查询司机 |
| | | for (TOrderServerResp tOrderServerResp : orderServerRespList) { |
| | | TDriver tDriver = tDriverService.selectById(tOrderServerResp.getDriverId()); |
| | | tOrderServerResp.setAvatar(tDriver.getAvatar()); |
| | | tOrderServerResp.setDriverName(tDriver.getName()); |
| | | List<TOrder> collect = orderList.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) && |
| | | (order.getState().equals(OrderStateEnum.WAIT_PAY.getCode()) |
| | | || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) |
| | | || order.getState().equals(OrderStateEnum.FINISH.getCode()))).collect(Collectors.toList()); |
| | | // 驾龄 |
| | | if(Objects.nonNull(tDriver.getFirstCertificateTime())){ |
| | | Period period = Period.between(LocalDate.now(), DateUtil.dateToLocalDate(tDriver.getFirstCertificateTime())); |
| | | tOrderServerResp.setDrivingExperience(Math.max(Math.abs(period.getYears()), 1)); |
| | | }else { |
| | | tOrderServerResp.setDrivingExperience(0); |
| | | } |
| | | // 代驾次数 |
| | | tOrderServerResp.setValetDrivingCount(collect.size()); |
| | | // 行驶时间 |
| | | long goTime = 0; |
| | | for (TOrder tOrder : collect) { |
| | | // 下车时间 |
| | | Date getoffTime = tOrder.getGetoffTime(); |
| | | // 上车时间 |
| | | Date boardingTime = tOrder.getBoardingTime(); |
| | | long minutes = Duration.between(DateUtil.dateToLocalDateTime(getoffTime), DateUtil.dateToLocalDateTime(boardingTime)).toMinutes(); |
| | | goTime += Math.abs(minutes); |
| | | } |
| | | tOrderServerResp.setGoTime(Long.valueOf(goTime).intValue()); |
| | | // 行驶里程 |
| | | if(CollectionUtils.isEmpty(collect)){ |
| | | tOrderServerResp.setMileageTraveled(0); |
| | | }else { |
| | | int sum = collect.stream().mapToInt(TOrder::getActualMileage).sum(); |
| | | tOrderServerResp.setMileageTraveled(sum/1000); |
| | | } |
| | | } |
| | | map.put("serverList",orderServerRespList); |
| | | // 查询今天所有订单 |
| | | List<TOrder> allList = tOrderService.getDataStatisticsAllList(agentId,type); |
| | | List<List<String>> list = new ArrayList<>(allList.size()); |
| | | for (TOrder tOrder : allList) { |
| | | List<String> obj = new ArrayList<>(3); |
| | | obj.add(tOrder.getStartLng()); |
| | | obj.add(tOrder.getStartLat()); |
| | | obj.add(String.valueOf(tOrder.getState())); |
| | | list.add(obj); |
| | | } |
| | | map.put("allList",list); |
| | | List<List<String>> list1 = new ArrayList<>(); |
| | | for (TDriver tDriver : onLineDriver) { |
| | | List<String> obj = new ArrayList<>(3); |
| | | String value = redisUtil.getValue("DRIVER" + tDriver.getId()); |
| | | if(ToolUtil.isEmpty(value)){ |
| | | continue; |
| | | } |
| | | obj.add(value.split(",")[0]);// 经度 |
| | | obj.add(value.split(",")[1]);// 纬度 |
| | | obj.add(String.valueOf(tDriver.getServerStatus()));// 服务状态 |
| | | list1.add(obj); |
| | | } |
| | | map.put("onLineDriverCount",list1.size()); |
| | | // 拿到所有在线司机地址 |
| | | map.put("onLineDriver",list1); |
| | | }else { |
| | | List<TAgent> tAgentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .eq("provinceCode", "440000")); |
| | | List<Integer> ids = tAgentList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | // 查询统计在线司机,待接单,服务中,已完成,已取消 |
| | | List<TDriver> onLineDriver = tDriverService.selectList(new EntityWrapper<TDriver>() |
| | | .in("agentId", ids)); |
| | | |
| | | Map<String, String> mapAddress = geocode("广东省广州市"); |
| | | map.put("addressLon",mapAddress.get("addressLon")); |
| | | map.put("addressLat",mapAddress.get("addressLat")); |
| | | |
| | | List<TAgent> tAgentAllList = tAgentService.selectList(new EntityWrapper<TAgent>()); |
| | | List<Integer> allIds = tAgentAllList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | tOrderService.getDataStatisticsCountByIdsGetMap(allIds,map); |
| | | |
| | | // 查询服务中的订单列表 |
| | | List<TOrderServerResp> orderServerRespList = tOrderService.getDataStatisticsServerListByIds(allIds); |
| | | List<TOrder> orderList = tOrderService.selectList(new EntityWrapper<TOrder>()); |
| | | // 查询司机 |
| | | for (TOrderServerResp tOrderServerResp : orderServerRespList) { |
| | | TDriver tDriver = tDriverService.selectById(tOrderServerResp.getDriverId()); |
| | | tOrderServerResp.setAvatar(tDriver.getAvatar()); |
| | | tOrderServerResp.setDriverName(tDriver.getName()); |
| | | List<TOrder> collect = orderList.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) && |
| | | (order.getState().equals(OrderStateEnum.WAIT_PAY.getCode()) |
| | | || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) |
| | | || order.getState().equals(OrderStateEnum.FINISH.getCode()))).collect(Collectors.toList()); |
| | | // 驾龄 |
| | | if(Objects.nonNull(tDriver.getFirstCertificateTime())){ |
| | | Period period = Period.between(LocalDate.now(), DateUtil.dateToLocalDate(tDriver.getFirstCertificateTime())); |
| | | tOrderServerResp.setDrivingExperience(Math.max(Math.abs(period.getYears()), 1)); |
| | | }else { |
| | | tOrderServerResp.setDrivingExperience(0); |
| | | } |
| | | // 代驾次数 |
| | | tOrderServerResp.setValetDrivingCount(collect.size()); |
| | | // 行驶时间 |
| | | long goTime = 0; |
| | | for (TOrder tOrder : collect) { |
| | | // 下车时间 |
| | | Date getoffTime = tOrder.getGetoffTime(); |
| | | // 上车时间 |
| | | Date boardingTime = tOrder.getBoardingTime(); |
| | | long minutes = Duration.between(DateUtil.dateToLocalDateTime(getoffTime), DateUtil.dateToLocalDateTime(boardingTime)).toMinutes(); |
| | | goTime += Math.abs(minutes); |
| | | } |
| | | tOrderServerResp.setGoTime(Long.valueOf(goTime).intValue()); |
| | | // 行驶里程 |
| | | if(CollectionUtils.isEmpty(collect)){ |
| | | tOrderServerResp.setMileageTraveled(0); |
| | | }else { |
| | | int sum = collect.stream().mapToInt(TOrder::getActualMileage).sum(); |
| | | tOrderServerResp.setMileageTraveled(sum/1000); |
| | | } |
| | | } |
| | | map.put("serverList",orderServerRespList); |
| | | |
| | | // 查询今天所有订单 |
| | | List<TOrder> allList = tOrderService.getDataStatisticsAllListByIds(allIds,type); |
| | | List<List<String>> list = new ArrayList<>(allList.size()); |
| | | for (TOrder tOrder : allList) { |
| | | List<String> obj = new ArrayList<>(3); |
| | | obj.add(tOrder.getStartLng()); |
| | | obj.add(tOrder.getStartLat()); |
| | | obj.add(String.valueOf(tOrder.getState())); |
| | | list.add(obj); |
| | | } |
| | | map.put("allList",list); |
| | | List<List<String>> list1 = new ArrayList<>(); |
| | | for (TDriver tDriver : onLineDriver) { |
| | | List<String> obj = new ArrayList<>(3); |
| | | String value = redisUtil.getValue("DRIVER" + tDriver.getId()); |
| | | if(ToolUtil.isEmpty(value)){ |
| | | continue; |
| | | } |
| | | obj.add(value.split(",")[0]);// 经度 |
| | | obj.add(value.split(",")[1]);// 纬度 |
| | | obj.add(String.valueOf(tDriver.getServerStatus()));// 服务状态 |
| | | list1.add(obj); |
| | | } |
| | | map.put("onLineDriverCount",list1.size()); |
| | | // 拿到所有在线司机地址 |
| | | map.put("onLineDriver",list1); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | @RequestMapping("/getServerOrder") |
| | | @ResponseBody |
| | | public Object getServerOrder(Integer agentId,Model model) { |
| | | Integer objectId = ShiroKit.getUser().getObjectId(); |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if(roleType == 3 && Objects.nonNull(objectId)){ |
| | | agentId = objectId; |
| | | } |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | if(Objects.nonNull(agentId)){ |
| | | List<TAgent> tAgentList = tAgentService.selectList(new EntityWrapper<TAgent>()); |
| | | List<Integer> ids = tAgentList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | // 查询服务中的订单列表 |
| | | List<TOrderServerResp> orderServerRespList = tOrderService.getDataStatisticsServerListByIds(ids); |
| | | List<TOrder> orderList = tOrderService.selectList(new EntityWrapper<TOrder>()); |
| | | // 查询司机 |
| | | for (TOrderServerResp tOrderServerResp : orderServerRespList) { |
| | | TDriver tDriver = tDriverService.selectById(tOrderServerResp.getDriverId()); |
| | | tOrderServerResp.setAvatar(tDriver.getAvatar()); |
| | | tOrderServerResp.setDriverName(tDriver.getName()); |
| | | List<TOrder> collect = orderList.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) && |
| | | (order.getState().equals(OrderStateEnum.WAIT_PAY.getCode()) |
| | | || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) |
| | | || order.getState().equals(OrderStateEnum.FINISH.getCode()))).collect(Collectors.toList()); |
| | | // 驾龄 |
| | | if(Objects.nonNull(tDriver.getFirstCertificateTime())){ |
| | | Period period = Period.between(LocalDate.now(), DateUtil.dateToLocalDate(tDriver.getFirstCertificateTime())); |
| | | tOrderServerResp.setDrivingExperience(Math.max(Math.abs(period.getYears()), 1)); |
| | | }else { |
| | | tOrderServerResp.setDrivingExperience(0); |
| | | } |
| | | // 代驾次数 |
| | | tOrderServerResp.setValetDrivingCount(collect.size()); |
| | | // 行驶时间 |
| | | long goTime = 0; |
| | | for (TOrder tOrder : collect) { |
| | | // 下车时间 |
| | | Date getoffTime = tOrder.getGetoffTime(); |
| | | // 上车时间 |
| | | Date boardingTime = tOrder.getBoardingTime(); |
| | | long minutes = Duration.between(DateUtil.dateToLocalDateTime(getoffTime), DateUtil.dateToLocalDateTime(boardingTime)).toMinutes(); |
| | | goTime += Math.abs(minutes); |
| | | } |
| | | tOrderServerResp.setGoTime(Long.valueOf(goTime).intValue()); |
| | | // 行驶里程 |
| | | if(CollectionUtils.isEmpty(collect)){ |
| | | tOrderServerResp.setMileageTraveled(0); |
| | | }else { |
| | | int sum = collect.stream().mapToInt(TOrder::getActualMileage).sum(); |
| | | tOrderServerResp.setMileageTraveled(sum/1000); |
| | | } |
| | | } |
| | | map.put("serverList",orderServerRespList); |
| | | }else { |
| | | List<TAgent> tAgentList = tAgentService.selectList(new EntityWrapper<TAgent>()); |
| | | List<Integer> ids = tAgentList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | // 查询服务中的订单列表 |
| | | List<TOrderServerResp> orderServerRespList = tOrderService.getDataStatisticsServerListByIds(ids); |
| | | List<TOrder> orderList = tOrderService.selectList(new EntityWrapper<TOrder>()); |
| | | // 查询司机 |
| | | for (TOrderServerResp tOrderServerResp : orderServerRespList) { |
| | | TDriver tDriver = tDriverService.selectById(tOrderServerResp.getDriverId()); |
| | | tOrderServerResp.setAvatar(tDriver.getAvatar()); |
| | | tOrderServerResp.setDriverName(tDriver.getName()); |
| | | List<TOrder> collect = orderList.stream().filter(order -> tDriver.getId().equals(order.getDriverId()) && |
| | | (order.getState().equals(OrderStateEnum.WAIT_PAY.getCode()) |
| | | || order.getState().equals(OrderStateEnum.WAIT_EVALUATED.getCode()) |
| | | || order.getState().equals(OrderStateEnum.FINISH.getCode()))).collect(Collectors.toList()); |
| | | // 驾龄 |
| | | if(Objects.nonNull(tDriver.getFirstCertificateTime())){ |
| | | Period period = Period.between(LocalDate.now(), DateUtil.dateToLocalDate(tDriver.getFirstCertificateTime())); |
| | | tOrderServerResp.setDrivingExperience(Math.max(Math.abs(period.getYears()), 1)); |
| | | }else { |
| | | tOrderServerResp.setDrivingExperience(0); |
| | | } |
| | | // 代驾次数 |
| | | tOrderServerResp.setValetDrivingCount(collect.size()); |
| | | // 行驶时间 |
| | | long goTime = 0; |
| | | for (TOrder tOrder : collect) { |
| | | // 下车时间 |
| | | Date getoffTime = tOrder.getGetoffTime(); |
| | | // 上车时间 |
| | | Date boardingTime = tOrder.getBoardingTime(); |
| | | long minutes = Duration.between(DateUtil.dateToLocalDateTime(getoffTime), DateUtil.dateToLocalDateTime(boardingTime)).toMinutes(); |
| | | goTime += Math.abs(minutes); |
| | | } |
| | | tOrderServerResp.setGoTime(Long.valueOf(goTime).intValue()); |
| | | // 行驶里程 |
| | | if(CollectionUtils.isEmpty(collect)){ |
| | | tOrderServerResp.setMileageTraveled(0); |
| | | }else { |
| | | int sum = collect.stream().mapToInt(TOrder::getActualMileage).sum(); |
| | | tOrderServerResp.setMileageTraveled(sum/1000); |
| | | } |
| | | } |
| | | map.put("serverList",orderServerRespList); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到首页统计 |
| | | */ |
| | | @RequestMapping("/statistics") |
| | | public String statistics(Integer agentId,String dayDate,String yearDate,String monthDate,Integer type,Model model) { |
| | | Integer objectId = ShiroKit.getUser().getObjectId(); |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if(roleType == 3 && Objects.nonNull(objectId)){ |
| | | agentId = objectId; |
| | | } |
| | | if(Objects.isNull(type)){ |
| | | type = 1; |
| | | } |
| | | model.addAttribute("txt",new SimpleDateFormat("yyyy年MM月dd日").format(new Date()) + DateUtil.getWeekDay(new Date()) + ",欢迎" + |
| | | Objects.requireNonNull(ShiroKit.getUser()).getName() + "登录"); |
| | | // 查询所有代理商 |
| | | List<TAgent> agentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .ne("status", StatusEnum.DELETE.getCode()) |
| | | .ne("principal","")); |
| | | model.addAttribute("agentList",agentList); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(Objects.nonNull(agentId)){ |
| | | // 统计代理商 |
| | | tAgentService.getDataStatistics(agentId,model,map); |
| | | |
| | | // 统计司机数 |
| | | tDriverService.getDataStatistics(agentId,model,map); |
| | | |
| | | // 订单统计本月 |
| | | tOrderService.getStatisticsOrderByMonth(agentId,dayDate,model,map); |
| | | |
| | | // 订单统计,每年按月份 |
| | | tOrderService.getDataStatisticsByYear(agentId,yearDate,model,map); |
| | | |
| | | // 业绩排名 performanceTable |
| | | if (1 == type){ |
| | | // 单量 |
| | | tOrderService.getDataStatisticsOrderCount(agentId,monthDate,model,map); |
| | | }else { |
| | | // 收入、佣金 |
| | | tRevenueService.getDataStatisticsIncomeOrCommission(agentId,monthDate,type,model,map); |
| | | } |
| | | |
| | | }else { |
| | | // 查询广东全区域数据 查询广东所有的代理商 |
| | | List<TAgent> tAgentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .eq("provinceCode", "440000")); |
| | | List<Integer> ids = tAgentList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | // 统计代理商 |
| | | tAgentService.getDataStatisticsByIds(ids,model,map); |
| | | |
| | | // 统计司机数 |
| | | tDriverService.getDataStatisticsByIds(ids,model,map); |
| | | |
| | | // 订单统计本月 |
| | | tOrderService.getStatisticsOrderByMonthIds(ids,dayDate,model,map); |
| | | |
| | | // 订单统计,每年按月份 |
| | | tOrderService.getDataStatisticsByYearByIds(ids,yearDate,model,map); |
| | | |
| | | // 业绩排名 performanceTable |
| | | if (1 == type){ |
| | | // 单量 |
| | | tOrderService.getDataStatisticsOrderCountByIds(ids,monthDate,model,map); |
| | | }else { |
| | | // 收入、佣金 |
| | | tRevenueService.getDataStatisticsIncomeOrCommissionByIds(ids,monthDate,type,model,map); |
| | | } |
| | | } |
| | | return PREFIX + "tHomePageStatistics.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 首页统计通过代理商查询 |
| | | */ |
| | | @RequestMapping("/statisticsByAgentId") |
| | | @ResponseBody |
| | | public Map<String, Object> statisticsByAgentId(Integer agentId, String dayDate, String yearDate, String monthDate, Integer type, Model model) { |
| | | Integer objectId = ShiroKit.getUser().getObjectId(); |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if(roleType == 3 && Objects.nonNull(objectId)){ |
| | | agentId = objectId; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(Objects.nonNull(agentId)){ |
| | | // 统计代理商 |
| | | tAgentService.getDataStatistics(agentId,model,map); |
| | | |
| | | // 统计司机数 |
| | | tDriverService.getDataStatistics(agentId,model,map); |
| | | |
| | | // 订单统计本月 |
| | | tOrderService.getStatisticsOrderByMonth(agentId,dayDate,model,map); |
| | | |
| | | // 订单统计,每年按月份 |
| | | tOrderService.getDataStatisticsByYear(agentId,yearDate,model,map); |
| | | |
| | | // 业绩排名 performanceTable |
| | | if (1 == type){ |
| | | // 单量 |
| | | tOrderService.getDataStatisticsOrderCount(agentId,monthDate,model,map); |
| | | }else { |
| | | // 收入、佣金 |
| | | tRevenueService.getDataStatisticsIncomeOrCommission(agentId,monthDate,type,model,map); |
| | | } |
| | | |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 首页统计通过代理商查询订单量 今天,昨天,本周,本月 |
| | | */ |
| | | @RequestMapping("/statisticsMonthByAgentId") |
| | | @ResponseBody |
| | | public Map<String, Object> statisticsMonthByAgentId(Integer agentId, String dayDate,Model model) { |
| | | Integer objectId = ShiroKit.getUser().getObjectId(); |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if(roleType == 3 && Objects.nonNull(objectId)){ |
| | | agentId = objectId; |
| | | } |
| | | dayDate = new SimpleDateFormat("yyyy-MM").format(new Date()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(Objects.nonNull(agentId)){ |
| | | // 订单统计本月 |
| | | tOrderService.getStatisticsOrderByMonth(agentId,dayDate,model,map); |
| | | }else { |
| | | // 查询广东全区域数据 查询广东所有的代理商 |
| | | List<TAgent> tAgentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .eq("provinceCode", "440000")); |
| | | List<Integer> ids = tAgentList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | // 订单统计本月 |
| | | tOrderService.getStatisticsOrderByMonthIds(ids,dayDate,model,map); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 首页统计通过代理商查询订单量 按年 |
| | | */ |
| | | @RequestMapping("/statisticsYearByAgentId") |
| | | @ResponseBody |
| | | public Map<String, Object> statisticsYearByAgentId(Integer agentId, String yearDate,Model model) { |
| | | Integer objectId = ShiroKit.getUser().getObjectId(); |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if(roleType == 3 && Objects.nonNull(objectId)){ |
| | | agentId = objectId; |
| | | } |
| | | if(!StringUtils.hasLength(yearDate)){ |
| | | yearDate = new SimpleDateFormat("yyyy").format(new Date()); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(Objects.nonNull(agentId)){ |
| | | // 订单统计,每年按月份 |
| | | tOrderService.getDataStatisticsByYear(agentId,yearDate,model,map); |
| | | }else { |
| | | // 查询广东全区域数据 查询广东所有的代理商 |
| | | List<TAgent> tAgentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .eq("provinceCode", "440000")); |
| | | List<Integer> ids = tAgentList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | tOrderService.getDataStatisticsByYearByIds(ids,yearDate,model,map); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 首页统计通过代理商查询订单量,收入,佣金 按年 |
| | | */ |
| | | @RequestMapping("/statisticsOrderByAgentId") |
| | | @ResponseBody |
| | | public Map<String, Object> statisticsOrderByAgentId(Integer agentId, String monthDate,Integer type,Model model) { |
| | | Integer objectId = ShiroKit.getUser().getObjectId(); |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if(roleType == 3 && Objects.nonNull(objectId)){ |
| | | agentId = objectId; |
| | | } |
| | | if(Objects.isNull(type)){ |
| | | type = 1; |
| | | } |
| | | if(!StringUtils.hasLength(monthDate)){ |
| | | monthDate = new SimpleDateFormat("yyyy-MM").format(new Date()); |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(Objects.nonNull(agentId)){ |
| | | // 业绩排名 performanceTable |
| | | if (1 == type){ |
| | | // 单量 |
| | | tOrderService.getDataStatisticsOrderCount(agentId,monthDate,model,map); |
| | | }else { |
| | | // 收入、佣金 |
| | | tRevenueService.getDataStatisticsIncomeOrCommission(agentId,monthDate,type,model,map); |
| | | } |
| | | }else { |
| | | // 业绩排名 performanceTable |
| | | // 查询广东全区域数据 查询广东所有的代理商 |
| | | List<TAgent> tAgentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .eq("provinceCode", "440000")); |
| | | List<Integer> ids = tAgentList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | if (1 == type){ |
| | | // 单量 |
| | | tOrderService.getDataStatisticsOrderCountByIds(ids,monthDate,model,map); |
| | | }else { |
| | | // 收入、佣金 |
| | | tRevenueService.getDataStatisticsIncomeOrCommissionByIds(ids,monthDate,type,model,map); |
| | | } |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 首页统计通过代理商查询司机数量 |
| | | */ |
| | | @RequestMapping("/statisticsDriverByAgentId") |
| | | @ResponseBody |
| | | public Map<String, Object> statisticsDriverByAgentId(Integer agentId,Model model) { |
| | | Integer objectId = ShiroKit.getUser().getObjectId(); |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | if(roleType == 3 && Objects.nonNull(objectId)){ |
| | | agentId = objectId; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(Objects.nonNull(agentId)){ |
| | | // 统计司机数 |
| | | tDriverService.getDataStatistics(agentId,model,map); |
| | | tAgentService.getDataStatistics(agentId,model,map); |
| | | }else { |
| | | // 统计司机数 |
| | | // 查询广东全区域数据 查询广东所有的代理商 |
| | | List<TAgent> tAgentList = tAgentService.selectList(new EntityWrapper<TAgent>() |
| | | .eq("provinceCode", "440000")); |
| | | List<Integer> ids = tAgentList.stream().map(TAgent::getId).collect(Collectors.toList()); |
| | | tDriverService.getDataStatisticsByIds(ids,model,map); |
| | | tAgentService.getDataStatisticsByIds(ids,model,map); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | private Map<String,String> geocode(String address){ |
| | | Map<String,String> map = new HashMap<>(2); |
| | | try { |
| | | String url = "https://restapi.amap.com/v3/geocode/geo?address=" + address + "&key=" + gaoDePoJo.getKey(); |
| | | url = url.trim().replace("#", "").replace(" ", ""); |
| | | String result = httpUtils.get(url); |
| | | log.info("地址解析结果:{}", result); |
| | | JSONObject jsonObject = JSONObject.parseObject(result); |
| | | if (jsonObject.getString("status").equals("1")) { |
| | | String geocodes = jsonObject.getString("geocodes"); |
| | | JSONArray objects = JSONObject.parseArray(geocodes); |
| | | String string = objects.getString(0); |
| | | JSONObject geocodesObject = JSONObject.parseObject(string); |
| | | log.info("地址数据:{}", geocodesObject); |
| | | String location = geocodesObject.getString("location"); |
| | | String[] split = location.split(","); |
| | | map.put("addressLon",split[0]); |
| | | map.put("addressLat",split[1]); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("解析地址失败============:{}", e.getMessage()); |
| | | e.printStackTrace(); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.controller.util.LabelReplaceUtil; |
| | | import com.stylefeng.guns.modular.system.enums.HtmlTypeEnum; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.THtml; |
| | | import com.stylefeng.guns.modular.system.service.ITHtmlService; |
| | | |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-24 10:50:08 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tHtml") |
| | | public class THtmlController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tHtml/"; |
| | | |
| | | @Autowired |
| | | private ITHtmlService tHtmlService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tHtml.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tHtml_add") |
| | | public String tHtmlAdd() { |
| | | return PREFIX + "tHtml_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tHtml_update/{tHtmlId}") |
| | | public String tHtmlUpdate(@PathVariable Integer tHtmlId, Model model) { |
| | | THtml tHtml = tHtmlService.selectById(tHtmlId); |
| | | model.addAttribute("item",tHtml); |
| | | LogObjectHolder.me().set(tHtml); |
| | | return PREFIX + "tHtml_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到积分说明 |
| | | */ |
| | | @RequestMapping("/integralExplain") |
| | | public String integralExplain(Model model) { |
| | | THtml html = queryHtmlByType(HtmlTypeEnum.INTEGRAL_EXPLAIN.getCode()); |
| | | model.addAttribute("html",html); |
| | | return PREFIX + "integralExplain.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到佣金规则说明 |
| | | */ |
| | | @RequestMapping("/commissionRuleExplain") |
| | | public String commissionRuleExplain(Model model) { |
| | | THtml html = queryHtmlByType(HtmlTypeEnum.COMMISSION_RULE_EXPLAIN.getCode()); |
| | | model.addAttribute("html",html); |
| | | return PREFIX + "commissionRuleExplain.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到行程录音说明 |
| | | */ |
| | | @RequestMapping("/tripRecordingExplain") |
| | | public String tripRecordingExplain(Model model) { |
| | | THtml html = queryHtmlByType(HtmlTypeEnum.TRIP_RECORDING_EXPLAIN.getCode()); |
| | | model.addAttribute("html",html); |
| | | return PREFIX + "tripRecordingExplain.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到预估价格说明 |
| | | */ |
| | | @RequestMapping("/estimatedPriceExplain") |
| | | public String estimatedPriceExplain(Model model) { |
| | | THtml html = queryHtmlByType(HtmlTypeEnum.ESTIMATED_PRICE_EXPLAIN.getCode()); |
| | | model.addAttribute("html",html); |
| | | return PREFIX + "estimatedPriceExplain.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到起步价说明 |
| | | */ |
| | | @RequestMapping("/startingFareExplain") |
| | | public String startingFareExplain(Model model) { |
| | | THtml html = queryHtmlByType(HtmlTypeEnum.SPECIFICATION_STARTING_PRICE.getCode()); |
| | | model.addAttribute("html",html); |
| | | return PREFIX + "startingFareExplain.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到注销协议 |
| | | */ |
| | | @RequestMapping("/cancellationAgreement") |
| | | public String cancellationAgreement(Model model) { |
| | | THtml html = queryHtmlByType(HtmlTypeEnum.CANCELLATION_AGREEMENT.getCode()); |
| | | model.addAttribute("html",html); |
| | | return PREFIX + "cancellationAgreement.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到关于我们 |
| | | */ |
| | | @RequestMapping("/aboutUs") |
| | | public String aboutUs(Model model) { |
| | | THtml html = queryHtmlByType(HtmlTypeEnum.ABOUT_US.getCode()); |
| | | model.addAttribute("html",html); |
| | | return PREFIX + "aboutUs.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到代驾服务协议与隐私政策保护,法律条款,个人信息处理规则 |
| | | */ |
| | | @RequestMapping("/agreementExplain") |
| | | public String agentDrivingServiceExplain(Integer type,Model model) { |
| | | THtml one = queryHtmlByType(HtmlTypeEnum.AGENT_DRIVING_SERVICE_EXPLAIN.getCode()); |
| | | model.addAttribute("one",one); |
| | | THtml two = queryHtmlByType(HtmlTypeEnum.CLAUSE.getCode()); |
| | | model.addAttribute("two",two); |
| | | THtml three = queryHtmlByType(HtmlTypeEnum.PERSONAL_INFORMATION_RULES.getCode()); |
| | | model.addAttribute("three",three); |
| | | return PREFIX + "agreementExplain.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到加盟基本要求 |
| | | */ |
| | | @RequestMapping("/requirementsJoinExplain") |
| | | public String requirementsJoinExplain(Model model) { |
| | | THtml tHtml = queryHtmlByType(HtmlTypeEnum.BASIC_REQUIREMENTS_JOINING.getCode()); |
| | | JSONObject jsonObject = JSONObject.parseObject(tHtml.getHtml()); |
| | | JSONArray rules = jsonObject.getJSONArray("rules"); |
| | | JSONArray objects = new JSONArray(); |
| | | for (int i = 0; i < rules.size(); i++) { |
| | | JSONObject jsonObject1 = JSONObject.parseObject(JSONObject.toJSONString(rules.get(i))); |
| | | if(i == 0){ |
| | | jsonObject1.put("key",0); |
| | | }else { |
| | | jsonObject1.put("key",1); |
| | | } |
| | | objects.add(jsonObject1); |
| | | } |
| | | model.addAttribute("array",objects); |
| | | model.addAttribute("id",tHtml.getId()); |
| | | return PREFIX + "requirementsJoinExplain.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到代驾服务协议与隐私政策保护,法律条款,个人信息处理规则 |
| | | */ |
| | | @RequestMapping("/agreement") |
| | | @ResponseBody |
| | | public Object agreement(Integer type) { |
| | | return queryHtmlByType(type); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tHtmlService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 通过类型查询配置 |
| | | */ |
| | | @RequestMapping(value = "/queryHtmlByType") |
| | | @ResponseBody |
| | | public THtml queryHtmlByType(Integer type) { |
| | | return tHtmlService.selectOne(new EntityWrapper<THtml>().eq("type", type).last("LIMIT 1")); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(THtml tHtml) { |
| | | tHtmlService.insert(tHtml); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tHtmlId) { |
| | | tHtmlService.deleteById(tHtmlId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(THtml tHtml) { |
| | | tHtml.setHtml(LabelReplaceUtil.replace(tHtml.getHtml())); |
| | | tHtmlService.updateById(tHtml); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tHtmlId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tHtmlId") Integer tHtmlId) { |
| | | return tHtmlService.selectById(tHtmlId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.model.TSystemConfig; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemConfigService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TImg; |
| | | import com.stylefeng.guns.modular.system.service.ITImgService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-28 10:01:31 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tImg") |
| | | public class TImgController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tImg/"; |
| | | |
| | | @Autowired |
| | | private ITImgService tImgService; |
| | | @Autowired |
| | | private ITSystemConfigService tSystemConfigService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | TSystemConfig config = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 8) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObject = JSONObject.parseObject(config.getContent()); |
| | | model.addAttribute("num2",jsonObject.getInteger("num2")); |
| | | List<TImg> tImgList = tImgService.selectList(new EntityWrapper<TImg>() |
| | | .eq("type", 1)); |
| | | model.addAttribute("imgList",tImgList); |
| | | return PREFIX + "tImg.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tImg_add") |
| | | public String tImgAdd() { |
| | | return PREFIX + "tImg_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tImg_update/{tImgId}") |
| | | public String tImgUpdate(@PathVariable Integer tImgId, Model model) { |
| | | TImg tImg = tImgService.selectById(tImgId); |
| | | model.addAttribute("item",tImg); |
| | | LogObjectHolder.me().set(tImg); |
| | | return PREFIX + "tImg_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tImgService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TImg tImg) { |
| | | tImgService.insert(tImg); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tImgId) { |
| | | tImgService.deleteById(tImgId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TImg tImg) { |
| | | tImgService.updateById(tImg); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改图片 |
| | | */ |
| | | @RequestMapping(value = "/updateSubmit") |
| | | @ResponseBody |
| | | public Object updateSubmit(String tImg) { |
| | | System.err.println(tImg); |
| | | // 删除所有图片 |
| | | tImgService.delete(new EntityWrapper<TImg>() |
| | | .eq("type",1)); |
| | | if(StringUtils.hasLength(tImg)){ |
| | | String[] split = tImg.split(","); |
| | | List<TImg> tImgList = new ArrayList<>(split.length); |
| | | for (String s : split) { |
| | | TImg tImg1 = new TImg(); |
| | | // 保存所有图片 |
| | | tImg1.setType(1); |
| | | tImg1.setCreateTime(new Date()); |
| | | tImg1.setImg(s); |
| | | tImgList.add(tImg1); |
| | | } |
| | | tImgService.insertBatch(tImgList); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tImgId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tImgId") Integer tImgId) { |
| | | return tImgService.selectById(tImgId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TComplaint; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TInvoice; |
| | | import com.stylefeng.guns.modular.system.service.ITInvoiceService; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 开发票列表控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-09 10:55:26 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tInvoice") |
| | | public class TInvoiceController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tInvoice/"; |
| | | |
| | | @Autowired |
| | | private ITInvoiceService tInvoiceService; |
| | | |
| | | /** |
| | | * 跳转到开发票列表首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tInvoice.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | | @RequestMapping("/lookDetail/{id}/{type}") |
| | | public String lookDetail(@PathVariable Integer id, @PathVariable Integer type, Model model) { |
| | | TInvoice tInvoice = tInvoiceService.selectById(id); |
| | | String str = ""; |
| | | if (1 == type){ |
| | | str = tInvoice.getContent(); |
| | | } |
| | | model.addAttribute("str",str); |
| | | return "/system/tComplaint/lookDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加开发票列表 |
| | | */ |
| | | @RequestMapping("/tInvoice_add") |
| | | public String tInvoiceAdd() { |
| | | return PREFIX + "tInvoice_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改开发票列表 |
| | | */ |
| | | @RequestMapping("/tInvoice_update/{tInvoiceId}") |
| | | public String tInvoiceUpdate(@PathVariable Integer tInvoiceId, Model model) { |
| | | TInvoice tInvoice = tInvoiceService.selectById(tInvoiceId); |
| | | model.addAttribute("item",tInvoice); |
| | | LogObjectHolder.me().set(tInvoice); |
| | | return PREFIX + "tInvoice_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取开发票列表列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String email, |
| | | String name, |
| | | Integer type, |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tInvoiceService.getInvoiceList(page,beginTime,endTime,email,name,type,state)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 重新开发票 |
| | | */ |
| | | @RequestMapping(value = "/again") |
| | | @ResponseBody |
| | | public Object again(@RequestParam Integer tInvoiceId) { |
| | | TInvoice tInvoice = tInvoiceService.selectById(tInvoiceId); |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除开发票列表 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tInvoiceId) { |
| | | tInvoiceService.deleteById(tInvoiceId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.enums.HtmlTypeEnum; |
| | | import com.stylefeng.guns.modular.system.enums.MainContentTypeEnum; |
| | | import com.stylefeng.guns.modular.system.enums.StatusEnum; |
| | | import com.stylefeng.guns.modular.system.model.THtml; |
| | | import com.stylefeng.guns.modular.system.service.ITHtmlService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.modular.system.model.TMainContent; |
| | | import com.stylefeng.guns.modular.system.service.ITMainContentService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-28 10:09:47 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tMainContent") |
| | | public class TMainContentController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tMainContent/"; |
| | | |
| | | @Autowired |
| | | private ITMainContentService tMainContentService; |
| | | @Autowired |
| | | private ITHtmlService tHtmlService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tMainContent.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tMainContent_add") |
| | | public String tMainContentAdd() { |
| | | return PREFIX + "tMainContent_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到转单添加 |
| | | */ |
| | | @RequestMapping("/transferOrder/add") |
| | | public String transferOrderAdd(Model model) { |
| | | model.addAttribute("key",0); |
| | | return PREFIX + "transferOrderAdd.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到转单修改 |
| | | */ |
| | | @RequestMapping("/transferOrder/update") |
| | | public String transferOrderUpdate(Model model) { |
| | | List<TMainContent> list = tMainContentService.selectList(new EntityWrapper<TMainContent>() |
| | | .eq("type", MainContentTypeEnum.TRANSFER_ORDER.getCode())); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "transferOrderUpdate.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到消单添加 |
| | | */ |
| | | @RequestMapping("/driverCancelOrder/add") |
| | | public String driverCancelOrderAdd(Model model) { |
| | | model.addAttribute("key",0); |
| | | return PREFIX + "driverCancelOrderAdd.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到消单修改 |
| | | */ |
| | | @RequestMapping("/driverCancelOrder/update") |
| | | public String driverCancelOrderUpdate(Model model) { |
| | | List<TMainContent> list = tMainContentService.selectList(new EntityWrapper<TMainContent>() |
| | | .eq("type", MainContentTypeEnum.DRIVER_CANCEL_ORDER.getCode())); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "driverCancelOrderUpdate.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到转单添加 |
| | | */ |
| | | @RequestMapping("/userCancelOrder/add") |
| | | public String userCancelOrderAdd(Model model) { |
| | | model.addAttribute("key",0); |
| | | return PREFIX + "userCancelOrderAdd.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到转单修改 |
| | | */ |
| | | @RequestMapping("/userCancelOrder/update") |
| | | public String userCancelOrderUpdate(Model model) { |
| | | List<TMainContent> list = tMainContentService.selectList(new EntityWrapper<TMainContent>() |
| | | .eq("type", MainContentTypeEnum.USER_CANCEL_ORDER.getCode())); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "userCancelOrderUpdate.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tMainContent_update/{tMainContentId}") |
| | | public String tMainContentUpdate(@PathVariable Integer tMainContentId, Model model) { |
| | | TMainContent tMainContent = tMainContentService.selectById(tMainContentId); |
| | | model.addAttribute("item",tMainContent); |
| | | LogObjectHolder.me().set(tMainContent); |
| | | return PREFIX + "tMainContent_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到转单 |
| | | */ |
| | | @RequestMapping("/transferOrder") |
| | | public String transferOrder(Model model) { |
| | | List<TMainContent> list = tMainContentService.selectList(new EntityWrapper<TMainContent>() |
| | | .eq("type", MainContentTypeEnum.TRANSFER_ORDER.getCode())); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "transferOrder.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到司机消单 |
| | | */ |
| | | @RequestMapping("/driverCancelOrder") |
| | | public String driverCancelOrder(Model model) { |
| | | List<TMainContent> list = tMainContentService.selectList(new EntityWrapper<TMainContent>() |
| | | .eq("type", MainContentTypeEnum.DRIVER_CANCEL_ORDER.getCode())); |
| | | model.addAttribute("list",list); |
| | | THtml html = tHtmlService.selectOne(new EntityWrapper<THtml>().eq("type", HtmlTypeEnum.DRIVER_EXPLAIN_CANCELLATION.getCode()).last("LIMIT 1")); |
| | | model.addAttribute("html",html); |
| | | return PREFIX + "driverCancelOrder.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到用户取消订单 |
| | | */ |
| | | @RequestMapping("/userCancelOrder") |
| | | public String userCancelOrder(Model model) { |
| | | List<TMainContent> list = tMainContentService.selectList(new EntityWrapper<TMainContent>() |
| | | .eq("type", MainContentTypeEnum.USER_CANCEL_ORDER.getCode())); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "userCancelOrder.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tMainContentService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add( String tMainContents,Integer type) { |
| | | String[] split = tMainContents.split(","); |
| | | List<TMainContent> tMainContents1 = new ArrayList<>(split.length); |
| | | for (String s : split) { |
| | | TMainContent tMainContent = new TMainContent(); |
| | | tMainContent.setContent(s); |
| | | tMainContent.setType(type); |
| | | tMainContent.setStatus(StatusEnum.NORMAL.getCode()); |
| | | tMainContent.setCreateTime(new Date()); |
| | | tMainContents1.add(tMainContent); |
| | | } |
| | | tMainContentService.insertBatch(tMainContents1); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add-back") |
| | | @ResponseBody |
| | | public Object addBack(TMainContent tMainContent) { |
| | | tMainContentService.insert(tMainContent); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tMainContentId) { |
| | | tMainContentService.deleteById(tMainContentId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(String tMainContents,Integer type) { |
| | | |
| | | tMainContentService.delete(new EntityWrapper<TMainContent>() |
| | | .eq("type",type)); |
| | | |
| | | String[] split = tMainContents.split(","); |
| | | List<TMainContent> tMainContents1 = new ArrayList<>(split.length); |
| | | for (String s : split) { |
| | | TMainContent tMainContent = new TMainContent(); |
| | | tMainContent.setContent(s); |
| | | tMainContent.setType(type); |
| | | tMainContent.setStatus(StatusEnum.NORMAL.getCode()); |
| | | tMainContent.setCreateTime(new Date()); |
| | | tMainContents1.add(tMainContent); |
| | | } |
| | | tMainContentService.insertBatch(tMainContents1); |
| | | return SUCCESS_TIP; |
| | | } |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update-back") |
| | | @ResponseBody |
| | | public Object updateBack(TMainContent tMainContent) { |
| | | tMainContentService.updateById(tMainContent); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tMainContentId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tMainContentId") Integer tMainContentId) { |
| | | return tMainContentService.selectById(tMainContentId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.util.task.base.QuartzManager; |
| | | import com.stylefeng.guns.modular.system.util.task.base.TimeJobType; |
| | | import com.stylefeng.guns.modular.system.util.task.jobs.AddNotice; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TNotices; |
| | | import com.stylefeng.guns.modular.system.service.ITNoticesService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 滚动消息设置控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-10 15:21:25 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tNotices") |
| | | public class TNoticesController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tNotices/"; |
| | | |
| | | @Autowired |
| | | private ITNoticesService tNoticesService; |
| | | |
| | | /** |
| | | * 跳转到滚动消息设置首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tNotices.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到系统公告设置首页 |
| | | */ |
| | | @RequestMapping("/system") |
| | | public String system() { |
| | | return PREFIX + "system.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加滚动消息设置 |
| | | */ |
| | | @RequestMapping("/tNotices_add") |
| | | public String tNoticesAdd() { |
| | | return PREFIX + "tNotices_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加系统公告 |
| | | */ |
| | | @RequestMapping("/system_add") |
| | | public String system_add() { |
| | | return PREFIX + "system_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改滚动消息设置 |
| | | */ |
| | | @RequestMapping("/tNotices_update/{tNoticesId}") |
| | | public String tNoticesUpdate(@PathVariable Integer tNoticesId, Model model) { |
| | | TNotices tNotices = tNoticesService.selectById(tNoticesId); |
| | | model.addAttribute("item",tNotices); |
| | | LogObjectHolder.me().set(tNotices); |
| | | return PREFIX + "tNotices_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改系统公告 |
| | | */ |
| | | @RequestMapping("/system_update/{tNoticesId}") |
| | | public String system_update(@PathVariable Integer tNoticesId, Model model) { |
| | | TNotices tNotices = tNoticesService.selectById(tNoticesId); |
| | | model.addAttribute("item",tNotices); |
| | | LogObjectHolder.me().set(tNotices); |
| | | return PREFIX + "system_update.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取滚动消息设置列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime,String content) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tNoticesService.getRollingNoticeList(page,beginTime,endTime,1,content)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 获取系统公告设置列表 |
| | | */ |
| | | @RequestMapping(value = "/listSystem") |
| | | @ResponseBody |
| | | public Object listSystem(String insertTime,String content) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tNoticesService.getRollingNoticeList(page,beginTime,endTime,2,content)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增滚动消息设置 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TNotices tNotices) { |
| | | tNotices.setIsDelete(1); |
| | | tNotices.setInsertTime(new Date()); |
| | | tNotices.setInsertUser(ShiroKit.getUser().getId()); |
| | | tNotices.setType(1); |
| | | tNoticesService.insert(tNotices); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 新增系统公告 |
| | | */ |
| | | @RequestMapping(value = "/addSystem") |
| | | @ResponseBody |
| | | public Object addSystem(TNotices tNotices) { |
| | | tNotices.setIsDelete(1); |
| | | tNotices.setInsertTime(new Date()); |
| | | tNotices.setInsertUser(ShiroKit.getUser().getId()); |
| | | tNotices.setType(2); |
| | | tNoticesService.insert(tNotices); |
| | | |
| | | if (tNotices.getIsShow() == 1){ //发布 |
| | | //定时1秒后执行 |
| | | Map<String,Object> maps=new HashMap<>(); |
| | | maps.put("noticeId",tNotices.getId()); |
| | | QuartzManager.addJob(AddNotice.class, (AddNotice.name+tNotices.getId()).toUpperCase(), TimeJobType.UNLOCK,DateUtil.getDate_strYMdHms(new Date().getTime() + 1*1000) , maps); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 发布系统公告 |
| | | */ |
| | | @RequestMapping(value = "/sendSystem") |
| | | @ResponseBody |
| | | public Object sendSystem(@RequestParam Integer tNoticesId) { |
| | | TNotices tNotices = tNoticesService.selectById(tNoticesId); |
| | | if (tNotices.getIsShow() == 2){ |
| | | //定时1秒后执行 |
| | | Map<String,Object> maps=new HashMap<>(); |
| | | maps.put("noticeId",tNotices.getId()); |
| | | QuartzManager.addJob(AddNotice.class, (AddNotice.name+tNotices.getId()).toUpperCase(), TimeJobType.UNLOCK,DateUtil.getDate_strYMdHms(new Date().getTime() + 1*1000) , maps); |
| | | } |
| | | tNotices.setIsShow(1); |
| | | tNotices.setUpdateTime(new Date()); |
| | | tNotices.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tNoticesService.updateById(tNotices); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tNoticesId) { |
| | | TNotices tNotices = tNoticesService.selectById(tNoticesId); |
| | | tNotices.setIsDelete(2); |
| | | tNotices.setFlag("3"); |
| | | tNotices.setUpdateTime(new Date()); |
| | | tNotices.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tNoticesService.updateById(tNotices); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改滚动消息设置 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TNotices tNotices) { |
| | | tNotices.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tNotices.setUpdateTime(new Date()); |
| | | tNoticesService.updateById(tNotices); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改系统公告 |
| | | */ |
| | | @RequestMapping(value = "/updateSystem") |
| | | @ResponseBody |
| | | public Object updateSystem(TNotices tNotices) { |
| | | tNotices.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tNotices.setUpdateTime(new Date()); |
| | | tNoticesService.updateById(tNotices); |
| | | |
| | | if (tNotices.getIsShow() == 1){ //发布 |
| | | //定时1秒后执行 |
| | | Map<String,Object> maps=new HashMap<>(); |
| | | maps.put("noticeId",tNotices.getId()); |
| | | QuartzManager.addJob(AddNotice.class, (AddNotice.name+tNotices.getId()).toUpperCase(), TimeJobType.UNLOCK,DateUtil.getDate_strYMdHms(new Date().getTime() + 1*1000) , maps); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TOpenCityBusiness; |
| | | import com.stylefeng.guns.modular.system.model.TRegion; |
| | | import com.stylefeng.guns.modular.system.service.ITOpenCityBusinessService; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | import com.stylefeng.guns.modular.system.util.GaoDeMapUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TOpenCity; |
| | | import com.stylefeng.guns.modular.system.service.ITOpenCityService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 城市管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-02 11:40:31 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tOpenCity") |
| | | public class TOpenCityController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tOpenCity/"; |
| | | |
| | | @Autowired |
| | | private ITOpenCityService tOpenCityService; |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | |
| | | @Autowired |
| | | private ITOpenCityBusinessService tOpenCityBusinessService; |
| | | |
| | | /** |
| | | * 跳转到城市管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tOpenCity.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加城市管理 |
| | | */ |
| | | @RequestMapping("/tOpenCity_add") |
| | | public String tOpenCityAdd(Model model) { |
| | | List<TRegion> provinceList = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("provinceList",provinceList); |
| | | return PREFIX + "tOpenCity_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改城市管理 |
| | | */ |
| | | @RequestMapping("/tOpenCity_update/{tOpenCityId}") |
| | | public String tOpenCityUpdate(@PathVariable Integer tOpenCityId, Model model) { |
| | | TOpenCity tOpenCity = tOpenCityService.selectById(tOpenCityId); |
| | | model.addAttribute("item",tOpenCity); |
| | | LogObjectHolder.me().set(tOpenCity); |
| | | |
| | | //省 |
| | | List<TRegion> provinceList = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", 0)); |
| | | model.addAttribute("provinceList",provinceList); |
| | | //市 |
| | | List<TRegion> cityList = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", tOpenCity.getAreaId())); |
| | | model.addAttribute("cityList",cityList); |
| | | //区 |
| | | List<TRegion> areaList = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", tOpenCity.getCityId())); |
| | | model.addAttribute("areaList",areaList); |
| | | //经营业务 |
| | | List<Map<String,Object>> businessList = tOpenCityService.getBusinessByCityId(tOpenCityId); |
| | | model.addAttribute("businessList",businessList); |
| | | return PREFIX + "tOpenCity_edit.html"; |
| | | } |
| | | |
| | | @RequestMapping(value = "/change") |
| | | @ResponseBody |
| | | public Object change(@RequestParam Integer id) { |
| | | List<TRegion> list = new ArrayList<>(); |
| | | if (SinataUtil.isNotEmpty(id)){ |
| | | list = tRegionService.selectList(new EntityWrapper<TRegion>().eq("parent_id", id)); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 获取城市管理列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime,String condition) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tOpenCityService.getOpenCityList(page,beginTime,endTime,condition)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增城市管理 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TOpenCity tOpenCity,@RequestParam String businessTypeStr,Integer areaId,Integer cityId,Integer provinceId) { |
| | | //获取code |
| | | if (SinataUtil.isNotEmpty(areaId)){ |
| | | TRegion area = tRegionService.selectById(areaId); |
| | | tOpenCity.setCode(area.getCode()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(cityId)){ |
| | | TRegion city = tRegionService.selectById(cityId); |
| | | tOpenCity.setCode(city.getCode()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(provinceId)){ |
| | | TRegion province = tRegionService.selectById(provinceId); |
| | | tOpenCity.setCode(province.getCode()); |
| | | } |
| | | tOpenCity.setAreaId(areaId); |
| | | tOpenCity.setCityId(cityId); |
| | | tOpenCity.setProvinceId(provinceId); |
| | | //获取经纬度 |
| | | String address = tOpenCity.getAreaName(); |
| | | if (SinataUtil.isNotEmpty(tOpenCity.getCityName())){ |
| | | address+=tOpenCity.getCityName(); |
| | | } |
| | | if (SinataUtil.isNotEmpty(tOpenCity.getProvinceName())){ |
| | | address+=tOpenCity.getProvinceName(); |
| | | } |
| | | JSONObject positionObj = GaoDeMapUtil.getLngAndLat(address); |
| | | String longitude = positionObj.getString("longitude"); |
| | | String latitude = positionObj.getString("latitude"); |
| | | tOpenCity.setLon(Double.valueOf(longitude)); |
| | | tOpenCity.setLat(Double.valueOf(latitude)); |
| | | tOpenCity.setInsertTime(new Date()); |
| | | tOpenCity.setInsertUser(ShiroKit.getUser().getId()); |
| | | tOpenCityService.insert(tOpenCity); |
| | | |
| | | //添加经营业务 |
| | | testJSONStrToJSONArray(businessTypeStr,tOpenCity.getId()); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | public void testJSONStrToJSONArray(String subArr,Integer tOpenCityId){ |
| | | JSONArray jsonArray = JSON.parseArray(subArr); |
| | | int size = jsonArray.size(); |
| | | for (int i = 0; i < size; i++){ |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | TOpenCityBusiness business = new TOpenCityBusiness(); |
| | | if (SinataUtil.isNotEmpty(jsonObject.getInteger("busId")) && jsonObject.getInteger("busId") != 0){ |
| | | business = tOpenCityBusinessService.selectById(jsonObject.getInteger("busId")); |
| | | business.setUpdateTime(new Date()); |
| | | business.setUpdateUser(ShiroKit.getUser().getId()); |
| | | business.setFlag("2"); |
| | | }else{ |
| | | business.setInsertTime(DateUtil.parse(jsonObject.getString("time")+" 00:00:00","yyyy-MM-dd HH:mm:ss")); |
| | | business.setInsertUser(ShiroKit.getUser().getId()); |
| | | } |
| | | business.setOpenCityId(tOpenCityId); |
| | | String type = jsonObject.getString("type"); |
| | | Integer businessType = 0; |
| | | if ("专车".equals(type)){ |
| | | businessType = 1; |
| | | }else if ("出租车".equals(type)){ |
| | | businessType = 2; |
| | | }else if ("跨城出行".equals(type)){ |
| | | businessType = 3; |
| | | }else if ("跨城小件物流".equals(type)){ |
| | | businessType = 4; |
| | | }else if ("同城小件物流".equals(type)){ |
| | | businessType = 5; |
| | | }else if ("包车".equals(type)){ |
| | | businessType = 6; |
| | | } |
| | | business.setBusinessType(businessType); |
| | | business.setSort(jsonObject.getInteger("sort")); |
| | | if (SinataUtil.isNotEmpty(jsonObject.getInteger("busId")) && jsonObject.getInteger("busId") != 0){ |
| | | tOpenCityBusinessService.updateById(business); |
| | | }else{ |
| | | tOpenCityBusinessService.insert(business); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除城市管理 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tOpenCityId) { |
| | | TOpenCity tOpenCity = tOpenCityService.selectById(tOpenCityId); |
| | | tOpenCity.setFlag("3"); |
| | | tOpenCityService.updateById(tOpenCity); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改城市管理 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TOpenCity tOpenCity,@RequestParam String businessTypeStr,Integer areaId,Integer cityId,Integer provinceId) { |
| | | if (SinataUtil.isNotEmpty(areaId)){ |
| | | TRegion area = tRegionService.selectById(areaId); |
| | | tOpenCity.setCode(area.getCode()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(cityId)){ |
| | | TRegion city = tRegionService.selectById(cityId); |
| | | tOpenCity.setCode(city.getCode()); |
| | | } |
| | | if (SinataUtil.isNotEmpty(provinceId)){ |
| | | TRegion province = tRegionService.selectById(provinceId); |
| | | tOpenCity.setCode(province.getCode()); |
| | | } |
| | | if (SinataUtil.isEmpty(areaId)){ |
| | | tOpenCity.setAreaId(0); |
| | | tOpenCity.setAreaName(""); |
| | | }else{ |
| | | tOpenCity.setAreaId(areaId); |
| | | } |
| | | if (SinataUtil.isEmpty(cityId)){ |
| | | tOpenCity.setCityId(0); |
| | | tOpenCity.setCityName(""); |
| | | }else{ |
| | | tOpenCity.setCityId(cityId); |
| | | } |
| | | if (SinataUtil.isEmpty(provinceId)){ |
| | | tOpenCity.setProvinceId(0); |
| | | tOpenCity.setProvinceName(""); |
| | | }else{ |
| | | tOpenCity.setProvinceId(provinceId); |
| | | } |
| | | |
| | | //获取经纬度 |
| | | String address = tOpenCity.getAreaName(); |
| | | if (SinataUtil.isNotEmpty(tOpenCity.getCityName())){ |
| | | address+=tOpenCity.getCityName(); |
| | | } |
| | | if (SinataUtil.isNotEmpty(tOpenCity.getProvinceName())){ |
| | | address+=tOpenCity.getProvinceName(); |
| | | } |
| | | JSONObject positionObj = GaoDeMapUtil.getLngAndLat(address); |
| | | String longitude = positionObj.getString("longitude"); |
| | | String latitude = positionObj.getString("latitude"); |
| | | tOpenCity.setLon(Double.valueOf(longitude)); |
| | | tOpenCity.setLat(Double.valueOf(latitude)); |
| | | tOpenCity.setUpdateTime(new Date()); |
| | | tOpenCity.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tOpenCityService.updateById(tOpenCity); |
| | | |
| | | //删除经营业务 |
| | | TOpenCityBusiness business = new TOpenCityBusiness(); |
| | | business.setFlag("3"); |
| | | tOpenCityBusinessService.update(business,new EntityWrapper<TOpenCityBusiness>().eq("openCityId",tOpenCity.getId())); |
| | | //添加经营业务 |
| | | testJSONStrToJSONArray(businessTypeStr,tOpenCity.getId()); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 城市管理详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tOpenCityId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tOpenCityId") Integer tOpenCityId) { |
| | | return tOpenCityService.selectById(tOpenCityId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.SuccessTip; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TAppUserDetailOrderResp; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverCommissionResp; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TOrderResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import com.stylefeng.guns.modular.system.model.TAppUser; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import com.stylefeng.guns.modular.system.service.ITAppUserService; |
| | | import com.stylefeng.guns.modular.system.service.ITCancelOrderService; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderService; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-15 11:57:13 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tOrder") |
| | | public class TOrderController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tOrder/"; |
| | | |
| | | @Autowired |
| | | private ITOrderService tOrderService; |
| | | @Autowired |
| | | private ITAppUserService tAppUserService; |
| | | @Autowired |
| | | private ITCancelOrderService tCancelOrderService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tOrder.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tOrder_add") |
| | | public String tOrderAdd() { |
| | | return PREFIX + "tOrder_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tOrder_update/{tOrderId}") |
| | | public String tOrderUpdate(@PathVariable Integer tOrderId, Model model) { |
| | | TOrder tOrder = tOrderService.selectById(tOrderId); |
| | | model.addAttribute("item",tOrder); |
| | | LogObjectHolder.me().set(tOrder); |
| | | return PREFIX + "tOrder_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转异常页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tOrder-exception") |
| | | public String tOrderException(Model model) { |
| | | return PREFIX + "tOrderException.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("/cancelOrder") |
| | | public String cancelOrder() { |
| | | return PREFIX + "tCancelOrder.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转冻结页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tOrderException_start_and_stop") |
| | | public String tAppUserStartAndStop( Integer id, |
| | | Model model) { |
| | | |
| | | // 查询订单 |
| | | TOrder tOrder = tOrderService.selectById(id); |
| | | TAppUser tAppUser = new TAppUser(); |
| | | if(Objects.nonNull(tOrder)){ |
| | | tAppUser = tAppUserService.selectById(tOrder.getUserId()); |
| | | } |
| | | |
| | | model.addAttribute("id",id); |
| | | if(Objects.nonNull(tAppUser)){ |
| | | model.addAttribute("status",tAppUser.getStatus()); |
| | | } |
| | | return PREFIX + "tOrderStartAndStopException.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转详情页面 |
| | | */ |
| | | @RequestMapping("/orderDetail") |
| | | public String orderDetail(Integer orderId, Model model) { |
| | | tOrderService.orderDetail(orderId,model); |
| | | return PREFIX + "tOrderDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转异常详情页面 |
| | | */ |
| | | @RequestMapping("/orderExceptionDetail") |
| | | public String orderExceptionDetail(Integer orderId, Model model) { |
| | | tOrderService.orderExceptionDetail(orderId,model); |
| | | return PREFIX + "tOrderExceptionDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "用户获取订单列表") |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(Integer userId) { |
| | | EntityWrapper<TOrder> wrapper = new EntityWrapper<>(); |
| | | if(Objects.nonNull(userId)){ |
| | | wrapper.eq("user_id",userId); |
| | | } |
| | | wrapper.orderBy("createTime",false); |
| | | return tOrderService.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "获取订单列表") |
| | | @RequestMapping(value = "/orderList") |
| | | @ResponseBody |
| | | public Object orderList(String createTime, |
| | | String code, |
| | | Integer source, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state, |
| | | String driverName) { |
| | | return tOrderService.getOrderList(createTime, code, source, userName, userPhone, state, driverName,1); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "获取订单异常列表") |
| | | @RequestMapping(value = "/orderExceptionList") |
| | | @ResponseBody |
| | | public Object orderExceptionList(String createTime, |
| | | String code, |
| | | Integer source, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state, |
| | | String driverName) { |
| | | // return tOrderService.getOrderList(createTime, code, source, userName, userPhone, state, driverName,2); |
| | | return tCancelOrderService.getCancelOrderList(createTime, code, source, userName, userPhone, state, driverName); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "获取用户详情里的订单列表") |
| | | @RequestMapping(value = "/appUserDetailList") |
| | | @ResponseBody |
| | | public Object appUserDetailList(String condition,Integer userId) { |
| | | List<TAppUserDetailOrderResp> list = new ArrayList<>(); |
| | | |
| | | |
| | | EntityWrapper<TOrder> wrapper = new EntityWrapper<>(); |
| | | if(Objects.nonNull(userId)){ |
| | | wrapper.eq("userId",userId); |
| | | } |
| | | List<TOrder> tOrders = tOrderService.selectList(wrapper); |
| | | for (TOrder tOrder : tOrders) { |
| | | TAppUserDetailOrderResp tAppUserDetailOrderResp = new TAppUserDetailOrderResp(); |
| | | BeanUtils.copyProperties(tOrder,tAppUserDetailOrderResp); |
| | | |
| | | // 计算总里程 |
| | | if(Objects.nonNull(tOrder.getActualMileage())){ |
| | | tAppUserDetailOrderResp.setMileageSum(tOrder.getActualMileage()/1000); |
| | | } |
| | | |
| | | // 计算总时长 |
| | | long travelTimeSum = 0; |
| | | if(Objects.nonNull(tAppUserDetailOrderResp.getBoardingTime()) && Objects.nonNull(tAppUserDetailOrderResp.getGetoffTime())){ |
| | | travelTimeSum = DateUtil.between(tAppUserDetailOrderResp.getBoardingTime(), tAppUserDetailOrderResp.getGetoffTime(), DateUnit.MINUTE); |
| | | } |
| | | tAppUserDetailOrderResp.setTravelTimeSum(Integer.valueOf(Long.toString(travelTimeSum))); |
| | | |
| | | list.add(tAppUserDetailOrderResp); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tOrderService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TOrder tOrder) { |
| | | tOrderService.insert(tOrder); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tOrderId) { |
| | | tOrderService.deleteById(tOrderId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TOrder tOrder) { |
| | | tOrderService.updateById(tOrder); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tOrderId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tOrderId") Integer tOrderId) { |
| | | return tOrderService.selectById(tOrderId); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出订单列表",notes="导出订单列表") |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void export(String createTime, |
| | | String code, |
| | | Integer source, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state, |
| | | String driverName,HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "OrderInfo"+time1+".xls"; |
| | | String[] title = new String[] {"下单时间","订单编号","订单来源","开始服务时间","下单用户昵称", |
| | | "下单用户手机","起点地址","终点地址","接单司机","司机电话","预估价","取消次数","订单状态"}; |
| | | List<TOrderResp> orderList = tOrderService.getOrderList(createTime, code, source, userName, userPhone, state, driverName,1); |
| | | String[][] values = new String[orderList.size()][]; |
| | | for (int i = 0; i < orderList.size(); i++) { |
| | | TOrderResp d = orderList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); |
| | | values[i][1] = d.getCode(); |
| | | Integer source1 = d.getSource(); |
| | | if(1 == source1){ |
| | | values[i][2] = "小程序"; |
| | | }else if(2 == source1){ |
| | | values[i][2] = "司机创建"; |
| | | } |
| | | if(Objects.nonNull(d.getStartTime())){ |
| | | values[i][3] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getStartTime()); |
| | | }else { |
| | | values[i][3] = ""; |
| | | } |
| | | values[i][4] = d.getUserName(); |
| | | values[i][5] = d.getUserPhone(); |
| | | values[i][6] = d.getStartAddress(); |
| | | values[i][7] = d.getEndAddress(); |
| | | values[i][8] = d.getDriverName(); |
| | | values[i][9] = d.getDriverPhone(); |
| | | values[i][10] = String.valueOf(Objects.nonNull(d.getEstimatedPrice())?d.getEstimatedPrice(): BigDecimal.ZERO); |
| | | values[i][11] = String.valueOf(d.getCancelCount()); |
| | | Integer status1 = d.getState(); |
| | | if(101 == status1){ |
| | | values[i][12] = "待接单"; |
| | | }else if(102 == status1){ |
| | | values[i][12] = "已接单"; |
| | | }else if(103 == status1){ |
| | | values[i][12] = "前往预约点"; |
| | | }else if(104 == status1){ |
| | | values[i][12] = "到达预约点"; |
| | | }else if(105 == status1){ |
| | | values[i][12] = "开始服务"; |
| | | }else if(106 == status1){ |
| | | values[i][12] = "到达目的地"; |
| | | }else if(107 == status1){ |
| | | values[i][12] = "待支付"; |
| | | }else if(108 == status1){ |
| | | values[i][12] = "待评价"; |
| | | }else if(109 == status1){ |
| | | values[i][12] = "已完成"; |
| | | }else if(201 == status1){ |
| | | values[i][12] = "转单中"; |
| | | }else if(301 == status1){ |
| | | values[i][12] = "已取消"; |
| | | }else if(401 == status1){ |
| | | values[i][12] = "等待中"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "导出订单列表",notes="导出订单列表") |
| | | @RequestMapping(value = "/export-exception") |
| | | @ResponseBody |
| | | public void exportException(String createTime, |
| | | String code, |
| | | Integer source, |
| | | String userName, |
| | | String userPhone, |
| | | Integer state, |
| | | String driverName,HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "OrderExceptionInfo"+time1+".xls"; |
| | | String[] title = new String[] {"下单时间","订单编号","订单来源","乘车时间","下单用户昵称", |
| | | "下单用户手机","起点","终点","接单司机","司机电话","预估价格","取消次数","订单状态"}; |
| | | List<TOrderResp> orderList = tOrderService.getOrderList(createTime, code, source, userName, userPhone, state, driverName,1); |
| | | String[][] values = new String[orderList.size()][]; |
| | | for (int i = 0; i < orderList.size(); i++) { |
| | | TOrderResp d = orderList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); |
| | | values[i][1] = d.getCode(); |
| | | Integer source1 = d.getSource(); |
| | | if(1 == source1){ |
| | | values[i][2] = "小程序"; |
| | | }else if(2 == source1){ |
| | | values[i][2] = "司机创建"; |
| | | } |
| | | if(Objects.nonNull(d.getStartTime())){ |
| | | values[i][3] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getStartTime()); |
| | | }else { |
| | | values[i][3] = ""; |
| | | } |
| | | values[i][4] = d.getUserName(); |
| | | values[i][5] = d.getUserPhone(); |
| | | values[i][6] = d.getStartAddress(); |
| | | values[i][7] = d.getEndAddress(); |
| | | values[i][8] = d.getDriverName(); |
| | | values[i][9] = d.getDriverPhone(); |
| | | values[i][10] = String.valueOf(Objects.nonNull(d.getEstimatedPrice())?d.getEstimatedPrice(): BigDecimal.ZERO); |
| | | values[i][11] = String.valueOf(d.getCancelCount()); |
| | | Integer status1 = d.getState(); |
| | | if(101 == status1){ |
| | | values[i][12] = "待接单"; |
| | | }else if(102 == status1){ |
| | | values[i][12] = "已接单"; |
| | | }else if(103 == status1){ |
| | | values[i][12] = "前往预约点"; |
| | | }else if(104 == status1){ |
| | | values[i][12] = "到达预约点"; |
| | | }else if(105 == status1){ |
| | | values[i][12] = "开始服务"; |
| | | }else if(106 == status1){ |
| | | values[i][12] = "到达目的地"; |
| | | }else if(107 == status1){ |
| | | values[i][12] = "待支付"; |
| | | }else if(108 == status1){ |
| | | values[i][12] = "待评价"; |
| | | }else if(109 == status1){ |
| | | values[i][12] = "已完成"; |
| | | }else if(201 == status1){ |
| | | values[i][12] = "转单中"; |
| | | }else if(301 == status1){ |
| | | values[i][12] = "已取消"; |
| | | }else if(401 == status1){ |
| | | values[i][12] = "等待中"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TComplaint; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TOrderEvaluate; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderEvaluateService; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 评价列表控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-09 11:44:36 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tOrderEvaluate") |
| | | public class TOrderEvaluateController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tOrderEvaluate/"; |
| | | |
| | | @Autowired |
| | | private ITOrderEvaluateService tOrderEvaluateService; |
| | | |
| | | /** |
| | | * 跳转到评价列表首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tOrderEvaluate.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | | @RequestMapping("/lookDetail/{id}/{type}") |
| | | public String lookDetail(@PathVariable Integer id, @PathVariable Integer type, Model model) { |
| | | TOrderEvaluate tOrderEvaluate = tOrderEvaluateService.selectById(id); |
| | | String str = ""; |
| | | if (1 == type){ |
| | | str = tOrderEvaluate.getContent(); |
| | | } |
| | | model.addAttribute("str",str); |
| | | return "/system/tComplaint/lookDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加评价列表 |
| | | */ |
| | | @RequestMapping("/tOrderEvaluate_add") |
| | | public String tOrderEvaluateAdd() { |
| | | return PREFIX + "tOrderEvaluate_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改评价列表 |
| | | */ |
| | | @RequestMapping("/tOrderEvaluate_update/{tOrderEvaluateId}") |
| | | public String tOrderEvaluateUpdate(@PathVariable Integer tOrderEvaluateId, Model model) { |
| | | TOrderEvaluate tOrderEvaluate = tOrderEvaluateService.selectById(tOrderEvaluateId); |
| | | model.addAttribute("item",tOrderEvaluate); |
| | | LogObjectHolder.me().set(tOrderEvaluate); |
| | | return PREFIX + "tOrderEvaluate_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取评价列表列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String userName, |
| | | String userPhone, |
| | | String driverName, |
| | | String driverPhone, |
| | | String fraction, |
| | | Integer orderType) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tOrderEvaluateService.getOrderEvaluateList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),beginTime,endTime,userName,userPhone,driverName,driverPhone,fraction,orderType)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增评价列表 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TOrderEvaluate tOrderEvaluate) { |
| | | tOrderEvaluateService.insert(tOrderEvaluate); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除评价列表 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tOrderEvaluateId) { |
| | | tOrderEvaluateService.deleteById(tOrderEvaluateId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改评价列表 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TOrderEvaluate tOrderEvaluate) { |
| | | tOrderEvaluateService.updateById(tOrderEvaluate); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 评价列表详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tOrderEvaluateId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tOrderEvaluateId") Integer tOrderEvaluateId) { |
| | | return tOrderEvaluateService.selectById(tOrderEvaluateId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TOrderRefusal; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderRefusalService; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-21 17:54:07 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tOrderRefusal") |
| | | public class TOrderRefusalController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tOrderRefusal/"; |
| | | |
| | | @Autowired |
| | | private ITOrderRefusalService tOrderRefusalService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tOrderRefusal.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tOrderRefusal_add") |
| | | public String tOrderRefusalAdd() { |
| | | return PREFIX + "tOrderRefusal_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tOrderRefusal_update/{tOrderRefusalId}") |
| | | public String tOrderRefusalUpdate(@PathVariable Integer tOrderRefusalId, Model model) { |
| | | TOrderRefusal tOrderRefusal = tOrderRefusalService.selectById(tOrderRefusalId); |
| | | model.addAttribute("item",tOrderRefusal); |
| | | LogObjectHolder.me().set(tOrderRefusal); |
| | | return PREFIX + "tOrderRefusal_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | EntityWrapper<TOrderRefusal> wrapper = new EntityWrapper<>(); |
| | | if(StringUtils.hasLength(condition)){ |
| | | wrapper.eq("driver_id",condition); |
| | | } |
| | | return tOrderRefusalService.selectList(wrapper); |
| | | } |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tOrderRefusalService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TOrderRefusal tOrderRefusal) { |
| | | tOrderRefusalService.insert(tOrderRefusal); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tOrderRefusalId) { |
| | | tOrderRefusalService.deleteById(tOrderRefusalId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TOrderRefusal tOrderRefusal) { |
| | | tOrderRefusalService.updateById(tOrderRefusal); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tOrderRefusalId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tOrderRefusalId") Integer tOrderRefusalId) { |
| | | return tOrderRefusalService.selectById(tOrderRefusalId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TFeedback; |
| | | import com.stylefeng.guns.modular.system.model.TSystemNotice; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemNoticeService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TProblem; |
| | | import com.stylefeng.guns.modular.system.service.ITProblemService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 用户留言管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-24 11:20:23 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tProblem") |
| | | public class TProblemController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tProblem/"; |
| | | |
| | | @Autowired |
| | | private ITProblemService tProblemService; |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService itSystemNoticeService; |
| | | |
| | | /** |
| | | * 跳转到用户留言管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tProblem.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | | @RequestMapping("/lookDetail/{id}/{type}") |
| | | public String lookDetail(@PathVariable Integer id, @PathVariable Integer type, Model model) { |
| | | TProblem tProblem = tProblemService.selectById(id); |
| | | String str = ""; |
| | | if (1 == type){ |
| | | str = tProblem.getContent(); |
| | | }else if (2 == type){ |
| | | str = tProblem.getAnswer(); |
| | | } |
| | | model.addAttribute("str",str); |
| | | return "/system/tComplaint/lookDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到立即处理页面 |
| | | */ |
| | | @RequestMapping("/tProblem_immediately/{tProblemId}") |
| | | public String tProblemUpdate(@PathVariable Integer tProblemId, Model model) { |
| | | model.addAttribute("tProblemId",tProblemId); |
| | | return PREFIX + "tProblem_immediately.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取用户留言管理列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String userName, |
| | | Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tProblemService.getProblemList(page,beginTime,endTime,userName,state)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 立即处理 |
| | | */ |
| | | @RequestMapping(value = "/immediately") |
| | | @ResponseBody |
| | | public Object immediately(@RequestParam Integer tProblemId,@RequestParam String answer) { |
| | | TProblem tProblem = tProblemService.selectById(tProblemId); |
| | | if (SinataUtil.isNotEmpty(tProblem)){ |
| | | tProblem.setAnswer(answer); |
| | | tProblem.setHandleTime(new Date()); |
| | | tProblem.setHandleUserId(ShiroKit.getUser().getId()); |
| | | tProblem.setState(2); |
| | | tProblemService.updateById(tProblem); |
| | | |
| | | //增加系统消息 |
| | | TSystemNotice notice = new TSystemNotice(); |
| | | notice.setType(2); |
| | | notice.setUserType(1); |
| | | notice.setContent("您的留言被回复啦:【"+answer+"】"); |
| | | notice.setUserId(tProblem.getUserId()); |
| | | notice.setInsertTime(new Date()); |
| | | notice.setRead(1); |
| | | itSystemNoticeService.insert(notice); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TComplaint; |
| | | import com.stylefeng.guns.modular.system.model.TSystemNotice; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemNoticeService; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TPubWithdrawal; |
| | | import com.stylefeng.guns.modular.system.service.ITPubWithdrawalService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 提现列表控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-09 09:30:59 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tPubWithdrawal") |
| | | public class TPubWithdrawalController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tPubWithdrawal/"; |
| | | |
| | | @Autowired |
| | | private ITPubWithdrawalService tPubWithdrawalService; |
| | | |
| | | @Autowired |
| | | private ITSystemNoticeService tSystemNoticeService; |
| | | |
| | | /** |
| | | * 跳转到提现列表首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tPubWithdrawal.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | | @RequestMapping("/lookDetail/{id}/{type}") |
| | | public String lookDetail(@PathVariable Integer id, @PathVariable Integer type, Model model) { |
| | | TPubWithdrawal tPubWithdrawal = tPubWithdrawalService.selectById(id); |
| | | String str = ""; |
| | | if (1 == type){ |
| | | str = tPubWithdrawal.getRemark(); |
| | | } |
| | | model.addAttribute("str",str); |
| | | return "/system/tComplaint/lookDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到立即处理页面 |
| | | */ |
| | | @RequestMapping("/tPubWithdrawal_immediately/{tPubWithdrawalId}") |
| | | public String tPubWithdrawalUpdate(@PathVariable Integer tPubWithdrawalId, Model model) { |
| | | model.addAttribute("tPubWithdrawalId",tPubWithdrawalId); |
| | | return PREFIX + "tPubWithdrawal_immediately.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取提现列表列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String name, |
| | | Integer withdrawalType) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tPubWithdrawalService.getWithdrawalList(page,beginTime,endTime,name,withdrawalType)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增提现列表 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TPubWithdrawal tPubWithdrawal) { |
| | | tPubWithdrawalService.insert(tPubWithdrawal); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 立即处理操作 |
| | | */ |
| | | @RequestMapping(value = "/immediately") |
| | | @ResponseBody |
| | | public Object immediately(@RequestParam Integer id,@RequestParam Integer state,@RequestParam String remark) { |
| | | TPubWithdrawal tPubWithdrawal = tPubWithdrawalService.selectById(id); |
| | | if (SinataUtil.isNotEmpty(tPubWithdrawal)){ |
| | | // tPubWithdrawal.setState(state); //调用接口修改状态 |
| | | tPubWithdrawal.setRemark(remark); |
| | | tPubWithdrawal.setHandleTime(new Date()); |
| | | |
| | | Integer stateObj = 1; |
| | | if (2 == state){ //同意提现 |
| | | stateObj = 1; |
| | | }else if (3 == state){ //拒绝提现 |
| | | stateObj = 2; |
| | | } |
| | | tPubWithdrawalService.updateById(tPubWithdrawal); |
| | | |
| | | Map<String,String> map = new HashMap<>(); |
| | | map.put("id", String.valueOf(tPubWithdrawal.getId())); |
| | | map.put("state", String.valueOf(stateObj)); |
| | | String result = HttpRequestUtil.postRequest(PushURL.withdraw_auth_url, map); |
| | | System.out.println("提现审核接口 :【recordId="+tPubWithdrawal.getId().toString()+"】,调用接口:"+result); |
| | | |
| | | //增加系统消息 |
| | | TSystemNotice notice = new TSystemNotice(); |
| | | notice.setType(2); |
| | | notice.setUserType(tPubWithdrawal.getUserType()); |
| | | notice.setContent("提现处理结果:【"+remark+"】。"); |
| | | notice.setUserId(tPubWithdrawal.getUserId()); |
| | | notice.setInsertTime(new Date()); |
| | | notice.setRead(1); |
| | | tSystemNoticeService.insert(notice); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改提现列表 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TPubWithdrawal tPubWithdrawal) { |
| | | tPubWithdrawalService.updateById(tPubWithdrawal); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 提现列表详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tPubWithdrawalId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tPubWithdrawalId") Integer tPubWithdrawalId) { |
| | | return tPubWithdrawalService.selectById(tPubWithdrawalId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverCommissionResp; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordAgentResp; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TRechargeRecordUserResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TRechargeRecord; |
| | | import com.stylefeng.guns.modular.system.service.ITRechargeRecordService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-20 11:49:58 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tRechargeRecord") |
| | | public class TRechargeRecordController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tRechargeRecord/"; |
| | | |
| | | @Autowired |
| | | private ITRechargeRecordService tRechargeRecordService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tRechargeRecord.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tRechargeRecord_add") |
| | | public String tRechargeRecordAdd() { |
| | | return PREFIX + "tRechargeRecord_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tRechargeRecord_update/{tRechargeRecordId}") |
| | | public String tRechargeRecordUpdate(@PathVariable Integer tRechargeRecordId, Model model) { |
| | | TRechargeRecord tRechargeRecord = tRechargeRecordService.selectById(tRechargeRecordId); |
| | | model.addAttribute("item",tRechargeRecord); |
| | | LogObjectHolder.me().set(tRechargeRecord); |
| | | return PREFIX + "tRechargeRecord_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到用户充值列表 |
| | | */ |
| | | @RequestMapping("/userRecharge") |
| | | public String userRecharge() { |
| | | return PREFIX + "tRechargeRecordUser.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到代理商充值列表 |
| | | */ |
| | | @RequestMapping("/agentRecharge") |
| | | public String agentRecharge() { |
| | | return PREFIX + "tRechargeRecordAgent.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取用户充值列表 |
| | | */ |
| | | @RequestMapping(value = "/userRechargeList") |
| | | @ResponseBody |
| | | public Object userRechargeList(String userName,String userPhone,String code,String createTime) { |
| | | return tRechargeRecordService.userRecharge(userName,userPhone,code,createTime); |
| | | } |
| | | |
| | | /** |
| | | * 获取代理商充值列表 |
| | | */ |
| | | @RequestMapping(value = "/agentRechargeList") |
| | | @ResponseBody |
| | | public Object agentRechargeList(String driverName,String driverPhone,String createTime) { |
| | | return tRechargeRecordService.agentRechargeList(driverName,driverPhone,createTime); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tRechargeRecordService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TRechargeRecord tRechargeRecord) { |
| | | tRechargeRecordService.insert(tRechargeRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tRechargeRecordId) { |
| | | tRechargeRecordService.deleteById(tRechargeRecordId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TRechargeRecord tRechargeRecord) { |
| | | tRechargeRecordService.updateById(tRechargeRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tRechargeRecordId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tRechargeRecordId") Integer tRechargeRecordId) { |
| | | return tRechargeRecordService.selectById(tRechargeRecordId); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出用户充值列表",notes="导出用户充值列表") |
| | | @RequestMapping(value = "/exportUserRecharge") |
| | | @ResponseBody |
| | | public void exportUserRecharge(String userName,String userPhone,String code,String createTime, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "UserRechargeRecord"+time1+".xls"; |
| | | String[] title = new String[] {"充值时间","流水ID","用户姓名","用户手机号","充值金额", |
| | | "充值方式","状态"}; |
| | | List<TRechargeRecordUserResp> userRechargeList = tRechargeRecordService.userRecharge(userName,userPhone,code,createTime); |
| | | |
| | | String[][] values = new String[userRechargeList.size()][]; |
| | | for (int i = 0; i < userRechargeList.size(); i++) { |
| | | TRechargeRecordUserResp d = userRechargeList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); |
| | | values[i][1] = d.getCode(); |
| | | values[i][2] = d.getUserName(); |
| | | values[i][3] = d.getUserPhone(); |
| | | values[i][4] = String.valueOf(Objects.nonNull(d.getAmount())?d.getAmount(): BigDecimal.ZERO); |
| | | Integer payType = d.getPayType(); |
| | | if(1 == payType){ |
| | | values[i][5] = "微信"; |
| | | }else if(2 == payType){ |
| | | values[i][5] = "系统充值"; |
| | | }else{ |
| | | values[i][5] = "其他"; |
| | | } |
| | | Integer status1 = d.getPayStatus(); |
| | | if(1 == status1){ |
| | | values[i][6] = "失败"; |
| | | }else if(2 == status1){ |
| | | values[i][6] = "成功"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "导出代理商充值列表",notes="导出代理商充值列表") |
| | | @RequestMapping(value = "/exportAgentRecharge") |
| | | @ResponseBody |
| | | public void exportAgentRecharge(String driverName,String driverPhone,String createTime, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "AgentRechargeRecord"+time1+".xls"; |
| | | String[] title = new String[] {"充值时间","代理商姓名","联系电话","代理区域","司机姓名","司机手机号","充值金额", |
| | | "充值方式","状态"}; |
| | | List<TRechargeRecordAgentResp> agentRechargeList = tRechargeRecordService.agentRechargeList(driverName,driverPhone,createTime); |
| | | |
| | | String[][] values = new String[agentRechargeList.size()][]; |
| | | for (int i = 0; i < agentRechargeList.size(); i++) { |
| | | TRechargeRecordAgentResp d = agentRechargeList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getCreateTime()); |
| | | values[i][1] = d.getPrincipal(); |
| | | values[i][2] = d.getPrincipalPhone(); |
| | | values[i][3] = d.getProvinceName()+d.getCityName(); |
| | | values[i][4] = d.getDriverName(); |
| | | values[i][5] = d.getDriverPhone(); |
| | | values[i][6] = String.valueOf(Objects.nonNull(d.getAmount())?d.getAmount(): BigDecimal.ZERO); |
| | | Integer payType = d.getPayType(); |
| | | if(1 == payType){ |
| | | values[i][7] = "微信"; |
| | | }else if(2 == payType){ |
| | | values[i][7] = "系统充值"; |
| | | }else{ |
| | | values[i][7] = "其他"; |
| | | } |
| | | Integer status1 = d.getPayStatus(); |
| | | if(1 == status1){ |
| | | values[i][8] = "失败"; |
| | | }else if(2 == status1){ |
| | | values[i][8] = "成功"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TRegion; |
| | | import com.stylefeng.guns.modular.system.service.ITRegionService; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-20 14:21:02 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tRegion") |
| | | public class TRegionController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tRegion/"; |
| | | |
| | | @Autowired |
| | | private ITRegionService tRegionService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tRegion.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tRegion_add") |
| | | public String tRegionAdd() { |
| | | return PREFIX + "tRegion_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tRegion_update/{tRegionId}") |
| | | public String tRegionUpdate(@PathVariable Integer tRegionId, Model model) { |
| | | TRegion tRegion = tRegionService.selectById(tRegionId); |
| | | model.addAttribute("item",tRegion); |
| | | LogObjectHolder.me().set(tRegion); |
| | | return PREFIX + "tRegion_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tRegionService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TRegion tRegion) { |
| | | tRegionService.insert(tRegion); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tRegionId) { |
| | | tRegionService.deleteById(tRegionId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TRegion tRegion) { |
| | | tRegionService.updateById(tRegion); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tRegionId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tRegionId") Integer tRegionId) { |
| | | return tRegionService.selectById(tRegionId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.controller.resp.RevenueExpenditureResp; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TDriverCommissionResp; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TRevenue; |
| | | import com.stylefeng.guns.modular.system.service.ITRevenueService; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-13 09:49:19 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tRevenue") |
| | | public class TRevenueController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tRevenue/"; |
| | | |
| | | @Autowired |
| | | private ITRevenueService tRevenueService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tRevenue.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tRevenue_add") |
| | | public String tRevenueAdd() { |
| | | return PREFIX + "tRevenue_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tRevenue_update/{tRevenueId}") |
| | | public String tRevenueUpdate(@PathVariable Integer tRevenueId, Model model) { |
| | | TRevenue tRevenue = tRevenueService.selectById(tRevenueId); |
| | | model.addAttribute("item",tRevenue); |
| | | LogObjectHolder.me().set(tRevenue); |
| | | return PREFIX + "tRevenue_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到佣金提现详情 |
| | | */ |
| | | @RequestMapping("/commissionDetail") |
| | | public String commissionDetail(String code, Model model) { |
| | | tRevenueService.commissionDetail(code,model); |
| | | return PREFIX + "tRevenueCommissionDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到余额提现详情 |
| | | */ |
| | | @RequestMapping("/balanceDetail") |
| | | public String balanceDetail(String code, Model model) { |
| | | tRevenueService.balanceDetail(code,model); |
| | | return PREFIX + "tRevenueBalanceDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到支付订单详情 |
| | | */ |
| | | @RequestMapping("/orderDetail") |
| | | public String orderDetail(String code, Model model) { |
| | | tRevenueService.orderDetail(code,model); |
| | | return PREFIX + "tRevenueOrderDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String code,Integer businessType,Integer payType,String driverName,String businessTime) { |
| | | return tRevenueService.getPageList(code,businessType,payType,driverName,businessTime); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tRevenueService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TRevenue tRevenue) { |
| | | tRevenueService.insert(tRevenue); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tRevenueId) { |
| | | tRevenueService.deleteById(tRevenueId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TRevenue tRevenue) { |
| | | tRevenueService.updateById(tRevenue); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tRevenueId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tRevenueId") Integer tRevenueId) { |
| | | return tRevenueService.selectById(tRevenueId); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出收支明细列表",notes="导出收支明细列表") |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void export(String code,Integer businessType,Integer payType,String driverName,String businessTime, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "RevenueExpenditureDetailsInfo"+time1+".xls"; |
| | | String[] title = new String[] {"订单号","交易时间","交易类型","司机姓名","司机电话", |
| | | "支付类型","金额","佣金提成","优惠券","余额","状态"}; |
| | | List<RevenueExpenditureResp> pageList = tRevenueService.getPageList(code, businessType, payType, driverName, businessTime); |
| | | |
| | | String[][] values = new String[pageList.size()][]; |
| | | for (int i = 0; i < pageList.size(); i++) { |
| | | RevenueExpenditureResp d = pageList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = d.getCode(); |
| | | values[i][1] = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d.getBusinessTime()); |
| | | Integer businessType1 = d.getBusinessType(); |
| | | if(1 == businessType1){ |
| | | values[i][2] = "支付订单"; |
| | | }else if (11 == businessType1){ |
| | | values[i][2] = "佣金提现"; |
| | | }else if (12 == businessType1){ |
| | | values[i][2] = "余额提现"; |
| | | } |
| | | values[i][3] = d.getDriverName(); |
| | | values[i][4] = d.getDriverPhone(); |
| | | Integer payType1 = d.getPayType(); |
| | | if(1 == payType1){ |
| | | values[i][5] = "微信支付"; |
| | | }else if (2 == payType1){ |
| | | values[i][5] = "余额支付"; |
| | | }else if (3 == payType1){ |
| | | values[i][5] = "线下收款"; |
| | | } |
| | | values[i][6] = String.valueOf(Objects.isNull(d.getAmount())? BigDecimal.ZERO :d.getAmount()); |
| | | values[i][7] = String.valueOf(Objects.isNull(d.getCommissionAmount())? BigDecimal.ZERO :d.getCommissionAmount()); |
| | | values[i][8] = String.valueOf(Objects.isNull(d.getDiscountedPrice())? BigDecimal.ZERO :d.getDiscountedPrice()); |
| | | values[i][9] = String.valueOf(Objects.isNull(d.getAccountBalance())? BigDecimal.ZERO :d.getAccountBalance()); |
| | | Integer state = d.getState(); |
| | | if(2 == state){ |
| | | values[i][10] = "完成"; |
| | | }else if(108 == state){ |
| | | values[i][10] = "完成"; |
| | | }else if(109 == state){ |
| | | values[i][10] = "完成"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.TComplaint; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TSmsrecord; |
| | | import com.stylefeng.guns.modular.system.service.ITSmsrecordService; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 短信记录控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-10 19:43:13 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tSmsrecord") |
| | | public class TSmsrecordController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tSmsrecord/"; |
| | | |
| | | @Autowired |
| | | private ITSmsrecordService tSmsrecordService; |
| | | |
| | | /** |
| | | * 跳转到短信记录首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tSmsrecord.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到查看详情 |
| | | */ |
| | | @RequestMapping("/lookDetail/{id}/{type}") |
| | | public String lookDetail(@PathVariable Integer id, @PathVariable Integer type, Model model) { |
| | | TSmsrecord tSmsrecord = tSmsrecordService.selectById(id); |
| | | String str = ""; |
| | | if (1 == type){ |
| | | str = tSmsrecord.getContent(); |
| | | } |
| | | model.addAttribute("str",str); |
| | | return "/system/tComplaint/lookDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取短信记录列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String phone) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tSmsrecordService.getSmsCodeList(page,beginTime,endTime,phone)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * 系统设置控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-09 13:43:44 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tSysReformist") |
| | | public class TSysReformistController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tSysReformist/"; |
| | | |
| | | @Autowired |
| | | private ITSysReformistService tSysReformistService; |
| | | |
| | | @Autowired |
| | | private ITSysIntegralService tSysIntegralService; |
| | | |
| | | @Autowired |
| | | private ITSysFaceDistinguishService tSysFaceDistinguishService; |
| | | |
| | | @Autowired |
| | | private ITSysPushOrderService tSysPushOrderService; |
| | | |
| | | @Autowired |
| | | private ITSysCancleOrderService tSysCancleOrderService; |
| | | |
| | | @Autowired |
| | | private ITPhoneService tPhoneService; |
| | | |
| | | |
| | | /** |
| | | * 跳转到系统设置首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | //改派设置 |
| | | TSysReformist reformist = tSysReformistService.selectOne(new EntityWrapper<TSysReformist>().eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | model.addAttribute("reformist",reformist); |
| | | //积分设置 |
| | | TSysIntegral integral = tSysIntegralService.selectOne(new EntityWrapper<TSysIntegral>().eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | model.addAttribute("integral",integral); |
| | | //人脸识别 |
| | | TSysFaceDistinguish faceDistinguish = tSysFaceDistinguishService.selectOne(new EntityWrapper<TSysFaceDistinguish>().eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | model.addAttribute("faceDistinguish",faceDistinguish); |
| | | |
| | | //专车推单(第一轮) |
| | | TSysPushOrder zcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("pushType", 1).eq("type", 1)); |
| | | model.addAttribute("zcOne",zcOne); |
| | | //专车推单(第二轮) |
| | | TSysPushOrder zcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("pushType", 1).eq("type", 2)); |
| | | model.addAttribute("zcTwo",zcTwo); |
| | | //专车推单(第三轮) |
| | | TSysPushOrder zcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("pushType", 1).eq("type", 3)); |
| | | model.addAttribute("zcThree",zcThree); |
| | | |
| | | //出租车推单(第一轮) |
| | | TSysPushOrder czcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("pushType", 2).eq("type", 1)); |
| | | model.addAttribute("czcOne",czcOne); |
| | | //出租车推单(第二轮) |
| | | TSysPushOrder czcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("pushType", 2).eq("type", 2)); |
| | | model.addAttribute("czcTwo",czcTwo); |
| | | //出租车推单(第三轮) |
| | | TSysPushOrder czcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("pushType", 2).eq("type", 3)); |
| | | model.addAttribute("czcThree",czcThree); |
| | | |
| | | //普通取消设置(专车) |
| | | TSysCancleOrder ptCancel1 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1).eq("orderType", 1)); |
| | | model.addAttribute("ptCancel1",ptCancel1); |
| | | //普通取消设置(出租车) |
| | | TSysCancleOrder ptCancel2 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1).eq("orderType", 2)); |
| | | model.addAttribute("ptCancel2",ptCancel2); |
| | | //普通取消设置(跨城出行) |
| | | TSysCancleOrder ptCancel3 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1).eq("orderType", 3)); |
| | | model.addAttribute("ptCancel3",ptCancel3); |
| | | |
| | | //预约取消设置(专车) |
| | | TSysCancleOrder yyCancel1 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 2).eq("orderType", 1)); |
| | | model.addAttribute("yyCancel1",yyCancel1); |
| | | //预约取消设置(出租车) |
| | | TSysCancleOrder yyCancel2 = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 2).eq("orderType", 2)); |
| | | model.addAttribute("yyCancel2",yyCancel2); |
| | | |
| | | //报警电话 |
| | | TPhone phone1 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1)); |
| | | model.addAttribute("phone1",phone1); |
| | | //客服电话 |
| | | TPhone phone2 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 2)); |
| | | model.addAttribute("phone2",phone2); |
| | | //客服电话 |
| | | TPhone phone3 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 3)); |
| | | model.addAttribute("phone3",phone3); |
| | | return PREFIX + "tSysReformist.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除系统设置 |
| | | */ |
| | | @RequestMapping(value = "/setUp") |
| | | @ResponseBody |
| | | public Object setUp(@RequestParam BigDecimal one, @RequestParam Integer two, @RequestParam Integer three, @RequestParam Integer openValue, |
| | | @RequestParam Integer isSpecialCar,@RequestParam Integer isTaxiCar, |
| | | @RequestParam Double zc1,@RequestParam Integer zc2,@RequestParam Double zc3, |
| | | @RequestParam Double zc4,@RequestParam Integer zc5,@RequestParam Double zc6, |
| | | @RequestParam Double zc7,@RequestParam Integer zc8,@RequestParam Double zc9, |
| | | @RequestParam Double czc1,@RequestParam Integer czc2,@RequestParam Double czc3, |
| | | @RequestParam Double czc4,@RequestParam Integer czc5,@RequestParam Double czc6, |
| | | @RequestParam Double czc7,@RequestParam Integer czc8,@RequestParam Double czc9, |
| | | @RequestParam Integer ptCancel1,@RequestParam BigDecimal ptCancel2,@RequestParam Integer ptCancel3,@RequestParam BigDecimal ptCancel4,@RequestParam Integer ptCancel5,@RequestParam BigDecimal ptCancel6, |
| | | @RequestParam Integer yyCancel1,@RequestParam BigDecimal yyCancel2,@RequestParam Integer yyCancel3,@RequestParam BigDecimal yyCancel4, |
| | | @RequestParam String phone1,@RequestParam String phone2,@RequestParam String phone3) { |
| | | //改派设置 |
| | | TSysReformist reformist = tSysReformistService.selectOne(new EntityWrapper<TSysReformist>().eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | if (SinataUtil.isNotEmpty(reformist)){ |
| | | reformist.setMoney(one); |
| | | reformist.setIsSpecialCar(isSpecialCar); |
| | | reformist.setIsTaxiCar(isTaxiCar); |
| | | tSysReformistService.updateById(reformist); |
| | | }else{ |
| | | reformist = new TSysReformist(); |
| | | reformist.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | reformist.setMoney(one); |
| | | reformist.setIsSpecialCar(isSpecialCar); |
| | | reformist.setIsTaxiCar(isTaxiCar); |
| | | tSysReformistService.insert(reformist); |
| | | } |
| | | |
| | | //积分设置 |
| | | TSysIntegral integral = tSysIntegralService.selectOne(new EntityWrapper<TSysIntegral>().eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | if (SinataUtil.isNotEmpty(integral)){ |
| | | integral.setIntegral(two); |
| | | tSysIntegralService.updateById(integral); |
| | | }else{ |
| | | integral = new TSysIntegral(); |
| | | integral.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | integral.setIntegral(two); |
| | | tSysIntegralService.insert(integral); |
| | | } |
| | | |
| | | //人脸识别 |
| | | TSysFaceDistinguish faceDistinguish = tSysFaceDistinguishService.selectOne(new EntityWrapper<TSysFaceDistinguish>().eq("companyId", ShiroKit.getUser().getObjectId())); |
| | | if (SinataUtil.isNotEmpty(faceDistinguish)){ |
| | | faceDistinguish.setIsOpen(three); |
| | | faceDistinguish.setMinuteNum(openValue); |
| | | tSysFaceDistinguishService.updateById(faceDistinguish); |
| | | }else{ |
| | | faceDistinguish = new TSysFaceDistinguish(); |
| | | faceDistinguish.setIsOpen(three); |
| | | faceDistinguish.setMinuteNum(openValue); |
| | | faceDistinguish.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | tSysFaceDistinguishService.insert(faceDistinguish); |
| | | } |
| | | |
| | | //专车推单(第一轮) |
| | | TSysPushOrder zcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("pushType", 1).eq("type", 1)); |
| | | if (SinataUtil.isNotEmpty(zcOne)){ |
| | | zcOne.setPushDistance(zc1); |
| | | zcOne.setPushTime(zc2); |
| | | zcOne.setDriverProportion(zc3); |
| | | tSysPushOrderService.updateById(zcOne); |
| | | }else{ |
| | | zcOne = new TSysPushOrder(); |
| | | zcOne.setPushDistance(zc1); |
| | | zcOne.setPushTime(zc2); |
| | | zcOne.setDriverProportion(zc3); |
| | | zcOne.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | zcOne.setPushType(1); |
| | | zcOne.setType(1); |
| | | tSysPushOrderService.insert(zcOne); |
| | | } |
| | | //专车推单(第二轮) |
| | | TSysPushOrder zcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("pushType", 1).eq("type", 2)); |
| | | if (SinataUtil.isNotEmpty(zcTwo)){ |
| | | zcTwo.setPushDistance(zc4); |
| | | zcTwo.setPushTime(zc5); |
| | | zcTwo.setDriverProportion(zc6); |
| | | tSysPushOrderService.updateById(zcTwo); |
| | | }else{ |
| | | zcTwo = new TSysPushOrder(); |
| | | zcTwo.setPushDistance(zc4); |
| | | zcTwo.setPushTime(zc5); |
| | | zcTwo.setDriverProportion(zc6); |
| | | zcTwo.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | zcTwo.setPushType(1); |
| | | zcTwo.setType(2); |
| | | tSysPushOrderService.insert(zcTwo); |
| | | } |
| | | //专车推单(第三轮) |
| | | TSysPushOrder zcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("pushType", 1).eq("type", 3)); |
| | | if (SinataUtil.isNotEmpty(zcThree)){ |
| | | zcThree.setPushDistance(zc7); |
| | | zcThree.setPushTime(zc8); |
| | | zcThree.setDriverProportion(zc9); |
| | | tSysPushOrderService.updateById(zcThree); |
| | | }else{ |
| | | zcThree = new TSysPushOrder(); |
| | | zcThree.setPushDistance(zc7); |
| | | zcThree.setPushTime(zc8); |
| | | zcThree.setDriverProportion(zc9); |
| | | zcThree.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | zcThree.setPushType(1); |
| | | zcThree.setType(3); |
| | | tSysPushOrderService.insert(zcThree); |
| | | } |
| | | |
| | | //出租车推单(第一轮) |
| | | TSysPushOrder czcOne = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("pushType", 2).eq("type", 1)); |
| | | if (SinataUtil.isNotEmpty(czcOne)){ |
| | | czcOne.setPushDistance(czc1); |
| | | czcOne.setPushTime(czc2); |
| | | czcOne.setDriverProportion(czc3); |
| | | tSysPushOrderService.updateById(czcOne); |
| | | }else{ |
| | | czcOne = new TSysPushOrder(); |
| | | czcOne.setPushDistance(czc1); |
| | | czcOne.setPushTime(czc2); |
| | | czcOne.setDriverProportion(czc3); |
| | | czcOne.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | czcOne.setPushType(2); |
| | | czcOne.setType(1); |
| | | tSysPushOrderService.insert(czcOne); |
| | | } |
| | | //出租车推单(第二轮) |
| | | TSysPushOrder czcTwo = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("pushType", 2).eq("type", 2)); |
| | | if (SinataUtil.isNotEmpty(czcTwo)){ |
| | | czcTwo.setPushDistance(czc4); |
| | | czcTwo.setPushTime(czc5); |
| | | czcTwo.setDriverProportion(czc6); |
| | | tSysPushOrderService.updateById(czcTwo); |
| | | }else{ |
| | | czcTwo = new TSysPushOrder(); |
| | | czcTwo.setPushDistance(czc4); |
| | | czcTwo.setPushTime(czc5); |
| | | czcTwo.setDriverProportion(czc6); |
| | | czcTwo.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | czcTwo.setPushType(2); |
| | | czcTwo.setType(2); |
| | | tSysPushOrderService.insert(czcTwo); |
| | | } |
| | | //出租车推单(第三轮) |
| | | TSysPushOrder czcThree = tSysPushOrderService.selectOne(new EntityWrapper<TSysPushOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("pushType", 2).eq("type", 3)); |
| | | if (SinataUtil.isNotEmpty(czcThree)){ |
| | | czcThree.setPushDistance(czc7); |
| | | czcThree.setPushTime(czc8); |
| | | czcThree.setDriverProportion(czc9); |
| | | tSysPushOrderService.updateById(czcThree); |
| | | }else{ |
| | | czcThree = new TSysPushOrder(); |
| | | czcThree.setPushDistance(czc7); |
| | | czcThree.setPushTime(czc8); |
| | | czcThree.setDriverProportion(czc9); |
| | | czcThree.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | czcThree.setPushType(2); |
| | | czcThree.setType(3); |
| | | tSysPushOrderService.insert(czcThree); |
| | | } |
| | | |
| | | //普通取消设置(专车) |
| | | TSysCancleOrder ptCancelOne = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1).eq("orderType", 1)); |
| | | if (SinataUtil.isNotEmpty(ptCancelOne)){ |
| | | ptCancelOne.setMinuteNum(ptCancel1); |
| | | ptCancelOne.setMoney(ptCancel2); |
| | | tSysCancleOrderService.updateById(ptCancelOne); |
| | | }else{ |
| | | ptCancelOne = new TSysCancleOrder(); |
| | | ptCancelOne.setMinuteNum(ptCancel1); |
| | | ptCancelOne.setMoney(ptCancel2); |
| | | ptCancelOne.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | ptCancelOne.setType(1); |
| | | ptCancelOne.setOrderType(1); |
| | | tSysCancleOrderService.insert(ptCancelOne); |
| | | } |
| | | |
| | | //普通取消设置(出租车) |
| | | TSysCancleOrder ptCancelTwo = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1).eq("orderType", 2)); |
| | | if (SinataUtil.isNotEmpty(ptCancelTwo)){ |
| | | ptCancelTwo.setMinuteNum(ptCancel3); |
| | | ptCancelTwo.setMoney(ptCancel4); |
| | | tSysCancleOrderService.updateById(ptCancelTwo); |
| | | }else{ |
| | | ptCancelTwo = new TSysCancleOrder(); |
| | | ptCancelTwo.setMinuteNum(ptCancel3); |
| | | ptCancelTwo.setMoney(ptCancel4); |
| | | ptCancelTwo.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | ptCancelTwo.setType(1); |
| | | ptCancelTwo.setOrderType(2); |
| | | tSysCancleOrderService.insert(ptCancelTwo); |
| | | } |
| | | |
| | | //普通取消设置(跨城出行) |
| | | TSysCancleOrder ptCancelThree = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1).eq("orderType", 3)); |
| | | if (SinataUtil.isNotEmpty(ptCancelThree)){ |
| | | ptCancelThree.setMinuteNum(ptCancel5); |
| | | ptCancelThree.setMoney(ptCancel6); |
| | | tSysCancleOrderService.updateById(ptCancelThree); |
| | | }else{ |
| | | ptCancelThree = new TSysCancleOrder(); |
| | | ptCancelThree.setMinuteNum(ptCancel5); |
| | | ptCancelThree.setMoney(ptCancel6); |
| | | ptCancelThree.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | ptCancelThree.setType(1); |
| | | ptCancelThree.setOrderType(3); |
| | | tSysCancleOrderService.insert(ptCancelThree); |
| | | } |
| | | |
| | | //预约取消设置(专车) |
| | | TSysCancleOrder yyCancelOne = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 2).eq("orderType", 1)); |
| | | if (SinataUtil.isNotEmpty(yyCancelOne)){ |
| | | yyCancelOne.setMinuteNum(yyCancel1); |
| | | yyCancelOne.setMoney(yyCancel2); |
| | | tSysCancleOrderService.updateById(yyCancelOne); |
| | | }else{ |
| | | yyCancelOne = new TSysCancleOrder(); |
| | | yyCancelOne.setMinuteNum(yyCancel1); |
| | | yyCancelOne.setMoney(yyCancel2); |
| | | yyCancelOne.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | yyCancelOne.setType(2); |
| | | yyCancelOne.setOrderType(1); |
| | | tSysCancleOrderService.insert(yyCancelOne); |
| | | } |
| | | //预约取消设置(出租车) |
| | | TSysCancleOrder yyCancelTwo = tSysCancleOrderService.selectOne(new EntityWrapper<TSysCancleOrder>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 2).eq("orderType", 2)); |
| | | if (SinataUtil.isNotEmpty(yyCancelTwo)){ |
| | | yyCancelTwo.setMinuteNum(yyCancel3); |
| | | yyCancelTwo.setMoney(yyCancel4); |
| | | tSysCancleOrderService.updateById(yyCancelTwo); |
| | | }else{ |
| | | yyCancelTwo = new TSysCancleOrder(); |
| | | yyCancelTwo.setMinuteNum(yyCancel3); |
| | | yyCancelTwo.setMoney(yyCancel4); |
| | | yyCancelTwo.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | yyCancelTwo.setType(2); |
| | | yyCancelTwo.setOrderType(2); |
| | | tSysCancleOrderService.insert(yyCancelTwo); |
| | | } |
| | | |
| | | //报警电话 |
| | | TPhone phoneOne = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 1)); |
| | | if (SinataUtil.isNotEmpty(phoneOne)){ |
| | | phoneOne.setPhone(phone1); |
| | | tPhoneService.updateById(phoneOne); |
| | | }else{ |
| | | phoneOne = new TPhone(); |
| | | phoneOne.setPhone(phone1); |
| | | phoneOne.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | phoneOne.setType(1); |
| | | if (ShiroKit.getUser().getRoleType() == 1){ |
| | | phoneOne.setPlatform(1); |
| | | }else{ |
| | | phoneOne.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phoneOne); |
| | | } |
| | | //客服电话 |
| | | TPhone phoneTwo = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 2)); |
| | | if (SinataUtil.isNotEmpty(phoneTwo)){ |
| | | phoneTwo.setPhone(phone2); |
| | | tPhoneService.updateById(phoneTwo); |
| | | }else{ |
| | | phoneTwo = new TPhone(); |
| | | phoneTwo.setPhone(phone2); |
| | | phoneTwo.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | phoneTwo.setType(2); |
| | | if (ShiroKit.getUser().getRoleType() == 1){ |
| | | phoneTwo.setPlatform(1); |
| | | }else{ |
| | | phoneTwo.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phoneTwo); |
| | | } |
| | | |
| | | //客服电话 |
| | | TPhone phone = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroKit.getUser().getObjectId()).eq("type", 3)); |
| | | if (SinataUtil.isNotEmpty(phone)){ |
| | | phone.setPhone(phone3); |
| | | tPhoneService.updateById(phone); |
| | | }else{ |
| | | phone = new TPhone(); |
| | | phone.setPhone(phone3); |
| | | phone.setCompanyId(ShiroKit.getUser().getObjectId()); |
| | | phone.setType(3); |
| | | if (ShiroKit.getUser().getRoleType() == 1){ |
| | | phone.setPlatform(1); |
| | | }else{ |
| | | phone.setPlatform(2); |
| | | } |
| | | tPhoneService.insert(phone); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TSysSensitiveWords; |
| | | import com.stylefeng.guns.modular.system.service.ITSysSensitiveWordsService; |
| | | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 敏感词管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-09 19:45:29 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tSysSensitiveWords") |
| | | public class TSysSensitiveWordsController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tSysSensitiveWords/"; |
| | | |
| | | @Autowired |
| | | private ITSysSensitiveWordsService tSysSensitiveWordsService; |
| | | |
| | | /** |
| | | * 跳转到敏感词管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tSysSensitiveWords.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加敏感词管理 |
| | | */ |
| | | @RequestMapping("/tSysSensitiveWords_add") |
| | | public String tSysSensitiveWordsAdd() { |
| | | return PREFIX + "tSysSensitiveWords_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取敏感词管理列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime, |
| | | String content) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tSysSensitiveWordsService.getSensitiveWordList(page,beginTime,endTime,content)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增敏感词管理 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TSysSensitiveWords tSysSensitiveWords) { |
| | | tSysSensitiveWords.setCreateTime(new Date()); |
| | | tSysSensitiveWordsService.insert(tSysSensitiveWords); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除敏感词管理 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tSysSensitiveWordsId) { |
| | | tSysSensitiveWordsService.deleteById(tSysSensitiveWordsId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.controller.util.LabelReplaceUtil; |
| | | import com.stylefeng.guns.modular.system.enums.StatusEnum; |
| | | import com.stylefeng.guns.modular.system.enums.UserTypeEnum; |
| | | import com.stylefeng.guns.modular.system.model.TDriver; |
| | | import com.stylefeng.guns.modular.system.model.TSystemBulletinUser; |
| | | import com.stylefeng.guns.modular.system.service.ITDriverService; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemBulletinUserService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TSystemBulletin; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemBulletinService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-16 10:38:23 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tSystemBulletin") |
| | | public class TSystemBulletinController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tSystemBulletin/"; |
| | | |
| | | @Autowired |
| | | private ITSystemBulletinService tSystemBulletinService; |
| | | @Autowired |
| | | private ITSystemBulletinUserService tSystemBulletinUserService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tSystemBulletin.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tSystemBulletin_add") |
| | | public String tSystemBulletinAdd() { |
| | | return PREFIX + "tSystemBulletin_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tSystemBulletin_update/{tSystemBulletinId}") |
| | | public String tSystemBulletinUpdate(@PathVariable Integer tSystemBulletinId, Model model) { |
| | | TSystemBulletin tSystemBulletin = tSystemBulletinService.selectById(tSystemBulletinId); |
| | | model.addAttribute("item",tSystemBulletin); |
| | | LogObjectHolder.me().set(tSystemBulletin); |
| | | return PREFIX + "tSystemBulletin_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,String content) { |
| | | |
| | | EntityWrapper<TSystemBulletin> wrapper = new EntityWrapper<>(); |
| | | |
| | | if(StringUtils.hasLength(content)){ |
| | | wrapper.like("content",content); |
| | | } |
| | | if(StringUtils.hasLength(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | Date startTime = DateUtil.getDate_str3(split[0]+" 00:00:00"); |
| | | Date endTime = DateUtil.getDate_str3(split[1]+" 23:59:59"); |
| | | wrapper.between("createTime",startTime,endTime); |
| | | } |
| | | wrapper.ne("status",3); |
| | | return tSystemBulletinService.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tSystemBulletinService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Object add(TSystemBulletin tSystemBulletin) { |
| | | tSystemBulletin.setContent(LabelReplaceUtil.replace(tSystemBulletin.getContent())); |
| | | tSystemBulletin.setState(1); |
| | | tSystemBulletin.setCreateTime(new Date()); |
| | | tSystemBulletin.setStatus(1); |
| | | tSystemBulletinService.insert(tSystemBulletin); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 新增发送 |
| | | */ |
| | | @RequestMapping(value = "/addSend") |
| | | @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Object addSend(TSystemBulletin tSystemBulletin) { |
| | | tSystemBulletin.setContent(LabelReplaceUtil.replace(tSystemBulletin.getContent())); |
| | | tSystemBulletin.setState(2); |
| | | tSystemBulletin.setCreateTime(new Date()); |
| | | tSystemBulletin.setStatus(1); |
| | | tSystemBulletinService.insert(tSystemBulletin); |
| | | tSystemBulletinService.sendBulletin(tSystemBulletin); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 编辑发送 |
| | | */ |
| | | @RequestMapping(value = "/editSend") |
| | | @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Object editSend(TSystemBulletin tSystemBulletin) { |
| | | tSystemBulletin.setContent(LabelReplaceUtil.replace(tSystemBulletin.getContent())); |
| | | tSystemBulletin.setState(2); |
| | | tSystemBulletinService.updateById(tSystemBulletin); |
| | | tSystemBulletinService.sendBulletin(tSystemBulletin); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tSystemBulletinId) { |
| | | |
| | | TSystemBulletin tSystemBulletin = tSystemBulletinService.selectById(tSystemBulletinId); |
| | | tSystemBulletin.setStatus(StatusEnum.DELETE.getCode()); |
| | | tSystemBulletinService.updateById(tSystemBulletin); |
| | | |
| | | // 公告用户关联关系状态修改 |
| | | tSystemBulletinUserService.deleteBulletinUser(tSystemBulletinId); |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TSystemBulletin tSystemBulletin) { |
| | | tSystemBulletin.setContent(LabelReplaceUtil.replace(tSystemBulletin.getContent())); |
| | | tSystemBulletinService.updateById(tSystemBulletin); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tSystemBulletinId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tSystemBulletinId") Integer tSystemBulletinId) { |
| | | return tSystemBulletinService.selectById(tSystemBulletinId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.modular.system.model.TAgent; |
| | | import com.stylefeng.guns.modular.system.model.TBranchOffice; |
| | | import com.stylefeng.guns.modular.system.service.ITAgentService; |
| | | import com.stylefeng.guns.modular.system.service.ITBranchOfficeService; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TSystemConfig; |
| | | import com.stylefeng.guns.modular.system.service.ITSystemConfigService; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-03-02 17:09:55 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tSystemConfig") |
| | | public class TSystemConfigController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tSystemConfig/"; |
| | | |
| | | @Autowired |
| | | private ITSystemConfigService tSystemConfigService; |
| | | @Autowired |
| | | private ITAgentService agentService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tSystemConfig.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tSystemConfig_add") |
| | | public String tSystemConfigAdd() { |
| | | return PREFIX + "tSystemConfig_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tSystemConfig_update/{tSystemConfigId}") |
| | | public String tSystemConfigUpdate(@PathVariable Integer tSystemConfigId, Model model) { |
| | | TSystemConfig tSystemConfig = tSystemConfigService.selectById(tSystemConfigId); |
| | | model.addAttribute("item",tSystemConfig); |
| | | LogObjectHolder.me().set(tSystemConfig); |
| | | return PREFIX + "tSystemConfig_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到派单规则 |
| | | */ |
| | | @RequestMapping("/dispatchRules") |
| | | public String dispatchRules(Model model) { |
| | | TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 1) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); |
| | | model.addAttribute("num1",jsonObject.getInteger("num1")); |
| | | model.addAttribute("num2",jsonObject.getInteger("num2")); |
| | | model.addAttribute("num3",jsonObject.getInteger("num3")); |
| | | model.addAttribute("num4",jsonObject.getInteger("num4")); |
| | | model.addAttribute("num5",jsonObject.getInteger("num5")); |
| | | return PREFIX + "tSystemConfigDispatchRules.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到佣金分成规则 |
| | | */ |
| | | @RequestMapping("/commissionShareRules") |
| | | public String commissionShareRules(Model model) { |
| | | TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 2) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); |
| | | model.addAttribute("num1",jsonObject.getString("num1")); |
| | | model.addAttribute("num2",jsonObject.getString("num2")); |
| | | model.addAttribute("num3",jsonObject.getString("num3")); |
| | | model.addAttribute("num4",jsonObject.getString("num4")); |
| | | model.addAttribute("num5",jsonObject.getString("num5")); |
| | | model.addAttribute("num6",jsonObject.getString("num6")); |
| | | model.addAttribute("num7",jsonObject.getString("num7")); |
| | | return PREFIX + "tSystemConfigCommissionShareRules.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到抽成规则 |
| | | */ |
| | | @RequestMapping("/extractionRules") |
| | | public String extractionRules(Model model) { |
| | | TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 3) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); |
| | | model.addAttribute("num1",jsonObject.getInteger("num1")); |
| | | model.addAttribute("num2",jsonObject.getInteger("num2")); |
| | | model.addAttribute("num3",jsonObject.getString("num3")); |
| | | return PREFIX + "tSystemConfigExtractionRules.html"; |
| | | } |
| | | /** |
| | | * 跳转到积分规则 |
| | | */ |
| | | @RequestMapping("/integralRules") |
| | | public String integralRules(Model model) { |
| | | TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 4) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); |
| | | model.addAttribute("num1",jsonObject.getString("num1")); |
| | | model.addAttribute("num2",jsonObject.getString("num2")); |
| | | model.addAttribute("num3",jsonObject.getInteger("num3")); |
| | | model.addAttribute("num4",jsonObject.getInteger("num4")); |
| | | model.addAttribute("num5",jsonObject.getInteger("num5")); |
| | | model.addAttribute("num6",jsonObject.getInteger("num6")); |
| | | model.addAttribute("num7",jsonObject.getInteger("num7")); |
| | | model.addAttribute("num8",jsonObject.getInteger("num8")); |
| | | model.addAttribute("num9",jsonObject.getInteger("num9")); |
| | | model.addAttribute("num10",jsonObject.getInteger("num10")); |
| | | return PREFIX + "tSystemConfigIntegralRules.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到价格规则 |
| | | */ |
| | | @RequestMapping("/priceRules") |
| | | public String priceRules(Model model) { |
| | | TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 5) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); |
| | | JSONArray array = jsonObject.getJSONArray("ChargeStandard"); |
| | | JSONArray objects = new JSONArray(); |
| | | for (int i = 0; i < array.size(); i++) { |
| | | JSONObject jsonObject1 = JSONObject.parseObject(JSONObject.toJSONString(array.get(i))); |
| | | if(i == 0){ |
| | | jsonObject1.put("key",0); |
| | | }else { |
| | | jsonObject1.put("key",1); |
| | | } |
| | | objects.add(jsonObject1); |
| | | } |
| | | |
| | | TSystemConfig config = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 8) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObj = JSONObject.parseObject(config.getContent()); |
| | | Integer zcOne = jsonObj.getInteger("num1"); |
| | | model.addAttribute("zcOne",zcOne); |
| | | model.addAttribute("array",objects); |
| | | JSONObject extraCost = JSONObject.parseObject(jsonObject.getString("ExtraCost")); |
| | | model.addAttribute("ExtraCost",extraCost); |
| | | return PREFIX + "tSystemConfigPriceRules.html"; |
| | | } |
| | | /** |
| | | * 跳转到余额规则 |
| | | */ |
| | | @RequestMapping("/balanceRules") |
| | | public String balanceRules(Model model) { |
| | | TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 6) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); |
| | | model.addAttribute("num1",jsonObject.getInteger("num1")); |
| | | model.addAttribute("num2",jsonObject.getInteger("num2")); |
| | | return PREFIX + "tSystemConfigBalanceRules.html"; |
| | | } |
| | | /** |
| | | * 跳转到客服管理 |
| | | */ |
| | | @RequestMapping("/serviceMgmt") |
| | | public String serviceMgmt(Model model) { |
| | | Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); |
| | | Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); |
| | | if(roleType == 1){ |
| | | TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 7) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObject = JSONObject.parseObject(tSystemConfig.getContent()); |
| | | model.addAttribute("num1",jsonObject.getString("num1")); |
| | | } |
| | | if(roleType == 3){ |
| | | TAgent tAgent = agentService.selectById(objectId); |
| | | if (Objects.nonNull(tAgent)){ |
| | | model.addAttribute("num1",tAgent.getServiceCalls()); |
| | | } |
| | | } |
| | | return PREFIX + "tSystemConfigServiceMgmt.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/systemConfigSubmit") |
| | | @ResponseBody |
| | | public Object systemConfigSubmit(Integer type,String content) { |
| | | |
| | | Integer roleType = Objects.requireNonNull(ShiroKit.getUser()).getRoleType(); |
| | | Integer objectId = Objects.requireNonNull(ShiroKit.getUser()).getObjectId(); |
| | | if(roleType == 1){ |
| | | TSystemConfig tSystemConfig = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", type) |
| | | .last("LIMIT 1")); |
| | | tSystemConfig.setContent(content); |
| | | tSystemConfigService.updateById(tSystemConfig); |
| | | } |
| | | if(roleType == 3){ |
| | | TAgent tAgent = agentService.selectById(objectId); |
| | | if (Objects.nonNull(tAgent)){ |
| | | JSONObject jsonObject = JSONObject.parseObject(content); |
| | | String num1 = jsonObject.getString("num1"); |
| | | tAgent.setServiceCalls(num1); |
| | | agentService.updateById(tAgent); |
| | | } |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tSystemConfigService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TSystemConfig tSystemConfig) { |
| | | tSystemConfigService.insert(tSystemConfig); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tSystemConfigId) { |
| | | tSystemConfigService.deleteById(tSystemConfigId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TSystemConfig tSystemConfig) { |
| | | tSystemConfigService.updateById(tSystemConfig); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改价格规则开关 |
| | | */ |
| | | @RequestMapping(value = "/openOrClose") |
| | | @ResponseBody |
| | | public Object openOrClose(Integer num1) { |
| | | TSystemConfig config = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 8) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObject = JSONObject.parseObject(config.getContent()); |
| | | jsonObject.remove(jsonObject.getString("num1")); |
| | | jsonObject.put("num1",num1); |
| | | config.setContent(JSONObject.toJSONString(jsonObject)); |
| | | tSystemConfigService.updateById(config); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改启动页状态 |
| | | */ |
| | | @RequestMapping(value = "/updateStartState") |
| | | @ResponseBody |
| | | public Object updateStartState(Integer num2) { |
| | | TSystemConfig config = tSystemConfigService.selectOne(new EntityWrapper<TSystemConfig>().eq("type", 8) |
| | | .last("LIMIT 1")); |
| | | JSONObject jsonObject = JSONObject.parseObject(config.getContent()); |
| | | jsonObject.remove(jsonObject.getString("num2")); |
| | | jsonObject.put("num2",num2); |
| | | config.setContent(JSONObject.toJSONString(jsonObject)); |
| | | tSystemConfigService.updateById(config); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tSystemConfigId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tSystemConfigId") Integer tSystemConfigId) { |
| | | return tSystemConfigService.selectById(tSystemConfigId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.base.tips.ErrorTip; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.*; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.ITCompanyService; |
| | | import com.stylefeng.guns.modular.system.util.HttpRequestUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushURL; |
| | | import org.apache.commons.lang.time.DateUtils; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.modular.system.service.ITUserService; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 用户管理控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2020-06-01 15:47:58 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tUser") |
| | | public class TUserController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tUser/"; |
| | | |
| | | @Autowired |
| | | private ITUserService tUserService; |
| | | |
| | | /** |
| | | * 跳转到用户管理首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tUser.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改用户管理 |
| | | */ |
| | | @RequestMapping("/tUser_userDetail/{tUserId}") |
| | | public String tUser_userDetail(@PathVariable Integer tUserId, Model model) { |
| | | Map<String,Object> tUser = tUserService.getUserDetailById(tUserId); |
| | | model.addAttribute("item",tUser); |
| | | return PREFIX + "tUser_userDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改用户余额页面 |
| | | */ |
| | | @RequestMapping("/tUser_updateBalance/{tUserId}") |
| | | public String tUser_updateBalance(@PathVariable Integer tUserId, Model model) { |
| | | model.addAttribute("tUserId",tUserId); |
| | | return PREFIX + "tUser_updateBalance.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改用户密码页面 |
| | | */ |
| | | @RequestMapping("/tUser_updatePassword/{tUserId}") |
| | | public String tUser_updatePassword(@PathVariable Integer tUserId, Model model) { |
| | | model.addAttribute("tUserId",tUserId); |
| | | return PREFIX + "tUser_updatePassword.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改用户状态页面 |
| | | */ |
| | | @RequestMapping("/tUser_optUser/{tUserId}/{optType}") |
| | | public String tUser_optUser(@PathVariable Integer tUserId,@PathVariable Integer optType, Model model) { |
| | | model.addAttribute("tUserId",tUserId); |
| | | model.addAttribute("optType",optType); |
| | | return PREFIX + "tUser_optUser.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取用户管理列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String insertTime, |
| | | String id, |
| | | String nickName, |
| | | String phone, |
| | | Integer isAuth, |
| | | Integer state,String companyName) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tUserService.getUserList(page,beginTime,endTime,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),isAuth,state,id,nickName,phone,companyName)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 修改余额操作 |
| | | */ |
| | | @RequestMapping(value = "/updateBalance") |
| | | @ResponseBody |
| | | public Object updateBalance(@RequestParam Integer tUserId, |
| | | @RequestParam Integer updateType, |
| | | @RequestParam BigDecimal money) { |
| | | TUser tUser = tUserService.selectById(tUserId); |
| | | if (SinataUtil.isNotEmpty(tUser)){ |
| | | if (1 == updateType.intValue()){ //增加 |
| | | tUser.setBalance(tUser.getBalance().add(money)); |
| | | }else if (2 == updateType.intValue()){ //减少 |
| | | if((tUser.getBalance().subtract(money)).compareTo(new BigDecimal(0)) == -1){ |
| | | tUser.setBalance(new BigDecimal(0)); |
| | | }else{ |
| | | tUser.setBalance(tUser.getBalance().subtract(money)); |
| | | } |
| | | } |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改密码操作 |
| | | */ |
| | | @RequestMapping(value = "/updatePassword") |
| | | @ResponseBody |
| | | public Object updatePassword(@RequestParam Integer tUserId, |
| | | @RequestParam String password) { |
| | | TUser tUser = tUserService.selectById(tUserId); |
| | | if (SinataUtil.isNotEmpty(tUser)){ |
| | | // tUser.setPassWord(MD5Util.encrypt(password)); |
| | | tUser.setPassWord(ShiroKit.md5(password, "&a.s")); |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 操作用户 |
| | | */ |
| | | @RequestMapping(value = "/optUser") |
| | | @ResponseBody |
| | | public Object optUser(@RequestParam Integer tUserId,@RequestParam Integer optType,@RequestParam String remark) { |
| | | TUser tUser = tUserService.selectById(tUserId); |
| | | if (SinataUtil.isNotEmpty(tUser)){ |
| | | if (1 == optType.intValue()){ //冻结 |
| | | tUser.setState(2); |
| | | tUser.setRemark(remark); |
| | | |
| | | //增加推送 |
| | | Map<String,String> map = new HashMap<>(); |
| | | map.put("uid", tUser.getId().toString()); |
| | | String result = HttpRequestUtil.postRequest(PushURL.freeze_user_url, map); |
| | | System.out.println("冻结用户:【userId="+tUser.getId().toString()+"】,调用接口:"+result); |
| | | |
| | | }else if (2 == optType.intValue()){ //解冻 |
| | | tUser.setState(1); |
| | | tUser.setRemark(remark); |
| | | } |
| | | tUser.setUpdateTime(new Date()); |
| | | tUser.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tUserService.updateById(tUser); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 下载模板 |
| | | * @param request |
| | | * @param response |
| | | */ |
| | | @RequestMapping(value = "/uploadUserModel") |
| | | public void uploadUserModel(HttpServletRequest request, HttpServletResponse response) { |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<List<String>>(); |
| | | |
| | | // 首行【封装】 |
| | | List<String> shellList = new ArrayList<String>(); |
| | | shellList.add("昵称"); |
| | | shellList.add("手机号"); |
| | | shellList.add("生日[例如:1995-09-09]"); |
| | | shellList.add("性别[男/女]"); |
| | | shellList.add("紧急联系人[选填]"); |
| | | shellList.add("紧急联系电话[选填]"); |
| | | shellList.add("是否实名认证[是/否]"); |
| | | shellList.add("真实姓名"); |
| | | shellList.add("身份证号"); |
| | | shellList.add("余额"); |
| | | shellList.add("密码[6-18个长度]"); |
| | | dataList.add(shellList); |
| | | |
| | | try { |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet("平台导入用户模板"+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), "平台导入用户模板", dataList, request, response); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 导入操作 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @RequestMapping(value="/exportUser",method = RequestMethod.POST) |
| | | @ResponseBody |
| | | public Object exportUser(HttpServletRequest request){ |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | MultipartFile file = (MultipartFile) multipartRequest.getFile("myfile"); |
| | | try { |
| | | //定时五秒后执行 |
| | | /*Map<String,Object> maps=new HashMap<>(); |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | maps.put("book",book); |
| | | QuartzManager.addJob(AddContract.class, (AddContract.name+new Date().getTime()).toUpperCase(), TimeJobType.ADMIN,DateUtil.getDate_strYMdHms(new Date().getTime() + 1*1000) , maps);*/ |
| | | |
| | | Workbook book = WoUtil.ImportFile(file); |
| | | Sheet sh = book.getSheetAt(0); //获取到第一个表 |
| | | for (int i = 1; i <= sh.getLastRowNum(); i++) { |
| | | Row row = sh.getRow(i); |
| | | |
| | | Cell cell0 = row.getCell(0); //昵称 |
| | | String nickName = null; |
| | | if (SinataUtil.isNotEmpty(cell0)){ |
| | | nickName = String.valueOf(cell0.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell1 = row.getCell(1); //手机号 |
| | | String phone = null; |
| | | if (SinataUtil.isNotEmpty(cell1)){ |
| | | phone = String.valueOf(cell1.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell2 = row.getCell(2); //生日[例如:1995-09-09] |
| | | String birthday = null; |
| | | if (SinataUtil.isNotEmpty(cell2)){ |
| | | birthday = String.valueOf(cell2.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell3 = row.getCell(3); //性别[男/女] |
| | | String sex = null; |
| | | if (SinataUtil.isNotEmpty(cell3)){ |
| | | sex = String.valueOf(cell3.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell4 = row.getCell(4); //紧急联系人[选填] |
| | | String emergencyContact = null; |
| | | if (SinataUtil.isNotEmpty(cell4)){ |
| | | emergencyContact = String.valueOf(cell4.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell5 = row.getCell(5); //紧急联系电话[选填] |
| | | String emergencyContactNumber = null; |
| | | if (SinataUtil.isNotEmpty(cell5)){ |
| | | emergencyContactNumber = String.valueOf(cell5.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell6 = row.getCell(6); //是否实名认证[是/否] |
| | | String isAuth = null; |
| | | if (SinataUtil.isNotEmpty(cell6)){ |
| | | isAuth = String.valueOf(cell6.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell7 = row.getCell(7); //真实姓名 |
| | | String name = null; |
| | | if (SinataUtil.isNotEmpty(cell7)){ |
| | | name = String.valueOf(cell7.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell8 = row.getCell(8); //身份证号 |
| | | String idCard = null; |
| | | if (SinataUtil.isNotEmpty(cell8)){ |
| | | idCard = String.valueOf(cell8.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell9 = row.getCell(9); //余额 |
| | | String balance = null; |
| | | if (SinataUtil.isNotEmpty(cell9)){ |
| | | balance = String.valueOf(cell9.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell10 = row.getCell(10); //密码 |
| | | String passWord = null; |
| | | if (SinataUtil.isNotEmpty(cell10)){ |
| | | passWord = String.valueOf(cell10.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | if (SinataUtil.isEmpty(nickName) || SinataUtil.isEmpty(phone) || SinataUtil.isEmpty(birthday) |
| | | || SinataUtil.isEmpty(sex) || SinataUtil.isEmpty(isAuth) || SinataUtil.isEmpty(balance) |
| | | || SinataUtil.isEmpty(passWord) ){ |
| | | return new ErrorTip(500, "单元格不能为空"); |
| | | }else{ |
| | | int count = tUserService.selectCount(new EntityWrapper<TUser>().eq("phone", phone).notIn("flag", 3)); |
| | | if (count > 0){ |
| | | return new ErrorTip(500, "手机号已存在,请重新填写"); |
| | | } |
| | | //判断性别 |
| | | if (!sex.equals("男") && !sex.equals("女")){ |
| | | return new ErrorTip(500, "性别内容不正确"); |
| | | } |
| | | //判断是否实名认证 |
| | | if (!isAuth.equals("是") && !isAuth.equals("否")){ |
| | | return new ErrorTip(500, "是否实名认证内容不正确"); |
| | | } |
| | | if ("是".equals(isAuth)){ |
| | | //判断紧急联系电话 |
| | | if (SinataUtil.isNotEmpty(emergencyContactNumber)){ |
| | | if (!isPhone(emergencyContactNumber)){ |
| | | return new ErrorTip(500, "紧急联系电话格式不正确"); |
| | | } |
| | | } |
| | | } |
| | | //判断生日格式 |
| | | try { |
| | | if (!isValidDate(birthday)) { |
| | | birthday = importByExcelForDate(birthday); |
| | | } |
| | | }catch (Exception e){ |
| | | return new ErrorTip(500, "年检到期时间格式不正确"); |
| | | } |
| | | //判断手机号 |
| | | if (!isPhone(phone)){ |
| | | return new ErrorTip(500, "手机号格式不正确"); |
| | | } |
| | | //判断余额 |
| | | if (!isDouble(balance)){ |
| | | return new ErrorTip(500, "余额格式不正确"); |
| | | } |
| | | //判断登录密码 |
| | | if (!isPassword(passWord)){ |
| | | return new ErrorTip(500, "登录密码格式不正确"); |
| | | } |
| | | TUser user = new TUser(); |
| | | TCompany company = itCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1).notIn("flag", 3).last(" limit 1")); |
| | | user.setCompanyId(company.getId()); |
| | | user.setPhone(phone); |
| | | user.setNickName(nickName); |
| | | user.setBirthday(DateUtil.parseDate(birthday)); |
| | | if (sex.equals("男")){ |
| | | user.setSex(1); |
| | | }else if (sex.equals("女")){ |
| | | user.setSex(2); |
| | | } |
| | | user.setEmergencyContact(emergencyContact); |
| | | user.setEmergencyContactNumber(emergencyContactNumber); |
| | | if ("是".equals(isAuth)){ |
| | | user.setIsAuth(2); |
| | | }else if ("否".equals(isAuth)){ |
| | | user.setIsAuth(1); |
| | | } |
| | | user.setName(name); |
| | | user.setIdCard(idCard); |
| | | user.setBalance(new BigDecimal(balance)); |
| | | user.setPassWord(ShiroKit.md5(passWord, "&a.s")); |
| | | user.setState(1); |
| | | user.setFlag("1"); |
| | | user.setInsertTime(new Date()); |
| | | user.setInsertUser(ShiroKit.getUser().getId()); |
| | | tUserService.insert(user); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | @Autowired |
| | | private ITCompanyService itCompanyService; |
| | | |
| | | /** |
| | | * 判断日期是否满足yyyy-MM-dd格式 |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static boolean isValidDate(String str) { |
| | | boolean convertSuccess=true; |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | format.setLenient(false); |
| | | format.parse(str); |
| | | } catch (Exception e) { |
| | | convertSuccess=false; |
| | | } |
| | | return convertSuccess; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 转换日期 |
| | | * @return |
| | | */ |
| | | public static String importByExcelForDate(String value) {//value就是它的天数 |
| | | String currentCellValue = ""; |
| | | if(value != null && !value.equals("")){ |
| | | Calendar calendar = new GregorianCalendar(1900,0,-1); |
| | | Date d = calendar.getTime(); |
| | | Date dd = DateUtils.addDays(d,Integer.valueOf(value)); |
| | | DateFormat formater = new SimpleDateFormat("yyyy-MM-dd"); |
| | | currentCellValue = formater.format(dd); |
| | | } |
| | | return currentCellValue; |
| | | } |
| | | |
| | | /** |
| | | * 验证手机号格式是否正确 |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static boolean isPhone(String str) { |
| | | try{ |
| | | String reg = "^1\\d{10}$"; |
| | | boolean flag = str.matches(reg); |
| | | return flag; |
| | | }catch(NumberFormatException e) { |
| | | System.out.println("异常:\"" + str + "\"..."); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 验证密码长度是否正确 |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static boolean isPassword(String str) { |
| | | try{ |
| | | String reg = "^.{6,18}$"; |
| | | boolean flag = str.matches(reg); |
| | | return flag; |
| | | }catch(NumberFormatException e) { |
| | | System.out.println("异常:\"" + str + "\"..."); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 验证是否可以字符转为金额值 |
| | | * @param str |
| | | * @return |
| | | */ |
| | | public static boolean isDouble(String str) { |
| | | try{ |
| | | Double.parseDouble(str); |
| | | return true; |
| | | }catch(NumberFormatException e) { |
| | | System.out.println("异常:\"" + str + "\"不是数字/整数/小数..."); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 导出用户信息 |
| | | */ |
| | | @RequestMapping(value = "/outUser") |
| | | public void outUser(HttpServletRequest request, HttpServletResponse response) { |
| | | List<Map<String,Object>> listMap = tUserService.getUserListNoPage(ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId()); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<String>> dataList = new ArrayList<>(); |
| | | |
| | | //第一行显示【封装】 |
| | | List<String> twoList = new ArrayList<String>(); |
| | | twoList.add("总计:"); |
| | | twoList.add(String.valueOf(listMap.size())+"条"); |
| | | dataList.add(twoList); |
| | | |
| | | // 列【封装】 |
| | | List<String> shellList = new ArrayList<String>(); |
| | | shellList.add("注册时间"); |
| | | shellList.add("用户ID"); |
| | | shellList.add("注册地所属分公司"); |
| | | shellList.add("昵称"); |
| | | shellList.add("手机号"); |
| | | shellList.add("紧急联系人姓名"); |
| | | shellList.add("紧急联系人电话"); |
| | | shellList.add("是否实名认证"); |
| | | shellList.add("历史出行次数"); |
| | | shellList.add("历史消费"); |
| | | shellList.add("积分"); |
| | | shellList.add("备注"); |
| | | shellList.add("状态"); |
| | | dataList.add(shellList); |
| | | |
| | | for (Map<String,Object> object : listMap){ |
| | | // 详细数据列【封装】 |
| | | shellList = new ArrayList<String>(); |
| | | if(SinataUtil.isNotEmpty(object.get("insertTime"))){ |
| | | shellList.add(DateUtil.formatDate(DateUtil.parse(object.get("insertTime").toString(),"YYYY-MM-dd HH:mm:ss.S"), "YYYY-MM-dd HH:mm:ss")); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | shellList.add(String.valueOf(object.get("id"))); |
| | | if(SinataUtil.isNotEmpty(object.get("companyName"))){ |
| | | shellList.add(object.get("companyName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("nickName"))){ |
| | | shellList.add(object.get("nickName").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("phone"))){ |
| | | shellList.add(object.get("phone").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("emergencyContact"))){ |
| | | shellList.add(object.get("emergencyContact").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("emergencyContactNumber"))){ |
| | | shellList.add(object.get("emergencyContactNumber").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("isAuth"))){ |
| | | shellList.add(object.get("isAuth").toString().equals("是")?"是":"否"); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("historyNum"))){ |
| | | shellList.add(object.get("historyNum").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("consumptionNum"))){ |
| | | shellList.add(object.get("consumptionNum").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("integral"))){ |
| | | shellList.add(object.get("integral").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("remark"))){ |
| | | shellList.add(object.get("remark").toString()); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | if(SinataUtil.isNotEmpty(object.get("state"))){ |
| | | shellList.add(Integer.valueOf(object.get("state").toString()) == 1?"正常":"冻结"); |
| | | }else{ |
| | | shellList.add("-"); |
| | | } |
| | | dataList.add(shellList); |
| | | } |
| | | try { |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet("用户信息导出记录"+DateUtil.formatDate(new Date(), "YYYYMMddHHmmss"), "用户信息导出记录", dataList,request, response); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TUserRedPacketRecordController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TVerifiedController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TVersionManagementController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TYouTuiController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/UserActivityBalanceController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/UserActivityController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/UserActivityDiscount1Controller.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/UserActivityDiscount2Controller.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/UserActivityInviteController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/UserActivityRedenvelopeController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/UserActivityRegisteredController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/UserCouponRecordController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/req/CouponSendReq.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/req/TAppUserReq.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/AccessTokenRespBody.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/DataStatisticsOrderYearResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/PerformanceTableResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/RespBody.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/RevenueExpenditureResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TAgentResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TAppUserDetailOrderResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TAppUserResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TBillResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TBranchOfficeResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TComplaintResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TDriverCommissionResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TDriverResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TEvaluateResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TOrderResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TOrderServerResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TRechargeRecordAgentResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/resp/TRechargeRecordUserResp.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TDispatchController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TIntegralGoodsController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TIntegralOrderController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TLineController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderCharterController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderCharteredCarController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderCrossCityController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderPrivateCarController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TReassignController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TServerCarmodelController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSiteController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TSystemPriceController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/BlackboardController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/DeptController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/DictController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/KaptchaController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/LogController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/LoginController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/LoginLogController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/MenuController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/RoleController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/UediterController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/system/UserMgrController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/taxi/TOrderTaxiController.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/Constant.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/ExcelUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/HttpUtils.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/LabelReplaceUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/MD5.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/SendSms.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/SignUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/TokenUtils.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/UUIDUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/UploadUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/VenueLatVo.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/WebUtils.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/WoUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/WrapperUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/util/WxJsonUtils.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/CarInsuranceMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/DeptMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/DictMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/DriverActivityHistoryMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/DriverActivityMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/DriverActivityOnlineMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/DriverActivityOrderMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/DriverActivityRegisteredMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/DriverOnlineMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/DriverPunishMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/DriverTrainMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/GDInterfaceMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/IncomeMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/LineShiftDriverMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/LoginLogMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/MenuMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/NoticeMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/OperationLogMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/OrderCancelMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/PaymentRecordMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/RegionMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/RelationMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/RoleMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/SysCouponActivityMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/SysCouponRecordMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/SysRedPacketRecordMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TAdvertisementMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TAgentMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TAgreementMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TAppUserMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TBillMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TBranchOfficeMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TBroadcastMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCancelOrderMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCarBrandMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCarMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCarModelMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCarServiceMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCashWithdrawalMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCommercialMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCompanyCityMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCompanyMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TComplaintMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TCouponMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TDispatchMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TDriverLineMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TDriverMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TDriverServiceMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TDriverWorkMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TEditionMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TEvaluateMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TFeedbackMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/THtmlMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TImgMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TIntegralGoodsMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TIntegralOrderMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TInvoiceMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TLineCompanyMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TLineMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TLinePriceMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TLineShiftMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TLineSiteMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TLocationMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TMainContentMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TNoticesMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOpenCityBusinessMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOpenCityMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderCharterMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderCharteredCarMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderCrossCityMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderEvaluateMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderLogisticsMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderPositionMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderPrivateCarMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderRefusalMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TOrderTaxiMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TPhoneMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TProblemMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TPubTransactionDetailsMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TPubWithdrawalMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TReassignMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TRechargeRecordMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TRegionMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TRevenueMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TServerCarmodelMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSiteMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSmsrecordMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSysCancleOrderMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSysFaceDistinguishMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSysIntegralMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSysPushOrderMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSysReformistMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSysSensitiveWordsMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSystemBulletinMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSystemBulletinUserMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSystemConfigMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSystemNoticeMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TSystemPriceMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TUserMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TUserRedPacketRecordMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TUserToCouponMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TVerifiedMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TVersionManagementMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TYouTuiMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/TransactionDetailsMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/UserActivityBalanceMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/UserActivityDiscount1Mapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/UserActivityDiscount2Mapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/UserActivityInviteMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/UserActivityMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/UserActivityRedenvelopeMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/UserActivityRegisteredMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/UserCouponRecordMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/UserMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/UserRedPacketRecordMapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/CarInsuranceMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DeptMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DictMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverActivityHistoryMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverActivityMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverActivityOnlineMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverActivityOrderMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverActivityRegisteredMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverOnlineMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverPunishMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/DriverTrainMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/GDInterfaceMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/IncomeMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/LineShiftDriverMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/LoginLogMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/MenuMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/NoticeMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/OperationLogMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/OrderCancelMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/PaymentRecordMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/RegionMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/RelationMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/RoleMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/SysCouponActivityMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/SysCouponRecordMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/SysRedPacketRecordMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TAdvertisementMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TAgentMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TAgreementMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TAppUserMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TBillMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TBranchOfficeMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TBroadcastMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCancelOrderMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCarBrandMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCarMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCarModelMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCarServiceMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCashWithdrawalMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCommercialMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCompanyCityMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCompanyMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TComplaintMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TCouponMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDispatchMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverLineMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverServiceMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TDriverWorkMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TEditionMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TEvaluateMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TFeedbackMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/THtmlMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TImgMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TIntegralGoodsMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TIntegralOrderMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TInvoiceMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TLineCompanyMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TLineMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TLinePriceMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TLineShiftMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TLineSiteMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TLocationMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TMainContentMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TNoticesMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOpenCityBusinessMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOpenCityMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderCharterMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderCharteredCarMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderCrossCityMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderEvaluateMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderLogisticsMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPositionMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderPrivateCarMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderRefusalMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TOrderTaxiMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TPhoneMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TProblemMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TPubTransactionDetailsMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TPubWithdrawalMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TReassignMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRechargeRecordMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRegionMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TRevenueMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TServerCarmodelMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSiteMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSmsrecordMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSysCancleOrderMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSysFaceDistinguishMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSysIntegralMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSysPushOrderMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSysReformistMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSysSensitiveWordsMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSystemBulletinMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSystemBulletinUserMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSystemConfigMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSystemNoticeMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TSystemPriceMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TUserMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TUserRedPacketRecordMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TUserToCouponMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TVerifiedMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TVersionManagementMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TYouTuiMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TransactionDetailsMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserActivityBalanceMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserActivityDiscount1Mapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserActivityDiscount2Mapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserActivityInviteMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserActivityMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserActivityRedenvelopeMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserActivityRegisteredMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserCouponRecordMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/UserRedPacketRecordMapper.xml
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/CashWithdrawalTypeEnum.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/CouponStatusEnum.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/HtmlTypeEnum.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/MainContentTypeEnum.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/OrderStateEnum.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/PayStatusEnum.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/RevenueTypeEnum.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/StatusEnum.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/SystemConfigTypeEnum.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/TBillStateEnum.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/enums/UserTypeEnum.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/exports/TAppUserExceptionExport.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/factory/UserFactory.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/CarInsurance.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/Dept.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/Dict.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/DriverActivity.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/DriverActivityHistory.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/DriverActivityOnline.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/DriverActivityOrder.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/DriverActivityRegistered.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/DriverOnline.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/DriverPunish.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/DriverTrain.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/GDInterface.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/Income.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/LineShiftDriver.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/LoginLog.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/Menu.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/Notice.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/OperationLog.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/OrderCancel.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/PaymentRecord.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/Region.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/Relation.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/Role.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/SysCouponActivity.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/SysCouponRecord.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/SysRedPacketRecord.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAdvertisement.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAgent.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAgreement.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TAppUser.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TBill.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TBranchOffice.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TBroadcast.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCancelOrder.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCar.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCarBrand.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCarModel.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCarService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCashWithdrawal.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCommercial.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCompany.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCompanyCity.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TComplaint.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TCoupon.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TDispatch.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TDriver.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TDriverLine.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TDriverService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TDriverWork.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TEdition.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TEvaluate.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TFeedback.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/THtml.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TImg.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TIntegralGoods.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TIntegralOrder.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TInvoice.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TLine.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TLineCompany.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TLinePrice.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TLineShift.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TLineSite.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TLocation.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TMainContent.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TNotices.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOpenCity.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOpenCityBusiness.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrder.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderCharter.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderCharteredCar.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderCrossCity.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderEvaluate.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderLogistics.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderPosition.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderPrivateCar.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderRefusal.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TOrderTaxi.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TPhone.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TProblem.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TPubTransactionDetails.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TPubWithdrawal.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TReassign.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TRechargeRecord.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TRegion.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TRevenue.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TServerCarmodel.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSite.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSmsrecord.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSysCancleOrder.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSysFaceDistinguish.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSysIntegral.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSysPushOrder.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSysReformist.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSysSensitiveWords.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSystemBulletin.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSystemBulletinUser.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSystemConfig.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSystemNotice.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TSystemPrice.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TUser.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TUserRedPacketRecord.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TUserToCoupon.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TVerified.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TVersionManagement.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TYouTui.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TransactionDetails.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/User.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/UserActivity.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/UserActivityBalance.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/UserActivityDiscount1.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/UserActivityDiscount2.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/UserActivityInvite.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/UserActivityRedenvelope.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/UserActivityRegistered.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/UserCouponRecord.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/UserRedPacketRecord.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/pojo/GaoDePoJo.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IDeptService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IDictService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IDriverActivityHistoryService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IDriverActivityOnlineService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IDriverActivityOrderService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IDriverActivityRegisteredService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IDriverActivityService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IDriverOnlineService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IGDInterfaceService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IIncomeService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ILoginLogService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IMenuService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/INoticeService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IOperationLogService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IPaymentRecordService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IRelationService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IRoleService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ISysCouponActivityService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ISysCouponRecordService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ISysRedPacketRecordService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITAdvertisementService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITAgentService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITAgreementService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITAppUserService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITBillService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITBranchOfficeService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITBroadcastService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCancelOrderService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCarBrandService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCarModelService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCarService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCarServiceService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCashWithdrawalService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCommercialService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCompanyCityService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCompanyService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITComplaintService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITCouponService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITDispatchService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITDriverLineService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITDriverService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITDriverServiceService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITDriverWorkService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITEditionService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITEvaluateService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITFeedbackService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITHtmlService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITImgService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITIntegralGoodsService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITIntegralOrderService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITInvoiceService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITLineCompanyService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITLinePriceService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITLineService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITLineShiftService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITLineSiteService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITLocationService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITMainContentService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITNoticesService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOpenCityBusinessService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOpenCityService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderCharterService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderCharteredCarService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderCrossCityService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderEvaluateService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderLogisticsService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderPositionService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderPrivateCarService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderRefusalService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITOrderTaxiService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITPhoneService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITProblemService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITPubTransactionDetailsService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITPubWithdrawalService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITReassignService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITRechargeRecordService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITRegionService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITRevenueService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITServerCarmodelService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSiteService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSmsrecordService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSysCancleOrderService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSysFaceDistinguishService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSysIntegralService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSysPushOrderService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSysReformistService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSysSensitiveWordsService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSystemBulletinService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSystemBulletinUserService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSystemConfigService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSystemNoticeService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITSystemPriceService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITUserRedPacketRecordService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITUserService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITUserToCouponService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITVerifiedService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITVersionManagementService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITYouTuiService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/ITransactionDetailsService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IUserActivityBalanceService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IUserActivityDiscount1Service.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IUserActivityDiscount2Service.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IUserActivityInviteService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IUserActivityRedenvelopeService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IUserActivityRegisteredService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IUserActivityService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IUserCouponRecordService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IUserRedPacketRecordService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/IUserService.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DeptServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DictServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverActivityHistoryServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverActivityOnlineServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverActivityOrderServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverActivityRegisteredServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverActivityServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/DriverOnlineServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/GDInterfaceServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/IncomeServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/LoginLogServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/MenuServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/NoticeServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/OperationLogServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/PaymentRecordServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/RelationServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/RoleServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/SysCouponActivityServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/SysCouponRecordServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/SysRedPacketRecordServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAdvertisementServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgentServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAgreementServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TAppUserServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBillServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBranchOfficeServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TBroadcastServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCancelOrderServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCarBrandServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCarModelServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCarServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCarServiceServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCashWithdrawalServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCommercialServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCompanyCityServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCompanyServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TComplaintServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCouponServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDispatchServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDriverLineServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDriverServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDriverServiceServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TDriverWorkServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TEditionServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TEvaluateServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TFeedbackServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/THtmlServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TImgServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TIntegralGoodsServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TIntegralOrderServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TInvoiceServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TLineCompanyServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TLinePriceServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TLineServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TLineShiftServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TLineSiteServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TLocationServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TMainContentServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TNoticesServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOpenCityBusinessServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOpenCityServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderCharterServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderCharteredCarServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderCrossCityServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderEvaluateServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderLogisticsServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderPositionServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderPrivateCarServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderRefusalServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderTaxiServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TPhoneServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TProblemServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TPubTransactionDetailsServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TPubWithdrawalServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TReassignServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRechargeRecordServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRegionServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TRevenueServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TServerCarmodelServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSiteServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSmsrecordServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSysCancleOrderServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSysFaceDistinguishServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSysIntegralServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSysPushOrderServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSysReformistServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSysSensitiveWordsServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSystemBulletinServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSystemBulletinUserServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSystemConfigServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSystemNoticeServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TSystemPriceServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TUserRedPacketRecordServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TUserServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TUserToCouponServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TVerifiedServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TVersionManagementServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TYouTuiServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TransactionDetailsServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserActivityBalanceServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserActivityDiscount1ServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserActivityDiscount2ServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserActivityInviteServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserActivityRedenvelopeServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserActivityRegisteredServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserActivityServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserCouponRecordServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserRedPacketRecordServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/UserServiceImpl.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/transfer/ManagerUser.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/transfer/ReqAddManager.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/transfer/ReqEditManager.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/transfer/UserDto.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/AESUtils.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/AddAdminLogUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/ConstellationUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/DateUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/GDMapElectricFenceUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/GDMapGeocodingUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/GaoDeMapUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/HttpRequestUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/HuaWeiSMSUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/JpushUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/OrderUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/OssUploadUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/PushURL.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RedisUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/ResultUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/RongCloudUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/SpringContextsUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/TaskUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/WoUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/huawei/OBSUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/huawei/SMSUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/task/QuartzTest.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/task/TestJob.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/task/ThreadTes.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/task/base/AbstractJob.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/task/base/QuartzManager.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/task/base/TimeJobType.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/task/exceptions/TimeException.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/task/jobs/AddMachine.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/task/jobs/AddNotice.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/task/jobs/AddSensitiveWord.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/task/jobs/SendSms.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/task/start/TimerServerStartJob.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/three/Base64Coder.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/three/HMACSHA1Util.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/three/PlatformUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/three/TokenUtil.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/CustomWarpper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/DeptWarpper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/DictWarpper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/LogWarpper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/MenuWarpper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/NoticeWrapper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/RoleWarpper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/TFeedbackWarpper.java
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/warpper/UserWarpper.java
management/guns-admin/src/main/resources/META-INF/spring-devtools.properties
management/guns-admin/src/main/resources/application.yml
management/guns-admin/src/main/resources/ehcache.xml
management/guns-admin/src/main/resources/logback-spring.xml
management/guns-admin/src/main/resources/redis.properties
management/guns-admin/src/main/webapp/WEB-INF/view/404.html
management/guns-admin/src/main/webapp/WEB-INF/view/blackboard.html
management/guns-admin/src/main/webapp/WEB-INF/view/blackboardBlank.html
management/guns-admin/src/main/webapp/WEB-INF/view/code/code.html
management/guns-admin/src/main/webapp/WEB-INF/view/common/_container.html
management/guns-admin/src/main/webapp/WEB-INF/view/common/_right.html
management/guns-admin/src/main/webapp/WEB-INF/view/common/_tab.html
management/guns-admin/src/main/webapp/WEB-INF/view/common/_theme.html
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/NameCon.tag
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/SelectCon.tag
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/TimeCon.tag
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/avatar.tag
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/button.tag
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/input.tag
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/inputRequired.tag
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/label.tag
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/select.tag
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/table.tag
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/tag_tips
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/uploadFile.tag
management/guns-admin/src/main/webapp/WEB-INF/view/common/tags/uploadImg.tag
management/guns-admin/src/main/webapp/WEB-INF/view/driverOnline.html
management/guns-admin/src/main/webapp/WEB-INF/view/home.html
management/guns-admin/src/main/webapp/WEB-INF/view/index.html
management/guns-admin/src/main/webapp/WEB-INF/view/login.html
management/guns-admin/src/main/webapp/WEB-INF/view/netCarInfo.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/code/code.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/dept/dept.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/dept/dept_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/dept/dept_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/dict/dict.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/dict/dict_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/dict/dict_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/driverActivity/driverActivity.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/driverActivity/driverActivity_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/driverActivity/driverActivity_detail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/driverActivity/driverActivity_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/driverActivity/driverActivity_immediately.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/driverActivity/receiveRecord.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/driverActivityHistory/driverActivityHistory.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/log/log.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/log/login_log.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/menu/menu.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/menu/menu_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/menu/menu_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/notice/notice.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/notice/notice_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/notice/notice_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/report/couponStatistics.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/report/couponStatisticsInfo.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/report/operationalData.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/role/role.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/role/role_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/role/role_assign.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/role/role_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/sysCouponActivity/sysCouponActivity.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/sysCouponActivity/sysCouponActivity_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/sysCouponActivity/sysCouponActivity_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/sysCouponActivity/sysCouponActivity_immediately.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/sysCouponActivity/sysCouponRecord.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/sysCouponActivity/tUser.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/sysCouponRecord/sysCouponRecord.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/sysCouponRecord/sysCouponRecord_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/sysCouponRecord/sysCouponRecord_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/sysRedPacketRecord/sysRedPacketRecord.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/sysRedPacketRecord/sysRedPacketRecord_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/sysRedPacketRecord/sysRedPacketRecord_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAdvertisement/tAdvertisement.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAdvertisement/tAdvertisement_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAdvertisement/tAdvertisement_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgentArea.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgentDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgent/tAgent_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/commonProblem.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/corssHtml.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/driverRegister.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/instructions.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/pricingRules.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/tAgreement.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/tAgreementCharterCar.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/tAgreementDriver.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/tAgreementLaw.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/tAgreementMe.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/tAgreementOrder.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/tAgreementRecharge.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/tAgreementSmallPieceLogistics.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAgreement/tAgreementUser.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUser.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserDetailException.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserException.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserStartAndStop.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUserStartAndStopException.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUser_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tAppUser_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tCoupon.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tAppUser/tCouponException.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBill/tBill.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBill/tBill_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBill/tBill_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeAreaAdd.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeAreaUpdate.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOfficeDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBranchOffice/tBranchOffice_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBroadcast/tBroadcast.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBroadcast/tBroadcast_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tBroadcast/tBroadcast_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrderDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCancelOrder/tCancelOrder_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCar/carInsurance.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCar/carInsuranceInfo.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCar/tCar.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCar/tCar_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCar/tCar_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCarBrand/tCarBrand.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCarBrand/tCarBrand_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCarBrand/tCarBrand_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCarModel/tCarModel.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCarModel/tCarModel_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCarModel/tCarModel_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCommercial/tCommercial_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/franchisee.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/platformEdit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_addFranchisee.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_detailFranchisee.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCompany/tCompany_updateFranchisee.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/lookDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaintAudit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tComplaint/tComplaint_immediately.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tCoupon/tCoupon_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDispatch/tDispatch.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDispatch/tDispatch_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDispatch/tDispatch_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/punish.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAreaAdd.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAreaUpdate.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverAudit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverCommission.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverCommissionDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverCommissionDetailConnect.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverException.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverExceptionStartAndStop.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverRechargeBalancePage.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriverStartAndStop.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_changeCar.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_immediately.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_look.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/tDriver_optDriver.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/training.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tDriver/yesDriver.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tEdition/tEdition.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tEdition/tEdition_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tEdition/tEdition_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluateDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tEvaluate/tEvaluate_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tFeedback/tFeedback.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tFeedback/tFeedback_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tFeedback/tFeedback_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tFeedback/tFeedback_immediately.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tFeedback/userFeedback.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHomePage/tHomePageMap.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHomePage/tHomePageStatistics.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHtml/aboutUs.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHtml/agreementExplain.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHtml/cancellationAgreement.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHtml/commissionRuleExplain.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHtml/estimatedPriceExplain.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHtml/integralExplain.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHtml/requirementsJoinExplain.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHtml/startingFareExplain.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHtml/tHtml.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHtml/tHtml_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHtml/tHtml_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tHtml/tripRecordingExplain.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tImg/tImg.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tImg/tImg_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tImg/tImg_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tIntegralGoods/tIntegralGoods.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tIntegralGoods/tIntegralGoods_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tIntegralGoods/tIntegralGoods_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tIntegralOrder/tIntegralOrder.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tIntegralOrder/tIntegralOrder_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tIntegralOrder/tIntegralOrder_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tIntegralOrder/tIntegralOrder_immediately.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tInvoice/tInvoice.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tInvoice/tInvoice_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tInvoice/tInvoice_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tLine/tLine.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tLine/tLine_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tLine/tLine_addCompany.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tLine/tLine_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tMainContent/driverCancelOrder.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tMainContent/driverCancelOrderAdd.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tMainContent/driverCancelOrderUpdate.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tMainContent/tMainContent.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tMainContent/tMainContent_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tMainContent/tMainContent_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tMainContent/transferOrder.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tMainContent/transferOrderAdd.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tMainContent/transferOrderUpdate.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tMainContent/userCancelOrder.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tMainContent/userCancelOrderAdd.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tMainContent/userCancelOrderUpdate.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tNotices/system.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tNotices/system_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tNotices/system_update.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tNotices/tNotices.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tNotices/tNotices_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tNotices/tNotices_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOpenCity/tOpenCity.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOpenCity/tOpenCity_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOpenCity/tOpenCity_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tCancelOrder.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrder.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderException.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderExceptionDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrderStartAndStopException.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrder_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrder/tOrder_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderCharter/tOrderCharter.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderCharter/tOrderCharter_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderCharter/tOrderCharter_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderCharter/tOrderCharter_immediately.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderCharteredCar/tOrderCharteredCar.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderCharteredCar/tOrderCharteredCar_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderCharteredCar/tOrderCharteredCar_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderCharteredCar/tOrderCharteredCar_immediately.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderCrossCity/tOrderCrossCity.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderCrossCity/tOrderCrossCity_detail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderCrossCity/tOrderCrossCity_track.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderEvaluate/tOrderEvaluate.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderEvaluate/tOrderEvaluate_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderEvaluate/tOrderEvaluate_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderLogistics/tOrderLogistics.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderLogistics/tOrderLogistics_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderLogistics/tOrderLogistics_detail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderLogistics/tOrderLogistics_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCar/tOrderPrivateCar.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCar/tOrderPrivateCar_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCar/tOrderPrivateCar_orderDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderPrivateCar/tOrderPrivateCar_trajectory.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderRefusal/tOrderRefusal.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderRefusal/tOrderRefusal_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderRefusal/tOrderRefusal_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderTaxi/tOrderTaxi.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderTaxi/tOrderTaxi_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderTaxi/tOrderTaxi_changeOrder.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderTaxi/tOrderTaxi_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tOrderTaxi/tOrderTaxi_trajectory.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tProblem/tProblem.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tProblem/tProblem_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tProblem/tProblem_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tProblem/tProblem_immediately.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tPubWithdrawal/tPubWithdrawal.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tPubWithdrawal/tPubWithdrawal_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tPubWithdrawal/tPubWithdrawal_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tPubWithdrawal/tPubWithdrawal_immediately.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tReassign/cross.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tReassign/smallPieceLogistics.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tReassign/tReassign.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tReassign/tReassign_reassignment.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tReassign/tReassign_reassignmentCross.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tReassign/tReassign_reassignmentSmall.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecord.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecordAgent.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecordUser.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecord_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRechargeRecord/tRechargeRecord_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRegion/tRegion.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRegion/tRegion_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRegion/tRegion_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRevenue/tRevenue.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRevenue/tRevenueBalanceDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRevenue/tRevenueCommissionDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRevenue/tRevenueOrderDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRevenue/tRevenue_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tRevenue/tRevenue_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tServerCarmodel/acrossCity.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tServerCarmodel/acrossCity_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tServerCarmodel/acrossCity_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tServerCarmodel/charter.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tServerCarmodel/charter_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tServerCarmodel/charter_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tServerCarmodel/tServerCarmodel.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tServerCarmodel/tServerCarmodel_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tServerCarmodel/tServerCarmodel_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSite/tSite.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSite/tSite_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSite/tSite_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSmsrecord/tSmsrecord.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSmsrecord/tSmsrecord_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSmsrecord/tSmsrecord_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSysReformist/tSysReformist.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSysSensitiveWords/tSysSensitiveWords.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSysSensitiveWords/tSysSensitiveWords_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSysSensitiveWords/tSysSensitiveWords_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemBulletin/tSystemBulletin.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemBulletin/tSystemBulletin_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemBulletin/tSystemBulletin_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigBalanceRules.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigCommissionShareRules.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigDispatchRules.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigExtractionRules.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigIntegralRules.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigPriceRules.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfigServiceMgmt.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemConfig/tSystemConfig_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemPrice/small.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemPrice/tSystemPrice.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemPrice/tSystemPrice_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tSystemPrice/tSystemPrice_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tUser/tUser.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tUser/tUser_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tUser/tUser_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tUser/tUser_optUser.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tUser/tUser_updateBalance.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tUser/tUser_updatePassword.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tUser/tUser_userDetail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tUserRedPacketRecord/tUserRedPacketRecord.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tUserRedPacketRecord/tUserRedPacketRecord_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tUserRedPacketRecord/tUserRedPacketRecord_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tVerified/tVerified.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tVerified/tVerified_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tVerified/tVerified_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tVerified/tVerified_immediately.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tVersionManagement/tVersionManagement.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tVersionManagement/tVersionManagement_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tVersionManagement/tVersionManagement_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/tYouTui/tYouTui_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/user/user.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/user/user_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/user/user_chpwd.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/user/user_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/user/user_roleassign.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/user/user_view.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/userActivity/addRegist.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/userActivity/receiveRecord.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/userActivity/sysCouponRecord.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/userActivity/sysCouponRecord1.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/userActivity/sysCouponRecord2.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/userActivity/sysRedPacketRecord.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/userActivity/userActivity.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/userActivity/userActivity_add.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/userActivity/userActivity_detail.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/userActivity/userActivity_edit.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/userActivity/userActivity_immediately.html
management/guns-admin/src/main/webapp/WEB-INF/view/system/userCouponRecord/userCouponRecord.html
management/guns-admin/src/main/webapp/WEB-INF/web.xml
management/guns-admin/src/main/webapp/static/bitbug_favicon.ico
management/guns-admin/src/main/webapp/static/car.png
management/guns-admin/src/main/webapp/static/crypto-js/aes.js
management/guns-admin/src/main/webapp/static/crypto-js/cipher-core.js
management/guns-admin/src/main/webapp/static/crypto-js/core.js
management/guns-admin/src/main/webapp/static/crypto-js/crypto-js.js
management/guns-admin/src/main/webapp/static/crypto-js/enc-base64.js
management/guns-admin/src/main/webapp/static/crypto-js/enc-base64url.js
management/guns-admin/src/main/webapp/static/crypto-js/enc-hex.js
management/guns-admin/src/main/webapp/static/crypto-js/enc-latin1.js
management/guns-admin/src/main/webapp/static/crypto-js/enc-utf16.js
management/guns-admin/src/main/webapp/static/crypto-js/enc-utf8.js
management/guns-admin/src/main/webapp/static/crypto-js/evpkdf.js
management/guns-admin/src/main/webapp/static/crypto-js/format-hex.js
management/guns-admin/src/main/webapp/static/crypto-js/format-openssl.js
management/guns-admin/src/main/webapp/static/crypto-js/hmac-md5.js
management/guns-admin/src/main/webapp/static/crypto-js/hmac-ripemd160.js
management/guns-admin/src/main/webapp/static/crypto-js/hmac-sha1.js
management/guns-admin/src/main/webapp/static/crypto-js/hmac-sha224.js
management/guns-admin/src/main/webapp/static/crypto-js/hmac-sha256.js
management/guns-admin/src/main/webapp/static/crypto-js/hmac-sha3.js
management/guns-admin/src/main/webapp/static/crypto-js/hmac-sha384.js
management/guns-admin/src/main/webapp/static/crypto-js/hmac-sha512.js
management/guns-admin/src/main/webapp/static/crypto-js/hmac.js
management/guns-admin/src/main/webapp/static/crypto-js/index.js
management/guns-admin/src/main/webapp/static/crypto-js/lib-typedarrays.js
management/guns-admin/src/main/webapp/static/crypto-js/md5.js
management/guns-admin/src/main/webapp/static/crypto-js/mode-cfb.js
management/guns-admin/src/main/webapp/static/crypto-js/mode-ctr-gladman.js
management/guns-admin/src/main/webapp/static/crypto-js/mode-ctr.js
management/guns-admin/src/main/webapp/static/crypto-js/mode-ecb.js
management/guns-admin/src/main/webapp/static/crypto-js/mode-ofb.js
management/guns-admin/src/main/webapp/static/crypto-js/pad-ansix923.js
management/guns-admin/src/main/webapp/static/crypto-js/pad-iso10126.js
management/guns-admin/src/main/webapp/static/crypto-js/pad-iso97971.js
management/guns-admin/src/main/webapp/static/crypto-js/pad-nopadding.js
management/guns-admin/src/main/webapp/static/crypto-js/pad-pkcs7.js
management/guns-admin/src/main/webapp/static/crypto-js/pad-zeropadding.js
management/guns-admin/src/main/webapp/static/crypto-js/pbkdf2.js
management/guns-admin/src/main/webapp/static/crypto-js/rabbit-legacy.js
management/guns-admin/src/main/webapp/static/crypto-js/rabbit.js
management/guns-admin/src/main/webapp/static/crypto-js/rc4.js
management/guns-admin/src/main/webapp/static/crypto-js/ripemd160.js
management/guns-admin/src/main/webapp/static/crypto-js/sha1.js
management/guns-admin/src/main/webapp/static/crypto-js/sha224.js
management/guns-admin/src/main/webapp/static/crypto-js/sha256.js
management/guns-admin/src/main/webapp/static/crypto-js/sha3.js
management/guns-admin/src/main/webapp/static/crypto-js/sha384.js
management/guns-admin/src/main/webapp/static/crypto-js/sha512.js
management/guns-admin/src/main/webapp/static/crypto-js/tripledes.js
management/guns-admin/src/main/webapp/static/crypto-js/x64-core.js
management/guns-admin/src/main/webapp/static/css/_fstyle.css
management/guns-admin/src/main/webapp/static/css/bootstrap-rtl.css
management/guns-admin/src/main/webapp/static/css/bootstrap.min.css
management/guns-admin/src/main/webapp/static/css/font-awesome.css
management/guns-admin/src/main/webapp/static/css/font-awesome.min.css
management/guns-admin/src/main/webapp/static/css/login.css
management/guns-admin/src/main/webapp/static/css/patterns/header-profile-skin-1.png
management/guns-admin/src/main/webapp/static/css/patterns/header-profile-skin-3.png
management/guns-admin/src/main/webapp/static/css/patterns/header-profile.png
management/guns-admin/src/main/webapp/static/css/patterns/shattered.png
management/guns-admin/src/main/webapp/static/css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css
management/guns-admin/src/main/webapp/static/css/plugins/bootstrap-table/bootstrap-table.min.css
management/guns-admin/src/main/webapp/static/css/plugins/bootstrap-treetable/bootstrap-treetable.css
management/guns-admin/src/main/webapp/static/css/plugins/chosen/chosen-sprite.png
management/guns-admin/src/main/webapp/static/css/plugins/chosen/chosen-sprite@2x.png
management/guns-admin/src/main/webapp/static/css/plugins/chosen/chosen.css
management/guns-admin/src/main/webapp/static/css/plugins/iCheck/custom.css
management/guns-admin/src/main/webapp/static/css/plugins/iCheck/green.png
management/guns-admin/src/main/webapp/static/css/plugins/iCheck/green@2x.png
management/guns-admin/src/main/webapp/static/css/plugins/images/sprite-skin-flat.png
management/guns-admin/src/main/webapp/static/css/plugins/lineProgressbar/jquery.lineProgressbar.css
management/guns-admin/src/main/webapp/static/css/plugins/sweetalert/sweetalert.css
management/guns-admin/src/main/webapp/static/css/plugins/switchery/switchery.css
management/guns-admin/src/main/webapp/static/css/plugins/validate/bootstrapValidator.min.css
management/guns-admin/src/main/webapp/static/css/plugins/webuploader/webuploader.css
management/guns-admin/src/main/webapp/static/css/plugins/ztree/demo.css
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/1_close.png
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/1_open.png
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/2.png
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/3.png
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/4.png
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/5.png
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/6.png
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/7.png
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/8.png
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/diy/9.png
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/line_conn.gif
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/loading.gif
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/zTreeStandard.gif
management/guns-admin/src/main/webapp/static/css/plugins/ztree/img/zTreeStandard.png
management/guns-admin/src/main/webapp/static/css/plugins/ztree/zTreeStyle.css
management/guns-admin/src/main/webapp/static/css/style.css
management/guns-admin/src/main/webapp/static/favicon.ico
management/guns-admin/src/main/webapp/static/favicon1.ico
management/guns-admin/src/main/webapp/static/fonts/FontAwesome.otf
management/guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.eot
management/guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.svg
management/guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.ttf
management/guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.woff
management/guns-admin/src/main/webapp/static/fonts/fontawesome-webfont.woff2
management/guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.eot
management/guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.svg
management/guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.ttf
management/guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.woff
management/guns-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.woff2
management/guns-admin/src/main/webapp/static/home.js
management/guns-admin/src/main/webapp/static/img/20210511-092352.JPG
management/guns-admin/src/main/webapp/static/img/NoPIC.png
management/guns-admin/src/main/webapp/static/img/account.png
management/guns-admin/src/main/webapp/static/img/bg.png
management/guns-admin/src/main/webapp/static/img/boy.gif
management/guns-admin/src/main/webapp/static/img/girl.gif
management/guns-admin/src/main/webapp/static/img/icons.png
management/guns-admin/src/main/webapp/static/img/index.png
management/guns-admin/src/main/webapp/static/img/index1.png
management/guns-admin/src/main/webapp/static/img/index2.png
management/guns-admin/src/main/webapp/static/img/loading-upload.gif
management/guns-admin/src/main/webapp/static/img/locked.png
management/guns-admin/src/main/webapp/static/img/login-background.jpg
management/guns-admin/src/main/webapp/static/img/login.png
management/guns-admin/src/main/webapp/static/img/logo.png
management/guns-admin/src/main/webapp/static/img/password.png
management/guns-admin/src/main/webapp/static/img/shangchuanpic.png
management/guns-admin/src/main/webapp/static/img/user.png
management/guns-admin/src/main/webapp/static/js/bootstrap.min.js
management/guns-admin/src/main/webapp/static/js/common/DateUtils.js
management/guns-admin/src/main/webapp/static/js/common/Feng.js
management/guns-admin/src/main/webapp/static/js/common/ajax-object.js
management/guns-admin/src/main/webapp/static/js/common/bootstrap-table-object.js
management/guns-admin/src/main/webapp/static/js/common/laydateChoose.js
management/guns-admin/src/main/webapp/static/js/common/select-list-object.js
management/guns-admin/src/main/webapp/static/js/common/tree-table-object.js
management/guns-admin/src/main/webapp/static/js/common/web-upload-file.js
management/guns-admin/src/main/webapp/static/js/common/web-upload-image.js
management/guns-admin/src/main/webapp/static/js/common/web-upload-object.js
management/guns-admin/src/main/webapp/static/js/common/ztree-object.js
management/guns-admin/src/main/webapp/static/js/contabs.js
management/guns-admin/src/main/webapp/static/js/content.js
management/guns-admin/src/main/webapp/static/js/hplus.js
management/guns-admin/src/main/webapp/static/js/jquery.min.js
management/guns-admin/src/main/webapp/static/js/jquery.min.map
management/guns-admin/src/main/webapp/static/js/jquery.sparkline 2.1.2.js
management/guns-admin/src/main/webapp/static/js/md5.js
management/guns-admin/src/main/webapp/static/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js
management/guns-admin/src/main/webapp/static/js/plugins/bootstrap-table/bootstrap-table.min.js
management/guns-admin/src/main/webapp/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.js
management/guns-admin/src/main/webapp/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js
management/guns-admin/src/main/webapp/static/js/plugins/bootstrap-treetable/bootstrap-treetable.js
management/guns-admin/src/main/webapp/static/js/plugins/chartJs/Chart.min.js
management/guns-admin/src/main/webapp/static/js/plugins/chartJs/echarts.min.js
management/guns-admin/src/main/webapp/static/js/plugins/chartJs/echarts.simple.min.js
management/guns-admin/src/main/webapp/static/js/plugins/chosen/chosen.jquery.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/adapters/mootools-adapter.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/adapters/mootools-adapter.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/adapters/prototype-adapter.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/adapters/prototype-adapter.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/adapters/standalone-framework.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/adapters/standalone-framework.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/highcharts-3d.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/highcharts-3d.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/highcharts-all.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/highcharts-more.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/highcharts-more.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/highcharts.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/highcharts.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/canvas-tools.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/canvas-tools.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/data.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/data.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/drilldown.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/drilldown.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/exporting.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/exporting.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/funnel.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/funnel.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/heatmap.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/heatmap.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/no-data-to-display.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/no-data-to-display.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/solid-gauge.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/modules/solid-gauge.src.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/themes/dark-blue.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/themes/dark-green.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/themes/dark-unica.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/themes/gray.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/themes/grid-light.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/themes/grid.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/themes/sand-signika.js
management/guns-admin/src/main/webapp/static/js/plugins/highcharts/themes/skies.js
management/guns-admin/src/main/webapp/static/js/plugins/iCheck/icheck.min.js
management/guns-admin/src/main/webapp/static/js/plugins/laydate/laydate.js
management/guns-admin/src/main/webapp/static/js/plugins/laydate/theme/default/font/iconfont.eot
management/guns-admin/src/main/webapp/static/js/plugins/laydate/theme/default/font/iconfont.svg
management/guns-admin/src/main/webapp/static/js/plugins/laydate/theme/default/font/iconfont.ttf
management/guns-admin/src/main/webapp/static/js/plugins/laydate/theme/default/font/iconfont.woff
management/guns-admin/src/main/webapp/static/js/plugins/laydate/theme/default/laydate.css
management/guns-admin/src/main/webapp/static/js/plugins/layer/extend/layer.ext.js
management/guns-admin/src/main/webapp/static/js/plugins/layer/laydate/laydate.js
management/guns-admin/src/main/webapp/static/js/plugins/layer/laydate/need/laydate.css
management/guns-admin/src/main/webapp/static/js/plugins/layer/laydate/skins/default/icon.png
management/guns-admin/src/main/webapp/static/js/plugins/layer/laydate/skins/default/laydate.css
management/guns-admin/src/main/webapp/static/js/plugins/layer/layer.js
management/guns-admin/src/main/webapp/static/js/plugins/layer/layer.min.js
management/guns-admin/src/main/webapp/static/js/plugins/layer/layim/data/chatlog.json
management/guns-admin/src/main/webapp/static/js/plugins/layer/layim/data/friend.json
management/guns-admin/src/main/webapp/static/js/plugins/layer/layim/data/group.json
management/guns-admin/src/main/webapp/static/js/plugins/layer/layim/data/groups.json
management/guns-admin/src/main/webapp/static/js/plugins/layer/layim/layim.css
management/guns-admin/src/main/webapp/static/js/plugins/layer/layim/layim.js
management/guns-admin/src/main/webapp/static/js/plugins/layer/layim/loading.gif
management/guns-admin/src/main/webapp/static/js/plugins/layer/mobile/layer.js
management/guns-admin/src/main/webapp/static/js/plugins/layer/mobile/need/layer.css
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/icon-ext.png
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/icon.png
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/icon_ext.png
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/loading-0.gif
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/loading-1.gif
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/loading-2.gif
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/textbg.png
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_ico0.png
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_loading0.gif
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_loading1.gif
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_loading2.gif
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_loading3.gif
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/default/xubox_title0.png
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/layer.css
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/layer.ext.css
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/moon/default.png
management/guns-admin/src/main/webapp/static/js/plugins/layer/skin/moon/style.css
management/guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/icon-ext.png
management/guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/icon.png
management/guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/layer.css
management/guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/loading-0.gif
management/guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/loading-1.gif
management/guns-admin/src/main/webapp/static/js/plugins/layer/theme/default/loading-2.gif
management/guns-admin/src/main/webapp/static/js/plugins/lineProgressbar/jquery-1.11.0.min.js
management/guns-admin/src/main/webapp/static/js/plugins/lineProgressbar/jquery.lineProgressbar.js
management/guns-admin/src/main/webapp/static/js/plugins/metisMenu/jquery.metisMenu.js
management/guns-admin/src/main/webapp/static/js/plugins/pace/pace.min.js
management/guns-admin/src/main/webapp/static/js/plugins/slimscroll/jquery.slimscroll.min.js
management/guns-admin/src/main/webapp/static/js/plugins/sweetalert/sweetalert.min.js
management/guns-admin/src/main/webapp/static/js/plugins/switchery/switchery.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/emotion.css
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/emotion.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/0.gif
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/bface.gif
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/cface.gif
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/fface.gif
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/jxface2.gif
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/neweditor-tab-bg.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/tface.gif
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/wface.gif
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/yface.gif
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/formula/formula.css
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/formula/formula.html
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/formula/formula.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/formula/images/formula.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/image/image.css
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/image/image.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/image/images/close.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/image/images/upload1.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/image/images/upload2.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/link/link.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/map/map.html
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/map/map.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/video/images/center_focus.jpg
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/video/images/left_focus.jpg
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/video/images/none_focus.jpg
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/video/images/right_focus.jpg
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/video/video.css
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/video/video.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/index.html
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/en.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/addimage.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/alldeletebtnhoverskin.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/alldeletebtnupskin.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/background.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/button.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/copy.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/deletedisable.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/deleteenable.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/imglabel.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/listbackground.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/localimage.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/music.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/rotateleftdisable.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/rotateleftenable.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/rotaterightdisable.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/rotaterightenable.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/upload.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/copy.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/imglabel.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/localimage.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/music.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/upload.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/zh-cn.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/css/umeditor.css
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/css/umeditor.min.css
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/caret.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/close.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/icons.gif
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/icons.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/ok.gif
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/pop-bg.png
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/spacer.gif
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/videologo.gif
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/jquery.min.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.eot
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.otf
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.svg
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.ttf
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.woff
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/STIXFontLicense2010.txt
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.eot
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.svg
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.ttf
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.woff
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.eot
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.svg
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.ttf
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.woff
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.eot
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.svg
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.ttf
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.woff
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.eot
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.svg
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.ttf
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.woff
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/mathquill.css
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/mathquill.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/mathquill.min.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/umeditor.config.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/umeditor.js
management/guns-admin/src/main/webapp/static/js/plugins/umeditor/umeditor.min.js
management/guns-admin/src/main/webapp/static/js/plugins/validate/additional-methods.min.js
management/guns-admin/src/main/webapp/static/js/plugins/validate/bootstrapValidator.min.js
management/guns-admin/src/main/webapp/static/js/plugins/validate/zh_CN.js
management/guns-admin/src/main/webapp/static/js/plugins/wangEditor/wangEditor.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/Uploader.swf
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.css
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.custom.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.custom.min.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.fis.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.flashonly.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.flashonly.min.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.html5only.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.html5only.min.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.min.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.noimage.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.noimage.min.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.nolog.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.nolog.min.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.withoutimage.js
management/guns-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.withoutimage.min.js
management/guns-admin/src/main/webapp/static/js/plugins/ztree/jquery.ztree.all.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/asp/ASPJson.class.asp
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/asp/MultiformProcessor.class.asp
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/asp/PathFormatter.class.asp
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/asp/README.md
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/asp/Uploader.Class.asp
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/asp/action_config.asp
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/asp/action_crawler.asp
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/asp/action_list.asp
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/asp/action_upload.asp
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/asp/config.json
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/asp/config_loader.asp
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/asp/controller.asp
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/anchor/anchor.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/attachment.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/attachment.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/attachment.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_chm.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_default.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_doc.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_exe.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_jpg.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_mp3.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_mv.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_pdf.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_ppt.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_psd.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_rar.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_txt.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/fileTypeImages/icon_xls.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/images/alignicon.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/images/alignicon.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/images/bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/images/file-icons.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/images/file-icons.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/images/icons.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/images/icons.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/images/image.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/images/progress.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/images/success.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/attachment/images/success.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/background/background.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/background/background.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/background/background.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/background/images/bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/background/images/success.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/charts/chart.config.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/charts/charts.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/charts/charts.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/charts/charts.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/charts/images/charts0.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/charts/images/charts1.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/charts/images/charts2.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/charts/images/charts3.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/charts/images/charts4.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/charts/images/charts5.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/emotion/emotion.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/emotion/emotion.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/emotion/emotion.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/emotion/images/0.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/emotion/images/bface.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/emotion/images/cface.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/emotion/images/fface.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/emotion/images/jxface2.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/emotion/images/neweditor-tab-bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/emotion/images/tface.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/emotion/images/wface.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/emotion/images/yface.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/gmap/gmap.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/help/help.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/help/help.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/help/help.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/image/image.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/image/image.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/image/image.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/image/images/alignicon.jpg
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/image/images/bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/image/images/icons.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/image/images/icons.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/image/images/image.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/image/images/progress.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/image/images/success.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/image/images/success.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/insertframe/insertframe.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/internal.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/link/link.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/map/map.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/map/show.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/music/music.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/music/music.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/music/music.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/preview/preview.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/addimg.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/brush.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/delimg.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/delimgH.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/empty.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/emptyH.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/eraser.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/redo.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/redoH.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/scale.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/scaleH.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/size.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/undo.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/images/undoH.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/scrawl.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/scrawl.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/scrawl/scrawl.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/searchreplace/searchreplace.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/searchreplace/searchreplace.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/snapscreen/snapscreen.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/spechars/spechars.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/spechars/spechars.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/table/dragicon.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/table/edittable.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/table/edittable.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/table/edittable.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/table/edittd.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/table/edittip.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/template/config.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/template/images/bg.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/template/images/pre0.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/template/images/pre1.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/template/images/pre2.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/template/images/pre3.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/template/images/pre4.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/template/template.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/template/template.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/template/template.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/center_focus.jpg
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/file-icons.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/file-icons.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/icons.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/icons.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/image.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/left_focus.jpg
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/none_focus.jpg
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/progress.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/right_focus.jpg
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/success.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/images/success.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/video.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/video.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/video/video.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/webapp/webapp.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/wordimage/fClipboard_ueditor.swf
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/wordimage/imageUploader.swf
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/wordimage/tangram.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/wordimage/wordimage.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/dialogs/wordimage/wordimage.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/index.html
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/config.json
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/controller.jsp
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/ActionEnter.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/ConfigManager.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/Encoder.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/PathFormat.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/define/ActionMap.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/define/ActionState.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/define/AppInfo.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/define/BaseState.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/define/FileType.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/define/MIMEType.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/define/MultiState.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/define/State.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/hunter/FileManager.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/hunter/ImageHunter.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/upload/Base64Uploader.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/upload/BinaryUploader.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/upload/StorageManager.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/jsp/src/com/baidu/ueditor/upload/Uploader.java
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/en.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/addimage.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/alldeletebtnhoverskin.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/alldeletebtnupskin.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/background.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/button.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/copy.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/deletedisable.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/deleteenable.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/listbackground.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/localimage.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/music.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/rotateleftdisable.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/rotateleftenable.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/rotaterightdisable.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/rotaterightenable.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/en/images/upload.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/zh-cn/images/copy.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/zh-cn/images/localimage.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/zh-cn/images/music.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/zh-cn/images/upload.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/lang/zh-cn/zh-cn.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/App_Code/Config.cs
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/App_Code/ConfigHandler.cs
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/App_Code/CrawlerHandler.cs
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/App_Code/Handler.cs
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/App_Code/ListFileHandler.cs
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/App_Code/NotSupportedHandler.cs
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/App_Code/PathFormater.cs
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/App_Code/UploadHandler.cs
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/Bin/Newtonsoft.Json.dll
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/Bin/Newtonsoft.Json.pdb
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/Bin/Newtonsoft.Json.xml
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/README.md
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/Web.config
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/config.json
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/controller.ashx
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/net/net.sln
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/php/Uploader.class.php
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/php/action_crawler.php
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/php/action_list.php
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/php/action_upload.php
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/php/config.json
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/php/controller.php
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/css/ueditor.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/css/ueditor.min.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/dialogbase.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/anchor.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/arrow.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/arrow_down.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/arrow_up.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/button-bg.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/cancelbutton.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/charts.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/cursor_h.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/cursor_h.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/cursor_v.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/cursor_v.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/dialog-title-bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/filescan.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/highlighted.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/icons-all.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/icons.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/icons.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/loaderror.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/loading.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/lock.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/neweditor-tab-bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/pagebreak.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/scale.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/sortable.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/spacer.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/sparator_v.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/table-cell-align.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/tangram-colorpicker.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/toolbar_bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/unhighlighted.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/upload.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/videologo.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/word.gif
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/default/images/wordpaste.png
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/themes/iframe.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/SyntaxHighlighter/shCore.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/SyntaxHighlighter/shCoreDefault.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/codemirror/codemirror.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/codemirror/codemirror.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/adapters/mootools-adapter.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/adapters/mootools-adapter.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/adapters/prototype-adapter.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/adapters/prototype-adapter.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/adapters/standalone-framework.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/adapters/standalone-framework.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/highcharts-more.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/highcharts-more.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/highcharts.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/highcharts.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/annotations.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/annotations.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/canvas-tools.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/canvas-tools.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/data.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/data.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/drilldown.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/drilldown.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/exporting.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/exporting.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/funnel.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/funnel.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/heatmap.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/heatmap.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/map.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/map.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/no-data-to-display.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/modules/no-data-to-display.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/themes/dark-blue.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/themes/dark-green.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/themes/gray.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/themes/grid.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/highcharts/themes/skies.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/jquery-1.10.2.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/jquery-1.10.2.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/jquery-1.10.2.min.map
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/snapscreen/UEditorSnapscreen.exe
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/video-js/font/vjs.eot
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/video-js/font/vjs.svg
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/video-js/font/vjs.ttf
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/video-js/font/vjs.woff
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/video-js/video-js.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/video-js/video-js.min.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/video-js/video-js.swf
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/video-js/video.dev.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/video-js/video.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/webuploader/Uploader.swf
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/webuploader/webuploader.css
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/webuploader/webuploader.custom.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/webuploader/webuploader.custom.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/webuploader/webuploader.flashonly.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/webuploader/webuploader.flashonly.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/webuploader/webuploader.html5only.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/webuploader/webuploader.html5only.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/webuploader/webuploader.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/webuploader/webuploader.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/webuploader/webuploader.withoutimage.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/webuploader/webuploader.withoutimage.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/zeroclipboard/ZeroClipboard.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/zeroclipboard/ZeroClipboard.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/third-party/zeroclipboard/ZeroClipboard.swf
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/ueditor.all.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/ueditor.all.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/ueditor.config.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/ueditor.parse.js
management/guns-admin/src/main/webapp/static/js/ueditor/1.4.3/ueditor.parse.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/anchor/anchor.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/attachment.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/attachment.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/attachment.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_chm.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_default.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_doc.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_exe.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_jpg.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_mp3.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_mv.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_pdf.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_ppt.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_psd.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_rar.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_txt.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/fileTypeImages/icon_xls.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/images/alignicon.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/images/alignicon.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/images/bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/images/file-icons.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/images/file-icons.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/images/icons.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/images/icons.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/images/image.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/images/progress.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/images/success.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/attachment/images/success.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/background/background.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/background/background.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/background/background.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/background/images/bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/background/images/success.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/charts/chart.config.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/charts/charts.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/charts/charts.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/charts/charts.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/charts/images/charts0.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/charts/images/charts1.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/charts/images/charts2.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/charts/images/charts3.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/charts/images/charts4.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/charts/images/charts5.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/emotion/emotion.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/emotion/emotion.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/emotion/emotion.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/emotion/images/0.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/emotion/images/bface.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/emotion/images/cface.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/emotion/images/fface.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/emotion/images/jxface2.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/emotion/images/neweditor-tab-bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/emotion/images/tface.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/emotion/images/wface.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/emotion/images/yface.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/gmap/gmap.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/help/help.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/help/help.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/help/help.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/image/image.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/image/image.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/image/image.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/image/images/alignicon.jpg
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/image/images/bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/image/images/icons.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/image/images/icons.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/image/images/image.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/image/images/progress.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/image/images/success.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/image/images/success.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/insertframe/insertframe.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/internal.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/link/link.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/map/map.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/map/show.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/music/music.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/music/music.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/music/music.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/preview/preview.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/addimg.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/brush.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/delimg.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/delimgH.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/empty.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/emptyH.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/eraser.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/redo.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/redoH.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/scale.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/scaleH.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/size.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/undo.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/images/undoH.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/scrawl.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/scrawl.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/scrawl/scrawl.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/searchreplace/searchreplace.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/searchreplace/searchreplace.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/snapscreen/snapscreen.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/spechars/spechars.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/spechars/spechars.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/table/dragicon.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/table/edittable.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/table/edittable.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/table/edittable.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/table/edittd.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/table/edittip.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/template/config.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/template/images/bg.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/template/images/pre0.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/template/images/pre1.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/template/images/pre2.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/template/images/pre3.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/template/images/pre4.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/template/template.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/template/template.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/template/template.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/center_focus.jpg
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/file-icons.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/file-icons.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/icons.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/icons.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/image.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/left_focus.jpg
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/none_focus.jpg
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/progress.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/right_focus.jpg
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/success.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/images/success.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/video.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/video.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/video/video.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/webapp/webapp.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/wordimage/fClipboard_ueditor.swf
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/wordimage/imageUploader.swf
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/wordimage/tangram.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/wordimage/wordimage.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/dialogs/wordimage/wordimage.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/index.html
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/jsp/config.json
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/jsp/controller.jsp
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/en.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/addimage.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/alldeletebtnhoverskin.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/alldeletebtnupskin.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/background.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/button.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/copy.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/deletedisable.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/deleteenable.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/listbackground.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/localimage.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/music.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/rotateleftdisable.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/rotateleftenable.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/rotaterightdisable.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/rotaterightenable.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/en/images/upload.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/zh-cn/images/copy.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/zh-cn/images/localimage.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/zh-cn/images/music.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/zh-cn/images/upload.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/lang/zh-cn/zh-cn.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/css/ueditor.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/css/ueditor.min.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/dialogbase.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/anchor.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/arrow.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/arrow_down.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/arrow_up.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/button-bg.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/cancelbutton.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/charts.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/cursor_h.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/cursor_h.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/cursor_v.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/cursor_v.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/dialog-title-bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/filescan.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/highlighted.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/icons-all.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/icons.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/icons.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/loaderror.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/loading.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/lock.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/neweditor-tab-bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/pagebreak.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/scale.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/sortable.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/spacer.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/sparator_v.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/table-cell-align.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/tangram-colorpicker.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/toolbar_bg.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/unhighlighted.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/upload.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/videologo.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/word.gif
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/default/images/wordpaste.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/themes/iframe.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/SyntaxHighlighter/shCore.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/SyntaxHighlighter/shCoreDefault.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/codemirror/codemirror.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/codemirror/codemirror.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/adapters/mootools-adapter.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/adapters/mootools-adapter.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/adapters/prototype-adapter.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/adapters/prototype-adapter.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/adapters/standalone-framework.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/adapters/standalone-framework.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/highcharts-more.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/highcharts-more.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/highcharts.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/highcharts.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/annotations.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/annotations.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/canvas-tools.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/canvas-tools.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/data.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/data.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/drilldown.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/drilldown.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/exporting.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/exporting.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/funnel.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/funnel.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/heatmap.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/heatmap.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/map.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/map.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/no-data-to-display.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/modules/no-data-to-display.src.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/themes/dark-blue.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/themes/dark-green.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/themes/gray.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/themes/grid.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/highcharts/themes/skies.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/jquery-1.10.2.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/jquery-1.10.2.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/jquery-1.10.2.min.map
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/snapscreen/UEditorSnapscreen.exe
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/video-js/font/vjs.eot
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/video-js/font/vjs.svg
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/video-js/font/vjs.ttf
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/video-js/font/vjs.woff
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/video-js/video-js.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/video-js/video-js.min.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/video-js/video-js.swf
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/video-js/video.dev.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/video-js/video.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/webuploader/Uploader.swf
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/webuploader/webuploader.css
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/webuploader/webuploader.custom.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/webuploader/webuploader.custom.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/webuploader/webuploader.flashonly.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/webuploader/webuploader.flashonly.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/webuploader/webuploader.html5only.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/webuploader/webuploader.html5only.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/webuploader/webuploader.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/webuploader/webuploader.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/webuploader/webuploader.withoutimage.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/webuploader/webuploader.withoutimage.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/xss.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/zeroclipboard/ZeroClipboard.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/zeroclipboard/ZeroClipboard.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/third-party/zeroclipboard/ZeroClipboard.swf
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/ueditor.all.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/ueditor.all.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/ueditor.config.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/ueditor.parse.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/ueditor.parse.min.js
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/ueditor/jsp/upload/image/20161220/1482229766809036054.jpg
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/ueditor/jsp/upload/image/20161220/1482229845707005523.png
management/guns-admin/src/main/webapp/static/js/ueditor/jsp/ueditor/jsp/upload/image/20161220/1482229845748008398.jpg
management/guns-admin/src/main/webapp/static/layui/css/layui.css
management/guns-admin/src/main/webapp/static/layui/css/layui.mobile.css
management/guns-admin/src/main/webapp/static/layui/css/modules/code.css
management/guns-admin/src/main/webapp/static/layui/css/modules/laydate/default/laydate.css
management/guns-admin/src/main/webapp/static/layui/css/modules/layer/default/icon-ext.png
management/guns-admin/src/main/webapp/static/layui/css/modules/layer/default/icon.png
management/guns-admin/src/main/webapp/static/layui/css/modules/layer/default/layer.css
management/guns-admin/src/main/webapp/static/layui/css/modules/layer/default/loading-0.gif
management/guns-admin/src/main/webapp/static/layui/css/modules/layer/default/loading-1.gif
management/guns-admin/src/main/webapp/static/layui/css/modules/layer/default/loading-2.gif
management/guns-admin/src/main/webapp/static/layui/font/iconfont.eot
management/guns-admin/src/main/webapp/static/layui/font/iconfont.svg
management/guns-admin/src/main/webapp/static/layui/font/iconfont.ttf
management/guns-admin/src/main/webapp/static/layui/font/iconfont.woff
management/guns-admin/src/main/webapp/static/layui/font/iconfont.woff2
management/guns-admin/src/main/webapp/static/layui/images/face/0.gif
management/guns-admin/src/main/webapp/static/layui/images/face/1.gif
management/guns-admin/src/main/webapp/static/layui/images/face/10.gif
management/guns-admin/src/main/webapp/static/layui/images/face/11.gif
management/guns-admin/src/main/webapp/static/layui/images/face/12.gif
management/guns-admin/src/main/webapp/static/layui/images/face/13.gif
management/guns-admin/src/main/webapp/static/layui/images/face/14.gif
management/guns-admin/src/main/webapp/static/layui/images/face/15.gif
management/guns-admin/src/main/webapp/static/layui/images/face/16.gif
management/guns-admin/src/main/webapp/static/layui/images/face/17.gif
management/guns-admin/src/main/webapp/static/layui/images/face/18.gif
management/guns-admin/src/main/webapp/static/layui/images/face/19.gif
management/guns-admin/src/main/webapp/static/layui/images/face/2.gif
management/guns-admin/src/main/webapp/static/layui/images/face/20.gif
management/guns-admin/src/main/webapp/static/layui/images/face/21.gif
management/guns-admin/src/main/webapp/static/layui/images/face/22.gif
management/guns-admin/src/main/webapp/static/layui/images/face/23.gif
management/guns-admin/src/main/webapp/static/layui/images/face/24.gif
management/guns-admin/src/main/webapp/static/layui/images/face/25.gif
management/guns-admin/src/main/webapp/static/layui/images/face/26.gif
management/guns-admin/src/main/webapp/static/layui/images/face/27.gif
management/guns-admin/src/main/webapp/static/layui/images/face/28.gif
management/guns-admin/src/main/webapp/static/layui/images/face/29.gif
management/guns-admin/src/main/webapp/static/layui/images/face/3.gif
management/guns-admin/src/main/webapp/static/layui/images/face/30.gif
management/guns-admin/src/main/webapp/static/layui/images/face/31.gif
management/guns-admin/src/main/webapp/static/layui/images/face/32.gif
management/guns-admin/src/main/webapp/static/layui/images/face/33.gif
management/guns-admin/src/main/webapp/static/layui/images/face/34.gif
management/guns-admin/src/main/webapp/static/layui/images/face/35.gif
management/guns-admin/src/main/webapp/static/layui/images/face/36.gif
management/guns-admin/src/main/webapp/static/layui/images/face/37.gif
management/guns-admin/src/main/webapp/static/layui/images/face/38.gif
management/guns-admin/src/main/webapp/static/layui/images/face/39.gif
management/guns-admin/src/main/webapp/static/layui/images/face/4.gif
management/guns-admin/src/main/webapp/static/layui/images/face/40.gif
management/guns-admin/src/main/webapp/static/layui/images/face/41.gif
management/guns-admin/src/main/webapp/static/layui/images/face/42.gif
management/guns-admin/src/main/webapp/static/layui/images/face/43.gif
management/guns-admin/src/main/webapp/static/layui/images/face/44.gif
management/guns-admin/src/main/webapp/static/layui/images/face/45.gif
management/guns-admin/src/main/webapp/static/layui/images/face/46.gif
management/guns-admin/src/main/webapp/static/layui/images/face/47.gif
management/guns-admin/src/main/webapp/static/layui/images/face/48.gif
management/guns-admin/src/main/webapp/static/layui/images/face/49.gif
management/guns-admin/src/main/webapp/static/layui/images/face/5.gif
management/guns-admin/src/main/webapp/static/layui/images/face/50.gif
management/guns-admin/src/main/webapp/static/layui/images/face/51.gif
management/guns-admin/src/main/webapp/static/layui/images/face/52.gif
management/guns-admin/src/main/webapp/static/layui/images/face/53.gif
management/guns-admin/src/main/webapp/static/layui/images/face/54.gif
management/guns-admin/src/main/webapp/static/layui/images/face/55.gif
management/guns-admin/src/main/webapp/static/layui/images/face/56.gif
management/guns-admin/src/main/webapp/static/layui/images/face/57.gif
management/guns-admin/src/main/webapp/static/layui/images/face/58.gif
management/guns-admin/src/main/webapp/static/layui/images/face/59.gif
management/guns-admin/src/main/webapp/static/layui/images/face/6.gif
management/guns-admin/src/main/webapp/static/layui/images/face/60.gif
management/guns-admin/src/main/webapp/static/layui/images/face/61.gif
management/guns-admin/src/main/webapp/static/layui/images/face/62.gif
management/guns-admin/src/main/webapp/static/layui/images/face/63.gif
management/guns-admin/src/main/webapp/static/layui/images/face/64.gif
management/guns-admin/src/main/webapp/static/layui/images/face/65.gif
management/guns-admin/src/main/webapp/static/layui/images/face/66.gif
management/guns-admin/src/main/webapp/static/layui/images/face/67.gif
management/guns-admin/src/main/webapp/static/layui/images/face/68.gif
management/guns-admin/src/main/webapp/static/layui/images/face/69.gif
management/guns-admin/src/main/webapp/static/layui/images/face/7.gif
management/guns-admin/src/main/webapp/static/layui/images/face/70.gif
management/guns-admin/src/main/webapp/static/layui/images/face/71.gif
management/guns-admin/src/main/webapp/static/layui/images/face/8.gif
management/guns-admin/src/main/webapp/static/layui/images/face/9.gif
management/guns-admin/src/main/webapp/static/layui/lay/modules/carousel.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/code.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/colorpicker.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/element.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/flow.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/form.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/jquery.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/laydate.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/layedit.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/layer.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/laypage.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/laytpl.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/mobile.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/rate.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/slider.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/table.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/transfer.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/tree.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/upload.js
management/guns-admin/src/main/webapp/static/layui/lay/modules/util.js
management/guns-admin/src/main/webapp/static/layui/layui.all.js
management/guns-admin/src/main/webapp/static/layui/layui.js
management/guns-admin/src/main/webapp/static/modular/code/gen.js
management/guns-admin/src/main/webapp/static/modular/flowable/expense/expense.js
management/guns-admin/src/main/webapp/static/modular/flowable/expense/expense_info.js
management/guns-admin/src/main/webapp/static/modular/flowable/process/process.js
management/guns-admin/src/main/webapp/static/modular/flowable/process/process_info.js
management/guns-admin/src/main/webapp/static/modular/system/code/code.js
management/guns-admin/src/main/webapp/static/modular/system/dept/dept.js
management/guns-admin/src/main/webapp/static/modular/system/dept/dept_info.js
management/guns-admin/src/main/webapp/static/modular/system/dict/dict.js
management/guns-admin/src/main/webapp/static/modular/system/dict/dict_info.js
management/guns-admin/src/main/webapp/static/modular/system/driverActivity/driverActivity.js
management/guns-admin/src/main/webapp/static/modular/system/driverActivity/driverActivity_info.js
management/guns-admin/src/main/webapp/static/modular/system/driverActivityHistory/driverActivityHistory.js
management/guns-admin/src/main/webapp/static/modular/system/log/log.js
management/guns-admin/src/main/webapp/static/modular/system/log/login_log.js
management/guns-admin/src/main/webapp/static/modular/system/menu/menu.js
management/guns-admin/src/main/webapp/static/modular/system/menu/menu_info.js
management/guns-admin/src/main/webapp/static/modular/system/notice/notice.js
management/guns-admin/src/main/webapp/static/modular/system/notice/notice_info.js
management/guns-admin/src/main/webapp/static/modular/system/report/couponStatistics.js
management/guns-admin/src/main/webapp/static/modular/system/report/couponStatisticsInfo.js
management/guns-admin/src/main/webapp/static/modular/system/report/operationalData.js
management/guns-admin/src/main/webapp/static/modular/system/role/role.js
management/guns-admin/src/main/webapp/static/modular/system/role/role_info.js
management/guns-admin/src/main/webapp/static/modular/system/sysCouponActivity/sysCouponActivity.js
management/guns-admin/src/main/webapp/static/modular/system/sysCouponActivity/sysCouponActivity_info.js
management/guns-admin/src/main/webapp/static/modular/system/sysCouponActivity/sysCouponRecord.js
management/guns-admin/src/main/webapp/static/modular/system/sysCouponActivity/tUser.js
management/guns-admin/src/main/webapp/static/modular/system/sysCouponRecord/sysCouponRecord.js
management/guns-admin/src/main/webapp/static/modular/system/sysCouponRecord/sysCouponRecord_info.js
management/guns-admin/src/main/webapp/static/modular/system/sysRedPacketRecord/sysRedPacketRecord.js
management/guns-admin/src/main/webapp/static/modular/system/sysRedPacketRecord/sysRedPacketRecord_info.js
management/guns-admin/src/main/webapp/static/modular/system/tAdvertisement/tAdvertisement.js
management/guns-admin/src/main/webapp/static/modular/system/tAdvertisement/tAdvertisement_info.js
management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent.js
management/guns-admin/src/main/webapp/static/modular/system/tAgent/tAgent_info.js
management/guns-admin/src/main/webapp/static/modular/system/tAgreement/tAgreement.js
management/guns-admin/src/main/webapp/static/modular/system/tAgreement/tAgreement_info.js
management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUser.js
management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUserDetailOrder.js
management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUserException.js
management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUser_info.js
management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tCoupon.js
management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tOrder.js
management/guns-admin/src/main/webapp/static/modular/system/tBill/tBill.js
management/guns-admin/src/main/webapp/static/modular/system/tBill/tBill_info.js
management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice.js
management/guns-admin/src/main/webapp/static/modular/system/tBranchOffice/tBranchOffice_info.js
management/guns-admin/src/main/webapp/static/modular/system/tBroadcast/tBroadcast.js
management/guns-admin/src/main/webapp/static/modular/system/tBroadcast/tBroadcast_info.js
management/guns-admin/src/main/webapp/static/modular/system/tCancelOrder/tCancelOrder.js
management/guns-admin/src/main/webapp/static/modular/system/tCancelOrder/tCancelOrder_info.js
management/guns-admin/src/main/webapp/static/modular/system/tCar/carInsurance.js
management/guns-admin/src/main/webapp/static/modular/system/tCar/carInsuranceInfo.js
management/guns-admin/src/main/webapp/static/modular/system/tCar/tCar.js
management/guns-admin/src/main/webapp/static/modular/system/tCar/tCar_info.js
management/guns-admin/src/main/webapp/static/modular/system/tCarBrand/tCarBrand.js
management/guns-admin/src/main/webapp/static/modular/system/tCarBrand/tCarBrand_info.js
management/guns-admin/src/main/webapp/static/modular/system/tCarModel/tCarModel.js
management/guns-admin/src/main/webapp/static/modular/system/tCarModel/tCarModel_info.js
management/guns-admin/src/main/webapp/static/modular/system/tCommercial/tCommercial.js
management/guns-admin/src/main/webapp/static/modular/system/tCommercial/tCommercial_info.js
management/guns-admin/src/main/webapp/static/modular/system/tCompany/franchisee.js
management/guns-admin/src/main/webapp/static/modular/system/tCompany/franchisee_info.js
management/guns-admin/src/main/webapp/static/modular/system/tCompany/tCompany.js
management/guns-admin/src/main/webapp/static/modular/system/tCompany/tCompany_info.js
management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint.js
management/guns-admin/src/main/webapp/static/modular/system/tComplaint/tComplaint_info.js
management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon.js
management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon_info.js
management/guns-admin/src/main/webapp/static/modular/system/tDispatch/tDispatch.js
management/guns-admin/src/main/webapp/static/modular/system/tDispatch/tDispatch_info.js
management/guns-admin/src/main/webapp/static/modular/system/tDriver/punish.js
management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver.js
management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriverCommission.js
management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriverCommissionConnect.js
management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriverException.js
management/guns-admin/src/main/webapp/static/modular/system/tDriver/tDriver_info.js
management/guns-admin/src/main/webapp/static/modular/system/tDriver/tOrderRefusal.js
management/guns-admin/src/main/webapp/static/modular/system/tDriver/training.js
management/guns-admin/src/main/webapp/static/modular/system/tDriver/yesDriver.js
management/guns-admin/src/main/webapp/static/modular/system/tDriver/yesDriver_info.js
management/guns-admin/src/main/webapp/static/modular/system/tDriver/yesDriver_selectCar.js
management/guns-admin/src/main/webapp/static/modular/system/tEdition/tEdition.js
management/guns-admin/src/main/webapp/static/modular/system/tEdition/tEdition_info.js
management/guns-admin/src/main/webapp/static/modular/system/tEvaluate/tEvaluate.js
management/guns-admin/src/main/webapp/static/modular/system/tEvaluate/tEvaluate_info.js
management/guns-admin/src/main/webapp/static/modular/system/tFeedback/tFeedback.js
management/guns-admin/src/main/webapp/static/modular/system/tFeedback/tFeedback_info.js
management/guns-admin/src/main/webapp/static/modular/system/tFeedback/userFeedback.js
management/guns-admin/src/main/webapp/static/modular/system/tHomePage/tOrder.js
management/guns-admin/src/main/webapp/static/modular/system/tHtml/tHtml.js
management/guns-admin/src/main/webapp/static/modular/system/tHtml/tHtml_info.js
management/guns-admin/src/main/webapp/static/modular/system/tImg/tImg.js
management/guns-admin/src/main/webapp/static/modular/system/tImg/tImg_info.js
management/guns-admin/src/main/webapp/static/modular/system/tIntegralGoods/tIntegralGoods.js
management/guns-admin/src/main/webapp/static/modular/system/tIntegralGoods/tIntegralGoods_info.js
management/guns-admin/src/main/webapp/static/modular/system/tIntegralOrder/tIntegralOrder.js
management/guns-admin/src/main/webapp/static/modular/system/tIntegralOrder/tIntegralOrder_info.js
management/guns-admin/src/main/webapp/static/modular/system/tInvoice/tInvoice.js
management/guns-admin/src/main/webapp/static/modular/system/tInvoice/tInvoice_info.js
management/guns-admin/src/main/webapp/static/modular/system/tLine/tLine.js
management/guns-admin/src/main/webapp/static/modular/system/tLine/tLine_info.js
management/guns-admin/src/main/webapp/static/modular/system/tMainContent/tMainContent.js
management/guns-admin/src/main/webapp/static/modular/system/tMainContent/tMainContent_info.js
management/guns-admin/src/main/webapp/static/modular/system/tNotices/system.js
management/guns-admin/src/main/webapp/static/modular/system/tNotices/system_info.js
management/guns-admin/src/main/webapp/static/modular/system/tNotices/tNotices.js
management/guns-admin/src/main/webapp/static/modular/system/tNotices/tNotices_info.js
management/guns-admin/src/main/webapp/static/modular/system/tOpenCity/tOpenCity.js
management/guns-admin/src/main/webapp/static/modular/system/tOpenCity/tOpenCity_info.js
management/guns-admin/src/main/webapp/static/modular/system/tOrder/tAppUser.js
management/guns-admin/src/main/webapp/static/modular/system/tOrder/tCancelOrder.js
management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrder.js
management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrderException.js
management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrderExceptionDetailCancelOrder.js
management/guns-admin/src/main/webapp/static/modular/system/tOrder/tOrder_info.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderCharter/tOrderCharter.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderCharter/tOrderCharter_info.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderCharteredCar/tOrderCharteredCar.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderCharteredCar/tOrderCharteredCar_info.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderCrossCity/tOrderCrossCity.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderCrossCity/tOrderCrossCity_info.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderEvaluate/tOrderEvaluate.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderEvaluate/tOrderEvaluate_info.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderLogistics/tOrderLogistics.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderLogistics/tOrderLogistics_info.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCar/tOrderPrivateCar.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderPrivateCar/tOrderPrivateCar_info.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderRefusal/tOrderRefusal.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderRefusal/tOrderRefusal_info.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderTaxi/selectDriver.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderTaxi/tOrderTaxi.js
management/guns-admin/src/main/webapp/static/modular/system/tOrderTaxi/tOrderTaxi_info.js
management/guns-admin/src/main/webapp/static/modular/system/tProblem/tProblem.js
management/guns-admin/src/main/webapp/static/modular/system/tProblem/tProblem_info.js
management/guns-admin/src/main/webapp/static/modular/system/tPubWithdrawal/tPubWithdrawal.js
management/guns-admin/src/main/webapp/static/modular/system/tPubWithdrawal/tPubWithdrawal_info.js
management/guns-admin/src/main/webapp/static/modular/system/tReassign/selectCrossDriver.js
management/guns-admin/src/main/webapp/static/modular/system/tReassign/selectPrivateCarDriver.js
management/guns-admin/src/main/webapp/static/modular/system/tReassign/selectSmallDriver.js
management/guns-admin/src/main/webapp/static/modular/system/tReassign/smallPieceLogistics.js
management/guns-admin/src/main/webapp/static/modular/system/tReassign/tCross.js
management/guns-admin/src/main/webapp/static/modular/system/tReassign/tReassign.js
management/guns-admin/src/main/webapp/static/modular/system/tReassign/tReassign_info.js
management/guns-admin/src/main/webapp/static/modular/system/tRechargeRecord/tRechargeRecord.js
management/guns-admin/src/main/webapp/static/modular/system/tRechargeRecord/tRechargeRecordAgent.js
management/guns-admin/src/main/webapp/static/modular/system/tRechargeRecord/tRechargeRecordUser.js
management/guns-admin/src/main/webapp/static/modular/system/tRechargeRecord/tRechargeRecord_info.js
management/guns-admin/src/main/webapp/static/modular/system/tRegion/tRegion.js
management/guns-admin/src/main/webapp/static/modular/system/tRegion/tRegion_info.js
management/guns-admin/src/main/webapp/static/modular/system/tRevenue/tRevenue.js
management/guns-admin/src/main/webapp/static/modular/system/tRevenue/tRevenue_info.js
management/guns-admin/src/main/webapp/static/modular/system/tServerCarmodel/acrossCity.js
management/guns-admin/src/main/webapp/static/modular/system/tServerCarmodel/acrossCity_info.js
management/guns-admin/src/main/webapp/static/modular/system/tServerCarmodel/charter.js
management/guns-admin/src/main/webapp/static/modular/system/tServerCarmodel/charter_info.js
management/guns-admin/src/main/webapp/static/modular/system/tServerCarmodel/tServerCarmodel.js
management/guns-admin/src/main/webapp/static/modular/system/tServerCarmodel/tServerCarmodel_info.js
management/guns-admin/src/main/webapp/static/modular/system/tSite/electricFence.js
management/guns-admin/src/main/webapp/static/modular/system/tSite/tSite.js
management/guns-admin/src/main/webapp/static/modular/system/tSite/tSite_info.js
management/guns-admin/src/main/webapp/static/modular/system/tSmsrecord/tSmsrecord.js
management/guns-admin/src/main/webapp/static/modular/system/tSmsrecord/tSmsrecord_info.js
management/guns-admin/src/main/webapp/static/modular/system/tSysSensitiveWords/tSysSensitiveWords.js
management/guns-admin/src/main/webapp/static/modular/system/tSysSensitiveWords/tSysSensitiveWords_info.js
management/guns-admin/src/main/webapp/static/modular/system/tSystemBulletin/tSystemBulletin.js
management/guns-admin/src/main/webapp/static/modular/system/tSystemBulletin/tSystemBulletin_info.js
management/guns-admin/src/main/webapp/static/modular/system/tSystemConfig/tSystemConfig.js
management/guns-admin/src/main/webapp/static/modular/system/tSystemConfig/tSystemConfig_info.js
management/guns-admin/src/main/webapp/static/modular/system/tSystemPrice/tSystemPrice.js
management/guns-admin/src/main/webapp/static/modular/system/tSystemPrice/tSystemPrice_info.js
management/guns-admin/src/main/webapp/static/modular/system/tUser/tUser.js
management/guns-admin/src/main/webapp/static/modular/system/tUser/tUser_info.js
management/guns-admin/src/main/webapp/static/modular/system/tUserRedPacketRecord/tUserRedPacketRecord.js
management/guns-admin/src/main/webapp/static/modular/system/tUserRedPacketRecord/tUserRedPacketRecord_info.js
management/guns-admin/src/main/webapp/static/modular/system/tVerified/tVerified.js
management/guns-admin/src/main/webapp/static/modular/system/tVerified/tVerified_info.js
management/guns-admin/src/main/webapp/static/modular/system/tVersionManagement/tVersionManagement.js
management/guns-admin/src/main/webapp/static/modular/system/tVersionManagement/tVersionManagement_info.js
management/guns-admin/src/main/webapp/static/modular/system/tYouTui/tYouTui.js
management/guns-admin/src/main/webapp/static/modular/system/tYouTui/tYouTui_info.js
management/guns-admin/src/main/webapp/static/modular/system/user/user.js
management/guns-admin/src/main/webapp/static/modular/system/user/user_info.js
management/guns-admin/src/main/webapp/static/modular/system/userActivity/addRegist.js
management/guns-admin/src/main/webapp/static/modular/system/userActivity/sysCouponRecord.js
management/guns-admin/src/main/webapp/static/modular/system/userActivity/sysRedPacketRecord.js
management/guns-admin/src/main/webapp/static/modular/system/userActivity/userActivity.js
management/guns-admin/src/main/webapp/static/modular/system/userActivity/userActivity_info.js
management/guns-admin/src/main/webapp/static/modular/system/userCouponRecord/userCouponRecord.js
management/guns-admin/src/main/webapp/static/netCarInfo.js
management/guns-admin/src/test/sql/test.sql
management/guns-core/pom.xml
management/guns-core/src/main/java/com/stylefeng/guns/core/CoreFlag.java
management/guns-core/src/main/java/com/stylefeng/guns/core/aop/BaseControllerExceptionHandler.java
management/guns-core/src/main/java/com/stylefeng/guns/core/base/controller/BaseController.java
management/guns-core/src/main/java/com/stylefeng/guns/core/base/controller/GlobalController.java
management/guns-core/src/main/java/com/stylefeng/guns/core/base/controller/GunsErrorView.java
management/guns-core/src/main/java/com/stylefeng/guns/core/base/tips/ErrorTip.java
management/guns-core/src/main/java/com/stylefeng/guns/core/base/tips/SuccessTip.java
management/guns-core/src/main/java/com/stylefeng/guns/core/base/tips/Tip.java
management/guns-core/src/main/java/com/stylefeng/guns/core/base/warpper/BaseControllerWarpper.java
management/guns-core/src/main/java/com/stylefeng/guns/core/cache/BaseCacheFactory.java
management/guns-core/src/main/java/com/stylefeng/guns/core/cache/CacheKit.java
management/guns-core/src/main/java/com/stylefeng/guns/core/cache/EhcacheFactory.java
management/guns-core/src/main/java/com/stylefeng/guns/core/cache/ICache.java
management/guns-core/src/main/java/com/stylefeng/guns/core/cache/ILoader.java
management/guns-core/src/main/java/com/stylefeng/guns/core/config/DefaultFastjsonConfig.java
management/guns-core/src/main/java/com/stylefeng/guns/core/config/DefaultMultiConfig.java
management/guns-core/src/main/java/com/stylefeng/guns/core/config/DefaultProperties.java
management/guns-core/src/main/java/com/stylefeng/guns/core/config/DefaultWebConfig.java
management/guns-core/src/main/java/com/stylefeng/guns/core/config/properties/DruidProperties.java
management/guns-core/src/main/java/com/stylefeng/guns/core/config/properties/MutiDataSourceProperties.java
management/guns-core/src/main/java/com/stylefeng/guns/core/constant/IsMenu.java
management/guns-core/src/main/java/com/stylefeng/guns/core/datascope/DataScope.java
management/guns-core/src/main/java/com/stylefeng/guns/core/datascope/DataScopeInterceptor.java
management/guns-core/src/main/java/com/stylefeng/guns/core/db/Db.java
management/guns-core/src/main/java/com/stylefeng/guns/core/exception/GunsException.java
management/guns-core/src/main/java/com/stylefeng/guns/core/exception/GunsExceptionEnum.java
management/guns-core/src/main/java/com/stylefeng/guns/core/exception/ServiceExceptionEnum.java
management/guns-core/src/main/java/com/stylefeng/guns/core/mutidatasource/DataSourceContextHolder.java
management/guns-core/src/main/java/com/stylefeng/guns/core/mutidatasource/DynamicDataSource.java
management/guns-core/src/main/java/com/stylefeng/guns/core/mutidatasource/annotion/DataSource.java
management/guns-core/src/main/java/com/stylefeng/guns/core/mutidatasource/aop/MultiSourceExAop.java
management/guns-core/src/main/java/com/stylefeng/guns/core/node/MenuNode.java
management/guns-core/src/main/java/com/stylefeng/guns/core/node/ZTreeNode.java
management/guns-core/src/main/java/com/stylefeng/guns/core/page/PageBT.java
management/guns-core/src/main/java/com/stylefeng/guns/core/page/PageInfoBT.java
management/guns-core/src/main/java/com/stylefeng/guns/core/qr/ImgQrTool.java
management/guns-core/src/main/java/com/stylefeng/guns/core/qr/MatrixToImageConfig.java
management/guns-core/src/main/java/com/stylefeng/guns/core/qr/MatrixToImageWriter.java
management/guns-core/src/main/java/com/stylefeng/guns/core/qr/QrImage.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/BasicType.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/BeanKit.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/ClassKit.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/CollectionKit.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/DateTime.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/DateTimeKit.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/HexKit.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/HttpKit.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/ObjectKit.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/PageKit.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/StrKit.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/WafKit.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/WafRequestWrapper.java
management/guns-core/src/main/java/com/stylefeng/guns/core/support/exception/ToolBoxException.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/Convert.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/DateUtil.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/ExcelExportUtil.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/FileUtil.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/HttpSessionHolder.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/IdGenerator.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/MD5Util.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/NumUtil.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/PingYinUtil.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/RenderUtil.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/ResKit.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/SimpleContrast.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/SpringContextHolder.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/SqlUtil.java
management/guns-core/src/main/java/com/stylefeng/guns/core/util/ToolUtil.java
management/guns-core/src/main/java/com/stylefeng/guns/core/xss/XssFilter.java
management/guns-core/src/main/java/com/stylefeng/guns/core/xss/XssHttpServletRequestWrapper.java
management/guns-core/src/main/resources/META-INF/spring.factories
management/guns-core/src/main/resources/default-config.properties
management/guns-generator/pom.xml
management/guns-generator/src/main/java/com/stylefeng/guns/generator/action/GunsCodeGenerator.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/action/config/AbstractGeneratorConfig.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/action/config/GunsGeneratorConfig.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/action/config/WebGeneratorConfig.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/action/model/GenQo.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/engine/SimpleTemplateEngine.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/engine/base/AbstractTemplateEngine.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/engine/base/GunsTemplateEngine.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/engine/config/ContextConfig.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/engine/config/ControllerConfig.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/engine/config/DaoConfig.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/engine/config/Menu.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/engine/config/PageConfig.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/engine/config/ServiceConfig.java
management/guns-generator/src/main/java/com/stylefeng/guns/generator/engine/config/SqlConfig.java
management/guns-generator/src/main/resources/gunsTemplate/advanced/Controller.java.btl
management/guns-generator/src/main/resources/gunsTemplate/advanced/menu_sql.sql.btl
management/guns-generator/src/main/resources/gunsTemplate/advanced/page.html.btl
management/guns-generator/src/main/resources/gunsTemplate/advanced/page.js.btl
management/guns-generator/src/main/resources/gunsTemplate/advanced/page_add.html.btl
management/guns-generator/src/main/resources/gunsTemplate/advanced/page_edit.html.btl
management/guns-generator/src/main/resources/gunsTemplate/advanced/page_info.js.btl
management/pom.xml |