Browse Source

Merge branch 'master' of http://git.huojutech.com/wzwHUOJU/huo_zuan.git

Conflicts:
	huozuan/src/main/resources/application-dev.properties
cong 6 years ago
parent
commit
b3feb580cc
56 changed files with 8726 additions and 8725 deletions
  1. 24 24
      huozuan/.gitignore
  2. 17 17
      huozuan/README.md
  3. 25 25
      huozuan/src/main/java/com/huojutech/DTO/TestDTO.java
  4. 22 22
      huozuan/src/main/java/com/huojutech/HuozuanApplication.java
  5. 104 104
      huozuan/src/main/java/com/huojutech/config/DruidDataSourceConfig.java
  6. 27 27
      huozuan/src/main/java/com/huojutech/config/MybatisConfig.java
  7. 61 61
      huozuan/src/main/java/com/huojutech/config/RedisCacheConfig.java
  8. 49 49
      huozuan/src/main/java/com/huojutech/config/Swagger2Configuration.java
  9. 64 64
      huozuan/src/main/java/com/huojutech/config/txConfig.java
  10. 1 1
      huozuan/src/main/java/com/huojutech/controller/TestController.java
  11. 22 22
      huozuan/src/main/java/com/huojutech/dao/DiamondRecordMapper.java
  12. 22 22
      huozuan/src/main/java/com/huojutech/dao/StockForecastCollectMapper.java
  13. 26 26
      huozuan/src/main/java/com/huojutech/dao/StockForecastMapper.java
  14. 22 22
      huozuan/src/main/java/com/huojutech/dao/StockForecastVoteMapper.java
  15. 22 22
      huozuan/src/main/java/com/huojutech/dao/StockOptionalMapper.java
  16. 22 22
      huozuan/src/main/java/com/huojutech/dao/SystemConfigMapper.java
  17. 18 18
      huozuan/src/main/java/com/huojutech/dao/TestDao.java
  18. 22 22
      huozuan/src/main/java/com/huojutech/dao/UserConcernMapper.java
  19. 22 22
      huozuan/src/main/java/com/huojutech/dao/UserMapper.java
  20. 85 85
      huozuan/src/main/java/com/huojutech/entity/DiamondRecord.java
  21. 701 701
      huozuan/src/main/java/com/huojutech/entity/DiamondRecordExample.java
  22. 155 155
      huozuan/src/main/java/com/huojutech/entity/StockForecast.java
  23. 54 54
      huozuan/src/main/java/com/huojutech/entity/StockForecastCollect.java
  24. 500 500
      huozuan/src/main/java/com/huojutech/entity/StockForecastCollectExample.java
  25. 1088 1088
      huozuan/src/main/java/com/huojutech/entity/StockForecastExample.java
  26. 85 85
      huozuan/src/main/java/com/huojutech/entity/StockForecastVote.java
  27. 681 681
      huozuan/src/main/java/com/huojutech/entity/StockForecastVoteExample.java
  28. 64 64
      huozuan/src/main/java/com/huojutech/entity/StockOptional.java
  29. 580 580
      huozuan/src/main/java/com/huojutech/entity/StockOptionalExample.java
  30. 64 64
      huozuan/src/main/java/com/huojutech/entity/SystemConfig.java
  31. 580 580
      huozuan/src/main/java/com/huojutech/entity/SystemConfigExample.java
  32. 125 125
      huozuan/src/main/java/com/huojutech/entity/User.java
  33. 54 54
      huozuan/src/main/java/com/huojutech/entity/UserConcern.java
  34. 500 500
      huozuan/src/main/java/com/huojutech/entity/UserConcernExample.java
  35. 971 971
      huozuan/src/main/java/com/huojutech/entity/UserExample.java
  36. 32 32
      huozuan/src/main/java/com/huojutech/enums/ResultEnum.java
  37. 29 29
      huozuan/src/main/java/com/huojutech/exception/GlobalExceptionHandler.java
  38. 38 38
      huozuan/src/main/java/com/huojutech/service/Impl/TestServiceImpl.java
  39. 12 12
      huozuan/src/main/java/com/huojutech/service/TestService.java
  40. 28 28
      huozuan/src/main/java/com/huojutech/utils/ResultVOUtil.java
  41. 42 42
      huozuan/src/main/java/com/huojutech/vo/ResultVO.java
  42. 3 2
      huozuan/src/main/resources/application-dev.properties
  43. 49 49
      huozuan/src/main/resources/application-loc.properties
  44. 83 83
      huozuan/src/main/resources/generatorConfig.xml
  45. 59 59
      huozuan/src/main/resources/logback.xml
  46. 171 171
      huozuan/src/main/resources/mappers/DiamondRecordMapper.xml
  47. 136 136
      huozuan/src/main/resources/mappers/StockForecastCollectMapper.xml
  48. 294 294
      huozuan/src/main/resources/mappers/StockForecastMapper.xml
  49. 171 171
      huozuan/src/main/resources/mappers/StockForecastVoteMapper.xml
  50. 147 147
      huozuan/src/main/resources/mappers/StockOptionalMapper.xml
  51. 147 147
      huozuan/src/main/resources/mappers/SystemConfigMapper.xml
  52. 11 11
      huozuan/src/main/resources/mappers/TestDao.xml
  53. 136 136
      huozuan/src/main/resources/mappers/UserConcernMapper.xml
  54. 218 218
      huozuan/src/main/resources/mappers/UserMapper.xml
  55. 16 16
      huozuan/src/test/java/com/huojutech/HuozuanApplicationTests.java
  56. 25 25
      huozuan/src/test/java/com/huojutech/TestString.java

+ 24 - 24
huozuan/.gitignore

@@ -1,25 +1,25 @@
1
-/target/
2
-!.mvn/wrapper/maven-wrapper.jar
3
-
4
-### STS ###
5
-.apt_generated
6
-.classpath
7
-.factorypath
8
-.project
9
-.settings
10
-.springBeans
11
-.sts4-cache
12
-
13
-### IntelliJ IDEA ###
14
-.idea
15
-*.iws
16
-*.iml
17
-*.ipr
18
-
19
-### NetBeans ###
20
-/nbproject/private/
21
-/build/
22
-/nbbuild/
23
-/dist/
24
-/nbdist/
1
+/target/
2
+!.mvn/wrapper/maven-wrapper.jar
3
+
4
+### STS ###
5
+.apt_generated
6
+.classpath
7
+.factorypath
8
+.project
9
+.settings
10
+.springBeans
11
+.sts4-cache
12
+
13
+### IntelliJ IDEA ###
14
+.idea
15
+*.iws
16
+*.iml
17
+*.ipr
18
+
19
+### NetBeans ###
20
+/nbproject/private/
21
+/build/
22
+/nbbuild/
23
+/dist/
24
+/nbdist/
25 25
 /.nb-gradle/

+ 17 - 17
huozuan/README.md

@@ -1,17 +1,17 @@
1
-# spring_boot_demo
2
-
3
-#README
4
-
5
-#现集成功能:
6
-    springboot
7
-    Mybatis 
8
-    Druid
9
-    Redis
10
-    Mongodb
11
-    Swagger
12
-    
13
-	
14
-##
15
-swagger访问地址:服务基地址+/swagger-ui.html   eg:http://localhost:8080/swagger-ui.html
16
-##
17
-Druid监控访问地址:服务基地址+/druid/index.html
1
+# spring_boot_demo
2
+
3
+#README
4
+
5
+#现集成功能:
6
+    springboot
7
+    Mybatis 
8
+    Druid
9
+    Redis
10
+    Mongodb
11
+    Swagger
12
+    
13
+	
14
+##
15
+swagger访问地址:服务基地址+/swagger-ui.html   eg:http://localhost:8080/swagger-ui.html
16
+##
17
+Druid监控访问地址:服务基地址+/druid/index.html

+ 25 - 25
huozuan/src/main/java/com/huojutech/DTO/TestDTO.java

@@ -1,25 +1,25 @@
1
-package com.huojutech.DTO;
2
-
3
-/**
4
- * Created by Wangzw on 2018\4\16 0016.
5
- */
6
-
7
-public class TestDTO {
8
-
9
-    private String name;
10
-
11
-    private String pwd;
12
-
13
-    public String getName() {
14
-        return name;
15
-    }
16
-
17
-    public void setName(String name) {
18
-        this.name = name;
19
-    }
20
-
21
-    public String getPwd() {
22
-        return pwd;
23
-    }
24
-}
25
-
1
+package com.huojutech.DTO;
2
+
3
+/**
4
+ * Created by Wangzw on 2018\4\16 0016.
5
+ */
6
+
7
+public class TestDTO {
8
+
9
+    private String name;
10
+
11
+    private String pwd;
12
+
13
+    public String getName() {
14
+        return name;
15
+    }
16
+
17
+    public void setName(String name) {
18
+        this.name = name;
19
+    }
20
+
21
+    public String getPwd() {
22
+        return pwd;
23
+    }
24
+}
25
+

+ 22 - 22
huozuan/src/main/java/com/huojutech/HuozuanApplication.java

@@ -1,22 +1,22 @@
1
-package com.huojutech;
2
-
3
-
4
-import org.mybatis.spring.annotation.MapperScan;
5
-import org.springframework.boot.SpringApplication;
6
-import org.springframework.boot.autoconfigure.SpringBootApplication;
7
-import org.springframework.boot.web.servlet.ServletComponentScan;
8
-import org.springframework.cache.annotation.EnableCaching;
9
-import org.springframework.transaction.annotation.EnableTransactionManagement;
10
-
11
-@ServletComponentScan
12
-//设置启动时spring能够扫描到我们自己编写的servlet和filter, 用于Druid监控@ServletComponentScan
13
-@SpringBootApplication
14
-@MapperScan(basePackages = "com.huojutech.dao")
15
-@EnableCaching
16
-@EnableTransactionManagement
17
-public class HuozuanApplication {
18
-
19
-	public static void main(String[] args) {
20
-		SpringApplication.run(HuozuanApplication.class, args);
21
-	}
22
-}
1
+package com.huojutech;
2
+
3
+
4
+import org.mybatis.spring.annotation.MapperScan;
5
+import org.springframework.boot.SpringApplication;
6
+import org.springframework.boot.autoconfigure.SpringBootApplication;
7
+import org.springframework.boot.web.servlet.ServletComponentScan;
8
+import org.springframework.cache.annotation.EnableCaching;
9
+import org.springframework.transaction.annotation.EnableTransactionManagement;
10
+
11
+@ServletComponentScan
12
+//设置启动时spring能够扫描到我们自己编写的servlet和filter, 用于Druid监控@ServletComponentScan
13
+@SpringBootApplication
14
+@MapperScan(basePackages = "com.huojutech.dao")
15
+@EnableCaching
16
+@EnableTransactionManagement
17
+public class HuozuanApplication {
18
+
19
+	public static void main(String[] args) {
20
+		SpringApplication.run(HuozuanApplication.class, args);
21
+	}
22
+}

+ 104 - 104
huozuan/src/main/java/com/huojutech/config/DruidDataSourceConfig.java

@@ -1,104 +1,104 @@
1
-package com.huojutech.config;
2
-
3
-import com.alibaba.druid.pool.DruidDataSource;
4
-import com.alibaba.druid.support.http.StatViewServlet;
5
-import com.alibaba.druid.support.http.WebStatFilter;
6
-import com.alibaba.druid.support.spring.stat.DruidStatInterceptor;
7
-import org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator;
8
-import org.springframework.boot.bind.RelaxedPropertyResolver;
9
-import org.springframework.boot.web.servlet.FilterRegistrationBean;
10
-import org.springframework.boot.web.servlet.ServletRegistrationBean;
11
-import org.springframework.context.EnvironmentAware;
12
-import org.springframework.context.annotation.Bean;
13
-import org.springframework.context.annotation.Configuration;
14
-import org.springframework.core.env.Environment;
15
-import org.springframework.transaction.annotation.EnableTransactionManagement;
16
-
17
-import javax.sql.DataSource;
18
-import java.sql.SQLException;
19
-import java.util.HashMap;
20
-import java.util.Map;
21
-
22
-/**
23
- * TODO Druid的DataResource配置类
24
- * 凡是被Spring管理的类,实现接口 EnvironmentAware 重写方法 setEnvironment 可以在工程启动时,
25
- * 获取到系统环境变量和application配置文件中的变量。 还有一种方式是采用注解的方式获取 @value("${变量的key值}")
26
- * 获取application配置文件中的变量
27
- * Created by Wangzw on 2018\4\11 0011.
28
- */
29
-@Configuration
30
-@EnableTransactionManagement
31
-public class DruidDataSourceConfig implements EnvironmentAware{
32
-
33
-
34
-    private RelaxedPropertyResolver propertyResolver;
35
-
36
-    public void setEnvironment(Environment env) {
37
-        this.propertyResolver = new RelaxedPropertyResolver(env, "spring.datasource.");
38
-    }
39
-
40
-    @Bean
41
-    public DataSource dataSource() {
42
-        DruidDataSource datasource = new DruidDataSource();
43
-        datasource.setUrl(propertyResolver.getProperty("url"));
44
-        datasource.setDriverClassName(propertyResolver.getProperty("driver-class-name"));
45
-        datasource.setUsername(propertyResolver.getProperty("username"));
46
-        datasource.setPassword(propertyResolver.getProperty("password"));
47
-        datasource.setInitialSize(Integer.valueOf(propertyResolver.getProperty("initialSize")));
48
-        datasource.setMinIdle(Integer.valueOf(propertyResolver.getProperty("minIdle")));
49
-        datasource.setMaxWait(Long.valueOf(propertyResolver.getProperty("maxWait")));
50
-        datasource.setMaxActive(Integer.valueOf(propertyResolver.getProperty("maxActive")));
51
-        datasource.setMinEvictableIdleTimeMillis(
52
-                Long.valueOf(propertyResolver.getProperty("minEvictableIdleTimeMillis")));
53
-        try {
54
-            datasource.setFilters("stat,wall");
55
-        } catch (SQLException e) {
56
-            e.printStackTrace();
57
-        }
58
-        return datasource;
59
-    }
60
-
61
-    @Bean
62
-    public ServletRegistrationBean druidServlet() {
63
-        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean();
64
-        servletRegistrationBean.setServlet(new StatViewServlet());
65
-        servletRegistrationBean.addUrlMappings("/druid/*");
66
-        Map<String, String> initParameters = new HashMap<String, String>();
67
-        // initParameters.put("loginUsername", "druid");// 用户名
68
-        // initParameters.put("loginPassword", "druid");// 密码
69
-        initParameters.put("resetEnable", "false");// 禁用HTML页面上的“Reset All”功能
70
-        //initParameters.put("allow", "127.0.0.1"); // IP白名单 (没有配置或者为空,则允许所有访问)
71
-        // initParameters.put("deny", "192.168.20.38");// IP黑名单
72
-        // (存在共同时,deny优先于allow)
73
-        servletRegistrationBean.setInitParameters(initParameters);
74
-        return servletRegistrationBean;
75
-    }
76
-
77
-    @Bean
78
-    public FilterRegistrationBean filterRegistrationBean() {
79
-        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
80
-        filterRegistrationBean.setFilter(new WebStatFilter());
81
-        filterRegistrationBean.addUrlPatterns("/*");
82
-        //忽略资源
83
-        filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*");
84
-        return filterRegistrationBean;
85
-    }
86
-
87
-    // 按照BeanId来拦截配置 用来bean的监控
88
-    @Bean(value = "druid-stat-interceptor")
89
-    public DruidStatInterceptor DruidStatInterceptor() {
90
-        DruidStatInterceptor druidStatInterceptor = new DruidStatInterceptor();
91
-        return druidStatInterceptor;
92
-    }
93
-
94
-    @Bean
95
-    public BeanNameAutoProxyCreator beanNameAutoProxyCreator() {
96
-        BeanNameAutoProxyCreator beanNameAutoProxyCreator = new BeanNameAutoProxyCreator();
97
-        beanNameAutoProxyCreator.setProxyTargetClass(true);
98
-        // 设置要监控的bean的id
99
-        //beanNameAutoProxyCreator.setBeanNames("sysRoleMapper","loginController");
100
-        beanNameAutoProxyCreator.setInterceptorNames("druid-stat-interceptor");
101
-        return beanNameAutoProxyCreator;
102
-    }
103
-}
104
-
1
+package com.huojutech.config;
2
+
3
+import com.alibaba.druid.pool.DruidDataSource;
4
+import com.alibaba.druid.support.http.StatViewServlet;
5
+import com.alibaba.druid.support.http.WebStatFilter;
6
+import com.alibaba.druid.support.spring.stat.DruidStatInterceptor;
7
+import org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator;
8
+import org.springframework.boot.bind.RelaxedPropertyResolver;
9
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
10
+import org.springframework.boot.web.servlet.ServletRegistrationBean;
11
+import org.springframework.context.EnvironmentAware;
12
+import org.springframework.context.annotation.Bean;
13
+import org.springframework.context.annotation.Configuration;
14
+import org.springframework.core.env.Environment;
15
+import org.springframework.transaction.annotation.EnableTransactionManagement;
16
+
17
+import javax.sql.DataSource;
18
+import java.sql.SQLException;
19
+import java.util.HashMap;
20
+import java.util.Map;
21
+
22
+/**
23
+ * TODO Druid的DataResource配置类
24
+ * 凡是被Spring管理的类,实现接口 EnvironmentAware 重写方法 setEnvironment 可以在工程启动时,
25
+ * 获取到系统环境变量和application配置文件中的变量。 还有一种方式是采用注解的方式获取 @value("${变量的key值}")
26
+ * 获取application配置文件中的变量
27
+ * Created by Wangzw on 2018\4\11 0011.
28
+ */
29
+@Configuration
30
+@EnableTransactionManagement
31
+public class DruidDataSourceConfig implements EnvironmentAware{
32
+
33
+
34
+    private RelaxedPropertyResolver propertyResolver;
35
+
36
+    public void setEnvironment(Environment env) {
37
+        this.propertyResolver = new RelaxedPropertyResolver(env, "spring.datasource.");
38
+    }
39
+
40
+    @Bean
41
+    public DataSource dataSource() {
42
+        DruidDataSource datasource = new DruidDataSource();
43
+        datasource.setUrl(propertyResolver.getProperty("url"));
44
+        datasource.setDriverClassName(propertyResolver.getProperty("driver-class-name"));
45
+        datasource.setUsername(propertyResolver.getProperty("username"));
46
+        datasource.setPassword(propertyResolver.getProperty("password"));
47
+        datasource.setInitialSize(Integer.valueOf(propertyResolver.getProperty("initialSize")));
48
+        datasource.setMinIdle(Integer.valueOf(propertyResolver.getProperty("minIdle")));
49
+        datasource.setMaxWait(Long.valueOf(propertyResolver.getProperty("maxWait")));
50
+        datasource.setMaxActive(Integer.valueOf(propertyResolver.getProperty("maxActive")));
51
+        datasource.setMinEvictableIdleTimeMillis(
52
+                Long.valueOf(propertyResolver.getProperty("minEvictableIdleTimeMillis")));
53
+        try {
54
+            datasource.setFilters("stat,wall");
55
+        } catch (SQLException e) {
56
+            e.printStackTrace();
57
+        }
58
+        return datasource;
59
+    }
60
+
61
+    @Bean
62
+    public ServletRegistrationBean druidServlet() {
63
+        ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean();
64
+        servletRegistrationBean.setServlet(new StatViewServlet());
65
+        servletRegistrationBean.addUrlMappings("/druid/*");
66
+        Map<String, String> initParameters = new HashMap<String, String>();
67
+        // initParameters.put("loginUsername", "druid");// 用户名
68
+        // initParameters.put("loginPassword", "druid");// 密码
69
+        initParameters.put("resetEnable", "false");// 禁用HTML页面上的“Reset All”功能
70
+        //initParameters.put("allow", "127.0.0.1"); // IP白名单 (没有配置或者为空,则允许所有访问)
71
+        // initParameters.put("deny", "192.168.20.38");// IP黑名单
72
+        // (存在共同时,deny优先于allow)
73
+        servletRegistrationBean.setInitParameters(initParameters);
74
+        return servletRegistrationBean;
75
+    }
76
+
77
+    @Bean
78
+    public FilterRegistrationBean filterRegistrationBean() {
79
+        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
80
+        filterRegistrationBean.setFilter(new WebStatFilter());
81
+        filterRegistrationBean.addUrlPatterns("/*");
82
+        //忽略资源
83
+        filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*");
84
+        return filterRegistrationBean;
85
+    }
86
+
87
+    // 按照BeanId来拦截配置 用来bean的监控
88
+    @Bean(value = "druid-stat-interceptor")
89
+    public DruidStatInterceptor DruidStatInterceptor() {
90
+        DruidStatInterceptor druidStatInterceptor = new DruidStatInterceptor();
91
+        return druidStatInterceptor;
92
+    }
93
+
94
+    @Bean
95
+    public BeanNameAutoProxyCreator beanNameAutoProxyCreator() {
96
+        BeanNameAutoProxyCreator beanNameAutoProxyCreator = new BeanNameAutoProxyCreator();
97
+        beanNameAutoProxyCreator.setProxyTargetClass(true);
98
+        // 设置要监控的bean的id
99
+        //beanNameAutoProxyCreator.setBeanNames("sysRoleMapper","loginController");
100
+        beanNameAutoProxyCreator.setInterceptorNames("druid-stat-interceptor");
101
+        return beanNameAutoProxyCreator;
102
+    }
103
+}
104
+

+ 27 - 27
huozuan/src/main/java/com/huojutech/config/MybatisConfig.java

@@ -1,27 +1,27 @@
1
-package com.huojutech.config;
2
-
3
-import com.github.pagehelper.PageHelper;
4
-import org.springframework.context.annotation.Bean;
5
-import org.springframework.context.annotation.Configuration;
6
-
7
-import java.util.Properties;
8
-
9
-/**
10
- * TODO Mybatis 插件pageHelper配置
11
- * Created by Wangzw on 2018\4\11 0011.
12
- */
13
-@Configuration
14
-public class MybatisConfig {
15
-    @Bean
16
-    public PageHelper pageHelper() {
17
-        System.out.println("MyBatisConfiguration.pageHelper()");
18
-        PageHelper pageHelper = new PageHelper();
19
-        Properties p = new Properties();
20
-        p.setProperty("offsetAsPageNum", "true");
21
-        p.setProperty("rowBoundsWithCount", "true");
22
-        p.setProperty("reasonable", "true");
23
-        pageHelper.setProperties(p);
24
-        return pageHelper;
25
-    }
26
-}
27
-
1
+package com.huojutech.config;
2
+
3
+import com.github.pagehelper.PageHelper;
4
+import org.springframework.context.annotation.Bean;
5
+import org.springframework.context.annotation.Configuration;
6
+
7
+import java.util.Properties;
8
+
9
+/**
10
+ * TODO Mybatis 插件pageHelper配置
11
+ * Created by Wangzw on 2018\4\11 0011.
12
+ */
13
+@Configuration
14
+public class MybatisConfig {
15
+    @Bean
16
+    public PageHelper pageHelper() {
17
+        System.out.println("MyBatisConfiguration.pageHelper()");
18
+        PageHelper pageHelper = new PageHelper();
19
+        Properties p = new Properties();
20
+        p.setProperty("offsetAsPageNum", "true");
21
+        p.setProperty("rowBoundsWithCount", "true");
22
+        p.setProperty("reasonable", "true");
23
+        pageHelper.setProperties(p);
24
+        return pageHelper;
25
+    }
26
+}
27
+

+ 61 - 61
huozuan/src/main/java/com/huojutech/config/RedisCacheConfig.java

@@ -1,61 +1,61 @@
1
-package com.huojutech.config;
2
-
3
-import com.fasterxml.jackson.annotation.JsonAutoDetect;
4
-import com.fasterxml.jackson.annotation.PropertyAccessor;
5
-import com.fasterxml.jackson.databind.ObjectMapper;
6
-import org.springframework.cache.CacheManager;
7
-import org.springframework.cache.annotation.EnableCaching;
8
-import org.springframework.context.annotation.Bean;
9
-import org.springframework.context.annotation.Configuration;
10
-import org.springframework.data.redis.cache.RedisCacheManager;
11
-import org.springframework.data.redis.connection.RedisConnectionFactory;
12
-import org.springframework.data.redis.core.RedisTemplate;
13
-import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
14
-import org.springframework.data.redis.serializer.StringRedisSerializer;
15
-
16
-/**
17
- * TODO  redis配置类
18
- * Created by Wangzw on 2018\4\11 0011.
19
- */
20
-@Configuration
21
-@EnableCaching
22
-public class RedisCacheConfig {
23
-
24
-    @SuppressWarnings("rawtypes")
25
-    @Bean
26
-    public CacheManager cacheManager(RedisTemplate redisTemplate) {
27
-        RedisCacheManager rcm = new RedisCacheManager(redisTemplate);
28
-        // 多个缓存的名称,目前只定义了一个
29
-//        rcm.setCacheNames(Arrays.asList("redis-one"));
30
-        //设置缓存过期时间(秒)
31
-        rcm.setDefaultExpiration(10000);
32
-        return rcm;
33
-    }
34
-
35
-    /**
36
-     * redisTemplate 序列化使用的jdkSerializeable, 存储二进制字节码, 所以自定义序列化类
37
-     * @param redisConnectionFactory redis连接工厂类
38
-     * @return RedisTemplate
39
-     */
40
-    @Bean
41
-    public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
42
-        RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<>();
43
-        redisTemplate.setConnectionFactory(redisConnectionFactory);
44
-
45
-        // 使用Jackson2JsonRedisSerialize 替换默认序列化
46
-        Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
47
-
48
-        ObjectMapper objectMapper = new ObjectMapper();
49
-        objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
50
-        objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
51
-
52
-        jackson2JsonRedisSerializer.setObjectMapper(objectMapper);
53
-
54
-        // 设置value的序列化规则和 key的序列化规则
55
-        redisTemplate.setKeySerializer(new StringRedisSerializer());
56
-        redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);
57
-        redisTemplate.afterPropertiesSet();
58
-        return redisTemplate;
59
-    }
60
-}
61
-
1
+package com.huojutech.config;
2
+
3
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
4
+import com.fasterxml.jackson.annotation.PropertyAccessor;
5
+import com.fasterxml.jackson.databind.ObjectMapper;
6
+import org.springframework.cache.CacheManager;
7
+import org.springframework.cache.annotation.EnableCaching;
8
+import org.springframework.context.annotation.Bean;
9
+import org.springframework.context.annotation.Configuration;
10
+import org.springframework.data.redis.cache.RedisCacheManager;
11
+import org.springframework.data.redis.connection.RedisConnectionFactory;
12
+import org.springframework.data.redis.core.RedisTemplate;
13
+import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
14
+import org.springframework.data.redis.serializer.StringRedisSerializer;
15
+
16
+/**
17
+ * TODO  redis配置类
18
+ * Created by Wangzw on 2018\4\11 0011.
19
+ */
20
+@Configuration
21
+@EnableCaching
22
+public class RedisCacheConfig {
23
+
24
+    @SuppressWarnings("rawtypes")
25
+    @Bean
26
+    public CacheManager cacheManager(RedisTemplate redisTemplate) {
27
+        RedisCacheManager rcm = new RedisCacheManager(redisTemplate);
28
+        // 多个缓存的名称,目前只定义了一个
29
+//        rcm.setCacheNames(Arrays.asList("redis-one"));
30
+        //设置缓存过期时间(秒)
31
+        rcm.setDefaultExpiration(10000);
32
+        return rcm;
33
+    }
34
+
35
+    /**
36
+     * redisTemplate 序列化使用的jdkSerializeable, 存储二进制字节码, 所以自定义序列化类
37
+     * @param redisConnectionFactory redis连接工厂类
38
+     * @return RedisTemplate
39
+     */
40
+    @Bean
41
+    public RedisTemplate<Object, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory) {
42
+        RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<>();
43
+        redisTemplate.setConnectionFactory(redisConnectionFactory);
44
+
45
+        // 使用Jackson2JsonRedisSerialize 替换默认序列化
46
+        Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
47
+
48
+        ObjectMapper objectMapper = new ObjectMapper();
49
+        objectMapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
50
+        objectMapper.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
51
+
52
+        jackson2JsonRedisSerializer.setObjectMapper(objectMapper);
53
+
54
+        // 设置value的序列化规则和 key的序列化规则
55
+        redisTemplate.setKeySerializer(new StringRedisSerializer());
56
+        redisTemplate.setValueSerializer(jackson2JsonRedisSerializer);
57
+        redisTemplate.afterPropertiesSet();
58
+        return redisTemplate;
59
+    }
60
+}
61
+

+ 49 - 49
huozuan/src/main/java/com/huojutech/config/Swagger2Configuration.java

