Commit 45b5a8e5 by guanchen

改造--代理商每日邮件

parent a8082d43
...@@ -11,17 +11,18 @@ ...@@ -11,17 +11,18 @@
</parent> </parent>
<groupId>com.lanren.huhu</groupId> <groupId>com.lanren.huhu</groupId>
<artifactId>report_partner</artifactId> <artifactId>report_expand</artifactId>
<!--<artifactId>report_mail</artifactId>-->
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<name>partner</name> <name>partner</name>
<description>呼呼省钱合伙人相关服务</description> <description>呼呼省钱合伙人相关服务</description>
<packaging>war</packaging> <packaging>jar</packaging>
<properties> <properties>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<start-class>com.lanren.huhu.partner.PartnerApplication</start-class> <start-class>com.lanren.huhu.partner.ReportPartnerApplication</start-class>
</properties> </properties>
<dependencies> <dependencies>
...@@ -33,28 +34,28 @@ ...@@ -33,28 +34,28 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId> <artifactId>spring-boot-starter-aop</artifactId>
</dependency> </dependency>
<dependency> <!--<dependency>-->
<groupId>org.springframework.boot</groupId> <!--<groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-starter-data-redis</artifactId> <!--<artifactId>spring-boot-starter-data-redis</artifactId>-->
</dependency> <!--</dependency>-->
<dependency> <!--<dependency>-->
<groupId>org.springframework.boot</groupId> <!--<groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-starter-cache</artifactId> <!--<artifactId>spring-boot-starter-cache</artifactId>-->
</dependency> <!--</dependency>-->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId> <artifactId>spring-boot-starter-validation</artifactId>
</dependency> </dependency>
<dependency> <!--<dependency>-->
<groupId>org.springframework.boot</groupId> <!--<groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-starter-web</artifactId> <!--<artifactId>spring-boot-starter-web</artifactId>-->
<exclusions> <!--<exclusions>-->
<exclusion> <!--<exclusion>-->
<artifactId>jackson-databind</artifactId> <!--<artifactId>jackson-databind</artifactId>-->
<groupId>com.fasterxml.jackson.core</groupId> <!--<groupId>com.fasterxml.jackson.core</groupId>-->
</exclusion> <!--</exclusion>-->
</exclusions> <!--</exclusions>-->
</dependency> <!--</dependency>-->
<dependency> <dependency>
<groupId>org.mybatis.spring.boot</groupId> <groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId> <artifactId>mybatis-spring-boot-starter</artifactId>
...@@ -76,16 +77,16 @@ ...@@ -76,16 +77,16 @@
<artifactId>mybatis-plus-boot-starter</artifactId> <artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.1.0</version> <version>3.1.0</version>
</dependency> </dependency>
<dependency> <!--<dependency>-->
<groupId>org.springframework.boot</groupId> <!--<groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-starter-tomcat</artifactId> <!--<artifactId>spring-boot-starter-tomcat</artifactId>-->
<scope>provided</scope> <!--<scope>provided</scope>-->
</dependency> <!--</dependency>-->
<dependency> <!--<dependency>-->
<groupId>org.springframework.boot</groupId> <!--<groupId>org.springframework.boot</groupId>-->
<artifactId>spring-boot-starter-test</artifactId> <!--<artifactId>spring-boot-starter-test</artifactId>-->
<scope>test</scope> <!--<scope>test</scope>-->
</dependency> <!--</dependency>-->
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId> <artifactId>commons-pool2</artifactId>
...@@ -132,11 +133,11 @@ ...@@ -132,11 +133,11 @@
<artifactId>snakeyaml</artifactId> <artifactId>snakeyaml</artifactId>
<version>1.24</version> <version>1.24</version>
</dependency> </dependency>
<dependency> <!--<dependency>-->
<groupId>org.redisson</groupId> <!--<groupId>org.redisson</groupId>-->
<artifactId>redisson</artifactId> <!--<artifactId>redisson</artifactId>-->
<version>3.7.5</version> <!--<version>3.7.5</version>-->
</dependency> <!--</dependency>-->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId> <artifactId>spring-boot-starter-mail</artifactId>
...@@ -149,17 +150,15 @@ ...@@ -149,17 +150,15 @@
<id>dev</id> <id>dev</id>
<properties> <properties>
<profiles.active>dev</profiles.active> <profiles.active>dev</profiles.active>
<!--<mysql.server>jdbc:mysql://10.9.121.204:3306/huhu_finance</mysql.server>--> <mysql.server>jdbc:mysql://10.9.121.204:3306/huhu_finance</mysql.server>
<mysql.server>jdbc:mysql://10.9.121.204:3306/huhu</mysql.server>
<mysql.username>yanfa</mysql.username> <mysql.username>yanfa</mysql.username>
<mysql.password>cScdKw%ZKC1i$C!1uAz3Kg$c</mysql.password> <mysql.password>cScdKw%ZKC1i$C!1uAz3Kg$c</mysql.password>
<!--<mysql.username>apihu</mysql.username>--> <!--<mysql.username>apihu</mysql.username>-->
<!--<mysql.password>tqH9clYRAxZ@LV4x</mysql.password>--> <!--<mysql.password>tqH9clYRAxZ@LV4x</mysql.password>-->
<redis.host>10.9.186.167</redis.host>
<redis.password>passwdredis</redis.password>
<spring.profiles.active>dev</spring.profiles.active> <spring.profiles.active>dev</spring.profiles.active>
<logfile_path>/Users/chen/Develop/workspace/partner/data/release/dev/logs</logfile_path> <!--<logfile_path>/home/jnt/duke/logs</logfile_path>-->
<!--<providers-path>/data/java/service</providers-path>--> <!--<providers-path>/data/java/service</providers-path>-->
<logfile_path>/Users/chen/Develop/workspace/partner/data/release/dev/logs</logfile_path>
<providers-path>/Users/chen/Develop/workspace/partner/data/release/dev</providers-path> <providers-path>/Users/chen/Develop/workspace/partner/data/release/dev</providers-path>
</properties> </properties>
<!-- 默认是本地开发环境 --> <!-- 默认是本地开发环境 -->
...@@ -173,17 +172,13 @@ ...@@ -173,17 +172,13 @@
<properties> <properties>
<profiles.active>test</profiles.active> <profiles.active>test</profiles.active>
<mysql.server>jdbc:mysql://10.9.121.204:3306/huhu</mysql.server> <mysql.server>jdbc:mysql://10.9.121.204:3306/huhu</mysql.server>
<!--<mysql.username>yanfa</mysql.username>-->
<!--<mysql.password>cScdKw%ZKC1i$C!1uAz3Kg$c</mysql.password>-->
<mysql.username>apihu</mysql.username> <mysql.username>apihu</mysql.username>
<mysql.password>tqH9clYRAxZ@LV4x</mysql.password> <mysql.password>tqH9clYRAxZ@LV4x</mysql.password>
<redis.host>10.9.186.167</redis.host>
<redis.password>passwdredis</redis.password>
<spring.profiles.active>dev</spring.profiles.active> <spring.profiles.active>dev</spring.profiles.active>
<!-- <logfile_path>/Users/chen/Develop/workspace/partner/data/release/dev/logs</logfile_path>--> <logfile_path>/home/jnt/duke/logs</logfile_path>
<logfile_path>/data/logs/java</logfile_path> <providers-path>/data/java/service</providers-path>
<!--<providers-path>/data/java/service</providers-path>--> <!--<logfile_path>/data/logs/java</logfile_path>-->
<providers-path>/Users/chen/Develop/workspace/partner/data/release/dev</providers-path> <!--<providers-path>/Users/chen/Develop/workspace/partner/data/release/dev</providers-path>-->
</properties> </properties>
</profile> </profile>
<profile> <profile>
...@@ -194,20 +189,25 @@ ...@@ -194,20 +189,25 @@
<mysql.server>jdbc:mysql://10.9.63.72:3306/huhu</mysql.server> <mysql.server>jdbc:mysql://10.9.63.72:3306/huhu</mysql.server>
<mysql.username>huhu</mysql.username> <mysql.username>huhu</mysql.username>
<mysql.password>Huhu123~</mysql.password> <mysql.password>Huhu123~</mysql.password>
<redis.host>10.9.48.21</redis.host>
<redis.password>Ws_LrqD_20180319_REdis_MQLRd</redis.password>
<spring.profiles.active>prod</spring.profiles.active> <spring.profiles.active>prod</spring.profiles.active>
<logfile_path>/data/logs2/huhu/lanren</logfile_path> <logfile_path>/home/jnt/duke/logs</logfile_path>
<!--<logfile_path>/Users/chen/Develop/workspace/partner/data/release/dev/logs</logfile_path>-->
<providers-path>/data/java/service</providers-path> <providers-path>/data/java/service</providers-path>
<!--<logfile_path>/data/logs2/huhu/lanren</logfile_path>-->
<!--<logfile_path>/Users/chen/Develop/workspace/partner/data/release/dev/logs</logfile_path>-->
</properties> </properties>
</profile> </profile>
</profiles> </profiles>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.lanren.huhu.partner.ReportPartnerApplication</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version> <version>3.7.0</version>
......
package com.lanren.huhu.partner;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* @author houseme
*/
@SpringBootApplication
@EnableCaching
@EnableScheduling
public class PartnerApplication extends SpringBootServletInitializer {
private static Logger logger = LoggerFactory.getLogger(PartnerApplication.class);
public static void main(String[] args) {
try {
SpringApplication.run(PartnerApplication.class, args);
logger.info("PartnerApplication >>>服务启动成功");
Object lock = new Object();
synchronized (lock) {
try {
while (true) {
lock.wait();
}
} catch (InterruptedException e) {
logger.error(e.getMessage(), e);
}
}
} catch (Exception e) {
logger.error("PartnerApplication>>服务启动失败", e);
e.printStackTrace();
}
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(PartnerApplication.class);
}
}
package com.lanren.huhu.partner;
import com.lanren.huhu.partner.schedule.AgentDailyExpandTask;
import com.lanren.huhu.partner.schedule.AgentDailyMailTask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author houseme
*/
@SpringBootApplication
public class ReportPartnerApplication implements ApplicationRunner {
private static Logger logger = LoggerFactory.getLogger(ReportPartnerApplication.class);
@Autowired
AgentDailyExpandTask agentDailyExpandTask;
@Autowired
AgentDailyMailTask agentDailyMailTask;
@Value("${spring.profiles.active}")
private String profilesActive;
public static void main(String[] args) {
try {
System.exit(
SpringApplication.exit(
SpringApplication.run(ReportPartnerApplication.class, args)
)
);
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
}
@Override
public void run(ApplicationArguments args) throws Exception {
logger.info("profile active is {}", profilesActive);
// agentDailyExpandTask.runExpandPartner();
// agentDailyMailTask.runExpandCity2ndAgentMail();
}
}
package com.lanren.huhu.partner.aspect;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
/**
*
* @author houseme
* @date 2017/9/8 上午11:54
* Project snacks
* Package com.lanren.huhu.partner.aspect
* File
*/
@Aspect
@Order(5)
@Component
public class WebLogAspect {
private Logger logger = LoggerFactory.getLogger(getClass());
ThreadLocal<Long> startTime = new ThreadLocal<>();
@Pointcut("execution(public * com.lanren.huhu.partner.*.controller.*.*(..))")
public void webLog() {
}
@Before("webLog()")
public void doBefore(JoinPoint joinPoint) throws Throwable {
startTime.set(System.currentTimeMillis());
// 接收到请求,记录请求内容
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
HttpServletRequest request = attributes.getRequest();
// 记录下请求内容
logger.info("URL : " + request.getRequestURL().toString());
logger.info("HTTP_METHOD : " + request.getMethod());
logger.info("IP : " + request.getRemoteAddr());
logger.info("CLASS_METHOD : " + joinPoint.getSignature().getDeclaringTypeName() + "." + joinPoint.getSignature().getName());
logger.info("ARGS : " + Arrays.toString(joinPoint.getArgs()));
//header 部分处理
Map<String, String> map = new HashMap<String, String>();
Enumeration headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) {
String key = (String) headerNames.nextElement();
String value = request.getHeader(key);
map.put(key, value);
}
logger.info("HEADER :{} ", map.toString());
}
@AfterReturning(returning = "ret", pointcut = "webLog()")
public void doAfterReturning(Object ret) throws Throwable {
// 处理完请求,返回内容
logger.info("RESPONSE : " + ret);
logger.info("SPEND TIME : " + (System.currentTimeMillis() - startTime.get()));
}
}
package com.lanren.huhu.partner.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import java.util.concurrent.Executor;
/**
* @author chen
* @title: AsyncConfig
* @projectName partner
* @description: 异步任务设置
* @package com.lanren.huhu.partner.config
* @date 2019-06-29 15:48
*/
@Configuration
@EnableAsync
public class AsyncConfig implements AsyncConfigurer {
@Override
public Executor getAsyncExecutor() {
ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
//核心线程数
taskExecutor.setCorePoolSize(8);
//最大线程数
taskExecutor.setMaxPoolSize(16);
//队列大小
taskExecutor.setQueueCapacity(100);
taskExecutor.initialize();
return taskExecutor;
}
}
package com.lanren.huhu.partner.config;
import com.alibaba.fastjson.JSON;
import com.lanren.huhu.partner.util.MessageUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* @author houseme
* @date 2019-04-02 21:31
* Project partner
* Package com.lanren.huhu.partner
* File: AuthenticationInterceptor
*/
public class AuthenticationInterceptor extends HandlerInterceptorAdapter {
private final Logger logger = LoggerFactory.getLogger(AuthenticationInterceptor.class);
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
long startTime = System.currentTimeMillis();
request.setAttribute("startTime", startTime);
HandlerMethod handlerMethod = (HandlerMethod) handler;
logger.info("AuthenticationInterceptor Method ==>{}", handlerMethod.getMethod().getName());
logger.info("AuthenticationInterceptor HandlerMethod ==>{}", handlerMethod.getBeanType().getName());
return true;
}
private void returnMsg(HttpServletResponse response) throws IOException {
Map<String, Object> map = new HashMap<>();
map.put("code", 410);
map.put("msg", MessageUtil.getMsg(410));
response.setHeader("Content-type", "application/json;charset=UTF-8");
logger.info("msg :{}", MessageUtil.getMsg(410));
response.getWriter().write(JSON.toJSONString(map));
}
}
package com.lanren.huhu.partner.config;
import com.alibaba.fastjson.parser.ParserConfig;
import com.alibaba.fastjson.support.spring.GenericFastJsonRedisSerializer;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
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.RedisConnectionFactory;
import org.springframework.data.redis.connection.RedisPassword;
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
import org.springframework.data.redis.connection.lettuce.LettucePoolingClientConfiguration;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializationContext;
import org.springframework.data.redis.serializer.StringRedisSerializer;
/**
* @author houseme
* @date 2018/1/22 下午11:51
* File
*/
@Configuration
public class RedisConfiguration {
private static Logger logger = LoggerFactory.getLogger(RedisConfiguration.class);
static {
logger.info("加载redis配置");
ParserConfig.getGlobalInstance().addAccept("com.lanren.huhu.partner.model.");
ParserConfig.getGlobalInstance().addAccept("com.lanren.huhu.partner.result.");
ParserConfig.getGlobalInstance().setAutoTypeSupport(true);
}
@Bean
public RedisCacheManager getRedisCacheManager(RedisConnectionFactory connectionFactory) {
RedisCacheWriter cacheWriter = RedisCacheWriter.lockingRedisCacheWriter(connectionFactory);
GenericFastJsonRedisSerializer fastJsonRedisSerializer = new GenericFastJsonRedisSerializer();
RedisSerializationContext.SerializationPair<Object> pair = RedisSerializationContext.SerializationPair.fromSerializer(fastJsonRedisSerializer);
RedisCacheConfiguration cacheConfig = RedisCacheConfiguration.defaultCacheConfig().serializeValuesWith(pair);
return new RedisCacheManager(cacheWriter, cacheConfig);
}
@Bean
@Scope("prototype")
public RedisTemplate redisTemplate(RedisConnectionFactory redisConnectionFactory) {
RedisTemplate redisTemplate = new RedisTemplate();
redisTemplate.setConnectionFactory(redisConnectionFactory);
GenericFastJsonRedisSerializer fastJsonRedisSerializer = new GenericFastJsonRedisSerializer();
//设置默认的Serialize,包含 keySerializer & valueSerializer
redisTemplate.setDefaultSerializer(fastJsonRedisSerializer);
//单独设置valueSerializer
redisTemplate.setValueSerializer(fastJsonRedisSerializer);
//单独设置keySerializer
redisTemplate.setKeySerializer(fastJsonRedisSerializer);
StringRedisSerializer stringRedisSerializer = new StringRedisSerializer();
redisTemplate.setKeySerializer(stringRedisSerializer);
redisTemplate.setStringSerializer(stringRedisSerializer);
redisTemplate.setHashKeySerializer(stringRedisSerializer);
redisTemplate.afterPropertiesSet();
return redisTemplate;
}
@Bean
@Scope("prototype")
public RedisTemplate redisTemplatePush(@Value("${spring.redis.database2}") int pushDb,
@Value("${spring.redis.host}") String host,
@Value("${spring.redis.port}") int port,
@Value("${spring.redis.password}") String password) {
RedisStandaloneConfiguration configuration = new RedisStandaloneConfiguration();
configuration.setHostName(host);
configuration.setPort(port);
configuration.setDatabase(pushDb);
RedisPassword redisPassword = RedisPassword.of(password);
configuration.setPassword(redisPassword);
GenericObjectPoolConfig genericObjectPoolConfig = new GenericObjectPoolConfig();
LettucePoolingClientConfiguration.LettucePoolingClientConfigurationBuilder builder = LettucePoolingClientConfiguration.builder();
builder.poolConfig(genericObjectPoolConfig);
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(configuration, builder.build());
connectionFactory.afterPropertiesSet();
return redisTemplate(connectionFactory);
}
}
package com.lanren.huhu.partner.config;
import com.lanren.huhu.partner.service.impl.RedissonLockService;
import com.lanren.huhu.partner.util.LockUtil;
import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.io.IOException;
/**
* @author chen
* @title: RedissonConfig
* @projectName partner
* @description: 注入锁工具类
* @package com.lanren.huhu.partner.config
* @date 2019-07-01 19:41
*/
@Configuration
public class RedissonConfig {
@Value("${spring.redis.host}")
private String host;
@Value("${spring.redis.port}")
private String port;
@Value("${spring.redis.password}")
private String password;
/**
* RedissonClient,单机模式
* @return
* @throws IOException
*/
@Bean(destroyMethod = "shutdown")
public RedissonClient redisson() throws IOException {
Config config = new Config();
config.useSingleServer().setAddress("redis://" + host + ":" + port).setPassword(password);
return Redisson.create(config);
}
@Bean
public RedissonLockService redissonLocker(RedissonClient redissonClient){
RedissonLockService locker = new RedissonLockService(redissonClient);
//设置LockUtil的锁处理对象
try{
LockUtil.setLockService(locker);
} catch (Exception e) {
System.out.println("redissonLocker failed");
System.out.println(e.getMessage());
}
return locker;
}
}
package com.lanren.huhu.partner.config;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.util.ArrayList;
import java.util.List;
/**
* @author houseme
* @date 2019-04-02 21:26
* Project xmb
* Package com.lanren.huhu.partner.config
* File: WebMvcAutoConfiguration
*/
@Configuration
@EnableWebMvc
public class WebMvcAutoConfiguration implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
// 拦截所有请求,通过判断是否有 @LoginRequired 注解 决定是否需要登录
registry.addInterceptor(authenticationInterceptor()).addPathPatterns("/v1/**").excludePathPatterns("/v1/init/**");
}
@Bean
public AuthenticationInterceptor authenticationInterceptor() {
return new AuthenticationInterceptor();
}
/**
* Configure cross origin requests processing.
*
* @param registry
* @since 4.2
*/
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**").allowedOrigins("*").allowedMethods("POST", "GET", "PUT", "DELETE");
}
/**
* Configure the {@link HttpMessageConverter}s to use for reading or writing
* to the body of the request or response. If no converters are added, a
* default list of converters is registered.
* <p><strong>Note</strong> that adding converters to the list, turns off
* default converter registration. To simply add a converter without impacting
* default registration, consider using the method
* {@link #extendMessageConverters(List)} instead.
*
* @param converters initially an empty list of converters
*/
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
List<MediaType> supportedMediaTypes = new ArrayList<>();
supportedMediaTypes.add(MediaType.APPLICATION_JSON);
supportedMediaTypes.add(MediaType.APPLICATION_ATOM_XML);
supportedMediaTypes.add(MediaType.APPLICATION_FORM_URLENCODED);
supportedMediaTypes.add(MediaType.APPLICATION_OCTET_STREAM);
supportedMediaTypes.add(MediaType.APPLICATION_PDF);
supportedMediaTypes.add(MediaType.APPLICATION_RSS_XML);
supportedMediaTypes.add(MediaType.APPLICATION_XHTML_XML);
supportedMediaTypes.add(MediaType.APPLICATION_XML);
supportedMediaTypes.add(MediaType.IMAGE_GIF);
supportedMediaTypes.add(MediaType.IMAGE_JPEG);
supportedMediaTypes.add(MediaType.IMAGE_PNG);
supportedMediaTypes.add(MediaType.TEXT_EVENT_STREAM);
supportedMediaTypes.add(MediaType.TEXT_HTML);
supportedMediaTypes.add(MediaType.TEXT_MARKDOWN);
supportedMediaTypes.add(MediaType.TEXT_PLAIN);
supportedMediaTypes.add(MediaType.TEXT_XML);
converter.setSupportedMediaTypes(supportedMediaTypes);
//自定义配置...
FastJsonConfig config = new FastJsonConfig();
config.setDateFormat(JSON.DEFFAULT_DATE_FORMAT);
//config.set ...
SerializerFeature[] serializerFeatures = new SerializerFeature[]{
SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullListAsEmpty,
SerializerFeature.WriteNullNumberAsZero, SerializerFeature.WriteNullStringAsEmpty,
SerializerFeature.WriteNullBooleanAsFalse, SerializerFeature.QuoteFieldNames,
SerializerFeature.WriteBigDecimalAsPlain,SerializerFeature.WriteDateUseDateFormat
};
config.setSerializerFeatures(serializerFeatures);
converter.setFastJsonConfig(config);
converters.add(converter);
converters.add(0, converter);
// ObjectMapper objectMapper = Jackson2ObjectMapperBuilder.json().build();
// objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
// converters.add(new MappingJackson2HttpMessageConverter(objectMapper));
}
}
package com.lanren.huhu.partner.controller;
import com.lanren.huhu.partner.result.Result;
import com.lanren.huhu.partner.schedule.AgentDailyExpandTask;
import com.lanren.huhu.partner.schedule.AgentDailyMailTask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
/**
* @author chen
*/
@RestController
@RequestMapping("/v1/report/")
public class AgentController {
private static Logger logger = LoggerFactory.getLogger(AgentController.class);
@Autowired
AgentDailyExpandTask agentDailyExpandTask;
@Autowired
AgentDailyMailTask agentDailyMailTask;
@RequestMapping(value = "/{dat}", method = RequestMethod.GET)
public Result<String> updateOneDayExpand(@PathVariable("dat") String dat) {
agentDailyExpandTask.runSummary(dat);
logger.info("============>" + Thread.currentThread().getName());
Result<String> result = new Result<String>();
result.setData("异步,正在执行刷新......");
return result;
}
/**
* 汇总拓展的城市代理商
*/
@RequestMapping(value = "/expand/city", method = RequestMethod.GET)
public Result<String> sumExpandCity(@RequestHeader HttpHeaders headers) {
if (logger.isInfoEnabled()) {
logger.info("AgentController sumExpandCity, header:{}, time:{}", headers.keySet().toArray(), LocalDateTime.now());
}
agentDailyMailTask.runExpandCityAgent();
Result<String> result = new Result<String>();
result.setCode(0);
return result;
}
}
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.AgentAccountLog;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface AgentAccountLogMapper extends BaseMapper<AgentAccountLog> {
int updateBatch(List<AgentAccountLog> list);
int batchInsert(@Param("list") List<AgentAccountLog> list);
int insertOrUpdate(AgentAccountLog record);
int insertOrUpdateSelective(AgentAccountLog record);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.AgentAccount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface AgentAccountMapper extends BaseMapper<AgentAccount> {
int updateBatch(List<AgentAccount> list);
int batchInsert(@Param("list") List<AgentAccount> list);
int insertOrUpdate(AgentAccount record);
int insertOrUpdateSelective(AgentAccount record);
AgentAccount getOneByUserIdForUpdate(Integer agentId);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.AgentBankCard;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface AgentBankCardMapper extends BaseMapper<AgentBankCard> {
int updateBatch(List<AgentBankCard> list);
int batchInsert(@Param("list") List<AgentBankCard> list);
int insertOrUpdate(AgentBankCard record);
int insertOrUpdateSelective(AgentBankCard record);
}
\ No newline at end of file
...@@ -22,6 +22,8 @@ public interface AgentExpandDailyMapper extends BaseMapper<AgentExpandDaily> { ...@@ -22,6 +22,8 @@ public interface AgentExpandDailyMapper extends BaseMapper<AgentExpandDaily> {
@UpdateProvider(type = AgentExpandDailySqlProvider.class, method = "updateByDatByDetail") @UpdateProvider(type = AgentExpandDailySqlProvider.class, method = "updateByDatByDetail")
int updateByDatByDetail(String datStr); int updateByDatByDetail(String datStr);
int insertByDetail();
Integer getMonthCntByAgent(int agentId, long beginTs, long endTs); Integer getMonthCntByAgent(int agentId, long beginTs, long endTs);
MailContentRow getRegRow(String dat, Integer agentId, String monthBegin, String monthEnd); MailContentRow getRegRow(String dat, Integer agentId, String monthBegin, String monthEnd);
......
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.AgentIncomeSummary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface AgentIncomeSummaryMapper extends BaseMapper<AgentIncomeSummary> {
int updateBatch(List<AgentIncomeSummary> list);
int batchInsert(@Param("list") List<AgentIncomeSummary> list);
int insertOrUpdate(AgentIncomeSummary record);
int insertOrUpdateSelective(AgentIncomeSummary record);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.AgentRevokeRecords;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface AgentRevokeRecordsMapper extends BaseMapper<AgentRevokeRecords> {
int updateBatch(List<AgentRevokeRecords> list);
int batchInsert(@Param("list") List<AgentRevokeRecords> list);
int insertOrUpdate(AgentRevokeRecords record);
int insertOrUpdateSelective(AgentRevokeRecords record);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lanren.huhu.partner.domain.AgentReward;
import com.lanren.huhu.partner.model.AgentSettle;
import com.lanren.huhu.partner.model.MailContentRow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface AgentRewardMapper extends BaseMapper<AgentReward> {
int updateBatch(List<AgentReward> list);
int batchInsert(@Param("list") List<AgentReward> list);
int insertOrUpdate(AgentReward record);
int insertOrUpdateSelective(AgentReward record);
IPage<AgentSettle> selectAgentSettlePageByTs(Page<AgentSettle> page, long beginTs, long endTs);
AgentSettle selectAgentSettleByTsAndAgentId(long beginTs, long endTs, Integer agentId);
IPage<AgentReward> selectOrderRewardPageByTs(Page<AgentReward> page, long beginTs, long endTs);
IPage<AgentReward> selectOrderRewardPageByTsAndAgentId(Page<AgentReward> page, long beginTs, long endTs, int agentId);
int updateRewardStatusByAgentIdAndTs(int agentId, long beginTs, long endTs);
List<MailContentRow> getsVipRows(String yesterdayBegin, String yesterdayEnd, Integer agentId, String monthBegin, String monthEnd);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.AgentSalary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface AgentSalaryMapper extends BaseMapper<AgentSalary> {
int updateBatch(List<AgentSalary> list);
int batchInsert(@Param("list") List<AgentSalary> list);
int insertOrUpdate(AgentSalary record);
int insertOrUpdateSelective(AgentSalary record);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.OrderTaobaoJdCommission;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface OrderTaobaoJdCommissionMapper extends BaseMapper<OrderTaobaoJdCommission> {
int updateBatch(List<OrderTaobaoJdCommission> list);
int batchInsert(@Param("list") List<OrderTaobaoJdCommission> list);
int insertOrUpdate(OrderTaobaoJdCommission record);
int insertOrUpdateSelective(OrderTaobaoJdCommission record);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.OrderTaobaoJdGoodsCommission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface OrderTaobaoJdGoodsCommissionMapper extends BaseMapper<OrderTaobaoJdGoodsCommission> {
int updateBatch(List<OrderTaobaoJdGoodsCommission> list);
int batchInsert(@Param("list") List<OrderTaobaoJdGoodsCommission> list);
int insertOrUpdate(OrderTaobaoJdGoodsCommission record);
int insertOrUpdateSelective(OrderTaobaoJdGoodsCommission record);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.OrdersActive;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface OrdersActiveMapper extends BaseMapper<OrdersActive> {
int updateBatch(List<OrdersActive> list);
int batchInsert(@Param("list") List<OrdersActive> list);
int insertOrUpdate(OrdersActive record);
int insertOrUpdateSelective(OrdersActive record);
OrdersActive selectOneByOrderSn(String type, String orderSn);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.PartnerAccountLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface PartnerAccountLogMapper extends BaseMapper<PartnerAccountLog> {
int updateBatch(List<PartnerAccountLog> list);
int batchInsert(@Param("list") List<PartnerAccountLog> list);
int insertOrUpdate(PartnerAccountLog record);
int insertOrUpdateSelective(PartnerAccountLog record);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao; package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lanren.huhu.partner.domain.PartnerAccount; import com.lanren.huhu.partner.domain.PartnerAccount;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -89,4 +91,6 @@ public interface PartnerAccountMapper extends BaseMapper<PartnerAccount> { ...@@ -89,4 +91,6 @@ public interface PartnerAccountMapper extends BaseMapper<PartnerAccount> {
PartnerAccount selectOneForUpdate(Integer userId); PartnerAccount selectOneForUpdate(Integer userId);
PartnerAccount getPartnerAccountByPhone(String phone); PartnerAccount getPartnerAccountByPhone(String phone);
IPage<PartnerAccount> selectPageByTs(Page<PartnerAccount> page);
} }
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.PartnerActivationRelationRecord;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface PartnerActivationRelationRecordMapper extends BaseMapper<PartnerActivationRelationRecord> {
int updateBatch(List<PartnerActivationRelationRecord> list);
int batchInsert(@Param("list") List<PartnerActivationRelationRecord> list);
int insertOrUpdate(PartnerActivationRelationRecord record);
int insertOrUpdateSelective(PartnerActivationRelationRecord record);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.PartnerIncomeSummary;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface PartnerIncomeSummaryMapper extends BaseMapper<PartnerIncomeSummary> {
int updateBatch(List<PartnerIncomeSummary> list);
int batchInsert(@Param("list") List<PartnerIncomeSummary> list);
int insertOrUpdate(PartnerIncomeSummary record);
int insertOrUpdateSelective(PartnerIncomeSummary record);
}
\ No newline at end of file
...@@ -28,5 +28,5 @@ public interface PartnerInviteRelationMapper extends BaseMapper<PartnerInviteRel ...@@ -28,5 +28,5 @@ public interface PartnerInviteRelationMapper extends BaseMapper<PartnerInviteRel
* @param page 分页对象,xml中可以从里面进行取值,传递参数 Page 即自动分页,必须放在第一位(你可以继承Page实现自己的分页对象) * @param page 分页对象,xml中可以从里面进行取值,传递参数 Page 即自动分页,必须放在第一位(你可以继承Page实现自己的分页对象)
* @return 分页对象 * @return 分页对象
*/ */
IPage<PartnerInviteRelation> selectPageByTs(Page<PartnerInviteRelation> page, @Param("beginTs") Long beginTs, @Param("endTs") Long endTs); IPage<PartnerInviteRelation> selectPageByTs(Page<PartnerInviteRelation> page);
} }
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.PartnerPurchaseRewardRecord;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface PartnerPurchaseRewardRecordMapper extends BaseMapper<PartnerPurchaseRewardRecord> {
int updateBatch(List<PartnerPurchaseRewardRecord> list);
int batchInsert(@Param("list") List<PartnerPurchaseRewardRecord> list);
int insertOrUpdate(PartnerPurchaseRewardRecord record);
int insertOrUpdateSelective(PartnerPurchaseRewardRecord record);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lanren.huhu.partner.domain.PartnerRevokeRecords;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface PartnerRevokeRecordsMapper extends BaseMapper<PartnerRevokeRecords> {
int updateBatch(List<PartnerRevokeRecords> list);
int batchInsert(@Param("list") List<PartnerRevokeRecords> list);
int insertOrUpdate(PartnerRevokeRecords record);
int insertOrUpdateSelective(PartnerRevokeRecords record);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lanren.huhu.partner.domain.PartnerReward;
import com.lanren.huhu.partner.model.PartnerSettle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface PartnerRewardMapper extends BaseMapper<PartnerReward> {
int updateBatch(List<PartnerReward> list);
int batchInsert(@Param("list") List<PartnerReward> list);
int insertOrUpdate(PartnerReward record);
int insertOrUpdateSelective(PartnerReward record);
IPage<PartnerReward> selectOrderRewardPageByTs(Page<PartnerReward> page, @Param("beginTs") Long beginTs, @Param("endTs") Long endTs);
IPage<PartnerReward> selectOrderRewardPageByTsAndUid(Page<PartnerReward> page, Long beginTs, Long endTs, Integer userId);
IPage<PartnerSettle> selectPartnerSettlePageByTs(Page<PartnerSettle> page, Long beginTs, Long endTs);
PartnerSettle selectPartnerSettleByTsAndUid(Long beginTs, Long endTs, Integer userId);
int updateRewardStatusByUidAndTs(Integer userId, Long beginTs, Long endTs);
// PartnerSummaryContent getPartnerSummaryContentByUidAndTime(int userId, long beginTs, long endTs);
}
\ No newline at end of file
package com.lanren.huhu.partner.dao; package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lanren.huhu.partner.domain.UserAgent; import com.lanren.huhu.partner.domain.UserAgent;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -33,4 +35,6 @@ public interface UserAgentMapper extends BaseMapper<UserAgent> { ...@@ -33,4 +35,6 @@ public interface UserAgentMapper extends BaseMapper<UserAgent> {
List<UserAgent> getChildListByUserId(@Param("userId") Integer userId, @Param("parentColumnName") String parentColumnName); List<UserAgent> getChildListByUserId(@Param("userId") Integer userId, @Param("parentColumnName") String parentColumnName);
UserAgent getUserAgentByPhone(String phone); UserAgent getUserAgentByPhone(String phone);
IPage<UserAgent> selectPageByTs(Page<UserAgent> page);
} }
\ No newline at end of file
package com.lanren.huhu.partner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lanren.huhu.partner.domain.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface UserInfoMapper extends BaseMapper<UserInfo> {
int updateBatch(List<UserInfo> list);
int batchInsert(@Param("list") List<UserInfo> list);
int insertOrUpdate(UserInfo record);
int insertOrUpdateSelective(UserInfo record);
IPage<UserInfo> selectPageByTs(Page<UserInfo> page);
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
@Data
@TableName(value = "agent_account")
public class AgentAccount implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 关联用户id
*/
@TableField(value = "user_id")
private Integer userId;
/**
* 代理商id
*/
@TableField(value = "agent_id")
private Integer agentId;
/**
* 账户类型 10开头现金账户 其他带添加
*/
@TableField(value = "account_type")
private Integer accountType;
/**
* 账户总额
*/
@TableField(value = "balance")
private BigDecimal balance;
/**
* 冻结余额
*/
@TableField(value = "frozen_balance")
private BigDecimal frozenBalance;
/**
* 收入冻结
*/
@TableField(value = "income_freeze")
private BigDecimal incomeFreeze;
/**
* 出款冻结
*/
@TableField(value = "pay_freeze")
private BigDecimal payFreeze;
/**
* 可用余额
*/
@TableField(value = "free_balance")
private BigDecimal freeBalance;
/**
* 账户收入总额
*/
@TableField(value = "income_balance")
private BigDecimal incomeBalance;
/**
* 在线充值收入
*/
@TableField(value = "recharge_income")
private BigDecimal rechargeIncome;
/**
* 账户开卡收入
*/
@TableField(value = "opencard_income")
private BigDecimal opencardIncome;
@TableField(value = "created_at")
private Long createdAt;
@TableField(value = "updated_at")
private Long updatedAt;
@TableField(value = "deleted_at")
private Long deletedAt;
/**
* 提现总额
*/
@TableField(value = "withdraw_balance")
private BigDecimal withdrawBalance;
/**
* 消费总额
*/
@TableField(value = "consume_balance")
private BigDecimal consumeBalance;
/**
* 版本号
*/
@TableField(value = "account_version")
private Long accountVersion;
/**
* 状态 100默认正常 99禁用
*/
@TableField(value = "account_status")
private Integer accountStatus;
/**
* 创建时间戳
*/
@TableField(value = "create_time")
private LocalDateTime createTime;
private static final long serialVersionUID = 1L;
public static final String COL_USER_ID = "user_id";
public static final String COL_AGENT_ID = "agent_id";
public static final String COL_ACCOUNT_TYPE = "account_type";
public static final String COL_BALANCE = "balance";
public static final String COL_FROZEN_BALANCE = "frozen_balance";
public static final String COL_INCOME_FREEZE = "income_freeze";
public static final String COL_PAY_FREEZE = "pay_freeze";
public static final String COL_FREE_BALANCE = "free_balance";
public static final String COL_INCOME_BALANCE = "income_balance";
public static final String COL_RECHARGE_INCOME = "recharge_income";
public static final String COL_OPENCARD_INCOME = "opencard_income";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_DELETED_AT = "deleted_at";
public static final String COL_WITHDRAW_BALANCE = "withdraw_balance";
public static final String COL_CONSUME_BALANCE = "consume_balance";
public static final String COL_ACCOUNT_VERSION = "account_version";
public static final String COL_ACCOUNT_STATUS = "account_status";
public static final String COL_CREATE_TIME = "create_time";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
@Data
@TableName(value = "agent_account_log")
public class AgentAccountLog implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 用户id
*/
@TableField(value = "user_id")
private Integer userId;
/**
* 代理商id
*/
@TableField(value = "agent_id")
private Integer agentId;
/**
* 年份
*/
@TableField(value = "yeartime")
private Integer yeartime;
/**
* 月份
*/
@TableField(value = "monthtime")
private Integer monthtime;
/**
* 每日日期
*/
@TableField(value = "daytime")
private Integer daytime;
/**
* 变化类型 10 微信 20支付宝 30 银联 40 银行卡 、50呼呼结算、60首月奖励 、70税费、80平台服务费、90平台扣除
*/
@TableField(value = "type")
private Integer type;
/**
* 变化的金额 进账为正数 出账为负数
*/
@TableField(value = "change_num")
private BigDecimal changeNum;
/**
* 变化的之后的金额
*/
@TableField(value = "changed_amount")
private BigDecimal changedAmount;
/**
* 变更的当前时间戳 秒级
*/
@TableField(value = "change_time")
private Integer changeTime;
/**
* 状态 20是已经处理(充值后者减值,10是待处理)
*/
@TableField(value = "pay_state")
private Integer payState;
/**
* 支付平台 系统hupay、微信wxpay、支付宝 alipay 、银联支付 unionpay 、银行卡cardpay
*/
@TableField(value = "pay_platform")
private String payPlatform;
/**
* 支付类型,10充值,20消费,30提现,40退款, 50合伙人奖励,60充值奖励,70 激活现金,80提现回退,90系统赠送,100系统扣除,110呼呼按月结算,120首月奖励,130代扣税费,140平台服务费
*/
@TableField(value = "pay_type")
private Boolean payType;
/**
* 类型描述 与pay_type 对应
*/
@TableField(value = "pay_remark")
private String payRemark;
/**
* 文字描述
*/
@TableField(value = "pay_info")
private String payInfo;
/**
* 参考ID 就是发生变化的订单id 支付 充值 提现、奖励的主键id
*/
@TableField(value = "reference_id")
private String referenceId;
@TableField(value = "create_time")
private LocalDateTime createTime;
@TableField(value = "modify_time")
private LocalDateTime modifyTime;
/**
* 变更前的快照
*/
@TableField(value = "snapshot")
private String snapshot;
private static final long serialVersionUID = 1L;
public static final String COL_USER_ID = "user_id";
public static final String COL_AGENT_ID = "agent_id";
public static final String COL_YEARTIME = "yeartime";
public static final String COL_MONTHTIME = "monthtime";
public static final String COL_DAYTIME = "daytime";
public static final String COL_TYPE = "type";
public static final String COL_CHANGE_NUM = "change_num";
public static final String COL_CHANGED_AMOUNT = "changed_amount";
public static final String COL_CHANGE_TIME = "change_time";
public static final String COL_PAY_STATE = "pay_state";
public static final String COL_PAY_PLATFORM = "pay_platform";
public static final String COL_PAY_TYPE = "pay_type";
public static final String COL_PAY_REMARK = "pay_remark";
public static final String COL_PAY_INFO = "pay_info";
public static final String COL_REFERENCE_ID = "reference_id";
public static final String COL_CREATE_TIME = "create_time";
public static final String COL_MODIFY_TIME = "modify_time";
public static final String COL_SNAPSHOT = "snapshot";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
@Data
@TableName(value = "agent_bank_card")
public class AgentBankCard implements Serializable {
/**
* 主键id
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 代理商id
*/
@TableField(value = "agent_id")
private Integer agentId;
/**
* 用户id
*/
@TableField(value = "user_id")
private Integer userId;
/**
* 姓名
*/
@TableField(value = "real_name")
private String realName;
/**
* 用户名称
*/
@TableField(value = "user_phone")
private String userPhone;
/**
* 币种编号 CNY人民币
*/
@TableField(value = "currency_code")
private String currencyCode;
/**
* 绑卡类型 个人or企业 10个人 20企业
*/
@TableField(value = "bank_type")
private Integer bankType;
/**
* 银行code
*/
@TableField(value = "bank_code")
private String bankCode;
/**
* 银行名称
*/
@TableField(value = "bank_name")
private String bankName;
/**
* 开户名称 个人姓名 企业 公司名称
*/
@TableField(value = "bank_account")
private String bankAccount;
/**
* 银行卡号
*/
@TableField(value = "bank_card_number")
private String bankCardNumber;
/**
* 支行名称
*/
@TableField(value = "branch_name")
private String branchName;
/**
* 银行所属省份
*/
@TableField(value = "bank_province")
private Integer bankProvince;
/**
* 银行所属城市
*/
@TableField(value = "bank_city")
private Integer bankCity;
/**
* 银行地址信息 省市
*/
@TableField(value = "bank_address")
private String bankAddress;
/**
* 银行卡状态 默认100正常 99 禁用
*/
@TableField(value = "bank_state")
private Integer bankState;
/**
* 证件号 身份证
*/
@TableField(value = "idcard_no")
private String idcardNo;
/**
* 身份证正面
*/
@TableField(value = "idcard_pic_front")
private String idcardPicFront;
/**
* 身份证反面
*/
@TableField(value = "idcard_pic_back")
private String idcardPicBack;
/**
* 营业执照或手持身份证照片
*/
@TableField(value = "business_license")
private String businessLicense;
/**
* 企业税号
*/
@TableField(value = "tax_number")
private String taxNumber;
/**
* 公司地址
*/
@TableField(value = "company_address")
private String companyAddress;
/**
* 公司联系电话
*/
@TableField(value = "company_phone")
private String companyPhone;
/**
* 税起征点 大于多少开始计算税
*/
@TableField(value = "quota_node")
private BigDecimal quotaNode;
/**
* 税率
*/
@TableField(value = "tax_rate")
private BigDecimal taxRate;
/**
* 开始使用时间
*/
@TableField(value = "start_time")
private Integer startTime;
/**
* 创建时间
*/
@TableField(value = "create_time")
private LocalDateTime createTime;
/**
* 创建时间
*/
@TableField(value = "created_at")
private Integer createdAt;
/**
* 修改时间
*/
@TableField(value = "updated_at")
private Integer updatedAt;
/**
* 删除信息
*/
@TableField(value = "deleted_at")
private Integer deletedAt;
/**
* 默认值 100 默认 99否
*/
@TableField(value = "is_default")
private Integer isDefault;
private static final long serialVersionUID = 1L;
public static final String COL_AGENT_ID = "agent_id";
public static final String COL_USER_ID = "user_id";
public static final String COL_REAL_NAME = "real_name";
public static final String COL_USER_PHONE = "user_phone";
public static final String COL_CURRENCY_CODE = "currency_code";
public static final String COL_BANK_TYPE = "bank_type";
public static final String COL_BANK_CODE = "bank_code";
public static final String COL_BANK_NAME = "bank_name";
public static final String COL_BANK_ACCOUNT = "bank_account";
public static final String COL_BANK_CARD_NUMBER = "bank_card_number";
public static final String COL_BRANCH_NAME = "branch_name";
public static final String COL_BANK_PROVINCE = "bank_province";
public static final String COL_BANK_CITY = "bank_city";
public static final String COL_BANK_ADDRESS = "bank_address";
public static final String COL_BANK_STATE = "bank_state";
public static final String COL_IDCARD_NO = "idcard_no";
public static final String COL_IDCARD_PIC_FRONT = "idcard_pic_front";
public static final String COL_IDCARD_PIC_BACK = "idcard_pic_back";
public static final String COL_BUSINESS_LICENSE = "business_license";
public static final String COL_TAX_NUMBER = "tax_number";
public static final String COL_COMPANY_ADDRESS = "company_address";
public static final String COL_COMPANY_PHONE = "company_phone";
public static final String COL_QUOTA_NODE = "quota_node";
public static final String COL_TAX_RATE = "tax_rate";
public static final String COL_START_TIME = "start_time";
public static final String COL_CREATE_TIME = "create_time";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_DELETED_AT = "deleted_at";
public static final String COL_IS_DEFAULT = "is_default";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;
@Data
@TableName(value = "agent_income_summary")
public class AgentIncomeSummary implements Serializable {
/**
* ID序号
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 用户id
*/
@TableField(value = "user_id")
private Integer userId;
/**
* 代理商id
*/
@TableField(value = "agent_id")
private Integer agentId;
/**
* 年份
*/
@TableField(value = "yeartime")
private Integer yeartime;
/**
* 月份
*/
@TableField(value = "monthtime")
private Integer monthtime;
/**
* 结算金额
*/
@TableField(value = "income")
private BigDecimal income;
/**
* 结算内容
*/
@TableField(value = "content")
private String content;
/**
* 结算状态 10未结算20已结算
*/
@TableField(value = "state")
private Integer state;
/**
* 结算时间
*/
@TableField(value = "settle_time")
private Integer settleTime;
/**
* 创建时间
*/
@TableField(value = "created_at")
private Integer createdAt;
/**
* 更新时间
*/
@TableField(value = "updated_at")
private Integer updatedAt;
private static final long serialVersionUID = 1L;
public static final String COL_USER_ID = "user_id";
public static final String COL_AGENT_ID = "agent_id";
public static final String COL_YEARTIME = "yeartime";
public static final String COL_MONTHTIME = "monthtime";
public static final String COL_INCOME = "income";
public static final String COL_CONTENT = "content";
public static final String COL_STATE = "state";
public static final String COL_SETTLE_TIME = "settle_time";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import lombok.Data;
@Data
@TableName(value = "agent_revoke_records")
public class AgentRevokeRecords implements Serializable {
/**
* 主键id
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 订单id
*/
@TableField(value = "order_id")
private String orderId;
/**
* 用户id(被邀请者的用户id)
*/
@TableField(value = "user_id")
private Long userId;
/**
* 回收的关联id
*/
@TableField(value = "ref_id")
private String refId;
/**
* 回收类型:100 邀请奖励的回收,120分享赚奖励的回收
*/
@TableField(value = "revoke_type")
private Integer revokeType;
/**
* 100 未处理 200处理成功
*/
@TableField(value = "state")
private Integer state;
/**
* 创建时间
*/
@TableField(value = "created_at")
private Long createdAt;
/**
* 更新时间
*/
@TableField(value = "updated_at")
private Long updatedAt;
/**
* 订单类型
*/
@TableField(value = "order_type")
private String orderType;
/**
* 订单号
*/
@TableField(value = "order_sn")
private String orderSn;
/**
* 子订单号
*/
@TableField(value = "sub_order_sn")
private String subOrderSn;
private static final long serialVersionUID = 1L;
public static final String COL_ORDER_ID = "order_id";
public static final String COL_USER_ID = "user_id";
public static final String COL_REF_ID = "ref_id";
public static final String COL_REVOKE_TYPE = "revoke_type";
public static final String COL_STATE = "state";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_ORDER_TYPE = "order_type";
public static final String COL_ORDER_SN = "order_sn";
public static final String COL_SUB_ORDER_SN = "sub_order_sn";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
@TableName(value = "agent_reward")
public class AgentReward implements Serializable {
/**
* ID序号
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 代理商id
*/
@TableField(value = "agent_id")
private Integer agentId;
/**
* 代理商等级
*/
@TableField(value = "agent_level")
private Integer agentLevel;
/**
* 用户id
*/
@TableField(value = "user_id")
private Integer userId;
/**
* 奖励类型 40 开卡奖励 50 充值奖励 30 购买VIP会员 20 购买超级VIP会员 60 分享赚 300 自购省 得的购买年-VIP; 720 城市代理商所得的购买半年-VIP; 730 城市代理商所得的购买超级VIP收益; 740 城市代理商的红包收益; 750 城市代理商的自购省收益; 760 城市代理商的分享赚收益
*/
@TableField(value = "reward_type")
private Integer rewardType;
/**
* 子类型 good_friend:好友奖励
*/
@TableField(value = "reward_type_child")
private String rewardTypeChild;
/**
* 来源类型 good_friend:好友奖励 空:非好友奖励
*/
@TableField(value = "source_type_v")
private String sourceTypeV;
/**
* 描述
*/
@TableField(value = "reward_remark")
private String rewardRemark;
/**
* 状态 100正常 99 错误
*/
@TableField(value = "reward_status")
private Integer rewardStatus;
/**
* 卡面值
*/
@TableField(value = "money")
private BigDecimal money;
/**
* 奖励金额
*/
@TableField(value = "amount")
private BigDecimal amount;
/**
* 充值支付金额或许充值卡卡号
*/
@TableField(value = "cash_code")
private String cashCode;
/**
* 用户充值时间
*/
@TableField(value = "recharge_time")
private Date rechargeTime;
/**
* 可分红总额
*/
@TableField(value = "commission_acount")
private BigDecimal commissionAcount;
/**
* 比例值
*/
@TableField(value = "commission_rate")
private BigDecimal commissionRate;
/**
* 得到分红值
*/
@TableField(value = "commission")
private BigDecimal commission;
/**
* 相关id 产品或许充值卡相关id
*/
@TableField(value = "reference_id")
private Long referenceId;
/**
* 结算状态 100在路上 200预结算 300已结算 -100在路上已失效 -200预结算已失效 -300已结算扣回
*/
@TableField(value = "settle_state")
private Integer settleState;
/**
* 来源订单 与order表的order_id 关联
*/
@TableField(value = "source_order")
private String sourceOrder;
/**
* 源用户id
*/
@TableField(value = "source_user_id")
private Integer sourceUserId;
/**
* 源用户等级
*/
@TableField(value = "source_user_level")
private Integer sourceUserLevel;
/**
* 商品id
*/
@TableField(value = "goods_id")
private String goodsId;
/**
* 标题
*/
@TableField(value = "title")
private String title;
/**
* 订单类型
*/
@TableField(value = "order_type")
private String orderType;
/**
* 订单号
*/
@TableField(value = "order_sn")
private String orderSn;
/**
* 子订单号
*/
@TableField(value = "sub_order_sn")
private String subOrderSn;
/**
* 描述信息 比如充值卡或许充值卡信息
*/
@TableField(value = "reward_extend")
private String rewardExtend;
@TableField(value = "created_at")
private Long createdAt;
@TableField(value = "updated_at")
private Long updatedAt;
@TableField(value = "deleted_at")
private Long deletedAt;
/**
* 创建时间
*/
@TableField(value = "create_time")
private Date createTime;
/**
* 来源基础金额
*/
@TableField(value = "all_money_ori")
private BigDecimal allMoneyOri;
/**
* 该金额所有的计算比率值
*/
@TableField(value = "ratio_all")
private String ratioAll;
/**
* 结算奖励的时间: 淘宝客/京东联盟为确认收货时间, 其他类型奖励同于recharge_time
*/
@TableField(value = "settle_time")
private Date settleTime;
/**
* 是否提前结算: 1是,0否
*/
@TableField(value = "settle_in_advance")
private Integer settleInAdvance;
private static final long serialVersionUID = 1L;
public static final String COL_AGENT_ID = "agent_id";
public static final String COL_AGENT_LEVEL = "agent_level";
public static final String COL_USER_ID = "user_id";
public static final String COL_REWARD_TYPE = "reward_type";
public static final String COL_REWARD_TYPE_CHILD = "reward_type_child";
public static final String COL_SOURCE_TYPE_V = "source_type_v";
public static final String COL_REWARD_REMARK = "reward_remark";
public static final String COL_REWARD_STATUS = "reward_status";
public static final String COL_MONEY = "money";
public static final String COL_AMOUNT = "amount";
public static final String COL_CASH_CODE = "cash_code";
public static final String COL_RECHARGE_TIME = "recharge_time";
public static final String COL_COMMISSION_ACOUNT = "commission_acount";
public static final String COL_COMMISSION_RATE = "commission_rate";
public static final String COL_COMMISSION = "commission";
public static final String COL_REFERENCE_ID = "reference_id";
public static final String COL_SETTLE_STATE = "settle_state";
public static final String COL_SOURCE_ORDER = "source_order";
public static final String COL_SOURCE_USER_ID = "source_user_id";
public static final String COL_SOURCE_USER_LEVEL = "source_user_level";
public static final String COL_GOODS_ID = "goods_id";
public static final String COL_TITLE = "title";
public static final String COL_ORDER_TYPE = "order_type";
public static final String COL_ORDER_SN = "order_sn";
public static final String COL_SUB_ORDER_SN = "sub_order_sn";
public static final String COL_REWARD_EXTEND = "reward_extend";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_DELETED_AT = "deleted_at";
public static final String COL_CREATE_TIME = "create_time";
public static final String COL_ALL_MONEY_ORI = "all_money_ori";
public static final String COL_RATIO_ALL = "ratio_all";
public static final String COL_SETTLE_TIME = "settle_time";
public static final String COL_SETTLE_IN_ADVANCE = "settle_in_advance";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@Data
@TableName(value = "agent_salary")
public class AgentSalary implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 代理商用户ID
*/
@TableField(value = "user_id")
private Integer userId;
/**
* 代理商ID
*/
@TableField(value = "agent_id")
private Integer agentId;
/**
* 年份时间值
*/
@TableField(value = "yeartime")
private Integer yeartime;
/**
* 月份值
*/
@TableField(value = "monthtime")
private Integer monthtime;
/**
* 月份
*/
@TableField(value = "month")
private String month;
/**
* 总金额
*/
@TableField(value = "balance")
private BigDecimal balance;
/**
* 开卡奖励金额
*/
@TableField(value = "opencard_balance")
private BigDecimal opencardBalance;
/**
* 充值奖励金额
*/
@TableField(value = "recharge_balance")
private BigDecimal rechargeBalance;
/**
* 购买VIP会员奖励金额
*/
@TableField(value = "upgrade_balance")
private BigDecimal upgradeBalance;
/**
* 购买超级VIP会员奖励金额
*/
@TableField(value = "upgrade_super_balance")
private BigDecimal upgradeSuperBalance;
/**
* 分享赚奖励
*/
@TableField(value = "share_balance")
private BigDecimal shareBalance;
/**
* 缴税金额
*/
@TableField(value = "tax_balance")
private BigDecimal taxBalance;
/**
* 自购省奖励金额
*/
@TableField(value = "zigousheng_balance")
private BigDecimal zigoushengBalance;
/**
* 来自城市代理商的平推奖励
*/
@TableField(value = "pingtui_balance")
private BigDecimal pingtuiBalance;
/**
* 技术服务费
*/
@TableField(value = "tech_charge")
private BigDecimal techCharge;
/**
* 红包技术服务费
*/
@TableField(value = "tech_charge_redpack")
private BigDecimal techChargeRedpack;
/**
* 佣金技术服务费
*/
@TableField(value = "tech_charge_order")
private BigDecimal techChargeOrder;
/**
* 姓名或许公司名称
*/
@TableField(value = "bank_account")
private String bankAccount;
/**
* 卡号
*/
@TableField(value = "bank_card_number")
private String bankCardNumber;
/**
* 银行名称
*/
@TableField(value = "bank_name")
private String bankName;
/**
* 支行名称
*/
@TableField(value = "branch_name")
private String branchName;
/**
* 关联的银行绑定id
*/
@TableField(value = "reference_id")
private Long referenceId;
/**
* 状态 10待提现 20已提现
*/
@TableField(value = "status")
private Integer status;
/**
* 创建时间
*/
@TableField(value = "create_time")
private Date createTime;
/**
* 提现时间
*/
@TableField(value = "modify_time")
private Date modifyTime;
@TableField(value = "created_at")
private Long createdAt;
@TableField(value = "updated_at")
private Long updatedAt;
@TableField(value = "deleted_at")
private Long deletedAt;
private static final long serialVersionUID = 1L;
public static final String COL_USER_ID = "user_id";
public static final String COL_AGENT_ID = "agent_id";
public static final String COL_YEARTIME = "yeartime";
public static final String COL_MONTHTIME = "monthtime";
public static final String COL_MONTH = "month";
public static final String COL_BALANCE = "balance";
public static final String COL_OPENCARD_BALANCE = "opencard_balance";
public static final String COL_RECHARGE_BALANCE = "recharge_balance";
public static final String COL_UPGRADE_BALANCE = "upgrade_balance";
public static final String COL_UPGRADE_SUPER_BALANCE = "upgrade_super_balance";
public static final String COL_SHARE_BALANCE = "share_balance";
public static final String COL_TAX_BALANCE = "tax_balance";
public static final String COL_ZIGOUSHENG_BALANCE = "zigousheng_balance";
public static final String COL_PINGTUI_BALANCE = "pingtui_balance";
public static final String COL_TECH_CHARGE = "tech_charge";
public static final String COL_TECH_CHARGE_REDPACK = "tech_charge_redpack";
public static final String COL_TECH_CHARGE_ORDER = "tech_charge_order";
public static final String COL_BANK_ACCOUNT = "bank_account";
public static final String COL_BANK_CARD_NUMBER = "bank_card_number";
public static final String COL_BANK_NAME = "bank_name";
public static final String COL_BRANCH_NAME = "branch_name";
public static final String COL_REFERENCE_ID = "reference_id";
public static final String COL_STATUS = "status";
public static final String COL_CREATE_TIME = "create_time";
public static final String COL_MODIFY_TIME = "modify_time";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_DELETED_AT = "deleted_at";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;
@Data
@TableName(value = "new_recruits_exclusive_log")
public class NewRecruitsExclusiveLog implements Serializable {
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 1:签到、2:呼呼
*/
@TableField(value = "app_id")
private Integer appId;
/**
* 商品id
*/
@TableField(value = "union_id")
private String unionId;
/**
* 到手价
*/
@TableField(value = "to_get_price")
private BigDecimal toGetPrice;
/**
* 开始时间
*/
@TableField(value = "start_time")
private Long startTime;
/**
* 结束时间
*/
@TableField(value = "end_time")
private Long endTime;
/**
* 创建时间
*/
@TableField(value = "created_at")
private Long createdAt;
/**
* 修改时间
*/
@TableField(value = "updated_at")
private Long updatedAt;
/**
* 最高补贴价
*/
@TableField(value = "max_subsidy_price")
private BigDecimal maxSubsidyPrice;
/**
* 平台价
*/
@TableField(value = "final_price")
private BigDecimal finalPrice;
/**
* 佣金比例
*/
@TableField(value = "commission_rate")
private BigDecimal commissionRate;
/**
* 优惠券价格
*/
@TableField(value = "coupon_amout")
private BigDecimal couponAmout;
private static final long serialVersionUID = 1L;
public static final String COL_APP_ID = "app_id";
public static final String COL_UNION_ID = "union_id";
public static final String COL_TO_GET_PRICE = "to_get_price";
public static final String COL_START_TIME = "start_time";
public static final String COL_END_TIME = "end_time";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_MAX_SUBSIDY_PRICE = "max_subsidy_price";
public static final String COL_FINAL_PRICE = "final_price";
public static final String COL_COMMISSION_RATE = "commission_rate";
public static final String COL_COUPON_AMOUT = "coupon_amout";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
@Data
@TableName(value = "order_taobao_jd_commission")
public class OrderTaobaoJdCommission implements Serializable {
/**
* 订单类型 taobao:淘宝,jd:京东
*/
@TableId(value = "type", type = IdType.INPUT)
private String type;
/**
* 订单号
*/
@TableId(value = "order_sn", type = IdType.INPUT)
private String orderSn;
/**
* 父订单号
*/
@TableField(value = "order_sn_parent")
private String orderSnParent;
/**
* 是否是父订单
*/
@TableField(value = "is_parent")
private Integer isParent;
/**
* 标题
*/
@TableField(value = "title")
private String title;
/**
* 预估佣金
*/
@TableField(value = "estimate_effect")
private BigDecimal estimateEffect;
/**
* 实际结算佣金
*/
@TableField(value = "commission_amount")
private BigDecimal commissionAmount;
/**
* 维权退款返还佣金
*/
@TableField(value = "refund_amount")
private BigDecimal refundAmount;
/**
* 变现金额
*/
@TableField(value = "money")
private BigDecimal money;
/**
* 乘系数之前的给用户返佣金额
*/
@TableField(value = "all_money")
private BigDecimal allMoney;
/**
* 0未付款 1付款 3 结算 -3失效
*/
@TableField(value = "status")
private Integer status;
/**
* 订单创建时间
*/
@TableField(value = "create_time")
private LocalDateTime createTime;
/**
* 结算时间
*/
@TableField(value = "settle_time")
private LocalDateTime settleTime;
/**
* 倒计时最后时间
*/
@TableField(value = "last_time")
private LocalDateTime lastTime;
/**
* 用户实际支付金额
*/
@TableField(value = "amount")
private BigDecimal amount;
@TableField(value = "created_at")
private Integer createdAt;
@TableField(value = "updated_at")
private Integer updatedAt;
@TableField(value = "deleted_at")
private Integer deletedAt;
@TableField(value = "user_id")
private Integer userId;
/**
* 100 待激活 200 待结算 300 已结算
*/
@TableField(value = "active_state")
private Integer activeState;
@TableField(value = "post_time")
private LocalDateTime postTime;
@TableField(value = "active_time")
private LocalDateTime activeTime;
/**
* 广告位名称
*/
@TableField(value = "pname")
private String pname;
/**
* 是否预付订金订单 1是0否
*/
@TableField(value = "has_deposit")
private Integer hasDeposit;
/**
* 已激活用户显示当前佣金, 新用户显示预估佣金
*/
@TableField(value = "commission_snapshot")
private BigDecimal commissionSnapshot;
/**
* 是否是新人专享
*/
@TableField(value = "is_for_new")
private Integer isForNew;
/**
* 呼呼补贴金额快照
*/
@TableField(value = "huhu_subsidy_snapshot")
private BigDecimal huhuSubsidySnapshot;
/**
* 呼呼补贴金额实际
*/
@TableField(value = "huhu_subsidy_actual")
private BigDecimal huhuSubsidyActual;
/**
* 不给呼呼邀请奖励: 1不给 0给
*/
@TableField(value = "no_invite_reward")
private Integer noInviteReward;
/**
* 商品购买数量
*/
@TableField(value = "goods_cnt")
private Integer goodsCnt;
/**
* 呼呼返佣比例
*/
@TableField(value = "huhu_commission_rate")
private BigDecimal huhuCommissionRate;
@TableField(value = "insert_time")
private LocalDateTime insertTime;
/**
* 新人专享订单最多返给用户金额
*/
@TableField(value = "huhu_subsidy_max")
private BigDecimal huhuSubsidyMax;
private static final long serialVersionUID = 1L;
public static final String COL_ORDER_SN_PARENT = "order_sn_parent";
public static final String COL_IS_PARENT = "is_parent";
public static final String COL_TITLE = "title";
public static final String COL_ESTIMATE_EFFECT = "estimate_effect";
public static final String COL_COMMISSION_AMOUNT = "commission_amount";
public static final String COL_REFUND_AMOUNT = "refund_amount";
public static final String COL_MONEY = "money";
public static final String COL_ALL_MONEY = "all_money";
public static final String COL_STATUS = "status";
public static final String COL_CREATE_TIME = "create_time";
public static final String COL_SETTLE_TIME = "settle_time";
public static final String COL_LAST_TIME = "last_time";
public static final String COL_AMOUNT = "amount";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_DELETED_AT = "deleted_at";
public static final String COL_USER_ID = "user_id";
public static final String COL_ACTIVE_STATE = "active_state";
public static final String COL_POST_TIME = "post_time";
public static final String COL_ACTIVE_TIME = "active_time";
public static final String COL_PNAME = "pname";
public static final String COL_HAS_DEPOSIT = "has_deposit";
public static final String COL_COMMISSION_SNAPSHOT = "commission_snapshot";
public static final String COL_IS_FOR_NEW = "is_for_new";
public static final String COL_HUHU_SUBSIDY_SNAPSHOT = "huhu_subsidy_snapshot";
public static final String COL_HUHU_SUBSIDY_ACTUAL = "huhu_subsidy_actual";
public static final String COL_NO_INVITE_REWARD = "no_invite_reward";
public static final String COL_GOODS_CNT = "goods_cnt";
public static final String COL_HUHU_COMMISSION_RATE = "huhu_commission_rate";
public static final String COL_INSERT_TIME = "insert_time";
public static final String COL_HUHU_SUBSIDY_MAX = "huhu_subsidy_max";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
@Data
@TableName(value = "order_taobao_jd_goods_commission")
public class OrderTaobaoJdGoodsCommission implements Serializable {
/**
* 订单类型 taobao:淘宝,jd:京东
*/
@TableId(value = "type", type = IdType.INPUT)
private String type;
/**
* 订单号
*/
@TableId(value = "order_sn", type = IdType.INPUT)
private String orderSn;
/**
* 子订单编号
*/
@TableId(value = "sub_order_sn", type = IdType.INPUT)
private String subOrderSn;
/**
* 父订单号
*/
@TableField(value = "order_sn_parent")
private String orderSnParent;
/**
* 是否是父订单
*/
@TableField(value = "is_parent")
private Integer isParent;
/**
* 商品id
*/
@TableField(value = "goods_id")
private String goodsId;
/**
* 商品数
*/
@TableField(value = "goods_cnt")
private Integer goodsCnt;
/**
* 标题
*/
@TableField(value = "title")
private String title;
/**
* 预估佣金
*/
@TableField(value = "estimate_effect")
private BigDecimal estimateEffect;
/**
* 实际结算佣金
*/
@TableField(value = "commission_amount")
private BigDecimal commissionAmount;
/**
* 0未付款 1付款 2成功 3结算 -3失效
*/
@TableField(value = "order_state")
private Integer orderState;
/**
* 订单创建时间
*/
@TableField(value = "create_time")
private LocalDateTime createTime;
/**
* 结算时间
*/
@TableField(value = "settle_time")
private LocalDateTime settleTime;
/**
* 用户下单时支付金额
*/
@TableField(value = "order_amount")
private BigDecimal orderAmount;
/**
* 用户实际支付金额
*/
@TableField(value = "check_amount")
private BigDecimal checkAmount;
/**
* 是否预付订金订单 1是0否
*/
@TableField(value = "has_deposit")
private Integer hasDeposit;
/**
* 是否新人专享
*/
@TableField(value = "is_for_new")
private Integer isForNew;
/**
* 如果新人专享有多条,此为排序,只按排序值为1的结算补贴
*/
@TableField(value = "for_new_rank")
private Integer forNewRank;
/**
* 呼呼新人专享补贴快照
*/
@TableField(value = "huhu_subsidy_snapshot")
private BigDecimal huhuSubsidySnapshot;
/**
* 广告位名称
*/
@TableField(value = "pname")
private String pname;
/**
* 不给合伙人奖励: 1不给 0给
*/
@TableField(value = "no_invite_reward")
private Integer noInviteReward;
/**
* 呼呼新人专享实际补贴
*/
@TableField(value = "huhu_subsidy_actual")
private BigDecimal huhuSubsidyActual;
/**
* 呼呼新人专享实际补贴
*/
@TableField(value = "commission_snapshot")
private BigDecimal commissionSnapshot;
/**
* 呼呼给用户结算的佣金
*/
@TableField(value = "money")
private BigDecimal money;
/**
* 淘宝/京东/天猫
*/
@TableField(value = "order_type")
private String orderType;
/**
* 是否有维权退款
*/
@TableField(value = "has_refund")
private Integer hasRefund;
/**
* 是否京东PLUS
*/
@TableField(value = "is_jd_plus")
private Integer isJdPlus;
/**
* 乘系数之前的结算佣金
*/
@TableField(value = "all_money")
private BigDecimal allMoney;
/**
* 维权退款扣回佣金
*/
@TableField(value = "refund_amount")
private BigDecimal refundAmount;
/**
* 呼呼返佣比例
*/
@TableField(value = "huhu_commission_rate")
private BigDecimal huhuCommissionRate;
/**
* 是否大淘客分享订单
*/
@TableField(value = "is_share_order")
private Integer isShareOrder;
/**
* 插入时间
*/
@TableField(value = "insert_time")
private LocalDateTime insertTime;
/**
* 新人专享到手价
*/
@TableField(value = "to_get_price")
private BigDecimal toGetPrice;
/**
* 用户角色: 10普通,20VIP,30超V
*/
@TableField(value = "self_role")
private Integer selfRole;
/**
* 累计更新次数
*/
@TableField(value = "update_times")
private Integer updateTimes;
/**
* 新人专享订单最多返给用户金额
*/
@TableField(value = "huhu_subsidy_max")
private BigDecimal huhuSubsidyMax;
private static final long serialVersionUID = 1L;
public static final String COL_ORDER_SN_PARENT = "order_sn_parent";
public static final String COL_IS_PARENT = "is_parent";
public static final String COL_GOODS_ID = "goods_id";
public static final String COL_GOODS_CNT = "goods_cnt";
public static final String COL_TITLE = "title";
public static final String COL_ESTIMATE_EFFECT = "estimate_effect";
public static final String COL_COMMISSION_AMOUNT = "commission_amount";
public static final String COL_ORDER_STATE = "order_state";
public static final String COL_CREATE_TIME = "create_time";
public static final String COL_SETTLE_TIME = "settle_time";
public static final String COL_ORDER_AMOUNT = "order_amount";
public static final String COL_CHECK_AMOUNT = "check_amount";
public static final String COL_HAS_DEPOSIT = "has_deposit";
public static final String COL_IS_FOR_NEW = "is_for_new";
public static final String COL_FOR_NEW_RANK = "for_new_rank";
public static final String COL_HUHU_SUBSIDY_SNAPSHOT = "huhu_subsidy_snapshot";
public static final String COL_PNAME = "pname";
public static final String COL_NO_INVITE_REWARD = "no_invite_reward";
public static final String COL_HUHU_SUBSIDY_ACTUAL = "huhu_subsidy_actual";
public static final String COL_COMMISSION_SNAPSHOT = "commission_snapshot";
public static final String COL_MONEY = "money";
public static final String COL_ORDER_TYPE = "order_type";
public static final String COL_HAS_REFUND = "has_refund";
public static final String COL_IS_JD_PLUS = "is_jd_plus";
public static final String COL_ALL_MONEY = "all_money";
public static final String COL_REFUND_AMOUNT = "refund_amount";
public static final String COL_HUHU_COMMISSION_RATE = "huhu_commission_rate";
public static final String COL_IS_SHARE_ORDER = "is_share_order";
public static final String COL_INSERT_TIME = "insert_time";
public static final String COL_TO_GET_PRICE = "to_get_price";
public static final String COL_SELF_ROLE = "self_role";
public static final String COL_UPDATE_TIMES = "update_times";
public static final String COL_HUHU_SUBSIDY_MAX = "huhu_subsidy_max";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import lombok.Data;
@Data
@TableName(value = "orders_active")
public class OrdersActive implements Serializable {
/**
* id序号
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 系统订单号
*/
@TableField(value = "order_id")
private String orderId;
/**
* 用户id
*/
@TableField(value = "user_id")
private Integer userId;
/**
* 订单号
*/
@TableField(value = "order_sn")
private String orderSn;
/**
* 订单类型 taobao:淘宝,jd:京东
*/
@TableField(value = "type")
private String type;
/**
* 标题
*/
@TableField(value = "title")
private String title;
/**
* 已激活用户显示当前佣金, 新用户显示预估佣金
*/
@TableField(value = "commission_snapshot")
private BigDecimal commissionSnapshot;
/**
* 预估佣金(不乘百分比的值)
*/
@TableField(value = "estimate_effect")
private BigDecimal estimateEffect;
/**
* 实际结算佣金(商家给呼呼结算的佣金)
*/
@TableField(value = "commission_amount")
private BigDecimal commissionAmount;
/**
* 维权退款返还佣金
*/
@TableField(value = "refund_amount")
private BigDecimal refundAmount;
/**
* 乘系数之前的给用户返佣金额(暂定)
*/
@TableField(value = "all_money")
private BigDecimal allMoney;
/**
* 结算金额(最终给用户结算金额)
*/
@TableField(value = "money")
private BigDecimal money;
/**
* 0未付款 1付款 3 结算 -3失效
*/
@TableField(value = "status")
private Integer status;
/**
* 订单创建时间
*/
@TableField(value = "create_time")
private LocalDateTime createTime;
/**
* 结算时间
*/
@TableField(value = "settle_time")
private LocalDateTime settleTime;
/**
* 倒计时最后时间
*/
@TableField(value = "last_time")
private LocalDateTime lastTime;
/**
* 用户实际支付金额
*/
@TableField(value = "amount")
private BigDecimal amount;
/**
* 是否是新人专享
*/
@TableField(value = "is_for_new")
private Integer isForNew;
/**
* 呼呼补贴金额快照
*/
@TableField(value = "huhu_subsidy_snapshot")
private BigDecimal huhuSubsidySnapshot;
/**
* 呼呼补贴金额实际
*/
@TableField(value = "huhu_subsidy_actual")
private BigDecimal huhuSubsidyActual;
/**
* 100 待激活 200 待结算 300 已结算 -100已失效
*/
@TableField(value = "active_state")
private Integer activeState;
/**
* 提交时间
*/
@TableField(value = "post_time")
private LocalDateTime postTime;
/**
* 激活时间
*/
@TableField(value = "active_time")
private LocalDateTime activeTime;
/**
* 创建时间
*/
@TableField(value = "created_at")
private Integer createdAt;
/**
* 系统结算时间
*/
@TableField(value = "updated_at")
private Integer updatedAt;
/**
* 是否预付订金订单 1是0否
*/
@TableField(value = "has_deposit")
private Integer hasDeposit;
/**
* 首提金额 0.00 默认不是首提
*/
@TableField(value = "first_withdraw_cash")
private BigDecimal firstWithdrawCash;
/**
* 是否首提 0否1是
*/
@TableField(value = "is_first_withdraw")
private Boolean isFirstWithdraw;
/**
* 是否拆单 0否1是
*/
@TableField(value = "is_split_order")
private Boolean isSplitOrder;
/**
* 父订单号
*/
@TableField(value = "parent_order_sn")
private String parentOrderSn;
/**
* 是否给合伙人奖励1不给0给
*/
@TableField(value = "no_invite_reward")
private Boolean noInviteReward;
/**
* 商品购买数量
*/
@TableField(value = "goods_cnt")
private Integer goodsCnt;
/**
* 订单状态200:待兑换 ;100:已兑换; 300:已失效
*/
@TableField(value = "order_state")
private Integer orderState;
/**
* 金额结算的父订单号
*/
@TableField(value = "settlement_parent_order_sn")
private String settlementParentOrderSn;
/**
* 是否结余订单(尾款单) 0:否;1:是
*/
@TableField(value = "is_surplus_order")
private Integer isSurplusOrder;
/**
* 是否消费红包,100消费 200不消费 0默认
*/
@TableField(value = "is_consume_money")
private Integer isConsumeMoney;
/**
* 是否可以提前结算的订单100 不是 200是提前7天 300是秒提
*/
@TableField(value = "is_advance_settle_order")
private Integer isAdvanceSettleOrder;
/**
* 激活订单的身份快照 0普通 100高级月vip 200高级半年vip 300高级年度vip 400超级月vip 500 超级年度vip
*/
@TableField(value = "active_identity")
private Integer activeIdentity;
/**
* 是否推送过结算任务0否1是
*/
@TableField(value = "is_push_settle_task")
private Integer isPushSettleTask;
/**
* 默认0 100助力 80非
*/
@TableField(value = "is_assist")
private Integer isAssist;
/**
* 最高比例
*/
@TableField(value = "max_rate")
private BigDecimal maxRate;
/**
* 最低比例
*/
@TableField(value = "mini_rate")
private BigDecimal miniRate;
private static final long serialVersionUID = 1L;
public static final String COL_ORDER_ID = "order_id";
public static final String COL_USER_ID = "user_id";
public static final String COL_ORDER_SN = "order_sn";
public static final String COL_TYPE = "type";
public static final String COL_TITLE = "title";
public static final String COL_COMMISSION_SNAPSHOT = "commission_snapshot";
public static final String COL_ESTIMATE_EFFECT = "estimate_effect";
public static final String COL_COMMISSION_AMOUNT = "commission_amount";
public static final String COL_REFUND_AMOUNT = "refund_amount";
public static final String COL_ALL_MONEY = "all_money";
public static final String COL_MONEY = "money";
public static final String COL_STATUS = "status";
public static final String COL_CREATE_TIME = "create_time";
public static final String COL_SETTLE_TIME = "settle_time";
public static final String COL_LAST_TIME = "last_time";
public static final String COL_AMOUNT = "amount";
public static final String COL_IS_FOR_NEW = "is_for_new";
public static final String COL_HUHU_SUBSIDY_SNAPSHOT = "huhu_subsidy_snapshot";
public static final String COL_HUHU_SUBSIDY_ACTUAL = "huhu_subsidy_actual";
public static final String COL_ACTIVE_STATE = "active_state";
public static final String COL_POST_TIME = "post_time";
public static final String COL_ACTIVE_TIME = "active_time";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_HAS_DEPOSIT = "has_deposit";
public static final String COL_FIRST_WITHDRAW_CASH = "first_withdraw_cash";
public static final String COL_IS_FIRST_WITHDRAW = "is_first_withdraw";
public static final String COL_IS_SPLIT_ORDER = "is_split_order";
public static final String COL_PARENT_ORDER_SN = "parent_order_sn";
public static final String COL_NO_INVITE_REWARD = "no_invite_reward";
public static final String COL_GOODS_CNT = "goods_cnt";
public static final String COL_ORDER_STATE = "order_state";
public static final String COL_SETTLEMENT_PARENT_ORDER_SN = "settlement_parent_order_sn";
public static final String COL_IS_SURPLUS_ORDER = "is_surplus_order";
public static final String COL_IS_CONSUME_MONEY = "is_consume_money";
public static final String COL_IS_ADVANCE_SETTLE_ORDER = "is_advance_settle_order";
public static final String COL_ACTIVE_IDENTITY = "active_identity";
public static final String COL_IS_PUSH_SETTLE_TASK = "is_push_settle_task";
public static final String COL_IS_ASSIST = "is_assist";
public static final String COL_MAX_RATE = "max_rate";
public static final String COL_MINI_RATE = "mini_rate";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
@TableName(value = "partner_account_log")
public class PartnerAccountLog implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 用户id
*/
@TableField(value = "user_id")
private Integer userId;
/**
* 年份
*/
@TableField(value = "yeartime")
private Integer yeartime;
/**
* 月份
*/
@TableField(value = "monthtime")
private Integer monthtime;
/**
* 每日日期
*/
@TableField(value = "daytime")
private Integer daytime;
/**
* 变化类型 10 微信 20支付宝 30 银联 40 银行卡 、50呼呼结算、60首月奖励 、70税费、80平台服务费、90平台扣除
*/
@TableField(value = "type")
private Integer type;
/**
* 变化的金额 进账为正数 出账为负数
*/
@TableField(value = "change_num")
private BigDecimal changeNum;
/**
* 变化的之后的金额
*/
@TableField(value = "changed_amount")
private BigDecimal changedAmount;
/**
* 变更的当前时间戳 秒级
*/
@TableField(value = "change_time")
private Integer changeTime;
/**
* 状态 20是已经处理(充值后者减值,10是待处理)
*/
@TableField(value = "pay_state")
private Integer payState;
/**
* 支付平台 系统hupay、微信wxpay、支付宝 alipay 、银联支付 unionpay 、银行卡cardpay
*/
@TableField(value = "pay_platform")
private String payPlatform;
/**
* 支付类型,10充值,20消费,30提现,40退款, 50合伙人奖励,60充值奖励,70 激活现金,80提现回退,90系统赠送,100系统扣除,110呼呼按月结算,120首月奖励
*/
@TableField(value = "pay_type")
private Boolean payType;
/**
* 类型描述 与pay_type 对应
*/
@TableField(value = "pay_remark")
private String payRemark;
/**
* 文字描述
*/
@TableField(value = "pay_info")
private String payInfo;
/**
* 参考ID 就是发生变化的订单id 支付 充值 提现、奖励的主键id
*/
@TableField(value = "reference_id")
private String referenceId;
@TableField(value = "create_time")
private LocalDateTime createTime;
@TableField(value = "modify_time")
private LocalDateTime modifyTime;
/**
* 变更前的快照
*/
@TableField(value = "snapshot")
private String snapshot;
private static final long serialVersionUID = 1L;
public static final String COL_USER_ID = "user_id";
public static final String COL_YEARTIME = "yeartime";
public static final String COL_MONTHTIME = "monthtime";
public static final String COL_DAYTIME = "daytime";
public static final String COL_TYPE = "type";
public static final String COL_CHANGE_NUM = "change_num";
public static final String COL_CHANGED_AMOUNT = "changed_amount";
public static final String COL_CHANGE_TIME = "change_time";
public static final String COL_PAY_STATE = "pay_state";
public static final String COL_PAY_PLATFORM = "pay_platform";
public static final String COL_PAY_TYPE = "pay_type";
public static final String COL_PAY_REMARK = "pay_remark";
public static final String COL_PAY_INFO = "pay_info";
public static final String COL_REFERENCE_ID = "reference_id";
public static final String COL_CREATE_TIME = "create_time";
public static final String COL_MODIFY_TIME = "modify_time";
public static final String COL_SNAPSHOT = "snapshot";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;
@Data
@TableName(value = "partner_activation_relation_record")
public class PartnerActivationRelationRecord implements Serializable {
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 激活奖励规则表主键
*/
@TableField(value = "rid")
private Integer rid;
/**
* 激活得订单号
*/
@TableField(value = "active_order_id")
private String activeOrderId;
/**
* 激活得订单号类型
*/
@TableField(value = "active_order_type")
private String activeOrderType;
/**
* 直接邀请人ID
*/
@TableField(value = "invite_user_id")
private Integer inviteUserId;
/**
* 直接奖励类型 默认0、10现金 20 红包
*/
@TableField(value = "invite_reward_type")
private Integer inviteRewardType;
/**
* 直接奖励金额
*/
@TableField(value = "invite_amout")
private BigDecimal inviteAmout;
/**
* 间接邀请人ID
*/
@TableField(value = "indirect_invite_uid")
private Integer indirectInviteUid;
/**
* 间接奖励类型 默认0、10现金 20 红包
*/
@TableField(value = "indirect_reward_type")
private Integer indirectRewardType;
/**
* 间接奖励金额
*/
@TableField(value = "indirect_amout")
private BigDecimal indirectAmout;
/**
* 10待奖励 20已结算(高伟 由10改为20) 120 已结算(关晨 由10->120) 30 已返回
*/
@TableField(value = "reward_state")
private Integer rewardState;
/**
* 激活时间
*/
@TableField(value = "active_time")
private Integer activeTime;
/**
* 结算时间
*/
@TableField(value = "settle_time")
private Integer settleTime;
/**
* 创建时间
*/
@TableField(value = "created_at")
private Integer createdAt;
/**
* 修改时间
*/
@TableField(value = "updated_at")
private Integer updatedAt;
private static final long serialVersionUID = 1L;
public static final String COL_RID = "rid";
public static final String COL_ACTIVE_ORDER_ID = "active_order_id";
public static final String COL_ACTIVE_ORDER_TYPE = "active_order_type";
public static final String COL_INVITE_USER_ID = "invite_user_id";
public static final String COL_INVITE_REWARD_TYPE = "invite_reward_type";
public static final String COL_INVITE_AMOUT = "invite_amout";
public static final String COL_INDIRECT_INVITE_UID = "indirect_invite_uid";
public static final String COL_INDIRECT_REWARD_TYPE = "indirect_reward_type";
public static final String COL_INDIRECT_AMOUT = "indirect_amout";
public static final String COL_REWARD_STATE = "reward_state";
public static final String COL_ACTIVE_TIME = "active_time";
public static final String COL_SETTLE_TIME = "settle_time";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;
@Data
@TableName(value = "partner_income_summary")
public class PartnerIncomeSummary implements Serializable {
/**
* ID序号
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 用户id
*/
@TableField(value = "user_id")
private Integer userId;
/**
* 年份
*/
@TableField(value = "yeartime")
private Integer yeartime;
/**
* 月份
*/
@TableField(value = "monthtime")
private Integer monthtime;
/**
* 结算金额
*/
@TableField(value = "income")
private BigDecimal income;
/**
* 结算内容
*/
@TableField(value = "content")
private String content;
/**
* 结算状态 10未结算20已结算
*/
@TableField(value = "state")
private Integer state;
/**
* 结算时间
*/
@TableField(value = "settle_time")
private Integer settleTime;
/**
* 创建时间
*/
@TableField(value = "created_at")
private Integer createdAt;
/**
* 更新时间
*/
@TableField(value = "updated_at")
private Integer updatedAt;
private static final long serialVersionUID = 1L;
public static final String COL_USER_ID = "user_id";
public static final String COL_YEARTIME = "yeartime";
public static final String COL_MONTHTIME = "monthtime";
public static final String COL_INCOME = "income";
public static final String COL_CONTENT = "content";
public static final String COL_STATE = "state";
public static final String COL_SETTLE_TIME = "settle_time";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;
@Data
@TableName(value = "partner_purchase_reward_record")
public class PartnerPurchaseRewardRecord implements Serializable {
/**
* 主键
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 贡献人ID
*/
@TableField(value = "user_id")
private Integer userId;
/**
* 贡献人级别快照 默认0 普通10 高级20 超级30
*/
@TableField(value = "user_level")
private Integer userLevel;
/**
* 激活的订单号
*/
@TableField(value = "active_order_id")
private String activeOrderId;
/**
* 激活得订单号类型
*/
@TableField(value = "active_order_type")
private String activeOrderType;
/**
* 激活得订单号金额
*/
@TableField(value = "active_order_cash")
private BigDecimal activeOrderCash;
/**
* 购物返现比例
*/
@TableField(value = "active_return_cash_proportion")
private BigDecimal activeReturnCashProportion;
/**
* 直接邀请人ID
*/
@TableField(value = "invite_user_id")
private Integer inviteUserId;
/**
* 直接奖励类型 默认0、10现金 20 红包
*/
@TableField(value = "invite_reward_type")
private Integer inviteRewardType;
/**
* 直接级别快照 默认0 普通10 高级20 超级30
*/
@TableField(value = "invite_partner_level")
private Integer invitePartnerLevel;
/**
* 直接奖励金额
*/
@TableField(value = "invite_amout")
private BigDecimal inviteAmout;
/**
* 奖励类型 0 默认 10 直接 20 间接
*/
@TableField(value = "reward_type")
private Integer rewardType;
/**
* 100待奖励 ;120已结算
*/
@TableField(value = "reward_state")
private Integer rewardState;
/**
* 激活时间
*/
@TableField(value = "active_time")
private Integer activeTime;
/**
* 创建时间
*/
@TableField(value = "created_at")
private Integer createdAt;
/**
* 修改时间
*/
@TableField(value = "updated_at")
private Integer updatedAt;
private static final long serialVersionUID = 1L;
public static final String COL_USER_ID = "user_id";
public static final String COL_USER_LEVEL = "user_level";
public static final String COL_ACTIVE_ORDER_ID = "active_order_id";
public static final String COL_ACTIVE_ORDER_TYPE = "active_order_type";
public static final String COL_ACTIVE_ORDER_CASH = "active_order_cash";
public static final String COL_ACTIVE_RETURN_CASH_PROPORTION = "active_return_cash_proportion";
public static final String COL_INVITE_USER_ID = "invite_user_id";
public static final String COL_INVITE_REWARD_TYPE = "invite_reward_type";
public static final String COL_INVITE_PARTNER_LEVEL = "invite_partner_level";
public static final String COL_INVITE_AMOUT = "invite_amout";
public static final String COL_REWARD_TYPE = "reward_type";
public static final String COL_REWARD_STATE = "reward_state";
public static final String COL_ACTIVE_TIME = "active_time";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 java.io.Serializable;
import lombok.Data;
@Data
@TableName(value = "partner_revoke_records")
public class PartnerRevokeRecords implements Serializable {
/**
* 主键id
*/
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
/**
* 订单id
*/
@TableField(value = "order_id")
private String orderId;
/**
* 用户id(被邀请者的用户id)
*/
@TableField(value = "user_id")
private Long userId;
/**
* 回收的关联id
*/
@TableField(value = "ref_id")
private String refId;
/**
* 回收类型:100 邀请奖励的回收,120分享赚奖励的回收
*/
@TableField(value = "revoke_type")
private Integer revokeType;
/**
* 100 未处理 200处理成功
*/
@TableField(value = "state")
private Integer state;
/**
* 创建时间
*/
@TableField(value = "created_at")
private Long createdAt;
/**
* 更新时间
*/
@TableField(value = "updated_at")
private Long updatedAt;
/**
* 订单类型
*/
@TableField(value = "order_type")
private String orderType;
/**
* 订单号
*/
@TableField(value = "order_sn")
private String orderSn;
/**
* 子订单号
*/
@TableField(value = "sub_order_sn")
private String subOrderSn;
private static final long serialVersionUID = 1L;
public static final String COL_ORDER_ID = "order_id";
public static final String COL_USER_ID = "user_id";
public static final String COL_REF_ID = "ref_id";
public static final String COL_REVOKE_TYPE = "revoke_type";
public static final String COL_STATE = "state";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_ORDER_TYPE = "order_type";
public static final String COL_ORDER_SN = "order_sn";
public static final String COL_SUB_ORDER_SN = "sub_order_sn";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
@Data
@TableName(value = "partner_reward")
public class PartnerReward implements Serializable {
/**
* ID序号
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 用户id
*/
@TableField(value = "user_id")
private Integer userId;
/**
* 用户是否是超级
*/
@TableField(value = "user_is_super")
private Integer userIsSuper;
/**
* 用户合伙人级别 普通10 高级20
*/
@TableField(value = "user_partner_level")
private Integer userPartnerLevel;
/**
* 合伙人奖励类型 60 用户在线充值 70 升高开户充值,80邀请奖励,90下单奖励,100购买超级VIP会员,110购物奖励,120分享赚奖励 130 平台奖励
*/
@TableField(value = "reward_type")
private Integer rewardType;
/**
* 子类型 good_friend:好友奖励
*/
@TableField(value = "reward_type_child")
private String rewardTypeChild;
/**
* 状态 100待结算 120 已结算
*/
@TableField(value = "reward_status")
private Integer rewardStatus;
/**
* 分红金额
*/
@TableField(value = "commission_acount")
private BigDecimal commissionAcount;
/**
* 分红比例
*/
@TableField(value = "commission_rate")
private BigDecimal commissionRate;
/**
* order id
*/
@TableField(value = "reference_id")
private String referenceId;
/**
* 用户充值时间
*/
@TableField(value = "recharge_time")
private Date rechargeTime;
/**
* 面值
*/
@TableField(value = "price")
private BigDecimal price;
/**
* 奖励基数(充值支付金额 或 淘宝京东原始佣金)
*/
@TableField(value = "cash")
private BigDecimal cash;
/**
* 源用户id
*/
@TableField(value = "source_user_id")
private Integer sourceUserId;
/**
* 源用户邀请人id
*/
@TableField(value = "invite_user_id")
private Integer inviteUserId;
/**
* 源用户邀请人级别 普通10 高级20
*/
@TableField(value = "invite_user_level")
private Integer inviteUserLevel;
/**
* 源原用户邀请人是否超级 1是 0否
*/
@TableField(value = "invite_user_is_super")
private Integer inviteUserIsSuper;
@TableField(value = "created_at")
private Long createdAt;
@TableField(value = "updated_at")
private Long updatedAt;
/**
* 创建时间
*/
@TableField(value = "create_time")
private LocalDateTime createTime;
/**
* 是直接还是间接邀请人 10直接 20间接 30自己
*/
@TableField(value = "source_type")
private Integer sourceType;
/**
* 第?笔下单激活奖励
*/
@TableField(value = "reward_times")
private Integer rewardTimes;
/**
* 结算状态 100在路上 200预结算 300已结算 -100在路上已失效 -200预结算已失效 -300已结算扣回
*/
@TableField(value = "settle_state")
private Integer settleState;
/**
* 商品id
*/
@TableField(value = "goods_id")
private String goodsId;
/**
* 标题
*/
@TableField(value = "title")
private String title;
/**
* 订单类型
*/
@TableField(value = "order_type")
private String orderType;
/**
* 订单号
*/
@TableField(value = "order_sn")
private String orderSn;
/**
* 子订单号
*/
@TableField(value = "sub_order_sn")
private String subOrderSn;
/**
* 是否在客户端展示 1展示 0 不展示
*/
@TableField(value = "is_show_on_client")
private Boolean isShowOnClient;
/**
* 来源基础金额
*/
@TableField(value = "all_money_ori")
private BigDecimal allMoneyOri;
/**
* 该金额所有的计算比率值
*/
@TableField(value = "ratio_all")
private String ratioAll;
private static final long serialVersionUID = 1L;
public static final String COL_USER_ID = "user_id";
public static final String COL_USER_IS_SUPER = "user_is_super";
public static final String COL_USER_PARTNER_LEVEL = "user_partner_level";
public static final String COL_REWARD_TYPE = "reward_type";
public static final String COL_REWARD_TYPE_CHILD = "reward_type_child";
public static final String COL_REWARD_STATUS = "reward_status";
public static final String COL_COMMISSION_ACOUNT = "commission_acount";
public static final String COL_COMMISSION_RATE = "commission_rate";
public static final String COL_REFERENCE_ID = "reference_id";
public static final String COL_RECHARGE_TIME = "recharge_time";
public static final String COL_PRICE = "price";
public static final String COL_CASH = "cash";
public static final String COL_SOURCE_USER_ID = "source_user_id";
public static final String COL_INVITE_USER_ID = "invite_user_id";
public static final String COL_INVITE_USER_LEVEL = "invite_user_level";
public static final String COL_INVITE_USER_IS_SUPER = "invite_user_is_super";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_CREATE_TIME = "create_time";
public static final String COL_SOURCE_TYPE = "source_type";
public static final String COL_REWARD_TIMES = "reward_times";
public static final String COL_SETTLE_STATE = "settle_state";
public static final String COL_GOODS_ID = "goods_id";
public static final String COL_TITLE = "title";
public static final String COL_ORDER_TYPE = "order_type";
public static final String COL_ORDER_SN = "order_sn";
public static final String COL_SUB_ORDER_SN = "sub_order_sn";
public static final String COL_IS_SHOW_ON_CLIENT = "is_show_on_client";
public static final String COL_ALL_MONEY_ORI = "all_money_ori";
public static final String COL_RATIO_ALL = "ratio_all";
}
\ No newline at end of file
package com.lanren.huhu.partner.domain;
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 lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
@TableName(value = "user_info")
public class UserInfo implements Serializable {
@TableId(value = "user_id", type = IdType.AUTO)
private Integer userId;
/**
* 10普通用户,20代理商
*/
@TableField(value = "user_type")
private Integer userType;
@TableField(value = "user_name")
private String userName;
@TableField(value = "user_phone")
private String userPhone;
/**
* 用户头像
*/
@TableField(value = "user_avatar")
private String userAvatar;
/**
* 用户性别 0未知10男20女30保密
*/
@TableField(value = "user_gender")
private Integer userGender;
/**
* 代理商ID
*/
@TableField(value = "agent_id")
private Integer agentId;
@TableField(value = "pid")
private String pid;
@TableField(value = "jd_pid")
private String jdPid;
@TableField(value = "invite_code")
private String inviteCode;
/**
* 邀请类型 默认0无邀请 ,10邀请码邀请 20绑卡邀请
*/
@TableField(value = "invite_type")
private Integer inviteType;
/**
* 今天签到状态
*/
@TableField(value = "today_sign_status")
private Integer todaySignStatus;
@TableField(value = "parent_agent_list")
private String parentAgentList;
/**
* 默认是 1、APP注册,2、邀请H5注册,3、wasair广告
*/
@TableField(value = "register_from")
private Integer registerFrom;
/**
* 注册时间
*/
@TableField(value = "register_time")
private Date registerTime;
/**
* 合伙人等级 默认0 普通10 高级20 代理商默认超级
*/
@TableField(value = "partner_level")
private Integer partnerLevel;
/**
* 激活状态
*/
@TableField(value = "is_active")
private Integer isActive;
/**
* 激活时间
*/
@TableField(value = "active_time")
private Date activeTime;
/**
* 邀请者id 直接邀请人用户id
*/
@TableField(value = "invite_user_id")
private Integer inviteUserId;
/**
* 间接邀请人id:直接邀请人的上级
*/
@TableField(value = "indirect_invite_uid")
private Integer indirectInviteUid;
/**
* 直接邀请用户数量
*/
@TableField(value = "direct_num")
private Integer directNum;
/**
* 间接邀请用户数量
*/
@TableField(value = "indirect_num")
private Integer indirectNum;
@TableField(value = "created_at")
private Integer createdAt;
@TableField(value = "updated_at")
private Integer updatedAt;
@TableField(value = "deleted_at")
private Integer deletedAt;
private static final long serialVersionUID = 1L;
public static final String COL_USER_TYPE = "user_type";
public static final String COL_USER_NAME = "user_name";
public static final String COL_USER_PHONE = "user_phone";
public static final String COL_USER_AVATAR = "user_avatar";
public static final String COL_USER_GENDER = "user_gender";
public static final String COL_AGENT_ID = "agent_id";
public static final String COL_PID = "pid";
public static final String COL_JD_PID = "jd_pid";
public static final String COL_INVITE_CODE = "invite_code";
public static final String COL_INVITE_TYPE = "invite_type";
public static final String COL_TODAY_SIGN_STATUS = "today_sign_status";
public static final String COL_PARENT_AGENT_LIST = "parent_agent_list";
public static final String COL_REGISTER_FROM = "register_from";
public static final String COL_REGISTER_TIME = "register_time";
public static final String COL_PARTNER_LEVEL = "partner_level";
public static final String COL_IS_ACTIVE = "is_active";
public static final String COL_ACTIVE_TIME = "active_time";
public static final String COL_INVITE_USER_ID = "invite_user_id";
public static final String COL_INDIRECT_INVITE_UID = "indirect_invite_uid";
public static final String COL_DIRECT_NUM = "direct_num";
public static final String COL_INDIRECT_NUM = "indirect_num";
public static final String COL_CREATED_AT = "created_at";
public static final String COL_UPDATED_AT = "updated_at";
public static final String COL_DELETED_AT = "deleted_at";
}
\ No newline at end of file
package com.lanren.huhu.partner.manager; package com.lanren.huhu.partner.manager;
import com.alibaba.fastjson.JSON;
import com.lanren.huhu.partner.domain.UserAgent; import com.lanren.huhu.partner.domain.UserAgent;
import com.lanren.huhu.partner.model.AgentResponse; import com.lanren.huhu.partner.model.AgentResponse;
import com.lanren.huhu.partner.model.AgentRewardMessage;
import com.lanren.huhu.partner.model.ParentAgent; import com.lanren.huhu.partner.model.ParentAgent;
import com.lanren.huhu.partner.result.Result; import com.lanren.huhu.partner.result.Result;
import com.lanren.huhu.partner.service.UserAgentService; import com.lanren.huhu.partner.service.UserAgentService;
...@@ -11,15 +9,13 @@ import com.lanren.huhu.partner.service.UserService; ...@@ -11,15 +9,13 @@ import com.lanren.huhu.partner.service.UserService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.ListOperations;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import static com.lanren.huhu.partner.constants.Constants.*; import static com.lanren.huhu.partner.constants.Constants.PARENT_COLUMN_NAME_CENGJI;
import static com.lanren.huhu.partner.constants.Constants.PARENT_COLUMN_NAME_PINGTUI;
/** /**
* @author chen * @author chen
...@@ -31,8 +27,6 @@ public class AgentManager { ...@@ -31,8 +27,6 @@ public class AgentManager {
@Autowired @Autowired
UserAgentService userAgentService; UserAgentService userAgentService;
@Autowired @Autowired
StringRedisTemplate redisTemplate;
@Autowired
UserService userService; UserService userService;
/*** /***
...@@ -55,31 +49,6 @@ public class AgentManager { ...@@ -55,31 +49,6 @@ public class AgentManager {
} }
/** /**
* @description: 测试使用, 推送一条代理商奖励的待处理消息到redis队列
* @author chen
* @date 2019-07-04 14:48
*/
public Result<String> pushReward() {
ListOperations<String, String> ops = redisTemplate.opsForList();
AgentRewardMessage agentRewardMessage = new AgentRewardMessage();
agentRewardMessage.setRewardType(710);
agentRewardMessage.setRechargeTime("2019-06-29 01:23:45");
agentRewardMessage.setSourceUserId(2328);
agentRewardMessage.setReferenceId("9999");
agentRewardMessage.setAgentId(33);
// agentRewardMessage.setAgentReward(new BigDecimal(0));
agentRewardMessage.setSourceUserPayment(new BigDecimal(5));
agentRewardMessage.setSettleState(-100);
agentRewardMessage.setOrderType("taobao");
agentRewardMessage.setOrderSn("507596802910534728");
agentRewardMessage.setSubOrderSn("507596802910534728");
agentRewardMessage.setOrderCommission(new BigDecimal("35.400000"));
agentRewardMessage.setSourceOrder("8888");
logger.info("写入队列");
ops.leftPush(AGENT_REWARD_QUEUE_KEY, JSON.toJSONString(agentRewardMessage));
return new Result<>();
}
/**
* @description: 获取一个代理商的层级上级 * @description: 获取一个代理商的层级上级
* @author chen * @author chen
* @date 2019-07-04 14:48 * @date 2019-07-04 14:48
......
...@@ -245,7 +245,7 @@ public class AgentDailyMailTask { ...@@ -245,7 +245,7 @@ public class AgentDailyMailTask {
} }
} }
public void runExpandCityAgent() { public void runExpandCity2ndAgentMail() {
try { try {
/** /**
* 查询全部城市代理, 然后查找他们的B端推荐上级 * 查询全部城市代理, 然后查找他们的B端推荐上级
......
package com.lanren.huhu.partner.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lanren.huhu.partner.domain.AgentAccountLog;
import java.util.List;
/**
* @author chen
* @title: ${NAME}
* @projectName partner
* @package ${PACKAGE_NAME}
* @date 2019-07-16 15:38
*/
public interface AgentAccountLogService extends IService<AgentAccountLog> {
int updateBatch(List<AgentAccountLog> list);
int batchInsert(List<AgentAccountLog> list);
int insertOrUpdate(AgentAccountLog record);
int insertOrUpdateSelective(AgentAccountLog record);
}
package com.lanren.huhu.partner.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lanren.huhu.partner.domain.AgentAccount;
import java.util.List;
/**
* @title: ${NAME}
* @projectName partner
* @author chen
* @package ${PACKAGE_NAME}
* @date 2019-07-23 16:55
*/
public interface AgentAccountService extends IService<AgentAccount>{
int updateBatch(List<AgentAccount> list);
int batchInsert(List<AgentAccount> list);
int insertOrUpdate(AgentAccount record);
int insertOrUpdateSelective(AgentAccount record);
AgentAccount getOneByUserIdForUpdate(Integer agentId);
}
package com.lanren.huhu.partner.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lanren.huhu.partner.domain.AgentBankCard;
import java.util.List;
/**
* @title: ${NAME}
* @projectName partner
* @description: 代理商开卡
* @author chen
* @package ${PACKAGE_NAME}
* @date 2019-07-02 15:59
*/
public interface AgentBankCardService extends IService<AgentBankCard>{
int updateBatch(List<AgentBankCard> list);
int batchInsert(List<AgentBankCard> list);
int insertOrUpdate(AgentBankCard record);
int insertOrUpdateSelective(AgentBankCard record);
AgentBankCard getOneByAgentId(int agentId);
}
...@@ -27,6 +27,8 @@ public interface AgentExpandDailyService extends IService<AgentExpandDaily> { ...@@ -27,6 +27,8 @@ public interface AgentExpandDailyService extends IService<AgentExpandDaily> {
int updateByDatByDetail(String datStr); int updateByDatByDetail(String datStr);
int insertByDetail();
Integer getMonthCntByAgent(int agentId, long beginTs, long endTs); Integer getMonthCntByAgent(int agentId, long beginTs, long endTs);
MailContentRow getRegRow(String dat, Integer agentId, String monthBegin, String monthEnd); MailContentRow getRegRow(String dat, Integer agentId, String monthBegin, String monthEnd);
......
package com.lanren.huhu.partner.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lanren.huhu.partner.domain.AgentRevokeRecords;
import java.util.List;
/**
* @title: ${NAME}
* @projectName partner
* @author chen
* @package ${PACKAGE_NAME}
* @date 2019-07-04 11:44
*/
public interface AgentRevokeRecordsService extends IService<AgentRevokeRecords>{
int updateBatch(List<AgentRevokeRecords> list);
int batchInsert(List<AgentRevokeRecords> list);
int insertOrUpdate(AgentRevokeRecords record);
int insertOrUpdateSelective(AgentRevokeRecords record);
List<AgentRevokeRecords> getAllPending();
}
package com.lanren.huhu.partner.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lanren.huhu.partner.domain.AgentReward;
import com.lanren.huhu.partner.model.AgentSettle;
import java.util.List;
/**
* @author chen
* @title: ${NAME}
* @projectName partner
* @description: 代理商奖励明细
* @package ${PACKAGE_NAME}
* @date 2019-06-29 18:49
*/
public interface AgentRewardService extends IService<AgentReward> {
int updateBatch(List<AgentReward> list);
int batchInsert(List<AgentReward> list);
int insertOrUpdate(AgentReward record);
int insertOrUpdateSelective(AgentReward record);
List<AgentReward> getListByRefId(String refId);
List<AgentReward> getListBySubOrderSn(String orderType, String orderSn, String subOrderSn);
int insertOne(AgentReward record);
AgentSettle selectAgentSettleByTsAndAgentId(long beginTs, long endTs, Integer agentId);
IPage<AgentReward> selectOrderRewardPageByTs(Page<AgentReward> page, long beginTs, long endTs);
IPage<AgentReward> selectOrderRewardPageByTsAndAgentId(Page<AgentReward> page, long beginTs, long endTs, int agentId);
int updateRewardStatusByUidAndTs(int agentId, long beginTs, long endTs);
IPage<AgentSettle> selectAgentSettlePageByTs(Page<AgentSettle> page, long beginTs, long endTs);
}
package com.lanren.huhu.partner.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lanren.huhu.partner.domain.AgentSalary;
import java.util.List;
/**
* @author chen
* @title: ${NAME}
* @projectName partner
* @description: 代理商收入
* @package ${PACKAGE_NAME}
* @date 2019-07-02 15:57
*/
public interface AgentSalaryService extends IService<AgentSalary> {
int updateBatch(List<AgentSalary> list);
int batchInsert(List<AgentSalary> list);
int insertOrUpdate(AgentSalary record);
int insertOrUpdateSelective(AgentSalary record);
int insert(AgentSalary agentSalary);
}
package com.lanren.huhu.partner.service;
import java.util.concurrent.TimeUnit;
/**
* @author chen
* @title: LockService
* @projectName partner
* @description: 锁接口
* @package com.lanren.huhu.partner.service
* @date 2019-07-01 19:37
*/
public interface LockService {
/**
* 获取锁,如果锁不可用,则当前线程处于休眠状态,直到获得锁为止。
*
* @param lockKey
*/
void lock(String lockKey);
/**
* 释放锁
*
* @param lockKey
*/
void unlock(String lockKey);
/**
* 获取锁,如果锁不可用,则当前线程处于休眠状态,直到获得锁为止。如果获取到锁后,执行结束后解锁或达到超时时间后会自动释放锁
*
* @param lockKey
* @param timeout
*/
void lock(String lockKey, int timeout);
/**
* 获取锁,如果锁不可用,则当前线程处于休眠状态,直到获得锁为止。如果获取到锁后,执行结束后解锁或达到超时时间后会自动释放锁
*
* @param lockKey
* @param unit
* @param timeout
*/
void lock(String lockKey, TimeUnit unit, int timeout);
/**
* 尝试获取锁,获取到立即返回true,未获取到立即返回false
*
* @param lockKey
* @return
*/
boolean tryLock(String lockKey);
/**
* 尝试获取锁,在等待时间内获取到锁则返回true,否则返回false,如果获取到锁,则要么执行完后程序释放锁,
* 要么在给定的超时时间leaseTime后释放锁
*
* @param lockKey
* @param waitTime
* @param leaseTime
* @param unit
* @return
*/
boolean tryLock(String lockKey, long waitTime, long leaseTime, TimeUnit unit)
throws InterruptedException;
/**
* 锁是否被任意一个线程锁持有
*
* @param lockKey
* @return
*/
boolean isLocked(String lockKey);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment