项目加入git
This commit is contained in:
commit
fa82a55e22
745 files changed
+157384
No files matched your search
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>ruoyi-api</artifactId>
|
||||
|
||||
<description>
|
||||
api服务入口
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<mybatisplus-spring-boot-starter.version>1.0.5</mybatisplus-spring-boot-starter.version>
|
||||
<shiro.version>1.4.0</shiro.version>
|
||||
<mybatis-plus.version>2.3</mybatis-plus.version>
|
||||
<fastjson.version>1.2.47</fastjson.version>
|
||||
<velocity.version>1.7</velocity.version>
|
||||
<kaptcha.version>2.3.2</kaptcha.version>
|
||||
<ehcache.version>3.3.1</ehcache.version>
|
||||
<zxing.version>3.2.1</zxing.version>
|
||||
<druid.version>1.1.10</druid.version>
|
||||
<beetl.version>2.8.5</beetl.version>
|
||||
<swagger.version>2.9.2</swagger.version>
|
||||
<commons-lang3.version>3.7</commons-lang3.version>
|
||||
<ehcache.core.version>2.6.11</ehcache.core.version>
|
||||
<mysql-connector-java.version>8.0.11</mysql-connector-java.version>
|
||||
<jwt.version>0.9.0</jwt.version>
|
||||
<hutool.version>4.1.1</hutool.version>
|
||||
<org.mapstruct.version>1.2.0.Final</org.mapstruct.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</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-starter-data-redis</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.apache.commons</groupId>-->
|
||||
<!-- <artifactId>commons-pool2</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>2.9.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>wiki.xsx</groupId>
|
||||
<artifactId>spring-boot-starter-fast-redis</artifactId>
|
||||
<version>1.5.2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>swagger-bootstrap-ui</artifactId>
|
||||
<version>1.9.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.itmuch.security</groupId>
|
||||
<artifactId>light-security-spring-boot-starter</artifactId>
|
||||
<version>1.0.1-RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql-connector-java.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-generate</artifactId>
|
||||
<version>${mybatis-plus.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-engine-core</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-jdk8</artifactId>
|
||||
<version>${org.mapstruct.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>${org.mapstruct.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
||||
/**
|
||||
* @author hupeng <610796224@qq.com>
|
||||
*/
|
||||
@SpringBootApplication
|
||||
//@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||
@MapperScan(basePackages = {"com.ruoyi.app.common.persistence.dao"})
|
||||
public class LightSecurityApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(LightSecurityApplication.class, args);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.app.common;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class R<M> {
|
||||
// 返回状态【0-成功,1-业务失败,999-表示系统异常】
|
||||
@JSONField(ordinal = 1)
|
||||
private int code;
|
||||
// 返回信息
|
||||
@JSONField(ordinal = 2)
|
||||
private String message;
|
||||
// 返回数据实体;
|
||||
@JSONField(ordinal = 3)
|
||||
private M data;
|
||||
|
||||
|
||||
private R(){}
|
||||
|
||||
|
||||
public static<M> R success(M m){
|
||||
R r = new R();
|
||||
r.setCode(0);
|
||||
r.setMessage("success");
|
||||
r.setData(m);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
public static<M> R success(String msg){
|
||||
R r = new R();
|
||||
r.setCode(0);
|
||||
r.setMessage(msg);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
public static<M> R serviceFail(String msg){
|
||||
R r = new R();
|
||||
r.setCode(1);
|
||||
r.setMessage(msg);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
public static<M> R appFail(String msg){
|
||||
R r = new R();
|
||||
r.setCode(999);
|
||||
r.setMessage(msg);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
public static<M> R error(int code,String msg){
|
||||
R r = new R();
|
||||
r.setCode(code);
|
||||
r.setMessage(msg);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.ruoyi.app.common.config;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* MybatisPlus配置
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
@MapperScan(basePackages = {"com.ruoyi.app.common.persistence.dao"})
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
/**
|
||||
* mybatis-plus分页插件
|
||||
*/
|
||||
@Bean
|
||||
public PaginationInterceptor paginationInterceptor() {
|
||||
return new PaginationInterceptor();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
//package com.ruoyi.app.common.config;
|
||||
//
|
||||
//import com.fasterxml.jackson.annotation.JsonAutoDetect;
|
||||
//import com.fasterxml.jackson.annotation.PropertyAccessor;
|
||||
//import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
//import org.springframework.cache.CacheManager;
|
||||
//import org.springframework.cache.annotation.CachingConfigurerSupport;
|
||||
//import org.springframework.cache.annotation.EnableCaching;
|
||||
//import org.springframework.cache.interceptor.KeyGenerator;
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//import org.springframework.data.redis.cache.RedisCacheConfiguration;
|
||||
//import org.springframework.data.redis.cache.RedisCacheManager;
|
||||
//import org.springframework.data.redis.cache.RedisCacheWriter;
|
||||
//import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
|
||||
//import org.springframework.data.redis.core.RedisTemplate;
|
||||
//import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
|
||||
//import org.springframework.data.redis.serializer.RedisSerializer;
|
||||
//import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||
//
|
||||
//import javax.annotation.Resource;
|
||||
//import java.lang.reflect.Method;
|
||||
//import java.time.Duration;
|
||||
//
|
||||
///**
|
||||
// * @ClassName RedisConfig
|
||||
// * @Author hupeng <610796224@qq.com>
|
||||
// * @Date 2019/6/27
|
||||
// *
|
||||
// * 已经使用其他redis工具类,此地方配置的bean注释掉
|
||||
// **/
|
||||
//@Configuration
|
||||
//@EnableCaching // 开启缓存支持
|
||||
//public class RedisConfig extends CachingConfigurerSupport {
|
||||
// //@Resource
|
||||
// private LettuceConnectionFactory lettuceConnectionFactory;
|
||||
//
|
||||
// /**
|
||||
// * @description 自定义的缓存key的生成策略 若想使用这个key
|
||||
// * 只需要讲注解上keyGenerator的值设置为keyGenerator即可</br>
|
||||
// * @return 自定义策略生成的key
|
||||
// */
|
||||
// // @Bean
|
||||
// public KeyGenerator keyGenerator() {
|
||||
// return new KeyGenerator() {
|
||||
// @Override
|
||||
// public Object generate(Object target, Method method, Object... params) {
|
||||
// StringBuffer sb = new StringBuffer();
|
||||
// sb.append(target.getClass().getName());
|
||||
// sb.append(method.getName());
|
||||
// for (Object obj : params) {
|
||||
// sb.append(obj.toString());
|
||||
// }
|
||||
// return sb.toString();
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * RedisTemplate配置
|
||||
// */
|
||||
// //@Bean
|
||||
// public RedisTemplate<String, Object> redisTemplate(LettuceConnectionFactory lettuceConnectionFactory) {
|
||||
// // 设置序列化
|
||||
// Jackson2JsonRedisSerializer<Object> jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer<Object>(Object.class);
|
||||
// ObjectMapper om = new ObjectMapper();
|
||||
// om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
|
||||
// om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
|
||||
// jackson2JsonRedisSerializer.setObjectMapper(om);
|
||||
// // 配置redisTemplate
|
||||
// RedisTemplate<String, Object> redisTemplate = new RedisTemplate<String, Object>();
|
||||
// redisTemplate.setConnectionFactory(lettuceConnectionFactory);
|
||||
// RedisSerializer<?> stringSerializer = new StringRedisSerializer();
|
||||
// redisTemplate.setKeySerializer(stringSerializer);// key序列化
|
||||
// redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);// value序列化
|
||||
// redisTemplate.setHashKeySerializer(stringSerializer);// Hash key序列化
|
||||
// redisTemplate.setHashValueSerializer(jackson2JsonRedisSerializer);// Hash value序列化
|
||||
// redisTemplate.afterPropertiesSet();
|
||||
// return redisTemplate;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 缓存配置管理器
|
||||
// */
|
||||
// //@Bean
|
||||
// public CacheManager cacheManager(LettuceConnectionFactory factory) {
|
||||
// // 以锁写入的方式创建RedisCacheWriter对象
|
||||
// RedisCacheWriter writer = RedisCacheWriter.lockingRedisCacheWriter(factory);
|
||||
// /**
|
||||
// * 设置CacheManager的Value序列化方式为JdkSerializationRedisSerializer,
|
||||
// * 但其实RedisCacheConfiguration默认就是使用 StringRedisSerializer序列化key,
|
||||
// * JdkSerializationRedisSerializer序列化value, 所以以下注释代码就是默认实现,没必要写,直接注释掉
|
||||
// */
|
||||
// // RedisSerializationContext.SerializationPair pair =
|
||||
// // RedisSerializationContext.SerializationPair.fromSerializer(new
|
||||
// // JdkSerializationRedisSerializer(this.getClass().getClassLoader()));
|
||||
// // RedisCacheConfiguration config =
|
||||
// // RedisCacheConfiguration.defaultCacheConfig().serializeValuesWith(pair);
|
||||
// // 创建默认缓存配置对象
|
||||
// RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig().entryTtl(Duration.ofHours(1)); // 设置缓存有效期一小时;
|
||||
// RedisCacheManager cacheManager = new RedisCacheManager(writer, config);
|
||||
// return cacheManager;
|
||||
// }
|
||||
//}
|
||||
@@ -0,0 +1,41 @@
|
||||
//package com.ruoyi.app.common.config;
|
||||
//
|
||||
//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;
|
||||
//
|
||||
///**
|
||||
// * @ClassName SwaggerConfiguration
|
||||
// * @Author hupeng <610796224@qq.com>
|
||||
// * @Date 2019/6/28
|
||||
// **/
|
||||
//
|
||||
//@Configuration
|
||||
//@EnableSwagger2
|
||||
//public class SwaggerConfiguration {
|
||||
// @Bean
|
||||
// public Docket createRestApi() {
|
||||
// return new Docket(DocumentationType.SWAGGER_2)
|
||||
// .apiInfo(apiInfo())
|
||||
// .select()
|
||||
// .apis(RequestHandlerSelectors.basePackage("com.yixiang.security.modular"))
|
||||
// .paths(PathSelectors.any())
|
||||
// .build();
|
||||
// }
|
||||
//
|
||||
// private ApiInfo apiInfo() {
|
||||
// return new ApiInfoBuilder()
|
||||
// .title("旅游系统API")
|
||||
// .description("旅游系统API")
|
||||
// .termsOfServiceUrl("http://localhost:8009/")
|
||||
// .contact("610896224@qq.com")
|
||||
// .version("1.0")
|
||||
// .build();
|
||||
// }
|
||||
//}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.ruoyi.app.common.exception;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import static org.springframework.http.HttpStatus.BAD_REQUEST;
|
||||
|
||||
/**
|
||||
* @ClassName 自定义异常
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/6/27
|
||||
**/
|
||||
@Getter
|
||||
public class BadRequestException extends RuntimeException{
|
||||
|
||||
private Integer status = BAD_REQUEST.value();
|
||||
|
||||
public BadRequestException(String msg){
|
||||
super(msg);
|
||||
}
|
||||
|
||||
public BadRequestException(HttpStatus status,String msg){
|
||||
super(msg);
|
||||
this.status = status.value();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.ruoyi.app.common.exception;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
/**
|
||||
* @ClassName 自定义异常
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/6/27
|
||||
**/
|
||||
public class EntityExistException extends RuntimeException {
|
||||
|
||||
public EntityExistException(Class clazz, Object... saveBodyParamsMap) {
|
||||
super(EntityExistException.generateMessage(clazz.getSimpleName(), toMap(String.class, String.class, saveBodyParamsMap)));
|
||||
}
|
||||
|
||||
private static String generateMessage(String entity, Map<String, String> saveBodyParams) {
|
||||
return StringUtils.capitalize(entity) +
|
||||
" 已存在 " +
|
||||
saveBodyParams;
|
||||
}
|
||||
|
||||
private static <K, V> Map<K, V> toMap(
|
||||
Class<K> keyType, Class<V> valueType, Object... entries) {
|
||||
if (entries.length % 2 == 1)
|
||||
throw new IllegalArgumentException("Invalid entries");
|
||||
return IntStream.range(0, entries.length / 2).map(i -> i * 2)
|
||||
.collect(HashMap::new,
|
||||
(m, i) -> m.put(keyType.cast(entries[i]), valueType.cast(entries[i + 1])),
|
||||
Map::putAll);
|
||||
}
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
package com.ruoyi.app.common.exception;
|
||||
|
||||
import com.itmuch.lightsecurity.exception.LightSecurityException;
|
||||
import com.ruoyi.app.common.R;
|
||||
import com.ruoyi.app.common.utils.ThrowableUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName 全局异常处理
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/6/27
|
||||
**/
|
||||
@Slf4j
|
||||
@ControllerAdvice
|
||||
public class LightSecurityExceptionHandler {
|
||||
/**
|
||||
* Light Security相关异常
|
||||
*
|
||||
* @param exception 异常
|
||||
* @return 发生异常时的返回
|
||||
*/
|
||||
@ExceptionHandler(value = {LightSecurityException.class})
|
||||
@ResponseStatus(HttpStatus.UNAUTHORIZED)
|
||||
@ResponseBody
|
||||
public R error(LightSecurityException exception) {
|
||||
return R.error(401,"授权失败");
|
||||
}
|
||||
|
||||
|
||||
@ExceptionHandler(value = {Exception.class})
|
||||
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||
@ResponseBody
|
||||
public R allError(Exception exception) {
|
||||
return R.error(4000,exception.getMessage());
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理所有接口数据验证异常
|
||||
* @param e
|
||||
* @returns
|
||||
*/
|
||||
@ExceptionHandler(MethodArgumentNotValidException.class)
|
||||
@ResponseStatus(HttpStatus.BAD_REQUEST)
|
||||
@ResponseBody
|
||||
public R handleMethodArgumentNotValidException(MethodArgumentNotValidException e){
|
||||
String[] str = e.getBindingResult().getAllErrors().get(0).getCodes()[1].split("\\.");
|
||||
StringBuffer msg = new StringBuffer(str[1]+":");
|
||||
msg.append(e.getBindingResult().getAllErrors().get(0).getDefaultMessage());
|
||||
return R.error(4001,msg.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理自定义异常
|
||||
* @param e
|
||||
* @return
|
||||
*/
|
||||
@ExceptionHandler(value = BadRequestException.class)
|
||||
public R badRequestException(BadRequestException e) {
|
||||
// 打印堆栈信息
|
||||
log.error(ThrowableUtil.getStackTrace(e));
|
||||
return R.error(4002,e.getMessage());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 处理 EntityExist
|
||||
* @param e
|
||||
* @return
|
||||
*/
|
||||
@ExceptionHandler(value = EntityExistException.class)
|
||||
public R entityExistException(EntityExistException e) {
|
||||
// 打印堆栈信息
|
||||
log.error(ThrowableUtil.getStackTrace(e));
|
||||
return R.error(4003,e.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.ruoyi.app.common.persistence.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.app.common.persistence.model.StoreMember;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
||||
@Mapper
|
||||
public interface StoreMemberDao extends BaseMapper<StoreMember> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.app.common.persistence.dao;
|
||||
|
||||
import com.ruoyi.app.common.persistence.model.StoreOrder;
|
||||
import com.baomidou.mybatisplus.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 订单主表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author hupeng
|
||||
* @since 2019-06-26
|
||||
*/
|
||||
public interface StoreOrderMapper extends BaseMapper<StoreOrder> {
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
<?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.ruoyi.app.common.persistence.dao.StoreMemberMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.ruoyi.app.common.persistence.model.StoreMember">
|
||||
<id column="id" property="id" />
|
||||
<result column="store_id" property="storeId" />
|
||||
<result column="vip_no" property="vipNo" />
|
||||
<result column="openid" property="openid" />
|
||||
<result column="seller_openid" property="sellerOpenid" />
|
||||
<result column="wx_openid" property="wxOpenid" />
|
||||
<result column="unionid" property="unionid" />
|
||||
<result column="phone" property="phone" />
|
||||
<result column="password" property="password" />
|
||||
<result column="pay_password" property="payPassword" />
|
||||
<result column="nickname" property="nickname" />
|
||||
<result column="headimg" property="headimg" />
|
||||
<result column="user_type" property="userType" />
|
||||
<result column="sex" property="sex" />
|
||||
<result column="level" property="level" />
|
||||
<result column="total_amount" property="totalAmount" />
|
||||
<result column="user_money" property="userMoney" />
|
||||
<result column="distribut_money" property="distributMoney" />
|
||||
<result column="frozen_money" property="frozenMoney" />
|
||||
<result column="underling_number" property="underlingNumber" />
|
||||
<result column="pay_points" property="payPoints" />
|
||||
<result column="frozen_points" property="frozenPoints" />
|
||||
<result column="address_id" property="addressId" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="status" property="status" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="create_at" property="createAt" />
|
||||
<result column="status_time" property="statusTime" />
|
||||
<result column="login_at" property="loginAt" />
|
||||
<result column="login_num" property="loginNum" />
|
||||
<result column="is_distribut" property="isDistribut" />
|
||||
<result column="first_leader" property="firstLeader" />
|
||||
<result column="second_leader" property="secondLeader" />
|
||||
<result column="third_leader" property="thirdLeader" />
|
||||
<result column="is_super" property="isSuper" />
|
||||
<result column="spread_qrcode" property="spreadQrcode" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.app.common.persistence.dao.StoreOrderGoodsMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.ruoyi.app.common.persistence.model.StoreOrderGoods">
|
||||
<id column="rec_id" property="recId" />
|
||||
<result column="order_id" property="orderId" />
|
||||
<result column="goods_id" property="goodsId" />
|
||||
<result column="goods_name" property="goodsName" />
|
||||
<result column="goods_sn" property="goodsSn" />
|
||||
<result column="goods_num" property="goodsNum" />
|
||||
<result column="market_price" property="marketPrice" />
|
||||
<result column="goods_price" property="goodsPrice" />
|
||||
<result column="cost_price" property="costPrice" />
|
||||
<result column="member_goods_price" property="memberGoodsPrice" />
|
||||
<result column="give_integral" property="giveIntegral" />
|
||||
<result column="spec_key" property="specKey" />
|
||||
<result column="spec_key_name" property="specKeyName" />
|
||||
<result column="bar_code" property="barCode" />
|
||||
<result column="is_comment" property="isComment" />
|
||||
<result column="prom_type" property="promType" />
|
||||
<result column="prom_id" property="promId" />
|
||||
<result column="pay_status" property="payStatus" />
|
||||
<result column="is_send" property="isSend" />
|
||||
<result column="delivery_id" property="deliveryId" />
|
||||
<result column="sku" property="sku" />
|
||||
<result column="start_time" property="startTime" />
|
||||
<result column="end_time" property="endTime" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
<?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.ruoyi.app.common.persistence.dao.StoreOrderMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.ruoyi.app.common.persistence.model.StoreOrder">
|
||||
<id column="order_id" property="orderId" />
|
||||
<result column="store_id" property="storeId" />
|
||||
<result column="order_sn" property="orderSn" />
|
||||
<result column="user_id" property="userId" />
|
||||
<result column="order_status" property="orderStatus" />
|
||||
<result column="shipping_status" property="shippingStatus" />
|
||||
<result column="pay_status" property="payStatus" />
|
||||
<result column="consignee" property="consignee" />
|
||||
<result column="country" property="country" />
|
||||
<result column="province" property="province" />
|
||||
<result column="city" property="city" />
|
||||
<result column="district" property="district" />
|
||||
<result column="twon" property="twon" />
|
||||
<result column="city_info" property="cityInfo" />
|
||||
<result column="address" property="address" />
|
||||
<result column="zipcode" property="zipcode" />
|
||||
<result column="mobile" property="mobile" />
|
||||
<result column="email" property="email" />
|
||||
<result column="receive_type" property="receiveType" />
|
||||
<result column="shipping_code" property="shippingCode" />
|
||||
<result column="shipping_name" property="shippingName" />
|
||||
<result column="pay_code" property="payCode" />
|
||||
<result column="pay_method" property="payMethod" />
|
||||
<result column="recharge_id" property="rechargeId" />
|
||||
<result column="pay_name" property="payName" />
|
||||
<result column="invoice_title" property="invoiceTitle" />
|
||||
<result column="taxpayer" property="taxpayer" />
|
||||
<result column="goods_price" property="goodsPrice" />
|
||||
<result column="shipping_price" property="shippingPrice" />
|
||||
<result column="user_money" property="userMoney" />
|
||||
<result column="coupon_price" property="couponPrice" />
|
||||
<result column="red_price" property="redPrice" />
|
||||
<result column="red_id" property="redId" />
|
||||
<result column="integral" property="integral" />
|
||||
<result column="integral_money" property="integralMoney" />
|
||||
<result column="order_amount" property="orderAmount" />
|
||||
<result column="total_amount" property="totalAmount" />
|
||||
<result column="add_time" property="addTime" />
|
||||
<result column="shipping_time" property="shippingTime" />
|
||||
<result column="confirm_time" property="confirmTime" />
|
||||
<result column="pay_time" property="payTime" />
|
||||
<result column="transaction_id" property="transactionId" />
|
||||
<result column="prom_id" property="promId" />
|
||||
<result column="prom_type" property="promType" />
|
||||
<result column="order_prom_id" property="orderPromId" />
|
||||
<result column="order_prom_amount" property="orderPromAmount" />
|
||||
<result column="edit_money" property="editMoney" />
|
||||
<result column="discount" property="discount" />
|
||||
<result column="user_note" property="userNote" />
|
||||
<result column="admin_note" property="adminNote" />
|
||||
<result column="parent_sn" property="parentSn" />
|
||||
<result column="is_distribut" property="isDistribut" />
|
||||
<result column="paid_money" property="paidMoney" />
|
||||
<result column="deleted_time" property="deletedTime" />
|
||||
<result column="deleted" property="deleted" />
|
||||
<result column="is_checkout" property="isCheckout" />
|
||||
<result column="give_points" property="givePoints" />
|
||||
<result column="unique_number" property="uniqueNumber" />
|
||||
<result column="store_type" property="storeType" />
|
||||
<result column="unique_qrcode" property="uniqueQrcode" />
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,524 @@
|
||||
package com.ruoyi.app.common.persistence.model;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 商城会员信息
|
||||
* </p>
|
||||
*
|
||||
* @author hupeng
|
||||
* @since 2019-06-17
|
||||
*/
|
||||
@TableName("store_member")
|
||||
public class StoreMember extends Model<StoreMember> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
/**
|
||||
* 店铺ID
|
||||
*/
|
||||
@TableField("store_id")
|
||||
private Integer storeId;
|
||||
/**
|
||||
* vip编号
|
||||
*/
|
||||
@TableField("vip_no")
|
||||
private String vipNo;
|
||||
/**
|
||||
* 会员微信OPENID
|
||||
*/
|
||||
private String openid;
|
||||
/**
|
||||
* 商家版小程序openid
|
||||
*/
|
||||
@TableField("seller_openid")
|
||||
private String sellerOpenid;
|
||||
/**
|
||||
* 公众号openid
|
||||
*/
|
||||
@TableField("wx_openid")
|
||||
private String wxOpenid;
|
||||
/**
|
||||
* unionid唯一标识
|
||||
*/
|
||||
private String unionid;
|
||||
/**
|
||||
* 会员手机号
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 登录密码
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* 余额支付密码
|
||||
*/
|
||||
@TableField("pay_password")
|
||||
private String payPassword;
|
||||
/**
|
||||
* 会员昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 会员头像
|
||||
*/
|
||||
private String headimg;
|
||||
/**
|
||||
* 用户类型 1-普通用户 2-商家用户
|
||||
*/
|
||||
@TableField("user_type")
|
||||
private Integer userType;
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String sex;
|
||||
/**
|
||||
* 会员级别
|
||||
*/
|
||||
private Integer level;
|
||||
/**
|
||||
* 消费累计额度 用于用户等级
|
||||
*/
|
||||
@TableField("total_amount")
|
||||
private BigDecimal totalAmount;
|
||||
/**
|
||||
* 用户金额
|
||||
*/
|
||||
@TableField("user_money")
|
||||
private BigDecimal userMoney;
|
||||
/**
|
||||
* 累积分佣金额
|
||||
*/
|
||||
@TableField("distribut_money")
|
||||
private BigDecimal distributMoney;
|
||||
/**
|
||||
* 冻结金额
|
||||
*/
|
||||
@TableField("frozen_money")
|
||||
private Double frozenMoney;
|
||||
/**
|
||||
* 用户下线总数
|
||||
*/
|
||||
@TableField("underling_number")
|
||||
private Integer underlingNumber;
|
||||
/**
|
||||
* 消费积分(可用积分)
|
||||
*/
|
||||
@TableField("pay_points")
|
||||
private Integer payPoints;
|
||||
/**
|
||||
* 冻结积分
|
||||
*/
|
||||
@TableField("frozen_points")
|
||||
private Integer frozenPoints;
|
||||
/**
|
||||
* 默认收货地址
|
||||
*/
|
||||
@TableField("address_id")
|
||||
private Integer addressId;
|
||||
/**
|
||||
* 会员个性签名
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 会员状态0待审核 1-已审核 2-已拒绝
|
||||
*/
|
||||
private Integer status;
|
||||
@TableField("create_time")
|
||||
private Long createTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_at")
|
||||
private Date createAt;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
@TableField("status_time")
|
||||
private Long statusTime;
|
||||
@TableField("login_at")
|
||||
private Date loginAt;
|
||||
/**
|
||||
* 登录次数
|
||||
*/
|
||||
@TableField("login_num")
|
||||
private Integer loginNum;
|
||||
/**
|
||||
* 是否为分销商 0 否 1 是
|
||||
*/
|
||||
@TableField("is_distribut")
|
||||
private Integer isDistribut;
|
||||
/**
|
||||
* 第一个上级
|
||||
*/
|
||||
@TableField("first_leader")
|
||||
private Long firstLeader;
|
||||
/**
|
||||
* 第二个上级
|
||||
*/
|
||||
@TableField("second_leader")
|
||||
private Long secondLeader;
|
||||
/**
|
||||
* 第三个上级
|
||||
*/
|
||||
@TableField("third_leader")
|
||||
private Long thirdLeader;
|
||||
/**
|
||||
* 是否是超管 1-是 0不是
|
||||
*/
|
||||
@TableField("is_super")
|
||||
private Integer isSuper;
|
||||
/**
|
||||
* 分销推广二维码图片
|
||||
*/
|
||||
@TableField("spread_qrcode")
|
||||
private String spreadQrcode;
|
||||
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(Integer storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public String getVipNo() {
|
||||
return vipNo;
|
||||
}
|
||||
|
||||
public void setVipNo(String vipNo) {
|
||||
this.vipNo = vipNo;
|
||||
}
|
||||
|
||||
public String getOpenid() {
|
||||
return openid;
|
||||
}
|
||||
|
||||
public void setOpenid(String openid) {
|
||||
this.openid = openid;
|
||||
}
|
||||
|
||||
public String getSellerOpenid() {
|
||||
return sellerOpenid;
|
||||
}
|
||||
|
||||
public void setSellerOpenid(String sellerOpenid) {
|
||||
this.sellerOpenid = sellerOpenid;
|
||||
}
|
||||
|
||||
public String getWxOpenid() {
|
||||
return wxOpenid;
|
||||
}
|
||||
|
||||
public void setWxOpenid(String wxOpenid) {
|
||||
this.wxOpenid = wxOpenid;
|
||||
}
|
||||
|
||||
public String getUnionid() {
|
||||
return unionid;
|
||||
}
|
||||
|
||||
public void setUnionid(String unionid) {
|
||||
this.unionid = unionid;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getPayPassword() {
|
||||
return payPassword;
|
||||
}
|
||||
|
||||
public void setPayPassword(String payPassword) {
|
||||
this.payPassword = payPassword;
|
||||
}
|
||||
|
||||
public String getNickname() {
|
||||
return nickname;
|
||||
}
|
||||
|
||||
public void setNickname(String nickname) {
|
||||
this.nickname = nickname;
|
||||
}
|
||||
|
||||
public String getHeadimg() {
|
||||
return headimg;
|
||||
}
|
||||
|
||||
public void setHeadimg(String headimg) {
|
||||
this.headimg = headimg;
|
||||
}
|
||||
|
||||
public Integer getUserType() {
|
||||
return userType;
|
||||
}
|
||||
|
||||
public void setUserType(Integer userType) {
|
||||
this.userType = userType;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(Integer level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalAmount() {
|
||||
return totalAmount;
|
||||
}
|
||||
|
||||
public void setTotalAmount(BigDecimal totalAmount) {
|
||||
this.totalAmount = totalAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getUserMoney() {
|
||||
return userMoney;
|
||||
}
|
||||
|
||||
public void setUserMoney(BigDecimal userMoney) {
|
||||
this.userMoney = userMoney;
|
||||
}
|
||||
|
||||
public BigDecimal getDistributMoney() {
|
||||
return distributMoney;
|
||||
}
|
||||
|
||||
public void setDistributMoney(BigDecimal distributMoney) {
|
||||
this.distributMoney = distributMoney;
|
||||
}
|
||||
|
||||
public Double getFrozenMoney() {
|
||||
return frozenMoney;
|
||||
}
|
||||
|
||||
public void setFrozenMoney(Double frozenMoney) {
|
||||
this.frozenMoney = frozenMoney;
|
||||
}
|
||||
|
||||
public Integer getUnderlingNumber() {
|
||||
return underlingNumber;
|
||||
}
|
||||
|
||||
public void setUnderlingNumber(Integer underlingNumber) {
|
||||
this.underlingNumber = underlingNumber;
|
||||
}
|
||||
|
||||
public Integer getPayPoints() {
|
||||
return payPoints;
|
||||
}
|
||||
|
||||
public void setPayPoints(Integer payPoints) {
|
||||
this.payPoints = payPoints;
|
||||
}
|
||||
|
||||
public Integer getFrozenPoints() {
|
||||
return frozenPoints;
|
||||
}
|
||||
|
||||
public void setFrozenPoints(Integer frozenPoints) {
|
||||
this.frozenPoints = frozenPoints;
|
||||
}
|
||||
|
||||
public Integer getAddressId() {
|
||||
return addressId;
|
||||
}
|
||||
|
||||
public void setAddressId(Integer addressId) {
|
||||
this.addressId = addressId;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Long createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getCreateAt() {
|
||||
return createAt;
|
||||
}
|
||||
|
||||
public void setCreateAt(Date createAt) {
|
||||
this.createAt = createAt;
|
||||
}
|
||||
|
||||
public Long getStatusTime() {
|
||||
return statusTime;
|
||||
}
|
||||
|
||||
public void setStatusTime(Long statusTime) {
|
||||
this.statusTime = statusTime;
|
||||
}
|
||||
|
||||
public Date getLoginAt() {
|
||||
return loginAt;
|
||||
}
|
||||
|
||||
public void setLoginAt(Date loginAt) {
|
||||
this.loginAt = loginAt;
|
||||
}
|
||||
|
||||
public Integer getLoginNum() {
|
||||
return loginNum;
|
||||
}
|
||||
|
||||
public void setLoginNum(Integer loginNum) {
|
||||
this.loginNum = loginNum;
|
||||
}
|
||||
|
||||
public Integer getIsDistribut() {
|
||||
return isDistribut;
|
||||
}
|
||||
|
||||
public void setIsDistribut(Integer isDistribut) {
|
||||
this.isDistribut = isDistribut;
|
||||
}
|
||||
|
||||
public Long getFirstLeader() {
|
||||
return firstLeader;
|
||||
}
|
||||
|
||||
public void setFirstLeader(Long firstLeader) {
|
||||
this.firstLeader = firstLeader;
|
||||
}
|
||||
|
||||
public Long getSecondLeader() {
|
||||
return secondLeader;
|
||||
}
|
||||
|
||||
public void setSecondLeader(Long secondLeader) {
|
||||
this.secondLeader = secondLeader;
|
||||
}
|
||||
|
||||
public Long getThirdLeader() {
|
||||
return thirdLeader;
|
||||
}
|
||||
|
||||
public void setThirdLeader(Long thirdLeader) {
|
||||
this.thirdLeader = thirdLeader;
|
||||
}
|
||||
|
||||
public Integer getIsSuper() {
|
||||
return isSuper;
|
||||
}
|
||||
|
||||
public void setIsSuper(Integer isSuper) {
|
||||
this.isSuper = isSuper;
|
||||
}
|
||||
|
||||
public String getSpreadQrcode() {
|
||||
return spreadQrcode;
|
||||
}
|
||||
|
||||
public void setSpreadQrcode(String spreadQrcode) {
|
||||
this.spreadQrcode = spreadQrcode;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "StoreMember{" +
|
||||
"id=" + id +
|
||||
", storeId=" + storeId +
|
||||
", vipNo=" + vipNo +
|
||||
", openid=" + openid +
|
||||
", sellerOpenid=" + sellerOpenid +
|
||||
", wxOpenid=" + wxOpenid +
|
||||
", unionid=" + unionid +
|
||||
", phone=" + phone +
|
||||
", password=" + password +
|
||||
", payPassword=" + payPassword +
|
||||
", nickname=" + nickname +
|
||||
", headimg=" + headimg +
|
||||
", userType=" + userType +
|
||||
", sex=" + sex +
|
||||
", level=" + level +
|
||||
", totalAmount=" + totalAmount +
|
||||
", userMoney=" + userMoney +
|
||||
", distributMoney=" + distributMoney +
|
||||
", frozenMoney=" + frozenMoney +
|
||||
", underlingNumber=" + underlingNumber +
|
||||
", payPoints=" + payPoints +
|
||||
", frozenPoints=" + frozenPoints +
|
||||
", addressId=" + addressId +
|
||||
", remark=" + remark +
|
||||
", status=" + status +
|
||||
", createTime=" + createTime +
|
||||
", createAt=" + createAt +
|
||||
", statusTime=" + statusTime +
|
||||
", loginAt=" + loginAt +
|
||||
", loginNum=" + loginNum +
|
||||
", isDistribut=" + isDistribut +
|
||||
", firstLeader=" + firstLeader +
|
||||
", secondLeader=" + secondLeader +
|
||||
", thirdLeader=" + thirdLeader +
|
||||
", isSuper=" + isSuper +
|
||||
", spreadQrcode=" + spreadQrcode +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,856 @@
|
||||
package com.ruoyi.app.common.persistence.model;
|
||||
|
||||
import com.baomidou.mybatisplus.enums.IdType;
|
||||
import java.math.BigDecimal;
|
||||
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;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 订单主表
|
||||
* </p>
|
||||
*
|
||||
* @author hupeng
|
||||
* @since 2019-06-26
|
||||
*/
|
||||
@TableName("store_order")
|
||||
public class StoreOrder extends Model<StoreOrder> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
@TableId(value = "order_id", type = IdType.AUTO)
|
||||
private Integer orderId;
|
||||
/**
|
||||
* 店铺ID
|
||||
*/
|
||||
@TableField("store_id")
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@TableField("order_sn")
|
||||
private String orderSn;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private Integer userId;
|
||||
/**
|
||||
* 订单状态 0-未确认 1-已确认(已收货) 2-已评价
|
||||
*/
|
||||
@TableField("order_status")
|
||||
private Integer orderStatus;
|
||||
/**
|
||||
* 发货状态 0-未发货 1-已发货 2-退货中 3-退货完成
|
||||
*/
|
||||
@TableField("shipping_status")
|
||||
private Integer shippingStatus;
|
||||
/**
|
||||
* 支付状态 0-未支付 1-已支付
|
||||
*/
|
||||
@TableField("pay_status")
|
||||
private Integer payStatus;
|
||||
/**
|
||||
* 收货人
|
||||
*/
|
||||
private String consignee;
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
private Integer country;
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
private Integer province;
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
private Integer city;
|
||||
/**
|
||||
* 县区
|
||||
*/
|
||||
private Integer district;
|
||||
/**
|
||||
* 乡镇
|
||||
*/
|
||||
private Integer twon;
|
||||
/**
|
||||
* 地区地址
|
||||
*/
|
||||
@TableField("city_info")
|
||||
private String cityInfo;
|
||||
/**
|
||||
* 地址详细地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 邮政编码
|
||||
*/
|
||||
private String zipcode;
|
||||
/**
|
||||
* 手机
|
||||
*/
|
||||
private String mobile;
|
||||
/**
|
||||
* 邮件
|
||||
*/
|
||||
private String email;
|
||||
/**
|
||||
* 收货方式 1-物流/快递 2-自取
|
||||
*/
|
||||
@TableField("receive_type")
|
||||
private Integer receiveType;
|
||||
/**
|
||||
* 物流code 单号
|
||||
*/
|
||||
@TableField("shipping_code")
|
||||
private String shippingCode;
|
||||
/**
|
||||
* 物流名称
|
||||
*/
|
||||
@TableField("shipping_name")
|
||||
private String shippingName;
|
||||
/**
|
||||
* 支付code
|
||||
*/
|
||||
@TableField("pay_code")
|
||||
private String payCode;
|
||||
/**
|
||||
* 支付方式1-微信2-余额3-转账
|
||||
*/
|
||||
@TableField("pay_method")
|
||||
private Integer payMethod;
|
||||
/**
|
||||
* 支付方式为转账的转账id
|
||||
*/
|
||||
@TableField("recharge_id")
|
||||
private Integer rechargeId;
|
||||
/**
|
||||
* 支付方式名称
|
||||
*/
|
||||
@TableField("pay_name")
|
||||
private String payName;
|
||||
/**
|
||||
* 发票抬头
|
||||
*/
|
||||
@TableField("invoice_title")
|
||||
private String invoiceTitle;
|
||||
/**
|
||||
* 纳税人识别号
|
||||
*/
|
||||
private String taxpayer;
|
||||
/**
|
||||
* 商品总价
|
||||
*/
|
||||
@TableField("goods_price")
|
||||
private BigDecimal goodsPrice;
|
||||
/**
|
||||
* 邮费
|
||||
*/
|
||||
@TableField("shipping_price")
|
||||
private BigDecimal shippingPrice;
|
||||
/**
|
||||
* 使用余额
|
||||
*/
|
||||
@TableField("user_money")
|
||||
private BigDecimal userMoney;
|
||||
/**
|
||||
* 优惠券抵扣
|
||||
*/
|
||||
@TableField("coupon_price")
|
||||
private BigDecimal couponPrice;
|
||||
/**
|
||||
* 红包金额
|
||||
*/
|
||||
@TableField("red_price")
|
||||
private BigDecimal redPrice;
|
||||
@TableField("red_id")
|
||||
private Integer redId;
|
||||
/**
|
||||
* 使用积分
|
||||
*/
|
||||
private Integer integral;
|
||||
/**
|
||||
* 使用积分抵多少钱
|
||||
*/
|
||||
@TableField("integral_money")
|
||||
private BigDecimal integralMoney;
|
||||
/**
|
||||
* 应付款金额
|
||||
*/
|
||||
@TableField("order_amount")
|
||||
private BigDecimal orderAmount;
|
||||
/**
|
||||
* 订单总价
|
||||
*/
|
||||
@TableField("total_amount")
|
||||
private BigDecimal totalAmount;
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@TableField("add_time")
|
||||
private Integer addTime;
|
||||
/**
|
||||
* 最后新发货时间
|
||||
*/
|
||||
@TableField("shipping_time")
|
||||
private Integer shippingTime;
|
||||
/**
|
||||
* 收货确认时间
|
||||
*/
|
||||
@TableField("confirm_time")
|
||||
private Integer confirmTime;
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
@TableField("pay_time")
|
||||
private Integer payTime;
|
||||
/**
|
||||
* 第三方平台交易流水号
|
||||
*/
|
||||
@TableField("transaction_id")
|
||||
private String transactionId;
|
||||
/**
|
||||
* 活动ID
|
||||
*/
|
||||
@TableField("prom_id")
|
||||
private Integer promId;
|
||||
/**
|
||||
* 订单类型:0普通订单4预售订单5虚拟订单6拼团订单
|
||||
*/
|
||||
@TableField("prom_type")
|
||||
private Integer promType;
|
||||
/**
|
||||
* 活动id
|
||||
*/
|
||||
@TableField("order_prom_id")
|
||||
private Integer orderPromId;
|
||||
/**
|
||||
* 活动优惠金额
|
||||
*/
|
||||
@TableField("order_prom_amount")
|
||||
private BigDecimal orderPromAmount;
|
||||
@TableField("edit_money")
|
||||
private String editMoney;
|
||||
/**
|
||||
* 价格调整(会员折扣金额)
|
||||
*/
|
||||
private BigDecimal discount;
|
||||
/**
|
||||
* 用户备注
|
||||
*/
|
||||
@TableField("user_note")
|
||||
private String userNote;
|
||||
/**
|
||||
* 管理员备注
|
||||
*/
|
||||
@TableField("admin_note")
|
||||
private String adminNote;
|
||||
/**
|
||||
* 父单单号
|
||||
*/
|
||||
@TableField("parent_sn")
|
||||
private String parentSn;
|
||||
/**
|
||||
* 0-普通订单 1-未分成 2-已分成
|
||||
*/
|
||||
@TableField("is_distribut")
|
||||
private Integer isDistribut;
|
||||
/**
|
||||
* 订金
|
||||
*/
|
||||
@TableField("paid_money")
|
||||
private BigDecimal paidMoney;
|
||||
/**
|
||||
* 删除|取消时间
|
||||
*/
|
||||
@TableField("deleted_time")
|
||||
private Integer deletedTime;
|
||||
/**
|
||||
* 用户假删除标识,1:删除,0未删除
|
||||
*/
|
||||
private Integer deleted;
|
||||
/**
|
||||
* 0未结算1已结算
|
||||
*/
|
||||
@TableField("is_checkout")
|
||||
private Integer isCheckout;
|
||||
/**
|
||||
* 平台奖励的积分
|
||||
*/
|
||||
@TableField("give_points")
|
||||
private Integer givePoints;
|
||||
/**
|
||||
* 唯一兑换码
|
||||
*/
|
||||
@TableField("unique_number")
|
||||
private Long uniqueNumber;
|
||||
/**
|
||||
* 店铺类型1订门票2农家乐3找民宿4补给箱5-旗舰店
|
||||
*/
|
||||
@TableField("store_type")
|
||||
private Integer storeType;
|
||||
/**
|
||||
* 唯一二维码
|
||||
*/
|
||||
@TableField("unique_qrcode")
|
||||
private String uniqueQrcode;
|
||||
|
||||
|
||||
public Integer getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(Integer orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Integer getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(Integer storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public String getOrderSn() {
|
||||
return orderSn;
|
||||
}
|
||||
|
||||
public void setOrderSn(String orderSn) {
|
||||
this.orderSn = orderSn;
|
||||
}
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Integer getOrderStatus() {
|
||||
return orderStatus;
|
||||
}
|
||||
|
||||
public void setOrderStatus(Integer orderStatus) {
|
||||
this.orderStatus = orderStatus;
|
||||
}
|
||||
|
||||
public Integer getShippingStatus() {
|
||||
return shippingStatus;
|
||||
}
|
||||
|
||||
public void setShippingStatus(Integer shippingStatus) {
|
||||
this.shippingStatus = shippingStatus;
|
||||
}
|
||||
|
||||
public Integer getPayStatus() {
|
||||
return payStatus;
|
||||
}
|
||||
|
||||
public void setPayStatus(Integer payStatus) {
|
||||
this.payStatus = payStatus;
|
||||
}
|
||||
|
||||
public String getConsignee() {
|
||||
return consignee;
|
||||
}
|
||||
|
||||
public void setConsignee(String consignee) {
|
||||
this.consignee = consignee;
|
||||
}
|
||||
|
||||
public Integer getCountry() {
|
||||
return country;
|
||||
}
|
||||
|
||||
public void setCountry(Integer country) {
|
||||
this.country = country;
|
||||
}
|
||||
|
||||
public Integer getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(Integer province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public Integer getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(Integer city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public Integer getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict(Integer district) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
public Integer getTwon() {
|
||||
return twon;
|
||||
}
|
||||
|
||||
public void setTwon(Integer twon) {
|
||||
this.twon = twon;
|
||||
}
|
||||
|
||||
public String getCityInfo() {
|
||||
return cityInfo;
|
||||
}
|
||||
|
||||
public void setCityInfo(String cityInfo) {
|
||||
this.cityInfo = cityInfo;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getZipcode() {
|
||||
return zipcode;
|
||||
}
|
||||
|
||||
public void setZipcode(String zipcode) {
|
||||
this.zipcode = zipcode;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Integer getReceiveType() {
|
||||
return receiveType;
|
||||
}
|
||||
|
||||
public void setReceiveType(Integer receiveType) {
|
||||
this.receiveType = receiveType;
|
||||
}
|
||||
|
||||
public String getShippingCode() {
|
||||
return shippingCode;
|
||||
}
|
||||
|
||||
public void setShippingCode(String shippingCode) {
|
||||
this.shippingCode = shippingCode;
|
||||
}
|
||||
|
||||
public String getShippingName() {
|
||||
return shippingName;
|
||||
}
|
||||
|
||||
public void setShippingName(String shippingName) {
|
||||
this.shippingName = shippingName;
|
||||
}
|
||||
|
||||
public String getPayCode() {
|
||||
return payCode;
|
||||
}
|
||||
|
||||
public void setPayCode(String payCode) {
|
||||
this.payCode = payCode;
|
||||
}
|
||||
|
||||
public Integer getPayMethod() {
|
||||
return payMethod;
|
||||
}
|
||||
|
||||
public void setPayMethod(Integer payMethod) {
|
||||
this.payMethod = payMethod;
|
||||
}
|
||||
|
||||
public Integer getRechargeId() {
|
||||
return rechargeId;
|
||||
}
|
||||
|
||||
public void setRechargeId(Integer rechargeId) {
|
||||
this.rechargeId = rechargeId;
|
||||
}
|
||||
|
||||
public String getPayName() {
|
||||
return payName;
|
||||
}
|
||||
|
||||
public void setPayName(String payName) {
|
||||
this.payName = payName;
|
||||
}
|
||||
|
||||
public String getInvoiceTitle() {
|
||||
return invoiceTitle;
|
||||
}
|
||||
|
||||
public void setInvoiceTitle(String invoiceTitle) {
|
||||
this.invoiceTitle = invoiceTitle;
|
||||
}
|
||||
|
||||
public String getTaxpayer() {
|
||||
return taxpayer;
|
||||
}
|
||||
|
||||
public void setTaxpayer(String taxpayer) {
|
||||
this.taxpayer = taxpayer;
|
||||
}
|
||||
|
||||
public BigDecimal getGoodsPrice() {
|
||||
return goodsPrice;
|
||||
}
|
||||
|
||||
public void setGoodsPrice(BigDecimal goodsPrice) {
|
||||
this.goodsPrice = goodsPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getShippingPrice() {
|
||||
return shippingPrice;
|
||||
}
|
||||
|
||||
public void setShippingPrice(BigDecimal shippingPrice) {
|
||||
this.shippingPrice = shippingPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getUserMoney() {
|
||||
return userMoney;
|
||||
}
|
||||
|
||||
public void setUserMoney(BigDecimal userMoney) {
|
||||
this.userMoney = userMoney;
|
||||
}
|
||||
|
||||
public BigDecimal getCouponPrice() {
|
||||
return couponPrice;
|
||||
}
|
||||
|
||||
public void setCouponPrice(BigDecimal couponPrice) {
|
||||
this.couponPrice = couponPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getRedPrice() {
|
||||
return redPrice;
|
||||
}
|
||||
|
||||
public void setRedPrice(BigDecimal redPrice) {
|
||||
this.redPrice = redPrice;
|
||||
}
|
||||
|
||||
public Integer getRedId() {
|
||||
return redId;
|
||||
}
|
||||
|
||||
public void setRedId(Integer redId) {
|
||||
this.redId = redId;
|
||||
}
|
||||
|
||||
public Integer getIntegral() {
|
||||
return integral;
|
||||
}
|
||||
|
||||
public void setIntegral(Integer integral) {
|
||||
this.integral = integral;
|
||||
}
|
||||
|
||||
public BigDecimal getIntegralMoney() {
|
||||
return integralMoney;
|
||||
}
|
||||
|
||||
public void setIntegralMoney(BigDecimal integralMoney) {
|
||||
this.integralMoney = integralMoney;
|
||||
}
|
||||
|
||||
public BigDecimal getOrderAmount() {
|
||||
return orderAmount;
|
||||
}
|
||||
|
||||
public void setOrderAmount(BigDecimal orderAmount) {
|
||||
this.orderAmount = orderAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalAmount() {
|
||||
return totalAmount;
|
||||
}
|
||||
|
||||
public void setTotalAmount(BigDecimal totalAmount) {
|
||||
this.totalAmount = totalAmount;
|
||||
}
|
||||
|
||||
public Integer getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public void setAddTime(Integer addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
public Integer getShippingTime() {
|
||||
return shippingTime;
|
||||
}
|
||||
|
||||
public void setShippingTime(Integer shippingTime) {
|
||||
this.shippingTime = shippingTime;
|
||||
}
|
||||
|
||||
public Integer getConfirmTime() {
|
||||
return confirmTime;
|
||||
}
|
||||
|
||||
public void setConfirmTime(Integer confirmTime) {
|
||||
this.confirmTime = confirmTime;
|
||||
}
|
||||
|
||||
public Integer getPayTime() {
|
||||
return payTime;
|
||||
}
|
||||
|
||||
public void setPayTime(Integer payTime) {
|
||||
this.payTime = payTime;
|
||||
}
|
||||
|
||||
public String getTransactionId() {
|
||||
return transactionId;
|
||||
}
|
||||
|
||||
public void setTransactionId(String transactionId) {
|
||||
this.transactionId = transactionId;
|
||||
}
|
||||
|
||||
public Integer getPromId() {
|
||||
return promId;
|
||||
}
|
||||
|
||||
public void setPromId(Integer promId) {
|
||||
this.promId = promId;
|
||||
}
|
||||
|
||||
public Integer getPromType() {
|
||||
return promType;
|
||||
}
|
||||
|
||||
public void setPromType(Integer promType) {
|
||||
this.promType = promType;
|
||||
}
|
||||
|
||||
public Integer getOrderPromId() {
|
||||
return orderPromId;
|
||||
}
|
||||
|
||||
public void setOrderPromId(Integer orderPromId) {
|
||||
this.orderPromId = orderPromId;
|
||||
}
|
||||
|
||||
public BigDecimal getOrderPromAmount() {
|
||||
return orderPromAmount;
|
||||
}
|
||||
|
||||
public void setOrderPromAmount(BigDecimal orderPromAmount) {
|
||||
this.orderPromAmount = orderPromAmount;
|
||||
}
|
||||
|
||||
public String getEditMoney() {
|
||||
return editMoney;
|
||||
}
|
||||
|
||||
public void setEditMoney(String editMoney) {
|
||||
this.editMoney = editMoney;
|
||||
}
|
||||
|
||||
public BigDecimal getDiscount() {
|
||||
return discount;
|
||||
}
|
||||
|
||||
public void setDiscount(BigDecimal discount) {
|
||||
this.discount = discount;
|
||||
}
|
||||
|
||||
public String getUserNote() {
|
||||
return userNote;
|
||||
}
|
||||
|
||||
public void setUserNote(String userNote) {
|
||||
this.userNote = userNote;
|
||||
}
|
||||
|
||||
public String getAdminNote() {
|
||||
return adminNote;
|
||||
}
|
||||
|
||||
public void setAdminNote(String adminNote) {
|
||||
this.adminNote = adminNote;
|
||||
}
|
||||
|
||||
public String getParentSn() {
|
||||
return parentSn;
|
||||
}
|
||||
|
||||
public void setParentSn(String parentSn) {
|
||||
this.parentSn = parentSn;
|
||||
}
|
||||
|
||||
public Integer getIsDistribut() {
|
||||
return isDistribut;
|
||||
}
|
||||
|
||||
public void setIsDistribut(Integer isDistribut) {
|
||||
this.isDistribut = isDistribut;
|
||||
}
|
||||
|
||||
public BigDecimal getPaidMoney() {
|
||||
return paidMoney;
|
||||
}
|
||||
|
||||
public void setPaidMoney(BigDecimal paidMoney) {
|
||||
this.paidMoney = paidMoney;
|
||||
}
|
||||
|
||||
public Integer getDeletedTime() {
|
||||
return deletedTime;
|
||||
}
|
||||
|
||||
public void setDeletedTime(Integer deletedTime) {
|
||||
this.deletedTime = deletedTime;
|
||||
}
|
||||
|
||||
public Integer getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
public void setDeleted(Integer deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
public Integer getIsCheckout() {
|
||||
return isCheckout;
|
||||
}
|
||||
|
||||
public void setIsCheckout(Integer isCheckout) {
|
||||
this.isCheckout = isCheckout;
|
||||
}
|
||||
|
||||
public Integer getGivePoints() {
|
||||
return givePoints;
|
||||
}
|
||||
|
||||
public void setGivePoints(Integer givePoints) {
|
||||
this.givePoints = givePoints;
|
||||
}
|
||||
|
||||
public Long getUniqueNumber() {
|
||||
return uniqueNumber;
|
||||
}
|
||||
|
||||
public void setUniqueNumber(Long uniqueNumber) {
|
||||
this.uniqueNumber = uniqueNumber;
|
||||
}
|
||||
|
||||
public Integer getStoreType() {
|
||||
return storeType;
|
||||
}
|
||||
|
||||
public void setStoreType(Integer storeType) {
|
||||
this.storeType = storeType;
|
||||
}
|
||||
|
||||
public String getUniqueQrcode() {
|
||||
return uniqueQrcode;
|
||||
}
|
||||
|
||||
public void setUniqueQrcode(String uniqueQrcode) {
|
||||
this.uniqueQrcode = uniqueQrcode;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.orderId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "StoreOrder{" +
|
||||
", orderId=" + orderId +
|
||||
", storeId=" + storeId +
|
||||
", orderSn=" + orderSn +
|
||||
", userId=" + userId +
|
||||
", orderStatus=" + orderStatus +
|
||||
", shippingStatus=" + shippingStatus +
|
||||
", payStatus=" + payStatus +
|
||||
", consignee=" + consignee +
|
||||
", country=" + country +
|
||||
", province=" + province +
|
||||
", city=" + city +
|
||||
", district=" + district +
|
||||
", twon=" + twon +
|
||||
", cityInfo=" + cityInfo +
|
||||
", address=" + address +
|
||||
", zipcode=" + zipcode +
|
||||
", mobile=" + mobile +
|
||||
", email=" + email +
|
||||
", receiveType=" + receiveType +
|
||||
", shippingCode=" + shippingCode +
|
||||
", shippingName=" + shippingName +
|
||||
", payCode=" + payCode +
|
||||
", payMethod=" + payMethod +
|
||||
", rechargeId=" + rechargeId +
|
||||
", payName=" + payName +
|
||||
", invoiceTitle=" + invoiceTitle +
|
||||
", taxpayer=" + taxpayer +
|
||||
", goodsPrice=" + goodsPrice +
|
||||
", shippingPrice=" + shippingPrice +
|
||||
", userMoney=" + userMoney +
|
||||
", couponPrice=" + couponPrice +
|
||||
", redPrice=" + redPrice +
|
||||
", redId=" + redId +
|
||||
", integral=" + integral +
|
||||
", integralMoney=" + integralMoney +
|
||||
", orderAmount=" + orderAmount +
|
||||
", totalAmount=" + totalAmount +
|
||||
", addTime=" + addTime +
|
||||
", shippingTime=" + shippingTime +
|
||||
", confirmTime=" + confirmTime +
|
||||
", payTime=" + payTime +
|
||||
", transactionId=" + transactionId +
|
||||
", promId=" + promId +
|
||||
", promType=" + promType +
|
||||
", orderPromId=" + orderPromId +
|
||||
", orderPromAmount=" + orderPromAmount +
|
||||
", editMoney=" + editMoney +
|
||||
", discount=" + discount +
|
||||
", userNote=" + userNote +
|
||||
", adminNote=" + adminNote +
|
||||
", parentSn=" + parentSn +
|
||||
", isDistribut=" + isDistribut +
|
||||
", paidMoney=" + paidMoney +
|
||||
", deletedTime=" + deletedTime +
|
||||
", deleted=" + deleted +
|
||||
", isCheckout=" + isCheckout +
|
||||
", givePoints=" + givePoints +
|
||||
", uniqueNumber=" + uniqueNumber +
|
||||
", storeType=" + storeType +
|
||||
", uniqueQrcode=" + uniqueQrcode +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
package com.ruoyi.app.common.persistence.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 订单商品表与订单主表关联
|
||||
* </p>
|
||||
*
|
||||
* @author hupeng
|
||||
* @since 2019-06-26
|
||||
*/
|
||||
public class StoreOrderGoods extends Model<StoreOrderGoods> {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 表id自增
|
||||
*/
|
||||
@TableId(value = "rec_id", type = IdType.AUTO)
|
||||
private Integer recId;
|
||||
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
private Integer orderId;
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private Integer goodsId;
|
||||
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String goodsName;
|
||||
|
||||
/**
|
||||
* 商品货号
|
||||
*/
|
||||
private String goodsSn;
|
||||
|
||||
/**
|
||||
* 购买数量
|
||||
*/
|
||||
private Integer goodsNum;
|
||||
|
||||
/**
|
||||
* 市场价
|
||||
*/
|
||||
private BigDecimal marketPrice;
|
||||
|
||||
/**
|
||||
* 本店价(供货价)
|
||||
*/
|
||||
private BigDecimal goodsPrice;
|
||||
|
||||
/**
|
||||
* 商品成本价
|
||||
*/
|
||||
private BigDecimal costPrice;
|
||||
|
||||
/**
|
||||
* 会员折扣价
|
||||
*/
|
||||
private BigDecimal memberGoodsPrice;
|
||||
|
||||
/**
|
||||
* 购买商品赠送积分
|
||||
*/
|
||||
private Integer giveIntegral;
|
||||
|
||||
/**
|
||||
* 商品规格key
|
||||
*/
|
||||
private String specKey;
|
||||
|
||||
/**
|
||||
* 规格对应的中文名字
|
||||
*/
|
||||
private String specKeyName;
|
||||
|
||||
/**
|
||||
* 条码
|
||||
*/
|
||||
private String barCode;
|
||||
|
||||
/**
|
||||
* 是否评价
|
||||
*/
|
||||
private Boolean isComment;
|
||||
|
||||
/**
|
||||
* 0 普通订单,1 限时抢购, 2 团购 , 3 促销优惠,4预售
|
||||
*/
|
||||
private Boolean promType;
|
||||
|
||||
/**
|
||||
* 活动id
|
||||
*/
|
||||
private Integer promId;
|
||||
|
||||
/**
|
||||
* 0未支付1已支付
|
||||
*/
|
||||
private Boolean payStatus;
|
||||
|
||||
/**
|
||||
* 0未发货,1已发货,2已换货,3已退货
|
||||
*/
|
||||
private Boolean isSend;
|
||||
|
||||
/**
|
||||
* 发货单ID
|
||||
*/
|
||||
private Integer deliveryId;
|
||||
|
||||
/**
|
||||
* sku
|
||||
*/
|
||||
private String sku;
|
||||
|
||||
/**
|
||||
* 订单开始时间
|
||||
*/
|
||||
private Integer startTime;
|
||||
|
||||
/**
|
||||
* 订单结束时间
|
||||
*/
|
||||
private Integer endTime;
|
||||
|
||||
|
||||
public Integer getRecId() {
|
||||
return recId;
|
||||
}
|
||||
|
||||
public void setRecId(Integer recId) {
|
||||
this.recId = recId;
|
||||
}
|
||||
|
||||
public Integer getOrderId() {
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setOrderId(Integer orderId) {
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Integer getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Integer goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public String getGoodsSn() {
|
||||
return goodsSn;
|
||||
}
|
||||
|
||||
public void setGoodsSn(String goodsSn) {
|
||||
this.goodsSn = goodsSn;
|
||||
}
|
||||
|
||||
public Integer getGoodsNum() {
|
||||
return goodsNum;
|
||||
}
|
||||
|
||||
public void setGoodsNum(Integer goodsNum) {
|
||||
this.goodsNum = goodsNum;
|
||||
}
|
||||
|
||||
public BigDecimal getMarketPrice() {
|
||||
return marketPrice;
|
||||
}
|
||||
|
||||
public void setMarketPrice(BigDecimal marketPrice) {
|
||||
this.marketPrice = marketPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getGoodsPrice() {
|
||||
return goodsPrice;
|
||||
}
|
||||
|
||||
public void setGoodsPrice(BigDecimal goodsPrice) {
|
||||
this.goodsPrice = goodsPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getCostPrice() {
|
||||
return costPrice;
|
||||
}
|
||||
|
||||
public void setCostPrice(BigDecimal costPrice) {
|
||||
this.costPrice = costPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getMemberGoodsPrice() {
|
||||
return memberGoodsPrice;
|
||||
}
|
||||
|
||||
public void setMemberGoodsPrice(BigDecimal memberGoodsPrice) {
|
||||
this.memberGoodsPrice = memberGoodsPrice;
|
||||
}
|
||||
|
||||
public Integer getGiveIntegral() {
|
||||
return giveIntegral;
|
||||
}
|
||||
|
||||
public void setGiveIntegral(Integer giveIntegral) {
|
||||
this.giveIntegral = giveIntegral;
|
||||
}
|
||||
|
||||
public String getSpecKey() {
|
||||
return specKey;
|
||||
}
|
||||
|
||||
public void setSpecKey(String specKey) {
|
||||
this.specKey = specKey;
|
||||
}
|
||||
|
||||
public String getSpecKeyName() {
|
||||
return specKeyName;
|
||||
}
|
||||
|
||||
public void setSpecKeyName(String specKeyName) {
|
||||
this.specKeyName = specKeyName;
|
||||
}
|
||||
|
||||
public String getBarCode() {
|
||||
return barCode;
|
||||
}
|
||||
|
||||
public void setBarCode(String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public Boolean getComment() {
|
||||
return isComment;
|
||||
}
|
||||
|
||||
public void setComment(Boolean isComment) {
|
||||
this.isComment = isComment;
|
||||
}
|
||||
|
||||
public Boolean getPromType() {
|
||||
return promType;
|
||||
}
|
||||
|
||||
public void setPromType(Boolean promType) {
|
||||
this.promType = promType;
|
||||
}
|
||||
|
||||
public Integer getPromId() {
|
||||
return promId;
|
||||
}
|
||||
|
||||
public void setPromId(Integer promId) {
|
||||
this.promId = promId;
|
||||
}
|
||||
|
||||
public Boolean getPayStatus() {
|
||||
return payStatus;
|
||||
}
|
||||
|
||||
public void setPayStatus(Boolean payStatus) {
|
||||
this.payStatus = payStatus;
|
||||
}
|
||||
|
||||
public Boolean getSend() {
|
||||
return isSend;
|
||||
}
|
||||
|
||||
public void setSend(Boolean isSend) {
|
||||
this.isSend = isSend;
|
||||
}
|
||||
|
||||
public Integer getDeliveryId() {
|
||||
return deliveryId;
|
||||
}
|
||||
|
||||
public void setDeliveryId(Integer deliveryId) {
|
||||
this.deliveryId = deliveryId;
|
||||
}
|
||||
|
||||
public String getSku() {
|
||||
return sku;
|
||||
}
|
||||
|
||||
public void setSku(String sku) {
|
||||
this.sku = sku;
|
||||
}
|
||||
|
||||
public Integer getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Integer startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Integer getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Integer endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.recId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "StoreOrderGoods{" +
|
||||
"recId=" + recId +
|
||||
", orderId=" + orderId +
|
||||
", goodsId=" + goodsId +
|
||||
", goodsName=" + goodsName +
|
||||
", goodsSn=" + goodsSn +
|
||||
", goodsNum=" + goodsNum +
|
||||
", marketPrice=" + marketPrice +
|
||||
", goodsPrice=" + goodsPrice +
|
||||
", costPrice=" + costPrice +
|
||||
", memberGoodsPrice=" + memberGoodsPrice +
|
||||
", giveIntegral=" + giveIntegral +
|
||||
", specKey=" + specKey +
|
||||
", specKeyName=" + specKeyName +
|
||||
", barCode=" + barCode +
|
||||
", isComment=" + isComment +
|
||||
", promType=" + promType +
|
||||
", promId=" + promId +
|
||||
", payStatus=" + payStatus +
|
||||
", isSend=" + isSend +
|
||||
", deliveryId=" + deliveryId +
|
||||
", sku=" + sku +
|
||||
", startTime=" + startTime +
|
||||
", endTime=" + endTime +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.ruoyi.app.common.utils;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
|
||||
|
||||
/**
|
||||
* @ClassName 异常工具
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/6/27
|
||||
**/
|
||||
public class ThrowableUtil {
|
||||
|
||||
/**
|
||||
* 获取堆栈信息
|
||||
* @param throwable
|
||||
* @return
|
||||
*/
|
||||
public static String getStackTrace(Throwable throwable){
|
||||
StringWriter sw = new StringWriter();
|
||||
PrintWriter pw = new PrintWriter(sw);
|
||||
try {
|
||||
throwable.printStackTrace(pw);
|
||||
return sw.toString();
|
||||
} finally {
|
||||
pw.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.app.modular.auth.controller;
|
||||
|
||||
import com.itmuch.lightsecurity.annotation.PreAuthorize;
|
||||
import com.itmuch.lightsecurity.jwt.JwtOperator;
|
||||
import com.itmuch.lightsecurity.jwt.User;
|
||||
import com.itmuch.lightsecurity.jwt.UserOperator;
|
||||
import com.ruoyi.app.common.R;
|
||||
import com.ruoyi.app.common.persistence.model.StoreMember;
|
||||
import com.ruoyi.app.modular.member.service.IMemberService;
|
||||
import com.ruoyi.app.modular.member.service.vo.LoginVO;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* @ClassName 登陆授权
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/6/27
|
||||
**/
|
||||
@RequestMapping(value = "/auth")
|
||||
@RestController
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
//@Api(value = "认证授权模块", tags = "认证授权模块", description = "认证授权模块")
|
||||
public class AuthController {
|
||||
private final UserOperator userOperator;
|
||||
private final JwtOperator operator;
|
||||
private final IMemberService memberService;
|
||||
|
||||
/**
|
||||
* 获取当前登录用户信息
|
||||
*
|
||||
* @return 用户信息
|
||||
*/
|
||||
@GetMapping("/user")
|
||||
//@ApiOperation(value = "获取用户信息",notes = "获取用户信息")
|
||||
public User user() {
|
||||
return userOperator.getUser();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 模拟登录,颁发token
|
||||
*
|
||||
* @return token字符串
|
||||
*/
|
||||
@PostMapping("/login")
|
||||
// @ApiOperation(value = "获取token",notes = "获取token")
|
||||
public R loginReturnToken(@Validated @RequestBody LoginVO loginVO) {
|
||||
String openid = "oqwKL5Zm8oINt29qiXdbtgYA9EDo";
|
||||
StoreMember member = memberService.login(openid);
|
||||
if(member == null){
|
||||
R.error(401,"用户登陆失败");
|
||||
}
|
||||
User user = User.builder()
|
||||
.id(member.getId().intValue())
|
||||
.username(member.getNickname())
|
||||
.roles(Arrays.asList("user", "admin"))
|
||||
.build();
|
||||
String token = operator.generateToken(user);
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
map.put("token",token);
|
||||
return R.success(map);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.ruoyi.app.modular.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/6/27
|
||||
**/
|
||||
public interface EntityMapper<D, E> {
|
||||
|
||||
/**
|
||||
* DTO转Entity
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
E toEntity(D dto);
|
||||
|
||||
/**
|
||||
* Entity转DTO
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
D toDto(E entity);
|
||||
|
||||
/**
|
||||
* DTO集合转Entity集合
|
||||
* @param dtoList
|
||||
* @return
|
||||
*/
|
||||
List <E> toEntity(List<D> dtoList);
|
||||
|
||||
/**
|
||||
* Entity集合转DTO集合
|
||||
* @param entityList
|
||||
* @return
|
||||
*/
|
||||
List <D> toDto(List<E> entityList);
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.ruoyi.app.modular.member.controller;
|
||||
|
||||
|
||||
import com.itmuch.lightsecurity.annotation.PreAuthorize;
|
||||
import com.itmuch.lightsecurity.jwt.User;
|
||||
import com.itmuch.lightsecurity.jwt.UserOperator;
|
||||
import com.ruoyi.app.common.R;
|
||||
import com.ruoyi.app.common.persistence.model.StoreMember;
|
||||
import com.ruoyi.app.modular.member.service.IMemberService;
|
||||
import com.ruoyi.app.modular.member.service.dto.MemberDTO;
|
||||
import com.ruoyi.app.modular.member.service.mapper.MemberMapper;
|
||||
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
//import wiki.xsx.core.handler.StringHandler;
|
||||
//import wiki.xsx.core.util.RedisUtil;
|
||||
|
||||
/**
|
||||
* @ClassName 个人中心
|
||||
* @Author hupeng <610796224@qq.com>
|
||||
* @Date 2019/6/27
|
||||
**/
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "/user")
|
||||
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
|
||||
//@Api(value = "个人中心", tags = "个人中心模块", description = "个人中心")
|
||||
public class UserController {
|
||||
private final UserOperator userOperator;
|
||||
private final IMemberService memberService;
|
||||
private final MemberMapper memberMapper;
|
||||
|
||||
@GetMapping(value = "/info")
|
||||
@PreAuthorize("hasAllRoles('user')")
|
||||
//@ApiOperation(value = "获取个人信息",notes = "获取个人信息")
|
||||
public R userInfo(){
|
||||
//redis测试
|
||||
//StringHandler stringHandler = RedisUtil.getStringHandler();
|
||||
//stringHandler.set("name","hupeng");
|
||||
User user = userOperator.getUser();
|
||||
StoreMember member = memberService.getById(user.getId());
|
||||
MemberDTO memberDTO = memberMapper.toDto(member);
|
||||
return R.success(memberDTO);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/super")
|
||||
@PreAuthorize("hasAllRoles('user','admin')")
|
||||
//@ApiOperation(value = "超管测试信息",notes = "超管测试信息")
|
||||
public R superInfo(){
|
||||
return R.success("超级管理员才可以访问的权限");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.app.modular.member.service;
|
||||
|
||||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.app.common.persistence.model.StoreMember;
|
||||
import com.ruoyi.app.modular.member.service.dto.MemberDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IMemberService extends IService<StoreMember> {
|
||||
StoreMember login(String openid);
|
||||
|
||||
List<MemberDTO> memeberList();
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.ruoyi.app.modular.member.service.dto;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
public class MemberDTO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private Integer storeId;
|
||||
/**
|
||||
* vip编号
|
||||
*/
|
||||
private String vipNo;
|
||||
/**
|
||||
* 会员微信OPENID
|
||||
*/
|
||||
//private String openid;
|
||||
/**
|
||||
* 商家版小程序openid
|
||||
*/
|
||||
//private String sellerOpenid;
|
||||
/**
|
||||
* 公众号openid
|
||||
*/
|
||||
//private String wxOpenid;
|
||||
/**
|
||||
* unionid唯一标识
|
||||
*/
|
||||
private String unionid;
|
||||
/**
|
||||
* 会员手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
//private String password;
|
||||
|
||||
// private String payPassword;
|
||||
/**
|
||||
* 会员昵称
|
||||
*/
|
||||
private String nickname;
|
||||
/**
|
||||
* 会员头像
|
||||
*/
|
||||
private String headimg;
|
||||
/**
|
||||
* 用户类型 1-普通用户 2-商家用户
|
||||
*/
|
||||
private Integer userType;
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String sex;
|
||||
/**
|
||||
* 会员级别
|
||||
*/
|
||||
private Integer level;
|
||||
/**
|
||||
* 消费累计额度 用于用户等级
|
||||
*/
|
||||
private BigDecimal totalAmount;
|
||||
/**
|
||||
* 用户金额
|
||||
*/
|
||||
private BigDecimal userMoney;
|
||||
/**
|
||||
* 累积分佣金额
|
||||
*/
|
||||
private BigDecimal distributMoney;
|
||||
/**
|
||||
* 冻结金额
|
||||
*/
|
||||
private Double frozenMoney;
|
||||
/**
|
||||
* 用户下线总数
|
||||
*/
|
||||
private Integer underlingNumber;
|
||||
/**
|
||||
* 消费积分(可用积分)
|
||||
*/
|
||||
private Integer payPoints;
|
||||
/**
|
||||
* 冻结积分
|
||||
*/
|
||||
private Integer frozenPoints;
|
||||
/**
|
||||
* 默认收货地址
|
||||
*/
|
||||
private Integer addressId;
|
||||
/**
|
||||
* 会员个性签名
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 会员状态0待审核 1-已审核 2-已拒绝
|
||||
*/
|
||||
private Integer status;
|
||||
private Long createTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createAt;
|
||||
/**
|
||||
* 审核时间
|
||||
*/
|
||||
private Long statusTime;
|
||||
private Date loginAt;
|
||||
/**
|
||||
* 登录次数
|
||||
*/
|
||||
private Integer loginNum;
|
||||
/**
|
||||
* 是否为分销商 0 否 1 是
|
||||
*/
|
||||
private Integer isDistribut;
|
||||
/**
|
||||
* 第一个上级
|
||||
*/
|
||||
private Long firstLeader;
|
||||
/**
|
||||
* 第二个上级
|
||||
*/
|
||||
private Long secondLeader;
|
||||
/**
|
||||
* 第三个上级
|
||||
*/
|
||||
private Long thirdLeader;
|
||||
/**
|
||||
* 是否是超管 1-是 0不是
|
||||
*/
|
||||
private Integer isSuper;
|
||||
/**
|
||||
* 分销推广二维码图片
|
||||
*/
|
||||
private String spreadQrcode;
|
||||
|
||||
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.ruoyi.app.modular.member.service.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.app.common.persistence.dao.StoreMemberDao;
|
||||
import com.ruoyi.app.common.persistence.model.StoreMember;
|
||||
import com.ruoyi.app.modular.member.service.IMemberService;
|
||||
import com.ruoyi.app.modular.member.service.dto.MemberDTO;
|
||||
import com.ruoyi.app.modular.member.service.mapper.MemberMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class MemberServiceImpl extends ServiceImpl<StoreMemberDao,StoreMember> implements IMemberService {
|
||||
|
||||
@Autowired
|
||||
private StoreMemberDao storeMemberMapper;
|
||||
|
||||
@Autowired
|
||||
private MemberMapper memberMapper;
|
||||
|
||||
@Override
|
||||
public StoreMember login(String openid) {
|
||||
// 根据登陆账号获取数据库信息
|
||||
|
||||
|
||||
StoreMember result = storeMemberMapper
|
||||
.selectOne(new QueryWrapper<StoreMember>().lambda()
|
||||
.eq(StoreMember::getOpenid, openid));
|
||||
|
||||
return result;
|
||||
//return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MemberDTO> memeberList() {
|
||||
//storeMemberMapper.selectList(null);
|
||||
return memberMapper.toDto(storeMemberMapper.selectList(null));
|
||||
//return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.app.modular.member.service.mapper;
|
||||
|
||||
|
||||
import com.ruoyi.app.common.persistence.model.StoreMember;
|
||||
import com.ruoyi.app.modular.mapper.EntityMapper;
|
||||
import com.ruoyi.app.modular.member.service.dto.MemberDTO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.ReportingPolicy;
|
||||
|
||||
/**
|
||||
* @author hupeng
|
||||
* @date 2019-06-05
|
||||
*/
|
||||
@Mapper(componentModel = "spring",uses = {},unmappedTargetPolicy = ReportingPolicy.IGNORE)
|
||||
public interface MemberMapper extends EntityMapper<MemberDTO, StoreMember> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.app.modular.member.service.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
public class LoginVO {
|
||||
@NotBlank(message = "code必传")
|
||||
private String code;
|
||||
|
||||
private String encrypted_data;
|
||||
|
||||
private String iv;
|
||||
|
||||
private String share_user_id;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
server:
|
||||
port: 8009
|
||||
light-security:
|
||||
# 权限规则配置:表示用{http-method}方法请求的{path}路径必须具备什么{expression}
|
||||
spec-list:
|
||||
- http-method: ANY
|
||||
path: /auth/login
|
||||
expression: "anon()"
|
||||
- http-method: get
|
||||
path: /doc.html
|
||||
expression: "anon()"
|
||||
- http-method: get
|
||||
path: /webjars/**
|
||||
expression: "anon()"
|
||||
- http-method: get
|
||||
path: /swagger-resources/**
|
||||
expression: "anon()"
|
||||
- http-method: GET
|
||||
path: /user/info
|
||||
expression: "hasAnyRoles('user')"
|
||||
- http-method: ANY
|
||||
path: /user/super
|
||||
expression: "hasAllRoles('user','admin')"
|
||||
- http-method: ANY
|
||||
path: /**
|
||||
expression: "hasLogin()"
|
||||
jwt:
|
||||
# jwt sign算法
|
||||
algorithm: hs512
|
||||
# jwt secret
|
||||
secret: 86def2a732f5c304999c4cd766380f0a44622214639de1ba4268f5bbedab2ebc029a8064263065510d359adade883aca947029171601399fc3f1c866b0b0bed2
|
||||
# jwt 有效时间
|
||||
expiration-in-second: 1209600
|
||||
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:com/ruoyi/app/common/persistence/dao/mapping/*.xml
|
||||
typeAliasesPackage: com.ruoyi.app.common.persistence.model
|
||||
global-config:
|
||||
id-type: 0 #0:数据库ID自增 1:用户输入id 2:全局唯一id(IdWorker) 3:全局唯一ID(uuid)
|
||||
db-column-underline: false
|
||||
refresh-mapper: true
|
||||
configuration:
|
||||
map-underscore-to-camel-case: false
|
||||
cache-enabled: true #配置的缓存的全局开关
|
||||
lazyLoadingEnabled: true #延时加载的开关
|
||||
multipleResultSetsEnabled: true #开启的话,延时加载一个属性时会加载该对象全部属性,否则按需加载属性
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #打印sql语句,调试用
|
||||
|
||||
spring:
|
||||
#DATABASE CONFIG
|
||||
datasource:
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
username: root
|
||||
password: root
|
||||
url: jdbc:mysql://localhost:3306/tours?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=UTC
|
||||
type: com.alibaba.druid.pool.DruidDataSource #这里是配置druid连接池,以下都是druid的配置信息
|
||||
filters: stat,wall,log4j
|
||||
maxActive: 20
|
||||
initialSize: 1
|
||||
maxWait: 60000
|
||||
minIdle: 1
|
||||
timeBetweenEvictionRunsMillis: 60000
|
||||
minEvictableIdleTimeMillis: 300000
|
||||
validationQuery: select 'x'
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
poolPreparedStatements: true
|
||||
maxOpenPreparedStatements: 20
|
||||
connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000
|
||||
#redis 配置
|
||||
redis:
|
||||
database: 0
|
||||
host: 127.0.0.1
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 8 #最大连接数据库连接数,设 0 为没有限制
|
||||
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
|
||||
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
|
||||
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
|
||||
shutdown-timeout: 100ms
|
||||
password: ''
|
||||
port: 6379
|
||||
swagger:
|
||||
enabled: true
|
||||
title: 标题
|
||||
description: 描述信息
|
||||
version: 1.0
|
||||
contact:
|
||||
name: 维护者信息
|
||||
#base-package: swagger扫描的基础包,默认:全扫描(分组情况下此处可不配置)
|
||||
#全局参数,比如Token之类的验证信息可以全局话配置
|
||||
global-operation-parameters:
|
||||
- description: 'Token信息,必填项'
|
||||
modelRef: 'string'
|
||||
name: 'Authorization'
|
||||
parameter-type: 'header'
|
||||
required: true
|
||||
groups:
|
||||
basic-group:
|
||||
base-package: com.battcn.controller.basic
|
||||
system-group:
|
||||
base-package: com.battcn.controller.system
|
||||
Reference in new issue
Block a user