@@ -1,49 +1,49 @@
1
-package com.huojutech.config;
2
-
3
-
4
-import org.springframework.context.annotation.Bean;
5
-import org.springframework.context.annotation.Configuration;
6
-
7
-import com.google.common.collect.Sets;
8
-
9
-import springfox.documentation.builders.ApiInfoBuilder;
10
-import springfox.documentation.builders.PathSelectors;
11
-import springfox.documentation.builders.RequestHandlerSelectors;
12
-import springfox.documentation.service.ApiInfo;
13
-import springfox.documentation.service.Contact;
14
-import springfox.documentation.spi.DocumentationType;
15
-import springfox.documentation.spring.web.plugins.Docket;
16
-import springfox.documentation.swagger2.annotations.EnableSwagger2;
17
-
18
-/***
19
-  * TODO  日志配置文件
20
-  * Create_By  Wangzw
21
-  * 2018\4\11 0011
22
- */
23
-@Configuration
24
-@EnableSwagger2
25
-public class Swagger2Configuration {
26
-	
27
-	@Bean
28
-	public Docket configSpringfoxDocketForAgent() {
29
-		return new Docket(DocumentationType.SWAGGER_2)
30
-				.groupName("火钻接口文档")
31
-				.protocols(Sets.newHashSet("http"))
32
-//				.enable(Constants.SWAGGER_ENABLE)
33
-				.forCodeGeneration(true).select()
34
-				.paths(PathSelectors.any())
35
-//				.paths(regex("/account/.*"))//只显示请求路径是account下的注释
36
-				.apis(RequestHandlerSelectors.basePackage("com.huojutech.controller"))
37
-				.build().apiInfo(apiInfo());
38
-	}
39
-
40
-	private ApiInfo apiInfo() {
41
-		return new ApiInfoBuilder()
42
-				.title("火钻接口服务")// 标题
43
-				.description("系统API接口文档")// 描述
44
-				.termsOfServiceUrl("http://www.huojutech.com")//
45
-				.contact(new Contact("Wangzw", "http://www.huojutech.com", "997663551@qq.com"))// 联系,创建人
46
-				.version("1.0")// 版本
47
-				.build();
48
-	}
49
-}
1
+package com.huojutech.config;
2
+
3
+
4
+import org.springframework.context.annotation.Bean;
5
+import org.springframework.context.annotation.Configuration;
6
+
7
+import com.google.common.collect.Sets;
8
+
9
+import springfox.documentation.builders.ApiInfoBuilder;
10
+import springfox.documentation.builders.PathSelectors;
11
+import springfox.documentation.builders.RequestHandlerSelectors;
12
+import springfox.documentation.service.ApiInfo;
13
+import springfox.documentation.service.Contact;
14
+import springfox.documentation.spi.DocumentationType;
15
+import springfox.documentation.spring.web.plugins.Docket;
16
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
17
+
18
+/***
19
+  * TODO  日志配置文件
20
+  * Create_By  Wangzw
21
+  * 2018\4\11 0011
22
+ */
23
+@Configuration
24
+@EnableSwagger2
25
+public class Swagger2Configuration {
26
+	
27
+	@Bean
28
+	public Docket configSpringfoxDocketForAgent() {
29
+		return new Docket(DocumentationType.SWAGGER_2)
30
+				.groupName("火钻接口文档")
31
+				.protocols(Sets.newHashSet("http"))
32
+//				.enable(Constants.SWAGGER_ENABLE)
33
+				.forCodeGeneration(true).select()
34
+				.paths(PathSelectors.any())
35
+//				.paths(regex("/account/.*"))//只显示请求路径是account下的注释
36
+				.apis(RequestHandlerSelectors.basePackage("com.huojutech.controller"))
37
+				.build().apiInfo(apiInfo());
38
+	}
39
+
40
+	private ApiInfo apiInfo() {
41
+		return new ApiInfoBuilder()
42
+				.title("火钻接口服务")// 标题
43
+				.description("系统API接口文档")// 描述
44
+				.termsOfServiceUrl("http://www.huojutech.com")//
45
+				.contact(new Contact("Wangzw", "http://www.huojutech.com", "997663551@qq.com"))// 联系,创建人
46
+				.version("1.0")// 版本
47
+				.build();
48
+	}
49
+}

+ 64 - 64
huozuan/src/main/java/com/huojutech/config/txConfig.java

@@ -1,64 +1,64 @@
1
-package com.huojutech.config;
2
-
3
-import org.aspectj.lang.annotation.Aspect;
4
-import org.springframework.aop.Advisor;
5
-import org.springframework.aop.aspectj.AspectJExpressionPointcut;
6
-import org.springframework.aop.support.DefaultPointcutAdvisor;
7
-import org.springframework.beans.factory.annotation.Autowired;
8
-import org.springframework.context.annotation.Bean;
9
-import org.springframework.context.annotation.Configuration;
10
-import org.springframework.transaction.PlatformTransactionManager;
11
-import org.springframework.transaction.TransactionDefinition;
12
-import org.springframework.transaction.interceptor.*;
13
-
14
-import java.util.Collections;
15
-import java.util.HashMap;
16
-import java.util.Map;
17
-
18
-/**
19
- * TODO 事务管理器配置
20
- * Created by Wangzw on 2018\4\11 0011.
21
- */
22
-@Aspect
23
-@Configuration
24
-public class txConfig {
25
-    private static final int TX_METHOD_TIMEOUT = 5;
26
-    private static final String AOP_POINTCUT_EXPRESSION = "execution (* com.huojutech.service.*.*(..))";
27
-    @Autowired
28
-    private PlatformTransactionManager transactionManager;
29
-    @Bean
30
-    public TransactionInterceptor txAdvice() {
31
-        NameMatchTransactionAttributeSource source = new NameMatchTransactionAttributeSource();
32
-     /*只读事务,不做更新操作*/
33
-        RuleBasedTransactionAttribute readOnlyTx = new RuleBasedTransactionAttribute();
34
-        readOnlyTx.setReadOnly(true);
35
-        readOnlyTx.setPropagationBehavior(TransactionDefinition.PROPAGATION_NOT_SUPPORTED );
36
-    /*当前存在事务就使用当前事务,当前不存在事务就创建一个新的事务*/
37
-        RuleBasedTransactionAttribute requiredTx = new RuleBasedTransactionAttribute();
38
-        requiredTx.setRollbackRules(
39
-                Collections.singletonList(new RollbackRuleAttribute(Exception.class)));
40
-        requiredTx.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
41
-        requiredTx.setTimeout(TX_METHOD_TIMEOUT);
42
-        Map<String, TransactionAttribute> txMap = new HashMap<>();
43
-        txMap.put("add*", requiredTx);
44
-        txMap.put("save*", requiredTx);
45
-        txMap.put("insert*", requiredTx);
46
-        txMap.put("update*", requiredTx);
47
-        txMap.put("delete*", requiredTx);
48
-        txMap.put("get*", readOnlyTx);
49
-        txMap.put("query*", readOnlyTx);
50
-        source.setNameMap( txMap );
51
-        TransactionInterceptor txAdvice = new TransactionInterceptor(transactionManager, source);
52
-        return txAdvice;
53
-    }
54
-    @Bean
55
-    public Advisor txAdviceAdvisor() {
56
-        AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
57
-        pointcut.setExpression(AOP_POINTCUT_EXPRESSION);
58
-        return new DefaultPointcutAdvisor(pointcut, txAdvice());
59
-        //return new DefaultPointcutAdvisor(pointcut, txAdvice);
60
-    }
61
-
62
-
63
-}
64
-
1
+package com.huojutech.config;
2
+
3
+import org.aspectj.lang.annotation.Aspect;
4
+import org.springframework.aop.Advisor;
5
+import org.springframework.aop.aspectj.AspectJExpressionPointcut;
6
+import org.springframework.aop.support.DefaultPointcutAdvisor;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.context.annotation.Bean;
9
+import org.springframework.context.annotation.Configuration;
10
+import org.springframework.transaction.PlatformTransactionManager;
11
+import org.springframework.transaction.TransactionDefinition;
12
+import org.springframework.transaction.interceptor.*;
13
+
14
+import java.util.Collections;
15
+import java.util.HashMap;
16
+import java.util.Map;
17
+
18
+/**
19
+ * TODO 事务管理器配置
20
+ * Created by Wangzw on 2018\4\11 0011.
21
+ */
22
+@Aspect
23
+@Configuration
24
+public class txConfig {
25
+    private static final int TX_METHOD_TIMEOUT = 5;
26
+    private static final String AOP_POINTCUT_EXPRESSION = "execution (* com.huojutech.service.*.*(..))";
27
+    @Autowired
28
+    private PlatformTransactionManager transactionManager;
29
+    @Bean
30
+    public TransactionInterceptor txAdvice() {
31
+        NameMatchTransactionAttributeSource source = new NameMatchTransactionAttributeSource();
32
+     /*只读事务,不做更新操作*/
33
+        RuleBasedTransactionAttribute readOnlyTx = new RuleBasedTransactionAttribute();
34
+        readOnlyTx.setReadOnly(true);
35
+        readOnlyTx.setPropagationBehavior(TransactionDefinition.PROPAGATION_NOT_SUPPORTED );
36
+    /*当前存在事务就使用当前事务,当前不存在事务就创建一个新的事务*/
37
+        RuleBasedTransactionAttribute requiredTx = new RuleBasedTransactionAttribute();
38
+        requiredTx.setRollbackRules(
39
+                Collections.singletonList(new RollbackRuleAttribute(Exception.class)));
40
+        requiredTx.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
41
+        requiredTx.setTimeout(TX_METHOD_TIMEOUT);
42
+        Map<String, TransactionAttribute> txMap = new HashMap<>();
43
+        txMap.put("add*", requiredTx);
44
+        txMap.put("save*", requiredTx);
45
+        txMap.put("insert*", requiredTx);
46
+        txMap.put("update*", requiredTx);
47
+        txMap.put("delete*", requiredTx);
48
+        txMap.put("get*", readOnlyTx);
49
+        txMap.put("query*", readOnlyTx);
50
+        source.setNameMap( txMap );
51
+        TransactionInterceptor txAdvice = new TransactionInterceptor(transactionManager, source);
52
+        return txAdvice;
53
+    }
54
+    @Bean
55
+    public Advisor txAdviceAdvisor() {
56
+        AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
57
+        pointcut.setExpression(AOP_POINTCUT_EXPRESSION);
58
+        return new DefaultPointcutAdvisor(pointcut, txAdvice());
59
+        //return new DefaultPointcutAdvisor(pointcut, txAdvice);
60
+    }
61
+
62
+
63
+}
64
+

+ 1 - 1
huozuan/src/main/java/com/huojutech/controller/TestController.java

