Commit 1d7828f0 by 刘志强

Merge branch '105' into 'master'

105

See merge request !38
2 parents a4e5382e e086b385
Showing with 15926 additions and 0 deletions
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.kzy-wx</groupId>
<artifactId>kzy-wx</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>kzy-wx</name>
<description>Demo project for Spring Boot</description>
<inceptionYear>2018</inceptionYear>
<organization>
<name>YXVZB Technical Team-</name>
<url>http://www.yxvzb.com</url>
</organization>
<repositories>
<repository>
<id>nexus</id>
<name>local private nexus</name>
<url>http://192.168.0.105:8081/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.7.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-netflix</artifactId>
<version>1.3.5.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
<version>1.3.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-redis</artifactId>
<version>1.3.8.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
<classifier>jdk15</classifier>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.1</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.8</version>
</dependency>
<dependency>
<groupId>com.jfinal</groupId>
<artifactId>jfinal-weixin</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>com.qiniu</groupId>
<artifactId>qiniu-java-sdk</artifactId>
<version>[7.2.0, 7.2.99]</version>
</dependency>
<dependency>
<groupId>org.jodd</groupId>
<artifactId>jodd-core</artifactId>
<version>3.7</version>
</dependency>
<dependency>
<groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId>
<version>0.4.8</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>io.reactivex.rxjava2</groupId>
<artifactId>rxjava</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk16</artifactId>
<version>1.45</version>
</dependency>
<dependency>
<groupId>com.upyun</groupId>
<artifactId>java-sdk</artifactId>
<version>3.10</version>
</dependency>
<dependency>
<groupId>ytx</groupId>
<artifactId>ytx</artifactId>
<version>4</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/CCP_REST_SDK_JAVA_v2.7r.jar</systemPath>
</dependency>
<dependency>
<groupId>com.alipay</groupId>
<artifactId>sdk-java</artifactId>
<version>20170615110434</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/lib/alipay-sdk-java20170615110434.jar</systemPath>
</dependency>
<dependency>
<groupId>fakepath</groupId>
<artifactId>distributed-kit</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>105</id>
<properties>
<package.environment>105</package.environment>
</properties>
</profile>
<profile>
<id>local</id>
<properties>
<package.environment>local</package.environment>
</properties>
</profile>
<profile>
<id>online</id>
<properties>
<package.environment>online</package.environment>
</properties>
<!-- 设置默认使用的环境 -->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
</profile>
</profiles>
<build>
<!-- jar包名字,{名字+环境} -->
<finalName>kzy_wx_${package.environment}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>*.xml</include>
<include>**/*.xml</include>
<include>**/application.properties</include>
<include>banner.txt</include>
</includes>
<excludes>
<exclude>generatorConfig.xml</exclude>
<exclude>mbg/*</exclude>
</excludes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources/servers/${package.environment}</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources/lib</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>*.jar</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>utf-8</encoding>
<useDefaultDelimiters>true</useDefaultDelimiters>
</configuration>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
</configuration>
</plugin>
</plugins>
</build>
</project>
package com.server;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication
@EnableTransactionManagement
@ServletComponentScan
@MapperScan({"com.server.web.common.mapper","com.server.web.common.mapping"})
public class Application {
public static void main(String[] args) {
SpringApplication application = new SpringApplication(Application.class);
application.run(args);
}
@Bean
public EmbeddedServletContainerCustomizer containerCustomizer(){
return new EmbeddedServletContainerCustomizer() {
@Override
public void customize(ConfigurableEmbeddedServletContainer container) {
container.setSessionTimeout(1800);//单位为S
}
};
}
}
package com.server.common.configure;
import com.github.pagehelper.PageHelper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.Properties;
/**
* Created by dell on 2017/8/22.
*/
@Configuration
public class ConfigMybatis {
@Bean
public PageHelper pageHelper() {
System.out.println("MyBatisConfiguration.pageHelper()");
PageHelper pageHelper = new PageHelper();
Properties p = new Properties();
p.setProperty("offsetAsPageNum", "true");
p.setProperty("rowBoundsWithCount", "true");
p.setProperty("reasonable", "true");
pageHelper.setProperties(p);
return pageHelper;
}
}
package com.server.common.configure;
import org.springframework.context.annotation.Configuration;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
/**
* Created by yinbin on 2018/1/11.
* session 共享配置类,通过使用redis共享session,默认过期时间1800秒
*/
@Configuration
@EnableRedisHttpSession(maxInactiveIntervalInSeconds=86400,redisNamespace = "kzy_wx")
public class ConfigRedisSession {
}
\ No newline at end of file
package com.server.common.configure;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
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;
/**
* Created by yinbin on 2018/1/11.
* 线程池配置类
*/
@Configuration
@EnableAsync
public class ConfigThreadPoolExecutor implements AsyncConfigurer {
@Override
public Executor getAsyncExecutor() {
ThreadPoolTaskExecutor taskExecutor=new ThreadPoolTaskExecutor();
taskExecutor.setCorePoolSize(5);
taskExecutor.setMaxPoolSize(20);
taskExecutor.setQueueCapacity(25);
taskExecutor.initialize();
return taskExecutor;
}
@Override
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
return null;
}
}
package com.server.common.configure;
import com.server.web.interceptor.InterceptorLocal;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
* Created by yinbin on 2018/1/9.
* web相关配置类
* 只配置了拦截器配置
*/
@Configuration
public class ConfigWebApp extends WebMvcConfigurerAdapter {
@Override
public void addInterceptors(InterceptorRegistry registry) {
// 多个拦截器组成一个拦截器链
// addPathPatterns 用于添加拦截规则
// excludePathPatterns 用户排除拦截
registry.addInterceptor(new InterceptorLocal()).addPathPatterns("/**");
super.addInterceptors(registry);
}
@Bean
public RestTemplate restTemplate() {
RestTemplate restTemplate = new RestTemplate();
return restTemplate;
}
}
package com.server.common.configure;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.SchedulingConfigurer;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
/**
* Created by yinbin on 2018/1/16.
* 启用此配置,任务采用多线程执行
* 不启用所有任务串行执行,即单线程执行任务
*/
@Configuration
@EnableScheduling
public class ScheduleConfig implements SchedulingConfigurer {
@Override
public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
taskRegistrar.setScheduler(taskExecutor());
}
@Bean(destroyMethod="shutdown")
public Executor taskExecutor() {
return Executors.newScheduledThreadPool(100);
}
}
package com.server.common.filter;
import com.server.common.filter.util.SecretUtil;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.annotation.Order;
import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;
/**
* Created by yinbin on 2018/1/9.
* 过滤器,过滤请求,此过滤器在为对外提供api时,签名过滤器
* Order其实不起作用,请注意
*/
@Order(10)
@WebFilter(urlPatterns = "/*", filterName = "apiFilter")
public class ApiFilter implements Filter {
final static Logger logger = LogManager.getLogger(ApiFilter.class);
@Value("${rest.api.debug}")
private String isdebug="false";
@Value("${rest.api.secretkey}")
private String secretKey;
@Value("${rest.api.charset}")
private String charset;
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
logger.info("API Filter");
if(isdebug.equals("false")) {
boolean flag=SecretUtil.signByMd5(servletRequest,secretKey,charset);
if(flag){
filterChain.doFilter(servletRequest, servletResponse);
}
}else {
filterChain.doFilter(servletRequest, servletResponse);
}
}
@Override
public void destroy() {
}
}
\ No newline at end of file
package com.server.common.filter;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.annotation.Order;
import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;
/**
* Created by yinbin on 2018/1/9.
* 过滤器,session过滤器
* Order其实不起作用,请注意
*/
@Order(2)
@WebFilter(urlPatterns = "/*", filterName = "sessionFilter")
public class SessionFilter implements Filter {
final static Logger logger = LogManager.getLogger(ApiFilter.class);
@Override
public void init(FilterConfig filterConfig) throws ServletException {
// SysUser user= (SysUser) userRepository.getByUsernameIsAndPasswordIs("admin","123456");
// logger.info("user_name is :"+user.getUsername());
}
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
logger.info("SessionFilter Filter");
filterChain.doFilter(servletRequest,servletResponse);
}
@Override
public void destroy() {
}
}
\ No newline at end of file
package com.server.common.filter.util;
import org.apache.commons.codec.digest.DigestUtils;
import javax.servlet.ServletRequest;
import java.io.UnsupportedEncodingException;
import java.util.*;
/**
* Created by yinbin on 2018/1/12.
* 签名工具
*/
public class SecretUtil {
public static boolean signByMd5(ServletRequest servletRequest,String secretKey,String charset) throws UnsupportedEncodingException {
Map<String,String> params = new HashMap<String,String>();
Map<String,String[]> requestParams = servletRequest.getParameterMap();
for (Iterator<String> iter = requestParams.keySet().iterator(); iter.hasNext();) {
String name = (String) iter.next();
String[] values = (String[]) requestParams.get(name);
String valueStr = "";
for (int i = 0; i < values.length; i++) {
valueStr = (i == values.length - 1) ? valueStr + values[i]
: valueStr + values[i] + ",";
}
//乱码解决,这段代码在出现乱码时使用
valueStr = new String(valueStr.getBytes("ISO-8859-1"), charset);
params.put(name, valueStr);
}
return rsaCheckV1(params,secretKey,charset);
}
public static boolean rsaCheckV1(Map<String, String> params, String publicKey,
String charset) {
String sign = params.get("sign");
String content = getSignCheckContentV1(params);
return rsaCheckContent(content, sign, publicKey, charset);
}
public static boolean rsaCheckContent(String content, String sign, String publicKey,
String charset) {
String sign_check= DigestUtils.md5Hex(content + publicKey);
return sign.equals(sign_check)?true:false;
}
public static String getSignCheckContentV1(Map<String, String> params) {
if (params == null) {
return null;
}
params.remove("sign");
StringBuffer content = new StringBuffer();
List<String> keys = new ArrayList<String>(params.keySet());
Collections.sort(keys);
for (int i = 0; i < keys.size(); i++) {
String key = keys.get(i);
String value = params.get(key);
content.append((i == 0 ? "" : "&") + key + "=" + value);
}
return content.toString();
}
}
package com.server.utils;
import java.awt.*;
import java.awt.geom.RoundRectangle2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
/**
* Created by stone on 2017/4/27.
*/
public class BufferedImageUtil {
/**
* 图片设置圆角
* @param srcImage
* @param radius
* @param border
* @param padding
* @return
* @throws IOException
*/
public static BufferedImage setRadius(BufferedImage srcImage, int radius, int border, int padding) throws IOException {
int width = srcImage.getWidth();
int height = srcImage.getHeight();
int canvasWidth = width + padding * 2;
int canvasHeight = height + padding * 2;
BufferedImage image = new BufferedImage(canvasWidth, canvasHeight, BufferedImage.TYPE_INT_ARGB);
Graphics2D gs = image.createGraphics();
gs.setComposite(AlphaComposite.Src);
gs.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
gs.setColor(Color.WHITE);
gs.fill(new RoundRectangle2D.Float(0, 0, canvasWidth, canvasHeight, radius, radius));
gs.setComposite(AlphaComposite.SrcAtop);
gs.drawImage(setClip(srcImage, radius), padding, padding, null);
if(border !=0){
gs.setColor(Color.GRAY);
gs.setStroke(new BasicStroke(border));
gs.drawRoundRect(padding, padding, canvasWidth - 2 * padding, canvasHeight - 2 * padding, radius, radius);
}
gs.dispose();
return image;
}
/**
* 图片设置圆角
* @param srcImage
* @return
* @throws IOException
*/
public static BufferedImage setRadius(BufferedImage srcImage) throws IOException{
int radius = srcImage.getWidth();
return setRadius(srcImage, radius, 2, 5);
}
/**
* 图片切圆角
* @param srcImage
* @param radius
* @return
*/
public static BufferedImage setClip(BufferedImage srcImage, int radius){
int width = srcImage.getWidth();
int height = srcImage.getHeight();
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
Graphics2D gs = image.createGraphics();
gs.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
gs.setClip(new RoundRectangle2D.Double(0, 0, width, height, radius, radius));
gs.drawImage(srcImage, 0, 0, null);
gs.dispose();
return image;
}
}
package com.server.utils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* @author ZMS
*/
public class DateUtils {
public static long MINUTE_PER_HOUR = 60; // 一个小时有多少分钟
public static long MINUTE_PER_DAY = 1440; // 一天有多少分钟
public static long HOUT_PER_DAY = 24; // 一天有多少小时
public static long SECOND_PER_MINUTE = 60; // 一分钟有多少秒
public static long SECOND_PER_HOUR = 3600; // 一个小时有多少秒
public static long SECOND_PER_DAY = 86400; // 一天有多少秒
public static long MILLIS_PER_SECOND = 1000; // 一秒钟有多少毫秒
public static long MILLIS_PER_MINUTE = 60000; // 一分钟有多少毫秒
public static long MILLIS_PER_HOUR = 3600000; // 一个小时有多少毫秒
public static long MILLIS_PER_DAY = 86400000; // 一天有多少毫秒
public static long NANO_PER_MILLIS = 1000000; // 一毫秒有多少纳秒
/**
* formate date
*
* @param formatter
* @param time
* @return
*/
public static String format(String formatter, long time) {
return new SimpleDateFormat(formatter).format(new Date(time));
}
public static String format(String formatter, Date time) {
return new SimpleDateFormat(formatter).format(time);
}
public static String format(Date time) {
return new SimpleDateFormat("yyyy-MM-dd").format(time);
}
/**
* rawoffset
*
* @param time
* @return
*/
public static long getRawOffsetMils(long time) {
return time + TimeZone.getDefault().getRawOffset();
}
/**
* 拆分时间
*
* @param timeMils
* @return
*/
public static long[] splitTime(long timeMils) {
if (timeMils <= 0) {
return new long[]{0, 0, 0, 0};
}
long day = timeMils / 86400000;
long hour = (timeMils % 86400000) / 3600000;
long min = (timeMils % 3600000) / 60000;
long sec = (timeMils % 60000) / 1000;
return new long[]{day, hour, min, sec};
}
public static Date parse(String format, String str) throws ParseException {
return new SimpleDateFormat(format).parse(str);
}
public static Date firstDayOfMonth() {
Calendar c = Calendar.getInstance();
c.set(Calendar.DAY_OF_MONTH, 1);
c.set(Calendar.HOUR_OF_DAY, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
return c.getTime();
}
public static Date lastDayOfMonth() {
Calendar c = Calendar.getInstance();
c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
c.set(Calendar.HOUR_OF_DAY, c.getMaximum(Calendar.HOUR_OF_DAY));
c.set(Calendar.MINUTE, c.getMaximum(Calendar.MINUTE));
c.set(Calendar.SECOND, c.getMaximum(Calendar.SECOND));
c.set(Calendar.MILLISECOND, c.getMaximum(Calendar.MILLISECOND));
return c.getTime();
}
public static Date firstDayOfMonth(int year, int month) {
Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR, year);
c.set(Calendar.MONTH, month);
c.set(Calendar.DAY_OF_MONTH, 1);
c.set(Calendar.HOUR_OF_DAY, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
return c.getTime();
}
public static Date lastDayOfMonth(int year, int month) {
Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR, year);
c.set(Calendar.MONTH, month);
c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
c.set(Calendar.HOUR_OF_DAY, c.getMaximum(Calendar.HOUR_OF_DAY));
c.set(Calendar.MINUTE, c.getMaximum(Calendar.MINUTE));
c.set(Calendar.SECOND, c.getMaximum(Calendar.SECOND));
c.set(Calendar.MILLISECOND, c.getMaximum(Calendar.MILLISECOND));
return c.getTime();
}
public static int getMonthDayCount(int year, int month) {
Calendar c = Calendar.getInstance();
c.set(Calendar.YEAR, year);
c.set(Calendar.MONTH, month);
return c.getActualMaximum(Calendar.DAY_OF_MONTH);
}
public static long getStartTimeOfDate(long time) {
Calendar c = Calendar.getInstance();
c.setTimeInMillis(time);
c.set(Calendar.HOUR_OF_DAY, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
return c.getTimeInMillis();
}
public static long curDay() {
return getRawOffsetMils(System.currentTimeMillis()) / MILLIS_PER_DAY;
}
public static long curHour() {
return getRawOffsetMils(System.currentTimeMillis()) / MILLIS_PER_HOUR;
}
public static long curMinute() {
return getRawOffsetMils(System.currentTimeMillis()) / MILLIS_PER_MINUTE;
}
/**
* 时间比较(如果myDate>compareDate返回1,<返回-1,相等返回0)
*
* @param myDate 时间
* @param compareDate 要比较的时间
* @return int
*/
public static int dateCompare(Date myDate, Date compareDate) {
Calendar myCal = Calendar.getInstance();
Calendar compareCal = Calendar.getInstance();
myCal.setTime(myDate);
compareCal.setTime(compareDate);
return myCal.compareTo(compareCal);
}
/**
* 时间加减天数
*
* @param startDate 要处理的时间,Null则为当前时间
* @param days 加减的天数
* @return Date
*/
public static Date dateAddDays(Date startDate, int days) {
if (startDate == null) {
startDate = new Date();
}
Calendar c = Calendar.getInstance();
c.setTime(startDate);
c.set(Calendar.DATE, c.get(Calendar.DATE) + days);
return c.getTime();
}
public static int dateCompare(String myDate, String compareDate, String dateformat) {
Date myDate2 = null;
Date compareDate2 = null;
try {
myDate2 = new SimpleDateFormat(dateformat).parse(myDate);
compareDate2 = new SimpleDateFormat(dateformat).parse(compareDate);
} catch (ParseException e) {
e.printStackTrace();
}
Calendar myCal = Calendar.getInstance();
Calendar compareCal = Calendar.getInstance();
myCal.setTime(myDate2);
compareCal.setTime(compareDate2);
return myCal.compareTo(compareCal);
}
/**
* 获取当月所有天
*
* @return
*/
public static List<String> getDayListOfMonth() {
List<String> list = new ArrayList<String>();
Calendar aCalendar = Calendar.getInstance(Locale.CHINA);
int year = aCalendar.get(Calendar.YEAR);//年份
int month = aCalendar.get(Calendar.MONTH) + 1;//月份
int day = aCalendar.getActualMaximum(Calendar.DATE);
for (int i = 1; i <= day; i++) {
String aDate = (month < 10 ? (("0") + month) : month) + "/" + (i < 10 ? ("0" + i) : i);
list.add(aDate);
}
return list;
}
public static void main(String[] args) {
List<String> list = getDayListOfMonth();
System.out.println(list);
}
}
package com.server.utils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
/**
* Created by stone on 2017/6/14.
*/
public class HTTPClientUtil {
public static String getPublicService(Map<String, String> map, String url,String charset)
throws Exception {
HttpClient httpClient = null;
HttpPost httpPost = null;
String result = null;
try{
httpClient = new DefaultHttpClient();
httpPost = new HttpPost(url);
//设置参数
List<NameValuePair> list = new ArrayList<NameValuePair>();
Iterator iterator = map.entrySet().iterator();
while(iterator.hasNext()){
Entry<String,String> elem = (Entry<String, String>) iterator.next();
list.add(new BasicNameValuePair(elem.getKey(),elem.getValue()));
}
if(list.size() > 0){
UrlEncodedFormEntity entity = new UrlEncodedFormEntity(list,charset);
httpPost.setEntity(entity);
}
HttpResponse response = httpClient.execute(httpPost);
if(response != null){
HttpEntity resEntity = response.getEntity();
if(resEntity != null){
result = EntityUtils.toString(resEntity,charset);
}
}
}catch(Exception ex){
ex.printStackTrace();
}
return result;
}
public static String getUrl(HttpServletRequest request){
StringBuffer url = request.getRequestURL();
String visitUrl = url.delete(url.length() - request.getRequestURI().length(), url.length()).toString();
return visitUrl;
}
}
package com.server.utils;
import com.google.zxing.common.BitMatrix;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
/**
* Created by stone on 2017/4/21.
*/
public class MatrixToImageWriter {
private static final int BLACK = 0xFF000000;
private static final int WHITE = 0xFFFFFFFF;
private MatrixToImageWriter() {}
public static BufferedImage toBufferedImage(BitMatrix matrix) {
int width = matrix.getWidth();
int height = matrix.getHeight();
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
image.setRGB(x, y, matrix.get(x, y) ? BLACK : WHITE);
}
}
return image;
}
public static void writeToFile(BitMatrix matrix, String format, File file)
throws IOException {
BufferedImage image = toBufferedImage(matrix);
if (!ImageIO.write(image, format, file)) {
throw new IOException("Could not write an image of format " + format + " to " + file);
}
}
public static void writeToStream(BitMatrix matrix, String format, OutputStream stream)
throws IOException {
BufferedImage image = toBufferedImage(matrix);
if (!ImageIO.write(image, format, stream)) {
throw new IOException("Could not write an image of format " + format);
}
}
}
package com.server.utils;
import java.util.HashMap;
import java.util.Map;
/**
* Created by weiwenfu@163.com on 2019/5/17 上午 11:28.
*/
public class ResultMapUtil {
public static Map<String,Object> returnMap(String status, String message, Object object){
Map<String,Object> resultMap = new HashMap<>();
resultMap.put("status",status);
resultMap.put("message",message);
resultMap.put("data",object);
return resultMap;
}
}
package com.server.utils;
import java.security.MessageDigest;
/**
* Created by dell on 2018/3/7.
*/
public class SHA1 {
private static final char[] HEX_DIGITS = {'0', '1', '2', '3', '4', '5',
'6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
/**
* Takes the raw bytes from the digest and formats them correct.
*
* @param bytes the raw bytes from the digest.
* @return the formatted bytes.
*/
private static String getFormattedText(byte[] bytes) {
int len = bytes.length;
StringBuilder buf = new StringBuilder(len * 2);
// 把密文转换成十六进制的字符串形式
for (int j = 0; j < len; j++) {
buf.append(HEX_DIGITS[(bytes[j] >> 4) & 0x0f]);
buf.append(HEX_DIGITS[bytes[j] & 0x0f]);
}
return buf.toString();
}
public static String encode(String str) {
if (str == null) {
return null;
}
try {
MessageDigest messageDigest = MessageDigest.getInstance("SHA1");
messageDigest.update(str.getBytes());
return getFormattedText(messageDigest.digest());
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
package com.server.utils;
import com.cloopen.rest.sdk.CCPRestSDK;
import java.util.HashMap;
/**
* Created by dell on 2017/8/15.
*/
public class SendSMSUtil {
public static HashMap<String, Object> sendTemplateSMS(String phone,String templateId,String[] dataS){
HashMap<String, Object> result = null;
//初始化SDK
CCPRestSDK restAPI = new CCPRestSDK();
//******************************注释*********************************************
//*初始化服务器地址和端口 *
//*沙盒环境(用于应用开发调试):restAPI.init("sandboxapp.cloopen.com", "8883");*
//*生产环境(用户应用上线使用):restAPI.init("app.cloopen.com", "8883"); *
//*******************************************************************************
restAPI.init("app.cloopen.com", "8883");
//******************************注释*********************************************
//*初始化主帐号和主帐号令牌,对应官网开发者主账号下的ACCOUNT SID和AUTH TOKEN *
//*ACOUNT SID和AUTH TOKEN在登陆官网后,在“应用-管理控制台”中查看开发者主账号获取*
//*参数顺序:第一个参数是ACOUNT SID,第二个参数是AUTH TOKEN。 *
//*******************************************************************************
restAPI.setAccount("8a48b55150ccc4290150d0985f88117c", "d7b0743958264ba69a98c5ce0ea5291d");
//******************************注释*********************************************
//*初始化应用ID *
//*测试开发可使用“测试Demo”的APP ID,正式上线需要使用自己创建的应用的App ID *
//*应用ID的获取:登陆官网,在“应用-应用列表”,点击应用名称,看应用详情获取APP ID*
//*******************************************************************************
restAPI.setAppId("8a48b55150ccc4290150d0a7a07d1227");
//******************************注释****************************************************************
//*调用发送模板短信的接口发送短信 *
//*参数顺序说明: *
//*第一个参数:是要发送的手机号码,可以用逗号分隔,一次最多支持100个手机号 *
//*第二个参数:是模板ID,在平台上创建的短信模板的ID值;测试的时候可以使用系统的默认模板,id为1。 *
//*系统默认模板的内容为“【云通讯】您使用的是云通讯短信模板,您的验证码是{1},请于{2}分钟内正确输入”*
//*第三个参数是要替换的内容数组。 *
//**************************************************************************************************
//**************************************举例说明***********************************************************************
//*假设您用测试Demo的APP ID,则需使用默认模板ID 1,发送手机号是13800000000,传入参数为6532和5,则调用方式为 *
//*result = restAPI.sendTemplateSMS("13800000000","1" ,new String[]{"6532","5"}); *
//*则13800000000手机号收到的短信内容是:【云通讯】您使用的是云通讯短信模板,您的验证码是6532,请于5分钟内正确输入 *
//*********************************************************************************************************************
result = restAPI.sendTemplateSMS(phone,templateId ,dataS);
return result;
}
public static HashMap<String, Object> voiceVerify(String code,String phone){
HashMap<String, Object> result = null;
//初始化SDK
CCPRestSDK restAPI = new CCPRestSDK();
//******************************注释*********************************************
//*初始化服务器地址和端口 *
//*沙盒环境(用于应用开发调试):restAPI.init("sandboxapp.cloopen.com", "8883");*
//*生产环境(用户应用上线使用):restAPI.init("app.cloopen.com", "8883"); *
//*******************************************************************************
restAPI.init("sandboxapp.cloopen.com", "8883");
//******************************注释*********************************************
//*初始化主帐号和主帐号令牌,对应官网开发者主账号下的ACCOUNT SID和AUTH TOKEN *
//*ACOUNT SID和AUTH TOKEN在登陆官网后,在“应用-管理控制台”中查看开发者主账号获取*
//*参数顺序:第一个参数是ACOUNT SID,第二个参数是AUTH TOKEN。 *
//*******************************************************************************
restAPI.setAccount("8a48b55150ccc4290150d0985f88117c", "d7b0743958264ba69a98c5ce0ea5291d");
//******************************注释*********************************************
//*初始化应用ID *
//*测试开发可使用“测试Demo”的APP ID,正式上线需要使用自己创建的应用的App ID *
//*应用ID的获取:登陆官网,在“应用-应用列表”,点击应用名称,看应用详情获取APP ID*
//*******************************************************************************
restAPI.setAppId("8a48b55150ccc4290150d0a7a07d1227");
//******************************注释****************************************************************
//*调用发送模板短信的接口发送短信 *
//*参数顺序说明: *
//*第一个参数:是要发送的手机号码,可以用逗号分隔,一次最多支持100个手机号 *
//*第二个参数:是模板ID,在平台上创建的短信模板的ID值;测试的时候可以使用系统的默认模板,id为1。 *
//*系统默认模板的内容为“【云通讯】您使用的是云通讯短信模板,您的验证码是{1},请于{2}分钟内正确输入”*
//*第三个参数是要替换的内容数组。 *
//**************************************************************************************************
//**************************************举例说明***********************************************************************
//*假设您用测试Demo的APP ID,则需使用默认模板ID 1,发送手机号是13800000000,传入参数为6532和5,则调用方式为 *
//*result = restAPI.sendTemplateSMS("13800000000","1" ,new String[]{"6532","5"}); *
//*则13800000000手机号收到的短信内容是:【云通讯】您使用的是云通讯短信模板,您的验证码是6532,请于5分钟内正确输入 *
//*********************************************************************************************************************
result = restAPI.voiceVerify(code, phone,"01056177183","3", "", "", "");
return result;
}
}
package com.server.utils;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
public class SpringContextUtil implements ApplicationContextAware {
private static ApplicationContext ctx;
public void setApplicationContext(ApplicationContext ctx) throws BeansException {
SpringContextUtil.ctx = ctx;
}
public static ApplicationContext getCtx() {
return ctx;
}
}
package com.server.utils;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.Random;
/**
* Created by weiwenfu@163.com on 2018/11/16 上午 10:51.
*/
public class VerifyCodeUtils {
private static Random random = new Random();
public static Font font = null;
public static void outputImagePC(int w, int h, OutputStream os, String code) throws IOException {
int verifySize = code.length();
BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Random rand = new Random();
Graphics2D g2 = image.createGraphics();
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
Color[] colors = new Color[5];
Color[] colorSpaces = new Color[]{Color.WHITE, Color.CYAN,
Color.GRAY, Color.LIGHT_GRAY, Color.MAGENTA, Color.ORANGE,
Color.PINK, Color.YELLOW};
float[] fractions = new float[colors.length];
for (int i = 0; i < colors.length; i++) {
colors[i] = colorSpaces[rand.nextInt(colorSpaces.length)];
fractions[i] = rand.nextFloat();
}
Arrays.sort(fractions);
g2.setColor(Color.GRAY);// 设置边框色
g2.fillRect(0, 0, w, h);
Color c = getRandColor(200, 250);
g2.setColor(c);// 设置背景色
g2.fillRect(0, 0, w, h);
shear(g2, w, h, c);// 使图片扭曲
Random random = new Random();
g2.setColor(new Color(10,10,10));// 设置线条的颜色
for (int i = 0; i < 1; i++) {
int x = random.nextInt(w - 1);
int y = random.nextInt(h - 1);
int xl = random.nextInt(6) + 1;
int yl = random.nextInt(12) + 1;
//设置线条粗度
BasicStroke basicStroke = new BasicStroke(0.6f);
g2.setStroke(basicStroke);
//绘制干扰线
g2.drawLine(5, 15, 90, 10);
}
// 添加噪点
float yawpRate = 0.1f;// 噪声率
int area = (int) (yawpRate * w * h);
for (int i = 0; i < area; i++) {
int x = random.nextInt(w);
int y = random.nextInt(h);
int rgb = getRandomIntColor();
image.setRGB(x, y, rgb);
}
g2.setColor(new Color(10,10,10));
int fontSize = h - 16;
g2.setFont(getFont(fontSize));
char[] chars = code.toCharArray();
for (int i = 0; i < verifySize; i++) {
AffineTransform affine = new AffineTransform();
affine.setToRotation(Math.PI / 4 * rand.nextDouble() * (rand.nextBoolean() ? 1 : -1), (w / verifySize) * i + fontSize / 2, h / 2);
g2.setTransform(affine);
g2.drawChars(chars, i, 1, ((w - 10) / verifySize) * i + 5, h / 2 + fontSize / 2 - 10);
}
g2.dispose();
ImageIO.write(image, "jpeg", os);
os.close();
}
public static Font getFont(int fontSize) {
if (font == null) {
font = new Font("Algerian", Font.ITALIC, fontSize);
}
return font;
}
private static Color getRandColor(int fc, int bc) {
if (fc > 255)
fc = 255;
if (bc > 255)
bc = 255;
int r = fc + random.nextInt(bc - fc);
int g = fc + random.nextInt(bc - fc);
int b = fc + random.nextInt(bc - fc);
return new Color(r, g, b);
}
private static int getRandomIntColor() {
int[] rgb = getRandomRgb();
int color = 0;
for (int c : rgb) {
color = color << 8;
color = color | c;
}
return color;
}
private static int[] getRandomRgb() {
int[] rgb = new int[3];
for (int i = 0; i < 3; i++) {
rgb[i] = random.nextInt(255);
}
return rgb;
}
private static void shear(Graphics g, int w1, int h1, Color color) {
shearX(g, w1, h1, color);
shearY(g, w1, h1, color);
}
private static void shearX(Graphics g, int w1, int h1, Color color) {
int period = random.nextInt(2);
boolean borderGap = true;
int frames = 1;
int phase = random.nextInt(2);
for (int i = 0; i < h1; i++) {
double d = (double) (period >> 1)
* Math.sin((double) i / (double) period
+ (6.2831853071795862D * (double) phase)
/ (double) frames);
g.copyArea(0, i, w1, 1, (int) d, 0);
if (borderGap) {
g.setColor(color);
g.drawLine((int) d, i, 0, i);
g.drawLine((int) d + w1, i, w1, i);
}
}
}
private static void shearY(Graphics g, int w1, int h1, Color color) {
int period = random.nextInt(40) + 10; // 50;
boolean borderGap = true;
int frames = 20;
int phase = 7;
for (int i = 0; i < w1; i++) {
double d = (double) (period >> 1)
* Math.sin((double) i / (double) period
+ (6.2831853071795862D * (double) phase)
/ (double) frames);
g.copyArea(i, 0, 1, h1, 0, (int) d);
if (borderGap) {
g.setColor(color);
g.drawLine(i, (int) d, i, 0);
g.drawLine(i, (int) d + h1, i, h1);
}
}
}
}
package com.server.utils.blob;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import java.io.ByteArrayInputStream;
import java.io.UnsupportedEncodingException;
import java.sql.*;
/**
* Created by dell on 2017/7/19.
*/
public class BlobTypeHandler extends BaseTypeHandler<String> {
// 指定字符集
private static final String DEFAULT_CHARSET = "utf-8";
@Override
public void setNonNullParameter(PreparedStatement ps, int i,
String parameter, JdbcType jdbcType) throws SQLException
{
ByteArrayInputStream bis;
try
{
// 把String转化成byte流
bis = new ByteArrayInputStream(parameter.getBytes(DEFAULT_CHARSET));
} catch (UnsupportedEncodingException e)
{
throw new RuntimeException("Blob Encoding Error!");
}
ps.setBinaryStream(i, bis, parameter.length());
}
@Override
public String getNullableResult(ResultSet rs, String columnName)
throws SQLException
{
Blob blob = rs.getBlob(columnName);
byte[] returnValue = null;
String result = null;
if (null != blob)
{
returnValue = blob.getBytes(1, (int) blob.length());
}
try
{
if (null != returnValue)
{
// 把byte转化成string
result = new String(returnValue, DEFAULT_CHARSET);
}
} catch (UnsupportedEncodingException e)
{
throw new RuntimeException("Blob Encoding Error!");
}
return result;
}
@Override
public String getNullableResult(CallableStatement cs, int columnIndex)
throws SQLException
{
Blob blob = cs.getBlob(columnIndex);
byte[] returnValue = null;
String result = null;
if (null != blob)
{
returnValue = blob.getBytes(1, (int) blob.length());
}
try
{
if (null != returnValue)
{
result = new String(returnValue, DEFAULT_CHARSET);
}
} catch (UnsupportedEncodingException e)
{
throw new RuntimeException("Blob Encoding Error!");
}
return result;
}
/**
* @Description:
*
* @return
* @throws SQLException
*
* @see BaseTypeHandler#getNullableResult(ResultSet,
* int)
*
*/
@Override
public String getNullableResult(ResultSet rs, int columnName)
throws SQLException
{
String result = null;
Blob blob = rs.getBlob(columnName);
byte[] returnValue = null;
if (null != blob)
{
returnValue = blob.getBytes(1, (int) blob.length());
}
try
{
// 把byte转化成string
if (null != returnValue)
{
result = new String(returnValue, DEFAULT_CHARSET);
}
} catch (UnsupportedEncodingException e)
{
throw new RuntimeException("Blob Encoding Error!");
}
return result;
}
}
package com.server.utils.redis;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import org.springframework.data.redis.serializer.RedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import redis.clients.jedis.JedisPool;
import javax.crypto.KeyGenerator;
/**
* Created by dell on 2017/11/6.
*/
@Configuration
@EnableCaching
public class RedisCacheConfig extends CachingConfigurerSupport {
@Value("${spring.redis.host}")
private String REDIS_IP;
@Value("${spring.redis.port}")
private Integer REDIS_PORT;
@Value("${spring.redis.password}")
private String REDIS_PASSWORD;
@Value("${spring.redis.database}")
private Integer REDIS_DATABASE;
@Value("${spring.redis.timeout}")
private Integer REDIS_TIMEOUT;
@Bean
public JedisPool jedisPool() {
GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig();
JedisPool pool = new JedisPool(poolConfig,REDIS_IP,REDIS_PORT,REDIS_TIMEOUT,REDIS_PASSWORD,REDIS_DATABASE);
return pool;
}
@Bean
public CacheManager cacheManager(RedisTemplate redisTemplate) {
RedisCacheManager rcm = new RedisCacheManager(redisTemplate);
//设置缓存过期时间
//rcm.setDefaultExpiration(60);//秒
return rcm;
}
@Bean
public RedisTemplate<String, String> stringRedisTemplate(RedisConnectionFactory factory) {
StringRedisTemplate template = new StringRedisTemplate(factory);
Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
ObjectMapper om = new ObjectMapper();
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jackson2JsonRedisSerializer.setObjectMapper(om);
template.setValueSerializer(jackson2JsonRedisSerializer);
RedisSerializer stringSerializer = new StringRedisSerializer();
template.setKeySerializer(stringSerializer);
template.afterPropertiesSet();
return template;
}
@Bean
public RedisTemplate<String, String> redisTemplate(RedisConnectionFactory factory) {
RedisTemplate template = new RedisTemplate();
template.setConnectionFactory(factory);
Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
ObjectMapper om = new ObjectMapper();
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jackson2JsonRedisSerializer.setObjectMapper(om);
template.setValueSerializer(jackson2JsonRedisSerializer);
template.setKeySerializer(jackson2JsonRedisSerializer);
template.setHashValueSerializer(jackson2JsonRedisSerializer);
template.setHashKeySerializer(jackson2JsonRedisSerializer);
RedisSerializer stringSerializer = new StringRedisSerializer();
template.setKeySerializer(stringSerializer);
template.afterPropertiesSet();
return template;
}
}
package com.server.utils.weixin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.StringUtils;
import javax.servlet.http.HttpServletRequest;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.util.Iterator;
import java.util.Map;
/**
* Created by dell on 2018/2/28.
*/
public class HttpURLUtil {
private Logger logger = LoggerFactory.getLogger(getClass());
private static final String GET = "GET";
private static final String POST = "POST";
private static String CHARSET = "UTF-8";
private HttpURLUtil() {
}
private static HttpURLConnection getHttpConnection(String url, String method, Map<String, String> headers) throws IOException, NoSuchAlgorithmException, NoSuchProviderException, KeyManagementException {
URL _url = new URL(url);
HttpURLConnection conn = (HttpURLConnection)_url.openConnection();
conn.setRequestMethod(method);
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setConnectTimeout(19000);
conn.setReadTimeout(19000);
conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36");
if(headers != null && !headers.isEmpty()) {
Iterator i$ = headers.entrySet().iterator();
while(i$.hasNext()) {
Map.Entry entry = (Map.Entry)i$.next();
conn.setRequestProperty((String)entry.getKey(), (String)entry.getValue());
}
}
return conn;
}
public static String get(String url, Map<String, String> queryParas, Map<String, String> headers) {
HttpURLConnection conn = null;
String e;
try {
conn = getHttpConnection(buildUrlWithQueryString(url, queryParas), HttpURLUtil.GET, headers);
conn.connect();
e = readResponseString(conn);
} catch (Exception var8) {
throw new RuntimeException(var8);
} finally {
if(conn != null) {
conn.disconnect();
}
}
return e;
}
public static String get(String url, Map<String, String> queryParas) {
return get(url, queryParas, (Map)null);
}
public static String get(String url) {
return get(url, (Map)null, (Map)null);
}
public static String post(String url, Map<String, String> queryParas, String data, Map<String, String> headers) {
HttpURLConnection conn = null;
String var6;
try {
conn = getHttpConnection(buildUrlWithQueryString(url, queryParas), HttpURLUtil.POST, headers);
conn.connect();
OutputStream e = conn.getOutputStream();
e.write(data != null?data.getBytes(CHARSET):null);
e.flush();
e.close();
var6 = readResponseString(conn);
} catch (Exception var10) {
throw new RuntimeException(var10);
} finally {
if(conn != null) {
conn.disconnect();
}
}
return var6;
}
public static String post(String url, Map<String, String> queryParas, String data) {
return post(url, queryParas, data, (Map)null);
}
public static String post(String url, String data, Map<String, String> headers) {
return post(url, (Map)null, data, headers);
}
public static String post(String url, String data) {
return post(url, (Map)null, data, (Map)null);
}
private static String readResponseString(HttpURLConnection conn) {
StringBuilder sb = new StringBuilder();
InputStream inputStream = null;
try {
inputStream = conn.getInputStream();
BufferedReader e = new BufferedReader(new InputStreamReader(inputStream, CHARSET));
String line = null;
while((line = e.readLine()) != null) {
sb.append(line).append("\n");
}
String var5 = sb.toString();
return var5;
} catch (Exception var14) {
throw new RuntimeException(var14);
} finally {
if(inputStream != null) {
try {
inputStream.close();
} catch (IOException var13) {
var13.printStackTrace();
}
}
}
}
private static String buildUrlWithQueryString(String url, Map<String, String> queryParas) {
if(queryParas != null && !queryParas.isEmpty()) {
StringBuilder sb = new StringBuilder(url);
boolean isFirst;
if(!url.contains("?")) {
isFirst = true;
sb.append("?");
} else {
isFirst = false;
}
String key;
String value;
for(Iterator i$ = queryParas.entrySet().iterator(); i$.hasNext(); sb.append(key).append("=").append(value)) {
Map.Entry entry = (Map.Entry)i$.next();
if(isFirst) {
isFirst = false;
} else {
sb.append("&");
}
key = (String)entry.getKey();
value = (String)entry.getValue();
if(StringUtils.hasText(value)) {
try {
value = URLEncoder.encode(value, CHARSET);
} catch (UnsupportedEncodingException var9) {
throw new RuntimeException(var9);
}
}
}
return sb.toString();
} else {
return url;
}
}
public static String readData(HttpServletRequest request) {
BufferedReader br = null;
try {
StringBuilder e = new StringBuilder();
String line;
for(br = request.getReader(); (line = br.readLine()) != null; e.append(line)) {
if(e.length() > 0) {
e.append("\n");
}
}
line = e.toString();
return line;
} catch (IOException var12) {
throw new RuntimeException(var12);
} finally {
if(br != null) {
try {
br.close();
} catch (IOException var11) {
var11.printStackTrace();
}
}
}
}
}
package com.server.utils.weixin;
import com.alibaba.fastjson.JSON;
import com.jfinal.kit.StrKit;
import com.jfinal.weixin.sdk.api.ApiResult;
import com.jfinal.weixin.sdk.utils.Charsets;
import com.jfinal.weixin.sdk.utils.IOUtils;
import com.jfinal.weixin.sdk.utils.JsonUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
/**
* 公众号发送图片等
* Created by dell on 2018/2/28.
*/
public class MessageUtil {
private static Logger logger = LoggerFactory.getLogger(MessageUtil.class);
private static String customMessageUrl = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=";
//素材上传地址
private static String MEDIA_UPLOADURL = "https://api.weixin.qq.com/cgi-bin/media/upload?access_token=";
public MessageUtil() {
}
private static Map<String,Object> sendMsg(Map<String, Object> message,String accessToken) {
String jsonResult = HttpURLUtil.post(customMessageUrl + accessToken, JsonUtils.toJson(message));
Map resultMap = (Map) JSON.parseObject(jsonResult, Map.class);
// Number number = (Number)resultMap.get("errcode");
// Integer errorCode = (number == null?null:Integer.valueOf(number.intValue()));
// if(errorCode == null || errorCode.intValue() == 0){
// return resultMap;
// }else{
// logger.error("MessageUtil.sendMsg==="+jsonResult+";message="+ReturnCode.get(errorCode));
// return resultMap;
// }
return resultMap;
}
/**
* 发送文本消息
* @param openId
* @param text
* @param accessToken
* @return
*/
public static Map<String,Object> sendText(String openId, String text,String accessToken) {
HashMap json = new HashMap();
json.put("touser", openId);
json.put("msgtype", "text");
HashMap textObj = new HashMap();
textObj.put("content", text);
json.put("text", textObj);
return sendMsg(json,accessToken);
}
/**
* 发送图片消息
* @param openId
* @param media_id
* @param accessToken
* @return
*/
public static Map<String,Object> sendImage(String openId, String media_id,String accessToken) {
HashMap json = new HashMap();
json.put("touser", openId);
json.put("msgtype", "image");
HashMap image = new HashMap();
image.put("media_id", media_id);
json.put("image", image);
return sendMsg(json,accessToken);
}
/**
* 上传临时素材库
* @param accessToken
* @param fileUrl
* @return
*/
public static Map<String,Object> mediaUploadImageMedia(String accessToken,String fileUrl) {
Map<String,Object> resultMap = new HashMap<String,Object>();
String url = MEDIA_UPLOADURL + accessToken + "&type=image";
String jsonStr = null;
try {
jsonStr = uploadMedia(url, fileUrl, (String)null);
} catch (IOException e) {
e.printStackTrace();
}
ApiResult apiResult = new ApiResult(jsonStr);
resultMap.put("jsonStr",jsonStr);
if(apiResult.isSucceed()){
resultMap.put("mediaId",apiResult.get("media_id"));
}else{
resultMap.put("mediaId","");
}
return resultMap;
}
protected static String uploadMedia(String url, String fileUrl,String params) throws IOException {
URL urlGet = new URL(url);
HttpURLConnection conn = (HttpURLConnection)urlGet.openConnection();
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setUseCaches(false);
conn.setRequestMethod("POST");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36");
conn.setRequestProperty("Charsert", "UTF-8");
String BOUNDARY = "----WebKitFormBoundaryiDGnV9zdZA1eM1yL";
conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY);
DataOutputStream out = new DataOutputStream(conn.getOutputStream());
StringBuilder mediaData = new StringBuilder();
mediaData.append("--").append(BOUNDARY).append("\r\n");
mediaData.append("Content-Disposition: form-data;name=\"media\";filename=\"" + new File(fileUrl).getName()+ "\"\r\n");
mediaData.append("Content-Type:application/octet-stream\r\n\r\n");
byte[] mediaDatas = mediaData.toString().getBytes();
out.write(mediaDatas);
out.write(downLoadFromUrl(fileUrl));
out.write("\r\n".getBytes());
if(StrKit.notBlank(params)) {
StringBuilder end_data = new StringBuilder();
end_data.append("--").append(BOUNDARY).append("\r\n");
end_data.append("Content-Disposition: form-data;name=\"description\";");
byte[] in = end_data.toString().getBytes();
out.write(in);
out.write(params.getBytes(Charsets.UTF_8));
}
byte[] end_data1 = ("\r\n--" + BOUNDARY + "--\r\n").getBytes();
out.write(end_data1);
out.flush();
IOUtils.closeQuietly(out);
InputStream in1 = conn.getInputStream();
BufferedReader read = new BufferedReader(new InputStreamReader(in1, Charsets.UTF_8));
String valueString = null;
StringBuffer bufferRes = null;
bufferRes = new StringBuffer();
while((valueString = read.readLine()) != null) {
bufferRes.append(valueString);
}
IOUtils.closeQuietly(in1);
if(conn != null) {
conn.disconnect();
}
return bufferRes.toString();
}
/**
* 从网络Url中下载文件
* @param urlStr
* @throws IOException
*/
public static byte[] downLoadFromUrl(String urlStr) throws IOException {
URL url = new URL(urlStr);
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
//设置超时间为3秒
conn.setConnectTimeout(3*1000);
//防止屏蔽程序抓取而返回403错误
conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
//得到输入流
InputStream inputStream = conn.getInputStream();
//获取自己数组
byte[] getData = readInputStream(inputStream);
// //文件保存位置
// File saveDir = new File(savePath);
// if(!saveDir.exists()){
// saveDir.mkdir();
// }
// File file = new File(saveDir+File.separator+fileName);
// FileOutputStream fos = new FileOutputStream(file);
// fos.write(getData);
// if(fos!=null){
// fos.close();
// }
// if(inputStream!=null){
// inputStream.close();
// }
return getData;
}
/**
* 从输入流中获取字节数组
* @param inputStream
* @return
* @throws IOException
*/
public static byte[] readInputStream(InputStream inputStream) throws IOException {
byte[] buffer = new byte[1024];
int len = 0;
ByteArrayOutputStream bos = new ByteArrayOutputStream();
while((len = inputStream.read(buffer)) != -1) {
bos.write(buffer, 0, len);
}
bos.close();
return bos.toByteArray();
}
}
package com.server.utils.weixin;
import java.util.HashMap;
import java.util.Map;
/**
* Created by dell on 2018/2/28.
*/
public class ReturnCode {
private static final Map<Integer, String> errCodeToErrMsg = new HashMap<Integer, String>(){{
put(-1, "系统繁忙");
put(0, "请求成功");
put(40001, "获取access_token时AppSecret错误,或者access_token无效");
put(40002, "不合法的凭证类型");
put(40003, "不合法的OpenID");
put(40004, "不合法的媒体文件类型");
put(40005, "不合法的文件类型");
put(40006, "不合法的文件大小");
put(40007, "不合法的媒体文件id");
put(40008, "不合法的消息类型");
put(40009, "不合法的图片文件大小");
put(40010, "不合法的语音文件大小");
put(40011, "不合法的视频文件大小");
put(40012, "不合法的缩略图文件大小");
put(40013, "不合法的APPID");
put(40014, "不合法的access_token");
put(40015, "不合法的菜单类型");
put(40016, "不合法的按钮个数");
put(40017, "不合法的按钮类型");
put(40018, "不合法的按钮名字长度");
put(40019, "不合法的按钮KEY长度");
put(40020, "不合法的按钮URL长度");
put(40021, "不合法的菜单版本号");
put(40022, "不合法的子菜单级数");
put(40023, "不合法的子菜单按钮个数");
put(40024, "不合法的子菜单按钮类型");
put(40025, "不合法的子菜单按钮名字长度");
put(40026, "不合法的子菜单按钮KEY长度");
put(40027, "不合法的子菜单按钮URL长度");
put(40028, "不合法的自定义菜单使用用户");
put(40029, "不合法的oauth_code");
put(40030, "不合法的refresh_token");
put(40031, "不合法的openid列表");
put(40032, "不合法的openid列表长度,一次只能拉黑20个用户");
put(40033, "不合法的请求字符,不能包含\\uxxxx格式的字符");
put(40035, "不合法的参数");
put(40037, "不合法的模板id");
put(40038, "不合法的请求格式");
put(40039, "不合法的URL长度");
put(40050, "不合法的分组id");
put(40051, "分组名字不合法");
put(40053, "不合法的actioninfo,请开发者确认参数正确");
put(40056, "不合法的Code码");
put(40059, "不合法的消息id");
put(40071, "不合法的卡券类型");
put(40072, "不合法的编码方式");
put(40078, "card_id未授权");
put(40079, "不合法的时间");
put(40080, "不合法的CardExt");
put(40097, "参数不正确,请参考字段要求检查json字段");
put(40099, "卡券已被核销");
put(40100, "不合法的时间区间");
put(40116, "不合法的Code码");
put(40122, "不合法的库存数量");
put(40124, "会员卡设置查过限制的 custom_field字段");
put(40127, "卡券被用户删除或转赠中");
put(40130, "不合法的openid列表长度, 长度至少大于2个");//invalid openid list size, at least two openid
put(41001, "缺少access_token参数");
put(41002, "缺少appid参数");
put(41003, "缺少refresh_token参数");
put(41004, "缺少secret参数");
put(41005, "缺少多媒体文件数据");
put(41006, "缺少media_id参数");
put(41007, "缺少子菜单数据");
put(41008, "缺少oauth code");
put(41009, "缺少openid");
put(41011, "缺少必填字段");
put(41012, "缺少cardid参数");
put(42001, "access_token超时");
put(42002, "refresh_token超时");
put(42003, "oauth_code超时");
put(43001, "需要GET请求");
put(43002, "需要POST请求");
put(43003, "需要HTTPS请求");
put(43004, "需要接收者关注");
put(43005, "需要好友关系");
put(43009, "自定义SN权限,请前往公众平台申请");
put(43010, "无储值权限,请前往公众平台申请");
put(43100, "修改模板所属行业太频繁");
put(44001, "多媒体文件为空");
put(44002, "POST的数据包为空");
put(44003, "图文消息内容为空");
put(44004, "文本消息内容为空");
put(45001, "多媒体文件大小超过限制");
put(45002, "消息内容超过限制");
put(45003, "标题字段超过限制");
put(45004, "描述字段超过限制");
put(45005, "链接字段超过限制");
put(45006, "图片链接字段超过限制");
put(45007, "语音播放时间超过限制");
put(45008, "图文消息超过限制");
put(45009, "接口调用超过限制");
put(45010, "创建菜单个数超过限制");
put(45015, "回复时间超过限制");
put(45016, "系统分组,不允许修改");
put(45017, "分组名字过长");
put(45018, "分组数量超过上限");
put(45027, "模板与所选行业不符");//template conflict with industry
put(45028, "没有群发配额");//has no masssend quota
put(45030, "该cardid无接口权限");
put(45031, "库存为0");
put(45033, "用户领取次数超过限制get_limit");
put(45056, "创建的标签数过多,请注意不能超过100个");
put(45057, "该标签下粉丝数超过10w,不允许直接删除");
put(45058, "不能修改0/1/2这三个系统默认保留的标签");
put(45059, "有粉丝身上的标签数已经超过限制");
put(45157, "标签名非法,请注意不能和其他标签重名");
put(45158, "标签名长度超过30个字节");
put(45159, "非法的tag_id");
put(46001, "不存在媒体数据");
put(46002, "不存在的菜单版本");
put(46003, "不存在的菜单数据");
put(46004, "不存在的用户");
put(46005, "不存在的门店");
put(47001, "解析JSON/XML内容错误");
put(48001, "api功能未授权");
put(48004, "api接口被封禁,请登录mp.weixin.qq.com查看详情");
put(49003, "传入的openid不属于此AppID");
put(50001, "用户未授权该api");
put(50002, "用户受限,可能是违规后接口被封禁");
put(61451, "参数错误(invalid parameter)");
put(61452, "无效客服账号(invalid kf_account)");
put(61453, "客服帐号已存在(kf_account exsited)");
put(61454, "客服帐号名长度超过限制(仅允许10个英文字符,不包括@及@后的公众号的微信号)(invalid kf_acount length)");
put(61455, "客服帐号名包含非法字符(仅允许英文+数字)(illegal character in kf_account)");
put(61456, "客服帐号个数超过限制(10个客服账号)(kf_account count exceeded)");
put(61457, "无效头像文件类型(invalid file type)");
put(61450, "系统错误(system error)");
put(61500, "日期格式错误");
put(65104, "门店的类型不合法,必须严格按照附表的分类填写");
put(65105, "图片url 不合法,必须使用接口1 的图片上传接口所获取的url");
put(65106, "门店状态必须未审核通过");
put(65107, "扩展字段为不允许修改的状态");
put(65109, "门店名为空");
put(65110, "门店所在详细街道地址为空");
put(65111, "门店的电话为空");
put(65112, "门店所在的城市为空");
put(65113, "门店所在的省份为空");
put(65114, "图片列表为空");
put(65115, "poi_id 不正确");
put(65301, "不存在此menuid对应的个性化菜单");
put(65302, "没有相应的用户");
put(65303, "没有默认菜单,不能创建个性化菜单");
put(65304, "MatchRule信息为空");
put(65305, "个性化菜单数量受限");
put(65306, "不支持个性化菜单的帐号");
put(65307, "个性化菜单信息为空");
put(65308, "包含没有响应类型的button");
put(65309, "个性化菜单开关处于关闭状态");
put(65310, "填写了省份或城市信息,国家信息不能为空");
put(65311, "填写了城市信息,省份信息不能为空");
put(65312, "不合法的国家信息");
put(65313, "不合法的省份信息");
put(65314, "不合法的城市信息");
put(65316, "该公众号的菜单设置了过多的域名外跳(最多跳转到3个域名的链接)");
put(65317, "不合法的URL");
put(65400, "API不可用,即没有开通/升级到新客服功能");
put(65401, "无效客服帐号");
put(65402, "帐号尚未绑定微信号,不能投入使用");
put(65403, "客服昵称不合法");
put(65404, "客服帐号不合法");
put(65405, "帐号数目已达到上限,不能继续添加");
put(65406, "已经存在的客服帐号");
put(65407, "邀请对象已经是本公众号客服");
put(65408, "本公众号已发送邀请给该微信号");
put(65409, "无效的微信号");
put(65410, "邀请对象绑定公众号客服数量达到上限(目前每个微信号最多可以绑定5个公众号客服帐号)");
put(65411, "该帐号已经有一个等待确认的邀请,不能重复邀请");
put(65412, "该帐号已经绑定微信号,不能进行邀请");
put(65413, "不存在对应用户的会话信息");
put(65414, "客户正在被其他客服接待");
put(65415, "客服不在线");
put(65416, "查询参数不合法");
put(65417, "查询时间段超出限制");
put(72015, "没有操作发票的权限,请检查是否已开通相应权限。");
put(72017, "发票抬头不一致");
put(72023, "发票已被其他公众号锁定");
put(72024, "发票状态错误");
put(72025, "wx_invoice_token无效");
put(72028, "未设置微信支付商户信息");
put(72029, "未设置授权字段");
put(72030, "mchid无效");
put(72031, "参数错误。可能为请求中包括无效的参数名称或包含不通过后台校验的参数值");
put(72035, "发票已经被拒绝开票");
put(72036, "发票正在被修改状态,请稍后再试");
put(72038, "订单没有授权,可能是开票平台appid、商户appid、订单order_id不匹配");
put(72039, "订单未被锁定");
put(72040, "Pdf无效,请提供真实有效的pdf");
put(72042, "发票号码和发票代码重复");
put(72043, "发票号码和发票代码错误");
put(72044, "发票抬头二维码超时");
put(88000, "没有留言权限");
put(9001001, "POST数据参数不合法");
put(9001002, "远端服务不可用");
put(9001003, "Ticket不合法");
put(9001004, "获取摇周边用户信息失败");
put(9001005, "获取商户信息失败");
put(9001006, "获取OpenID失败");
put(9001007, "上传文件缺失");
put(9001008, "上传素材的文件类型不合法");
put(9001009, "上传素材的文件尺寸不合法");
put(9001010, "上传失败");
put(9001020, "帐号不合法");
put(9001021, "已有设备激活率低于50%,不能新增设备");
put(9001022, "设备申请数不合法,必须为大于0的数字");
put(9001023, "已存在审核中的设备ID申请");
put(9001024, "一次查询设备ID数量不能超过50");
put(9001025, "设备ID不合法");
put(9001026, "页面ID不合法");
put(9001027, "页面参数不合法");
put(9001028, "一次删除页面ID数量不能超过10");
put(9001029, "页面已应用在设备中,请先解除应用关系再删除");
put(9001030, "一次查询页面ID数量不能超过50");
put(9001031, "时间区间不合法");
put(9001032, "保存设备与页面的绑定关系参数错误");
put(9001033, "门店ID不合法");
put(9001034, "设备备注信息过长");
put(9001035, "设备申请参数不合法");
put(9001036, "查询起始值begin不合法");
}};
public ReturnCode(){
}
/**
* 通过返回码获取返回信息
* @param errCode 错误码
* @return {String}
*/
public static String get(int errCode) {
return errCodeToErrMsg.get(errCode);
}
}
package com.server.utils.weixin;
/**
* Created by lemon_bar on 15/7/1.
*/
public enum WXMessageType {
text,
image,
voice,
video,
news,
shortvideo,
location,
link,
event;
}
package com.server.utils.weixin;
import com.alibaba.fastjson.JSON;
import com.jfinal.weixin.sdk.api.JsTicket;
import com.jfinal.weixin.sdk.api.JsTicketApi;
import com.jfinal.weixin.sdk.kit.ParaMap;
import com.jfinal.weixin.sdk.utils.HttpUtils;
import com.server.utils.weixin.bean.SnsAccessTokenBean;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.util.StringUtils;
import org.springframework.web.client.RestTemplate;
import java.io.UnsupportedEncodingException;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Formatter;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
/**
* Created by 豆腐干Sama on 2018/12/5.
*/
public class WeixinBaseUtil {
static Logger logger = LoggerFactory.getLogger(WeixinBaseUtil.class);
//获取微信accesstockenurl
public static final String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential";
//获取网页access_token
private static String SNS_ACCESS_TOKEN_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid={appid}&secret={secret}&code={code}&grant_type=authorization_code";
//获取用户信息url
private static String USER_INFO_URL = "https://api.weixin.qq.com/sns/userinfo";
private static String JsapiTicketURL = "https://api.weixin.qq.com/cgi-bin/ticket/getticket";
public static Map<String, Object> authorization(String appId, String appSecret, String code) {
if (StringUtils.hasText(appId) && StringUtils.hasText(appSecret) && StringUtils.hasText(code)) {
final String queryAccessTokeUrl = SNS_ACCESS_TOKEN_URL.replace("{appid}", appId).replace("{secret}", appSecret).replace("{code}", code);
RestTemplate restTemplate = new RestTemplate();
String json = restTemplate.getForObject(queryAccessTokeUrl, String.class);
SnsAccessTokenBean snsAccessTokenBean = new SnsAccessTokenBean(json);
String accessToken = snsAccessTokenBean.getAccessToken();
String openid = snsAccessTokenBean.getOpenid();
restTemplate.getMessageConverters().set(1, new StringHttpMessageConverter(StandardCharsets.UTF_8));
String userInfoJsonStr = restTemplate.getForObject(USER_INFO_URL + "?access_token=" + accessToken + "&openid=" + openid + "&lang=zh_CN", String.class);
Map userInfoResultMap = JSON.parseObject(userInfoJsonStr, Map.class);
Number errCode = (Number) userInfoResultMap.get("errcode");
Integer errorCode = (errCode == null ? null : Integer.valueOf(errCode.intValue()));
if (errorCode == null || errorCode.intValue() == 0) {
userInfoResultMap.put("wxAccessToken", snsAccessTokenBean.getAccessToken());
userInfoResultMap.put("wxRefreshToken", snsAccessTokenBean.getRefresh_token());
return userInfoResultMap;
}
} else {
logger.error("参数有误");
return null;
}
return null;
}
/**
* 获取微信 ticket
*
* @param appId
* @param accesstoken
* @param url
* @param redisTemplate
* @return
*/
public static String getTicket(String appId, String accesstoken, String url, RedisTemplate redisTemplate) {
String key = appId + '_' + JsTicketApi.JsApiType.jsapi.name();
final ParaMap pm = ParaMap.create("access_token", accesstoken).put("type", JsTicketApi.JsApiType.jsapi.name());
boolean redisTicket = true;
String json = "";
if (redisTemplate.hasKey("wx_ticket_" + key)) {
json = (String) redisTemplate.opsForValue().get("wx_ticket_" + appId);
if (StringUtils.hasText(json)) {
redisTicket = false;
}
}
if (redisTicket) {
json = HttpUtils.get(WeixinBaseUtil.JsapiTicketURL, pm.getData());
}
JsTicket jsTicket = new JsTicket(json);
return jsTicket.getTicket();
}
public static Map<String, Object> sign(String jsapi_ticket, String url, String appId) {
Map<String, Object> ret = new HashMap<String, Object>();
String nonce_str = UUID.randomUUID().toString();
String timestamp = Long.toString(System.currentTimeMillis() / 1000);
String str;
String signature = "";
//注意这里参数名必须全部小写,且必须有序
str = "jsapi_ticket=" + jsapi_ticket + "&noncestr=" + nonce_str + "&timestamp=" + timestamp + "&url=" + url;
try {
MessageDigest crypt = MessageDigest.getInstance("SHA-1");
crypt.reset();
crypt.update(str.getBytes("UTF-8"));
signature = byteToHex(crypt.digest());
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
ret.put("appId", appId);
ret.put("url", url);
ret.put("jsapi_ticket", jsapi_ticket);
ret.put("nonceStr", nonce_str);
ret.put("timestamp", timestamp);
ret.put("signature", signature);
return ret;
}
private static String byteToHex(final byte[] hash) {
Formatter formatter = new Formatter();
for (byte b : hash) {
formatter.format("%02x", b);
}
String result = formatter.toString();
formatter.close();
return result;
}
}
\ No newline at end of file
package com.server.utils.weixin.bean;
import com.alibaba.fastjson.JSON;
import com.server.utils.weixin.ReturnCode;
import java.io.Serializable;
import java.util.Map;
/**
* Created by dell on 2018/2/28.
*/
public class AccessTokenBean implements Serializable {
private String access_token;
private Integer expires_in;
private Integer errcode;
private String errmsg;
private Long expiredTime;
private String json;
public AccessTokenBean(String jsonStr) {
this.json = jsonStr;
try {
Map e = (Map) JSON.parseObject(jsonStr, Map.class);
this.access_token = (String)e.get("access_token");
this.expires_in = (Integer)e.get("expires_in");
this.errcode = (Integer)e.get("errcode");
this.errmsg = (String)e.get("errmsg");
if(this.expires_in != null) {
this.expiredTime = Long.valueOf(System.currentTimeMillis() + (long)((this.expires_in.intValue() - 5) * 1000));
}
if(e.containsKey("expiredTime")) {
this.expiredTime = (Long)e.get("expiredTime");
}
} catch (Exception var3) {
throw new RuntimeException(var3);
}
}
public String getJson() {
return this.json;
}
public String getAccessToken() {
return this.access_token;
}
public Integer getExpiresIn() {
return this.expires_in;
}
public Long getExpiredTime() {
return this.expiredTime;
}
public Integer getErrorCode() {
return this.errcode;
}
public String getErrorMsg() {
if(this.errcode != null) {
String result = ReturnCode.get(this.errcode.intValue());
if(result != null) {
return result;
}
}
return this.errmsg;
}
}
package com.server.utils.weixin.bean;
import com.alibaba.fastjson.JSON;
import com.server.utils.weixin.ReturnCode;
import java.util.Map;
/**
* Created by dell on 2018/2/28.
*/
public class SnsAccessTokenBean {
private String access_token;
private Integer expires_in;
private String refresh_token;
private String openid;
private String scope;
private String unionid;
private Integer errcode;
private String errmsg;
private Long expiredTime;
private String json;
public SnsAccessTokenBean(String jsonStr) {
this.json = jsonStr;
try {
Map e = (Map) JSON.parseObject(jsonStr, Map.class);
this.access_token = (String)e.get("access_token");
this.expires_in = this.getInt(e, "expires_in");
this.refresh_token = (String)e.get("refresh_token");
this.openid = (String)e.get("openid");
this.unionid = (String)e.get("unionid");
this.scope = (String)e.get("scope");
this.errcode = this.getInt(e, "errcode");
this.errmsg = (String)e.get("errmsg");
if(this.expires_in != null) {
this.expiredTime = Long.valueOf(System.currentTimeMillis() + (long)((this.expires_in.intValue() - 5) * 1000));
}
} catch (Exception var3) {
throw new RuntimeException(var3);
}
}
public String getJson() {
return this.json;
}
private Integer getInt(Map<String, Object> temp, String key) {
Number number = (Number)temp.get(key);
return number == null?null:Integer.valueOf(number.intValue());
}
public String getAccessToken() {
return this.access_token;
}
public Integer getExpiresIn() {
return this.expires_in;
}
public String getRefresh_token() {
return this.refresh_token;
}
public String getOpenid() {
return this.openid;
}
public String getScope() {
return this.scope;
}
public Integer getErrorCode() {
return this.errcode;
}
public String getErrorMsg() {
if(this.errcode != null) {
String result = ReturnCode.get(this.errcode.intValue());
if(result != null) {
return result;
}
}
return this.errmsg;
}
public String getUnionid() {
return this.unionid;
}
}
package com.server.web.common.mapper;
import com.server.web.common.model.TBaseBanner;
import com.server.web.common.model.TBaseBannerExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TBaseBannerMapper {
long countByExample(TBaseBannerExample example);
int deleteByExample(TBaseBannerExample example);
int deleteByPrimaryKey(Long id);
int insert(TBaseBanner record);
int insertSelective(TBaseBanner record);
List<TBaseBanner> selectByExample(TBaseBannerExample example);
TBaseBanner selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") TBaseBanner record, @Param("example") TBaseBannerExample example);
int updateByExample(@Param("record") TBaseBanner record, @Param("example") TBaseBannerExample example);
int updateByPrimaryKeySelective(TBaseBanner record);
int updateByPrimaryKey(TBaseBanner record);
}
\ No newline at end of file
package com.server.web.common.mapper;
import com.server.web.common.model.TBaseFirstClass;
import com.server.web.common.model.TBaseFirstClassExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TBaseFirstClassMapper {
long countByExample(TBaseFirstClassExample example);
int deleteByExample(TBaseFirstClassExample example);
int deleteByPrimaryKey(Long id);
int insert(TBaseFirstClass record);
int insertSelective(TBaseFirstClass record);
List<TBaseFirstClass> selectByExample(TBaseFirstClassExample example);
TBaseFirstClass selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") TBaseFirstClass record, @Param("example") TBaseFirstClassExample example);
int updateByExample(@Param("record") TBaseFirstClass record, @Param("example") TBaseFirstClassExample example);
int updateByPrimaryKeySelective(TBaseFirstClass record);
int updateByPrimaryKey(TBaseFirstClass record);
}
\ No newline at end of file
package com.server.web.common.mapper;
import com.server.web.common.model.TBaseSecondClass;
import com.server.web.common.model.TBaseSecondClassExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TBaseSecondClassMapper {
long countByExample(TBaseSecondClassExample example);
int deleteByExample(TBaseSecondClassExample example);
int deleteByPrimaryKey(Long id);
int insert(TBaseSecondClass record);
int insertSelective(TBaseSecondClass record);
List<TBaseSecondClass> selectByExample(TBaseSecondClassExample example);
TBaseSecondClass selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") TBaseSecondClass record, @Param("example") TBaseSecondClassExample example);
int updateByExample(@Param("record") TBaseSecondClass record, @Param("example") TBaseSecondClassExample example);
int updateByPrimaryKeySelective(TBaseSecondClass record);
int updateByPrimaryKey(TBaseSecondClass record);
}
\ No newline at end of file
package com.server.web.common.mapper;
import com.server.web.common.model.TKzyComment;
import com.server.web.common.model.TKzyCommentExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TKzyCommentMapper {
long countByExample(TKzyCommentExample example);
int deleteByExample(TKzyCommentExample example);
int deleteByPrimaryKey(Long id);
int insert(TKzyComment record);
int insertSelective(TKzyComment record);
List<TKzyComment> selectByExample(TKzyCommentExample example);
TKzyComment selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") TKzyComment record, @Param("example") TKzyCommentExample example);
int updateByExample(@Param("record") TKzyComment record, @Param("example") TKzyCommentExample example);
int updateByPrimaryKeySelective(TKzyComment record);
int updateByPrimaryKey(TKzyComment record);
}
\ No newline at end of file
package com.server.web.common.mapper;
import com.server.web.common.model.TKzyCourse;
import com.server.web.common.model.TKzyCourseExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TKzyCourseMapper {
long countByExample(TKzyCourseExample example);
int deleteByExample(TKzyCourseExample example);
int deleteByPrimaryKey(Long id);
int insert(TKzyCourse record);
int insertSelective(TKzyCourse record);
List<TKzyCourse> selectByExampleWithBLOBs(TKzyCourseExample example);
List<TKzyCourse> selectByExample(TKzyCourseExample example);
TKzyCourse selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") TKzyCourse record, @Param("example") TKzyCourseExample example);
int updateByExampleWithBLOBs(@Param("record") TKzyCourse record, @Param("example") TKzyCourseExample example);
int updateByExample(@Param("record") TKzyCourse record, @Param("example") TKzyCourseExample example);
int updateByPrimaryKeySelective(TKzyCourse record);
int updateByPrimaryKeyWithBLOBs(TKzyCourse record);
int updateByPrimaryKey(TKzyCourse record);
}
\ No newline at end of file
package com.server.web.common.mapper;
import com.server.web.common.model.TKzyInformation;
import com.server.web.common.model.TKzyInformationExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TKzyInformationMapper {
long countByExample(TKzyInformationExample example);
int deleteByExample(TKzyInformationExample example);
int deleteByPrimaryKey(Long id);
int insert(TKzyInformation record);
int insertSelective(TKzyInformation record);
List<TKzyInformation> selectByExampleWithBLOBs(TKzyInformationExample example);
List<TKzyInformation> selectByExample(TKzyInformationExample example);
TKzyInformation selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") TKzyInformation record, @Param("example") TKzyInformationExample example);
int updateByExampleWithBLOBs(@Param("record") TKzyInformation record, @Param("example") TKzyInformationExample example);
int updateByExample(@Param("record") TKzyInformation record, @Param("example") TKzyInformationExample example);
int updateByPrimaryKeySelective(TKzyInformation record);
int updateByPrimaryKeyWithBLOBs(TKzyInformation record);
int updateByPrimaryKey(TKzyInformation record);
}
\ No newline at end of file
package com.server.web.common.mapper;
import com.server.web.common.model.TKzyRelationClass;
import com.server.web.common.model.TKzyRelationClassExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TKzyRelationClassMapper {
long countByExample(TKzyRelationClassExample example);
int deleteByExample(TKzyRelationClassExample example);
int deleteByPrimaryKey(Long id);
int insert(TKzyRelationClass record);
int insertSelective(TKzyRelationClass record);
List<TKzyRelationClass> selectByExample(TKzyRelationClassExample example);
TKzyRelationClass selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") TKzyRelationClass record, @Param("example") TKzyRelationClassExample example);
int updateByExample(@Param("record") TKzyRelationClass record, @Param("example") TKzyRelationClassExample example);
int updateByPrimaryKeySelective(TKzyRelationClass record);
int updateByPrimaryKey(TKzyRelationClass record);
}
\ No newline at end of file
package com.server.web.common.mapper;
import com.server.web.common.model.TKzyUserIntegralFlowing;
import com.server.web.common.model.TKzyUserIntegralFlowingExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TKzyUserIntegralFlowingMapper {
long countByExample(TKzyUserIntegralFlowingExample example);
int deleteByExample(TKzyUserIntegralFlowingExample example);
int deleteByPrimaryKey(Long id);
int insert(TKzyUserIntegralFlowing record);
int insertSelective(TKzyUserIntegralFlowing record);
List<TKzyUserIntegralFlowing> selectByExample(TKzyUserIntegralFlowingExample example);
TKzyUserIntegralFlowing selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") TKzyUserIntegralFlowing record, @Param("example") TKzyUserIntegralFlowingExample example);
int updateByExample(@Param("record") TKzyUserIntegralFlowing record, @Param("example") TKzyUserIntegralFlowingExample example);
int updateByPrimaryKeySelective(TKzyUserIntegralFlowing record);
int updateByPrimaryKey(TKzyUserIntegralFlowing record);
}
\ No newline at end of file
package com.server.web.common.mapper;
import com.server.web.common.model.TKzyUser;
import com.server.web.common.model.TKzyUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TKzyUserMapper {
long countByExample(TKzyUserExample example);
int deleteByExample(TKzyUserExample example);
int deleteByPrimaryKey(Long id);
int insert(TKzyUser record);
int insertSelective(TKzyUser record);
List<TKzyUser> selectByExample(TKzyUserExample example);
TKzyUser selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") TKzyUser record, @Param("example") TKzyUserExample example);
int updateByExample(@Param("record") TKzyUser record, @Param("example") TKzyUserExample example);
int updateByPrimaryKeySelective(TKzyUser record);
int updateByPrimaryKey(TKzyUser record);
}
\ No newline at end of file
package com.server.web.common.mapping;
import java.util.List;
import java.util.Map;
/**
* Created by weiwenfu@163.com on 2020/3/12 下午 2:58.
*/
public interface CommentMapper {
List<Map<String, Object>> commentList(Map<String, Object> param);
Integer commentListTotal(Map<String, Object> param);
List<Map<String, Object>> informationCommentList(Map<String, Object> param);
Integer informationCommentListTotal(Map<String, Object> param);
}
package com.server.web.common.mapping;
import java.util.List;
import java.util.Map;
/**
* Created by weiwenfu@163.com on 2020/3/12 下午 2:58.
*/
public interface CourseMapper {
List<Map<String,Object>> recordCourse(Map<String, Object> param);
List<Map<String,Object>> livingCourse(Map<String, Object> param);
List<Map<String,Object>> hotCourse(Map<String, Object> param);
List<Map<String,Object>> livingCourseToday(Map<String, Object> param);
}
package com.server.web.common.mapping;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* Created by weiwenfu@163.com on 2020/3/12 下午 4:41.
*/
public interface InformationMapper {
List<Map<String, Object>> categoryDetail(@Param("firstId") Long id);
List<Map<String, Object>> secondClassDetailInformation(Map<String, Object> param);
Integer secondClassDetailInformationTotal(Map<String, Object> param);
List<Map<String, Object>> secondClassDetailCourse(Map<String, Object> param);
Integer secondClassDetailCourseTotal(Map<String, Object> param);
}
package com.server.web.common.mapping;
import java.util.List;
import java.util.Map;
/**
* Created by weiwenfu@163.com on 2020/3/13 下午 4:09.
*/
public interface IntegralMapper {
List<Map<String, Object>> signInList(Map<String, Object> param);
Map<String, Object> queryDaySign(Map<String, Object> param2);
}
package com.server.web.common.model;
import java.io.Serializable;
public class BaseModel implements Serializable {
}
package com.server.web.common.model;
import java.util.Date;
public class TBaseBanner extends BaseModel {
private Long id;
private String title;
private String picUrl;
private Integer weight;
private Integer jumpType;
private String jumpAddress;
private String remark;
private Integer isDelete;
private Integer isUp;
private Date createDt;
public TBaseBanner(Long id, String title, String picUrl, Integer weight, Integer jumpType, String jumpAddress, String remark, Integer isDelete, Integer isUp, Date createDt) {
this.id = id;
this.title = title;
this.picUrl = picUrl;
this.weight = weight;
this.jumpType = jumpType;
this.jumpAddress = jumpAddress;
this.remark = remark;
this.isDelete = isDelete;
this.isUp = isUp;
this.createDt = createDt;
}
public TBaseBanner() {
super();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title == null ? null : title.trim();
}
public String getPicUrl() {
return picUrl;
}
public void setPicUrl(String picUrl) {
this.picUrl = picUrl == null ? null : picUrl.trim();
}
public Integer getWeight() {
return weight;
}
public void setWeight(Integer weight) {
this.weight = weight;
}
public Integer getJumpType() {
return jumpType;
}
public void setJumpType(Integer jumpType) {
this.jumpType = jumpType;
}
public String getJumpAddress() {
return jumpAddress;
}
public void setJumpAddress(String jumpAddress) {
this.jumpAddress = jumpAddress == null ? null : jumpAddress.trim();
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public Integer getIsUp() {
return isUp;
}
public void setIsUp(Integer isUp) {
this.isUp = isUp;
}
public Date getCreateDt() {
return createDt;
}
public void setCreateDt(Date createDt) {
this.createDt = createDt;
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class TBaseBannerExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TBaseBannerExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andTitleIsNull() {
addCriterion("title is null");
return (Criteria) this;
}
public Criteria andTitleIsNotNull() {
addCriterion("title is not null");
return (Criteria) this;
}
public Criteria andTitleEqualTo(String value) {
addCriterion("title =", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotEqualTo(String value) {
addCriterion("title <>", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThan(String value) {
addCriterion("title >", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThanOrEqualTo(String value) {
addCriterion("title >=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThan(String value) {
addCriterion("title <", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThanOrEqualTo(String value) {
addCriterion("title <=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLike(String value) {
addCriterion("title like", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotLike(String value) {
addCriterion("title not like", value, "title");
return (Criteria) this;
}
public Criteria andTitleIn(List<String> values) {
addCriterion("title in", values, "title");
return (Criteria) this;
}
public Criteria andTitleNotIn(List<String> values) {
addCriterion("title not in", values, "title");
return (Criteria) this;
}
public Criteria andTitleBetween(String value1, String value2) {
addCriterion("title between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andTitleNotBetween(String value1, String value2) {
addCriterion("title not between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andPicUrlIsNull() {
addCriterion("pic_url is null");
return (Criteria) this;
}
public Criteria andPicUrlIsNotNull() {
addCriterion("pic_url is not null");
return (Criteria) this;
}
public Criteria andPicUrlEqualTo(String value) {
addCriterion("pic_url =", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotEqualTo(String value) {
addCriterion("pic_url <>", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlGreaterThan(String value) {
addCriterion("pic_url >", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlGreaterThanOrEqualTo(String value) {
addCriterion("pic_url >=", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLessThan(String value) {
addCriterion("pic_url <", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLessThanOrEqualTo(String value) {
addCriterion("pic_url <=", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLike(String value) {
addCriterion("pic_url like", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotLike(String value) {
addCriterion("pic_url not like", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlIn(List<String> values) {
addCriterion("pic_url in", values, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotIn(List<String> values) {
addCriterion("pic_url not in", values, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlBetween(String value1, String value2) {
addCriterion("pic_url between", value1, value2, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotBetween(String value1, String value2) {
addCriterion("pic_url not between", value1, value2, "picUrl");
return (Criteria) this;
}
public Criteria andWeightIsNull() {
addCriterion("weight is null");
return (Criteria) this;
}
public Criteria andWeightIsNotNull() {
addCriterion("weight is not null");
return (Criteria) this;
}
public Criteria andWeightEqualTo(Integer value) {
addCriterion("weight =", value, "weight");
return (Criteria) this;
}
public Criteria andWeightNotEqualTo(Integer value) {
addCriterion("weight <>", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThan(Integer value) {
addCriterion("weight >", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThanOrEqualTo(Integer value) {
addCriterion("weight >=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThan(Integer value) {
addCriterion("weight <", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThanOrEqualTo(Integer value) {
addCriterion("weight <=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightIn(List<Integer> values) {
addCriterion("weight in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightNotIn(List<Integer> values) {
addCriterion("weight not in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightBetween(Integer value1, Integer value2) {
addCriterion("weight between", value1, value2, "weight");
return (Criteria) this;
}
public Criteria andWeightNotBetween(Integer value1, Integer value2) {
addCriterion("weight not between", value1, value2, "weight");
return (Criteria) this;
}
public Criteria andJumpTypeIsNull() {
addCriterion("jump_type is null");
return (Criteria) this;
}
public Criteria andJumpTypeIsNotNull() {
addCriterion("jump_type is not null");
return (Criteria) this;
}
public Criteria andJumpTypeEqualTo(Integer value) {
addCriterion("jump_type =", value, "jumpType");
return (Criteria) this;
}
public Criteria andJumpTypeNotEqualTo(Integer value) {
addCriterion("jump_type <>", value, "jumpType");
return (Criteria) this;
}
public Criteria andJumpTypeGreaterThan(Integer value) {
addCriterion("jump_type >", value, "jumpType");
return (Criteria) this;
}
public Criteria andJumpTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("jump_type >=", value, "jumpType");
return (Criteria) this;
}
public Criteria andJumpTypeLessThan(Integer value) {
addCriterion("jump_type <", value, "jumpType");
return (Criteria) this;
}
public Criteria andJumpTypeLessThanOrEqualTo(Integer value) {
addCriterion("jump_type <=", value, "jumpType");
return (Criteria) this;
}
public Criteria andJumpTypeIn(List<Integer> values) {
addCriterion("jump_type in", values, "jumpType");
return (Criteria) this;
}
public Criteria andJumpTypeNotIn(List<Integer> values) {
addCriterion("jump_type not in", values, "jumpType");
return (Criteria) this;
}
public Criteria andJumpTypeBetween(Integer value1, Integer value2) {
addCriterion("jump_type between", value1, value2, "jumpType");
return (Criteria) this;
}
public Criteria andJumpTypeNotBetween(Integer value1, Integer value2) {
addCriterion("jump_type not between", value1, value2, "jumpType");
return (Criteria) this;
}
public Criteria andJumpAddressIsNull() {
addCriterion("jump_address is null");
return (Criteria) this;
}
public Criteria andJumpAddressIsNotNull() {
addCriterion("jump_address is not null");
return (Criteria) this;
}
public Criteria andJumpAddressEqualTo(String value) {
addCriterion("jump_address =", value, "jumpAddress");
return (Criteria) this;
}
public Criteria andJumpAddressNotEqualTo(String value) {
addCriterion("jump_address <>", value, "jumpAddress");
return (Criteria) this;
}
public Criteria andJumpAddressGreaterThan(String value) {
addCriterion("jump_address >", value, "jumpAddress");
return (Criteria) this;
}
public Criteria andJumpAddressGreaterThanOrEqualTo(String value) {
addCriterion("jump_address >=", value, "jumpAddress");
return (Criteria) this;
}
public Criteria andJumpAddressLessThan(String value) {
addCriterion("jump_address <", value, "jumpAddress");
return (Criteria) this;
}
public Criteria andJumpAddressLessThanOrEqualTo(String value) {
addCriterion("jump_address <=", value, "jumpAddress");
return (Criteria) this;
}
public Criteria andJumpAddressLike(String value) {
addCriterion("jump_address like", value, "jumpAddress");
return (Criteria) this;
}
public Criteria andJumpAddressNotLike(String value) {
addCriterion("jump_address not like", value, "jumpAddress");
return (Criteria) this;
}
public Criteria andJumpAddressIn(List<String> values) {
addCriterion("jump_address in", values, "jumpAddress");
return (Criteria) this;
}
public Criteria andJumpAddressNotIn(List<String> values) {
addCriterion("jump_address not in", values, "jumpAddress");
return (Criteria) this;
}
public Criteria andJumpAddressBetween(String value1, String value2) {
addCriterion("jump_address between", value1, value2, "jumpAddress");
return (Criteria) this;
}
public Criteria andJumpAddressNotBetween(String value1, String value2) {
addCriterion("jump_address not between", value1, value2, "jumpAddress");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andIsDeleteIsNull() {
addCriterion("is_delete is null");
return (Criteria) this;
}
public Criteria andIsDeleteIsNotNull() {
addCriterion("is_delete is not null");
return (Criteria) this;
}
public Criteria andIsDeleteEqualTo(Integer value) {
addCriterion("is_delete =", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotEqualTo(Integer value) {
addCriterion("is_delete <>", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteGreaterThan(Integer value) {
addCriterion("is_delete >", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
addCriterion("is_delete >=", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteLessThan(Integer value) {
addCriterion("is_delete <", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
addCriterion("is_delete <=", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteIn(List<Integer> values) {
addCriterion("is_delete in", values, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotIn(List<Integer> values) {
addCriterion("is_delete not in", values, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
addCriterion("is_delete between", value1, value2, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
addCriterion("is_delete not between", value1, value2, "isDelete");
return (Criteria) this;
}
public Criteria andIsUpIsNull() {
addCriterion("is_up is null");
return (Criteria) this;
}
public Criteria andIsUpIsNotNull() {
addCriterion("is_up is not null");
return (Criteria) this;
}
public Criteria andIsUpEqualTo(Integer value) {
addCriterion("is_up =", value, "isUp");
return (Criteria) this;
}
public Criteria andIsUpNotEqualTo(Integer value) {
addCriterion("is_up <>", value, "isUp");
return (Criteria) this;
}
public Criteria andIsUpGreaterThan(Integer value) {
addCriterion("is_up >", value, "isUp");
return (Criteria) this;
}
public Criteria andIsUpGreaterThanOrEqualTo(Integer value) {
addCriterion("is_up >=", value, "isUp");
return (Criteria) this;
}
public Criteria andIsUpLessThan(Integer value) {
addCriterion("is_up <", value, "isUp");
return (Criteria) this;
}
public Criteria andIsUpLessThanOrEqualTo(Integer value) {
addCriterion("is_up <=", value, "isUp");
return (Criteria) this;
}
public Criteria andIsUpIn(List<Integer> values) {
addCriterion("is_up in", values, "isUp");
return (Criteria) this;
}
public Criteria andIsUpNotIn(List<Integer> values) {
addCriterion("is_up not in", values, "isUp");
return (Criteria) this;
}
public Criteria andIsUpBetween(Integer value1, Integer value2) {
addCriterion("is_up between", value1, value2, "isUp");
return (Criteria) this;
}
public Criteria andIsUpNotBetween(Integer value1, Integer value2) {
addCriterion("is_up not between", value1, value2, "isUp");
return (Criteria) this;
}
public Criteria andCreateDtIsNull() {
addCriterion("create_dt is null");
return (Criteria) this;
}
public Criteria andCreateDtIsNotNull() {
addCriterion("create_dt is not null");
return (Criteria) this;
}
public Criteria andCreateDtEqualTo(Date value) {
addCriterion("create_dt =", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotEqualTo(Date value) {
addCriterion("create_dt <>", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThan(Date value) {
addCriterion("create_dt >", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThanOrEqualTo(Date value) {
addCriterion("create_dt >=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThan(Date value) {
addCriterion("create_dt <", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThanOrEqualTo(Date value) {
addCriterion("create_dt <=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtIn(List<Date> values) {
addCriterion("create_dt in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotIn(List<Date> values) {
addCriterion("create_dt not in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtBetween(Date value1, Date value2) {
addCriterion("create_dt between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotBetween(Date value1, Date value2) {
addCriterion("create_dt not between", value1, value2, "createDt");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.Date;
public class TBaseFirstClass extends BaseModel {
private Long id;
private String className;
private Integer status;
private String picUrl;
private Integer weight;
private Date createDt;
public TBaseFirstClass(Long id, String className, Integer status, String picUrl, Integer weight, Date createDt) {
this.id = id;
this.className = className;
this.status = status;
this.picUrl = picUrl;
this.weight = weight;
this.createDt = createDt;
}
public TBaseFirstClass() {
super();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className == null ? null : className.trim();
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getPicUrl() {
return picUrl;
}
public void setPicUrl(String picUrl) {
this.picUrl = picUrl == null ? null : picUrl.trim();
}
public Integer getWeight() {
return weight;
}
public void setWeight(Integer weight) {
this.weight = weight;
}
public Date getCreateDt() {
return createDt;
}
public void setCreateDt(Date createDt) {
this.createDt = createDt;
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class TBaseFirstClassExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TBaseFirstClassExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andClassNameIsNull() {
addCriterion("class_name is null");
return (Criteria) this;
}
public Criteria andClassNameIsNotNull() {
addCriterion("class_name is not null");
return (Criteria) this;
}
public Criteria andClassNameEqualTo(String value) {
addCriterion("class_name =", value, "className");
return (Criteria) this;
}
public Criteria andClassNameNotEqualTo(String value) {
addCriterion("class_name <>", value, "className");
return (Criteria) this;
}
public Criteria andClassNameGreaterThan(String value) {
addCriterion("class_name >", value, "className");
return (Criteria) this;
}
public Criteria andClassNameGreaterThanOrEqualTo(String value) {
addCriterion("class_name >=", value, "className");
return (Criteria) this;
}
public Criteria andClassNameLessThan(String value) {
addCriterion("class_name <", value, "className");
return (Criteria) this;
}
public Criteria andClassNameLessThanOrEqualTo(String value) {
addCriterion("class_name <=", value, "className");
return (Criteria) this;
}
public Criteria andClassNameLike(String value) {
addCriterion("class_name like", value, "className");
return (Criteria) this;
}
public Criteria andClassNameNotLike(String value) {
addCriterion("class_name not like", value, "className");
return (Criteria) this;
}
public Criteria andClassNameIn(List<String> values) {
addCriterion("class_name in", values, "className");
return (Criteria) this;
}
public Criteria andClassNameNotIn(List<String> values) {
addCriterion("class_name not in", values, "className");
return (Criteria) this;
}
public Criteria andClassNameBetween(String value1, String value2) {
addCriterion("class_name between", value1, value2, "className");
return (Criteria) this;
}
public Criteria andClassNameNotBetween(String value1, String value2) {
addCriterion("class_name not between", value1, value2, "className");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("status is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("status is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("status =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("status <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("status >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("status >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("status <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("status <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("status in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("status not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("status between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("status not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andPicUrlIsNull() {
addCriterion("pic_url is null");
return (Criteria) this;
}
public Criteria andPicUrlIsNotNull() {
addCriterion("pic_url is not null");
return (Criteria) this;
}
public Criteria andPicUrlEqualTo(String value) {
addCriterion("pic_url =", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotEqualTo(String value) {
addCriterion("pic_url <>", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlGreaterThan(String value) {
addCriterion("pic_url >", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlGreaterThanOrEqualTo(String value) {
addCriterion("pic_url >=", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLessThan(String value) {
addCriterion("pic_url <", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLessThanOrEqualTo(String value) {
addCriterion("pic_url <=", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLike(String value) {
addCriterion("pic_url like", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotLike(String value) {
addCriterion("pic_url not like", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlIn(List<String> values) {
addCriterion("pic_url in", values, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotIn(List<String> values) {
addCriterion("pic_url not in", values, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlBetween(String value1, String value2) {
addCriterion("pic_url between", value1, value2, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotBetween(String value1, String value2) {
addCriterion("pic_url not between", value1, value2, "picUrl");
return (Criteria) this;
}
public Criteria andWeightIsNull() {
addCriterion("weight is null");
return (Criteria) this;
}
public Criteria andWeightIsNotNull() {
addCriterion("weight is not null");
return (Criteria) this;
}
public Criteria andWeightEqualTo(Integer value) {
addCriterion("weight =", value, "weight");
return (Criteria) this;
}
public Criteria andWeightNotEqualTo(Integer value) {
addCriterion("weight <>", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThan(Integer value) {
addCriterion("weight >", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThanOrEqualTo(Integer value) {
addCriterion("weight >=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThan(Integer value) {
addCriterion("weight <", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThanOrEqualTo(Integer value) {
addCriterion("weight <=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightIn(List<Integer> values) {
addCriterion("weight in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightNotIn(List<Integer> values) {
addCriterion("weight not in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightBetween(Integer value1, Integer value2) {
addCriterion("weight between", value1, value2, "weight");
return (Criteria) this;
}
public Criteria andWeightNotBetween(Integer value1, Integer value2) {
addCriterion("weight not between", value1, value2, "weight");
return (Criteria) this;
}
public Criteria andCreateDtIsNull() {
addCriterion("create_dt is null");
return (Criteria) this;
}
public Criteria andCreateDtIsNotNull() {
addCriterion("create_dt is not null");
return (Criteria) this;
}
public Criteria andCreateDtEqualTo(Date value) {
addCriterion("create_dt =", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotEqualTo(Date value) {
addCriterion("create_dt <>", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThan(Date value) {
addCriterion("create_dt >", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThanOrEqualTo(Date value) {
addCriterion("create_dt >=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThan(Date value) {
addCriterion("create_dt <", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThanOrEqualTo(Date value) {
addCriterion("create_dt <=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtIn(List<Date> values) {
addCriterion("create_dt in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotIn(List<Date> values) {
addCriterion("create_dt not in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtBetween(Date value1, Date value2) {
addCriterion("create_dt between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotBetween(Date value1, Date value2) {
addCriterion("create_dt not between", value1, value2, "createDt");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.Date;
public class TBaseSecondClass extends BaseModel {
private Long id;
private String className;
private Integer status;
private Integer type;
private String picUrl;
private Long firstId;
private Integer weight;
private Date createDt;
public TBaseSecondClass(Long id, String className, Integer status, Integer type, String picUrl, Long firstId, Integer weight, Date createDt) {
this.id = id;
this.className = className;
this.status = status;
this.type = type;
this.picUrl = picUrl;
this.firstId = firstId;
this.weight = weight;
this.createDt = createDt;
}
public TBaseSecondClass() {
super();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className == null ? null : className.trim();
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getPicUrl() {
return picUrl;
}
public void setPicUrl(String picUrl) {
this.picUrl = picUrl == null ? null : picUrl.trim();
}
public Long getFirstId() {
return firstId;
}
public void setFirstId(Long firstId) {
this.firstId = firstId;
}
public Integer getWeight() {
return weight;
}
public void setWeight(Integer weight) {
this.weight = weight;
}
public Date getCreateDt() {
return createDt;
}
public void setCreateDt(Date createDt) {
this.createDt = createDt;
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class TBaseSecondClassExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TBaseSecondClassExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andClassNameIsNull() {
addCriterion("class_name is null");
return (Criteria) this;
}
public Criteria andClassNameIsNotNull() {
addCriterion("class_name is not null");
return (Criteria) this;
}
public Criteria andClassNameEqualTo(String value) {
addCriterion("class_name =", value, "className");
return (Criteria) this;
}
public Criteria andClassNameNotEqualTo(String value) {
addCriterion("class_name <>", value, "className");
return (Criteria) this;
}
public Criteria andClassNameGreaterThan(String value) {
addCriterion("class_name >", value, "className");
return (Criteria) this;
}
public Criteria andClassNameGreaterThanOrEqualTo(String value) {
addCriterion("class_name >=", value, "className");
return (Criteria) this;
}
public Criteria andClassNameLessThan(String value) {
addCriterion("class_name <", value, "className");
return (Criteria) this;
}
public Criteria andClassNameLessThanOrEqualTo(String value) {
addCriterion("class_name <=", value, "className");
return (Criteria) this;
}
public Criteria andClassNameLike(String value) {
addCriterion("class_name like", value, "className");
return (Criteria) this;
}
public Criteria andClassNameNotLike(String value) {
addCriterion("class_name not like", value, "className");
return (Criteria) this;
}
public Criteria andClassNameIn(List<String> values) {
addCriterion("class_name in", values, "className");
return (Criteria) this;
}
public Criteria andClassNameNotIn(List<String> values) {
addCriterion("class_name not in", values, "className");
return (Criteria) this;
}
public Criteria andClassNameBetween(String value1, String value2) {
addCriterion("class_name between", value1, value2, "className");
return (Criteria) this;
}
public Criteria andClassNameNotBetween(String value1, String value2) {
addCriterion("class_name not between", value1, value2, "className");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("status is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("status is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("status =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("status <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("status >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("status >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("status <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("status <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("status in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("status not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("status between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("status not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("type is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("type =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("type <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("type >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("type >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("type <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("type <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("type in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("type not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("type between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("type not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andPicUrlIsNull() {
addCriterion("pic_url is null");
return (Criteria) this;
}
public Criteria andPicUrlIsNotNull() {
addCriterion("pic_url is not null");
return (Criteria) this;
}
public Criteria andPicUrlEqualTo(String value) {
addCriterion("pic_url =", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotEqualTo(String value) {
addCriterion("pic_url <>", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlGreaterThan(String value) {
addCriterion("pic_url >", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlGreaterThanOrEqualTo(String value) {
addCriterion("pic_url >=", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLessThan(String value) {
addCriterion("pic_url <", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLessThanOrEqualTo(String value) {
addCriterion("pic_url <=", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLike(String value) {
addCriterion("pic_url like", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotLike(String value) {
addCriterion("pic_url not like", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlIn(List<String> values) {
addCriterion("pic_url in", values, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotIn(List<String> values) {
addCriterion("pic_url not in", values, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlBetween(String value1, String value2) {
addCriterion("pic_url between", value1, value2, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotBetween(String value1, String value2) {
addCriterion("pic_url not between", value1, value2, "picUrl");
return (Criteria) this;
}
public Criteria andFirstIdIsNull() {
addCriterion("first_id is null");
return (Criteria) this;
}
public Criteria andFirstIdIsNotNull() {
addCriterion("first_id is not null");
return (Criteria) this;
}
public Criteria andFirstIdEqualTo(Long value) {
addCriterion("first_id =", value, "firstId");
return (Criteria) this;
}
public Criteria andFirstIdNotEqualTo(Long value) {
addCriterion("first_id <>", value, "firstId");
return (Criteria) this;
}
public Criteria andFirstIdGreaterThan(Long value) {
addCriterion("first_id >", value, "firstId");
return (Criteria) this;
}
public Criteria andFirstIdGreaterThanOrEqualTo(Long value) {
addCriterion("first_id >=", value, "firstId");
return (Criteria) this;
}
public Criteria andFirstIdLessThan(Long value) {
addCriterion("first_id <", value, "firstId");
return (Criteria) this;
}
public Criteria andFirstIdLessThanOrEqualTo(Long value) {
addCriterion("first_id <=", value, "firstId");
return (Criteria) this;
}
public Criteria andFirstIdIn(List<Long> values) {
addCriterion("first_id in", values, "firstId");
return (Criteria) this;
}
public Criteria andFirstIdNotIn(List<Long> values) {
addCriterion("first_id not in", values, "firstId");
return (Criteria) this;
}
public Criteria andFirstIdBetween(Long value1, Long value2) {
addCriterion("first_id between", value1, value2, "firstId");
return (Criteria) this;
}
public Criteria andFirstIdNotBetween(Long value1, Long value2) {
addCriterion("first_id not between", value1, value2, "firstId");
return (Criteria) this;
}
public Criteria andWeightIsNull() {
addCriterion("weight is null");
return (Criteria) this;
}
public Criteria andWeightIsNotNull() {
addCriterion("weight is not null");
return (Criteria) this;
}
public Criteria andWeightEqualTo(Integer value) {
addCriterion("weight =", value, "weight");
return (Criteria) this;
}
public Criteria andWeightNotEqualTo(Integer value) {
addCriterion("weight <>", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThan(Integer value) {
addCriterion("weight >", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThanOrEqualTo(Integer value) {
addCriterion("weight >=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThan(Integer value) {
addCriterion("weight <", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThanOrEqualTo(Integer value) {
addCriterion("weight <=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightIn(List<Integer> values) {
addCriterion("weight in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightNotIn(List<Integer> values) {
addCriterion("weight not in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightBetween(Integer value1, Integer value2) {
addCriterion("weight between", value1, value2, "weight");
return (Criteria) this;
}
public Criteria andWeightNotBetween(Integer value1, Integer value2) {
addCriterion("weight not between", value1, value2, "weight");
return (Criteria) this;
}
public Criteria andCreateDtIsNull() {
addCriterion("create_dt is null");
return (Criteria) this;
}
public Criteria andCreateDtIsNotNull() {
addCriterion("create_dt is not null");
return (Criteria) this;
}
public Criteria andCreateDtEqualTo(Date value) {
addCriterion("create_dt =", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotEqualTo(Date value) {
addCriterion("create_dt <>", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThan(Date value) {
addCriterion("create_dt >", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThanOrEqualTo(Date value) {
addCriterion("create_dt >=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThan(Date value) {
addCriterion("create_dt <", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThanOrEqualTo(Date value) {
addCriterion("create_dt <=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtIn(List<Date> values) {
addCriterion("create_dt in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotIn(List<Date> values) {
addCriterion("create_dt not in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtBetween(Date value1, Date value2) {
addCriterion("create_dt between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotBetween(Date value1, Date value2) {
addCriterion("create_dt not between", value1, value2, "createDt");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.Date;
public class TKzyComment extends BaseModel {
private Long id;
private Long userId;
private Long relationId;
private Integer type;
private String replyContent;
private Integer isDelete;
private Integer authStatus;
private Date authDt;
private Date createDt;
public TKzyComment(Long id, Long userId, Long relationId, Integer type, String replyContent, Integer isDelete, Integer authStatus, Date authDt, Date createDt) {
this.id = id;
this.userId = userId;
this.relationId = relationId;
this.type = type;
this.replyContent = replyContent;
this.isDelete = isDelete;
this.authStatus = authStatus;
this.authDt = authDt;
this.createDt = createDt;
}
public TKzyComment() {
super();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Long getRelationId() {
return relationId;
}
public void setRelationId(Long relationId) {
this.relationId = relationId;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getReplyContent() {
return replyContent;
}
public void setReplyContent(String replyContent) {
this.replyContent = replyContent == null ? null : replyContent.trim();
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public Integer getAuthStatus() {
return authStatus;
}
public void setAuthStatus(Integer authStatus) {
this.authStatus = authStatus;
}
public Date getAuthDt() {
return authDt;
}
public void setAuthDt(Date authDt) {
this.authDt = authDt;
}
public Date getCreateDt() {
return createDt;
}
public void setCreateDt(Date createDt) {
this.createDt = createDt;
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class TKzyCommentExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TKzyCommentExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andRelationIdIsNull() {
addCriterion("relation_id is null");
return (Criteria) this;
}
public Criteria andRelationIdIsNotNull() {
addCriterion("relation_id is not null");
return (Criteria) this;
}
public Criteria andRelationIdEqualTo(Long value) {
addCriterion("relation_id =", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdNotEqualTo(Long value) {
addCriterion("relation_id <>", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdGreaterThan(Long value) {
addCriterion("relation_id >", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdGreaterThanOrEqualTo(Long value) {
addCriterion("relation_id >=", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdLessThan(Long value) {
addCriterion("relation_id <", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdLessThanOrEqualTo(Long value) {
addCriterion("relation_id <=", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdIn(List<Long> values) {
addCriterion("relation_id in", values, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdNotIn(List<Long> values) {
addCriterion("relation_id not in", values, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdBetween(Long value1, Long value2) {
addCriterion("relation_id between", value1, value2, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdNotBetween(Long value1, Long value2) {
addCriterion("relation_id not between", value1, value2, "relationId");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("type is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("type =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("type <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("type >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("type >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("type <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("type <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("type in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("type not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("type between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("type not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andReplyContentIsNull() {
addCriterion("reply_content is null");
return (Criteria) this;
}
public Criteria andReplyContentIsNotNull() {
addCriterion("reply_content is not null");
return (Criteria) this;
}
public Criteria andReplyContentEqualTo(String value) {
addCriterion("reply_content =", value, "replyContent");
return (Criteria) this;
}
public Criteria andReplyContentNotEqualTo(String value) {
addCriterion("reply_content <>", value, "replyContent");
return (Criteria) this;
}
public Criteria andReplyContentGreaterThan(String value) {
addCriterion("reply_content >", value, "replyContent");
return (Criteria) this;
}
public Criteria andReplyContentGreaterThanOrEqualTo(String value) {
addCriterion("reply_content >=", value, "replyContent");
return (Criteria) this;
}
public Criteria andReplyContentLessThan(String value) {
addCriterion("reply_content <", value, "replyContent");
return (Criteria) this;
}
public Criteria andReplyContentLessThanOrEqualTo(String value) {
addCriterion("reply_content <=", value, "replyContent");
return (Criteria) this;
}
public Criteria andReplyContentLike(String value) {
addCriterion("reply_content like", value, "replyContent");
return (Criteria) this;
}
public Criteria andReplyContentNotLike(String value) {
addCriterion("reply_content not like", value, "replyContent");
return (Criteria) this;
}
public Criteria andReplyContentIn(List<String> values) {
addCriterion("reply_content in", values, "replyContent");
return (Criteria) this;
}
public Criteria andReplyContentNotIn(List<String> values) {
addCriterion("reply_content not in", values, "replyContent");
return (Criteria) this;
}
public Criteria andReplyContentBetween(String value1, String value2) {
addCriterion("reply_content between", value1, value2, "replyContent");
return (Criteria) this;
}
public Criteria andReplyContentNotBetween(String value1, String value2) {
addCriterion("reply_content not between", value1, value2, "replyContent");
return (Criteria) this;
}
public Criteria andIsDeleteIsNull() {
addCriterion("is_delete is null");
return (Criteria) this;
}
public Criteria andIsDeleteIsNotNull() {
addCriterion("is_delete is not null");
return (Criteria) this;
}
public Criteria andIsDeleteEqualTo(Integer value) {
addCriterion("is_delete =", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotEqualTo(Integer value) {
addCriterion("is_delete <>", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteGreaterThan(Integer value) {
addCriterion("is_delete >", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
addCriterion("is_delete >=", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteLessThan(Integer value) {
addCriterion("is_delete <", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
addCriterion("is_delete <=", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteIn(List<Integer> values) {
addCriterion("is_delete in", values, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotIn(List<Integer> values) {
addCriterion("is_delete not in", values, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
addCriterion("is_delete between", value1, value2, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
addCriterion("is_delete not between", value1, value2, "isDelete");
return (Criteria) this;
}
public Criteria andAuthStatusIsNull() {
addCriterion("auth_status is null");
return (Criteria) this;
}
public Criteria andAuthStatusIsNotNull() {
addCriterion("auth_status is not null");
return (Criteria) this;
}
public Criteria andAuthStatusEqualTo(Integer value) {
addCriterion("auth_status =", value, "authStatus");
return (Criteria) this;
}
public Criteria andAuthStatusNotEqualTo(Integer value) {
addCriterion("auth_status <>", value, "authStatus");
return (Criteria) this;
}
public Criteria andAuthStatusGreaterThan(Integer value) {
addCriterion("auth_status >", value, "authStatus");
return (Criteria) this;
}
public Criteria andAuthStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("auth_status >=", value, "authStatus");
return (Criteria) this;
}
public Criteria andAuthStatusLessThan(Integer value) {
addCriterion("auth_status <", value, "authStatus");
return (Criteria) this;
}
public Criteria andAuthStatusLessThanOrEqualTo(Integer value) {
addCriterion("auth_status <=", value, "authStatus");
return (Criteria) this;
}
public Criteria andAuthStatusIn(List<Integer> values) {
addCriterion("auth_status in", values, "authStatus");
return (Criteria) this;
}
public Criteria andAuthStatusNotIn(List<Integer> values) {
addCriterion("auth_status not in", values, "authStatus");
return (Criteria) this;
}
public Criteria andAuthStatusBetween(Integer value1, Integer value2) {
addCriterion("auth_status between", value1, value2, "authStatus");
return (Criteria) this;
}
public Criteria andAuthStatusNotBetween(Integer value1, Integer value2) {
addCriterion("auth_status not between", value1, value2, "authStatus");
return (Criteria) this;
}
public Criteria andAuthDtIsNull() {
addCriterion("auth_dt is null");
return (Criteria) this;
}
public Criteria andAuthDtIsNotNull() {
addCriterion("auth_dt is not null");
return (Criteria) this;
}
public Criteria andAuthDtEqualTo(Date value) {
addCriterion("auth_dt =", value, "authDt");
return (Criteria) this;
}
public Criteria andAuthDtNotEqualTo(Date value) {
addCriterion("auth_dt <>", value, "authDt");
return (Criteria) this;
}
public Criteria andAuthDtGreaterThan(Date value) {
addCriterion("auth_dt >", value, "authDt");
return (Criteria) this;
}
public Criteria andAuthDtGreaterThanOrEqualTo(Date value) {
addCriterion("auth_dt >=", value, "authDt");
return (Criteria) this;
}
public Criteria andAuthDtLessThan(Date value) {
addCriterion("auth_dt <", value, "authDt");
return (Criteria) this;
}
public Criteria andAuthDtLessThanOrEqualTo(Date value) {
addCriterion("auth_dt <=", value, "authDt");
return (Criteria) this;
}
public Criteria andAuthDtIn(List<Date> values) {
addCriterion("auth_dt in", values, "authDt");
return (Criteria) this;
}
public Criteria andAuthDtNotIn(List<Date> values) {
addCriterion("auth_dt not in", values, "authDt");
return (Criteria) this;
}
public Criteria andAuthDtBetween(Date value1, Date value2) {
addCriterion("auth_dt between", value1, value2, "authDt");
return (Criteria) this;
}
public Criteria andAuthDtNotBetween(Date value1, Date value2) {
addCriterion("auth_dt not between", value1, value2, "authDt");
return (Criteria) this;
}
public Criteria andCreateDtIsNull() {
addCriterion("create_dt is null");
return (Criteria) this;
}
public Criteria andCreateDtIsNotNull() {
addCriterion("create_dt is not null");
return (Criteria) this;
}
public Criteria andCreateDtEqualTo(Date value) {
addCriterion("create_dt =", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotEqualTo(Date value) {
addCriterion("create_dt <>", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThan(Date value) {
addCriterion("create_dt >", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThanOrEqualTo(Date value) {
addCriterion("create_dt >=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThan(Date value) {
addCriterion("create_dt <", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThanOrEqualTo(Date value) {
addCriterion("create_dt <=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtIn(List<Date> values) {
addCriterion("create_dt in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotIn(List<Date> values) {
addCriterion("create_dt not in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtBetween(Date value1, Date value2) {
addCriterion("create_dt between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotBetween(Date value1, Date value2) {
addCriterion("create_dt not between", value1, value2, "createDt");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.Date;
public class TKzyCourse extends BaseModel {
private Long id;
private String courseName;
private String picUrl;
private Date startDt;
private Date endDt;
private Integer weight;
private String liveUrl;
private Integer courseType;
private Integer isUp;
private Long editorId;
private String editorName;
private Integer isDelete;
private Date createDt;
private Date updateDt;
private String courseIntroduce;
public TKzyCourse(Long id, String courseName, String picUrl, Date startDt, Date endDt, Integer weight, String liveUrl, Integer courseType, Integer isUp, Long editorId, String editorName, Integer isDelete, Date createDt, Date updateDt, String courseIntroduce) {
this.id = id;
this.courseName = courseName;
this.picUrl = picUrl;
this.startDt = startDt;
this.endDt = endDt;
this.weight = weight;
this.liveUrl = liveUrl;
this.courseType = courseType;
this.isUp = isUp;
this.editorId = editorId;
this.editorName = editorName;
this.isDelete = isDelete;
this.createDt = createDt;
this.updateDt = updateDt;
this.courseIntroduce = courseIntroduce;
}
public TKzyCourse() {
super();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getCourseName() {
return courseName;
}
public void setCourseName(String courseName) {
this.courseName = courseName == null ? null : courseName.trim();
}
public String getPicUrl() {
return picUrl;
}
public void setPicUrl(String picUrl) {
this.picUrl = picUrl == null ? null : picUrl.trim();
}
public Date getStartDt() {
return startDt;
}
public void setStartDt(Date startDt) {
this.startDt = startDt;
}
public Date getEndDt() {
return endDt;
}
public void setEndDt(Date endDt) {
this.endDt = endDt;
}
public Integer getWeight() {
return weight;
}
public void setWeight(Integer weight) {
this.weight = weight;
}
public String getLiveUrl() {
return liveUrl;
}
public void setLiveUrl(String liveUrl) {
this.liveUrl = liveUrl == null ? null : liveUrl.trim();
}
public Integer getCourseType() {
return courseType;
}
public void setCourseType(Integer courseType) {
this.courseType = courseType;
}
public Integer getIsUp() {
return isUp;
}
public void setIsUp(Integer isUp) {
this.isUp = isUp;
}
public Long getEditorId() {
return editorId;
}
public void setEditorId(Long editorId) {
this.editorId = editorId;
}
public String getEditorName() {
return editorName;
}
public void setEditorName(String editorName) {
this.editorName = editorName == null ? null : editorName.trim();
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public Date getCreateDt() {
return createDt;
}
public void setCreateDt(Date createDt) {
this.createDt = createDt;
}
public Date getUpdateDt() {
return updateDt;
}
public void setUpdateDt(Date updateDt) {
this.updateDt = updateDt;
}
public String getCourseIntroduce() {
return courseIntroduce;
}
public void setCourseIntroduce(String courseIntroduce) {
this.courseIntroduce = courseIntroduce == null ? null : courseIntroduce.trim();
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class TKzyCourseExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TKzyCourseExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andCourseNameIsNull() {
addCriterion("course_name is null");
return (Criteria) this;
}
public Criteria andCourseNameIsNotNull() {
addCriterion("course_name is not null");
return (Criteria) this;
}
public Criteria andCourseNameEqualTo(String value) {
addCriterion("course_name =", value, "courseName");
return (Criteria) this;
}
public Criteria andCourseNameNotEqualTo(String value) {
addCriterion("course_name <>", value, "courseName");
return (Criteria) this;
}
public Criteria andCourseNameGreaterThan(String value) {
addCriterion("course_name >", value, "courseName");
return (Criteria) this;
}
public Criteria andCourseNameGreaterThanOrEqualTo(String value) {
addCriterion("course_name >=", value, "courseName");
return (Criteria) this;
}
public Criteria andCourseNameLessThan(String value) {
addCriterion("course_name <", value, "courseName");
return (Criteria) this;
}
public Criteria andCourseNameLessThanOrEqualTo(String value) {
addCriterion("course_name <=", value, "courseName");
return (Criteria) this;
}
public Criteria andCourseNameLike(String value) {
addCriterion("course_name like", value, "courseName");
return (Criteria) this;
}
public Criteria andCourseNameNotLike(String value) {
addCriterion("course_name not like", value, "courseName");
return (Criteria) this;
}
public Criteria andCourseNameIn(List<String> values) {
addCriterion("course_name in", values, "courseName");
return (Criteria) this;
}
public Criteria andCourseNameNotIn(List<String> values) {
addCriterion("course_name not in", values, "courseName");
return (Criteria) this;
}
public Criteria andCourseNameBetween(String value1, String value2) {
addCriterion("course_name between", value1, value2, "courseName");
return (Criteria) this;
}
public Criteria andCourseNameNotBetween(String value1, String value2) {
addCriterion("course_name not between", value1, value2, "courseName");
return (Criteria) this;
}
public Criteria andPicUrlIsNull() {
addCriterion("pic_url is null");
return (Criteria) this;
}
public Criteria andPicUrlIsNotNull() {
addCriterion("pic_url is not null");
return (Criteria) this;
}
public Criteria andPicUrlEqualTo(String value) {
addCriterion("pic_url =", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotEqualTo(String value) {
addCriterion("pic_url <>", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlGreaterThan(String value) {
addCriterion("pic_url >", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlGreaterThanOrEqualTo(String value) {
addCriterion("pic_url >=", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLessThan(String value) {
addCriterion("pic_url <", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLessThanOrEqualTo(String value) {
addCriterion("pic_url <=", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLike(String value) {
addCriterion("pic_url like", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotLike(String value) {
addCriterion("pic_url not like", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlIn(List<String> values) {
addCriterion("pic_url in", values, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotIn(List<String> values) {
addCriterion("pic_url not in", values, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlBetween(String value1, String value2) {
addCriterion("pic_url between", value1, value2, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotBetween(String value1, String value2) {
addCriterion("pic_url not between", value1, value2, "picUrl");
return (Criteria) this;
}
public Criteria andStartDtIsNull() {
addCriterion("start_dt is null");
return (Criteria) this;
}
public Criteria andStartDtIsNotNull() {
addCriterion("start_dt is not null");
return (Criteria) this;
}
public Criteria andStartDtEqualTo(Date value) {
addCriterion("start_dt =", value, "startDt");
return (Criteria) this;
}
public Criteria andStartDtNotEqualTo(Date value) {
addCriterion("start_dt <>", value, "startDt");
return (Criteria) this;
}
public Criteria andStartDtGreaterThan(Date value) {
addCriterion("start_dt >", value, "startDt");
return (Criteria) this;
}
public Criteria andStartDtGreaterThanOrEqualTo(Date value) {
addCriterion("start_dt >=", value, "startDt");
return (Criteria) this;
}
public Criteria andStartDtLessThan(Date value) {
addCriterion("start_dt <", value, "startDt");
return (Criteria) this;
}
public Criteria andStartDtLessThanOrEqualTo(Date value) {
addCriterion("start_dt <=", value, "startDt");
return (Criteria) this;
}
public Criteria andStartDtIn(List<Date> values) {
addCriterion("start_dt in", values, "startDt");
return (Criteria) this;
}
public Criteria andStartDtNotIn(List<Date> values) {
addCriterion("start_dt not in", values, "startDt");
return (Criteria) this;
}
public Criteria andStartDtBetween(Date value1, Date value2) {
addCriterion("start_dt between", value1, value2, "startDt");
return (Criteria) this;
}
public Criteria andStartDtNotBetween(Date value1, Date value2) {
addCriterion("start_dt not between", value1, value2, "startDt");
return (Criteria) this;
}
public Criteria andEndDtIsNull() {
addCriterion("end_dt is null");
return (Criteria) this;
}
public Criteria andEndDtIsNotNull() {
addCriterion("end_dt is not null");
return (Criteria) this;
}
public Criteria andEndDtEqualTo(Date value) {
addCriterion("end_dt =", value, "endDt");
return (Criteria) this;
}
public Criteria andEndDtNotEqualTo(Date value) {
addCriterion("end_dt <>", value, "endDt");
return (Criteria) this;
}
public Criteria andEndDtGreaterThan(Date value) {
addCriterion("end_dt >", value, "endDt");
return (Criteria) this;
}
public Criteria andEndDtGreaterThanOrEqualTo(Date value) {
addCriterion("end_dt >=", value, "endDt");
return (Criteria) this;
}
public Criteria andEndDtLessThan(Date value) {
addCriterion("end_dt <", value, "endDt");
return (Criteria) this;
}
public Criteria andEndDtLessThanOrEqualTo(Date value) {
addCriterion("end_dt <=", value, "endDt");
return (Criteria) this;
}
public Criteria andEndDtIn(List<Date> values) {
addCriterion("end_dt in", values, "endDt");
return (Criteria) this;
}
public Criteria andEndDtNotIn(List<Date> values) {
addCriterion("end_dt not in", values, "endDt");
return (Criteria) this;
}
public Criteria andEndDtBetween(Date value1, Date value2) {
addCriterion("end_dt between", value1, value2, "endDt");
return (Criteria) this;
}
public Criteria andEndDtNotBetween(Date value1, Date value2) {
addCriterion("end_dt not between", value1, value2, "endDt");
return (Criteria) this;
}
public Criteria andWeightIsNull() {
addCriterion("weight is null");
return (Criteria) this;
}
public Criteria andWeightIsNotNull() {
addCriterion("weight is not null");
return (Criteria) this;
}
public Criteria andWeightEqualTo(Integer value) {
addCriterion("weight =", value, "weight");
return (Criteria) this;
}
public Criteria andWeightNotEqualTo(Integer value) {
addCriterion("weight <>", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThan(Integer value) {
addCriterion("weight >", value, "weight");
return (Criteria) this;
}
public Criteria andWeightGreaterThanOrEqualTo(Integer value) {
addCriterion("weight >=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThan(Integer value) {
addCriterion("weight <", value, "weight");
return (Criteria) this;
}
public Criteria andWeightLessThanOrEqualTo(Integer value) {
addCriterion("weight <=", value, "weight");
return (Criteria) this;
}
public Criteria andWeightIn(List<Integer> values) {
addCriterion("weight in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightNotIn(List<Integer> values) {
addCriterion("weight not in", values, "weight");
return (Criteria) this;
}
public Criteria andWeightBetween(Integer value1, Integer value2) {
addCriterion("weight between", value1, value2, "weight");
return (Criteria) this;
}
public Criteria andWeightNotBetween(Integer value1, Integer value2) {
addCriterion("weight not between", value1, value2, "weight");
return (Criteria) this;
}
public Criteria andLiveUrlIsNull() {
addCriterion("live_url is null");
return (Criteria) this;
}
public Criteria andLiveUrlIsNotNull() {
addCriterion("live_url is not null");
return (Criteria) this;
}
public Criteria andLiveUrlEqualTo(String value) {
addCriterion("live_url =", value, "liveUrl");
return (Criteria) this;
}
public Criteria andLiveUrlNotEqualTo(String value) {
addCriterion("live_url <>", value, "liveUrl");
return (Criteria) this;
}
public Criteria andLiveUrlGreaterThan(String value) {
addCriterion("live_url >", value, "liveUrl");
return (Criteria) this;
}
public Criteria andLiveUrlGreaterThanOrEqualTo(String value) {
addCriterion("live_url >=", value, "liveUrl");
return (Criteria) this;
}
public Criteria andLiveUrlLessThan(String value) {
addCriterion("live_url <", value, "liveUrl");
return (Criteria) this;
}
public Criteria andLiveUrlLessThanOrEqualTo(String value) {
addCriterion("live_url <=", value, "liveUrl");
return (Criteria) this;
}
public Criteria andLiveUrlLike(String value) {
addCriterion("live_url like", value, "liveUrl");
return (Criteria) this;
}
public Criteria andLiveUrlNotLike(String value) {
addCriterion("live_url not like", value, "liveUrl");
return (Criteria) this;
}
public Criteria andLiveUrlIn(List<String> values) {
addCriterion("live_url in", values, "liveUrl");
return (Criteria) this;
}
public Criteria andLiveUrlNotIn(List<String> values) {
addCriterion("live_url not in", values, "liveUrl");
return (Criteria) this;
}
public Criteria andLiveUrlBetween(String value1, String value2) {
addCriterion("live_url between", value1, value2, "liveUrl");
return (Criteria) this;
}
public Criteria andLiveUrlNotBetween(String value1, String value2) {
addCriterion("live_url not between", value1, value2, "liveUrl");
return (Criteria) this;
}
public Criteria andCourseTypeIsNull() {
addCriterion("course_type is null");
return (Criteria) this;
}
public Criteria andCourseTypeIsNotNull() {
addCriterion("course_type is not null");
return (Criteria) this;
}
public Criteria andCourseTypeEqualTo(Integer value) {
addCriterion("course_type =", value, "courseType");
return (Criteria) this;
}
public Criteria andCourseTypeNotEqualTo(Integer value) {
addCriterion("course_type <>", value, "courseType");
return (Criteria) this;
}
public Criteria andCourseTypeGreaterThan(Integer value) {
addCriterion("course_type >", value, "courseType");
return (Criteria) this;
}
public Criteria andCourseTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("course_type >=", value, "courseType");
return (Criteria) this;
}
public Criteria andCourseTypeLessThan(Integer value) {
addCriterion("course_type <", value, "courseType");
return (Criteria) this;
}
public Criteria andCourseTypeLessThanOrEqualTo(Integer value) {
addCriterion("course_type <=", value, "courseType");
return (Criteria) this;
}
public Criteria andCourseTypeIn(List<Integer> values) {
addCriterion("course_type in", values, "courseType");
return (Criteria) this;
}
public Criteria andCourseTypeNotIn(List<Integer> values) {
addCriterion("course_type not in", values, "courseType");
return (Criteria) this;
}
public Criteria andCourseTypeBetween(Integer value1, Integer value2) {
addCriterion("course_type between", value1, value2, "courseType");
return (Criteria) this;
}
public Criteria andCourseTypeNotBetween(Integer value1, Integer value2) {
addCriterion("course_type not between", value1, value2, "courseType");
return (Criteria) this;
}
public Criteria andIsUpIsNull() {
addCriterion("is_up is null");
return (Criteria) this;
}
public Criteria andIsUpIsNotNull() {
addCriterion("is_up is not null");
return (Criteria) this;
}
public Criteria andIsUpEqualTo(Integer value) {
addCriterion("is_up =", value, "isUp");
return (Criteria) this;
}
public Criteria andIsUpNotEqualTo(Integer value) {
addCriterion("is_up <>", value, "isUp");
return (Criteria) this;
}
public Criteria andIsUpGreaterThan(Integer value) {
addCriterion("is_up >", value, "isUp");
return (Criteria) this;
}
public Criteria andIsUpGreaterThanOrEqualTo(Integer value) {
addCriterion("is_up >=", value, "isUp");
return (Criteria) this;
}
public Criteria andIsUpLessThan(Integer value) {
addCriterion("is_up <", value, "isUp");
return (Criteria) this;
}
public Criteria andIsUpLessThanOrEqualTo(Integer value) {
addCriterion("is_up <=", value, "isUp");
return (Criteria) this;
}
public Criteria andIsUpIn(List<Integer> values) {
addCriterion("is_up in", values, "isUp");
return (Criteria) this;
}
public Criteria andIsUpNotIn(List<Integer> values) {
addCriterion("is_up not in", values, "isUp");
return (Criteria) this;
}
public Criteria andIsUpBetween(Integer value1, Integer value2) {
addCriterion("is_up between", value1, value2, "isUp");
return (Criteria) this;
}
public Criteria andIsUpNotBetween(Integer value1, Integer value2) {
addCriterion("is_up not between", value1, value2, "isUp");
return (Criteria) this;
}
public Criteria andEditorIdIsNull() {
addCriterion("editor_id is null");
return (Criteria) this;
}
public Criteria andEditorIdIsNotNull() {
addCriterion("editor_id is not null");
return (Criteria) this;
}
public Criteria andEditorIdEqualTo(Long value) {
addCriterion("editor_id =", value, "editorId");
return (Criteria) this;
}
public Criteria andEditorIdNotEqualTo(Long value) {
addCriterion("editor_id <>", value, "editorId");
return (Criteria) this;
}
public Criteria andEditorIdGreaterThan(Long value) {
addCriterion("editor_id >", value, "editorId");
return (Criteria) this;
}
public Criteria andEditorIdGreaterThanOrEqualTo(Long value) {
addCriterion("editor_id >=", value, "editorId");
return (Criteria) this;
}
public Criteria andEditorIdLessThan(Long value) {
addCriterion("editor_id <", value, "editorId");
return (Criteria) this;
}
public Criteria andEditorIdLessThanOrEqualTo(Long value) {
addCriterion("editor_id <=", value, "editorId");
return (Criteria) this;
}
public Criteria andEditorIdIn(List<Long> values) {
addCriterion("editor_id in", values, "editorId");
return (Criteria) this;
}
public Criteria andEditorIdNotIn(List<Long> values) {
addCriterion("editor_id not in", values, "editorId");
return (Criteria) this;
}
public Criteria andEditorIdBetween(Long value1, Long value2) {
addCriterion("editor_id between", value1, value2, "editorId");
return (Criteria) this;
}
public Criteria andEditorIdNotBetween(Long value1, Long value2) {
addCriterion("editor_id not between", value1, value2, "editorId");
return (Criteria) this;
}
public Criteria andEditorNameIsNull() {
addCriterion("editor_name is null");
return (Criteria) this;
}
public Criteria andEditorNameIsNotNull() {
addCriterion("editor_name is not null");
return (Criteria) this;
}
public Criteria andEditorNameEqualTo(String value) {
addCriterion("editor_name =", value, "editorName");
return (Criteria) this;
}
public Criteria andEditorNameNotEqualTo(String value) {
addCriterion("editor_name <>", value, "editorName");
return (Criteria) this;
}
public Criteria andEditorNameGreaterThan(String value) {
addCriterion("editor_name >", value, "editorName");
return (Criteria) this;
}
public Criteria andEditorNameGreaterThanOrEqualTo(String value) {
addCriterion("editor_name >=", value, "editorName");
return (Criteria) this;
}
public Criteria andEditorNameLessThan(String value) {
addCriterion("editor_name <", value, "editorName");
return (Criteria) this;
}
public Criteria andEditorNameLessThanOrEqualTo(String value) {
addCriterion("editor_name <=", value, "editorName");
return (Criteria) this;
}
public Criteria andEditorNameLike(String value) {
addCriterion("editor_name like", value, "editorName");
return (Criteria) this;
}
public Criteria andEditorNameNotLike(String value) {
addCriterion("editor_name not like", value, "editorName");
return (Criteria) this;
}
public Criteria andEditorNameIn(List<String> values) {
addCriterion("editor_name in", values, "editorName");
return (Criteria) this;
}
public Criteria andEditorNameNotIn(List<String> values) {
addCriterion("editor_name not in", values, "editorName");
return (Criteria) this;
}
public Criteria andEditorNameBetween(String value1, String value2) {
addCriterion("editor_name between", value1, value2, "editorName");
return (Criteria) this;
}
public Criteria andEditorNameNotBetween(String value1, String value2) {
addCriterion("editor_name not between", value1, value2, "editorName");
return (Criteria) this;
}
public Criteria andIsDeleteIsNull() {
addCriterion("is_delete is null");
return (Criteria) this;
}
public Criteria andIsDeleteIsNotNull() {
addCriterion("is_delete is not null");
return (Criteria) this;
}
public Criteria andIsDeleteEqualTo(Integer value) {
addCriterion("is_delete =", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotEqualTo(Integer value) {
addCriterion("is_delete <>", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteGreaterThan(Integer value) {
addCriterion("is_delete >", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
addCriterion("is_delete >=", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteLessThan(Integer value) {
addCriterion("is_delete <", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
addCriterion("is_delete <=", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteIn(List<Integer> values) {
addCriterion("is_delete in", values, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotIn(List<Integer> values) {
addCriterion("is_delete not in", values, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
addCriterion("is_delete between", value1, value2, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
addCriterion("is_delete not between", value1, value2, "isDelete");
return (Criteria) this;
}
public Criteria andCreateDtIsNull() {
addCriterion("create_dt is null");
return (Criteria) this;
}
public Criteria andCreateDtIsNotNull() {
addCriterion("create_dt is not null");
return (Criteria) this;
}
public Criteria andCreateDtEqualTo(Date value) {
addCriterion("create_dt =", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotEqualTo(Date value) {
addCriterion("create_dt <>", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThan(Date value) {
addCriterion("create_dt >", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThanOrEqualTo(Date value) {
addCriterion("create_dt >=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThan(Date value) {
addCriterion("create_dt <", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThanOrEqualTo(Date value) {
addCriterion("create_dt <=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtIn(List<Date> values) {
addCriterion("create_dt in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotIn(List<Date> values) {
addCriterion("create_dt not in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtBetween(Date value1, Date value2) {
addCriterion("create_dt between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotBetween(Date value1, Date value2) {
addCriterion("create_dt not between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andUpdateDtIsNull() {
addCriterion("update_dt is null");
return (Criteria) this;
}
public Criteria andUpdateDtIsNotNull() {
addCriterion("update_dt is not null");
return (Criteria) this;
}
public Criteria andUpdateDtEqualTo(Date value) {
addCriterion("update_dt =", value, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtNotEqualTo(Date value) {
addCriterion("update_dt <>", value, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtGreaterThan(Date value) {
addCriterion("update_dt >", value, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtGreaterThanOrEqualTo(Date value) {
addCriterion("update_dt >=", value, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtLessThan(Date value) {
addCriterion("update_dt <", value, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtLessThanOrEqualTo(Date value) {
addCriterion("update_dt <=", value, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtIn(List<Date> values) {
addCriterion("update_dt in", values, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtNotIn(List<Date> values) {
addCriterion("update_dt not in", values, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtBetween(Date value1, Date value2) {
addCriterion("update_dt between", value1, value2, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtNotBetween(Date value1, Date value2) {
addCriterion("update_dt not between", value1, value2, "updateDt");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.Date;
public class TKzyInformation extends BaseModel {
private Long id;
private String title;
private String author;
private String picUrl;
private String iconUrl;
private Integer isDelete;
private Date createDt;
private Date updateDt;
private byte[] content;
public TKzyInformation(Long id, String title, String author, String picUrl, String iconUrl, Integer isDelete, Date createDt, Date updateDt, byte[] content) {
this.id = id;
this.title = title;
this.author = author;
this.picUrl = picUrl;
this.iconUrl = iconUrl;
this.isDelete = isDelete;
this.createDt = createDt;
this.updateDt = updateDt;
this.content = content;
}
public TKzyInformation() {
super();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title == null ? null : title.trim();
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author == null ? null : author.trim();
}
public String getPicUrl() {
return picUrl;
}
public void setPicUrl(String picUrl) {
this.picUrl = picUrl == null ? null : picUrl.trim();
}
public String getIconUrl() {
return iconUrl;
}
public void setIconUrl(String iconUrl) {
this.iconUrl = iconUrl == null ? null : iconUrl.trim();
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public Date getCreateDt() {
return createDt;
}
public void setCreateDt(Date createDt) {
this.createDt = createDt;
}
public Date getUpdateDt() {
return updateDt;
}
public void setUpdateDt(Date updateDt) {
this.updateDt = updateDt;
}
public byte[] getContent() {
return content;
}
public void setContent(byte[] content) {
this.content = content;
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class TKzyInformationExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TKzyInformationExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andTitleIsNull() {
addCriterion("title is null");
return (Criteria) this;
}
public Criteria andTitleIsNotNull() {
addCriterion("title is not null");
return (Criteria) this;
}
public Criteria andTitleEqualTo(String value) {
addCriterion("title =", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotEqualTo(String value) {
addCriterion("title <>", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThan(String value) {
addCriterion("title >", value, "title");
return (Criteria) this;
}
public Criteria andTitleGreaterThanOrEqualTo(String value) {
addCriterion("title >=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThan(String value) {
addCriterion("title <", value, "title");
return (Criteria) this;
}
public Criteria andTitleLessThanOrEqualTo(String value) {
addCriterion("title <=", value, "title");
return (Criteria) this;
}
public Criteria andTitleLike(String value) {
addCriterion("title like", value, "title");
return (Criteria) this;
}
public Criteria andTitleNotLike(String value) {
addCriterion("title not like", value, "title");
return (Criteria) this;
}
public Criteria andTitleIn(List<String> values) {
addCriterion("title in", values, "title");
return (Criteria) this;
}
public Criteria andTitleNotIn(List<String> values) {
addCriterion("title not in", values, "title");
return (Criteria) this;
}
public Criteria andTitleBetween(String value1, String value2) {
addCriterion("title between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andTitleNotBetween(String value1, String value2) {
addCriterion("title not between", value1, value2, "title");
return (Criteria) this;
}
public Criteria andAuthorIsNull() {
addCriterion("author is null");
return (Criteria) this;
}
public Criteria andAuthorIsNotNull() {
addCriterion("author is not null");
return (Criteria) this;
}
public Criteria andAuthorEqualTo(String value) {
addCriterion("author =", value, "author");
return (Criteria) this;
}
public Criteria andAuthorNotEqualTo(String value) {
addCriterion("author <>", value, "author");
return (Criteria) this;
}
public Criteria andAuthorGreaterThan(String value) {
addCriterion("author >", value, "author");
return (Criteria) this;
}
public Criteria andAuthorGreaterThanOrEqualTo(String value) {
addCriterion("author >=", value, "author");
return (Criteria) this;
}
public Criteria andAuthorLessThan(String value) {
addCriterion("author <", value, "author");
return (Criteria) this;
}
public Criteria andAuthorLessThanOrEqualTo(String value) {
addCriterion("author <=", value, "author");
return (Criteria) this;
}
public Criteria andAuthorLike(String value) {
addCriterion("author like", value, "author");
return (Criteria) this;
}
public Criteria andAuthorNotLike(String value) {
addCriterion("author not like", value, "author");
return (Criteria) this;
}
public Criteria andAuthorIn(List<String> values) {
addCriterion("author in", values, "author");
return (Criteria) this;
}
public Criteria andAuthorNotIn(List<String> values) {
addCriterion("author not in", values, "author");
return (Criteria) this;
}
public Criteria andAuthorBetween(String value1, String value2) {
addCriterion("author between", value1, value2, "author");
return (Criteria) this;
}
public Criteria andAuthorNotBetween(String value1, String value2) {
addCriterion("author not between", value1, value2, "author");
return (Criteria) this;
}
public Criteria andPicUrlIsNull() {
addCriterion("pic_url is null");
return (Criteria) this;
}
public Criteria andPicUrlIsNotNull() {
addCriterion("pic_url is not null");
return (Criteria) this;
}
public Criteria andPicUrlEqualTo(String value) {
addCriterion("pic_url =", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotEqualTo(String value) {
addCriterion("pic_url <>", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlGreaterThan(String value) {
addCriterion("pic_url >", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlGreaterThanOrEqualTo(String value) {
addCriterion("pic_url >=", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLessThan(String value) {
addCriterion("pic_url <", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLessThanOrEqualTo(String value) {
addCriterion("pic_url <=", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlLike(String value) {
addCriterion("pic_url like", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotLike(String value) {
addCriterion("pic_url not like", value, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlIn(List<String> values) {
addCriterion("pic_url in", values, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotIn(List<String> values) {
addCriterion("pic_url not in", values, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlBetween(String value1, String value2) {
addCriterion("pic_url between", value1, value2, "picUrl");
return (Criteria) this;
}
public Criteria andPicUrlNotBetween(String value1, String value2) {
addCriterion("pic_url not between", value1, value2, "picUrl");
return (Criteria) this;
}
public Criteria andIconUrlIsNull() {
addCriterion("icon_url is null");
return (Criteria) this;
}
public Criteria andIconUrlIsNotNull() {
addCriterion("icon_url is not null");
return (Criteria) this;
}
public Criteria andIconUrlEqualTo(String value) {
addCriterion("icon_url =", value, "iconUrl");
return (Criteria) this;
}
public Criteria andIconUrlNotEqualTo(String value) {
addCriterion("icon_url <>", value, "iconUrl");
return (Criteria) this;
}
public Criteria andIconUrlGreaterThan(String value) {
addCriterion("icon_url >", value, "iconUrl");
return (Criteria) this;
}
public Criteria andIconUrlGreaterThanOrEqualTo(String value) {
addCriterion("icon_url >=", value, "iconUrl");
return (Criteria) this;
}
public Criteria andIconUrlLessThan(String value) {
addCriterion("icon_url <", value, "iconUrl");
return (Criteria) this;
}
public Criteria andIconUrlLessThanOrEqualTo(String value) {
addCriterion("icon_url <=", value, "iconUrl");
return (Criteria) this;
}
public Criteria andIconUrlLike(String value) {
addCriterion("icon_url like", value, "iconUrl");
return (Criteria) this;
}
public Criteria andIconUrlNotLike(String value) {
addCriterion("icon_url not like", value, "iconUrl");
return (Criteria) this;
}
public Criteria andIconUrlIn(List<String> values) {
addCriterion("icon_url in", values, "iconUrl");
return (Criteria) this;
}
public Criteria andIconUrlNotIn(List<String> values) {
addCriterion("icon_url not in", values, "iconUrl");
return (Criteria) this;
}
public Criteria andIconUrlBetween(String value1, String value2) {
addCriterion("icon_url between", value1, value2, "iconUrl");
return (Criteria) this;
}
public Criteria andIconUrlNotBetween(String value1, String value2) {
addCriterion("icon_url not between", value1, value2, "iconUrl");
return (Criteria) this;
}
public Criteria andIsDeleteIsNull() {
addCriterion("is_delete is null");
return (Criteria) this;
}
public Criteria andIsDeleteIsNotNull() {
addCriterion("is_delete is not null");
return (Criteria) this;
}
public Criteria andIsDeleteEqualTo(Integer value) {
addCriterion("is_delete =", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotEqualTo(Integer value) {
addCriterion("is_delete <>", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteGreaterThan(Integer value) {
addCriterion("is_delete >", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
addCriterion("is_delete >=", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteLessThan(Integer value) {
addCriterion("is_delete <", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
addCriterion("is_delete <=", value, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteIn(List<Integer> values) {
addCriterion("is_delete in", values, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotIn(List<Integer> values) {
addCriterion("is_delete not in", values, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
addCriterion("is_delete between", value1, value2, "isDelete");
return (Criteria) this;
}
public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
addCriterion("is_delete not between", value1, value2, "isDelete");
return (Criteria) this;
}
public Criteria andCreateDtIsNull() {
addCriterion("create_dt is null");
return (Criteria) this;
}
public Criteria andCreateDtIsNotNull() {
addCriterion("create_dt is not null");
return (Criteria) this;
}
public Criteria andCreateDtEqualTo(Date value) {
addCriterion("create_dt =", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotEqualTo(Date value) {
addCriterion("create_dt <>", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThan(Date value) {
addCriterion("create_dt >", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThanOrEqualTo(Date value) {
addCriterion("create_dt >=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThan(Date value) {
addCriterion("create_dt <", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThanOrEqualTo(Date value) {
addCriterion("create_dt <=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtIn(List<Date> values) {
addCriterion("create_dt in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotIn(List<Date> values) {
addCriterion("create_dt not in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtBetween(Date value1, Date value2) {
addCriterion("create_dt between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotBetween(Date value1, Date value2) {
addCriterion("create_dt not between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andUpdateDtIsNull() {
addCriterion("update_dt is null");
return (Criteria) this;
}
public Criteria andUpdateDtIsNotNull() {
addCriterion("update_dt is not null");
return (Criteria) this;
}
public Criteria andUpdateDtEqualTo(Date value) {
addCriterion("update_dt =", value, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtNotEqualTo(Date value) {
addCriterion("update_dt <>", value, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtGreaterThan(Date value) {
addCriterion("update_dt >", value, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtGreaterThanOrEqualTo(Date value) {
addCriterion("update_dt >=", value, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtLessThan(Date value) {
addCriterion("update_dt <", value, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtLessThanOrEqualTo(Date value) {
addCriterion("update_dt <=", value, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtIn(List<Date> values) {
addCriterion("update_dt in", values, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtNotIn(List<Date> values) {
addCriterion("update_dt not in", values, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtBetween(Date value1, Date value2) {
addCriterion("update_dt between", value1, value2, "updateDt");
return (Criteria) this;
}
public Criteria andUpdateDtNotBetween(Date value1, Date value2) {
addCriterion("update_dt not between", value1, value2, "updateDt");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.Date;
public class TKzyRelationClass extends BaseModel {
private Long id;
private Long relationId;
private Long firstClassId;
private Long secondClassId;
private Date createDt;
public TKzyRelationClass(Long id, Long relationId, Long firstClassId, Long secondClassId, Date createDt) {
this.id = id;
this.relationId = relationId;
this.firstClassId = firstClassId;
this.secondClassId = secondClassId;
this.createDt = createDt;
}
public TKzyRelationClass() {
super();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getRelationId() {
return relationId;
}
public void setRelationId(Long relationId) {
this.relationId = relationId;
}
public Long getFirstClassId() {
return firstClassId;
}
public void setFirstClassId(Long firstClassId) {
this.firstClassId = firstClassId;
}
public Long getSecondClassId() {
return secondClassId;
}
public void setSecondClassId(Long secondClassId) {
this.secondClassId = secondClassId;
}
public Date getCreateDt() {
return createDt;
}
public void setCreateDt(Date createDt) {
this.createDt = createDt;
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class TKzyRelationClassExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TKzyRelationClassExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andRelationIdIsNull() {
addCriterion("relation_id is null");
return (Criteria) this;
}
public Criteria andRelationIdIsNotNull() {
addCriterion("relation_id is not null");
return (Criteria) this;
}
public Criteria andRelationIdEqualTo(Long value) {
addCriterion("relation_id =", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdNotEqualTo(Long value) {
addCriterion("relation_id <>", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdGreaterThan(Long value) {
addCriterion("relation_id >", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdGreaterThanOrEqualTo(Long value) {
addCriterion("relation_id >=", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdLessThan(Long value) {
addCriterion("relation_id <", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdLessThanOrEqualTo(Long value) {
addCriterion("relation_id <=", value, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdIn(List<Long> values) {
addCriterion("relation_id in", values, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdNotIn(List<Long> values) {
addCriterion("relation_id not in", values, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdBetween(Long value1, Long value2) {
addCriterion("relation_id between", value1, value2, "relationId");
return (Criteria) this;
}
public Criteria andRelationIdNotBetween(Long value1, Long value2) {
addCriterion("relation_id not between", value1, value2, "relationId");
return (Criteria) this;
}
public Criteria andFirstClassIdIsNull() {
addCriterion("first_class_id is null");
return (Criteria) this;
}
public Criteria andFirstClassIdIsNotNull() {
addCriterion("first_class_id is not null");
return (Criteria) this;
}
public Criteria andFirstClassIdEqualTo(Long value) {
addCriterion("first_class_id =", value, "firstClassId");
return (Criteria) this;
}
public Criteria andFirstClassIdNotEqualTo(Long value) {
addCriterion("first_class_id <>", value, "firstClassId");
return (Criteria) this;
}
public Criteria andFirstClassIdGreaterThan(Long value) {
addCriterion("first_class_id >", value, "firstClassId");
return (Criteria) this;
}
public Criteria andFirstClassIdGreaterThanOrEqualTo(Long value) {
addCriterion("first_class_id >=", value, "firstClassId");
return (Criteria) this;
}
public Criteria andFirstClassIdLessThan(Long value) {
addCriterion("first_class_id <", value, "firstClassId");
return (Criteria) this;
}
public Criteria andFirstClassIdLessThanOrEqualTo(Long value) {
addCriterion("first_class_id <=", value, "firstClassId");
return (Criteria) this;
}
public Criteria andFirstClassIdIn(List<Long> values) {
addCriterion("first_class_id in", values, "firstClassId");
return (Criteria) this;
}
public Criteria andFirstClassIdNotIn(List<Long> values) {
addCriterion("first_class_id not in", values, "firstClassId");
return (Criteria) this;
}
public Criteria andFirstClassIdBetween(Long value1, Long value2) {
addCriterion("first_class_id between", value1, value2, "firstClassId");
return (Criteria) this;
}
public Criteria andFirstClassIdNotBetween(Long value1, Long value2) {
addCriterion("first_class_id not between", value1, value2, "firstClassId");
return (Criteria) this;
}
public Criteria andSecondClassIdIsNull() {
addCriterion("second_class_id is null");
return (Criteria) this;
}
public Criteria andSecondClassIdIsNotNull() {
addCriterion("second_class_id is not null");
return (Criteria) this;
}
public Criteria andSecondClassIdEqualTo(Long value) {
addCriterion("second_class_id =", value, "secondClassId");
return (Criteria) this;
}
public Criteria andSecondClassIdNotEqualTo(Long value) {
addCriterion("second_class_id <>", value, "secondClassId");
return (Criteria) this;
}
public Criteria andSecondClassIdGreaterThan(Long value) {
addCriterion("second_class_id >", value, "secondClassId");
return (Criteria) this;
}
public Criteria andSecondClassIdGreaterThanOrEqualTo(Long value) {
addCriterion("second_class_id >=", value, "secondClassId");
return (Criteria) this;
}
public Criteria andSecondClassIdLessThan(Long value) {
addCriterion("second_class_id <", value, "secondClassId");
return (Criteria) this;
}
public Criteria andSecondClassIdLessThanOrEqualTo(Long value) {
addCriterion("second_class_id <=", value, "secondClassId");
return (Criteria) this;
}
public Criteria andSecondClassIdIn(List<Long> values) {
addCriterion("second_class_id in", values, "secondClassId");
return (Criteria) this;
}
public Criteria andSecondClassIdNotIn(List<Long> values) {
addCriterion("second_class_id not in", values, "secondClassId");
return (Criteria) this;
}
public Criteria andSecondClassIdBetween(Long value1, Long value2) {
addCriterion("second_class_id between", value1, value2, "secondClassId");
return (Criteria) this;
}
public Criteria andSecondClassIdNotBetween(Long value1, Long value2) {
addCriterion("second_class_id not between", value1, value2, "secondClassId");
return (Criteria) this;
}
public Criteria andCreateDtIsNull() {
addCriterion("create_dt is null");
return (Criteria) this;
}
public Criteria andCreateDtIsNotNull() {
addCriterion("create_dt is not null");
return (Criteria) this;
}
public Criteria andCreateDtEqualTo(Date value) {
addCriterion("create_dt =", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotEqualTo(Date value) {
addCriterion("create_dt <>", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThan(Date value) {
addCriterion("create_dt >", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThanOrEqualTo(Date value) {
addCriterion("create_dt >=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThan(Date value) {
addCriterion("create_dt <", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThanOrEqualTo(Date value) {
addCriterion("create_dt <=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtIn(List<Date> values) {
addCriterion("create_dt in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotIn(List<Date> values) {
addCriterion("create_dt not in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtBetween(Date value1, Date value2) {
addCriterion("create_dt between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotBetween(Date value1, Date value2) {
addCriterion("create_dt not between", value1, value2, "createDt");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.Date;
public class TKzyUser extends BaseModel {
private Long id;
private String fullName;
private String headPhoto;
private String phone;
private Integer userCategory;
private String duty;
private Integer status;
private String wxOpenid;
private Integer integral;
private Integer signInCount;
private Date lastSignDt;
private Date createDt;
private Date lastLoginDt;
public TKzyUser(Long id, String fullName, String headPhoto, String phone, Integer userCategory, String duty, Integer status, String wxOpenid, Integer integral, Integer signInCount, Date lastSignDt, Date createDt, Date lastLoginDt) {
this.id = id;
this.fullName = fullName;
this.headPhoto = headPhoto;
this.phone = phone;
this.userCategory = userCategory;
this.duty = duty;
this.status = status;
this.wxOpenid = wxOpenid;
this.integral = integral;
this.signInCount = signInCount;
this.lastSignDt = lastSignDt;
this.createDt = createDt;
this.lastLoginDt = lastLoginDt;
}
public TKzyUser() {
super();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFullName() {
return fullName;
}
public void setFullName(String fullName) {
this.fullName = fullName == null ? null : fullName.trim();
}
public String getHeadPhoto() {
return headPhoto;
}
public void setHeadPhoto(String headPhoto) {
this.headPhoto = headPhoto == null ? null : headPhoto.trim();
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone == null ? null : phone.trim();
}
public Integer getUserCategory() {
return userCategory;
}
public void setUserCategory(Integer userCategory) {
this.userCategory = userCategory;
}
public String getDuty() {
return duty;
}
public void setDuty(String duty) {
this.duty = duty == null ? null : duty.trim();
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getWxOpenid() {
return wxOpenid;
}
public void setWxOpenid(String wxOpenid) {
this.wxOpenid = wxOpenid == null ? null : wxOpenid.trim();
}
public Integer getIntegral() {
return integral;
}
public void setIntegral(Integer integral) {
this.integral = integral;
}
public Integer getSignInCount() {
return signInCount;
}
public void setSignInCount(Integer signInCount) {
this.signInCount = signInCount;
}
public Date getLastSignDt() {
return lastSignDt;
}
public void setLastSignDt(Date lastSignDt) {
this.lastSignDt = lastSignDt;
}
public Date getCreateDt() {
return createDt;
}
public void setCreateDt(Date createDt) {
this.createDt = createDt;
}
public Date getLastLoginDt() {
return lastLoginDt;
}
public void setLastLoginDt(Date lastLoginDt) {
this.lastLoginDt = lastLoginDt;
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class TKzyUserExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TKzyUserExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andFullNameIsNull() {
addCriterion("full_name is null");
return (Criteria) this;
}
public Criteria andFullNameIsNotNull() {
addCriterion("full_name is not null");
return (Criteria) this;
}
public Criteria andFullNameEqualTo(String value) {
addCriterion("full_name =", value, "fullName");
return (Criteria) this;
}
public Criteria andFullNameNotEqualTo(String value) {
addCriterion("full_name <>", value, "fullName");
return (Criteria) this;
}
public Criteria andFullNameGreaterThan(String value) {
addCriterion("full_name >", value, "fullName");
return (Criteria) this;
}
public Criteria andFullNameGreaterThanOrEqualTo(String value) {
addCriterion("full_name >=", value, "fullName");
return (Criteria) this;
}
public Criteria andFullNameLessThan(String value) {
addCriterion("full_name <", value, "fullName");
return (Criteria) this;
}
public Criteria andFullNameLessThanOrEqualTo(String value) {
addCriterion("full_name <=", value, "fullName");
return (Criteria) this;
}
public Criteria andFullNameLike(String value) {
addCriterion("full_name like", value, "fullName");
return (Criteria) this;
}
public Criteria andFullNameNotLike(String value) {
addCriterion("full_name not like", value, "fullName");
return (Criteria) this;
}
public Criteria andFullNameIn(List<String> values) {
addCriterion("full_name in", values, "fullName");
return (Criteria) this;
}
public Criteria andFullNameNotIn(List<String> values) {
addCriterion("full_name not in", values, "fullName");
return (Criteria) this;
}
public Criteria andFullNameBetween(String value1, String value2) {
addCriterion("full_name between", value1, value2, "fullName");
return (Criteria) this;
}
public Criteria andFullNameNotBetween(String value1, String value2) {
addCriterion("full_name not between", value1, value2, "fullName");
return (Criteria) this;
}
public Criteria andHeadPhotoIsNull() {
addCriterion("head_photo is null");
return (Criteria) this;
}
public Criteria andHeadPhotoIsNotNull() {
addCriterion("head_photo is not null");
return (Criteria) this;
}
public Criteria andHeadPhotoEqualTo(String value) {
addCriterion("head_photo =", value, "headPhoto");
return (Criteria) this;
}
public Criteria andHeadPhotoNotEqualTo(String value) {
addCriterion("head_photo <>", value, "headPhoto");
return (Criteria) this;
}
public Criteria andHeadPhotoGreaterThan(String value) {
addCriterion("head_photo >", value, "headPhoto");
return (Criteria) this;
}
public Criteria andHeadPhotoGreaterThanOrEqualTo(String value) {
addCriterion("head_photo >=", value, "headPhoto");
return (Criteria) this;
}
public Criteria andHeadPhotoLessThan(String value) {
addCriterion("head_photo <", value, "headPhoto");
return (Criteria) this;
}
public Criteria andHeadPhotoLessThanOrEqualTo(String value) {
addCriterion("head_photo <=", value, "headPhoto");
return (Criteria) this;
}
public Criteria andHeadPhotoLike(String value) {
addCriterion("head_photo like", value, "headPhoto");
return (Criteria) this;
}
public Criteria andHeadPhotoNotLike(String value) {
addCriterion("head_photo not like", value, "headPhoto");
return (Criteria) this;
}
public Criteria andHeadPhotoIn(List<String> values) {
addCriterion("head_photo in", values, "headPhoto");
return (Criteria) this;
}
public Criteria andHeadPhotoNotIn(List<String> values) {
addCriterion("head_photo not in", values, "headPhoto");
return (Criteria) this;
}
public Criteria andHeadPhotoBetween(String value1, String value2) {
addCriterion("head_photo between", value1, value2, "headPhoto");
return (Criteria) this;
}
public Criteria andHeadPhotoNotBetween(String value1, String value2) {
addCriterion("head_photo not between", value1, value2, "headPhoto");
return (Criteria) this;
}
public Criteria andPhoneIsNull() {
addCriterion("phone is null");
return (Criteria) this;
}
public Criteria andPhoneIsNotNull() {
addCriterion("phone is not null");
return (Criteria) this;
}
public Criteria andPhoneEqualTo(String value) {
addCriterion("phone =", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneNotEqualTo(String value) {
addCriterion("phone <>", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneGreaterThan(String value) {
addCriterion("phone >", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneGreaterThanOrEqualTo(String value) {
addCriterion("phone >=", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneLessThan(String value) {
addCriterion("phone <", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneLessThanOrEqualTo(String value) {
addCriterion("phone <=", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneLike(String value) {
addCriterion("phone like", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneNotLike(String value) {
addCriterion("phone not like", value, "phone");
return (Criteria) this;
}
public Criteria andPhoneIn(List<String> values) {
addCriterion("phone in", values, "phone");
return (Criteria) this;
}
public Criteria andPhoneNotIn(List<String> values) {
addCriterion("phone not in", values, "phone");
return (Criteria) this;
}
public Criteria andPhoneBetween(String value1, String value2) {
addCriterion("phone between", value1, value2, "phone");
return (Criteria) this;
}
public Criteria andPhoneNotBetween(String value1, String value2) {
addCriterion("phone not between", value1, value2, "phone");
return (Criteria) this;
}
public Criteria andUserCategoryIsNull() {
addCriterion("user_category is null");
return (Criteria) this;
}
public Criteria andUserCategoryIsNotNull() {
addCriterion("user_category is not null");
return (Criteria) this;
}
public Criteria andUserCategoryEqualTo(Integer value) {
addCriterion("user_category =", value, "userCategory");
return (Criteria) this;
}
public Criteria andUserCategoryNotEqualTo(Integer value) {
addCriterion("user_category <>", value, "userCategory");
return (Criteria) this;
}
public Criteria andUserCategoryGreaterThan(Integer value) {
addCriterion("user_category >", value, "userCategory");
return (Criteria) this;
}
public Criteria andUserCategoryGreaterThanOrEqualTo(Integer value) {
addCriterion("user_category >=", value, "userCategory");
return (Criteria) this;
}
public Criteria andUserCategoryLessThan(Integer value) {
addCriterion("user_category <", value, "userCategory");
return (Criteria) this;
}
public Criteria andUserCategoryLessThanOrEqualTo(Integer value) {
addCriterion("user_category <=", value, "userCategory");
return (Criteria) this;
}
public Criteria andUserCategoryIn(List<Integer> values) {
addCriterion("user_category in", values, "userCategory");
return (Criteria) this;
}
public Criteria andUserCategoryNotIn(List<Integer> values) {
addCriterion("user_category not in", values, "userCategory");
return (Criteria) this;
}
public Criteria andUserCategoryBetween(Integer value1, Integer value2) {
addCriterion("user_category between", value1, value2, "userCategory");
return (Criteria) this;
}
public Criteria andUserCategoryNotBetween(Integer value1, Integer value2) {
addCriterion("user_category not between", value1, value2, "userCategory");
return (Criteria) this;
}
public Criteria andDutyIsNull() {
addCriterion("duty is null");
return (Criteria) this;
}
public Criteria andDutyIsNotNull() {
addCriterion("duty is not null");
return (Criteria) this;
}
public Criteria andDutyEqualTo(String value) {
addCriterion("duty =", value, "duty");
return (Criteria) this;
}
public Criteria andDutyNotEqualTo(String value) {
addCriterion("duty <>", value, "duty");
return (Criteria) this;
}
public Criteria andDutyGreaterThan(String value) {
addCriterion("duty >", value, "duty");
return (Criteria) this;
}
public Criteria andDutyGreaterThanOrEqualTo(String value) {
addCriterion("duty >=", value, "duty");
return (Criteria) this;
}
public Criteria andDutyLessThan(String value) {
addCriterion("duty <", value, "duty");
return (Criteria) this;
}
public Criteria andDutyLessThanOrEqualTo(String value) {
addCriterion("duty <=", value, "duty");
return (Criteria) this;
}
public Criteria andDutyLike(String value) {
addCriterion("duty like", value, "duty");
return (Criteria) this;
}
public Criteria andDutyNotLike(String value) {
addCriterion("duty not like", value, "duty");
return (Criteria) this;
}
public Criteria andDutyIn(List<String> values) {
addCriterion("duty in", values, "duty");
return (Criteria) this;
}
public Criteria andDutyNotIn(List<String> values) {
addCriterion("duty not in", values, "duty");
return (Criteria) this;
}
public Criteria andDutyBetween(String value1, String value2) {
addCriterion("duty between", value1, value2, "duty");
return (Criteria) this;
}
public Criteria andDutyNotBetween(String value1, String value2) {
addCriterion("duty not between", value1, value2, "duty");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("status is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("status is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("status =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("status <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("status >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("status >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("status <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("status <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("status in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("status not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("status between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("status not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andWxOpenidIsNull() {
addCriterion("wx_openid is null");
return (Criteria) this;
}
public Criteria andWxOpenidIsNotNull() {
addCriterion("wx_openid is not null");
return (Criteria) this;
}
public Criteria andWxOpenidEqualTo(String value) {
addCriterion("wx_openid =", value, "wxOpenid");
return (Criteria) this;
}
public Criteria andWxOpenidNotEqualTo(String value) {
addCriterion("wx_openid <>", value, "wxOpenid");
return (Criteria) this;
}
public Criteria andWxOpenidGreaterThan(String value) {
addCriterion("wx_openid >", value, "wxOpenid");
return (Criteria) this;
}
public Criteria andWxOpenidGreaterThanOrEqualTo(String value) {
addCriterion("wx_openid >=", value, "wxOpenid");
return (Criteria) this;
}
public Criteria andWxOpenidLessThan(String value) {
addCriterion("wx_openid <", value, "wxOpenid");
return (Criteria) this;
}
public Criteria andWxOpenidLessThanOrEqualTo(String value) {
addCriterion("wx_openid <=", value, "wxOpenid");
return (Criteria) this;
}
public Criteria andWxOpenidLike(String value) {
addCriterion("wx_openid like", value, "wxOpenid");
return (Criteria) this;
}
public Criteria andWxOpenidNotLike(String value) {
addCriterion("wx_openid not like", value, "wxOpenid");
return (Criteria) this;
}
public Criteria andWxOpenidIn(List<String> values) {
addCriterion("wx_openid in", values, "wxOpenid");
return (Criteria) this;
}
public Criteria andWxOpenidNotIn(List<String> values) {
addCriterion("wx_openid not in", values, "wxOpenid");
return (Criteria) this;
}
public Criteria andWxOpenidBetween(String value1, String value2) {
addCriterion("wx_openid between", value1, value2, "wxOpenid");
return (Criteria) this;
}
public Criteria andWxOpenidNotBetween(String value1, String value2) {
addCriterion("wx_openid not between", value1, value2, "wxOpenid");
return (Criteria) this;
}
public Criteria andIntegralIsNull() {
addCriterion("integral is null");
return (Criteria) this;
}
public Criteria andIntegralIsNotNull() {
addCriterion("integral is not null");
return (Criteria) this;
}
public Criteria andIntegralEqualTo(Integer value) {
addCriterion("integral =", value, "integral");
return (Criteria) this;
}
public Criteria andIntegralNotEqualTo(Integer value) {
addCriterion("integral <>", value, "integral");
return (Criteria) this;
}
public Criteria andIntegralGreaterThan(Integer value) {
addCriterion("integral >", value, "integral");
return (Criteria) this;
}
public Criteria andIntegralGreaterThanOrEqualTo(Integer value) {
addCriterion("integral >=", value, "integral");
return (Criteria) this;
}
public Criteria andIntegralLessThan(Integer value) {
addCriterion("integral <", value, "integral");
return (Criteria) this;
}
public Criteria andIntegralLessThanOrEqualTo(Integer value) {
addCriterion("integral <=", value, "integral");
return (Criteria) this;
}
public Criteria andIntegralIn(List<Integer> values) {
addCriterion("integral in", values, "integral");
return (Criteria) this;
}
public Criteria andIntegralNotIn(List<Integer> values) {
addCriterion("integral not in", values, "integral");
return (Criteria) this;
}
public Criteria andIntegralBetween(Integer value1, Integer value2) {
addCriterion("integral between", value1, value2, "integral");
return (Criteria) this;
}
public Criteria andIntegralNotBetween(Integer value1, Integer value2) {
addCriterion("integral not between", value1, value2, "integral");
return (Criteria) this;
}
public Criteria andSignInCountIsNull() {
addCriterion("sign_in_count is null");
return (Criteria) this;
}
public Criteria andSignInCountIsNotNull() {
addCriterion("sign_in_count is not null");
return (Criteria) this;
}
public Criteria andSignInCountEqualTo(Integer value) {
addCriterion("sign_in_count =", value, "signInCount");
return (Criteria) this;
}
public Criteria andSignInCountNotEqualTo(Integer value) {
addCriterion("sign_in_count <>", value, "signInCount");
return (Criteria) this;
}
public Criteria andSignInCountGreaterThan(Integer value) {
addCriterion("sign_in_count >", value, "signInCount");
return (Criteria) this;
}
public Criteria andSignInCountGreaterThanOrEqualTo(Integer value) {
addCriterion("sign_in_count >=", value, "signInCount");
return (Criteria) this;
}
public Criteria andSignInCountLessThan(Integer value) {
addCriterion("sign_in_count <", value, "signInCount");
return (Criteria) this;
}
public Criteria andSignInCountLessThanOrEqualTo(Integer value) {
addCriterion("sign_in_count <=", value, "signInCount");
return (Criteria) this;
}
public Criteria andSignInCountIn(List<Integer> values) {
addCriterion("sign_in_count in", values, "signInCount");
return (Criteria) this;
}
public Criteria andSignInCountNotIn(List<Integer> values) {
addCriterion("sign_in_count not in", values, "signInCount");
return (Criteria) this;
}
public Criteria andSignInCountBetween(Integer value1, Integer value2) {
addCriterion("sign_in_count between", value1, value2, "signInCount");
return (Criteria) this;
}
public Criteria andSignInCountNotBetween(Integer value1, Integer value2) {
addCriterion("sign_in_count not between", value1, value2, "signInCount");
return (Criteria) this;
}
public Criteria andLastSignDtIsNull() {
addCriterion("last_sign_dt is null");
return (Criteria) this;
}
public Criteria andLastSignDtIsNotNull() {
addCriterion("last_sign_dt is not null");
return (Criteria) this;
}
public Criteria andLastSignDtEqualTo(Date value) {
addCriterion("last_sign_dt =", value, "lastSignDt");
return (Criteria) this;
}
public Criteria andLastSignDtNotEqualTo(Date value) {
addCriterion("last_sign_dt <>", value, "lastSignDt");
return (Criteria) this;
}
public Criteria andLastSignDtGreaterThan(Date value) {
addCriterion("last_sign_dt >", value, "lastSignDt");
return (Criteria) this;
}
public Criteria andLastSignDtGreaterThanOrEqualTo(Date value) {
addCriterion("last_sign_dt >=", value, "lastSignDt");
return (Criteria) this;
}
public Criteria andLastSignDtLessThan(Date value) {
addCriterion("last_sign_dt <", value, "lastSignDt");
return (Criteria) this;
}
public Criteria andLastSignDtLessThanOrEqualTo(Date value) {
addCriterion("last_sign_dt <=", value, "lastSignDt");
return (Criteria) this;
}
public Criteria andLastSignDtIn(List<Date> values) {
addCriterion("last_sign_dt in", values, "lastSignDt");
return (Criteria) this;
}
public Criteria andLastSignDtNotIn(List<Date> values) {
addCriterion("last_sign_dt not in", values, "lastSignDt");
return (Criteria) this;
}
public Criteria andLastSignDtBetween(Date value1, Date value2) {
addCriterion("last_sign_dt between", value1, value2, "lastSignDt");
return (Criteria) this;
}
public Criteria andLastSignDtNotBetween(Date value1, Date value2) {
addCriterion("last_sign_dt not between", value1, value2, "lastSignDt");
return (Criteria) this;
}
public Criteria andCreateDtIsNull() {
addCriterion("create_dt is null");
return (Criteria) this;
}
public Criteria andCreateDtIsNotNull() {
addCriterion("create_dt is not null");
return (Criteria) this;
}
public Criteria andCreateDtEqualTo(Date value) {
addCriterion("create_dt =", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotEqualTo(Date value) {
addCriterion("create_dt <>", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThan(Date value) {
addCriterion("create_dt >", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThanOrEqualTo(Date value) {
addCriterion("create_dt >=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThan(Date value) {
addCriterion("create_dt <", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThanOrEqualTo(Date value) {
addCriterion("create_dt <=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtIn(List<Date> values) {
addCriterion("create_dt in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotIn(List<Date> values) {
addCriterion("create_dt not in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtBetween(Date value1, Date value2) {
addCriterion("create_dt between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotBetween(Date value1, Date value2) {
addCriterion("create_dt not between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andLastLoginDtIsNull() {
addCriterion("last_login_dt is null");
return (Criteria) this;
}
public Criteria andLastLoginDtIsNotNull() {
addCriterion("last_login_dt is not null");
return (Criteria) this;
}
public Criteria andLastLoginDtEqualTo(Date value) {
addCriterion("last_login_dt =", value, "lastLoginDt");
return (Criteria) this;
}
public Criteria andLastLoginDtNotEqualTo(Date value) {
addCriterion("last_login_dt <>", value, "lastLoginDt");
return (Criteria) this;
}
public Criteria andLastLoginDtGreaterThan(Date value) {
addCriterion("last_login_dt >", value, "lastLoginDt");
return (Criteria) this;
}
public Criteria andLastLoginDtGreaterThanOrEqualTo(Date value) {
addCriterion("last_login_dt >=", value, "lastLoginDt");
return (Criteria) this;
}
public Criteria andLastLoginDtLessThan(Date value) {
addCriterion("last_login_dt <", value, "lastLoginDt");
return (Criteria) this;
}
public Criteria andLastLoginDtLessThanOrEqualTo(Date value) {
addCriterion("last_login_dt <=", value, "lastLoginDt");
return (Criteria) this;
}
public Criteria andLastLoginDtIn(List<Date> values) {
addCriterion("last_login_dt in", values, "lastLoginDt");
return (Criteria) this;
}
public Criteria andLastLoginDtNotIn(List<Date> values) {
addCriterion("last_login_dt not in", values, "lastLoginDt");
return (Criteria) this;
}
public Criteria andLastLoginDtBetween(Date value1, Date value2) {
addCriterion("last_login_dt between", value1, value2, "lastLoginDt");
return (Criteria) this;
}
public Criteria andLastLoginDtNotBetween(Date value1, Date value2) {
addCriterion("last_login_dt not between", value1, value2, "lastLoginDt");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.Date;
public class TKzyUserIntegralFlowing extends BaseModel {
private Long id;
private Long userId;
private Integer integral;
private Integer sourceType;
private Integer type;
private Date createDt;
private String remark;
public TKzyUserIntegralFlowing(Long id, Long userId, Integer integral, Integer sourceType, Integer type, Date createDt, String remark) {
this.id = id;
this.userId = userId;
this.integral = integral;
this.sourceType = sourceType;
this.type = type;
this.createDt = createDt;
this.remark = remark;
}
public TKzyUserIntegralFlowing() {
super();
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public Integer getIntegral() {
return integral;
}
public void setIntegral(Integer integral) {
this.integral = integral;
}
public Integer getSourceType() {
return sourceType;
}
public void setSourceType(Integer sourceType) {
this.sourceType = sourceType;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Date getCreateDt() {
return createDt;
}
public void setCreateDt(Date createDt) {
this.createDt = createDt;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.trim();
}
}
\ No newline at end of file
package com.server.web.common.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class TKzyUserIntegralFlowingExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public TKzyUserIntegralFlowingExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andIntegralIsNull() {
addCriterion("integral is null");
return (Criteria) this;
}
public Criteria andIntegralIsNotNull() {
addCriterion("integral is not null");
return (Criteria) this;
}
public Criteria andIntegralEqualTo(Integer value) {
addCriterion("integral =", value, "integral");
return (Criteria) this;
}
public Criteria andIntegralNotEqualTo(Integer value) {
addCriterion("integral <>", value, "integral");
return (Criteria) this;
}
public Criteria andIntegralGreaterThan(Integer value) {
addCriterion("integral >", value, "integral");
return (Criteria) this;
}
public Criteria andIntegralGreaterThanOrEqualTo(Integer value) {
addCriterion("integral >=", value, "integral");
return (Criteria) this;
}
public Criteria andIntegralLessThan(Integer value) {
addCriterion("integral <", value, "integral");
return (Criteria) this;
}
public Criteria andIntegralLessThanOrEqualTo(Integer value) {
addCriterion("integral <=", value, "integral");
return (Criteria) this;
}
public Criteria andIntegralIn(List<Integer> values) {
addCriterion("integral in", values, "integral");
return (Criteria) this;
}
public Criteria andIntegralNotIn(List<Integer> values) {
addCriterion("integral not in", values, "integral");
return (Criteria) this;
}
public Criteria andIntegralBetween(Integer value1, Integer value2) {
addCriterion("integral between", value1, value2, "integral");
return (Criteria) this;
}
public Criteria andIntegralNotBetween(Integer value1, Integer value2) {
addCriterion("integral not between", value1, value2, "integral");
return (Criteria) this;
}
public Criteria andSourceTypeIsNull() {
addCriterion("source_type is null");
return (Criteria) this;
}
public Criteria andSourceTypeIsNotNull() {
addCriterion("source_type is not null");
return (Criteria) this;
}
public Criteria andSourceTypeEqualTo(Integer value) {
addCriterion("source_type =", value, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeNotEqualTo(Integer value) {
addCriterion("source_type <>", value, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeGreaterThan(Integer value) {
addCriterion("source_type >", value, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("source_type >=", value, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeLessThan(Integer value) {
addCriterion("source_type <", value, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeLessThanOrEqualTo(Integer value) {
addCriterion("source_type <=", value, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeIn(List<Integer> values) {
addCriterion("source_type in", values, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeNotIn(List<Integer> values) {
addCriterion("source_type not in", values, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeBetween(Integer value1, Integer value2) {
addCriterion("source_type between", value1, value2, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeNotBetween(Integer value1, Integer value2) {
addCriterion("source_type not between", value1, value2, "sourceType");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("type is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("type =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("type <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("type >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("type >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("type <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("type <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("type in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("type not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("type between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("type not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andCreateDtIsNull() {
addCriterion("create_dt is null");
return (Criteria) this;
}
public Criteria andCreateDtIsNotNull() {
addCriterion("create_dt is not null");
return (Criteria) this;
}
public Criteria andCreateDtEqualTo(Date value) {
addCriterion("create_dt =", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotEqualTo(Date value) {
addCriterion("create_dt <>", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThan(Date value) {
addCriterion("create_dt >", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtGreaterThanOrEqualTo(Date value) {
addCriterion("create_dt >=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThan(Date value) {
addCriterion("create_dt <", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtLessThanOrEqualTo(Date value) {
addCriterion("create_dt <=", value, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtIn(List<Date> values) {
addCriterion("create_dt in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotIn(List<Date> values) {
addCriterion("create_dt not in", values, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtBetween(Date value1, Date value2) {
addCriterion("create_dt between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andCreateDtNotBetween(Date value1, Date value2) {
addCriterion("create_dt not between", value1, value2, "createDt");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}
\ No newline at end of file
package com.server.web.common.service.Impl;
import com.server.web.common.mapper.TBaseBannerMapper;
import com.server.web.common.mapper.TBaseFirstClassMapper;
import com.server.web.common.mapping.CourseMapper;
import com.server.web.common.mapping.InformationMapper;
import com.server.web.common.model.TBaseBanner;
import com.server.web.common.model.TBaseBannerExample;
import com.server.web.common.model.TBaseFirstClass;
import com.server.web.common.model.TBaseFirstClassExample;
import com.server.web.common.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.*;
import static com.server.utils.ResultMapUtil.returnMap;
/**
* Created by weiwenfu@163.com on 2018/12/12 下午 3:05.
*/
@Service
public class IndexServiceImpl implements IndexService {
@Autowired
private TBaseBannerMapper tBaseBannerMapper;
@Autowired
private TBaseFirstClassMapper tBaseFirstClassMapper;
@Autowired
private InformationMapper informationMapper;
@Autowired
private CourseMapper courseMapper;
@Override
public Map<String, Object> banner() {
TBaseBannerExample tBaseBannerExample = new TBaseBannerExample();
tBaseBannerExample.createCriteria().andIsUpEqualTo(1).andIsDeleteEqualTo(0);
tBaseBannerExample.setOrderByClause(" weight desc ");
List<TBaseBanner> list = tBaseBannerMapper.selectByExample(tBaseBannerExample);
return returnMap("1", "", list);
}
/**
* 首页分类
*
* @return
*/
@Override
public Map<String, Object> categoryList() {
TBaseFirstClassExample tBaseFirstClassExample = new TBaseFirstClassExample();
tBaseFirstClassExample.setOrderByClause(" weight desc");
tBaseFirstClassExample.createCriteria().andStatusEqualTo(1);
List<TBaseFirstClass> list = tBaseFirstClassMapper.selectByExample(tBaseFirstClassExample);
return returnMap("1", "", list);
}
/**
* 首页分类+两条资讯
*
* @return
*/
@Override
public Map<String, Object> categoryDetail() {
TBaseFirstClassExample tBaseFirstClassExample = new TBaseFirstClassExample();
tBaseFirstClassExample.setOrderByClause(" weight desc");
tBaseFirstClassExample.createCriteria().andStatusEqualTo(1);
List<TBaseFirstClass> list = tBaseFirstClassMapper.selectByExample(tBaseFirstClassExample);
List<Map<String, Object>> resultList = new ArrayList<>();
Map<String, Object> flagMap = null;
for (TBaseFirstClass tBaseFirstClass : list) {
flagMap = new HashMap<String, Object>();
flagMap.put("className", tBaseFirstClass.getClassName());
flagMap.put("id", tBaseFirstClass.getId());
List<Map<String, Object>> list2 = informationMapper.categoryDetail(tBaseFirstClass.getId());
flagMap.put("informationList", list2);
resultList.add(flagMap);
}
return returnMap("1", "", resultList);
}
@Override
public Map<String, Object> livingCourseToday() {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
Map<String, Object> param = new HashMap<>();
param.put("today", simpleDateFormat.format(new Date()));
List<Map<String, Object>> list = courseMapper.livingCourseToday(param);
return returnMap("1", "", list);
}
}
package com.server.web.common.service.Impl;
import com.server.web.common.mapper.TBaseFirstClassMapper;
import com.server.web.common.mapper.TBaseSecondClassMapper;
import com.server.web.common.mapper.TKzyCommentMapper;
import com.server.web.common.mapper.TKzyInformationMapper;
import com.server.web.common.mapping.CommentMapper;
import com.server.web.common.mapping.InformationMapper;
import com.server.web.common.model.*;
import com.server.web.common.service.InformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.server.utils.ResultMapUtil.returnMap;
/**
* Created by weiwenfu@163.com on 2020/3/12 下午 4:54.
*/
@Service
public class InformationServiceImpl implements InformationService {
@Autowired
private InformationMapper informationMapper;
@Autowired
private TKzyInformationMapper tKzyInformationMapper;
@Autowired
private TBaseSecondClassMapper tBaseSecondClassMapper;
@Autowired
private CommentMapper commentMapper;
@Autowired
private TKzyCommentMapper tKzyCommentMapper;
@Autowired
private TBaseFirstClassMapper tBaseFirstClassMapper;
@Override
public Map<String, Object> secondClassList(Long firstId) {
TBaseSecondClassExample tBaseSecondClassExample = new TBaseSecondClassExample();
tBaseSecondClassExample.createCriteria().andFirstIdEqualTo(firstId).andStatusEqualTo(1);
List<TBaseSecondClass> list = tBaseSecondClassMapper.selectByExample(tBaseSecondClassExample);
TBaseFirstClass tBaseFirstClass = tBaseFirstClassMapper.selectByPrimaryKey(firstId);
Map<String, Object> dataMap = new HashMap<String, Object>();
dataMap.put("list", list);
dataMap.put("firstClassName", tBaseFirstClass.getClassName());
return returnMap("1", "", dataMap);
}
/**
* 二级分类详情
*
* @param secondId
* @return
*/
@Override
public Map<String, Object> secondClassDetail(Long secondId, Integer pageNo, Integer pageSize) {
TBaseSecondClass tBaseSecondClass = tBaseSecondClassMapper.selectByPrimaryKey(secondId);
List<Map<String, Object>> list = null;
Integer total = 0;
Map<String, Object> param = new HashMap<String, Object>();
param.put("start", (pageNo - 1) * pageSize);
param.put("pageSize", pageSize);
param.put("secondId", secondId);
if (tBaseSecondClass.getType() == 1) {
list = informationMapper.secondClassDetailInformation(param);
} else {
list = informationMapper.secondClassDetailCourse(param);
}
return returnMap("1", "", list);
}
/**
* 详情
*
* @param informationId
* @return
*/
@Override
public Map<String, Object> informationDetail(Long informationId) {
TKzyInformation tKzyInformation = tKzyInformationMapper.selectByPrimaryKey(informationId);
if (tKzyInformation == null) {
return returnMap("0", "未查到该数据信息!", null);
}
tKzyInformation.getContent();
Map<String, Object> dataMap = new HashMap<String, Object>();
dataMap.put("id", tKzyInformation.getId());
dataMap.put("title", tKzyInformation.getTitle());
dataMap.put("author", tKzyInformation.getAuthor());
dataMap.put("picUrl", tKzyInformation.getPicUrl());
dataMap.put("iconUrl", tKzyInformation.getIconUrl());
dataMap.put("isDelete", tKzyInformation.getIsDelete());
dataMap.put("createDt", tKzyInformation.getCreateDt());
dataMap.put("updateDt", tKzyInformation.getUpdateDt());
dataMap.put("content", new String(tKzyInformation.getContent()));
return returnMap("1", "", dataMap);
}
@Override
public Map<String, Object> informationCommentList(Long informationId, Integer pageNo, Integer pageSize) {
Map<String, Object> param = new HashMap<>();
param.put("informationId", informationId);
param.put("start", (pageNo - 1) * pageSize);
param.put("pageSize", pageSize);
List<Map<String, Object>> list = commentMapper.informationCommentList(param);
Integer count = commentMapper.informationCommentListTotal(param);
Map<String, Object> dataMap = new HashMap<>();
dataMap.put("list", list);
dataMap.put("count", count);
return returnMap("1", "", dataMap);
}
@Override
public Map<String, Object> informationComment(Long informationId, Long userId, String comment) {
if (informationId == null || informationId <= 0l) {
return returnMap("0", "参数有误!", null);
}
TKzyInformation tKzyInformation = tKzyInformationMapper.selectByPrimaryKey(informationId);
if (tKzyInformation == null) {
return returnMap("0", "未查到该数据信息!", null);
}
if (userId == null || userId <= 0l) {
return returnMap("0", "请先登录!", null);
}
if (comment == null) {
return returnMap("0", "评论内容不能为空~", null);
}
TKzyComment tKzyCourseComment = new TKzyComment();
tKzyCourseComment.setCreateDt(new Date());
tKzyCourseComment.setUserId(userId);
tKzyCourseComment.setRelationId(informationId);
tKzyCourseComment.setIsDelete(0);
tKzyCourseComment.setReplyContent(comment);
tKzyCourseComment.setType(1);
tKzyCourseComment.setAuthStatus(1);
tKzyCommentMapper.insertSelective(tKzyCourseComment);
return returnMap("1", "操作成功!", null);
}
}
package com.server.web.common.service.Impl;
import com.server.web.common.service.OpenSqlRingsService;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.stereotype.Service;
import org.springframework.transaction.TransactionDefinition;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.support.DefaultTransactionDefinition;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 指环王工具
* Created by yinbin on 2018/1/12.
* 自定义sql执行工具类
* 功能:通过sql的命名空间,指定执行xml里的sql
* 1、增删改查
* 2、批量增加
*/
@Service
public class OpenSqlRingsServiceImpl implements OpenSqlRingsService {
@Autowired
private SqlSessionTemplate sqlSession;
// @Autowired
// private DataSourceTransactionManager transactionManager;
@Override
public Object selectOne_Rings(String statement, Map<String, Object> params) {
Object obj = sqlSession.selectOne(statement, params);
return obj;
}
@Override
public ArrayList<Object> selectList_Rings(String statement, Map<String, Object> params) {
ArrayList<Object> resultList = (ArrayList<Object>) sqlSession.selectList(statement, params);
return resultList;
}
@Override
@Transactional
public void insert_Rings(String statement, Map<String, Object> params) {
sqlSession.insert(statement, params);
}
@Override
@Transactional
public void delete_Rings(String statement, Map<String, Object> params) {
sqlSession.delete(statement, params);
}
@Override
@Transactional
public void update_Rings(String statement, Map<String, Object> params) {
sqlSession.update(statement, params);
}
@Override
@Transactional
public void insert_batch_Rings(String statement, List<Map<String, Object>> params) {
for (Map<String, Object> map : params) {
sqlSession.insert(statement, map);
}
}
@Override
public void insert_batch11_Rings(String statement, List<Map<String, Object>> params, int per) {
//
// //事物定义类
// DefaultTransactionDefinition transactionDefinition = new DefaultTransactionDefinition(TransactionDefinition.PROPAGATION_REQUIRED);
// //获取事物对象
// TransactionStatus status = transactionManager.getTransaction(transactionDefinition);
//
// try {
// for (Map<String, Object> map : params) {
// sqlSession.insert(statement, map);
// }
// //插入成功提交事物
// transactionManager.commit(status);
// } catch (Exception e) {
// //异常回滚事物
// transactionManager.rollback(status);
// }
}
}
package com.server.web.common.service.Impl;
import com.server.utils.weixin.WeixinBaseUtil;
import com.server.utils.weixin.bean.AccessTokenBean;
import com.server.web.common.mapper.TKzyCommentMapper;
import com.server.web.common.mapper.TKzyCourseMapper;
import com.server.web.common.mapper.TKzyUserMapper;
import com.server.web.common.mapping.CommentMapper;
import com.server.web.common.mapping.CourseMapper;
import com.server.web.common.model.TKzyComment;
import com.server.web.common.model.TKzyCourse;
import com.server.web.common.service.TKzyCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import redis.clients.jedis.JedisPool;
import java.awt.*;
import java.awt.font.FontRenderContext;
import java.awt.geom.AffineTransform;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
* 课程相关
* Created by weiwenfu@163.com on 2018/12/5 下午 1:45.
*/
@Service
public class TKzyCourseServiceImpl implements TKzyCourseService {
@Autowired
private TKzyCourseMapper tKzyCourseMapper;
@Autowired
private TKzyCommentMapper tKzyCommentMapper;
@Autowired
private TKzyUserMapper tKzyUserMapper;
@Autowired
private CommentMapper commentMapper;
@Autowired
private CourseMapper courseMapper;
private static final int ERCORD_WIDTH = 600;
private static final int ERCORD_HEIGHT = 600;
@Value("${remoteFileUrl}")
private String remoteFileUrl;
@Value("${upyun.baseDir}")
private String upyunBaseDir;
@Value("${upyun.bucket}")
private String upyunBucket;
@Value("${upyun.username}")
private String upyunUsername;
@Value("${upyun.password}")
private String upyunPassword;
@Value("${wx.http.url}")
private String WX_HTTP_URL;
@Value("${wx.app.secret}")
private String appSecret;
@Value("${wx.app.id}")
private String appId;
@Autowired
RedisTemplate redisTemplate;
/**
* 热门课程
*
* @return
*/
@Override
public Map<String, Object> hotCourse() {
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("status", "1");
resultMap.put("message", "");
Map<String, Object> param = new HashMap<>();
param.put("limit", 4);
List<Map<String, Object>> list = courseMapper.hotCourse(param);
resultMap.put("data", list);
return resultMap;
}
/**
* 直播课
*
* @return
*/
@Override
public Map<String, Object> livingCourse() {
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("status", "1");
resultMap.put("message", "");
Map<String, Object> param = new HashMap<>();
List<Map<String, Object>> list = courseMapper.livingCourse(param);
resultMap.put("data", list);
return resultMap;
}
/**
* 录播课
*
* @param pageNo
* @param pageSize
* @return
*/
@Override
public Map<String, Object> recordCourse(Long typeId, Integer pageNo, Integer pageSize) {
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("status", "1");
resultMap.put("message", "");
if (pageNo == null || pageNo <= 0) {
pageNo = 1;
}
if (pageSize == null || pageSize <= 0) {
pageSize = 10;
}
Map<String, Object> param = new HashMap<>();
param.put("start", (pageNo - 1) * pageSize);
param.put("pageSize", pageSize);
// param.put("typeId", typeId);
List<Map<String, Object>> list = courseMapper.recordCourse(param);
resultMap.put("data", list);
return resultMap;
}
@Override
public Map<String, Object> livingCourseDetail(Long courseId, Long userId) {
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("status", "0");
resultMap.put("message", "");
if (courseId == null || courseId <= 0l) {
resultMap.put("message", "课程ID不能为空或有误~");
return resultMap;
}
TKzyCourse tKzyCourse = tKzyCourseMapper.selectByPrimaryKey(courseId);
if (tKzyCourse == null) {
resultMap.put("message", "未查到该课程信息,请确认~");
return resultMap;
}
resultMap.put("status", "1");
Map<String, Object> courseMap = new HashMap<>();
courseMap.put("courseName", tKzyCourse.getCourseName());
courseMap.put("courseIntroduce", tKzyCourse.getCourseIntroduce());
courseMap.put("startDt", tKzyCourse.getStartDt());
courseMap.put("endDt", tKzyCourse.getEndDt());
courseMap.put("picUrl", tKzyCourse.getPicUrl());
courseMap.put("liveUrl", tKzyCourse.getLiveUrl());
courseMap.put("courseType", tKzyCourse.getCourseType());
resultMap.put("data", courseMap);
return resultMap;
}
@Override
public Map<String, Object> recordCourseDetail(Long courseId, Long userId) {
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("status", "0");
resultMap.put("message", "");
if (courseId == null || courseId <= 0l) {
resultMap.put("message", "课程ID不能为空或有误~");
return resultMap;
}
TKzyCourse tKzyCourse = tKzyCourseMapper.selectByPrimaryKey(courseId);
if (tKzyCourse == null) {
resultMap.put("message", "未查到该课程信息,请确认~");
return resultMap;
}
resultMap.put("status", "1");
Map<String, Object> courseMap = new HashMap<>();
courseMap.put("courseName", tKzyCourse.getCourseName());
courseMap.put("courseIntroduce", tKzyCourse.getCourseIntroduce());
courseMap.put("startDt", tKzyCourse.getStartDt());
courseMap.put("endDt", tKzyCourse.getEndDt());
courseMap.put("picUrl", tKzyCourse.getPicUrl());
courseMap.put("liveUrl", tKzyCourse.getLiveUrl());
resultMap.put("data", courseMap);
return resultMap;
}
/**
* 评论列表
*
* @param courseId
* @return
*/
@Override
public Map<String, Object> commentList(Long courseId, Integer pageNo, Integer pageSize) {
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("status", "1");
resultMap.put("message", "");
Map<String, Object> dataMap = new HashMap<>();
Map<String, Object> param = new HashMap<>();
param.put("courseId", courseId);
param.put("start", (pageNo - 1) * pageSize);
param.put("pageSize", pageSize);
List<Map<String, Object>> list = commentMapper.commentList(param);
Integer count = commentMapper.commentListTotal(param);
dataMap.put("list", list);
dataMap.put("count", count);
resultMap.put("data", dataMap);
return resultMap;
}
public String getAccessToken(String appId, String appSecret) {
if (org.springframework.util.StringUtils.hasText(appSecret)) {
String json = "";
boolean redisAccessToken = true;
if (redisTemplate.hasKey("wx_accessToken_" + appId)) {
json = (String) redisTemplate.opsForValue().get("wx_accessToken_" + appId);
if (org.springframework.util.StringUtils.hasText(json)) {
redisAccessToken = false;
}
}
if (redisAccessToken) {
String url = WeixinBaseUtil.ACCESS_TOKEN_URL + "&appid=" + appId + "&secret=" + appSecret;
RestTemplate restTemplate = new RestTemplate();
json = restTemplate.getForObject(url, String.class);
redisTemplate.opsForValue().set("wx_accessToken_" + appId, json, 60 * 60, TimeUnit.SECONDS);
}
AccessTokenBean accessTokenBean = new AccessTokenBean(json);
return accessTokenBean.getAccessToken();
} else {
return null;
}
}
/**
* 评论
*
* @param courseId
* @param userId
* @param comment
* @return
*/
@Override
public Map<String, Object> comment(Long courseId, Long userId, String comment) {
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("status", "0");
resultMap.put("message", "");
if (courseId == null || courseId <= 0l) {
resultMap.put("message", "课程ID不能为空或有误~");
return resultMap;
}
TKzyCourse tKzyCourse = tKzyCourseMapper.selectByPrimaryKey(courseId);
if (tKzyCourse == null) {
resultMap.put("message", "未查到该课程信息,请确认~");
return resultMap;
}
if (userId == null || userId <= 0l) {
resultMap.put("message", "请先登录~");
resultMap.put("status", "-1");
return resultMap;
}
if (comment == null) {
resultMap.put("message", "评论内容不能为空~");
return resultMap;
}
TKzyComment tKzyCourseComment = new TKzyComment();
tKzyCourseComment.setCreateDt(new Date());
tKzyCourseComment.setUserId(userId);
tKzyCourseComment.setRelationId(courseId);
tKzyCourseComment.setIsDelete(0);
tKzyCourseComment.setReplyContent(comment);
tKzyCourseComment.setType(2);
tKzyCourseComment.setAuthStatus(1);
tKzyCommentMapper.insertSelective(tKzyCourseComment);
resultMap.put("message", "评论成功~");
resultMap.put("status", "1");
return resultMap;
}
/**
* 课程分类
*
* @return
*/
@Override
public Map<String, Object> courseType() {
return null;
}
@Override
public TKzyCourse selectByPrimaryKey(Long courseId) {
TKzyCourse tKzyCourse = null;
if (courseId != null && courseId > 0l) {
tKzyCourse = tKzyCourseMapper.selectByPrimaryKey(courseId);
}
return tKzyCourse;
}
@Autowired
private JedisPool jedisPool;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public static String formateCourseDate(Date date) {
DateFormat yearFormat = new SimpleDateFormat("YYYY年MM月dd日");
DateFormat timeFormat = new SimpleDateFormat("HH:mm");
String courseDate = yearFormat.format(date);
String courseTime = timeFormat.format(date);
return courseDate + " " + getWeekOfDate(date) + " " + courseTime;
}
/**
* 获取当前日期是星期几<br>
*
* @param dt
* @return 当前日期是星期几
*/
public static String getWeekOfDate(Date dt) {
String[] weekDays = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
Calendar cal = Calendar.getInstance();
cal.setTime(dt);
int w = cal.get(Calendar.DAY_OF_WEEK) - 1;
if (w < 0)
w = 0;
return weekDays[w];
}
public static double getWith(Font font, String str) {
FontRenderContext frc = new FontRenderContext(new AffineTransform(), true, true);
Rectangle rec = font.getStringBounds(str, frc).getBounds();
return rec.getWidth();
}
}
package com.server.web.common.service.Impl;
import com.server.utils.DateUtils;
import com.server.utils.ResultMapUtil;
import com.server.web.common.mapper.TKzyUserIntegralFlowingMapper;
import com.server.web.common.mapper.TKzyUserMapper;
import com.server.web.common.mapping.IntegralMapper;
import com.server.web.common.model.TKzyUser;
import com.server.web.common.model.TKzyUserIntegralFlowing;
import com.server.web.common.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* Created by 豆腐干Sama on 2018/12/6.
*/
@Service
public class UserServiceImpl implements UserService {
@Autowired
private TKzyUserMapper tKzyUserMapper;
@Autowired
private TKzyUserIntegralFlowingMapper tKzyUserIntegralFlowingMapper;
@Autowired
private IntegralMapper integralMapper;
@Override
public void save(TKzyUser user) {
}
public static void main(String[] args) {
Date last = DateUtils.firstDayOfMonth();
System.out.println(last);
}
@Override
public Map signIn(TKzyUser loginUser) {
if (loginUser == null || loginUser.getId() == null) {
return ResultMapUtil.returnMap("0", "请先登录!", null);
}
loginUser = tKzyUserMapper.selectByPrimaryKey(loginUser.getId());
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
if (loginUser.getLastSignDt() != null && simpleDateFormat.format(loginUser.getLastSignDt()).equals(simpleDateFormat.format(new Date()))) {
return ResultMapUtil.returnMap("0", "您已签到!", null);
}
TKzyUserIntegralFlowing tKzyUserIntegralFlowing = new TKzyUserIntegralFlowing();
tKzyUserIntegralFlowing.setCreateDt(new Date());
tKzyUserIntegralFlowing.setSourceType(1);
tKzyUserIntegralFlowing.setType(1);
tKzyUserIntegralFlowing.setUserId(loginUser.getId());
if (loginUser.getIntegral() == null) {
loginUser.setIntegral(0);
}
if (loginUser.getSignInCount() == null) {
loginUser.setSignInCount(0);
}
String firstDay = simpleDateFormat.format(DateUtils.firstDayOfMonth());
Integer integral = 1;
if (firstDay.equals(simpleDateFormat.format(new Date()))) {
loginUser.setSignInCount(1);
tKzyUserIntegralFlowing.setIntegral(1);
} else {
//判断昨天是否签到,昨天未签到,签到哦连续天数置0;
Map<String, Object> param2 = new HashMap<String, Object>();
param2.put("userId", loginUser.getId());
param2.put("today", simpleDateFormat.format(org.apache.commons.lang.time.DateUtils.addDays(new Date(), -1)));
Map<String, Object> yestoday = integralMapper.queryDaySign(param2);
if (yestoday == null || yestoday.get("id") == null) {
loginUser.setSignInCount(0);
}
if (loginUser.getSignInCount() == 5) {
loginUser.setSignInCount(1);
integral = 1;
} else {
if (loginUser.getSignInCount() < 2) {
integral = 1;
} else if (loginUser.getSignInCount() == 2) {
integral = 3;
} else if (loginUser.getSignInCount() == 3) {
integral = 1;
} else if (loginUser.getSignInCount() == 4) {
integral = 5;
} else {
integral = 1;
}
loginUser.setSignInCount(loginUser.getSignInCount() + 1);
}
}
loginUser.setIntegral(loginUser.getIntegral() + integral);
tKzyUserIntegralFlowing.setIntegral(integral);
loginUser.setLastSignDt(new Date());
tKzyUserMapper.updateByPrimaryKeySelective(loginUser);
tKzyUserIntegralFlowingMapper.insertSelective(tKzyUserIntegralFlowing);
Map<String, Object> dataMap = new HashMap<>();
dataMap.put("integral", integral);
dataMap.put("signInCount", loginUser.getSignInCount());
return ResultMapUtil.returnMap("1", "操作成功!", dataMap);
}
@Override
public Map<String, Object> signInList(TKzyUser loginUser) {
//List<String> dayList = getDayListOfMonth();
loginUser = tKzyUserMapper.selectByPrimaryKey(loginUser.getId());
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM");
SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd");
Map<String, Object> param = new HashMap<String, Object>();
param.put("userId", loginUser.getId());
param.put("month", simpleDateFormat.format(new Date()));
List<Map<String, Object>> list = integralMapper.signInList(param);
List<String> hasSignDay = new ArrayList<>();
for (Map<String, Object> map : list) {
String dd = (String) map.get("days");
String[] _D = dd.split("/");
String ymd = _D[0] + "/" + (_D[1].startsWith("0") ? (_D[1].substring(1, _D[1].length())) : _D[1]) + "/" + (_D[2].startsWith("0") ? (_D[2].substring(0, _D[2].length())) : _D[2]);
hasSignDay.add(ymd);
}
Map<String, Object> param2 = new HashMap<String, Object>();
param2.put("userId", loginUser.getId());
param2.put("today", simpleDateFormat2.format(new Date()));
Map<String, Object> todaySign = integralMapper.queryDaySign(param2);
Map<String, Object> dataMap = new HashMap<>();
dataMap.put("list", list);
dataMap.put("todaySign", todaySign);
dataMap.put("daysList", hasSignDay);
dataMap.put("integral", loginUser.getIntegral());
return ResultMapUtil.returnMap("1", "", dataMap);
}
}
package com.server.web.common.service;
import java.util.Map;
/**
* Created by weiwenfu@163.com on 2018/12/12 下午 3:05.
*/
public interface IndexService {
Map<String,Object> banner();
Map<String,Object> categoryList();
Map<String,Object> categoryDetail();
Map<String,Object> livingCourseToday();
}
package com.server.web.common.service;
import java.util.Map;
/**
* Created by weiwenfu@163.com on 2020/3/12 下午 4:53.
*/
public interface InformationService {
Map<String, Object> secondClassList(Long firstId);
Map<String, Object> secondClassDetail(Long secondId, Integer pageNo, Integer pageSize);
Map<String, Object> informationDetail(Long informationId);
Map<String, Object> informationCommentList(Long informationId, Integer pageNo, Integer pageSize);
Map<String, Object> informationComment(Long informationId, Long userId, String comment);
}
package com.server.web.common.service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* Created by yinbin on 2018/1/15.
*/
public interface OpenSqlRingsService {
Object selectOne_Rings(String statement, Map<String, Object> params);
ArrayList<Object> selectList_Rings(String statement, Map<String, Object> params);
@Transactional
void insert_Rings(String statement, Map<String, Object> params);
@Transactional
void delete_Rings(String statement, Map<String, Object> params);
@Transactional
void update_Rings(String statement, Map<String, Object> params);
@Transactional
void insert_batch_Rings(String statement, List<Map<String, Object>> params);
void insert_batch11_Rings(String statement, List<Map<String, Object>> params, int per);
}
package com.server.web.common.service;
import com.server.web.common.model.TKzyCourse;
import java.util.Map;
/**
* Created by weiwenfu@163.com on 2018/12/5 下午 1:45.
*/
public interface TKzyCourseService {
Map<String,Object> hotCourse();
Map<String,Object> livingCourse();
Map<String,Object> recordCourse(Long typeId,Integer pageNo, Integer pageSize);
Map<String,Object> livingCourseDetail(Long courseId,Long userId);
Map<String,Object> recordCourseDetail(Long courseId,Long userId);
Map<String,Object> commentList(Long courseId,Integer pageNo, Integer pageSize);
Map<String,Object> comment(Long courseId, Long userId, String comment);
Map<String,Object> courseType();
TKzyCourse selectByPrimaryKey(Long courseId);
}
package com.server.web.common.service;
import com.server.web.common.model.TKzyUser;
import java.util.Map;
/**
* Created by 豆腐干Sama on 2018/12/6.
*/
public interface UserService {
void save(TKzyUser user);
Map<String, Object> signIn(TKzyUser loginUser);
Map<String, Object> signInList(TKzyUser loginUser);
}
package com.server.web.controller;
import com.server.utils.weixin.WeixinBaseUtil;
import com.server.utils.weixin.bean.AccessTokenBean;
import com.server.web.common.mapper.TKzyUserMapper;
import com.server.web.common.model.TKzyUser;
import com.server.web.common.model.TKzyUserExample;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.client.RestTemplate;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* Created by dell on 2018/8/27.
*/
public class BaseController {
public final static String WX_NAMESPACE = "/rest";
@Autowired
RedisTemplate redisTemplate;
@Autowired
TKzyUserMapper userMapper;
Logger logger = LoggerFactory.getLogger(getClass());
public final static String WX_USER_SESSION_KEY = "weixin_user_session_key";
/**
* 获取appaccessToken
* @param appId
* @return
*/
public String getAccessToken(String appId,String appSecret){
if(StringUtils.hasText(appSecret)){
String json ="";
boolean redisAccessToken = true;
if(redisTemplate.hasKey("wx_accessToken_"+appId)){
json = (String)redisTemplate.opsForValue().get("wx_accessToken_"+appId);
if(StringUtils.hasText(json)){
redisAccessToken =false;
}
}
if(redisAccessToken){
String url = WeixinBaseUtil.ACCESS_TOKEN_URL + "&appid=" + appId + "&secret=" + appSecret;
RestTemplate restTemplate = new RestTemplate();
json = restTemplate.getForObject(url, String.class);
redisTemplate.opsForValue().set("wx_accessToken_"+appId,json,60*60, TimeUnit.SECONDS);
}
AccessTokenBean accessTokenBean = new AccessTokenBean(json);
return accessTokenBean.getAccessToken();
}else{
return null;
}
}
public Map<String,Object> returnSuccess(Object obj){
Map<String,Object> returnResult = new HashMap<String,Object>();
returnResult.put("status", "1");
returnResult.put("message","操作成功");
returnResult.put("data",obj);
return returnResult;
}
public Map<String,Object> returnError(String code, String message ,Object obj){
Map<String,Object> returnResult = new HashMap<String,Object>();
returnResult.put("status", code);
returnResult.put("message",message);
returnResult.put("data",obj);
return returnResult;
}
public TKzyUser getLoginUser(HttpServletRequest request){
TKzyUser user;
if(request.getSession().getAttribute(WX_USER_SESSION_KEY)!=null){
user = (TKzyUser)request.getSession().getAttribute(WX_USER_SESSION_KEY);
return user;
}
String userId = request.getParameter("userId");
String wxOpenId = request.getParameter("wxOpenId");
if(StringUtils.isEmpty(userId) || StringUtils.isEmpty(wxOpenId)){
return null;
}
TKzyUserExample example = new TKzyUserExample();
example.createCriteria().andWxOpenidEqualTo(wxOpenId).andIdEqualTo(Long.parseLong(userId));
List<TKzyUser> users = userMapper.selectByExample(example);
if (CollectionUtils.isEmpty(users)) {
return null;
}
user = users.get(0);
request.getSession().setAttribute(WX_USER_SESSION_KEY,user);
return user;
}
}
package com.server.web.controller;
import com.server.web.common.mapper.TKzyUserMapper;
import com.server.web.common.model.TKzyUser;
import com.server.web.common.service.TKzyCourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
/**
* 课程相关action
* Created by weiwenfu@163.com on 2018/12/5 上午 11:56.
*/
@SpringBootApplication
@RestController
@RequestMapping(BaseController.WX_NAMESPACE + "/course")
@ControllerAdvice
public class CourseController extends BaseController {
@Autowired
private TKzyCourseService tKzyCourseService;
@Autowired
private TKzyUserMapper tKzyUserMapper;
@Autowired
private RedisTemplate redisTemplate;
@Autowired
private RestTemplate restTemplate;
@Value("${wx.http.danmu.url}")
private String danmuUrl;
/**
* 热门课程
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/hotCourse", method = {RequestMethod.POST,RequestMethod.GET},produces = "application/json")
public Map<String, Object> hotCourse() {
return tKzyCourseService.hotCourse();
}
/**
* 录播课列表
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/recordCourse", method = {RequestMethod.POST,RequestMethod.GET},produces = "application/json")
public Map<String, Object> recordCourse(@RequestParam(value = "typeId", required = false) Long typeId, @RequestParam(value = "pageNo", required = false) Integer pageNo, @RequestParam(value = "pageSize", required = false) Integer pageSize) {
return tKzyCourseService.recordCourse(typeId, pageNo, pageSize);
}
/**
* 直播课列表(全查)
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/livingCourse", method = {RequestMethod.POST,RequestMethod.GET},produces = "application/json")
public Map<String, Object> livingCourse() {
return tKzyCourseService.livingCourse();
}
/**
* 直播课详情页
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/livingCourseDetail", method = {RequestMethod.POST,RequestMethod.GET},produces = "application/json")
public Map<String, Object> livingCourseDetail(HttpServletRequest request, @RequestParam(value = "courseId", required = true) Long courseId) {
TKzyUser tKzyUser = getLoginUser(request);
Long userId = null;
if (tKzyUser != null) {
userId = tKzyUser.getId();
}
return tKzyCourseService.livingCourseDetail(courseId, userId);
}
/**
* 录播课详情页
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/recordCourseDetail", method = {RequestMethod.POST,RequestMethod.GET},produces = "application/json")
public Map<String, Object> recordCourseDetail(HttpServletRequest request, @RequestParam(value = "courseId", required = true) Long courseId) {
TKzyUser tKzyUser = getLoginUser(request);
Long userId = null;
if (tKzyUser != null) {
userId = tKzyUser.getId();
}
return tKzyCourseService.recordCourseDetail(courseId, userId);
}
/**
* 评论列表
*
* @param courseId
* @return
*/
@ResponseBody
@RequestMapping(value = "/commentList", method = {RequestMethod.POST,RequestMethod.GET},produces = "application/json")
public Map<String, Object> commentList(@RequestParam(value = "courseId") Long courseId, @RequestParam(value = "pageNo", required = false) Integer pageNo, @RequestParam(value = "pageSize", required = false) Integer pageSize) {
return tKzyCourseService.commentList(courseId, pageNo, pageSize);
}
/**
* 提交评论
*
* @param courseId
* @param comment
* @return
*/
@ResponseBody
@RequestMapping(value = "/comment", method = {RequestMethod.POST,RequestMethod.GET},produces = "application/json")
public Map<String, Object> comment(HttpServletRequest request, @RequestParam(value = "courseId") Long courseId, @RequestParam(value = "comment") String comment) {
TKzyUser tKzyUser = getLoginUser(request);
Long userId = null;
if (tKzyUser != null) {
userId = tKzyUser.getId();
}
return tKzyCourseService.comment(courseId, userId, comment);
}
/**
* 临时设置登录信息
*
* @param request
* @param userId
* @return
*/
@ResponseBody
@RequestMapping(value = "/tmpSetSession", method = {RequestMethod.POST,RequestMethod.GET},produces = "application/json")
public Map<String, Object> tmpSetSession(HttpServletRequest request, @RequestParam(value = "userId", required = true) Long userId) {
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("status", "0");
resultMap.put("message", "");
if (userId == null || userId <= 0l) {
resultMap.put("message", "用户ID不能为空~");
return resultMap;
}
TKzyUser tKzyUser = tKzyUserMapper.selectByPrimaryKey(userId);
if (tKzyUser != null) {
request.getSession().setAttribute(WX_USER_SESSION_KEY, tKzyUser);
resultMap.put("message", "操作成功~");
return resultMap;
} else {
resultMap.put("message", "未查到该用户信息~");
return resultMap;
}
}
}
package com.server.web.controller;
import com.server.web.common.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
/**
* 首页相关
* Created by weiwenfu@163.com on 2018/12/12 下午 3:03.
*/
@RestController
@RequestMapping(value = BaseController.WX_NAMESPACE + "/index", produces = "application/json")
public class IndexController {
@Autowired
private IndexService indexService;
/**
* banner
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/banner", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> banner() {
return indexService.banner();
}
/**
* 首页分类
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/categoryList", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> categoryList() {
return indexService.categoryList();
}
/**
* 首页分类-两条数据
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/categoryDetail", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> categoryDetail() {
return indexService.categoryDetail();
}
/**
* 首页直播课
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/livingCourseToday", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> livingCourseToday() {
return indexService.livingCourseToday();
}
}
package com.server.web.controller;
import com.server.web.common.model.TKzyUser;
import com.server.web.common.service.InformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
/**
* Created by weiwenfu@163.com on 2020/3/12 下午 4:53.
*/
@RestController
@RequestMapping(value = BaseController.WX_NAMESPACE + "/information", produces = "application/json")
public class InformationController extends BaseController {
@Autowired
private InformationService informationService;
/**
* 二级分类
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/secondClassList", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> secondClassList(HttpServletRequest request, @RequestParam(value = "firstId") Long firstId) {
return informationService.secondClassList(firstId);
}
/**
* 二级分类详情
*
* @return
*/
@ResponseBody
@RequestMapping(value = "/secondClassDetail", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> secondClassDetail(HttpServletRequest request, @RequestParam(value = "secondId") Long secondId,
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageSize") Integer pageSize) {
return informationService.secondClassDetail(secondId, pageNo, pageSize);
}
/**
* 资讯详情
*
* @param request
* @param informationId
* @return
*/
@ResponseBody
@RequestMapping(value = "/informationDetail", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> informationDetail(HttpServletRequest request, @RequestParam(value = "informationId") Long informationId) {
return informationService.informationDetail(informationId);
}
/**
* 资讯评论列表
*
* @param request
* @param informationId
* @param pageNo
* @param pageSize
* @return
*/
@ResponseBody
@RequestMapping(value = "/informationCommentList", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> informationCommentList(HttpServletRequest request, @RequestParam(value = "informationId") Long informationId,
@RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageSize") Integer pageSize) {
return informationService.informationCommentList(informationId, pageNo, pageSize);
}
/**
* 资讯提交评论
*
* @param informationId
* @param comment
* @return
*/
@ResponseBody
@RequestMapping(value = "/informationComment", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> informationComment(HttpServletRequest request, @RequestParam(value = "informationId") Long informationId, @RequestParam(value = "comment") String comment) {
TKzyUser tKzyUser = getLoginUser(request);
Long userId = null;
if (tKzyUser != null) {
userId = tKzyUser.getId();
}
return informationService.informationComment(informationId, userId, comment);
}
}
package com.server.web.controller;
import com.server.utils.ResultMapUtil;
import com.server.utils.SendSMSUtil;
import com.server.utils.VerifyCodeUtils;
import com.server.web.common.mapper.TKzyUserMapper;
import com.server.web.common.model.TKzyUser;
import com.server.web.common.model.TKzyUserExample;
import com.server.web.common.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;
import java.util.concurrent.TimeUnit;
/**
* Created by 豆腐干Sama on 2018/12/6.
*/
@RestController
@RequestMapping(value = BaseController.WX_NAMESPACE + "/user", produces = "application/json")
public class UserController extends BaseController {
@Autowired
UserService userService;
@Autowired
private TKzyUserMapper tKzyUserMapper;
@ResponseBody
@RequestMapping(value = "/userData", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map userData(HttpServletRequest request) {
TKzyUser loginUser = getLoginUser(request);
if (loginUser != null && loginUser.getId() != null) {
loginUser = tKzyUserMapper.selectByPrimaryKey(loginUser.getId());
}
return returnSuccess(loginUser);
}
@ResponseBody
@RequestMapping(value = "/register", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map register(HttpServletRequest request) {
TKzyUser user = getLoginUser(request);
String phone = request.getParameter("phone");
String verifyCode = request.getParameter("verifyCode");
String wxOpenId = request.getParameter("wxOpenId");
String fullName = request.getParameter("fullName");
String userCategory = request.getParameter("userCategory");
if (phone == null || !phone.matches("^((1[3-9]))\\d{9}$")) {
return returnError("0", "请输入有效的手机号码", null);
}
if (verifyCode == null) {
return returnError("0", "请输入有效的验证码!", null);
}
if (user == null) {
return returnError("0", "请先授权!", null);
}
ValueOperations operations = redisTemplate.opsForValue();
String cacheCode = (String) operations.get("Kzy_WX_LOGIN_SMS_PHONE_" + phone);
if (StringUtils.isEmpty(cacheCode) || !cacheCode.equals(verifyCode)) {
return returnError("0", "短信验证码有误,或已失效!", null);
} else {
redisTemplate.delete("Kzy_WX_LOGIN_SMS_PHONE_" + phone);
}
TKzyUserExample example = new TKzyUserExample();
example.createCriteria().andPhoneEqualTo(phone);
List<TKzyUser> users = userMapper.selectByExample(example);
if (!CollectionUtils.isEmpty(users)) {
TKzyUser user1 = users.get(0);
if (!StringUtils.isEmpty(user1.getWxOpenid()) && !wxOpenId.equals(user1.getWxOpenid())) {
return returnError("0", "该手机号已绑定其他微信", null);
}
}
user.setWxOpenid(wxOpenId);
user.setCreateDt(new Date());
user.setUserCategory(userCategory == null ? null : Integer.valueOf(userCategory));
user.setFullName(fullName);
user.setPhone(phone);
user.setStatus(1);
user.setIntegral(0);
user.setLastLoginDt(new Date());
userMapper.insertSelective(user);
request.getSession().setAttribute(WX_USER_SESSION_KEY, user);
return returnSuccess(user);
}
@ResponseBody
@RequestMapping(value = "/update", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map update(HttpServletRequest request) {
TKzyUser loginUser = getLoginUser(request);
if (loginUser == null) {
return returnError("0", "用户未登录", null);
}
loginUser = tKzyUserMapper.selectByPrimaryKey(loginUser.getId());
String wxOpenId = request.getParameter("wxOpenId");
String fullName = request.getParameter("fullName");
String userCategory = request.getParameter("userCategory");
String duty = request.getParameter("duty");
loginUser.setWxOpenid(wxOpenId);
loginUser.setUserCategory(Integer.valueOf(userCategory));
loginUser.setFullName(fullName);
loginUser.setDuty(duty);
userMapper.updateByPrimaryKeySelective(loginUser);
request.getSession().setAttribute(WX_USER_SESSION_KEY, loginUser);
return returnSuccess(loginUser);
}
/**
* 发送短信
*
* @param request
* @return
*/
@ResponseBody
@RequestMapping(path = "/sendMessageCode", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> sendMessageCode(HttpServletRequest request) {
Map<String, Object> resultMap = new HashMap<String, Object>();
resultMap.put("status", "0");
resultMap.put("message", "");
String imgVerifyCode = request.getParameter("imgVerifyCode");
String phone = request.getParameter("phone");
String failPhone = request.getSession().getAttribute("fail_" + phone) == null ? null : request.getSession().getAttribute("fail_" + phone).toString();
int count = 0;
if (failPhone != null && org.apache.commons.lang.math.NumberUtils.isNumber(failPhone)) {
count = Integer.valueOf(failPhone);
}
if (phone == null || !phone.matches("^((1[3-9]))\\d{9}$")) {
resultMap.put("message", "请输入有效的手机号码!");
request.getSession().setAttribute("fail_" + phone, count + 1);
if (count + 1 >= 3) {
resultMap.put("imgFlag", "1");
}
return resultMap;
}
ValueOperations vv = redisTemplate.opsForValue();
if (imgVerifyCode != null && !"".equals(imgVerifyCode)) {
String redisImageCode = (String) vv.get("Kzy_IMAGE_CODE_" + phone);
if (redisImageCode == null || !redisImageCode.toUpperCase().equals(imgVerifyCode.toUpperCase())) {
resultMap.put("message", "请输入正确的图形验证码!");
return resultMap;
} else {
redisTemplate.delete("Kzy_IMAGE_CODE_" + phone);
}
}
if (vv.get("Kzy_WX_LOGIN_SMS_PHONE_FLAG_" + phone) != null) {//缓存标识,缓存里存在,表示还在有效期内,不重复发送
resultMap.put("message", "您发送的短信验证码尚在有效期,无需重复发送");
request.getSession().setAttribute("fail_" + phone, count + 1);
if (count + 1 >= 3) {
resultMap.put("imgFlag", "1");
}
return resultMap;
}
String randomCode = getRandomStringByLength(4);
try {
boolean sendFlag = sendSmsCode(phone, "46886", randomCode);
if (sendFlag) {
logger.error("短信验证码发送成功");
vv.set("Kzy_WX_LOGIN_SMS_PHONE_" + phone, randomCode, 5, TimeUnit.MINUTES);//缓存验证码,验证成功之后再手动销毁
//测试用,上线去掉
System.out.println(phone + "999微信注册登录验证码为:" + randomCode);
resultMap.put("data", randomCode);// FIXME: WWF 2020/3/13上线前去掉验证码
resultMap.put("status", "1");
resultMap.put("message", "发送成功~");
} else {
resultMap.put("message", "短信验证码发送失败");
}
} catch (Exception e) {
resultMap.put("message", "发送短信验证码服务异常");
}
return resultMap;
}
public static String getRandomStringByLength(int length) {
String base = "0123456789";
Random random = new Random();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < length; i++) {
int number = random.nextInt(base.length());
sb.append(base.charAt(number));
}
return sb.toString();
}
@RequestMapping(value = "/verifyImgCode", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public void verifyImgCode(HttpServletRequest request, HttpServletResponse response) {
response.setHeader("Access-Control-Allow-Origin", "*");
response.setHeader("Access-Control-Allow-Methods", "POST,GET,OPTIONS,DELETE");
response.setHeader("Access-Control-Max-Age", "1728000");
response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
try {
String verifyImgCode = generateVerifyCode(5);
response.setContentType("image/jpeg");
response.setDateHeader("expries", -1);
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
VerifyCodeUtils.outputImagePC(100, 40, response.getOutputStream(), verifyImgCode);
// request.getSession().setAttribute("WEIXIN_USER_IMAGE_CODE_SESSION",verifyImgCode);
ValueOperations vv = redisTemplate.opsForValue();
String phone = request.getParameter("phone");
if (!StringUtils.isEmpty(phone)) {
logger.error("获取图形验证码手机号:" + phone);
vv.set("Kzy_IMAGE_CODE_" + phone, verifyImgCode, 1, TimeUnit.MINUTES);
}
} catch (IOException e) {
e.printStackTrace();
logger.error("生成验证码失败", e);
}
}
/**
* 签到
*
* @param request
* @return
*/
@ResponseBody
@RequestMapping(value = "/signIn", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> signIn(HttpServletRequest request) {
TKzyUser loginUser = getLoginUser(request);
if (loginUser == null || loginUser.getId() == null) {
return ResultMapUtil.returnMap("0", "请先登录!", null);
}
if (loginUser != null && loginUser.getId() != null) {
loginUser = tKzyUserMapper.selectByPrimaryKey(loginUser.getId());
}
//更新缓存用户信息(主要积分金额)
request.getSession().setAttribute(WX_USER_SESSION_KEY, loginUser);
return userService.signIn(loginUser);
}
/**
* 签到日历
*
* @param request
* @return
*/
@ResponseBody
@RequestMapping(value = "/signInList", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String, Object> signInList(HttpServletRequest request) {
TKzyUser loginUser = getLoginUser(request);
if (loginUser == null || loginUser.getId() == null) {
return ResultMapUtil.returnMap("0", "请先登录!", null);
}
return userService.signInList(loginUser);
}
public static String generateVerifyCode(int verifySize) {
String sources = "ABCDEFGHJKMNPQRSTUVWXYZ2345689";
int codesLen = sources.length();
Random rand = new Random(System.currentTimeMillis());
StringBuilder verifyCode = new StringBuilder(verifySize);
for (int i = 0; i < verifySize; i++) {
verifyCode.append(sources.charAt(rand.nextInt(codesLen - 1)));
}
return verifyCode.toString();
}
public boolean sendSmsCode(String phone, String templateId, String code) throws Exception {
if (StringUtils.hasText(phone) && StringUtils.hasText(templateId) && StringUtils.hasText(code)) {
HashMap<String, Object> smsResult = SendSMSUtil.sendTemplateSMS(phone, templateId, new String[]{code});
logger.error("/sendSmsCode =============>sendSmsCode-smsResult=" + smsResult);
if ("000000".equals(smsResult.get("statusCode"))) {
return true;
} else {
return false;
}
} else {
return false;
}
}
}
package com.server.web.controller;
import com.server.utils.SHA1;
import com.server.utils.weixin.WXMessageType;
import com.server.utils.weixin.WeixinBaseUtil;
import com.server.web.common.mapper.TKzyUserMapper;
import com.server.web.common.model.TKzyUser;
import com.server.web.common.model.TKzyUserExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import static com.jfinal.weixin.sdk.kit.PaymentKit.xmlToMap;
/**
* Created by 豆腐干Sama on 2018/12/5.
*/
@RestController
@RequestMapping(value = BaseController.WX_NAMESPACE + "/wxIndex",produces = "application/json")
public class WeixinIndexController extends BaseController{
@Value("${wx.app.secret}")
private String appSecret;
@Value("${wx.app.id}")
private String appId;
@Value("${wx.tocken}")
private String wxTocken;
@Autowired
private TKzyUserMapper userMapper;
@RequestMapping(value = "/authorizeCallback",method = {RequestMethod.GET,RequestMethod.POST})
public void authorizeCallback(HttpServletRequest request, HttpServletResponse response) {
try {
String code = request.getParameter("code");// 授权码
String redirectUri = request.getParameter("redirectUri");// redirectUri参数,验证成功跳转
WeixinBaseUtil weixinBaseUtil = new WeixinBaseUtil();
logger.error("授权回调参数:code " + code + " appId " + appId + " appSecret:" + appSecret);
Map<String, Object> _AuthMap = weixinBaseUtil.authorization(appId, appSecret, code);
if (_AuthMap == null) {
response.sendRedirect(redirectUri);
return;
}
String openId = (String)_AuthMap.get("openid");
String nickname = (String) _AuthMap.get("nickname");
String headimgurl = (String) _AuthMap.get("headimgurl");
logger.error("nickname:" + nickname + "");
TKzyUser user;
TKzyUserExample example = new TKzyUserExample();
example.createCriteria().andWxOpenidEqualTo(openId);
List<TKzyUser> users = userMapper.selectByExample(example);
if (CollectionUtils.isEmpty(users)) {
user = new TKzyUser();
user.setHeadPhoto(headimgurl);
user.setFullName(nickname);
user.setWxOpenid(openId);
} else {
user = users.get(0);
user.setLastLoginDt(new Date());
if (StringUtils.isEmpty(user.getFullName())) {
user.setFullName(nickname);
}
if (StringUtils.isEmpty(user.getHeadPhoto())) {
user.setHeadPhoto(headimgurl);
}
userMapper.updateByPrimaryKeySelective(user);
}
request.getSession().setAttribute(WX_USER_SESSION_KEY,user);
logger.error("user.getNickName:" + user.getFullName());
response.sendRedirect(redirectUri);
} catch (Exception e) {
e.printStackTrace();
}
}
public Map<String,Object> getAccessToken() {
String accessToken = getAccessToken(appId, appSecret);
if (StringUtils.hasText(accessToken)) {
return returnSuccess(accessToken);
} else {
return returnError("0","获取access_toke失败",null);
}
}
public void textWrite(String text,HttpServletResponse response) {
response.setContentType("text/html; charset=UTF-8");
try {
response.getWriter().write(text);
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* 处理接受参数
* @param request
* @return
*/
public static String readRequestStr(HttpServletRequest request) {
BufferedReader reader = null;
StringBuilder sb = new StringBuilder();
try {
reader = new BufferedReader(new InputStreamReader(request.getInputStream(), "utf-8"));
String line = null;
while ((line = reader.readLine()) != null) {
sb.append(line);
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (null != reader) {
reader.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
return sb.toString();
}
@RequestMapping(value = "/callback", method = {RequestMethod.POST, RequestMethod.GET})
public void callback(HttpServletRequest request, HttpServletResponse response){
try{
String signature = request.getParameter("signature");
String nonce = request.getParameter("nonce");
String echostr = request.getParameter("echostr");
String timestamp = request.getParameter("timestamp");
boolean isPass =checkSignature(signature, timestamp, nonce);
if (!isPass) {
logger.error("isPass 验证错误!!");
return;
} else if (StringUtils.hasText(echostr)) {
textWrite(echostr,response);
return;
}
String xmlStr =readRequestStr(request);
Map<String, String> map = xmlToMap(xmlStr);
if (map == null) {
logger.error("callback-map is null !!");
}else{
String msgType = map.get("MsgType");
String content ="";
if (WXMessageType.event.toString().equals(msgType)) {//点击事件
// FIXME: 2018/12/5
}else if(WXMessageType.text.toString().equals(msgType)){//关键字回复
// FIXME: 2018/12/5
}
String openId = map.get("ToUserName");
String wx_id = map.get("FromUserName");
if(content!=null&&!"".equals(content.trim())){
textWrite(getWxStringMsg(openId,wx_id, content),response);
}
}
}catch (Exception e){
e.printStackTrace();
}
}
@ResponseBody
@RequestMapping(value = "/jsApiSignature", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map<String,Object> jsApiSignature(HttpServletRequest request) throws Exception{
try{
String urlTicket = request.getParameter("url");
if(StringUtils.hasText(urlTicket)){
Map<String, Object> signature = jsApiSignature(urlTicket);
if(signature!=null) {
return returnSuccess(signature);
}
}else{
return returnError("0","参数url缺失",null);
}
}catch (Exception e){
e.printStackTrace();
return returnError("0","服务器异常",null);
}
return returnError("0","获取签名失败","");
}
public boolean checkSignature(String signature,String timestamp,String nonce) {
String[] str = new String[]{wxTocken, timestamp, nonce};
//排序
Arrays.sort(str);
//拼接字符串
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < str.length; i++) {
buffer.append(str[i]);
}
//进行sha1加密
String temp = SHA1.encode(buffer.toString());
//与微信提供的signature进行匹对
return signature.equals(temp);
}
public String getWxStringMsg(String fromUserName, String toUserName, String content) {
String msg = "<xml><ToUserName><![CDATA[%s]]></ToUserName><FromUserName><![CDATA[%s]]></FromUserName><CreateTime>%s</CreateTime><MsgType><![CDATA[%s]]></MsgType><Content><![CDATA[%s]]></Content></xml>";
return String.format(msg, new String[]{toUserName, fromUserName, Long.valueOf(System.currentTimeMillis() / 1000).toString(), "text", content});
}
public Map<String,Object> jsApiSignature(String url) throws Exception{
if(StringUtils.hasText(appId)&&StringUtils.hasText(appId)&&StringUtils.hasText(url)){
String jsapi_ticket =WeixinBaseUtil.getTicket(appId,getAccessToken(appId,appSecret),url,redisTemplate);
Map<String, Object> sign = WeixinBaseUtil.sign(jsapi_ticket, url, appId);
return sign;
}else{
return null;
}
}
}
package com.server.web.interceptor;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Created by yinbin on 2018/1/9.
*/
@Component
public class InterceptorLocal implements HandlerInterceptor {
final static Logger logger = LogManager.getLogger(InterceptorLocal.class);
@Override
public boolean preHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o) throws Exception {
logger.debug("preHandle");
return true;
}
@Override
public void postHandle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, ModelAndView modelAndView) throws Exception {
logger.debug("postHandle");
}
@Override
public void afterCompletion(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Object o, Exception e) throws Exception {
logger.debug("afterCompletion");
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!--导入属性配置 -->
<properties resource="mbg/generator.properties"></properties>
<!--指定特定数据库的jdbc驱动jar包的位置 -->
<classPathEntry location="C:\mysql-connector-java-5.1.44.jar"/>
<context id="default" targetRuntime="MyBatis3">
<!-- optional,旨在创建class时,对注释进行控制 -->
<commentGenerator>
<property name="suppressDate" value="true"/>
<property name="suppressAllComments" value="true" />
</commentGenerator>
<!--jdbc的数据库连接 -->
<jdbcConnection driverClass="${jdbc.driverClass}" connectionURL="${jdbc.url}" userId="${jdbc.userId}"
password="${jdbc.password}">
</jdbcConnection>
<!-- 非必需,类型处理器,在数据库类型和java类型之间的转换控制-->
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- Model模型生成器,用来生成含有主键key的类,记录类 以及查询Example类
targetPackage 指定生成的model生成所在的包名
targetProject 指定在该项目下所在的路径
-->
<javaModelGenerator targetPackage="com.server.web.common.model" targetProject="src/main/java">
<!-- 是否对model添加 构造函数 -->
<property name="constructorBased" value="true"/>
<!-- 是否允许子包,即targetPackage.schemaName.tableName -->
<property name="enableSubPackages" value="false"/>
<!-- 建立的Model对象是否 不可改变 即生成的Model对象不会有 setter方法,只有构造方法 -->
<property name="immutable" value="false"/>
<!-- 给Model添加一个父类 -->
<!--
<property name="rootClass" value="test.model.Person"/>
-->
<!-- 是否对类CHAR类型的列的数据进行trim操作 -->
<property name="trimStrings" value="true"/>
<property name="rootClass" value="com.server.web.common.model.BaseModel"/>
</javaModelGenerator>
<!--Mapper映射文件生成所在的目录 为每一个数据库的表生成对应的SqlMap文件 -->
<sqlMapGenerator targetPackage="mybatis.mapper" targetProject="src/main/resources">
<property name="enableSubPackages" value="false"/>
</sqlMapGenerator>
<!--
客户端代码,生成易于使用的针对Model对象和XML配置文件 的代码
type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象
type="MIXEDMAPPER",生成基于注解的Java Model 和相应的Mapper对象
type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口
-->
<javaClientGenerator targetPackage="com.server.web.common.mapper" targetProject="src/main/java" type="XMLMAPPER">
<property name="exampleMethodVisibility" value="public"/>
</javaClientGenerator>
<table tableName="t_base_banner" schema="sc"><generatedKey column="ID" sqlStatement="MySql" identity="true"/></table>
</context>
</generatorConfiguration>
\ No newline at end of file
jdbc.driverLocation=
jdbc.driverClass=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://39.97.246.118:3306/kzy_db_test?useUnicode=true&characterEncoding=utf-8
jdbc.userId=kzy_user
jdbc.password=Kzy2020#yY
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.server.web.common.mapper.TBaseBannerMapper">
<resultMap id="BaseResultMap" type="com.server.web.common.model.TBaseBanner">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="title" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="pic_url" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="weight" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="jump_type" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="jump_address" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="remark" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="is_delete" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="is_up" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
</constructor>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, title, pic_url, weight, jump_type, jump_address, remark, is_delete, is_up, create_dt
</sql>
<select id="selectByExample" parameterType="com.server.web.common.model.TBaseBannerExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_base_banner
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_base_banner
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_base_banner
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.server.web.common.model.TBaseBannerExample">
delete from t_base_banner
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.server.web.common.model.TBaseBanner">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_base_banner (title, pic_url, weight,
jump_type, jump_address, remark,
is_delete, is_up, create_dt
)
values (#{title,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR}, #{weight,jdbcType=INTEGER},
#{jumpType,jdbcType=INTEGER}, #{jumpAddress,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{isDelete,jdbcType=INTEGER}, #{isUp,jdbcType=INTEGER}, #{createDt,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.server.web.common.model.TBaseBanner">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_base_banner
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null">
title,
</if>
<if test="picUrl != null">
pic_url,
</if>
<if test="weight != null">
weight,
</if>
<if test="jumpType != null">
jump_type,
</if>
<if test="jumpAddress != null">
jump_address,
</if>
<if test="remark != null">
remark,
</if>
<if test="isDelete != null">
is_delete,
</if>
<if test="isUp != null">
is_up,
</if>
<if test="createDt != null">
create_dt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="picUrl != null">
#{picUrl,jdbcType=VARCHAR},
</if>
<if test="weight != null">
#{weight,jdbcType=INTEGER},
</if>
<if test="jumpType != null">
#{jumpType,jdbcType=INTEGER},
</if>
<if test="jumpAddress != null">
#{jumpAddress,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="isDelete != null">
#{isDelete,jdbcType=INTEGER},
</if>
<if test="isUp != null">
#{isUp,jdbcType=INTEGER},
</if>
<if test="createDt != null">
#{createDt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.server.web.common.model.TBaseBannerExample" resultType="java.lang.Long">
select count(*) from t_base_banner
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_base_banner
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.picUrl != null">
pic_url = #{record.picUrl,jdbcType=VARCHAR},
</if>
<if test="record.weight != null">
weight = #{record.weight,jdbcType=INTEGER},
</if>
<if test="record.jumpType != null">
jump_type = #{record.jumpType,jdbcType=INTEGER},
</if>
<if test="record.jumpAddress != null">
jump_address = #{record.jumpAddress,jdbcType=VARCHAR},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.isDelete != null">
is_delete = #{record.isDelete,jdbcType=INTEGER},
</if>
<if test="record.isUp != null">
is_up = #{record.isUp,jdbcType=INTEGER},
</if>
<if test="record.createDt != null">
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_base_banner
set id = #{record.id,jdbcType=BIGINT},
title = #{record.title,jdbcType=VARCHAR},
pic_url = #{record.picUrl,jdbcType=VARCHAR},
weight = #{record.weight,jdbcType=INTEGER},
jump_type = #{record.jumpType,jdbcType=INTEGER},
jump_address = #{record.jumpAddress,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
is_delete = #{record.isDelete,jdbcType=INTEGER},
is_up = #{record.isUp,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.server.web.common.model.TBaseBanner">
update t_base_banner
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="picUrl != null">
pic_url = #{picUrl,jdbcType=VARCHAR},
</if>
<if test="weight != null">
weight = #{weight,jdbcType=INTEGER},
</if>
<if test="jumpType != null">
jump_type = #{jumpType,jdbcType=INTEGER},
</if>
<if test="jumpAddress != null">
jump_address = #{jumpAddress,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="isDelete != null">
is_delete = #{isDelete,jdbcType=INTEGER},
</if>
<if test="isUp != null">
is_up = #{isUp,jdbcType=INTEGER},
</if>
<if test="createDt != null">
create_dt = #{createDt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TBaseBanner">
update t_base_banner
set title = #{title,jdbcType=VARCHAR},
pic_url = #{picUrl,jdbcType=VARCHAR},
weight = #{weight,jdbcType=INTEGER},
jump_type = #{jumpType,jdbcType=INTEGER},
jump_address = #{jumpAddress,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=INTEGER},
is_up = #{isUp,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.server.web.common.mapper.TBaseFirstClassMapper">
<resultMap id="BaseResultMap" type="com.server.web.common.model.TBaseFirstClass">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="class_name" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="status" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="pic_url" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="weight" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
</constructor>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, class_name, status, pic_url, weight, create_dt
</sql>
<select id="selectByExample" parameterType="com.server.web.common.model.TBaseFirstClassExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_base_first_class
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_base_first_class
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_base_first_class
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.server.web.common.model.TBaseFirstClassExample">
delete from t_base_first_class
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.server.web.common.model.TBaseFirstClass">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_base_first_class (class_name, status, pic_url,
weight, create_dt)
values (#{className,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{picUrl,jdbcType=VARCHAR},
#{weight,jdbcType=INTEGER}, #{createDt,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.server.web.common.model.TBaseFirstClass">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_base_first_class
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="className != null">
class_name,
</if>
<if test="status != null">
status,
</if>
<if test="picUrl != null">
pic_url,
</if>
<if test="weight != null">
weight,
</if>
<if test="createDt != null">
create_dt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="className != null">
#{className,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="picUrl != null">
#{picUrl,jdbcType=VARCHAR},
</if>
<if test="weight != null">
#{weight,jdbcType=INTEGER},
</if>
<if test="createDt != null">
#{createDt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.server.web.common.model.TBaseFirstClassExample" resultType="java.lang.Long">
select count(*) from t_base_first_class
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_base_first_class
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.className != null">
class_name = #{record.className,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.picUrl != null">
pic_url = #{record.picUrl,jdbcType=VARCHAR},
</if>
<if test="record.weight != null">
weight = #{record.weight,jdbcType=INTEGER},
</if>
<if test="record.createDt != null">
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_base_first_class
set id = #{record.id,jdbcType=BIGINT},
class_name = #{record.className,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
pic_url = #{record.picUrl,jdbcType=VARCHAR},
weight = #{record.weight,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.server.web.common.model.TBaseFirstClass">
update t_base_first_class
<set>
<if test="className != null">
class_name = #{className,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="picUrl != null">
pic_url = #{picUrl,jdbcType=VARCHAR},
</if>
<if test="weight != null">
weight = #{weight,jdbcType=INTEGER},
</if>
<if test="createDt != null">
create_dt = #{createDt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TBaseFirstClass">
update t_base_first_class
set class_name = #{className,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
pic_url = #{picUrl,jdbcType=VARCHAR},
weight = #{weight,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.server.web.common.mapper.TBaseSecondClassMapper">
<resultMap id="BaseResultMap" type="com.server.web.common.model.TBaseSecondClass">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="class_name" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="status" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="type" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="pic_url" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="first_id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="weight" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
</constructor>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, class_name, status, type, pic_url, first_id, weight, create_dt
</sql>
<select id="selectByExample" parameterType="com.server.web.common.model.TBaseSecondClassExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_base_second_class
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_base_second_class
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_base_second_class
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.server.web.common.model.TBaseSecondClassExample">
delete from t_base_second_class
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.server.web.common.model.TBaseSecondClass">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_base_second_class (class_name, status, type,
pic_url, first_id, weight,
create_dt)
values (#{className,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
#{picUrl,jdbcType=VARCHAR}, #{firstId,jdbcType=BIGINT}, #{weight,jdbcType=INTEGER},
#{createDt,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.server.web.common.model.TBaseSecondClass">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_base_second_class
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="className != null">
class_name,
</if>
<if test="status != null">
status,
</if>
<if test="type != null">
type,
</if>
<if test="picUrl != null">
pic_url,
</if>
<if test="firstId != null">
first_id,
</if>
<if test="weight != null">
weight,
</if>
<if test="createDt != null">
create_dt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="className != null">
#{className,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="picUrl != null">
#{picUrl,jdbcType=VARCHAR},
</if>
<if test="firstId != null">
#{firstId,jdbcType=BIGINT},
</if>
<if test="weight != null">
#{weight,jdbcType=INTEGER},
</if>
<if test="createDt != null">
#{createDt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.server.web.common.model.TBaseSecondClassExample" resultType="java.lang.Long">
select count(*) from t_base_second_class
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_base_second_class
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.className != null">
class_name = #{record.className,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.picUrl != null">
pic_url = #{record.picUrl,jdbcType=VARCHAR},
</if>
<if test="record.firstId != null">
first_id = #{record.firstId,jdbcType=BIGINT},
</if>
<if test="record.weight != null">
weight = #{record.weight,jdbcType=INTEGER},
</if>
<if test="record.createDt != null">
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_base_second_class
set id = #{record.id,jdbcType=BIGINT},
class_name = #{record.className,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
type = #{record.type,jdbcType=INTEGER},
pic_url = #{record.picUrl,jdbcType=VARCHAR},
first_id = #{record.firstId,jdbcType=BIGINT},
weight = #{record.weight,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.server.web.common.model.TBaseSecondClass">
update t_base_second_class
<set>
<if test="className != null">
class_name = #{className,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="picUrl != null">
pic_url = #{picUrl,jdbcType=VARCHAR},
</if>
<if test="firstId != null">
first_id = #{firstId,jdbcType=BIGINT},
</if>
<if test="weight != null">
weight = #{weight,jdbcType=INTEGER},
</if>
<if test="createDt != null">
create_dt = #{createDt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TBaseSecondClass">
update t_base_second_class
set class_name = #{className,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
pic_url = #{picUrl,jdbcType=VARCHAR},
first_id = #{firstId,jdbcType=BIGINT},
weight = #{weight,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.server.web.common.mapper.TKzyCommentMapper">
<resultMap id="BaseResultMap" type="com.server.web.common.model.TKzyComment">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="user_id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="relation_id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="type" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="reply_content" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="is_delete" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="auth_status" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="auth_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
</constructor>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, user_id, relation_id, type, reply_content, is_delete, auth_status, auth_dt, create_dt
</sql>
<select id="selectByExample" parameterType="com.server.web.common.model.TKzyCommentExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_kzy_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_kzy_comment
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_kzy_comment
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.server.web.common.model.TKzyCommentExample">
delete from t_kzy_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.server.web.common.model.TKzyComment">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_kzy_comment (user_id, relation_id, type,
reply_content, is_delete, auth_status,
auth_dt, create_dt)
values (#{userId,jdbcType=BIGINT}, #{relationId,jdbcType=BIGINT}, #{type,jdbcType=INTEGER},
#{replyContent,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{authStatus,jdbcType=INTEGER},
#{authDt,jdbcType=TIMESTAMP}, #{createDt,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.server.web.common.model.TKzyComment">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_kzy_comment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="relationId != null">
relation_id,
</if>
<if test="type != null">
type,
</if>
<if test="replyContent != null">
reply_content,
</if>
<if test="isDelete != null">
is_delete,
</if>
<if test="authStatus != null">
auth_status,
</if>
<if test="authDt != null">
auth_dt,
</if>
<if test="createDt != null">
create_dt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="relationId != null">
#{relationId,jdbcType=BIGINT},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="replyContent != null">
#{replyContent,jdbcType=VARCHAR},
</if>
<if test="isDelete != null">
#{isDelete,jdbcType=INTEGER},
</if>
<if test="authStatus != null">
#{authStatus,jdbcType=INTEGER},
</if>
<if test="authDt != null">
#{authDt,jdbcType=TIMESTAMP},
</if>
<if test="createDt != null">
#{createDt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.server.web.common.model.TKzyCommentExample" resultType="java.lang.Long">
select count(*) from t_kzy_comment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_kzy_comment
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.relationId != null">
relation_id = #{record.relationId,jdbcType=BIGINT},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.replyContent != null">
reply_content = #{record.replyContent,jdbcType=VARCHAR},
</if>
<if test="record.isDelete != null">
is_delete = #{record.isDelete,jdbcType=INTEGER},
</if>
<if test="record.authStatus != null">
auth_status = #{record.authStatus,jdbcType=INTEGER},
</if>
<if test="record.authDt != null">
auth_dt = #{record.authDt,jdbcType=TIMESTAMP},
</if>
<if test="record.createDt != null">
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_kzy_comment
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
relation_id = #{record.relationId,jdbcType=BIGINT},
type = #{record.type,jdbcType=INTEGER},
reply_content = #{record.replyContent,jdbcType=VARCHAR},
is_delete = #{record.isDelete,jdbcType=INTEGER},
auth_status = #{record.authStatus,jdbcType=INTEGER},
auth_dt = #{record.authDt,jdbcType=TIMESTAMP},
create_dt = #{record.createDt,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.server.web.common.model.TKzyComment">
update t_kzy_comment
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="relationId != null">
relation_id = #{relationId,jdbcType=BIGINT},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="replyContent != null">
reply_content = #{replyContent,jdbcType=VARCHAR},
</if>
<if test="isDelete != null">
is_delete = #{isDelete,jdbcType=INTEGER},
</if>
<if test="authStatus != null">
auth_status = #{authStatus,jdbcType=INTEGER},
</if>
<if test="authDt != null">
auth_dt = #{authDt,jdbcType=TIMESTAMP},
</if>
<if test="createDt != null">
create_dt = #{createDt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TKzyComment">
update t_kzy_comment
set user_id = #{userId,jdbcType=BIGINT},
relation_id = #{relationId,jdbcType=BIGINT},
type = #{type,jdbcType=INTEGER},
reply_content = #{replyContent,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=INTEGER},
auth_status = #{authStatus,jdbcType=INTEGER},
auth_dt = #{authDt,jdbcType=TIMESTAMP},
create_dt = #{createDt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.server.web.common.mapper.TKzyCourseMapper">
<resultMap id="BaseResultMap" type="com.server.web.common.model.TKzyCourse">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="course_name" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="pic_url" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="start_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="end_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="weight" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="live_url" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="course_type" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="is_up" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="editor_id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="editor_name" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="is_delete" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="update_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
</constructor>
</resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.server.web.common.model.TKzyCourse">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="course_name" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="pic_url" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="start_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="end_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="weight" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="live_url" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="course_type" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="is_up" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="editor_id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="editor_name" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="is_delete" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="update_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="course_introduce" javaType="java.lang.String" jdbcType="LONGVARCHAR" />
</constructor>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, course_name, pic_url, start_dt, end_dt, weight, live_url, course_type, is_up,
editor_id, editor_name, is_delete, create_dt, update_dt
</sql>
<sql id="Blob_Column_List">
course_introduce
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.server.web.common.model.TKzyCourseExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from t_kzy_course
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.server.web.common.model.TKzyCourseExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_kzy_course
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from t_kzy_course
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_kzy_course
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.server.web.common.model.TKzyCourseExample">
delete from t_kzy_course
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.server.web.common.model.TKzyCourse">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_kzy_course (course_name, pic_url, start_dt,
end_dt, weight, live_url,
course_type, is_up, editor_id,
editor_name, is_delete, create_dt,
update_dt, course_introduce)
values (#{courseName,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR}, #{startDt,jdbcType=TIMESTAMP},
#{endDt,jdbcType=TIMESTAMP}, #{weight,jdbcType=INTEGER}, #{liveUrl,jdbcType=VARCHAR},
#{courseType,jdbcType=INTEGER}, #{isUp,jdbcType=INTEGER}, #{editorId,jdbcType=BIGINT},
#{editorName,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createDt,jdbcType=TIMESTAMP},
#{updateDt,jdbcType=TIMESTAMP}, #{courseIntroduce,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.server.web.common.model.TKzyCourse">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_kzy_course
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="courseName != null">
course_name,
</if>
<if test="picUrl != null">
pic_url,
</if>
<if test="startDt != null">
start_dt,
</if>
<if test="endDt != null">
end_dt,
</if>
<if test="weight != null">
weight,
</if>
<if test="liveUrl != null">
live_url,
</if>
<if test="courseType != null">
course_type,
</if>
<if test="isUp != null">
is_up,
</if>
<if test="editorId != null">
editor_id,
</if>
<if test="editorName != null">
editor_name,
</if>
<if test="isDelete != null">
is_delete,
</if>
<if test="createDt != null">
create_dt,
</if>
<if test="updateDt != null">
update_dt,
</if>
<if test="courseIntroduce != null">
course_introduce,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="courseName != null">
#{courseName,jdbcType=VARCHAR},
</if>
<if test="picUrl != null">
#{picUrl,jdbcType=VARCHAR},
</if>
<if test="startDt != null">
#{startDt,jdbcType=TIMESTAMP},
</if>
<if test="endDt != null">
#{endDt,jdbcType=TIMESTAMP},
</if>
<if test="weight != null">
#{weight,jdbcType=INTEGER},
</if>
<if test="liveUrl != null">
#{liveUrl,jdbcType=VARCHAR},
</if>
<if test="courseType != null">
#{courseType,jdbcType=INTEGER},
</if>
<if test="isUp != null">
#{isUp,jdbcType=INTEGER},
</if>
<if test="editorId != null">
#{editorId,jdbcType=BIGINT},
</if>
<if test="editorName != null">
#{editorName,jdbcType=VARCHAR},
</if>
<if test="isDelete != null">
#{isDelete,jdbcType=INTEGER},
</if>
<if test="createDt != null">
#{createDt,jdbcType=TIMESTAMP},
</if>
<if test="updateDt != null">
#{updateDt,jdbcType=TIMESTAMP},
</if>
<if test="courseIntroduce != null">
#{courseIntroduce,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.server.web.common.model.TKzyCourseExample" resultType="java.lang.Long">
select count(*) from t_kzy_course
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_kzy_course
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.courseName != null">
course_name = #{record.courseName,jdbcType=VARCHAR},
</if>
<if test="record.picUrl != null">
pic_url = #{record.picUrl,jdbcType=VARCHAR},
</if>
<if test="record.startDt != null">
start_dt = #{record.startDt,jdbcType=TIMESTAMP},
</if>
<if test="record.endDt != null">
end_dt = #{record.endDt,jdbcType=TIMESTAMP},
</if>
<if test="record.weight != null">
weight = #{record.weight,jdbcType=INTEGER},
</if>
<if test="record.liveUrl != null">
live_url = #{record.liveUrl,jdbcType=VARCHAR},
</if>
<if test="record.courseType != null">
course_type = #{record.courseType,jdbcType=INTEGER},
</if>
<if test="record.isUp != null">
is_up = #{record.isUp,jdbcType=INTEGER},
</if>
<if test="record.editorId != null">
editor_id = #{record.editorId,jdbcType=BIGINT},
</if>
<if test="record.editorName != null">
editor_name = #{record.editorName,jdbcType=VARCHAR},
</if>
<if test="record.isDelete != null">
is_delete = #{record.isDelete,jdbcType=INTEGER},
</if>
<if test="record.createDt != null">
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
</if>
<if test="record.updateDt != null">
update_dt = #{record.updateDt,jdbcType=TIMESTAMP},
</if>
<if test="record.courseIntroduce != null">
course_introduce = #{record.courseIntroduce,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update t_kzy_course
set id = #{record.id,jdbcType=BIGINT},
course_name = #{record.courseName,jdbcType=VARCHAR},
pic_url = #{record.picUrl,jdbcType=VARCHAR},
start_dt = #{record.startDt,jdbcType=TIMESTAMP},
end_dt = #{record.endDt,jdbcType=TIMESTAMP},
weight = #{record.weight,jdbcType=INTEGER},
live_url = #{record.liveUrl,jdbcType=VARCHAR},
course_type = #{record.courseType,jdbcType=INTEGER},
is_up = #{record.isUp,jdbcType=INTEGER},
editor_id = #{record.editorId,jdbcType=BIGINT},
editor_name = #{record.editorName,jdbcType=VARCHAR},
is_delete = #{record.isDelete,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
update_dt = #{record.updateDt,jdbcType=TIMESTAMP},
course_introduce = #{record.courseIntroduce,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_kzy_course
set id = #{record.id,jdbcType=BIGINT},
course_name = #{record.courseName,jdbcType=VARCHAR},
pic_url = #{record.picUrl,jdbcType=VARCHAR},
start_dt = #{record.startDt,jdbcType=TIMESTAMP},
end_dt = #{record.endDt,jdbcType=TIMESTAMP},
weight = #{record.weight,jdbcType=INTEGER},
live_url = #{record.liveUrl,jdbcType=VARCHAR},
course_type = #{record.courseType,jdbcType=INTEGER},
is_up = #{record.isUp,jdbcType=INTEGER},
editor_id = #{record.editorId,jdbcType=BIGINT},
editor_name = #{record.editorName,jdbcType=VARCHAR},
is_delete = #{record.isDelete,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
update_dt = #{record.updateDt,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.server.web.common.model.TKzyCourse">
update t_kzy_course
<set>
<if test="courseName != null">
course_name = #{courseName,jdbcType=VARCHAR},
</if>
<if test="picUrl != null">
pic_url = #{picUrl,jdbcType=VARCHAR},
</if>
<if test="startDt != null">
start_dt = #{startDt,jdbcType=TIMESTAMP},
</if>
<if test="endDt != null">
end_dt = #{endDt,jdbcType=TIMESTAMP},
</if>
<if test="weight != null">
weight = #{weight,jdbcType=INTEGER},
</if>
<if test="liveUrl != null">
live_url = #{liveUrl,jdbcType=VARCHAR},
</if>
<if test="courseType != null">
course_type = #{courseType,jdbcType=INTEGER},
</if>
<if test="isUp != null">
is_up = #{isUp,jdbcType=INTEGER},
</if>
<if test="editorId != null">
editor_id = #{editorId,jdbcType=BIGINT},
</if>
<if test="editorName != null">
editor_name = #{editorName,jdbcType=VARCHAR},
</if>
<if test="isDelete != null">
is_delete = #{isDelete,jdbcType=INTEGER},
</if>
<if test="createDt != null">
create_dt = #{createDt,jdbcType=TIMESTAMP},
</if>
<if test="updateDt != null">
update_dt = #{updateDt,jdbcType=TIMESTAMP},
</if>
<if test="courseIntroduce != null">
course_introduce = #{courseIntroduce,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.server.web.common.model.TKzyCourse">
update t_kzy_course
set course_name = #{courseName,jdbcType=VARCHAR},
pic_url = #{picUrl,jdbcType=VARCHAR},
start_dt = #{startDt,jdbcType=TIMESTAMP},
end_dt = #{endDt,jdbcType=TIMESTAMP},
weight = #{weight,jdbcType=INTEGER},
live_url = #{liveUrl,jdbcType=VARCHAR},
course_type = #{courseType,jdbcType=INTEGER},
is_up = #{isUp,jdbcType=INTEGER},
editor_id = #{editorId,jdbcType=BIGINT},
editor_name = #{editorName,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP},
update_dt = #{updateDt,jdbcType=TIMESTAMP},
course_introduce = #{courseIntroduce,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TKzyCourse">
update t_kzy_course
set course_name = #{courseName,jdbcType=VARCHAR},
pic_url = #{picUrl,jdbcType=VARCHAR},
start_dt = #{startDt,jdbcType=TIMESTAMP},
end_dt = #{endDt,jdbcType=TIMESTAMP},
weight = #{weight,jdbcType=INTEGER},
live_url = #{liveUrl,jdbcType=VARCHAR},
course_type = #{courseType,jdbcType=INTEGER},
is_up = #{isUp,jdbcType=INTEGER},
editor_id = #{editorId,jdbcType=BIGINT},
editor_name = #{editorName,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP},
update_dt = #{updateDt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.server.web.common.mapper.TKzyInformationMapper">
<resultMap id="BaseResultMap" type="com.server.web.common.model.TKzyInformation">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="title" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="author" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="pic_url" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="icon_url" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="is_delete" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="update_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
</constructor>
</resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.server.web.common.model.TKzyInformation">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="title" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="author" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="pic_url" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="icon_url" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="is_delete" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="update_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="content" javaType="_byte[]" jdbcType="LONGVARBINARY" />
</constructor>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, title, author, pic_url, icon_url, is_delete, create_dt, update_dt
</sql>
<sql id="Blob_Column_List">
content
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.server.web.common.model.TKzyInformationExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from t_kzy_information
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.server.web.common.model.TKzyInformationExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_kzy_information
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from t_kzy_information
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_kzy_information
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.server.web.common.model.TKzyInformationExample">
delete from t_kzy_information
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.server.web.common.model.TKzyInformation">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_kzy_information (title, author, pic_url,
icon_url, is_delete, create_dt,
update_dt, content)
values (#{title,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR},
#{iconUrl,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createDt,jdbcType=TIMESTAMP},
#{updateDt,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARBINARY})
</insert>
<insert id="insertSelective" parameterType="com.server.web.common.model.TKzyInformation">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_kzy_information
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null">
title,
</if>
<if test="author != null">
author,
</if>
<if test="picUrl != null">
pic_url,
</if>
<if test="iconUrl != null">
icon_url,
</if>
<if test="isDelete != null">
is_delete,
</if>
<if test="createDt != null">
create_dt,
</if>
<if test="updateDt != null">
update_dt,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="author != null">
#{author,jdbcType=VARCHAR},
</if>
<if test="picUrl != null">
#{picUrl,jdbcType=VARCHAR},
</if>
<if test="iconUrl != null">
#{iconUrl,jdbcType=VARCHAR},
</if>
<if test="isDelete != null">
#{isDelete,jdbcType=INTEGER},
</if>
<if test="createDt != null">
#{createDt,jdbcType=TIMESTAMP},
</if>
<if test="updateDt != null">
#{updateDt,jdbcType=TIMESTAMP},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARBINARY},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.server.web.common.model.TKzyInformationExample" resultType="java.lang.Long">
select count(*) from t_kzy_information
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_kzy_information
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.title != null">
title = #{record.title,jdbcType=VARCHAR},
</if>
<if test="record.author != null">
author = #{record.author,jdbcType=VARCHAR},
</if>
<if test="record.picUrl != null">
pic_url = #{record.picUrl,jdbcType=VARCHAR},
</if>
<if test="record.iconUrl != null">
icon_url = #{record.iconUrl,jdbcType=VARCHAR},
</if>
<if test="record.isDelete != null">
is_delete = #{record.isDelete,jdbcType=INTEGER},
</if>
<if test="record.createDt != null">
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
</if>
<if test="record.updateDt != null">
update_dt = #{record.updateDt,jdbcType=TIMESTAMP},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARBINARY},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update t_kzy_information
set id = #{record.id,jdbcType=BIGINT},
title = #{record.title,jdbcType=VARCHAR},
author = #{record.author,jdbcType=VARCHAR},
pic_url = #{record.picUrl,jdbcType=VARCHAR},
icon_url = #{record.iconUrl,jdbcType=VARCHAR},
is_delete = #{record.isDelete,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
update_dt = #{record.updateDt,jdbcType=TIMESTAMP},
content = #{record.content,jdbcType=LONGVARBINARY}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_kzy_information
set id = #{record.id,jdbcType=BIGINT},
title = #{record.title,jdbcType=VARCHAR},
author = #{record.author,jdbcType=VARCHAR},
pic_url = #{record.picUrl,jdbcType=VARCHAR},
icon_url = #{record.iconUrl,jdbcType=VARCHAR},
is_delete = #{record.isDelete,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
update_dt = #{record.updateDt,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.server.web.common.model.TKzyInformation">
update t_kzy_information
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="author != null">
author = #{author,jdbcType=VARCHAR},
</if>
<if test="picUrl != null">
pic_url = #{picUrl,jdbcType=VARCHAR},
</if>
<if test="iconUrl != null">
icon_url = #{iconUrl,jdbcType=VARCHAR},
</if>
<if test="isDelete != null">
is_delete = #{isDelete,jdbcType=INTEGER},
</if>
<if test="createDt != null">
create_dt = #{createDt,jdbcType=TIMESTAMP},
</if>
<if test="updateDt != null">
update_dt = #{updateDt,jdbcType=TIMESTAMP},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARBINARY},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.server.web.common.model.TKzyInformation">
update t_kzy_information
set title = #{title,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR},
pic_url = #{picUrl,jdbcType=VARCHAR},
icon_url = #{iconUrl,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP},
update_dt = #{updateDt,jdbcType=TIMESTAMP},
content = #{content,jdbcType=LONGVARBINARY}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TKzyInformation">
update t_kzy_information
set title = #{title,jdbcType=VARCHAR},
author = #{author,jdbcType=VARCHAR},
pic_url = #{picUrl,jdbcType=VARCHAR},
icon_url = #{iconUrl,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP},
update_dt = #{updateDt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.server.web.common.mapper.TKzyRelationClassMapper">
<resultMap id="BaseResultMap" type="com.server.web.common.model.TKzyRelationClass">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="relation_id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="first_class_id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="second_class_id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
</constructor>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, relation_id, first_class_id, second_class_id, create_dt
</sql>
<select id="selectByExample" parameterType="com.server.web.common.model.TKzyRelationClassExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_kzy_relation_class
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_kzy_relation_class
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_kzy_relation_class
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.server.web.common.model.TKzyRelationClassExample">
delete from t_kzy_relation_class
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.server.web.common.model.TKzyRelationClass">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_kzy_relation_class (relation_id, first_class_id, second_class_id,
create_dt)
values (#{relationId,jdbcType=BIGINT}, #{firstClassId,jdbcType=BIGINT}, #{secondClassId,jdbcType=BIGINT},
#{createDt,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.server.web.common.model.TKzyRelationClass">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_kzy_relation_class
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="relationId != null">
relation_id,
</if>
<if test="firstClassId != null">
first_class_id,
</if>
<if test="secondClassId != null">
second_class_id,
</if>
<if test="createDt != null">
create_dt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="relationId != null">
#{relationId,jdbcType=BIGINT},
</if>
<if test="firstClassId != null">
#{firstClassId,jdbcType=BIGINT},
</if>
<if test="secondClassId != null">
#{secondClassId,jdbcType=BIGINT},
</if>
<if test="createDt != null">
#{createDt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.server.web.common.model.TKzyRelationClassExample" resultType="java.lang.Long">
select count(*) from t_kzy_relation_class
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_kzy_relation_class
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.relationId != null">
relation_id = #{record.relationId,jdbcType=BIGINT},
</if>
<if test="record.firstClassId != null">
first_class_id = #{record.firstClassId,jdbcType=BIGINT},
</if>
<if test="record.secondClassId != null">
second_class_id = #{record.secondClassId,jdbcType=BIGINT},
</if>
<if test="record.createDt != null">
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_kzy_relation_class
set id = #{record.id,jdbcType=BIGINT},
relation_id = #{record.relationId,jdbcType=BIGINT},
first_class_id = #{record.firstClassId,jdbcType=BIGINT},
second_class_id = #{record.secondClassId,jdbcType=BIGINT},
create_dt = #{record.createDt,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.server.web.common.model.TKzyRelationClass">
update t_kzy_relation_class
<set>
<if test="relationId != null">
relation_id = #{relationId,jdbcType=BIGINT},
</if>
<if test="firstClassId != null">
first_class_id = #{firstClassId,jdbcType=BIGINT},
</if>
<if test="secondClassId != null">
second_class_id = #{secondClassId,jdbcType=BIGINT},
</if>
<if test="createDt != null">
create_dt = #{createDt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TKzyRelationClass">
update t_kzy_relation_class
set relation_id = #{relationId,jdbcType=BIGINT},
first_class_id = #{firstClassId,jdbcType=BIGINT},
second_class_id = #{secondClassId,jdbcType=BIGINT},
create_dt = #{createDt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.server.web.common.mapper.TKzyUserIntegralFlowingMapper">
<resultMap id="BaseResultMap" type="com.server.web.common.model.TKzyUserIntegralFlowing">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="user_id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="integral" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="source_type" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="type" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="remark" javaType="java.lang.String" jdbcType="VARCHAR" />
</constructor>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, user_id, integral, source_type, type, create_dt, remark
</sql>
<select id="selectByExample" parameterType="com.server.web.common.model.TKzyUserIntegralFlowingExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_kzy_user_integral_flowing
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_kzy_user_integral_flowing
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_kzy_user_integral_flowing
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.server.web.common.model.TKzyUserIntegralFlowingExample">
delete from t_kzy_user_integral_flowing
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.server.web.common.model.TKzyUserIntegralFlowing">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_kzy_user_integral_flowing (user_id, integral, source_type,
type, create_dt, remark
)
values (#{userId,jdbcType=BIGINT}, #{integral,jdbcType=INTEGER}, #{sourceType,jdbcType=INTEGER},
#{type,jdbcType=INTEGER}, #{createDt,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.server.web.common.model.TKzyUserIntegralFlowing">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_kzy_user_integral_flowing
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="integral != null">
integral,
</if>
<if test="sourceType != null">
source_type,
</if>
<if test="type != null">
type,
</if>
<if test="createDt != null">
create_dt,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="integral != null">
#{integral,jdbcType=INTEGER},
</if>
<if test="sourceType != null">
#{sourceType,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="createDt != null">
#{createDt,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.server.web.common.model.TKzyUserIntegralFlowingExample" resultType="java.lang.Long">
select count(*) from t_kzy_user_integral_flowing
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_kzy_user_integral_flowing
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.integral != null">
integral = #{record.integral,jdbcType=INTEGER},
</if>
<if test="record.sourceType != null">
source_type = #{record.sourceType,jdbcType=INTEGER},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.createDt != null">
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_kzy_user_integral_flowing
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
integral = #{record.integral,jdbcType=INTEGER},
source_type = #{record.sourceType,jdbcType=INTEGER},
type = #{record.type,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.server.web.common.model.TKzyUserIntegralFlowing">
update t_kzy_user_integral_flowing
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="integral != null">
integral = #{integral,jdbcType=INTEGER},
</if>
<if test="sourceType != null">
source_type = #{sourceType,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="createDt != null">
create_dt = #{createDt,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TKzyUserIntegralFlowing">
update t_kzy_user_integral_flowing
set user_id = #{userId,jdbcType=BIGINT},
integral = #{integral,jdbcType=INTEGER},
source_type = #{sourceType,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.server.web.common.mapper.TKzyUserMapper">
<resultMap id="BaseResultMap" type="com.server.web.common.model.TKzyUser">
<constructor>
<idArg column="id" javaType="java.lang.Long" jdbcType="BIGINT" />
<arg column="full_name" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="head_photo" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="phone" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="user_category" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="duty" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="status" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="wx_openid" javaType="java.lang.String" jdbcType="VARCHAR" />
<arg column="integral" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="sign_in_count" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="last_sign_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="last_login_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
</constructor>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, full_name, head_photo, phone, user_category, duty, status, wx_openid, integral,
sign_in_count, last_sign_dt, create_dt, last_login_dt
</sql>
<select id="selectByExample" parameterType="com.server.web.common.model.TKzyUserExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_kzy_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_kzy_user
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_kzy_user
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.server.web.common.model.TKzyUserExample">
delete from t_kzy_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.server.web.common.model.TKzyUser">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_kzy_user (full_name, head_photo, phone,
user_category, duty, status,
wx_openid, integral, sign_in_count,
last_sign_dt, create_dt, last_login_dt
)
values (#{fullName,jdbcType=VARCHAR}, #{headPhoto,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
#{userCategory,jdbcType=INTEGER}, #{duty,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{wxOpenid,jdbcType=VARCHAR}, #{integral,jdbcType=INTEGER}, #{signInCount,jdbcType=INTEGER},
#{lastSignDt,jdbcType=TIMESTAMP}, #{createDt,jdbcType=TIMESTAMP}, #{lastLoginDt,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.server.web.common.model.TKzyUser">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into t_kzy_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fullName != null">
full_name,
</if>
<if test="headPhoto != null">
head_photo,
</if>
<if test="phone != null">
phone,
</if>
<if test="userCategory != null">
user_category,
</if>
<if test="duty != null">
duty,
</if>
<if test="status != null">
status,
</if>
<if test="wxOpenid != null">
wx_openid,
</if>
<if test="integral != null">
integral,
</if>
<if test="signInCount != null">
sign_in_count,
</if>
<if test="lastSignDt != null">
last_sign_dt,
</if>
<if test="createDt != null">
create_dt,
</if>
<if test="lastLoginDt != null">
last_login_dt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fullName != null">
#{fullName,jdbcType=VARCHAR},
</if>
<if test="headPhoto != null">
#{headPhoto,jdbcType=VARCHAR},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="userCategory != null">
#{userCategory,jdbcType=INTEGER},
</if>
<if test="duty != null">
#{duty,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="wxOpenid != null">
#{wxOpenid,jdbcType=VARCHAR},
</if>
<if test="integral != null">
#{integral,jdbcType=INTEGER},
</if>
<if test="signInCount != null">
#{signInCount,jdbcType=INTEGER},
</if>
<if test="lastSignDt != null">
#{lastSignDt,jdbcType=TIMESTAMP},
</if>
<if test="createDt != null">
#{createDt,jdbcType=TIMESTAMP},
</if>
<if test="lastLoginDt != null">
#{lastLoginDt,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.server.web.common.model.TKzyUserExample" resultType="java.lang.Long">
select count(*) from t_kzy_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_kzy_user
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.fullName != null">
full_name = #{record.fullName,jdbcType=VARCHAR},
</if>
<if test="record.headPhoto != null">
head_photo = #{record.headPhoto,jdbcType=VARCHAR},
</if>
<if test="record.phone != null">
phone = #{record.phone,jdbcType=VARCHAR},
</if>
<if test="record.userCategory != null">
user_category = #{record.userCategory,jdbcType=INTEGER},
</if>
<if test="record.duty != null">
duty = #{record.duty,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.wxOpenid != null">
wx_openid = #{record.wxOpenid,jdbcType=VARCHAR},
</if>
<if test="record.integral != null">
integral = #{record.integral,jdbcType=INTEGER},
</if>
<if test="record.signInCount != null">
sign_in_count = #{record.signInCount,jdbcType=INTEGER},
</if>
<if test="record.lastSignDt != null">
last_sign_dt = #{record.lastSignDt,jdbcType=TIMESTAMP},
</if>
<if test="record.createDt != null">
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
</if>
<if test="record.lastLoginDt != null">
last_login_dt = #{record.lastLoginDt,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_kzy_user
set id = #{record.id,jdbcType=BIGINT},
full_name = #{record.fullName,jdbcType=VARCHAR},
head_photo = #{record.headPhoto,jdbcType=VARCHAR},
phone = #{record.phone,jdbcType=VARCHAR},
user_category = #{record.userCategory,jdbcType=INTEGER},
duty = #{record.duty,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
wx_openid = #{record.wxOpenid,jdbcType=VARCHAR},
integral = #{record.integral,jdbcType=INTEGER},
sign_in_count = #{record.signInCount,jdbcType=INTEGER},
last_sign_dt = #{record.lastSignDt,jdbcType=TIMESTAMP},
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
last_login_dt = #{record.lastLoginDt,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.server.web.common.model.TKzyUser">
update t_kzy_user
<set>
<if test="fullName != null">
full_name = #{fullName,jdbcType=VARCHAR},
</if>
<if test="headPhoto != null">
head_photo = #{headPhoto,jdbcType=VARCHAR},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="userCategory != null">
user_category = #{userCategory,jdbcType=INTEGER},
</if>
<if test="duty != null">
duty = #{duty,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="wxOpenid != null">
wx_openid = #{wxOpenid,jdbcType=VARCHAR},
</if>
<if test="integral != null">
integral = #{integral,jdbcType=INTEGER},
</if>
<if test="signInCount != null">
sign_in_count = #{signInCount,jdbcType=INTEGER},
</if>
<if test="lastSignDt != null">
last_sign_dt = #{lastSignDt,jdbcType=TIMESTAMP},
</if>
<if test="createDt != null">
create_dt = #{createDt,jdbcType=TIMESTAMP},
</if>
<if test="lastLoginDt != null">
last_login_dt = #{lastLoginDt,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TKzyUser">
update t_kzy_user
set full_name = #{fullName,jdbcType=VARCHAR},
head_photo = #{headPhoto,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR},
user_category = #{userCategory,jdbcType=INTEGER},
duty = #{duty,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
wx_openid = #{wxOpenid,jdbcType=VARCHAR},
integral = #{integral,jdbcType=INTEGER},
sign_in_count = #{signInCount,jdbcType=INTEGER},
last_sign_dt = #{lastSignDt,jdbcType=TIMESTAMP},
create_dt = #{createDt,jdbcType=TIMESTAMP},
last_login_dt = #{lastLoginDt,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.server.web.common.mapping.CommentMapper" >
<select id="commentList" resultType="java.util.HashMap">
SELECT
t.id,
t.create_dt AS createDt,
t.reply_content AS replyContent,
u.full_name AS fullName,
u.head_photo AS headPhoto
FROM
t_kzy_comment t
LEFT JOIN t_kzy_user u ON t.user_id = u.id AND t.type = 2
WHERE
t.is_delete = 0 AND t.auth_status=2 AND t.type=2
AND t.relation_id = #{courseId,jdbcType=BIGINT}
ORDER BY
t.id ASC
LIMIT #{start,jdbcType=INTEGER},#{pageSize,jdbcType=INTEGER}
</select>
<select id="commentListTotal" resultType="java.lang.Integer">
SELECT
count(t.id)
FROM
t_kzy_comment t
LEFT JOIN t_kzy_user u ON t.user_id = u.id AND t.type = 2
WHERE
t.is_delete = 0 AND t.auth_status=2 AND t.type=2
AND t.relation_id = #{courseId,jdbcType=BIGINT}
</select>
<select id="informationCommentList" resultType="java.util.HashMap">
SELECT
t.id,
t.create_dt AS createDt,
t.reply_content AS replyContent,
u.full_name AS fullName,
u.head_photo AS headPhoto
FROM
t_kzy_comment t
LEFT JOIN t_kzy_user u ON t.user_id = u.id AND t.type = 1
WHERE
t.is_delete = 0 AND t.auth_status=2 AND t.type=1
AND t.relation_id = #{informationId,jdbcType=BIGINT}
ORDER BY
t.id ASC
LIMIT #{start,jdbcType=INTEGER},#{pageSize,jdbcType=INTEGER}
</select>
<select id="informationCommentListTotal" resultType="java.lang.Integer">
SELECT
count(t.id)
FROM
t_kzy_comment t
LEFT JOIN t_kzy_user u ON t.user_id = u.id AND t.type = 1
WHERE
t.is_delete = 0 AND t.auth_status=2 AND t.type=1
AND t.relation_id = #{informationId,jdbcType=BIGINT}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.server.web.common.mapping.CourseMapper">
<select id="livingCourse" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT
t.`pic_url` as picUrl,
t.`course_name` as courseName,
t.`start_dt` AS startDt,
t.`end_dt` AS endDt,
t.id
FROM
t_kzy_course t
WHERE t.`is_delete` = 0
AND t.`is_up` = 1
AND t.`course_type`=1
AND (t.end_dt is null or t.end_dt &gt; NOW())
ORDER BY t.`start_dt`
</select>
<select id="livingCourseToday" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT
t.`pic_url` as picUrl,
t.`course_name` as courseName,
t.`start_dt` AS startDt,
t.`end_dt` AS endDt,
t.id
FROM
t_kzy_course t
WHERE t.`is_delete` = 0
AND t.`is_up` = 1
AND t.`course_type`=1
AND t.end_dt <![CDATA[ > ]]> now()
ORDER BY t.`start_dt`
</select>
<select id="recordCourse" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT
t.`pic_url` as picUrl,
t.`course_name` as courseName,
t.`start_dt` AS startDt,
t.`end_dt` AS endDt,
t.id
FROM
t_kzy_course t
WHERE t.`is_delete` = 0
AND t.`is_up` = 1
AND t.`course_type`=2
AND (t.end_dt is null or date_format(t.end_dt,'%Y-%m-%d') = #{today,jdbcType=VARCHAR})
ORDER BY t.`start_dt`
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.server.web.common.mapping.IntegralMapper">
<select id="signInList" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT
t.id,
t.create_dt AS createDt,
date_format(t.create_dt,'%Y/%m/%d') AS days,
t.integral
FROM
t_kzy_user_integral_flowing t
WHERE
t.source_type = 1
AND t.user_id = #{userId,jdbcType=BIGINT}
AND DATE_FORMAT(t.create_dt, '%Y-%m') = #{month,jdbcType=VARCHAR}
</select>
<select id="queryDaySign" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT
t.id,
t.create_dt AS createDt,
t.integral
FROM
t_kzy_user_integral_flowing t
WHERE
t.source_type = 1
AND t.user_id = #{userId,jdbcType=BIGINT}
AND DATE_FORMAT(t.create_dt, '%Y-%m-%d') = #{today,jdbcType=VARCHAR}
ORDER BY t.id DESC limit 0,1
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.server.web.common.mapping.InformationMapper">
<select id="livingCourse" parameterType="java.util.HashMap" resultType="java.util.HashMap">
SELECT
t.`pic_url` as picUrl,
t.`course_name` as courseName,
t.`start_dt` AS startDt,
t.`end_dt` AS endDt,
t.id
FROM
t_kzy_course t
WHERE t.`is_delete` = 0
AND t.`is_up` = 1
AND t.`course_type`=1
AND (t.end_dt is null or t.end_dt &gt; NOW())
ORDER BY t.`start_dt`
</select>
<select id="categoryDetail" resultType="java.util.HashMap">
SELECT
i.id,
i.title,
i.icon_url AS iconUrl
FROM
t_kzy_relation_class rc
LEFT JOIN t_kzy_information i ON rc.relation_id = i.id
WHERE
i.is_delete = 0 AND rc.type=2
AND rc.first_class_id = #{firstId,jdbcType=BIGINT}
GROUP BY i.id
ORDER BY
i.id DESC
LIMIT 0,
2
</select>
<select id="secondClassDetailInformation" resultType="java.util.HashMap">
SELECT
i.id,
i.title,
i.icon_url AS iconUrl,
i.create_dt AS createDt,
1 AS classType
FROM
t_kzy_relation_class rc
LEFT JOIN t_kzy_information i ON rc.relation_id = i.id
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id AND sc.type = 1
WHERE
i.is_delete = 0
AND sc.type = 1
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
ORDER BY
i.id DESC
LIMIT ${start},${pageSize}
</select>
<select id="secondClassDetailInformationTotal" resultType="java.lang.Integer">
SELECT
count(i.id)
FROM
t_kzy_relation_class rc
LEFT JOIN t_kzy_information i ON rc.relation_id = i.id
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id AND sc.type = 1
WHERE
i.is_delete = 0
AND sc.type = 1
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
</select>
<select id="secondClassDetailCourse" resultType="java.util.HashMap">
SELECT
c.id,
c.course_name AS title,
c.pic_url AS iconUrl,
c.create_dt AS createDt,
2 AS classType,
c.course_type AS courseType
FROM
t_kzy_relation_class rc
LEFT JOIN t_kzy_course c ON rc.relation_id = c.id
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id
WHERE
c.is_delete = 0
AND sc.type <![CDATA[ >= ]]> 2
AND c.is_up = 1
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
ORDER BY
c.id DESC
LIMIT ${start},${pageSize}
</select>
<select id="secondClassDetailCourseTotal" resultType="java.lang.Integer">
SELECT
count(c.id)
FROM
t_kzy_relation_class rc
LEFT JOIN t_kzy_course c ON rc.relation_id = c.id
LEFT JOIN t_base_second_class sc ON rc.second_class_id = sc.id
WHERE
c.is_delete = 0
AND sc.type <![CDATA[ >= ]]> 2
AND c.is_up = 1
AND rc.second_class_id = #{secondId,jdbcType=BIGINT}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<setting name="callSettersOnNulls" value="true"/>
<setting name="cacheEnabled" value="true"/>
<setting name="lazyLoadingEnabled" value="true"/>
<setting name="aggressiveLazyLoading" value="true"/>
<setting name="multipleResultSetsEnabled" value="true"/>
<setting name="useColumnLabel" value="true"/>
<setting name="useGeneratedKeys" value="false"/>
<setting name="autoMappingBehavior" value="PARTIAL"/>
<setting name="defaultExecutorType" value="SIMPLE"/>
<setting name="mapUnderscoreToCamelCase" value="true"/>
<setting name="localCacheScope" value="SESSION"/>
<setting name="jdbcTypeForNull" value="NULL"/>
<setting name="logImpl" value="LOG4J"/>
</settings>
<typeAliases>
<typeAlias alias="Integer" type="java.lang.Integer" />
<typeAlias alias="Long" type="java.lang.Long" />
<typeAlias alias="HashMap" type="java.util.HashMap" />
<typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap" />
<typeAlias alias="ArrayList" type="java.util.ArrayList" />
<typeAlias alias="LinkedList" type="java.util.LinkedList" />
</typeAliases>
</configuration>
\ No newline at end of file
server.port=${port:8088}
server.tomcat.max-threads=1000
spring.datasource.driverClassName = com.mysql.jdbc.Driver
spring.datasource.url = jdbc:mysql://192.168.20.183:3306/kzy_db_test?useUnicode=yes&characterEncoding=utf-8
spring.datasource.username = kzy_user
spring.datasource.password = Kzy2020#yY
mybatis.type-aliases-package=com.server.web.model
#mybatis.mapper-locations=classpath:com/server/mapper/mybatis/*.xml
mybatis.mapper-locations=classpath:mybatis/mapper/*.xml,classpath:mybatis/mapping/*.xml
mybatis.config-location=classpath:mybatis/mybatis-config.xml
## Redis 配置
# Redis数据库索引(默认为0)
spring.redis.database=0
# Redis服务器地址
spring.redis.host=192.168.20.183
# Redis服务器连接端口
spring.redis.port=6379
# Redis服务器连接密码(默认为空)
spring.redis.password=WebRedis123
# 连接池最大连接数(使用负值表示没有限制)
spring.redis.pool.max-active=30
# 连接池最大阻塞等待时间(使用负值表示没有限制)
spring.redis.pool.max-wait=-1
# 连接池中的最大空闲连接
spring.redis.pool.max-idle=8
# 连接池中的最小空闲连接
spring.redis.pool.min-idle=0
# 连接超时时间(毫秒)
spring.redis.timeout=0
#如果本服务为api服务,可以进行如下配置
#是否开始debug模式,false加密并且验签。true调试模式,不加密,不验签
rest.api.debug=true
#编码
rest.api.charset=utf-8
#加密secret_key
rest.api.secretkey=FoK28EsYrxuiM3ohnAurFGm2uGAHyijL
wx.account=yiyangkeji666666
wx.app.id=wxe37f12b1fa076c1a
wx.app.secret=57e45975dff8f558163e5e9f2ac78e87
wx.http.url=http://kzy-wx-1.jimijiayuan.cn
#有拍云
remoteFileUrl = http://yxvzb.b0.upaiyun.com/
upyun.bucket=yxvzb
upyun.username=liuruichao
upyun.password=liuruichao123
upyun.baseDir=/images/
wx.tocken=64be1d2d249a460bb5c39d565f013d90
wx.http.danmu.url=http://192.168.0.105:8383
log4j.rootLogger=ERROR,stdout,E
log4j.logger.com.server.web.common.mapper=ERROR
##########控制台#############
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %d{ABSOLUTE} %5p %c{1}:%L - %m%n
##########ERROR#############
log4j.appender.E = org.apache.log4j.RollingFileAppender
log4j.appender.E.File = ../error.log
log4j.appender.E.MaxFileSize = 10240KB
log4j.appender.E.Encoding = UTF-8
log4j.appender.E.Threshold = ERROR
log4j.appender.E.layout = org.apache.log4j.PatternLayout
log4j.appender.E.MaxBackupIndex = 10
\ No newline at end of file
server.port=${port:8088}
server.tomcat.max-threads=1000
spring.datasource.driverClassName = com.mysql.jdbc.Driver
spring.datasource.url = jdbc:mysql://39.97.246.118:3306/kzy_db_test?useUnicode=yes&characterEncoding=utf-8
spring.datasource.username = kzy_user
spring.datasource.password = Kzy2020#yY
mybatis.type-aliases-package=com.server.web.model
#mybatis.mapper-locations=classpath:com/server/mapper/mybatis/*.xml
mybatis.mapper-locations=classpath:mybatis/mapper/*.xml,classpath:mybatis/mapping/*.xml
mybatis.config-location=classpath:mybatis/mybatis-config.xml
## Redis 配置
# Redis数据库索引(默认为0)
spring.redis.database=0
# Redis服务器地址
spring.redis.host=39.97.246.118
# Redis服务器连接端口
spring.redis.port=6379
# Redis服务器连接密码(默认为空)
spring.redis.password=WebRedis123
# 连接池最大连接数(使用负值表示没有限制)
spring.redis.pool.max-active=30
# 连接池最大阻塞等待时间(使用负值表示没有限制)
spring.redis.pool.max-wait=-1
# 连接池中的最大空闲连接
spring.redis.pool.max-idle=8
# 连接池中的最小空闲连接
spring.redis.pool.min-idle=0
# 连接超时时间(毫秒)
spring.redis.timeout=0
#如果本服务为api服务,可以进行如下配置
#是否开始debug模式,false加密并且验签。true调试模式,不加密,不验签
rest.api.debug=true
#编码
rest.api.charset=utf-8
#加密secret_key
rest.api.secretkey=FoK28EsYrxuiM3ohnAurFGm2uGAHyijL
#wx.account=yiyangkeji666666
#wx.app.id=wx310b45cf0f4ed5b0
#wx.app.secret=594eccaaf75fc623ec9aa4ed6afaec6e
wx.account=yiyangkeji666666
wx.app.id=wxe37f12b1fa076c1a
wx.app.secret=57e45975dff8f558163e5e9f2ac78e87
wx.http.url=http://kzy-wx-1.jimijiayuan.cn
#有拍云
remoteFileUrl = http://yxvzb.b0.upaiyun.com/
upyun.bucket=yxvzb
upyun.username=liuruichao
upyun.password=liuruichao123
upyun.baseDir=/images/
wx.tocken=64be1d2d249a460bb5c39d565f013d90
wx.http.danmu.url=http://192.168.0.105:8383
log4j.rootLogger=ERROR,stdout,E
log4j.logger.com.server.web.common.mapper=debug
log4j.logger.com.server.web.common.mapping=debug
##########控制台#############
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %d{ABSOLUTE} %5p %c{1}:%L - %m%n
##########ERROR#############
log4j.appender.E = org.apache.log4j.RollingFileAppender
log4j.appender.E.File = ../error.log
log4j.appender.E.MaxFileSize = 10240KB
log4j.appender.E.Encoding = UTF-8
log4j.appender.E.Threshold = ERROR
log4j.appender.E.layout = org.apache.log4j.PatternLayout
log4j.appender.E.MaxBackupIndex = 10
\ No newline at end of file
server.port=${port:8088}
server.tomcat.max-threads=1000
spring.datasource.driverClassName = com.mysql.jdbc.Driver
spring.datasource.url = jdbc:mysql://127.0.0.1:3306/kzy_db?useUnicode=true&characterEncoding=utf-8
spring.datasource.username = kzy_user
spring.datasource.password = KKzy2020#kH
mybatis.type-aliases-package=com.server.web.model
#mybatis.mapper-locations=classpath:com/server/mapper/mybatis/*.xml
mybatis.mapper-locations=classpath:mybatis/mapper/*.xml,classpath:mybatis/mapping/*.xml
mybatis.config-location=classpath:mybatis/mybatis-config.xml
## Redis 配置
# Redis数据库索引(默认为0)
spring.redis.database=0
# Redis服务器地址
spring.redis.host=127.0.0.1
# Redis服务器连接端口
spring.redis.port=6379
# Redis服务器连接密码(默认为空)
spring.redis.password=WebRedis999
# 连接池最大连接数(使用负值表示没有限制)
spring.redis.pool.max-active=30
# 连接池最大阻塞等待时间(使用负值表示没有限制)
spring.redis.pool.max-wait=-1
# 连接池中的最大空闲连接
spring.redis.pool.max-idle=8
# 连接池中的最小空闲连接
spring.redis.pool.min-idle=0
# 连接超时时间(毫秒)
spring.redis.timeout=0
#如果本服务为api服务,可以进行如下配置
#是否开始debug模式,false加密并且验签。true调试模式,不加密,不验签
rest.api.debug=true
#编码
rest.api.charset=utf-8
#加密secret_key
rest.api.secretkey=FoK28EsYrxuiM3ohnAurFGm2uGAHyijL
wx.account=gh_ff7f879ae369
wx.app.id=wx2bdaa55e4749f52a
wx.app.secret=0ebb5e74318f510266101e73f091c218
wx.tocken=64be1d2d249a460bb5c39d565f013d90
wx.http.danmu.url=
wx.http.url=http://kzy-wx.jimijiayuan.cn
#有拍云
remoteFileUrl = http://upai.yxvzb.com/
upyun.bucket=yxvzb
upyun.username=liuruichao
upyun.password=liuruichao123
upyun.baseDir=/images/
\ No newline at end of file
log4j.rootLogger=info,stdout,E
log4j.logger.com.server.web.common.mapper=INFO
##########控制台#############
log4j.appender.stdout = org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target = System.out
log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern = %d{ABSOLUTE} %5p %c{1}:%L - %m%n
##########ERROR#############
log4j.appender.E = org.apache.log4j.RollingFileAppender
log4j.appender.E.File = ../error.log
log4j.appender.E.MaxFileSize = 10240KB
log4j.appender.E.Encoding = UTF-8
log4j.appender.E.Threshold = ERROR
log4j.appender.E.layout = org.apache.log4j.PatternLayout
log4j.appender.E.MaxBackupIndex = 10
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!