New file |
| | |
| | | #!/bin/bash |
| | | PROJECT="meiya-admin" |
| | | docker cp /root/${PROJECT}-1.0.0.jar ${PROJECT}-prod:/${PROJECT}.jar |
| | | echo "${PROJECT}部署成功!" |
| | | docker restart ${PROJECT}-prod |
| | | echo "${PROJECT}服务重启中.." |
| | | sleep 3 |
| | | docker logs -f ${PROJECT}-prod --tail=100 |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> |
| | | <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> |
| | | <output url="file://$MODULE_DIR$/target/classes" /> |
| | | <output-test url="file://$MODULE_DIR$/target/test-classes" /> |
| | | <content url="file://$MODULE_DIR$"> |
| | | <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> |
| | | <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> |
| | | <sourceFolder url="file://$MODULE_DIR$/src/main/webapp" type="java-resource" /> |
| | | <excludeFolder url="file://$MODULE_DIR$/target" /> |
| | | </content> |
| | | <orderEntry type="inheritedJdk" /> |
| | | <orderEntry type="sourceFolder" forTests="false" /> |
| | | </component> |
| | | </module> |
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> |
| | | <parent> |
| | | <groupId>com.sinata</groupId> |
| | | <artifactId>meiya-parent</artifactId> |
| | | <version>1.0.0</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | |
| | | <artifactId>meiya-admin</artifactId> |
| | | <name>meiya-admin</name> |
| | | <description>管理后台</description> |
| | | <!--<version>${maven.build.timestamp}</version>--> |
| | | <version>1.0.0</version> |
| | | <packaging>jar</packaging> |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.sinata</groupId> |
| | | <artifactId>meiya-core</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.sinata</groupId> |
| | | <artifactId>meiya-common</artifactId> |
| | | <version>1.0.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.sinata</groupId> |
| | | <artifactId>meiya-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> |
| | | |
| | | <!--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> |
| | | |
| | | <!--需要分布式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>cn.hutool</groupId> |
| | | <artifactId>hutool-core</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- 支付宝 --> |
| | | <dependency> |
| | | <groupId>com.alipay.sdk</groupId> |
| | | <artifactId>alipay-sdk-java</artifactId> |
| | | <version>4.10.167.ALL</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.github.javen205</groupId> |
| | | <artifactId>IJPay-AliPay</artifactId> |
| | | <version>2.7.2</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.github.javen205</groupId> |
| | | <artifactId>IJPay-WxPay</artifactId> |
| | | <version>2.7.2</version> |
| | | </dependency> |
| | | |
| | | <!-- OBS --> |
| | | <dependency> |
| | | <groupId>com.huaweicloud</groupId> |
| | | <artifactId>esdk-obs-java-bundle</artifactId> |
| | | <version>[3.21.11,)</version> |
| | | </dependency> |
| | | </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-resources-plugin</artifactId> |
| | | <configuration> |
| | | <encoding>UTF-8</encoding> |
| | | <!-- 过滤后缀为pem、pfx的证书文件 --> |
| | | <nonFilteredFileExtensions> |
| | | <nonFilteredFileExtension>pfx</nonFilteredFileExtension> |
| | | </nonFilteredFileExtensions> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | <resources> |
| | | <resource> |
| | | <directory>src/main/webapp</directory> |
| | | </resource> |
| | | <resource> |
| | | <directory>src/main/resources</directory> |
| | | <filtering>false</filtering> |
| | | <includes> |
| | | <include>**/wxpay/*</include> |
| | | </includes> |
| | | </resource> |
| | | <resource> |
| | | <directory>src/main/resources</directory> |
| | | <filtering>true</filtering> |
| | | <excludes> |
| | | <exclude>**/wxpay/*</exclude> |
| | | </excludes> |
| | | </resource> |
| | | <resource> |
| | | <directory>src/main/java</directory> |
| | | <includes> |
| | | <include>**/*.xml</include> |
| | | </includes> |
| | | </resource> |
| | | </resources> |
| | | </build> |
| | | |
| | | </project> |
New file |
| | |
| | | package com.sinata; |
| | | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.builder.SpringApplicationBuilder; |
| | | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | |
| | | /** |
| | | * SpringBoot方式启动类 |
| | | */ |
| | | @SpringBootApplication |
| | | public class AdminApplication extends SpringBootServletInitializer { |
| | | |
| | | private final static Logger log = LoggerFactory.getLogger(AdminApplication.class); |
| | | |
| | | @Override |
| | | protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { |
| | | return builder.sources(AdminApplication.class); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | ConfigurableApplicationContext context = new SpringApplicationBuilder(AdminApplication.class).run(args); |
| | | String port = context.getEnvironment().getProperty("server.port"); |
| | | log.info("Admin Application is success!"); |
| | | log.info("【dev】http://localhost:" + port + "/admin"); |
| | | log.info("【prod】http://admin.mymtmy.com:" + port + "/admin"); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.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.sinata.config; |
| | | |
| | | import com.ijpay.alipay.AliPayApiConfig; |
| | | import com.ijpay.alipay.AliPayApiConfigKit; |
| | | import com.ijpay.core.enums.SignType; |
| | | import com.ijpay.core.kit.WxPayKit; |
| | | import com.ijpay.wxpay.WxPayApi; |
| | | import com.ijpay.wxpay.WxPayApiConfig; |
| | | import com.ijpay.wxpay.WxPayApiConfigKit; |
| | | import com.sinata.config.properties.AliPayProperties; |
| | | import com.sinata.config.properties.WxPayProperties; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 初始化 |
| | | * |
| | | * @author frankevil |
| | | * @date 2020/7/28 23:42 |
| | | **/ |
| | | @Slf4j |
| | | @Component |
| | | public class InitApplicationRunner implements ApplicationRunner { |
| | | |
| | | @Resource |
| | | private WxPayProperties wxPayProperties; |
| | | |
| | | @Resource |
| | | private AliPayProperties aliPayProperties; |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | //微信支付初始化 |
| | | initWeChatPay(); |
| | | //支付宝初始化 |
| | | initAliPay(); |
| | | } |
| | | |
| | | /** |
| | | * 初始化微信支付 |
| | | */ |
| | | private void initWeChatPay() { |
| | | WxPayApiConfig wxPayConfig = null; |
| | | try { |
| | | String partnerKey = wxPayProperties.getPartnerKey(); |
| | | if (wxPayProperties.isSandboxnew()) { |
| | | String xmlResult = WxPayApi.getSignKey(wxPayProperties.getMchId(), wxPayProperties.getPartnerKey(), SignType.MD5); |
| | | Map<String, String> result = WxPayKit.xmlToMap(xmlResult); |
| | | String returnCode = result.get("return_code"); |
| | | if (!WxPayKit.codeIsOk(returnCode)) { |
| | | throw new RuntimeException("查询沙盒keys失败"); |
| | | } |
| | | partnerKey = result.get("sandbox_signkey"); |
| | | } |
| | | wxPayConfig = WxPayApiConfig.builder() |
| | | .appId(wxPayProperties.getAppId()) |
| | | .mchId(wxPayProperties.getMchId()) |
| | | .partnerKey(partnerKey) |
| | | .certPath(wxPayProperties.getCertPath()) |
| | | .domain(wxPayProperties.getDomain()) |
| | | .build(); |
| | | } catch (Exception e) { |
| | | log.error("加载配置出错", e); |
| | | } finally { |
| | | if (wxPayConfig != null) { |
| | | WxPayApiConfigKit.setThreadLocalWxPayApiConfig(wxPayConfig); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 初始化支付配置 |
| | | */ |
| | | private void initAliPay() { |
| | | AliPayApiConfig aliPayApiConfig = null; |
| | | try { |
| | | aliPayApiConfig = AliPayApiConfig.builder() |
| | | .setAppId(aliPayProperties.getAppId()) |
| | | .setAliPayPublicKey(aliPayProperties.getPublicKey()) |
| | | .setCharset("UTF-8") |
| | | .setPrivateKey(aliPayProperties.getPrivateKey()) |
| | | .setServiceUrl(aliPayProperties.getServerUrl()) |
| | | .setSignType("RSA2") |
| | | // 普通公钥方式 |
| | | .build(); |
| | | // 2.3.0 公钥证书方式 |
| | | //.build(aliPayProperties.getAppCertPath(), aliPayProperties.getAliPayCertPath(), aliPayProperties.getAliPayCertPath()); |
| | | } catch (Exception e) { |
| | | log.error("加载配置出错", e); |
| | | } finally { |
| | | if (aliPayApiConfig != null) { |
| | | AliPayApiConfigKit.setThreadLocalAliPayApiConfig(aliPayApiConfig); |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.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.sinata.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配置类 |
| | | */ |
| | | @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.sinata.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.sinata.config.datasource; |
| | | |
| | | import com.alibaba.druid.pool.DruidDataSource; |
| | | import com.baomidou.mybatisplus.plugins.OptimisticLockerInterceptor; |
| | | import com.baomidou.mybatisplus.plugins.PaginationInterceptor; |
| | | import com.sinata.core.config.properties.DruidProperties; |
| | | import com.sinata.core.config.properties.MutiDataSourceProperties; |
| | | import com.sinata.core.datascope.DataScopeInterceptor; |
| | | import com.sinata.core.mutidatasource.DynamicDataSource; |
| | | import com.sinata.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.sinata.modular.*.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.sinata.config.datasource; |
| | | |
| | | import com.alibaba.druid.pool.DruidDataSource; |
| | | import com.baomidou.mybatisplus.plugins.OptimisticLockerInterceptor; |
| | | import com.baomidou.mybatisplus.plugins.PaginationInterceptor; |
| | | import com.sinata.core.config.properties.DruidProperties; |
| | | import com.sinata.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.sinata.modular.*.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.sinata.config.properties; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 支付宝配置 |
| | | * |
| | | * @author frankevil |
| | | * @date 2023/3/3 23:45 |
| | | **/ |
| | | @Data |
| | | @Component |
| | | @ConfigurationProperties(prefix = AliPayProperties.ALI_PLAY_PREFIX) |
| | | public class AliPayProperties { |
| | | protected static final String ALI_PLAY_PREFIX = "alipay"; |
| | | |
| | | /** |
| | | * 应用编号 |
| | | */ |
| | | private String appId; |
| | | /** |
| | | * 应用私钥 |
| | | */ |
| | | private String privateKey; |
| | | /** |
| | | * 支付宝公钥,通过应用公钥上传到支付宝开放平台换取支付宝公钥(如果是证书模式,公钥与私钥在CSR目录)。 |
| | | */ |
| | | private String publicKey; |
| | | /** |
| | | * 应用公钥证书 (证书模式必须) |
| | | */ |
| | | private String appCertPath; |
| | | /** |
| | | * 支付宝公钥证书 (证书模式必须) |
| | | */ |
| | | private String aliPayCertPath; |
| | | /** |
| | | * 支付宝根证书 (证书模式必须) |
| | | */ |
| | | private String aliPayRootCertPath; |
| | | /** |
| | | * 支付宝支付网关 |
| | | */ |
| | | private String serverUrl; |
| | | /** |
| | | * 外网访问项目的域名,支付通知中会使用 |
| | | */ |
| | | private String domain; |
| | | |
| | | |
| | | public String getAppCertPath() { |
| | | if (StrUtil.isNotBlank(appCertPath)) { |
| | | return ToolUtil.getJarPath() + appCertPath; |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | public String getAliPayCertPath() { |
| | | if (StrUtil.isNotBlank(aliPayCertPath)) { |
| | | return ToolUtil.getJarPath() + aliPayCertPath; |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | public String getAliPayRootCertPath() { |
| | | if (StrUtil.isNotBlank(aliPayRootCertPath)) { |
| | | return ToolUtil.getJarPath() + aliPayRootCertPath; |
| | | } |
| | | return ""; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.config.properties; |
| | | |
| | | import com.sinata.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.sinata.config.properties; |
| | | |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.File; |
| | | |
| | | import static com.sinata.core.util.ToolUtil.getTempPath; |
| | | import static com.sinata.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 Integer fileUploadWay; |
| | | |
| | | // 文件上传位置配置 |
| | | 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; |
| | | |
| | | public Integer getFileUploadWay() { |
| | | return fileUploadWay; |
| | | } |
| | | |
| | | public void setFileUploadWay(Integer fileUploadWay) { |
| | | this.fileUploadWay = fileUploadWay; |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.config.properties; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 配置参数 |
| | | * |
| | | * @author: KingKong |
| | | * @create: 2018-12-17 14:36 |
| | | **/ |
| | | @Data |
| | | @Component |
| | | @Configuration |
| | | @ConfigurationProperties(prefix = "pay") |
| | | public class PayProperties { |
| | | |
| | | /** |
| | | * 应用私钥 |
| | | */ |
| | | private String aliPrivateKey; |
| | | /** |
| | | * 支付宝公钥 |
| | | */ |
| | | private String aliPublicKey; |
| | | private String aliAppId; |
| | | private String aliNotifyUrl; |
| | | private String aliReturnUrl; |
| | | /** |
| | | * 支付宝账号 |
| | | */ |
| | | private String aliSellerId; |
| | | |
| | | |
| | | /** |
| | | * 微信appId |
| | | */ |
| | | private String wxAppId; |
| | | /** |
| | | * 商户号 |
| | | */ |
| | | private String wxMchId; |
| | | /** |
| | | * 微信key |
| | | */ |
| | | private String wxPayKey; |
| | | /** |
| | | * 支付回调地址 |
| | | */ |
| | | private String wxNotifyUrl; |
| | | /** |
| | | * 支付回显地址 |
| | | */ |
| | | private String wxReturnUrl; |
| | | /** |
| | | * 微信secret |
| | | */ |
| | | private String wxAppSecret; |
| | | /** |
| | | * 微信公众号secret |
| | | */ |
| | | private String wxPublicSecretKey; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.config.properties; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 微信支付配置 |
| | | * |
| | | * @author frankevil |
| | | * @date 2023/3/3 23:43 |
| | | **/ |
| | | @Data |
| | | @Component |
| | | @ConfigurationProperties(prefix = WxPayProperties.WX_PLAY_PREFIX) |
| | | public class WxPayProperties { |
| | | protected static final String WX_PLAY_PREFIX = "wxpay"; |
| | | |
| | | /** |
| | | * 是否使用沙盒 默认不使用 |
| | | */ |
| | | private boolean sandboxnew; |
| | | |
| | | /** |
| | | * 应用编号 |
| | | */ |
| | | private String appId; |
| | | |
| | | /** |
| | | * appSecret 是 appId 对应的接口密码,微信公众号授权获取用户 openId 时使用 |
| | | */ |
| | | private String appSecret; |
| | | /** |
| | | * 微信支付商户号 |
| | | */ |
| | | private String mchId; |
| | | |
| | | /** |
| | | * API 密钥,微信商户后台配置 |
| | | */ |
| | | private String partnerKey; |
| | | /** |
| | | * apiclient_cert.p1 证书路径,在微信商户后台下载 |
| | | */ |
| | | private String certPath; |
| | | |
| | | /** |
| | | * 外网访问项目的域名,支付通知中会使用 |
| | | */ |
| | | private String domain; |
| | | |
| | | |
| | | public String getCertPath() { |
| | | if (StrUtil.isNotBlank(certPath)) { |
| | | return ToolUtil.getJarPath() + certPath; |
| | | } |
| | | return ""; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.config.web; |
| | | |
| | | import com.sinata.config.properties.BeetlProperties; |
| | | import com.sinata.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.sinata.config.web; |
| | | |
| | | import javax.crypto.KeyGenerator; |
| | | import javax.crypto.SecretKey; |
| | | |
| | | /** |
| | | * @author goku |
| | | * @date 2020/12/22 |
| | | */ |
| | | public class GenerateCipherKey { |
| | | public static byte[] getCipherKey() { |
| | | KeyGenerator kg; |
| | | try { |
| | | kg = KeyGenerator.getInstance("AES"); |
| | | } catch (Throwable e) { |
| | | throw new IllegalStateException("Init Aes key error!!", e); |
| | | } |
| | | kg.init(128); |
| | | SecretKey secretKey = kg.generateKey(); |
| | | return secretKey.getEncoded(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.config.web; |
| | | |
| | | import com.sinata.config.properties.GunsProperties; |
| | | import com.sinata.core.intercept.GunsUserFilter; |
| | | import com.sinata.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(); |
| | | // Apache Shiro反序列化漏洞及修复-SHIRO-550:https://www.isolves.com/it/wlyx/fwq/2020-07-30/26310.html |
| | | //manager.setCipherKey(Base64.decode("Z3VucwAAAAAAAAAAAAAAAA==")); |
| | | manager.setCipherKey(GenerateCipherKey.getCipherKey()); |
| | | manager.setCookie(rememberMeCookie); |
| | | return manager; |
| | | } |
| | | |
| | | /** |
| | | * 记住密码Cookie |
| | | */ |
| | | @Bean |
| | | public SimpleCookie rememberMeCookie() { |
| | | SimpleCookie simpleCookie = new SimpleCookie("rememberMe"); |
| | | simpleCookie.setHttpOnly(true);// 防止XSS攻击 |
| | | 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.sinata.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.sinata.config.properties.GunsProperties; |
| | | import com.sinata.core.intercept.RestApiInteceptor; |
| | | import com.sinata.core.listener.ConfigListener; |
| | | import com.sinata.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 配置类 |
| | | */ |
| | | @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.sinata.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( |
| | | "/aaaTest/add", "/aaaTest/update", |
| | | "/notice/add", "/notice/update", |
| | | "/tActivity/add", "/tActivity/update", |
| | | "/tBanner/add", "/tBanner/update", |
| | | "/tNotice/add", "/tNotice/update", |
| | | "/tAppSet/html", "/tAppSet/updateHtml" |
| | | , "/tSystemSet/update_1", "/mallAdvertising/update", "/mallAdvertisingSpace/add", "/mallAdvertisingSpace/update" |
| | | , "/mallGoods/add", "/mallGoods/update" |
| | | , "/mallGoodsGroup/add", "/mallGoodsGroup/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", "40"); |
| | | 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.sinata.core.aop; |
| | | |
| | | import com.sinata.core.common.exception.BizExceptionEnum; |
| | | import com.sinata.core.common.exception.InvalidKaptchaException; |
| | | import com.sinata.core.base.tips.ErrorTip; |
| | | import com.sinata.core.exception.GunsException; |
| | | import com.sinata.core.log.LogManager; |
| | | import com.sinata.core.log.factory.LogTaskFactory; |
| | | import com.sinata.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.sinata.core.support.HttpKit.getIp; |
| | | import static com.sinata.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(), getIp(), 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(), getIp(), e)); |
| | | getRequest().setAttribute("tip", "服务器未知运行时异常"); |
| | | log.error("运行时异常:", e); |
| | | return new ErrorTip(BizExceptionEnum.SERVER_ERROR.getCode(), BizExceptionEnum.SERVER_ERROR.getMessage()); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.core.aop; |
| | | |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.constant.dictmap.base.AbstractDictMap; |
| | | import com.sinata.core.log.LogManager; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.core.log.factory.LogTaskFactory; |
| | | import com.sinata.core.shiro.ShiroKit; |
| | | import com.sinata.core.shiro.ShiroUser; |
| | | import com.sinata.core.support.HttpKit; |
| | | import com.sinata.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.sinata.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, HttpKit.getIp())); |
| | | } |
| | | } |
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.sinata.core.aop; |
| | | |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.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.sinata.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.sinata.core.beetl; |
| | | |
| | | import com.sinata.core.beetl.ShiroExt; |
| | | import com.sinata.core.tag.DictSelectorTag; |
| | | import com.sinata.core.util.KaptchaUtil; |
| | | import com.sinata.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.sinata.core.beetl; |
| | | |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.beetl.core.GroupTemplate; |
| | | |
| | | import com.sinata.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.sinata.core.common.annotion; |
| | | |
| | | import com.sinata.core.common.constant.dictmap.base.AbstractDictMap; |
| | | import com.sinata.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.sinata.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.sinata.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.sinata.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.sinata.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.sinata.core.common.constant.cache; |
| | | |
| | | /** |
| | | * 所有缓存名称的集合 |
| | | * |
| | | * @author fengshuonan |
| | | * @date 2017-04-24 21:56 |
| | | */ |
| | | public interface Cache { |
| | | |
| | | /** |
| | | * 常量缓存 |
| | | */ |
| | | String CONSTANT = "CONSTANT"; |
| | | } |
New file |
| | |
| | | package com.sinata.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.sinata.core.common.constant.dictmap; |
| | | |
| | | import com.sinata.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.sinata.core.common.constant.dictmap; |
| | | |
| | | import com.sinata.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.sinata.core.common.constant.dictmap; |
| | | |
| | | import com.sinata.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.sinata.core.common.constant.dictmap; |
| | | |
| | | import com.sinata.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.sinata.core.common.constant.dictmap; |
| | | |
| | | import com.sinata.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.sinata.core.common.constant.dictmap; |
| | | |
| | | import com.sinata.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.sinata.core.common.constant.dictmap; |
| | | |
| | | import com.sinata.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.sinata.core.common.constant.dictmap; |
| | | |
| | | import com.sinata.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.sinata.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.sinata.core.common.constant.dictmap.base; |
| | | |
| | | import com.sinata.core.common.constant.dictmap.base.AbstractDictMap; |
| | | |
| | | /** |
| | | * 系统相关的字典 |
| | | * |
| | | * @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.sinata.core.common.constant.dictmap.factory; |
| | | |
| | | import com.sinata.core.common.constant.factory.ConstantFactory; |
| | | import com.sinata.core.common.constant.factory.IConstantFactory; |
| | | import com.sinata.core.common.exception.BizExceptionEnum; |
| | | import com.sinata.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.sinata.core.common.constant.factory; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.sinata.core.common.constant.cache.Cache; |
| | | import com.sinata.core.common.constant.cache.CacheKey; |
| | | import com.sinata.core.common.constant.state.ManagerStatus; |
| | | import com.sinata.core.common.constant.state.MenuStatus; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.core.support.StrKit; |
| | | import com.sinata.core.util.Convert; |
| | | import com.sinata.core.util.SpringContextHolder; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import com.sinata.modular.member.dao.MemUserMapper; |
| | | import com.sinata.modular.member.model.MemUser; |
| | | import com.sinata.modular.system.dao.*; |
| | | import com.sinata.modular.system.model.*; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.context.annotation.DependsOn; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 常量的生产工厂 |
| | | * |
| | | * @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); |
| | | private MemUserMapper merUserMapper = SpringContextHolder.getBean(MemUserMapper.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.getSimplename(); |
| | | } |
| | | return ""; |
| | | } |
| | | @Override |
| | | @Cacheable(value = Cache.CONSTANT, key = "'" + CacheKey.DEPT_NAME + "'+#deptId") |
| | | public String getDeptFullName(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) { |
| | | MemUser user = merUserMapper.selectById(userId); |
| | | if (user != null) { |
| | | return user.getNickName(); |
| | | } else { |
| | | return "--"; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.core.common.constant.factory; |
| | | |
| | | import com.sinata.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 getDeptFullName(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.sinata.core.common.constant.factory; |
| | | |
| | | import com.sinata.core.support.StrKit; |
| | | import com.sinata.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.sinata.core.common.constant.factory; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.common.constant.state.Order; |
| | | import com.sinata.core.support.HttpKit; |
| | | import com.sinata.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; |
| | | } |
| | | } |
| | | |
| | | public Page<T> defaultPage(int limit, int offset) { |
| | | Page<T> page = new Page<>((offset / limit + 1), limit); |
| | | page.setOpenSort(false); |
| | | return page; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.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.sinata.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.sinata.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.sinata.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.sinata.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.sinata.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.sinata.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.sinata.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.sinata.core.common.exception; |
| | | |
| | | import com.sinata.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.sinata.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.sinata.core.intercept; |
| | | |
| | | import com.sinata.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(ServletRequest, ServletResponse) loginRequest} or |
| | | * if the current {@link #getSubject(ServletRequest, ServletResponse) subject} |
| | | * is not <code>null</code>, <code>false</code> otherwise. |
| | | * |
| | | * @return <code>true</code> if the request is a |
| | | * {@link #isLoginRequest(ServletRequest, ServletResponse) loginRequest} or |
| | | * if the current {@link #getSubject(ServletRequest, 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(ServletRequest, 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.sinata.core.intercept; |
| | | |
| | | import com.sinata.core.base.tips.ErrorTip; |
| | | import com.sinata.core.common.constant.JwtConstants; |
| | | import com.sinata.core.common.exception.BizExceptionEnum; |
| | | import com.sinata.core.util.JwtTokenUtil; |
| | | import com.sinata.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.sinata.core.intercept; |
| | | |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.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.sinata.*..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.sinata.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.sinata.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.sinata.core.log; |
| | | |
| | | import com.sinata.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.sinata.core.log.factory; |
| | | |
| | | import com.sinata.core.common.constant.state.LogSucceed; |
| | | import com.sinata.core.common.constant.state.LogType; |
| | | import com.sinata.modular.system.model.LoginLog; |
| | | import com.sinata.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, String ipAddress) { |
| | | 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); |
| | | operationLog.setIpAddress(ipAddress); |
| | | 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.sinata.core.log.factory; |
| | | |
| | | import com.sinata.core.common.constant.state.LogSucceed; |
| | | import com.sinata.core.common.constant.state.LogType; |
| | | import com.sinata.core.db.Db; |
| | | import com.sinata.core.log.LogManager; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import com.sinata.modular.system.dao.LoginLogMapper; |
| | | import com.sinata.modular.system.dao.OperationLogMapper; |
| | | import com.sinata.modular.system.model.LoginLog; |
| | | import com.sinata.modular.system.model.OperationLog; |
| | | 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, final String ipAddress) { |
| | | return new TimerTask() { |
| | | @Override |
| | | public void run() { |
| | | OperationLog operationLog = LogFactory.createOperationLog( |
| | | LogType.BUSSINESS, userId, bussinessName, clazzName, methodName, msg, LogSucceed.SUCCESS, ipAddress); |
| | | try { |
| | | operationLogMapper.insert(operationLog); |
| | | } catch (Exception e) { |
| | | logger.error("创建业务日志异常!", e); |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | |
| | | public static TimerTask exceptionLog(final Integer userId, final String ipAddress, 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, ipAddress); |
| | | try { |
| | | operationLogMapper.insert(operationLog); |
| | | } catch (Exception e) { |
| | | logger.error("创建异常日志异常!", e); |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.core.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class AlipayNotifyParam implements Serializable { |
| | | private String appId; |
| | | private String tradeNo; // 支付宝交易凭证号 |
| | | private String outTradeNo; // 原支付请求的商户订单号 |
| | | private String outBizNo; // 商户业务ID,主要是退款通知中返回退款申请的流水号 |
| | | private String buyerId; // 买家支付宝账号对应的支付宝唯一用户号。以2088开头的纯16位数字 |
| | | private String buyerLogonId; // 买家支付宝账号 |
| | | private String sellerId; // 卖家支付宝用户号 |
| | | private String sellerEmail; // 卖家支付宝账号 |
| | | private String tradeStatus; // 交易目前所处的状态,见交易状态说明 |
| | | private BigDecimal totalAmount; // 本次交易支付的订单金额 |
| | | private BigDecimal receiptAmount; // 商家在交易中实际收到的款项 |
| | | private BigDecimal buyerPayAmount; // 用户在交易中支付的金额 |
| | | private BigDecimal refundFee; // 退款通知中,返回总退款金额,单位为元,支持两位小数 |
| | | private String subject; // 商品的标题/交易标题/订单标题/订单关键字等 |
| | | private String body; // 该订单的备注、描述、明细等。对应请求时的body参数,原样通知回来 |
| | | private Date gmtCreate; // 该笔交易创建的时间。格式为yyyy-MM-dd HH:mm:ss |
| | | private Date gmtPayment; // 该笔交易的买家付款时间。格式为yyyy-MM-dd HH:mm:ss |
| | | private Date gmtRefund; // 该笔交易的退款时间。格式为yyyy-MM-dd HH:mm:ss.S |
| | | private Date gmtClose; // 该笔交易结束时间。格式为yyyy-MM-dd HH:mm:ss |
| | | private String fundBillList; // 支付成功的各个渠道金额信息,array |
| | | private String passbackParams; // 公共回传参数,如果请求时传递了该参数,则返回给商户时会在异步通知时将该参数原样返回。 |
| | | |
| | | public boolean isSuccess() { |
| | | return "TRADE_SUCCESS".equals(tradeStatus) || "TRADE_FINISHED".equals(tradeStatus); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.core.model; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * 订单支付 |
| | | */ |
| | | @ApiModel(value = "订单支付") |
| | | public class AppPayModel implements Serializable { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @ApiModelProperty(value = "AppId") |
| | | private String appId; |
| | | |
| | | @ApiModelProperty(value = "随机字符串(32位)") |
| | | private String nonceStr; |
| | | |
| | | @ApiModelProperty(value = "扩展字段package(暂填写固定值Sign=WXPay)") |
| | | private String packageStr; |
| | | |
| | | @ApiModelProperty(value = "商户号") |
| | | private String partnerId; |
| | | |
| | | @ApiModelProperty(value = "预支付编号(微信返回的支付交易会话ID)") |
| | | private String prepayId; |
| | | |
| | | @ApiModelProperty(value = "时间戳") |
| | | private String timeStamp; |
| | | |
| | | @ApiModelProperty(value = "根据API给的签名规则进行签名") |
| | | private String sign; |
| | | |
| | | @ApiModelProperty(value = "code_url") |
| | | private String codeUrl; |
| | | |
| | | @ApiModelProperty(value = "支付宝实体信息") |
| | | private String orderInfo; |
| | | |
| | | public BigDecimal getPayMoney() { |
| | | return payMoney; |
| | | } |
| | | |
| | | public void setPayMoney(BigDecimal payMoney) { |
| | | this.payMoney = payMoney; |
| | | } |
| | | |
| | | public String getAppId() { |
| | | return appId; |
| | | } |
| | | |
| | | public void setAppId(String appId) { |
| | | this.appId = appId; |
| | | } |
| | | |
| | | public String getNonceStr() { |
| | | return nonceStr; |
| | | } |
| | | |
| | | public void setNonceStr(String nonceStr) { |
| | | this.nonceStr = nonceStr; |
| | | } |
| | | |
| | | public String getPackageStr() { |
| | | return packageStr; |
| | | } |
| | | |
| | | public void setPackageStr(String packageStr) { |
| | | this.packageStr = packageStr; |
| | | } |
| | | |
| | | public String getPartnerId() { |
| | | return partnerId; |
| | | } |
| | | |
| | | public void setPartnerId(String partnerId) { |
| | | this.partnerId = partnerId; |
| | | } |
| | | |
| | | public String getPrepayId() { |
| | | return prepayId; |
| | | } |
| | | |
| | | public void setPrepayId(String prepayId) { |
| | | this.prepayId = prepayId; |
| | | } |
| | | |
| | | public String getTimeStamp() { |
| | | return timeStamp; |
| | | } |
| | | |
| | | public void setTimeStamp(String timeStamp) { |
| | | this.timeStamp = timeStamp; |
| | | } |
| | | |
| | | public String getSign() { |
| | | return sign; |
| | | } |
| | | |
| | | public void setSign(String sign) { |
| | | this.sign = sign; |
| | | } |
| | | |
| | | public String getCodeUrl() { |
| | | return codeUrl; |
| | | } |
| | | |
| | | public void setCodeUrl(String codeUrl) { |
| | | this.codeUrl = codeUrl; |
| | | } |
| | | |
| | | public String getOrderInfo() { |
| | | return orderInfo; |
| | | } |
| | | |
| | | public void setOrderInfo(String orderInfo) { |
| | | this.orderInfo = orderInfo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.core.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 微信配置 |
| | | * |
| | | * @author: KingKong |
| | | * @create: 2019-01-03 18:23 |
| | | **/ |
| | | |
| | | @Data |
| | | public class WxPay { |
| | | /** |
| | | * 支付类型:1小程序 |
| | | */ |
| | | private String payType; |
| | | private String appId; |
| | | private String mchId; |
| | | private String body; |
| | | private String openId; |
| | | /** |
| | | * 订单号 |
| | | */ |
| | | private String outTradeNo; |
| | | /** |
| | | * 支付金额,微信(分) |
| | | */ |
| | | private String totalFee; |
| | | private String notifyUrl; |
| | | private String key; |
| | | /** |
| | | * 三方交易号 |
| | | */ |
| | | private String transactionId; |
| | | /** |
| | | * 退款金额,微信(分) |
| | | */ |
| | | private String refundFee; |
| | | /** |
| | | * 退款订单号 |
| | | */ |
| | | private String outRefundNo; |
| | | |
| | | public WxPay() { |
| | | } |
| | | |
| | | /** |
| | | * 小程序支付 |
| | | * |
| | | * @param payType |
| | | * @param appId |
| | | * @param mchId |
| | | * @param body |
| | | * @param openId |
| | | * @param outTradeNo |
| | | * @param totalFee |
| | | * @param notifyUrl |
| | | * @param key |
| | | */ |
| | | public WxPay(String payType, String appId, String mchId, String body, String openId, String outTradeNo, String totalFee, String notifyUrl, String key) { |
| | | this.payType = payType; |
| | | this.appId = appId; |
| | | this.mchId = mchId; |
| | | this.body = body; |
| | | this.openId = openId; |
| | | this.outTradeNo = outTradeNo; |
| | | this.totalFee = totalFee; |
| | | this.notifyUrl = notifyUrl; |
| | | this.key = key; |
| | | } |
| | | |
| | | /** |
| | | * 小程序退款 |
| | | * |
| | | * @param appId |
| | | * @param mchId |
| | | * @param outTradeNo |
| | | * @param totalFee |
| | | * @param transactionId |
| | | * @param refundFee |
| | | * @param outRefundNo |
| | | */ |
| | | public WxPay(String appId, String mchId, String outTradeNo, String totalFee, String transactionId, String refundFee, String outRefundNo, String key) { |
| | | this.appId = appId; |
| | | this.mchId = mchId; |
| | | this.outTradeNo = outTradeNo; |
| | | this.totalFee = totalFee; |
| | | this.transactionId = transactionId; |
| | | this.refundFee = refundFee; |
| | | this.outRefundNo = outRefundNo; |
| | | this.key = key; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.core.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class WxPayResult { |
| | | |
| | | private boolean isSuccess; |
| | | |
| | | private String transactionId; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.core.model; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class WxSignVO { |
| | | |
| | | @ApiModelProperty("appId-公众号id") |
| | | private String appId; |
| | | |
| | | @ApiModelProperty("timeStamp-时间戳") |
| | | private String timeStamp; |
| | | |
| | | @ApiModelProperty("nonceStr-随机字符串") |
| | | private String nonceStr; |
| | | |
| | | @ApiModelProperty("package对应参数形如prepay_id=123456789") |
| | | private String prepayId; |
| | | |
| | | @ApiModelProperty("MD5-MD5") |
| | | private String signType = "MD5"; |
| | | |
| | | @ApiModelProperty("paySign-签名") |
| | | private String paySign; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.core.shiro; |
| | | |
| | | import com.sinata.core.shiro.ShiroKit; |
| | | import com.sinata.core.shiro.ShiroUser; |
| | | import com.sinata.core.shiro.factory.IShiro; |
| | | import com.sinata.core.shiro.factory.ShiroFactroy; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import com.sinata.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()); |
| | | com.sinata.core.shiro.ShiroUser shiroUser = shiroFactory.shiroUser(user); |
| | | return shiroFactory.info(shiroUser, user, super.getName()); |
| | | } |
| | | |
| | | /** |
| | | * 权限认证 |
| | | */ |
| | | @Override |
| | | protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { |
| | | IShiro shiroFactory = ShiroFactroy.me(); |
| | | com.sinata.core.shiro.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(com.sinata.core.shiro.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.sinata.core.shiro; |
| | | |
| | | import com.sinata.core.common.constant.Const; |
| | | import com.sinata.core.common.constant.factory.ConstantFactory; |
| | | import com.sinata.core.shiro.ShiroUser; |
| | | import com.sinata.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.sinata.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 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; |
| | | } |
| | | |
| | | } |
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.sinata.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.sinata.core.shiro.check; |
| | | |
| | | import com.sinata.core.listener.ConfigListener; |
| | | import com.sinata.core.shiro.ShiroKit; |
| | | import com.sinata.core.shiro.ShiroUser; |
| | | import com.sinata.core.shiro.check.ICheck; |
| | | import com.sinata.core.support.CollectionKit; |
| | | import com.sinata.core.support.HttpKit; |
| | | import com.sinata.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 com.sinata.core.shiro.check.ICheck { |
| | | |
| | | public static com.sinata.core.shiro.check.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.sinata.core.shiro.check; |
| | | |
| | | import com.sinata.core.shiro.check.ICheck; |
| | | import com.sinata.core.util.SpringContextHolder; |
| | | |
| | | /** |
| | | * 权限检查管理器(入口) |
| | | */ |
| | | public class PermissionCheckManager { |
| | | private final static PermissionCheckManager me = new PermissionCheckManager(); |
| | | |
| | | private com.sinata.core.shiro.check.ICheck defaultCheckFactory = SpringContextHolder.getBean(com.sinata.core.shiro.check.ICheck.class); |
| | | |
| | | public static PermissionCheckManager me() { |
| | | return me; |
| | | } |
| | | |
| | | private PermissionCheckManager() { |
| | | } |
| | | |
| | | public PermissionCheckManager(com.sinata.core.shiro.check.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.sinata.core.shiro.factory; |
| | | |
| | | import com.sinata.core.shiro.ShiroUser; |
| | | import com.sinata.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.sinata.core.shiro.factory; |
| | | |
| | | import com.sinata.core.common.constant.factory.ConstantFactory; |
| | | import com.sinata.core.common.constant.state.ManagerStatus; |
| | | import com.sinata.core.shiro.ShiroUser; |
| | | import com.sinata.core.shiro.factory.IShiro; |
| | | import com.sinata.core.util.Convert; |
| | | import com.sinata.core.util.SpringContextHolder; |
| | | import com.sinata.modular.system.dao.MenuMapper; |
| | | import com.sinata.modular.system.dao.UserMapper; |
| | | import com.sinata.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 com.sinata.core.shiro.factory.IShiro { |
| | | |
| | | @Autowired |
| | | private UserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private MenuMapper menuMapper; |
| | | |
| | | public static com.sinata.core.shiro.factory.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.sinata.core.tag; |
| | | |
| | | import com.sinata.core.common.exception.BizExceptionEnum; |
| | | import com.sinata.core.exception.GunsException; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import com.sinata.modular.system.model.Dict; |
| | | import com.sinata.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.sinata.core.util; |
| | | |
| | | import com.sinata.core.common.constant.Const; |
| | | import com.sinata.config.properties.GunsProperties; |
| | | import com.sinata.core.node.MenuNode; |
| | | import com.sinata.core.util.SpringContextHolder; |
| | | |
| | | 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.sinata.core.util; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.sinata.core.common.constant.dictmap.base.AbstractDictMap; |
| | | import com.sinata.core.common.constant.dictmap.factory.DictFieldWarpperFactory; |
| | | import com.sinata.core.support.StrKit; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | 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 |
| | | */ |
| | | @Slf4j |
| | | 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 = DateUtils2.getDay((Date) o1); |
| | | } |
| | | if (!o1.toString().equals(o2.toString())) { |
| | | if (i != 1) { |
| | | str += separator; |
| | | } |
| | | str += "字段名称" + field.getName() + ",旧值:" + o1 + ",新值:" + o2; |
| | | i++; |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("后台操作修改数据:" + JSON.toJSONString(pojo2)); |
| | | //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 = DateUtils2.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) { |
| | | log.info("后台操作修改数据:" + JSON.toJSONString(pojo2)); |
| | | //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 (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 = DateUtils2.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 { |
| | | 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.sinata.core.util; |
| | | |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.ParsePosition; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @ClassName DateUtil |
| | | * @Description 日期工具类 |
| | | */ |
| | | public class DateUtils { |
| | | |
| | | // 用来全局控制 上一周,本周,下一周的周数变化 |
| | | private int weeks = 0; |
| | | private int MaxDate;// 一月最大天数 |
| | | private int MaxYear;// 一年最大天数 |
| | | |
| | | // 设置所要取得的格式,需要时在这里设置格式即可 |
| | | public static final String StandardDate = "yyyy-MM-dd"; |
| | | public static final String MonthDay = "MM-dd"; |
| | | public static final String StandardYearMonthDate = "yyyy-MM"; |
| | | |
| | | public static final String StandardYearMonthStrDate = "yyyy年MM月"; |
| | | |
| | | public static final String StandardDay = "yyyy-MM"; |
| | | |
| | | public static final String StandardDateTime = "yyyy-MM-dd HH:mm:ss"; |
| | | |
| | | public static final String CompactDateTime = "yyyyMMddHHmmss"; |
| | | |
| | | private static final String StandardYear = "yyyy"; |
| | | |
| | | private static final String CompactDate = "yyyyMMdd"; |
| | | |
| | | private static String MonthDayTime = "MM月dd日 HH时mm分ss秒"; |
| | | |
| | | private static String yearMonthDay = "yyyy/MM/dd"; |
| | | |
| | | @SuppressWarnings("unused") |
| | | private static final String FileYearMonth = "yyyy/MM"; |
| | | |
| | | private static String patternYearMonthDay = "yyyy年MM月dd日"; |
| | | private static String patternDate = "yyyy-MM-dd"; |
| | | private static String patternDateTime = "yyyy-MM-dd HH:mm:ss"; |
| | | public static final String patternDateTimeNote = "yyyy-MM-dd HH:mm"; |
| | | public static final String patternDateTimeHhMm = "HH:mm"; |
| | | |
| | | // 取得系统当前时间 |
| | | public static Date getCurrentDate() { |
| | | return new Date(); |
| | | } |
| | | |
| | | // 根据指定格式将输出时间 |
| | | public static String getFdate(Date date, String style) { |
| | | SimpleDateFormat dFormat = new SimpleDateFormat(style); |
| | | if (date == null) |
| | | return null; |
| | | String datetime = dFormat.format(date); |
| | | return datetime; |
| | | } |
| | | |
| | | // 获取当天时间并按指定格式输出 |
| | | public static String getNowTime(String dateformat) { |
| | | Date now = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat(dateformat);// 可以方便地修改日期格式 |
| | | String formatNow = dateFormat.format(now); |
| | | return formatNow; |
| | | } |
| | | |
| | | // 取得系统当前时间并按yyyy-MM-dd格式化输出, |
| | | public static String getNowTime() { |
| | | SimpleDateFormat dFormat = new SimpleDateFormat(StandardDate); |
| | | String datetime = dFormat.format(getCurrentDate()); |
| | | return datetime; |
| | | } |
| | | |
| | | // 取得系统当前时间的年并按yyyy格式化输出, |
| | | public static String getYear() { |
| | | Date date = new Date(); |
| | | SimpleDateFormat dFormat = new SimpleDateFormat(StandardYear); |
| | | String dateYear = dFormat.format(date); |
| | | return dateYear; |
| | | } |
| | | |
| | | // 取得系统当前时间的年月并按yyyy-MM格式化输出, |
| | | public static String getYMonth() { |
| | | Date date = new Date(); |
| | | SimpleDateFormat dFormat = new SimpleDateFormat("yyyy-MM"); |
| | | String dateYM = dFormat.format(date); |
| | | return dateYM; |
| | | } |
| | | |
| | | // 将date类型转换为String类型 |
| | | public static String dateToString(Date date) { |
| | | String dateStr = ""; |
| | | if (date != null) { |
| | | SimpleDateFormat sf = new SimpleDateFormat(StandardDate); |
| | | dateStr = sf.format(date); |
| | | } |
| | | return dateStr; |
| | | } |
| | | |
| | | // 将date类型转换为自定义格式类型 |
| | | public static String dateToString(Date date, String formatter) { |
| | | String dateStr = ""; |
| | | if (date != null) { |
| | | SimpleDateFormat sf = new SimpleDateFormat(formatter); |
| | | dateStr = sf.format(date); |
| | | } |
| | | return dateStr; |
| | | } |
| | | |
| | | // 将String类型转换为日期类型 |
| | | public static Date stringToDate(String str, String style) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(); |
| | | sdf.applyPattern(style); |
| | | Date date = null; |
| | | try { |
| | | date = sdf.parse(str); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return date; |
| | | } |
| | | |
| | | /** |
| | | * 获取 给定时间的 本周所有时间 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public static List<String> getWeekList(String date) { |
| | | // log.info("date value is"+date); |
| | | List<String> strings = new ArrayList<>(); |
| | | Calendar c = Calendar.getInstance(); |
| | | c.setTime(strToDate(date)); |
| | | switch (c.get(Calendar.DAY_OF_WEEK)) { |
| | | case 1: |
| | | strings.add(dateToString(increaseDay(c.getTime(), -6))); |
| | | case 7: |
| | | strings.add(dateToString(increaseDay(c.getTime(), -5))); |
| | | case 6: |
| | | strings.add(dateToString(increaseDay(c.getTime(), -4))); |
| | | case 5: |
| | | strings.add(dateToString(increaseDay(c.getTime(), -3))); |
| | | case 4: |
| | | strings.add(dateToString(increaseDay(c.getTime(), -2))); |
| | | case 3: |
| | | strings.add(dateToString(increaseDay(c.getTime(), -1))); |
| | | case 2: |
| | | strings.add(dateToString(c.getTime())); |
| | | } |
| | | strings.sort(new Comparator<String>() { |
| | | @Override |
| | | public int compare(String o1, String o2) { |
| | | return (DateUtils.strToDate(o2).getTime() < DateUtils.strToDate(o1).getTime()) ? -1 : 1; |
| | | } |
| | | }); |
| | | return strings; |
| | | } |
| | | |
| | | //将String类型转换为日期类型 |
| | | public static Date stringToDateForException(String str, String style) throws Exception { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(); |
| | | sdf.applyPattern(style); |
| | | Date date = null; |
| | | if (str == null) { |
| | | return null; |
| | | } |
| | | date = sdf.parse(str); |
| | | return date; |
| | | } |
| | | |
| | | // 根据Private提供的StandarYear返回所需要的格式SimpleDateFormat |
| | | private static SimpleDateFormat getStandardYearFormat() { |
| | | return getDateTimeFormat(StandardYear); |
| | | } |
| | | |
| | | /** |
| | | * 根据参数中定义的日期格式来转换 |
| | | * |
| | | * @param pattern |
| | | * @return SimpleDateFormat |
| | | */ |
| | | private static SimpleDateFormat getDateTimeFormat(String pattern) { |
| | | SimpleDateFormat sf = new SimpleDateFormat(pattern); |
| | | return sf; |
| | | } |
| | | |
| | | // 返回系统所需时间 |
| | | public static String getCurrentYear() { |
| | | SimpleDateFormat sf = getStandardYearFormat(); |
| | | return sf.format(getCurrentDate()); |
| | | } |
| | | |
| | | /** |
| | | * 得到二个日期间的间隔天数 |
| | | */ |
| | | public static String getTwoDay(String day1, String day2) { |
| | | SimpleDateFormat myFormatter = new SimpleDateFormat(StandardDate); |
| | | long day = 0; |
| | | try { |
| | | Date date = myFormatter.parse(day1); |
| | | Date mydate = myFormatter.parse(day2); |
| | | day = (date.getTime() - mydate.getTime()) / (24 * 60 * 60 * 1000); |
| | | } catch (Exception e) { |
| | | return ""; |
| | | } |
| | | return day + ""; |
| | | } |
| | | |
| | | /** |
| | | * 根据一个日期,返回是星期几的字符串 |
| | | * |
| | | * @param sdate |
| | | * @return |
| | | */ |
| | | public static String getWeek(String sdate) { |
| | | // 再转换为时间 |
| | | Date date = DateUtils.strToDate(sdate); |
| | | Calendar c = Calendar.getInstance(); |
| | | c.setTime(date); |
| | | // int hour=c.get(Calendar.DAY_OF_WEEK); |
| | | // hour中存的就是星期几了,其范围 1~7 |
| | | // 1=星期日 7=星期六,其他类推 |
| | | return new SimpleDateFormat("EEEE").format(c.getTime()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 重构 -- 根据一个时间 返回是 星期几 字符串 ( 上面方法 在不同的服务器系统 返回的是 不同的格式) |
| | | * |
| | | * @param date |
| | | * @return String |
| | | * @auth chenlaichun |
| | | */ |
| | | public static String getWeek(Date date) { |
| | | // 再转换为时间 |
| | | Calendar c = Calendar.getInstance(); |
| | | c.setTime(date); |
| | | // 1=星期日 7=星期六,其他类推 |
| | | switch (c.get(Calendar.DAY_OF_WEEK)) { |
| | | case 1: |
| | | return "星期日"; |
| | | case 7: |
| | | return "星期六"; |
| | | case 6: |
| | | return "星期五"; |
| | | case 5: |
| | | return "星期四"; |
| | | case 4: |
| | | return "星期三"; |
| | | case 3: |
| | | return "星期二"; |
| | | case 2: |
| | | return "星期一"; |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * 将短时间格式字符串转换为时间 yyyy-MM-dd |
| | | * |
| | | * @param strDate |
| | | * @return |
| | | */ |
| | | public static Date strToDate(String strDate) { |
| | | SimpleDateFormat formatter = new SimpleDateFormat(StandardDate); |
| | | ParsePosition pos = new ParsePosition(0); |
| | | Date strtodate = formatter.parse(strDate, pos); |
| | | return strtodate; |
| | | } |
| | | |
| | | /** |
| | | * 将短时间格式字符串转换为时间 yyyy-MM |
| | | * |
| | | * @param strDate |
| | | * @return |
| | | */ |
| | | public static Date strToDate(String strDate, String formater) { |
| | | SimpleDateFormat formatter = new SimpleDateFormat(formater); |
| | | ParsePosition pos = new ParsePosition(0); |
| | | Date strtodate = formatter.parse(strDate, pos); |
| | | return strtodate; |
| | | } |
| | | |
| | | /* |
| | | * 给一个date 和 时间格式 返回一个特定格式的date 如:得到一个yyyy-MM-dd格式date 需要传入date 和 "yyyy-MM-dd"字符串 |
| | | * */ |
| | | public static Date getDateByDateAndStrDate(Date date, String strStyle) { |
| | | return DateUtils.stringToDate(DateUtils.getFdate(date, strStyle), strStyle); |
| | | } |
| | | |
| | | /** |
| | | * 两个时间之间的天数 |
| | | * |
| | | * @param date1 |
| | | * @param date2 |
| | | * @return |
| | | */ |
| | | public static long getDays(String date1, String date2) { |
| | | if (date1 == null || date1.equals("")) |
| | | return 0; |
| | | if (date2 == null || date2.equals("")) |
| | | return 0; |
| | | // 转换为标准时间 |
| | | SimpleDateFormat myFormatter = new SimpleDateFormat(StandardDate); |
| | | Date date = null; |
| | | Date mydate = null; |
| | | try { |
| | | date = myFormatter.parse(date1); |
| | | mydate = myFormatter.parse(date2); |
| | | } catch (Exception e) { |
| | | } |
| | | long day = (date.getTime() - mydate.getTime()) / (24 * 60 * 60 * 1000); |
| | | return day; |
| | | } |
| | | |
| | | // 计算当月最后一天,返回字符串 |
| | | public String getDefaultDay() { |
| | | String str = ""; |
| | | SimpleDateFormat sdf = new SimpleDateFormat(StandardDate); |
| | | |
| | | Calendar lastDate = Calendar.getInstance(); |
| | | lastDate.set(Calendar.DATE, 1);// 设为当前月的1号 |
| | | lastDate.add(Calendar.MONTH, 1);// 加一个月,变为下月的1号 |
| | | lastDate.add(Calendar.DATE, -1);// 减去一天,变为当月最后一天 |
| | | |
| | | str = sdf.format(lastDate.getTime()); |
| | | return str; |
| | | } |
| | | |
| | | // 上月第一天 |
| | | public String getPreviousMonthFirst() { |
| | | String str = ""; |
| | | SimpleDateFormat sdf = new SimpleDateFormat(StandardDate); |
| | | |
| | | Calendar lastDate = Calendar.getInstance(); |
| | | lastDate.set(Calendar.DATE, 1);// 设为当前月的1号 |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月,变为下月的1号 |
| | | // lastDate.add(Calendar.DATE,-1);//减去一天,变为当月最后一天 |
| | | |
| | | str = sdf.format(lastDate.getTime()); |
| | | return str; |
| | | } |
| | | |
| | | // 获取当月第一天 |
| | | public String getFirstDayOfMonth() { |
| | | String str = ""; |
| | | SimpleDateFormat sdf = new SimpleDateFormat(StandardDate); |
| | | |
| | | Calendar lastDate = Calendar.getInstance(); |
| | | lastDate.set(Calendar.DATE, 1);// 设为当前月的1号 |
| | | str = sdf.format(lastDate.getTime()); |
| | | return str; |
| | | } |
| | | |
| | | /** |
| | | * @return Date |
| | | * @Title: getFirstDayOfMonthForDate |
| | | * @Description: 获取当前月的第一天 |
| | | * @author guohongjin |
| | | * @date 2016-12-22 |
| | | */ |
| | | |
| | | public static Date getFirstDayOfMonthForDate() { |
| | | Calendar firstDate = Calendar.getInstance(); |
| | | firstDate.set(Calendar.DATE, 1);// 设为当前月的1号 |
| | | return firstDate.getTime(); |
| | | } |
| | | |
| | | // 获得本周星期日的日期 |
| | | public String getCurrentWeekday() { |
| | | weeks = 0; |
| | | int mondayPlus = this.getMondayPlus(); |
| | | GregorianCalendar currentDate = new GregorianCalendar(); |
| | | currentDate.add(GregorianCalendar.DATE, mondayPlus + 6); |
| | | Date monday = currentDate.getTime(); |
| | | return getFdate(monday, StandardDate); |
| | | } |
| | | |
| | | // 获得当前日期与本周日相差的天数 |
| | | private int getMondayPlus() { |
| | | Calendar cd = Calendar.getInstance(); |
| | | // 获得今天是一周的第几天,星期日是第一天,星期二是第二天...... |
| | | int dayOfWeek = cd.get(Calendar.DAY_OF_WEEK) - 1; // 因为按中国礼拜一作为第一天所以这里减1 |
| | | if (dayOfWeek == 1) { |
| | | return 0; |
| | | } else { |
| | | return 1 - dayOfWeek; |
| | | } |
| | | } |
| | | |
| | | private static int getMondayPlus(Date date, int days) { |
| | | Calendar cd = Calendar.getInstance(); |
| | | cd.setTime(date); |
| | | // 获得今天是一周的第几天,星期日是第一天,星期二是第二天...... |
| | | int dayOfWeek = cd.get(Calendar.DAY_OF_WEEK); |
| | | //系统中默认 周末为一周的第一天 如果是周末的话 就设置当前为 7 |
| | | if (dayOfWeek == 1) { |
| | | dayOfWeek = 7; |
| | | } else { |
| | | dayOfWeek = dayOfWeek - 1; |
| | | } |
| | | return days - dayOfWeek; |
| | | } |
| | | |
| | | // 获得本周一的日期 |
| | | public String getMondayOFWeek() { |
| | | weeks = 0; |
| | | int mondayPlus = this.getMondayPlus(); |
| | | GregorianCalendar currentDate = new GregorianCalendar(); |
| | | currentDate.add(GregorianCalendar.DATE, mondayPlus); |
| | | Date monday = currentDate.getTime(); |
| | | return getFdate(monday, StandardDate); |
| | | } |
| | | |
| | | /** |
| | | * 根据传入的日期 获取本周指定周几的 日期 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public static Date getMonthDayOfWeek(Date date, int days) { |
| | | GregorianCalendar currentDate = new GregorianCalendar(); |
| | | currentDate.setTime(date); |
| | | currentDate.add(GregorianCalendar.DATE, getMondayPlus(date, days)); |
| | | return currentDate.getTime(); |
| | | } |
| | | |
| | | // 获得相应周的周六的日期 |
| | | public String getSaturday() { |
| | | int mondayPlus = this.getMondayPlus(); |
| | | GregorianCalendar currentDate = new GregorianCalendar(); |
| | | currentDate.add(GregorianCalendar.DATE, mondayPlus + 7 * weeks + 6); |
| | | Date monday = currentDate.getTime(); |
| | | DateFormat df = DateFormat.getDateInstance(); |
| | | String preMonday = df.format(monday); |
| | | return preMonday; |
| | | } |
| | | |
| | | // 获得上周星期日的日期 |
| | | public String getPreviousWeekSunday() { |
| | | weeks = 0; |
| | | weeks--; |
| | | int mondayPlus = this.getMondayPlus(); |
| | | GregorianCalendar currentDate = new GregorianCalendar(); |
| | | currentDate.add(GregorianCalendar.DATE, mondayPlus + weeks); |
| | | Date monday = currentDate.getTime(); |
| | | DateFormat df = DateFormat.getDateInstance(); |
| | | String preMonday = df.format(monday); |
| | | return preMonday; |
| | | } |
| | | |
| | | // 获得上周星期一的日期 |
| | | public String getPreviousWeekday() { |
| | | weeks--; |
| | | int mondayPlus = this.getMondayPlus(); |
| | | GregorianCalendar currentDate = new GregorianCalendar(); |
| | | currentDate.add(GregorianCalendar.DATE, mondayPlus + 7 * weeks); |
| | | Date monday = currentDate.getTime(); |
| | | DateFormat df = DateFormat.getDateInstance(); |
| | | String preMonday = df.format(monday); |
| | | return preMonday; |
| | | } |
| | | |
| | | // 获得下周星期一的日期 |
| | | public String getNextMonday() { |
| | | weeks++; |
| | | int mondayPlus = this.getMondayPlus(); |
| | | GregorianCalendar currentDate = new GregorianCalendar(); |
| | | currentDate.add(GregorianCalendar.DATE, mondayPlus + 7); |
| | | Date monday = currentDate.getTime(); |
| | | DateFormat df = DateFormat.getDateInstance(); |
| | | String preMonday = df.format(monday); |
| | | return preMonday; |
| | | } |
| | | |
| | | // 获得下周星期日的日期 |
| | | public String getNextSunday() { |
| | | |
| | | int mondayPlus = this.getMondayPlus(); |
| | | GregorianCalendar currentDate = new GregorianCalendar(); |
| | | currentDate.add(GregorianCalendar.DATE, mondayPlus + 7 + 6); |
| | | Date monday = currentDate.getTime(); |
| | | DateFormat df = DateFormat.getDateInstance(); |
| | | String preMonday = df.format(monday); |
| | | return preMonday; |
| | | } |
| | | |
| | | // 获得上一周周日的日期 注:周六周日需要减一天 因为外国人周日是每周的第一天 |
| | | public static String getNextSundayByDate(Date date) { |
| | | Calendar cd = Calendar.getInstance(); |
| | | cd.setTime(date); |
| | | int dayWeek = cd.get(Calendar.DAY_OF_WEEK);//获得当前日期是一个星期的第几天 |
| | | if (1 == dayWeek) { |
| | | cd.add(Calendar.DAY_OF_MONTH, -1); |
| | | } |
| | | cd.setFirstDayOfWeek(Calendar.MONDAY);//设置一个星期的第一天 |
| | | int day = cd.get(Calendar.DAY_OF_WEEK);//获得当前日期是一个星期的第几天 |
| | | cd.add(Calendar.DATE, cd.getFirstDayOfWeek() - day + 6);//根据日历的规则,给当前日期减去星期几与一个星期第一天的差值 |
| | | return dateToString(cd.getTime()); |
| | | } |
| | | |
| | | @SuppressWarnings("unused") |
| | | private int getMonthPlus() { |
| | | Calendar cd = Calendar.getInstance(); |
| | | int monthOfNumber = cd.get(Calendar.DAY_OF_MONTH); |
| | | cd.set(Calendar.DATE, 1);// 把日期设置为当月第一天 |
| | | cd.roll(Calendar.DATE, -1);// 日期回滚一天,也就是最后一天 |
| | | MaxDate = cd.get(Calendar.DATE); |
| | | if (monthOfNumber == 1) { |
| | | return -MaxDate; |
| | | } else { |
| | | return 1 - monthOfNumber; |
| | | } |
| | | } |
| | | |
| | | // 获得上月最后一天的日期 |
| | | public String getPreviousMonthEnd() { |
| | | String str = ""; |
| | | SimpleDateFormat sdf = new SimpleDateFormat(StandardDate); |
| | | |
| | | Calendar lastDate = Calendar.getInstance(); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | lastDate.set(Calendar.DATE, 1);// 把日期设置为当月第一天 |
| | | lastDate.roll(Calendar.DATE, -1);// 日期回滚一天,也就是本月最后一天 |
| | | str = sdf.format(lastDate.getTime()); |
| | | return str; |
| | | } |
| | | |
| | | // 获得下个月第一天的日期 |
| | | public String getNextMonthFirst() { |
| | | String str = ""; |
| | | SimpleDateFormat sdf = new SimpleDateFormat(StandardDate); |
| | | |
| | | Calendar lastDate = Calendar.getInstance(); |
| | | lastDate.add(Calendar.MONTH, 1);// 减一个月 |
| | | lastDate.set(Calendar.DATE, 1);// 把日期设置为当月第一天 |
| | | str = sdf.format(lastDate.getTime()); |
| | | return str; |
| | | } |
| | | |
| | | // 获得下个月最后一天的日期 |
| | | public String getNextMonthEnd() { |
| | | String str = ""; |
| | | SimpleDateFormat sdf = new SimpleDateFormat(StandardDate); |
| | | |
| | | Calendar lastDate = Calendar.getInstance(); |
| | | lastDate.add(Calendar.MONTH, 1);// 加一个月 |
| | | lastDate.set(Calendar.DATE, 1);// 把日期设置为当月第一天 |
| | | lastDate.roll(Calendar.DATE, -1);// 日期回滚一天,也就是本月最后一天 |
| | | str = sdf.format(lastDate.getTime()); |
| | | return str; |
| | | } |
| | | |
| | | // 获得明年最后一天的日期 |
| | | public String getNextYearEnd() { |
| | | String str = ""; |
| | | SimpleDateFormat sdf = new SimpleDateFormat(StandardDate); |
| | | |
| | | Calendar lastDate = Calendar.getInstance(); |
| | | lastDate.add(Calendar.YEAR, 1);// 加一个年 |
| | | lastDate.set(Calendar.DAY_OF_YEAR, 1); |
| | | lastDate.roll(Calendar.DAY_OF_YEAR, -1); |
| | | str = sdf.format(lastDate.getTime()); |
| | | return str; |
| | | } |
| | | |
| | | // 获得明年第一天的日期 |
| | | public String getNextYearFirst() { |
| | | String str = ""; |
| | | SimpleDateFormat sdf = new SimpleDateFormat(StandardDate); |
| | | |
| | | Calendar lastDate = Calendar.getInstance(); |
| | | lastDate.add(Calendar.YEAR, 1);// 加一个年 |
| | | lastDate.set(Calendar.DAY_OF_YEAR, 1); |
| | | str = sdf.format(lastDate.getTime()); |
| | | return str; |
| | | |
| | | } |
| | | |
| | | // 获得本年有多少天 |
| | | @SuppressWarnings("unused") |
| | | private int getMaxYear() { |
| | | Calendar cd = Calendar.getInstance(); |
| | | cd.set(Calendar.DAY_OF_YEAR, 1);// 把日期设为当年第一天 |
| | | cd.roll(Calendar.DAY_OF_YEAR, -1);// 把日期回滚一天。 |
| | | int MaxYear = cd.get(Calendar.DAY_OF_YEAR); |
| | | return MaxYear; |
| | | } |
| | | |
| | | private int getYearPlus() { |
| | | Calendar cd = Calendar.getInstance(); |
| | | int yearOfNumber = cd.get(Calendar.DAY_OF_YEAR);// 获得当天是一年中的第几天 |
| | | cd.set(Calendar.DAY_OF_YEAR, 1);// 把日期设为当年第一天 |
| | | cd.roll(Calendar.DAY_OF_YEAR, -1);// 把日期回滚一天。 |
| | | int MaxYear = cd.get(Calendar.DAY_OF_YEAR); |
| | | if (yearOfNumber == 1) { |
| | | return -MaxYear; |
| | | } else { |
| | | return 1 - yearOfNumber; |
| | | } |
| | | } |
| | | |
| | | // 获得本年第一天的日期 |
| | | public String getCurrentYearFirst() { |
| | | int yearPlus = this.getYearPlus(); |
| | | GregorianCalendar currentDate = new GregorianCalendar(); |
| | | currentDate.add(GregorianCalendar.DATE, yearPlus); |
| | | Date yearDay = currentDate.getTime(); |
| | | DateFormat df = DateFormat.getDateInstance(); |
| | | String preYearDay = df.format(yearDay); |
| | | return preYearDay; |
| | | } |
| | | |
| | | // 获得本年最后一天的日期 * |
| | | public String getCurrentYearEnd() { |
| | | Date date = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat(StandardYear);// 可以方便地修改日期格式 |
| | | String years = dateFormat.format(date); |
| | | return years + "-12-31"; |
| | | } |
| | | |
| | | // 获得上年第一天的日期 * |
| | | public String getPreviousYearFirst() { |
| | | Date date = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat(StandardYear);// 可以方便地修改日期格式 |
| | | String years = dateFormat.format(date); |
| | | int years_value = Integer.parseInt(years); |
| | | years_value--; |
| | | return years_value + "-1-1"; |
| | | } |
| | | |
| | | // 获得上年最后一天的日期 |
| | | public String getPreviousYearEnd() { |
| | | weeks--; |
| | | int yearPlus = this.getYearPlus(); |
| | | GregorianCalendar currentDate = new GregorianCalendar(); |
| | | currentDate.add(GregorianCalendar.DATE, yearPlus + MaxYear * weeks |
| | | + (MaxYear - 1)); |
| | | Date yearDay = currentDate.getTime(); |
| | | DateFormat df = DateFormat.getDateInstance(); |
| | | String preYearDay = df.format(yearDay); |
| | | this.getThisSeasonTime(11); |
| | | return preYearDay; |
| | | } |
| | | |
| | | // 获得本季度 |
| | | public static String getThisSeasonTime(int month) { |
| | | int array[][] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}}; |
| | | int season = 1; |
| | | if (month >= 1 && month <= 3) { |
| | | season = 1; |
| | | } |
| | | if (month >= 4 && month <= 6) { |
| | | season = 2; |
| | | } |
| | | if (month >= 7 && month <= 9) { |
| | | season = 3; |
| | | } |
| | | if (month >= 10 && month <= 12) { |
| | | season = 4; |
| | | } |
| | | int start_month = array[season - 1][0]; |
| | | int end_month = array[season - 1][2]; |
| | | |
| | | Date date = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat(StandardYear);// 可以方便地修改日期格式 |
| | | String years = dateFormat.format(date); |
| | | int years_value = Integer.parseInt(years); |
| | | |
| | | int start_days = 1;// years+"-"+String.valueOf(start_month)+"-1";//getLastDayOfMonth(years_value,start_month); |
| | | int end_days = getLastDayOfMonth(years_value, end_month); |
| | | String seasonDate = years_value + "-" + start_month + "-" + start_days + " 00:00:00" |
| | | + "," + years_value + "-" + end_month + "-" + end_days + " 23:59:59"; |
| | | return seasonDate; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取某年某月的最后一天 |
| | | * |
| | | * @param year 年 |
| | | * @param month 月 |
| | | * @return 最后一天 |
| | | */ |
| | | private static int getLastDayOfMonth(int year, int month) { |
| | | if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 |
| | | || month == 10 || month == 12) { |
| | | return 31; |
| | | } |
| | | if (month == 4 || month == 6 || month == 9 || month == 11) { |
| | | return 30; |
| | | } |
| | | if (month == 2) { |
| | | if (isLeapYear(year)) { |
| | | return 29; |
| | | } else { |
| | | return 28; |
| | | } |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | /** |
| | | * 是否闰年 |
| | | * |
| | | * @param year 年 |
| | | * @return |
| | | */ |
| | | public static boolean isLeapYear(int year) { |
| | | return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0); |
| | | } |
| | | |
| | | /** |
| | | * 计算日期为星期几 |
| | | * |
| | | * @param date |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public static int currentDateOfweek(Date date) throws Exception { |
| | | Calendar c = Calendar.getInstance(); |
| | | c.setTime(date); |
| | | int dayForWeek = 0; |
| | | if (c.get(Calendar.DAY_OF_WEEK) == 1) { |
| | | dayForWeek = 7; |
| | | } else { |
| | | dayForWeek = c.get(Calendar.DAY_OF_WEEK) - 1; |
| | | } |
| | | return dayForWeek; |
| | | } |
| | | |
| | | /** |
| | | * 计算两个日期之间相差多少周,包括起始日期,比如起始日期在周六 ,那么这两天一算一周,结束日期在周一,那么这一天也算一周 |
| | | * |
| | | * @param startDate |
| | | * @param endDate |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public static int getTotalweeks(Date startDate, Date endDate) |
| | | throws Exception { |
| | | long start = startDate.getTime(); |
| | | long end = endDate.getTime(); |
| | | int startend = (int) ((end - start) / (1000 * 60 * 60 * 24) + 1); |
| | | startend = startend - (7 - currentDateOfweek(startDate)) - 1; |
| | | if ((7 - currentDateOfweek(endDate)) != 0) { |
| | | startend = startend - currentDateOfweek(endDate); |
| | | } |
| | | int w = startend / 7 + 1; |
| | | if ((7 - currentDateOfweek(endDate)) != 0) { |
| | | w = w + 1; |
| | | } |
| | | return w; |
| | | } |
| | | |
| | | /** |
| | | * 根据开始日期计算当前日期是当前年或者当前学期的第几周 |
| | | * |
| | | * @param beginDate 开始日期 |
| | | * @param currentDate 当前日期 |
| | | * @return 周次 |
| | | */ |
| | | public static Integer getTermWeek(Date beginDate, Date currentDate) { |
| | | if (beginDate == null || currentDate == null) { |
| | | return -1; |
| | | } |
| | | long currentMills = currentDate.getTime(); |
| | | long termweekMills = beginDate.getTime(); |
| | | if (currentMills < termweekMills) { |
| | | return -1; |
| | | } |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(beginDate); |
| | | int dayofWeek = calendar.get(Calendar.DAY_OF_WEEK); |
| | | // 计算出天数 |
| | | float countday = (currentMills - termweekMills) / (1000 * 60 * 60 * 24) |
| | | - (7 - dayofWeek); |
| | | int countweek = (int) (countday / 7) + 1; |
| | | int modcountweek = ((int) countday) % 7; |
| | | if (modcountweek != 0) { |
| | | countweek += 1; |
| | | } |
| | | if (countweek < 1) { |
| | | countweek = 0; |
| | | } |
| | | return countweek; |
| | | } |
| | | |
| | | /** |
| | | * 得到date的月份天数 |
| | | * |
| | | * @param date |
| | | * @return |
| | | * @desc |
| | | */ |
| | | public static int getMonthDays(Date date) { |
| | | Calendar time = Calendar.getInstance(); |
| | | time.clear(); |
| | | time.setTime(date); |
| | | int day = time.getActualMaximum(Calendar.DAY_OF_MONTH);// 本月份的天数 |
| | | return day; |
| | | } |
| | | |
| | | /** |
| | | * 得到将date增加指定天数后的date |
| | | * |
| | | * @param date 日期 |
| | | * @param intBetween 增加的天数 |
| | | * @return date 加上intBetween天数后的日期 |
| | | */ |
| | | public static Date increaseDay(Date date, int intBetween) { |
| | | Calendar calo = Calendar.getInstance(); |
| | | calo.setTime(date); |
| | | calo.add(Calendar.DATE, intBetween); |
| | | return calo.getTime(); |
| | | // return addDays(date, intBetween); |
| | | } |
| | | |
| | | /** |
| | | * 得到将date增加指定月数后的date |
| | | * |
| | | * @param date 日期 |
| | | * @param intBetween 增加的月份 |
| | | * @return date 加上intBetween月数后的日期 |
| | | */ |
| | | public static Date increaseMonth(Date date, int intBetween) { |
| | | Calendar calo = Calendar.getInstance(); |
| | | calo.setTime(date); |
| | | calo.add(Calendar.MONTH, intBetween); |
| | | return calo.getTime(); |
| | | // return addMonths(date, intBetween); |
| | | } |
| | | |
| | | /** |
| | | * 得到将date增加指定年数后的date |
| | | * |
| | | * @param date 日期 |
| | | * @param intBetween 增加的年数 |
| | | * @return date加上intBetween年数后的日期 |
| | | */ |
| | | public static Date increaseYear(Date date, int intBetween) { |
| | | Calendar calo = Calendar.getInstance(); |
| | | calo.setTime(date); |
| | | calo.add(Calendar.YEAR, intBetween); |
| | | return calo.getTime(); |
| | | // return addYears(date, intBetween); |
| | | } |
| | | |
| | | /** |
| | | * 得到将date增加指定小时数后的date |
| | | * |
| | | * @param date 日期 |
| | | * @param intBetween 增加的小时数 |
| | | * @return date 加上intBetween小时数后的日期 |
| | | */ |
| | | public static Date increaseHours(Date date, int intBetween) { |
| | | Calendar calo = Calendar.getInstance(); |
| | | calo.setTime(date); |
| | | calo.add(Calendar.HOUR, intBetween); |
| | | return calo.getTime(); |
| | | // return addHours(date, intBetween); |
| | | } |
| | | |
| | | public static Date addYears(Date date, int amount) { |
| | | return add(date, 1, amount); |
| | | } |
| | | |
| | | public static Date addMonths(Date date, int amount) { |
| | | return add(date, 2, amount); |
| | | } |
| | | |
| | | public static Date addWeeks(Date date, int amount) { |
| | | return add(date, 3, amount); |
| | | } |
| | | |
| | | public static Date addDays(Date date, int amount) { |
| | | return add(date, 5, amount); |
| | | } |
| | | |
| | | public static Date addHours(Date date, int amount) { |
| | | return add(date, 11, amount); |
| | | } |
| | | |
| | | public static Date addMinutes(Date date, int amount) { |
| | | return add(date, 12, amount); |
| | | } |
| | | |
| | | public static Date addSeconds(Date date, int amount) { |
| | | return add(date, 13, amount); |
| | | } |
| | | |
| | | public static Date addMilliseconds(Date date, int amount) { |
| | | return add(date, 14, amount); |
| | | } |
| | | |
| | | public static Date add(Date date, int calendarField, int amount) { |
| | | if (date == null) |
| | | throw new IllegalArgumentException("The date must not be null"); |
| | | |
| | | Calendar c = Calendar.getInstance(); |
| | | c.setTime(date); |
| | | c.add(calendarField, amount); |
| | | return c.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * 判断一个日期是否在两个日期之间 |
| | | * |
| | | * @param startDate 开始日期 |
| | | * @param endDate 结束日期 |
| | | * @param date 指定日期 |
| | | * @return |
| | | * @author 滕辉 |
| | | */ |
| | | public static boolean between(Date startDate, Date endDate, Date date) { |
| | | if (date == null) { |
| | | return false; |
| | | } else if (startDate == null && endDate == null) { |
| | | return true; |
| | | } else if (startDate != null && startDate.getTime() <= date.getTime() |
| | | && endDate == null) { |
| | | return true; |
| | | } else if (endDate != null && endDate.getTime() >= date.getTime() |
| | | && startDate == null) { |
| | | return true; |
| | | } else if (startDate != null && endDate != null |
| | | && startDate.getTime() <= date.getTime() |
| | | && endDate.getTime() >= date.getTime()) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取当前日期是星期几的文字描述 |
| | | * |
| | | * @return |
| | | * @author cui |
| | | * @date Jun 26, 2009 |
| | | */ |
| | | public static String getWeekText() { |
| | | String txt = "星期"; |
| | | int weekday; |
| | | Calendar tmp = Calendar.getInstance(); |
| | | weekday = tmp.get(Calendar.DAY_OF_WEEK) - 1; |
| | | switch (weekday) { |
| | | case 1: |
| | | txt += "一"; |
| | | break; |
| | | case 2: |
| | | txt += "二"; |
| | | break; |
| | | case 3: |
| | | txt += "三"; |
| | | break; |
| | | case 4: |
| | | txt += "四"; |
| | | break; |
| | | case 5: |
| | | txt += "五"; |
| | | break; |
| | | case 6: |
| | | txt += "六"; |
| | | break; |
| | | case 0: |
| | | txt += "日"; |
| | | break; |
| | | } |
| | | return txt; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @return List<String> |
| | | * @Title: getCurrentYearAndBeforeTen |
| | | * @Description: 获取当前年及前十年 |
| | | */ |
| | | public static List<String> getCurrentYearAndBeforeTen() { |
| | | List<String> dataList = new ArrayList<String>(); |
| | | Calendar tmp = Calendar.getInstance(); |
| | | int year = tmp.get(Calendar.YEAR); //获取年 |
| | | for (int y = year; y > (year - 10); y--) { |
| | | dataList.add(y + ""); |
| | | } |
| | | return dataList; |
| | | } |
| | | // @SuppressWarnings("static-access") |
| | | // public static void main(String[] args) { |
| | | // |
| | | // DateUtils du = new DateUtils(); |
| | | // String dt = du.getNowTime(); |
| | | // System.out.println(dt); |
| | | // String dd = du.getCurrentYear(); |
| | | // System.out.println(dd); |
| | | // |
| | | // String df = du.getFdate(new Date(), CompactDate); |
| | | // System.out.println(df); |
| | | // System.out.println("============"); |
| | | // String dts = du.dateToString(new Date()); |
| | | // System.out.println(dts); |
| | | // String s = "20100101"; |
| | | // Date d = du.stringToDate(s, CompactDate); |
| | | // System.out.println(d); |
| | | // DateUtils tt = new DateUtils(); |
| | | // System.out.println("获取当天日期:" + tt.getNowTime(StandardDate)); |
| | | // System.out.println("获取本周一日期:" + tt.getMondayOFWeek()); |
| | | // System.out.println("获取本周日的日期~:" + tt.getCurrentWeekday()); |
| | | // System.out.println("获取上周一日期:" + tt.getPreviousWeekday()); |
| | | // System.out.println("获取上周日日期:" + tt.getPreviousWeekSunday()); |
| | | // System.out.println("获取下周一日期:" + tt.getNextMonday()); |
| | | // System.out.println("获取下周日日期:" + tt.getNextSunday()); |
| | | // System.out.println("获得相应周的周六的日期:" + tt.getNowTime(StandardDate)); |
| | | // System.out.println("获取本月第一天日期:" + tt.getFirstDayOfMonth()); |
| | | // System.out.println("获取本月最后一天日期:" + tt.getDefaultDay()); |
| | | // System.out.println("获取上月第一天日期:" + tt.getPreviousMonthFirst()); |
| | | // System.out.println("获取上月最后一天的日期:" + tt.getPreviousMonthEnd()); |
| | | // System.out.println("获取下月第一天日期:" + tt.getNextMonthFirst()); |
| | | // System.out.println("获取下月最后一天日期:" + tt.getNextMonthEnd()); |
| | | // System.out.println("获取本年的第一天日期:" + tt.getCurrentYearFirst()); |
| | | // System.out.println("获取本年最后一天日期:" + tt.getCurrentYearEnd()); |
| | | // System.out.println("获取去年的第一天日期:" + tt.getPreviousYearFirst()); |
| | | // System.out.println("获取去年的最后一天日期:" + tt.getPreviousYearEnd()); |
| | | // System.out.println("获取明年第一天日期:" + tt.getNextYearFirst()); |
| | | // System.out.println("获取明年最后一天日期:" + tt.getNextYearEnd()); |
| | | // DateUtils dateUtils = new DateUtils(); |
| | | // System.out.println("获取本季度第一天到最后一天:" + DateUtils.getThisSeasonTime(6)); |
| | | // System.out.println("获取两个日期之间间隔天数2008-12-1~2008-9-29:" |
| | | // + DateUtils.getTwoDay("2008-12-1", "2008-9-29")); |
| | | // System.out.println(du.getFdate(increaseDay(new Date(), 200), |
| | | // CompactDate)); |
| | | // System.out.println(getWeekText()); |
| | | // List<String> currentYearAndBeforeTen = DateUtils.getCurrentYearAndBeforeTen(); |
| | | // System.out.println(currentYearAndBeforeTen); |
| | | // System.out.println(getOldYearMonth()); |
| | | // } |
| | | |
| | | /** |
| | | * @param date 时间 |
| | | * @param hour 需要比较两个时间相差的小时数 |
| | | * @return boolean |
| | | * @Title: isLessThanHour |
| | | * @Description:判断某一时间与当前时间相差小时数是否小于hour |
| | | * @author ransheng |
| | | */ |
| | | public static boolean isLessThanHour(Date date, int hour) { |
| | | long millisecond = new Date().getTime() - date.getTime(); |
| | | return millisecond < (1000 * 60 * 60 * hour) ? true : false; |
| | | } |
| | | |
| | | /** |
| | | * @param beginDate 开始时间 |
| | | * @param endDate 结束时间 |
| | | * @return int |
| | | * @Title: getBetweenDateByHour |
| | | * @Description: 获取两个时间相差多少天零多少小时 |
| | | */ |
| | | public static String getBetweenDateByHour(Date beginDate, Date endDate) { |
| | | //开始时间 |
| | | long begDateLong = beginDate.getTime(); |
| | | //结束时间+一天的毫秒数 |
| | | long endDateLong = endDate.getTime() + 86399000; |
| | | long hour = (endDateLong - begDateLong) / (1000 * 60 * 60); |
| | | long dayNum = hour / 24; |
| | | long hourNum = hour % 24; |
| | | //判断天数是否为0 |
| | | if (dayNum >= 0l && hourNum >= 0l) { |
| | | if (dayNum == 0l) { |
| | | if (hourNum == 0l) { |
| | | return "<font style='color:red;'>时间已过</font>"; |
| | | } else { |
| | | return "<font style='color:red;'>仅剩下" + hourNum + "个小时</font>"; |
| | | } |
| | | } else { |
| | | if (hourNum == 0l) { |
| | | return "还有" + dayNum + "天"; |
| | | } else { |
| | | return "还有" + dayNum + "天" + hourNum + "个小时"; |
| | | } |
| | | } |
| | | } else { |
| | | return "<font style='color:red;'>时间已过</font>"; |
| | | } |
| | | |
| | | } |
| | | |
| | | ; |
| | | |
| | | /** |
| | | * @param beginDate 开始时间 |
| | | * @param endDate 结束时间 |
| | | * @return Double |
| | | * @Title: getBetweenDateByHourReturnDouble |
| | | * @Description: 获取两个时间相差多少天零多少小时 |
| | | */ |
| | | public static Double getBetweenDateByHourReturnDouble(Date beginDate, Date endDate) { |
| | | //开始时间 |
| | | long begDateLong = beginDate.getTime(); |
| | | //结束时间+一天的毫秒数 |
| | | long endDateLong = endDate.getTime() + 86399000; |
| | | long hour = (endDateLong - begDateLong) / (1000 * 60 * 60); |
| | | |
| | | //计算两个时间相差的天数 |
| | | return (hour * 1.00) / 24; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取时间的年份 |
| | | */ |
| | | public static int getYearByTime(Date date) { |
| | | Calendar lastDate = Calendar.getInstance(); |
| | | lastDate.setTime(date); |
| | | return lastDate.get(Calendar.YEAR); |
| | | } |
| | | |
| | | /** |
| | | * @param year 年 2014 |
| | | * @param montch 月 5,12 |
| | | * @param day 日 1,10,20 |
| | | * @return Date |
| | | * @Title: getTimeByYmd |
| | | * @Description: 根据年月日生成日期 |
| | | */ |
| | | public static Date getTimeByYmd(int year, int montch, int day) { |
| | | String date_Str = "" + year; |
| | | if (montch < 10) { |
| | | date_Str = date_Str + "-0" + montch; |
| | | } else { |
| | | date_Str = date_Str + "-" + montch; |
| | | } |
| | | if (day < 10) { |
| | | date_Str = date_Str + "-0" + day; |
| | | } else { |
| | | date_Str = date_Str + "-" + day; |
| | | } |
| | | //初始化一个时间 |
| | | Date date = new Date(); |
| | | try { |
| | | date = DateUtils.parseDate(date_Str); |
| | | } catch (ParseException e) { |
| | | |
| | | e.printStackTrace(); |
| | | } |
| | | return date; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取当前时间的日期yyyy-MM-dd |
| | | * |
| | | * @return |
| | | * @throws ParseException |
| | | * @Title: getNowDate |
| | | * @Description: 方法描述 |
| | | */ |
| | | public static Date getNowDate() throws ParseException { |
| | | Date now = new Date(); |
| | | String time = formatDate(now); |
| | | return parseDate(time); |
| | | } |
| | | |
| | | /** |
| | | * @param date 指定日期 |
| | | * @param few 指定相距多少个月,可以为正数or负数,0表示当月月份 |
| | | * @param day 指定月份中的天数 |
| | | * @param flag 日期格式标志,1表示2015-05-25 00:00:00.0;0表示2015-05-25 59:59:59.0格式 |
| | | * @return Date 格式为:yyyy-MM-(月份最后一天) |
| | | * @Title: getDateAfterFewMonth |
| | | * @Description: 获取距离指定日期+(-)n个月 |
| | | * @author LuoChao |
| | | * @Date 2015-05-12 |
| | | */ |
| | | public static Date getDateAfterFewMonth(Date date, Integer few, Integer day, int flag) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | if (null != few) |
| | | calendar.add(Calendar.MONTH, few); |
| | | if (null != day) |
| | | calendar.set(Calendar.DAY_OF_MONTH, day); |
| | | if (flag == 0) { |
| | | calendar.set(Calendar.HOUR_OF_DAY, 0); |
| | | calendar.set(Calendar.MINUTE, 0); |
| | | calendar.set(Calendar.SECOND, 0); |
| | | calendar.set(Calendar.MILLISECOND, 0); |
| | | } else { |
| | | calendar.set(Calendar.HOUR_OF_DAY, 23); |
| | | calendar.set(Calendar.MINUTE, 59); |
| | | calendar.set(Calendar.SECOND, 59); |
| | | calendar.set(Calendar.MILLISECOND, 59); |
| | | } |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | |
| | | public static Date parseDate(String date) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(patternDate); |
| | | return sdf.parse(date); |
| | | } |
| | | |
| | | public static Date parseDateTime(String dateTime) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(patternDateTime); |
| | | return sdf.parse(dateTime); |
| | | } |
| | | |
| | | public static String formatDate(Date date) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(patternDate); |
| | | return sdf.format(date); |
| | | } |
| | | |
| | | public static String formatStrDate(Date date) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(patternYearMonthDay); |
| | | return sdf.format(date); |
| | | } |
| | | |
| | | public static String formatStrMonthDayTime(Date date) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(MonthDayTime); |
| | | return sdf.format(date); |
| | | } |
| | | |
| | | public static String formatStryearMonthDay(Date date) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(yearMonthDay); |
| | | return sdf.format(date); |
| | | } |
| | | |
| | | public static String formatYearAndMonthStrDate(Date date) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(StandardDay); |
| | | return sdf.format(date); |
| | | } |
| | | |
| | | public static String formatYearMonthStrDate(Date date) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(StandardYearMonthStrDate); |
| | | return sdf.format(date); |
| | | } |
| | | |
| | | public static String formatYearMonthDate(Date date) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(StandardYearMonthDate); |
| | | return sdf.format(date); |
| | | } |
| | | |
| | | public static String formatDateTime(Date date) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(patternDateTime); |
| | | return sdf.format(date); |
| | | } |
| | | |
| | | public static Date parseDateTimeNote(String dateTime) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(patternDateTimeNote); |
| | | return sdf.parse(dateTime); |
| | | } |
| | | |
| | | public static String formatDateTimeNote(Date date) throws ParseException { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(patternDateTimeNote); |
| | | return sdf.format(date); |
| | | } |
| | | |
| | | /** |
| | | * @param startDate 开始时间 |
| | | * @param endDate 结束时间 |
| | | * @return long |
| | | * @Title: getDaysByDate |
| | | * @Description: 获取两个时间类型的天数差 |
| | | * @author guohongjin |
| | | * @date 2015-08-13 |
| | | * @throw ParseException |
| | | */ |
| | | |
| | | public static long getDaysByDate(Date startDate, Date endDate) throws ParseException { |
| | | long day = (endDate.getTime() - startDate.getTime()) / (24 * 60 * 60 * 1000); |
| | | return day; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param startDate 开始时间 |
| | | * @param endDate 结束时间 |
| | | * @return Double |
| | | * @Title: getDaysByDateTime |
| | | * @Description: 获取两个时间类型的天数差 |
| | | * @author chenlaichun |
| | | * @date 2015-08-13 |
| | | */ |
| | | |
| | | public static Double getDaysByDateTime(Date startDate, Date endDate) { |
| | | Double day = ((double) (endDate.getTime() - startDate.getTime())) / (24 * 60 * 60 * 1000); |
| | | |
| | | return day; |
| | | } |
| | | |
| | | /** |
| | | * @Title: getMonthByDate |
| | | * @Description: 获取时间的月份 |
| | | * @author guohongjin |
| | | * @date 2015-08-14 |
| | | * @throw ParseException |
| | | */ |
| | | |
| | | public static int getMonthByDate(Date date) throws ParseException { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | return calendar.get(Calendar.MONTH) + 1; |
| | | } |
| | | |
| | | /** |
| | | * @Title: getDayByDate |
| | | * @Description: 获取指定时间的天数 |
| | | * @author guohongjin |
| | | * @date 2015-08-14 |
| | | * @throw ParseException |
| | | */ |
| | | |
| | | public static int getDayByDate(Date date) throws ParseException { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | return calendar.get(Calendar.DATE); |
| | | } |
| | | |
| | | /** |
| | | * 返回指定日期的月的最后一天 |
| | | * |
| | | * @param date |
| | | * @return Date |
| | | */ |
| | | public static Date getLastDayOfMonth(Date date) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.set(calendar.get(Calendar.YEAR), |
| | | calendar.get(Calendar.MONTH), 1); |
| | | calendar.roll(Calendar.DATE, -1); |
| | | calendar.set(Calendar.HOUR_OF_DAY, 23); |
| | | calendar.set(Calendar.MINUTE, 59); |
| | | calendar.set(Calendar.SECOND, 59); |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * 返回当前日期 当天最后一秒 |
| | | * |
| | | * @param date |
| | | * @return Date |
| | | */ |
| | | public static String getLastNowDate(Date date) { |
| | | String nowDate = DateUtils.dateToString(date); |
| | | nowDate = nowDate + " 23:59:59"; |
| | | return nowDate; |
| | | } |
| | | |
| | | /** |
| | | * 获取当天开始时间 |
| | | */ |
| | | public static String getStartNowDate() { |
| | | String nowDate = DateUtils.dateToString(new Date()); |
| | | nowDate = nowDate + " 00:00:00"; |
| | | return nowDate; |
| | | } |
| | | |
| | | public static String getStartNowDate(Date date) { |
| | | String nowDate = DateUtils.dateToString(date); |
| | | nowDate = nowDate + " 00:00:00"; |
| | | return nowDate; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取当天结束时间 |
| | | */ |
| | | public static String getLastNowDate() { |
| | | String nowDate = DateUtils.dateToString(new Date()); |
| | | nowDate = nowDate + " 23:59:59"; |
| | | return nowDate; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 返回指定年月的月的最后一天 |
| | | * |
| | | * @param year |
| | | * @param month |
| | | * @return Date |
| | | */ |
| | | public static Date getLastDayOfMonth(Integer year, Integer month) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | if (year == null) { |
| | | year = calendar.get(Calendar.YEAR); |
| | | } |
| | | if (month == null) { |
| | | month = calendar.get(Calendar.MONTH); |
| | | } |
| | | calendar.set(year, month, 1); |
| | | calendar.add(Calendar.MONTH, -1); |
| | | calendar.roll(Calendar.DATE, -1); |
| | | calendar.set(Calendar.HOUR_OF_DAY, 23); |
| | | calendar.set(Calendar.MINUTE, 59); |
| | | calendar.set(Calendar.SECOND, 59); |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * 返回指定日期的月的第一天 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public static Date getFirstDayOfMonth(Date date) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.set(calendar.get(Calendar.YEAR), |
| | | calendar.get(Calendar.MONTH), 1); |
| | | calendar.set(Calendar.HOUR_OF_DAY, 0); |
| | | calendar.set(Calendar.MINUTE, 0); |
| | | calendar.set(Calendar.SECOND, 0); |
| | | calendar.set(Calendar.MILLISECOND, 0); |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * 返回指定年月的月的第一天 |
| | | * |
| | | * @param year |
| | | * @param month |
| | | * @return |
| | | */ |
| | | public static Date getFirstDayOfMonth(Integer year, Integer month) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | if (year == null) { |
| | | year = calendar.get(Calendar.YEAR); |
| | | } |
| | | if (month == null) { |
| | | month = calendar.get(Calendar.MONTH); |
| | | } |
| | | calendar.set(year, month, 1); |
| | | calendar.add(Calendar.MONTH, -1); |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * 根据传入的 Date 和 日期 获取对应的时间 |
| | | * |
| | | * @param date |
| | | * @param day |
| | | * @return |
| | | */ |
| | | public static Date getDateByDateAndDay(Date date, Integer day) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | if (Objects.nonNull(date)) |
| | | calendar.setTime(date); |
| | | if (Objects.isNull(day)) |
| | | day = calendar.DATE; |
| | | calendar.set(Calendar.DATE, day); |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * @Title: getHours |
| | | * @Description: 获取指定时间离当前时间差多少小时 |
| | | * @author guohongjin |
| | | * @date 2016-06-07 |
| | | */ |
| | | |
| | | public static long getHours(Date date) { |
| | | long currentDate = new Date().getTime(); |
| | | long d = date.getTime(); |
| | | return (currentDate - d) / (3600 * 1000); |
| | | } |
| | | |
| | | |
| | | /* 一个日期的后几天的时间, 如:传入一个date 和 int 得到这个date 的后几天 如果int是负数,那么是后几天 |
| | | * @param date 日期 |
| | | * @param date日期的前n天的日期 |
| | | * */ |
| | | public static Date getDateAfterDays(Date date, Integer days) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.add(Calendar.DATE, days); |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * 返回指定日期的上个月的最后一天 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public static Date getLastDayOfLastMonth(Date date) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) - 1, 1); |
| | | calendar.roll(Calendar.DATE, -1); |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * 返回指定日期的上个月的第一天 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public static Date getFirstDayOfLastMonth(Date date) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) - 1, 1); |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * 返回指定日期的下个月的第一天 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public static Date getFirstDayOfNextMonth(Date date) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1, 1); |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * 返回指定日期的下个月的最后一天 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public static Date getLastDayOfNextMonth(Date date) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1, 1); |
| | | calendar.roll(Calendar.DATE, -1); |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * 返回指定日期的下个月的最后一天 |
| | | * |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public static Date getDayOfNextMonth(Date date) { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1, 1); |
| | | calendar.roll(Calendar.DATE, -1); |
| | | return calendar.getTime(); |
| | | } |
| | | |
| | | /** |
| | | * @param ssNumber 毫秒大小 |
| | | * @return String |
| | | * @Title: getDateStringByNumberSs |
| | | * @Description: 根据毫秒大小计算xx天xx小时xx分钟 |
| | | * @author guohongjin |
| | | * @date 2015-12-15 |
| | | * @throw YnCorpSysException |
| | | */ |
| | | |
| | | public static String getDateStringByNumberSs(Long ssNumber) { |
| | | |
| | | long minutiue = ssNumber / (1000 * 60); |
| | | //分钟余额 |
| | | long minutiueNum = minutiue % 60; |
| | | //小时 |
| | | long hour = (ssNumber) / (1000 * 60 * 60); |
| | | //天数 |
| | | long dayNum = hour / 24; |
| | | //小时余额 |
| | | long hourNum = hour % 24; |
| | | //判断天数是否为0 |
| | | |
| | | if (dayNum == 0l) { |
| | | if (hourNum == 0l) { |
| | | return minutiueNum + "分钟"; |
| | | } else { |
| | | return hourNum + "小时" + minutiueNum + "分钟"; |
| | | } |
| | | } else { |
| | | if (hourNum == 0l && minutiueNum == 0l) { |
| | | return dayNum + "天"; |
| | | } else { |
| | | if (minutiueNum == 0l) { |
| | | return dayNum + "天" + hourNum + "小时"; |
| | | } else { |
| | | return dayNum + "天" + hourNum + "小时" + minutiueNum + "分钟"; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // /** |
| | | // * @Title: getLastDateByTime |
| | | // * @Description: 获取指定时间 |
| | | // * @param date 时间对象 |
| | | // * @return int |
| | | // */ |
| | | // public static int getLastDateByTime(Date date){ |
| | | //// String str = ""; |
| | | // SimpleDateFormat sdf = new SimpleDateFormat(StandardDate); |
| | | // Calendar lastDate = Calendar.getInstance(); |
| | | // lastDate.setTimeInMillis(date.getTime()); |
| | | // //lastDate.set(Calendar.YEAR, date.getYear()); |
| | | // lastDate.set(Calendar.DATE, 1);// 设为当前月的1号 |
| | | // //lastDate.set(Calendar.MONTH, date.getMonth());// 加一个月,变为下月的1号 |
| | | // lastDate.add(Calendar.DATE, -1);// 减去一天,变为当月最后一天 |
| | | // System.out.println(sdf.format(lastDate.getTime())); |
| | | // return lastDate.getTime().getDate(); |
| | | // |
| | | // } |
| | | // public static void main(String[] args) throws ParseException { |
| | | // try { |
| | | //// Date begDate= DateUtils.stringToDateForException("2014-06-04 00:00:00", DateUtils.StandardDateTime); |
| | | //// Date endDate= DateUtils.stringToDateForException("2014-05-06 23:00:59", DateUtils.StandardDateTime); |
| | | ////// System.out.print(patternDateTimeHhMm); |
| | | ////// Date date=DateUtils.parseDateTimeNote("2014-05-06 02:12"); |
| | | ////// System.out.println(DateUtils.getFdate(date,patternDateTimeHhMm)); |
| | | //// long days=DateUtils.getDaysByDate(begDate,endDate); |
| | | //// System.out.println(days); |
| | | // Date date=new Date(); |
| | | // Calendar calendar=Calendar.getInstance(); |
| | | // calendar.setTime(date); |
| | | // calendar.getLeastMaximum(Calendar.MONTH); |
| | | // calendar.getActualMaximum(Calendar.MONDAY); |
| | | // System.out.print(calendar.get(Calendar.DATE)+"PPP"+calendar.getActualMaximum(Calendar.MONDAY)); |
| | | // } catch (Exception e) { |
| | | // // TODO Auto-generated catch block |
| | | // e.printStackTrace(); |
| | | // } |
| | | // |
| | | // } |
| | | |
| | | // public static void main2(String[] args) { |
| | | // System.out.println(DateUtils.getDateStringByNumberSs(10000000l)); |
| | | // } |
| | | |
| | | |
| | | public static List<Date> getDateRange(Date start, Date end) { |
| | | List<Date> list = new ArrayList<Date>(); |
| | | Calendar calendarStart = Calendar.getInstance(); |
| | | calendarStart.setTime(start); |
| | | Calendar calendarEnd = Calendar.getInstance(); |
| | | calendarEnd.setTime(end); |
| | | getDateList(calendarStart, calendarEnd, list); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 递归获取时间范围集合 |
| | | * |
| | | * @param calendarStart |
| | | * @param calendarEnd |
| | | * @param list |
| | | */ |
| | | private static void getDateList(Calendar calendarStart, Calendar calendarEnd, List<Date> list) { |
| | | if (calendarEnd.compareTo(calendarStart) >= 0) { |
| | | list.add(calendarEnd.getTime()); |
| | | calendarEnd.add(Calendar.MONTH, -1);//月份减1 |
| | | getDateList(calendarStart, calendarEnd, list); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 计算开始和结束日期在一个查询时间范围内交集有多少天 |
| | | * |
| | | * @param begin |
| | | * @param end |
| | | * @param beginSel |
| | | * @param endSel |
| | | * @return |
| | | * @author yangyuan |
| | | * @date 2016-04-20 |
| | | */ |
| | | public static int findDateCommonDay(Date begin, Date end, Date beginSel, Date endSel) { |
| | | int days = 0; |
| | | try { |
| | | begin = DateUtils.parseDate(DateUtils.formatDate(begin)); |
| | | end = DateUtils.parseDate(DateUtils.formatDate(end)); |
| | | beginSel = DateUtils.parseDate(DateUtils.formatDate(beginSel)); |
| | | endSel = DateUtils.parseDate(DateUtils.formatDate(endSel)); |
| | | long dd = 0l; |
| | | //只有四种情况才能产生交集,分别计算如下: |
| | | if (!beginSel.after(begin) && !end.after(endSel)) { |
| | | //开始时间和结束时间都在查询时间范围内 |
| | | dd = (end.getTime() - begin.getTime()) / (24 * 60 * 60 * 1000); |
| | | } else if ((!beginSel.after(begin) && !begin.after(endSel) && !endSel.after(end))) { |
| | | //开始时间在查询时间范围内,结束时间大于查询结束时间 |
| | | dd = ((endSel.getTime() - begin.getTime())) / (24 * 60 * 60 * 1000); |
| | | } else if (!begin.after(beginSel) && !beginSel.after(end) && !end.after(endSel)) { |
| | | //开始时间小于查询开始时间,结束时间在查询时间范围内 |
| | | dd = ((end.getTime() - beginSel.getTime())) / (24 * 60 * 60 * 1000); |
| | | } else if (!begin.after(beginSel) && !endSel.after(end)) { |
| | | //开始时间和结束时间包含了查询时间范围 |
| | | dd = ((endSel.getTime() - beginSel.getTime())) / (24 * 60 * 60 * 1000); |
| | | } |
| | | days = (int) dd; |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return days; |
| | | } |
| | | |
| | | /** |
| | | * @Title: getMinutes |
| | | * @Description: 获取指定时间离当前时间差多少分钟 |
| | | * @author guohongjin |
| | | * @date 2016-06-07 |
| | | */ |
| | | |
| | | public static long getMinutes(Date date) { |
| | | long currentDate = new Date().getTime(); |
| | | long d = date.getTime(); |
| | | return (currentDate - d) / (60 * 1000); |
| | | } |
| | | |
| | | public static int getHoursByDate(Date date) throws ParseException { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | return calendar.get(Calendar.HOUR_OF_DAY); |
| | | } |
| | | |
| | | public static int getMinutesByDate(Date date) throws ParseException { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | return calendar.get(Calendar.MINUTE); |
| | | } |
| | | |
| | | public static int getSecondByDate(Date date) throws ParseException { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(date); |
| | | return calendar.get(Calendar.SECOND); |
| | | } |
| | | |
| | | |
| | | // public static void main(String[] arg){ |
| | | // String showDate="2016-12-19"; |
| | | //// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | //// Date date = DateUtils.strToDate(showDate); |
| | | //// showDate = sdf.format |
| | | //// Date daa |
| | | // |
| | | // System.out.println(DateUtils.getWeekList("2016-12-22").size()); |
| | | //// for(int i=0;i<3;i++){ |
| | | //// System.out.println(DateUtils.getNextSundayByDate(new Date())); |
| | | //// System.out.println("i____"+i+" size "+stringList.size()); |
| | | //// Date date = DateUtils.strToDate("2016-12-20"); |
| | | //// showDate = DateUtils.getNextSundayByDate(DateUtils.increaseDay(date,-1)); |
| | | //// } |
| | | // |
| | | // } |
| | | |
| | | /** |
| | | * 获取当前时间是第几周 |
| | | * |
| | | * @return 周次 |
| | | */ |
| | | public static Integer getYearWeek() { |
| | | Date date = new Date(); |
| | | SimpleDateFormat dFormat = new SimpleDateFormat(StandardYear); |
| | | String dateYear = dFormat.format(date); |
| | | Date beginDate = null; |
| | | Date endDate = new Date(); |
| | | try { |
| | | beginDate = DateUtils.parseDate(dateYear + "-01-01"); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | long endMills = endDate.getTime(); |
| | | long beginMills = beginDate.getTime(); |
| | | if (endMills < beginMills) { |
| | | return -1; |
| | | } |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(beginDate); |
| | | int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK); |
| | | // 计算出天数 |
| | | float countDay = (endMills - beginMills) / (1000 * 60 * 60 * 24) |
| | | - (7 - dayOfWeek); |
| | | int countWeek = (int) (countDay / 7) + 1; |
| | | int modcountWeek = ((int) countDay) % 7; |
| | | if (modcountWeek != 0) { |
| | | countWeek += 1; |
| | | } |
| | | if (countWeek < 1) { |
| | | countWeek = 0; |
| | | } |
| | | return countWeek; |
| | | } |
| | | |
| | | |
| | | // 过去1年的年份-月份list |
| | | public static List<String> getOldYearMonth() { |
| | | List<String> list = new ArrayList<String>(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat(StandardYearMonthDate); |
| | | Calendar lastDate = Calendar.getInstance(); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | String str1 = sdf.format(lastDate.getTime()); |
| | | list.add(str1); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | String str2 = sdf.format(lastDate.getTime()); |
| | | list.add(str2); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | String str3 = sdf.format(lastDate.getTime()); |
| | | list.add(str3); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | String str4 = sdf.format(lastDate.getTime()); |
| | | list.add(str4); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | String str5 = sdf.format(lastDate.getTime()); |
| | | list.add(str5); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | String str6 = sdf.format(lastDate.getTime()); |
| | | list.add(str6); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | String str7 = sdf.format(lastDate.getTime()); |
| | | list.add(str7); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | String str8 = sdf.format(lastDate.getTime()); |
| | | list.add(str8); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | String str9 = sdf.format(lastDate.getTime()); |
| | | list.add(str9); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | String str10 = sdf.format(lastDate.getTime()); |
| | | list.add(str10); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | String str11 = sdf.format(lastDate.getTime()); |
| | | list.add(str11); |
| | | lastDate.add(Calendar.MONTH, -1);// 减一个月 |
| | | String str12 = sdf.format(lastDate.getTime()); |
| | | list.add(str12); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | | * 根据日期判断日期所在的月份是否是闰月 |
| | | * |
| | | * @return |
| | | */ |
| | | public static Boolean isLeapMonth(Date date) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat(patternDate); |
| | | String[] dateArray = sdf.format(date).split("-"); |
| | | if (dateArray[1].equals("2") && ((Integer.valueOf(dateArray[0]) % 4 == 0 && Integer.valueOf(dateArray[0]) % 100 != 0) || (Integer.valueOf(dateArray[0]) % 400 == 0))) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 根据年判断是否是闰年 |
| | | * |
| | | * @return |
| | | */ |
| | | public static Boolean isLeapMonth(int year) { |
| | | if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * @param converDate 需要转换的日期 |
| | | * @Title: dateComplete |
| | | * @Description: 给指定时间加入当天最后时间 |
| | | * @author guohongjin |
| | | * @date 2017-04-13 |
| | | */ |
| | | |
| | | public static Date dateComplete(Date converDate) { |
| | | String dateStr = DateUtils.getFdate(converDate, patternDate); |
| | | dateStr = dateStr + " 23:59:59"; |
| | | return stringToDate(dateStr, StandardDateTime); |
| | | |
| | | } |
| | | |
| | | public static int compareDate(String DATE1, String DATE2, String format) { |
| | | |
| | | DateFormat df = new SimpleDateFormat(format); |
| | | try { |
| | | Date dt1 = df.parse(DATE1); |
| | | Date dt2 = df.parse(DATE2); |
| | | if (dt1.getTime() > dt2.getTime()) { |
| | | return 1; |
| | | } else if (dt1.getTime() < dt2.getTime()) { |
| | | return -1; |
| | | } else { |
| | | return 0; |
| | | } |
| | | } catch (Exception exception) { |
| | | exception.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | /*** |
| | | * 上周或下周的今日 |
| | | * @param date 日期 |
| | | * @param format 格式,默认为年月日 |
| | | * @param lastOrNext 0为上周,1为下周,默认为下周 |
| | | * @author xiaobowen |
| | | * @return |
| | | */ |
| | | public static String getLastOrNextWeek(Date date, String format, Byte lastOrNext) { |
| | | if (null == format) { |
| | | format = "yyyy-MM-dd"; |
| | | } |
| | | Calendar c = Calendar.getInstance(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat(format); |
| | | c.setTime(date); |
| | | if (lastOrNext == 0) { |
| | | c.add(Calendar.WEEK_OF_YEAR, -1); |
| | | } else { |
| | | c.add(Calendar.WEEK_OF_YEAR, +1); |
| | | } |
| | | return sdf.format(c.getTime()); |
| | | } |
| | | |
| | | |
| | | /*** |
| | | * 根据某日期 得到该日期一周的所有时间集合 |
| | | * @param date 日期 |
| | | * @param format 格式,默认为年月日 |
| | | * @author xiaobowen |
| | | * @return List<String> |
| | | */ |
| | | public static List<String> getAllWeekDayByDate(String date, String format) { |
| | | if (null == format) { |
| | | format = "yyyy-MM-dd"; |
| | | } |
| | | |
| | | List<Date> result = new ArrayList<Date>(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat(format); //设置时间格式 |
| | | List<String> strList = new ArrayList<>(); |
| | | Calendar cal = Calendar.getInstance(); |
| | | Date time = null; |
| | | try { |
| | | time = sdf.parse(date); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | cal.setTime(time); |
| | | |
| | | //判断要计算的日期是否是周日,如果是则减一天计算周六的,否则会出问题,计算到下一周去了 |
| | | int dayWeek = cal.get(Calendar.DAY_OF_WEEK);//获得当前日期是一个星期的第几天 |
| | | if (1 == dayWeek) { |
| | | cal.add(Calendar.DAY_OF_MONTH, -1); |
| | | } |
| | | //设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一 |
| | | cal.setFirstDayOfWeek(Calendar.MONDAY); |
| | | //获得当前日期是一个星期的第几天 |
| | | int day = cal.get(Calendar.DAY_OF_WEEK); |
| | | //根据日历的规则,给当前日期减去星期几与一个星期第一天的差值 |
| | | cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - day); |
| | | //获得周一的日期 |
| | | Calendar startDate = Calendar.getInstance(); |
| | | startDate.setTime(cal.getTime()); |
| | | //添加第一天进入数组 |
| | | strList.add(sdf.format(startDate.getTime())); |
| | | startDate.add(Calendar.DAY_OF_YEAR, 1); |
| | | //改变周一的值为周日 |
| | | cal.add(Calendar.DATE, 6); |
| | | //获得周日的日期 |
| | | Calendar endDate = Calendar.getInstance(); |
| | | endDate.setTime(cal.getTime()); |
| | | |
| | | while (startDate.before(endDate)) { |
| | | result.add(startDate.getTime()); |
| | | startDate.add(Calendar.DAY_OF_YEAR, 1); |
| | | } |
| | | |
| | | result.forEach(l -> { |
| | | strList.add(sdf.format(l.getTime())); |
| | | }); |
| | | //添加最后一天进入数组 |
| | | strList.add(sdf.format(endDate.getTime())); |
| | | return strList; |
| | | } |
| | | |
| | | /** |
| | | * 获取指定时间年的第一天 |
| | | */ |
| | | public static String getFirstTimeOfYear(Date date) { |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat(StandardYear);// 可以方便地修改日期格式 |
| | | String years = dateFormat.format(date); |
| | | return years + "-01-01 00:00:00"; |
| | | } |
| | | |
| | | /** |
| | | * 获取指定时间年的最后一天 |
| | | */ |
| | | public static String getLastTimeOfYear(Date date) { |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat(StandardYear);// 可以方便地修改日期格式 |
| | | String years = dateFormat.format(date); |
| | | return years + "-12-31 23:59:59"; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.core.util; |
| | | |
| | | import com.sinata.core.common.constant.JwtConstants; |
| | | import com.sinata.core.util.ToolUtil; |
| | | 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.sinata.core.util; |
| | | |
| | | import com.sinata.config.properties.GunsProperties; |
| | | import com.sinata.core.util.SpringContextHolder; |
| | | |
| | | /** |
| | | * 验证码工具类 |
| | | */ |
| | | public class KaptchaUtil { |
| | | |
| | | /** |
| | | * 获取验证码开关 |
| | | */ |
| | | public static Boolean getKaptchaOnOff() { |
| | | return SpringContextHolder.getBean(GunsProperties.class).getKaptchaOpen(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.core.util; |
| | | |
| | | import com.aliyun.oss.OSSClient; |
| | | import com.aliyun.oss.model.ObjectMetadata; |
| | | import com.sinata.common.keys.AliyunConfig; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * 阿里云OSS上传工具类 |
| | | * |
| | | * @author goku |
| | | */ |
| | | public class OssUploadUtil { |
| | | |
| | | /** |
| | | * 阿里云账号配置 |
| | | */ |
| | | public static String accessKeyId = AliyunConfig.accessKeyId; |
| | | public static String accessKeySecret = AliyunConfig.accessKeySecret; |
| | | |
| | | /** |
| | | * 阿里云OSS图片访问域名 |
| | | */ |
| | | public static String ossDomain = AliyunConfig.ossDomain; |
| | | public static String bucketName = AliyunConfig.bucketName; |
| | | public static String endpoint = AliyunConfig.endpoint; |
| | | |
| | | public static OSSClient ossClient = new OSSClient(endpoint, accessKeyId, accessKeySecret); |
| | | |
| | | public static String ossUpload(MultipartFile file) throws IOException { |
| | | // CommonsMultipartFile file = (CommonsMultipartFile)multipartFile; |
| | | String fileName = ""; |
| | | if (file != null && !"".equals(file.getOriginalFilename()) && file.getOriginalFilename() != null) { |
| | | //获得指定文件的输入流 |
| | | InputStream content = file.getInputStream(); |
| | | // 创建上传Object的Metadata |
| | | ObjectMetadata meta = new ObjectMetadata(); |
| | | // 必须设置ContentLength |
| | | meta.setContentLength(file.getSize()); |
| | | String originalFilename = file.getOriginalFilename(); |
| | | fileName = UUID.randomUUID().toString().replaceAll("-", "") + originalFilename.subSequence(originalFilename.lastIndexOf("."), originalFilename.length()); |
| | | // 上传Object. |
| | | ossClient.putObject(bucketName, "img/" + fileName, content, meta); |
| | | if (fileName != null && !"".equals(fileName)) { |
| | | fileName = ossDomain + "img/" + fileName; |
| | | } |
| | | } |
| | | return fileName; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.core.util; |
| | | |
| | | import cn.hutool.core.util.NumberUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.alipay.api.domain.AlipayFundTransToaccountTransferModel; |
| | | import com.alipay.api.domain.AlipayTradeRefundModel; |
| | | import com.alipay.api.response.AlipayFundTransToaccountTransferResponse; |
| | | import com.alipay.api.response.AlipayTradeRefundResponse; |
| | | import com.ijpay.alipay.AliPayApi; |
| | | import com.ijpay.core.enums.SignType; |
| | | import com.ijpay.core.kit.IpKit; |
| | | import com.ijpay.core.kit.WxPayKit; |
| | | import com.ijpay.wxpay.WxPayApi; |
| | | import com.ijpay.wxpay.WxPayApiConfig; |
| | | import com.ijpay.wxpay.WxPayApiConfigKit; |
| | | import com.ijpay.wxpay.model.RefundModel; |
| | | import com.ijpay.wxpay.model.TransferModel; |
| | | import com.sinata.core.common.exception.BizExceptionEnum; |
| | | import com.sinata.core.exception.GunsException; |
| | | import com.sinata.core.support.HttpKit; |
| | | import com.sinata.core.support.StrKit; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 支付工具 |
| | | * |
| | | * @author frankevil |
| | | * @create 2023-03-06 00:41 |
| | | **/ |
| | | @Slf4j |
| | | public class PayUtil { |
| | | |
| | | public static void aliRefund(String transactionNo, String orderNo, BigDecimal amount, String reason) { |
| | | AlipayTradeRefundResponse result = null; |
| | | try { |
| | | if (StrUtil.isBlank(transactionNo) && StrUtil.isBlank(orderNo)) { |
| | | log.error("支付交易号为空 请联系管理员"); |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL.getCode(), "支付交易号为空 请联系管理员"); |
| | | } |
| | | AlipayTradeRefundModel model = new AlipayTradeRefundModel(); |
| | | if (StrUtil.isNotBlank(transactionNo)) { |
| | | model.setTradeNo(transactionNo); |
| | | } |
| | | if (StrUtil.isNotBlank(orderNo)) { |
| | | model.setOutTradeNo(orderNo); |
| | | } |
| | | model.setRefundAmount(amount.toString()); |
| | | model.setRefundReason(reason); |
| | | result = AliPayApi.tradeRefundToResponse(model); |
| | | } catch (AlipayApiException e) { |
| | | log.error("调用退款失败,", e); |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL.getCode(), "申退款失败,请联系管理员"); |
| | | } |
| | | if (!result.isSuccess()) { |
| | | log.error("申请提现失败," + result.getMsg()); |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL.getCode(), "申退款失败," + result.getMsg()); |
| | | } |
| | | } |
| | | |
| | | public static void wechatRefund(String refundNo, String transactionNo, String orderNo, BigDecimal totalAmount, BigDecimal refundAmount, String reason, String notifyUrl) { |
| | | String refundStr = ""; |
| | | try { |
| | | if (StrUtil.isBlank(transactionNo) && StrUtil.isBlank(orderNo)) { |
| | | log.error("支付交易号为空 请联系管理员"); |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL.getCode(), "支付交易号为空 请联系管理员"); |
| | | } |
| | | WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig(); |
| | | Map<String, String> params = RefundModel.builder() |
| | | .appid(wxPayApiConfig.getAppId()) |
| | | .mch_id(wxPayApiConfig.getMchId()) |
| | | .nonce_str(WxPayKit.generateStr()) |
| | | .transaction_id(transactionNo) |
| | | .out_trade_no(orderNo) |
| | | .out_refund_no(refundNo) |
| | | .total_fee(totalAmount.longValue() + "") |
| | | .refund_fee(refundAmount.longValue() + "") |
| | | .refund_desc(reason) |
| | | .notify_url(wxPayApiConfig.getDomain() + notifyUrl) |
| | | .build() |
| | | .createSign(wxPayApiConfig.getPartnerKey(), SignType.MD5); |
| | | refundStr = WxPayApi.orderRefund(false, params, wxPayApiConfig.getCertPath(), wxPayApiConfig.getMchId()); |
| | | } catch (Exception e) { |
| | | log.error("调用退款失败,", e); |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL.getCode(), "申退款失败,请联系管理员"); |
| | | } |
| | | |
| | | Map<String, String> result = WxPayKit.xmlToMap(refundStr); |
| | | String returnCode = result.get("return_code"); |
| | | if (!WxPayKit.codeIsOk(returnCode)) { |
| | | log.error("申请提现退款," + result); |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL.getCode(), "申退款失败," + result.get("return_msg")); |
| | | } |
| | | String resultCode = result.get("result_code"); |
| | | if (!WxPayKit.codeIsOk(resultCode)) { |
| | | log.error("申请提现退款," + result); |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL.getCode(), "申退款失败," + result.get("err_code_des")); |
| | | } |
| | | } |
| | | |
| | | public static void weChatWithdraw(String transactionFlow, String openid, BigDecimal amount, String desc) { |
| | | String ip = IpKit.getRealIp(HttpKit.getRequest()); |
| | | if (StrKit.isBlank(ip)) { |
| | | ip = "127.0.0.1"; |
| | | } |
| | | WxPayApiConfig wxPayApiConfig = WxPayApiConfigKit.getWxPayApiConfig(); |
| | | Map<String, String> params = TransferModel.builder() |
| | | .mch_appid(wxPayApiConfig.getAppId()) |
| | | .mchid(wxPayApiConfig.getMchId()) |
| | | .nonce_str(WxPayKit.generateStr()) |
| | | .partner_trade_no(transactionFlow) |
| | | .openid(openid) |
| | | .check_name("NO_CHECK") |
| | | .amount(NumberUtil.mul(amount, 100).stripTrailingZeros().toPlainString()) |
| | | .desc(desc) |
| | | .spbill_create_ip(ip) |
| | | .build() |
| | | .createSign(wxPayApiConfig.getPartnerKey(), SignType.MD5, false); |
| | | |
| | | // 提现 |
| | | String transfers = WxPayApi.transfers(params, wxPayApiConfig.getCertPath(), wxPayApiConfig.getMchId()); |
| | | Map<String, String> map = WxPayKit.xmlToMap(transfers); |
| | | String returnCode = map.get("return_code"); |
| | | String resultCode = map.get("result_code"); |
| | | if (!WxPayKit.codeIsOk(returnCode) || !WxPayKit.codeIsOk(resultCode)) { |
| | | log.warn("提现失败" + map.get("return_msg") + ":" + map.get("err_code_des")); |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL.getCode(), "提现失败" + map.get("return_msg") + ":" + map.get("err_code_des")); |
| | | } |
| | | } |
| | | |
| | | public static void aliWithdraw(String transactionFlow, String account, BigDecimal amount, String desc) { |
| | | AlipayFundTransToaccountTransferModel model = new AlipayFundTransToaccountTransferModel(); |
| | | model.setOutBizNo(transactionFlow); |
| | | model.setPayeeType("ALIPAY_LOGONID"); |
| | | model.setPayeeAccount(account); |
| | | model.setAmount(amount.toString()); |
| | | model.setRemark(desc); |
| | | AlipayFundTransToaccountTransferResponse response = null; |
| | | try { |
| | | response = AliPayApi.transferToResponse(model); |
| | | } catch (Exception e) { |
| | | log.warn("支付宝提现失败:" + e); |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL.getCode(), "支付宝提现失败,请联系管理员"); |
| | | } |
| | | |
| | | if (!response.isSuccess()) { |
| | | log.warn("支付宝提现失败:" + response); |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL.getCode(), "支付宝提现失败:" + response.getSubMsg()); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.core.util; |
| | | |
| | | import org.springframework.beans.BeansException; |
| | | import org.springframework.context.ApplicationContext; |
| | | import org.springframework.context.ApplicationContextAware; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * @author: koting |
| | | * @create: 2018-10-12 21:07 |
| | | **/ |
| | | @Component |
| | | public class SpringUtil implements ApplicationContextAware { |
| | | |
| | | private static ApplicationContext applicationContext; |
| | | |
| | | @Override |
| | | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { |
| | | if (SpringUtil.applicationContext == null) { |
| | | SpringUtil.applicationContext = applicationContext; |
| | | } |
| | | } |
| | | |
| | | //获取applicationContext |
| | | public static ApplicationContext getApplicationContext() { |
| | | return applicationContext; |
| | | } |
| | | |
| | | //通过name获取 Bean. |
| | | public static Object getBean(String name) { |
| | | return getApplicationContext().getBean(name); |
| | | } |
| | | |
| | | //通过class获取Bean. |
| | | public static <T> T getBean(Class<T> clazz) { |
| | | return getApplicationContext().getBean(clazz); |
| | | } |
| | | |
| | | //通过name,以及Clazz返回指定的Bean |
| | | public static <T> T getBean(String name, Class<T> clazz) { |
| | | return getApplicationContext().getBean(name, clazz); |
| | | } |
| | | |
| | | /// 获取当前环境 |
| | | public static String getActiveProfile() { |
| | | return applicationContext.getEnvironment().getActiveProfiles()[0]; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.core.util.huawei.obs; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.obs.services.ObsClient; |
| | | import com.sinata.core.config.HuaWeiConfig; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.UUID; |
| | | |
| | | public class ObsUploadUtil { |
| | | |
| | | public static final String https = "https://"; |
| | | public static final String endPoint = "obs.cn-southwest-2.myhuaweicloud.com"; |
| | | public static final String bucketName = "meitianmeiya"; |
| | | public static final String obsDomain = https + bucketName + "." + endPoint + "/"; |
| | | |
| | | |
| | | public static String obsUpload(MultipartFile file, String dir) throws IOException { |
| | | // 文件目录 |
| | | dir = StrUtil.isBlank(dir) ? "img/" : dir + "/"; |
| | | |
| | | // CommonsMultipartFile file = (CommonsMultipartFile)multipartFile; |
| | | String objectName = ""; |
| | | if (file != null && !"".equals(file.getOriginalFilename()) && file.getOriginalFilename() != null) { |
| | | // 创建ObsClient实例 |
| | | ObsClient obsClient = new ObsClient(HuaWeiConfig.AK, HuaWeiConfig.SK, https + endPoint); |
| | | |
| | | //获得指定文件的输入流 |
| | | InputStream content = file.getInputStream(); |
| | | String originalFilename = file.getOriginalFilename(); |
| | | String uuid = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | objectName = dir + uuid + originalFilename.subSequence(originalFilename.lastIndexOf("."), originalFilename.length()); |
| | | |
| | | // 上传对象至OBS |
| | | //obsClient.putObject(bucketName, uuid, new ByteArrayInputStream("Hello OBS".getBytes())); |
| | | obsClient.putObject(bucketName, objectName, content); |
| | | |
| | | if (objectName != null && !"".equals(objectName)) { |
| | | objectName = obsDomain + objectName; |
| | | } |
| | | |
| | | // 关闭obsClient,全局使用一个ObsClient客户端的情况下,不建议主动关闭ObsClient客户端 |
| | | obsClient.close(); |
| | | } |
| | | return objectName; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.code.controller; |
| | | |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.config.properties.DruidProperties; |
| | | import com.sinata.generator.action.config.WebGeneratorConfig; |
| | | import com.sinata.generator.action.model.GenQo; |
| | | import com.sinata.modular.code.factory.DefaultTemplateFactory; |
| | | import com.sinata.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 goku |
| | | * @Date 2019年9月30日 |
| | | */ |
| | | @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("dbName", tableService.dbName); |
| | | 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.setPassword(druidProperties.getPassword()); |
| | | genQo.setUserName(druidProperties.getUsername()); |
| | | WebGeneratorConfig webGeneratorConfig = new WebGeneratorConfig(genQo); |
| | | webGeneratorConfig.doMpGeneration(); |
| | | webGeneratorConfig.doGunsGeneration(); |
| | | return SUCCESS_TIP; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.code.factory; |
| | | |
| | | import com.sinata.AdminApplication; |
| | | import com.sinata.core.CoreFlag; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import com.sinata.generator.action.model.GenQo; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 模板种类构建器 |
| | | * |
| | | * @author goku |
| | | * @date 2019-9-30 |
| | | */ |
| | | 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("goku"); |
| | | genQo.setProjectPackage(AdminApplication.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.sinata.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 goku |
| | | * @Date 2019年9月30日 |
| | | */ |
| | | @Service |
| | | public class TableService { |
| | | |
| | | @Value("${spring.datasource.db-name}") |
| | | public 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.sinata.modular.mall.controller; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.convert.Convert; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.base.tips.ErrorTip; |
| | | import com.sinata.core.base.tips.SuccessTip; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.util.DateUtils2; |
| | | import com.sinata.core.util.ExcelExportUtil; |
| | | import com.sinata.core.util.ExcelImportUtil; |
| | | import com.sinata.modular.mall.model.CommissionSettlementMonth; |
| | | import com.sinata.modular.mall.service.ICommissionSettlementMonthService; |
| | | import com.sinata.modular.member.model.MemUser; |
| | | import com.sinata.modular.member.service.IMemUserService; |
| | | 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.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RequestPart; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.TimeoutException; |
| | | |
| | | /** |
| | | * 佣金结算明细控制器 |
| | | * |
| | | * @author Goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/commissionSettlement") |
| | | public class CommissionSettlementController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/commissionSettlement/"; |
| | | @Autowired |
| | | private IMemUserService userService; |
| | | |
| | | @Autowired |
| | | private ICommissionSettlementMonthService commissionSettlementMonthService; |
| | | |
| | | |
| | | /** |
| | | * 跳转到佣金结算明细首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "commissionSettlement.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取佣金结算明细列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition, String condition1, String condition2, Integer condition3) { |
| | | Page<CommissionSettlementMonth> page = new PageFactory().defaultPage(); |
| | | // if (StrUtil.isBlank(beginTime) && StrUtil.isBlank(endTime)) { |
| | | // // 如果查询月份为空,则默认当前月 |
| | | // month = DateUtils2.formatDate(new Date(), "yyyyMM"); |
| | | // } |
| | | // 时间搜索 |
| | | if (StrUtil.isNotBlank(beginTime)) { |
| | | beginTime = beginTime.replace("-", ""); |
| | | } |
| | | if (StrUtil.isNotBlank(endTime)) { |
| | | endTime = endTime.replace("-", ""); |
| | | } |
| | | // 查询数据列表 |
| | | page.setTotal(commissionSettlementMonthService.queryListCount(beginTime, endTime, condition, condition1, condition2, condition3, null)); |
| | | List<CommissionSettlementMonth> list = commissionSettlementMonthService.queryList(beginTime, endTime, condition, condition1, condition2, condition3, null, page.getCurrent(), page.getSize()); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | @Permission |
| | | @ResponseBody |
| | | @RequestMapping(value = "/export") |
| | | public void exportOrder(String beginTime, String endTime, String condition, String condition1, String condition2, Integer condition3, HttpServletResponse response) throws IOException { |
| | | // 时间搜索 |
| | | if (StrUtil.isNotBlank(beginTime)) { |
| | | beginTime = beginTime.replace("-", ""); |
| | | } |
| | | if (StrUtil.isNotBlank(endTime)) { |
| | | endTime = endTime.replace("-", ""); |
| | | } |
| | | // 查询数据列表 |
| | | List<CommissionSettlementMonth> list = commissionSettlementMonthService.queryList(beginTime, endTime, condition, condition1, condition2, condition3, null, null, null); |
| | | |
| | | List<List<Object>> dataList = new ArrayList<>(); |
| | | List<Object> titles = CollUtil.newArrayList( |
| | | "销售员工号", |
| | | "销售员工姓名", |
| | | "销售员工职级", |
| | | "省级", |
| | | "市级", |
| | | "区县", |
| | | "结算月", |
| | | "销售佣金(套餐)", |
| | | "销售佣金(普通)", |
| | | "管理利益(套餐)", |
| | | "管理利益(普通)", |
| | | "育成奖", |
| | | "应发佣金", |
| | | "税前加款", |
| | | "税前扣款", |
| | | "税前应发佣金", |
| | | "实发金额" |
| | | ); |
| | | dataList.add(titles); |
| | | |
| | | for (CommissionSettlementMonth commission : list) { |
| | | dataList.add( |
| | | CollUtil.newArrayList( |
| | | commission.getShowId(), |
| | | commission.getUserName(), |
| | | commission.getUserGradeName(), |
| | | commission.getProvinceCodeName(), |
| | | commission.getCityCodeName(), |
| | | commission.getCountyCodeName(), |
| | | commission.getMonth(), |
| | | commission.getSalesCommissionGroup(), |
| | | commission.getSalesCommissionGoods(), |
| | | commission.getManageProfitGroup(), |
| | | commission.getManageProfitGoods(), |
| | | commission.getBreedAward(), |
| | | commission.getCommissionPayable(), |
| | | commission.getAddBeforeTax(), |
| | | commission.getSubBeforeTax(), |
| | | commission.getCommissionBeforeTax(), |
| | | commission.getPaymentAmount() |
| | | )); |
| | | } |
| | | ExcelExportUtil.easySheet("佣金明细" + DateUtils2.formatDate(new Date(), "YYYYMMddHHmmSS"), "佣金明细", dataList, response); |
| | | } |
| | | |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "导入佣金明细") |
| | | @RequestMapping(method = RequestMethod.POST, path = "/importData") |
| | | public Object importData(@RequestPart("file") MultipartFile file) { |
| | | try { |
| | | String[] titles = new String[]{ |
| | | "showId", "userName", "userGradeName" |
| | | , "provinceCodeName", "cityCodeName", "countyCodeName" |
| | | , "month" |
| | | , "salesCommissionGroup", "salesCommissionGoods", "manageProfitGroup", "manageProfitGoods" |
| | | , "breedAward", "commissionPayable", "addBeforeTax", "subBeforeTax" |
| | | , "commissionBeforeTax", "paymentAmount" |
| | | }; |
| | | // 读取表格中信息 |
| | | List<Map<String, String>> list = ExcelImportUtil.getMapList(file, titles); |
| | | List<CommissionSettlementMonth> monthList = new ArrayList<>(); |
| | | for (Map<String, String> map : list) { |
| | | String showId = map.get("showId"); |
| | | String month = map.get("month"); |
| | | if (StrUtil.isBlank(showId) && StrUtil.isBlank(month)) { |
| | | continue; |
| | | } |
| | | CommissionSettlementMonth old = commissionSettlementMonthService.selectOne( |
| | | new EntityWrapper<CommissionSettlementMonth>() |
| | | .eq("showId", showId) |
| | | .eq("month", month) |
| | | .last("LIMIT 1") |
| | | ); |
| | | |
| | | CommissionSettlementMonth o = new CommissionSettlementMonth(); |
| | | if (old != null && old.getId() != null) { |
| | | // 设置ID(修改) |
| | | o.setId(old.getId()); |
| | | } else { |
| | | MemUser memUser = userService.selectOne( |
| | | new EntityWrapper<MemUser>() |
| | | .eq("show_id", showId) |
| | | .last("LIMIT 1") |
| | | ); |
| | | if (memUser == null) { |
| | | throw new TimeoutException("工号" + showId + "无效!"); |
| | | } |
| | | o.setUserId(memUser.getId()); |
| | | o.setProvinceCode(memUser.getAgentProvinceCode()); |
| | | o.setCityCode(memUser.getAgentCityCode()); |
| | | o.setCountyCode(memUser.getAgentCountyCode()); |
| | | } |
| | | o.setShowId(showId); |
| | | o.setMonth(month); |
| | | // 设置新值 |
| | | o.setUserName(map.get("userName")); |
| | | o.setUserGradeName(map.get("userGradeName")); |
| | | // o.setProvinceCodeName(map.get("provinceCodeName")); |
| | | // o.setCityCodeName(map.get("cityCodeName")); |
| | | // o.setCountyCodeName(map.get("countyCodeName")); |
| | | o.setSalesCommissionGroup(Convert.toBigDecimal(map.get("salesCommissionGroup"))); |
| | | o.setSalesCommissionGoods(Convert.toBigDecimal(map.get("salesCommissionGoods"))); |
| | | o.setManageProfitGroup(Convert.toBigDecimal(map.get("manageProfitGroup"))); |
| | | o.setManageProfitGoods(Convert.toBigDecimal(map.get("manageProfitGoods"))); |
| | | o.setBreedAward(Convert.toBigDecimal(map.get("breedAward"))); |
| | | o.setCommissionPayable(Convert.toBigDecimal(map.get("commissionPayable"))); |
| | | o.setAddBeforeTax(Convert.toBigDecimal(map.get("addBeforeTax"))); |
| | | o.setSubBeforeTax(Convert.toBigDecimal(map.get("subBeforeTax"))); |
| | | o.setCommissionBeforeTax(Convert.toBigDecimal(map.get("commissionBeforeTax"))); |
| | | o.setPaymentAmount(Convert.toBigDecimal(map.get("paymentAmount"))); |
| | | |
| | | monthList.add(o); |
| | | } |
| | | |
| | | if (monthList.size() > 0) { |
| | | commissionSettlementMonthService.insertOrUpdateBatch(monthList); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | // 操作失败 |
| | | return new ErrorTip(500, "数据导入失败!" + e.getMessage()); |
| | | } |
| | | // 操作成功,但有错误数据的提示 |
| | | return new SuccessTip(200, "导入成功!"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | 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.sinata.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.sinata.modular.mall.model.CommissionSettlementMonth; |
| | | import com.sinata.modular.mall.service.ICommissionSettlementMonthService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | /** |
| | | * 佣金月结算控制器 |
| | | * |
| | | * @author Goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/commissionSettlementMonth") |
| | | public class CommissionSettlementMonthController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/commissionSettlementMonth/"; |
| | | |
| | | @Autowired |
| | | private ICommissionSettlementMonthService commissionSettlementMonthService; |
| | | |
| | | /** |
| | | * 跳转到佣金月结算首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "commissionSettlementMonth.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加佣金月结算 |
| | | */ |
| | | @RequestMapping("/commissionSettlementMonth_add") |
| | | public String commissionSettlementMonthAdd() { |
| | | return PREFIX + "commissionSettlementMonth_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改佣金月结算 |
| | | */ |
| | | @RequestMapping("/commissionSettlementMonth_update/{commissionSettlementMonthId}") |
| | | public String commissionSettlementMonthUpdate(@PathVariable Integer commissionSettlementMonthId, Model model) { |
| | | CommissionSettlementMonth commissionSettlementMonth = commissionSettlementMonthService.selectById(commissionSettlementMonthId); |
| | | model.addAttribute("item", commissionSettlementMonth); |
| | | LogObjectHolder.me().set(commissionSettlementMonth); |
| | | return PREFIX + "commissionSettlementMonth_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取佣金月结算列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<CommissionSettlementMonth>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("createTime", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("createTime", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = commissionSettlementMonthService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增佣金月结算 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增佣金月结算") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(CommissionSettlementMonth commissionSettlementMonth) { |
| | | commissionSettlementMonthService.insert(commissionSettlementMonth); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除佣金月结算") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | commissionSettlementMonthService.updateForSet("is_delete = 1", new EntityWrapper<CommissionSettlementMonth>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改佣金月结算 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改佣金月结算") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(CommissionSettlementMonth commissionSettlementMonth) { |
| | | commissionSettlementMonthService.updateById(commissionSettlementMonth); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改佣金月结算状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改佣金月结算状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer commissionSettlementMonthId, Integer state) { |
| | | commissionSettlementMonthService.updateForSet("state = " + state, new EntityWrapper<CommissionSettlementMonth>().eq("id", commissionSettlementMonthId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转佣金月结算详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{commissionSettlementMonthId}") |
| | | public Object detail(@PathVariable("commissionSettlementMonthId") Integer commissionSettlementMonthId, Model model) { |
| | | CommissionSettlementMonth commissionSettlementMonth = commissionSettlementMonthService.selectById(commissionSettlementMonthId); |
| | | model.addAttribute("item", commissionSettlementMonth); |
| | | return PREFIX + "commissionSettlementMonth_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.common.enums.EnumAppVersionType; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallAppVersion; |
| | | import com.sinata.modular.mall.service.IMallAppVersionService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * APP版本控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallAppVersion") |
| | | public class MallAppVersionController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallAppVersion/"; |
| | | |
| | | @Autowired |
| | | private IMallAppVersionService mallAppVersionService; |
| | | |
| | | /** |
| | | * 跳转到APP版本首页 安卓 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallAppVersion.html"; |
| | | } |
| | | |
| | | /** |
| | | * @param |
| | | * @return |
| | | * @Title: indexIos |
| | | * @Description: ios |
| | | * @author guohongjin |
| | | * @date 2023/3/14 |
| | | */ |
| | | @RequestMapping("/indexIos") |
| | | public String indexIos(Model model) { |
| | | model.addAttribute("isIos", 1); |
| | | return PREFIX + "mallAppVersion.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加APP版本安卓 |
| | | */ |
| | | @RequestMapping("/mallAppVersion_add") |
| | | public String mallAppVersionAdd() { |
| | | return PREFIX + "mallAppVersion_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加APP版本ios |
| | | */ |
| | | @RequestMapping("/mallAppVersionAddForIos") |
| | | public String mallAppVersionAddForIos() { |
| | | return PREFIX + "mallAppVersion_addIos.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改APP版本 |
| | | */ |
| | | @RequestMapping("/mallAppVersion_update/{mallAppVersionId}") |
| | | public String mallAppVersionUpdate(@PathVariable Integer mallAppVersionId, Model model) { |
| | | MallAppVersion mallAppVersion = mallAppVersionService.selectById(mallAppVersionId); |
| | | model.addAttribute("item", mallAppVersion); |
| | | LogObjectHolder.me().set(mallAppVersion); |
| | | return PREFIX + "mallAppVersion_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改APP版本 |
| | | */ |
| | | @RequestMapping("/mallAppVersion_updateIos/{mallAppVersionId}") |
| | | public String mallAppVersionUpdateIos(@PathVariable Integer mallAppVersionId, Model model) { |
| | | MallAppVersion mallAppVersion = mallAppVersionService.selectById(mallAppVersionId); |
| | | model.addAttribute("item", mallAppVersion); |
| | | LogObjectHolder.me().set(mallAppVersion); |
| | | return PREFIX + "mallAppVersion_editIos.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取APP版本列表 |
| | | * ANDROID(0, "安卓"), |
| | | * IOS(1, "ios"); |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String versionNo, String isForceUpdate, EnumAppVersionType enumAppVersionType) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallAppVersion>().orderBy("id", false).eq("is_delete", 0); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(versionNo)) { |
| | | wrapper.like("version_no", versionNo); |
| | | } |
| | | if (!StringUtils.isEmpty(isForceUpdate)) { |
| | | wrapper.like("is_force_update", isForceUpdate); |
| | | } |
| | | if (enumAppVersionType != null) { |
| | | wrapper.eq("version_type", enumAppVersionType.getIndex()); |
| | | } else { |
| | | wrapper.eq("version_type", EnumAppVersionType.ANDROID.getIndex()); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallAppVersionService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增APP版本 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增APP版本") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallAppVersion mallAppVersion) { |
| | | mallAppVersionService.insert(mallAppVersion); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除APP版本") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallAppVersionService.updateForSet("is_delete = 1", new EntityWrapper<MallAppVersion>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改APP版本 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改APP版本") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallAppVersion mallAppVersion) { |
| | | mallAppVersionService.updateById(mallAppVersion); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | // /** |
| | | // * 修改APP版本状态 |
| | | // */ |
| | | // @ResponseBody |
| | | // @BussinessLog(value = "修改APP版本状态") |
| | | // @RequestMapping(value = "/updateState") |
| | | // public Object updateState(Integer mallAppVersionId, Integer state) { |
| | | // mallAppVersionService.updateForSet("state = " + state, new EntityWrapper<MallAppVersion>().eq("id", mallAppVersionId)); |
| | | // return SUCCESS_TIP; |
| | | // } |
| | | |
| | | /** |
| | | * 跳转APP版本详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallAppVersionId}") |
| | | public Object detail(@PathVariable("mallAppVersionId") Integer mallAppVersionId, Model model) { |
| | | MallAppVersion mallAppVersion = mallAppVersionService.selectById(mallAppVersionId); |
| | | model.addAttribute("item", mallAppVersion); |
| | | return PREFIX + "mallAppVersion_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.base.tips.ErrorTip; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallClassifyOne; |
| | | import com.sinata.modular.mall.model.MallClassifyTwo; |
| | | import com.sinata.modular.mall.model.MallGoods; |
| | | import com.sinata.modular.mall.service.IMallClassifyOneService; |
| | | import com.sinata.modular.mall.service.IMallClassifyTwoService; |
| | | import com.sinata.modular.mall.service.IMallGoodsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 商品分类控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallClassifyOne") |
| | | public class MallClassifyOneController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallClassifyOne/"; |
| | | |
| | | @Autowired |
| | | private IMallGoodsService mallGoodsService; |
| | | |
| | | @Autowired |
| | | private IMallClassifyOneService mallClassifyOneService; |
| | | |
| | | @Autowired |
| | | private IMallClassifyTwoService mallClassifyTwoService; |
| | | |
| | | /** |
| | | * 跳转到商品分类首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallClassifyOne.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加商品分类 |
| | | */ |
| | | @RequestMapping("/mallClassifyOne_add") |
| | | public String mallClassifyOneAdd() { |
| | | return PREFIX + "mallClassifyOne_add.html"; |
| | | } |
| | | @ResponseBody |
| | | @GetMapping("/getClassCount") |
| | | public Integer getClassCount() { |
| | | return mallClassifyOneService.selectCount( |
| | | new EntityWrapper<MallClassifyOne>().eq("is_delete", 0) |
| | | ); |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改商品分类 |
| | | */ |
| | | @RequestMapping("/mallClassifyOne_update/{mallClassifyOneId}") |
| | | public String mallClassifyOneUpdate(@PathVariable Integer mallClassifyOneId, Model model) { |
| | | MallClassifyOne mallClassifyOne = mallClassifyOneService.selectById(mallClassifyOneId); |
| | | model.addAttribute("item", mallClassifyOne); |
| | | LogObjectHolder.me().set(mallClassifyOne); |
| | | return PREFIX + "mallClassifyOne_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取商品分类列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String classifyName, Integer isLock) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallClassifyOne>().eq("is_delete", 0).orderBy("id", false); |
| | | |
| | | if (!StringUtils.isEmpty(classifyName)) { |
| | | wrapper.like("classify_name", classifyName); |
| | | } |
| | | if (isLock != null) { |
| | | wrapper.eq("is_lock", isLock); |
| | | } |
| | | |
| | | // 商品分类统计数量 |
| | | List<Map<String, Object>> classCountList = mallGoodsService.selectMaps( |
| | | new EntityWrapper<MallGoods>() |
| | | .setSqlSelect("count(1) count, classify_id_one") |
| | | .isNotNull("classify_id_one") |
| | | .groupBy("classify_id_one") |
| | | ); |
| | | |
| | | |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallClassifyOneService.selectMapsPage(page, wrapper).getRecords(); |
| | | page.setRecords( |
| | | list.stream().map(o -> { |
| | | o.put("goodsCount", |
| | | Optional.ofNullable(classCountList).orElse(new ArrayList<>()).stream() |
| | | .filter(cc -> cc.get("classify_id_one").equals(o.get("id"))) |
| | | .findFirst() |
| | | .map(cc -> cc.get("count")) |
| | | .orElse("0") |
| | | ); |
| | | return o; |
| | | }).collect(Collectors.toList()) |
| | | ); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增商品分类 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增商品分类") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallClassifyOne mallClassifyOne) { |
| | | int count = this.mallClassifyOneService.selectCount(new EntityWrapper<MallClassifyOne>().eq("classify_name", mallClassifyOne.getClassifyName()).eq("is_delete", 0)); |
| | | if (count > 0) { |
| | | ErrorTip errorTip = new ErrorTip(500, "分类名称已存在,请仔细检查!"); |
| | | return errorTip; |
| | | } |
| | | mallClassifyOneService.insert(mallClassifyOne); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除商品分类") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | String[] idd = ids.split(","); |
| | | if (idd.length == 1) { |
| | | int count = this.mallClassifyTwoService.selectCount(new EntityWrapper<MallClassifyTwo>().eq("parent_classify_id", idd[0]).eq("is_delete", 0)); |
| | | if (count == 0) { |
| | | // 逻辑删除 |
| | | mallClassifyOneService.updateForSet("is_delete = 1", new EntityWrapper<MallClassifyOne>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } else { |
| | | ErrorTip errorTip = new ErrorTip(500, "已经绑定了二级分类,不能被删除。请解除绑定关系在删除"); |
| | | return errorTip; |
| | | } |
| | | } else { |
| | | boolean state = false; |
| | | for (String id : idd) { |
| | | int count = this.mallClassifyTwoService.selectCount(new EntityWrapper<MallClassifyTwo>().eq("parent_classify_id", id).eq("is_delete", 0)); |
| | | if (count == 0) { |
| | | // 逻辑删除 |
| | | mallClassifyOneService.updateForSet("is_delete = 1", new EntityWrapper<MallClassifyOne>().in("id", ids.split(","))); |
| | | } else { |
| | | state = true; |
| | | } |
| | | } |
| | | if (state) { |
| | | ErrorTip errorTip = new ErrorTip(500, "部分分类绑定了二级分类,删除失败。请解除绑定关系在删除"); |
| | | return errorTip; |
| | | } else { |
| | | return SUCCESS_TIP; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 修改商品分类 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品分类") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallClassifyOne mallClassifyOne) { |
| | | mallClassifyOneService.updateById(mallClassifyOne); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品分类状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品分类状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallClassifyOneId, Integer state) { |
| | | mallClassifyOneService.updateForSet("is_lock = " + state, new EntityWrapper<MallClassifyOne>().eq("id", mallClassifyOneId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转商品分类详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallClassifyOneId}") |
| | | public Object detail(@PathVariable("mallClassifyOneId") Integer mallClassifyOneId, Model model) { |
| | | MallClassifyOne mallClassifyOne = mallClassifyOneService.selectById(mallClassifyOneId); |
| | | model.addAttribute("item", mallClassifyOne); |
| | | return PREFIX + "mallClassifyOne_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.base.tips.ErrorTip; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallClassifyOne; |
| | | import com.sinata.modular.mall.model.MallClassifyTwo; |
| | | import com.sinata.modular.mall.service.IMallClassifyOneService; |
| | | import com.sinata.modular.mall.service.IMallClassifyTwoService; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 商品二级分类控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallClassifyTwo") |
| | | public class MallClassifyTwoController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallClassifyTwo/"; |
| | | |
| | | @Autowired |
| | | private IMallClassifyTwoService mallClassifyTwoService; |
| | | |
| | | @Autowired |
| | | private IMallClassifyOneService mallClassifyOneService; |
| | | |
| | | /** |
| | | * 跳转到商品二级分类首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | List<MallClassifyOne> mallClassifyOneList = this.mallClassifyOneService.selectList(new EntityWrapper<MallClassifyOne>().ne("is_delete", 1) |
| | | .orderBy("sort", true)); |
| | | if (CollectionUtils.isEmpty(mallClassifyOneList)) { |
| | | mallClassifyOneList = new ArrayList<MallClassifyOne>(); |
| | | } |
| | | model.addAttribute("mallClassifyOneList", mallClassifyOneList); |
| | | return PREFIX + "mallClassifyTwo.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加商品二级分类 |
| | | */ |
| | | @RequestMapping("/mallClassifyTwo_add") |
| | | public String mallClassifyTwoAdd(Model model) { |
| | | List<MallClassifyOne> mallClassifyOneList = this.mallClassifyOneService |
| | | .selectList(new EntityWrapper<MallClassifyOne>().eq("is_delete", 0).orderBy("sort", true)); |
| | | if (CollectionUtils.isEmpty(mallClassifyOneList)) { |
| | | mallClassifyOneList = new ArrayList<MallClassifyOne>(); |
| | | } |
| | | model.addAttribute("mallClassifyOneList", mallClassifyOneList); |
| | | return PREFIX + "mallClassifyTwo_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改商品二级分类 |
| | | */ |
| | | @RequestMapping("/mallClassifyTwo_update/{mallClassifyTwoId}") |
| | | public String mallClassifyTwoUpdate(@PathVariable Integer mallClassifyTwoId, Model model) { |
| | | MallClassifyTwo mallClassifyTwo = mallClassifyTwoService.selectById(mallClassifyTwoId); |
| | | model.addAttribute("item", mallClassifyTwo); |
| | | LogObjectHolder.me().set(mallClassifyTwo); |
| | | List<MallClassifyOne> mallClassifyOneList = this.mallClassifyOneService.selectList(new EntityWrapper<MallClassifyOne>().eq("is_delete", 0).orderBy("sort", true)); |
| | | if (CollectionUtils.isEmpty(mallClassifyOneList)) { |
| | | mallClassifyOneList = new ArrayList<MallClassifyOne>(); |
| | | } |
| | | model.addAttribute("mallClassifyOneList", mallClassifyOneList); |
| | | return PREFIX + "mallClassifyTwo_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取商品二级分类列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String classifyName, Integer parentClassifyId) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallClassifyTwo>() |
| | | .ne("is_delete", 1).orderBy("sort", true); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(classifyName)) { |
| | | wrapper.like("classify_name", classifyName); |
| | | } |
| | | if (parentClassifyId != null) { |
| | | wrapper.eq("parent_classify_id", parentClassifyId); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallClassifyTwoService.selectMapsPage(page, wrapper).getRecords(); |
| | | for (Map<String, Object> map : list) { |
| | | Integer parentClassifyIdOne = (Integer) map.get("parentClassifyId"); |
| | | map.put("parentClassifyName", ""); |
| | | if (parentClassifyIdOne != null) { |
| | | MallClassifyOne mallClassifyOne = this.mallClassifyOneService.selectById(parentClassifyId); |
| | | if (mallClassifyOne != null) { |
| | | map.put("parentClassifyName", mallClassifyOne.getClassifyName()); |
| | | } |
| | | } |
| | | } |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增商品二级分类 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增商品二级分类") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallClassifyTwo mallClassifyTwo) { |
| | | int count = this.mallClassifyTwoService.selectCount(new EntityWrapper<MallClassifyTwo>().eq("classify_name", mallClassifyTwo.getClassifyName()).eq("is_delete", 0)); |
| | | if (count > 0) { |
| | | ErrorTip errorTip = new ErrorTip(500, "分类名称已存在,请仔细检查!"); |
| | | return errorTip; |
| | | } |
| | | mallClassifyTwoService.insert(mallClassifyTwo); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除商品二级分类") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallClassifyTwoService.updateForSet("is_delete = 1", new EntityWrapper<MallClassifyTwo>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品二级分类 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品二级分类") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallClassifyTwo mallClassifyTwo) { |
| | | mallClassifyTwoService.updateById(mallClassifyTwo); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品二级分类状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品二级分类状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallClassifyTwoId, Integer state) { |
| | | mallClassifyTwoService.updateForSet("state = " + state, new EntityWrapper<MallClassifyTwo>().eq("id", mallClassifyTwoId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转商品二级分类详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallClassifyTwoId}") |
| | | public Object detail(@PathVariable("mallClassifyTwoId") Integer mallClassifyTwoId, Model model) { |
| | | MallClassifyTwo mallClassifyTwo = mallClassifyTwoService.selectById(mallClassifyTwoId); |
| | | model.addAttribute("item", mallClassifyTwo); |
| | | return PREFIX + "mallClassifyTwo_detail.html"; |
| | | } |
| | | |
| | | @RequestMapping("/getMallClassTwoAll") |
| | | @ResponseBody |
| | | public Object getMallClassTwoAll(String classOneIds) { |
| | | Wrapper<MallClassifyTwo> entityWrapper = new EntityWrapper<MallClassifyTwo>().eq("is_delete", 0); |
| | | if (org.apache.commons.lang3.StringUtils.isNotEmpty(classOneIds)) { |
| | | entityWrapper.in("parent_classify_id", classOneIds); |
| | | } |
| | | List<MallClassifyTwo> mallClassifyTwoList = this.mallClassifyTwoService.selectList(entityWrapper); |
| | | return mallClassifyTwoList; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallExpressCompany; |
| | | import com.sinata.modular.mall.service.IMallExpressCompanyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 快递公司控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallExpressCompany") |
| | | public class MallExpressCompanyController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallExpressCompany/"; |
| | | |
| | | @Autowired |
| | | private IMallExpressCompanyService mallExpressCompanyService; |
| | | |
| | | /** |
| | | * 跳转到快递公司首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallExpressCompany.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加快递公司 |
| | | */ |
| | | @RequestMapping("/mallExpressCompany_add") |
| | | public String mallExpressCompanyAdd() { |
| | | return PREFIX + "mallExpressCompany_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改快递公司 |
| | | */ |
| | | @RequestMapping("/mallExpressCompany_update/{mallExpressCompanyId}") |
| | | public String mallExpressCompanyUpdate(@PathVariable Integer mallExpressCompanyId, Model model) { |
| | | MallExpressCompany mallExpressCompany = mallExpressCompanyService.selectById(mallExpressCompanyId); |
| | | model.addAttribute("item", mallExpressCompany); |
| | | LogObjectHolder.me().set(mallExpressCompany); |
| | | return PREFIX + "mallExpressCompany_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取快递公司列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallExpressCompany>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallExpressCompanyService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增快递公司 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增快递公司") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallExpressCompany mallExpressCompany) { |
| | | mallExpressCompanyService.insert(mallExpressCompany); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除快递公司") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallExpressCompanyService.updateForSet("is_delete = 1", new EntityWrapper<MallExpressCompany>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改快递公司 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改快递公司") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallExpressCompany mallExpressCompany) { |
| | | mallExpressCompanyService.updateById(mallExpressCompany); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改快递公司状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改快递公司状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallExpressCompanyId, Integer state) { |
| | | mallExpressCompanyService.updateForSet("state = " + state, new EntityWrapper<MallExpressCompany>().eq("id", mallExpressCompanyId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转快递公司详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallExpressCompanyId}") |
| | | public Object detail(@PathVariable("mallExpressCompanyId") Integer mallExpressCompanyId, Model model) { |
| | | MallExpressCompany mallExpressCompany = mallExpressCompanyService.selectById(mallExpressCompanyId); |
| | | model.addAttribute("item", mallExpressCompany); |
| | | return PREFIX + "mallExpressCompany_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallGoodsCart; |
| | | import com.sinata.modular.mall.service.IMallGoodsCartService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 商品购物车控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallGoodsCart") |
| | | public class MallGoodsCartController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallGoodsCart/"; |
| | | |
| | | @Autowired |
| | | private IMallGoodsCartService mallGoodsCartService; |
| | | |
| | | /** |
| | | * 跳转到商品购物车首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallGoodsCart.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加商品购物车 |
| | | */ |
| | | @RequestMapping("/mallGoodsCart_add") |
| | | public String mallGoodsCartAdd() { |
| | | return PREFIX + "mallGoodsCart_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改商品购物车 |
| | | */ |
| | | @RequestMapping("/mallGoodsCart_update/{mallGoodsCartId}") |
| | | public String mallGoodsCartUpdate(@PathVariable Integer mallGoodsCartId, Model model) { |
| | | MallGoodsCart mallGoodsCart = mallGoodsCartService.selectById(mallGoodsCartId); |
| | | model.addAttribute("item", mallGoodsCart); |
| | | LogObjectHolder.me().set(mallGoodsCart); |
| | | return PREFIX + "mallGoodsCart_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取商品购物车列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallGoodsCart>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallGoodsCartService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增商品购物车 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增商品购物车") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallGoodsCart mallGoodsCart) { |
| | | mallGoodsCartService.insert(mallGoodsCart); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除商品购物车") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallGoodsCartService.updateForSet("is_delete = 1", new EntityWrapper<MallGoodsCart>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品购物车 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品购物车") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallGoodsCart mallGoodsCart) { |
| | | mallGoodsCartService.updateById(mallGoodsCart); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品购物车状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品购物车状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallGoodsCartId, Integer state) { |
| | | mallGoodsCartService.updateForSet("state = " + state, new EntityWrapper<MallGoodsCart>().eq("id", mallGoodsCartId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转商品购物车详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallGoodsCartId}") |
| | | public Object detail(@PathVariable("mallGoodsCartId") Integer mallGoodsCartId, Model model) { |
| | | MallGoodsCart mallGoodsCart = mallGoodsCartService.selectById(mallGoodsCartId); |
| | | model.addAttribute("item", mallGoodsCart); |
| | | return PREFIX + "mallGoodsCart_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.google.common.collect.Lists; |
| | | import com.sinata.common.enums.EnumIsDelete; |
| | | import com.sinata.common.enums.mall.EnumMallGoodsGroupType; |
| | | import com.sinata.common.enums.mall.EnumMallGoodsState; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.base.tips.ErrorTip; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.common.exception.BizExceptionEnum; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.core.util.Convert; |
| | | import com.sinata.core.util.DateUtils2; |
| | | import com.sinata.core.util.ExcelExportUtil; |
| | | import com.sinata.modular.mall.model.*; |
| | | import com.sinata.modular.mall.service.*; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 商品信息控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallGoods") |
| | | public class MallGoodsController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallGoods/"; |
| | | |
| | | @Autowired |
| | | private IMallGoodsService mallGoodsService; |
| | | |
| | | @Autowired |
| | | private IMallGoodsSkuService mallGoodsSkuService; |
| | | |
| | | @Autowired |
| | | private IMallClassifyOneService mallClassifyOneService; |
| | | |
| | | @Autowired |
| | | private IMallGoodsSpecService mallGoodsSpecService; |
| | | |
| | | @Autowired |
| | | private IMallGoodsDetailService mallGoodsDetailService; |
| | | @Autowired |
| | | private IMallGoodsSetService mallGoodsSetService; |
| | | |
| | | @Resource |
| | | private IMallGoodsSpecService goodsSpecService; |
| | | |
| | | @Resource |
| | | private IMallGoodsSpecValueService goodsSpecValueService; |
| | | |
| | | @Resource |
| | | private IMallTagService mallTagService; |
| | | |
| | | |
| | | /** |
| | | * 跳转到商品信息首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallGoods.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加商品信息 |
| | | */ |
| | | @RequestMapping("/mallGoods_add") |
| | | public String mallGoodsAdd(Model model) { |
| | | // 查询所有标签 |
| | | List<MallTag> mallTags = mallTagService.getMallTags(); |
| | | model.addAttribute("mallTags", mallTags); |
| | | return PREFIX + "mallGoods_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改商品信息 |
| | | */ |
| | | @RequestMapping("/mallGoods_update/{mallGoodsId}") |
| | | public String mallGoodsUpdate(@PathVariable Integer mallGoodsId, Model model) { |
| | | MallGoods mallGoods = mallGoodsService.selectById(mallGoodsId); |
| | | |
| | | MallGoodsDetail goodsDetail = mallGoodsDetailService.selectById(mallGoodsId); |
| | | mallGoods.setIntroH5(goodsDetail.getIntroH5()); |
| | | mallGoods.setIntroImage(goodsDetail.getIntroImage()); |
| | | mallGoods.setPurchaseH5(goodsDetail.getPurchaseH5()); |
| | | model.addAttribute("item", mallGoods); |
| | | |
| | | MallGoodsSet goodsSet = mallGoodsSetService.selectById(mallGoodsId); |
| | | model.addAttribute("goodsSet", goodsSet); |
| | | |
| | | // 查询所有标签 |
| | | List<MallTag> mallTags = mallTagService.getMallTags(); |
| | | model.addAttribute("mallTags", mallTags); |
| | | |
| | | LogObjectHolder.me().set(mallGoods); |
| | | return PREFIX + "mallGoods_edit.html"; |
| | | } |
| | | |
| | | @ResponseBody |
| | | @GetMapping(value = "/getGoodsSpecData") |
| | | public List<MallGoodsSku> getGoodsSpecData(Integer goodsId) { |
| | | List<MallGoodsSku> skuList = mallGoodsSkuService.selectList( |
| | | new EntityWrapper<MallGoodsSku>() |
| | | .setSqlSelect("spec_ids id, grep_name, stock") |
| | | .eq("goods_id", goodsId) |
| | | .eq("merchant_id", 0) |
| | | ); |
| | | |
| | | MallGoods mallGoods = mallGoodsService.selectById(goodsId); |
| | | |
| | | String classifyName = ""; |
| | | MallClassifyOne classifyOne = mallClassifyOneService.selectById(mallGoods.getClassifyIdOne()); |
| | | if (classifyOne != null) { |
| | | classifyName = classifyOne.getClassifyName(); |
| | | } |
| | | for (MallGoodsSku sku : skuList) { |
| | | sku.setClassifyName(classifyName); |
| | | } |
| | | return skuList; |
| | | } |
| | | |
| | | /** |
| | | * 获取商品信息列表 |
| | | * |
| | | * @param id 商品id |
| | | * @param state 商品状态 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String goodsName, String id, Integer state, String goodsNo) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | |
| | | page.setRecords( |
| | | wrapperList(page, beginTime, endTime, goodsName, id, state, goodsNo) |
| | | ); |
| | | |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | public List<Map<String, Object>> wrapperList(Page<Map<String, Object>> page, String beginTime, String endTime, String goodsName, String id, Integer state, String goodsNo) { |
| | | Wrapper wrapper = new EntityWrapper<MallGoods>() |
| | | .eq("group_type", EnumMallGoodsGroupType.GOODS.index) |
| | | .eq("is_delete", 0) |
| | | .orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | if (!StringUtils.isEmpty(goodsName)) { |
| | | wrapper.like("goods_name", goodsName); |
| | | } |
| | | if (!StringUtils.isEmpty(id)) { |
| | | if (id.indexOf("sp") != -1) { |
| | | String idd = id.substring(id.indexOf("sp") + 2); |
| | | wrapper.eq("id", Integer.parseInt(idd)); |
| | | } else { |
| | | wrapper.eq("id", Integer.parseInt(id)); |
| | | } |
| | | } |
| | | if (state != null) { |
| | | wrapper.eq("state", state); |
| | | } |
| | | if (StrUtil.isNotBlank(goodsNo)) { |
| | | wrapper.like("goods_no", goodsNo); |
| | | } |
| | | |
| | | // 查询所有标签 |
| | | List<MallTag> mallTags = mallTagService.getMallTags(); |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list; |
| | | if (page != null) { |
| | | list = mallGoodsService.selectMapsPage(page, wrapper).getRecords(); |
| | | } else { |
| | | list = mallGoodsService.selectMaps(wrapper); |
| | | } |
| | | |
| | | // 规格列表 |
| | | List<MallGoodsSpec> selectList = mallGoodsSpecService.selectList(new EntityWrapper<MallGoodsSpec>().setSqlSelect("id, spec_name")); |
| | | |
| | | return list.stream().peek(m -> { |
| | | Object classObj = m.get("classifyIdOne"); |
| | | if (classObj != null) { |
| | | m.put("classifyName", mallClassifyOneService.selectById(Convert.toInt(classObj)).getClassifyName()); |
| | | } |
| | | |
| | | // 封装规格名 |
| | | List<String> specNameList = new ArrayList<>(); |
| | | List<MallGoodsSku> skuList = mallGoodsSkuService.selectList(new EntityWrapper<MallGoodsSku>().eq("goods_id", m.get("id")).eq("merchant_id", 0)); |
| | | for (MallGoodsSku sku : skuList) { |
| | | String[] spIds = sku.getSpecGrep().split(","); |
| | | for (String spId : spIds) { |
| | | for (MallGoodsSpec spec : selectList) { |
| | | if (spec.getId().toString().equals(spId)) { |
| | | specNameList.add(spec.getSpecName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | m.put("specNames", specNameList.stream().distinct().collect(Collectors.joining(","))); |
| | | |
| | | m.put("merchantCount", mallGoodsSkuService.selectCount( |
| | | new EntityWrapper<MallGoodsSku>() |
| | | .eq("goods_id", m.get("id")) |
| | | .ne("merchant_id", 0) |
| | | .groupBy("goods_id") |
| | | )); |
| | | |
| | | Object tagIds = m.get("tagIds"); |
| | | if (tagIds != null) { |
| | | m.put("tagIds", mallTagService.getTagListByGoodsId(mallTags, tagIds.toString()).stream().collect(Collectors.joining("、"))); |
| | | } |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/export") |
| | | public void export(String beginTime, String endTime, String goodsName, String id, Integer state, String goodsNo, HttpServletResponse response) { |
| | | List<Map<String, Object>> list = wrapperList(null, beginTime, endTime, goodsName, id, state, goodsNo); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<Object>> dataList = new ArrayList<>(); |
| | | |
| | | // 头部列【封装】 |
| | | List<Object> shellList = new ArrayList<>(); |
| | | 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("商品状态"); |
| | | dataList.add(shellList); |
| | | |
| | | // 详细数据列【封装】 |
| | | for (Map<String, Object> map : list) { |
| | | shellList = new ArrayList<>(); |
| | | shellList.add(map.get("createTime")); |
| | | shellList.add(map.get("goodsNo")); |
| | | shellList.add(map.get("classifyName")); |
| | | shellList.add(map.get("goodsName")); |
| | | shellList.add(map.get("goodsTitle")); |
| | | shellList.add(map.get("tagIds")); |
| | | shellList.add(map.get("specNames")); |
| | | shellList.add(map.get("buyCount")); |
| | | shellList.add(map.get("stock")); |
| | | shellList.add(map.get("merchantCount")); |
| | | shellList.add(map.get("priceSale")); |
| | | shellList.add(map.get("priceMember")); |
| | | shellList.add(EnumMallGoodsState.getMarkByIndex((Integer) map.get("state"))); |
| | | dataList.add(shellList); |
| | | } |
| | | try { |
| | | String title = "商品信息"; |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet(title + DateUtils2.formatDate(new Date(), "YYYYMMddHHmmSS"), title, dataList, response); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增商品信息") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallGoods mallGoods) { |
| | | if (mallGoods.getState() == null) { |
| | | mallGoods.setState(EnumMallGoodsState.FOR_SALE.getIndex()); |
| | | } |
| | | |
| | | if (StrUtil.isNotBlank(mallGoods.getIntroImage())) { |
| | | mallGoods.setGoodsImage(mallGoods.getIntroImage().split(",")[0]); |
| | | } |
| | | mallGoods.setGoodsSkus(JSONUtil.toList(mallGoods.getGoodsSkusJson(), MallGoodsSku.class)); |
| | | if (mallGoods.getGoodsSkus() == null || CollUtil.isEmpty(mallGoods.getGoodsSkus())) { |
| | | return new ErrorTip(BizExceptionEnum.REQUEST_INVALIDATE.getCode(), "请添加商品规格不存在"); |
| | | } |
| | | mallGoods.setGoodsSet(JSONUtil.toBean(mallGoods.getGoodsSetJson(), MallGoodsSet.class)); |
| | | mallGoodsService.saveMallGoods(mallGoods); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品信息 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品信息") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallGoods mallGoods) { |
| | | MallGoods oldGoods = this.mallGoodsService.selectById(mallGoods.getId()); |
| | | if (oldGoods == null) { |
| | | return new ErrorTip(BizExceptionEnum.REQUEST_INVALIDATE.getCode(), "商品不存在"); |
| | | } |
| | | // MallGoodsDetail goodsDetail = this.mallGoodsDetailService.selectById(mallGoods.getId()); |
| | | // if (oldGoods.getState() == EnumMallGoodsState.CMS_REFUSE_SALE.getIndex() |
| | | // || !StrUtil.equals(oldGoods.getGoodsName(),mallGoods.getGoodsName()) |
| | | // || !StrUtil.equals(oldGoods.getGoodsImage(),mallGoods.getGoodsImage()) |
| | | // || !StrUtil.equals(goodsDetail.getIntroImage(),mallGoods.getIntroImage()) |
| | | // || !StrUtil.equals(goodsDetail.getIntroH5(),mallGoods.getIntroH5())) { |
| | | // mallGoods.setState(EnumMallGoodsState.WAIT_AUDIT.getIndex()); |
| | | // } |
| | | if (StrUtil.isNotBlank(mallGoods.getIntroImage())) { |
| | | mallGoods.setGoodsImage(mallGoods.getIntroImage().split(",")[0]); |
| | | } |
| | | mallGoods.setGoodsSkus(JSONUtil.toList(mallGoods.getGoodsSkusJson(), MallGoodsSku.class)); |
| | | if (mallGoods.getGoodsSkus() == null || CollUtil.isEmpty(mallGoods.getGoodsSkus())) { |
| | | return new ErrorTip(BizExceptionEnum.REQUEST_INVALIDATE.getCode(), "请添加商品规格不存在"); |
| | | } |
| | | mallGoods.setGoodsSet(JSONUtil.toBean(mallGoods.getGoodsSetJson(), MallGoodsSet.class)); |
| | | mallGoodsService.updateMallGoods(mallGoods); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除商品信息") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | String[] idArray = ids.split(","); |
| | | // 逻辑删除 |
| | | mallGoodsService.updateForSet("is_delete = 1", new EntityWrapper<MallGoods>().in("id", idArray)); |
| | | |
| | | mallGoodsSkuService.delete( |
| | | new EntityWrapper<MallGoodsSku>() |
| | | .in("goods_id", idArray) |
| | | ); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品信息状态上下架和商品审核接口 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品信息状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallGoodsId, Integer state, String auditRemark) { |
| | | mallGoodsService.updateForSet("state = " + state + ",audit_remark = '" + auditRemark + "'", new EntityWrapper<MallGoods>().eq("id", mallGoodsId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | @RequestMapping("/to_buyCount/{mallGoodsId}") |
| | | public String to_buyCount(@PathVariable Integer mallGoodsId, Model model) { |
| | | MallGoods mallGoods = mallGoodsService.selectById(mallGoodsId); |
| | | model.addAttribute("item", mallGoods); |
| | | return PREFIX + "mallGoods_buyCount.html"; |
| | | } |
| | | |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改销售量") |
| | | @RequestMapping(value = "/updateBuyCount") |
| | | public Object updateBuyCount(Integer mallGoodsId, Integer buyCount) { |
| | | mallGoodsService.updateForSet("buy_count = " + buyCount, new EntityWrapper<MallGoods>().eq("id", mallGoodsId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品信息推荐 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品信息推荐") |
| | | @RequestMapping(value = "/updateRecommend") |
| | | public Object updateRecommend(Integer mallGoodsId, Integer isRecommend, Integer sort) { |
| | | mallGoodsService.updateForSet("is_recommend = " + isRecommend + ",sort=" + sort, new EntityWrapper<MallGoods>().eq("id", mallGoodsId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转商品信息详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallGoodsId}") |
| | | public Object detail(@PathVariable("mallGoodsId") Integer mallGoodsId, Model model) { |
| | | MallGoods mallGoods = mallGoodsService.selectById(mallGoodsId); |
| | | mallGoods.setMallClassifyOne(this.mallClassifyOneService.selectById(mallGoods.getClassifyIdOne())); |
| | | |
| | | MallGoodsDetail goodsDetail = this.mallGoodsDetailService.selectById(mallGoods.getId()); |
| | | if (goodsDetail == null) { |
| | | goodsDetail = new MallGoodsDetail(); |
| | | } |
| | | |
| | | // 查询所有标签 |
| | | List<MallTag> mallTags = mallTagService.getMallTags(); |
| | | mallGoods.setTagIds(mallTagService.getTagListByGoodsId(mallTags, mallGoods.getTagIds()).stream().collect(Collectors.joining("、"))); |
| | | |
| | | model.addAttribute("item", mallGoods); |
| | | model.addAttribute("mallGoodsState", EnumMallGoodsState.getMarkByIndex(mallGoods.getState())); |
| | | model.addAttribute("mallGoodsDetail", goodsDetail); |
| | | model.addAttribute("introImageList", goodsDetail.getIntroImage().split(",")); |
| | | |
| | | return PREFIX + "mallGoods_detail.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/appView/{mallGoodsId}") |
| | | public Object appView(@PathVariable("mallGoodsId") Integer mallGoodsId, Model model) { |
| | | MallGoods mallGoods = mallGoodsService.selectById(mallGoodsId); |
| | | mallGoods.setMallClassifyOne(this.mallClassifyOneService.selectById(mallGoods.getClassifyIdOne())); |
| | | |
| | | MallGoodsDetail goodsDetail = this.mallGoodsDetailService.selectById(mallGoods.getId()); |
| | | if (goodsDetail == null) { |
| | | goodsDetail = new MallGoodsDetail(); |
| | | } |
| | | |
| | | model.addAttribute("item", mallGoods); |
| | | model.addAttribute("mallGoodsDetail", goodsDetail); |
| | | |
| | | return PREFIX + "mallGoods_appView.html"; |
| | | } |
| | | |
| | | @RequestMapping("/mallGoodsList") |
| | | @ResponseBody |
| | | public Object mallGoodsList(Integer groupType) { |
| | | Wrapper wrapper = new EntityWrapper<MallGoods>().eq("is_delete", 0).orderBy("id", false); |
| | | if (Objects.nonNull(groupType) && groupType == -1) { |
| | | wrapper.ne("group_type", 0); |
| | | } else if (Objects.nonNull(groupType)) { |
| | | wrapper.eq("group_type", groupType); |
| | | } |
| | | List<MallGoods> goodsList = mallGoodsService.selectList(wrapper); |
| | | List<HashMap<String, Object>> goodsMapList = goodsList.stream().map(goods -> { |
| | | HashMap<String, Object> goodMap = new HashMap<>(); |
| | | //商品编号 |
| | | goodMap.put("aGoodsNo", goods.getGoodsNo()); |
| | | goodMap.put("bName", goods.getGoodsName()); |
| | | goodMap.put("cGroupType", goods.getGroupType()); |
| | | String groupTypName = goods.getGroupType() > 0 ? (goods.getGroupType() == 1 ? "黄金套餐" : "钻石套餐") : "普通商品"; |
| | | goodMap.put("cGroupTypeName", groupTypName); |
| | | goodMap.put("dPrice", goods.getPrice()); |
| | | goodMap.put("dPriceDale", goods.getPriceSale()); |
| | | goodMap.put("ePriceMember", goods.getPriceMember()); |
| | | goodMap.put("fStock", goods.getStock()); |
| | | goodMap.put("gBuyCount", goods.getBuyCount()); |
| | | goodMap.put("hId", goods.getId()); |
| | | return goodMap; |
| | | }).collect(Collectors.toList()); |
| | | return new HashMap<String, Object>() {{ |
| | | put("code", 200); |
| | | put("value", goodsMapList); |
| | | }}; |
| | | } |
| | | |
| | | @ResponseBody |
| | | @BussinessLog(value = "获取商品分类") |
| | | @RequestMapping(value = "/getClassify") |
| | | public Object getClassify(@RequestParam(required = false) Integer oneClassifyId) { |
| | | if (oneClassifyId == null) { |
| | | return this.mallClassifyOneService.selectList(new EntityWrapper<MallClassifyOne>().eq("is_delete", EnumIsDelete.EXISTED.index)); |
| | | } else { |
| | | return new ArrayList<>(); |
| | | } |
| | | } |
| | | |
| | | @BussinessLog(value = "获取商品规格") |
| | | @RequestMapping(value = "/getGoodsSpecs") |
| | | public Object getGoodsSpecs(Integer oneClassifyId, Integer twoClassifyId, Model model) { |
| | | Wrapper<MallGoodsSpec> wrapper = new EntityWrapper<MallGoodsSpec>() |
| | | .eq("is_delete", EnumIsDelete.EXISTED.index) |
| | | .addFilter("concat(',',classify_id_one,',') like concat( '%,', {0}, ',%' )", oneClassifyId); |
| | | List<MallGoodsSpec> goodsSpecs = this.goodsSpecService.selectList(wrapper); |
| | | if (CollectionUtils.isEmpty(goodsSpecs)) { |
| | | goodsSpecs = Lists.newArrayList(); |
| | | } |
| | | model.addAttribute("goodsSpecs", goodsSpecs); |
| | | return PREFIX + "add_specs.html"; |
| | | } |
| | | |
| | | @ResponseBody |
| | | @BussinessLog(value = "获取商品规格的值") |
| | | @RequestMapping(value = "/getGoodsSpecValues") |
| | | public Object getGoodsSpecs(@RequestParam Integer specId) { |
| | | return this.goodsSpecValueService.selectList(new EntityWrapper<MallGoodsSpecValue>() |
| | | .eq("spec_id", specId)); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @BussinessLog(value = "获取商品列表") |
| | | @GetMapping(value = "/goodsByClassList") |
| | | public List<MallGoods> goodsByClassList(@RequestParam Integer classId) { |
| | | return mallGoodsService.selectList( |
| | | new EntityWrapper<MallGoods>() |
| | | .eq("is_delete", 0) |
| | | .eq("group_type", EnumMallGoodsGroupType.GOODS.index) |
| | | .in("state", Arrays.asList( |
| | | EnumMallGoodsState.FOR_SALE.index |
| | | )) |
| | | ); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @BussinessLog(value = "获取商品列表") |
| | | @GetMapping(value = "/goodsByIdsList") |
| | | public List<MallGoods> goodsByIdsList(@RequestParam String ids) { |
| | | return mallGoodsService.selectList( |
| | | new EntityWrapper<MallGoods>() |
| | | .eq("group_type", EnumMallGoodsGroupType.GOODS.index) |
| | | .in("id", ids.split(",")) |
| | | ); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallGoodsDetail; |
| | | import com.sinata.modular.mall.service.IMallGoodsDetailService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 商品详情控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallGoodsDetail") |
| | | public class MallGoodsDetailController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallGoodsDetail/"; |
| | | |
| | | @Autowired |
| | | private IMallGoodsDetailService mallGoodsDetailService; |
| | | |
| | | /** |
| | | * 跳转到商品详情首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallGoodsDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加商品详情 |
| | | */ |
| | | @RequestMapping("/mallGoodsDetail_add") |
| | | public String mallGoodsDetailAdd() { |
| | | return PREFIX + "mallGoodsDetail_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改商品详情 |
| | | */ |
| | | @RequestMapping("/mallGoodsDetail_update/{mallGoodsDetailId}") |
| | | public String mallGoodsDetailUpdate(@PathVariable Integer mallGoodsDetailId, Model model) { |
| | | MallGoodsDetail mallGoodsDetail = mallGoodsDetailService.selectById(mallGoodsDetailId); |
| | | model.addAttribute("item", mallGoodsDetail); |
| | | LogObjectHolder.me().set(mallGoodsDetail); |
| | | return PREFIX + "mallGoodsDetail_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取商品详情列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallGoodsDetail>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallGoodsDetailService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增商品详情 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增商品详情") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallGoodsDetail mallGoodsDetail) { |
| | | mallGoodsDetailService.insert(mallGoodsDetail); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除商品详情") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallGoodsDetailService.updateForSet("is_delete = 1", new EntityWrapper<MallGoodsDetail>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品详情 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品详情") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallGoodsDetail mallGoodsDetail) { |
| | | mallGoodsDetailService.updateById(mallGoodsDetail); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品详情状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品详情状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallGoodsDetailId, Integer state) { |
| | | mallGoodsDetailService.updateForSet("state = " + state, new EntityWrapper<MallGoodsDetail>().eq("id", mallGoodsDetailId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转商品详情详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallGoodsDetailId}") |
| | | public Object detail(@PathVariable("mallGoodsDetailId") Integer mallGoodsDetailId, Model model) { |
| | | MallGoodsDetail mallGoodsDetail = mallGoodsDetailService.selectById(mallGoodsDetailId); |
| | | model.addAttribute("item", mallGoodsDetail); |
| | | return PREFIX + "mallGoodsDetail_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.google.common.collect.Lists; |
| | | import com.sinata.common.enums.EnumIsDelete; |
| | | import com.sinata.common.enums.mall.EnumMallGoodsGroupType; |
| | | import com.sinata.common.enums.mall.EnumMallGoodsState; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.base.tips.ErrorTip; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.common.exception.BizExceptionEnum; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.core.util.Convert; |
| | | import com.sinata.core.util.DateUtils2; |
| | | import com.sinata.core.util.ExcelExportUtil; |
| | | import com.sinata.modular.mall.model.*; |
| | | import com.sinata.modular.mall.service.*; |
| | | import com.sinata.modular.system.service.IAreaCityService; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 套餐套餐商品控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallGoodsGroup") |
| | | public class MallGoodsGroupController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallGoodsGroup/"; |
| | | |
| | | @Autowired |
| | | private IMallGoodsService mallGoodsService; |
| | | |
| | | @Autowired |
| | | private IMallGoodsSkuService mallGoodsSkuService; |
| | | |
| | | @Autowired |
| | | private IMallClassifyOneService mallClassifyOneService; |
| | | |
| | | @Autowired |
| | | private IMallGoodsSpecService mallGoodsSpecService; |
| | | |
| | | @Autowired |
| | | private IMallGoodsDetailService mallGoodsDetailService; |
| | | |
| | | @Resource |
| | | private IMallGoodsSpecService goodsSpecService; |
| | | |
| | | @Resource |
| | | private IMallGoodsSpecValueService goodsSpecValueService; |
| | | |
| | | @Resource |
| | | private IMallTagService mallTagService; |
| | | |
| | | @Resource |
| | | private IMallGroupSpecService mallGroupSpecService; |
| | | |
| | | @Resource |
| | | private IAreaCityService areaCityService; |
| | | |
| | | @Resource |
| | | private IMallGoodsSetService mallGoodsSetService; |
| | | |
| | | |
| | | /** |
| | | * 跳转到套餐商品首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallGoodsGroup.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加套餐商品 |
| | | */ |
| | | @RequestMapping("/mallGoods_add") |
| | | public String mallGoodsAdd(Model model) { |
| | | // 查询所有标签 |
| | | model.addAttribute("mallTags", mallTagService.getMallTags()); |
| | | // 商品规格组 |
| | | model.addAttribute("goodsGroupSpecList", mallGroupSpecService.selectList( |
| | | new EntityWrapper<MallGroupSpec>() |
| | | .eq("is_delete", EnumIsDelete.EXISTED.index) |
| | | .le("start_time", DateUtil.now()) |
| | | .ge("end_time", DateUtil.now()) |
| | | )); |
| | | return PREFIX + "mallGoodsGroup_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改套餐商品 |
| | | */ |
| | | @RequestMapping("/mallGoods_update/{mallGoodsId}") |
| | | public String mallGoodsUpdate(@PathVariable Integer mallGoodsId, Model model) { |
| | | MallGoods mallGoods = mallGoodsService.selectById(mallGoodsId); |
| | | MallGoodsDetail goodsDetail = mallGoodsDetailService.selectById(mallGoodsId); |
| | | mallGoods.setIntroH5(goodsDetail.getIntroH5()); |
| | | mallGoods.setIntroImage(goodsDetail.getIntroImage()); |
| | | mallGoods.setPurchaseH5(goodsDetail.getPurchaseH5()); |
| | | model.addAttribute("item", mallGoods); |
| | | |
| | | MallGoodsSet goodsSet = mallGoodsSetService.selectById(mallGoodsId); |
| | | model.addAttribute("goodsSet", goodsSet); |
| | | |
| | | List<MallGoodsSku> skuList = mallGoodsSkuService.selectList( |
| | | new EntityWrapper<MallGoodsSku>() |
| | | .eq("goods_id", mallGoodsId) |
| | | .eq("merchant_id", 0) |
| | | ); |
| | | model.addAttribute("skuSpecIds", skuList.stream().map(MallGoodsSku::getSpecIds).collect(Collectors.joining(","))); |
| | | |
| | | // 查询所有标签 |
| | | model.addAttribute("mallTags", mallTagService.getMallTags()); |
| | | // 商品规格组 |
| | | model.addAttribute("goodsGroupSpecList", mallGroupSpecService.selectList( |
| | | new EntityWrapper<MallGroupSpec>() |
| | | .eq("is_delete", EnumIsDelete.EXISTED.index) |
| | | .le("start_time", DateUtil.now()) |
| | | .ge("end_time", DateUtil.now()) |
| | | )); |
| | | |
| | | LogObjectHolder.me().set(mallGoods); |
| | | return PREFIX + "mallGoodsGroup_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取套餐商品列表 |
| | | * |
| | | * @param id 商品id |
| | | * @param state 商品状态 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String goodsName, String id, Integer state, String goodsNo) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | |
| | | page.setRecords( |
| | | wrapperList(page, beginTime, endTime, goodsName, id, state, goodsNo) |
| | | ); |
| | | |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | public List<Map<String, Object>> wrapperList(Page<Map<String, Object>> page, String beginTime, String endTime, String goodsName, String id, Integer state, String goodsNo) { |
| | | Wrapper wrapper = new EntityWrapper<MallGoods>() |
| | | .ne("group_type", EnumMallGoodsGroupType.GOODS.index) |
| | | .eq("is_delete", 0) |
| | | .orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | if (!StringUtils.isEmpty(goodsName)) { |
| | | wrapper.like("goods_name", goodsName); |
| | | } |
| | | if (!StringUtils.isEmpty(id)) { |
| | | if (id.indexOf("sp") != -1) { |
| | | String idd = id.substring(id.indexOf("sp") + 2); |
| | | wrapper.eq("id", Integer.parseInt(idd)); |
| | | } else { |
| | | wrapper.eq("id", Integer.parseInt(id)); |
| | | } |
| | | } |
| | | if (state != null) { |
| | | wrapper.eq("state", state); |
| | | } |
| | | if (goodsNo != null) { |
| | | wrapper.like("goods_no", goodsNo); |
| | | } |
| | | |
| | | // 查询所有标签 |
| | | List<MallTag> mallTags = mallTagService.getMallTags(); |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list; |
| | | if (page != null) { |
| | | list = mallGoodsService.selectMapsPage(page, wrapper).getRecords(); |
| | | } else { |
| | | list = mallGoodsService.selectMaps(wrapper); |
| | | } |
| | | |
| | | // 规格列表 |
| | | List<MallGoodsSpec> selectList = mallGoodsSpecService.selectList(new EntityWrapper<MallGoodsSpec>().setSqlSelect("id, spec_name")); |
| | | |
| | | return list.stream().peek(m -> { |
| | | Object classObj = m.get("classifyIdOne"); |
| | | if (classObj != null) { |
| | | m.put("classifyName", mallClassifyOneService.selectById(Convert.toInt(classObj)).getClassifyName()); |
| | | } |
| | | |
| | | // 封装规格名 |
| | | List<String> specNameList = new ArrayList<>(); |
| | | List<MallGoodsSku> skuList = mallGoodsSkuService.selectList(new EntityWrapper<MallGoodsSku>().eq("goods_id", m.get("id")).eq("merchant_id", 0)); |
| | | for (MallGoodsSku sku : skuList) { |
| | | String[] spIds = sku.getSpecGrep().split(","); |
| | | for (String spId : spIds) { |
| | | for (MallGoodsSpec spec : selectList) { |
| | | if (spec.getId().toString().equals(spId)) { |
| | | specNameList.add(spec.getSpecName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | m.put("specNames", specNameList.stream().distinct().collect(Collectors.joining(","))); |
| | | |
| | | m.put("merchantCount", mallGoodsSkuService.selectCount( |
| | | new EntityWrapper<MallGoodsSku>() |
| | | .eq("goods_id", m.get("id")) |
| | | .ne("merchant_id", 0) |
| | | .groupBy("goods_id") |
| | | )); |
| | | |
| | | Object tagIds = m.get("tagIds"); |
| | | if (tagIds != null) { |
| | | m.put("tagIds", mallTagService.getTagListByGoodsId(mallTags, tagIds.toString()).stream().collect(Collectors.joining("、"))); |
| | | } |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/export") |
| | | public void export(String beginTime, String endTime, String goodsName, String id, Integer state, String goodsNo, HttpServletResponse response) { |
| | | List<Map<String, Object>> list = wrapperList(null, beginTime, endTime, goodsName, id, state, goodsNo); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<Object>> dataList = new ArrayList<>(); |
| | | |
| | | // 头部列【封装】 |
| | | List<Object> shellList = new ArrayList<>(); |
| | | 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("商品状态"); |
| | | dataList.add(shellList); |
| | | |
| | | // 详细数据列【封装】 |
| | | for (Map<String, Object> map : list) { |
| | | shellList = new ArrayList<>(); |
| | | shellList.add(map.get("createTime")); |
| | | shellList.add(map.get("goodsNo")); |
| | | shellList.add(map.get("classifyName")); |
| | | shellList.add(map.get("goodsName")); |
| | | shellList.add(map.get("goodsTitle")); |
| | | shellList.add(map.get("tagIds")); |
| | | shellList.add(map.get("specNames")); |
| | | shellList.add(map.get("buyCount")); |
| | | shellList.add(map.get("stock")); |
| | | shellList.add(map.get("merchantCount")); |
| | | shellList.add(map.get("priceSale")); |
| | | shellList.add(map.get("priceMember")); |
| | | shellList.add(EnumMallGoodsState.getMarkByIndex((Integer) map.get("state"))); |
| | | dataList.add(shellList); |
| | | } |
| | | try { |
| | | String title = "套餐商品"; |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet(title + DateUtils2.formatDate(new Date(), "YYYYMMddHHmmSS"), title, dataList, response); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增套餐商品") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallGoods mallGoods) { |
| | | mallGoods.setState(EnumMallGoodsState.FOR_SALE.getIndex()); |
| | | mallGoods.setGoodsSkus(JSONUtil.toList(mallGoods.getGoodsSkusJson(), MallGoodsSku.class)); |
| | | mallGoods.setGoodsSet(JSONUtil.toBean(mallGoods.getGoodsSetJson(), MallGoodsSet.class)); |
| | | mallGoodsService.saveMallGoods(mallGoods); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改套餐商品 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改套餐商品") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallGoods mallGoods) { |
| | | MallGoods oldGoods = this.mallGoodsService.selectById(mallGoods.getId()); |
| | | if (oldGoods == null) { |
| | | return new ErrorTip(BizExceptionEnum.REQUEST_INVALIDATE.getCode(), "商品不存在"); |
| | | } |
| | | |
| | | // MallGoodsDetail goodsDetail = this.mallGoodsDetailService.selectById(mallGoods.getId()); |
| | | // if (oldGoods.getState() == EnumMallGoodsState.CMS_REFUSE_SALE.getIndex() |
| | | // || !StrUtil.equals(oldGoods.getGoodsName(),mallGoods.getGoodsName()) |
| | | // || !StrUtil.equals(oldGoods.getGoodsImage(),mallGoods.getGoodsImage()) |
| | | // || !StrUtil.equals(goodsDetail.getIntroImage(),mallGoods.getIntroImage()) |
| | | // || !StrUtil.equals(goodsDetail.getIntroH5(),mallGoods.getIntroH5())) { |
| | | // mallGoods.setState(EnumMallGoodsState.WAIT_AUDIT.getIndex()); |
| | | // } |
| | | mallGoods.setGoodsSkus(JSONUtil.toList(mallGoods.getGoodsSkusJson(), MallGoodsSku.class)); |
| | | mallGoods.setGoodsSet(JSONUtil.toBean(mallGoods.getGoodsSetJson(), MallGoodsSet.class)); |
| | | mallGoodsService.updateMallGoods(mallGoods); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除套餐商品") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallGoodsService.updateForSet("is_delete = 1", new EntityWrapper<MallGoods>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改套餐商品状态上下架和商品审核接口 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改套餐商品状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallGoodsId, Integer state, String auditRemark) { |
| | | mallGoodsService.updateForSet("state = " + state + ",audit_remark = '" + auditRemark + "'", new EntityWrapper<MallGoods>().eq("id", mallGoodsId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | @RequestMapping("/to_buyCount/{mallGoodsId}") |
| | | public String to_buyCount(@PathVariable Integer mallGoodsId, Model model) { |
| | | MallGoods mallGoods = mallGoodsService.selectById(mallGoodsId); |
| | | model.addAttribute("item", mallGoods); |
| | | return PREFIX + "mallGoodsGroup_buyCount.html"; |
| | | } |
| | | |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改销售量") |
| | | @RequestMapping(value = "/updateBuyCount") |
| | | public Object updateBuyCount(Integer mallGoodsId, Integer buyCount) { |
| | | mallGoodsService.updateForSet("buy_count = " + buyCount, new EntityWrapper<MallGoods>().eq("id", mallGoodsId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改套餐商品推荐 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改套餐商品推荐") |
| | | @RequestMapping(value = "/updateRecommend") |
| | | public Object updateRecommend(Integer mallGoodsId, Integer isRecommend, Integer sort) { |
| | | mallGoodsService.updateForSet("is_recommend = " + isRecommend + ",sort=" + sort, new EntityWrapper<MallGoods>().eq("id", mallGoodsId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转套餐商品详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallGoodsId}") |
| | | public Object detail(@PathVariable("mallGoodsId") Integer mallGoodsId, Model model) { |
| | | MallGoods mallGoods = mallGoodsService.selectById(mallGoodsId); |
| | | mallGoods.setMallClassifyOne(this.mallClassifyOneService.selectById(mallGoods.getClassifyIdOne())); |
| | | |
| | | MallGoodsDetail goodsDetail = this.mallGoodsDetailService.selectById(mallGoods.getId()); |
| | | if (goodsDetail == null) { |
| | | goodsDetail = new MallGoodsDetail(); |
| | | } |
| | | |
| | | List<MallGoodsSku> skuList = mallGoodsSkuService.selectList( |
| | | new EntityWrapper<MallGoodsSku>() |
| | | .eq("goods_id", mallGoodsId) |
| | | .eq("merchant_id", 0) |
| | | ); |
| | | model.addAttribute("skuSpecIds", skuList.stream().map(MallGoodsSku::getSpecIds).collect(Collectors.joining(","))); |
| | | |
| | | // 查询所有标签 |
| | | List<MallTag> mallTags = mallTagService.getMallTags(); |
| | | mallGoods.setTagIds(mallTagService.getTagListByGoodsId(mallTags, mallGoods.getTagIds()).stream().collect(Collectors.joining("、"))); |
| | | |
| | | // 商品规格组 |
| | | model.addAttribute("goodsGroupSpecList", mallGroupSpecService.selectList( |
| | | new EntityWrapper<MallGroupSpec>() |
| | | .eq("is_delete", EnumIsDelete.EXISTED.index) |
| | | .le("start_time", DateUtil.now()) |
| | | .ge("end_time", DateUtil.now()) |
| | | )); |
| | | |
| | | model.addAttribute("item", mallGoods); |
| | | model.addAttribute("mallGoodsState", EnumMallGoodsState.getMarkByIndex(mallGoods.getState())); |
| | | model.addAttribute("mallGoodsDetail", goodsDetail); |
| | | model.addAttribute("introImageList", goodsDetail.getIntroImage().split(",")); |
| | | |
| | | return PREFIX + "mallGoodsGroup_detail.html"; |
| | | } |
| | | /** |
| | | * 跳转查看区域 |
| | | */ |
| | | @RequestMapping(value = "/area/{mallGoodsId}") |
| | | public Object area(@PathVariable("mallGoodsId") Integer mallGoodsId, Model model) { |
| | | MallGoods mallGoods = mallGoodsService.selectById(mallGoodsId); |
| | | model.addAttribute("item", mallGoods); |
| | | |
| | | Map map = new HashMap(); |
| | | map.put("city", "四川省"); |
| | | map.put("spec", "规格A"); |
| | | map.put("stock", "99"); |
| | | model.addAttribute("list", Arrays.asList(map)); |
| | | |
| | | return PREFIX + "mallGoodsGroup_area.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/appView/{mallGoodsId}") |
| | | public Object appView(@PathVariable("mallGoodsId") Integer mallGoodsId, Model model) { |
| | | MallGoods mallGoods = mallGoodsService.selectById(mallGoodsId); |
| | | mallGoods.setMallClassifyOne(this.mallClassifyOneService.selectById(mallGoods.getClassifyIdOne())); |
| | | |
| | | MallGoodsDetail goodsDetail = this.mallGoodsDetailService.selectById(mallGoods.getId()); |
| | | if (goodsDetail == null) { |
| | | goodsDetail = new MallGoodsDetail(); |
| | | } |
| | | |
| | | model.addAttribute("item", mallGoods); |
| | | model.addAttribute("mallGoodsDetail", goodsDetail); |
| | | |
| | | return PREFIX + "mallGoodsGroup_appView.html"; |
| | | } |
| | | |
| | | @RequestMapping("/mallGoodsList") |
| | | @ResponseBody |
| | | public Object mallGoodsList(Integer groupType) { |
| | | Wrapper wrapper = new EntityWrapper<MallGoods>().eq("is_delete", 0).orderBy("id", false); |
| | | if (Objects.nonNull(groupType) && groupType == -1) { |
| | | wrapper.ne("group_type", 0); |
| | | } else if (Objects.nonNull(groupType)) { |
| | | wrapper.eq("group_type", groupType); |
| | | } |
| | | List<MallGoods> goodsList = mallGoodsService.selectList(wrapper); |
| | | List<HashMap<String, Object>> goodsMapList = goodsList.stream().map(goods -> { |
| | | HashMap<String, Object> goodMap = new HashMap<>(); |
| | | //商品编号 |
| | | goodMap.put("aGoodsNo", goods.getGoodsNo()); |
| | | goodMap.put("bName", goods.getGoodsName()); |
| | | goodMap.put("cGroupType", goods.getGroupType()); |
| | | String groupTypName = goods.getGroupType() > 0 ? (goods.getGroupType() == 1 ? "黄金套餐" : "钻石套餐") : "普通商品"; |
| | | goodMap.put("cGroupTypeName", groupTypName); |
| | | goodMap.put("dPrice", goods.getPrice()); |
| | | goodMap.put("dPriceDale", goods.getPriceSale()); |
| | | goodMap.put("ePriceMember", goods.getPriceMember()); |
| | | goodMap.put("fStock", goods.getStock()); |
| | | goodMap.put("gBuyCount", goods.getBuyCount()); |
| | | goodMap.put("hId", goods.getId()); |
| | | return goodMap; |
| | | }).collect(Collectors.toList()); |
| | | return new HashMap<String, Object>() {{ |
| | | put("code", 200); |
| | | put("value", goodsMapList); |
| | | }}; |
| | | } |
| | | |
| | | @ResponseBody |
| | | @BussinessLog(value = "获取商品分类") |
| | | @RequestMapping(value = "/getClassify") |
| | | public Object getClassify(@RequestParam(required = false) Integer oneClassifyId) { |
| | | if (oneClassifyId == null) { |
| | | return this.mallClassifyOneService.selectList(new EntityWrapper<MallClassifyOne>().eq("is_delete", EnumIsDelete.EXISTED.index)); |
| | | } else { |
| | | return new ArrayList<>(); |
| | | } |
| | | } |
| | | |
| | | @BussinessLog(value = "获取商品规格") |
| | | @RequestMapping(value = "/getGoodsSpecs") |
| | | public Object getGoodsSpecs(Integer oneClassifyId, Integer twoClassifyId, Model model) { |
| | | Wrapper<MallGoodsSpec> wrapper = new EntityWrapper<MallGoodsSpec>() |
| | | .eq("is_delete", EnumIsDelete.EXISTED.index) |
| | | .addFilter("concat(',',classify_id_one,',') like concat( '%,', {0}, ',%' )", oneClassifyId); |
| | | List<MallGoodsSpec> goodsSpecs = this.goodsSpecService.selectList(wrapper); |
| | | if (CollectionUtils.isEmpty(goodsSpecs)) { |
| | | goodsSpecs = Lists.newArrayList(); |
| | | } |
| | | model.addAttribute("goodsSpecs", goodsSpecs); |
| | | return PREFIX + "add_specs.html"; |
| | | } |
| | | |
| | | @ResponseBody |
| | | @BussinessLog(value = "获取商品规格的值") |
| | | @RequestMapping(value = "/getGoodsSpecValues") |
| | | public Object getGoodsSpecs(@RequestParam Integer specId) { |
| | | return this.goodsSpecValueService.selectList(new EntityWrapper<MallGoodsSpecValue>() |
| | | .eq("spec_id", specId)); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @BussinessLog(value = "获取套餐规格组信息") |
| | | @GetMapping(value = "/groupSpecByIdsList") |
| | | public List<MallGroupSpec> groupSpecByIdsList(@RequestParam String ids, Integer mallGoodsId) { |
| | | // 商品列表 |
| | | List<MallGoods> goodsList = mallGoodsService.selectList(new EntityWrapper<MallGoods>()); |
| | | List<MallGoodsSku> skuList = mallGoodsSkuService.selectList( |
| | | new EntityWrapper<MallGoodsSku>() |
| | | .eq(mallGoodsId != null, "goods_id", mallGoodsId) |
| | | .eq("merchant_id", 0) |
| | | ); |
| | | |
| | | List<MallGroupSpec> list = mallGroupSpecService.selectList( |
| | | new EntityWrapper<MallGroupSpec>() |
| | | .in("id", ids.split(",")) |
| | | ); |
| | | |
| | | return list.stream().map(o -> { |
| | | String[] goodsIds = o.getGoodsIds().split(","); |
| | | |
| | | List<MallGoods> mallGoodsList = goodsList.stream() |
| | | .filter(ggg -> { |
| | | for (String gid : goodsIds) { |
| | | if (gid.equals(ggg.getId() + "")) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | o.setGoodsNames( |
| | | mallGoodsList.stream() |
| | | .map(MallGoods::getGoodsName) |
| | | .collect(Collectors.joining(",")) |
| | | ); |
| | | |
| | | o.setTotalPrice( |
| | | mallGoodsList.stream() |
| | | .map(MallGoods::getPrice) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add) |
| | | ); |
| | | |
| | | BigDecimal priceMerchant = BigDecimal.ZERO; |
| | | for (MallGoodsSku sku : skuList) { |
| | | if (sku.getSpecIds().equals(o.getId().toString())) { |
| | | priceMerchant = sku.getPriceMerchant(); |
| | | } |
| | | } |
| | | o.setPriceMerchant(priceMerchant); |
| | | |
| | | return o; |
| | | }).collect(Collectors.toList()); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallGoodsSku; |
| | | import com.sinata.modular.mall.service.IMallGoodsSkuService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 商品规格组合sku表控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallGoodsSku") |
| | | public class MallGoodsSkuController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallGoodsSku/"; |
| | | |
| | | @Autowired |
| | | private IMallGoodsSkuService mallGoodsSkuService; |
| | | |
| | | /** |
| | | * 跳转到商品规格组合sku表首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallGoodsSku.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加商品规格组合sku表 |
| | | */ |
| | | @RequestMapping("/mallGoodsSku_add") |
| | | public String mallGoodsSkuAdd() { |
| | | return PREFIX + "mallGoodsSku_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改商品规格组合sku表 |
| | | */ |
| | | @RequestMapping("/mallGoodsSku_update/{mallGoodsSkuId}") |
| | | public String mallGoodsSkuUpdate(@PathVariable Integer mallGoodsSkuId, Model model) { |
| | | MallGoodsSku mallGoodsSku = mallGoodsSkuService.selectById(mallGoodsSkuId); |
| | | model.addAttribute("item", mallGoodsSku); |
| | | LogObjectHolder.me().set(mallGoodsSku); |
| | | return PREFIX + "mallGoodsSku_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取商品规格组合sku表列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallGoodsSku>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallGoodsSkuService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增商品规格组合sku表 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增商品规格组合sku表") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallGoodsSku mallGoodsSku) { |
| | | mallGoodsSkuService.insert(mallGoodsSku); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除商品规格组合sku表") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallGoodsSkuService.updateForSet("is_delete = 1", new EntityWrapper<MallGoodsSku>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品规格组合sku表 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品规格组合sku表") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallGoodsSku mallGoodsSku) { |
| | | mallGoodsSkuService.updateById(mallGoodsSku); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品规格组合sku表状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品规格组合sku表状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallGoodsSkuId, Integer state) { |
| | | mallGoodsSkuService.updateForSet("state = " + state, new EntityWrapper<MallGoodsSku>().eq("id", mallGoodsSkuId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转商品规格组合sku表详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallGoodsSkuId}") |
| | | public Object detail(@PathVariable("mallGoodsSkuId") Integer mallGoodsSkuId, Model model) { |
| | | MallGoodsSku mallGoodsSku = mallGoodsSkuService.selectById(mallGoodsSkuId); |
| | | model.addAttribute("item", mallGoodsSku); |
| | | return PREFIX + "mallGoodsSku_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | 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.google.common.collect.Lists; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.base.tips.ErrorTip; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.*; |
| | | import com.sinata.modular.mall.service.*; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.*; |
| | | |
| | | /** |
| | | * 规格属性控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallGoodsSpec") |
| | | public class MallGoodsSpecController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallGoodsSpec/"; |
| | | |
| | | @Autowired |
| | | private IMallGoodsSpecService mallGoodsSpecService; |
| | | |
| | | @Autowired |
| | | private IMallClassifyOneService iMallClassifyOneService; |
| | | |
| | | @Autowired |
| | | private IMallClassifyTwoService iMallClassifyTwoService; |
| | | |
| | | @Autowired |
| | | private IMallGoodsSpecValueService mallGoodsSpecValueService; |
| | | |
| | | @Autowired |
| | | private IMallGoodsSkuService mallGoodsSkuService; |
| | | |
| | | /** |
| | | * 跳转到规格属性首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallGoodsSpec.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加规格属性 |
| | | */ |
| | | @RequestMapping("/mallGoodsSpec_add") |
| | | public String mallGoodsSpecAdd(Model model) { |
| | | List<MallClassifyOne> mallClassifyOneList = this.iMallClassifyOneService.selectList(new EntityWrapper<MallClassifyOne>().eq("is_delete", 0)); |
| | | List<String> oneIds = Lists.newArrayList(); |
| | | for (MallClassifyOne classifyOne : mallClassifyOneList) { |
| | | oneIds.add("" + classifyOne.getId()); |
| | | } |
| | | |
| | | model.addAttribute("mallClassifyOneList", mallClassifyOneList); |
| | | model.addAttribute("oneIds", String.join(",", oneIds)); |
| | | return PREFIX + "mallGoodsSpec_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改规格属性 |
| | | */ |
| | | @RequestMapping("/mallGoodsSpec_update/{mallGoodsSpecId}") |
| | | public String mallGoodsSpecUpdate(@PathVariable Integer mallGoodsSpecId, Model model) { |
| | | MallGoodsSpec mallGoodsSpec = mallGoodsSpecService.selectById(mallGoodsSpecId); |
| | | model.addAttribute("item", mallGoodsSpec); |
| | | List<MallClassifyOne> mallClassifyOneList = this.iMallClassifyOneService.selectList(new EntityWrapper<MallClassifyOne>().eq("is_delete", 0)); |
| | | model.addAttribute("mallClassifyOneList", mallClassifyOneList); |
| | | model.addAttribute("mallSpecValues", this.mallGoodsSpecValueService |
| | | .selectList(new EntityWrapper<MallGoodsSpecValue>().eq("spec_id", mallGoodsSpecId) |
| | | .eq("is_delete", "0"))); |
| | | LogObjectHolder.me().set(mallGoodsSpec); |
| | | return PREFIX + "mallGoodsSpec_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取规格属性列表 |
| | | * |
| | | * @param specName 规格属性名称 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String specName) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallGoodsSpec>() |
| | | .ne("is_delete", 1).orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | if (!StringUtils.isEmpty(specName)) { |
| | | wrapper.like("spec_name", specName); |
| | | } |
| | | Map<String, String> classMap = getClassIdAndName(); |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallGoodsSpecService.selectMapsPage(page, wrapper).getRecords(); |
| | | if (CollectionUtils.isNotEmpty(list)) { |
| | | for (Map<String, Object> map : list) { |
| | | StringBuffer classNames = new StringBuffer(""); |
| | | String oneIds = (String) map.get("classifyIdOne"); |
| | | if (org.apache.commons.lang3.StringUtils.isNotEmpty(oneIds)) { |
| | | String[] ids = oneIds.split(","); |
| | | for (String id : ids) { |
| | | String className = classMap.get(id); |
| | | if (org.apache.commons.lang3.StringUtils.isNotEmpty(className)) { |
| | | classNames.append(className + ","); |
| | | } |
| | | } |
| | | } |
| | | |
| | | map.put("classNames", classNames.toString()); |
| | | } |
| | | } |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * @Title: getClassIdAndName |
| | | * @Description: 获取类型对应类型和名字map |
| | | * @author guohongjin |
| | | * @date 2023/3/20 |
| | | */ |
| | | @RequestMapping("/getClassIdAndName") |
| | | @ResponseBody |
| | | public Map<String, String> getClassIdAndName() { |
| | | Map<String, String> classMap = new HashMap<String, String>(); |
| | | List<MallClassifyOne> mallClassifyOneList = this.iMallClassifyOneService.selectList(new EntityWrapper<MallClassifyOne>().eq("is_delete", 0)); |
| | | if (CollectionUtils.isNotEmpty(mallClassifyOneList)) { |
| | | for (MallClassifyOne mallClassifyOne : mallClassifyOneList) { |
| | | classMap.put(mallClassifyOne.getId() + "", mallClassifyOne.getClassifyName()); |
| | | } |
| | | } |
| | | return classMap; |
| | | } |
| | | |
| | | /** |
| | | * 新增规格属性 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增规格属性") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallGoodsSpec mallGoodsSpec) { |
| | | mallGoodsSpecService.insert(mallGoodsSpec); |
| | | // if (org.apache.commons.lang3.StringUtils.isNotEmpty(mallGoodsSpec.getSpecValuesJson())){ |
| | | // List<MallGoodsSpecValue> mallGoodsSpecValueList = JSONObject.parseArray(mallGoodsSpec.getSpecValuesJson(),MallGoodsSpecValue.class); |
| | | // mallGoodsSpecValueList.forEach(mallGoodsSpecValue -> { |
| | | // mallGoodsSpecValue.setSpecId(mallGoodsSpec.getId()); |
| | | // }); |
| | | // this.mallGoodsSpecValueService.insertBatch(mallGoodsSpecValueList); |
| | | // } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除规格属性") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | String[] idd = ids.split(","); |
| | | if (idd.length == 1) { |
| | | int count1 = this.mallGoodsSkuService.selectCount(new EntityWrapper<MallGoodsSku>().where("FIND_IN_SET({0},spec_ids)", idd[0])); |
| | | if (count1 == 0) { |
| | | // 逻辑删除 |
| | | mallGoodsSpecService.updateForSet("is_delete = 1", new EntityWrapper<MallGoodsSpec>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } else { |
| | | ErrorTip errorTip = new ErrorTip(500, "该规格已被使用,不能删除"); |
| | | return errorTip; |
| | | } |
| | | } else { |
| | | boolean state = false; |
| | | for (String id : idd) { |
| | | int count1 = this.mallGoodsSkuService.selectCount(new EntityWrapper<MallGoodsSku>().where("FIND_IN_SET({0},spec_ids)", id)); |
| | | if (count1 == 0) { |
| | | // 逻辑删除 |
| | | mallGoodsSpecService.updateForSet("is_delete = 1", new EntityWrapper<MallGoodsSpec>().in("id", ids.split(","))); |
| | | } else { |
| | | state = true; |
| | | } |
| | | } |
| | | if (state) { |
| | | ErrorTip errorTip = new ErrorTip(500, "已经被使用的分类删除失败。请解除关联关系后再删除"); |
| | | return errorTip; |
| | | } else { |
| | | return SUCCESS_TIP; |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改规格属性 |
| | | * |
| | | * @param specValueIds 规格值ids 需要删除的没有删除的为null |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改规格属性") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallGoodsSpec mallGoodsSpec, String specValueIds, String deleteSpecValueIds) { |
| | | mallGoodsSpecService.updateById(mallGoodsSpec); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改规格属性状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改规格属性状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallGoodsSpecId, Integer state) { |
| | | mallGoodsSpecService.updateForSet("is_lock = " + state, new EntityWrapper<MallGoodsSpec>().eq("id", mallGoodsSpecId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转规格属性详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallGoodsSpecId}") |
| | | public Object detail(@PathVariable("mallGoodsSpecId") Integer mallGoodsSpecId, Model model) { |
| | | MallGoodsSpec mallGoodsSpec = mallGoodsSpecService.selectById(mallGoodsSpecId); |
| | | model.addAttribute("item", mallGoodsSpec); |
| | | return PREFIX + "mallGoodsSpec_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallGoodsSpecValue; |
| | | import com.sinata.modular.mall.service.IMallGoodsSpecValueService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 规格值控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallGoodsSpecValue") |
| | | public class MallGoodsSpecValueController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallGoodsSpecValue/"; |
| | | |
| | | @Autowired |
| | | private IMallGoodsSpecValueService mallGoodsSpecValueService; |
| | | |
| | | /** |
| | | * 跳转到规格值首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallGoodsSpecValue.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加规格值 |
| | | */ |
| | | @RequestMapping("/mallGoodsSpecValue_add") |
| | | public String mallGoodsSpecValueAdd() { |
| | | return PREFIX + "mallGoodsSpecValue_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改规格值 |
| | | */ |
| | | @RequestMapping("/mallGoodsSpecValue_update/{mallGoodsSpecValueId}") |
| | | public String mallGoodsSpecValueUpdate(@PathVariable Integer mallGoodsSpecValueId, Model model) { |
| | | MallGoodsSpecValue mallGoodsSpecValue = mallGoodsSpecValueService.selectById(mallGoodsSpecValueId); |
| | | model.addAttribute("item", mallGoodsSpecValue); |
| | | LogObjectHolder.me().set(mallGoodsSpecValue); |
| | | return PREFIX + "mallGoodsSpecValue_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取规格值列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallGoodsSpecValue>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallGoodsSpecValueService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增规格值 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增规格值") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallGoodsSpecValue mallGoodsSpecValue) { |
| | | mallGoodsSpecValueService.insert(mallGoodsSpecValue); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除规格值") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallGoodsSpecValueService.updateForSet("is_delete = 1", new EntityWrapper<MallGoodsSpecValue>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改规格值 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改规格值") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallGoodsSpecValue mallGoodsSpecValue) { |
| | | mallGoodsSpecValueService.updateById(mallGoodsSpecValue); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改规格值状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改规格值状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallGoodsSpecValueId, Integer state) { |
| | | mallGoodsSpecValueService.updateForSet("state = " + state, new EntityWrapper<MallGoodsSpecValue>().eq("id", mallGoodsSpecValueId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转规格值详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallGoodsSpecValueId}") |
| | | public Object detail(@PathVariable("mallGoodsSpecValueId") Integer mallGoodsSpecValueId, Model model) { |
| | | MallGoodsSpecValue mallGoodsSpecValue = mallGoodsSpecValueService.selectById(mallGoodsSpecValueId); |
| | | model.addAttribute("item", mallGoodsSpecValue); |
| | | return PREFIX + "mallGoodsSpecValue_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.common.enums.EnumIsDelete; |
| | | import com.sinata.common.enums.mall.EnumMallGoodsGroupType; |
| | | import com.sinata.common.enums.mall.EnumMallGoodsState; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.base.tips.ErrorTip; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallClassifyOne; |
| | | import com.sinata.modular.mall.model.MallGoods; |
| | | import com.sinata.modular.mall.model.MallGroupSpec; |
| | | import com.sinata.modular.mall.service.IMallClassifyOneService; |
| | | import com.sinata.modular.mall.service.IMallGoodsService; |
| | | import com.sinata.modular.mall.service.IMallGroupSpecService; |
| | | import com.sinata.modular.system.model.AreaCity; |
| | | import com.sinata.modular.system.service.IAreaCityService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 规格组控制器 |
| | | * |
| | | * @author Goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallGroupSpec") |
| | | public class MallGroupSpecController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallGroupSpec/"; |
| | | |
| | | @Autowired |
| | | private IMallClassifyOneService classifyOneService; |
| | | |
| | | @Autowired |
| | | private IMallGoodsService mallGoodsService; |
| | | |
| | | @Autowired |
| | | private IAreaCityService areaCityService; |
| | | |
| | | @Autowired |
| | | private IMallGroupSpecService mallGroupSpecService; |
| | | |
| | | /** |
| | | * 跳转到规格组首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallGroupSpec.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加规格组 |
| | | */ |
| | | @RequestMapping("/mallGroupSpec_add") |
| | | public String mallGroupSpecAdd(Model model) { |
| | | model.addAttribute("classList", this.classifyOneService.selectList(new EntityWrapper<MallClassifyOne>().eq("is_delete", EnumIsDelete.EXISTED.index))); |
| | | model.addAttribute("goodsByClassList", mallGoodsService.selectList( |
| | | new EntityWrapper<MallGoods>() |
| | | .eq("is_delete", EnumIsDelete.EXISTED.index) |
| | | .eq("group_type", EnumMallGoodsGroupType.GOODS.index) |
| | | .in("state", Arrays.asList( |
| | | EnumMallGoodsState.FOR_SALE.index |
| | | )) |
| | | )); |
| | | model.addAttribute("cityAreaList", areaCityService.selectList( |
| | | new EntityWrapper<AreaCity>() |
| | | .orderBy("id", false) |
| | | .eq("is_open", 1) |
| | | .eq("is_delete", EnumIsDelete.EXISTED.index) |
| | | .groupBy("province_code") |
| | | )); |
| | | return PREFIX + "mallGroupSpec_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改规格组 |
| | | */ |
| | | @RequestMapping("/mallGroupSpec_update/{mallGroupSpecId}") |
| | | public String mallGroupSpecUpdate(@PathVariable Integer mallGroupSpecId, Model model) { |
| | | model.addAttribute("classList", this.classifyOneService.selectList(new EntityWrapper<MallClassifyOne>().eq("is_delete", EnumIsDelete.EXISTED.index))); |
| | | model.addAttribute("goodsByClassList", mallGoodsService.selectList( |
| | | new EntityWrapper<MallGoods>() |
| | | .eq("is_delete", EnumIsDelete.EXISTED.index) |
| | | .eq("group_type", EnumMallGoodsGroupType.GOODS.index) |
| | | .in("state", Arrays.asList( |
| | | EnumMallGoodsState.FOR_SALE.index |
| | | )) |
| | | )); |
| | | model.addAttribute("cityAreaList", areaCityService.selectList( |
| | | new EntityWrapper<AreaCity>() |
| | | .orderBy("id", false) |
| | | .eq("is_open", 1) |
| | | .eq("is_delete", EnumIsDelete.EXISTED.index) |
| | | .groupBy("province_code") |
| | | )); |
| | | |
| | | MallGroupSpec mallGroupSpec = mallGroupSpecService.selectById(mallGroupSpecId); |
| | | model.addAttribute("item", mallGroupSpec); |
| | | LogObjectHolder.me().set(mallGroupSpec); |
| | | return PREFIX + "mallGroupSpec_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取规格组列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallGroupSpec>() |
| | | .eq("is_delete", EnumIsDelete.EXISTED.index) |
| | | .orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | if (!StringUtils.isEmpty(condition)) { |
| | | wrapper.like("spec_name", condition); |
| | | } |
| | | |
| | | // 商品分类 |
| | | List<MallClassifyOne> classifyOneList = classifyOneService.selectList( |
| | | new EntityWrapper<MallClassifyOne>() |
| | | .eq("is_delete", EnumIsDelete.EXISTED.index) |
| | | ); |
| | | // 商品列表 |
| | | List<MallGoods> goodsList = mallGoodsService.selectList(new EntityWrapper<MallGoods>().setSqlSelect("id, goods_name")); |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallGroupSpecService.selectMapsPage(page, wrapper).getRecords(); |
| | | list.stream().map(o -> { |
| | | o.put("classifyName", classifyOneList.stream() |
| | | .filter(ccc -> ccc.getId().toString().equals(o.get("classifyIdOne") + "")) |
| | | .map(MallClassifyOne::getClassifyName) |
| | | .findFirst() |
| | | .orElse(null) |
| | | ); |
| | | |
| | | String[] ids = (o.get("goodsIds") + "").split(","); |
| | | o.put("goodsNames", goodsList.stream() |
| | | .filter(ggg -> { |
| | | for (String gid : ids) { |
| | | if (gid.equals(ggg.getId() + "")) { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | }) |
| | | .map(MallGoods::getGoodsName) |
| | | .collect(Collectors.joining(","))); |
| | | return o; |
| | | }).collect(Collectors.toList()); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增规格组 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增规格组") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallGroupSpec mallGroupSpec) { |
| | | // 判断商品最低库存 |
| | | Object result = minStock(mallGroupSpec.getGoodsIds(), mallGroupSpec.getStock()); |
| | | if (result != null) { |
| | | return result; |
| | | } |
| | | |
| | | mallGroupSpecService.insert(mallGroupSpec); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除规格组") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallGroupSpecService.updateForSet("is_delete = 1", new EntityWrapper<MallGroupSpec>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改规格组 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改规格组") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallGroupSpec mallGroupSpec) { |
| | | // 判断商品最低库存 |
| | | Object result = minStock(mallGroupSpec.getGoodsIds(), mallGroupSpec.getStock()); |
| | | if (result != null) { |
| | | return result; |
| | | } |
| | | |
| | | mallGroupSpecService.updateById(mallGroupSpec); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | public Object minStock(String goodsIds, Integer stock) { |
| | | Object minStock = mallGoodsService.selectObj( |
| | | new EntityWrapper<MallGoods>() |
| | | .setSqlSelect("stock") |
| | | .orderBy("stock") |
| | | .in("id", goodsIds.split(",")) |
| | | .last("LIMIT 1") |
| | | ); |
| | | if (minStock != null && stock > Integer.parseInt(minStock + "")) { |
| | | return new ErrorTip(500, "规格组库存不能高于商品最小库存!"); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 修改规格组状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改规格组状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallGroupSpecId, Integer state) { |
| | | mallGroupSpecService.updateForSet("is_lock = " + state, new EntityWrapper<MallGroupSpec>().eq("id", mallGroupSpecId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转规格组详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallGroupSpecId}") |
| | | public Object detail(@PathVariable("mallGroupSpecId") Integer mallGroupSpecId, Model model) { |
| | | MallGroupSpec mallGroupSpec = mallGroupSpecService.selectById(mallGroupSpecId); |
| | | model.addAttribute("item", mallGroupSpec); |
| | | return PREFIX + "mallGroupSpec_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.convert.Convert; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.mapper.Condition; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.google.common.collect.Lists; |
| | | import com.sinata.common.enums.EnumMemberGrade; |
| | | import com.sinata.common.enums.mall.EnumMallOrderState; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.util.DateUtils2; |
| | | import com.sinata.core.util.ExcelExportUtil; |
| | | import com.sinata.core.util.ExpressApi; |
| | | import com.sinata.core.util.PayUtil; |
| | | import com.sinata.modular.mall.dto.OrderSearchDto; |
| | | import com.sinata.modular.mall.model.MallGoods; |
| | | import com.sinata.modular.mall.model.MallGoodsSet; |
| | | import com.sinata.modular.mall.model.MallOrder; |
| | | import com.sinata.modular.mall.model.MallOrderDetail; |
| | | import com.sinata.modular.mall.service.*; |
| | | import com.sinata.modular.member.model.MemUser; |
| | | import com.sinata.modular.member.service.IMemUserService; |
| | | import com.sinata.modular.system.service.IMallOrderDetailUseService; |
| | | import com.sinata.modular.system.service.IMyCouponService; |
| | | 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.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 商品订单控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallOrder") |
| | | public class MallOrderController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallOrder/"; |
| | | |
| | | @Resource |
| | | private IMemUserService memUserService; |
| | | |
| | | @Resource |
| | | private IMyCouponService myCouponService; |
| | | |
| | | @Autowired |
| | | private IMallOrderService mallOrderService; |
| | | |
| | | @Resource |
| | | private IMallOrderDetailUseService useService; |
| | | |
| | | @Resource |
| | | private IMallGoodsSetService mallGoodsSetService; |
| | | |
| | | @Resource |
| | | private IMallGoodsService mallGoodsService; |
| | | |
| | | @Resource |
| | | private IMallOrderDetailService mallOrderDetailService; |
| | | |
| | | @Resource |
| | | private IMallExpressCompanyService mallExpressCompanyService; |
| | | |
| | | |
| | | private MallOrder selectById(String orderNo) { |
| | | return this.mallOrderService.selectOne(new EntityWrapper<MallOrder>() |
| | | .eq("order_no", orderNo)); |
| | | } |
| | | |
| | | /** |
| | | * 跳转到商品订单首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallOrder.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加商品订单 |
| | | */ |
| | | @RequestMapping("/mallOrder_add") |
| | | public String mallOrderAdd() { |
| | | return PREFIX + "mallOrder_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到设置运费 |
| | | */ |
| | | @RequestMapping("/setFreightAuth/{orderNo}") |
| | | public String mallOrderUpdate(@PathVariable String orderNo, Model model) { |
| | | model.addAttribute("item", selectById(orderNo)); |
| | | return PREFIX + "setFreightAuth.html"; |
| | | } |
| | | |
| | | /** |
| | | * 订单发货页面 |
| | | */ |
| | | @RequestMapping(value = "/deliverAuth/{orderNo}") |
| | | public String deliverAuth(@PathVariable String orderNo, Model model) { |
| | | model.addAttribute("orderNo", orderNo); |
| | | model.addAttribute("expressCompanyList", this.mallExpressCompanyService.selectList(Condition.empty())); |
| | | return PREFIX + "deliverAuth.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取商品订单列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(OrderSearchDto dto) { |
| | | Page<MallOrder> page = new PageFactory().defaultPage(); |
| | | |
| | | Wrapper<?> wrapper = wrapperList(dto); |
| | | |
| | | page = mallOrderService.findPage(page, wrapper); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增商品订单 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增商品订单") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallOrder mallOrder) { |
| | | mallOrderService.insert(mallOrder); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除商品订单") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String orderNo) { |
| | | // 逻辑删除 |
| | | mallOrderService.updateForSet("cms_delete = 1", new EntityWrapper<MallOrder>().in("order_no", orderNo)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品订单 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品订单") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallOrder mallOrder) { |
| | | mallOrderService.updateById(mallOrder); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品订单状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品订单状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallOrderId, Integer state) { |
| | | mallOrderService.updateForSet("state = " + state, new EntityWrapper<MallOrder>().eq("id", mallOrderId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转物流详情 |
| | | */ |
| | | @RequestMapping(value = "/logisticsAuth/{orderNo}") |
| | | public Object logisticsAuth(@PathVariable("orderNo") String orderNo, Model model) { |
| | | model.addAttribute("item", this.mallOrderService.selectById(orderNo)); |
| | | return PREFIX + "mallOrder_express.html"; |
| | | } |
| | | |
| | | /** |
| | | * 物流信息 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/express") |
| | | public Object express(String expressNo) { |
| | | return ExpressApi.query(expressNo, null); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转商品订单详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{orderNo}") |
| | | public Object detail(@PathVariable("orderNo") String orderNo, Model model) { |
| | | Page<MallOrder> page = new PageFactory().defaultPage(1, 0); |
| | | |
| | | Wrapper<?> wrapper = new EntityWrapper<MallOrder>() |
| | | .eq("o.order_no", orderNo); |
| | | MallOrder mallOrder = mallOrderService.findPage(page, wrapper).getRecords().get(0); |
| | | |
| | | // 订单详情 |
| | | List<MallOrderDetail> orderDetailList = this.mallOrderDetailService.selectList(new EntityWrapper<MallOrderDetail>().eq("order_no", orderNo)); |
| | | |
| | | // 订单详情-商品信息 |
| | | List<Integer> goodsIdList = orderDetailList.stream().map(MallOrderDetail::getGoodsId).collect(Collectors.toList()); |
| | | List<MallGoods> goodsList = mallGoodsService.selectList(new EntityWrapper<MallGoods>().in("id", goodsIdList)); |
| | | |
| | | // 封装商品信息 |
| | | mallOrder.setOrderDetails( |
| | | orderDetailList.stream().map(o -> { |
| | | String goodsNo = ""; |
| | | for (MallGoods g : goodsList) { |
| | | if (g.getId().equals(o.getGoodsId())) { |
| | | goodsNo = g.getGoodsNo(); |
| | | o.setGoodsName(g.getGoodsName()); |
| | | } |
| | | } |
| | | o.setGoodsNo(goodsNo); |
| | | return o; |
| | | }).collect(Collectors.toList()) |
| | | ); |
| | | MemUser memUser = this.memUserService.selectById(mallOrder.getUserId()); |
| | | if (memUser != null) { |
| | | mallOrder.setUserShowId(memUser.getShowId()); |
| | | mallOrder.setUserPhone(memUser.getPhone()); |
| | | mallOrder.setUserNickname(memUser.getNickName()); |
| | | } |
| | | mallOrder.setUseList(useService.getUseList(mallOrder.getOrderNo())); |
| | | model.addAttribute("item", mallOrder); |
| | | |
| | | // 计算订单业绩 |
| | | BigDecimal saleGoodsMoney = BigDecimal.ZERO; |
| | | try { |
| | | if (mallOrder.getSaleUserId() != null && mallOrder.getSaleUserId() != 0 && mallOrder.getGoodsId() != null) { |
| | | MemUser saleUser = memUserService.selectById(mallOrder.getSaleUserId()); |
| | | MallGoodsSet goodsSet = mallGoodsSetService.selectById(mallOrder.getGoodsId()); |
| | | if (saleUser.getMemberGradeId() == EnumMemberGrade.G_3.index) { |
| | | saleGoodsMoney = mallOrder.getPayMoney().multiply(goodsSet.getV3BuyCoef()); |
| | | } |
| | | if (saleUser.getMemberGradeId() == EnumMemberGrade.G_4.index) { |
| | | saleGoodsMoney = mallOrder.getPayMoney().multiply(goodsSet.getV4BuyCoef()); |
| | | } |
| | | if (saleUser.getMemberGradeId() == EnumMemberGrade.G_5.index) { |
| | | saleGoodsMoney = mallOrder.getPayMoney().multiply(goodsSet.getV5BuyCoef()); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | model.addAttribute("saleGoodsMoney", saleGoodsMoney.setScale(2, BigDecimal.ROUND_HALF_UP)); |
| | | |
| | | return PREFIX + "mallOrder_detail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转商品订单详情 |
| | | */ |
| | | @RequestMapping(value = "/goodsDetails/{orderNo}") |
| | | public Object goodsDetails(@PathVariable("orderNo") String orderNo, Model model) { |
| | | MallOrder mallOrder = mallOrderService.selectById(orderNo); |
| | | |
| | | mallOrder.setOrderDetails(this.mallOrderDetailService.selectList(new EntityWrapper<MallOrderDetail>() |
| | | .eq("order_no", orderNo))); |
| | | MemUser memUser = this.memUserService.selectById(mallOrder.getUserId()); |
| | | if (memUser != null) { |
| | | mallOrder.setUserShowId(memUser.getShowId()); |
| | | mallOrder.setUserPhone(memUser.getPhone()); |
| | | mallOrder.setUserNickname(memUser.getNickName()); |
| | | } |
| | | |
| | | model.addAttribute("item", mallOrder); |
| | | return PREFIX + "mallOrder_goods.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取订单商品 |
| | | * |
| | | * @param orderNo |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/getOrderGoods") |
| | | public Object updateState(Integer orderNo) { |
| | | return this.mallOrderDetailService.selectList(new EntityWrapper<MallOrderDetail>() |
| | | .eq("order_no", orderNo)); |
| | | } |
| | | |
| | | public Wrapper wrapperList(OrderSearchDto dto) { |
| | | Wrapper<?> wrapper = new EntityWrapper<MallOrder>() |
| | | .orderBy("o.create_time", false) |
| | | .ge(StrUtil.isNotBlank(dto.getBeginTime()), "o.create_time", dto.getBeginTime()) |
| | | .le(StrUtil.isNotBlank(dto.getEndTime()), "o.create_time", dto.getEndTime() + " 23:59:59") |
| | | .eq(StrUtil.isNotBlank(dto.getOrderNo()), "o.order_no", dto.getOrderNo()) |
| | | .eq(StrUtil.isNotBlank(dto.getUserShowId()), "u.show_id", dto.getUserShowId()) |
| | | .eq(StrUtil.isNotBlank(dto.getUserPhone()), "u.phone", dto.getUserPhone()) |
| | | //.like(StrUtil.isNotBlank(dto.getUserNickname()), "user.nick_name", dto.getUserNickname()); |
| | | .like(StrUtil.isNotBlank(dto.getUserNickname()), "o.take_name", dto.getUserNickname()); |
| | | |
| | | if (null != dto.getState()) { |
| | | if (dto.getState().equals(1)) { |
| | | wrapper.in("o.state", Lists.newArrayList(1, 2)); |
| | | } else { |
| | | wrapper.eq("o.state", dto.getState()); |
| | | } |
| | | } |
| | | return wrapper; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/export") |
| | | public void exportOrder(OrderSearchDto dto, HttpServletResponse response) throws IOException { |
| | | Wrapper wrapper = wrapperList(dto); |
| | | List<MallOrder> orders = this.mallOrderService.findList(wrapper); |
| | | |
| | | List<List<Object>> dataList = new ArrayList<>(); |
| | | List<Object> titles = CollUtil.newArrayList( |
| | | "营销员工号", |
| | | "营销员姓名", |
| | | "营销业绩", |
| | | "下单时间", |
| | | "订单编号", |
| | | "订单来源", |
| | | "订单类型", |
| | | "商品名称", |
| | | "规格组", |
| | | "购买数量", |
| | | "下单用户昵称", |
| | | "下单用户手机", |
| | | "预约门店", |
| | | "核销次数", |
| | | "订单金额", |
| | | "优惠金额", |
| | | "实付款", |
| | | "订单状态", |
| | | "退款时间" |
| | | ); |
| | | dataList.add(titles); |
| | | |
| | | for (MallOrder order : orders) { |
| | | dataList.add( |
| | | CollUtil.newArrayList( |
| | | order.getSaleShowId(), |
| | | order.getSaleUserName(), |
| | | order.getGoodsMoney(), |
| | | DateUtils2.format(order.getCreateTime(), "YYYY-MM-dd HH:mm:ss"), |
| | | order.getOrderNo(), |
| | | Objects.nonNull(order.getSaleShowId()) ? "推广链接" : "自然", |
| | | getOrderType(order.getOrderType()), |
| | | order.getGoodsName(), |
| | | order.getGrepName(), |
| | | order.getGoodsNum(), |
| | | order.getTakeName(), |
| | | order.getUserPhone(), |
| | | order.getMerchantName(), |
| | | order.getUseNum(), |
| | | order.getGoodsMoney(), |
| | | order.getGoodsMoney().subtract(order.getPayMoney()), |
| | | order.getPayMoney(), |
| | | order.getStateName(), |
| | | Objects.nonNull(order.getRefundTime()) ? DateUtils2.format(order.getRefundTime(), "YYYY-MM-dd HH:mm:ss") : "" |
| | | )); |
| | | } |
| | | ExcelExportUtil.easySheet("导出数据" + DateUtils2.formatDate(new Date(), "YYYYMMddHHmmSS"), "导出数据", dataList, response); |
| | | } |
| | | |
| | | private String getOrderType(int key) { |
| | | String value = "普通商品"; |
| | | if (key == 1) { |
| | | value = "黄金套餐"; |
| | | } else if (key == 2) { |
| | | value = "钻石套餐"; |
| | | } |
| | | return value; |
| | | } |
| | | |
| | | /** |
| | | * 取消订单 |
| | | * |
| | | * @param orderNo |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/cancelOrder") |
| | | public Object cancelOrder(String orderNo) { |
| | | this.mallOrderService.cancelOrder(orderNo); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 退款 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/orderShip") |
| | | public Object orderShip(String orderNo, Integer expressCompany) { |
| | | MallOrder order = this.mallOrderService.selectOne( |
| | | new EntityWrapper<MallOrder>() |
| | | .eq("order_no", orderNo) |
| | | .last("for update") |
| | | ); |
| | | |
| | | if (expressCompany.equals(0)) { |
| | | order.setState(EnumMallOrderState.WAIT_CHECK.index); |
| | | } else { |
| | | // 取消订单扣积分 |
| | | memUserService.subIntegralCancelOrder(orderNo); |
| | | |
| | | if (order.getCouponId() != null && order.getCouponId() != 0) { |
| | | // 退还优惠券 |
| | | myCouponService.updateUseCoupon(order.getUserId(), order.getCouponId(), 0); |
| | | } |
| | | |
| | | order.setState(EnumMallOrderState.REFUNDED.index); |
| | | BigDecimal refundPrice = order.getPayMoney(); |
| | | PayUtil.wechatRefund("T".concat(order.getOrderNo()), order.getTransactionNo(), order.getOutTradeNo(), |
| | | order.getPayTotalFee(), |
| | | refundPrice.multiply(Convert.toBigDecimal(100)), |
| | | "用户申请退款", "rest/mall/pay/notify/wx" |
| | | ); |
| | | order.setRefundPrice(refundPrice); |
| | | order.setRefundTime(new Date()); |
| | | } |
| | | |
| | | this.mallOrderService.updateById(order); |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallOrderDetail; |
| | | import com.sinata.modular.mall.service.IMallOrderDetailService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 订单详情控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallOrderDetail") |
| | | public class MallOrderDetailController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallOrderDetail/"; |
| | | |
| | | @Autowired |
| | | private IMallOrderDetailService mallOrderDetailService; |
| | | |
| | | /** |
| | | * 跳转到订单详情首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallOrderDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加订单详情 |
| | | */ |
| | | @RequestMapping("/mallOrderDetail_add") |
| | | public String mallOrderDetailAdd() { |
| | | return PREFIX + "mallOrderDetail_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改订单详情 |
| | | */ |
| | | @RequestMapping("/mallOrderDetail_update/{mallOrderDetailId}") |
| | | public String mallOrderDetailUpdate(@PathVariable Integer mallOrderDetailId, Model model) { |
| | | MallOrderDetail mallOrderDetail = mallOrderDetailService.selectById(mallOrderDetailId); |
| | | model.addAttribute("item", mallOrderDetail); |
| | | LogObjectHolder.me().set(mallOrderDetail); |
| | | return PREFIX + "mallOrderDetail_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取订单详情列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallOrderDetail>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallOrderDetailService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增订单详情 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增订单详情") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallOrderDetail mallOrderDetail) { |
| | | mallOrderDetailService.insert(mallOrderDetail); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除订单详情") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallOrderDetailService.updateForSet("is_delete = 1", new EntityWrapper<MallOrderDetail>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改订单详情 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改订单详情") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallOrderDetail mallOrderDetail) { |
| | | mallOrderDetailService.updateById(mallOrderDetail); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改订单详情状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改订单详情状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallOrderDetailId, Integer state) { |
| | | mallOrderDetailService.updateForSet("state = " + state, new EntityWrapper<MallOrderDetail>().eq("id", mallOrderDetailId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转订单详情详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallOrderDetailId}") |
| | | public Object detail(@PathVariable("mallOrderDetailId") Integer mallOrderDetailId, Model model) { |
| | | MallOrderDetail mallOrderDetail = mallOrderDetailService.selectById(mallOrderDetailId); |
| | | model.addAttribute("item", mallOrderDetail); |
| | | return PREFIX + "mallOrderDetail_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | 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.sinata.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.sinata.modular.mall.model.MallTag; |
| | | import com.sinata.modular.mall.service.IMallTagService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | /** |
| | | * 商品标签控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallTag") |
| | | public class MallTagController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallTag/"; |
| | | |
| | | @Autowired |
| | | private IMallTagService mallTagService; |
| | | |
| | | /** |
| | | * 跳转到商品标签首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallTag.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加商品标签 |
| | | */ |
| | | @RequestMapping("/mallTag_add") |
| | | public String mallTagAdd() { |
| | | return PREFIX + "mallTag_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改商品标签 |
| | | */ |
| | | @RequestMapping("/mallTag_update/{mallTagId}") |
| | | public String mallTagUpdate(@PathVariable Integer mallTagId, Model model) { |
| | | MallTag mallTag = mallTagService.selectById(mallTagId); |
| | | model.addAttribute("item", mallTag); |
| | | LogObjectHolder.me().set(mallTag); |
| | | return PREFIX + "mallTag_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取商品标签列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition, Integer isLock) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallTag>().eq("is_delete", 0).orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | if (!StringUtils.isEmpty(condition)) { |
| | | wrapper.like("tag_name", condition); |
| | | } |
| | | if (isLock != null) { |
| | | wrapper.eq("is_lock", isLock); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallTagService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增商品标签 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增商品标签") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallTag mallTag) { |
| | | mallTagService.insert(mallTag); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除商品标签") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallTagService.updateForSet("is_delete = 1", new EntityWrapper<MallTag>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品标签 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品标签") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallTag mallTag) { |
| | | mallTagService.updateById(mallTag); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商品标签状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商品标签状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallTagId, Integer state) { |
| | | mallTagService.updateForSet("is_lock = " + state, new EntityWrapper<MallTag>().eq("id", mallTagId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转商品标签详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallTagId}") |
| | | public Object detail(@PathVariable("mallTagId") Integer mallTagId, Model model) { |
| | | MallTag mallTag = mallTagService.selectById(mallTagId); |
| | | model.addAttribute("item", mallTag); |
| | | return PREFIX + "mallTag_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallUserAddress; |
| | | import com.sinata.modular.mall.service.IMallUserAddressService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 收货地址控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallUserAddress") |
| | | public class MallUserAddressController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallUserAddress/"; |
| | | |
| | | @Autowired |
| | | private IMallUserAddressService mallUserAddressService; |
| | | |
| | | /** |
| | | * 跳转到收货地址首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallUserAddress.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加收货地址 |
| | | */ |
| | | @RequestMapping("/mallUserAddress_add") |
| | | public String mallUserAddressAdd() { |
| | | return PREFIX + "mallUserAddress_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改收货地址 |
| | | */ |
| | | @RequestMapping("/mallUserAddress_update/{mallUserAddressId}") |
| | | public String mallUserAddressUpdate(@PathVariable Integer mallUserAddressId, Model model) { |
| | | MallUserAddress mallUserAddress = mallUserAddressService.selectById(mallUserAddressId); |
| | | model.addAttribute("item", mallUserAddress); |
| | | LogObjectHolder.me().set(mallUserAddress); |
| | | return PREFIX + "mallUserAddress_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取收货地址列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallUserAddress>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallUserAddressService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增收货地址 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增收货地址") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallUserAddress mallUserAddress) { |
| | | mallUserAddressService.insert(mallUserAddress); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除收货地址") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallUserAddressService.updateForSet("is_delete = 1", new EntityWrapper<MallUserAddress>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改收货地址 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改收货地址") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallUserAddress mallUserAddress) { |
| | | mallUserAddressService.updateById(mallUserAddress); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改收货地址状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改收货地址状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallUserAddressId, Integer state) { |
| | | mallUserAddressService.updateForSet("state = " + state, new EntityWrapper<MallUserAddress>().eq("id", mallUserAddressId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转收货地址详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallUserAddressId}") |
| | | public Object detail(@PathVariable("mallUserAddressId") Integer mallUserAddressId, Model model) { |
| | | MallUserAddress mallUserAddress = mallUserAddressService.selectById(mallUserAddressId); |
| | | model.addAttribute("item", mallUserAddress); |
| | | return PREFIX + "mallUserAddress_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallUserCollect; |
| | | import com.sinata.modular.mall.service.IMallUserCollectService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 收藏商品控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallUserCollect") |
| | | public class MallUserCollectController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallUserCollect/"; |
| | | |
| | | @Autowired |
| | | private IMallUserCollectService mallUserCollectService; |
| | | |
| | | /** |
| | | * 跳转到收藏商品首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallUserCollect.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加收藏商品 |
| | | */ |
| | | @RequestMapping("/mallUserCollect_add") |
| | | public String mallUserCollectAdd() { |
| | | return PREFIX + "mallUserCollect_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改收藏商品 |
| | | */ |
| | | @RequestMapping("/mallUserCollect_update/{mallUserCollectId}") |
| | | public String mallUserCollectUpdate(@PathVariable Integer mallUserCollectId, Model model) { |
| | | MallUserCollect mallUserCollect = mallUserCollectService.selectById(mallUserCollectId); |
| | | model.addAttribute("item", mallUserCollect); |
| | | LogObjectHolder.me().set(mallUserCollect); |
| | | return PREFIX + "mallUserCollect_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取收藏商品列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallUserCollect>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallUserCollectService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增收藏商品 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增收藏商品") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallUserCollect mallUserCollect) { |
| | | mallUserCollectService.insert(mallUserCollect); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除收藏商品") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallUserCollectService.updateForSet("is_delete = 1", new EntityWrapper<MallUserCollect>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改收藏商品 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改收藏商品") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallUserCollect mallUserCollect) { |
| | | mallUserCollectService.updateById(mallUserCollect); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改收藏商品状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改收藏商品状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallUserCollectId, Integer state) { |
| | | mallUserCollectService.updateForSet("state = " + state, new EntityWrapper<MallUserCollect>().eq("id", mallUserCollectId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转收藏商品详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallUserCollectId}") |
| | | public Object detail(@PathVariable("mallUserCollectId") Integer mallUserCollectId, Model model) { |
| | | MallUserCollect mallUserCollect = mallUserCollectService.selectById(mallUserCollectId); |
| | | model.addAttribute("item", mallUserCollect); |
| | | return PREFIX + "mallUserCollect_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallUserEvaluation; |
| | | import com.sinata.modular.mall.service.IMallUserEvaluationService; |
| | | import com.sinata.modular.member.model.MemUser; |
| | | import com.sinata.modular.member.service.IMemMerchantService; |
| | | import com.sinata.modular.member.service.IMemUserService; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 用户评价控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallUserEvaluation") |
| | | public class MallUserEvaluationController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallUserEvaluation/"; |
| | | |
| | | @Autowired |
| | | private IMallUserEvaluationService mallUserEvaluationService; |
| | | |
| | | @Autowired |
| | | private IMemUserService memUserService; |
| | | |
| | | @Autowired |
| | | private IMemMerchantService memMerchantService; |
| | | |
| | | /** |
| | | * 跳转到用户评价首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallUserEvaluation.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加用户评价 |
| | | */ |
| | | @RequestMapping("/mallUserEvaluation_add") |
| | | public String mallUserEvaluationAdd() { |
| | | return PREFIX + "mallUserEvaluation_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改用户评价 |
| | | */ |
| | | @RequestMapping("/mallUserEvaluation_update/{mallUserEvaluationId}") |
| | | public String mallUserEvaluationUpdate(@PathVariable Integer mallUserEvaluationId, Model model) { |
| | | MallUserEvaluation mallUserEvaluation = mallUserEvaluationService.selectById(mallUserEvaluationId); |
| | | model.addAttribute("item", mallUserEvaluation); |
| | | LogObjectHolder.me().set(mallUserEvaluation); |
| | | return PREFIX + "mallUserEvaluation_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取用户评价列表 |
| | | * |
| | | * @param showId 用户id |
| | | * @param state 是否显示,0显示,1隐藏 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String nikeName, String phone, String showId, Integer state) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallUserEvaluation>() |
| | | .ne("is_delete", 1).orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | if (state != null) { |
| | | wrapper.eq("state", state); |
| | | } |
| | | List<Integer> userIds = null; |
| | | if (!StringUtils.isEmpty(nikeName) || !StringUtils.isEmpty(phone) || !StringUtils.isEmpty(showId)) { |
| | | Wrapper<MemUser> memUserWrapper = new EntityWrapper<MemUser>().eq("is_delete", 0); |
| | | if (!StringUtils.isEmpty(nikeName)) { |
| | | memUserWrapper.like("nick_name", nikeName); |
| | | } |
| | | if (!StringUtils.isEmpty(phone)) { |
| | | memUserWrapper.like("phone", phone); |
| | | } |
| | | if (!StringUtils.isEmpty(showId)) { |
| | | memUserWrapper.like("show_id", showId); |
| | | } |
| | | List<MemUser> memUserList = this.memUserService.selectList(memUserWrapper); |
| | | if (CollectionUtils.isNotEmpty(memUserList)) { |
| | | userIds = memUserList.stream().map(o -> o.getId()).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | if (CollectionUtils.isNotEmpty(userIds)) { |
| | | wrapper.in("user_id", userIds); |
| | | } |
| | | |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallUserEvaluationService.selectMapsPage(page, wrapper).getRecords(); |
| | | // 封装用户信息 |
| | | memUserService.wrapperMapUser(list, "userId"); |
| | | //商家信息 |
| | | memMerchantService.wrapperMapMerchant(list, "merchantId"); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增用户评价 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增用户评价") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallUserEvaluation mallUserEvaluation) { |
| | | mallUserEvaluationService.insert(mallUserEvaluation); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除用户评价") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallUserEvaluationService.updateForSet("is_delete = 1", new EntityWrapper<MallUserEvaluation>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改用户评价 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改用户评价") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallUserEvaluation mallUserEvaluation) { |
| | | mallUserEvaluationService.updateById(mallUserEvaluation); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改用户评价状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改用户评价状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(@RequestParam String ids, Integer state) { |
| | | mallUserEvaluationService.updateForSet("state = " + state, new EntityWrapper<MallUserEvaluation>().in("id", ids)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转用户评价详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallUserEvaluationId}") |
| | | public Object detail(@PathVariable("mallUserEvaluationId") Integer mallUserEvaluationId, Model model) { |
| | | MallUserEvaluation mallUserEvaluation = mallUserEvaluationService.selectById(mallUserEvaluationId); |
| | | model.addAttribute("item", mallUserEvaluation); |
| | | return PREFIX + "mallUserEvaluation_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.modular.mall.model.MallGoods; |
| | | import com.sinata.modular.mall.model.MallUserReport; |
| | | import com.sinata.modular.mall.service.IMallGoodsService; |
| | | import com.sinata.modular.mall.service.IMallUserReportService; |
| | | import com.sinata.modular.member.model.MemMerchant; |
| | | import com.sinata.modular.member.model.MemUser; |
| | | import com.sinata.modular.member.service.IMemMerchantService; |
| | | import com.sinata.modular.member.service.IMemUserBankDetailService; |
| | | import com.sinata.modular.member.service.IMemUserService; |
| | | import com.sinata.modular.system.service.ITNoticeMessageService; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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 java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 用户举报控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallUserReport") |
| | | public class MallUserReportController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallUserReport/"; |
| | | |
| | | @Autowired |
| | | private IMallUserReportService mallUserReportService; |
| | | |
| | | @Autowired |
| | | private IMemUserService memUserService; |
| | | |
| | | @Autowired |
| | | private IMemMerchantService memMerchantService; |
| | | |
| | | @Autowired |
| | | private IMallGoodsService mallGoodsService; |
| | | |
| | | @Autowired |
| | | private IMemUserBankDetailService memUserBankDetailService; |
| | | |
| | | @Autowired |
| | | private ITNoticeMessageService itNoticeMessageService; |
| | | |
| | | /** |
| | | * 跳转到用户举报首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallUserReport.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加用户举报 |
| | | */ |
| | | @RequestMapping("/mallUserReport_add") |
| | | public String mallUserReportAdd() { |
| | | return PREFIX + "mallUserReport_add.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到添加用户举报 |
| | | */ |
| | | @RequestMapping("/handler/{id}") |
| | | public String handler(@PathVariable String id, Model model) { |
| | | model.addAttribute("id", id); |
| | | model.addAllAttributes(mallUserReportService.selectList(new EntityWrapper<MallUserReport>().eq("id", id))); |
| | | return PREFIX + "mallUserReport_handler.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改用户举报 |
| | | */ |
| | | @RequestMapping("/mallUserReport_update/{mallUserReportId}") |
| | | public String mallUserReportUpdate(@PathVariable Integer mallUserReportId, Model model) { |
| | | MallUserReport mallUserReport = mallUserReportService.selectById(mallUserReportId); |
| | | model.addAttribute("item", mallUserReport); |
| | | LogObjectHolder.me().set(mallUserReport); |
| | | return PREFIX + "mallUserReport_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取用户举报列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String nikeName, String merchantName, String goodsName, Integer goodsId, Integer state) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallUserReport>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | List<Integer> userIds = null; |
| | | if (!StringUtils.isEmpty(nikeName)) { |
| | | Wrapper<MemUser> memUserWrapper = new EntityWrapper<MemUser>().eq("is_delete", 0); |
| | | if (!StringUtils.isEmpty(nikeName)) { |
| | | memUserWrapper.like("nick_name", nikeName); |
| | | } |
| | | |
| | | List<MemUser> memUserList = this.memUserService.selectList(memUserWrapper); |
| | | if (CollectionUtils.isNotEmpty(memUserList)) { |
| | | userIds = memUserList.stream().map(o -> o.getId()).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | if (CollectionUtils.isNotEmpty(userIds)) { |
| | | wrapper.in("user_id", userIds); |
| | | } |
| | | if (state != null) { |
| | | wrapper.eq("state", state); |
| | | } |
| | | |
| | | List<Integer> memMerchantIds = null; |
| | | if (!StringUtils.isEmpty(merchantName)) { |
| | | Wrapper<MemMerchant> memMerchantWrapper = new EntityWrapper<MemMerchant>().eq("is_delete", 0); |
| | | memMerchantWrapper.like("merchant_name", merchantName).orNew().like("id", merchantName); |
| | | |
| | | List<MemMerchant> memMerchantList = this.memMerchantService.selectList(memMerchantWrapper); |
| | | if (CollectionUtils.isNotEmpty(memMerchantList)) { |
| | | memMerchantIds = memMerchantList.stream().map(o -> o.getId()).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | if (CollectionUtils.isNotEmpty(memMerchantIds)) { |
| | | wrapper.in("merchant_id", memMerchantIds); |
| | | } |
| | | |
| | | List<Integer> goodIds = null; |
| | | if (!StringUtils.isEmpty(goodsName) || goodsId != null) { |
| | | Wrapper<MallGoods> mallGoodsWrapper = new EntityWrapper<MallGoods>().eq("is_delete", 0); |
| | | if (!StringUtils.isEmpty(goodsName)) { |
| | | mallGoodsWrapper.like("goods_name", goodsName); |
| | | } |
| | | if (goodsId != null) { |
| | | mallGoodsWrapper.eq("id", goodsId); |
| | | } |
| | | |
| | | List<MallGoods> mallGoodsList = this.mallGoodsService.selectList(mallGoodsWrapper); |
| | | if (CollectionUtils.isNotEmpty(mallGoodsList)) { |
| | | goodIds = mallGoodsList.stream().map(o -> o.getId()).collect(Collectors.toList()); |
| | | } |
| | | } |
| | | if (CollectionUtils.isNotEmpty(goodIds)) { |
| | | wrapper.in("goods_id", goodIds); |
| | | } |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallUserReportService.selectMapsPage(page, wrapper).getRecords(); |
| | | this.memUserService.wrapperMapUser(list, "userId"); |
| | | this.memMerchantService.wrapperMapMerchant(list, "merchantId"); |
| | | |
| | | this.mallGoodsService.wrapperMapGoods(list, "goodsId"); |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增用户举报 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增用户举报") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallUserReport mallUserReport) { |
| | | mallUserReportService.insert(mallUserReport); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除用户举报") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallUserReportService.updateForSet("is_delete = 1", new EntityWrapper<MallUserReport>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改用户举报 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改用户举报") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallUserReport mallUserReport) { |
| | | mallUserReportService.updateById(mallUserReport); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改用户举报状态 |
| | | */ |
| | | @Transactional |
| | | @ResponseBody |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallUserReportId, Integer state, Integer reportState, Integer deductScore, |
| | | Boolean offShelf, Integer frozenState, Integer days) { |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转用户举报详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallUserReportId}") |
| | | public Object detail(@PathVariable("mallUserReportId") Integer mallUserReportId, Model model) { |
| | | MallUserReport mallUserReport = mallUserReportService.selectById(mallUserReportId); |
| | | model.addAttribute("item", mallUserReport); |
| | | return PREFIX + "mallUserReport_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.controller; |
| | | |
| | | import com.sinata.common.enums.EnumIsDelete; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | 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.sinata.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.sinata.modular.mall.model.MallVipEquity; |
| | | import com.sinata.modular.mall.service.IMallVipEquityService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | /** |
| | | * VIP权益控制器 |
| | | * |
| | | * @author Goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/mallVipEquity") |
| | | public class MallVipEquityController extends BaseController { |
| | | |
| | | private String PREFIX = "/mall/mallVipEquity/"; |
| | | |
| | | @Autowired |
| | | private IMallVipEquityService mallVipEquityService; |
| | | |
| | | /** |
| | | * 跳转到VIP权益首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "mallVipEquity.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加VIP权益 |
| | | */ |
| | | @RequestMapping("/mallVipEquity_add") |
| | | public String mallVipEquityAdd() { |
| | | return PREFIX + "mallVipEquity_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改VIP权益 |
| | | */ |
| | | @RequestMapping("/mallVipEquity_update/{mallVipEquityId}") |
| | | public String mallVipEquityUpdate(@PathVariable Integer mallVipEquityId, Model model) { |
| | | MallVipEquity mallVipEquity = mallVipEquityService.selectById(mallVipEquityId); |
| | | model.addAttribute("item", mallVipEquity); |
| | | LogObjectHolder.me().set(mallVipEquity); |
| | | return PREFIX + "mallVipEquity_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取VIP权益列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition, Integer isLock) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MallVipEquity>() |
| | | .eq("is_delete", EnumIsDelete.EXISTED.index) |
| | | .orderBy("group_type", true); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | if (!StringUtils.isEmpty(condition)) { |
| | | wrapper.like("content", condition); |
| | | } |
| | | if (isLock != null && isLock != -1) { |
| | | wrapper.eq("is_lock", isLock); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = mallVipEquityService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增VIP权益 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增VIP权益") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MallVipEquity mallVipEquity) { |
| | | mallVipEquityService.insert(mallVipEquity); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除VIP权益") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | mallVipEquityService.updateForSet("is_delete = 1", new EntityWrapper<MallVipEquity>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改VIP权益 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改VIP权益") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MallVipEquity mallVipEquity) { |
| | | mallVipEquityService.updateById(mallVipEquity); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改VIP权益状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改VIP权益状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer mallVipEquityId, Integer state) { |
| | | mallVipEquityService.updateForSet("is_lock = " + state, new EntityWrapper<MallVipEquity>().eq("id", mallVipEquityId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转VIP权益详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{mallVipEquityId}") |
| | | public Object detail(@PathVariable("mallVipEquityId") Integer mallVipEquityId, Model model) { |
| | | MallVipEquity mallVipEquity = mallVipEquityService.selectById(mallVipEquityId); |
| | | model.addAttribute("item", mallVipEquity); |
| | | return PREFIX + "mallVipEquity_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.CommissionSettlement; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 佣金结算明细 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author fq |
| | | * @since 2023-04-22 |
| | | */ |
| | | public interface CommissionSettlementMapper extends BaseMapper<CommissionSettlement> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.CommissionSettlementMonth; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 佣金月结算 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author fq |
| | | * @since 2023-04-22 |
| | | */ |
| | | public interface CommissionSettlementMonthMapper extends BaseMapper<CommissionSettlementMonth> { |
| | | List<CommissionSettlementMonth> queryList(@Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("name") String name, @Param("showId") String showId, @Param("area") String area, @Param("gradeId") Integer gradeId, @Param("month") String month, @Param("offset") Integer offset, @Param("size") Integer size); |
| | | Integer queryListCount(@Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("name") String name, @Param("showId") String showId, @Param("area") String area, @Param("gradeId") Integer gradeId, @Param("month") String month); |
| | | void addList(@Param("addMonthList") List<CommissionSettlementMonth> addMonthList); |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallAppVersion; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * APP版本 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallAppVersionMapper extends BaseMapper<MallAppVersion> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallClassifyOne; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品分类 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallClassifyOneMapper extends BaseMapper<MallClassifyOne> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallClassifyTwo; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品二级分类 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallClassifyTwoMapper extends BaseMapper<MallClassifyTwo> { |
| | | |
| | | |
| | | @Select("select " + |
| | | " CONCAT( one.classify_name, '-', two.classify_name) " + |
| | | " FROM mall_classify_two two " + |
| | | " JOIN mall_classify_one one ON one.id = two.parent_classify_id " + |
| | | " WHERE two.id = #{id} ") |
| | | public String getHierarchyName(String id); |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallExpressCompany; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 快递公司 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-30 |
| | | */ |
| | | public interface MallExpressCompanyMapper extends BaseMapper<MallExpressCompany> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsCart; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品购物车 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallGoodsCartMapper extends BaseMapper<MallGoodsCart> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsDetail; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品详情 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallGoodsDetailMapper extends BaseMapper<MallGoodsDetail> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoods; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品信息 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallGoodsMapper extends BaseMapper<MallGoods> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsSet; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品系数设置 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallGoodsSetMapper extends BaseMapper<MallGoodsSet> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsSku; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品规格sku Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallGoodsSkuMapper extends BaseMapper<MallGoodsSku> { |
| | | |
| | | List<HashMap<String, Object>> queryMerchantGoodsList(@Param("merchantId") Integer merchantId); |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsSpec; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 规格属性 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallGoodsSpecMapper extends BaseMapper<MallGoodsSpec> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsSpecValue; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 规格值 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallGoodsSpecValueMapper extends BaseMapper<MallGoodsSpecValue> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallGroupSpec; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 套餐规格组 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-04-05 |
| | | */ |
| | | public interface MallGroupSpecMapper extends BaseMapper<MallGroupSpec> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallOrderDetail; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单详情 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallOrderDetailMapper extends BaseMapper<MallOrderDetail> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.sinata.modular.mall.model.MallOrder; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.session.RowBounds; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品订单 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-12 |
| | | */ |
| | | public interface MallOrderMapper extends BaseMapper<MallOrder> { |
| | | |
| | | /** |
| | | * 订单列表查询 |
| | | * |
| | | * @param page |
| | | * @param wrapper |
| | | * @return |
| | | */ |
| | | List<MallOrder> findList(RowBounds page, @Param("ew") Wrapper<?> wrapper); |
| | | |
| | | /** |
| | | * 统计商城订单收益 |
| | | * |
| | | * @param wrapper |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> countOrderIncome(@Param(("ew")) Wrapper<?> wrapper); |
| | | |
| | | List<Map<String, Object>> getOrderTopMapList(@Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("type") Integer type, @Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode); |
| | | List<Map<String, Object>> getShopTopMapList(@Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("type") Integer type, @Param("provinceCode") String provinceCode, @Param("cityCode") String cityCode); |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallTag; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品标签 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallTagMapper extends BaseMapper<MallTag> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallUserAddress; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 收货地址 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallUserAddressMapper extends BaseMapper<MallUserAddress> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallUserCollect; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 收藏商品 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallUserCollectMapper extends BaseMapper<MallUserCollect> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallUserEvaluation; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户评价 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallUserEvaluationMapper extends BaseMapper<MallUserEvaluation> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.sinata.modular.mall.model.MallUserReport; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户举报 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface MallUserReportMapper extends BaseMapper<MallUserReport> { |
| | | |
| | | |
| | | @Select(" SELECT " + |
| | | " IFNULL(m1.credit_score, 0) m, " + |
| | | " IFNULL(m2.credit_score, 0) u " + |
| | | " FROM mall_user_report mur" + |
| | | " LEFT JOIN mem_user_bank m1 ON m1.id = mur.merchant_id " + |
| | | " LEFT JOIN mem_user_bank m2 ON m2.id = mur.user_id " + |
| | | " WHERE mur.id = #{id} ") |
| | | public Map<String, String> findUserIntegral(String id); |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dao; |
| | | |
| | | import com.sinata.modular.mall.model.MallVipEquity; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * VIP权益 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-04-09 |
| | | */ |
| | | public interface MallVipEquityMapper extends BaseMapper<MallVipEquity> { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.CommissionSettlementMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.CommissionSettlement"> |
| | | <id column="id" property="id"/> |
| | | <result column="userId" property="userId"/> |
| | | <result column="showId" property="showId"/> |
| | | <result column="order_no" property="orderNo"/> |
| | | <result column="province_code" property="provinceCode"/> |
| | | <result column="city_code" property="cityCode"/> |
| | | <result column="county_code" property="countyCode"/> |
| | | <result column="salesCommissionGoods" property="salesCommissionGoods"/> |
| | | <result column="salesCommissionGroup" property="salesCommissionGroup"/> |
| | | <result column="manageProfitGoods" property="manageProfitGoods"/> |
| | | <result column="manageProfitGroup" property="manageProfitGroup"/> |
| | | <result column="breedAward" property="breedAward"/> |
| | | <result column="commissionPayable" property="commissionPayable"/> |
| | | <result column="addBeforeTax" property="addBeforeTax"/> |
| | | <result column="subBeforeTax" property="subBeforeTax"/> |
| | | <result column="commissionBeforeTax" property="commissionBeforeTax"/> |
| | | <result column="paymentAmount" property="paymentAmount"/> |
| | | <result column="createTime" property="createTime"/> |
| | | <result column="settlementId" property="settlementId"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, userId, showId, order_no, province_code, city_code, county_code, salesCommissionGoods, salesCommissionGroup, manageProfitGoods, manageProfitGroup, breedAward, commissionPayable, addBeforeTax, subBeforeTax, commissionBeforeTax, paymentAmount, createTime, settlementId |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.CommissionSettlementMonthMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.CommissionSettlementMonth"> |
| | | <id column="id" property="id"/> |
| | | <result column="userId" property="userId"/> |
| | | <result column="showId" property="showId"/> |
| | | <result column="orderNo" property="orderNo"/> |
| | | <result column="provinceCode" property="provinceCode"/> |
| | | <result column="cityCode" property="cityCode"/> |
| | | <result column="countyCode" property="countyCode"/> |
| | | <result column="salesCommissionGoods" property="salesCommissionGoods"/> |
| | | <result column="salesCommissionGroup" property="salesCommissionGroup"/> |
| | | <result column="manageProfitGoods" property="manageProfitGoods"/> |
| | | <result column="manageProfitGroup" property="manageProfitGroup"/> |
| | | <result column="breedAward" property="breedAward"/> |
| | | <result column="commissionPayable" property="commissionPayable"/> |
| | | <result column="addBeforeTax" property="addBeforeTax"/> |
| | | <result column="subBeforeTax" property="subBeforeTax"/> |
| | | <result column="commissionBeforeTax" property="commissionBeforeTax"/> |
| | | <result column="paymentAmount" property="paymentAmount"/> |
| | | <result column="createTime" property="createTime"/> |
| | | <result column="month" property="month"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, userId, showId, orderNo, provinceCode, cityCode, countyCode, salesCommissionGoods, salesCommissionGroup, manageProfitGoods, manageProfitGroup, breedAward, commissionPayable, addBeforeTax, subBeforeTax, commissionBeforeTax, paymentAmount, createTime, month |
| | | </sql> |
| | | |
| | | <sql id="fromTabWhereSql"> |
| | | FROM |
| | | `mall_commission_settlement_month` cm |
| | | LEFT JOIN t_city_region province on province.`code` = cm.provinceCode |
| | | LEFT JOIN t_city_region city on city.`code` = cm.cityCode |
| | | LEFT JOIN t_city_region county on county.`code` = cm.countyCode |
| | | LEFT JOIN mem_user mu on mu.id = cm.userId |
| | | <where> |
| | | <if test="month != null and month !=''"> |
| | | and cm.month = #{month} |
| | | </if> |
| | | <if test="name != null and name !=''"> |
| | | and mu.nick_name like CONCAT("%",#{name},"%") |
| | | </if> |
| | | <if test="showId != null and showId !=''"> |
| | | and mu.show_id like CONCAT("%",#{showId},"%") |
| | | </if> |
| | | <if test="area != null and area !=''"> |
| | | and ( |
| | | province.`name` like CONCAT("%",#{area},"%") or |
| | | city.`name` like CONCAT("%",#{area},"%") or |
| | | county.`name` like CONCAT("%",#{area},"%") |
| | | ) |
| | | </if> |
| | | <if test="gradeId != null"> |
| | | and mu.member_grade_id = #{gradeId} |
| | | </if> |
| | | <if test="beginTime != null and beginTime !=''"> |
| | | and cm.month <![CDATA[ >= ]]> #{beginTime} |
| | | </if> |
| | | <if test="endTime != null and endTime !=''"> |
| | | and cm.month <![CDATA[ <= ]]> #{endTime} |
| | | </if> |
| | | </where> |
| | | </sql> |
| | | |
| | | <select id="queryList" resultType="com.sinata.modular.mall.model.CommissionSettlementMonth"> |
| | | SELECT |
| | | province.`name` provinceCodeName,city.`name` cityCodeName,county.`name` countyCodeName, |
| | | mu.show_id showId, mu.nick_name userName,mu.member_grade_id, |
| | | cm.* |
| | | <include refid="fromTabWhereSql"/> |
| | | <if test="offset != null and size != null"> |
| | | limit #{offset}, #{size} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="queryListCount" resultType="java.lang.Integer"> |
| | | SELECT COUNT(*) <include refid="fromTabWhereSql"/> |
| | | </select> |
| | | |
| | | <insert id="addList"> |
| | | REPLACE INTO `mall_commission_settlement_month` |
| | | (`userId`, `showId`,`provinceCode`, `cityCode`, `countyCode`, `salesCommissionGoods`, |
| | | `salesCommissionGroup`, `manageProfitGoods`, `manageProfitGroup`, `breedAward`, `commissionPayable`, |
| | | `addBeforeTax`, `subBeforeTax`, `commissionBeforeTax`, `paymentAmount`, `month`) VALUES |
| | | <foreach collection="addMonthList" item="month" |
| | | separator=","> |
| | | (#{month.userId}, #{month.showId}, #{month.provinceCode}, #{month.cityCode}, #{month.countyCode}, #{month.salesCommissionGoods}, |
| | | #{month.salesCommissionGroup}, #{month.manageProfitGoods}, #{month.manageProfitGroup}, #{month.breedAward}, #{month.commissionPayable}, |
| | | #{month.addBeforeTax}, #{month.subBeforeTax}, #{month.commissionBeforeTax}, #{month.paymentAmount}, #{month.month}) |
| | | </foreach> |
| | | |
| | | |
| | | </insert> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallAppVersionMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallAppVersion"> |
| | | <id column="id" property="id"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="version_no" property="versionNo"/> |
| | | <result column="desc" property="desc"/> |
| | | <result column="is_force_update" property="isForceUpdate"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | <result column="app_url" property="appUrl"/> |
| | | <result column="version_type" property="versionType"/> |
| | | <result column="version_id" property="versionId"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, create_time, version_no, |
| | | desc, is_force_update, is_delete, app_url, version_type, version_id |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallClassifyOneMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallClassifyOne"> |
| | | <id column="id" property="id"/> |
| | | <result column="classify_name" property="classifyName"/> |
| | | <result column="classify_image" property="classifyImage"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="sort" property="sort"/> |
| | | <result column="is_lock" property="isLock"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, classify_name, classify_image, create_time, sort, is_lock, is_delete |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallClassifyTwoMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallClassifyTwo"> |
| | | <id column="id" property="id"/> |
| | | <result column="classify_name" property="classifyName"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="parent_classify_id" property="parentClassifyId"/> |
| | | <result column="icon" property="icon"/> |
| | | <result column="sort" property="sort"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, classify_name, create_time, parent_classify_id, icon, sort, is_delete |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallExpressCompanyMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallExpressCompany"> |
| | | <id column="id" property="id"/> |
| | | <result column="name" property="name"/> |
| | | <result column="create_time" property="createTime"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, name, create_time |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallGoodsCartMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallGoodsCart"> |
| | | <id column="id" property="id"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="merchant_id" property="merchantId"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="goods_id" property="goodsId"/> |
| | | <result column="goods_sku_id" property="goodsSkuId"/> |
| | | <result column="number" property="number"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, create_time, merchant_id, user_id, goods_id, goods_sku_id, number, update_time |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallGoodsDetailMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallGoodsDetail"> |
| | | <id column="id" property="id"/> |
| | | <result column="img_list" property="imgList"/> |
| | | <result column="intro_h5" property="introH5"/> |
| | | <result column="purchase_h5" property="purchaseH5"/> |
| | | <result column="intro_image" property="introImage"/> |
| | | <result column="video_path" property="videoPath"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, img_list, intro_h5, purchase_h5, intro_image, video_path |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallGoodsMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallGoods"> |
| | | <id column="id" property="id"/> |
| | | <result column="classify_id_one" property="classifyIdOne"/> |
| | | <result column="classify_id_two" property="classifyIdTwo"/> |
| | | <result column="goods_no" property="goodsNo"/> |
| | | <result column="goods_name" property="goodsName"/> |
| | | <result column="goods_title" property="goodsTitle"/> |
| | | <result column="goods_image" property="goodsImage"/> |
| | | <result column="price" property="price"/> |
| | | <result column="price_sale" property="priceSale"/> |
| | | <result column="price_member" property="priceMember"/> |
| | | <result column="stock" property="stock"/> |
| | | <result column="buy_count" property="buyCount"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | <result column="state" property="state"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="is_recommend" property="isRecommend"/> |
| | | <result column="look_count" property="lookCount"/> |
| | | <result column="collect_count" property="collectCount"/> |
| | | <result column="audit_remark" property="auditRemark"/> |
| | | <result column="sort" property="sort"/> |
| | | <result column="tag_ids" property="tagIds"/> |
| | | <result column="group_type" property="groupType"/> |
| | | <result column="start_time" property="startTime"/> |
| | | <result column="end_time" property="endTime"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, classify_id_one, classify_id_two, goods_no, goods_name, goods_title, goods_image, price, price_sale, price_member, stock, buy_count, is_delete, state, create_time, update_time, is_recommend, look_count, collect_count, audit_remark, sort, tag_ids, group_type, start_time, end_time |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallGoodsSetMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallGoodsSet"> |
| | | <id column="id" property="id"/> |
| | | <result column="buy_coef" property="buyCoef"/> |
| | | <result column="v3_buy_coef" property="v3BuyCoef"/> |
| | | <result column="v3_brokerage_coef" property="v3BrokerageCoef"/> |
| | | <result column="v4_buy_coef" property="v4BuyCoef"/> |
| | | <result column="v4_brokerage_coef" property="v4BrokerageCoef"/> |
| | | <result column="v5_buy_coef" property="v5BuyCoef"/> |
| | | <result column="v5_brokerage_coef" property="v5BrokerageCoef"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, buy_coef, v3_buy_coef, v3_brokerage_coef, v4_buy_coef, v4_brokerage_coef, v5_buy_coef, v5_brokerage_coef |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallGoodsSkuMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallGoodsSku"> |
| | | <id column="id" property="id"/> |
| | | <result column="merchant_id" property="merchantId"/> |
| | | <result column="goods_id" property="goodsId"/> |
| | | <result column="grep_name" property="grepName"/> |
| | | <result column="spec_grep" property="specGrep"/> |
| | | <result column="group_spec_name" property="groupSpecName"/> |
| | | <result column="group_spec_grep" property="groupSpecGrep"/> |
| | | <result column="stock" property="stock"/> |
| | | <result column="img_url" property="imgUrl"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="spec_ids" property="specIds"/> |
| | | <result column="group_spec_ids" property="groupSpecIds"/> |
| | | <result column="price" property="price"/> |
| | | <result column="price_sale" property="priceSale"/> |
| | | <result column="price_member" property="priceMember"/> |
| | | <result column="price_merchant" property="priceMerchant"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, merchant_id, goods_id, grep_name, spec_grep, group_spec_name, group_spec_grep, stock, img_url, update_time, create_time, spec_ids, group_spec_ids, price, price_sale, price_member, price_merchant |
| | | </sql> |
| | | |
| | | <select id="queryMerchantGoodsList" resultType="java.util.HashMap"> |
| | | SELECT md.id |
| | | , md.goods_name |
| | | , mu.price |
| | | , mu.price_sale |
| | | , mu.price_member |
| | | , mu.price_merchant |
| | | , md.stock |
| | | , md.buy_count |
| | | , mu.id goodsSkuId |
| | | , mu.state |
| | | , md.goods_no |
| | | FROM `mall_goods_sku` mu |
| | | join mall_goods md on md.id = mu.goods_id |
| | | WHERE mu.merchant_id = #{merchantId} |
| | | GROUP BY mu.goods_id |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallGoodsSpecMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallGoodsSpec"> |
| | | <id column="id" property="id"/> |
| | | <result column="classify_id_one" property="classifyIdOne"/> |
| | | <result column="classify_id_two" property="classifyIdTwo"/> |
| | | <result column="spec_name" property="specName"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | <result column="is_lock" property="isLock"/> |
| | | <result column="remark" property="remark"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, classify_id_one, classify_id_two, spec_name, create_time, is_delete, is_lock, remark |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallGoodsSpecValueMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallGoodsSpecValue"> |
| | | <id column="id" property="id"/> |
| | | <result column="spec_id" property="specId"/> |
| | | <result column="spec_value" property="specValue"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, spec_id, spec_value, create_time, is_delete |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallGroupSpecMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallGroupSpec"> |
| | | <id column="id" property="id"/> |
| | | <result column="spec_name" property="specName"/> |
| | | <result column="goods_ids" property="goodsIds"/> |
| | | <result column="goods_names" property="goodsNames"/> |
| | | <result column="classify_id_one" property="classifyIdOne"/> |
| | | <result column="classify_id_two" property="classifyIdTwo"/> |
| | | <result column="start_time" property="startTime"/> |
| | | <result column="end_time" property="endTime"/> |
| | | <result column="stock" property="stock"/> |
| | | <result column="area_city_id" property="areaCityId"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="is_lock" property="isLock"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | <result column="province_code" property="provinceCode"/> |
| | | <result column="province_name" property="provinceName"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, spec_name, goods_ids, goods_names, classify_id_one, classify_id_two, start_time, end_time, stock, area_city_id, remark, create_time, is_lock, is_delete, province_code, province_name |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallOrderDetailMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallOrderDetail"> |
| | | <id column="order_detail_no" property="orderDetailNo"/> |
| | | <result column="order_no" property="orderNo"/> |
| | | <result column="goods_id" property="goodsId"/> |
| | | <result column="sku_id" property="skuId"/> |
| | | <result column="spec_grep" property="specGrep"/> |
| | | <result column="goods_num" property="goodsNum"/> |
| | | <result column="sell_cost" property="sellCost"/> |
| | | <result column="grep_name" property="grepName"/> |
| | | <result column="goods_name" property="goodsName"/> |
| | | <result column="goods_image" property="goodsImage"/> |
| | | <result column="get_rice_grains" property="getRiceGrains"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, order_id, merchant_id, goods_id, spec_grep, goods_num, sell_cost, grep_name, goods_name, goods_image |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallOrderMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallOrder"> |
| | | <id column="order_no" property="orderNo"/> |
| | | <result column="order_main_no" property="orderMainNo"/> |
| | | <result column="merchant_id" property="merchantId"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="sale_user_id" property="saleUserId"/> |
| | | <result column="goods_id" property="goodsId"/> |
| | | <result column="goods_money" property="goodsMoney"/> |
| | | <result column="coupon_id" property="couponId"/> |
| | | <result column="coupon_money" property="couponMoney"/> |
| | | <result column="freight_money" property="freightMoney"/> |
| | | <result column="pay_money" property="payMoney"/> |
| | | <result column="take_name" property="takeName"/> |
| | | <result column="phone" property="phone"/> |
| | | <result column="address" property="address"/> |
| | | <result column="number" property="number"/> |
| | | <result column="express_company" property="expressCompany"/> |
| | | <result column="waybill_no" property="waybillNo"/> |
| | | <result column="mark" property="mark"/> |
| | | <result column="send_time" property="sendTime"/> |
| | | <result column="take_time" property="takeTime"/> |
| | | <result column="cancel_type" property="cancelType"/> |
| | | <result column="cancel_time" property="cancelTime"/> |
| | | <result column="cause" property="cause"/> |
| | | <result column="cancel_describe" property="cancelDescribe"/> |
| | | <result column="state" property="state"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | <result column="cms_delete" property="cmsDelete"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="is_after_sale" property="isAfterSale"/> |
| | | <result column="user_nickname" property="userNickname"/> |
| | | <result column="user_phone" property="userPhone"/> |
| | | <result column="user_show_id" property="userShowId"/> |
| | | <result column="goods_num" property="goodsNum"/> |
| | | <result column="merchant_name" property="merchantName"/> |
| | | <result column="order_type" property="orderType"/> |
| | | <result column="goods_name" property="goodsName"/> |
| | | <result column="grep_name" property="grepName"/> |
| | | <result column="useNum" property="useNum"/> |
| | | <result column="refund_price" property="refundPrice"/> |
| | | <result column="refund_time" property="refundTime"/> |
| | | <result column="sale_user_name" property="saleUserName"/> |
| | | <result column="sale_show_id" property="saleShowId"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | order_no, order_main_no, merchant_id, user_id, goods_id, goods_money, coupon_id, coupon_money, freight_money, pay_money, take_name, phone, address, number, express_company, waybill_no, mark, send_time, take_time, cancel_type, cancel_time, cause, cancel_describe, state, is_delete, cms_delete, create_time, is_after_sale, refund_price, refund_time |
| | | </sql> |
| | | |
| | | <select id="findList" resultMap="BaseResultMap"> |
| | | SELECT |
| | | o.*, |
| | | u.nick_name as user_nickname, |
| | | u.phone as user_phone, |
| | | u.show_id as user_show_id, |
| | | order_goods.goods_num as goods_num, |
| | | order_goods.goods_name as goods_name, |
| | | order_goods.grep_name as grep_name, |
| | | mm.merchant_name, |
| | | user2.nick_name as sale_user_name, |
| | | user2.show_id as sale_show_id, |
| | | (select count(1) from mall_order_detail_use where order_no = o.order_no) useNum |
| | | FROM mall_order o |
| | | LEFT JOIN mem_user u ON o.user_id = u.id |
| | | LEFT JOIN mem_user user2 ON o.sale_user_id = user2.id |
| | | left join mem_merchant mm on mm.id= o.merchant_id |
| | | LEFT JOIN (SELECT order_no,goods_name,grep_name,COUNT(1)as goods_num FROM mall_order_detail GROUP BY order_no) |
| | | order_goods on |
| | | order_goods.order_no = o.order_no |
| | | <where>o.cms_delete = false ${ew.sqlSegment}</where> |
| | | </select> |
| | | |
| | | <select id="countOrderIncome" resultType="java.util.Map"> |
| | | SELECT ${ew.sqlSelect} from ( |
| | | SELECT o.order_no,o.merchant_id,o.state,o.pay_money,o.pay_time,SUM(service_fee) AS service_fee FROM mall_order o |
| | | LEFT JOIN mall_order_detail deatil on o.order_no = deatil.order_no |
| | | GROUP BY o.order_no)a |
| | | <where>${ew.sqlSegment}</where> |
| | | </select> |
| | | |
| | | <select id="getOrderTopMapList" resultType="java.util.Map"> |
| | | SELECT |
| | | COUNT( 1 ) num, c.`name` |
| | | FROM |
| | | mall_order o |
| | | JOIN mall_order_detail od ON o.order_no = od.order_no |
| | | <choose> |
| | | <when test="cityCode != null and cityCode != '-1'"> |
| | | JOIN t_city_region c ON c.`code` = od.county_code |
| | | </when> |
| | | <when test="provinceCode != null and provinceCode != '-1'"> |
| | | JOIN t_city_region c ON c.`code` = od.city_code |
| | | </when> |
| | | <otherwise> |
| | | JOIN t_city_region c ON c.`code` = od.province_code |
| | | </otherwise> |
| | | </choose> |
| | | <where> |
| | | <if test="beginTime != null and beginTime !=''"> |
| | | AND o.create_time <![CDATA[ >= ]]> #{beginTime} |
| | | </if> |
| | | <if test="endTime != null and endTime !=''"> |
| | | AND o.create_time <![CDATA[ <= ]]> #{endTime} |
| | | </if> |
| | | <if test="type != null and type != -1"> |
| | | AND o.order_type = #{type} |
| | | </if> |
| | | <choose> |
| | | <when test="cityCode != null and cityCode != '-1'"> |
| | | AND od.city_code = #{cityCode} |
| | | </when> |
| | | <when test="provinceCode != null and provinceCode != '-1'"> |
| | | AND od.province_code = #{provinceCode} |
| | | </when> |
| | | </choose> |
| | | </where> |
| | | <choose> |
| | | <when test="cityCode != null and cityCode != '-1'"> |
| | | GROUP BY od.county_code |
| | | </when> |
| | | <when test="provinceCode != null and provinceCode != '-1'"> |
| | | GROUP BY od.city_code |
| | | </when> |
| | | <otherwise> |
| | | GROUP BY od.province_code |
| | | </otherwise> |
| | | </choose> |
| | | ORDER BY num DESC |
| | | LIMIT 5 |
| | | </select> |
| | | |
| | | |
| | | <select id="getShopTopMapList" resultType="java.util.Map"> |
| | | SELECT |
| | | <choose> |
| | | <when test="type != null and type == 1"> |
| | | SUM( o.goods_money ) num, |
| | | </when> |
| | | <otherwise> |
| | | COUNT( 1 ) num, |
| | | </otherwise> |
| | | </choose> |
| | | m.merchant_name AS name |
| | | FROM |
| | | mall_order o |
| | | JOIN mall_order_detail od ON o.order_no = od.order_no |
| | | JOIN mem_merchant m ON o.merchant_id = m.id |
| | | <where> |
| | | AND o.state IN (1, 2, 3, 4) |
| | | <if test="beginTime != null and beginTime !=''"> |
| | | AND o.create_time <![CDATA[ >= ]]> #{beginTime} |
| | | </if> |
| | | <if test="endTime != null and endTime !=''"> |
| | | AND o.create_time <![CDATA[ <= ]]> #{endTime} |
| | | </if> |
| | | <choose> |
| | | <when test="cityCode != null and cityCode != '-1'"> |
| | | AND od.city_code = #{cityCode} |
| | | </when> |
| | | <when test="provinceCode != null and provinceCode != '-1'"> |
| | | AND od.province_code = #{provinceCode} |
| | | </when> |
| | | </choose> |
| | | </where> |
| | | GROUP BY o.merchant_id |
| | | ORDER BY num DESC |
| | | LIMIT 5 |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallTagMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallTag"> |
| | | <id column="id" property="id"/> |
| | | <result column="tag_name" property="tagName"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | <result column="is_lock" property="isLock"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, tag_name, create_time, is_delete, is_lock |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallUserAddressMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallUserAddress"> |
| | | <id column="id" property="id"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="is_default" property="isDefault"/> |
| | | <result column="take_name" property="takeName"/> |
| | | <result column="phone" property="phone"/> |
| | | <result column="area" property="area"/> |
| | | <result column="address" property="address"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | <result column="create_time" property="createTime"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, user_id, is_default, take_name, phone, area, address, is_delete, create_time |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallUserCollectMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallUserCollect"> |
| | | <id column="id" property="id"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="goods_id" property="goodsId"/> |
| | | <result column="menchant_id" property="menchantId"/> |
| | | <result column="create_time" property="createTime"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, user_id, goods_id, menchant_id, create_time |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallUserEvaluationMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallUserEvaluation"> |
| | | <id column="id" property="id"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="goods_id" property="goodsId"/> |
| | | <result column="order_no" property="orderNo"/> |
| | | <result column="order_detail_no" property="orderDetailNo"/> |
| | | <result column="score" property="score"/> |
| | | <result column="detail" property="detail"/> |
| | | <result column="eva_image" property="evaImage"/> |
| | | <result column="state" property="state"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | <result column="create_time" property="createTime"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, user_id, goods_id, order_no, order_detail_no, score, detail, eva_image, state, is_delete, create_time |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallUserReportMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallUserReport"> |
| | | <id column="id" property="id"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="goods_id" property="goodsId"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="detail" property="detail"/> |
| | | <result column="rep_image" property="repImage"/> |
| | | <result column="state" property="state"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | <result column="create_time" property="createTime"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, user_id, goods_id, order_id, detail, rep_image, state, is_delete, create_time |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.sinata.modular.mall.dao.MallVipEquityMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.sinata.modular.mall.model.MallVipEquity"> |
| | | <id column="id" property="id"/> |
| | | <result column="group_type" property="groupType"/> |
| | | <result column="content" property="content"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="is_delete" property="isDelete"/> |
| | | <result column="is_lock" property="isLock"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, group_type, content, remark, create_time, is_delete, is_lock |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.sinata.modular.mall.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 退款退货搜索对象 |
| | | * |
| | | * @author frankevil |
| | | * @create 2023-03-25 22:44 |
| | | **/ |
| | | @Data |
| | | public class AfterSaleSearchDto implements Serializable { |
| | | |
| | | /** |
| | | * 订单类型,0退款,1退货 |
| | | */ |
| | | private Integer orderType; |
| | | |
| | | /** |
| | | * 创建开始时间 |
| | | */ |
| | | private String beginTime; |
| | | |
| | | /** |
| | | * 创建结束时间 |
| | | */ |
| | | private String endTime; |
| | | |
| | | /** |
| | | * 售后编号 |
| | | */ |
| | | private String afterOrderNo; |
| | | |
| | | /** |
| | | * 申请原因 |
| | | */ |
| | | private String reason; |
| | | |
| | | /** |
| | | * 退款用户 |
| | | */ |
| | | private String afterUserName; |
| | | |
| | | /** |
| | | * 订单编号 |
| | | */ |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | private Integer state; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 商品搜索对象 |
| | | * |
| | | * @author frankevil |
| | | * @create 2023-03-16 23:43 |
| | | **/ |
| | | @Data |
| | | public class GoodsSearchDto implements Serializable { |
| | | /** |
| | | * 创建开始时间 |
| | | */ |
| | | private String beginTime; |
| | | |
| | | /** |
| | | * 创建结束时间 |
| | | */ |
| | | private String endTime; |
| | | |
| | | /** |
| | | * 商家id |
| | | */ |
| | | private String goodsId; |
| | | |
| | | /** |
| | | * 状态,枚举字典 |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 一级分类ID |
| | | */ |
| | | private Integer classifyIdOne; |
| | | |
| | | /** |
| | | * 二级分类ID |
| | | */ |
| | | private Integer classifyIdTwo; |
| | | |
| | | /** |
| | | * 商品名称 |
| | | */ |
| | | private String goodsName; |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * 退款对象 |
| | | * |
| | | * @author frankevil |
| | | * @create 2023-03-25 23:21 |
| | | **/ |
| | | @Data |
| | | public class OrderRefundDto implements Serializable { |
| | | |
| | | /** |
| | | * 售后编号 |
| | | */ |
| | | private String afterOrderNo; |
| | | |
| | | /** |
| | | * 是否同意 |
| | | */ |
| | | private Boolean agree; |
| | | |
| | | /** |
| | | * 退款金额 |
| | | */ |
| | | private BigDecimal refundMoney; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | /** |
| | | * 拒绝原因 |
| | | */ |
| | | private String refuseRemark; |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 订单搜搜对象 |
| | | * |
| | | * @author frankevil |
| | | * @create 2023-03-24 17:11 |
| | | **/ |
| | | @Data |
| | | public class OrderSearchDto implements Serializable { |
| | | /** |
| | | * 创建开始时间 |
| | | */ |
| | | private String beginTime; |
| | | |
| | | /** |
| | | * 创建结束时间 |
| | | */ |
| | | private String endTime; |
| | | |
| | | /** |
| | | * 订单编号 |
| | | */ |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 订单状态 |
| | | */ |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 下单用户显示id |
| | | */ |
| | | private String userShowId; |
| | | |
| | | /** |
| | | * 下单用户手机号 |
| | | */ |
| | | private String userPhone; |
| | | |
| | | /** |
| | | * 下单用户昵称 |
| | | */ |
| | | private String userNickname; |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 佣金结算明细 |
| | | * </p> |
| | | * |
| | | * @author fq |
| | | * @since 2023-04-22 |
| | | */ |
| | | @Data |
| | | @TableName("mall_commission_settlement") |
| | | @ApiModel(value = "佣金结算明细") |
| | | public class CommissionSettlement extends Model<CommissionSettlement> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主键ID") |
| | | private Integer id; |
| | | /** |
| | | * 销售人员ID |
| | | */ |
| | | @ApiModelProperty(value = "销售人员ID") |
| | | private Integer userId; |
| | | /** |
| | | * 销售员工号 |
| | | */ |
| | | @ApiModelProperty(value = "销售员工号") |
| | | private String showId; |
| | | /** |
| | | * 订单编号 |
| | | */ |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNo; |
| | | /** |
| | | * 省ID |
| | | */ |
| | | @ApiModelProperty(value = "省ID") |
| | | private String provinceCode; |
| | | /** |
| | | * 市ID |
| | | */ |
| | | @ApiModelProperty(value = "市ID") |
| | | private String cityCode; |
| | | /** |
| | | * 区县ID |
| | | */ |
| | | @ApiModelProperty(value = "区县ID") |
| | | private String countyCode; |
| | | /** |
| | | * 销售佣金(普通商品) |
| | | */ |
| | | @ApiModelProperty(value = "销售佣金(普通商品)") |
| | | private BigDecimal salesCommissionGoods; |
| | | /** |
| | | * 销售佣金(套餐商品) |
| | | */ |
| | | @ApiModelProperty(value = "销售佣金(套餐商品)") |
| | | private BigDecimal salesCommissionGroup; |
| | | /** |
| | | * 管理利益(普通商品) |
| | | */ |
| | | @ApiModelProperty(value = "管理利益(普通商品)") |
| | | private BigDecimal manageProfitGoods; |
| | | /** |
| | | * 管理利益(套餐商品) |
| | | */ |
| | | @ApiModelProperty(value = "管理利益(套餐商品)") |
| | | private BigDecimal manageProfitGroup; |
| | | /** |
| | | * 育成奖 |
| | | */ |
| | | @ApiModelProperty(value = "育成奖") |
| | | private BigDecimal breedAward; |
| | | /** |
| | | * 应发佣金 |
| | | */ |
| | | @ApiModelProperty(value = "应发佣金") |
| | | private BigDecimal commissionPayable; |
| | | /** |
| | | * 税前加款 |
| | | */ |
| | | @ApiModelProperty(value = "税前加款") |
| | | private BigDecimal addBeforeTax; |
| | | /** |
| | | * 税前扣款 |
| | | */ |
| | | @ApiModelProperty(value = "税前扣款") |
| | | private BigDecimal subBeforeTax; |
| | | /** |
| | | * 税前应发佣金 |
| | | */ |
| | | @ApiModelProperty(value = "税前应发佣金") |
| | | private BigDecimal commissionBeforeTax; |
| | | /** |
| | | * 实发金额 |
| | | */ |
| | | @ApiModelProperty(value = "实发金额") |
| | | private BigDecimal paymentAmount; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 月结算ID |
| | | */ |
| | | @ApiModelProperty(value = "月结算ID") |
| | | private Integer settlementId; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import com.sinata.common.enums.EnumMemberGrade; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 佣金月结算 |
| | | * </p> |
| | | * |
| | | * @author fq |
| | | * @since 2023-04-22 |
| | | */ |
| | | @Data |
| | | @TableName("mall_commission_settlement_month") |
| | | @ApiModel(value = "佣金月结算") |
| | | public class CommissionSettlementMonth extends Model<CommissionSettlementMonth> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主键ID") |
| | | private Integer id; |
| | | /** |
| | | * 销售人员ID |
| | | */ |
| | | @ApiModelProperty(value = "销售人员ID") |
| | | private Integer userId; |
| | | /** |
| | | * 销售员工号 |
| | | */ |
| | | @ApiModelProperty(value = "销售员工号") |
| | | private String showId; |
| | | /** |
| | | * 订单编号 |
| | | */ |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNo; |
| | | /** |
| | | * 省ID |
| | | */ |
| | | @ApiModelProperty(value = "省ID") |
| | | private String provinceCode; |
| | | /** |
| | | * 市ID |
| | | */ |
| | | @ApiModelProperty(value = "市ID") |
| | | private String cityCode; |
| | | /** |
| | | * 区县ID |
| | | */ |
| | | @ApiModelProperty(value = "区县ID") |
| | | private String countyCode; |
| | | /** |
| | | * 销售佣金(普通商品) |
| | | */ |
| | | @ApiModelProperty(value = "销售佣金(普通商品)") |
| | | private BigDecimal salesCommissionGoods; |
| | | /** |
| | | * 销售佣金(套餐商品) |
| | | */ |
| | | @ApiModelProperty(value = "销售佣金(套餐商品)") |
| | | private BigDecimal salesCommissionGroup; |
| | | /** |
| | | * 管理利益(普通商品) |
| | | */ |
| | | @ApiModelProperty(value = "管理利益(普通商品)") |
| | | private BigDecimal manageProfitGoods; |
| | | /** |
| | | * 管理利益(套餐商品) |
| | | */ |
| | | @ApiModelProperty(value = "管理利益(套餐商品)") |
| | | private BigDecimal manageProfitGroup; |
| | | /** |
| | | * 育成奖 |
| | | */ |
| | | @ApiModelProperty(value = "育成奖") |
| | | private BigDecimal breedAward; |
| | | /** |
| | | * 应发佣金 |
| | | */ |
| | | @ApiModelProperty(value = "应发佣金") |
| | | private BigDecimal commissionPayable; |
| | | /** |
| | | * 税前加款 |
| | | */ |
| | | @ApiModelProperty(value = "税前加款") |
| | | private BigDecimal addBeforeTax; |
| | | /** |
| | | * 税前扣款 |
| | | */ |
| | | @ApiModelProperty(value = "税前扣款") |
| | | private BigDecimal subBeforeTax; |
| | | /** |
| | | * 税前应发佣金 |
| | | */ |
| | | @ApiModelProperty(value = "税前应发佣金") |
| | | private BigDecimal commissionBeforeTax; |
| | | /** |
| | | * 实发金额 |
| | | */ |
| | | @ApiModelProperty(value = "实发金额") |
| | | private BigDecimal paymentAmount; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 结算月份 |
| | | */ |
| | | @ApiModelProperty(value = "结算月份") |
| | | private String month; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @ApiModelProperty(value = "省级") |
| | | @TableField(exist = false) |
| | | private String provinceCodeName; |
| | | |
| | | @ApiModelProperty(value = "市级") |
| | | @TableField(exist = false) |
| | | private String cityCodeName; |
| | | |
| | | @ApiModelProperty(value = "区县") |
| | | @TableField(exist = false) |
| | | private String countyCodeName; |
| | | |
| | | @ApiModelProperty(value = "销售员工姓名") |
| | | @TableField(exist = false) |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "职级") |
| | | @TableField(exist = false) |
| | | private Integer memberGradeId; |
| | | |
| | | @ApiModelProperty(value = "职级名称") |
| | | @TableField(exist = false) |
| | | private String userGradeName; |
| | | |
| | | public String getUserGradeName() { |
| | | return userGradeName = EnumMemberGrade.getMarkByIndex(memberGradeId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * APP版本 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_app_version") |
| | | @ApiModel(value = "APP版本") |
| | | public class MallAppVersion extends Model<MallAppVersion> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Integer id; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 版本id |
| | | */ |
| | | @TableField("version_id") |
| | | @ApiModelProperty(value = "版本id") |
| | | private String versionId; |
| | | /** |
| | | * 版本号 |
| | | */ |
| | | @TableField("version_no") |
| | | @ApiModelProperty(value = "版本号") |
| | | private String versionNo; |
| | | /** |
| | | * 版本描述 |
| | | */ |
| | | @ApiModelProperty(value = "版本描述") |
| | | private String remark; |
| | | /** |
| | | * 是否强制更新 |
| | | */ |
| | | @TableField("is_force_update") |
| | | @ApiModelProperty(value = "是否强制更新") |
| | | private Integer isForceUpdate; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer isDelete; |
| | | /** |
| | | * 安装包地址 |
| | | */ |
| | | @TableField("app_url") |
| | | @ApiModelProperty(value = "安装包地址") |
| | | private String appUrl; |
| | | /** |
| | | * 版本类型,枚举EnumAppVersionType |
| | | */ |
| | | @TableField("version_type") |
| | | @ApiModelProperty(value = "版本类型,枚举EnumAppVersionType") |
| | | private Integer versionType; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品分类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_classify_one") |
| | | @ApiModel(value = "商品分类") |
| | | public class MallClassifyOne extends Model<MallClassifyOne> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Integer id; |
| | | /** |
| | | * 分类名称 |
| | | */ |
| | | @TableField("classify_name") |
| | | @ApiModelProperty(value = "分类名称") |
| | | private String classifyName; |
| | | /** |
| | | * 图片 |
| | | */ |
| | | @TableField("class_image") |
| | | @ApiModelProperty(value = "图片") |
| | | private String classImage; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @ApiModelProperty(value = "排序") |
| | | private Integer sort; |
| | | |
| | | @TableField("is_lock") |
| | | @ApiModelProperty(value = "是否锁定") |
| | | private Integer isLock; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer isDelete; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品二级分类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_classify_two") |
| | | @ApiModel(value = "商品二级分类") |
| | | public class MallClassifyTwo extends Model<MallClassifyTwo> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Integer id; |
| | | /** |
| | | * 分类名称 |
| | | */ |
| | | @TableField("classify_name") |
| | | @ApiModelProperty(value = "分类名称") |
| | | private String classifyName; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 上级分类ID |
| | | */ |
| | | @TableField("parent_classify_id") |
| | | @ApiModelProperty(value = "上级分类ID") |
| | | private Integer parentClassifyId; |
| | | /** |
| | | * 图标 |
| | | */ |
| | | @ApiModelProperty(value = "图标") |
| | | private String icon; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @ApiModelProperty(value = "排序") |
| | | private Integer sort; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "是否删除") |
| | | private String isDelete; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 快递公司 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-30 |
| | | */ |
| | | @Data |
| | | @TableName("mall_express_company") |
| | | @ApiModel(value = "快递公司") |
| | | public class MallExpressCompany extends Model<MallExpressCompany> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 快递公司id |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "快递公司id") |
| | | private Integer id; |
| | | /** |
| | | * 快递公司名称 |
| | | */ |
| | | @ApiModelProperty(value = "快递公司名称") |
| | | private String name; |
| | | /** |
| | | * 时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "时间") |
| | | private Date createTime; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品信息 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_goods") |
| | | @ApiModel(value = "商品信息") |
| | | public class MallGoods extends Model<MallGoods> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Integer id; |
| | | /** |
| | | * 一级分类ID |
| | | */ |
| | | @TableField("classify_id_one") |
| | | @ApiModelProperty(value = "一级分类ID") |
| | | private Integer classifyIdOne; |
| | | @TableField(exist = false) |
| | | private MallClassifyOne mallClassifyOne; |
| | | /** |
| | | * 二级分类ID |
| | | */ |
| | | @TableField("classify_id_two") |
| | | @ApiModelProperty(value = "二级分类ID") |
| | | private Integer classifyIdTwo; |
| | | @TableField(exist = false) |
| | | private MallClassifyTwo mallClassifyTwo; |
| | | /** |
| | | * 商品编号 |
| | | */ |
| | | @TableField("goods_no") |
| | | @ApiModelProperty(value = "商品编号") |
| | | private String goodsNo; |
| | | /** |
| | | * 商品名称 |
| | | */ |
| | | @TableField("goods_name") |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodsName; |
| | | /** |
| | | * 商品副标题 |
| | | */ |
| | | @TableField("goods_title") |
| | | @ApiModelProperty(value = "商品副标题") |
| | | private String goodsTitle; |
| | | /** |
| | | * 商品列表图 |
| | | */ |
| | | @TableField("goods_image") |
| | | @ApiModelProperty(value = "商品列表图") |
| | | private String goodsImage; |
| | | /** |
| | | * 市场价 |
| | | */ |
| | | @ApiModelProperty(value = "市场价") |
| | | private BigDecimal price; |
| | | /** |
| | | * 美天销售价 |
| | | */ |
| | | @TableField("price_sale") |
| | | @ApiModelProperty(value = "美天销售价") |
| | | private BigDecimal priceSale; |
| | | /** |
| | | * 会员价 |
| | | */ |
| | | @TableField("price_member") |
| | | @ApiModelProperty(value = "会员价") |
| | | private BigDecimal priceMember; |
| | | /** |
| | | * 商品库存 |
| | | */ |
| | | @ApiModelProperty(value = "商品库存") |
| | | private Integer stock; |
| | | /** |
| | | * 购买次数 |
| | | */ |
| | | @TableField("buy_count") |
| | | @ApiModelProperty(value = "购买次数") |
| | | private Integer buyCount; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer isDelete; |
| | | /** |
| | | * 状态,枚举字典 |
| | | */ |
| | | @ApiModelProperty(value = "状态,枚举字典") |
| | | private Integer state; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @TableField("update_time") |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Date updateTime; |
| | | /** |
| | | * 是否推荐 |
| | | */ |
| | | @TableField("is_recommend") |
| | | @ApiModelProperty(value = "是否推荐") |
| | | private Integer isRecommend; |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | @TableField("look_count") |
| | | @ApiModelProperty(value = "浏览量") |
| | | private Integer lookCount; |
| | | /** |
| | | * 收藏量 |
| | | */ |
| | | @TableField("collect_count") |
| | | @ApiModelProperty(value = "收藏量") |
| | | private Integer collectCount; |
| | | /** |
| | | * 审核备注 |
| | | */ |
| | | @TableField("audit_remark") |
| | | @ApiModelProperty(value = "审核备注") |
| | | private String auditRemark; |
| | | /** |
| | | * 排序字段 |
| | | */ |
| | | @ApiModelProperty(value = "排序字段") |
| | | private Integer sort; |
| | | /** |
| | | * 商品标签 |
| | | */ |
| | | @TableField("tag_ids") |
| | | @ApiModelProperty(value = "商品标签") |
| | | private String tagIds; |
| | | /** |
| | | * 套餐类型,0普通商品,1黄金套餐,2钻石套餐 |
| | | */ |
| | | @TableField("group_type") |
| | | @ApiModelProperty(value = "套餐类型,0普通商品,1黄金套餐,2钻石套餐") |
| | | private Integer groupType; |
| | | /** |
| | | * 套餐开始时间 |
| | | */ |
| | | @TableField("start_time") |
| | | @ApiModelProperty(value = "套餐开始时间") |
| | | private Date startTime; |
| | | /** |
| | | * 套餐结束时间 |
| | | */ |
| | | @TableField("end_time") |
| | | @ApiModelProperty(value = "套餐结束时间") |
| | | private Date endTime; |
| | | |
| | | @TableField(exist = false) |
| | | private List<MallGoodsSku> goodsSkus; |
| | | |
| | | @TableField(exist = false) |
| | | private String goodsSkusJson; |
| | | |
| | | @TableField(exist = false) |
| | | private String goodsSetJson; |
| | | |
| | | @TableField(exist = false) |
| | | private MallGoodsSet goodsSet; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "详情H5") |
| | | private String introH5; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "购买须知H5") |
| | | private String purchaseH5; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "详情图") |
| | | private String introImage; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品购物车 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_goods_cart") |
| | | @ApiModel(value = "商品购物车") |
| | | public class MallGoodsCart extends Model<MallGoodsCart> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Integer id; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 商家ID |
| | | */ |
| | | @TableField("merchant_id") |
| | | @ApiModelProperty(value = "商家ID") |
| | | private Integer merchantId; |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | @TableField("user_id") |
| | | @ApiModelProperty(value = "用户ID") |
| | | private Integer userId; |
| | | /** |
| | | * 商品ID |
| | | */ |
| | | @TableField("goods_id") |
| | | @ApiModelProperty(value = "商品ID") |
| | | private Integer goodsId; |
| | | /** |
| | | * 商品SKU |
| | | */ |
| | | @TableField("goods_sku_id") |
| | | @ApiModelProperty(value = "商品SKU") |
| | | private Integer goodsSkuId; |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value = "数量 ") |
| | | private Integer number; |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | @TableField("update_time") |
| | | @ApiModelProperty(value = "更新时间") |
| | | private Date updateTime; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品详情 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("mall_goods_detail") |
| | | @ApiModel(value = "商品详情") |
| | | public class MallGoodsDetail extends Model<MallGoodsDetail> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 商品ID |
| | | */ |
| | | @TableId(type = IdType.INPUT) |
| | | @ApiModelProperty(value = "商品ID") |
| | | private Integer id; |
| | | /** |
| | | * 商品图片 |
| | | */ |
| | | @TableField("img_list") |
| | | @ApiModelProperty(value = "商品图片") |
| | | private String imgList; |
| | | /** |
| | | * 详情H5 |
| | | */ |
| | | @TableField("intro_h5") |
| | | @ApiModelProperty(value = "详情H5") |
| | | private String introH5; |
| | | /** |
| | | * 购买须知H5 |
| | | */ |
| | | @TableField("purchase_h5") |
| | | @ApiModelProperty(value = "购买须知H5") |
| | | private String purchaseH5; |
| | | /** |
| | | * 详情图 |
| | | */ |
| | | @TableField("intro_image") |
| | | @ApiModelProperty(value = "详情图") |
| | | private String introImage; |
| | | /** |
| | | * 视频路径 |
| | | */ |
| | | @TableField("video_path") |
| | | @ApiModelProperty(value = "视频路径") |
| | | private String videoPath; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品系数设置 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @TableName("mall_goods_set") |
| | | @ApiModel(value = "商品系数设置") |
| | | public class MallGoodsSet extends Model<MallGoodsSet> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 商品ID |
| | | */ |
| | | @TableId(type = IdType.INPUT) |
| | | @ApiModelProperty(value = "商品ID") |
| | | private Integer id; |
| | | /** |
| | | * 购买业绩系数 |
| | | */ |
| | | @TableField("buy_coef") |
| | | @ApiModelProperty(value = "购买业绩系数") |
| | | private BigDecimal buyCoef; |
| | | /** |
| | | * 黄金营销员业绩系数 |
| | | */ |
| | | @TableField("v3_buy_coef") |
| | | @ApiModelProperty(value = "黄金营销员业绩系数") |
| | | private BigDecimal v3BuyCoef; |
| | | /** |
| | | * 黄金营销员佣金系数 |
| | | */ |
| | | @TableField("v3_brokerage_coef") |
| | | @ApiModelProperty(value = "黄金营销员佣金系数") |
| | | private BigDecimal v3BrokerageCoef; |
| | | /** |
| | | * 城市合伙人业绩系数 |
| | | */ |
| | | @TableField("v4_buy_coef") |
| | | @ApiModelProperty(value = "城市合伙人业绩系数") |
| | | private BigDecimal v4BuyCoef; |
| | | /** |
| | | * 城市合伙人佣金系数 |
| | | */ |
| | | @TableField("v4_brokerage_coef") |
| | | @ApiModelProperty(value = "城市合伙人佣金系数") |
| | | private BigDecimal v4BrokerageCoef; |
| | | /** |
| | | * 市场总监业绩系数 |
| | | */ |
| | | @TableField("v5_buy_coef") |
| | | @ApiModelProperty(value = "市场总监业绩系数") |
| | | private BigDecimal v5BuyCoef; |
| | | /** |
| | | * 市场总监佣金系数 |
| | | */ |
| | | @TableField("v5_brokerage_coef") |
| | | @ApiModelProperty(value = "市场总监佣金系数") |
| | | private BigDecimal v5BrokerageCoef; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品规格sku |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_goods_sku") |
| | | @ApiModel(value = "商品规格sku") |
| | | public class MallGoodsSku extends Model<MallGoodsSku> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Integer id; |
| | | /** |
| | | * 门店ID,0平台 |
| | | */ |
| | | @TableField("merchant_id") |
| | | @ApiModelProperty(value = "门店ID,0平台") |
| | | private Integer merchantId; |
| | | /** |
| | | * 商品id |
| | | */ |
| | | @TableField("goods_id") |
| | | @ApiModelProperty(value = "商品id") |
| | | private Integer goodsId; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "商品分类名") |
| | | private String classifyName; |
| | | |
| | | /** |
| | | * 商品规格值组合名称(冗余商品名称) |
| | | */ |
| | | @TableField("grep_name") |
| | | @ApiModelProperty(value = "商品规格值组合名称(冗余商品名称)") |
| | | private String grepName; |
| | | /** |
| | | * 商品规格值Id组合(id,id)小到大没有规格为0 |
| | | */ |
| | | @TableField("spec_grep") |
| | | @ApiModelProperty(value = "商品规格值Id组合(id,id)小到大没有规格为0") |
| | | private String specGrep; |
| | | |
| | | /** |
| | | * 套餐商品规格值组合名称 |
| | | */ |
| | | @TableField("group_spec_name") |
| | | @ApiModelProperty(value = "套餐商品规格值组合名称") |
| | | private String groupSpecName; |
| | | /** |
| | | * 套餐规格值Id组合 |
| | | */ |
| | | @TableField("group_spec_grep") |
| | | @ApiModelProperty(value = "套餐规格值Id组合") |
| | | private String groupSpecGrep; |
| | | /** |
| | | * 库存 |
| | | */ |
| | | @ApiModelProperty(value = "库存") |
| | | private Integer stock; |
| | | /** |
| | | * 图片地址 |
| | | */ |
| | | @TableField("img_url") |
| | | @ApiModelProperty(value = "图片地址") |
| | | private String imgUrl; |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @TableField("update_time") |
| | | @ApiModelProperty(value = "修改时间") |
| | | private Date updateTime; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 规格属性ids |
| | | */ |
| | | @TableField("spec_ids") |
| | | @ApiModelProperty(value = "规格属性ids") |
| | | private String specIds; |
| | | /** |
| | | * 套餐规格组ids |
| | | */ |
| | | @TableField("group_spec_ids") |
| | | @ApiModelProperty(value = "套餐规格组ids") |
| | | private String groupSpecIds; |
| | | /** |
| | | * 市场价 |
| | | */ |
| | | @ApiModelProperty(value = "市场价") |
| | | private BigDecimal price; |
| | | /** |
| | | * 美天销售价 |
| | | */ |
| | | @TableField("price_sale") |
| | | @ApiModelProperty(value = "美天销售价") |
| | | private BigDecimal priceSale; |
| | | /** |
| | | * 会员价 |
| | | */ |
| | | @TableField("price_member") |
| | | @ApiModelProperty(value = "会员价") |
| | | private BigDecimal priceMember; |
| | | /** |
| | | * 门店销售价 |
| | | */ |
| | | @TableField("price_merchant") |
| | | @ApiModelProperty(value = "门店销售价") |
| | | private BigDecimal priceMerchant; |
| | | /** |
| | | * 状态,1正常,2下架 |
| | | */ |
| | | @TableField("state") |
| | | @ApiModelProperty(value = "状态,1正常,2下架") |
| | | private Integer state; |
| | | /** |
| | | * 关联sku |
| | | */ |
| | | @TableField("sku_id") |
| | | @ApiModelProperty(value = "关联sku") |
| | | private Integer skuId; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | public List<String> getSpecGreps() { |
| | | if (StrUtil.isNotBlank(this.specGrep)) { |
| | | return CollUtil.newArrayList(StrUtil.split(this.specGrep, ",")); |
| | | } |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 规格属性 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_goods_spec") |
| | | @ApiModel(value = "规格属性") |
| | | public class MallGoodsSpec extends Model<MallGoodsSpec> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Integer id; |
| | | /** |
| | | * 一级分类ID串 |
| | | */ |
| | | @TableField("classify_id_one") |
| | | @ApiModelProperty(value = "一级分类ID串") |
| | | private String classifyIdOne; |
| | | /** |
| | | * 二级分类ID串 |
| | | */ |
| | | @TableField("classify_id_two") |
| | | @ApiModelProperty(value = "二级分类ID串") |
| | | private String classifyIdTwo; |
| | | /** |
| | | * 规格属性名称 |
| | | */ |
| | | @TableField("spec_name") |
| | | @ApiModelProperty(value = "规格属性名称") |
| | | private String specName; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 是否删除,1删除,0未删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "是否删除,1删除,0未删除") |
| | | private Integer isDelete; |
| | | /** |
| | | * 是否锁定 |
| | | */ |
| | | @TableField("is_lock") |
| | | @ApiModelProperty(value = "是否锁定") |
| | | private Integer isLock; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "规格值对象json") |
| | | private String specValuesJson; |
| | | |
| | | @TableField(exist = false) |
| | | private List<MallGoodsSpecValue> specValues; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 规格值 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_goods_spec_value") |
| | | @ApiModel(value = "规格值") |
| | | public class MallGoodsSpecValue extends Model<MallGoodsSpecValue> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Integer id; |
| | | /** |
| | | * 规格属性id |
| | | */ |
| | | @TableField("spec_id") |
| | | @ApiModelProperty(value = "规格属性id") |
| | | private Integer specId; |
| | | /** |
| | | * 规格值 |
| | | */ |
| | | @TableField("spec_value") |
| | | @ApiModelProperty(value = "规格值") |
| | | private String specValue; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer isDelete; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 套餐规格组 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-04-05 |
| | | */ |
| | | @Data |
| | | @TableName("mall_group_spec") |
| | | @ApiModel(value = "套餐规格组") |
| | | public class MallGroupSpec extends Model<MallGroupSpec> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主键ID") |
| | | private Integer id; |
| | | /** |
| | | * 规格组名 |
| | | */ |
| | | @TableField("spec_name") |
| | | @ApiModelProperty(value = "规格组名") |
| | | private String specName; |
| | | /** |
| | | * 商品ID串 |
| | | */ |
| | | @TableField("goods_ids") |
| | | @ApiModelProperty(value = "商品ID串") |
| | | private String goodsIds; |
| | | /** |
| | | * 商品名串 |
| | | */ |
| | | @TableField("goods_names") |
| | | @ApiModelProperty(value = "商品名串") |
| | | private String goodsNames; |
| | | /** |
| | | * 一级分类ID |
| | | */ |
| | | @TableField("classify_id_one") |
| | | @ApiModelProperty(value = "一级分类ID") |
| | | private Integer classifyIdOne; |
| | | /** |
| | | * 二级分类ID |
| | | */ |
| | | @TableField("classify_id_two") |
| | | @ApiModelProperty(value = "二级分类ID") |
| | | private Integer classifyIdTwo; |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @TableField("start_time") |
| | | @ApiModelProperty(value = "开始时间") |
| | | private String startTime; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @TableField("end_time") |
| | | @ApiModelProperty(value = "结束时间") |
| | | private String endTime; |
| | | /** |
| | | * 商品库存 |
| | | */ |
| | | @ApiModelProperty(value = "商品库存") |
| | | private Integer stock; |
| | | /** |
| | | * 区域城市ID |
| | | */ |
| | | @TableField("area_city_id") |
| | | @ApiModelProperty(value = "区域城市ID") |
| | | private Integer areaCityId; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "区域城市名") |
| | | private String areaCityName; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 是否锁定 |
| | | */ |
| | | @TableField("is_lock") |
| | | @ApiModelProperty(value = "是否锁定") |
| | | private Integer isLock; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer isDelete; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "商品总价值") |
| | | private BigDecimal totalPrice; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "销售价") |
| | | private BigDecimal priceMerchant; |
| | | |
| | | @TableField("province_code") |
| | | @ApiModelProperty(value = "省ID") |
| | | private String provinceCode; |
| | | |
| | | @TableField("province_name") |
| | | @ApiModelProperty(value = "省名") |
| | | private String provinceName; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableLogic; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.sinata.common.enums.mall.EnumMallOrderState; |
| | | import com.sinata.modular.system.model.MallOrderDetailUse; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品订单 |
| | | * </p> |
| | | * |
| | | * @author frankevil |
| | | * @since 2023-03-19 |
| | | */ |
| | | @Data |
| | | @TableName("mall_order") |
| | | @ApiModel(value = "商品订单") |
| | | public class MallOrder extends Model<MallOrder> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 子订单编号 |
| | | */ |
| | | @TableId("order_no") |
| | | @ApiModelProperty(value = "子订单编号") |
| | | private String orderNo; |
| | | /** |
| | | * 主订单ID |
| | | */ |
| | | @TableField("order_main_no") |
| | | @ApiModelProperty(value = "主订单ID") |
| | | private String orderMainNo; |
| | | /** |
| | | * 商家ID |
| | | */ |
| | | @TableField("merchant_id") |
| | | @ApiModelProperty(value = "商家ID") |
| | | private Integer merchantId; |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | @TableField("user_id") |
| | | @ApiModelProperty(value = "用户ID") |
| | | private Integer userId; |
| | | |
| | | @TableField("sale_user_id") |
| | | @ApiModelProperty(value = "用户ID") |
| | | private Integer saleUserId; |
| | | |
| | | @TableField("goods_id") |
| | | @ApiModelProperty(value = "商品ID") |
| | | private Integer goodsId; |
| | | /** |
| | | * 商品金额 |
| | | */ |
| | | @TableField("goods_money") |
| | | @ApiModelProperty(value = "商品金额") |
| | | private BigDecimal goodsMoney; |
| | | |
| | | @TableField("coupon_id") |
| | | @ApiModelProperty(value = "优惠券ID") |
| | | private Integer couponId; |
| | | @TableField("coupon_money") |
| | | @ApiModelProperty(value = "优惠券金额") |
| | | private BigDecimal couponMoney; |
| | | /** |
| | | * 运费金额 |
| | | */ |
| | | @TableField("freight_money") |
| | | @ApiModelProperty(value = "运费金额") |
| | | private BigDecimal freightMoney; |
| | | /** |
| | | * 实际支付金额 |
| | | */ |
| | | @TableField("pay_money") |
| | | @ApiModelProperty(value = "实际支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @TableField("pay_total_fee") |
| | | @ApiModelProperty(value = "实际支付金额") |
| | | private BigDecimal payTotalFee; |
| | | |
| | | /** |
| | | * 收货人 |
| | | */ |
| | | @TableField("take_name") |
| | | @ApiModelProperty(value = "收货人") |
| | | private String takeName; |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String phone; |
| | | /** |
| | | * 收货地址 |
| | | */ |
| | | @ApiModelProperty(value = "收货地址") |
| | | private String address; |
| | | /** |
| | | * 总数量 |
| | | */ |
| | | @ApiModelProperty(value = "总数量") |
| | | private Integer number; |
| | | /** |
| | | * 快递公司 |
| | | */ |
| | | @TableField("express_company") |
| | | @ApiModelProperty(value = "快递公司") |
| | | private String expressCompany; |
| | | /** |
| | | * 运单号 |
| | | */ |
| | | @TableField("waybill_no") |
| | | @ApiModelProperty(value = "运单号") |
| | | private String waybillNo; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String mark; |
| | | /** |
| | | * 发货时间 |
| | | */ |
| | | @TableField("send_time") |
| | | @ApiModelProperty(value = "发货时间") |
| | | private Date sendTime; |
| | | /** |
| | | * 发货时间 |
| | | */ |
| | | @TableField("take_time") |
| | | @ApiModelProperty(value = "发货时间") |
| | | private Date takeTime; |
| | | /** |
| | | * 取消类型(0用户取消1平台取消2自动取消) |
| | | */ |
| | | @TableField("cancel_type") |
| | | @ApiModelProperty(value = "取消类型(0用户取消1平台取消2自动取消)") |
| | | private Integer cancelType; |
| | | /** |
| | | * 取消时间 |
| | | */ |
| | | @TableField("cancel_time") |
| | | @ApiModelProperty(value = "取消时间") |
| | | private Date cancelTime; |
| | | /** |
| | | * 取消原因 |
| | | */ |
| | | @ApiModelProperty(value = "取消原因") |
| | | private String cause; |
| | | /** |
| | | * 取消详细描述 |
| | | */ |
| | | @TableField("cancel_describe") |
| | | @ApiModelProperty(value = "取消详细描述") |
| | | private String cancelDescribe; |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @ApiModelProperty(value = "状态") |
| | | private Integer state; |
| | | /** |
| | | * 用户0未删除1已删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "用户0未删除1已删除") |
| | | private Integer isDelete; |
| | | /** |
| | | * 后台删除0未删除1已删除 |
| | | */ |
| | | @TableLogic |
| | | @TableField("cms_delete") |
| | | @ApiModelProperty(value = "后台删除0未删除1已删除") |
| | | private Integer cmsDelete; |
| | | /** |
| | | * 下单时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "下单时间") |
| | | private Date createTime; |
| | | /** |
| | | * 是否申请售后 |
| | | */ |
| | | @TableField("is_after_sale") |
| | | @ApiModelProperty(value = "是否申请售后") |
| | | private Integer isAfterSale; |
| | | |
| | | @TableField("order_type") |
| | | @ApiModelProperty(value = "订单类型") |
| | | private Integer orderType; |
| | | |
| | | @TableField("transaction_no") |
| | | @ApiModelProperty(value = "订单类型") |
| | | private String transactionNo; |
| | | |
| | | @TableField("out_trade_no") |
| | | @ApiModelProperty(value = "订单类型") |
| | | private String outTradeNo; |
| | | |
| | | /** |
| | | * 下单用户显示id |
| | | */ |
| | | @TableField(exist = false) |
| | | private String userShowId; |
| | | /** |
| | | * 下单用户手机号 |
| | | */ |
| | | @TableField(exist = false) |
| | | private String userPhone; |
| | | /** |
| | | * 下单用户昵称 |
| | | */ |
| | | @TableField(exist = false) |
| | | private String userNickname; |
| | | /** |
| | | * 商品种类 |
| | | */ |
| | | @TableField(exist = false) |
| | | private Integer goodsNum; |
| | | |
| | | /** |
| | | * 订单详情 |
| | | */ |
| | | @TableField(exist = false) |
| | | List<MallOrderDetail> orderDetails; |
| | | |
| | | /** |
| | | * 商家名称 |
| | | */ |
| | | @TableField(exist = false) |
| | | private String merchantName; |
| | | |
| | | @TableField(exist = false) |
| | | private String goodsName; |
| | | |
| | | @TableField(exist = false) |
| | | private String grepName; |
| | | |
| | | @TableField(exist = false) |
| | | private Integer useNum; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.orderNo; |
| | | } |
| | | |
| | | @TableField("refund_price") |
| | | @ApiModelProperty(value = "退款金额") |
| | | private BigDecimal refundPrice; |
| | | |
| | | @TableField("refund_time") |
| | | @ApiModelProperty(value = "退款时间") |
| | | private Date refundTime; |
| | | |
| | | @TableField(exist = false) |
| | | private String stateName; |
| | | |
| | | @TableField(exist = false) |
| | | private String saleUserName; |
| | | |
| | | @TableField(exist = false) |
| | | private String saleShowId; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "核销记录") |
| | | private List<MallOrderDetailUse> useList; |
| | | |
| | | |
| | | public String getStateName() { |
| | | return EnumMallOrderState.getMarkByIndex(state); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单详情 |
| | | * </p> |
| | | * |
| | | * @author frankevil |
| | | * @since 2023-03-19 |
| | | */ |
| | | @Data |
| | | @TableName("mall_order_detail") |
| | | @ApiModel(value = "订单详情") |
| | | public class MallOrderDetail extends Model<MallOrderDetail> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 订单详细编号 |
| | | */ |
| | | @TableId("order_detail_no") |
| | | @ApiModelProperty(value = "订单详细编号") |
| | | private String orderDetailNo; |
| | | /** |
| | | * 子订单编号 |
| | | */ |
| | | @TableField("order_no") |
| | | @ApiModelProperty(value = "子订单编号") |
| | | private String orderNo; |
| | | /** |
| | | * 商品ID |
| | | */ |
| | | @TableField("goods_id") |
| | | @ApiModelProperty(value = "商品ID") |
| | | private Integer goodsId; |
| | | /** |
| | | * 商品SkuId |
| | | */ |
| | | @TableField("sku_id") |
| | | @ApiModelProperty(value = "商品SkuId") |
| | | private Integer skuId; |
| | | /** |
| | | * 规格值Id组合(id,id)小到大 |
| | | */ |
| | | @TableField("spec_grep") |
| | | @ApiModelProperty(value = "规格值Id组合(id,id)小到大") |
| | | private String specGrep; |
| | | /** |
| | | * 商品数量 |
| | | */ |
| | | @TableField("goods_num") |
| | | @ApiModelProperty(value = "商品数量") |
| | | private Integer goodsNum; |
| | | /** |
| | | * 商品售价 |
| | | */ |
| | | @TableField("sell_cost") |
| | | @ApiModelProperty(value = "商品售价") |
| | | private BigDecimal sellCost; |
| | | /** |
| | | * 商品规格组合名称 |
| | | */ |
| | | @TableField("grep_name") |
| | | @ApiModelProperty(value = "商品规格组合名称") |
| | | private String grepName; |
| | | /** |
| | | * 商品名称 |
| | | */ |
| | | @TableField("goods_name") |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodsName; |
| | | /** |
| | | * 商品图片 |
| | | */ |
| | | @TableField("goods_image") |
| | | @ApiModelProperty(value = "商品图片") |
| | | private String goodsImage; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "商品编号") |
| | | private String goodsNo; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.orderDetailNo; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品标签 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_tag") |
| | | @ApiModel(value = "商品标签") |
| | | public class MallTag extends Model<MallTag> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键ID |
| | | */ |
| | | @ApiModelProperty(value = "主键ID") |
| | | private Integer id; |
| | | /** |
| | | * 标签名 |
| | | */ |
| | | @TableField("tag_name") |
| | | @ApiModelProperty(value = "标签名") |
| | | private String tagName; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer isDelete; |
| | | /** |
| | | * 是否锁定 |
| | | */ |
| | | @TableField("is_lock") |
| | | @ApiModelProperty(value = "是否锁定") |
| | | private Integer isLock; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 收货地址 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_user_address") |
| | | @ApiModel(value = "收货地址") |
| | | public class MallUserAddress extends Model<MallUserAddress> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Long id; |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | @TableField("user_id") |
| | | @ApiModelProperty(value = "用户ID") |
| | | private Integer userId; |
| | | /** |
| | | * 默认地址 |
| | | */ |
| | | @TableField("is_default") |
| | | @ApiModelProperty(value = "默认地址") |
| | | private Integer isDefault; |
| | | /** |
| | | * 收货人 |
| | | */ |
| | | @TableField("take_name") |
| | | @ApiModelProperty(value = "收货人") |
| | | private String takeName; |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @ApiModelProperty(value = "联系电话") |
| | | private String phone; |
| | | /** |
| | | * 地区 |
| | | */ |
| | | @ApiModelProperty(value = "地区") |
| | | private String area; |
| | | /** |
| | | * 地址 |
| | | */ |
| | | @ApiModelProperty(value = "地址") |
| | | private String address; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer isDelete; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 收藏商品 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_user_collect") |
| | | @ApiModel(value = "收藏商品") |
| | | public class MallUserCollect extends Model<MallUserCollect> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "") |
| | | private Integer id; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @TableField("user_id") |
| | | @ApiModelProperty(value = "用户id") |
| | | private Integer userId; |
| | | /** |
| | | * 商品id |
| | | */ |
| | | @TableField("goods_id") |
| | | @ApiModelProperty(value = "商品id") |
| | | private Integer goodsId; |
| | | /** |
| | | * 门店id |
| | | */ |
| | | @TableField("menchant_id") |
| | | @ApiModelProperty(value = "门店id") |
| | | private Integer menchantId; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户评价 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_user_evaluation") |
| | | @ApiModel(value = "用户评价") |
| | | public class MallUserEvaluation extends Model<MallUserEvaluation> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Long id; |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | @TableField("user_id") |
| | | @ApiModelProperty(value = "用户ID") |
| | | private Integer userId; |
| | | |
| | | @TableField("merchant_id") |
| | | @ApiModelProperty(value = "商家id") |
| | | private Integer merchantId; |
| | | /** |
| | | * 商品ID |
| | | */ |
| | | @TableField("goods_id") |
| | | @ApiModelProperty(value = "商品ID") |
| | | private Integer goodsId; |
| | | |
| | | @TableField("order_no") |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNo; |
| | | @TableField("order_detail_no") |
| | | @ApiModelProperty(value = "详细订单编号") |
| | | private String orderDetailNo; |
| | | |
| | | /** |
| | | * 评分 |
| | | */ |
| | | @ApiModelProperty(value = "评分") |
| | | private Float score; |
| | | /** |
| | | * 评价内容 |
| | | */ |
| | | @ApiModelProperty(value = "评价内容") |
| | | private String detail; |
| | | /** |
| | | * 评价图片 |
| | | */ |
| | | @TableField("eva_image") |
| | | @ApiModelProperty(value = "评价图片") |
| | | private String evaImage; |
| | | /** |
| | | * 是否显示,0显示,1隐藏 |
| | | */ |
| | | @ApiModelProperty(value = "是否显示,0显示,1隐藏") |
| | | private Integer state; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer isDelete; |
| | | /** |
| | | * 评价时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "评价时间") |
| | | private Date createTime; |
| | | |
| | | @TableField("reply") |
| | | @ApiModelProperty(value = "商家回复") |
| | | private String reply; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户举报 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Data |
| | | @TableName("mall_user_report") |
| | | @ApiModel(value = "用户举报") |
| | | public class MallUserReport extends Model<MallUserReport> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Long id; |
| | | /** |
| | | * 用户ID |
| | | */ |
| | | @TableField("user_id") |
| | | @ApiModelProperty(value = "用户ID") |
| | | private Integer userId; |
| | | /** |
| | | * 商品ID |
| | | */ |
| | | @TableField("goods_id") |
| | | @ApiModelProperty(value = "商品ID") |
| | | private Integer goodsId; |
| | | /** |
| | | * 订单ID |
| | | */ |
| | | @TableField("order_id") |
| | | @ApiModelProperty(value = "订单ID") |
| | | private Integer orderId; |
| | | /** |
| | | * 举报内容 |
| | | */ |
| | | @ApiModelProperty(value = "举报内容") |
| | | private String detail; |
| | | /** |
| | | * 评价图片 |
| | | */ |
| | | @TableField("rep_image") |
| | | @ApiModelProperty(value = "评价图片") |
| | | private String repImage; |
| | | /** |
| | | * 是否处理 |
| | | */ |
| | | @ApiModelProperty(value = "是否处理") |
| | | private Integer state; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "是否删除") |
| | | private Integer isDelete; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | @TableField("report_state") |
| | | @ApiModelProperty(value = "举报情况1-属实,0--不属实") |
| | | private Integer reportState; |
| | | |
| | | @TableField("deduct_score") |
| | | @ApiModelProperty(value = "扣除分数") |
| | | private Integer deductScore; |
| | | |
| | | @TableField("merchant_id") |
| | | @ApiModelProperty(value = "商家id") |
| | | private Integer merchantId; |
| | | |
| | | @TableField("goods_type") |
| | | @ApiModelProperty(value = "商品或者订单类型 1-普通,2-米粒") |
| | | private Integer goodsType; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | import lombok.Data; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | /** |
| | | * <p> |
| | | * VIP权益 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-04-09 |
| | | */ |
| | | @Data |
| | | @TableName("mall_vip_equity") |
| | | @ApiModel(value = "VIP权益") |
| | | public class MallVipEquity extends Model<MallVipEquity> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "ID") |
| | | private Integer id; |
| | | /** |
| | | * 套餐类型,0普通商品,1黄金套餐,2钻石套餐 |
| | | */ |
| | | @TableField("group_type") |
| | | @ApiModelProperty(value = "套餐类型,0普通商品,1黄金套餐,2钻石套餐") |
| | | private Integer groupType; |
| | | /** |
| | | * 权益内容 |
| | | */ |
| | | @ApiModelProperty(value = "权益内容") |
| | | private String content; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | /** |
| | | * 是否删除,1删除,0未删除 |
| | | */ |
| | | @TableField("is_delete") |
| | | @ApiModelProperty(value = "是否删除,1删除,0未删除") |
| | | private Integer isDelete; |
| | | /** |
| | | * 是否锁定 |
| | | */ |
| | | @TableField("is_lock") |
| | | @ApiModelProperty(value = "是否锁定") |
| | | private Integer isLock; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.CommissionSettlementMonth; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 佣金月结算 服务类 |
| | | * </p> |
| | | * |
| | | * @author fq |
| | | * @since 2023-04-22 |
| | | */ |
| | | public interface ICommissionSettlementMonthService extends IService<CommissionSettlementMonth> { |
| | | |
| | | List<CommissionSettlementMonth> queryList(String beginTime, String endTime, String name, String showId, String area, Integer gradeId, String month, Integer pageNo, Integer pageSize); |
| | | Integer queryListCount(String beginTime, String endTime, String name, String showId, String area, Integer gradeId, String month); |
| | | |
| | | void addList(List<CommissionSettlementMonth> addMonthList); |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.CommissionSettlement; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 佣金结算明细 服务类 |
| | | * </p> |
| | | * |
| | | * @author fq |
| | | * @since 2023-04-22 |
| | | */ |
| | | public interface ICommissionSettlementService extends IService<CommissionSettlement> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallAppVersion; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * APP版本 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallAppVersionService extends IService<MallAppVersion> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallClassifyOne; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品分类 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallClassifyOneService extends IService<MallClassifyOne> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallClassifyTwo; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品二级分类 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallClassifyTwoService extends IService<MallClassifyTwo> { |
| | | |
| | | |
| | | public String getHierarchyName(Object id); |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallExpressCompany; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 快递公司 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-30 |
| | | */ |
| | | public interface IMallExpressCompanyService extends IService<MallExpressCompany> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsCart; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品购物车 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallGoodsCartService extends IService<MallGoodsCart> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsDetail; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品详情 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallGoodsDetailService extends IService<MallGoodsDetail> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoods; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品信息 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallGoodsService extends IService<MallGoods> { |
| | | |
| | | public void wrapperMapGoods(List<Map<String, Object>> list, String goodsKey); |
| | | |
| | | /** |
| | | * 保存商品 |
| | | * |
| | | * @param mallGoods |
| | | */ |
| | | void saveMallGoods(MallGoods mallGoods); |
| | | |
| | | /** |
| | | * 保存商品 |
| | | * |
| | | * @param mallGoods |
| | | */ |
| | | void updateMallGoods(MallGoods mallGoods); |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsSet; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品系数设置 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallGoodsSetService extends IService<MallGoodsSet> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsSku; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品规格组合sku表 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallGoodsSkuService extends IService<MallGoodsSku> { |
| | | |
| | | List<HashMap<String, Object>> queryMerchantGoodsList(Integer merchantId); |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsSpec; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 规格属性 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallGoodsSpecService extends IService<MallGoodsSpec> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsSpecValue; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 规格值 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallGoodsSpecValueService extends IService<MallGoodsSpecValue> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallGroupSpec; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 套餐规格组 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-04-05 |
| | | */ |
| | | public interface IMallGroupSpecService extends IService<MallGroupSpec> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallOrderDetail; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单详情 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallOrderDetailService extends IService<MallOrderDetail> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.modular.mall.model.MallOrder; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品订单 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-12 |
| | | */ |
| | | public interface IMallOrderService extends IService<MallOrder> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param page |
| | | * @param wrapper |
| | | * @return |
| | | */ |
| | | Page<MallOrder> findPage(Page<MallOrder> page, Wrapper<?> wrapper); |
| | | |
| | | /** |
| | | * 查询所有 |
| | | * |
| | | * @param wrapper |
| | | * @return |
| | | */ |
| | | List<MallOrder> findList(Wrapper<?> wrapper); |
| | | |
| | | /** |
| | | * 取消订单 |
| | | * |
| | | * @param orderNo |
| | | */ |
| | | void cancelOrder(String orderNo); |
| | | |
| | | /** |
| | | * 统计订单收益 |
| | | * |
| | | * @param wrapper |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> countOrderIncome(Wrapper<?> wrapper); |
| | | |
| | | List<Map<String, Object>> getOrderTopMapList(String beginTime, String endTime, Integer type, String provinceCode, String cityCode); |
| | | |
| | | List<Map<String, Object>> getShopTopMapList(String beginTime, String endTime, Integer type, String provinceCode, String cityCode); |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallTag; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品标签 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallTagService extends IService<MallTag> { |
| | | |
| | | List<MallTag> getMallTags(); |
| | | |
| | | List<String> getTagListByGoodsId(List<MallTag> mallTags, String tagIds); |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallUserAddress; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 收货地址 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallUserAddressService extends IService<MallUserAddress> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallUserCollect; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 收藏商品 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallUserCollectService extends IService<MallUserCollect> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallUserEvaluation; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户评价 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallUserEvaluationService extends IService<MallUserEvaluation> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallUserReport; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户举报 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | public interface IMallUserReportService extends IService<MallUserReport> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service; |
| | | |
| | | import com.sinata.modular.mall.model.MallVipEquity; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * VIP权益 服务类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-04-09 |
| | | */ |
| | | public interface IMallVipEquityService extends IService<MallVipEquity> { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.sinata.modular.mall.dao.CommissionSettlementMonthMapper; |
| | | import com.sinata.modular.mall.model.CommissionSettlementMonth; |
| | | import com.sinata.modular.mall.service.ICommissionSettlementMonthService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 佣金月结算 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author fq |
| | | * @since 2023-04-22 |
| | | */ |
| | | @Service |
| | | public class CommissionSettlementMonthServiceImpl extends ServiceImpl<CommissionSettlementMonthMapper, CommissionSettlementMonth> implements ICommissionSettlementMonthService { |
| | | |
| | | @Override |
| | | public List<CommissionSettlementMonth> queryList(String beginTime, String endTime, String name, String showId, String area, Integer gradeId, String month, Integer pageNo, Integer pageSize) { |
| | | Integer offset = null; |
| | | if (pageNo != null && pageSize != null) { |
| | | offset = (pageNo - 1 ) * pageSize; |
| | | } |
| | | return baseMapper.queryList(beginTime, endTime, name, showId, area, gradeId, month, offset, pageSize); |
| | | } |
| | | @Override |
| | | public Integer queryListCount(String beginTime, String endTime, String name, String showId, String area, Integer gradeId, String month) { |
| | | return baseMapper.queryListCount(beginTime, endTime, name, showId, area, gradeId, month); |
| | | } |
| | | |
| | | @Override |
| | | public void addList(List<CommissionSettlementMonth> addMonthList) { |
| | | baseMapper.addList(addMonthList); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.CommissionSettlement; |
| | | import com.sinata.modular.mall.dao.CommissionSettlementMapper; |
| | | import com.sinata.modular.mall.service.ICommissionSettlementService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 佣金结算明细 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author fq |
| | | * @since 2023-04-22 |
| | | */ |
| | | @Service |
| | | public class CommissionSettlementServiceImpl extends ServiceImpl<CommissionSettlementMapper, CommissionSettlement> implements ICommissionSettlementService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallAppVersion; |
| | | import com.sinata.modular.mall.dao.MallAppVersionMapper; |
| | | import com.sinata.modular.mall.service.IMallAppVersionService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * APP版本 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallAppVersionServiceImpl extends ServiceImpl<MallAppVersionMapper, MallAppVersion> implements IMallAppVersionService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallClassifyOne; |
| | | import com.sinata.modular.mall.dao.MallClassifyOneMapper; |
| | | import com.sinata.modular.mall.service.IMallClassifyOneService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品分类 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallClassifyOneServiceImpl extends ServiceImpl<MallClassifyOneMapper, MallClassifyOne> implements IMallClassifyOneService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallClassifyTwo; |
| | | import com.sinata.modular.mall.dao.MallClassifyTwoMapper; |
| | | import com.sinata.modular.mall.service.IMallClassifyTwoService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品二级分类 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallClassifyTwoServiceImpl extends ServiceImpl<MallClassifyTwoMapper, MallClassifyTwo> implements IMallClassifyTwoService { |
| | | |
| | | @Override |
| | | public String getHierarchyName(Object id) { |
| | | if (Objects.isNull(id)) { |
| | | return ""; |
| | | } |
| | | return this.baseMapper.getHierarchyName(id.toString()); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallExpressCompany; |
| | | import com.sinata.modular.mall.dao.MallExpressCompanyMapper; |
| | | import com.sinata.modular.mall.service.IMallExpressCompanyService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 快递公司 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-30 |
| | | */ |
| | | @Service |
| | | public class MallExpressCompanyServiceImpl extends ServiceImpl<MallExpressCompanyMapper, MallExpressCompany> implements IMallExpressCompanyService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsCart; |
| | | import com.sinata.modular.mall.dao.MallGoodsCartMapper; |
| | | import com.sinata.modular.mall.service.IMallGoodsCartService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品购物车 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallGoodsCartServiceImpl extends ServiceImpl<MallGoodsCartMapper, MallGoodsCart> implements IMallGoodsCartService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsDetail; |
| | | import com.sinata.modular.mall.dao.MallGoodsDetailMapper; |
| | | import com.sinata.modular.mall.service.IMallGoodsDetailService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品详情 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallGoodsDetailServiceImpl extends ServiceImpl<MallGoodsDetailMapper, MallGoodsDetail> implements IMallGoodsDetailService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.sinata.common.enums.EnumIsSystemNotice; |
| | | import com.sinata.core.shiro.ShiroKit; |
| | | import com.sinata.modular.mall.dao.MallGoodsMapper; |
| | | import com.sinata.modular.mall.model.MallGoods; |
| | | import com.sinata.modular.mall.model.MallGoodsDetail; |
| | | import com.sinata.modular.mall.model.MallGoodsSet; |
| | | import com.sinata.modular.mall.model.MallGoodsSku; |
| | | import com.sinata.modular.mall.service.IMallGoodsDetailService; |
| | | import com.sinata.modular.mall.service.IMallGoodsService; |
| | | import com.sinata.modular.mall.service.IMallGoodsSetService; |
| | | import com.sinata.modular.mall.service.IMallGoodsSkuService; |
| | | import com.sinata.modular.system.model.SystemNotice; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品信息 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallGoodsServiceImpl extends ServiceImpl<MallGoodsMapper, MallGoods> implements IMallGoodsService { |
| | | |
| | | @Resource |
| | | private IMallGoodsDetailService goodsDetailService; |
| | | |
| | | @Resource |
| | | private IMallGoodsSetService goodsSetService; |
| | | |
| | | @Resource |
| | | private IMallGoodsSkuService mallGoodsSkuService; |
| | | |
| | | @Override |
| | | public void wrapperMapGoods(List<Map<String, Object>> list, String goodsKey) { |
| | | // 用户ID串 |
| | | Object[] goodsIds = list.stream().map(o -> o.get(goodsKey)).collect(Collectors.toList()).toArray(); |
| | | // 用户列表 |
| | | List<MallGoods> goodsList = baseMapper.selectList( |
| | | new EntityWrapper<MallGoods>() |
| | | .setSqlSelect("id,goods_name goodsName") |
| | | .in("id", goodsIds) |
| | | ); |
| | | |
| | | // 封装数据 |
| | | for (Map<String, Object> map : list) { |
| | | for (MallGoods u : goodsList) { |
| | | if (u.getId().toString().equals(map.get(goodsKey) + "")) { |
| | | map.put(goodsKey + "_merchantName", u.getGoodsName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveMallGoods(MallGoods mallGoods) { |
| | | // 库存求和 |
| | | mallGoods.setStock(mallGoods.getGoodsSkus().stream().mapToInt(MallGoodsSku::getStock).sum()); |
| | | if (StrUtil.isNotBlank(mallGoods.getIntroImage())) { |
| | | mallGoods.setGoodsImage(mallGoods.getIntroImage().split(",")[0]); |
| | | } |
| | | |
| | | // 保存基本信息 |
| | | this.insert(mallGoods); |
| | | // 保存详情 |
| | | MallGoodsDetail goodsDetail = new MallGoodsDetail() |
| | | .setId(mallGoods.getId()) |
| | | .setIntroH5(mallGoods.getIntroH5()) |
| | | .setPurchaseH5(mallGoods.getPurchaseH5()) |
| | | .setIntroImage(mallGoods.getIntroImage()); |
| | | this.goodsDetailService.insert(goodsDetail); |
| | | // 保存商品系数 |
| | | MallGoodsSet goodsSet = mallGoods.getGoodsSet(); |
| | | goodsSet.setId(mallGoods.getId()); |
| | | this.goodsSetService.insert(goodsSet); |
| | | // 保存规格 |
| | | if (CollUtil.isNotEmpty(mallGoods.getGoodsSkus())) { |
| | | List<MallGoodsSku> goodsSkus = mallGoods.getGoodsSkus().stream().peek(sku -> { |
| | | sku.setGoodsId(mallGoods.getId()); |
| | | sku.setPrice(mallGoods.getPrice()); |
| | | sku.setPriceMember(mallGoods.getPriceMember()); |
| | | sku.setPriceSale(mallGoods.getPriceSale()); |
| | | }).collect(Collectors.toList()); |
| | | this.mallGoodsSkuService.insertBatch(goodsSkus); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void updateMallGoods(MallGoods mallGoods) { |
| | | if (mallGoods != null && mallGoods.getId() != null) { |
| | | // 添加后台消息通知 |
| | | addSystemNotice(this.selectById(mallGoods.getId()), mallGoods); |
| | | } |
| | | |
| | | // 库存求和 |
| | | mallGoods.setStock(mallGoods.getGoodsSkus().stream().mapToInt(MallGoodsSku::getStock).sum()); |
| | | if (StrUtil.isNotBlank(mallGoods.getIntroImage())) { |
| | | mallGoods.setGoodsImage(mallGoods.getIntroImage().split(",")[0]); |
| | | } |
| | | |
| | | // 修改基本信息 |
| | | this.updateById(mallGoods); |
| | | // 修改详情信息 |
| | | MallGoodsDetail goodsDetail = new MallGoodsDetail() |
| | | .setId(mallGoods.getId()) |
| | | .setImgList(mallGoods.getGoodsImage()) |
| | | .setIntroH5(mallGoods.getIntroH5()) |
| | | .setPurchaseH5(mallGoods.getPurchaseH5()) |
| | | .setIntroImage(mallGoods.getIntroImage()); |
| | | this.goodsDetailService.updateById(goodsDetail); |
| | | // 保存商品系数 |
| | | MallGoodsSet goodsSet = mallGoods.getGoodsSet(); |
| | | goodsSet.setId(mallGoods.getId()); |
| | | this.goodsSetService.updateById(goodsSet); |
| | | // 重新保存规格 |
| | | List<Integer> exitSkuIds = new ArrayList<>(); |
| | | if (CollUtil.isNotEmpty(mallGoods.getGoodsSkus())) { |
| | | exitSkuIds = mallGoods.getGoodsSkus().stream() |
| | | .peek(sku -> { |
| | | sku.setGoodsId(mallGoods.getId()); |
| | | sku.setPrice(mallGoods.getPrice()); |
| | | sku.setPriceMember(mallGoods.getPriceMember()); |
| | | sku.setPriceSale(mallGoods.getPriceSale()); |
| | | }) |
| | | .map(MallGoodsSku::getId) |
| | | .filter(Objects::nonNull) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | Wrapper<MallGoodsSku> wrapper = new EntityWrapper<MallGoodsSku>() |
| | | .eq("goods_id", mallGoods.getId()); |
| | | if (CollUtil.isNotEmpty(exitSkuIds)) { |
| | | wrapper.notIn("id", exitSkuIds); |
| | | } |
| | | this.mallGoodsSkuService.delete(wrapper); |
| | | if (CollUtil.isNotEmpty(mallGoods.getGoodsSkus())) { |
| | | this.mallGoodsSkuService.insertOrUpdateBatch(mallGoods.getGoodsSkus()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 添加后台消息通知 |
| | | * @param oldGoods |
| | | * @param newGoods |
| | | */ |
| | | public void addSystemNotice(MallGoods oldGoods, MallGoods newGoods) { |
| | | try { |
| | | StringBuffer updateStr = new StringBuffer(); |
| | | if (oldGoods.getPrice().compareTo(newGoods.getPrice()) != 0) { |
| | | updateStr.append("将市场价" + oldGoods.getPrice() + "元修改为" + newGoods.getPrice() + "元。"); |
| | | } |
| | | if (oldGoods.getPriceSale().compareTo(newGoods.getPriceSale()) != 0) { |
| | | updateStr.append("将美天销售价" + oldGoods.getPriceSale() + "元修改为" + newGoods.getPriceSale() + "元。"); |
| | | } |
| | | if (oldGoods.getPriceMember().compareTo(newGoods.getPriceMember()) != 0) { |
| | | updateStr.append("将会员价" + oldGoods.getPriceMember() + "元修改为" + newGoods.getPriceMember() + "元。"); |
| | | } |
| | | |
| | | if (updateStr.length() != 0) { |
| | | // 添加后台通知 |
| | | SystemNotice.builder() |
| | | .param(oldGoods.getId()) |
| | | .type(EnumIsSystemNotice.TYPE_8.index) |
| | | .content(ShiroKit.getUser().getName() + " 管理员修改 " + oldGoods.getGoodsName() + " 商品。" + updateStr) |
| | | .build() |
| | | .insert(); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsSet; |
| | | import com.sinata.modular.mall.dao.MallGoodsSetMapper; |
| | | import com.sinata.modular.mall.service.IMallGoodsSetService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品系数设置 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallGoodsSetServiceImpl extends ServiceImpl<MallGoodsSetMapper, MallGoodsSet> implements IMallGoodsSetService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsSku; |
| | | import com.sinata.modular.mall.dao.MallGoodsSkuMapper; |
| | | import com.sinata.modular.mall.service.IMallGoodsSkuService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品规格组合sku表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallGoodsSkuServiceImpl extends ServiceImpl<MallGoodsSkuMapper, MallGoodsSku> implements IMallGoodsSkuService { |
| | | @Override |
| | | public List<HashMap<String, Object>> queryMerchantGoodsList(Integer merchantId) { |
| | | return baseMapper.queryMerchantGoodsList(merchantId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsSpec; |
| | | import com.sinata.modular.mall.dao.MallGoodsSpecMapper; |
| | | import com.sinata.modular.mall.service.IMallGoodsSpecService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 规格属性 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallGoodsSpecServiceImpl extends ServiceImpl<MallGoodsSpecMapper, MallGoodsSpec> implements IMallGoodsSpecService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallGoodsSpecValue; |
| | | import com.sinata.modular.mall.dao.MallGoodsSpecValueMapper; |
| | | import com.sinata.modular.mall.service.IMallGoodsSpecValueService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 规格值 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallGoodsSpecValueServiceImpl extends ServiceImpl<MallGoodsSpecValueMapper, MallGoodsSpecValue> implements IMallGoodsSpecValueService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallGroupSpec; |
| | | import com.sinata.modular.mall.dao.MallGroupSpecMapper; |
| | | import com.sinata.modular.mall.service.IMallGroupSpecService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 套餐规格组 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-04-05 |
| | | */ |
| | | @Service |
| | | public class MallGroupSpecServiceImpl extends ServiceImpl<MallGroupSpecMapper, MallGroupSpec> implements IMallGroupSpecService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallOrderDetail; |
| | | import com.sinata.modular.mall.dao.MallOrderDetailMapper; |
| | | import com.sinata.modular.mall.service.IMallOrderDetailService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单详情 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallOrderDetailServiceImpl extends ServiceImpl<MallOrderDetailMapper, MallOrderDetail> implements IMallOrderDetailService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.SqlHelper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.sinata.common.enums.mall.EnumMallOrderState; |
| | | import com.sinata.core.common.exception.BizExceptionEnum; |
| | | import com.sinata.core.exception.GunsException; |
| | | import com.sinata.modular.mall.dao.MallOrderMapper; |
| | | import com.sinata.modular.mall.model.MallOrder; |
| | | import com.sinata.modular.mall.service.IMallOrderService; |
| | | import org.apache.ibatis.session.RowBounds; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品订单 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-12 |
| | | */ |
| | | @Service |
| | | public class MallOrderServiceImpl extends ServiceImpl<MallOrderMapper, MallOrder> implements IMallOrderService { |
| | | |
| | | @Override |
| | | public Page<MallOrder> findPage(Page<MallOrder> page, Wrapper<?> wrapper) { |
| | | wrapper = SqlHelper.fillWrapper(page, wrapper); |
| | | page.setRecords(baseMapper.findList(page, wrapper)); |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | | public List<MallOrder> findList(Wrapper<?> wrapper) { |
| | | return this.baseMapper.findList(RowBounds.DEFAULT, wrapper); |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void cancelOrder(String orderNo) { |
| | | MallOrder order = this.selectById(orderNo); |
| | | |
| | | if (order == null |
| | | || order.getState() != EnumMallOrderState.WAIT_PAY.getIndex() |
| | | || order.getState() != EnumMallOrderState.WAIT_CHECK.getIndex()) { |
| | | throw new GunsException(BizExceptionEnum.REQUEST_NULL.getCode(), "只有未支付或未发货的订单才能取消"); |
| | | } |
| | | |
| | | order.setCancelType(1); |
| | | order.setCancelTime(new Date()); |
| | | order.setState(EnumMallOrderState.CANCEL.getIndex()); |
| | | //修改状态 |
| | | this.updateById(order); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> countOrderIncome(Wrapper<?> wrapper) { |
| | | return this.baseMapper.countOrderIncome(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getOrderTopMapList(String beginTime, String endTime, Integer type, String provinceCode, String cityCode) { |
| | | return this.baseMapper.getOrderTopMapList(beginTime, endTime, type, provinceCode, cityCode); |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getShopTopMapList(String beginTime, String endTime, Integer type, String provinceCode, String cityCode) { |
| | | return this.baseMapper.getShopTopMapList(beginTime, endTime, type, provinceCode, cityCode); |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.sinata.modular.mall.model.MallTag; |
| | | import com.sinata.modular.mall.dao.MallTagMapper; |
| | | import com.sinata.modular.mall.service.IMallTagService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 商品标签 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallTagServiceImpl extends ServiceImpl<MallTagMapper, MallTag> implements IMallTagService { |
| | | @Override |
| | | public List<MallTag> getMallTags() { |
| | | return this.selectList( |
| | | new EntityWrapper<MallTag>() |
| | | .setSqlSelect("id, tag_name") |
| | | .eq("is_delete", 0) |
| | | .eq("is_lock", 0) |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> getTagListByGoodsId(List<MallTag> mallTags, String tagIds) { |
| | | if (mallTags == null) { |
| | | // 查询所有标签 |
| | | mallTags = this.getMallTags(); |
| | | } |
| | | |
| | | List<String> tagList = new ArrayList<>(); |
| | | if (StrUtil.isNotBlank(tagIds)) { |
| | | for (String tid : tagIds.split(",")) { |
| | | for (MallTag tag : mallTags) { |
| | | if (tid.equals(tag.getId().toString())) { |
| | | tagList.add(tag.getTagName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return tagList; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallUserAddress; |
| | | import com.sinata.modular.mall.dao.MallUserAddressMapper; |
| | | import com.sinata.modular.mall.service.IMallUserAddressService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 收货地址 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallUserAddressServiceImpl extends ServiceImpl<MallUserAddressMapper, MallUserAddress> implements IMallUserAddressService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallUserCollect; |
| | | import com.sinata.modular.mall.dao.MallUserCollectMapper; |
| | | import com.sinata.modular.mall.service.IMallUserCollectService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 收藏商品 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallUserCollectServiceImpl extends ServiceImpl<MallUserCollectMapper, MallUserCollect> implements IMallUserCollectService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallUserEvaluation; |
| | | import com.sinata.modular.mall.dao.MallUserEvaluationMapper; |
| | | import com.sinata.modular.mall.service.IMallUserEvaluationService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户评价 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallUserEvaluationServiceImpl extends ServiceImpl<MallUserEvaluationMapper, MallUserEvaluation> implements IMallUserEvaluationService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallUserReport; |
| | | import com.sinata.modular.mall.dao.MallUserReportMapper; |
| | | import com.sinata.modular.mall.service.IMallUserReportService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户举报 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-03-11 |
| | | */ |
| | | @Service |
| | | public class MallUserReportServiceImpl extends ServiceImpl<MallUserReportMapper, MallUserReport> implements IMallUserReportService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.mall.service.impl; |
| | | |
| | | import com.sinata.modular.mall.model.MallVipEquity; |
| | | import com.sinata.modular.mall.dao.MallVipEquityMapper; |
| | | import com.sinata.modular.mall.service.IMallVipEquityService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * VIP权益 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author goku |
| | | * @since 2023-04-09 |
| | | */ |
| | | @Service |
| | | public class MallVipEquityServiceImpl extends ServiceImpl<MallVipEquityMapper, MallVipEquity> implements IMallVipEquityService { |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.member.controller; |
| | | |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | 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.sinata.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.sinata.modular.member.model.MemMemberGrade; |
| | | import com.sinata.modular.member.service.IMemMemberGradeService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 会员等级控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/memMemberGrade") |
| | | public class MemMemberGradeController extends BaseController { |
| | | |
| | | private String PREFIX = "/member/memMemberGrade/"; |
| | | |
| | | @Autowired |
| | | private IMemMemberGradeService memMemberGradeService; |
| | | |
| | | /** |
| | | * 跳转到会员等级首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "memMemberGrade.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加会员等级 |
| | | */ |
| | | @RequestMapping("/memMemberGrade_add") |
| | | public String memMemberGradeAdd() { |
| | | return PREFIX + "memMemberGrade_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改会员等级 |
| | | */ |
| | | @RequestMapping("/memMemberGrade_update/{memMemberGradeId}") |
| | | public String memMemberGradeUpdate(@PathVariable Integer memMemberGradeId, Model model) { |
| | | MemMemberGrade memMemberGrade = memMemberGradeService.selectById(memMemberGradeId); |
| | | model.addAttribute("item", memMemberGrade); |
| | | LogObjectHolder.me().set(memMemberGrade); |
| | | return PREFIX + "memMemberGrade_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取会员等级列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MemMemberGrade>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (ToolUtil.isNotEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (ToolUtil.isNotEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = memMemberGradeService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增会员等级 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增会员等级") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MemMemberGrade memMemberGrade) { |
| | | memMemberGradeService.insert(memMemberGrade); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除会员等级") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | memMemberGradeService.updateForSet("is_delete = 1", new EntityWrapper<MemMemberGrade>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改会员等级 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改会员等级") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MemMemberGrade memMemberGrade) { |
| | | memMemberGradeService.updateById(memMemberGrade); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改会员等级状态 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改会员等级状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer memMemberGradeId, Integer state) { |
| | | memMemberGradeService.updateForSet("state = " + state, new EntityWrapper<MemMemberGrade>().eq("id", memMemberGradeId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转会员等级详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{memMemberGradeId}") |
| | | public Object detail(@PathVariable("memMemberGradeId") Integer memMemberGradeId, Model model) { |
| | | MemMemberGrade memMemberGrade = memMemberGradeService.selectById(memMemberGradeId); |
| | | model.addAttribute("item", memMemberGrade); |
| | | return PREFIX + "memMemberGrade_detail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转-会员等级设置 |
| | | */ |
| | | @RequestMapping("/set") |
| | | public String memMemberGradeSet(Model model) { |
| | | List<MemMemberGrade> list = memMemberGradeService.selectList(null); |
| | | model.addAttribute("list", list); |
| | | return PREFIX + "memMemberGrade_set.html"; |
| | | } |
| | | |
| | | /** |
| | | * 会员等级设置 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "会员等级设置") |
| | | @RequestMapping(value = "/memMemberGradeUpdate") |
| | | public Object memMemberGradeUpdate(Integer memMemberGradeId, Integer state) { |
| | | return SUCCESS_TIP; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.member.controller; |
| | | |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | 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.sinata.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.sinata.modular.member.model.MemMemberGradeRule; |
| | | import com.sinata.modular.member.service.IMemMemberGradeRuleService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 会员等级规则控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/memMemberGradeRule") |
| | | public class MemMemberGradeRuleController extends BaseController { |
| | | |
| | | private String PREFIX = "/member/memMemberGradeRule/"; |
| | | |
| | | @Autowired |
| | | private IMemMemberGradeRuleService memMemberGradeRuleService; |
| | | |
| | | /** |
| | | * 跳转到会员等级规则首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "memMemberGradeRule.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加会员等级规则 |
| | | */ |
| | | @RequestMapping("/memMemberGradeRule_add") |
| | | public String memMemberGradeRuleAdd() { |
| | | return PREFIX + "memMemberGradeRule_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改会员等级规则 |
| | | */ |
| | | @RequestMapping("/memMemberGradeRule_update/{memMemberGradeRuleId}") |
| | | public String memMemberGradeRuleUpdate(@PathVariable Integer memMemberGradeRuleId, Model model) { |
| | | MemMemberGradeRule memMemberGradeRule = memMemberGradeRuleService.selectById(memMemberGradeRuleId); |
| | | model.addAttribute("item", memMemberGradeRule); |
| | | LogObjectHolder.me().set(memMemberGradeRule); |
| | | return PREFIX + "memMemberGradeRule_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取会员等级规则列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MemMemberGradeRule>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (ToolUtil.isNotEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (ToolUtil.isNotEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = memMemberGradeRuleService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增会员等级规则 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增会员等级规则") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MemMemberGradeRule memMemberGradeRule) { |
| | | memMemberGradeRuleService.insert(memMemberGradeRule); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除会员等级规则") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | memMemberGradeRuleService.updateForSet("is_delete = 1", new EntityWrapper<MemMemberGradeRule>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改会员等级规则 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改会员等级规则") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MemMemberGradeRule memMemberGradeRule) { |
| | | memMemberGradeRuleService.updateById(memMemberGradeRule); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改会员等级规则状态 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改会员等级规则状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer memMemberGradeRuleId, Integer state) { |
| | | memMemberGradeRuleService.updateForSet("state = " + state, new EntityWrapper<MemMemberGradeRule>().eq("id", memMemberGradeRuleId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转会员等级规则详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{memMemberGradeRuleId}") |
| | | public Object detail(@PathVariable("memMemberGradeRuleId") Integer memMemberGradeRuleId, Model model) { |
| | | MemMemberGradeRule memMemberGradeRule = memMemberGradeRuleService.selectById(memMemberGradeRuleId); |
| | | model.addAttribute("item", memMemberGradeRule); |
| | | return PREFIX + "memMemberGradeRule_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.member.controller; |
| | | |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | 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.sinata.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.sinata.modular.member.model.MemMerchantBank; |
| | | import com.sinata.modular.member.service.IMemMerchantBankService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | /** |
| | | * 商家账户信息控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/memMerchantBank") |
| | | public class MemMerchantBankController extends BaseController { |
| | | |
| | | private String PREFIX = "/member/memMerchantBank/"; |
| | | |
| | | @Autowired |
| | | private IMemMerchantBankService memMerchantBankService; |
| | | |
| | | /** |
| | | * 跳转到商家账户信息首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "memMerchantBank.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加商家账户信息 |
| | | */ |
| | | @RequestMapping("/memMerchantBank_add") |
| | | public String memMerchantBankAdd() { |
| | | return PREFIX + "memMerchantBank_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改商家账户信息 |
| | | */ |
| | | @RequestMapping("/memMerchantBank_update/{memMerchantBankId}") |
| | | public String memMerchantBankUpdate(@PathVariable Integer memMerchantBankId, Model model) { |
| | | MemMerchantBank memMerchantBank = memMerchantBankService.selectById(memMerchantBankId); |
| | | model.addAttribute("item", memMerchantBank); |
| | | LogObjectHolder.me().set(memMerchantBank); |
| | | return PREFIX + "memMerchantBank_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取商家账户信息列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MemMerchantBank>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = memMerchantBankService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增商家账户信息 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增商家账户信息") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MemMerchantBank memMerchantBank) { |
| | | memMerchantBankService.insert(memMerchantBank); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除商家账户信息") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | memMerchantBankService.updateForSet("is_delete = 1", new EntityWrapper<MemMerchantBank>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商家账户信息 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商家账户信息") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MemMerchantBank memMerchantBank) { |
| | | memMerchantBankService.updateById(memMerchantBank); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商家账户信息状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商家账户信息状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer memMerchantBankId, Integer state) { |
| | | memMerchantBankService.updateForSet("state = " + state, new EntityWrapper<MemMerchantBank>().eq("id", memMerchantBankId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转商家账户信息详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{memMerchantBankId}") |
| | | public Object detail(@PathVariable("memMerchantBankId") Integer memMerchantBankId, Model model) { |
| | | MemMerchantBank memMerchantBank = memMerchantBankService.selectById(memMerchantBankId); |
| | | model.addAttribute("item", memMerchantBank); |
| | | return PREFIX + "memMerchantBank_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.member.controller; |
| | | |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import org.springframework.stereotype.Controller; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | 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.sinata.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.sinata.modular.member.model.MemMerchantBankDetail; |
| | | import com.sinata.modular.member.service.IMemMerchantBankDetailService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | /** |
| | | * 商家账户明细控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/memMerchantBankDetail") |
| | | public class MemMerchantBankDetailController extends BaseController { |
| | | |
| | | private String PREFIX = "/member/memMerchantBankDetail/"; |
| | | |
| | | @Autowired |
| | | private IMemMerchantBankDetailService memMerchantBankDetailService; |
| | | |
| | | /** |
| | | * 跳转到商家账户明细首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "memMerchantBankDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加商家账户明细 |
| | | */ |
| | | @RequestMapping("/memMerchantBankDetail_add") |
| | | public String memMerchantBankDetailAdd() { |
| | | return PREFIX + "memMerchantBankDetail_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改商家账户明细 |
| | | */ |
| | | @RequestMapping("/memMerchantBankDetail_update/{memMerchantBankDetailId}") |
| | | public String memMerchantBankDetailUpdate(@PathVariable Integer memMerchantBankDetailId, Model model) { |
| | | MemMerchantBankDetail memMerchantBankDetail = memMerchantBankDetailService.selectById(memMerchantBankDetailId); |
| | | model.addAttribute("item", memMerchantBankDetail); |
| | | LogObjectHolder.me().set(memMerchantBankDetail); |
| | | return PREFIX + "memMerchantBankDetail_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取商家账户明细列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MemMerchantBankDetail>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (!StringUtils.isEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = memMerchantBankDetailService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增商家账户明细 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增商家账户明细") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MemMerchantBankDetail memMerchantBankDetail) { |
| | | memMerchantBankDetailService.insert(memMerchantBankDetail); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除商家账户明细") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | memMerchantBankDetailService.updateForSet("is_delete = 1", new EntityWrapper<MemMerchantBankDetail>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商家账户明细 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商家账户明细") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MemMerchantBankDetail memMerchantBankDetail) { |
| | | memMerchantBankDetailService.updateById(memMerchantBankDetail); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商家账户明细状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商家账户明细状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer memMerchantBankDetailId, Integer state) { |
| | | memMerchantBankDetailService.updateForSet("state = " + state, new EntityWrapper<MemMerchantBankDetail>().eq("id", memMerchantBankDetailId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转商家账户明细详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{memMerchantBankDetailId}") |
| | | public Object detail(@PathVariable("memMerchantBankDetailId") Integer memMerchantBankDetailId, Model model) { |
| | | MemMerchantBankDetail memMerchantBankDetail = memMerchantBankDetailService.selectById(memMerchantBankDetailId); |
| | | model.addAttribute("item", memMerchantBankDetail); |
| | | return PREFIX + "memMerchantBankDetail_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.member.controller; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | 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.sinata.common.enums.EnumIsDelete; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.base.tips.ErrorTip; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.core.shiro.ShiroKit; |
| | | import com.sinata.core.util.DateUtils2; |
| | | import com.sinata.core.util.ExcelExportUtil; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import com.sinata.modular.mall.model.MallGoodsSku; |
| | | import com.sinata.modular.mall.service.IMallGoodsSkuService; |
| | | import com.sinata.modular.member.model.MemMerchant; |
| | | import com.sinata.modular.member.model.MerchantSysUser; |
| | | import com.sinata.modular.member.service.IMemMerchantService; |
| | | import com.sinata.modular.member.service.IMemUserService; |
| | | import com.sinata.modular.member.service.IMerchantSysUserService; |
| | | import com.sinata.modular.system.model.AreaCity; |
| | | import com.sinata.modular.system.model.StoreService; |
| | | import com.sinata.modular.system.service.IAreaCityService; |
| | | import com.sinata.modular.system.service.IStoreServiceService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | 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.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 商家信息控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/memMerchant") |
| | | public class MemMerchantController extends BaseController { |
| | | |
| | | private String PREFIX = "/member/memMerchant/"; |
| | | |
| | | @Autowired |
| | | private IMemUserService memUserService; |
| | | |
| | | @Autowired |
| | | private IMemMerchantService memMerchantService; |
| | | @Resource |
| | | private IStoreServiceService storeServiceService; |
| | | @Resource |
| | | private IAreaCityService areaCityService; |
| | | |
| | | @Resource |
| | | private IMallGoodsSkuService mallGoodsSkuService; |
| | | |
| | | @Resource |
| | | private IMerchantSysUserService sysUserService; |
| | | |
| | | |
| | | /** |
| | | * 跳转到商家信息首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model) { |
| | | Wrapper wrapper = new EntityWrapper<AreaCity>().orderBy("id", false); |
| | | wrapper.eq("is_open", 1); |
| | | wrapper.eq("is_delete", EnumIsDelete.EXISTED.index); |
| | | //model.addAttribute("cityAreaList", areaCityService.selectList(wrapper)); |
| | | wrapper.groupBy("province_code"); |
| | | model.addAttribute("provinceList", areaCityService.selectList(wrapper)); |
| | | return PREFIX + "memMerchant.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到商家审核信息首页 |
| | | */ |
| | | @RequestMapping("/auditeIndex") |
| | | public String auditeIndex() { |
| | | return PREFIX + "memMerchant-audite.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加商家信息 |
| | | */ |
| | | @RequestMapping("/memMerchant_add") |
| | | public String memMerchantAdd(Model model) { |
| | | Wrapper wrapper = new EntityWrapper<StoreService>().orderBy("id", false); |
| | | wrapper.eq("status", 1); |
| | | wrapper.eq("is_delete", EnumIsDelete.EXISTED.index); |
| | | model.addAttribute("serviceList", storeServiceService.selectList(wrapper)); |
| | | Wrapper wrapper2 = new EntityWrapper<AreaCity>().orderBy("id", false); |
| | | wrapper2.eq("is_open", 1); |
| | | wrapper2.eq("is_delete", EnumIsDelete.EXISTED.index); |
| | | model.addAttribute("cityAreaList", areaCityService.selectList(wrapper2)); |
| | | return PREFIX + "memMerchant_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改商家信息 |
| | | */ |
| | | @RequestMapping("/memMerchant_update/{memMerchantId}") |
| | | public String memMerchantUpdate(@PathVariable Integer memMerchantId, Model model) { |
| | | Wrapper wrapper = new EntityWrapper<StoreService>().orderBy("id", false); |
| | | wrapper.eq("status", 1); |
| | | wrapper.eq("is_delete", EnumIsDelete.EXISTED.index); |
| | | model.addAttribute("serviceList", storeServiceService.selectList(wrapper)); |
| | | MemMerchant memMerchant = memMerchantService.selectById(memMerchantId); |
| | | model.addAttribute("item", memMerchant); |
| | | Wrapper wrapper2 = new EntityWrapper<AreaCity>().orderBy("id", false); |
| | | wrapper2.eq("is_open", 1); |
| | | wrapper2.eq("is_delete", EnumIsDelete.EXISTED.index); |
| | | model.addAttribute("cityAreaList", areaCityService.selectList(wrapper2)); |
| | | model.addAttribute("merchantGoodsList", mallGoodsSkuService.queryMerchantGoodsList(memMerchant.getId())); |
| | | LogObjectHolder.me().set(memMerchant); |
| | | return PREFIX + "memMerchant_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转商家信息详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{memMerchantId}") |
| | | public Object detail(@PathVariable("memMerchantId") Integer memMerchantId, Model model) { |
| | | Wrapper wrapper = new EntityWrapper<StoreService>().orderBy("id", false); |
| | | wrapper.eq("status", 1); |
| | | wrapper.eq("is_delete", EnumIsDelete.EXISTED.index); |
| | | model.addAttribute("serviceList", storeServiceService.selectList(wrapper)); |
| | | MemMerchant memMerchant = memMerchantService.selectById(memMerchantId); |
| | | model.addAttribute("item", memMerchant); |
| | | Wrapper wrapper2 = new EntityWrapper<AreaCity>().orderBy("id", false); |
| | | wrapper2.eq("is_open", 1); |
| | | wrapper2.eq("is_delete", EnumIsDelete.EXISTED.index); |
| | | model.addAttribute("cityAreaList", areaCityService.selectList(wrapper2)); |
| | | model.addAttribute("merchantGoodsList", mallGoodsSkuService.queryMerchantGoodsList(memMerchant.getId())); |
| | | LogObjectHolder.me().set(memMerchant); |
| | | return PREFIX + "memMerchant_detail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改商家信息 |
| | | */ |
| | | @RequestMapping("/memMerchantAudite/{memMerchantId}") |
| | | public String memMerchantAudite(@PathVariable Integer memMerchantId, Model model) { |
| | | MemMerchant memMerchant = memMerchantService.selectById(memMerchantId); |
| | | model.addAttribute("item", memMerchant); |
| | | LogObjectHolder.me().set(memMerchant); |
| | | return PREFIX + "memMerchant_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 新增商家信息 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增商家信息") |
| | | @RequestMapping(value = "/add") |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Object add(MemMerchant memMerchant) { |
| | | try { |
| | | verifMerchantPhone(memMerchant.getImAccount(),null); |
| | | }catch (Exception e){ |
| | | return new ErrorTip(400,e.getMessage()); |
| | | } |
| | | memMerchantService.insert(memMerchant); |
| | | addMerchantGoods(memMerchant.getProductId(), memMerchant.getId()); |
| | | MerchantSysUser sysUser = new MerchantSysUser(); |
| | | sysUser.setId(memMerchant.getId()); |
| | | sysUser.setAccount(memMerchant.getImAccount()); |
| | | sysUser.setPhone(memMerchant.getImAccount()); |
| | | sysUser.setSalt(ShiroKit.getRandomSalt(5)); |
| | | sysUser.setPassword(ShiroKit.md5(memMerchant.getImPassword(), sysUser.getSalt())); |
| | | sysUser.setName(memMerchant.getMerchantName()); |
| | | sysUserService.insertOrUpdate(sysUser); |
| | | return SUCCESS_TIP; |
| | | } |
| | | private void verifMerchantPhone(String phone,Integer userId){ |
| | | Wrapper<MemMerchant> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("im_account",phone); |
| | | wrapper.eq("is_delete",0); |
| | | if(Objects.nonNull(userId)){ |
| | | wrapper.ne("id",userId); |
| | | } |
| | | List<MemMerchant> merchantList = memMerchantService.selectList(wrapper); |
| | | if(merchantList.size() > 0){ |
| | | throw new IllegalArgumentException("该账号已经绑定商户"); |
| | | } |
| | | } |
| | | |
| | | private void addMerchantGoods(String productId, Integer merchantId) { |
| | | if (StrUtil.isNotEmpty(productId)) { |
| | | JSONArray jsonArray = JSONArray.parseArray(productId); |
| | | List<MallGoodsSku> goodsList = new ArrayList<>(); |
| | | for (int i = 0; i < jsonArray.size(); i++) { |
| | | JSONObject jsonObject = jsonArray.getJSONObject(i); |
| | | Wrapper wrapper = new EntityWrapper<MallGoodsSku>(); |
| | | wrapper.eq("goods_id", jsonObject.getInteger("goodsId")); |
| | | if (Objects.nonNull(jsonObject.get("goodsSkuId"))) { |
| | | MallGoodsSku sku = new MallGoodsSku(); |
| | | sku.setPriceMerchant(jsonObject.getBigDecimal("price")); |
| | | sku.setState(jsonObject.getInteger("state")); |
| | | wrapper.eq("merchant_id", merchantId); |
| | | mallGoodsSkuService.update(sku, wrapper); |
| | | } else { |
| | | wrapper.eq("merchant_id", 0); |
| | | List<MallGoodsSku> skuList = mallGoodsSkuService.selectList(wrapper); |
| | | goodsList.addAll(skuList.stream().map(sku -> { |
| | | MallGoodsSku goodsSku = new MallGoodsSku(); |
| | | BeanUtils.copyProperties(sku, goodsSku); |
| | | goodsSku.setPriceMerchant(jsonObject.getBigDecimal("price")); |
| | | goodsSku.setPrice(sku.getPrice()); |
| | | goodsSku.setPriceMember(sku.getPriceMember()); |
| | | goodsSku.setPriceSale(sku.getPriceSale()); |
| | | goodsSku.setId(null); |
| | | goodsSku.setState(jsonObject.getInteger("state")); |
| | | goodsSku.setSkuId(sku.getId()); |
| | | goodsSku.setMerchantId(merchantId); |
| | | return goodsSku; |
| | | }).collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | } |
| | | if (goodsList.size() > 0) { |
| | | mallGoodsSkuService.insertBatch(goodsList); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除商家信息") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | memMerchantService.updateForSet("is_delete = 1", new EntityWrapper<MemMerchant>().in("id", ids.split(","))); |
| | | sysUserService.updateForSet("status = 3", new EntityWrapper<MerchantSysUser>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改商家信息 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改商家信息") |
| | | @RequestMapping(value = "/update") |
| | | @Transactional(rollbackFor = {Exception.class}) |
| | | public Object update(MemMerchant memMerchant) { |
| | | try { |
| | | verifMerchantPhone(memMerchant.getImAccount(),memMerchant.getId()); |
| | | }catch (Exception e){ |
| | | return new ErrorTip(400,e.getMessage()); |
| | | } |
| | | memMerchantService.updateById(memMerchant); |
| | | addMerchantGoods(memMerchant.getProductId(), memMerchant.getId()); |
| | | MerchantSysUser sysUser = new MerchantSysUser(); |
| | | sysUser.setId(memMerchant.getId()); |
| | | sysUser.setAccount(memMerchant.getImAccount()); |
| | | sysUser.setPhone(memMerchant.getImAccount()); |
| | | sysUser.setSalt(ShiroKit.getRandomSalt(5)); |
| | | sysUser.setPassword(ShiroKit.md5(memMerchant.getImPassword(), sysUser.getSalt())); |
| | | sysUser.setName(memMerchant.getMerchantName()); |
| | | sysUserService.insertOrUpdate(sysUser); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String merchantName, Integer cityCode1, Integer cityCode2, Integer cityCode3) { |
| | | Page<MemMerchant> page = new PageFactory().defaultPage(); |
| | | // 时间搜索 |
| | | if (ToolUtil.isNotEmpty(beginTime)) { |
| | | beginTime = beginTime + " 00:00:00"; |
| | | } |
| | | if (ToolUtil.isNotEmpty(endTime)) { |
| | | endTime = endTime + " 23:59:59"; |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<MemMerchant> list = memMerchantService.queryMerchantList(page, beginTime, endTime, merchantName, cityCode1, cityCode2, cityCode3); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 导出用户信息列表 |
| | | */ |
| | | @RequestMapping(value = "/export") |
| | | @ResponseBody |
| | | public void export(String beginTime, String endTime, String merchantName, Integer cityCode1, Integer cityCode2, Integer cityCode3, HttpServletResponse response) { |
| | | Page<MemMerchant> page = new PageFactory().defaultPage(); |
| | | |
| | | // 时间搜索 |
| | | if (StrUtil.isNotBlank(beginTime)) { |
| | | beginTime = beginTime + " 00:00:00"; |
| | | } |
| | | if (StrUtil.isNotBlank(endTime)) { |
| | | endTime = endTime + " 23:59:59"; |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<MemMerchant> list = memMerchantService.queryMerchantList(page, beginTime, endTime, merchantName, cityCode1, cityCode2, cityCode3); |
| | | |
| | | // 表格数据【封装】 |
| | | List<List<Object>> dataList = new ArrayList<>(); |
| | | |
| | | // 头部列【封装】 |
| | | List<Object> shellList = new ArrayList<>(); |
| | | shellList.add("添加时间"); |
| | | shellList.add("门店运营时间"); |
| | | shellList.add("商家名称"); |
| | | shellList.add("所在城市"); |
| | | shellList.add("详细地址"); |
| | | shellList.add("负责人"); |
| | | shellList.add("门店电话"); |
| | | shellList.add("营业时间"); |
| | | shellList.add("商品数量"); |
| | | shellList.add("门店服务"); |
| | | dataList.add(shellList); |
| | | |
| | | // 详细数据列【封装】 |
| | | for (MemMerchant map : list) { |
| | | shellList = new ArrayList<>(); |
| | | shellList.add(DateUtils2.getTime(map.getCreateTime())); |
| | | shellList.add(map.getStartTime()); |
| | | shellList.add(map.getMerchantName()); |
| | | shellList.add(map.getCityName()); |
| | | shellList.add(map.getAddress()); |
| | | shellList.add(map.getLinkman()); |
| | | shellList.add(map.getLinkPhone()); |
| | | shellList.add(getDate(map.getWorkStartDate()) + "至" + getDate(map.getWorkEndDate()) + " " |
| | | + map.getWorkStartTime() + "-" + map.getWorkEndTime()); |
| | | shellList.add(map.getNumber()); |
| | | shellList.add(map.getServiceName()); |
| | | dataList.add(shellList); |
| | | } |
| | | try { |
| | | // 调用工具类进行导出 |
| | | ExcelExportUtil.easySheet("导出数据" + DateUtils2.formatDate(new Date(), "YYYYMMddHHmmSS"), "导出数据", dataList, response); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | private String getDate(String key) { |
| | | String value = "周一"; |
| | | switch (key) { |
| | | case "2": |
| | | value = "周二"; |
| | | break; |
| | | case "3": |
| | | value = "周三"; |
| | | break; |
| | | case "4": |
| | | value = "周四"; |
| | | break; |
| | | case "5": |
| | | value = "周五"; |
| | | break; |
| | | case "6": |
| | | value = "周六"; |
| | | break; |
| | | case "7": |
| | | value = "周日"; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | return value; |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.sinata.modular.member.controller; |
| | | |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | 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.sinata.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.sinata.modular.member.model.MemOrderAuth; |
| | | import com.sinata.modular.member.service.IMemOrderAuthService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 会员实名认证订单控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/memOrderAuth") |
| | | public class MemOrderAuthController extends BaseController { |
| | | |
| | | private String PREFIX = "/member/memOrderAuth/"; |
| | | |
| | | @Autowired |
| | | private IMemOrderAuthService memOrderAuthService; |
| | | |
| | | /** |
| | | * 跳转到会员实名认证订单首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "memOrderAuth.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加会员实名认证订单 |
| | | */ |
| | | @RequestMapping("/memOrderAuth_add") |
| | | public String memOrderAuthAdd() { |
| | | return PREFIX + "memOrderAuth_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改会员实名认证订单 |
| | | */ |
| | | @RequestMapping("/memOrderAuth_update/{memOrderAuthId}") |
| | | public String memOrderAuthUpdate(@PathVariable Integer memOrderAuthId, Model model) { |
| | | MemOrderAuth memOrderAuth = memOrderAuthService.selectById(memOrderAuthId); |
| | | model.addAttribute("item", memOrderAuth); |
| | | LogObjectHolder.me().set(memOrderAuth); |
| | | return PREFIX + "memOrderAuth_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取会员实名认证订单列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MemOrderAuth>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (ToolUtil.isNotEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (ToolUtil.isNotEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = memOrderAuthService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增会员实名认证订单 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增会员实名认证订单") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MemOrderAuth memOrderAuth) { |
| | | memOrderAuthService.insert(memOrderAuth); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除会员实名认证订单") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | memOrderAuthService.updateForSet("is_delete = 1", new EntityWrapper<MemOrderAuth>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改会员实名认证订单 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改会员实名认证订单") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MemOrderAuth memOrderAuth) { |
| | | memOrderAuthService.updateById(memOrderAuth); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改会员实名认证订单状态 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改会员实名认证订单状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer memOrderAuthId, Integer state) { |
| | | memOrderAuthService.updateForSet("state = " + state, new EntityWrapper<MemOrderAuth>().eq("id", memOrderAuthId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转会员实名认证订单详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{memOrderAuthId}") |
| | | public Object detail(@PathVariable("memOrderAuthId") Integer memOrderAuthId, Model model) { |
| | | MemOrderAuth memOrderAuth = memOrderAuthService.selectById(memOrderAuthId); |
| | | model.addAttribute("item", memOrderAuth); |
| | | return PREFIX + "memOrderAuth_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.member.controller; |
| | | |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | 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.sinata.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.sinata.modular.member.model.MemTaskDayRecord; |
| | | import com.sinata.modular.member.service.IMemTaskDayRecordService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 每日任务完成记录控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/memTaskDayRecord") |
| | | public class MemTaskDayRecordController extends BaseController { |
| | | |
| | | private String PREFIX = "/member/memTaskDayRecord/"; |
| | | |
| | | @Autowired |
| | | private IMemTaskDayRecordService memTaskDayRecordService; |
| | | |
| | | /** |
| | | * 跳转到每日任务完成记录首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "memTaskDayRecord.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加每日任务完成记录 |
| | | */ |
| | | @RequestMapping("/memTaskDayRecord_add") |
| | | public String memTaskDayRecordAdd() { |
| | | return PREFIX + "memTaskDayRecord_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改每日任务完成记录 |
| | | */ |
| | | @RequestMapping("/memTaskDayRecord_update/{memTaskDayRecordId}") |
| | | public String memTaskDayRecordUpdate(@PathVariable Integer memTaskDayRecordId, Model model) { |
| | | MemTaskDayRecord memTaskDayRecord = memTaskDayRecordService.selectById(memTaskDayRecordId); |
| | | model.addAttribute("item", memTaskDayRecord); |
| | | LogObjectHolder.me().set(memTaskDayRecord); |
| | | return PREFIX + "memTaskDayRecord_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取每日任务完成记录列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MemTaskDayRecord>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (ToolUtil.isNotEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (ToolUtil.isNotEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = memTaskDayRecordService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增每日任务完成记录 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增每日任务完成记录") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MemTaskDayRecord memTaskDayRecord) { |
| | | memTaskDayRecordService.insert(memTaskDayRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除每日任务完成记录") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | memTaskDayRecordService.updateForSet("is_delete = 1", new EntityWrapper<MemTaskDayRecord>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改每日任务完成记录 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改每日任务完成记录") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MemTaskDayRecord memTaskDayRecord) { |
| | | memTaskDayRecordService.updateById(memTaskDayRecord); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改每日任务完成记录状态 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改每日任务完成记录状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer memTaskDayRecordId, Integer state) { |
| | | memTaskDayRecordService.updateForSet("state = " + state, new EntityWrapper<MemTaskDayRecord>().eq("id", memTaskDayRecordId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转每日任务完成记录详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{memTaskDayRecordId}") |
| | | public Object detail(@PathVariable("memTaskDayRecordId") Integer memTaskDayRecordId, Model model) { |
| | | MemTaskDayRecord memTaskDayRecord = memTaskDayRecordService.selectById(memTaskDayRecordId); |
| | | model.addAttribute("item", memTaskDayRecord); |
| | | return PREFIX + "memTaskDayRecord_detail.html"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.member.controller; |
| | | |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import org.springframework.stereotype.Controller; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | 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.sinata.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.sinata.modular.member.model.MemTaskDayRule; |
| | | import com.sinata.modular.member.service.IMemTaskDayRuleService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 每日任务规则设置控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/memTaskDayRule") |
| | | public class MemTaskDayRuleController extends BaseController { |
| | | |
| | | private String PREFIX = "/member/memTaskDayRule/"; |
| | | |
| | | @Autowired |
| | | private IMemTaskDayRuleService memTaskDayRuleService; |
| | | |
| | | /** |
| | | * 跳转到每日任务规则设置首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "memTaskDayRule.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加每日任务规则设置 |
| | | */ |
| | | @RequestMapping("/memTaskDayRule_add") |
| | | public String memTaskDayRuleAdd() { |
| | | return PREFIX + "memTaskDayRule_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改每日任务规则设置 |
| | | */ |
| | | @RequestMapping("/memTaskDayRule_update/{memTaskDayRuleId}") |
| | | public String memTaskDayRuleUpdate(@PathVariable Integer memTaskDayRuleId, Model model) { |
| | | MemTaskDayRule memTaskDayRule = memTaskDayRuleService.selectById(memTaskDayRuleId); |
| | | model.addAttribute("item", memTaskDayRule); |
| | | LogObjectHolder.me().set(memTaskDayRule); |
| | | return PREFIX + "memTaskDayRule_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取每日任务规则设置列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, String condition) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Wrapper wrapper = new EntityWrapper<MemTaskDayRule>().orderBy("id", false); |
| | | |
| | | // 时间搜索 |
| | | if (ToolUtil.isNotEmpty(beginTime)) { |
| | | wrapper.ge("create_time", beginTime + " 00:00:00"); |
| | | } |
| | | if (ToolUtil.isNotEmpty(endTime)) { |
| | | wrapper.le("create_time", endTime + " 23:59:59"); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = memTaskDayRuleService.selectMapsPage(page, wrapper).getRecords(); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增每日任务规则设置 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增每日任务规则设置") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MemTaskDayRule memTaskDayRule) { |
| | | memTaskDayRuleService.insert(memTaskDayRule); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除每日任务规则设置") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | memTaskDayRuleService.updateForSet("is_delete = 1", new EntityWrapper<MemTaskDayRule>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改每日任务规则设置 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改每日任务规则设置") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MemTaskDayRule memTaskDayRule) { |
| | | memTaskDayRuleService.updateById(memTaskDayRule); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改每日任务规则设置状态 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改每日任务规则设置状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer memTaskDayRuleId, Integer state) { |
| | | memTaskDayRuleService.updateForSet("state = " + state, new EntityWrapper<MemTaskDayRule>().eq("id", memTaskDayRuleId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转每日任务规则设置详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{memTaskDayRuleId}") |
| | | public Object detail(@PathVariable("memTaskDayRuleId") Integer memTaskDayRuleId, Model model) { |
| | | MemTaskDayRule memTaskDayRule = memTaskDayRuleService.selectById(memTaskDayRuleId); |
| | | model.addAttribute("item", memTaskDayRule); |
| | | return PREFIX + "memTaskDayRule_detail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到-每日任务规则设置 |
| | | */ |
| | | @RequestMapping("/set") |
| | | public String memTaskDayRuleSet() { |
| | | return PREFIX + "memTaskDayRule_set.html"; |
| | | } |
| | | |
| | | /** |
| | | * 修改-每日任务规则设置 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改每日任务规则设置状态") |
| | | @RequestMapping(value = "/memTaskDayRuleUpdate") |
| | | public Object memTaskDayRuleUpdate(Integer memTaskDayRuleId, Integer state) { |
| | | return SUCCESS_TIP; |
| | | } |
| | | } |
New file |
| | |
| | | package com.sinata.modular.member.controller; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.sinata.common.enums.EnumUserBankDetailDoneType; |
| | | import com.sinata.core.base.controller.BaseController; |
| | | import com.sinata.core.common.annotion.BussinessLog; |
| | | import com.sinata.core.common.annotion.Permission; |
| | | import com.sinata.core.common.constant.factory.PageFactory; |
| | | import com.sinata.core.log.LogObjectHolder; |
| | | import com.sinata.core.util.ToolUtil; |
| | | import com.sinata.modular.member.model.MemUserBankDetail; |
| | | import com.sinata.modular.member.service.IMemUserBankDetailService; |
| | | import com.sinata.modular.member.service.IMemUserService; |
| | | 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 java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 用户账户明细控制器 |
| | | * |
| | | * @author goku |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/memUserBankDetail") |
| | | public class MemUserBankDetailController extends BaseController { |
| | | |
| | | private String PREFIX = "/member/memUserBankDetail/"; |
| | | |
| | | @Autowired |
| | | private IMemUserService memUserService; |
| | | |
| | | @Autowired |
| | | private IMemUserBankDetailService memUserBankDetailService; |
| | | |
| | | /** |
| | | * 跳转到用户账户明细首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index(Model model, Integer type, Integer userId) { |
| | | model.addAttribute("type", type); |
| | | model.addAttribute("userId", userId); |
| | | |
| | | return PREFIX + "memUserBankDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加用户账户明细 |
| | | */ |
| | | @RequestMapping("/memUserBankDetail_add") |
| | | public String memUserBankDetailAdd() { |
| | | return PREFIX + "memUserBankDetail_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改用户账户明细 |
| | | */ |
| | | @RequestMapping("/memUserBankDetail_update/{memUserBankDetailId}") |
| | | public String memUserBankDetailUpdate(@PathVariable Integer memUserBankDetailId, Model model) { |
| | | MemUserBankDetail memUserBankDetail = memUserBankDetailService.selectById(memUserBankDetailId); |
| | | model.addAttribute("item", memUserBankDetail); |
| | | LogObjectHolder.me().set(memUserBankDetail); |
| | | return PREFIX + "memUserBankDetail_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取用户账户明细列表 |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/list") |
| | | public Object list(String beginTime, String endTime, Integer type, Integer userId, Integer doneType) { |
| | | Page<Map<String, Object>> page = new PageFactory().defaultPage(); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | map.put("userId", userId); |
| | | map.put("type", type); |
| | | if (org.apache.commons.lang3.StringUtils.isNotEmpty(beginTime)) { |
| | | map.put("beginTime", beginTime + " 00:00:00"); |
| | | |
| | | } |
| | | if (org.apache.commons.lang3.StringUtils.isNotEmpty(endTime)) { |
| | | map.put("endTime", endTime + " 23:59:59"); |
| | | |
| | | } |
| | | if (doneType != null) { |
| | | map.put("doneType", doneType); |
| | | } |
| | | |
| | | // 查询数据列表 |
| | | List<Map<String, Object>> list = memUserBankDetailService.selectForPage(page, map).getRecords(); |
| | | |
| | | for (Map<String, Object> o : list) { |
| | | Integer doneType1 = ToolUtil.toInt(o.get("doneType")); |
| | | o.put("doneType", EnumUserBankDetailDoneType.getMarkByIndex(doneType1)); |
| | | |
| | | } |
| | | |
| | | // 封装用户信息 |
| | | memUserService.wrapperMapUser(list, "userId"); |
| | | memUserService.wrapperMapUser(list, "otherUserId"); |
| | | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 新增用户账户明细 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "新增用户账户明细") |
| | | @RequestMapping(value = "/add") |
| | | public Object add(MemUserBankDetail memUserBankDetail) { |
| | | memUserBankDetailService.insert(memUserBankDetail); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除/批量删除 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "删除/批量删除用户账户明细") |
| | | @RequestMapping(value = "/delete") |
| | | public Object delete(@RequestParam String ids) { |
| | | // 逻辑删除 |
| | | memUserBankDetailService.updateForSet("is_delete = 1", new EntityWrapper<MemUserBankDetail>().in("id", ids.split(","))); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改用户账户明细 |
| | | */ |
| | | @Permission |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改用户账户明细") |
| | | @RequestMapping(value = "/update") |
| | | public Object update(MemUserBankDetail memUserBankDetail) { |
| | | memUserBankDetailService.updateById(memUserBankDetail); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改用户账户明细状态 |
| | | */ |
| | | @ResponseBody |
| | | @BussinessLog(value = "修改用户账户明细状态") |
| | | @RequestMapping(value = "/updateState") |
| | | public Object updateState(Integer memUserBankDetailId, Integer state) { |
| | | memUserBankDetailService.updateForSet("state = " + state, new EntityWrapper<MemUserBankDetail>().eq("id", memUserBankDetailId)); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 跳转用户账户明细详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{memUserBankDetailId}") |
| | | public Object detail(@PathVariable("memUserBankDetailId") Integer memUserBankDetailId, Model model) { |
| | | MemUserBankDetail memUserBankDetail = memUserBankDetailService.selectById(memUserBankDetailId); |
| | | model.addAttribute("item", memUserBankDetail); |
| | | return PREFIX + "memUserBankDetail_detail.html"; |
| | | } |
| | | } |
meiya-admin/src/main/java/com/sinata/modular/member/controller/MemUserController.java
meiya-admin/src/main/java/com/sinata/modular/member/controller/MemUserRelationController.java
meiya-admin/src/main/java/com/sinata/modular/member/controller/MemUserSalesController.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/MemMemberGradeMapper.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/MemMemberGradeRuleMapper.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/MemMerchantBankDetailMapper.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/MemMerchantBankMapper.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/MemMerchantMapper.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/MemOrderAuthMapper.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/MemTaskDayRecordMapper.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/MemTaskDayRuleMapper.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/MemUserBankDetailMapper.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/MemUserMapper.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/MemUserRelationMapper.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/MerchantSysUserMapper.java
meiya-admin/src/main/java/com/sinata/modular/member/dao/mapping/MemMemberGradeMapper.xml
meiya-admin/src/main/java/com/sinata/modular/member/dao/mapping/MemMemberGradeRuleMapper.xml
meiya-admin/src/main/java/com/sinata/modular/member/dao/mapping/MemMerchantBankDetailMapper.xml
meiya-admin/src/main/java/com/sinata/modular/member/dao/mapping/MemMerchantBankMapper.xml
meiya-admin/src/main/java/com/sinata/modular/member/dao/mapping/MemMerchantMapper.xml
meiya-admin/src/main/java/com/sinata/modular/member/dao/mapping/MemOrderAuthMapper.xml
meiya-admin/src/main/java/com/sinata/modular/member/dao/mapping/MemTaskDayRecordMapper.xml
meiya-admin/src/main/java/com/sinata/modular/member/dao/mapping/MemTaskDayRuleMapper.xml
meiya-admin/src/main/java/com/sinata/modular/member/dao/mapping/MemUserBankDetailMapper.xml
meiya-admin/src/main/java/com/sinata/modular/member/dao/mapping/MemUserMapper.xml
meiya-admin/src/main/java/com/sinata/modular/member/dao/mapping/MemUserRelationMapper.xml
meiya-admin/src/main/java/com/sinata/modular/member/dao/mapping/MerchantSysUserMapper.xml
meiya-admin/src/main/java/com/sinata/modular/member/model/MemMemberGrade.java
meiya-admin/src/main/java/com/sinata/modular/member/model/MemMemberGradeRule.java
meiya-admin/src/main/java/com/sinata/modular/member/model/MemMerchant.java
meiya-admin/src/main/java/com/sinata/modular/member/model/MemMerchantBank.java
meiya-admin/src/main/java/com/sinata/modular/member/model/MemMerchantBankDetail.java
meiya-admin/src/main/java/com/sinata/modular/member/model/MemOrderAuth.java
meiya-admin/src/main/java/com/sinata/modular/member/model/MemTaskDayRecord.java
meiya-admin/src/main/java/com/sinata/modular/member/model/MemTaskDayRule.java
meiya-admin/src/main/java/com/sinata/modular/member/model/MemUser.java
meiya-admin/src/main/java/com/sinata/modular/member/model/MemUserBankDetail.java
meiya-admin/src/main/java/com/sinata/modular/member/model/MemUserBankVo.java
meiya-admin/src/main/java/com/sinata/modular/member/model/MemUserRelation.java
meiya-admin/src/main/java/com/sinata/modular/member/model/MerchantSysUser.java
meiya-admin/src/main/java/com/sinata/modular/member/service/IMemMemberGradeRuleService.java
meiya-admin/src/main/java/com/sinata/modular/member/service/IMemMemberGradeService.java
meiya-admin/src/main/java/com/sinata/modular/member/service/IMemMerchantBankDetailService.java
meiya-admin/src/main/java/com/sinata/modular/member/service/IMemMerchantBankService.java
meiya-admin/src/main/java/com/sinata/modular/member/service/IMemMerchantService.java
meiya-admin/src/main/java/com/sinata/modular/member/service/IMemOrderAuthService.java
meiya-admin/src/main/java/com/sinata/modular/member/service/IMemTaskDayRecordService.java
meiya-admin/src/main/java/com/sinata/modular/member/service/IMemTaskDayRuleService.java
meiya-admin/src/main/java/com/sinata/modular/member/service/IMemUserBankDetailService.java
meiya-admin/src/main/java/com/sinata/modular/member/service/IMemUserRelationService.java
meiya-admin/src/main/java/com/sinata/modular/member/service/IMemUserService.java
meiya-admin/src/main/java/com/sinata/modular/member/service/IMerchantSysUserService.java
meiya-admin/src/main/java/com/sinata/modular/member/service/impl/MemMemberGradeRuleServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/member/service/impl/MemMemberGradeServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/member/service/impl/MemMerchantBankDetailServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/member/service/impl/MemMerchantBankServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/member/service/impl/MemMerchantServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/member/service/impl/MemOrderAuthServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/member/service/impl/MemTaskDayRecordServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/member/service/impl/MemTaskDayRuleServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/member/service/impl/MemUserBankDetailServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/member/service/impl/MemUserRelationServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/member/service/impl/MemUserServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/member/service/impl/MerchantSysUserServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/AreaCityController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/BlackboardController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/CityRegionController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/DeptController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/DictController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/HomeController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/KaptchaController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/LogController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/LoginController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/LoginLogController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/MemUserDeleteController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/MenuController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/MyCouponController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/MyCouponProductController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/MyDoctorController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/MyUserCouponController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/MyUserCouponOrderController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/MyUserSubstanceCouponController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/NoticeController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/RoleController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/StoreServiceController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/SysCompanyController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/TAppSetController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/TBannerController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/TFeedbackController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/TNoticeController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/TSystemSetController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/UserMgrController.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/util/AccountCheckUtil.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/util/UploadUtil.java
meiya-admin/src/main/java/com/sinata/modular/system/controller/util/WrapperUtil.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/AaaTestMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/AreaCityMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/DeptMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/DictMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/ExpenseMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/IndexReportMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/LoginLogMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/MallOrderDetailUseMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/MemUserDeleteMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/MemUserLoginMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/MenuMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/MyCouponMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/MyCouponProductMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/MyDoctorMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/MyUserCouponMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/MyUserCouponOrderMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/MyUserSubstanceCouponMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/NoticeMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/OperationLogMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/RelationMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/RoleMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/StoreServiceMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/SysCompanyMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/SystemNoticeMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/TAppSetMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/TBannerMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/TCityRegionMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/TFeedbackMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/TNoticeMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/TNoticeMessageMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/TSystemSetAuditMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/TSystemSetMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/UserMapper.java
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/AaaTestMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/AreaCityMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/DeptMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/DictMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/ExpenseMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/IndexReportMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/LoginLogMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/MallOrderDetailUseMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/MemUserDeleteMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/MemUserLoginMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/MenuMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/MyCouponMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/MyCouponProductMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/MyDoctorMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/MyUserCouponMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/MyUserCouponOrderMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/MyUserSubstanceCouponMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/NoticeMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/OperationLogMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/RelationMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/RoleMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/StoreServiceMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/SysCompanyMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/SystemNoticeMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/TAppSetMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/TBannerMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/TCityRegionMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/TFeedbackMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/TNoticeMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/TNoticeMessageMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/TSystemSetAuditMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/TSystemSetMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/dao/mapping/UserMapper.xml
meiya-admin/src/main/java/com/sinata/modular/system/factory/UserFactory.java
meiya-admin/src/main/java/com/sinata/modular/system/model/AaaTest.java
meiya-admin/src/main/java/com/sinata/modular/system/model/AreaCity.java
meiya-admin/src/main/java/com/sinata/modular/system/model/Dept.java
meiya-admin/src/main/java/com/sinata/modular/system/model/Dict.java
meiya-admin/src/main/java/com/sinata/modular/system/model/Expense.java
meiya-admin/src/main/java/com/sinata/modular/system/model/LoginLog.java
meiya-admin/src/main/java/com/sinata/modular/system/model/MallOrderDetailUse.java
meiya-admin/src/main/java/com/sinata/modular/system/model/MemUserDelete.java
meiya-admin/src/main/java/com/sinata/modular/system/model/MemUserLogin.java
meiya-admin/src/main/java/com/sinata/modular/system/model/Menu.java
meiya-admin/src/main/java/com/sinata/modular/system/model/MyCoupon.java
meiya-admin/src/main/java/com/sinata/modular/system/model/MyCouponProduct.java
meiya-admin/src/main/java/com/sinata/modular/system/model/MyDoctor.java
meiya-admin/src/main/java/com/sinata/modular/system/model/MyUserCoupon.java
meiya-admin/src/main/java/com/sinata/modular/system/model/MyUserCouponOrder.java
meiya-admin/src/main/java/com/sinata/modular/system/model/MyUserSubstanceCoupon.java
meiya-admin/src/main/java/com/sinata/modular/system/model/Notice.java
meiya-admin/src/main/java/com/sinata/modular/system/model/OperationLog.java
meiya-admin/src/main/java/com/sinata/modular/system/model/Relation.java
meiya-admin/src/main/java/com/sinata/modular/system/model/Role.java
meiya-admin/src/main/java/com/sinata/modular/system/model/StoreService.java
meiya-admin/src/main/java/com/sinata/modular/system/model/SysCompany.java
meiya-admin/src/main/java/com/sinata/modular/system/model/SystemNotice.java
meiya-admin/src/main/java/com/sinata/modular/system/model/TAppSet.java
meiya-admin/src/main/java/com/sinata/modular/system/model/TBanner.java
meiya-admin/src/main/java/com/sinata/modular/system/model/TCityRegion.java
meiya-admin/src/main/java/com/sinata/modular/system/model/TFeedback.java
meiya-admin/src/main/java/com/sinata/modular/system/model/TNotice.java
meiya-admin/src/main/java/com/sinata/modular/system/model/TNoticeMessage.java
meiya-admin/src/main/java/com/sinata/modular/system/model/TSystemSet.java
meiya-admin/src/main/java/com/sinata/modular/system/model/TSystemSetAudit.java
meiya-admin/src/main/java/com/sinata/modular/system/model/User.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IAaaTestService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IAreaCityService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IDeptService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IDictService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/ILoginLogService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IMallOrderDetailUseService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IMemUserDeleteService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IMemUserLoginService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IMenuService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IMyCouponProductService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IMyCouponService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IMyDoctorService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IMyUserCouponOrderService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IMyUserCouponService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IMyUserSubstanceCouponService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/INoticeService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IOperationLogService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IRelationService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IRoleService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IStoreServiceService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/ISysCompanyService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/ISystemNoticeService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/ITAppSetService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/ITBannerService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/ITCityRegionService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/ITFeedbackService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/ITNoticeMessageService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/ITNoticeService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/ITSystemSetAuditService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/ITSystemSetService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/IUserService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/RedisTemplateService.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/AaaTestServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/AreaCityServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/DeptServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/DictServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/LoginLogServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/MallOrderDetailUseServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/MemUserDeleteServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/MemUserLoginServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/MenuServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/MyCouponProductServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/MyCouponServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/MyDoctorServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/MyUserCouponOrderServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/MyUserCouponServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/MyUserSubstanceCouponServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/NoticeServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/OperationLogServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/RedisTemplateServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/RelationServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/RoleServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/StoreServiceServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/SysCompanyServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/SystemNoticeServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/TAppSetServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/TBannerServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/TCityRegionServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/TFeedbackServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/TNoticeMessageServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/TNoticeServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/TSystemSetAuditServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/TSystemSetServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/service/impl/UserServiceImpl.java
meiya-admin/src/main/java/com/sinata/modular/system/transfer/ManagerUser.java
meiya-admin/src/main/java/com/sinata/modular/system/transfer/ReqAddManager.java
meiya-admin/src/main/java/com/sinata/modular/system/transfer/ReqEditManager.java
meiya-admin/src/main/java/com/sinata/modular/system/transfer/UserDto.java
meiya-admin/src/main/java/com/sinata/modular/system/warpper/DeptWarpper.java
meiya-admin/src/main/java/com/sinata/modular/system/warpper/DictWarpper.java
meiya-admin/src/main/java/com/sinata/modular/system/warpper/LogWarpper.java
meiya-admin/src/main/java/com/sinata/modular/system/warpper/MenuWarpper.java
meiya-admin/src/main/java/com/sinata/modular/system/warpper/NoticeWrapper.java
meiya-admin/src/main/java/com/sinata/modular/system/warpper/RoleWarpper.java
meiya-admin/src/main/java/com/sinata/modular/system/warpper/TFeedbackWarpper.java
meiya-admin/src/main/java/com/sinata/modular/system/warpper/UserWarpper.java
meiya-admin/src/main/resources/META-INF/spring-devtools.properties
meiya-admin/src/main/resources/application-dev.yml
meiya-admin/src/main/resources/application-prod.yml
meiya-admin/src/main/resources/application-test.yml
meiya-admin/src/main/resources/application.yml
meiya-admin/src/main/resources/cert/m.mymtmy.com_server.pfx
meiya-admin/src/main/resources/ehcache.xml
meiya-admin/src/main/resources/template/entity.java.vm
meiya-admin/src/main/resources/wxpay/apiclient_cert.p12
meiya-admin/src/main/resources/wxpay/apiclient_cert.pem
meiya-admin/src/main/resources/wxpay/apiclient_key.pem
meiya-admin/src/main/resources/wxpay/证书使用说明.txt
meiya-admin/src/main/webapp/WEB-INF/view/404.html
meiya-admin/src/main/webapp/WEB-INF/view/blackboard.html
meiya-admin/src/main/webapp/WEB-INF/view/code/code.html
meiya-admin/src/main/webapp/WEB-INF/view/common/_container.html
meiya-admin/src/main/webapp/WEB-INF/view/common/_right.html
meiya-admin/src/main/webapp/WEB-INF/view/common/_tab.html
meiya-admin/src/main/webapp/WEB-INF/view/common/_theme.html
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/DateCon.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/DateTimeCon.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/DateTimeConValue.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/ImgUpload.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/ImgUrls.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/NameCon.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/SelectCon.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/TimeCon.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/VideoUrl.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/avatar.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/avatars.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/button.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/input.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/input_search.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/input_search_Bananer_product.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/input_search_merchant_product.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/input_search_product.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/input_search_user.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/select.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/table.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/tag_tips
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/umeditor.tag
meiya-admin/src/main/webapp/WEB-INF/view/common/tags/uploadFile.tag
meiya-admin/src/main/webapp/WEB-INF/view/home.html
meiya-admin/src/main/webapp/WEB-INF/view/index.html
meiya-admin/src/main/webapp/WEB-INF/view/login.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/commissionSettlement/commissionSettlement.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/commissionSettlement/commissionSettlement_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/commissionSettlement/commissionSettlement_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallAppVersion/mallAppVersion.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallAppVersion/mallAppVersion_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallAppVersion/mallAppVersion_addIos.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallAppVersion/mallAppVersion_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallAppVersion/mallAppVersion_editIos.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallClassifyOne/mallClassifyOne.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallClassifyOne/mallClassifyOne_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallClassifyOne/mallClassifyOne_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallClassifyTwo/mallClassifyTwo.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallClassifyTwo/mallClassifyTwo_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallClassifyTwo/mallClassifyTwo_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoods/add_specs.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoods/mallGoods.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoods/mallGoods_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoods/mallGoods_appView.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoods/mallGoods_buyCount.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoods/mallGoods_detail.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoods/mallGoods_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsCart/mallGoodsCart.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsCart/mallGoodsCart_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsCart/mallGoodsCart_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsDetail/mallGoodsDetail.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsDetail/mallGoodsDetail_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsDetail/mallGoodsDetail_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsGroup/mallGoodsGroup.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsGroup/mallGoodsGroup_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsGroup/mallGoodsGroup_area.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsGroup/mallGoodsGroup_detail.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsGroup/mallGoodsGroup_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsSku/mallGoodsSku.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsSku/mallGoodsSku_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsSku/mallGoodsSku_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsSpec/mallGoodsSpec.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsSpec/mallGoodsSpec_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsSpec/mallGoodsSpec_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsSpecValue/mallGoodsSpecValue.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsSpecValue/mallGoodsSpecValue_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGoodsSpecValue/mallGoodsSpecValue_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGroupSpec/mallGroupSpec.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGroupSpec/mallGroupSpec_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallGroupSpec/mallGroupSpec_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallOrder/deliverAuth.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallOrder/mallOrder.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallOrder/mallOrder_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallOrder/mallOrder_detail.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallOrder/mallOrder_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallOrder/mallOrder_express.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallOrder/mallOrder_goods.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallOrder/setFreightAuth.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallOrderDetail/mallOrderDetail.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallOrderDetail/mallOrderDetail_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallOrderDetail/mallOrderDetail_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallTag/mallTag.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallTag/mallTag_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallTag/mallTag_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserAddress/mallUserAddress.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserAddress/mallUserAddress_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserAddress/mallUserAddress_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserCollect/mallUserCollect.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserCollect/mallUserCollect_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserCollect/mallUserCollect_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserEvaluation/mallUserEvaluation.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserEvaluation/mallUserEvaluation_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserEvaluation/mallUserEvaluation_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserReport/mallUserReport.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserReport/mallUserReport_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserReport/mallUserReport_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallUserReport/mallUserReport_handler.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallVipEquity/mallVipEquity.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallVipEquity/mallVipEquity_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/mallVipEquity/mallVipEquity_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/tFeedback/tFeedback.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/tFeedback/tFeedback_add.html
meiya-admin/src/main/webapp/WEB-INF/view/mall/tFeedback/tFeedback_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMemberGrade/memMemberGrade.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMemberGrade/memMemberGrade_add.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMemberGrade/memMemberGrade_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMemberGrade/memMemberGrade_set.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMemberGradeRule/memMemberGradeRule.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMemberGradeRule/memMemberGradeRule_add.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMemberGradeRule/memMemberGradeRule_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMerchant/add_classify.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMerchant/lockMemMerchant.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMerchant/memMerchant-audite.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMerchant/memMerchant.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMerchant/memMerchant_add.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMerchant/memMerchant_classify.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMerchant/memMerchant_detail.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMerchant/memMerchant_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memMerchant/toRecords.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memOrderAuth/memOrderAuth.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memOrderAuth/memOrderAuth_add.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memOrderAuth/memOrderAuth_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memTaskDayRecord/memTaskDayRecord.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memTaskDayRecord/memTaskDayRecord_add.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memTaskDayRecord/memTaskDayRecord_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memTaskDayRule/memTaskDayRule.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memTaskDayRule/memTaskDayRule_add.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memTaskDayRule/memTaskDayRule_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memTaskDayRule/memTaskDayRule_set.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUser/memUser.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUserBankDetail/memUserBankDetail.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUserBankDetail/memUserBankDetail_add.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUserBankDetail/memUserBankDetail_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUserRelation/memUserRelation.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUserRelation/memUserRelation_add.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUserRelation/memUserRelation_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUserSales/edit_credit_score.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUserSales/edit_user_level.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUserSales/memUserSales.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUserSales/memUserSales_audit.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUserSales/memUserSales_detail.html
meiya-admin/src/main/webapp/WEB-INF/view/member/memUserSales/memUserSales_team.html
meiya-admin/src/main/webapp/WEB-INF/view/notice.html
meiya-admin/src/main/webapp/WEB-INF/view/system/aaaTest/aaaTest.html
meiya-admin/src/main/webapp/WEB-INF/view/system/aaaTest/aaaTest_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/aaaTest/aaaTest_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/aaaTest/import.html
meiya-admin/src/main/webapp/WEB-INF/view/system/areaCity/areaCity.html
meiya-admin/src/main/webapp/WEB-INF/view/system/areaCity/areaCity_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/areaCity/areaCity_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/code/code.html
meiya-admin/src/main/webapp/WEB-INF/view/system/dept/dept.html
meiya-admin/src/main/webapp/WEB-INF/view/system/dept/dept_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/dept/dept_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/dict/dict.html
meiya-admin/src/main/webapp/WEB-INF/view/system/dict/dict_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/dict/dict_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/log/log.html
meiya-admin/src/main/webapp/WEB-INF/view/system/log/login_log.html
meiya-admin/src/main/webapp/WEB-INF/view/system/memUserDelete/memUserDelete.html
meiya-admin/src/main/webapp/WEB-INF/view/system/memUserDelete/memUserDelete_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/memUserDelete/memUserDelete_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/menu/menu.html
meiya-admin/src/main/webapp/WEB-INF/view/system/menu/menu_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/menu/menu_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myCoupon/myCoupon.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myCoupon/myCoupon_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myCoupon/myCoupon_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myCouponPrice/myCoupon.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myCouponPrice/myCoupon_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myCouponPrice/myCoupon_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myCouponProduct/myCouponProduct.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myCouponProduct/myCouponProduct_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myCouponProduct/myCouponProduct_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myDoctor/myDoctor.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myDoctor/myDoctorImage.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myDoctor/myDoctor_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myDoctor/myDoctor_detail.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myDoctor/myDoctor_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myUserCoupon/myUserCoupon.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myUserCoupon/myUserCoupon_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myUserCoupon/myUserCoupon_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myUserSubstanceCoupon/myUserSubstanceCoupon.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myUserSubstanceCoupon/myUserSubstanceCoupon_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/myUserSubstanceCoupon/myUserSubstanceCoupon_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/notice/notice.html
meiya-admin/src/main/webapp/WEB-INF/view/system/notice/notice_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/notice/notice_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/role/role.html
meiya-admin/src/main/webapp/WEB-INF/view/system/role/role_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/role/role_assign.html
meiya-admin/src/main/webapp/WEB-INF/view/system/role/role_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/role/system_notice_type.html
meiya-admin/src/main/webapp/WEB-INF/view/system/storeService/storeService.html
meiya-admin/src/main/webapp/WEB-INF/view/system/storeService/storeService_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/storeService/storeService_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/sysCompany/sysCompany.html
meiya-admin/src/main/webapp/WEB-INF/view/system/sysCompany/sysCompany_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/sysCompany/sysCompany_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tAppSet/html.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tAppSet/tAppSet.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tAppSet/tAppSet_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tAppSet/tAppSet_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tBanner/tBanner.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tBanner/tBanner_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tBanner/tBanner_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tBanner/tBanner_info.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tFeedback/tFeedback.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tFeedback/tFeedback_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tFeedback/tFeedback_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tFeedback/tFeedback_update.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tNotice/tNotice.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tNotice/tNotice_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tNotice/tNotice_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tSystemSet/systemSetUpdate.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tSystemSet/tSystemSet_1.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tSystemSet/tSystemSet_100.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tSystemSet/tSystemSet_200.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tSystemSet/tSystemSet_200_audit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tSystemSet/tSystemSet_300.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tSystemSet/tSystemSet_300_audit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tUser/tUser.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tUser/tUser_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tUser/tUser_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tUserEq/import.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tUserEq/tUser.html
meiya-admin/src/main/webapp/WEB-INF/view/system/tUserEq/tUser_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/user/user.html
meiya-admin/src/main/webapp/WEB-INF/view/system/user/user_add.html
meiya-admin/src/main/webapp/WEB-INF/view/system/user/user_chpwd.html
meiya-admin/src/main/webapp/WEB-INF/view/system/user/user_edit.html
meiya-admin/src/main/webapp/WEB-INF/view/system/user/user_roleassign.html
meiya-admin/src/main/webapp/WEB-INF/view/system/user/user_view.html
meiya-admin/src/main/webapp/static/css/_fstyle.css
meiya-admin/src/main/webapp/static/css/bootstrap-rtl.css
meiya-admin/src/main/webapp/static/css/bootstrap-select.min.css
meiya-admin/src/main/webapp/static/css/bootstrap.min.css
meiya-admin/src/main/webapp/static/css/font-awesome.css
meiya-admin/src/main/webapp/static/css/font-awesome.min.css
meiya-admin/src/main/webapp/static/css/login.css
meiya-admin/src/main/webapp/static/css/patterns/header-profile-skin-1.png
meiya-admin/src/main/webapp/static/css/patterns/header-profile-skin-3.png
meiya-admin/src/main/webapp/static/css/patterns/header-profile.png
meiya-admin/src/main/webapp/static/css/patterns/shattered.png
meiya-admin/src/main/webapp/static/css/plugins/bootstrap-table/bootstrap-table.min.css
meiya-admin/src/main/webapp/static/css/plugins/bootstrap-treetable/bootstrap-treetable.css
meiya-admin/src/main/webapp/static/css/plugins/chosen/chosen-sprite.png
meiya-admin/src/main/webapp/static/css/plugins/chosen/chosen-sprite@2x.png
meiya-admin/src/main/webapp/static/css/plugins/chosen/chosen.css
meiya-admin/src/main/webapp/static/css/plugins/iCheck/custom.css
meiya-admin/src/main/webapp/static/css/plugins/iCheck/green.png
meiya-admin/src/main/webapp/static/css/plugins/iCheck/green@2x.png
meiya-admin/src/main/webapp/static/css/plugins/images/sprite-skin-flat.png
meiya-admin/src/main/webapp/static/css/plugins/validate/bootstrapValidator.min.css
meiya-admin/src/main/webapp/static/css/plugins/webuploader/webuploader.css
meiya-admin/src/main/webapp/static/css/plugins/ztree/demo.css
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/diy/1_close.png
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/diy/1_open.png
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/diy/2.png
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/diy/3.png
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/diy/4.png
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/diy/5.png
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/diy/6.png
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/diy/7.png
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/diy/8.png
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/diy/9.png
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/line_conn.gif
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/loading.gif
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/zTreeStandard.gif
meiya-admin/src/main/webapp/static/css/plugins/ztree/img/zTreeStandard.png
meiya-admin/src/main/webapp/static/css/plugins/ztree/zTreeStyle.css
meiya-admin/src/main/webapp/static/css/style.css
meiya-admin/src/main/webapp/static/doc/结算模板.xls
meiya-admin/src/main/webapp/static/favicon.ico
meiya-admin/src/main/webapp/static/fonts/FontAwesome.otf
meiya-admin/src/main/webapp/static/fonts/fontawesome-webfont.eot
meiya-admin/src/main/webapp/static/fonts/fontawesome-webfont.svg
meiya-admin/src/main/webapp/static/fonts/fontawesome-webfont.ttf
meiya-admin/src/main/webapp/static/fonts/fontawesome-webfont.woff
meiya-admin/src/main/webapp/static/fonts/fontawesome-webfont.woff2
meiya-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.eot
meiya-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.svg
meiya-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.ttf
meiya-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.woff
meiya-admin/src/main/webapp/static/fonts/glyphicons-halflings-regular.woff2
meiya-admin/src/main/webapp/static/img/NoPIC.png
meiya-admin/src/main/webapp/static/img/bg.png
meiya-admin/src/main/webapp/static/img/boy.gif
meiya-admin/src/main/webapp/static/img/errorPic.png
meiya-admin/src/main/webapp/static/img/girl.gif
meiya-admin/src/main/webapp/static/img/icons.png
meiya-admin/src/main/webapp/static/img/loading-upload.gif
meiya-admin/src/main/webapp/static/img/locked.png
meiya-admin/src/main/webapp/static/img/login-background.jpg
meiya-admin/src/main/webapp/static/img/user.png
meiya-admin/src/main/webapp/static/js/bootstrap-select.min.js
meiya-admin/src/main/webapp/static/js/bootstrap.min.js
meiya-admin/src/main/webapp/static/js/common/DateUtils.js
meiya-admin/src/main/webapp/static/js/common/Feng.js
meiya-admin/src/main/webapp/static/js/common/ajax-object.js
meiya-admin/src/main/webapp/static/js/common/bootstrap-select.min.js
meiya-admin/src/main/webapp/static/js/common/bootstrap-table-object.js
meiya-admin/src/main/webapp/static/js/common/date.format.js
meiya-admin/src/main/webapp/static/js/common/laydate-demo.js
meiya-admin/src/main/webapp/static/js/common/select-list-object.js
meiya-admin/src/main/webapp/static/js/common/tree-table-object.js
meiya-admin/src/main/webapp/static/js/common/web-upload-file.js
meiya-admin/src/main/webapp/static/js/common/web-upload-image.js
meiya-admin/src/main/webapp/static/js/common/web-upload-object.js
meiya-admin/src/main/webapp/static/js/common/ztree-object.js
meiya-admin/src/main/webapp/static/js/contabs.js
meiya-admin/src/main/webapp/static/js/content.js
meiya-admin/src/main/webapp/static/js/echarts.min.js
meiya-admin/src/main/webapp/static/js/hplus.js
meiya-admin/src/main/webapp/static/js/jquery.form.min.js
meiya-admin/src/main/webapp/static/js/jquery.min.js
meiya-admin/src/main/webapp/static/js/jquery.min.map
meiya-admin/src/main/webapp/static/js/plugins/bootstrap-suggest/bootstrap-suggest.min.js
meiya-admin/src/main/webapp/static/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js
meiya-admin/src/main/webapp/static/js/plugins/bootstrap-table/bootstrap-table.min.js
meiya-admin/src/main/webapp/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.js
meiya-admin/src/main/webapp/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js
meiya-admin/src/main/webapp/static/js/plugins/bootstrap-treetable/bootstrap-treetable.js
meiya-admin/src/main/webapp/static/js/plugins/chartJs/Chart.min.js
meiya-admin/src/main/webapp/static/js/plugins/chartJs/echarts-all.js
meiya-admin/src/main/webapp/static/js/plugins/chartJs/echarts.min.js
meiya-admin/src/main/webapp/static/js/plugins/chartJs/echarts.simple.min.js
meiya-admin/src/main/webapp/static/js/plugins/chosen/chosen.jquery.js
meiya-admin/src/main/webapp/static/js/plugins/echarts/Chart.min.js
meiya-admin/src/main/webapp/static/js/plugins/echarts/echarts-all.js
meiya-admin/src/main/webapp/static/js/plugins/echarts/echarts.min.js
meiya-admin/src/main/webapp/static/js/plugins/echarts/echarts.simple.min.js
meiya-admin/src/main/webapp/static/js/plugins/iCheck/icheck.min.js
meiya-admin/src/main/webapp/static/js/plugins/laydate/laydate.js
meiya-admin/src/main/webapp/static/js/plugins/laydate/theme/default/font/iconfont.eot
meiya-admin/src/main/webapp/static/js/plugins/laydate/theme/default/font/iconfont.svg
meiya-admin/src/main/webapp/static/js/plugins/laydate/theme/default/font/iconfont.ttf
meiya-admin/src/main/webapp/static/js/plugins/laydate/theme/default/font/iconfont.woff
meiya-admin/src/main/webapp/static/js/plugins/laydate/theme/default/laydate.css
meiya-admin/src/main/webapp/static/js/plugins/layer/layer.js
meiya-admin/src/main/webapp/static/js/plugins/layer/mobile/layer.js
meiya-admin/src/main/webapp/static/js/plugins/layer/mobile/need/layer.css
meiya-admin/src/main/webapp/static/js/plugins/layer/theme/default/icon-ext.png
meiya-admin/src/main/webapp/static/js/plugins/layer/theme/default/icon.png
meiya-admin/src/main/webapp/static/js/plugins/layer/theme/default/layer.css
meiya-admin/src/main/webapp/static/js/plugins/layer/theme/default/loading-0.gif
meiya-admin/src/main/webapp/static/js/plugins/layer/theme/default/loading-1.gif
meiya-admin/src/main/webapp/static/js/plugins/layer/theme/default/loading-2.gif
meiya-admin/src/main/webapp/static/js/plugins/metisMenu/jquery.metisMenu.js
meiya-admin/src/main/webapp/static/js/plugins/morris/morris.js
meiya-admin/src/main/webapp/static/js/plugins/morris/raphael-2.1.0.min.js
meiya-admin/src/main/webapp/static/js/plugins/pace/pace.min.js
meiya-admin/src/main/webapp/static/js/plugins/slimscroll/jquery.slimscroll.min.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/emotion.css
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/emotion.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/0.gif
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/bface.gif
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/cface.gif
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/fface.gif
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/jxface2.gif
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/neweditor-tab-bg.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/tface.gif
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/wface.gif
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/yface.gif
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/formula/formula.css
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/formula/formula.html
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/formula/formula.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/formula/images/formula.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/image/image.css
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/image/image.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/image/images/close.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/image/images/upload1.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/image/images/upload2.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/link/link.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/map/map.html
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/map/map.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/video/images/center_focus.jpg
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/video/images/left_focus.jpg
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/video/images/none_focus.jpg
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/video/images/right_focus.jpg
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/video/video.css
meiya-admin/src/main/webapp/static/js/plugins/umeditor/dialogs/video/video.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/index.html
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/en.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/addimage.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/alldeletebtnhoverskin.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/alldeletebtnupskin.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/background.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/button.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/copy.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/deletedisable.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/deleteenable.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/imglabel.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/listbackground.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/localimage.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/music.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/rotateleftdisable.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/rotateleftenable.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/rotaterightdisable.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/rotaterightenable.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/en/images/upload.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/copy.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/imglabel.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/localimage.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/music.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/upload.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/zh-cn.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/css/umeditor.css
meiya-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/css/umeditor.min.css
meiya-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/caret.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/close.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/icons.gif
meiya-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/icons.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/ok.gif
meiya-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/pop-bg.png
meiya-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/spacer.gif
meiya-admin/src/main/webapp/static/js/plugins/umeditor/themes/default/images/videologo.gif
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/jquery.min.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.eot
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.otf
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.svg
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.ttf
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.woff
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/STIXFontLicense2010.txt
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.eot
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.svg
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.ttf
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.woff
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.eot
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.svg
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.ttf
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.woff
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.eot
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.svg
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.ttf
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.woff
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.eot
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.svg
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.ttf
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.woff
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/mathquill.css
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/mathquill.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/mathquill.min.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/umeditor.config.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/umeditor.js
meiya-admin/src/main/webapp/static/js/plugins/umeditor/umeditor.min.js
meiya-admin/src/main/webapp/static/js/plugins/validate/additional-methods.min.js
meiya-admin/src/main/webapp/static/js/plugins/validate/bootstrapValidator.min.js
meiya-admin/src/main/webapp/static/js/plugins/validate/zh_CN.js
meiya-admin/src/main/webapp/static/js/plugins/wangEditor/wangEditor.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/Uploader.swf
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.css
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.custom.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.custom.min.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.fis.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.flashonly.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.flashonly.min.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.html5only.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.html5only.min.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.min.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.noimage.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.noimage.min.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.nolog.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.nolog.min.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.withoutimage.js
meiya-admin/src/main/webapp/static/js/plugins/webuploader/webuploader.withoutimage.min.js
meiya-admin/src/main/webapp/static/js/plugins/ztree/jquery.ztree.all.min.js
meiya-admin/src/main/webapp/static/modular/code/gen.js
meiya-admin/src/main/webapp/static/modular/flowable/expense/expense.js
meiya-admin/src/main/webapp/static/modular/flowable/expense/expense_info.js
meiya-admin/src/main/webapp/static/modular/flowable/process/process.js
meiya-admin/src/main/webapp/static/modular/flowable/process/process_info.js
meiya-admin/src/main/webapp/static/modular/mall/commissionSettlement/commissionSettlement.js
meiya-admin/src/main/webapp/static/modular/mall/commissionSettlement/commissionSettlement_info.js
meiya-admin/src/main/webapp/static/modular/mall/home/home.js
meiya-admin/src/main/webapp/static/modular/mall/mallAppVersion/mallAppVersion.js
meiya-admin/src/main/webapp/static/modular/mall/mallAppVersion/mallAppVersion_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallClassifyOne/mallClassifyOne.js
meiya-admin/src/main/webapp/static/modular/mall/mallClassifyOne/mallClassifyOne_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallClassifyTwo/mallClassifyTwo.js
meiya-admin/src/main/webapp/static/modular/mall/mallClassifyTwo/mallClassifyTwo_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoods/mallGoods.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoods/mallGoods_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoodsCart/mallGoodsCart.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoodsCart/mallGoodsCart_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoodsDetail/mallGoodsDetail.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoodsDetail/mallGoodsDetail_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoodsGroup/mallGoodsGroup.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoodsGroup/mallGoodsGroup_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoodsSku/mallGoodsSku.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoodsSku/mallGoodsSku_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoodsSpec/mallGoodsSpec.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoodsSpec/mallGoodsSpec_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoodsSpecValue/mallGoodsSpecValue.js
meiya-admin/src/main/webapp/static/modular/mall/mallGoodsSpecValue/mallGoodsSpecValue_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallGroupSpec/mallGroupSpec.js
meiya-admin/src/main/webapp/static/modular/mall/mallGroupSpec/mallGroupSpec_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallOrder/mallOrder.js
meiya-admin/src/main/webapp/static/modular/mall/mallOrder/mallOrder_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallOrderDetail/mallOrderDetail.js
meiya-admin/src/main/webapp/static/modular/mall/mallOrderDetail/mallOrderDetail_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallTag/mallTag.js
meiya-admin/src/main/webapp/static/modular/mall/mallTag/mallTag_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallUserAddress/mallUserAddress.js
meiya-admin/src/main/webapp/static/modular/mall/mallUserAddress/mallUserAddress_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallUserCollect/mallUserCollect.js
meiya-admin/src/main/webapp/static/modular/mall/mallUserCollect/mallUserCollect_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallUserEvaluation/mallUserEvaluation.js
meiya-admin/src/main/webapp/static/modular/mall/mallUserEvaluation/mallUserEvaluation_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallUserReport/mallUserReport.js
meiya-admin/src/main/webapp/static/modular/mall/mallUserReport/mallUserReport_info.js
meiya-admin/src/main/webapp/static/modular/mall/mallVipEquity/mallVipEquity.js
meiya-admin/src/main/webapp/static/modular/mall/mallVipEquity/mallVipEquity_info.js
meiya-admin/src/main/webapp/static/modular/mall/tFeedback/tFeedback.js
meiya-admin/src/main/webapp/static/modular/mall/tFeedback/tFeedback_info.js
meiya-admin/src/main/webapp/static/modular/member/memMemberGrade/memMemberGrade.js
meiya-admin/src/main/webapp/static/modular/member/memMemberGrade/memMemberGrade_info.js
meiya-admin/src/main/webapp/static/modular/member/memMemberGradeRule/memMemberGradeRule.js
meiya-admin/src/main/webapp/static/modular/member/memMemberGradeRule/memMemberGradeRule_info.js
meiya-admin/src/main/webapp/static/modular/member/memMerchant/memMerchant-audite.js
meiya-admin/src/main/webapp/static/modular/member/memMerchant/memMerchant.js
meiya-admin/src/main/webapp/static/modular/member/memMerchant/memMerchant_info.js
meiya-admin/src/main/webapp/static/modular/member/memOrderAuth/memOrderAuth.js
meiya-admin/src/main/webapp/static/modular/member/memOrderAuth/memOrderAuth_info.js
meiya-admin/src/main/webapp/static/modular/member/memTaskDayRecord/memTaskDayRecord.js
meiya-admin/src/main/webapp/static/modular/member/memTaskDayRecord/memTaskDayRecord_info.js
meiya-admin/src/main/webapp/static/modular/member/memTaskDayRule/memTaskDayRule.js
meiya-admin/src/main/webapp/static/modular/member/memTaskDayRule/memTaskDayRule_info.js
meiya-admin/src/main/webapp/static/modular/member/memUser/memUser.js
meiya-admin/src/main/webapp/static/modular/member/memUser/memUser_info.js
meiya-admin/src/main/webapp/static/modular/member/memUser/memUser_team.js
meiya-admin/src/main/webapp/static/modular/member/memUserBankDetail/memUserBankDetail.js
meiya-admin/src/main/webapp/static/modular/member/memUserBankDetail/memUserBankDetail_info.js
meiya-admin/src/main/webapp/static/modular/member/memUserRelation/memUserRelation.js
meiya-admin/src/main/webapp/static/modular/member/memUserRelation/memUserRelation_info.js
meiya-admin/src/main/webapp/static/modular/member/memUserSales/memUserSales.js
meiya-admin/src/main/webapp/static/modular/member/memUserSales/memUserSales_info.js
meiya-admin/src/main/webapp/static/modular/member/memUserSales/memUserSales_team.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/base64.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/aes/aes-min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/aes/aes.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/cbc/cbc-min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/cbc/cbc.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/crypto-1.0.zip
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/crypto-md5/crypto-md5.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/crypto-sha1-hmac-pbkdf2-marc4/crypto-sha1-hmac-pbkdf2-marc4.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/crypto-sha1-hmac-pbkdf2-ofb-aes/crypto-sha1-hmac-pbkdf2-ofb-aes.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/crypto-sha1-hmac-pbkdf2-rabbit/crypto-sha1-hmac-pbkdf2-rabbit.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/crypto-sha1-hmac-pbkdf2/crypto-sha1-hmac-pbkdf2.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/crypto-sha1/crypto-sha1.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/crypto-sha256/crypto-sha256.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/crypto/crypto-min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/crypto/crypto.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/hmac/hmac-min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/hmac/hmac.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/marc4/marc4-min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/marc4/marc4.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/md5/md5-min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/md5/md5.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/ofb/ofb-min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/ofb/ofb.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/pbkdf2/pbkdf2-min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/pbkdf2/pbkdf2.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/rabbit/rabbit-min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/rabbit/rabbit.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/sha1/sha1-min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/sha1/sha1.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/sha256/sha256-min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/crypto1/sha256/sha256.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/plupload-2.1.2/js/Moxie.swf
meiya-admin/src/main/webapp/static/modular/ossh5/lib/plupload-2.1.2/js/Moxie.xap
meiya-admin/src/main/webapp/static/modular/ossh5/lib/plupload-2.1.2/js/moxie.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/plupload-2.1.2/js/moxie.min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/plupload-2.1.2/js/plupload.dev.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/plupload-2.1.2/js/plupload.full.min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/plupload-2.1.2/js/plupload.min.js
meiya-admin/src/main/webapp/static/modular/ossh5/lib/plupload-2.1.2/license.txt
meiya-admin/src/main/webapp/static/modular/ossh5/lib/plupload-2.1.2/readme.md
meiya-admin/src/main/webapp/static/modular/ossh5/style.css
meiya-admin/src/main/webapp/static/modular/ossh5/upload.js
meiya-admin/src/main/webapp/static/modular/system/aaaTest/aaaTest.js
meiya-admin/src/main/webapp/static/modular/system/aaaTest/aaaTest_info.js
meiya-admin/src/main/webapp/static/modular/system/areaCity/areaCity.js
meiya-admin/src/main/webapp/static/modular/system/areaCity/areaCity_info.js
meiya-admin/src/main/webapp/static/modular/system/code/code.js
meiya-admin/src/main/webapp/static/modular/system/dept/dept.js
meiya-admin/src/main/webapp/static/modular/system/dept/dept_info.js
meiya-admin/src/main/webapp/static/modular/system/dict/dict.js
meiya-admin/src/main/webapp/static/modular/system/dict/dict_info.js
meiya-admin/src/main/webapp/static/modular/system/home/home.js
meiya-admin/src/main/webapp/static/modular/system/log/log.js
meiya-admin/src/main/webapp/static/modular/system/log/login_log.js
meiya-admin/src/main/webapp/static/modular/system/memUserDelete/memUserDelete.js
meiya-admin/src/main/webapp/static/modular/system/memUserDelete/memUserDelete_info.js
meiya-admin/src/main/webapp/static/modular/system/menu/menu.js
meiya-admin/src/main/webapp/static/modular/system/menu/menu_info.js
meiya-admin/src/main/webapp/static/modular/system/myCoupon/myCoupon.js
meiya-admin/src/main/webapp/static/modular/system/myCoupon/myCoupon_info.js
meiya-admin/src/main/webapp/static/modular/system/myCouponPrice/myCoupon.js
meiya-admin/src/main/webapp/static/modular/system/myCouponPrice/myCoupon_info.js
meiya-admin/src/main/webapp/static/modular/system/myCouponProduct/myCouponProduct.js
meiya-admin/src/main/webapp/static/modular/system/myCouponProduct/myCouponProduct_info.js
meiya-admin/src/main/webapp/static/modular/system/myDoctor/myDoctor.js
meiya-admin/src/main/webapp/static/modular/system/myDoctor/myDoctor_info.js
meiya-admin/src/main/webapp/static/modular/system/myUserCoupon/myUserCoupon.js
meiya-admin/src/main/webapp/static/modular/system/myUserCoupon/myUserCoupon_info.js
meiya-admin/src/main/webapp/static/modular/system/myUserSubstanceCoupon/myUserSubstanceCoupon.js
meiya-admin/src/main/webapp/static/modular/system/myUserSubstanceCoupon/myUserSubstanceCoupon_info.js
meiya-admin/src/main/webapp/static/modular/system/notice/notice.js
meiya-admin/src/main/webapp/static/modular/system/notice/notice_info.js
meiya-admin/src/main/webapp/static/modular/system/role/role.js
meiya-admin/src/main/webapp/static/modular/system/role/role_info.js
meiya-admin/src/main/webapp/static/modular/system/storeService/storeService.js
meiya-admin/src/main/webapp/static/modular/system/storeService/storeService_info.js
meiya-admin/src/main/webapp/static/modular/system/sysCompany/sysCompany.js
meiya-admin/src/main/webapp/static/modular/system/sysCompany/sysCompany_info.js
meiya-admin/src/main/webapp/static/modular/system/tAppSet/tAppSet.js
meiya-admin/src/main/webapp/static/modular/system/tAppSet/tAppSet_info.js
meiya-admin/src/main/webapp/static/modular/system/tBanner/tBanner.js
meiya-admin/src/main/webapp/static/modular/system/tBanner/tBanner_info.js
meiya-admin/src/main/webapp/static/modular/system/tFeedback/tFeedback.js
meiya-admin/src/main/webapp/static/modular/system/tFeedback/tFeedback_info.js
meiya-admin/src/main/webapp/static/modular/system/tNotice/tNotice.js
meiya-admin/src/main/webapp/static/modular/system/tNotice/tNotice_info.js
meiya-admin/src/main/webapp/static/modular/system/tSystemSet/systemSetUpdate.js
meiya-admin/src/main/webapp/static/modular/system/tSystemSet/tSystemSet.js
meiya-admin/src/main/webapp/static/modular/system/tSystemSet/tSystemSet_2.js
meiya-admin/src/main/webapp/static/modular/system/tSystemSet/tSystemSet_info.js
meiya-admin/src/main/webapp/static/modular/system/tUser/tUser.js
meiya-admin/src/main/webapp/static/modular/system/tUser/tUser_info.js
meiya-admin/src/main/webapp/static/modular/system/tUserEq/tUser.js
meiya-admin/src/main/webapp/static/modular/system/tUserEq/tUser_info.js
meiya-admin/src/main/webapp/static/modular/system/user/user.js
meiya-admin/src/main/webapp/static/modular/system/user/user_info.js
meiya-common/meiya-common.iml
meiya-common/pom.xml
meiya-common/src/main/java/com/sinata/common/api/jPush/JpushUtils.java
meiya-common/src/main/java/com/sinata/common/api/jPush/PushPayloadUtils.java
meiya-common/src/main/java/com/sinata/common/enums/EnumAppSetKey.java
meiya-common/src/main/java/com/sinata/common/enums/EnumAppVersionType.java
meiya-common/src/main/java/com/sinata/common/enums/EnumAuditState.java
meiya-common/src/main/java/com/sinata/common/enums/EnumIsDelete.java
meiya-common/src/main/java/com/sinata/common/enums/EnumIsDividends.java
meiya-common/src/main/java/com/sinata/common/enums/EnumIsLock.java
meiya-common/src/main/java/com/sinata/common/enums/EnumIsObj.java
meiya-common/src/main/java/com/sinata/common/enums/EnumIsSystemNotice.java
meiya-common/src/main/java/com/sinata/common/enums/EnumMemberGrade.java
meiya-common/src/main/java/com/sinata/common/enums/EnumMerchantState.java
meiya-common/src/main/java/com/sinata/common/enums/EnumNoticeMessageType.java
meiya-common/src/main/java/com/sinata/common/enums/EnumNoticeOrderType.java
meiya-common/src/main/java/com/sinata/common/enums/EnumOrderPrefix.java
meiya-common/src/main/java/com/sinata/common/enums/EnumPayType.java
meiya-common/src/main/java/com/sinata/common/enums/EnumRedisKey.java
meiya-common/src/main/java/com/sinata/common/enums/EnumRemoteSet.java
meiya-common/src/main/java/com/sinata/common/enums/EnumSmsCode.java
meiya-common/src/main/java/com/sinata/common/enums/EnumSystemSetKey.java
meiya-common/src/main/java/com/sinata/common/enums/EnumUrlJumpType.java
meiya-common/src/main/java/com/sinata/common/enums/EnumUserBankDetailDoneType.java
meiya-common/src/main/java/com/sinata/common/enums/EnumUserBankDetailType.java
meiya-common/src/main/java/com/sinata/common/enums/EnumVerifyState.java
meiya-common/src/main/java/com/sinata/common/enums/TimeSpanEnum.java
meiya-common/src/main/java/com/sinata/common/enums/annotation/SwaggerCodeDisplayEnum.java
meiya-common/src/main/java/com/sinata/common/enums/annotation/SwaggerDesDisplayEnum.java
meiya-common/src/main/java/com/sinata/common/enums/annotation/SwaggerDisplayEnum.java
meiya-common/src/main/java/com/sinata/common/enums/annotation/SwaggerValueDisplayEnum.java
meiya-common/src/main/java/com/sinata/common/enums/base/enums/BaseDesEnum.java
meiya-common/src/main/java/com/sinata/common/enums/base/enums/BaseEnum.java
meiya-common/src/main/java/com/sinata/common/enums/base/mode/BaseSelBo.java
meiya-common/src/main/java/com/sinata/common/enums/base/mode/Coordinate.java
meiya-common/src/main/java/com/sinata/common/enums/factory/EnumConvertFactory.java
meiya-common/src/main/java/com/sinata/common/enums/handler/AutoEnumTypeHandler.java
meiya-common/src/main/java/com/sinata/common/enums/mall/EnumMallGoodsGroupType.java
meiya-common/src/main/java/com/sinata/common/enums/mall/EnumMallGoodsState.java
meiya-common/src/main/java/com/sinata/common/enums/mall/EnumMallOrderPrefix.java
meiya-common/src/main/java/com/sinata/common/enums/mall/EnumMallOrderState.java
meiya-common/src/main/java/com/sinata/common/keys/AliyunConfig.java
meiya-common/src/main/java/com/sinata/common/model/AccountCheckNumVo.java
meiya-common/src/main/java/com/sinata/common/user/UserHierarchy.java
meiya-common/src/main/java/com/sinata/common/user/VoUserGradeParent.java
meiya-common/src/main/java/com/sinata/common/util/AESUtil.java
meiya-common/src/main/java/com/sinata/common/util/PingYinUtil.java
meiya-common/src/main/java/com/sinata/common/util/QRCodeUtils.java
meiya-common/src/main/java/com/sinata/common/util/WxPKCS7Encoder.java
meiya-common/src/main/java/com/sinata/common/util/WxUtil.java
meiya-core/meiya-core.iml
meiya-core/pom.xml
meiya-core/src/main/java/com/sinata/core/CoreFlag.java
meiya-core/src/main/java/com/sinata/core/anotation/Authorization.java
meiya-core/src/main/java/com/sinata/core/aop/BaseControllerExceptionHandler.java
meiya-core/src/main/java/com/sinata/core/base/controller/BaseController.java
meiya-core/src/main/java/com/sinata/core/base/controller/GlobalController.java
meiya-core/src/main/java/com/sinata/core/base/controller/GunsErrorView.java
meiya-core/src/main/java/com/sinata/core/base/tips/ErrorTip.java
meiya-core/src/main/java/com/sinata/core/base/tips/SuccessTip.java
meiya-core/src/main/java/com/sinata/core/base/tips/Tip.java
meiya-core/src/main/java/com/sinata/core/base/warpper/BaseControllerWarpper.java
meiya-core/src/main/java/com/sinata/core/cache/BaseCacheFactory.java
meiya-core/src/main/java/com/sinata/core/cache/CacheKit.java
meiya-core/src/main/java/com/sinata/core/cache/EhcacheFactory.java
meiya-core/src/main/java/com/sinata/core/cache/ICache.java
meiya-core/src/main/java/com/sinata/core/cache/ILoader.java
meiya-core/src/main/java/com/sinata/core/config/DefaultFastjsonConfig.java
meiya-core/src/main/java/com/sinata/core/config/DefaultMultiConfig.java
meiya-core/src/main/java/com/sinata/core/config/DefaultProperties.java
meiya-core/src/main/java/com/sinata/core/config/DefaultWebConfig.java
meiya-core/src/main/java/com/sinata/core/config/HuaWeiConfig.java
meiya-core/src/main/java/com/sinata/core/config/properties/DruidProperties.java
meiya-core/src/main/java/com/sinata/core/config/properties/MutiDataSourceProperties.java
meiya-core/src/main/java/com/sinata/core/constant/IsMenu.java
meiya-core/src/main/java/com/sinata/core/datascope/DataScope.java
meiya-core/src/main/java/com/sinata/core/datascope/DataScopeInterceptor.java
meiya-core/src/main/java/com/sinata/core/db/Db.java
meiya-core/src/main/java/com/sinata/core/exception/GunsException.java
meiya-core/src/main/java/com/sinata/core/exception/GunsExceptionEnum.java
meiya-core/src/main/java/com/sinata/core/exception/ServiceExceptionEnum.java
meiya-core/src/main/java/com/sinata/core/mutidatasource/DataSourceContextHolder.java
meiya-core/src/main/java/com/sinata/core/mutidatasource/DynamicDataSource.java
meiya-core/src/main/java/com/sinata/core/mutidatasource/annotion/DataSource.java
meiya-core/src/main/java/com/sinata/core/mutidatasource/aop/MultiSourceExAop.java
meiya-core/src/main/java/com/sinata/core/node/MenuNode.java
meiya-core/src/main/java/com/sinata/core/node/ZTreeNode.java
meiya-core/src/main/java/com/sinata/core/page/PageBT.java
meiya-core/src/main/java/com/sinata/core/page/PageInfoBT.java
meiya-core/src/main/java/com/sinata/core/qr/EmbedQrCode.java
meiya-core/src/main/java/com/sinata/core/qr/ImgQrTool.java
meiya-core/src/main/java/com/sinata/core/qr/MatrixToImageConfig.java
meiya-core/src/main/java/com/sinata/core/qr/MatrixToImageWriter.java
meiya-core/src/main/java/com/sinata/core/qr/QrImage.java
meiya-core/src/main/java/com/sinata/core/support/BasicType.java
meiya-core/src/main/java/com/sinata/core/support/BeanKit.java
meiya-core/src/main/java/com/sinata/core/support/ClassKit.java
meiya-core/src/main/java/com/sinata/core/support/CollectionKit.java
meiya-core/src/main/java/com/sinata/core/support/DateTime.java
meiya-core/src/main/java/com/sinata/core/support/DateTimeKit.java
meiya-core/src/main/java/com/sinata/core/support/HexKit.java
meiya-core/src/main/java/com/sinata/core/support/HttpKit.java
meiya-core/src/main/java/com/sinata/core/support/ObjectKit.java
meiya-core/src/main/java/com/sinata/core/support/PageKit.java
meiya-core/src/main/java/com/sinata/core/support/StrKit.java
meiya-core/src/main/java/com/sinata/core/support/WafKit.java
meiya-core/src/main/java/com/sinata/core/support/WafRequestWrapper.java
meiya-core/src/main/java/com/sinata/core/support/exception/ToolBoxException.java
meiya-core/src/main/java/com/sinata/core/util/Convert.java
meiya-core/src/main/java/com/sinata/core/util/DateUtils2.java
meiya-core/src/main/java/com/sinata/core/util/ExcelExportUtil.java
meiya-core/src/main/java/com/sinata/core/util/ExcelImportUtil.java
meiya-core/src/main/java/com/sinata/core/util/ExpressApi.java
meiya-core/src/main/java/com/sinata/core/util/FastJsonUtil.java
meiya-core/src/main/java/com/sinata/core/util/FileUtil.java
meiya-core/src/main/java/com/sinata/core/util/HttpSessionHolder.java
meiya-core/src/main/java/com/sinata/core/util/IdGenerator.java
meiya-core/src/main/java/com/sinata/core/util/MD5Util.java
meiya-core/src/main/java/com/sinata/core/util/MYSQL_DBDocer.java
meiya-core/src/main/java/com/sinata/core/util/MapUtil.java
meiya-core/src/main/java/com/sinata/core/util/NumUtil.java
meiya-core/src/main/java/com/sinata/core/util/PingYinUtil.java
meiya-core/src/main/java/com/sinata/core/util/RenderUtil.java
meiya-core/src/main/java/com/sinata/core/util/ResKit.java
meiya-core/src/main/java/com/sinata/core/util/SimpleContrast.java
meiya-core/src/main/java/com/sinata/core/util/SpringContextHolder.java
meiya-core/src/main/java/com/sinata/core/util/SqlUtil.java
meiya-core/src/main/java/com/sinata/core/util/ToolUtil.java
meiya-core/src/main/java/com/sinata/core/xss/XssFilter.java
meiya-core/src/main/java/com/sinata/core/xss/XssHttpServletRequestWrapper.java
meiya-core/src/main/resources/META-INF/spring.factories
meiya-core/src/main/resources/default-config.properties
meiya-core/src/main/resources/wxpay/apiclient_cert.p12
meiya-core/src/main/resources/wxpay/apiclient_cert.pem
meiya-core/src/main/resources/wxpay/apiclient_key.pem
meiya-core/src/main/resources/wxpay/证书使用说明.txt
meiya-generator/meiya-generator.iml
meiya-generator/pom.xml
meiya-generator/src/main/java/com/sinata/generator/action/GunsCodeGenerator.java
meiya-generator/src/main/java/com/sinata/generator/action/config/AbstractGeneratorConfig.java
meiya-generator/src/main/java/com/sinata/generator/action/config/GunsGeneratorConfig.java
meiya-generator/src/main/java/com/sinata/generator/action/config/WebGeneratorConfig.java
meiya-generator/src/main/java/com/sinata/generator/action/model/GenQo.java
meiya-generator/src/main/java/com/sinata/generator/engine/SimpleTemplateEngine.java
meiya-generator/src/main/java/com/sinata/generator/engine/base/AbstractTemplateEngine.java
meiya-generator/src/main/java/com/sinata/generator/engine/base/GunsTemplateEngine.java
meiya-generator/src/main/java/com/sinata/generator/engine/config/ContextConfig.java
meiya-generator/src/main/java/com/sinata/generator/engine/config/ControllerConfig.java
meiya-generator/src/main/java/com/sinata/generator/engine/config/DaoConfig.java
meiya-generator/src/main/java/com/sinata/generator/engine/config/Menu.java
meiya-generator/src/main/java/com/sinata/generator/engine/config/PageConfig.java
meiya-generator/src/main/java/com/sinata/generator/engine/config/ServiceConfig.java
meiya-generator/src/main/java/com/sinata/generator/engine/config/SqlConfig.java
meiya-generator/src/main/resources/gunsTemplate/advanced/Controller.java.btl
meiya-generator/src/main/resources/gunsTemplate/advanced/menu_sql.sql.btl
meiya-generator/src/main/resources/gunsTemplate/advanced/page.html.btl
meiya-generator/src/main/resources/gunsTemplate/advanced/page.js.btl
meiya-generator/src/main/resources/gunsTemplate/advanced/page_add.html.btl
meiya-generator/src/main/resources/gunsTemplate/advanced/page_edit.html.btl
meiya-generator/src/main/resources/gunsTemplate/advanced/page_edit.html.btl_backup
meiya-generator/src/main/resources/gunsTemplate/advanced/page_info.js.btl
meiya-parent.iml
meiya-rest/meiya-rest.iml
meiya-rest/pom.xml
meiya-rest/rest-restart.sh
meiya-rest/src/main/java/com/sinata/RestApplication.java
meiya-rest/src/main/java/com/sinata/rest/common/ApiUtils.java
meiya-rest/src/main/java/com/sinata/rest/common/ExpressApi.java
meiya-rest/src/main/java/com/sinata/rest/common/MD5AndKL.java
meiya-rest/src/main/java/com/sinata/rest/common/PayUtils.java
meiya-rest/src/main/java/com/sinata/rest/common/SignatureUtil.java
meiya-rest/src/main/java/com/sinata/rest/common/SpringUtil.java
meiya-rest/src/main/java/com/sinata/rest/common/aop/BaseControllerExceptionHandler.java
meiya-rest/src/main/java/com/sinata/rest/common/aop/GlobalExceptionHandler.java
meiya-rest/src/main/java/com/sinata/rest/common/aop/MyResponseBodyAdvice.java
meiya-rest/src/main/java/com/sinata/rest/common/exception/BizExceptionEnum.java
meiya-rest/src/main/java/com/sinata/rest/common/i18n/I18nUtils.java
meiya-rest/src/main/java/com/sinata/rest/common/i18n/MessageSourceHandler.java
meiya-rest/src/main/java/com/sinata/rest/common/i18n/MyLocaleConfig.java
meiya-rest/src/main/java/com/sinata/rest/common/i18n/MyLocaleResolver.java
meiya-rest/src/main/java/com/sinata/rest/common/lock/IdLock.java
meiya-rest/src/main/java/com/sinata/rest/common/lock/IdLocker.java
meiya-rest/src/main/java/com/sinata/rest/common/model/AlipayNotifyParam.java
meiya-rest/src/main/java/com/sinata/rest/common/model/AppPayModel.java
meiya-rest/src/main/java/com/sinata/rest/common/model/WxPay.java
meiya-rest/src/main/java/com/sinata/rest/common/model/WxPayResult.java
meiya-rest/src/main/java/com/sinata/rest/common/model/WxSignVO.java
meiya-rest/src/main/java/com/sinata/rest/config/DefaultFastjsonConfig.java
meiya-rest/src/main/java/com/sinata/rest/config/MessageConverConfig.java
meiya-rest/src/main/java/com/sinata/rest/config/MybatisPlusConfig.java
meiya-rest/src/main/java/com/sinata/rest/config/SwaggerCodeDisplayConfig.java
meiya-rest/src/main/java/com/sinata/rest/config/SwaggerConfig.java
meiya-rest/src/main/java/com/sinata/rest/config/SwaggerDesDisplayConfig.java
meiya-rest/src/main/java/com/sinata/rest/config/SwaggerDisplayConfig.java
meiya-rest/src/main/java/com/sinata/rest/config/SwaggerValueDisplayConfig.java
meiya-rest/src/main/java/com/sinata/rest/config/WebConfig.java
meiya-rest/src/main/java/com/sinata/rest/config/properties/JwtProperties.java
meiya-rest/src/main/java/com/sinata/rest/config/properties/PayProperties.java
meiya-rest/src/main/java/com/sinata/rest/config/properties/RestProperties.java
meiya-rest/src/main/java/com/sinata/rest/core/aliyun/bankcardverification/BankCardVerificationApi.java
meiya-rest/src/main/java/com/sinata/rest/core/aliyun/bankcardverification/model/BankCardVerificationData.java
meiya-rest/src/main/java/com/sinata/rest/core/aliyun/bankcardverification/model/BankCardVerificationResult.java
meiya-rest/src/main/java/com/sinata/rest/core/aliyun/oss/OssUploadUtil.java
meiya-rest/src/main/java/com/sinata/rest/core/aliyun/realname/AliyunRealNameUtil.java
meiya-rest/src/main/java/com/sinata/rest/core/aliyun/realname/HttpUtils.java
meiya-rest/src/main/java/com/sinata/rest/core/aliyun/sms/AliSmsApi.java
meiya-rest/src/main/java/com/sinata/rest/core/aliyun/sms/HwSmsApi.java
meiya-rest/src/main/java/com/sinata/rest/core/aliyun/sms/model/AliSmsCodeParam.java
meiya-rest/src/main/java/com/sinata/rest/core/aliyun/sms/model/AliSmsResponse.java
meiya-rest/src/main/java/com/sinata/rest/core/easemob/ConstEasemobKeyPrefix.java
meiya-rest/src/main/java/com/sinata/rest/core/easemob/EasemobApi.java
meiya-rest/src/main/java/com/sinata/rest/core/easemob/HttpRequestUtil.java
meiya-rest/src/main/java/com/sinata/rest/core/exception/GunsException.java
meiya-rest/src/main/java/com/sinata/rest/core/exception/GunsExceptionEnum.java
meiya-rest/src/main/java/com/sinata/rest/core/exception/ServiceExceptionEnum.java
meiya-rest/src/main/java/com/sinata/rest/core/huawei/HuaWeiConfig.java
meiya-rest/src/main/java/com/sinata/rest/core/huawei/ivs/DetectExtentionByNameAndIdSolution.java
meiya-rest/src/main/java/com/sinata/rest/core/huawei/ivs/DetectStandardByNameAndIdSolution.java
meiya-rest/src/main/java/com/sinata/rest/core/huawei/obs/ObsUploadUtil.java
meiya-rest/src/main/java/com/sinata/rest/core/support/BasicType.java
meiya-rest/src/main/java/com/sinata/rest/core/support/CollectionKit.java
meiya-rest/src/main/java/com/sinata/rest/core/support/DateTime.java
meiya-rest/src/main/java/com/sinata/rest/core/support/DateTimeKit.java
meiya-rest/src/main/java/com/sinata/rest/core/support/HexKit.java
meiya-rest/src/main/java/com/sinata/rest/core/support/HttpKit.java
meiya-rest/src/main/java/com/sinata/rest/core/support/ObjectKit.java
meiya-rest/src/main/java/com/sinata/rest/core/support/PageKit.java
meiya-rest/src/main/java/com/sinata/rest/core/support/StrKit.java
meiya-rest/src/main/java/com/sinata/rest/core/support/WafKit.java
meiya-rest/src/main/java/com/sinata/rest/core/support/WafRequestWrapper.java
meiya-rest/src/main/java/com/sinata/rest/core/tips/ErrorTip.java
meiya-rest/src/main/java/com/sinata/rest/core/tips/SuccessTip.java
meiya-rest/src/main/java/com/sinata/rest/core/tips/Tip.java
meiya-rest/src/main/java/com/sinata/rest/core/util/DailyIncrementIdGenerator.java
meiya-rest/src/main/java/com/sinata/rest/core/util/DateUtils.java
meiya-rest/src/main/java/com/sinata/rest/core/util/FastJsonUtil.java
meiya-rest/src/main/java/com/sinata/rest/core/util/FileUtil.java
meiya-rest/src/main/java/com/sinata/rest/core/util/HttpSessionHolder.java
meiya-rest/src/main/java/com/sinata/rest/core/util/IdGenerator.java
meiya-rest/src/main/java/com/sinata/rest/core/util/MD5Util.java
meiya-rest/src/main/java/com/sinata/rest/core/util/MapUtil.java
meiya-rest/src/main/java/com/sinata/rest/core/util/NumUtil.java
meiya-rest/src/main/java/com/sinata/rest/core/util/PasswordUtils.java
meiya-rest/src/main/java/com/sinata/rest/core/util/PingYinUtil.java
meiya-rest/src/main/java/com/sinata/rest/core/util/RenderUtil.java
meiya-rest/src/main/java/com/sinata/rest/core/util/RestTemplateUtil.java
meiya-rest/src/main/java/com/sinata/rest/core/util/SimpleContrast.java
meiya-rest/src/main/java/com/sinata/rest/core/util/SpringContextHolder.java
meiya-rest/src/main/java/com/sinata/rest/core/util/SqlUtil.java
meiya-rest/src/main/java/com/sinata/rest/core/util/ToolUtil.java
meiya-rest/src/main/java/com/sinata/rest/modular/auth/converter/BaseTransferEntity.java
meiya-rest/src/main/java/com/sinata/rest/modular/auth/converter/WithSignMessageConverter.java
meiya-rest/src/main/java/com/sinata/rest/modular/auth/filter/AuthFilter.java
meiya-rest/src/main/java/com/sinata/rest/modular/auth/filter/RequestParameterFilter.java
meiya-rest/src/main/java/com/sinata/rest/modular/auth/model/AccountVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/auth/security/DataSecurityAction.java
meiya-rest/src/main/java/com/sinata/rest/modular/auth/security/impl/Base64SecurityAction.java
meiya-rest/src/main/java/com/sinata/rest/modular/auth/util/AccountCheckUtil.java
meiya-rest/src/main/java/com/sinata/rest/modular/auth/util/JwtTokenUtil.java
meiya-rest/src/main/java/com/sinata/rest/modular/auth/util/ThreadPoolUtil.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallAppVersionController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallGoodsCartController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallGoodsController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallGoodsGroupController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallIndexController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallMerchantController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallOrderController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallPayController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallUserAddressController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallUserCenterController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallUserCollectController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallUserController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallUserEvaluationController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MallUserReportController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/MyUserSubstanceCouponController.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BaseBodyLimitPage.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BaseBodyPage.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyApplySaleUser.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyExchange.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyGoodsCartUpdateNumber.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyGoodsUserEvaluation.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyIds.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyMallGoodsCart.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyMallIndexSelGoods.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyMallOrder.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyMallOrderDetail.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyMallUserAddress.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyMallUserCollet.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyNotice.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyOrderNo.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyPageBankDetail.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodySetTransactionPassword.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyTransactionPassword.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyUserBankDetailBo.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyUserId.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyUserLogin.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyUserRegister.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/body/BodyUserReport.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/BaseResponseVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoClassify.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoClassifyTwo.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoGoods.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoGoodsCart.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoGoodsDetail.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoGoodsSku.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoGoodsSpec.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoGoodsSpecSet.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoGoodsUserEvaluation.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoMallIndex.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoMallOrder.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoMallOrderDetail.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoMallOrderEquity.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoMallOrderPayInfo.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoMallUserAddress.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoMallUserCollet.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoMemUserBank.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoMyShare.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoOrderTip.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoTeamUser.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoTransactionPassword.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoUserAccountState.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoUserAgencyArea.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoUserAndShareInfo.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoUserBankDetail.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoUserByEasemobId.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoUserReport.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/controller/vo/VoUserTripartiteState.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallAppVersionMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallClassifyOneMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallClassifyTwoMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallCommissionSettlementMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallCommissionSettlementMonthMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallExpressCompanyMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallGoodsCartMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallGoodsDetailMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallGoodsMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallGoodsSetMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallGoodsSkuMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallGoodsSpecMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallGoodsSpecValueMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallGroupSpecMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallOrderDetailMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallOrderDetailUseMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallOrderMainMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallOrderMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallTagMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallUserAddressMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallUserCollectMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallUserEvaluationMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallUserReportMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MallVipEquityMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MemMerchantBankMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/MyUserSubstanceCouponMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/NoticeMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/NoticeMessageMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/UserAppSetMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallAppVersionMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallClassifyOneMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallClassifyTwoMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallCommissionSettlementMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallCommissionSettlementMonthMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallExpressCompanyMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallGoodsCartMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallGoodsDetailMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallGoodsMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallGoodsSetMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallGoodsSkuMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallGoodsSpecMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallGoodsSpecValueMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallGroupSpecMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallOrderDetailMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallOrderDetailUseMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallOrderMainMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallOrderMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallTagMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallUserAddressMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallUserCollectMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallUserEvaluationMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallUserReportMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MallVipEquityMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MemMerchantBankMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/MyUserSubstanceCouponMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/NoticeMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/NoticeMessageMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/dao/mapping/UserAppSetMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/mall/job/BirthdayPushWork.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/job/CheckCreditScoreWork.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/job/CityCodeWork.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/job/CommissionSettlementMonthWork.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/job/OrderOutTimeCancelWork.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/job/UserV3UpDownWork.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/job/UserV4UpDownWork.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/job/UserV5UpDownWork.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallAppVersion.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallClassifyOne.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallClassifyTwo.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallCommissionSettlement.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallCommissionSettlementMonth.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallExpressCompany.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallGoods.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallGoodsCart.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallGoodsDetail.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallGoodsSet.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallGoodsSku.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallGoodsSpec.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallGoodsSpecValue.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallGroupSpec.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallOrder.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallOrderDetail.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallOrderDetailUse.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallOrderMain.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallTag.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallUserAddress.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallUserCollect.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallUserEvaluation.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallUserReport.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MallVipEquity.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MemMerchantBank.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/MyUserSubstanceCoupon.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/Notice.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/NoticeMessage.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/model/UserAppSet.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallAppVersionService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallClassifyOneService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallClassifyTwoService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallCommissionSettlementMonthService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallCommissionSettlementService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallExpressCompanyService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallGoodsCartService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallGoodsDetailService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallGoodsService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallGoodsSetService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallGoodsSkuService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallGoodsSpecService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallGoodsSpecValueService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallGroupSpecService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallOrderDetailService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallOrderMainService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallOrderService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallTagService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallUserAddressService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallUserCollectService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallUserEvaluationService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallUserReportService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMallVipEquityService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMemMerchantBankService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IMyUserSubstanceCouponService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/INoticeMessageService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/INoticeService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/IUserAppSetService.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallAppVersionServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallClassifyOneServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallClassifyTwoServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallCommissionSettlementMonthServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallCommissionSettlementServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallExpressCompanyServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallGoodsCartServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallGoodsDetailServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallGoodsServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallGoodsSetServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallGoodsSkuServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallGoodsSpecServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallGoodsSpecValueServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallGroupSpecServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallOrderDetailServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallOrderMainServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallOrderServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallTagServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallUserAddressServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallUserCollectServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallUserEvaluationServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallUserReportServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MallVipEquityServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MemMerchantBankServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/MyUserSubstanceCouponServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/NoticeMessageServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/NoticeServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/mall/service/impl/UserAppSetServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/CityAreaController.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/DoctorController.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/IndexController.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/MemberController.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/UserController.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/WxController.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/body/BodyId.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/body/BodyMerchant.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/body/BodyPage.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/body/BodyPwd.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/body/BodyRealName.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/body/BodyRegister.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/body/BodyUpdateUser.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/body/BodyUser.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/body/RegisterThirdUserRequest.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/ApiVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/ContributionScoreVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/InviteUserVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/LoginResponse.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/LoginVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/MemUserInfoVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/MemberRuleVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/MerchantInfoVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/MerchantVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/MyCouponInfoVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/OpenCityVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/PayVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/RegisterVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/RiceRecordVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/RiceVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/VoGoodsMerchantInfo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/controller/common/vo/WeChatMiniAuthorizeVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MemMemberGradeMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MemMemberGradeRuleMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MemMerchantMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MemOrderAuthMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MemUserBankDetailMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MemUserLoginMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MemUserMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MemUserRelationMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MemUserShowIdMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MyCouponMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MyDoctorMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MyUserCouponMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/MyUserCouponOrderMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MemMemberGradeMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MemMemberGradeRuleMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MemMerchantMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MemOrderAuthMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MemUserBankDetailMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MemUserLoginMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MemUserMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MemUserRelationMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MemUserShowIdMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MyCouponMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MyDoctorMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MyUserCouponMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/dao/mapping/MyUserCouponOrderMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MemMemberGrade.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MemMemberGradeRule.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MemMerchant.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MemOrderAuth.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MemUser.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MemUserBankDetail.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MemUserLogin.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MemUserRelation.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MemUserShowId.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MyCoupon.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MyDoctor.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MyUserCoupon.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/model/MyUserCouponOrder.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMallOrderDetailUseService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMemMemberGradeRuleService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMemMemberGradeService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMemMerchantService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMemOrderAuthService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMemUserBankDetailService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMemUserLoginService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMemUserRelationService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMemUserService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMemUserShowIdService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMyCouponService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMyDoctorService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMyUserCouponOrderService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/IMyUserCouponService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/WechatNewService.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MallOrderDetailUseServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MemMemberGradeRuleServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MemMemberGradeServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MemMerchantServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MemOrderAuthServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MemUserBankDetailServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MemUserLoginServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MemUserRelationServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MemUserServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MemUserShowIdServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MyCouponServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MyDoctorServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MyUserCouponOrderServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/MyUserCouponServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/service/impl/WechatNewServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/shop/ShopController.java
meiya-rest/src/main/java/com/sinata/rest/modular/member/shop/ShopLoginController.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/AuthController.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/CityRegionController.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/PayNotifyController.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/SmsController.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/common/ApiController.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/common/H5Controller.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/common/ImgsController.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/common/body/BodyFeedback.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/common/body/BodyId.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/common/body/BodyPage.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/common/vo/ApiVo.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/common/vo/PayCheck.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/controller/common/vo/VoFeedback.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/AlipayUrlMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/AppSetMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/AreaCityMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/CityRegionMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/FeedbackMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/RemoteSetMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/SmsRecordMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/SysNoticeMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/SystemNoticeMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/SystemSetMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/TBannerMapper.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/mapping/AlipayUrlMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/mapping/AppSetMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/mapping/AreaCityMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/mapping/CityRegionMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/mapping/FeedbackMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/mapping/RemoteSetMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/mapping/SmsRecordMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/mapping/SysNoticeMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/mapping/SystemNoticeMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/mapping/SystemSetMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/system/dao/mapping/TBannerMapper.xml
meiya-rest/src/main/java/com/sinata/rest/modular/system/model/AlipayUrl.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/model/AppSet.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/model/AreaCity.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/model/CityRegion.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/model/Feedback.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/model/RemoteSet.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/model/SmsRecord.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/model/SysNotice.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/model/SystemNotice.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/model/SystemSet.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/model/TBanner.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/IAlipayUrlService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/IAppSetService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/IAreaCityService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/ICityRegionService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/IFeedbackService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/IRemoteSetService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/ISmsRecordService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/ISysNoticeService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/ISystemNoticeService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/ISystemSetService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/ITBannerService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/RedisTemplateService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/AlipayUrlServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/AppSetServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/AreaCityServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/AuthService.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/CityRegionServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/FeedbackServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/RedisTemplateServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/RemoteSetServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/SmsRecordServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/SysNoticeServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/SystemNoticeServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/SystemSetServiceImpl.java
meiya-rest/src/main/java/com/sinata/rest/modular/system/service/impl/TBannerServiceImpl.java
meiya-rest/src/main/resources/application-dev.yml
meiya-rest/src/main/resources/application-prod.yml
meiya-rest/src/main/resources/application-test.yml
meiya-rest/src/main/resources/application.yml
meiya-rest/src/main/resources/cert.dev/apiclient_cert.p12
meiya-rest/src/main/resources/cert.dev/apiclient_cert.pem
meiya-rest/src/main/resources/cert.dev/apiclient_key.pem
meiya-rest/src/main/resources/cert.dev/m.mymtmy.com_server.pfx
meiya-rest/src/main/resources/cert.dev/证书使用说明.txt
meiya-rest/src/main/resources/cert/apiclient_cert.p12
meiya-rest/src/main/resources/cert/apiclient_cert.pem
meiya-rest/src/main/resources/cert/apiclient_key.pem
meiya-rest/src/main/resources/cert/m.mymtmy.com_server.pfx
meiya-rest/src/main/resources/cert/证书使用说明.txt
meiya-rest/src/main/resources/i18n/message.properties
meiya-rest/src/main/resources/i18n/message_en_US.properties
meiya-rest/src/main/resources/template/entity.java.vm
meiya-rest/src/main/resources/views/detailH5.html
meiya-rest/src/test/java/com/sinata/GunsRestApplicationTests.java
meiya-rest/src/test/java/com/sinata/generator/EntityGenerator.java
meiya-rest/src/test/java/com/sinata/generator/EntityGeneratorGoku.java
meiya-rest/src/test/java/com/sinata/jwt/DecryptTest.java
meiya-rest/src/test/java/com/sinata/jwt/JWTTest.java
meiya-shop/meiya-shop.iml
meiya-shop/pom.xml
meiya-shop/shop-restart.sh
meiya-shop/src/main/java/com/sinata/ShopApplication.java
meiya-shop/src/main/java/com/sinata/shop/config/EhCacheConfig.java
meiya-shop/src/main/java/com/sinata/shop/config/InitApplicationRunner.java
meiya-shop/src/main/java/com/sinata/shop/config/OssUploadUtil.java
meiya-shop/src/main/java/com/sinata/shop/config/SpringSessionConfig.java
meiya-shop/src/main/java/com/sinata/shop/config/SwaggerConfig.java
meiya-shop/src/main/java/com/sinata/shop/config/datasource/MultiDataSourceConfig.java
meiya-shop/src/main/java/com/sinata/shop/config/datasource/SingleDataSourceConfig.java
meiya-shop/src/main/java/com/sinata/shop/config/properties/AliPayProperties.java
meiya-shop/src/main/java/com/sinata/shop/config/properties/BeetlProperties.java
meiya-shop/src/main/java/com/sinata/shop/config/properties/GunsProperties.java
meiya-shop/src/main/java/com/sinata/shop/config/properties/WxPayProperties.java
meiya-shop/src/main/java/com/sinata/shop/config/web/BeetlConfig.java
meiya-shop/src/main/java/com/sinata/shop/config/web/GenerateCipherKey.java
meiya-shop/src/main/java/com/sinata/shop/config/web/ShiroConfig.java
meiya-shop/src/main/java/com/sinata/shop/config/web/WebConfig.java
meiya-shop/src/main/java/com/sinata/shop/core/aop/GlobalExceptionHandler.java
meiya-shop/src/main/java/com/sinata/shop/core/aop/LogAop.java
meiya-shop/src/main/java/com/sinata/shop/core/aop/PermissionAop.java
meiya-shop/src/main/java/com/sinata/shop/core/beetl/BeetlConfiguration.java
meiya-shop/src/main/java/com/sinata/shop/core/beetl/ShiroExt.java
meiya-shop/src/main/java/com/sinata/shop/core/common/annotion/BussinessLog.java
meiya-shop/src/main/java/com/sinata/shop/core/common/annotion/Permission.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/Const.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/DatasourceEnum.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/JwtConstants.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/cache/Cache.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/cache/CacheKey.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/dictmap/DeleteDict.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/dictmap/DeptDict.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/dictmap/DictMap.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/dictmap/LogDict.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/dictmap/MenuDict.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/dictmap/NoticeMap.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/dictmap/RoleDict.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/dictmap/UserDict.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/dictmap/base/AbstractDictMap.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/dictmap/base/SystemDict.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/dictmap/factory/DictFieldWarpperFactory.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/factory/ConstantFactory.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/factory/IConstantFactory.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/factory/MutiStrFactory.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/factory/PageFactory.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/state/BizLogType.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/state/ExpenseState.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/state/LogSucceed.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/state/LogType.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/state/ManagerStatus.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/state/MenuOpenStatus.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/state/MenuStatus.java
meiya-shop/src/main/java/com/sinata/shop/core/common/constant/state/Order.java
meiya-shop/src/main/java/com/sinata/shop/core/common/exception/BizExceptionEnum.java
meiya-shop/src/main/java/com/sinata/shop/core/common/exception/InvalidKaptchaException.java
meiya-shop/src/main/java/com/sinata/shop/core/intercept/GunsUserFilter.java
meiya-shop/src/main/java/com/sinata/shop/core/intercept/RestApiInteceptor.java
meiya-shop/src/main/java/com/sinata/shop/core/intercept/SessionHolderInterceptor.java
meiya-shop/src/main/java/com/sinata/shop/core/listener/ConfigListener.java
meiya-shop/src/main/java/com/sinata/shop/core/log/LogManager.java
meiya-shop/src/main/java/com/sinata/shop/core/log/LogObjectHolder.java
meiya-shop/src/main/java/com/sinata/shop/core/log/factory/LogFactory.java
meiya-shop/src/main/java/com/sinata/shop/core/log/factory/LogTaskFactory.java
meiya-shop/src/main/java/com/sinata/shop/core/shiro/ShiroDbRealm.java
meiya-shop/src/main/java/com/sinata/shop/core/shiro/ShiroKit.java
meiya-shop/src/main/java/com/sinata/shop/core/shiro/ShiroUser.java
meiya-shop/src/main/java/com/sinata/shop/core/shiro/check/ICheck.java
meiya-shop/src/main/java/com/sinata/shop/core/shiro/check/PermissionCheckFactory.java
meiya-shop/src/main/java/com/sinata/shop/core/shiro/check/PermissionCheckManager.java
meiya-shop/src/main/java/com/sinata/shop/core/shiro/factory/IShiro.java
meiya-shop/src/main/java/com/sinata/shop/core/shiro/factory/ShiroFactroy.java
meiya-shop/src/main/java/com/sinata/shop/core/tag/DictSelectorTag.java
meiya-shop/src/main/java/com/sinata/shop/core/util/ApiMenuFilter.java
meiya-shop/src/main/java/com/sinata/shop/core/util/Contrast.java
meiya-shop/src/main/java/com/sinata/shop/core/util/DateUtils.java
meiya-shop/src/main/java/com/sinata/shop/core/util/JwtTokenUtil.java
meiya-shop/src/main/java/com/sinata/shop/core/util/KaptchaUtil.java
meiya-shop/src/main/java/com/sinata/shop/core/util/PasswordUtil.java
meiya-shop/src/main/java/com/sinata/shop/core/util/PayUtil.java
meiya-shop/src/main/java/com/sinata/shop/core/util/SpringUtil.java
meiya-shop/src/main/java/com/sinata/shop/core/util/huawei/obs/ObsUploadUtil.java
meiya-shop/src/main/java/com/sinata/shop/modular/code/controller/CodeController.java
meiya-shop/src/main/java/com/sinata/shop/modular/code/factory/DefaultTemplateFactory.java
meiya-shop/src/main/java/com/sinata/shop/modular/code/service/TableService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/HomeController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/IndexReportController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/MallGoodsController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/MallGoodsGroupController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/MallOrderController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/MallOrderDetailController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/MallOrderMainController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/MallUserEvaluationController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/MemMerchantBankDetailController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/MemMerchantController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/MerchantSysUserController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/PayController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/controller/TNoticeController.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/AreaCityMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallClassifyOneMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallClassifyTwoMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallExpressCompanyMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallGoodsDetailMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallGoodsMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallGoodsSkuMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallGoodsSpecMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallGoodsSpecValueMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallOrderDetailMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallOrderMainMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallOrderMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallTagMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MallUserEvaluationMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MemMerchantBankMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MemMerchantMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/MerchantSysUserMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/StoreServiceMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/TNoticeMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/TNoticeMessageMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/AreaCityMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallClassifyOneMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallClassifyTwoMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallExpressCompanyMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallGoodsDetailMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallGoodsMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallGoodsSkuMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallGoodsSpecMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallGoodsSpecValueMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallOrderDetailMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallOrderMainMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallOrderMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallTagMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MallUserEvaluationMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MemMerchantBankMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MemMerchantMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/MerchantSysUserMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/StoreServiceMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/TNoticeMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dao/mapping/TNoticeMessageMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dto/AfterSaleSearchDto.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dto/BankDetailSearchDto.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dto/GoodsSearchDto.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dto/OrderClassPriceVo.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dto/OrderPriceVo.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dto/OrderRefundDto.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/dto/OrderSearchDto.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/AreaCity.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallClassifyOne.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallClassifyTwo.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallExpressCompany.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallGoods.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallGoodsDetail.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallGoodsSku.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallGoodsSpec.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallGoodsSpecValue.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallOrder.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallOrderDetail.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallOrderDetailUse.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallOrderMain.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallTag.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MallUserEvaluation.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MemMerchant.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MemMerchantBank.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/MerchantSysUser.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/StoreService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/TNotice.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/model/TNoticeMessage.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IAreaCityService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallClassifyOneService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallClassifyTwoService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallExpressCompanyService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallGoodsDetailService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallGoodsService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallGoodsSkuService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallGoodsSpecService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallGoodsSpecValueService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallOrderDetailService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallOrderMainService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallOrderService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallTagService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMallUserEvaluationService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMemMerchantBankService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMemMerchantService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IMerchantSysUserService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/IStoreServiceService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/ITNoticeMessageService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/ITNoticeService.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/AreaCityServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallClassifyOneServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallClassifyTwoServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallExpressCompanyServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallGoodsDetailServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallGoodsServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallGoodsSkuServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallGoodsSpecServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallGoodsSpecValueServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallOrderDetailServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallOrderMainServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallOrderServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallTagServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MallUserEvaluationServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MemMerchantBankServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MemMerchantServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/MerchantSysUserServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/StoreServiceServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/TNoticeMessageServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/mall/service/impl/TNoticeServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/controller/MemUserController.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/dao/IndexReportMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/dao/MemUserBankDetailMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/dao/MemUserMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/dao/mapping/IndexReportMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/member/dao/mapping/MemUserBankDetailMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/member/dao/mapping/MemUserMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/member/model/MemUser.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/model/MemUserBankDetail.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/model/vo/MaxMinVo.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/service/IMemUserBankDetailService.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/service/IMemUserService.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/service/IndexReportService.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/service/impl/IndexReportServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/service/impl/MemUserBankDetailServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/member/service/impl/MemUserServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/AaaTestController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/BlackboardController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/CityRegionController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/DeptController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/DictController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/KaptchaController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/LogController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/LoginController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/LoginLogController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/MenuController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/MyDoctorController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/RoleController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/UserMgrController.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/util/AccountCheckUtil.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/util/MapWrapperUtil.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/controller/util/UploadUtil.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/AaaTestMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/DeptMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/DictMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/ExpenseMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/LoginLogMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/MenuMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/MyDoctorMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/NoticeMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/OperationLogMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/RelationMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/RoleMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/TAppSetMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/TCityRegionMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/TSystemSetMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/UserMapper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/AaaTestMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/DeptMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/DictMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/ExpenseMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/LoginLogMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/MenuMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/MyDoctorMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/NoticeMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/OperationLogMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/RelationMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/RoleMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/TAppSetMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/TCityRegionMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/TSystemSetMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/dao/mapping/UserMapper.xml
meiya-shop/src/main/java/com/sinata/shop/modular/system/factory/UserFactory.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/AaaTest.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/Dept.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/Dict.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/Expense.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/LoginLog.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/Menu.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/MyDoctor.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/Notice.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/OperationLog.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/Relation.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/Role.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/TAppSet.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/TCityRegion.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/TSystemSet.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/model/User.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/IAaaTestService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/IDeptService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/IDictService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/ILoginLogService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/IMenuService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/IMyDoctorService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/INoticeService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/IOperationLogService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/IRelationService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/IRoleService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/ITAppSetService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/ITCityRegionService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/ITSystemSetService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/IUserService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/RedisTemplateService.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/AaaTestServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/DeptServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/DictServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/LoginLogServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/MenuServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/MyDoctorServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/NoticeServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/OperationLogServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/RedisTemplateServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/RelationServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/RoleServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/TAppSetServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/TCityRegionServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/TSystemSetServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/service/impl/UserServiceImpl.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/transfer/ManagerUser.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/transfer/ReqAddManager.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/transfer/ReqEditManager.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/transfer/UserDto.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/warpper/DeptWarpper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/warpper/DictWarpper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/warpper/LogWarpper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/warpper/MenuWarpper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/warpper/RoleWarpper.java
meiya-shop/src/main/java/com/sinata/shop/modular/system/warpper/UserWarpper.java
meiya-shop/src/main/resources/META-INF/spring-devtools.properties
meiya-shop/src/main/resources/application-dev.yml
meiya-shop/src/main/resources/application-prod.yml
meiya-shop/src/main/resources/application-test.yml
meiya-shop/src/main/resources/application.yml
meiya-shop/src/main/resources/cert/m.mymtmy.com_server.pfx
meiya-shop/src/main/resources/ehcache.xml
meiya-shop/src/main/resources/template/entity.java.vm
meiya-shop/src/main/resources/wxpay/apiclient_cert.p12
meiya-shop/src/main/resources/wxpay/apiclient_cert.pem
meiya-shop/src/main/resources/wxpay/apiclient_key.pem
meiya-shop/src/main/resources/wxpay/证书使用说明.txt
meiya-shop/src/main/webapp/WEB-INF/view/404.html
meiya-shop/src/main/webapp/WEB-INF/view/blackboard.html
meiya-shop/src/main/webapp/WEB-INF/view/code/code.html
meiya-shop/src/main/webapp/WEB-INF/view/common/_container.html
meiya-shop/src/main/webapp/WEB-INF/view/common/_right.html
meiya-shop/src/main/webapp/WEB-INF/view/common/_tab.html
meiya-shop/src/main/webapp/WEB-INF/view/common/_theme.html
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/ImgUpload.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/ImgUrls.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/NameCon.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/SelectCon.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/TimeCon.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/VideoUrl.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/avatar.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/avatars.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/button.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/input.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/input_search.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/select.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/table.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/tag_tips
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/umeditor.tag
meiya-shop/src/main/webapp/WEB-INF/view/common/tags/uploadFile.tag
meiya-shop/src/main/webapp/WEB-INF/view/home.html
meiya-shop/src/main/webapp/WEB-INF/view/index.html
meiya-shop/src/main/webapp/WEB-INF/view/login.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallGoods/mallGoods.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallGoods/mallGoods_detail.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallGoodsGroup/mallGoodsGroup.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallGoodsGroup/mallGoodsGroup_detail.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrder/deliverAuth.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrder/mallOrder.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrder/mallOrder_add.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrder/mallOrder_detail.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrder/mallOrder_express.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrder/mallOrder_goods.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrder/setFreightAuth.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrderDetail/mallOrderDetail.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrderDetail/mallOrderDetail_add.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrderDetail/mallOrderDetail_edit.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrderMain/mallOrderMain.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrderMain/mallOrderMain_add.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallOrderMain/mallOrderMain_edit.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallUserEvaluation/mallUserEvaluation.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallUserEvaluation/mallUserEvaluation_add.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/mallUserEvaluation/mallUserEvaluation_edit.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/memMerchant/memMerchant.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/memMerchant/memMerchant_add.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/memMerchant/memMerchant_edit.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/memMerchant/memMerchant_logout.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/memMerchantBankDetail/memMerchantBankDetail.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/memMerchantBankDetail/memMerchantBankDetail_add.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/memMerchantBankDetail/memMerchantBankDetail_edit.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/tNotice/tNotice.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/tNotice/tNotice_add.html
meiya-shop/src/main/webapp/WEB-INF/view/mall/tNotice/tNotice_detail.html
meiya-shop/src/main/webapp/WEB-INF/view/notice.html
meiya-shop/src/main/webapp/WEB-INF/view/system/code/code.html
meiya-shop/src/main/webapp/WEB-INF/view/system/dept/dept.html
meiya-shop/src/main/webapp/WEB-INF/view/system/dept/dept_add.html
meiya-shop/src/main/webapp/WEB-INF/view/system/dept/dept_edit.html
meiya-shop/src/main/webapp/WEB-INF/view/system/dict/dict.html
meiya-shop/src/main/webapp/WEB-INF/view/system/dict/dict_add.html
meiya-shop/src/main/webapp/WEB-INF/view/system/dict/dict_edit.html
meiya-shop/src/main/webapp/WEB-INF/view/system/log/log.html
meiya-shop/src/main/webapp/WEB-INF/view/system/log/login_log.html
meiya-shop/src/main/webapp/WEB-INF/view/system/memUser/memUser.html
meiya-shop/src/main/webapp/WEB-INF/view/system/menu/menu.html
meiya-shop/src/main/webapp/WEB-INF/view/system/menu/menu_add.html
meiya-shop/src/main/webapp/WEB-INF/view/system/menu/menu_edit.html
meiya-shop/src/main/webapp/WEB-INF/view/system/myDoctor/myDoctor.html
meiya-shop/src/main/webapp/WEB-INF/view/system/myDoctor/myDoctorImage.html
meiya-shop/src/main/webapp/WEB-INF/view/system/myDoctor/myDoctor_add.html
meiya-shop/src/main/webapp/WEB-INF/view/system/myDoctor/myDoctor_detail.html
meiya-shop/src/main/webapp/WEB-INF/view/system/myDoctor/myDoctor_edit.html
meiya-shop/src/main/webapp/WEB-INF/view/system/role/role.html
meiya-shop/src/main/webapp/WEB-INF/view/system/role/role_add.html
meiya-shop/src/main/webapp/WEB-INF/view/system/role/role_assign.html
meiya-shop/src/main/webapp/WEB-INF/view/system/role/role_edit.html
meiya-shop/src/main/webapp/WEB-INF/view/system/user/user.html
meiya-shop/src/main/webapp/WEB-INF/view/system/user/user_add.html
meiya-shop/src/main/webapp/WEB-INF/view/system/user/user_chpwd.html
meiya-shop/src/main/webapp/WEB-INF/view/system/user/user_edit.html
meiya-shop/src/main/webapp/WEB-INF/view/system/user/user_roleassign.html
meiya-shop/src/main/webapp/WEB-INF/view/system/user/user_view.html
meiya-shop/src/main/webapp/static/css/_fstyle.css
meiya-shop/src/main/webapp/static/css/bootstrap-rtl.css
meiya-shop/src/main/webapp/static/css/bootstrap-select.min.css
meiya-shop/src/main/webapp/static/css/bootstrap.min.css
meiya-shop/src/main/webapp/static/css/font-awesome.css
meiya-shop/src/main/webapp/static/css/font-awesome.min.css
meiya-shop/src/main/webapp/static/css/login.css
meiya-shop/src/main/webapp/static/css/patterns/header-profile-skin-1.png
meiya-shop/src/main/webapp/static/css/patterns/header-profile-skin-3.png
meiya-shop/src/main/webapp/static/css/patterns/header-profile.png
meiya-shop/src/main/webapp/static/css/patterns/shattered.png
meiya-shop/src/main/webapp/static/css/plugins/bootstrap-table/bootstrap-table.min.css
meiya-shop/src/main/webapp/static/css/plugins/bootstrap-treetable/bootstrap-treetable.css
meiya-shop/src/main/webapp/static/css/plugins/chosen/chosen-sprite.png
meiya-shop/src/main/webapp/static/css/plugins/chosen/chosen-sprite@2x.png
meiya-shop/src/main/webapp/static/css/plugins/chosen/chosen.css
meiya-shop/src/main/webapp/static/css/plugins/clockpicker/clockpicker.css
meiya-shop/src/main/webapp/static/css/plugins/iCheck/custom.css
meiya-shop/src/main/webapp/static/css/plugins/iCheck/green.png
meiya-shop/src/main/webapp/static/css/plugins/iCheck/green@2x.png
meiya-shop/src/main/webapp/static/css/plugins/images/sprite-skin-flat.png
meiya-shop/src/main/webapp/static/css/plugins/validate/bootstrapValidator.min.css
meiya-shop/src/main/webapp/static/css/plugins/webuploader/webuploader.css
meiya-shop/src/main/webapp/static/css/plugins/ztree/demo.css
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/diy/1_close.png
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/diy/1_open.png
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/diy/2.png
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/diy/3.png
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/diy/4.png
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/diy/5.png
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/diy/6.png
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/diy/7.png
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/diy/8.png
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/diy/9.png
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/line_conn.gif
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/loading.gif
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/zTreeStandard.gif
meiya-shop/src/main/webapp/static/css/plugins/ztree/img/zTreeStandard.png
meiya-shop/src/main/webapp/static/css/plugins/ztree/zTreeStyle.css
meiya-shop/src/main/webapp/static/css/style.css
meiya-shop/src/main/webapp/static/favicon.ico
meiya-shop/src/main/webapp/static/fonts/FontAwesome.otf
meiya-shop/src/main/webapp/static/fonts/fontawesome-webfont.eot
meiya-shop/src/main/webapp/static/fonts/fontawesome-webfont.svg
meiya-shop/src/main/webapp/static/fonts/fontawesome-webfont.ttf
meiya-shop/src/main/webapp/static/fonts/fontawesome-webfont.woff
meiya-shop/src/main/webapp/static/fonts/fontawesome-webfont.woff2
meiya-shop/src/main/webapp/static/fonts/glyphicons-halflings-regular.eot
meiya-shop/src/main/webapp/static/fonts/glyphicons-halflings-regular.svg
meiya-shop/src/main/webapp/static/fonts/glyphicons-halflings-regular.ttf
meiya-shop/src/main/webapp/static/fonts/glyphicons-halflings-regular.woff
meiya-shop/src/main/webapp/static/fonts/glyphicons-halflings-regular.woff2
meiya-shop/src/main/webapp/static/img/NoPIC.png
meiya-shop/src/main/webapp/static/img/bg.png
meiya-shop/src/main/webapp/static/img/boy.gif
meiya-shop/src/main/webapp/static/img/errorPic.png
meiya-shop/src/main/webapp/static/img/girl.gif
meiya-shop/src/main/webapp/static/img/icons.png
meiya-shop/src/main/webapp/static/img/loading-upload.gif
meiya-shop/src/main/webapp/static/img/locked.png
meiya-shop/src/main/webapp/static/img/login-background.jpg
meiya-shop/src/main/webapp/static/img/user.png
meiya-shop/src/main/webapp/static/js/bootstrap-select.min.js
meiya-shop/src/main/webapp/static/js/bootstrap.min.js
meiya-shop/src/main/webapp/static/js/common/DateUtils.js
meiya-shop/src/main/webapp/static/js/common/Feng.js
meiya-shop/src/main/webapp/static/js/common/ajax-object.js
meiya-shop/src/main/webapp/static/js/common/bootstrap-select.min.js
meiya-shop/src/main/webapp/static/js/common/bootstrap-table-object.js
meiya-shop/src/main/webapp/static/js/common/date.format.js
meiya-shop/src/main/webapp/static/js/common/laydate-demo.js
meiya-shop/src/main/webapp/static/js/common/select-list-object.js
meiya-shop/src/main/webapp/static/js/common/tree-table-object.js
meiya-shop/src/main/webapp/static/js/common/web-upload-file.js
meiya-shop/src/main/webapp/static/js/common/web-upload-image.js
meiya-shop/src/main/webapp/static/js/common/web-upload-object.js
meiya-shop/src/main/webapp/static/js/common/ztree-object.js
meiya-shop/src/main/webapp/static/js/contabs.js
meiya-shop/src/main/webapp/static/js/content.js
meiya-shop/src/main/webapp/static/js/echarts.min.js
meiya-shop/src/main/webapp/static/js/hplus.js
meiya-shop/src/main/webapp/static/js/jquery.form.min.js
meiya-shop/src/main/webapp/static/js/jquery.min.js
meiya-shop/src/main/webapp/static/js/jquery.min.map
meiya-shop/src/main/webapp/static/js/plugins/bootstrap-suggest/bootstrap-suggest.min.js
meiya-shop/src/main/webapp/static/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js
meiya-shop/src/main/webapp/static/js/plugins/bootstrap-table/bootstrap-table.min.js
meiya-shop/src/main/webapp/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.js
meiya-shop/src/main/webapp/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js
meiya-shop/src/main/webapp/static/js/plugins/bootstrap-treetable/bootstrap-treetable.js
meiya-shop/src/main/webapp/static/js/plugins/chartJs/Chart.min.js
meiya-shop/src/main/webapp/static/js/plugins/chartJs/echarts-all.js
meiya-shop/src/main/webapp/static/js/plugins/chartJs/echarts.min.js
meiya-shop/src/main/webapp/static/js/plugins/chartJs/echarts.simple.min.js
meiya-shop/src/main/webapp/static/js/plugins/chosen/chosen.jquery.js
meiya-shop/src/main/webapp/static/js/plugins/clockpicker/clockpicker.js
meiya-shop/src/main/webapp/static/js/plugins/echarts/Chart.min.js
meiya-shop/src/main/webapp/static/js/plugins/echarts/echarts-all.js
meiya-shop/src/main/webapp/static/js/plugins/echarts/echarts.min.js
meiya-shop/src/main/webapp/static/js/plugins/echarts/echarts.simple.min.js
meiya-shop/src/main/webapp/static/js/plugins/iCheck/icheck.min.js
meiya-shop/src/main/webapp/static/js/plugins/laydate/laydate.js
meiya-shop/src/main/webapp/static/js/plugins/laydate/theme/default/font/iconfont.eot
meiya-shop/src/main/webapp/static/js/plugins/laydate/theme/default/font/iconfont.svg
meiya-shop/src/main/webapp/static/js/plugins/laydate/theme/default/font/iconfont.ttf
meiya-shop/src/main/webapp/static/js/plugins/laydate/theme/default/font/iconfont.woff
meiya-shop/src/main/webapp/static/js/plugins/laydate/theme/default/laydate.css
meiya-shop/src/main/webapp/static/js/plugins/layer/layer.js
meiya-shop/src/main/webapp/static/js/plugins/layer/mobile/layer.js
meiya-shop/src/main/webapp/static/js/plugins/layer/mobile/need/layer.css
meiya-shop/src/main/webapp/static/js/plugins/layer/theme/default/icon-ext.png
meiya-shop/src/main/webapp/static/js/plugins/layer/theme/default/icon.png
meiya-shop/src/main/webapp/static/js/plugins/layer/theme/default/layer.css
meiya-shop/src/main/webapp/static/js/plugins/layer/theme/default/loading-0.gif
meiya-shop/src/main/webapp/static/js/plugins/layer/theme/default/loading-1.gif
meiya-shop/src/main/webapp/static/js/plugins/layer/theme/default/loading-2.gif
meiya-shop/src/main/webapp/static/js/plugins/metisMenu/jquery.metisMenu.js
meiya-shop/src/main/webapp/static/js/plugins/morris/morris.js
meiya-shop/src/main/webapp/static/js/plugins/morris/raphael-2.1.0.min.js
meiya-shop/src/main/webapp/static/js/plugins/pace/pace.min.js
meiya-shop/src/main/webapp/static/js/plugins/slimscroll/jquery.slimscroll.min.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/emotion.css
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/emotion.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/0.gif
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/bface.gif
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/cface.gif
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/fface.gif
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/jxface2.gif
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/neweditor-tab-bg.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/tface.gif
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/wface.gif
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/emotion/images/yface.gif
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/formula/formula.css
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/formula/formula.html
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/formula/formula.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/formula/images/formula.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/image/image.css
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/image/image.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/image/images/close.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/image/images/upload1.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/image/images/upload2.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/link/link.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/map/map.html
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/map/map.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/video/images/center_focus.jpg
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/video/images/left_focus.jpg
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/video/images/none_focus.jpg
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/video/images/right_focus.jpg
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/video/video.css
meiya-shop/src/main/webapp/static/js/plugins/umeditor/dialogs/video/video.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/index.html
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/en.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/addimage.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/alldeletebtnhoverskin.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/alldeletebtnupskin.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/background.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/button.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/copy.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/deletedisable.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/deleteenable.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/imglabel.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/listbackground.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/localimage.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/music.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/rotateleftdisable.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/rotateleftenable.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/rotaterightdisable.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/rotaterightenable.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/en/images/upload.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/copy.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/imglabel.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/localimage.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/music.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/images/upload.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/lang/zh-cn/zh-cn.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/themes/default/css/umeditor.css
meiya-shop/src/main/webapp/static/js/plugins/umeditor/themes/default/css/umeditor.min.css
meiya-shop/src/main/webapp/static/js/plugins/umeditor/themes/default/images/caret.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/themes/default/images/close.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/themes/default/images/icons.gif
meiya-shop/src/main/webapp/static/js/plugins/umeditor/themes/default/images/icons.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/themes/default/images/ok.gif
meiya-shop/src/main/webapp/static/js/plugins/umeditor/themes/default/images/pop-bg.png
meiya-shop/src/main/webapp/static/js/plugins/umeditor/themes/default/images/spacer.gif
meiya-shop/src/main/webapp/static/js/plugins/umeditor/themes/default/images/videologo.gif
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/jquery.min.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.eot
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.otf
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.svg
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.ttf
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/Symbola.woff
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/STIXFontLicense2010.txt
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.eot
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.svg
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.ttf
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.woff
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.eot
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.svg
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.ttf
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.woff
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.eot
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.svg
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.ttf
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.woff
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.eot
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.svg
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.ttf
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.woff
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/mathquill.css
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/mathquill.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/third-party/mathquill/mathquill.min.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/umeditor.config.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/umeditor.js
meiya-shop/src/main/webapp/static/js/plugins/umeditor/umeditor.min.js
meiya-shop/src/main/webapp/static/js/plugins/validate/additional-methods.min.js
meiya-shop/src/main/webapp/static/js/plugins/validate/bootstrapValidator.min.js
meiya-shop/src/main/webapp/static/js/plugins/validate/zh_CN.js
meiya-shop/src/main/webapp/static/js/plugins/wangEditor/wangEditor.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/Uploader.swf
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.css
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.custom.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.custom.min.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.fis.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.flashonly.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.flashonly.min.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.html5only.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.html5only.min.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.min.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.noimage.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.noimage.min.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.nolog.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.nolog.min.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.withoutimage.js
meiya-shop/src/main/webapp/static/js/plugins/webuploader/webuploader.withoutimage.min.js
meiya-shop/src/main/webapp/static/js/plugins/ztree/jquery.ztree.all.min.js
meiya-shop/src/main/webapp/static/modular/code/gen.js
meiya-shop/src/main/webapp/static/modular/flowable/expense/expense.js
meiya-shop/src/main/webapp/static/modular/flowable/expense/expense_info.js
meiya-shop/src/main/webapp/static/modular/flowable/process/process.js
meiya-shop/src/main/webapp/static/modular/flowable/process/process_info.js
meiya-shop/src/main/webapp/static/modular/mall/home/home.js
meiya-shop/src/main/webapp/static/modular/mall/mallGoods/mallGoods.js
meiya-shop/src/main/webapp/static/modular/mall/mallGoods/mallGoods_info.js
meiya-shop/src/main/webapp/static/modular/mall/mallGoodsGroup/mallGoodsGroup.js
meiya-shop/src/main/webapp/static/modular/mall/mallGoodsGroup/mallGoodsGroup_info.js
meiya-shop/src/main/webapp/static/modular/mall/mallOrder/mallOrder.js
meiya-shop/src/main/webapp/static/modular/mall/mallOrder/mallOrder_info.js
meiya-shop/src/main/webapp/static/modular/mall/mallOrderDetail/mallOrderDetail.js
meiya-shop/src/main/webapp/static/modular/mall/mallOrderDetail/mallOrderDetail_info.js
meiya-shop/src/main/webapp/static/modular/mall/mallOrderMain/mallOrderMain.js
meiya-shop/src/main/webapp/static/modular/mall/mallOrderMain/mallOrderMain_info.js
meiya-shop/src/main/webapp/static/modular/mall/mallUserEvaluation/mallUserEvaluation.js
meiya-shop/src/main/webapp/static/modular/mall/mallUserEvaluation/mallUserEvaluation_info.js
meiya-shop/src/main/webapp/static/modular/mall/memMerchant/memMerchant.js
meiya-shop/src/main/webapp/static/modular/mall/memMerchant/memMerchant_info.js
meiya-shop/src/main/webapp/static/modular/mall/memMerchantBankDetail/memMerchantBankDetail.js
meiya-shop/src/main/webapp/static/modular/mall/memMerchantBankDetail/memMerchantBankDetail_info.js
meiya-shop/src/main/webapp/static/modular/mall/tNotice/tNotice.js
meiya-shop/src/main/webapp/static/modular/mall/tNotice/tNotice_info.js
meiya-shop/src/main/webapp/static/modular/mallGoodsGroup/mallGoodsGroup.js
meiya-shop/src/main/webapp/static/modular/mallGoodsGroup/mallGoodsGroup_info.js
meiya-shop/src/main/webapp/static/modular/system/code/code.js
meiya-shop/src/main/webapp/static/modular/system/dept/dept.js
meiya-shop/src/main/webapp/static/modular/system/dept/dept_info.js
meiya-shop/src/main/webapp/static/modular/system/dict/dict.js
meiya-shop/src/main/webapp/static/modular/system/dict/dict_info.js
meiya-shop/src/main/webapp/static/modular/system/home/home.js
meiya-shop/src/main/webapp/static/modular/system/log/log.js
meiya-shop/src/main/webapp/static/modular/system/log/login_log.js
meiya-shop/src/main/webapp/static/modular/system/memUser/memUser.js
meiya-shop/src/main/webapp/static/modular/system/menu/menu.js
meiya-shop/src/main/webapp/static/modular/system/menu/menu_info.js
meiya-shop/src/main/webapp/static/modular/system/myDoctor/myDoctor.js
meiya-shop/src/main/webapp/static/modular/system/myDoctor/myDoctor_info.js
meiya-shop/src/main/webapp/static/modular/system/role/role.js
meiya-shop/src/main/webapp/static/modular/system/role/role_info.js
meiya-shop/src/main/webapp/static/modular/system/user/user.js
meiya-shop/src/main/webapp/static/modular/system/user/user_info.js
meiyadb.sql
pom.xml |