@@ -28,7 +28,7 @@ public class TestController {
28 28
 
29 29
 
30 30
     @ApiOperation(value="获取用户",notes="根据id获取用户",response = String.class)
31
-    @RequestMapping(value="/person",method = RequestMethod.GET)
31
+    @RequestMapping(value="/person",method = RequestMethod.GET, produces = "application/json;charset=utf-8")
32 32
     public String getString(@ApiParam(value = "用户id") @RequestParam Integer id){
33 33
 
34 34
         String person= id+" 用户1";

+ 22 - 22
huozuan/src/main/java/com/huojutech/dao/DiamondRecordMapper.java

@@ -1,23 +1,23 @@
1
-package com.huojutech.dao;
2
-
3
-import com.huojutech.entity.DiamondRecord;
4
-import com.huojutech.entity.DiamondRecordExample;
5
-import java.util.List;
6
-
7
-public interface DiamondRecordMapper {
8
-    int countByExample(DiamondRecordExample example);
9
-
10
-    int deleteByPrimaryKey(Integer id);
11
-
12
-    int insert(DiamondRecord record);
13
-
14
-    int insertSelective(DiamondRecord record);
15
-
16
-    List<DiamondRecord> selectByExample(DiamondRecordExample example);
17
-
18
-    DiamondRecord selectByPrimaryKey(Integer id);
19
-
20
-    int updateByPrimaryKeySelective(DiamondRecord record);
21
-
22
-    int updateByPrimaryKey(DiamondRecord record);
1
+package com.huojutech.dao;
2
+
3
+import com.huojutech.entity.DiamondRecord;
4
+import com.huojutech.entity.DiamondRecordExample;
5
+import java.util.List;
6
+
7
+public interface DiamondRecordMapper {
8
+    int countByExample(DiamondRecordExample example);
9
+
10
+    int deleteByPrimaryKey(Integer id);
11
+
12
+    int insert(DiamondRecord record);
13
+
14
+    int insertSelective(DiamondRecord record);
15
+
16
+    List<DiamondRecord> selectByExample(DiamondRecordExample example);
17
+
18
+    DiamondRecord selectByPrimaryKey(Integer id);
19
+
20
+    int updateByPrimaryKeySelective(DiamondRecord record);
21
+
22
+    int updateByPrimaryKey(DiamondRecord record);
23 23
 }

+ 22 - 22
huozuan/src/main/java/com/huojutech/dao/StockForecastCollectMapper.java

@@ -1,23 +1,23 @@
1
-package com.huojutech.dao;
2
-
3
-import com.huojutech.entity.StockForecastCollect;
4
-import com.huojutech.entity.StockForecastCollectExample;
5
-import java.util.List;
6
-
7
-public interface StockForecastCollectMapper {
8
-    int countByExample(StockForecastCollectExample example);
9
-
10
-    int deleteByPrimaryKey(Integer id);
11
-
12
-    int insert(StockForecastCollect record);
13
-
14
-    int insertSelective(StockForecastCollect record);
15
-
16
-    List<StockForecastCollect> selectByExample(StockForecastCollectExample example);
17
-
18
-    StockForecastCollect selectByPrimaryKey(Integer id);
19
-
20
-    int updateByPrimaryKeySelective(StockForecastCollect record);
21
-
22
-    int updateByPrimaryKey(StockForecastCollect record);
1
+package com.huojutech.dao;
2
+
3
+import com.huojutech.entity.StockForecastCollect;
4
+import com.huojutech.entity.StockForecastCollectExample;
5
+import java.util.List;
6
+
7
+public interface StockForecastCollectMapper {
8
+    int countByExample(StockForecastCollectExample example);
9
+
10
+    int deleteByPrimaryKey(Integer id);
11
+
12
+    int insert(StockForecastCollect record);
13
+
14
+    int insertSelective(StockForecastCollect record);
15
+
16
+    List<StockForecastCollect> selectByExample(StockForecastCollectExample example);
17
+
18
+    StockForecastCollect selectByPrimaryKey(Integer id);
19
+
20
+    int updateByPrimaryKeySelective(StockForecastCollect record);
21
+
22
+    int updateByPrimaryKey(StockForecastCollect record);
23 23
 }

+ 26 - 26
huozuan/src/main/java/com/huojutech/dao/StockForecastMapper.java

@@ -1,27 +1,27 @@
1
-package com.huojutech.dao;
2
-
3
-import com.huojutech.entity.StockForecast;
4
-import com.huojutech.entity.StockForecastExample;
5
-import java.util.List;
6
-
7
-public interface StockForecastMapper {
8
-    int countByExample(StockForecastExample example);
9
-
10
-    int deleteByPrimaryKey(Integer id);
11
-
12
-    int insert(StockForecast record);
13
-
14
-    int insertSelective(StockForecast record);
15
-
16
-    List<StockForecast> selectByExampleWithBLOBs(StockForecastExample example);
17
-
18
-    List<StockForecast> selectByExample(StockForecastExample example);
19
-
20
-    StockForecast selectByPrimaryKey(Integer id);
21
-
22
-    int updateByPrimaryKeySelective(StockForecast record);
23
-
24
-    int updateByPrimaryKeyWithBLOBs(StockForecast record);
25
-
26
-    int updateByPrimaryKey(StockForecast record);
1
+package com.huojutech.dao;
2
+
3
+import com.huojutech.entity.StockForecast;
4
+import com.huojutech.entity.StockForecastExample;
5
+import java.util.List;
6
+
7
+public interface StockForecastMapper {
8
+    int countByExample(StockForecastExample example);
9
+
10
+    int deleteByPrimaryKey(Integer id);
11
+
12
+    int insert(StockForecast record);
13
+
14
+    int insertSelective(StockForecast record);
15
+
16
+    List<StockForecast> selectByExampleWithBLOBs(StockForecastExample example);
17
+
18
+    List<StockForecast> selectByExample(StockForecastExample example);
19
+
20
+    StockForecast selectByPrimaryKey(Integer id);
21
+
22
+    int updateByPrimaryKeySelective(StockForecast record);
23
+
24
+    int updateByPrimaryKeyWithBLOBs(StockForecast record);
25
+
26
+    int updateByPrimaryKey(StockForecast record);
27 27
 }

+ 22 - 22
huozuan/src/main/java/com/huojutech/dao/StockForecastVoteMapper.java

@@ -1,23 +1,23 @@
1
-package com.huojutech.dao;
2
-
3
-import com.huojutech.entity.StockForecastVote;
4
-import com.huojutech.entity.StockForecastVoteExample;
5
-import java.util.List;
6
-
7
-public interface StockForecastVoteMapper {
8
-    int countByExample(StockForecastVoteExample example);
9
-
10
-    int deleteByPrimaryKey(Integer id);
11
-
12
-    int insert(StockForecastVote record);
13
-
14
-    int insertSelective(StockForecastVote record);
15
-
16
-    List<StockForecastVote> selectByExample(StockForecastVoteExample example);
17
-
18
-    StockForecastVote selectByPrimaryKey(Integer id);
19
-
20
-    int updateByPrimaryKeySelective(StockForecastVote record);
21
-
22
-    int updateByPrimaryKey(StockForecastVote record);
1
+package com.huojutech.dao;
2
+
3
+import com.huojutech.entity.StockForecastVote;
4
+import com.huojutech.entity.StockForecastVoteExample;
5
+import java.util.List;
6
+
7
+public interface StockForecastVoteMapper {
8
+    int countByExample(StockForecastVoteExample example);
9
+
10
+    int deleteByPrimaryKey(Integer id);
11
+
12
+    int insert(StockForecastVote record);
13
+
14
+    int insertSelective(StockForecastVote record);
15
+
16
+    List<StockForecastVote> selectByExample(StockForecastVoteExample example);
17
+
18
+    StockForecastVote selectByPrimaryKey(Integer id);
19
+
20
+    int updateByPrimaryKeySelective(StockForecastVote record);
21
+
22
+    int updateByPrimaryKey(StockForecastVote record);
23 23
 }

+ 22 - 22
huozuan/src/main/java/com/huojutech/dao/StockOptionalMapper.java

@@ -1,23 +1,23 @@
1
-package com.huojutech.dao;
2
-
3
-import com.huojutech.entity.StockOptional;
4
-import com.huojutech.entity.StockOptionalExample;
5
-import java.util.List;
6
-
7
-public interface StockOptionalMapper {
8
-    int countByExample(StockOptionalExample example);
9
-
10
-    int deleteByPrimaryKey(Integer id);
11
-
12
-    int insert(StockOptional record);
13
-
14
-    int insertSelective(StockOptional record);
15
-
16
-    List<StockOptional> selectByExample(StockOptionalExample example);
17
-
18
-    StockOptional selectByPrimaryKey(Integer id);
19
-
20
-    int updateByPrimaryKeySelective(StockOptional record);
21
-
22
-    int updateByPrimaryKey(StockOptional record);
1
+package com.huojutech.dao;
2
+
3
+import com.huojutech.entity.StockOptional;
4
+import com.huojutech.entity.StockOptionalExample;
5
+import java.util.List;
6
+
7
+public interface StockOptionalMapper {
8
+    int countByExample(StockOptionalExample example);
9
+
10
+    int deleteByPrimaryKey(Integer id);
11
+
12
+    int insert(StockOptional record);
13
+
14
+    int insertSelective(StockOptional record);
15
+
16
+    List<StockOptional> selectByExample(StockOptionalExample example);
17
+
18
+    StockOptional selectByPrimaryKey(Integer id);
19
+
20
+    int updateByPrimaryKeySelective(StockOptional record);
21
+
22
+    int updateByPrimaryKey(StockOptional record);
23 23
 }

+ 22 - 22
huozuan/src/main/java/com/huojutech/dao/SystemConfigMapper.java

@@ -1,23 +1,23 @@
1
-package com.huojutech.dao;
2
-
3
-import com.huojutech.entity.SystemConfig;
4
-import com.huojutech.entity.SystemConfigExample;
5
-import java.util.List;
6
-
7
-public interface SystemConfigMapper {
8
-    int countByExample(SystemConfigExample example);
9
-
10
-    int deleteByPrimaryKey(Integer id);
11
-
12
-    int insert(SystemConfig record);
13
-
14
-    int insertSelective(SystemConfig record);
15
-
16
-    List<SystemConfig> selectByExample(SystemConfigExample example);
17
-
18
-    SystemConfig selectByPrimaryKey(Integer id);
19
-
20
-    int updateByPrimaryKeySelective(SystemConfig record);
21
-
22
-    int updateByPrimaryKey(SystemConfig record);
1
+package com.huojutech.dao;
2
+
3
+import com.huojutech.entity.SystemConfig;
4
+import com.huojutech.entity.SystemConfigExample;
5
+import java.util.List;
6
+
7
+public interface SystemConfigMapper {
8
+    int countByExample(SystemConfigExample example);
9
+
10
+    int deleteByPrimaryKey(Integer id);
11
+
12
+    int insert(SystemConfig record);
13
+
14
+    int insertSelective(SystemConfig record);
15
+
16
+    List<SystemConfig> selectByExample(SystemConfigExample example);
17
+
18
+    SystemConfig selectByPrimaryKey(Integer id);
19
+
20
+    int updateByPrimaryKeySelective(SystemConfig record);
21
+
22
+    int updateByPrimaryKey(SystemConfig record);
23 23
 }

+ 18 - 18
huozuan/src/main/java/com/huojutech/dao/TestDao.java

@@ -1,18 +1,18 @@
1
-package com.huojutech.dao;
2
-
3
-import com.huojutech.entity.User;
4
-import org.apache.ibatis.annotations.Mapper;
5
-import org.apache.ibatis.annotations.Param;
6
-
7
-/**
8
- * Created by Wangzw on 2018\4\10 0010.
9
- */
10
-@Mapper
11
-public interface TestDao{
12
-
13
-     User getUserById(Integer id);
14
-
15
-     Integer updateTestTx(@Param("id") Integer id,@Param("name") String name);
16
-
17
-}
18
-
1
+package com.huojutech.dao;
2
+
3
+import com.huojutech.entity.User;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+/**
8
+ * Created by Wangzw on 2018\4\10 0010.
9
+ */
10
+@Mapper
11
+public interface TestDao{
12
+
13
+     User getUserById(Integer id);
14
+
15
+     Integer updateTestTx(@Param("id") Integer id,@Param("name") String name);
16
+
17
+}
18
+

+ 22 - 22
huozuan/src/main/java/com/huojutech/dao/UserConcernMapper.java

@@ -1,23 +1,23 @@
1
-package com.huojutech.dao;
2
-
3
-import com.huojutech.entity.UserConcern;
4
-import com.huojutech.entity.UserConcernExample;
5
-import java.util.List;
6
-
7
-public interface UserConcernMapper {
8
-    int countByExample(UserConcernExample example);
9
-
10
-    int deleteByPrimaryKey(Integer id);
11
-
12
-    int insert(UserConcern record);
13
-
14
-    int insertSelective(UserConcern record);
15
-
16
-    List<UserConcern> selectByExample(UserConcernExample example);
17
-
18
-    UserConcern selectByPrimaryKey(Integer id);
19
-
20
-    int updateByPrimaryKeySelective(UserConcern record);
21
-
22
-    int updateByPrimaryKey(UserConcern record);
1
+package com.huojutech.dao;
2
+
3
+import com.huojutech.entity.UserConcern;
4
+import com.huojutech.entity.UserConcernExample;
5
+import java.util.List;
6
+
7
+public interface UserConcernMapper {
8
+    int countByExample(UserConcernExample example);
9
+
10
+    int deleteByPrimaryKey(Integer id);
11
+
12
+    int insert(UserConcern record);
13
+
14
+    int insertSelective(UserConcern record);
15
+
16
+    List<UserConcern> selectByExample(UserConcernExample example);
17
+
18
+    UserConcern selectByPrimaryKey(Integer id);
19
+
20
+    int updateByPrimaryKeySelective(UserConcern record);
21
+
22
+    int updateByPrimaryKey(UserConcern record);
23 23
 }

+ 22 - 22
huozuan/src/main/java/com/huojutech/dao/UserMapper.java

@@ -1,23 +1,23 @@
1
-package com.huojutech.dao;
2
-
3
-import com.huojutech.entity.User;
4
-import com.huojutech.entity.UserExample;
5
-import java.util.List;
6
-
7
-public interface UserMapper {
8
-    int countByExample(UserExample example);
9
-
10
-    int deleteByPrimaryKey(Integer id);
11
-
12
-    int insert(User record);
13
-
14
-    int insertSelective(User record);
15
-
16
-    List<User> selectByExample(UserExample example);
17
-
18
-    User selectByPrimaryKey(Integer id);
19
-
20
-    int updateByPrimaryKeySelective(User record);
21
-
22
-    int updateByPrimaryKey(User record);
1
+package com.huojutech.dao;
2
+
3
+import com.huojutech.entity.User;
4
+import com.huojutech.entity.UserExample;
5
+import java.util.List;
6
+
7
+public interface UserMapper {
8
+    int countByExample(UserExample example);
9
+
10
+    int deleteByPrimaryKey(Integer id);
11
+
12
+    int insert(User record);
13
+
14
+    int insertSelective(User record);
15
+
16
+    List<User> selectByExample(UserExample example);
17
+
18
+    User selectByPrimaryKey(Integer id);
19
+
20
+    int updateByPrimaryKeySelective(User record);
21
+
22
+    int updateByPrimaryKey(User record);
23 23
 }

+ 85 - 85
huozuan/src/main/java/com/huojutech/entity/DiamondRecord.java

@@ -1,86 +1,86 @@
1
-package com.huojutech.entity;
2
-
3
-import java.math.BigDecimal;
4
-import java.util.Date;
5
-
6
-public class DiamondRecord {
7
-    private Integer id;
8
-
9
-    private Integer uid;
10
-
11
-    private String name;
12
-
13
-    private String descr;
14
-
15
-    private BigDecimal amount;
16
-
17
-    private Integer status;
18
-
19
-    private Date crtTime;
20
-
21
-    private Date updTime;
22
-
23
-    public Integer getId() {
24
-        return id;
25
-    }
26
-
27
-    public void setId(Integer id) {
28
-        this.id = id;
29
-    }
30
-
31
-    public Integer getUid() {
32
-        return uid;
33
-    }
34
-
35
-    public void setUid(Integer uid) {
36
-        this.uid = uid;
37
-    }
38
-
39
-    public String getName() {
40
-        return name;
41
-    }
42
-
43
-    public void setName(String name) {
44
-        this.name = name == null ? null : name.trim();
45
-    }
46
-
47
-    public String getDescr() {
48
-        return descr;
49
-    }
50
-
51
-    public void setDescr(String descr) {
52
-        this.descr = descr == null ? null : descr.trim();
53
-    }
54
-
55
-    public BigDecimal getAmount() {
56
-        return amount;
57
-    }
58
-
59
-    public void setAmount(BigDecimal amount) {
60
-        this.amount = amount;
61
-    }
62
-
63
-    public Integer getStatus() {
64
-        return status;
65
-    }
66
-
67
-    public void setStatus(Integer status) {
68
-        this.status = status;
69
-    }
70
-
71
-    public Date getCrtTime() {
72
-        return crtTime;
73
-    }
74
-
75
-    public void setCrtTime(Date crtTime) {
76
-        this.crtTime = crtTime;
77
-    }
78
-
79
-    public Date getUpdTime() {
80
-        return updTime;
81
-    }
82
-
83
-    public void setUpdTime(Date updTime) {
84
-        this.updTime = updTime;
85
-    }
1
+package com.huojutech.entity;
2
+
3
+import java.math.BigDecimal;
4
+import java.util.Date;
5
+
6
+public class DiamondRecord {
7
+    private Integer id;
8
+
9
+    private Integer uid;
10
+
11
+    private String name;
12
+
13
+    private String descr;
14
+
15
+    private BigDecimal amount;
16
+
17
+    private Integer status;
18
+
19
+    private Date crtTime;
20
+
21
+    private Date updTime;
22
+
23
+    public Integer getId() {
24
+        return id;
25
+    }
26
+
27
+    public void setId(Integer id) {
28
+        this.id = id;
29
+    }
30
+
31
+    public Integer getUid() {
32
+        return uid;
33
+    }
34
+
35
+    public void setUid(Integer uid) {
36
+        this.uid = uid;
37
+    }
38
+
39
+    public String getName() {
40
+        return name;
41
+    }
42
+
43
+    public void setName(String name) {
44
+        this.name = name == null ? null : name.trim();
45
+    }
46
+
47
+    public String getDescr() {
48
+        return descr;
49
+    }
50
+
51
+    public void setDescr(String descr) {
52
+        this.descr = descr == null ? null : descr.trim();
53
+    }
54
+
55
+    public BigDecimal getAmount() {
56
+        return amount;
57
+    }
58
+
59
+    public void setAmount(BigDecimal amount) {
60
+        this.amount = amount;
61
+    }
62
+
63
+    public Integer getStatus() {
64
+        return status;
65
+    }
66
+
67
+    public void setStatus(Integer status) {
68
+        this.status = status;
69
+    }
70
+
71
+    public Date getCrtTime() {
72
+        return crtTime;
73
+    }
74
+
75
+    public void setCrtTime(Date crtTime) {
76
+        this.crtTime = crtTime;
77
+    }
78
+
79
+    public Date getUpdTime() {
80
+        return updTime;
81
+    }
82
+
83
+    public void setUpdTime(Date updTime) {
84
+        this.updTime = updTime;
85
+    }
86 86
 }

File diff suppressed because it is too large
+ 701 - 701
huozuan/src/main/java/com/huojutech/entity/DiamondRecordExample.java


+ 155 - 155
huozuan/src/main/java/com/huojutech/entity/StockForecast.java

@@ -1,156 +1,156 @@
1
-package com.huojutech.entity;
2
-
3
-import java.math.BigDecimal;
4
-import java.util.Date;
5
-
6
-public class StockForecast {
7
-    private Integer id;
8
-
9
-    private Integer uid;
10
-
11
-    private String stockName;
12
-
13
-    private String stockCode;
14
-
15
-    private Integer expect;
16
-
17
-    private BigDecimal bet;
18
-
19
-    private BigDecimal currentPrice;
20
-
21
-    private BigDecimal targetPrice;
22
-
23
-    private Integer cycle;
24
-
25
-    private Date startDate;
26
-
27
-    private Date endDate;
28
-
29
-    private Integer status;
30
-
31
-    private Date crtTime;
32
-
33
-    private Date updTime;
34
-
35
-    private String reason;
36
-
37
-    public Integer getId() {
38
-        return id;
39
-    }
40
-
41
-    public void setId(Integer id) {
42
-        this.id = id;
43
-    }
44
-
45
-    public Integer getUid() {
46
-        return uid;
47
-    }
48
-
49
-    public void setUid(Integer uid) {
50
-        this.uid = uid;
51
-    }
52
-
53
-    public String getStockName() {
54
-        return stockName;
55
-    }
56
-
57
-    public void setStockName(String stockName) {
58
-        this.stockName = stockName == null ? null : stockName.trim();
59
-    }
60
-
61
-    public String getStockCode() {
62
-        return stockCode;
63
-    }
64
-
65
-    public void setStockCode(String stockCode) {
66
-        this.stockCode = stockCode == null ? null : stockCode.trim();
67
-    }
68
-
69
-    public Integer getExpect() {
70
-        return expect;
71
-    }
72
-
73
-    public void setExpect(Integer expect) {
74
-        this.expect = expect;
75
-    }
76
-
77
-    public BigDecimal getBet() {
78
-        return bet;
79
-    }
80
-
81
-    public void setBet(BigDecimal bet) {
82
-        this.bet = bet;
83
-    }
84
-
85
-    public BigDecimal getCurrentPrice() {
86
-        return currentPrice;
87
-    }
88
-
89
-    public void setCurrentPrice(BigDecimal currentPrice) {
90
-        this.currentPrice = currentPrice;
91
-    }
92
-
93
-    public BigDecimal getTargetPrice() {
94
-        return targetPrice;
95
-    }
96
-
97
-    public void setTargetPrice(BigDecimal targetPrice) {
98
-        this.targetPrice = targetPrice;
99
-    }
100
-
101
-    public Integer getCycle() {
102
-        return cycle;
103
-    }
104
-
105
-    public void setCycle(Integer cycle) {
106
-        this.cycle = cycle;
107
-    }
108
-
109
-    public Date getStartDate() {
110
-        return startDate;
111
-    }
112
-
113
-    public void setStartDate(Date startDate) {
114
-        this.startDate = startDate;
115
-    }
116
-
117
-    public Date getEndDate() {
118
-        return endDate;
119
-    }
120
-
121
-    public void setEndDate(Date endDate) {
122
-        this.endDate = endDate;
123
-    }
124
-
125
-    public Integer getStatus() {
126
-        return status;
127
-    }
128
-
129
-    public void setStatus(Integer status) {
130
-        this.status = status;
131
-    }
132
-
133
-    public Date getCrtTime() {
134
-        return crtTime;
135
-    }
136
-
137
-    public void setCrtTime(Date crtTime) {
138
-        this.crtTime = crtTime;
139
-    }
140
-
141
-    public Date getUpdTime() {
142
-        return updTime;
143
-    }
144
-
145
-    public void setUpdTime(Date updTime) {
146
-        this.updTime = updTime;
147
-    }
148
-
149
-    public String getReason() {
150
-        return reason;
151
-    }
152
-
153
-    public void setReason(String reason) {
154
-        this.reason = reason == null ? null : reason.trim();
155
-    }
1
+package com.huojutech.entity;
2
+
3
+import java.math.BigDecimal;
4
+import java.util.Date;
5
+
6
+public class StockForecast {
7
+    private Integer id;
8
+
9
+    private Integer uid;
10
+
11
+    private String stockName;
12
+
13
+    private String stockCode;
14
+
15
+    private Integer expect;
16
+
17
+    private BigDecimal bet;
18
+
19
+    private BigDecimal currentPrice;
20
+
21
+    private BigDecimal targetPrice;
22
+
23
+    private Integer cycle;
24
+
25
+    private Date startDate;
26
+
27
+    private Date endDate;
28
+
29
+    private Integer status;
30
+
31
+    private Date crtTime;
32
+
33
+    private Date updTime;
34
+
35
+    private String reason;
36
+
37
+    public Integer getId() {
38
+        return id;
39
+    }
40
+
41
+    public void setId(Integer id) {
42
+        this.id = id;
43
+    }
44
+
45
+    public Integer getUid() {
46
+        return uid;
47
+    }
48
+
49
+    public void setUid(Integer uid) {
50
+        this.uid = uid;
51
+    }
52
+
53
+    public String getStockName() {
54
+        return stockName;
55
+    }
56
+
57
+    public void setStockName(String stockName) {
58
+        this.stockName = stockName == null ? null : stockName.trim();
59
+    }
60
+
61
+    public String getStockCode() {
62
+        return stockCode;
63
+    }
64
+
65
+    public void setStockCode(String stockCode) {
66
+        this.stockCode = stockCode == null ? null : stockCode.trim();
67
+    }
68
+
69
+    public Integer getExpect() {
70
+        return expect;
71
+    }
72
+
73
+    public void setExpect(Integer expect) {
74
+        this.expect = expect;
75
+    }
76
+
77
+    public BigDecimal getBet() {
78
+        return bet;
79
+    }
80
+
81
+    public void setBet(BigDecimal bet) {
82
+        this.bet = bet;
83
+    }
84
+
85
+    public BigDecimal getCurrentPrice() {
86
+        return currentPrice;
87
+    }
88
+
89
+    public void setCurrentPrice(BigDecimal currentPrice) {
90
+        this.currentPrice = currentPrice;
91
+    }
92
+
93
+    public BigDecimal getTargetPrice() {
94
+        return targetPrice;
95
+    }
96
+
97
+    public void setTargetPrice(BigDecimal targetPrice) {
98
+        this.targetPrice = targetPrice;
99
+    }
100
+
101
+    public Integer getCycle() {
102
+        return cycle;
103
+    }
104
+
105
+    public void setCycle(Integer cycle) {
106
+        this.cycle = cycle;
107
+    }
108
+
109
+    public Date getStartDate() {
110
+        return startDate;
111
+    }
112
+
113
+    public void setStartDate(Date startDate) {
114
+        this.startDate = startDate;
115
+    }
116
+
117
+    public Date getEndDate() {
118
+        return endDate;
119
+    }
120
+
121
+    public void setEndDate(Date endDate) {
122
+        this.endDate = endDate;
123
+    }
124
+
125
+    public Integer getStatus() {
126
+        return status;
127
+    }
128
+
129
+    public void setStatus(Integer status) {
130
+        this.status = status;
131
+    }
132
+
133
+    public Date getCrtTime() {
134
+        return crtTime;
135
+    }
136
+
137
+    public void setCrtTime(Date crtTime) {
138
+        this.crtTime = crtTime;
139
+    }
140
+
141
+    public Date getUpdTime() {
142
+        return updTime;
143
+    }
144
+
145
+    public void setUpdTime(Date updTime) {
146
+        this.updTime = updTime;
147
+    }
148
+
149
+    public String getReason() {
150
+        return reason;
151
+    }
152
+
153
+    public void setReason(String reason) {
154
+        this.reason = reason == null ? null : reason.trim();
155
+    }
156 156
 }

+ 54 - 54
huozuan/src/main/java/com/huojutech/entity/StockForecastCollect.java

@@ -1,55 +1,55 @@
1
-package com.huojutech.entity;
2
-
3
-import java.util.Date;
4
-
5
-public class StockForecastCollect {
6
-    private Integer id;
7
-
8
-    private Integer uid;
9
-
10
-    private Integer forecastId;
11
-
12
-    private Date crtTime;
13
-
14
-    private Date updTime;
15
-
16
-    public Integer getId() {
17
-        return id;
18
-    }
19
-
20
-    public void setId(Integer id) {
21
-        this.id = id;
22
-    }
23
-
24
-    public Integer getUid() {
25
-        return uid;
26
-    }
27
-
28
-    public void setUid(Integer uid) {
29
-        this.uid = uid;
30
-    }
31
-
32
-    public Integer getForecastId() {
33
-        return forecastId;
34
-    }
35
-
36
-    public void setForecastId(Integer forecastId) {
37
-        this.forecastId = forecastId;
38
-    }
39
-
40
-    public Date getCrtTime() {
41
-        return crtTime;
42
-    }
43
-
44
-    public void setCrtTime(Date crtTime) {
45
-        this.crtTime = crtTime;
46
-    }
47
-
48
-    public Date getUpdTime() {
49
-        return updTime;
50
-    }
51
-
52
-    public void setUpdTime(Date updTime) {
53
-        this.updTime = updTime;
54
-    }
1
+package com.huojutech.entity;
2
+
3
+import java.util.Date;
4
+
5
+public class StockForecastCollect {
6
+    private Integer id;
7
+
8
+    private Integer uid;
9
+
10
+    private Integer forecastId;
11
+
12
+    private Date crtTime;
13
+
14
+    private Date updTime;
15
+
16
+    public Integer getId() {
17
+        return id;
18
+    }
19
+
20
+    public void setId(Integer id) {
21
+        this.id = id;
22
+    }
23
+
24
+    public Integer getUid() {
25
+        return uid;
26
+    }
27
+
28
+    public void setUid(Integer uid) {
29
+        this.uid = uid;
30
+    }
31
+
32
+    public Integer getForecastId() {
33
+        return forecastId;
34
+    }
35
+
36
+    public void setForecastId(Integer forecastId) {
37
+        this.forecastId = forecastId;
38
+    }
39
+
40
+    public Date getCrtTime() {
41
+        return crtTime;
42
+    }
43
+
44
+    public void setCrtTime(Date crtTime) {
45
+        this.crtTime = crtTime;
46
+    }
47
+
48
+    public Date getUpdTime() {
49
+        return updTime;
50
+    }
51
+
52
+    public void setUpdTime(Date updTime) {
53
+        this.updTime = updTime;
54
+    }
55 55
 }

File diff suppressed because it is too large
+ 500 - 500
huozuan/src/main/java/com/huojutech/entity/StockForecastCollectExample.java


File diff suppressed because it is too large
+ 1088 - 1088
huozuan/src/main/java/com/huojutech/entity/StockForecastExample.java


+ 85 - 85
huozuan/src/main/java/com/huojutech/entity/StockForecastVote.java

@@ -1,86 +1,86 @@
1
-package com.huojutech.entity;
2
-
3
-import java.math.BigDecimal;
4
-import java.util.Date;
5
-
6
-public class StockForecastVote {
7
-    private Integer id;
8
-
9
-    private Integer uid;
10
-
11
-    private Integer forecastId;
12
-
13
-    private Integer vtype;
14
-
15
-    private BigDecimal bet;
16
-
17
-    private Integer status;
18
-
19
-    private Date crtTime;
20
-
21
-    private Date updTime;
22
-
23
-    public Integer getId() {
24
-        return id;
25
-    }
26
-
27
-    public void setId(Integer id) {
28
-        this.id = id;
29
-    }
30
-
31
-    public Integer getUid() {
32
-        return uid;
33
-    }
34
-
35
-    public void setUid(Integer uid) {
36
-        this.uid = uid;
37
-    }
38
-
39
-    public Integer getForecastId() {
40
-        return forecastId;
41
-    }
42
-
43
-    public void setForecastId(Integer forecastId) {
44
-        this.forecastId = forecastId;
45
-    }
46
-
47
-    public Integer getVtype() {
48
-        return vtype;
49
-    }
50
-
51
-    public void setVtype(Integer vtype) {
52
-        this.vtype = vtype;
53
-    }
54
-
55
-    public BigDecimal getBet() {
56
-        return bet;
57
-    }
58
-
59
-    public void setBet(BigDecimal bet) {
60
-        this.bet = bet;
61
-    }
62
-
63
-    public Integer getStatus() {
64
-        return status;
65
-    }
66
-
67
-    public void setStatus(Integer status) {
68
-        this.status = status;
69
-    }
70
-
71
-    public Date getCrtTime() {
72
-        return crtTime;
73
-    }
74
-
75
-    public void setCrtTime(Date crtTime) {
76
-        this.crtTime = crtTime;
77
-    }
78
-
79
-    public Date getUpdTime() {
80
-        return updTime;
81
-    }
82
-
83
-    public void setUpdTime(Date updTime) {
84
-        this.updTime = updTime;
85
-    }
1
+package com.huojutech.entity;
2
+
3
+import java.math.BigDecimal;
4
+import java.util.Date;
5
+
6
+public class StockForecastVote {
7
+    private Integer id;
8
+
9
+    private Integer uid;
10
+
11
+    private Integer forecastId;
12
+
13
+    private Integer vtype;
14
+
15
+    private BigDecimal bet;
16
+
17
+    private Integer status;
18
+
19
+    private Date crtTime;
20
+
21
+    private Date updTime;
22
+
23
+    public Integer getId() {
24
+        return id;
25
+    }
26
+
27
+    public void setId(Integer id) {
28
+        this.id = id;
29
+    }
30
+
31
+    public Integer getUid() {
32
+        return uid;
33
+    }
34
+
35
+    public void setUid(Integer uid) {
36
+        this.uid = uid;
37
+    }
38
+
39
+    public Integer getForecastId() {
40
+        return forecastId;
41
+    }
42
+
43
+    public void setForecastId(Integer forecastId) {
44
+        this.forecastId = forecastId;
45
+    }
46
+
47
+    public Integer getVtype() {
48
+        return vtype;
49
+    }
50
+
51
+    public void setVtype(Integer vtype) {
52
+        this.vtype = vtype;
53
+    }
54
+
55
+    public BigDecimal getBet() {
56
+        return bet;
57
+    }
58
+
59
+    public void setBet(BigDecimal bet) {
60
+        this.bet = bet;
61
+    }
62
+
63
+    public Integer getStatus() {
64
+        return status;
65
+    }
66
+
67
+    public void setStatus(Integer status) {
68
+        this.status = status;
69
+    }
70
+
71
+    public Date getCrtTime() {
72
+        return crtTime;
73
+    }
74
+
75
+    public void setCrtTime(Date crtTime) {
76
+        this.crtTime = crtTime;
77
+    }
78
+
79
+    public Date getUpdTime() {
80
+        return updTime;
81
+    }
82
+
83
+    public void setUpdTime(Date updTime) {
84
+        this.updTime = updTime;
85
+    }
86 86
 }

File diff suppressed because it is too large
+ 681 - 681
huozuan/src/main/java/com/huojutech/entity/StockForecastVoteExample.java


+ 64 - 64
huozuan/src/main/java/com/huojutech/entity/StockOptional.java

@@ -1,65 +1,65 @@
1
-package com.huojutech.entity;
2
-
3
-import java.util.Date;
4
-
5
-public class StockOptional {
6
-    private Integer id;
7
-
8
-    private Integer uid;
9
-
10
-    private String stockName;
11
-
12
-    private String stockCode;
13
-
14
-    private Date crtTime;
15
-
16
-    private Date updTime;
17
-
18
-    public Integer getId() {
19
-        return id;
20
-    }
21
-
22
-    public void setId(Integer id) {
23
-        this.id = id;
24
-    }
25
-
26
-    public Integer getUid() {
27
-        return uid;
28
-    }
29
-
30
-    public void setUid(Integer uid) {
31
-        this.uid = uid;
32
-    }
33
-
34
-    public String getStockName() {
35
-        return stockName;
36
-    }
37
-
38
-    public void setStockName(String stockName) {
39
-        this.stockName = stockName == null ? null : stockName.trim();
40
-    }
41
-
42
-    public String getStockCode() {
43
-        return stockCode;
44
-    }
45
-
46
-    public void setStockCode(String stockCode) {
47
-        this.stockCode = stockCode == null ? null : stockCode.trim();
48
-    }
49
-
50
-    public Date getCrtTime() {
51
-        return crtTime;
52
-    }
53
-
54
-    public void setCrtTime(Date crtTime) {
55
-        this.crtTime = crtTime;
56
-    }
57
-
58
-    public Date getUpdTime() {
59
-        return updTime;
60
-    }
61
-
62
-    public void setUpdTime(Date updTime) {
63
-        this.updTime = updTime;
64
-    }
1
+package com.huojutech.entity;
2
+
3
+import java.util.Date;
4
+
5
+public class StockOptional {
6
+    private Integer id;
7
+
8
+    private Integer uid;
9
+
10
+    private String stockName;
11
+
12
+    private String stockCode;
13
+
14
+    private Date crtTime;
15
+
16
+    private Date updTime;
17
+
18
+    public Integer getId() {
19
+        return id;
20
+    }
21
+
22
+    public void setId(Integer id) {
23
+        this.id = id;
24
+    }
25
+
26
+    public Integer getUid() {
27
+        return uid;
28
+    }
29
+
30
+    public void setUid(Integer uid) {
31
+        this.uid = uid;
32
+    }
33
+
34
+    public String getStockName() {
35
+        return stockName;
36
+    }
37
+
38
+    public void setStockName(String stockName) {
39
+        this.stockName = stockName == null ? null : stockName.trim();
40
+    }
41
+
42
+    public String getStockCode() {
43
+        return stockCode;
44
+    }
45
+
46
+    public void setStockCode(String stockCode) {
47
+        this.stockCode = stockCode == null ? null : stockCode.trim();
48
+    }
49
+
50
+    public Date getCrtTime() {
51
+        return crtTime;
52
+    }
53
+
54
+    public void setCrtTime(Date crtTime) {
55
+        this.crtTime = crtTime;
56
+    }
57
+
58
+    public Date getUpdTime() {
59
+        return updTime;
60
+    }
61
+
62
+    public void setUpdTime(Date updTime) {
63
+        this.updTime = updTime;
64
+    }
65 65
 }

File diff suppressed because it is too large
+ 580 - 580
huozuan/src/main/java/com/huojutech/entity/StockOptionalExample.java


+ 64 - 64
huozuan/src/main/java/com/huojutech/entity/SystemConfig.java

@@ -1,65 +1,65 @@
1
-package com.huojutech.entity;
2
-
3
-import java.util.Date;
4
-
5
-public class SystemConfig {
6
-    private Integer id;
7
-
8
-    private String cfgKey;
9
-
10
-    private String cfgVal;
11
-
12
-    private Integer status;
13
-
14
-    private Date crtTime;
15
-
16
-    private Date updTime;
17
-
18
-    public Integer getId() {
19
-        return id;
20
-    }
21
-
22
-    public void setId(Integer id) {
23
-        this.id = id;
24
-    }
25
-
26
-    public String getCfgKey() {
27
-        return cfgKey;
28
-    }
29
-
30
-    public void setCfgKey(String cfgKey) {
31
-        this.cfgKey = cfgKey == null ? null : cfgKey.trim();
32
-    }
33
-
34
-    public String getCfgVal() {
35
-        return cfgVal;
36
-    }
37
-
38
-    public void setCfgVal(String cfgVal) {
39
-        this.cfgVal = cfgVal == null ? null : cfgVal.trim();
40
-    }
41
-
42
-    public Integer getStatus() {
43
-        return status;
44
-    }
45
-
46
-    public void setStatus(Integer status) {
47
-        this.status = status;
48
-    }
49
-
50
-    public Date getCrtTime() {
51
-        return crtTime;
52
-    }
53
-
54
-    public void setCrtTime(Date crtTime) {
55
-        this.crtTime = crtTime;
56
-    }
57
-
58
-    public Date getUpdTime() {
59
-        return updTime;
60
-    }
61
-
62
-    public void setUpdTime(Date updTime) {
63
-        this.updTime = updTime;
64
-    }
1
+package com.huojutech.entity;
2
+
3
+import java.util.Date;
4
+
5
+public class SystemConfig {
6
+    private Integer id;
7
+
8
+    private String cfgKey;
9
+
10
+    private String cfgVal;
11
+
12
+    private Integer status;
13
+
14
+    private Date crtTime;
15
+
16
+    private Date updTime;
17
+
18
+    public Integer getId() {
19
+        return id;
20
+    }
21
+
22
+    public void setId(Integer id) {
23
+        this.id = id;
24
+    }
25
+
26
+    public String getCfgKey() {
27
+        return cfgKey;
28
+    }
29
+
30
+    public void setCfgKey(String cfgKey) {
31
+        this.cfgKey = cfgKey == null ? null : cfgKey.trim();
32
+    }
33
+
34
+    public String getCfgVal() {
35
+        return cfgVal;
36
+    }
37
+
38
+    public void setCfgVal(String cfgVal) {
39
+        this.cfgVal = cfgVal == null ? null : cfgVal.trim();
40
+    }
41
+
42
+    public Integer getStatus() {
43
+        return status;
44
+    }
45
+
46
+    public void setStatus(Integer status) {
47
+        this.status = status;
48
+    }
49
+
50
+    public Date getCrtTime() {
51
+        return crtTime;
52
+    }
53
+
54
+    public void setCrtTime(Date crtTime) {
55
+        this.crtTime = crtTime;
56
+    }
57
+
58
+    public Date getUpdTime() {
59
+        return updTime;
60
+    }
61
+
62
+    public void setUpdTime(Date updTime) {
63
+        this.updTime = updTime;
64
+    }
65 65
 }

File diff suppressed because it is too large
+ 580 - 580
huozuan/src/main/java/com/huojutech/entity/SystemConfigExample.java


+ 125 - 125
huozuan/src/main/java/com/huojutech/entity/User.java

@@ -1,126 +1,126 @@
1
-package com.huojutech.entity;
2
-
3
-import java.math.BigDecimal;
4
-import java.util.Date;
5
-
6
-public class User {
7
-    private Integer id;
8
-
9
-    private String name;
10
-
11
-    private String nickname;
12
-
13
-    private String avatar;
14
-
15
-    private BigDecimal amount;
16
-
17
-    private Double forecastRateSuccess;
18
-
19
-    private Double voteRateSuccess;
20
-
21
-    private String wxOpenid;
22
-
23
-    private String wxUnionid;
24
-
25
-    private Integer status;
26
-
27
-    private Date crtTime;
28
-
29
-    private Date updTime;
30
-
31
-    public Integer getId() {
32
-        return id;
33
-    }
34
-
35
-    public void setId(Integer id) {
36
-        this.id = id;
37
-    }
38
-
39
-    public String getName() {
40
-        return name;
41
-    }
42
-
43
-    public void setName(String name) {
44
-        this.name = name == null ? null : name.trim();
45
-    }
46
-
47
-    public String getNickname() {
48
-        return nickname;
49
-    }
50
-
51
-    public void setNickname(String nickname) {
52
-        this.nickname = nickname == null ? null : nickname.trim();
53
-    }
54
-
55
-    public String getAvatar() {
56
-        return avatar;
57
-    }
58
-
59
-    public void setAvatar(String avatar) {
60
-        this.avatar = avatar == null ? null : avatar.trim();
61
-    }
62
-
63
-    public BigDecimal getAmount() {
64
-        return amount;
65
-    }
66
-
67
-    public void setAmount(BigDecimal amount) {
68
-        this.amount = amount;
69
-    }
70
-
71
-    public Double getForecastRateSuccess() {
72
-        return forecastRateSuccess;
73
-    }
74
-
75
-    public void setForecastRateSuccess(Double forecastRateSuccess) {
76
-        this.forecastRateSuccess = forecastRateSuccess;
77
-    }
78
-
79
-    public Double getVoteRateSuccess() {
80
-        return voteRateSuccess;
81
-    }
82
-
83
-    public void setVoteRateSuccess(Double voteRateSuccess) {
84
-        this.voteRateSuccess = voteRateSuccess;
85
-    }
86
-
87
-    public String getWxOpenid() {
88
-        return wxOpenid;
89
-    }
90
-
91
-    public void setWxOpenid(String wxOpenid) {
92
-        this.wxOpenid = wxOpenid == null ? null : wxOpenid.trim();
93
-    }
94
-
95
-    public String getWxUnionid() {
96
-        return wxUnionid;
97
-    }
98
-
99
-    public void setWxUnionid(String wxUnionid) {
100
-        this.wxUnionid = wxUnionid == null ? null : wxUnionid.trim();
101
-    }
102
-
103
-    public Integer getStatus() {
104
-        return status;
105
-    }
106
-
107
-    public void setStatus(Integer status) {
108
-        this.status = status;
109
-    }
110
-
111
-    public Date getCrtTime() {
112
-        return crtTime;
113
-    }
114
-
115
-    public void setCrtTime(Date crtTime) {
116
-        this.crtTime = crtTime;
117
-    }
118
-
119
-    public Date getUpdTime() {
120
-        return updTime;
121
-    }
122
-
123
-    public void setUpdTime(Date updTime) {
124
-        this.updTime = updTime;
125
-    }
1
+package com.huojutech.entity;
2
+
3
+import java.math.BigDecimal;
4
+import java.util.Date;
5
+
6
+public class User {
7
+    private Integer id;
8
+
9
+    private String name;
10
+
11
+    private String nickname;
12
+
13
+    private String avatar;
14
+
15
+    private BigDecimal amount;
16
+
17
+    private Double forecastRateSuccess;
18
+
19
+    private Double voteRateSuccess;
20
+
21
+    private String wxOpenid;
22
+
23
+    private String wxUnionid;
24
+
25
+    private Integer status;
26
+
27
+    private Date crtTime;
28
+
29
+    private Date updTime;
30
+
31
+    public Integer getId() {
32
+        return id;
33
+    }
34
+
35
+    public void setId(Integer id) {
36
+        this.id = id;
37
+    }
38
+
39
+    public String getName() {
40
+        return name;
41
+    }
42
+
43
+    public void setName(String name) {
44
+        this.name = name == null ? null : name.trim();
45
+    }
46
+
47
+    public String getNickname() {
48
+        return nickname;
49
+    }
50
+
51
+    public void setNickname(String nickname) {
52
+        this.nickname = nickname == null ? null : nickname.trim();
53
+    }
54
+
55
+    public String getAvatar() {
56
+        return avatar;
57
+    }
58
+
59
+    public void setAvatar(String avatar) {
60
+        this.avatar = avatar == null ? null : avatar.trim();
61
+    }
62
+
63
+    public BigDecimal getAmount() {
64
+        return amount;
65
+    }
66
+
67
+    public void setAmount(BigDecimal amount) {
68
+        this.amount = amount;
69
+    }
70
+
71
+    public Double getForecastRateSuccess() {
72
+        return forecastRateSuccess;
73
+    }
74
+
75
+    public void setForecastRateSuccess(Double forecastRateSuccess) {
76
+        this.forecastRateSuccess = forecastRateSuccess;
77
+    }
78
+
79
+    public Double getVoteRateSuccess() {
80
+        return voteRateSuccess;
81
+    }
82
+
83
+    public void setVoteRateSuccess(Double voteRateSuccess) {
84
+        this.voteRateSuccess = voteRateSuccess;
85
+    }
86
+
87
+    public String getWxOpenid() {
88
+        return wxOpenid;
89
+    }
90
+
91
+    public void setWxOpenid(String wxOpenid) {
92
+        this.wxOpenid = wxOpenid == null ? null : wxOpenid.trim();
93
+    }
94
+
95
+    public String getWxUnionid() {
96
+        return wxUnionid;
97
+    }
98
+
99
+    public void setWxUnionid(String wxUnionid) {
100
+        this.wxUnionid = wxUnionid == null ? null : wxUnionid.trim();
101
+    }
102
+
103
+    public Integer getStatus() {
104
+        return status;
105
+    }
106
+
107
+    public void setStatus(Integer status) {
108
+        this.status = status;
109
+    }
110
+
111
+    public Date getCrtTime() {
112
+        return crtTime;
113
+    }
114
+
115
+    public void setCrtTime(Date crtTime) {
116
+        this.crtTime = crtTime;
117
+    }
118
+
119
+    public Date getUpdTime() {
120
+        return updTime;
121
+    }
122
+
123
+    public void setUpdTime(Date updTime) {
124
+        this.updTime = updTime;
125
+    }
126 126
 }

+ 54 - 54
huozuan/src/main/java/com/huojutech/entity/UserConcern.java

@@ -1,55 +1,55 @@
1
-package com.huojutech.entity;
2
-
3
-import java.util.Date;
4
-
5
-public class UserConcern {
6
-    private Integer id;
7
-
8
-    private Integer uid;
9
-
10
-    private Integer cuid;
11
-
12
-    private Date crtTime;
13
-
14
-    private Date updTime;
15
-
16
-    public Integer getId() {
17
-        return id;
18
-    }
19
-
20
-    public void setId(Integer id) {
21
-        this.id = id;
22
-    }
23
-
24
-    public Integer getUid() {
25
-        return uid;
26
-    }
27
-
28
-    public void setUid(Integer uid) {
29
-        this.uid = uid;
30
-    }
31
-
32
-    public Integer getCuid() {
33
-        return cuid;
34
-    }
35
-
36
-    public void setCuid(Integer cuid) {
37
-        this.cuid = cuid;
38
-    }
39
-
40
-    public Date getCrtTime() {
41
-        return crtTime;
42
-    }
43
-
44
-    public void setCrtTime(Date crtTime) {
45
-        this.crtTime = crtTime;
46
-    }
47
-
48
-    public Date getUpdTime() {
49
-        return updTime;
50
-    }
51
-
52
-    public void setUpdTime(Date updTime) {
53
-        this.updTime = updTime;
54
-    }
1
+package com.huojutech.entity;
2
+
3
+import java.util.Date;
4
+
5
+public class UserConcern {
6
+    private Integer id;
7
+
8
+    private Integer uid;
9
+
10
+    private Integer cuid;
11
+
12
+    private Date crtTime;
13
+
14
+    private Date updTime;
15
+
16
+    public Integer getId() {
17
+        return id;
18
+    }
19
+
20
+    public void setId(Integer id) {
21
+        this.id = id;
22
+    }
23
+
24
+    public Integer getUid() {
25
+        return uid;
26
+    }
27
+
28
+    public void setUid(Integer uid) {
29
+        this.uid = uid;
30
+    }
31
+
32
+    public Integer getCuid() {
33
+        return cuid;
34
+    }
35
+
36
+    public void setCuid(Integer cuid) {
37
+        this.cuid = cuid;
38
+    }
39
+
40
+    public Date getCrtTime() {
41
+        return crtTime;
42
+    }
43
+
44
+    public void setCrtTime(Date crtTime) {
45
+        this.crtTime = crtTime;
46
+    }
47
+
48
+    public Date getUpdTime() {
49
+        return updTime;
50
+    }
51
+
52
+    public void setUpdTime(Date updTime) {
53
+        this.updTime = updTime;
54
+    }
55 55
 }

File diff suppressed because it is too large
+ 500 - 500
huozuan/src/main/java/com/huojutech/entity/UserConcernExample.java


File diff suppressed because it is too large
+ 971 - 971
huozuan/src/main/java/com/huojutech/entity/UserExample.java


+ 32 - 32
huozuan/src/main/java/com/huojutech/enums/ResultEnum.java

@@ -1,33 +1,33 @@
1
-package com.huojutech.enums;
2
-
3
-
4
-/***
5
-    * TODO  枚举类
6
-    * Create_By  Wangzw
7
-    * 2018\4\10 0010
8
- */
9
-public enum ResultEnum {
10
-
11
-    SUCCESS(0, "成功"),
12
-    FAILED(1, "失败");
13
-
14
-    private Integer code;
15
-
16
-    private String message;
17
-
18
-    ResultEnum() {
19
-    }
20
-
21
-    ResultEnum(Integer code, String message) {
22
-        this.code = code;
23
-        this.message = message;
24
-    }
25
-
26
-    public Integer getCode() {
27
-        return code;
28
-    }
29
-
30
-    public String getMessage() {
31
-        return message;
32
-    }
1
+package com.huojutech.enums;
2
+
3
+
4
+/***
5
+    * TODO  枚举类
6
+    * Create_By  Wangzw
7
+    * 2018\4\10 0010
8
+ */
9
+public enum ResultEnum {
10
+
11
+    SUCCESS(0, "成功"),
12
+    FAILED(1, "失败");
13
+
14
+    private Integer code;
15
+
16
+    private String message;
17
+
18
+    ResultEnum() {
19
+    }
20
+
21
+    ResultEnum(Integer code, String message) {
22
+        this.code = code;
23
+        this.message = message;
24
+    }
25
+
26
+    public Integer getCode() {
27
+        return code;
28
+    }
29
+
30
+    public String getMessage() {
31
+        return message;
32
+    }
33 33
 }

+ 29 - 29
huozuan/src/main/java/com/huojutech/exception/GlobalExceptionHandler.java

@@ -1,29 +1,29 @@
1
-package com.huojutech.exception;
2
-
3
-import org.slf4j.Logger;
4
-import org.slf4j.LoggerFactory;
5
-import org.springframework.web.bind.annotation.ControllerAdvice;
6
-import org.springframework.web.bind.annotation.ExceptionHandler;
7
-import org.springframework.web.bind.annotation.ResponseBody;
8
-
9
-import javax.servlet.http.HttpServletRequest;
10
-
11
-/**
12
- * Created by Wangzw on 2018\4\10 0010.
13
- */
14
-@ControllerAdvice
15
-public class GlobalExceptionHandler {
16
-
17
-    private static Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
18
-
19
-    @ExceptionHandler(value = Exception.class)
20
-    @ResponseBody
21
-    public String defaultErrorHandler(HttpServletRequest req, Exception e) throws Exception {
22
-        logger.error(e.getMessage(), e);
23
-        StringBuffer requestURL = req.getRequestURL();
24
-        System.out.println(requestURL);
25
-        return "error happens";
26
-    }
27
-
28
-}
29
-
1
+package com.huojutech.exception;
2
+
3
+import org.slf4j.Logger;
4
+import org.slf4j.LoggerFactory;
5
+import org.springframework.web.bind.annotation.ControllerAdvice;
6
+import org.springframework.web.bind.annotation.ExceptionHandler;
7
+import org.springframework.web.bind.annotation.ResponseBody;
8
+
9
+import javax.servlet.http.HttpServletRequest;
10
+
11
+/**
12
+ * Created by Wangzw on 2018\4\10 0010.
13
+ */
14
+@ControllerAdvice
15
+public class GlobalExceptionHandler {
16
+
17
+    private static Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class);
18
+
19
+    @ExceptionHandler(value = Exception.class)
20
+    @ResponseBody
21
+    public String defaultErrorHandler(HttpServletRequest req, Exception e) throws Exception {
22
+        logger.error(e.getMessage(), e);
23
+        StringBuffer requestURL = req.getRequestURL();
24
+        System.out.println(requestURL);
25
+        return "error happens";
26
+    }
27
+
28
+}
29
+

+ 38 - 38
huozuan/src/main/java/com/huojutech/service/Impl/TestServiceImpl.java

@@ -1,38 +1,38 @@
1
-package com.huojutech.service.Impl;
2
-
3
-import com.huojutech.dao.TestDao;
4
-import com.huojutech.entity.User;
5
-import com.huojutech.service.TestService;
6
-import org.slf4j.Logger;
7
-import org.slf4j.LoggerFactory;
8
-import org.springframework.beans.factory.annotation.Autowired;
9
-import org.springframework.stereotype.Service;
10
-
11
-/**
12
- * Created by Wangzw on 2018\4\11 0011.
13
- */
14
-@Service
15
-public class TestServiceImpl implements TestService{
16
-
17
-    private final Logger log = LoggerFactory.getLogger(TestServiceImpl.class);
18
-
19
-    @Autowired
20
-    private TestDao testDao;
21
-
22
-    @Override
23
-    public User getUserById(Integer id) {
24
-        return testDao.getUserById(id);
25
-    }
26
-
27
-
28
-//    @Transactional
29
-    public Integer updateTestTx(Integer id, String name) {
30
-        int i = testDao.updateTestTx(id, name);
31
-//        int g =1/0;测试事务是否回滚
32
-        log.info("返回的数据!"+i);
33
-        return i;
34
-    }
35
-
36
-
37
-}
38
-
1
+package com.huojutech.service.Impl;
2
+
3
+import com.huojutech.dao.TestDao;
4
+import com.huojutech.entity.User;
5
+import com.huojutech.service.TestService;
6
+import org.slf4j.Logger;
7
+import org.slf4j.LoggerFactory;
8
+import org.springframework.beans.factory.annotation.Autowired;
9
+import org.springframework.stereotype.Service;
10
+
11
+/**
12
+ * Created by Wangzw on 2018\4\11 0011.
13
+ */
14
+@Service
15
+public class TestServiceImpl implements TestService{
16
+
17
+    private final Logger log = LoggerFactory.getLogger(TestServiceImpl.class);
18
+
19
+    @Autowired
20
+    private TestDao testDao;
21
+
22
+    @Override
23
+    public User getUserById(Integer id) {
24
+        return testDao.getUserById(id);
25
+    }
26
+
27
+
28
+//    @Transactional
29
+    public Integer updateTestTx(Integer id, String name) {
30
+        int i = testDao.updateTestTx(id, name);
31
+//        int g =1/0;测试事务是否回滚
32
+        log.info("返回的数据!"+i);
33
+        return i;
34
+    }
35
+
36
+
37
+}
38
+

+ 12 - 12
huozuan/src/main/java/com/huojutech/service/TestService.java

@@ -1,12 +1,12 @@
1
-package com.huojutech.service;
2
-
3
-import com.huojutech.entity.User;
4
-
5
-/**
6
- * Created by Wangzw on 2018\4\11 0011.
7
- */
8
-public interface TestService {
9
-    User getUserById(Integer id);
10
-    Integer updateTestTx(Integer id,String name);
11
-
12
-}
1
+package com.huojutech.service;
2
+
3
+import com.huojutech.entity.User;
4
+
5
+/**
6
+ * Created by Wangzw on 2018\4\11 0011.
7
+ */
8
+public interface TestService {
9
+    User getUserById(Integer id);
10
+    Integer updateTestTx(Integer id,String name);
11
+
12
+}

+ 28 - 28
huozuan/src/main/java/com/huojutech/utils/ResultVOUtil.java

@@ -1,28 +1,28 @@
1
-package com.huojutech.utils;
2
-
3
-
4
-import com.huojutech.vo.ResultVO;
5
-
6
-
7
-public class ResultVOUtil {
8
-
9
-    public static ResultVO success(Object object) {
10
-        ResultVO resultVO = new ResultVO();
11
-        resultVO.setData(object);
12
-        resultVO.setCode(0);
13
-        resultVO.setMsg("成功");
14
-        return resultVO;
15
-    }
16
-
17
-
18
-    public static ResultVO success() {
19
-        return success(null);
20
-    }
21
-
22
-    public static ResultVO error(Integer code, String msg) {
23
-        ResultVO resultVO = new ResultVO();
24
-        resultVO.setCode(code);
25
-        resultVO.setMsg(msg);
26
-        return resultVO;
27
-    }
28
-}
1
+package com.huojutech.utils;
2
+
3
+
4
+import com.huojutech.vo.ResultVO;
5
+
6
+
7
+public class ResultVOUtil {
8
+
9
+    public static ResultVO success(Object object) {
10
+        ResultVO resultVO = new ResultVO();
11
+        resultVO.setData(object);
12
+        resultVO.setCode(0);
13
+        resultVO.setMsg("成功");
14
+        return resultVO;
15
+    }
16
+
17
+
18
+    public static ResultVO success() {
19
+        return success(null);
20
+    }
21
+
22
+    public static ResultVO error(Integer code, String msg) {
23
+        ResultVO resultVO = new ResultVO();
24
+        resultVO.setCode(code);
25
+        resultVO.setMsg(msg);
26
+        return resultVO;
27
+    }
28
+}

+ 42 - 42
huozuan/src/main/java/com/huojutech/vo/ResultVO.java

@@ -1,42 +1,42 @@
1
-package com.huojutech.vo;
2
-
3
-/**
4
-    * TODO   http请求返回的最外层对象
5
-    * Create_By  Wangzw
6
-    * 2018\4\10 0010
7
- */
8
-public class ResultVO<T> {
9
-
10
-    /** 错误码. */
11
-    private Integer code;
12
-
13
-    /** 提示信息. */
14
-    private String msg;
15
-
16
-    /** 具体内容. */
17
-    private T data;
18
-
19
-    public Integer getCode() {
20
-        return code;
21
-    }
22
-
23
-    public void setCode(Integer code) {
24
-        this.code = code;
25
-    }
26
-
27
-    public String getMsg() {
28
-        return msg;
29
-    }
30
-
31
-    public void setMsg(String msg) {
32
-        this.msg = msg;
33
-    }
34
-
35
-    public T getData() {
36
-        return data;
37
-    }
38
-
39
-    public void setData(T data) {
40
-        this.data = data;
41
-    }
42
-}
1
+package com.huojutech.vo;
2
+
3
+/**
4
+    * TODO   http请求返回的最外层对象
5
+    * Create_By  Wangzw
6
+    * 2018\4\10 0010
7
+ */
8
+public class ResultVO<T> {
9
+
10
+    /** 错误码. */
11
+    private Integer code;
12
+
13
+    /** 提示信息. */
14
+    private String msg;
15
+
16
+    /** 具体内容. */
17
+    private T data;
18
+
19
+    public Integer getCode() {
20
+        return code;
21
+    }
22
+
23
+    public void setCode(Integer code) {
24
+        this.code = code;
25
+    }
26
+
27
+    public String getMsg() {
28
+        return msg;
29
+    }
30
+
31
+    public void setMsg(String msg) {
32
+        this.msg = msg;
33
+    }
34
+
35
+    public T getData() {
36
+        return data;
37
+    }
38
+
39
+    public void setData(T data) {
40
+        this.data = data;
41
+    }
42
+}

+ 3 - 2
huozuan/src/main/resources/application-dev.properties

@@ -1,9 +1,10 @@
1
+server.context-path=/huozuan
1 2
 server.port=8080
2 3
 
3 4
 # mysql
4 5
 spring.datasource.url=jdbc:mysql://47.96.144.239/diamond?useUnicode=true&characterEncoding=utf-8
5
-spring.datasource.username=root
6
-spring.datasource.password=123456
6
+spring.datasource.username=writer
7
+spring.datasource.password=diamond0413
7 8
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
8 9
 
9 10
 # dataSource

+ 49 - 49
huozuan/src/main/resources/application-loc.properties

@@ -1,49 +1,49 @@
1
-server.port=8081
2
-
3
-# mysql
4
-spring.datasource.url=jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=utf-8
5
-spring.datasource.username=root
6
-spring.datasource.password=123456
7
-spring.datasource.driver-class-name=com.mysql.jdbc.Driver
8
-
9
-# dataSource
10
-spring.datasource.type= com.alibaba.druid.pool.DruidDataSource
11
-spring.datasource.filters= stat,wall,log4j
12
-spring.datasource.maxActive= 200
13
-spring.datasource.initialSize= 1
14
-spring.datasource.maxWait= 60000
15
-spring.datasource.minIdle= 1
16
-spring.datasource.timeBetweenEvictionRunsMillis= 60000
17
-spring.datasource.minEvictableIdleTimeMillis= 300000
18
-spring.datasource.validationQuery= select 'x'
19
-spring.datasource.testWhileIdle= true
20
-spring.datasource.testOnBorrow= false
21
-spring.datasource.testOnReturn= false
22
-spring.datasource.poolPreparedStatements= true
23
-spring.datasource.maxOpenPreparedStatements= 20
24
-# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
25
-connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
26
-#useGlobalDataSourceStat: true
27
-
28
-# redis
29
-# Redis服务器地址
30
-spring.redis.host=127.0.0.1
31
-# Redis服务器连接端口
32
-spring.redis.port=6379
33
-# 连接池最大连接数(使用负值表示没有限制)
34
-spring.redis.pool.max-active=8
35
-# 连接池最大阻塞等待时间(使用负值表示没有限制)
36
-spring.redis.pool.max-wait=-1
37
-# 连接池中的最大空闲连接
38
-spring.redis.pool.max-idle=8
39
-# 连接池中的最小空闲连接
40
-spring.redis.pool.min-idle=0
41
-# 连接超时时间(毫秒)
42
-spring.redis.timeout=0
43
-
44
-# MongoDB
45
-#spring.data.mongodb.uri=mongodb://localhost:27017/test
46
-
47
-#Mybatis
48
-mybatis.mapper-locations=classpath:mappers/*.xml
49
-mybatis.type-aliases-package=com.huojutech.entity
1
+server.port=8081
2
+
3
+# mysql
4
+spring.datasource.url=jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=utf-8
5
+spring.datasource.username=root
6
+spring.datasource.password=123456
7
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
8
+
9
+# dataSource
10
+spring.datasource.type= com.alibaba.druid.pool.DruidDataSource
11
+spring.datasource.filters= stat,wall,log4j
12
+spring.datasource.maxActive= 200
13
+spring.datasource.initialSize= 1
14
+spring.datasource.maxWait= 60000
15
+spring.datasource.minIdle= 1
16
+spring.datasource.timeBetweenEvictionRunsMillis= 60000
17
+spring.datasource.minEvictableIdleTimeMillis= 300000
18
+spring.datasource.validationQuery= select 'x'
19
+spring.datasource.testWhileIdle= true
20
+spring.datasource.testOnBorrow= false
21
+spring.datasource.testOnReturn= false
22
+spring.datasource.poolPreparedStatements= true
23
+spring.datasource.maxOpenPreparedStatements= 20
24
+# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
25
+connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
26
+#useGlobalDataSourceStat: true
27
+
28
+# redis
29
+# Redis服务器地址
30
+spring.redis.host=127.0.0.1
31
+# Redis服务器连接端口
32
+spring.redis.port=6379
33
+# 连接池最大连接数(使用负值表示没有限制)
34
+spring.redis.pool.max-active=8
35
+# 连接池最大阻塞等待时间(使用负值表示没有限制)
36
+spring.redis.pool.max-wait=-1
37
+# 连接池中的最大空闲连接
38
+spring.redis.pool.max-idle=8
39
+# 连接池中的最小空闲连接
40
+spring.redis.pool.min-idle=0
41
+# 连接超时时间(毫秒)
42
+spring.redis.timeout=0
43
+
44
+# MongoDB
45
+#spring.data.mongodb.uri=mongodb://localhost:27017/test
46
+
47
+#Mybatis
48
+mybatis.mapper-locations=classpath:mappers/*.xml
49
+mybatis.type-aliases-package=com.huojutech.entity

+ 83 - 83
huozuan/src/main/resources/generatorConfig.xml

@@ -1,84 +1,84 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE generatorConfiguration
3
-        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
4
-        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
5
-
6
-<generatorConfiguration>
7
-    <!--mysql 连接数据库jar 这里选择自己本地位置-->
8
-    <classPathEntry location="D:/mysql-connector-java-5.1.46-bin.jar" />
9
-    <context id="testTables" targetRuntime="MyBatis3">
10
-        <commentGenerator>
11
-            <!-- 是否去除自动生成的注释 true:是 : false:否 -->
12
-            <property name="suppressAllComments" value="true" />
13
-        </commentGenerator>
14
-        <!--数据库连接的信息:驱动类、连接地址、用户名、密码 -->
15
-        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
16
-                        connectionURL="jdbc:mysql://121.41.17.212:3306/diamond" userId="yxb"
17
-                        password="123456">
18
-        </jdbcConnection>
19
-        <!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL 和
20
-           NUMERIC 类型解析为java.math.BigDecimal -->
21
-        <javaTypeResolver>
22
-            <property name="forceBigDecimals" value="false" />
23
-        </javaTypeResolver>
24
-
25
-        <!-- targetProject:生成PO类的位置 -->
26
-        <javaModelGenerator targetPackage="com.huojutech.entity"
27
-                            targetProject="src/main/java">
28
-            <!-- enableSubPackages:是否让schema作为包的后缀 -->
29
-            <property name="enableSubPackages" value="false" />
30
-            <!-- 从数据库返回的值被清理前后的空格 -->
31
-            <property name="trimStrings" value="true" />
32
-        </javaModelGenerator>
33
-        <!-- targetProject:mapper映射文件生成的位置
34
-           如果maven工程只是单独的一个工程,targetProject="src/main/java"
35
-           若果maven工程是分模块的工程,targetProject="所属模块的名称",例如:
36
-           targetProject="ecps-manager-mapper",下同-->
37
-        <sqlMapGenerator targetPackage="com.huojutech.dao"
38
-                         targetProject="src/main/java">
39
-            <!-- enableSubPackages:是否让schema作为包的后缀 -->
40
-            <property name="enableSubPackages" value="false" />
41
-        </sqlMapGenerator>
42
-        <!-- targetPackage:mapper接口生成的位置 -->
43
-        <javaClientGenerator type="XMLMAPPER"
44
-                             targetPackage="com.huojutech.dao"
45
-                             targetProject="src/main/java">
46
-            <!-- enableSubPackages:是否让schema作为包的后缀 -->
47
-            <property name="enableSubPackages" value="false" />
48
-        </javaClientGenerator>
49
-
50
-
51
-        <!-- 指定数据库表 -->
52
-        <table tableName="diamond_record" domainObjectName="DiamondRecord" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
53
-            <generatedKey column="id" sqlStatement="JDBC"/>
54
-        </table>
55
-        <table tableName="stock_forecast" domainObjectName="StockForecast" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
56
-            <generatedKey column="id" sqlStatement="JDBC"/>
57
-        </table>
58
-        <table tableName="stock_forecast_collect" domainObjectName="StockForecastCollect" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
59
-            <generatedKey column="id" sqlStatement="JDBC"/>
60
-        </table>
61
-        <table tableName="stock_forecast_vote" domainObjectName="StockForecastVote" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
62
-            <generatedKey column="id" sqlStatement="JDBC"/>
63
-        </table>
64
-        <table tableName="stock_optional" domainObjectName="StockOptional" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
65
-            <generatedKey column="id" sqlStatement="JDBC"/>
66
-        </table>
67
-        <table tableName="system_config" domainObjectName="SystemConfig" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
68
-            <generatedKey column="id" sqlStatement="JDBC"/>
69
-        </table>
70
-        <table tableName="user" domainObjectName="User" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
71
-            <generatedKey column="id" sqlStatement="JDBC"/>
72
-        </table>
73
-        <table tableName="user_concern" domainObjectName="UserConcern" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
74
-            <generatedKey column="id" sqlStatement="JDBC"/>
75
-        </table>
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-    </context>
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE generatorConfiguration
3
+        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
5
+
6
+<generatorConfiguration>
7
+    <!--mysql 连接数据库jar 这里选择自己本地位置-->
8
+    <classPathEntry location="D:/mysql-connector-java-5.1.46-bin.jar" />
9
+    <context id="testTables" targetRuntime="MyBatis3">
10
+        <commentGenerator>
11
+            <!-- 是否去除自动生成的注释 true:是 : false:否 -->
12
+            <property name="suppressAllComments" value="true" />
13
+        </commentGenerator>
14
+        <!--数据库连接的信息:驱动类、连接地址、用户名、密码 -->
15
+        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
16
+                        connectionURL="jdbc:mysql://121.41.17.212:3306/diamond" userId="yxb"
17
+                        password="123456">
18
+        </jdbcConnection>
19
+        <!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL 和
20
+           NUMERIC 类型解析为java.math.BigDecimal -->
21
+        <javaTypeResolver>
22
+            <property name="forceBigDecimals" value="false" />
23
+        </javaTypeResolver>
24
+
25
+        <!-- targetProject:生成PO类的位置 -->
26
+        <javaModelGenerator targetPackage="com.huojutech.entity"
27
+                            targetProject="src/main/java">
28
+            <!-- enableSubPackages:是否让schema作为包的后缀 -->
29
+            <property name="enableSubPackages" value="false" />
30
+            <!-- 从数据库返回的值被清理前后的空格 -->
31
+            <property name="trimStrings" value="true" />
32
+        </javaModelGenerator>
33
+        <!-- targetProject:mapper映射文件生成的位置
34
+           如果maven工程只是单独的一个工程,targetProject="src/main/java"
35
+           若果maven工程是分模块的工程,targetProject="所属模块的名称",例如:
36
+           targetProject="ecps-manager-mapper",下同-->
37
+        <sqlMapGenerator targetPackage="com.huojutech.dao"
38
+                         targetProject="src/main/java">
39
+            <!-- enableSubPackages:是否让schema作为包的后缀 -->
40
+            <property name="enableSubPackages" value="false" />
41
+        </sqlMapGenerator>
42
+        <!-- targetPackage:mapper接口生成的位置 -->
43
+        <javaClientGenerator type="XMLMAPPER"
44
+                             targetPackage="com.huojutech.dao"
45
+                             targetProject="src/main/java">
46
+            <!-- enableSubPackages:是否让schema作为包的后缀 -->
47
+            <property name="enableSubPackages" value="false" />
48
+        </javaClientGenerator>
49
+
50
+
51
+        <!-- 指定数据库表 -->
52
+        <table tableName="diamond_record" domainObjectName="DiamondRecord" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
53
+            <generatedKey column="id" sqlStatement="JDBC"/>
54
+        </table>
55
+        <table tableName="stock_forecast" domainObjectName="StockForecast" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
56
+            <generatedKey column="id" sqlStatement="JDBC"/>
57
+        </table>
58
+        <table tableName="stock_forecast_collect" domainObjectName="StockForecastCollect" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
59
+            <generatedKey column="id" sqlStatement="JDBC"/>
60
+        </table>
61
+        <table tableName="stock_forecast_vote" domainObjectName="StockForecastVote" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
62
+            <generatedKey column="id" sqlStatement="JDBC"/>
63
+        </table>
64
+        <table tableName="stock_optional" domainObjectName="StockOptional" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
65
+            <generatedKey column="id" sqlStatement="JDBC"/>
66
+        </table>
67
+        <table tableName="system_config" domainObjectName="SystemConfig" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
68
+            <generatedKey column="id" sqlStatement="JDBC"/>
69
+        </table>
70
+        <table tableName="user" domainObjectName="User" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
71
+            <generatedKey column="id" sqlStatement="JDBC"/>
72
+        </table>
73
+        <table tableName="user_concern" domainObjectName="UserConcern" enableCountByExample="true" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="true" selectByExampleQueryId="true">
74
+            <generatedKey column="id" sqlStatement="JDBC"/>
75
+        </table>
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+    </context>
84 84
 </generatorConfiguration>

+ 59 - 59
huozuan/src/main/resources/logback.xml

@@ -1,60 +1,60 @@
1
-<!-- Logback configuration. See http://logback.qos.ch/manual/index.html -->
2
-<configuration scan="true" scanPeriod="10 seconds">
3
-    <include resource="org/springframework/boot/logging/logback/base.xml" />
4
-    
5
-    <property name="log.path" value="/data/spring_logs/demo" />
6
-
7
-    <appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
8
-        <File>${LOG_PATH}/info.log</File>
9
-        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
10
-            <fileNamePattern>${LOG_PATH}/info-%d{yyyyMMdd}.log.%i</fileNamePattern>
11
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
12
-                <maxFileSize>500MB</maxFileSize>
13
-            </timeBasedFileNamingAndTriggeringPolicy>
14
-            <maxHistory>2</maxHistory>
15
-        </rollingPolicy>
16
-        <layout class="ch.qos.logback.classic.PatternLayout">
17
-            <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%msg%n
18
-            </Pattern>
19
-        </layout>
20
-    </appender>
21
-
22
-    <appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
23
-        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
24
-            <level>ERROR</level>
25
-        </filter>
26
-        <File>${LOG_PATH}/error.log</File>
27
-        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
28
-            <fileNamePattern>${LOG_PATH}/error-%d{yyyyMMdd}.log.%i
29
-            </fileNamePattern>
30
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
31
-                <maxFileSize>500MB</maxFileSize>
32
-            </timeBasedFileNamingAndTriggeringPolicy>
33
-            <maxHistory>2</maxHistory>
34
-        </rollingPolicy>
35
-        <layout class="ch.qos.logback.classic.PatternLayout">
36
-            <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%msg%n
37
-
38
-            </Pattern>
39
-        </layout>
40
-    </appender>
41
-    
42
-<!--     <logger name="org.springframework.web" level="DEBUG" /> -->
43
-    <!-- hibernate日志输入 -->
44
-    <!-- <logger name="org.hibernate.type.descriptor.sql.BasicBinder"
45
-        level="TRACE" />
46
-    <logger name="org.hibernate.type.descriptor.sql.BasicExtractor"
47
-        level="TRACE" />
48
-    <logger name="org.hibernate.SQL" level="INFO" />
49
-    <logger name="org.hibernate.engine.QueryParameters" level="INFO" />
50
-    <logger name="org.hibernate.engine.query.HQLQueryPlan" level="INFO" /> -->
51
-
52
-    <root level="INFO">
53
-        <appender-ref ref="INFO_FILE" />
54
-        <appender-ref ref="ERROR_FILE" />
55
-    </root>
56
-
57
-    <!--在控制台打印sql-->
58
-    <logger name="com.huojutech" level="debug" />
59
-
1
+<!-- Logback configuration. See http://logback.qos.ch/manual/index.html -->
2
+<configuration scan="true" scanPeriod="10 seconds">
3
+    <include resource="org/springframework/boot/logging/logback/base.xml" />
4
+    
5
+    <property name="log.path" value="/data/spring_logs/demo" />
6
+
7
+    <appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
8
+        <File>${LOG_PATH}/info.log</File>
9
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
10
+            <fileNamePattern>${LOG_PATH}/info-%d{yyyyMMdd}.log.%i</fileNamePattern>
11
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
12
+                <maxFileSize>500MB</maxFileSize>
13
+            </timeBasedFileNamingAndTriggeringPolicy>
14
+            <maxHistory>2</maxHistory>
15
+        </rollingPolicy>
16
+        <layout class="ch.qos.logback.classic.PatternLayout">
17
+            <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%msg%n
18
+            </Pattern>
19
+        </layout>
20
+    </appender>
21
+
22
+    <appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
23
+        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
24
+            <level>ERROR</level>
25
+        </filter>
26
+        <File>${LOG_PATH}/error.log</File>
27
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
28
+            <fileNamePattern>${LOG_PATH}/error-%d{yyyyMMdd}.log.%i
29
+            </fileNamePattern>
30
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
31
+                <maxFileSize>500MB</maxFileSize>
32
+            </timeBasedFileNamingAndTriggeringPolicy>
33
+            <maxHistory>2</maxHistory>
34
+        </rollingPolicy>
35
+        <layout class="ch.qos.logback.classic.PatternLayout">
36
+            <Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%msg%n
37
+
38
+            </Pattern>
39
+        </layout>
40
+    </appender>
41
+    
42
+<!--     <logger name="org.springframework.web" level="DEBUG" /> -->
43
+    <!-- hibernate日志输入 -->
44
+    <!-- <logger name="org.hibernate.type.descriptor.sql.BasicBinder"
45
+        level="TRACE" />
46
+    <logger name="org.hibernate.type.descriptor.sql.BasicExtractor"
47
+        level="TRACE" />
48
+    <logger name="org.hibernate.SQL" level="INFO" />
49
+    <logger name="org.hibernate.engine.QueryParameters" level="INFO" />
50
+    <logger name="org.hibernate.engine.query.HQLQueryPlan" level="INFO" /> -->
51
+
52
+    <root level="INFO">
53
+        <appender-ref ref="INFO_FILE" />
54
+        <appender-ref ref="ERROR_FILE" />
55
+    </root>
56
+
57
+    <!--在控制台打印sql-->
58
+    <logger name="com.huojutech" level="debug" />
59
+
60 60
 </configuration>

+ 171 - 171
huozuan/src/main/resources/mappers/DiamondRecordMapper.xml

@@ -1,172 +1,172 @@
1
-<?xml version="1.0" encoding="UTF-8" ?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
-<mapper namespace="com.huojutech.dao.DiamondRecordMapper" >
4
-  <resultMap id="BaseResultMap" type="com.huojutech.entity.DiamondRecord" >
5
-    <id column="id" property="id" jdbcType="INTEGER" />
6
-    <result column="uid" property="uid" jdbcType="INTEGER" />
7
-    <result column="name" property="name" jdbcType="VARCHAR" />
8
-    <result column="descr" property="descr" jdbcType="VARCHAR" />
9
-    <result column="amount" property="amount" jdbcType="DECIMAL" />
10
-    <result column="status" property="status" jdbcType="INTEGER" />
11
-    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
12
-    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
13
-  </resultMap>
14
-  <sql id="Example_Where_Clause" >
15
-    <where >
16
-      <foreach collection="oredCriteria" item="criteria" separator="or" >
17
-        <if test="criteria.valid" >
18
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
19
-            <foreach collection="criteria.criteria" item="criterion" >
20
-              <choose >
21
-                <when test="criterion.noValue" >
22
-                  and ${criterion.condition}
23
-                </when>
24
-                <when test="criterion.singleValue" >
25
-                  and ${criterion.condition} #{criterion.value}
26
-                </when>
27
-                <when test="criterion.betweenValue" >
28
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
29
-                </when>
30
-                <when test="criterion.listValue" >
31
-                  and ${criterion.condition}
32
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
33
-                    #{listItem}
34
-                  </foreach>
35
-                </when>
36
-              </choose>
37
-            </foreach>
38
-          </trim>
39
-        </if>
40
-      </foreach>
41
-    </where>
42
-  </sql>
43
-  <sql id="Base_Column_List" >
44
-    id, uid, name, descr, amount, status, crt_time, upd_time
45
-  </sql>
46
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.DiamondRecordExample" >
47
-    select
48
-    <if test="distinct" >
49
-      distinct
50
-    </if>
51
-    'true' as QUERYID,
52
-    <include refid="Base_Column_List" />
53
-    from diamond_record
54
-    <if test="_parameter != null" >
55
-      <include refid="Example_Where_Clause" />
56
-    </if>
57
-    <if test="orderByClause != null" >
58
-      order by ${orderByClause}
59
-    </if>
60
-  </select>
61
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
62
-    select 
63
-    <include refid="Base_Column_List" />
64
-    from diamond_record
65
-    where id = #{id,jdbcType=INTEGER}
66
-  </select>
67
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
68
-    delete from diamond_record
69
-    where id = #{id,jdbcType=INTEGER}
70
-  </delete>
71
-  <insert id="insert" parameterType="com.huojutech.entity.DiamondRecord" useGeneratedKeys="true" keyProperty="id" >
72
-    insert into diamond_record (uid, name, descr, 
73
-      amount, status, crt_time, 
74
-      upd_time)
75
-    values (#{uid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{descr,jdbcType=VARCHAR}, 
76
-      #{amount,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, #{crtTime,jdbcType=TIMESTAMP}, 
77
-      #{updTime,jdbcType=TIMESTAMP})
78
-  </insert>
79
-  <insert id="insertSelective" parameterType="com.huojutech.entity.DiamondRecord" useGeneratedKeys="true" keyProperty="id" >
80
-    insert into diamond_record
81
-    <trim prefix="(" suffix=")" suffixOverrides="," >
82
-      <if test="uid != null" >
83
-        uid,
84
-      </if>
85
-      <if test="name != null" >
86
-        name,
87
-      </if>
88
-      <if test="descr != null" >
89
-        descr,
90
-      </if>
91
-      <if test="amount != null" >
92
-        amount,
93
-      </if>
94
-      <if test="status != null" >
95
-        status,
96
-      </if>
97
-      <if test="crtTime != null" >
98
-        crt_time,
99
-      </if>
100
-      <if test="updTime != null" >
101
-        upd_time,
102
-      </if>
103
-    </trim>
104
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
105
-      <if test="uid != null" >
106
-        #{uid,jdbcType=INTEGER},
107
-      </if>
108
-      <if test="name != null" >
109
-        #{name,jdbcType=VARCHAR},
110
-      </if>
111
-      <if test="descr != null" >
112
-        #{descr,jdbcType=VARCHAR},
113
-      </if>
114
-      <if test="amount != null" >
115
-        #{amount,jdbcType=DECIMAL},
116
-      </if>
117
-      <if test="status != null" >
118
-        #{status,jdbcType=INTEGER},
119
-      </if>
120
-      <if test="crtTime != null" >
121
-        #{crtTime,jdbcType=TIMESTAMP},
122
-      </if>
123
-      <if test="updTime != null" >
124
-        #{updTime,jdbcType=TIMESTAMP},
125
-      </if>
126
-    </trim>
127
-  </insert>
128
-  <select id="countByExample" parameterType="com.huojutech.entity.DiamondRecordExample" resultType="java.lang.Integer" >
129
-    select count(*) from diamond_record
130
-    <if test="_parameter != null" >
131
-      <include refid="Example_Where_Clause" />
132
-    </if>
133
-  </select>
134
-  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.DiamondRecord" >
135
-    update diamond_record
136
-    <set >
137
-      <if test="uid != null" >
138
-        uid = #{uid,jdbcType=INTEGER},
139
-      </if>
140
-      <if test="name != null" >
141
-        name = #{name,jdbcType=VARCHAR},
142
-      </if>
143
-      <if test="descr != null" >
144
-        descr = #{descr,jdbcType=VARCHAR},
145
-      </if>
146
-      <if test="amount != null" >
147
-        amount = #{amount,jdbcType=DECIMAL},
148
-      </if>
149
-      <if test="status != null" >
150
-        status = #{status,jdbcType=INTEGER},
151
-      </if>
152
-      <if test="crtTime != null" >
153
-        crt_time = #{crtTime,jdbcType=TIMESTAMP},
154
-      </if>
155
-      <if test="updTime != null" >
156
-        upd_time = #{updTime,jdbcType=TIMESTAMP},
157
-      </if>
158
-    </set>
159
-    where id = #{id,jdbcType=INTEGER}
160
-  </update>
161
-  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.DiamondRecord" >
162
-    update diamond_record
163
-    set uid = #{uid,jdbcType=INTEGER},
164
-      name = #{name,jdbcType=VARCHAR},
165
-      descr = #{descr,jdbcType=VARCHAR},
166
-      amount = #{amount,jdbcType=DECIMAL},
167
-      status = #{status,jdbcType=INTEGER},
168
-      crt_time = #{crtTime,jdbcType=TIMESTAMP},
169
-      upd_time = #{updTime,jdbcType=TIMESTAMP}
170
-    where id = #{id,jdbcType=INTEGER}
171
-  </update>
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.huojutech.dao.DiamondRecordMapper" >
4
+  <resultMap id="BaseResultMap" type="com.huojutech.entity.DiamondRecord" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="uid" property="uid" jdbcType="INTEGER" />
7
+    <result column="name" property="name" jdbcType="VARCHAR" />
8
+    <result column="descr" property="descr" jdbcType="VARCHAR" />
9
+    <result column="amount" property="amount" jdbcType="DECIMAL" />
10
+    <result column="status" property="status" jdbcType="INTEGER" />
11
+    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
12
+    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
13
+  </resultMap>
14
+  <sql id="Example_Where_Clause" >
15
+    <where >
16
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
17
+        <if test="criteria.valid" >
18
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
19
+            <foreach collection="criteria.criteria" item="criterion" >
20
+              <choose >
21
+                <when test="criterion.noValue" >
22
+                  and ${criterion.condition}
23
+                </when>
24
+                <when test="criterion.singleValue" >
25
+                  and ${criterion.condition} #{criterion.value}
26
+                </when>
27
+                <when test="criterion.betweenValue" >
28
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
29
+                </when>
30
+                <when test="criterion.listValue" >
31
+                  and ${criterion.condition}
32
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
33
+                    #{listItem}
34
+                  </foreach>
35
+                </when>
36
+              </choose>
37
+            </foreach>
38
+          </trim>
39
+        </if>
40
+      </foreach>
41
+    </where>
42
+  </sql>
43
+  <sql id="Base_Column_List" >
44
+    id, uid, name, descr, amount, status, crt_time, upd_time
45
+  </sql>
46
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.DiamondRecordExample" >
47
+    select
48
+    <if test="distinct" >
49
+      distinct
50
+    </if>
51
+    'true' as QUERYID,
52
+    <include refid="Base_Column_List" />
53
+    from diamond_record
54
+    <if test="_parameter != null" >
55
+      <include refid="Example_Where_Clause" />
56
+    </if>
57
+    <if test="orderByClause != null" >
58
+      order by ${orderByClause}
59
+    </if>
60
+  </select>
61
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
62
+    select 
63
+    <include refid="Base_Column_List" />
64
+    from diamond_record
65
+    where id = #{id,jdbcType=INTEGER}
66
+  </select>
67
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
68
+    delete from diamond_record
69
+    where id = #{id,jdbcType=INTEGER}
70
+  </delete>
71
+  <insert id="insert" parameterType="com.huojutech.entity.DiamondRecord" useGeneratedKeys="true" keyProperty="id" >
72
+    insert into diamond_record (uid, name, descr, 
73
+      amount, status, crt_time, 
74
+      upd_time)
75
+    values (#{uid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{descr,jdbcType=VARCHAR}, 
76
+      #{amount,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, #{crtTime,jdbcType=TIMESTAMP}, 
77
+      #{updTime,jdbcType=TIMESTAMP})
78
+  </insert>
79
+  <insert id="insertSelective" parameterType="com.huojutech.entity.DiamondRecord" useGeneratedKeys="true" keyProperty="id" >
80
+    insert into diamond_record
81
+    <trim prefix="(" suffix=")" suffixOverrides="," >
82
+      <if test="uid != null" >
83
+        uid,
84
+      </if>
85
+      <if test="name != null" >
86
+        name,
87
+      </if>
88
+      <if test="descr != null" >
89
+        descr,
90
+      </if>
91
+      <if test="amount != null" >
92
+        amount,
93
+      </if>
94
+      <if test="status != null" >
95
+        status,
96
+      </if>
97
+      <if test="crtTime != null" >
98
+        crt_time,
99
+      </if>
100
+      <if test="updTime != null" >
101
+        upd_time,
102
+      </if>
103
+    </trim>
104
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
105
+      <if test="uid != null" >
106
+        #{uid,jdbcType=INTEGER},
107
+      </if>
108
+      <if test="name != null" >
109
+        #{name,jdbcType=VARCHAR},
110
+      </if>
111
+      <if test="descr != null" >
112
+        #{descr,jdbcType=VARCHAR},
113
+      </if>
114
+      <if test="amount != null" >
115
+        #{amount,jdbcType=DECIMAL},
116
+      </if>
117
+      <if test="status != null" >
118
+        #{status,jdbcType=INTEGER},
119
+      </if>
120
+      <if test="crtTime != null" >
121
+        #{crtTime,jdbcType=TIMESTAMP},
122
+      </if>
123
+      <if test="updTime != null" >
124
+        #{updTime,jdbcType=TIMESTAMP},
125
+      </if>
126
+    </trim>
127
+  </insert>
128
+  <select id="countByExample" parameterType="com.huojutech.entity.DiamondRecordExample" resultType="java.lang.Integer" >
129
+    select count(*) from diamond_record
130
+    <if test="_parameter != null" >
131
+      <include refid="Example_Where_Clause" />
132
+    </if>
133
+  </select>
134
+  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.DiamondRecord" >
135
+    update diamond_record
136
+    <set >
137
+      <if test="uid != null" >
138
+        uid = #{uid,jdbcType=INTEGER},
139
+      </if>
140
+      <if test="name != null" >
141
+        name = #{name,jdbcType=VARCHAR},
142
+      </if>
143
+      <if test="descr != null" >
144
+        descr = #{descr,jdbcType=VARCHAR},
145
+      </if>
146
+      <if test="amount != null" >
147
+        amount = #{amount,jdbcType=DECIMAL},
148
+      </if>
149
+      <if test="status != null" >
150
+        status = #{status,jdbcType=INTEGER},
151
+      </if>
152
+      <if test="crtTime != null" >
153
+        crt_time = #{crtTime,jdbcType=TIMESTAMP},
154
+      </if>
155
+      <if test="updTime != null" >
156
+        upd_time = #{updTime,jdbcType=TIMESTAMP},
157
+      </if>
158
+    </set>
159
+    where id = #{id,jdbcType=INTEGER}
160
+  </update>
161
+  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.DiamondRecord" >
162
+    update diamond_record
163
+    set uid = #{uid,jdbcType=INTEGER},
164
+      name = #{name,jdbcType=VARCHAR},
165
+      descr = #{descr,jdbcType=VARCHAR},
166
+      amount = #{amount,jdbcType=DECIMAL},
167
+      status = #{status,jdbcType=INTEGER},
168
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
169
+      upd_time = #{updTime,jdbcType=TIMESTAMP}
170
+    where id = #{id,jdbcType=INTEGER}
171
+  </update>
172 172
 </mapper>

+ 136 - 136
huozuan/src/main/resources/mappers/StockForecastCollectMapper.xml

@@ -1,137 +1,137 @@
1
-<?xml version="1.0" encoding="UTF-8" ?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
-<mapper namespace="com.huojutech.dao.StockForecastCollectMapper" >
4
-  <resultMap id="BaseResultMap" type="com.huojutech.entity.StockForecastCollect" >
5
-    <id column="id" property="id" jdbcType="INTEGER" />
6
-    <result column="uid" property="uid" jdbcType="INTEGER" />
7
-    <result column="forecast_id" property="forecastId" jdbcType="INTEGER" />
8
-    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
9
-    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
10
-  </resultMap>
11
-  <sql id="Example_Where_Clause" >
12
-    <where >
13
-      <foreach collection="oredCriteria" item="criteria" separator="or" >
14
-        <if test="criteria.valid" >
15
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
16
-            <foreach collection="criteria.criteria" item="criterion" >
17
-              <choose >
18
-                <when test="criterion.noValue" >
19
-                  and ${criterion.condition}
20
-                </when>
21
-                <when test="criterion.singleValue" >
22
-                  and ${criterion.condition} #{criterion.value}
23
-                </when>
24
-                <when test="criterion.betweenValue" >
25
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
26
-                </when>
27
-                <when test="criterion.listValue" >
28
-                  and ${criterion.condition}
29
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
30
-                    #{listItem}
31
-                  </foreach>
32
-                </when>
33
-              </choose>
34
-            </foreach>
35
-          </trim>
36
-        </if>
37
-      </foreach>
38
-    </where>
39
-  </sql>
40
-  <sql id="Base_Column_List" >
41
-    id, uid, forecast_id, crt_time, upd_time
42
-  </sql>
43
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.StockForecastCollectExample" >
44
-    select
45
-    <if test="distinct" >
46
-      distinct
47
-    </if>
48
-    'true' as QUERYID,
49
-    <include refid="Base_Column_List" />
50
-    from stock_forecast_collect
51
-    <if test="_parameter != null" >
52
-      <include refid="Example_Where_Clause" />
53
-    </if>
54
-    <if test="orderByClause != null" >
55
-      order by ${orderByClause}
56
-    </if>
57
-  </select>
58
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
59
-    select 
60
-    <include refid="Base_Column_List" />
61
-    from stock_forecast_collect
62
-    where id = #{id,jdbcType=INTEGER}
63
-  </select>
64
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
65
-    delete from stock_forecast_collect
66
-    where id = #{id,jdbcType=INTEGER}
67
-  </delete>
68
-  <insert id="insert" parameterType="com.huojutech.entity.StockForecastCollect" useGeneratedKeys="true" keyProperty="id" >
69
-    insert into stock_forecast_collect (uid, forecast_id, crt_time, 
70
-      upd_time)
71
-    values (#{uid,jdbcType=INTEGER}, #{forecastId,jdbcType=INTEGER}, #{crtTime,jdbcType=TIMESTAMP}, 
72
-      #{updTime,jdbcType=TIMESTAMP})
73
-  </insert>
74
-  <insert id="insertSelective" parameterType="com.huojutech.entity.StockForecastCollect" useGeneratedKeys="true" keyProperty="id" >
75
-    insert into stock_forecast_collect
76
-    <trim prefix="(" suffix=")" suffixOverrides="," >
77
-      <if test="uid != null" >
78
-        uid,
79
-      </if>
80
-      <if test="forecastId != null" >
81
-        forecast_id,
82
-      </if>
83
-      <if test="crtTime != null" >
84
-        crt_time,
85
-      </if>
86
-      <if test="updTime != null" >
87
-        upd_time,
88
-      </if>
89
-    </trim>
90
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
91
-      <if test="uid != null" >
92
-        #{uid,jdbcType=INTEGER},
93
-      </if>
94
-      <if test="forecastId != null" >
95
-        #{forecastId,jdbcType=INTEGER},
96
-      </if>
97
-      <if test="crtTime != null" >
98
-        #{crtTime,jdbcType=TIMESTAMP},
99
-      </if>
100
-      <if test="updTime != null" >
101
-        #{updTime,jdbcType=TIMESTAMP},
102
-      </if>
103
-    </trim>
104
-  </insert>
105
-  <select id="countByExample" parameterType="com.huojutech.entity.StockForecastCollectExample" resultType="java.lang.Integer" >
106
-    select count(*) from stock_forecast_collect
107
-    <if test="_parameter != null" >
108
-      <include refid="Example_Where_Clause" />
109
-    </if>
110
-  </select>
111
-  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.StockForecastCollect" >
112
-    update stock_forecast_collect
113
-    <set >
114
-      <if test="uid != null" >
115
-        uid = #{uid,jdbcType=INTEGER},
116
-      </if>
117
-      <if test="forecastId != null" >
118
-        forecast_id = #{forecastId,jdbcType=INTEGER},
119
-      </if>
120
-      <if test="crtTime != null" >
121
-        crt_time = #{crtTime,jdbcType=TIMESTAMP},
122
-      </if>
123
-      <if test="updTime != null" >
124
-        upd_time = #{updTime,jdbcType=TIMESTAMP},
125
-      </if>
126
-    </set>
127
-    where id = #{id,jdbcType=INTEGER}
128
-  </update>
129
-  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.StockForecastCollect" >
130
-    update stock_forecast_collect
131
-    set uid = #{uid,jdbcType=INTEGER},
132
-      forecast_id = #{forecastId,jdbcType=INTEGER},
133
-      crt_time = #{crtTime,jdbcType=TIMESTAMP},
134
-      upd_time = #{updTime,jdbcType=TIMESTAMP}
135
-    where id = #{id,jdbcType=INTEGER}
136
-  </update>
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.huojutech.dao.StockForecastCollectMapper" >
4
+  <resultMap id="BaseResultMap" type="com.huojutech.entity.StockForecastCollect" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="uid" property="uid" jdbcType="INTEGER" />
7
+    <result column="forecast_id" property="forecastId" jdbcType="INTEGER" />
8
+    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
9
+    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
10
+  </resultMap>
11
+  <sql id="Example_Where_Clause" >
12
+    <where >
13
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
14
+        <if test="criteria.valid" >
15
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
16
+            <foreach collection="criteria.criteria" item="criterion" >
17
+              <choose >
18
+                <when test="criterion.noValue" >
19
+                  and ${criterion.condition}
20
+                </when>
21
+                <when test="criterion.singleValue" >
22
+                  and ${criterion.condition} #{criterion.value}
23
+                </when>
24
+                <when test="criterion.betweenValue" >
25
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
26
+                </when>
27
+                <when test="criterion.listValue" >
28
+                  and ${criterion.condition}
29
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
30
+                    #{listItem}
31
+                  </foreach>
32
+                </when>
33
+              </choose>
34
+            </foreach>
35
+          </trim>
36
+        </if>
37
+      </foreach>
38
+    </where>
39
+  </sql>
40
+  <sql id="Base_Column_List" >
41
+    id, uid, forecast_id, crt_time, upd_time
42
+  </sql>
43
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.StockForecastCollectExample" >
44
+    select
45
+    <if test="distinct" >
46
+      distinct
47
+    </if>
48
+    'true' as QUERYID,
49
+    <include refid="Base_Column_List" />
50
+    from stock_forecast_collect
51
+    <if test="_parameter != null" >
52
+      <include refid="Example_Where_Clause" />
53
+    </if>
54
+    <if test="orderByClause != null" >
55
+      order by ${orderByClause}
56
+    </if>
57
+  </select>
58
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
59
+    select 
60
+    <include refid="Base_Column_List" />
61
+    from stock_forecast_collect
62
+    where id = #{id,jdbcType=INTEGER}
63
+  </select>
64
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
65
+    delete from stock_forecast_collect
66
+    where id = #{id,jdbcType=INTEGER}
67
+  </delete>
68
+  <insert id="insert" parameterType="com.huojutech.entity.StockForecastCollect" useGeneratedKeys="true" keyProperty="id" >
69
+    insert into stock_forecast_collect (uid, forecast_id, crt_time, 
70
+      upd_time)
71
+    values (#{uid,jdbcType=INTEGER}, #{forecastId,jdbcType=INTEGER}, #{crtTime,jdbcType=TIMESTAMP}, 
72
+      #{updTime,jdbcType=TIMESTAMP})
73
+  </insert>
74
+  <insert id="insertSelective" parameterType="com.huojutech.entity.StockForecastCollect" useGeneratedKeys="true" keyProperty="id" >
75
+    insert into stock_forecast_collect
76
+    <trim prefix="(" suffix=")" suffixOverrides="," >
77
+      <if test="uid != null" >
78
+        uid,
79
+      </if>
80
+      <if test="forecastId != null" >
81
+        forecast_id,
82
+      </if>
83
+      <if test="crtTime != null" >
84
+        crt_time,
85
+      </if>
86
+      <if test="updTime != null" >
87
+        upd_time,
88
+      </if>
89
+    </trim>
90
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
91
+      <if test="uid != null" >
92
+        #{uid,jdbcType=INTEGER},
93
+      </if>
94
+      <if test="forecastId != null" >
95
+        #{forecastId,jdbcType=INTEGER},
96
+      </if>
97
+      <if test="crtTime != null" >
98
+        #{crtTime,jdbcType=TIMESTAMP},
99
+      </if>
100
+      <if test="updTime != null" >
101
+        #{updTime,jdbcType=TIMESTAMP},
102
+      </if>
103
+    </trim>
104
+  </insert>
105
+  <select id="countByExample" parameterType="com.huojutech.entity.StockForecastCollectExample" resultType="java.lang.Integer" >
106
+    select count(*) from stock_forecast_collect
107
+    <if test="_parameter != null" >
108
+      <include refid="Example_Where_Clause" />
109
+    </if>
110
+  </select>
111
+  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.StockForecastCollect" >
112
+    update stock_forecast_collect
113
+    <set >
114
+      <if test="uid != null" >
115
+        uid = #{uid,jdbcType=INTEGER},
116
+      </if>
117
+      <if test="forecastId != null" >
118
+        forecast_id = #{forecastId,jdbcType=INTEGER},
119
+      </if>
120
+      <if test="crtTime != null" >
121
+        crt_time = #{crtTime,jdbcType=TIMESTAMP},
122
+      </if>
123
+      <if test="updTime != null" >
124
+        upd_time = #{updTime,jdbcType=TIMESTAMP},
125
+      </if>
126
+    </set>
127
+    where id = #{id,jdbcType=INTEGER}
128
+  </update>
129
+  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.StockForecastCollect" >
130
+    update stock_forecast_collect
131
+    set uid = #{uid,jdbcType=INTEGER},
132
+      forecast_id = #{forecastId,jdbcType=INTEGER},
133
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
134
+      upd_time = #{updTime,jdbcType=TIMESTAMP}
135
+    where id = #{id,jdbcType=INTEGER}
136
+  </update>
137 137
 </mapper>

+ 294 - 294
huozuan/src/main/resources/mappers/StockForecastMapper.xml

@@ -1,295 +1,295 @@
1
-<?xml version="1.0" encoding="UTF-8" ?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
-<mapper namespace="com.huojutech.dao.StockForecastMapper" >
4
-  <resultMap id="BaseResultMap" type="com.huojutech.entity.StockForecast" >
5
-    <id column="id" property="id" jdbcType="INTEGER" />
6
-    <result column="uid" property="uid" jdbcType="INTEGER" />
7
-    <result column="stock_name" property="stockName" jdbcType="VARCHAR" />
8
-    <result column="stock_code" property="stockCode" jdbcType="VARCHAR" />
9
-    <result column="expect" property="expect" jdbcType="INTEGER" />
10
-    <result column="bet" property="bet" jdbcType="DECIMAL" />
11
-    <result column="current_price" property="currentPrice" jdbcType="DECIMAL" />
12
-    <result column="target_price" property="targetPrice" jdbcType="DECIMAL" />
13
-    <result column="cycle" property="cycle" jdbcType="INTEGER" />
14
-    <result column="start_date" property="startDate" jdbcType="DATE" />
15
-    <result column="end_date" property="endDate" jdbcType="DATE" />
16
-    <result column="status" property="status" jdbcType="INTEGER" />
17
-    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
18
-    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
19
-  </resultMap>
20
-  <resultMap id="ResultMapWithBLOBs" type="com.huojutech.entity.StockForecast" extends="BaseResultMap" >
21
-    <result column="reason" property="reason" jdbcType="LONGVARCHAR" />
22
-  </resultMap>
23
-  <sql id="Example_Where_Clause" >
24
-    <where >
25
-      <foreach collection="oredCriteria" item="criteria" separator="or" >
26
-        <if test="criteria.valid" >
27
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
28
-            <foreach collection="criteria.criteria" item="criterion" >
29
-              <choose >
30
-                <when test="criterion.noValue" >
31
-                  and ${criterion.condition}
32
-                </when>
33
-                <when test="criterion.singleValue" >
34
-                  and ${criterion.condition} #{criterion.value}
35
-                </when>
36
-                <when test="criterion.betweenValue" >
37
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
38
-                </when>
39
-                <when test="criterion.listValue" >
40
-                  and ${criterion.condition}
41
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
42
-                    #{listItem}
43
-                  </foreach>
44
-                </when>
45
-              </choose>
46
-            </foreach>
47
-          </trim>
48
-        </if>
49
-      </foreach>
50
-    </where>
51
-  </sql>
52
-  <sql id="Base_Column_List" >
53
-    id, uid, stock_name, stock_code, expect, bet, current_price, target_price, cycle, 
54
-    start_date, end_date, status, crt_time, upd_time
55
-  </sql>
56
-  <sql id="Blob_Column_List" >
57
-    reason
58
-  </sql>
59
-  <select id="selectByExampleWithBLOBs" resultMap="ResultMapWithBLOBs" parameterType="com.huojutech.entity.StockForecastExample" >
60
-    select
61
-    <if test="distinct" >
62
-      distinct
63
-    </if>
64
-    'true' as QUERYID,
65
-    <include refid="Base_Column_List" />
66
-    ,
67
-    <include refid="Blob_Column_List" />
68
-    from stock_forecast
69
-    <if test="_parameter != null" >
70
-      <include refid="Example_Where_Clause" />
71
-    </if>
72
-    <if test="orderByClause != null" >
73
-      order by ${orderByClause}
74
-    </if>
75
-  </select>
76
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.StockForecastExample" >
77
-    select
78
-    <if test="distinct" >
79
-      distinct
80
-    </if>
81
-    'true' as QUERYID,
82
-    <include refid="Base_Column_List" />
83
-    from stock_forecast
84
-    <if test="_parameter != null" >
85
-      <include refid="Example_Where_Clause" />
86
-    </if>
87
-    <if test="orderByClause != null" >
88
-      order by ${orderByClause}
89
-    </if>
90
-  </select>
91
-  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
92
-    select 
93
-    <include refid="Base_Column_List" />
94
-    ,
95
-    <include refid="Blob_Column_List" />
96
-    from stock_forecast
97
-    where id = #{id,jdbcType=INTEGER}
98
-  </select>
99
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
100
-    delete from stock_forecast
101
-    where id = #{id,jdbcType=INTEGER}
102
-  </delete>
103
-  <insert id="insert" parameterType="com.huojutech.entity.StockForecast" useGeneratedKeys="true" keyProperty="id" >
104
-    insert into stock_forecast (uid, stock_name, stock_code, 
105
-      expect, bet, current_price, 
106
-      target_price, cycle, start_date, 
107
-      end_date, status, crt_time, 
108
-      upd_time, reason)
109
-    values (#{uid,jdbcType=INTEGER}, #{stockName,jdbcType=VARCHAR}, #{stockCode,jdbcType=VARCHAR}, 
110
-      #{expect,jdbcType=INTEGER}, #{bet,jdbcType=DECIMAL}, #{currentPrice,jdbcType=DECIMAL}, 
111
-      #{targetPrice,jdbcType=DECIMAL}, #{cycle,jdbcType=INTEGER}, #{startDate,jdbcType=DATE}, 
112
-      #{endDate,jdbcType=DATE}, #{status,jdbcType=INTEGER}, #{crtTime,jdbcType=TIMESTAMP}, 
113
-      #{updTime,jdbcType=TIMESTAMP}, #{reason,jdbcType=LONGVARCHAR})
114
-  </insert>
115
-  <insert id="insertSelective" parameterType="com.huojutech.entity.StockForecast" useGeneratedKeys="true" keyProperty="id" >
116
-    insert into stock_forecast
117
-    <trim prefix="(" suffix=")" suffixOverrides="," >
118
-      <if test="uid != null" >
119
-        uid,
120
-      </if>
121
-      <if test="stockName != null" >
122
-        stock_name,
123
-      </if>
124
-      <if test="stockCode != null" >
125
-        stock_code,
126
-      </if>
127
-      <if test="expect != null" >
128
-        expect,
129
-      </if>
130
-      <if test="bet != null" >
131
-        bet,
132
-      </if>
133
-      <if test="currentPrice != null" >
134
-        current_price,
135
-      </if>
136
-      <if test="targetPrice != null" >
137
-        target_price,
138
-      </if>
139
-      <if test="cycle != null" >
140
-        cycle,
141
-      </if>
142
-      <if test="startDate != null" >
143
-        start_date,
144
-      </if>
145
-      <if test="endDate != null" >
146
-        end_date,
147
-      </if>
148
-      <if test="status != null" >
149
-        status,
150
-      </if>
151
-      <if test="crtTime != null" >
152
-        crt_time,
153
-      </if>
154
-      <if test="updTime != null" >
155
-        upd_time,
156
-      </if>
157
-      <if test="reason != null" >
158
-        reason,
159
-      </if>
160
-    </trim>
161
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
162
-      <if test="uid != null" >
163
-        #{uid,jdbcType=INTEGER},
164
-      </if>
165
-      <if test="stockName != null" >
166
-        #{stockName,jdbcType=VARCHAR},
167
-      </if>
168
-      <if test="stockCode != null" >
169
-        #{stockCode,jdbcType=VARCHAR},
170
-      </if>
171
-      <if test="expect != null" >
172
-        #{expect,jdbcType=INTEGER},
173
-      </if>
174
-      <if test="bet != null" >
175
-        #{bet,jdbcType=DECIMAL},
176
-      </if>
177
-      <if test="currentPrice != null" >
178
-        #{currentPrice,jdbcType=DECIMAL},
179
-      </if>
180
-      <if test="targetPrice != null" >
181
-        #{targetPrice,jdbcType=DECIMAL},
182
-      </if>
183
-      <if test="cycle != null" >
184
-        #{cycle,jdbcType=INTEGER},
185
-      </if>
186
-      <if test="startDate != null" >
187
-        #{startDate,jdbcType=DATE},
188
-      </if>
189
-      <if test="endDate != null" >
190
-        #{endDate,jdbcType=DATE},
191
-      </if>
192
-      <if test="status != null" >
193
-        #{status,jdbcType=INTEGER},
194
-      </if>
195
-      <if test="crtTime != null" >
196
-        #{crtTime,jdbcType=TIMESTAMP},
197
-      </if>
198
-      <if test="updTime != null" >
199
-        #{updTime,jdbcType=TIMESTAMP},
200
-      </if>
201
-      <if test="reason != null" >
202
-        #{reason,jdbcType=LONGVARCHAR},
203
-      </if>
204
-    </trim>
205
-  </insert>
206
-  <select id="countByExample" parameterType="com.huojutech.entity.StockForecastExample" resultType="java.lang.Integer" >
207
-    select count(*) from stock_forecast
208
-    <if test="_parameter != null" >
209
-      <include refid="Example_Where_Clause" />
210
-    </if>
211
-  </select>
212
-  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.StockForecast" >
213
-    update stock_forecast
214
-    <set >
215
-      <if test="uid != null" >
216
-        uid = #{uid,jdbcType=INTEGER},
217
-      </if>
218
-      <if test="stockName != null" >
219
-        stock_name = #{stockName,jdbcType=VARCHAR},
220
-      </if>
221
-      <if test="stockCode != null" >
222
-        stock_code = #{stockCode,jdbcType=VARCHAR},
223
-      </if>
224
-      <if test="expect != null" >
225
-        expect = #{expect,jdbcType=INTEGER},
226
-      </if>
227
-      <if test="bet != null" >
228
-        bet = #{bet,jdbcType=DECIMAL},
229
-      </if>
230
-      <if test="currentPrice != null" >
231
-        current_price = #{currentPrice,jdbcType=DECIMAL},
232
-      </if>
233
-      <if test="targetPrice != null" >
234
-        target_price = #{targetPrice,jdbcType=DECIMAL},
235
-      </if>
236
-      <if test="cycle != null" >
237
-        cycle = #{cycle,jdbcType=INTEGER},
238
-      </if>
239
-      <if test="startDate != null" >
240
-        start_date = #{startDate,jdbcType=DATE},
241
-      </if>
242
-      <if test="endDate != null" >
243
-        end_date = #{endDate,jdbcType=DATE},
244
-      </if>
245
-      <if test="status != null" >
246
-        status = #{status,jdbcType=INTEGER},
247
-      </if>
248
-      <if test="crtTime != null" >
249
-        crt_time = #{crtTime,jdbcType=TIMESTAMP},
250
-      </if>
251
-      <if test="updTime != null" >
252
-        upd_time = #{updTime,jdbcType=TIMESTAMP},
253
-      </if>
254
-      <if test="reason != null" >
255
-        reason = #{reason,jdbcType=LONGVARCHAR},
256
-      </if>
257
-    </set>
258
-    where id = #{id,jdbcType=INTEGER}
259
-  </update>
260
-  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.huojutech.entity.StockForecast" >
261
-    update stock_forecast
262
-    set uid = #{uid,jdbcType=INTEGER},
263
-      stock_name = #{stockName,jdbcType=VARCHAR},
264
-      stock_code = #{stockCode,jdbcType=VARCHAR},
265
-      expect = #{expect,jdbcType=INTEGER},
266
-      bet = #{bet,jdbcType=DECIMAL},
267
-      current_price = #{currentPrice,jdbcType=DECIMAL},
268
-      target_price = #{targetPrice,jdbcType=DECIMAL},
269
-      cycle = #{cycle,jdbcType=INTEGER},
270
-      start_date = #{startDate,jdbcType=DATE},
271
-      end_date = #{endDate,jdbcType=DATE},
272
-      status = #{status,jdbcType=INTEGER},
273
-      crt_time = #{crtTime,jdbcType=TIMESTAMP},
274
-      upd_time = #{updTime,jdbcType=TIMESTAMP},
275
-      reason = #{reason,jdbcType=LONGVARCHAR}
276
-    where id = #{id,jdbcType=INTEGER}
277
-  </update>
278
-  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.StockForecast" >
279
-    update stock_forecast
280
-    set uid = #{uid,jdbcType=INTEGER},
281
-      stock_name = #{stockName,jdbcType=VARCHAR},
282
-      stock_code = #{stockCode,jdbcType=VARCHAR},
283
-      expect = #{expect,jdbcType=INTEGER},
284
-      bet = #{bet,jdbcType=DECIMAL},
285
-      current_price = #{currentPrice,jdbcType=DECIMAL},
286
-      target_price = #{targetPrice,jdbcType=DECIMAL},
287
-      cycle = #{cycle,jdbcType=INTEGER},
288
-      start_date = #{startDate,jdbcType=DATE},
289
-      end_date = #{endDate,jdbcType=DATE},
290
-      status = #{status,jdbcType=INTEGER},
291
-      crt_time = #{crtTime,jdbcType=TIMESTAMP},
292
-      upd_time = #{updTime,jdbcType=TIMESTAMP}
293
-    where id = #{id,jdbcType=INTEGER}
294
-  </update>
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.huojutech.dao.StockForecastMapper" >
4
+  <resultMap id="BaseResultMap" type="com.huojutech.entity.StockForecast" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="uid" property="uid" jdbcType="INTEGER" />
7
+    <result column="stock_name" property="stockName" jdbcType="VARCHAR" />
8
+    <result column="stock_code" property="stockCode" jdbcType="VARCHAR" />
9
+    <result column="expect" property="expect" jdbcType="INTEGER" />
10
+    <result column="bet" property="bet" jdbcType="DECIMAL" />
11
+    <result column="current_price" property="currentPrice" jdbcType="DECIMAL" />
12
+    <result column="target_price" property="targetPrice" jdbcType="DECIMAL" />
13
+    <result column="cycle" property="cycle" jdbcType="INTEGER" />
14
+    <result column="start_date" property="startDate" jdbcType="DATE" />
15
+    <result column="end_date" property="endDate" jdbcType="DATE" />
16
+    <result column="status" property="status" jdbcType="INTEGER" />
17
+    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
18
+    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
19
+  </resultMap>
20
+  <resultMap id="ResultMapWithBLOBs" type="com.huojutech.entity.StockForecast" extends="BaseResultMap" >
21
+    <result column="reason" property="reason" jdbcType="LONGVARCHAR" />
22
+  </resultMap>
23
+  <sql id="Example_Where_Clause" >
24
+    <where >
25
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
26
+        <if test="criteria.valid" >
27
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
28
+            <foreach collection="criteria.criteria" item="criterion" >
29
+              <choose >
30
+                <when test="criterion.noValue" >
31
+                  and ${criterion.condition}
32
+                </when>
33
+                <when test="criterion.singleValue" >
34
+                  and ${criterion.condition} #{criterion.value}
35
+                </when>
36
+                <when test="criterion.betweenValue" >
37
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
38
+                </when>
39
+                <when test="criterion.listValue" >
40
+                  and ${criterion.condition}
41
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
42
+                    #{listItem}
43
+                  </foreach>
44
+                </when>
45
+              </choose>
46
+            </foreach>
47
+          </trim>
48
+        </if>
49
+      </foreach>
50
+    </where>
51
+  </sql>
52
+  <sql id="Base_Column_List" >
53
+    id, uid, stock_name, stock_code, expect, bet, current_price, target_price, cycle, 
54
+    start_date, end_date, status, crt_time, upd_time
55
+  </sql>
56
+  <sql id="Blob_Column_List" >
57
+    reason
58
+  </sql>
59
+  <select id="selectByExampleWithBLOBs" resultMap="ResultMapWithBLOBs" parameterType="com.huojutech.entity.StockForecastExample" >
60
+    select
61
+    <if test="distinct" >
62
+      distinct
63
+    </if>
64
+    'true' as QUERYID,
65
+    <include refid="Base_Column_List" />
66
+    ,
67
+    <include refid="Blob_Column_List" />
68
+    from stock_forecast
69
+    <if test="_parameter != null" >
70
+      <include refid="Example_Where_Clause" />
71
+    </if>
72
+    <if test="orderByClause != null" >
73
+      order by ${orderByClause}
74
+    </if>
75
+  </select>
76
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.StockForecastExample" >
77
+    select
78
+    <if test="distinct" >
79
+      distinct
80
+    </if>
81
+    'true' as QUERYID,
82
+    <include refid="Base_Column_List" />
83
+    from stock_forecast
84
+    <if test="_parameter != null" >
85
+      <include refid="Example_Where_Clause" />
86
+    </if>
87
+    <if test="orderByClause != null" >
88
+      order by ${orderByClause}
89
+    </if>
90
+  </select>
91
+  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
92
+    select 
93
+    <include refid="Base_Column_List" />
94
+    ,
95
+    <include refid="Blob_Column_List" />
96
+    from stock_forecast
97
+    where id = #{id,jdbcType=INTEGER}
98
+  </select>
99
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
100
+    delete from stock_forecast
101
+    where id = #{id,jdbcType=INTEGER}
102
+  </delete>
103
+  <insert id="insert" parameterType="com.huojutech.entity.StockForecast" useGeneratedKeys="true" keyProperty="id" >
104
+    insert into stock_forecast (uid, stock_name, stock_code, 
105
+      expect, bet, current_price, 
106
+      target_price, cycle, start_date, 
107
+      end_date, status, crt_time, 
108
+      upd_time, reason)
109
+    values (#{uid,jdbcType=INTEGER}, #{stockName,jdbcType=VARCHAR}, #{stockCode,jdbcType=VARCHAR}, 
110
+      #{expect,jdbcType=INTEGER}, #{bet,jdbcType=DECIMAL}, #{currentPrice,jdbcType=DECIMAL}, 
111
+      #{targetPrice,jdbcType=DECIMAL}, #{cycle,jdbcType=INTEGER}, #{startDate,jdbcType=DATE}, 
112
+      #{endDate,jdbcType=DATE}, #{status,jdbcType=INTEGER}, #{crtTime,jdbcType=TIMESTAMP}, 
113
+      #{updTime,jdbcType=TIMESTAMP}, #{reason,jdbcType=LONGVARCHAR})
114
+  </insert>
115
+  <insert id="insertSelective" parameterType="com.huojutech.entity.StockForecast" useGeneratedKeys="true" keyProperty="id" >
116
+    insert into stock_forecast
117
+    <trim prefix="(" suffix=")" suffixOverrides="," >
118
+      <if test="uid != null" >
119
+        uid,
120
+      </if>
121
+      <if test="stockName != null" >
122
+        stock_name,
123
+      </if>
124
+      <if test="stockCode != null" >
125
+        stock_code,
126
+      </if>
127
+      <if test="expect != null" >
128
+        expect,
129
+      </if>
130
+      <if test="bet != null" >
131
+        bet,
132
+      </if>
133
+      <if test="currentPrice != null" >
134
+        current_price,
135
+      </if>
136
+      <if test="targetPrice != null" >
137
+        target_price,
138
+      </if>
139
+      <if test="cycle != null" >
140
+        cycle,
141
+      </if>
142
+      <if test="startDate != null" >
143
+        start_date,
144
+      </if>
145
+      <if test="endDate != null" >
146
+        end_date,
147
+      </if>
148
+      <if test="status != null" >
149
+        status,
150
+      </if>
151
+      <if test="crtTime != null" >
152
+        crt_time,
153
+      </if>
154
+      <if test="updTime != null" >
155
+        upd_time,
156
+      </if>
157
+      <if test="reason != null" >
158
+        reason,
159
+      </if>
160
+    </trim>
161
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
162
+      <if test="uid != null" >
163
+        #{uid,jdbcType=INTEGER},
164
+      </if>
165
+      <if test="stockName != null" >
166
+        #{stockName,jdbcType=VARCHAR},
167
+      </if>
168
+      <if test="stockCode != null" >
169
+        #{stockCode,jdbcType=VARCHAR},
170
+      </if>
171
+      <if test="expect != null" >
172
+        #{expect,jdbcType=INTEGER},
173
+      </if>
174
+      <if test="bet != null" >
175
+        #{bet,jdbcType=DECIMAL},
176
+      </if>
177
+      <if test="currentPrice != null" >
178
+        #{currentPrice,jdbcType=DECIMAL},
179
+      </if>
180
+      <if test="targetPrice != null" >
181
+        #{targetPrice,jdbcType=DECIMAL},
182
+      </if>
183
+      <if test="cycle != null" >
184
+        #{cycle,jdbcType=INTEGER},
185
+      </if>
186
+      <if test="startDate != null" >
187
+        #{startDate,jdbcType=DATE},
188
+      </if>
189
+      <if test="endDate != null" >
190
+        #{endDate,jdbcType=DATE},
191
+      </if>
192
+      <if test="status != null" >
193
+        #{status,jdbcType=INTEGER},
194
+      </if>
195
+      <if test="crtTime != null" >
196
+        #{crtTime,jdbcType=TIMESTAMP},
197
+      </if>
198
+      <if test="updTime != null" >
199
+        #{updTime,jdbcType=TIMESTAMP},
200
+      </if>
201
+      <if test="reason != null" >
202
+        #{reason,jdbcType=LONGVARCHAR},
203
+      </if>
204
+    </trim>
205
+  </insert>
206
+  <select id="countByExample" parameterType="com.huojutech.entity.StockForecastExample" resultType="java.lang.Integer" >
207
+    select count(*) from stock_forecast
208
+    <if test="_parameter != null" >
209
+      <include refid="Example_Where_Clause" />
210
+    </if>
211
+  </select>
212
+  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.StockForecast" >
213
+    update stock_forecast
214
+    <set >
215
+      <if test="uid != null" >
216
+        uid = #{uid,jdbcType=INTEGER},
217
+      </if>
218
+      <if test="stockName != null" >
219
+        stock_name = #{stockName,jdbcType=VARCHAR},
220
+      </if>
221
+      <if test="stockCode != null" >
222
+        stock_code = #{stockCode,jdbcType=VARCHAR},
223
+      </if>
224
+      <if test="expect != null" >
225
+        expect = #{expect,jdbcType=INTEGER},
226
+      </if>
227
+      <if test="bet != null" >
228
+        bet = #{bet,jdbcType=DECIMAL},
229
+      </if>
230
+      <if test="currentPrice != null" >
231
+        current_price = #{currentPrice,jdbcType=DECIMAL},
232
+      </if>
233
+      <if test="targetPrice != null" >
234
+        target_price = #{targetPrice,jdbcType=DECIMAL},
235
+      </if>
236
+      <if test="cycle != null" >
237
+        cycle = #{cycle,jdbcType=INTEGER},
238
+      </if>
239
+      <if test="startDate != null" >
240
+        start_date = #{startDate,jdbcType=DATE},
241
+      </if>
242
+      <if test="endDate != null" >
243
+        end_date = #{endDate,jdbcType=DATE},
244
+      </if>
245
+      <if test="status != null" >
246
+        status = #{status,jdbcType=INTEGER},
247
+      </if>
248
+      <if test="crtTime != null" >
249
+        crt_time = #{crtTime,jdbcType=TIMESTAMP},
250
+      </if>
251
+      <if test="updTime != null" >
252
+        upd_time = #{updTime,jdbcType=TIMESTAMP},
253
+      </if>
254
+      <if test="reason != null" >
255
+        reason = #{reason,jdbcType=LONGVARCHAR},
256
+      </if>
257
+    </set>
258
+    where id = #{id,jdbcType=INTEGER}
259
+  </update>
260
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.huojutech.entity.StockForecast" >
261
+    update stock_forecast
262
+    set uid = #{uid,jdbcType=INTEGER},
263
+      stock_name = #{stockName,jdbcType=VARCHAR},
264
+      stock_code = #{stockCode,jdbcType=VARCHAR},
265
+      expect = #{expect,jdbcType=INTEGER},
266
+      bet = #{bet,jdbcType=DECIMAL},
267
+      current_price = #{currentPrice,jdbcType=DECIMAL},
268
+      target_price = #{targetPrice,jdbcType=DECIMAL},
269
+      cycle = #{cycle,jdbcType=INTEGER},
270
+      start_date = #{startDate,jdbcType=DATE},
271
+      end_date = #{endDate,jdbcType=DATE},
272
+      status = #{status,jdbcType=INTEGER},
273
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
274
+      upd_time = #{updTime,jdbcType=TIMESTAMP},
275
+      reason = #{reason,jdbcType=LONGVARCHAR}
276
+    where id = #{id,jdbcType=INTEGER}
277
+  </update>
278
+  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.StockForecast" >
279
+    update stock_forecast
280
+    set uid = #{uid,jdbcType=INTEGER},
281
+      stock_name = #{stockName,jdbcType=VARCHAR},
282
+      stock_code = #{stockCode,jdbcType=VARCHAR},
283
+      expect = #{expect,jdbcType=INTEGER},
284
+      bet = #{bet,jdbcType=DECIMAL},
285
+      current_price = #{currentPrice,jdbcType=DECIMAL},
286
+      target_price = #{targetPrice,jdbcType=DECIMAL},
287
+      cycle = #{cycle,jdbcType=INTEGER},
288
+      start_date = #{startDate,jdbcType=DATE},
289
+      end_date = #{endDate,jdbcType=DATE},
290
+      status = #{status,jdbcType=INTEGER},
291
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
292
+      upd_time = #{updTime,jdbcType=TIMESTAMP}
293
+    where id = #{id,jdbcType=INTEGER}
294
+  </update>
295 295
 </mapper>

+ 171 - 171
huozuan/src/main/resources/mappers/StockForecastVoteMapper.xml

@@ -1,172 +1,172 @@
1
-<?xml version="1.0" encoding="UTF-8" ?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
-<mapper namespace="com.huojutech.dao.StockForecastVoteMapper" >
4
-  <resultMap id="BaseResultMap" type="com.huojutech.entity.StockForecastVote" >
5
-    <id column="id" property="id" jdbcType="INTEGER" />
6
-    <result column="uid" property="uid" jdbcType="INTEGER" />
7
-    <result column="forecast_id" property="forecastId" jdbcType="INTEGER" />
8
-    <result column="vtype" property="vtype" jdbcType="INTEGER" />
9
-    <result column="bet" property="bet" jdbcType="DECIMAL" />
10
-    <result column="status" property="status" jdbcType="INTEGER" />
11
-    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
12
-    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
13
-  </resultMap>
14
-  <sql id="Example_Where_Clause" >
15
-    <where >
16
-      <foreach collection="oredCriteria" item="criteria" separator="or" >
17
-        <if test="criteria.valid" >
18
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
19
-            <foreach collection="criteria.criteria" item="criterion" >
20
-              <choose >
21
-                <when test="criterion.noValue" >
22
-                  and ${criterion.condition}
23
-                </when>
24
-                <when test="criterion.singleValue" >
25
-                  and ${criterion.condition} #{criterion.value}
26
-                </when>
27
-                <when test="criterion.betweenValue" >
28
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
29
-                </when>
30
-                <when test="criterion.listValue" >
31
-                  and ${criterion.condition}
32
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
33
-                    #{listItem}
34
-                  </foreach>
35
-                </when>
36
-              </choose>
37
-            </foreach>
38
-          </trim>
39
-        </if>
40
-      </foreach>
41
-    </where>
42
-  </sql>
43
-  <sql id="Base_Column_List" >
44
-    id, uid, forecast_id, vtype, bet, status, crt_time, upd_time
45
-  </sql>
46
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.StockForecastVoteExample" >
47
-    select
48
-    <if test="distinct" >
49
-      distinct
50
-    </if>
51
-    'true' as QUERYID,
52
-    <include refid="Base_Column_List" />
53
-    from stock_forecast_vote
54
-    <if test="_parameter != null" >
55
-      <include refid="Example_Where_Clause" />
56
-    </if>
57
-    <if test="orderByClause != null" >
58
-      order by ${orderByClause}
59
-    </if>
60
-  </select>
61
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
62
-    select 
63
-    <include refid="Base_Column_List" />
64
-    from stock_forecast_vote
65
-    where id = #{id,jdbcType=INTEGER}
66
-  </select>
67
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
68
-    delete from stock_forecast_vote
69
-    where id = #{id,jdbcType=INTEGER}
70
-  </delete>
71
-  <insert id="insert" parameterType="com.huojutech.entity.StockForecastVote" useGeneratedKeys="true" keyProperty="id" >
72
-    insert into stock_forecast_vote (uid, forecast_id, vtype, 
73
-      bet, status, crt_time, 
74
-      upd_time)
75
-    values (#{uid,jdbcType=INTEGER}, #{forecastId,jdbcType=INTEGER}, #{vtype,jdbcType=INTEGER}, 
76
-      #{bet,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, #{crtTime,jdbcType=TIMESTAMP}, 
77
-      #{updTime,jdbcType=TIMESTAMP})
78
-  </insert>
79
-  <insert id="insertSelective" parameterType="com.huojutech.entity.StockForecastVote" useGeneratedKeys="true" keyProperty="id" >
80
-    insert into stock_forecast_vote
81
-    <trim prefix="(" suffix=")" suffixOverrides="," >
82
-      <if test="uid != null" >
83
-        uid,
84
-      </if>
85
-      <if test="forecastId != null" >
86
-        forecast_id,
87
-      </if>
88
-      <if test="vtype != null" >
89
-        vtype,
90
-      </if>
91
-      <if test="bet != null" >
92
-        bet,
93
-      </if>
94
-      <if test="status != null" >
95
-        status,
96
-      </if>
97
-      <if test="crtTime != null" >
98
-        crt_time,
99
-      </if>
100
-      <if test="updTime != null" >
101
-        upd_time,
102
-      </if>
103
-    </trim>
104
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
105
-      <if test="uid != null" >
106
-        #{uid,jdbcType=INTEGER},
107
-      </if>
108
-      <if test="forecastId != null" >
109
-        #{forecastId,jdbcType=INTEGER},
110
-      </if>
111
-      <if test="vtype != null" >
112
-        #{vtype,jdbcType=INTEGER},
113
-      </if>
114
-      <if test="bet != null" >
115
-        #{bet,jdbcType=DECIMAL},
116
-      </if>
117
-      <if test="status != null" >
118
-        #{status,jdbcType=INTEGER},
119
-      </if>
120
-      <if test="crtTime != null" >
121
-        #{crtTime,jdbcType=TIMESTAMP},
122
-      </if>
123
-      <if test="updTime != null" >
124
-        #{updTime,jdbcType=TIMESTAMP},
125
-      </if>
126
-    </trim>
127
-  </insert>
128
-  <select id="countByExample" parameterType="com.huojutech.entity.StockForecastVoteExample" resultType="java.lang.Integer" >
129
-    select count(*) from stock_forecast_vote
130
-    <if test="_parameter != null" >
131
-      <include refid="Example_Where_Clause" />
132
-    </if>
133
-  </select>
134
-  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.StockForecastVote" >
135
-    update stock_forecast_vote
136
-    <set >
137
-      <if test="uid != null" >
138
-        uid = #{uid,jdbcType=INTEGER},
139
-      </if>
140
-      <if test="forecastId != null" >
141
-        forecast_id = #{forecastId,jdbcType=INTEGER},
142
-      </if>
143
-      <if test="vtype != null" >
144
-        vtype = #{vtype,jdbcType=INTEGER},
145
-      </if>
146
-      <if test="bet != null" >
147
-        bet = #{bet,jdbcType=DECIMAL},
148
-      </if>
149
-      <if test="status != null" >
150
-        status = #{status,jdbcType=INTEGER},
151
-      </if>
152
-      <if test="crtTime != null" >
153
-        crt_time = #{crtTime,jdbcType=TIMESTAMP},
154
-      </if>
155
-      <if test="updTime != null" >
156
-        upd_time = #{updTime,jdbcType=TIMESTAMP},
157
-      </if>
158
-    </set>
159
-    where id = #{id,jdbcType=INTEGER}
160
-  </update>
161
-  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.StockForecastVote" >
162
-    update stock_forecast_vote
163
-    set uid = #{uid,jdbcType=INTEGER},
164
-      forecast_id = #{forecastId,jdbcType=INTEGER},
165
-      vtype = #{vtype,jdbcType=INTEGER},
166
-      bet = #{bet,jdbcType=DECIMAL},
167
-      status = #{status,jdbcType=INTEGER},
168
-      crt_time = #{crtTime,jdbcType=TIMESTAMP},
169
-      upd_time = #{updTime,jdbcType=TIMESTAMP}
170
-    where id = #{id,jdbcType=INTEGER}
171
-  </update>
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.huojutech.dao.StockForecastVoteMapper" >
4
+  <resultMap id="BaseResultMap" type="com.huojutech.entity.StockForecastVote" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="uid" property="uid" jdbcType="INTEGER" />
7
+    <result column="forecast_id" property="forecastId" jdbcType="INTEGER" />
8
+    <result column="vtype" property="vtype" jdbcType="INTEGER" />
9
+    <result column="bet" property="bet" jdbcType="DECIMAL" />
10
+    <result column="status" property="status" jdbcType="INTEGER" />
11
+    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
12
+    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
13
+  </resultMap>
14
+  <sql id="Example_Where_Clause" >
15
+    <where >
16
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
17
+        <if test="criteria.valid" >
18
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
19
+            <foreach collection="criteria.criteria" item="criterion" >
20
+              <choose >
21
+                <when test="criterion.noValue" >
22
+                  and ${criterion.condition}
23
+                </when>
24
+                <when test="criterion.singleValue" >
25
+                  and ${criterion.condition} #{criterion.value}
26
+                </when>
27
+                <when test="criterion.betweenValue" >
28
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
29
+                </when>
30
+                <when test="criterion.listValue" >
31
+                  and ${criterion.condition}
32
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
33
+                    #{listItem}
34
+                  </foreach>
35
+                </when>
36
+              </choose>
37
+            </foreach>
38
+          </trim>
39
+        </if>
40
+      </foreach>
41
+    </where>
42
+  </sql>
43
+  <sql id="Base_Column_List" >
44
+    id, uid, forecast_id, vtype, bet, status, crt_time, upd_time
45
+  </sql>
46
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.StockForecastVoteExample" >
47
+    select
48
+    <if test="distinct" >
49
+      distinct
50
+    </if>
51
+    'true' as QUERYID,
52
+    <include refid="Base_Column_List" />
53
+    from stock_forecast_vote
54
+    <if test="_parameter != null" >
55
+      <include refid="Example_Where_Clause" />
56
+    </if>
57
+    <if test="orderByClause != null" >
58
+      order by ${orderByClause}
59
+    </if>
60
+  </select>
61
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
62
+    select 
63
+    <include refid="Base_Column_List" />
64
+    from stock_forecast_vote
65
+    where id = #{id,jdbcType=INTEGER}
66
+  </select>
67
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
68
+    delete from stock_forecast_vote
69
+    where id = #{id,jdbcType=INTEGER}
70
+  </delete>
71
+  <insert id="insert" parameterType="com.huojutech.entity.StockForecastVote" useGeneratedKeys="true" keyProperty="id" >
72
+    insert into stock_forecast_vote (uid, forecast_id, vtype, 
73
+      bet, status, crt_time, 
74
+      upd_time)
75
+    values (#{uid,jdbcType=INTEGER}, #{forecastId,jdbcType=INTEGER}, #{vtype,jdbcType=INTEGER}, 
76
+      #{bet,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, #{crtTime,jdbcType=TIMESTAMP}, 
77
+      #{updTime,jdbcType=TIMESTAMP})
78
+  </insert>
79
+  <insert id="insertSelective" parameterType="com.huojutech.entity.StockForecastVote" useGeneratedKeys="true" keyProperty="id" >
80
+    insert into stock_forecast_vote
81
+    <trim prefix="(" suffix=")" suffixOverrides="," >
82
+      <if test="uid != null" >
83
+        uid,
84
+      </if>
85
+      <if test="forecastId != null" >
86
+        forecast_id,
87
+      </if>
88
+      <if test="vtype != null" >
89
+        vtype,
90
+      </if>
91
+      <if test="bet != null" >
92
+        bet,
93
+      </if>
94
+      <if test="status != null" >
95
+        status,
96
+      </if>
97
+      <if test="crtTime != null" >
98
+        crt_time,
99
+      </if>
100
+      <if test="updTime != null" >
101
+        upd_time,
102
+      </if>
103
+    </trim>
104
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
105
+      <if test="uid != null" >
106
+        #{uid,jdbcType=INTEGER},
107
+      </if>
108
+      <if test="forecastId != null" >
109
+        #{forecastId,jdbcType=INTEGER},
110
+      </if>
111
+      <if test="vtype != null" >
112
+        #{vtype,jdbcType=INTEGER},
113
+      </if>
114
+      <if test="bet != null" >
115
+        #{bet,jdbcType=DECIMAL},
116
+      </if>
117
+      <if test="status != null" >
118
+        #{status,jdbcType=INTEGER},
119
+      </if>
120
+      <if test="crtTime != null" >
121
+        #{crtTime,jdbcType=TIMESTAMP},
122
+      </if>
123
+      <if test="updTime != null" >
124
+        #{updTime,jdbcType=TIMESTAMP},
125
+      </if>
126
+    </trim>
127
+  </insert>
128
+  <select id="countByExample" parameterType="com.huojutech.entity.StockForecastVoteExample" resultType="java.lang.Integer" >
129
+    select count(*) from stock_forecast_vote
130
+    <if test="_parameter != null" >
131
+      <include refid="Example_Where_Clause" />
132
+    </if>
133
+  </select>
134
+  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.StockForecastVote" >
135
+    update stock_forecast_vote
136
+    <set >
137
+      <if test="uid != null" >
138
+        uid = #{uid,jdbcType=INTEGER},
139
+      </if>
140
+      <if test="forecastId != null" >
141
+        forecast_id = #{forecastId,jdbcType=INTEGER},
142
+      </if>
143
+      <if test="vtype != null" >
144
+        vtype = #{vtype,jdbcType=INTEGER},
145
+      </if>
146
+      <if test="bet != null" >
147
+        bet = #{bet,jdbcType=DECIMAL},
148
+      </if>
149
+      <if test="status != null" >
150
+        status = #{status,jdbcType=INTEGER},
151
+      </if>
152
+      <if test="crtTime != null" >
153
+        crt_time = #{crtTime,jdbcType=TIMESTAMP},
154
+      </if>
155
+      <if test="updTime != null" >
156
+        upd_time = #{updTime,jdbcType=TIMESTAMP},
157
+      </if>
158
+    </set>
159
+    where id = #{id,jdbcType=INTEGER}
160
+  </update>
161
+  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.StockForecastVote" >
162
+    update stock_forecast_vote
163
+    set uid = #{uid,jdbcType=INTEGER},
164
+      forecast_id = #{forecastId,jdbcType=INTEGER},
165
+      vtype = #{vtype,jdbcType=INTEGER},
166
+      bet = #{bet,jdbcType=DECIMAL},
167
+      status = #{status,jdbcType=INTEGER},
168
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
169
+      upd_time = #{updTime,jdbcType=TIMESTAMP}
170
+    where id = #{id,jdbcType=INTEGER}
171
+  </update>
172 172
 </mapper>

+ 147 - 147
huozuan/src/main/resources/mappers/StockOptionalMapper.xml

@@ -1,148 +1,148 @@
1
-<?xml version="1.0" encoding="UTF-8" ?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
-<mapper namespace="com.huojutech.dao.StockOptionalMapper" >
4
-  <resultMap id="BaseResultMap" type="com.huojutech.entity.StockOptional" >
5
-    <id column="id" property="id" jdbcType="INTEGER" />
6
-    <result column="uid" property="uid" jdbcType="INTEGER" />
7
-    <result column="stock_name" property="stockName" jdbcType="VARCHAR" />
8
-    <result column="stock_code" property="stockCode" jdbcType="VARCHAR" />
9
-    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
10
-    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
11
-  </resultMap>
12
-  <sql id="Example_Where_Clause" >
13
-    <where >
14
-      <foreach collection="oredCriteria" item="criteria" separator="or" >
15
-        <if test="criteria.valid" >
16
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
17
-            <foreach collection="criteria.criteria" item="criterion" >
18
-              <choose >
19
-                <when test="criterion.noValue" >
20
-                  and ${criterion.condition}
21
-                </when>
22
-                <when test="criterion.singleValue" >
23
-                  and ${criterion.condition} #{criterion.value}
24
-                </when>
25
-                <when test="criterion.betweenValue" >
26
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
27
-                </when>
28
-                <when test="criterion.listValue" >
29
-                  and ${criterion.condition}
30
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
31
-                    #{listItem}
32
-                  </foreach>
33
-                </when>
34
-              </choose>
35
-            </foreach>
36
-          </trim>
37
-        </if>
38
-      </foreach>
39
-    </where>
40
-  </sql>
41
-  <sql id="Base_Column_List" >
42
-    id, uid, stock_name, stock_code, crt_time, upd_time
43
-  </sql>
44
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.StockOptionalExample" >
45
-    select
46
-    <if test="distinct" >
47
-      distinct
48
-    </if>
49
-    'true' as QUERYID,
50
-    <include refid="Base_Column_List" />
51
-    from stock_optional
52
-    <if test="_parameter != null" >
53
-      <include refid="Example_Where_Clause" />
54
-    </if>
55
-    <if test="orderByClause != null" >
56
-      order by ${orderByClause}
57
-    </if>
58
-  </select>
59
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
60
-    select 
61
-    <include refid="Base_Column_List" />
62
-    from stock_optional
63
-    where id = #{id,jdbcType=INTEGER}
64
-  </select>
65
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
66
-    delete from stock_optional
67
-    where id = #{id,jdbcType=INTEGER}
68
-  </delete>
69
-  <insert id="insert" parameterType="com.huojutech.entity.StockOptional" useGeneratedKeys="true" keyProperty="id" >
70
-    insert into stock_optional (uid, stock_name, stock_code, 
71
-      crt_time, upd_time)
72
-    values (#{uid,jdbcType=INTEGER}, #{stockName,jdbcType=VARCHAR}, #{stockCode,jdbcType=VARCHAR}, 
73
-      #{crtTime,jdbcType=TIMESTAMP}, #{updTime,jdbcType=TIMESTAMP})
74
-  </insert>
75
-  <insert id="insertSelective" parameterType="com.huojutech.entity.StockOptional" useGeneratedKeys="true" keyProperty="id" >
76
-    insert into stock_optional
77
-    <trim prefix="(" suffix=")" suffixOverrides="," >
78
-      <if test="uid != null" >
79
-        uid,
80
-      </if>
81
-      <if test="stockName != null" >
82
-        stock_name,
83
-      </if>
84
-      <if test="stockCode != null" >
85
-        stock_code,
86
-      </if>
87
-      <if test="crtTime != null" >
88
-        crt_time,
89
-      </if>
90
-      <if test="updTime != null" >
91
-        upd_time,
92
-      </if>
93
-    </trim>
94
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
95
-      <if test="uid != null" >
96
-        #{uid,jdbcType=INTEGER},
97
-      </if>
98
-      <if test="stockName != null" >
99
-        #{stockName,jdbcType=VARCHAR},
100
-      </if>
101
-      <if test="stockCode != null" >
102
-        #{stockCode,jdbcType=VARCHAR},
103
-      </if>
104
-      <if test="crtTime != null" >
105
-        #{crtTime,jdbcType=TIMESTAMP},
106
-      </if>
107
-      <if test="updTime != null" >
108
-        #{updTime,jdbcType=TIMESTAMP},
109
-      </if>
110
-    </trim>
111
-  </insert>
112
-  <select id="countByExample" parameterType="com.huojutech.entity.StockOptionalExample" resultType="java.lang.Integer" >
113
-    select count(*) from stock_optional
114
-    <if test="_parameter != null" >
115
-      <include refid="Example_Where_Clause" />
116
-    </if>
117
-  </select>
118
-  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.StockOptional" >
119
-    update stock_optional
120
-    <set >
121
-      <if test="uid != null" >
122
-        uid = #{uid,jdbcType=INTEGER},
123
-      </if>
124
-      <if test="stockName != null" >
125
-        stock_name = #{stockName,jdbcType=VARCHAR},
126
-      </if>
127
-      <if test="stockCode != null" >
128
-        stock_code = #{stockCode,jdbcType=VARCHAR},
129
-      </if>
130
-      <if test="crtTime != null" >
131
-        crt_time = #{crtTime,jdbcType=TIMESTAMP},
132
-      </if>
133
-      <if test="updTime != null" >
134
-        upd_time = #{updTime,jdbcType=TIMESTAMP},
135
-      </if>
136
-    </set>
137
-    where id = #{id,jdbcType=INTEGER}
138
-  </update>
139
-  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.StockOptional" >
140
-    update stock_optional
141
-    set uid = #{uid,jdbcType=INTEGER},
142
-      stock_name = #{stockName,jdbcType=VARCHAR},
143
-      stock_code = #{stockCode,jdbcType=VARCHAR},
144
-      crt_time = #{crtTime,jdbcType=TIMESTAMP},
145
-      upd_time = #{updTime,jdbcType=TIMESTAMP}
146
-    where id = #{id,jdbcType=INTEGER}
147
-  </update>
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.huojutech.dao.StockOptionalMapper" >
4
+  <resultMap id="BaseResultMap" type="com.huojutech.entity.StockOptional" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="uid" property="uid" jdbcType="INTEGER" />
7
+    <result column="stock_name" property="stockName" jdbcType="VARCHAR" />
8
+    <result column="stock_code" property="stockCode" jdbcType="VARCHAR" />
9
+    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
10
+    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
11
+  </resultMap>
12
+  <sql id="Example_Where_Clause" >
13
+    <where >
14
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
15
+        <if test="criteria.valid" >
16
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
17
+            <foreach collection="criteria.criteria" item="criterion" >
18
+              <choose >
19
+                <when test="criterion.noValue" >
20
+                  and ${criterion.condition}
21
+                </when>
22
+                <when test="criterion.singleValue" >
23
+                  and ${criterion.condition} #{criterion.value}
24
+                </when>
25
+                <when test="criterion.betweenValue" >
26
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
27
+                </when>
28
+                <when test="criterion.listValue" >
29
+                  and ${criterion.condition}
30
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
31
+                    #{listItem}
32
+                  </foreach>
33
+                </when>
34
+              </choose>
35
+            </foreach>
36
+          </trim>
37
+        </if>
38
+      </foreach>
39
+    </where>
40
+  </sql>
41
+  <sql id="Base_Column_List" >
42
+    id, uid, stock_name, stock_code, crt_time, upd_time
43
+  </sql>
44
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.StockOptionalExample" >
45
+    select
46
+    <if test="distinct" >
47
+      distinct
48
+    </if>
49
+    'true' as QUERYID,
50
+    <include refid="Base_Column_List" />
51
+    from stock_optional
52
+    <if test="_parameter != null" >
53
+      <include refid="Example_Where_Clause" />
54
+    </if>
55
+    <if test="orderByClause != null" >
56
+      order by ${orderByClause}
57
+    </if>
58
+  </select>
59
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
60
+    select 
61
+    <include refid="Base_Column_List" />
62
+    from stock_optional
63
+    where id = #{id,jdbcType=INTEGER}
64
+  </select>
65
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
66
+    delete from stock_optional
67
+    where id = #{id,jdbcType=INTEGER}
68
+  </delete>
69
+  <insert id="insert" parameterType="com.huojutech.entity.StockOptional" useGeneratedKeys="true" keyProperty="id" >
70
+    insert into stock_optional (uid, stock_name, stock_code, 
71
+      crt_time, upd_time)
72
+    values (#{uid,jdbcType=INTEGER}, #{stockName,jdbcType=VARCHAR}, #{stockCode,jdbcType=VARCHAR}, 
73
+      #{crtTime,jdbcType=TIMESTAMP}, #{updTime,jdbcType=TIMESTAMP})
74
+  </insert>
75
+  <insert id="insertSelective" parameterType="com.huojutech.entity.StockOptional" useGeneratedKeys="true" keyProperty="id" >
76
+    insert into stock_optional
77
+    <trim prefix="(" suffix=")" suffixOverrides="," >
78
+      <if test="uid != null" >
79
+        uid,
80
+      </if>
81
+      <if test="stockName != null" >
82
+        stock_name,
83
+      </if>
84
+      <if test="stockCode != null" >
85
+        stock_code,
86
+      </if>
87
+      <if test="crtTime != null" >
88
+        crt_time,
89
+      </if>
90
+      <if test="updTime != null" >
91
+        upd_time,
92
+      </if>
93
+    </trim>
94
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
95
+      <if test="uid != null" >
96
+        #{uid,jdbcType=INTEGER},
97
+      </if>
98
+      <if test="stockName != null" >
99
+        #{stockName,jdbcType=VARCHAR},
100
+      </if>
101
+      <if test="stockCode != null" >
102
+        #{stockCode,jdbcType=VARCHAR},
103
+      </if>
104
+      <if test="crtTime != null" >
105
+        #{crtTime,jdbcType=TIMESTAMP},
106
+      </if>
107
+      <if test="updTime != null" >
108
+        #{updTime,jdbcType=TIMESTAMP},
109
+      </if>
110
+    </trim>
111
+  </insert>
112
+  <select id="countByExample" parameterType="com.huojutech.entity.StockOptionalExample" resultType="java.lang.Integer" >
113
+    select count(*) from stock_optional
114
+    <if test="_parameter != null" >
115
+      <include refid="Example_Where_Clause" />
116
+    </if>
117
+  </select>
118
+  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.StockOptional" >
119
+    update stock_optional
120
+    <set >
121
+      <if test="uid != null" >
122
+        uid = #{uid,jdbcType=INTEGER},
123
+      </if>
124
+      <if test="stockName != null" >
125
+        stock_name = #{stockName,jdbcType=VARCHAR},
126
+      </if>
127
+      <if test="stockCode != null" >
128
+        stock_code = #{stockCode,jdbcType=VARCHAR},
129
+      </if>
130
+      <if test="crtTime != null" >
131
+        crt_time = #{crtTime,jdbcType=TIMESTAMP},
132
+      </if>
133
+      <if test="updTime != null" >
134
+        upd_time = #{updTime,jdbcType=TIMESTAMP},
135
+      </if>
136
+    </set>
137
+    where id = #{id,jdbcType=INTEGER}
138
+  </update>
139
+  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.StockOptional" >
140
+    update stock_optional
141
+    set uid = #{uid,jdbcType=INTEGER},
142
+      stock_name = #{stockName,jdbcType=VARCHAR},
143
+      stock_code = #{stockCode,jdbcType=VARCHAR},
144
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
145
+      upd_time = #{updTime,jdbcType=TIMESTAMP}
146
+    where id = #{id,jdbcType=INTEGER}
147
+  </update>
148 148
 </mapper>

+ 147 - 147
huozuan/src/main/resources/mappers/SystemConfigMapper.xml

@@ -1,148 +1,148 @@
1
-<?xml version="1.0" encoding="UTF-8" ?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
-<mapper namespace="com.huojutech.dao.SystemConfigMapper" >
4
-  <resultMap id="BaseResultMap" type="com.huojutech.entity.SystemConfig" >
5
-    <id column="id" property="id" jdbcType="INTEGER" />
6
-    <result column="cfg_key" property="cfgKey" jdbcType="VARCHAR" />
7
-    <result column="cfg_val" property="cfgVal" jdbcType="VARCHAR" />
8
-    <result column="status" property="status" jdbcType="INTEGER" />
9
-    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
10
-    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
11
-  </resultMap>
12
-  <sql id="Example_Where_Clause" >
13
-    <where >
14
-      <foreach collection="oredCriteria" item="criteria" separator="or" >
15
-        <if test="criteria.valid" >
16
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
17
-            <foreach collection="criteria.criteria" item="criterion" >
18
-              <choose >
19
-                <when test="criterion.noValue" >
20
-                  and ${criterion.condition}
21
-                </when>
22
-                <when test="criterion.singleValue" >
23
-                  and ${criterion.condition} #{criterion.value}
24
-                </when>
25
-                <when test="criterion.betweenValue" >
26
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
27
-                </when>
28
-                <when test="criterion.listValue" >
29
-                  and ${criterion.condition}
30
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
31
-                    #{listItem}
32
-                  </foreach>
33
-                </when>
34
-              </choose>
35
-            </foreach>
36
-          </trim>
37
-        </if>
38
-      </foreach>
39
-    </where>
40
-  </sql>
41
-  <sql id="Base_Column_List" >
42
-    id, cfg_key, cfg_val, status, crt_time, upd_time
43
-  </sql>
44
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.SystemConfigExample" >
45
-    select
46
-    <if test="distinct" >
47
-      distinct
48
-    </if>
49
-    'true' as QUERYID,
50
-    <include refid="Base_Column_List" />
51
-    from system_config
52
-    <if test="_parameter != null" >
53
-      <include refid="Example_Where_Clause" />
54
-    </if>
55
-    <if test="orderByClause != null" >
56
-      order by ${orderByClause}
57
-    </if>
58
-  </select>
59
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
60
-    select 
61
-    <include refid="Base_Column_List" />
62
-    from system_config
63
-    where id = #{id,jdbcType=INTEGER}
64
-  </select>
65
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
66
-    delete from system_config
67
-    where id = #{id,jdbcType=INTEGER}
68
-  </delete>
69
-  <insert id="insert" parameterType="com.huojutech.entity.SystemConfig" useGeneratedKeys="true" keyProperty="id" >
70
-    insert into system_config (cfg_key, cfg_val, status, 
71
-      crt_time, upd_time)
72
-    values (#{cfgKey,jdbcType=VARCHAR}, #{cfgVal,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
73
-      #{crtTime,jdbcType=TIMESTAMP}, #{updTime,jdbcType=TIMESTAMP})
74
-  </insert>
75
-  <insert id="insertSelective" parameterType="com.huojutech.entity.SystemConfig" useGeneratedKeys="true" keyProperty="id" >
76
-    insert into system_config
77
-    <trim prefix="(" suffix=")" suffixOverrides="," >
78
-      <if test="cfgKey != null" >
79
-        cfg_key,
80
-      </if>
81
-      <if test="cfgVal != null" >
82
-        cfg_val,
83
-      </if>
84
-      <if test="status != null" >
85
-        status,
86
-      </if>
87
-      <if test="crtTime != null" >
88
-        crt_time,
89
-      </if>
90
-      <if test="updTime != null" >
91
-        upd_time,
92
-      </if>
93
-    </trim>
94
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
95
-      <if test="cfgKey != null" >
96
-        #{cfgKey,jdbcType=VARCHAR},
97
-      </if>
98
-      <if test="cfgVal != null" >
99
-        #{cfgVal,jdbcType=VARCHAR},
100
-      </if>
101
-      <if test="status != null" >
102
-        #{status,jdbcType=INTEGER},
103
-      </if>
104
-      <if test="crtTime != null" >
105
-        #{crtTime,jdbcType=TIMESTAMP},
106
-      </if>
107
-      <if test="updTime != null" >
108
-        #{updTime,jdbcType=TIMESTAMP},
109
-      </if>
110
-    </trim>
111
-  </insert>
112
-  <select id="countByExample" parameterType="com.huojutech.entity.SystemConfigExample" resultType="java.lang.Integer" >
113
-    select count(*) from system_config
114
-    <if test="_parameter != null" >
115
-      <include refid="Example_Where_Clause" />
116
-    </if>
117
-  </select>
118
-  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.SystemConfig" >
119
-    update system_config
120
-    <set >
121
-      <if test="cfgKey != null" >
122
-        cfg_key = #{cfgKey,jdbcType=VARCHAR},
123
-      </if>
124
-      <if test="cfgVal != null" >
125
-        cfg_val = #{cfgVal,jdbcType=VARCHAR},
126
-      </if>
127
-      <if test="status != null" >
128
-        status = #{status,jdbcType=INTEGER},
129
-      </if>
130
-      <if test="crtTime != null" >
131
-        crt_time = #{crtTime,jdbcType=TIMESTAMP},
132
-      </if>
133
-      <if test="updTime != null" >
134
-        upd_time = #{updTime,jdbcType=TIMESTAMP},
135
-      </if>
136
-    </set>
137
-    where id = #{id,jdbcType=INTEGER}
138
-  </update>
139
-  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.SystemConfig" >
140
-    update system_config
141
-    set cfg_key = #{cfgKey,jdbcType=VARCHAR},
142
-      cfg_val = #{cfgVal,jdbcType=VARCHAR},
143
-      status = #{status,jdbcType=INTEGER},
144
-      crt_time = #{crtTime,jdbcType=TIMESTAMP},
145
-      upd_time = #{updTime,jdbcType=TIMESTAMP}
146
-    where id = #{id,jdbcType=INTEGER}
147
-  </update>
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.huojutech.dao.SystemConfigMapper" >
4
+  <resultMap id="BaseResultMap" type="com.huojutech.entity.SystemConfig" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="cfg_key" property="cfgKey" jdbcType="VARCHAR" />
7
+    <result column="cfg_val" property="cfgVal" jdbcType="VARCHAR" />
8
+    <result column="status" property="status" jdbcType="INTEGER" />
9
+    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
10
+    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
11
+  </resultMap>
12
+  <sql id="Example_Where_Clause" >
13
+    <where >
14
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
15
+        <if test="criteria.valid" >
16
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
17
+            <foreach collection="criteria.criteria" item="criterion" >
18
+              <choose >
19
+                <when test="criterion.noValue" >
20
+                  and ${criterion.condition}
21
+                </when>
22
+                <when test="criterion.singleValue" >
23
+                  and ${criterion.condition} #{criterion.value}
24
+                </when>
25
+                <when test="criterion.betweenValue" >
26
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
27
+                </when>
28
+                <when test="criterion.listValue" >
29
+                  and ${criterion.condition}
30
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
31
+                    #{listItem}
32
+                  </foreach>
33
+                </when>
34
+              </choose>
35
+            </foreach>
36
+          </trim>
37
+        </if>
38
+      </foreach>
39
+    </where>
40
+  </sql>
41
+  <sql id="Base_Column_List" >
42
+    id, cfg_key, cfg_val, status, crt_time, upd_time
43
+  </sql>
44
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.SystemConfigExample" >
45
+    select
46
+    <if test="distinct" >
47
+      distinct
48
+    </if>
49
+    'true' as QUERYID,
50
+    <include refid="Base_Column_List" />
51
+    from system_config
52
+    <if test="_parameter != null" >
53
+      <include refid="Example_Where_Clause" />
54
+    </if>
55
+    <if test="orderByClause != null" >
56
+      order by ${orderByClause}
57
+    </if>
58
+  </select>
59
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
60
+    select 
61
+    <include refid="Base_Column_List" />
62
+    from system_config
63
+    where id = #{id,jdbcType=INTEGER}
64
+  </select>
65
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
66
+    delete from system_config
67
+    where id = #{id,jdbcType=INTEGER}
68
+  </delete>
69
+  <insert id="insert" parameterType="com.huojutech.entity.SystemConfig" useGeneratedKeys="true" keyProperty="id" >
70
+    insert into system_config (cfg_key, cfg_val, status, 
71
+      crt_time, upd_time)
72
+    values (#{cfgKey,jdbcType=VARCHAR}, #{cfgVal,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
73
+      #{crtTime,jdbcType=TIMESTAMP}, #{updTime,jdbcType=TIMESTAMP})
74
+  </insert>
75
+  <insert id="insertSelective" parameterType="com.huojutech.entity.SystemConfig" useGeneratedKeys="true" keyProperty="id" >
76
+    insert into system_config
77
+    <trim prefix="(" suffix=")" suffixOverrides="," >
78
+      <if test="cfgKey != null" >
79
+        cfg_key,
80
+      </if>
81
+      <if test="cfgVal != null" >
82
+        cfg_val,
83
+      </if>
84
+      <if test="status != null" >
85
+        status,
86
+      </if>
87
+      <if test="crtTime != null" >
88
+        crt_time,
89
+      </if>
90
+      <if test="updTime != null" >
91
+        upd_time,
92
+      </if>
93
+    </trim>
94
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
95
+      <if test="cfgKey != null" >
96
+        #{cfgKey,jdbcType=VARCHAR},
97
+      </if>
98
+      <if test="cfgVal != null" >
99
+        #{cfgVal,jdbcType=VARCHAR},
100
+      </if>
101
+      <if test="status != null" >
102
+        #{status,jdbcType=INTEGER},
103
+      </if>
104
+      <if test="crtTime != null" >
105
+        #{crtTime,jdbcType=TIMESTAMP},
106
+      </if>
107
+      <if test="updTime != null" >
108
+        #{updTime,jdbcType=TIMESTAMP},
109
+      </if>
110
+    </trim>
111
+  </insert>
112
+  <select id="countByExample" parameterType="com.huojutech.entity.SystemConfigExample" resultType="java.lang.Integer" >
113
+    select count(*) from system_config
114
+    <if test="_parameter != null" >
115
+      <include refid="Example_Where_Clause" />
116
+    </if>
117
+  </select>
118
+  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.SystemConfig" >
119
+    update system_config
120
+    <set >
121
+      <if test="cfgKey != null" >
122
+        cfg_key = #{cfgKey,jdbcType=VARCHAR},
123
+      </if>
124
+      <if test="cfgVal != null" >
125
+        cfg_val = #{cfgVal,jdbcType=VARCHAR},
126
+      </if>
127
+      <if test="status != null" >
128
+        status = #{status,jdbcType=INTEGER},
129
+      </if>
130
+      <if test="crtTime != null" >
131
+        crt_time = #{crtTime,jdbcType=TIMESTAMP},
132
+      </if>
133
+      <if test="updTime != null" >
134
+        upd_time = #{updTime,jdbcType=TIMESTAMP},
135
+      </if>
136
+    </set>
137
+    where id = #{id,jdbcType=INTEGER}
138
+  </update>
139
+  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.SystemConfig" >
140
+    update system_config
141
+    set cfg_key = #{cfgKey,jdbcType=VARCHAR},
142
+      cfg_val = #{cfgVal,jdbcType=VARCHAR},
143
+      status = #{status,jdbcType=INTEGER},
144
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
145
+      upd_time = #{updTime,jdbcType=TIMESTAMP}
146
+    where id = #{id,jdbcType=INTEGER}
147
+  </update>
148 148
 </mapper>

+ 11 - 11
huozuan/src/main/resources/mappers/TestDao.xml

@@ -1,11 +1,11 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.huojutech.dao.TestDao">
4
-    <select id="getUserById" parameterType="Integer" resultType="user">
5
-        select * from USER  where id = #{id}
6
-    </select>
7
-
8
-    <insert id="updateTestTx">
9
-        INSERT INTO  user (id,name) VALUES(#{id},#{name})
10
-    </insert>
11
-</mapper>
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.huojutech.dao.TestDao">
4
+    <select id="getUserById" parameterType="Integer" resultType="user">
5
+        select * from USER  where id = #{id}
6
+    </select>
7
+
8
+    <insert id="updateTestTx">
9
+        INSERT INTO  user (id,name) VALUES(#{id},#{name})
10
+    </insert>
11
+</mapper>

+ 136 - 136
huozuan/src/main/resources/mappers/UserConcernMapper.xml

@@ -1,137 +1,137 @@
1
-<?xml version="1.0" encoding="UTF-8" ?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
-<mapper namespace="com.huojutech.dao.UserConcernMapper" >
4
-  <resultMap id="BaseResultMap" type="com.huojutech.entity.UserConcern" >
5
-    <id column="id" property="id" jdbcType="INTEGER" />
6
-    <result column="uid" property="uid" jdbcType="INTEGER" />
7
-    <result column="cuid" property="cuid" jdbcType="INTEGER" />
8
-    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
9
-    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
10
-  </resultMap>
11
-  <sql id="Example_Where_Clause" >
12
-    <where >
13
-      <foreach collection="oredCriteria" item="criteria" separator="or" >
14
-        <if test="criteria.valid" >
15
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
16
-            <foreach collection="criteria.criteria" item="criterion" >
17
-              <choose >
18
-                <when test="criterion.noValue" >
19
-                  and ${criterion.condition}
20
-                </when>
21
-                <when test="criterion.singleValue" >
22
-                  and ${criterion.condition} #{criterion.value}
23
-                </when>
24
-                <when test="criterion.betweenValue" >
25
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
26
-                </when>
27
-                <when test="criterion.listValue" >
28
-                  and ${criterion.condition}
29
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
30
-                    #{listItem}
31
-                  </foreach>
32
-                </when>
33
-              </choose>
34
-            </foreach>
35
-          </trim>
36
-        </if>
37
-      </foreach>
38
-    </where>
39
-  </sql>
40
-  <sql id="Base_Column_List" >
41
-    id, uid, cuid, crt_time, upd_time
42
-  </sql>
43
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.UserConcernExample" >
44
-    select
45
-    <if test="distinct" >
46
-      distinct
47
-    </if>
48
-    'true' as QUERYID,
49
-    <include refid="Base_Column_List" />
50
-    from user_concern
51
-    <if test="_parameter != null" >
52
-      <include refid="Example_Where_Clause" />
53
-    </if>
54
-    <if test="orderByClause != null" >
55
-      order by ${orderByClause}
56
-    </if>
57
-  </select>
58
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
59
-    select 
60
-    <include refid="Base_Column_List" />
61
-    from user_concern
62
-    where id = #{id,jdbcType=INTEGER}
63
-  </select>
64
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
65
-    delete from user_concern
66
-    where id = #{id,jdbcType=INTEGER}
67
-  </delete>
68
-  <insert id="insert" parameterType="com.huojutech.entity.UserConcern" useGeneratedKeys="true" keyProperty="id" >
69
-    insert into user_concern (uid, cuid, crt_time, 
70
-      upd_time)
71
-    values (#{uid,jdbcType=INTEGER}, #{cuid,jdbcType=INTEGER}, #{crtTime,jdbcType=TIMESTAMP}, 
72
-      #{updTime,jdbcType=TIMESTAMP})
73
-  </insert>
74
-  <insert id="insertSelective" parameterType="com.huojutech.entity.UserConcern" useGeneratedKeys="true" keyProperty="id" >
75
-    insert into user_concern
76
-    <trim prefix="(" suffix=")" suffixOverrides="," >
77
-      <if test="uid != null" >
78
-        uid,
79
-      </if>
80
-      <if test="cuid != null" >
81
-        cuid,
82
-      </if>
83
-      <if test="crtTime != null" >
84
-        crt_time,
85
-      </if>
86
-      <if test="updTime != null" >
87
-        upd_time,
88
-      </if>
89
-    </trim>
90
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
91
-      <if test="uid != null" >
92
-        #{uid,jdbcType=INTEGER},
93
-      </if>
94
-      <if test="cuid != null" >
95
-        #{cuid,jdbcType=INTEGER},
96
-      </if>
97
-      <if test="crtTime != null" >
98
-        #{crtTime,jdbcType=TIMESTAMP},
99
-      </if>
100
-      <if test="updTime != null" >
101
-        #{updTime,jdbcType=TIMESTAMP},
102
-      </if>
103
-    </trim>
104
-  </insert>
105
-  <select id="countByExample" parameterType="com.huojutech.entity.UserConcernExample" resultType="java.lang.Integer" >
106
-    select count(*) from user_concern
107
-    <if test="_parameter != null" >
108
-      <include refid="Example_Where_Clause" />
109
-    </if>
110
-  </select>
111
-  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.UserConcern" >
112
-    update user_concern
113
-    <set >
114
-      <if test="uid != null" >
115
-        uid = #{uid,jdbcType=INTEGER},
116
-      </if>
117
-      <if test="cuid != null" >
118
-        cuid = #{cuid,jdbcType=INTEGER},
119
-      </if>
120
-      <if test="crtTime != null" >
121
-        crt_time = #{crtTime,jdbcType=TIMESTAMP},
122
-      </if>
123
-      <if test="updTime != null" >
124
-        upd_time = #{updTime,jdbcType=TIMESTAMP},
125
-      </if>
126
-    </set>
127
-    where id = #{id,jdbcType=INTEGER}
128
-  </update>
129
-  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.UserConcern" >
130
-    update user_concern
131
-    set uid = #{uid,jdbcType=INTEGER},
132
-      cuid = #{cuid,jdbcType=INTEGER},
133
-      crt_time = #{crtTime,jdbcType=TIMESTAMP},
134
-      upd_time = #{updTime,jdbcType=TIMESTAMP}
135
-    where id = #{id,jdbcType=INTEGER}
136
-  </update>
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.huojutech.dao.UserConcernMapper" >
4
+  <resultMap id="BaseResultMap" type="com.huojutech.entity.UserConcern" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="uid" property="uid" jdbcType="INTEGER" />
7
+    <result column="cuid" property="cuid" jdbcType="INTEGER" />
8
+    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
9
+    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
10
+  </resultMap>
11
+  <sql id="Example_Where_Clause" >
12
+    <where >
13
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
14
+        <if test="criteria.valid" >
15
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
16
+            <foreach collection="criteria.criteria" item="criterion" >
17
+              <choose >
18
+                <when test="criterion.noValue" >
19
+                  and ${criterion.condition}
20
+                </when>
21
+                <when test="criterion.singleValue" >
22
+                  and ${criterion.condition} #{criterion.value}
23
+                </when>
24
+                <when test="criterion.betweenValue" >
25
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
26
+                </when>
27
+                <when test="criterion.listValue" >
28
+                  and ${criterion.condition}
29
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
30
+                    #{listItem}
31
+                  </foreach>
32
+                </when>
33
+              </choose>
34
+            </foreach>
35
+          </trim>
36
+        </if>
37
+      </foreach>
38
+    </where>
39
+  </sql>
40
+  <sql id="Base_Column_List" >
41
+    id, uid, cuid, crt_time, upd_time
42
+  </sql>
43
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.UserConcernExample" >
44
+    select
45
+    <if test="distinct" >
46
+      distinct
47
+    </if>
48
+    'true' as QUERYID,
49
+    <include refid="Base_Column_List" />
50
+    from user_concern
51
+    <if test="_parameter != null" >
52
+      <include refid="Example_Where_Clause" />
53
+    </if>
54
+    <if test="orderByClause != null" >
55
+      order by ${orderByClause}
56
+    </if>
57
+  </select>
58
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
59
+    select 
60
+    <include refid="Base_Column_List" />
61
+    from user_concern
62
+    where id = #{id,jdbcType=INTEGER}
63
+  </select>
64
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
65
+    delete from user_concern
66
+    where id = #{id,jdbcType=INTEGER}
67
+  </delete>
68
+  <insert id="insert" parameterType="com.huojutech.entity.UserConcern" useGeneratedKeys="true" keyProperty="id" >
69
+    insert into user_concern (uid, cuid, crt_time, 
70
+      upd_time)
71
+    values (#{uid,jdbcType=INTEGER}, #{cuid,jdbcType=INTEGER}, #{crtTime,jdbcType=TIMESTAMP}, 
72
+      #{updTime,jdbcType=TIMESTAMP})
73
+  </insert>
74
+  <insert id="insertSelective" parameterType="com.huojutech.entity.UserConcern" useGeneratedKeys="true" keyProperty="id" >
75
+    insert into user_concern
76
+    <trim prefix="(" suffix=")" suffixOverrides="," >
77
+      <if test="uid != null" >
78
+        uid,
79
+      </if>
80
+      <if test="cuid != null" >
81
+        cuid,
82
+      </if>
83
+      <if test="crtTime != null" >
84
+        crt_time,
85
+      </if>
86
+      <if test="updTime != null" >
87
+        upd_time,
88
+      </if>
89
+    </trim>
90
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
91
+      <if test="uid != null" >
92
+        #{uid,jdbcType=INTEGER},
93
+      </if>
94
+      <if test="cuid != null" >
95
+        #{cuid,jdbcType=INTEGER},
96
+      </if>
97
+      <if test="crtTime != null" >
98
+        #{crtTime,jdbcType=TIMESTAMP},
99
+      </if>
100
+      <if test="updTime != null" >
101
+        #{updTime,jdbcType=TIMESTAMP},
102
+      </if>
103
+    </trim>
104
+  </insert>
105
+  <select id="countByExample" parameterType="com.huojutech.entity.UserConcernExample" resultType="java.lang.Integer" >
106
+    select count(*) from user_concern
107
+    <if test="_parameter != null" >
108
+      <include refid="Example_Where_Clause" />
109
+    </if>
110
+  </select>
111
+  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.UserConcern" >
112
+    update user_concern
113
+    <set >
114
+      <if test="uid != null" >
115
+        uid = #{uid,jdbcType=INTEGER},
116
+      </if>
117
+      <if test="cuid != null" >
118
+        cuid = #{cuid,jdbcType=INTEGER},
119
+      </if>
120
+      <if test="crtTime != null" >
121
+        crt_time = #{crtTime,jdbcType=TIMESTAMP},
122
+      </if>
123
+      <if test="updTime != null" >
124
+        upd_time = #{updTime,jdbcType=TIMESTAMP},
125
+      </if>
126
+    </set>
127
+    where id = #{id,jdbcType=INTEGER}
128
+  </update>
129
+  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.UserConcern" >
130
+    update user_concern
131
+    set uid = #{uid,jdbcType=INTEGER},
132
+      cuid = #{cuid,jdbcType=INTEGER},
133
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
134
+      upd_time = #{updTime,jdbcType=TIMESTAMP}
135
+    where id = #{id,jdbcType=INTEGER}
136
+  </update>
137 137
 </mapper>

+ 218 - 218
huozuan/src/main/resources/mappers/UserMapper.xml

@@ -1,219 +1,219 @@
1
-<?xml version="1.0" encoding="UTF-8" ?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
-<mapper namespace="com.huojutech.dao.UserMapper" >
4
-  <resultMap id="BaseResultMap" type="com.huojutech.entity.User" >
5
-    <id column="id" property="id" jdbcType="INTEGER" />
6
-    <result column="name" property="name" jdbcType="VARCHAR" />
7
-    <result column="nickname" property="nickname" jdbcType="VARCHAR" />
8
-    <result column="avatar" property="avatar" jdbcType="VARCHAR" />
9
-    <result column="amount" property="amount" jdbcType="DECIMAL" />
10
-    <result column="forecast_rate_success" property="forecastRateSuccess" jdbcType="DOUBLE" />
11
-    <result column="vote_rate_success" property="voteRateSuccess" jdbcType="DOUBLE" />
12
-    <result column="wx_openid" property="wxOpenid" jdbcType="VARCHAR" />
13
-    <result column="wx_unionid" property="wxUnionid" jdbcType="VARCHAR" />
14
-    <result column="status" property="status" jdbcType="INTEGER" />
15
-    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
16
-    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
17
-  </resultMap>
18
-  <sql id="Example_Where_Clause" >
19
-    <where >
20
-      <foreach collection="oredCriteria" item="criteria" separator="or" >
21
-        <if test="criteria.valid" >
22
-          <trim prefix="(" suffix=")" prefixOverrides="and" >
23
-            <foreach collection="criteria.criteria" item="criterion" >
24
-              <choose >
25
-                <when test="criterion.noValue" >
26
-                  and ${criterion.condition}
27
-                </when>
28
-                <when test="criterion.singleValue" >
29
-                  and ${criterion.condition} #{criterion.value}
30
-                </when>
31
-                <when test="criterion.betweenValue" >
32
-                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
33
-                </when>
34
-                <when test="criterion.listValue" >
35
-                  and ${criterion.condition}
36
-                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
37
-                    #{listItem}
38
-                  </foreach>
39
-                </when>
40
-              </choose>
41
-            </foreach>
42
-          </trim>
43
-        </if>
44
-      </foreach>
45
-    </where>
46
-  </sql>
47
-  <sql id="Base_Column_List" >
48
-    id, name, nickname, avatar, amount, forecast_rate_success, vote_rate_success, wx_openid, 
49
-    wx_unionid, status, crt_time, upd_time
50
-  </sql>
51
-  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.UserExample" >
52
-    select
53
-    <if test="distinct" >
54
-      distinct
55
-    </if>
56
-    'true' as QUERYID,
57
-    <include refid="Base_Column_List" />
58
-    from user
59
-    <if test="_parameter != null" >
60
-      <include refid="Example_Where_Clause" />
61
-    </if>
62
-    <if test="orderByClause != null" >
63
-      order by ${orderByClause}
64
-    </if>
65
-  </select>
66
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
67
-    select 
68
-    <include refid="Base_Column_List" />
69
-    from user
70
-    where id = #{id,jdbcType=INTEGER}
71
-  </select>
72
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
73
-    delete from user
74
-    where id = #{id,jdbcType=INTEGER}
75
-  </delete>
76
-  <insert id="insert" parameterType="com.huojutech.entity.User" useGeneratedKeys="true" keyProperty="id" >
77
-    insert into user (name, nickname, avatar, 
78
-      amount, forecast_rate_success, vote_rate_success, 
79
-      wx_openid, wx_unionid, status, 
80
-      crt_time, upd_time)
81
-    values (#{name,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, 
82
-      #{amount,jdbcType=DECIMAL}, #{forecastRateSuccess,jdbcType=DOUBLE}, #{voteRateSuccess,jdbcType=DOUBLE}, 
83
-      #{wxOpenid,jdbcType=VARCHAR}, #{wxUnionid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
84
-      #{crtTime,jdbcType=TIMESTAMP}, #{updTime,jdbcType=TIMESTAMP})
85
-  </insert>
86
-  <insert id="insertSelective" parameterType="com.huojutech.entity.User" useGeneratedKeys="true" keyProperty="id" >
87
-    insert into user
88
-    <trim prefix="(" suffix=")" suffixOverrides="," >
89
-      <if test="name != null" >
90
-        name,
91
-      </if>
92
-      <if test="nickname != null" >
93
-        nickname,
94
-      </if>
95
-      <if test="avatar != null" >
96
-        avatar,
97
-      </if>
98
-      <if test="amount != null" >
99
-        amount,
100
-      </if>
101
-      <if test="forecastRateSuccess != null" >
102
-        forecast_rate_success,
103
-      </if>
104
-      <if test="voteRateSuccess != null" >
105
-        vote_rate_success,
106
-      </if>
107
-      <if test="wxOpenid != null" >
108
-        wx_openid,
109
-      </if>
110
-      <if test="wxUnionid != null" >
111
-        wx_unionid,
112
-      </if>
113
-      <if test="status != null" >
114
-        status,
115
-      </if>
116
-      <if test="crtTime != null" >
117
-        crt_time,
118
-      </if>
119
-      <if test="updTime != null" >
120
-        upd_time,
121
-      </if>
122
-    </trim>
123
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
124
-      <if test="name != null" >
125
-        #{name,jdbcType=VARCHAR},
126
-      </if>
127
-      <if test="nickname != null" >
128
-        #{nickname,jdbcType=VARCHAR},
129
-      </if>
130
-      <if test="avatar != null" >
131
-        #{avatar,jdbcType=VARCHAR},
132
-      </if>
133
-      <if test="amount != null" >
134
-        #{amount,jdbcType=DECIMAL},
135
-      </if>
136
-      <if test="forecastRateSuccess != null" >
137
-        #{forecastRateSuccess,jdbcType=DOUBLE},
138
-      </if>
139
-      <if test="voteRateSuccess != null" >
140
-        #{voteRateSuccess,jdbcType=DOUBLE},
141
-      </if>
142
-      <if test="wxOpenid != null" >
143
-        #{wxOpenid,jdbcType=VARCHAR},
144
-      </if>
145
-      <if test="wxUnionid != null" >
146
-        #{wxUnionid,jdbcType=VARCHAR},
147
-      </if>
148
-      <if test="status != null" >
149
-        #{status,jdbcType=INTEGER},
150
-      </if>
151
-      <if test="crtTime != null" >
152
-        #{crtTime,jdbcType=TIMESTAMP},
153
-      </if>
154
-      <if test="updTime != null" >
155
-        #{updTime,jdbcType=TIMESTAMP},
156
-      </if>
157
-    </trim>
158
-  </insert>
159
-  <select id="countByExample" parameterType="com.huojutech.entity.UserExample" resultType="java.lang.Integer" >
160
-    select count(*) from user
161
-    <if test="_parameter != null" >
162
-      <include refid="Example_Where_Clause" />
163
-    </if>
164
-  </select>
165
-  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.User" >
166
-    update user
167
-    <set >
168
-      <if test="name != null" >
169
-        name = #{name,jdbcType=VARCHAR},
170
-      </if>
171
-      <if test="nickname != null" >
172
-        nickname = #{nickname,jdbcType=VARCHAR},
173
-      </if>
174
-      <if test="avatar != null" >
175
-        avatar = #{avatar,jdbcType=VARCHAR},
176
-      </if>
177
-      <if test="amount != null" >
178
-        amount = #{amount,jdbcType=DECIMAL},
179
-      </if>
180
-      <if test="forecastRateSuccess != null" >
181
-        forecast_rate_success = #{forecastRateSuccess,jdbcType=DOUBLE},
182
-      </if>
183
-      <if test="voteRateSuccess != null" >
184
-        vote_rate_success = #{voteRateSuccess,jdbcType=DOUBLE},
185
-      </if>
186
-      <if test="wxOpenid != null" >
187
-        wx_openid = #{wxOpenid,jdbcType=VARCHAR},
188
-      </if>
189
-      <if test="wxUnionid != null" >
190
-        wx_unionid = #{wxUnionid,jdbcType=VARCHAR},
191
-      </if>
192
-      <if test="status != null" >
193
-        status = #{status,jdbcType=INTEGER},
194
-      </if>
195
-      <if test="crtTime != null" >
196
-        crt_time = #{crtTime,jdbcType=TIMESTAMP},
197
-      </if>
198
-      <if test="updTime != null" >
199
-        upd_time = #{updTime,jdbcType=TIMESTAMP},
200
-      </if>
201
-    </set>
202
-    where id = #{id,jdbcType=INTEGER}
203
-  </update>
204
-  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.User" >
205
-    update user
206
-    set name = #{name,jdbcType=VARCHAR},
207
-      nickname = #{nickname,jdbcType=VARCHAR},
208
-      avatar = #{avatar,jdbcType=VARCHAR},
209
-      amount = #{amount,jdbcType=DECIMAL},
210
-      forecast_rate_success = #{forecastRateSuccess,jdbcType=DOUBLE},
211
-      vote_rate_success = #{voteRateSuccess,jdbcType=DOUBLE},
212
-      wx_openid = #{wxOpenid,jdbcType=VARCHAR},
213
-      wx_unionid = #{wxUnionid,jdbcType=VARCHAR},
214
-      status = #{status,jdbcType=INTEGER},
215
-      crt_time = #{crtTime,jdbcType=TIMESTAMP},
216
-      upd_time = #{updTime,jdbcType=TIMESTAMP}
217
-    where id = #{id,jdbcType=INTEGER}
218
-  </update>
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.huojutech.dao.UserMapper" >
4
+  <resultMap id="BaseResultMap" type="com.huojutech.entity.User" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="name" property="name" jdbcType="VARCHAR" />
7
+    <result column="nickname" property="nickname" jdbcType="VARCHAR" />
8
+    <result column="avatar" property="avatar" jdbcType="VARCHAR" />
9
+    <result column="amount" property="amount" jdbcType="DECIMAL" />
10
+    <result column="forecast_rate_success" property="forecastRateSuccess" jdbcType="DOUBLE" />
11
+    <result column="vote_rate_success" property="voteRateSuccess" jdbcType="DOUBLE" />
12
+    <result column="wx_openid" property="wxOpenid" jdbcType="VARCHAR" />
13
+    <result column="wx_unionid" property="wxUnionid" jdbcType="VARCHAR" />
14
+    <result column="status" property="status" jdbcType="INTEGER" />
15
+    <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
16
+    <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
17
+  </resultMap>
18
+  <sql id="Example_Where_Clause" >
19
+    <where >
20
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
21
+        <if test="criteria.valid" >
22
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
23
+            <foreach collection="criteria.criteria" item="criterion" >
24
+              <choose >
25
+                <when test="criterion.noValue" >
26
+                  and ${criterion.condition}
27
+                </when>
28
+                <when test="criterion.singleValue" >
29
+                  and ${criterion.condition} #{criterion.value}
30
+                </when>
31
+                <when test="criterion.betweenValue" >
32
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
33
+                </when>
34
+                <when test="criterion.listValue" >
35
+                  and ${criterion.condition}
36
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
37
+                    #{listItem}
38
+                  </foreach>
39
+                </when>
40
+              </choose>
41
+            </foreach>
42
+          </trim>
43
+        </if>
44
+      </foreach>
45
+    </where>
46
+  </sql>
47
+  <sql id="Base_Column_List" >
48
+    id, name, nickname, avatar, amount, forecast_rate_success, vote_rate_success, wx_openid, 
49
+    wx_unionid, status, crt_time, upd_time
50
+  </sql>
51
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.UserExample" >
52
+    select
53
+    <if test="distinct" >
54
+      distinct
55
+    </if>
56
+    'true' as QUERYID,
57
+    <include refid="Base_Column_List" />
58
+    from user
59
+    <if test="_parameter != null" >
60
+      <include refid="Example_Where_Clause" />
61
+    </if>
62
+    <if test="orderByClause != null" >
63
+      order by ${orderByClause}
64
+    </if>
65
+  </select>
66
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
67
+    select 
68
+    <include refid="Base_Column_List" />
69
+    from user
70
+    where id = #{id,jdbcType=INTEGER}
71
+  </select>
72
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
73
+    delete from user
74
+    where id = #{id,jdbcType=INTEGER}
75
+  </delete>
76
+  <insert id="insert" parameterType="com.huojutech.entity.User" useGeneratedKeys="true" keyProperty="id" >
77
+    insert into user (name, nickname, avatar, 
78
+      amount, forecast_rate_success, vote_rate_success, 
79
+      wx_openid, wx_unionid, status, 
80
+      crt_time, upd_time)
81
+    values (#{name,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, 
82
+      #{amount,jdbcType=DECIMAL}, #{forecastRateSuccess,jdbcType=DOUBLE}, #{voteRateSuccess,jdbcType=DOUBLE}, 
83
+      #{wxOpenid,jdbcType=VARCHAR}, #{wxUnionid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
84
+      #{crtTime,jdbcType=TIMESTAMP}, #{updTime,jdbcType=TIMESTAMP})
85
+  </insert>
86
+  <insert id="insertSelective" parameterType="com.huojutech.entity.User" useGeneratedKeys="true" keyProperty="id" >
87
+    insert into user
88
+    <trim prefix="(" suffix=")" suffixOverrides="," >
89
+      <if test="name != null" >
90
+        name,
91
+      </if>
92
+      <if test="nickname != null" >
93
+        nickname,
94
+      </if>
95
+      <if test="avatar != null" >
96
+        avatar,
97
+      </if>
98
+      <if test="amount != null" >
99
+        amount,
100
+      </if>
101
+      <if test="forecastRateSuccess != null" >
102
+        forecast_rate_success,
103
+      </if>
104
+      <if test="voteRateSuccess != null" >
105
+        vote_rate_success,
106
+      </if>
107
+      <if test="wxOpenid != null" >
108
+        wx_openid,
109
+      </if>
110
+      <if test="wxUnionid != null" >
111
+        wx_unionid,
112
+      </if>
113
+      <if test="status != null" >
114
+        status,
115
+      </if>
116
+      <if test="crtTime != null" >
117
+        crt_time,
118
+      </if>
119
+      <if test="updTime != null" >
120
+        upd_time,
121
+      </if>
122
+    </trim>
123
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
124
+      <if test="name != null" >
125
+        #{name,jdbcType=VARCHAR},
126
+      </if>
127
+      <if test="nickname != null" >
128
+        #{nickname,jdbcType=VARCHAR},
129
+      </if>
130
+      <if test="avatar != null" >
131
+        #{avatar,jdbcType=VARCHAR},
132
+      </if>
133
+      <if test="amount != null" >
134
+        #{amount,jdbcType=DECIMAL},
135
+      </if>
136
+      <if test="forecastRateSuccess != null" >
137
+        #{forecastRateSuccess,jdbcType=DOUBLE},
138
+      </if>
139
+      <if test="voteRateSuccess != null" >
140
+        #{voteRateSuccess,jdbcType=DOUBLE},
141
+      </if>
142
+      <if test="wxOpenid != null" >
143
+        #{wxOpenid,jdbcType=VARCHAR},
144
+      </if>
145
+      <if test="wxUnionid != null" >
146
+        #{wxUnionid,jdbcType=VARCHAR},
147
+      </if>
148
+      <if test="status != null" >
149
+        #{status,jdbcType=INTEGER},
150
+      </if>
151
+      <if test="crtTime != null" >
152
+        #{crtTime,jdbcType=TIMESTAMP},
153
+      </if>
154
+      <if test="updTime != null" >
155
+        #{updTime,jdbcType=TIMESTAMP},
156
+      </if>
157
+    </trim>
158
+  </insert>
159
+  <select id="countByExample" parameterType="com.huojutech.entity.UserExample" resultType="java.lang.Integer" >
160
+    select count(*) from user
161
+    <if test="_parameter != null" >
162
+      <include refid="Example_Where_Clause" />
163
+    </if>
164
+  </select>
165
+  <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.User" >
166
+    update user
167
+    <set >
168
+      <if test="name != null" >
169
+        name = #{name,jdbcType=VARCHAR},
170
+      </if>
171
+      <if test="nickname != null" >
172
+        nickname = #{nickname,jdbcType=VARCHAR},
173
+      </if>
174
+      <if test="avatar != null" >
175
+        avatar = #{avatar,jdbcType=VARCHAR},
176
+      </if>
177
+      <if test="amount != null" >
178
+        amount = #{amount,jdbcType=DECIMAL},
179
+      </if>
180
+      <if test="forecastRateSuccess != null" >
181
+        forecast_rate_success = #{forecastRateSuccess,jdbcType=DOUBLE},
182
+      </if>
183
+      <if test="voteRateSuccess != null" >
184
+        vote_rate_success = #{voteRateSuccess,jdbcType=DOUBLE},
185
+      </if>
186
+      <if test="wxOpenid != null" >
187
+        wx_openid = #{wxOpenid,jdbcType=VARCHAR},
188
+      </if>
189
+      <if test="wxUnionid != null" >
190
+        wx_unionid = #{wxUnionid,jdbcType=VARCHAR},
191
+      </if>
192
+      <if test="status != null" >
193
+        status = #{status,jdbcType=INTEGER},
194
+      </if>
195
+      <if test="crtTime != null" >
196
+        crt_time = #{crtTime,jdbcType=TIMESTAMP},
197
+      </if>
198
+      <if test="updTime != null" >
199
+        upd_time = #{updTime,jdbcType=TIMESTAMP},
200
+      </if>
201
+    </set>
202
+    where id = #{id,jdbcType=INTEGER}
203
+  </update>
204
+  <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.User" >
205
+    update user
206
+    set name = #{name,jdbcType=VARCHAR},
207
+      nickname = #{nickname,jdbcType=VARCHAR},
208
+      avatar = #{avatar,jdbcType=VARCHAR},
209
+      amount = #{amount,jdbcType=DECIMAL},
210
+      forecast_rate_success = #{forecastRateSuccess,jdbcType=DOUBLE},
211
+      vote_rate_success = #{voteRateSuccess,jdbcType=DOUBLE},
212
+      wx_openid = #{wxOpenid,jdbcType=VARCHAR},
213
+      wx_unionid = #{wxUnionid,jdbcType=VARCHAR},
214
+      status = #{status,jdbcType=INTEGER},
215
+      crt_time = #{crtTime,jdbcType=TIMESTAMP},
216
+      upd_time = #{updTime,jdbcType=TIMESTAMP}
217
+    where id = #{id,jdbcType=INTEGER}
218
+  </update>
219 219
 </mapper>

+ 16 - 16
huozuan/src/test/java/com/huojutech/HuozuanApplicationTests.java

@@ -1,16 +1,16 @@
1
-package com.huojutech;
2
-
3
-import org.junit.Test;
4
-import org.junit.runner.RunWith;
5
-import org.springframework.boot.test.context.SpringBootTest;
6
-import org.springframework.test.context.junit4.SpringRunner;
7
-
8
-@RunWith(SpringRunner.class)
9
-@SpringBootTest
10
-public class HuozuanApplicationTests {
11
-
12
-	@Test
13
-	public void contextLoads() {
14
-	}
15
-
16
-}
1
+package com.huojutech;
2
+
3
+import org.junit.Test;
4
+import org.junit.runner.RunWith;
5
+import org.springframework.boot.test.context.SpringBootTest;
6
+import org.springframework.test.context.junit4.SpringRunner;
7
+
8
+@RunWith(SpringRunner.class)
9
+@SpringBootTest
10
+public class HuozuanApplicationTests {
11
+
12
+	@Test
13
+	public void contextLoads() {
14
+	}
15
+
16
+}

+ 25 - 25
huozuan/src/test/java/com/huojutech/TestString.java

@@ -1,25 +1,25 @@
1
-package com.huojutech;
2
-
3
-/**
4
- * Created by Wangzw on 2018\4\12 0012.
5
- */
6
-
7
-public class TestString {
8
-    public static String Web_access_tokenhttps = "https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code";
9
-    public static final String APPID = "wx9aed188a08232742";
10
-    public static final String SECRET = "a2475aa957cc28bd6806c5f18d7a6ca9";
11
-    public static String getWebAccess(String code) {
12
-        return String.format(Web_access_tokenhttps, APPID, SECRET, code);
13
-    }
14
-    public static void main(String[] args) {
15
-
16
-        String code ="123";
17
-
18
-        String webAccess = TestString.getWebAccess(code);
19
-        System.out.printf(webAccess);
20
-
21
-
22
-    }
23
-
24
-}
25
-
1
+package com.huojutech;
2
+
3
+/**
4
+ * Created by Wangzw on 2018\4\12 0012.
5
+ */
6
+
7
+public class TestString {
8
+    public static String Web_access_tokenhttps = "https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code";
9
+    public static final String APPID = "wx9aed188a08232742";
10
+    public static final String SECRET = "a2475aa957cc28bd6806c5f18d7a6ca9";
11
+    public static String getWebAccess(String code) {
12
+        return String.format(Web_access_tokenhttps, APPID, SECRET, code);
13
+    }
14
+    public static void main(String[] args) {
15
+
16
+        String code ="123";
17
+
18
+        String webAccess = TestString.getWebAccess(code);
19
+        System.out.printf(webAccess);
20
+
21
+
22
+    }
23
+
24
+}
25
+