Browse Source

创建林业项目

qiubo 4 years ago
parent
commit
718edffece
100 changed files with 17122 additions and 0 deletions
  1. 52 0
      docs/nacos/mall-admin-cms-prod.yaml
  2. 53 0
      docs/nacos/mall-admin-oms-prod.yaml
  3. 52 0
      docs/nacos/mall-admin-pms-prod.yaml
  4. 52 0
      docs/nacos/mall-admin-sms-prod.yaml
  5. 87 0
      docs/nacos/mall-admin-ums-prod.yaml
  6. 55 0
      docs/nacos/mall-gateway-prod.yaml
  7. 2580 0
      docs/sql/mall.sql
  8. 26 0
      mall-admin-cms/cms-common/pom.xml
  9. 49 0
      mall-admin-cms/cms-common/src/main/java/com/mtcarpenter/mall/client/CmsPrefrenceAreaProductRelationClient.java
  10. 42 0
      mall-admin-cms/cms-common/src/main/java/com/mtcarpenter/mall/client/CmsSubjectProductRelationClient.java
  11. 22 0
      mall-admin-cms/cms-common/src/main/java/com/mtcarpenter/mall/common/CmsPrefrenceAreaProductRelationInput.java
  12. 26 0
      mall-admin-cms/cms-common/src/main/java/com/mtcarpenter/mall/common/CmsSubjectProductRelationInput.java
  13. 33 0
      mall-admin-cms/cms-mbg/pom.xml
  14. 73 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/CommentGenerator.java
  15. 38 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/Generator.java
  16. 30 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsHelpCategoryMapper.java
  17. 36 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsHelpMapper.java
  18. 22 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsMemberReportMapper.java
  19. 36 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsPrefrenceAreaMapper.java
  20. 30 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsPrefrenceAreaProductRelationMapper.java
  21. 30 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsSubjectCategoryMapper.java
  22. 30 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsSubjectCommentMapper.java
  23. 36 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsSubjectMapper.java
  24. 30 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsSubjectProductRelationMapper.java
  25. 30 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsTopicCategoryMapper.java
  26. 30 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsTopicCommentMapper.java
  27. 36 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsTopicMapper.java
  28. 99 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsHelp.java
  29. 82 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsHelpCategory.java
  30. 580 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsHelpCategoryExample.java
  31. 641 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsHelpExample.java
  32. 105 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsMemberReport.java
  33. 711 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsMemberReportExample.java
  34. 81 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsPrefrenceArea.java
  35. 520 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsPrefrenceAreaExample.java
  36. 48 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsPrefrenceAreaProductRelation.java
  37. 380 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsPrefrenceAreaProductRelationExample.java
  38. 187 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubject.java
  39. 82 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectCategory.java
  40. 580 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectCategoryExample.java
  41. 89 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectComment.java
  42. 651 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectCommentExample.java
  43. 1151 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectExample.java
  44. 49 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectProductRelation.java
  45. 380 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectProductRelationExample.java
  46. 146 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsTopic.java
  47. 82 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsTopicCategory.java
  48. 580 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsTopicCategoryExample.java
  49. 89 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsTopicComment.java
  50. 651 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsTopicCommentExample.java
  51. 891 0
      mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsTopicExample.java
  52. 226 0
      mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsHelpCategoryMapper.xml
  53. 304 0
      mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsHelpMapper.xml
  54. 211 0
      mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsMemberReportMapper.xml
  55. 268 0
      mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsPrefrenceAreaMapper.xml
  56. 179 0
      mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsPrefrenceAreaProductRelationMapper.xml
  57. 226 0
      mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsSubjectCategoryMapper.xml
  58. 243 0
      mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsSubjectCommentMapper.xml
  59. 447 0
      mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsSubjectMapper.xml
  60. 179 0
      mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsSubjectProductRelationMapper.xml
  61. 226 0
      mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsTopicCategoryMapper.xml
  62. 243 0
      mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsTopicCommentMapper.xml
  63. 375 0
      mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsTopicMapper.xml
  64. 4 0
      mall-admin-cms/cms-mbg/src/main/resources/generator.properties
  65. 44 0
      mall-admin-cms/cms-mbg/src/main/resources/generatorConfig.xml
  66. 70 0
      mall-admin-cms/cms-server/pom.xml
  67. 16 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/CmsAdminApplication.java
  68. 43 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/component/BindingResultAspect.java
  69. 15 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/config/MyBatisConfig.java
  70. 77 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/config/Swagger2Config.java
  71. 62 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/controller/CmsPrefrenceAreaController.java
  72. 71 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/controller/CmsSubjectController.java
  73. 28 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/controller/ConfigController.java
  74. 25 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/dao/CmsPrefrenceAreaProductRelationDao.java
  75. 25 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/dao/CmsSubjectProductRelationDao.java
  76. 38 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/service/CmsPrefrenceAreaService.java
  77. 43 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/service/CmsSubjectService.java
  78. 80 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/service/impl/CmsPrefrenceAreaServiceImpl.java
  79. 91 0
      mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/service/impl/CmsSubjectServiceImpl.java
  80. 55 0
      mall-admin-cms/cms-server/src/main/resources/application-dev.yml
  81. 16 0
      mall-admin-cms/cms-server/src/main/resources/bootstrap.yml
  82. 15 0
      mall-admin-cms/cms-server/src/main/resources/dao/CmsPrefrenceAreaProductRelationDao.xml
  83. 14 0
      mall-admin-cms/cms-server/src/main/resources/dao/CmsSubjectProductRelationDao.xml
  84. 31 0
      mall-admin-cms/cms-server/src/main/resources/logback-spring.xml
  85. 25 0
      mall-admin-cms/cms-server/src/test/java/com/mtcarpenter/mall/service/impl/CmsPrefrenceAreaServiceImplTest.java
  86. 23 0
      mall-admin-cms/pom.xml
  87. 15 0
      mall-admin-oms/oms-common/pom.xml
  88. 33 0
      mall-admin-oms/oms-mbg/pom.xml
  89. 73 0
      mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/CommentGenerator.java
  90. 38 0
      mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/Generator.java
  91. 30 0
      mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsCartItemMapper.java
  92. 30 0
      mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsCompanyAddressMapper.java
  93. 30 0
      mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsOrderItemMapper.java
  94. 30 0
      mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsOrderMapper.java
  95. 30 0
      mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsOrderOperateHistoryMapper.java
  96. 30 0
      mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsOrderReturnApplyMapper.java
  97. 30 0
      mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsOrderReturnReasonMapper.java
  98. 30 0
      mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsOrderSettingMapper.java
  99. 214 0
      mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/model/OmsCartItem.java
  100. 0 0
      mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/model/OmsCartItemExample.java

+ 52 - 0
docs/nacos/mall-admin-cms-prod.yaml

@@ -0,0 +1,52 @@
+spring:
+  datasource:
+    url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+    username: root
+    password: 123456
+    druid:
+      initial-size: 5 #连接池初始化大小
+      min-idle: 10 #最小空闲连接数
+      max-active: 20 #最大连接数
+      web-stat-filter:
+        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" #不统计这些请求数据
+      stat-view-servlet: #访问监控网页的登录用户名和密码
+        login-username: druid
+        login-password: druid
+  redis:
+    host: localhost # Redis服务器地址
+    database: 0 # Redis数据库索引(默认为0)
+    port: 6379 # Redis服务器连接端口
+    password: # Redis服务器连接密码(默认为空)
+    timeout: 300ms # 连接超时时间(毫秒)
+  zipkin:
+    base-url: http://localhost:9411
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      # zipkin 抽样比例 在默认情况下,该值为0.1
+      probability: 1.0
+  boot:
+    admin:
+      client:
+        # admin 服务端的地址
+        url: http://localhost:8095
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      # 展示详情
+      show-details: always
+mybatis:
+  mapper-locations:
+    - classpath:dao/*.xml
+    - classpath*:com/**/mapper/*.xml
+logging:
+  level:
+    root: info #日志配置DEBUG,INFO,WARN,ERROR
+    com.mtcarpenter.mall: debug

+ 53 - 0
docs/nacos/mall-admin-oms-prod.yaml

@@ -0,0 +1,53 @@
+spring:
+  datasource:
+    url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+    username: root
+    password: 123456
+    druid:
+      initial-size: 5 #连接池初始化大小
+      min-idle: 10 #最小空闲连接数
+      max-active: 20 #最大连接数
+      web-stat-filter:
+        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" #不统计这些请求数据
+      stat-view-servlet: #访问监控网页的登录用户名和密码
+        login-username: druid
+        login-password: druid
+  redis:
+    host: localhost # Redis服务器地址
+    database: 0 # Redis数据库索引(默认为0)
+    port: 6379 # Redis服务器连接端口
+    password: # Redis服务器连接密码(默认为空)
+    timeout: 300ms # 连接超时时间(毫秒)
+  zipkin:
+    base-url: http://localhost:9411
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      # zipkin 抽样比例 在默认情况下,该值为0.1
+      probability: 1.0
+  boot:
+    admin:
+      client:
+        # admin 服务端的地址
+        url: http://localhost:8095
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      # 展示详情
+      show-details: always
+mybatis:
+  mapper-locations:
+    - classpath:dao/*.xml
+    - classpath*:com/**/mapper/*.xml
+logging:
+  level:
+    root: info #日志配置DEBUG,INFO,WARN,ERROR
+    com.mtcarpenter.mall: info
+    

+ 52 - 0
docs/nacos/mall-admin-pms-prod.yaml

@@ -0,0 +1,52 @@
+spring:
+  datasource:
+    url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+    username: root
+    password: 123456
+    druid:
+      initial-size: 5 #连接池初始化大小
+      min-idle: 10 #最小空闲连接数
+      max-active: 20 #最大连接数
+      web-stat-filter:
+        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" #不统计这些请求数据
+      stat-view-servlet: #访问监控网页的登录用户名和密码
+        login-username: druid
+        login-password: druid
+  redis:
+    host: localhost # Redis服务器地址
+    database: 0 # Redis数据库索引(默认为0)
+    port: 6379 # Redis服务器连接端口
+    password: # Redis服务器连接密码(默认为空)
+    timeout: 300ms # 连接超时时间(毫秒)
+  zipkin:
+    base-url: http://localhost:9411
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      # zipkin 抽样比例 在默认情况下,该值为0.1
+      probability: 1.0
+  boot:
+    admin:
+      client:
+        # admin 服务端的地址
+        url: http://localhost:8095
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      # 展示详情
+      show-details: always
+mybatis:
+  mapper-locations:
+    - classpath:dao/*.xml
+    - classpath*:com/**/mapper/*.xml
+logging:
+  level:
+    root: info #日志配置DEBUG,INFO,WARN,ERROR
+    com.mtcarpenter.mall: info

+ 52 - 0
docs/nacos/mall-admin-sms-prod.yaml

@@ -0,0 +1,52 @@
+spring:
+  datasource:
+    url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+    username: root
+    password: 123456
+    druid:
+      initial-size: 5 #连接池初始化大小
+      min-idle: 10 #最小空闲连接数
+      max-active: 20 #最大连接数
+      web-stat-filter:
+        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" #不统计这些请求数据
+      stat-view-servlet: #访问监控网页的登录用户名和密码
+        login-username: druid
+        login-password: druid
+  redis:
+    host: localhost # Redis服务器地址
+    database: 0 # Redis数据库索引(默认为0)
+    port: 6379 # Redis服务器连接端口
+    password: # Redis服务器连接密码(默认为空)
+    timeout: 300ms # 连接超时时间(毫秒)
+  zipkin:
+    base-url: http://localhost:9411
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      # zipkin 抽样比例 在默认情况下,该值为0.1
+      probability: 1.0
+  boot:
+    admin:
+      client:
+        # admin 服务端的地址
+        url: http://localhost:8095
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      # 展示详情
+      show-details: always
+mybatis:
+  mapper-locations:
+    - classpath:dao/*.xml
+    - classpath*:com/**/mapper/*.xml
+logging:
+  level:
+    root: info #日志配置DEBUG,INFO,WARN,ERROR
+    com.mtcarpenter.mall: info

+ 87 - 0
docs/nacos/mall-admin-ums-prod.yaml

@@ -0,0 +1,87 @@
+spring:
+  datasource:
+    url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+    username: root
+    password: 123456
+    druid:
+      initial-size: 5
+      min-idle: 10
+      max-active: 20
+      web-stat-filter:
+        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" 
+      stat-view-servlet: 
+        login-username: druid
+        login-password: druid
+  redis:
+    host: localhost
+    database: 0
+    port: 6379
+    password:
+    timeout: 300ms
+  zipkin:
+    base-url: http://localhost:9411
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      # zipkin 抽样比例 在默认情况下,该值为0.1
+      probability: 1.0
+  boot:
+    admin:
+      client:
+        # admin 服务端的地址
+        url: http://localhost:8095
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      # 展示详情
+      show-details: always
+# 过滤不需要认证路径条件         
+secure:
+  ignored:
+    urls:
+      - /swagger-ui.html
+      - /swagger-resources/**
+      - /swagger/**
+      - /**/v2/api-docs
+      - /**/*.js
+      - /**/*.css
+      - /**/*.png
+      - /**/*.ico
+      - /webjars/springfox-swagger-ui/**
+      - /actuator/**
+      - /druid/**
+      - /admin/login
+      - /admin/register
+      - /admin/info
+      - /admin/logout
+      - /minio/upload
+
+mybatis:
+  mapper-locations:
+    - classpath:dao/*.xml
+    - classpath*:com/**/mapper/*.xml
+jwt:
+  tokenHeader: Authorization
+  secret: mall-admin-secret
+  expiration: 604800
+  tokenHead: Bearer
+
+redis:
+  database: mall
+  key:
+    admin: 'ums:admin'
+    token: 'ums:token'
+    resourceList: 'ums:resourceList'
+  expire:
+    common: 86400 # 24小时
+logging:
+  level:
+    root: info
+    com.mtcarpenter.mall: info

+ 55 - 0
docs/nacos/mall-gateway-prod.yaml

@@ -0,0 +1,55 @@
+spring:
+  redis:
+    host: localhost
+    database: 0
+    port: 6379
+    password:
+    timeout: 300ms
+  boot:
+    admin:
+      client:
+        # admin 服务端的地址
+        url: http://localhost:8095
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      # 展示详情
+      show-details: always
+# 过滤不需要认证路径条件
+secure:
+  ignored:
+    urls: #安全路径白名单
+      - /swagger-ui.html
+      - /swagger-resources/**
+      - /swagger/**
+      - /**/v2/api-docs
+      - /**/*.js
+      - /**/*.css
+      - /**/*.png
+      - /**/*.ico
+      - /webjars/springfox-swagger-ui/**
+      - /actuator/**
+      - /druid/**
+      - /admin/login
+      - /admin/register
+      - /admin/info
+      - /admin/logout
+      - /minio/upload
+jwt:
+  tokenHeader: Authorization
+  secret: mall-admin-secret
+  expiration: 604800
+  tokenHead: Bearer
+redis:
+  database: mall
+  key:
+    admin: 'ums:admin'
+    token: 'ums:token'
+    resourceList: 'ums:resourceList'
+  expire:
+    common: 86400 # 24小时

File diff suppressed because it is too large
+ 2580 - 0
docs/sql/mall.sql


+ 26 - 0
mall-admin-cms/cms-common/pom.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>mall-admin-cms</artifactId>
+        <groupId>com.mtcarpenter</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>cms-common</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.mtcarpenter</groupId>
+            <artifactId>mall-common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-openfeign</artifactId>
+        </dependency>
+    </dependencies>
+
+</project>

+ 49 - 0
mall-admin-cms/cms-common/src/main/java/com/mtcarpenter/mall/client/CmsPrefrenceAreaProductRelationClient.java

@@ -0,0 +1,49 @@
+package com.mtcarpenter.mall.client;
+
+import com.mtcarpenter.mall.common.CmsPrefrenceAreaProductRelationInput;
+import com.mtcarpenter.mall.common.api.CommonResult;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+
+/**
+ * @author mtcarpenter
+ * @github https://github.com/mtcarpenter/mall-cloud-alibaba
+ * @desc 微信公众号:山间木匠
+ */
+@FeignClient(name = "mall-admin-cms", path = "prefrenceArea")
+public interface CmsPrefrenceAreaProductRelationClient {
+
+    /**
+     * 批量关联商品
+     *
+     * @param productRelationInput
+     * @return
+     */
+    @RequestMapping(value = "/relateAndInsertList", method = RequestMethod.POST)
+    CommonResult relateAndInsertList(@RequestBody List<CmsPrefrenceAreaProductRelationInput> productRelationInput, @RequestParam("productId") Long productId);
+
+
+    /**
+     * 批量更新关联商品
+     *
+     * @param productRelationInputs
+     * @param productId
+     */
+    @RequestMapping(value = "/relateAndUpdateList", method = RequestMethod.POST)
+    CommonResult relateAndUpdateList(@RequestBody List<CmsPrefrenceAreaProductRelationInput> productRelationInputs, @RequestParam("productId") Long productId);
+
+
+    /**
+     * 通过id查询关联专题
+     *
+     * @param productId
+     * @return
+     */
+    @RequestMapping(value = "/relationByProductId", method = RequestMethod.GET)
+    CommonResult<List<CmsPrefrenceAreaProductRelationInput>> relationByProductId(@RequestParam("productId") Long productId);
+}

+ 42 - 0
mall-admin-cms/cms-common/src/main/java/com/mtcarpenter/mall/client/CmsSubjectProductRelationClient.java

@@ -0,0 +1,42 @@
+package com.mtcarpenter.mall.client;
+
+import com.mtcarpenter.mall.common.CmsSubjectProductRelationInput;
+import com.mtcarpenter.mall.common.api.CommonResult;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * @author mtcarpenter
+ * @github https://github.com/mtcarpenter/mall-cloud-alibaba
+ * @desc 微信公众号:山间木匠
+ */
+@FeignClient(name = "mall-admin-cms",path = "subject")
+public interface CmsSubjectProductRelationClient {
+    /**
+     * 关联优选
+     *
+     * @param productRelationInputs
+     */
+    @RequestMapping(value = "/relateAndInsertList", method = RequestMethod.POST)
+    CommonResult relateAndInsertList(@RequestBody List<CmsSubjectProductRelationInput> productRelationInputs, @RequestParam("productId") Long productId);
+
+    /**
+     * 批量更新关联优选
+     * @param productRelationInputs
+     * @param productId
+     */
+    @RequestMapping(value = "/relateAndUpdateList", method = RequestMethod.POST)
+    CommonResult relateAndUpdateList(@RequestBody List<CmsSubjectProductRelationInput> productRelationInputs,@RequestParam("productId") Long productId);
+
+
+    /**
+     * 通过id查询关联优选
+     * @param productId
+     * @return
+     */
+    @RequestMapping(value = "/relationByProductId", method = RequestMethod.GET)
+    CommonResult<List<CmsSubjectProductRelationInput>> relationByProductId(@RequestParam("productId") Long productId ) ;
+
+}

+ 22 - 0
mall-admin-cms/cms-common/src/main/java/com/mtcarpenter/mall/common/CmsPrefrenceAreaProductRelationInput.java

@@ -0,0 +1,22 @@
+package com.mtcarpenter.mall.common;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * @author mtcarpenter
+ * @github https://github.com/mtcarpenter/mall-cloud-alibaba
+ * @desc 微信公众号:山间木匠
+ */
+@Setter
+@Getter
+public class CmsPrefrenceAreaProductRelationInput implements Serializable {
+    private static final long serialVersionUID = -8635290899991174718L;
+    private Long id;
+
+    private Long prefrenceAreaId;
+
+    private Long productId;
+}

+ 26 - 0
mall-admin-cms/cms-common/src/main/java/com/mtcarpenter/mall/common/CmsSubjectProductRelationInput.java

@@ -0,0 +1,26 @@
+package com.mtcarpenter.mall.common;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+
+/**
+ * @author mtcarpenter
+ * @github https://github.com/mtcarpenter/mall-cloud-alibaba
+ * @desc 微信公众号:山间木匠
+ */
+@Getter
+@Setter
+public class CmsSubjectProductRelationInput implements Serializable {
+
+    private static final long serialVersionUID = -4079484815593829058L;
+    private Long id;
+
+    private Long subjectId;
+
+    private Long productId;
+
+
+}

+ 33 - 0
mall-admin-cms/cms-mbg/pom.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>mall-admin-cms</artifactId>
+        <groupId>com.mtcarpenter</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>cms-mbg</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.mtcarpenter</groupId>
+            <artifactId>mall-common</artifactId>
+            <version>${mall.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.generator</groupId>
+            <artifactId>mybatis-generator-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+    </dependencies>
+</project>

+ 73 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/CommentGenerator.java

@@ -0,0 +1,73 @@
+package com.mtcarpenter.mall;
+
+import org.mybatis.generator.api.IntrospectedColumn;
+import org.mybatis.generator.api.IntrospectedTable;
+import org.mybatis.generator.api.dom.java.CompilationUnit;
+import org.mybatis.generator.api.dom.java.Field;
+import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
+import org.mybatis.generator.internal.DefaultCommentGenerator;
+import org.mybatis.generator.internal.util.StringUtility;
+
+import java.util.Properties;
+
+/**
+ * 自定义注释生成器
+ * Created by macro on 2018/4/26.
+ */
+public class CommentGenerator extends DefaultCommentGenerator {
+    private boolean addRemarkComments = false;
+    private static final String EXAMPLE_SUFFIX="Example";
+    private static final String API_MODEL_PROPERTY_FULL_CLASS_NAME="io.swagger.annotations.ApiModelProperty";
+
+    /**
+     * 设置用户配置的参数
+     */
+    @Override
+    public void addConfigurationProperties(Properties properties) {
+        super.addConfigurationProperties(properties);
+        this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
+    }
+
+    /**
+     * 给字段添加注释
+     */
+    @Override
+    public void addFieldComment(Field field, IntrospectedTable introspectedTable,
+                                IntrospectedColumn introspectedColumn) {
+        String remarks = introspectedColumn.getRemarks();
+        //根据参数和备注信息判断是否添加备注信息
+        if(addRemarkComments&&StringUtility.stringHasValue(remarks)){
+//            addFieldJavaDoc(field, remarks);
+            //数据库中特殊字符需要转义
+            if(remarks.contains("\"")){
+                remarks = remarks.replace("\"","'");
+            }
+            //给model的字段添加swagger注解
+            field.addJavaDocLine("@ApiModelProperty(value = \""+remarks+"\")");
+        }
+    }
+
+    /**
+     * 给model的字段添加注释
+     */
+    private void addFieldJavaDoc(Field field, String remarks) {
+        //文档注释开始
+        field.addJavaDocLine("/**");
+        //获取数据库字段的备注信息
+        String[] remarkLines = remarks.split(System.getProperty("line.separator"));
+        for(String remarkLine:remarkLines){
+            field.addJavaDocLine(" * "+remarkLine);
+        }
+        addJavadocTag(field, false);
+        field.addJavaDocLine(" */");
+    }
+
+    @Override
+    public void addJavaFileComment(CompilationUnit compilationUnit) {
+        super.addJavaFileComment(compilationUnit);
+        //只在model中添加swagger注解类的导入
+        if(!compilationUnit.isJavaInterface()&&!compilationUnit.getType().getFullyQualifiedName().contains(EXAMPLE_SUFFIX)){
+            compilationUnit.addImportedType(new FullyQualifiedJavaType(API_MODEL_PROPERTY_FULL_CLASS_NAME));
+        }
+    }
+}

+ 38 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/Generator.java

@@ -0,0 +1,38 @@
+package com.mtcarpenter.mall;
+
+import org.mybatis.generator.api.MyBatisGenerator;
+import org.mybatis.generator.config.Configuration;
+import org.mybatis.generator.config.xml.ConfigurationParser;
+import org.mybatis.generator.internal.DefaultShellCallback;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 用于生产MBG的代码
+ * Created by macro on 2018/4/26.
+ */
+public class Generator {
+    public static void main(String[] args) throws Exception {
+        //MBG 执行过程中的警告信息
+        List<String> warnings = new ArrayList<String>();
+        //当生成的代码重复时,覆盖原代码
+        boolean overwrite = true;
+        //读取我们的 MBG 配置文件
+        InputStream is = Generator.class.getResourceAsStream("/generatorConfig.xml");
+        ConfigurationParser cp = new ConfigurationParser(warnings);
+        Configuration config = cp.parseConfiguration(is);
+        is.close();
+
+        DefaultShellCallback callback = new DefaultShellCallback(overwrite);
+        //创建 MBG
+        MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
+        //执行生成代码
+        myBatisGenerator.generate(null);
+        //输出警告信息
+        for (String warning : warnings) {
+            System.out.println(warning);
+        }
+    }
+}

+ 30 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsHelpCategoryMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.CmsHelpCategory;
+import com.mtcarpenter.mall.model.CmsHelpCategoryExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface CmsHelpCategoryMapper {
+    long countByExample(CmsHelpCategoryExample example);
+
+    int deleteByExample(CmsHelpCategoryExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CmsHelpCategory record);
+
+    int insertSelective(CmsHelpCategory record);
+
+    List<CmsHelpCategory> selectByExample(CmsHelpCategoryExample example);
+
+    CmsHelpCategory selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") CmsHelpCategory record, @Param("example") CmsHelpCategoryExample example);
+
+    int updateByExample(@Param("record") CmsHelpCategory record, @Param("example") CmsHelpCategoryExample example);
+
+    int updateByPrimaryKeySelective(CmsHelpCategory record);
+
+    int updateByPrimaryKey(CmsHelpCategory record);
+}

+ 36 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsHelpMapper.java

@@ -0,0 +1,36 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.CmsHelp;
+import com.mtcarpenter.mall.model.CmsHelpExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface CmsHelpMapper {
+    long countByExample(CmsHelpExample example);
+
+    int deleteByExample(CmsHelpExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CmsHelp record);
+
+    int insertSelective(CmsHelp record);
+
+    List<CmsHelp> selectByExampleWithBLOBs(CmsHelpExample example);
+
+    List<CmsHelp> selectByExample(CmsHelpExample example);
+
+    CmsHelp selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") CmsHelp record, @Param("example") CmsHelpExample example);
+
+    int updateByExampleWithBLOBs(@Param("record") CmsHelp record, @Param("example") CmsHelpExample example);
+
+    int updateByExample(@Param("record") CmsHelp record, @Param("example") CmsHelpExample example);
+
+    int updateByPrimaryKeySelective(CmsHelp record);
+
+    int updateByPrimaryKeyWithBLOBs(CmsHelp record);
+
+    int updateByPrimaryKey(CmsHelp record);
+}

+ 22 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsMemberReportMapper.java

@@ -0,0 +1,22 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.CmsMemberReport;
+import com.mtcarpenter.mall.model.CmsMemberReportExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface CmsMemberReportMapper {
+    long countByExample(CmsMemberReportExample example);
+
+    int deleteByExample(CmsMemberReportExample example);
+
+    int insert(CmsMemberReport record);
+
+    int insertSelective(CmsMemberReport record);
+
+    List<CmsMemberReport> selectByExample(CmsMemberReportExample example);
+
+    int updateByExampleSelective(@Param("record") CmsMemberReport record, @Param("example") CmsMemberReportExample example);
+
+    int updateByExample(@Param("record") CmsMemberReport record, @Param("example") CmsMemberReportExample example);
+}

+ 36 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsPrefrenceAreaMapper.java

@@ -0,0 +1,36 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.CmsPrefrenceArea;
+import com.mtcarpenter.mall.model.CmsPrefrenceAreaExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface CmsPrefrenceAreaMapper {
+    long countByExample(CmsPrefrenceAreaExample example);
+
+    int deleteByExample(CmsPrefrenceAreaExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CmsPrefrenceArea record);
+
+    int insertSelective(CmsPrefrenceArea record);
+
+    List<CmsPrefrenceArea> selectByExampleWithBLOBs(CmsPrefrenceAreaExample example);
+
+    List<CmsPrefrenceArea> selectByExample(CmsPrefrenceAreaExample example);
+
+    CmsPrefrenceArea selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") CmsPrefrenceArea record, @Param("example") CmsPrefrenceAreaExample example);
+
+    int updateByExampleWithBLOBs(@Param("record") CmsPrefrenceArea record, @Param("example") CmsPrefrenceAreaExample example);
+
+    int updateByExample(@Param("record") CmsPrefrenceArea record, @Param("example") CmsPrefrenceAreaExample example);
+
+    int updateByPrimaryKeySelective(CmsPrefrenceArea record);
+
+    int updateByPrimaryKeyWithBLOBs(CmsPrefrenceArea record);
+
+    int updateByPrimaryKey(CmsPrefrenceArea record);
+}

+ 30 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsPrefrenceAreaProductRelationMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.CmsPrefrenceAreaProductRelation;
+import com.mtcarpenter.mall.model.CmsPrefrenceAreaProductRelationExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface CmsPrefrenceAreaProductRelationMapper {
+    long countByExample(CmsPrefrenceAreaProductRelationExample example);
+
+    int deleteByExample(CmsPrefrenceAreaProductRelationExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CmsPrefrenceAreaProductRelation record);
+
+    int insertSelective(CmsPrefrenceAreaProductRelation record);
+
+    List<CmsPrefrenceAreaProductRelation> selectByExample(CmsPrefrenceAreaProductRelationExample example);
+
+    CmsPrefrenceAreaProductRelation selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") CmsPrefrenceAreaProductRelation record, @Param("example") CmsPrefrenceAreaProductRelationExample example);
+
+    int updateByExample(@Param("record") CmsPrefrenceAreaProductRelation record, @Param("example") CmsPrefrenceAreaProductRelationExample example);
+
+    int updateByPrimaryKeySelective(CmsPrefrenceAreaProductRelation record);
+
+    int updateByPrimaryKey(CmsPrefrenceAreaProductRelation record);
+}

+ 30 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsSubjectCategoryMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.CmsSubjectCategory;
+import com.mtcarpenter.mall.model.CmsSubjectCategoryExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface CmsSubjectCategoryMapper {
+    long countByExample(CmsSubjectCategoryExample example);
+
+    int deleteByExample(CmsSubjectCategoryExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CmsSubjectCategory record);
+
+    int insertSelective(CmsSubjectCategory record);
+
+    List<CmsSubjectCategory> selectByExample(CmsSubjectCategoryExample example);
+
+    CmsSubjectCategory selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") CmsSubjectCategory record, @Param("example") CmsSubjectCategoryExample example);
+
+    int updateByExample(@Param("record") CmsSubjectCategory record, @Param("example") CmsSubjectCategoryExample example);
+
+    int updateByPrimaryKeySelective(CmsSubjectCategory record);
+
+    int updateByPrimaryKey(CmsSubjectCategory record);
+}

+ 30 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsSubjectCommentMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.CmsSubjectComment;
+import com.mtcarpenter.mall.model.CmsSubjectCommentExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface CmsSubjectCommentMapper {
+    long countByExample(CmsSubjectCommentExample example);
+
+    int deleteByExample(CmsSubjectCommentExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CmsSubjectComment record);
+
+    int insertSelective(CmsSubjectComment record);
+
+    List<CmsSubjectComment> selectByExample(CmsSubjectCommentExample example);
+
+    CmsSubjectComment selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") CmsSubjectComment record, @Param("example") CmsSubjectCommentExample example);
+
+    int updateByExample(@Param("record") CmsSubjectComment record, @Param("example") CmsSubjectCommentExample example);
+
+    int updateByPrimaryKeySelective(CmsSubjectComment record);
+
+    int updateByPrimaryKey(CmsSubjectComment record);
+}

+ 36 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsSubjectMapper.java

@@ -0,0 +1,36 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.CmsSubject;
+import com.mtcarpenter.mall.model.CmsSubjectExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface CmsSubjectMapper {
+    long countByExample(CmsSubjectExample example);
+
+    int deleteByExample(CmsSubjectExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CmsSubject record);
+
+    int insertSelective(CmsSubject record);
+
+    List<CmsSubject> selectByExampleWithBLOBs(CmsSubjectExample example);
+
+    List<CmsSubject> selectByExample(CmsSubjectExample example);
+
+    CmsSubject selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") CmsSubject record, @Param("example") CmsSubjectExample example);
+
+    int updateByExampleWithBLOBs(@Param("record") CmsSubject record, @Param("example") CmsSubjectExample example);
+
+    int updateByExample(@Param("record") CmsSubject record, @Param("example") CmsSubjectExample example);
+
+    int updateByPrimaryKeySelective(CmsSubject record);
+
+    int updateByPrimaryKeyWithBLOBs(CmsSubject record);
+
+    int updateByPrimaryKey(CmsSubject record);
+}

+ 30 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsSubjectProductRelationMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.CmsSubjectProductRelation;
+import com.mtcarpenter.mall.model.CmsSubjectProductRelationExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface CmsSubjectProductRelationMapper {
+    long countByExample(CmsSubjectProductRelationExample example);
+
+    int deleteByExample(CmsSubjectProductRelationExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CmsSubjectProductRelation record);
+
+    int insertSelective(CmsSubjectProductRelation record);
+
+    List<CmsSubjectProductRelation> selectByExample(CmsSubjectProductRelationExample example);
+
+    CmsSubjectProductRelation selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") CmsSubjectProductRelation record, @Param("example") CmsSubjectProductRelationExample example);
+
+    int updateByExample(@Param("record") CmsSubjectProductRelation record, @Param("example") CmsSubjectProductRelationExample example);
+
+    int updateByPrimaryKeySelective(CmsSubjectProductRelation record);
+
+    int updateByPrimaryKey(CmsSubjectProductRelation record);
+}

+ 30 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsTopicCategoryMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.CmsTopicCategory;
+import com.mtcarpenter.mall.model.CmsTopicCategoryExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface CmsTopicCategoryMapper {
+    long countByExample(CmsTopicCategoryExample example);
+
+    int deleteByExample(CmsTopicCategoryExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CmsTopicCategory record);
+
+    int insertSelective(CmsTopicCategory record);
+
+    List<CmsTopicCategory> selectByExample(CmsTopicCategoryExample example);
+
+    CmsTopicCategory selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") CmsTopicCategory record, @Param("example") CmsTopicCategoryExample example);
+
+    int updateByExample(@Param("record") CmsTopicCategory record, @Param("example") CmsTopicCategoryExample example);
+
+    int updateByPrimaryKeySelective(CmsTopicCategory record);
+
+    int updateByPrimaryKey(CmsTopicCategory record);
+}

+ 30 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsTopicCommentMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.CmsTopicComment;
+import com.mtcarpenter.mall.model.CmsTopicCommentExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface CmsTopicCommentMapper {
+    long countByExample(CmsTopicCommentExample example);
+
+    int deleteByExample(CmsTopicCommentExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CmsTopicComment record);
+
+    int insertSelective(CmsTopicComment record);
+
+    List<CmsTopicComment> selectByExample(CmsTopicCommentExample example);
+
+    CmsTopicComment selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") CmsTopicComment record, @Param("example") CmsTopicCommentExample example);
+
+    int updateByExample(@Param("record") CmsTopicComment record, @Param("example") CmsTopicCommentExample example);
+
+    int updateByPrimaryKeySelective(CmsTopicComment record);
+
+    int updateByPrimaryKey(CmsTopicComment record);
+}

+ 36 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/mapper/CmsTopicMapper.java

@@ -0,0 +1,36 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.CmsTopic;
+import com.mtcarpenter.mall.model.CmsTopicExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface CmsTopicMapper {
+    long countByExample(CmsTopicExample example);
+
+    int deleteByExample(CmsTopicExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CmsTopic record);
+
+    int insertSelective(CmsTopic record);
+
+    List<CmsTopic> selectByExampleWithBLOBs(CmsTopicExample example);
+
+    List<CmsTopic> selectByExample(CmsTopicExample example);
+
+    CmsTopic selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") CmsTopic record, @Param("example") CmsTopicExample example);
+
+    int updateByExampleWithBLOBs(@Param("record") CmsTopic record, @Param("example") CmsTopicExample example);
+
+    int updateByExample(@Param("record") CmsTopic record, @Param("example") CmsTopicExample example);
+
+    int updateByPrimaryKeySelective(CmsTopic record);
+
+    int updateByPrimaryKeyWithBLOBs(CmsTopic record);
+
+    int updateByPrimaryKey(CmsTopic record);
+}

+ 99 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsHelp.java

@@ -0,0 +1,99 @@
+package com.mtcarpenter.mall.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class CmsHelp implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    private Long categoryId;
+    private String icon;
+    private String title;
+    private Integer showStatus;
+    private Date createTime;
+    private Integer readCount;
+    private String content;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getCategoryId() {
+        return categoryId;
+    }
+
+    public void setCategoryId(Long categoryId) {
+        this.categoryId = categoryId;
+    }
+
+    public String getIcon() {
+        return icon;
+    }
+
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public Integer getShowStatus() {
+        return showStatus;
+    }
+
+    public void setShowStatus(Integer showStatus) {
+        this.showStatus = showStatus;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getReadCount() {
+        return readCount;
+    }
+
+    public void setReadCount(Integer readCount) {
+        this.readCount = readCount;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", categoryId=").append(categoryId);
+        sb.append(", icon=").append(icon);
+        sb.append(", title=").append(title);
+        sb.append(", showStatus=").append(showStatus);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", readCount=").append(readCount);
+        sb.append(", content=").append(content);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 82 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsHelpCategory.java

@@ -0,0 +1,82 @@
+package com.mtcarpenter.mall.model;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+public class CmsHelpCategory implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    private String name;
+    @ApiModelProperty(value = "分类图标")
+    private String icon;
+    @ApiModelProperty(value = "专题数量")
+    private Integer helpCount;
+    private Integer showStatus;
+    private Integer sort;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getIcon() {
+        return icon;
+    }
+
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    public Integer getHelpCount() {
+        return helpCount;
+    }
+
+    public void setHelpCount(Integer helpCount) {
+        this.helpCount = helpCount;
+    }
+
+    public Integer getShowStatus() {
+        return showStatus;
+    }
+
+    public void setShowStatus(Integer showStatus) {
+        this.showStatus = showStatus;
+    }
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", name=").append(name);
+        sb.append(", icon=").append(icon);
+        sb.append(", helpCount=").append(helpCount);
+        sb.append(", showStatus=").append(showStatus);
+        sb.append(", sort=").append(sort);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 580 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsHelpCategoryExample.java

@@ -0,0 +1,580 @@
+package com.mtcarpenter.mall.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CmsHelpCategoryExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public CmsHelpCategoryExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNull() {
+            addCriterion("name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNotNull() {
+            addCriterion("name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualTo(String value) {
+            addCriterion("name =", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualTo(String value) {
+            addCriterion("name <>", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThan(String value) {
+            addCriterion("name >", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualTo(String value) {
+            addCriterion("name >=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThan(String value) {
+            addCriterion("name <", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualTo(String value) {
+            addCriterion("name <=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLike(String value) {
+            addCriterion("name like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotLike(String value) {
+            addCriterion("name not like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIn(List<String> values) {
+            addCriterion("name in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotIn(List<String> values) {
+            addCriterion("name not in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameBetween(String value1, String value2) {
+            addCriterion("name between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotBetween(String value1, String value2) {
+            addCriterion("name not between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconIsNull() {
+            addCriterion("icon is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconIsNotNull() {
+            addCriterion("icon is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconEqualTo(String value) {
+            addCriterion("icon =", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotEqualTo(String value) {
+            addCriterion("icon <>", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconGreaterThan(String value) {
+            addCriterion("icon >", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconGreaterThanOrEqualTo(String value) {
+            addCriterion("icon >=", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconLessThan(String value) {
+            addCriterion("icon <", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconLessThanOrEqualTo(String value) {
+            addCriterion("icon <=", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconLike(String value) {
+            addCriterion("icon like", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotLike(String value) {
+            addCriterion("icon not like", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconIn(List<String> values) {
+            addCriterion("icon in", values, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotIn(List<String> values) {
+            addCriterion("icon not in", values, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconBetween(String value1, String value2) {
+            addCriterion("icon between", value1, value2, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotBetween(String value1, String value2) {
+            addCriterion("icon not between", value1, value2, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andHelpCountIsNull() {
+            addCriterion("help_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHelpCountIsNotNull() {
+            addCriterion("help_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHelpCountEqualTo(Integer value) {
+            addCriterion("help_count =", value, "helpCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andHelpCountNotEqualTo(Integer value) {
+            addCriterion("help_count <>", value, "helpCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andHelpCountGreaterThan(Integer value) {
+            addCriterion("help_count >", value, "helpCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andHelpCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("help_count >=", value, "helpCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andHelpCountLessThan(Integer value) {
+            addCriterion("help_count <", value, "helpCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andHelpCountLessThanOrEqualTo(Integer value) {
+            addCriterion("help_count <=", value, "helpCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andHelpCountIn(List<Integer> values) {
+            addCriterion("help_count in", values, "helpCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andHelpCountNotIn(List<Integer> values) {
+            addCriterion("help_count not in", values, "helpCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andHelpCountBetween(Integer value1, Integer value2) {
+            addCriterion("help_count between", value1, value2, "helpCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andHelpCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("help_count not between", value1, value2, "helpCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNull() {
+            addCriterion("show_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNotNull() {
+            addCriterion("show_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusEqualTo(Integer value) {
+            addCriterion("show_status =", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotEqualTo(Integer value) {
+            addCriterion("show_status <>", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThan(Integer value) {
+            addCriterion("show_status >", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("show_status >=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThan(Integer value) {
+            addCriterion("show_status <", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("show_status <=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIn(List<Integer> values) {
+            addCriterion("show_status in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotIn(List<Integer> values) {
+            addCriterion("show_status not in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusBetween(Integer value1, Integer value2) {
+            addCriterion("show_status between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("show_status not between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNull() {
+            addCriterion("sort is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNotNull() {
+            addCriterion("sort is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortEqualTo(Integer value) {
+            addCriterion("sort =", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotEqualTo(Integer value) {
+            addCriterion("sort <>", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThan(Integer value) {
+            addCriterion("sort >", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThanOrEqualTo(Integer value) {
+            addCriterion("sort >=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThan(Integer value) {
+            addCriterion("sort <", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThanOrEqualTo(Integer value) {
+            addCriterion("sort <=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIn(List<Integer> values) {
+            addCriterion("sort in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotIn(List<Integer> values) {
+            addCriterion("sort not in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortBetween(Integer value1, Integer value2) {
+            addCriterion("sort between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotBetween(Integer value1, Integer value2) {
+            addCriterion("sort not between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 641 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsHelpExample.java

@@ -0,0 +1,641 @@
+package com.mtcarpenter.mall.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class CmsHelpExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public CmsHelpExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdIsNull() {
+            addCriterion("category_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdIsNotNull() {
+            addCriterion("category_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdEqualTo(Long value) {
+            addCriterion("category_id =", value, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdNotEqualTo(Long value) {
+            addCriterion("category_id <>", value, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdGreaterThan(Long value) {
+            addCriterion("category_id >", value, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("category_id >=", value, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdLessThan(Long value) {
+            addCriterion("category_id <", value, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdLessThanOrEqualTo(Long value) {
+            addCriterion("category_id <=", value, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdIn(List<Long> values) {
+            addCriterion("category_id in", values, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdNotIn(List<Long> values) {
+            addCriterion("category_id not in", values, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdBetween(Long value1, Long value2) {
+            addCriterion("category_id between", value1, value2, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdNotBetween(Long value1, Long value2) {
+            addCriterion("category_id not between", value1, value2, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconIsNull() {
+            addCriterion("icon is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconIsNotNull() {
+            addCriterion("icon is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconEqualTo(String value) {
+            addCriterion("icon =", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotEqualTo(String value) {
+            addCriterion("icon <>", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconGreaterThan(String value) {
+            addCriterion("icon >", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconGreaterThanOrEqualTo(String value) {
+            addCriterion("icon >=", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconLessThan(String value) {
+            addCriterion("icon <", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconLessThanOrEqualTo(String value) {
+            addCriterion("icon <=", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconLike(String value) {
+            addCriterion("icon like", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotLike(String value) {
+            addCriterion("icon not like", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconIn(List<String> values) {
+            addCriterion("icon in", values, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotIn(List<String> values) {
+            addCriterion("icon not in", values, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconBetween(String value1, String value2) {
+            addCriterion("icon between", value1, value2, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotBetween(String value1, String value2) {
+            addCriterion("icon not between", value1, value2, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNull() {
+            addCriterion("title is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNotNull() {
+            addCriterion("title is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleEqualTo(String value) {
+            addCriterion("title =", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotEqualTo(String value) {
+            addCriterion("title <>", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThan(String value) {
+            addCriterion("title >", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThanOrEqualTo(String value) {
+            addCriterion("title >=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThan(String value) {
+            addCriterion("title <", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThanOrEqualTo(String value) {
+            addCriterion("title <=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLike(String value) {
+            addCriterion("title like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotLike(String value) {
+            addCriterion("title not like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIn(List<String> values) {
+            addCriterion("title in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotIn(List<String> values) {
+            addCriterion("title not in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleBetween(String value1, String value2) {
+            addCriterion("title between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotBetween(String value1, String value2) {
+            addCriterion("title not between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNull() {
+            addCriterion("show_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNotNull() {
+            addCriterion("show_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusEqualTo(Integer value) {
+            addCriterion("show_status =", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotEqualTo(Integer value) {
+            addCriterion("show_status <>", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThan(Integer value) {
+            addCriterion("show_status >", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("show_status >=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThan(Integer value) {
+            addCriterion("show_status <", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("show_status <=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIn(List<Integer> values) {
+            addCriterion("show_status in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotIn(List<Integer> values) {
+            addCriterion("show_status not in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusBetween(Integer value1, Integer value2) {
+            addCriterion("show_status between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("show_status not between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountIsNull() {
+            addCriterion("read_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountIsNotNull() {
+            addCriterion("read_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountEqualTo(Integer value) {
+            addCriterion("read_count =", value, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountNotEqualTo(Integer value) {
+            addCriterion("read_count <>", value, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountGreaterThan(Integer value) {
+            addCriterion("read_count >", value, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("read_count >=", value, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountLessThan(Integer value) {
+            addCriterion("read_count <", value, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountLessThanOrEqualTo(Integer value) {
+            addCriterion("read_count <=", value, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountIn(List<Integer> values) {
+            addCriterion("read_count in", values, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountNotIn(List<Integer> values) {
+            addCriterion("read_count not in", values, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountBetween(Integer value1, Integer value2) {
+            addCriterion("read_count between", value1, value2, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("read_count not between", value1, value2, "readCount");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 105 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsMemberReport.java

@@ -0,0 +1,105 @@
+package com.mtcarpenter.mall.model;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class CmsMemberReport implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    @ApiModelProperty(value = "举报类型:0->商品评价;1->话题内容;2->用户评论")
+    private Integer reportType;
+    @ApiModelProperty(value = "举报人")
+    private String reportMemberName;
+    private Date createTime;
+    private String reportObject;
+    @ApiModelProperty(value = "举报状态:0->未处理;1->已处理")
+    private Integer reportStatus;
+    @ApiModelProperty(value = "处理结果:0->无效;1->有效;2->恶意")
+    private Integer handleStatus;
+    private String note;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Integer getReportType() {
+        return reportType;
+    }
+
+    public void setReportType(Integer reportType) {
+        this.reportType = reportType;
+    }
+
+    public String getReportMemberName() {
+        return reportMemberName;
+    }
+
+    public void setReportMemberName(String reportMemberName) {
+        this.reportMemberName = reportMemberName;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getReportObject() {
+        return reportObject;
+    }
+
+    public void setReportObject(String reportObject) {
+        this.reportObject = reportObject;
+    }
+
+    public Integer getReportStatus() {
+        return reportStatus;
+    }
+
+    public void setReportStatus(Integer reportStatus) {
+        this.reportStatus = reportStatus;
+    }
+
+    public Integer getHandleStatus() {
+        return handleStatus;
+    }
+
+    public void setHandleStatus(Integer handleStatus) {
+        this.handleStatus = handleStatus;
+    }
+
+    public String getNote() {
+        return note;
+    }
+
+    public void setNote(String note) {
+        this.note = note;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", reportType=").append(reportType);
+        sb.append(", reportMemberName=").append(reportMemberName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", reportObject=").append(reportObject);
+        sb.append(", reportStatus=").append(reportStatus);
+        sb.append(", handleStatus=").append(handleStatus);
+        sb.append(", note=").append(note);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 711 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsMemberReportExample.java

@@ -0,0 +1,711 @@
+package com.mtcarpenter.mall.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class CmsMemberReportExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public CmsMemberReportExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportTypeIsNull() {
+            addCriterion("report_type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportTypeIsNotNull() {
+            addCriterion("report_type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportTypeEqualTo(Integer value) {
+            addCriterion("report_type =", value, "reportType");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportTypeNotEqualTo(Integer value) {
+            addCriterion("report_type <>", value, "reportType");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportTypeGreaterThan(Integer value) {
+            addCriterion("report_type >", value, "reportType");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("report_type >=", value, "reportType");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportTypeLessThan(Integer value) {
+            addCriterion("report_type <", value, "reportType");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("report_type <=", value, "reportType");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportTypeIn(List<Integer> values) {
+            addCriterion("report_type in", values, "reportType");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportTypeNotIn(List<Integer> values) {
+            addCriterion("report_type not in", values, "reportType");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportTypeBetween(Integer value1, Integer value2) {
+            addCriterion("report_type between", value1, value2, "reportType");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("report_type not between", value1, value2, "reportType");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameIsNull() {
+            addCriterion("report_member_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameIsNotNull() {
+            addCriterion("report_member_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameEqualTo(String value) {
+            addCriterion("report_member_name =", value, "reportMemberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameNotEqualTo(String value) {
+            addCriterion("report_member_name <>", value, "reportMemberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameGreaterThan(String value) {
+            addCriterion("report_member_name >", value, "reportMemberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameGreaterThanOrEqualTo(String value) {
+            addCriterion("report_member_name >=", value, "reportMemberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameLessThan(String value) {
+            addCriterion("report_member_name <", value, "reportMemberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameLessThanOrEqualTo(String value) {
+            addCriterion("report_member_name <=", value, "reportMemberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameLike(String value) {
+            addCriterion("report_member_name like", value, "reportMemberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameNotLike(String value) {
+            addCriterion("report_member_name not like", value, "reportMemberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameIn(List<String> values) {
+            addCriterion("report_member_name in", values, "reportMemberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameNotIn(List<String> values) {
+            addCriterion("report_member_name not in", values, "reportMemberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameBetween(String value1, String value2) {
+            addCriterion("report_member_name between", value1, value2, "reportMemberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportMemberNameNotBetween(String value1, String value2) {
+            addCriterion("report_member_name not between", value1, value2, "reportMemberName");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectIsNull() {
+            addCriterion("report_object is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectIsNotNull() {
+            addCriterion("report_object is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectEqualTo(String value) {
+            addCriterion("report_object =", value, "reportObject");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectNotEqualTo(String value) {
+            addCriterion("report_object <>", value, "reportObject");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectGreaterThan(String value) {
+            addCriterion("report_object >", value, "reportObject");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectGreaterThanOrEqualTo(String value) {
+            addCriterion("report_object >=", value, "reportObject");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectLessThan(String value) {
+            addCriterion("report_object <", value, "reportObject");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectLessThanOrEqualTo(String value) {
+            addCriterion("report_object <=", value, "reportObject");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectLike(String value) {
+            addCriterion("report_object like", value, "reportObject");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectNotLike(String value) {
+            addCriterion("report_object not like", value, "reportObject");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectIn(List<String> values) {
+            addCriterion("report_object in", values, "reportObject");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectNotIn(List<String> values) {
+            addCriterion("report_object not in", values, "reportObject");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectBetween(String value1, String value2) {
+            addCriterion("report_object between", value1, value2, "reportObject");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportObjectNotBetween(String value1, String value2) {
+            addCriterion("report_object not between", value1, value2, "reportObject");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportStatusIsNull() {
+            addCriterion("report_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportStatusIsNotNull() {
+            addCriterion("report_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportStatusEqualTo(Integer value) {
+            addCriterion("report_status =", value, "reportStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportStatusNotEqualTo(Integer value) {
+            addCriterion("report_status <>", value, "reportStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportStatusGreaterThan(Integer value) {
+            addCriterion("report_status >", value, "reportStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("report_status >=", value, "reportStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportStatusLessThan(Integer value) {
+            addCriterion("report_status <", value, "reportStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("report_status <=", value, "reportStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportStatusIn(List<Integer> values) {
+            addCriterion("report_status in", values, "reportStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportStatusNotIn(List<Integer> values) {
+            addCriterion("report_status not in", values, "reportStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportStatusBetween(Integer value1, Integer value2) {
+            addCriterion("report_status between", value1, value2, "reportStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andReportStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("report_status not between", value1, value2, "reportStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andHandleStatusIsNull() {
+            addCriterion("handle_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHandleStatusIsNotNull() {
+            addCriterion("handle_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andHandleStatusEqualTo(Integer value) {
+            addCriterion("handle_status =", value, "handleStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andHandleStatusNotEqualTo(Integer value) {
+            addCriterion("handle_status <>", value, "handleStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andHandleStatusGreaterThan(Integer value) {
+            addCriterion("handle_status >", value, "handleStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andHandleStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("handle_status >=", value, "handleStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andHandleStatusLessThan(Integer value) {
+            addCriterion("handle_status <", value, "handleStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andHandleStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("handle_status <=", value, "handleStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andHandleStatusIn(List<Integer> values) {
+            addCriterion("handle_status in", values, "handleStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andHandleStatusNotIn(List<Integer> values) {
+            addCriterion("handle_status not in", values, "handleStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andHandleStatusBetween(Integer value1, Integer value2) {
+            addCriterion("handle_status between", value1, value2, "handleStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andHandleStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("handle_status not between", value1, value2, "handleStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteIsNull() {
+            addCriterion("note is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteIsNotNull() {
+            addCriterion("note is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteEqualTo(String value) {
+            addCriterion("note =", value, "note");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteNotEqualTo(String value) {
+            addCriterion("note <>", value, "note");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteGreaterThan(String value) {
+            addCriterion("note >", value, "note");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteGreaterThanOrEqualTo(String value) {
+            addCriterion("note >=", value, "note");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteLessThan(String value) {
+            addCriterion("note <", value, "note");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteLessThanOrEqualTo(String value) {
+            addCriterion("note <=", value, "note");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteLike(String value) {
+            addCriterion("note like", value, "note");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteNotLike(String value) {
+            addCriterion("note not like", value, "note");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteIn(List<String> values) {
+            addCriterion("note in", values, "note");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteNotIn(List<String> values) {
+            addCriterion("note not in", values, "note");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteBetween(String value1, String value2) {
+            addCriterion("note between", value1, value2, "note");
+            return (Criteria) this;
+        }
+
+        public Criteria andNoteNotBetween(String value1, String value2) {
+            addCriterion("note not between", value1, value2, "note");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 81 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsPrefrenceArea.java

@@ -0,0 +1,81 @@
+package com.mtcarpenter.mall.model;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+public class CmsPrefrenceArea implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    private String name;
+    private String subTitle;
+    private Integer sort;
+    private Integer showStatus;
+    @ApiModelProperty(value = "展示图片")
+    private byte[] pic;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getSubTitle() {
+        return subTitle;
+    }
+
+    public void setSubTitle(String subTitle) {
+        this.subTitle = subTitle;
+    }
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    public Integer getShowStatus() {
+        return showStatus;
+    }
+
+    public void setShowStatus(Integer showStatus) {
+        this.showStatus = showStatus;
+    }
+
+    public byte[] getPic() {
+        return pic;
+    }
+
+    public void setPic(byte[] pic) {
+        this.pic = pic;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", name=").append(name);
+        sb.append(", subTitle=").append(subTitle);
+        sb.append(", sort=").append(sort);
+        sb.append(", showStatus=").append(showStatus);
+        sb.append(", pic=").append(pic);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 520 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsPrefrenceAreaExample.java

@@ -0,0 +1,520 @@
+package com.mtcarpenter.mall.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CmsPrefrenceAreaExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public CmsPrefrenceAreaExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNull() {
+            addCriterion("name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNotNull() {
+            addCriterion("name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualTo(String value) {
+            addCriterion("name =", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualTo(String value) {
+            addCriterion("name <>", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThan(String value) {
+            addCriterion("name >", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualTo(String value) {
+            addCriterion("name >=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThan(String value) {
+            addCriterion("name <", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualTo(String value) {
+            addCriterion("name <=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLike(String value) {
+            addCriterion("name like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotLike(String value) {
+            addCriterion("name not like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIn(List<String> values) {
+            addCriterion("name in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotIn(List<String> values) {
+            addCriterion("name not in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameBetween(String value1, String value2) {
+            addCriterion("name between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotBetween(String value1, String value2) {
+            addCriterion("name not between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleIsNull() {
+            addCriterion("sub_title is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleIsNotNull() {
+            addCriterion("sub_title is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleEqualTo(String value) {
+            addCriterion("sub_title =", value, "subTitle");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleNotEqualTo(String value) {
+            addCriterion("sub_title <>", value, "subTitle");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleGreaterThan(String value) {
+            addCriterion("sub_title >", value, "subTitle");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleGreaterThanOrEqualTo(String value) {
+            addCriterion("sub_title >=", value, "subTitle");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleLessThan(String value) {
+            addCriterion("sub_title <", value, "subTitle");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleLessThanOrEqualTo(String value) {
+            addCriterion("sub_title <=", value, "subTitle");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleLike(String value) {
+            addCriterion("sub_title like", value, "subTitle");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleNotLike(String value) {
+            addCriterion("sub_title not like", value, "subTitle");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleIn(List<String> values) {
+            addCriterion("sub_title in", values, "subTitle");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleNotIn(List<String> values) {
+            addCriterion("sub_title not in", values, "subTitle");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleBetween(String value1, String value2) {
+            addCriterion("sub_title between", value1, value2, "subTitle");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubTitleNotBetween(String value1, String value2) {
+            addCriterion("sub_title not between", value1, value2, "subTitle");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNull() {
+            addCriterion("sort is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNotNull() {
+            addCriterion("sort is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortEqualTo(Integer value) {
+            addCriterion("sort =", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotEqualTo(Integer value) {
+            addCriterion("sort <>", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThan(Integer value) {
+            addCriterion("sort >", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThanOrEqualTo(Integer value) {
+            addCriterion("sort >=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThan(Integer value) {
+            addCriterion("sort <", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThanOrEqualTo(Integer value) {
+            addCriterion("sort <=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIn(List<Integer> values) {
+            addCriterion("sort in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotIn(List<Integer> values) {
+            addCriterion("sort not in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortBetween(Integer value1, Integer value2) {
+            addCriterion("sort between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotBetween(Integer value1, Integer value2) {
+            addCriterion("sort not between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNull() {
+            addCriterion("show_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNotNull() {
+            addCriterion("show_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusEqualTo(Integer value) {
+            addCriterion("show_status =", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotEqualTo(Integer value) {
+            addCriterion("show_status <>", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThan(Integer value) {
+            addCriterion("show_status >", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("show_status >=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThan(Integer value) {
+            addCriterion("show_status <", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("show_status <=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIn(List<Integer> values) {
+            addCriterion("show_status in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotIn(List<Integer> values) {
+            addCriterion("show_status not in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusBetween(Integer value1, Integer value2) {
+            addCriterion("show_status between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("show_status not between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 48 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsPrefrenceAreaProductRelation.java

@@ -0,0 +1,48 @@
+package com.mtcarpenter.mall.model;
+
+import java.io.Serializable;
+
+public class CmsPrefrenceAreaProductRelation implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    private Long prefrenceAreaId;
+    private Long productId;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getPrefrenceAreaId() {
+        return prefrenceAreaId;
+    }
+
+    public void setPrefrenceAreaId(Long prefrenceAreaId) {
+        this.prefrenceAreaId = prefrenceAreaId;
+    }
+
+    public Long getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Long productId) {
+        this.productId = productId;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", prefrenceAreaId=").append(prefrenceAreaId);
+        sb.append(", productId=").append(productId);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 380 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsPrefrenceAreaProductRelationExample.java

@@ -0,0 +1,380 @@
+package com.mtcarpenter.mall.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CmsPrefrenceAreaProductRelationExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public CmsPrefrenceAreaProductRelationExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrefrenceAreaIdIsNull() {
+            addCriterion("prefrence_area_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrefrenceAreaIdIsNotNull() {
+            addCriterion("prefrence_area_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrefrenceAreaIdEqualTo(Long value) {
+            addCriterion("prefrence_area_id =", value, "prefrenceAreaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrefrenceAreaIdNotEqualTo(Long value) {
+            addCriterion("prefrence_area_id <>", value, "prefrenceAreaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrefrenceAreaIdGreaterThan(Long value) {
+            addCriterion("prefrence_area_id >", value, "prefrenceAreaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrefrenceAreaIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("prefrence_area_id >=", value, "prefrenceAreaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrefrenceAreaIdLessThan(Long value) {
+            addCriterion("prefrence_area_id <", value, "prefrenceAreaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrefrenceAreaIdLessThanOrEqualTo(Long value) {
+            addCriterion("prefrence_area_id <=", value, "prefrenceAreaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrefrenceAreaIdIn(List<Long> values) {
+            addCriterion("prefrence_area_id in", values, "prefrenceAreaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrefrenceAreaIdNotIn(List<Long> values) {
+            addCriterion("prefrence_area_id not in", values, "prefrenceAreaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrefrenceAreaIdBetween(Long value1, Long value2) {
+            addCriterion("prefrence_area_id between", value1, value2, "prefrenceAreaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrefrenceAreaIdNotBetween(Long value1, Long value2) {
+            addCriterion("prefrence_area_id not between", value1, value2, "prefrenceAreaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdIsNull() {
+            addCriterion("product_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdIsNotNull() {
+            addCriterion("product_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdEqualTo(Long value) {
+            addCriterion("product_id =", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdNotEqualTo(Long value) {
+            addCriterion("product_id <>", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdGreaterThan(Long value) {
+            addCriterion("product_id >", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("product_id >=", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdLessThan(Long value) {
+            addCriterion("product_id <", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdLessThanOrEqualTo(Long value) {
+            addCriterion("product_id <=", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdIn(List<Long> values) {
+            addCriterion("product_id in", values, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdNotIn(List<Long> values) {
+            addCriterion("product_id not in", values, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdBetween(Long value1, Long value2) {
+            addCriterion("product_id between", value1, value2, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdNotBetween(Long value1, Long value2) {
+            addCriterion("product_id not between", value1, value2, "productId");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 187 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubject.java

@@ -0,0 +1,187 @@
+package com.mtcarpenter.mall.model;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class CmsSubject implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    private Long categoryId;
+    private String title;
+    @ApiModelProperty(value = "专题主图")
+    private String pic;
+    @ApiModelProperty(value = "关联产品数量")
+    private Integer productCount;
+    private Integer recommendStatus;
+    private Date createTime;
+    private Integer collectCount;
+    private Integer readCount;
+    private Integer commentCount;
+    @ApiModelProperty(value = "画册图片用逗号分割")
+    private String albumPics;
+    private String description;
+    @ApiModelProperty(value = "显示状态:0->不显示;1->显示")
+    private Integer showStatus;
+    @ApiModelProperty(value = "转发数")
+    private Integer forwardCount;
+    @ApiModelProperty(value = "专题分类名称")
+    private String categoryName;
+    private String content;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getCategoryId() {
+        return categoryId;
+    }
+
+    public void setCategoryId(Long categoryId) {
+        this.categoryId = categoryId;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getPic() {
+        return pic;
+    }
+
+    public void setPic(String pic) {
+        this.pic = pic;
+    }
+
+    public Integer getProductCount() {
+        return productCount;
+    }
+
+    public void setProductCount(Integer productCount) {
+        this.productCount = productCount;
+    }
+
+    public Integer getRecommendStatus() {
+        return recommendStatus;
+    }
+
+    public void setRecommendStatus(Integer recommendStatus) {
+        this.recommendStatus = recommendStatus;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getCollectCount() {
+        return collectCount;
+    }
+
+    public void setCollectCount(Integer collectCount) {
+        this.collectCount = collectCount;
+    }
+
+    public Integer getReadCount() {
+        return readCount;
+    }
+
+    public void setReadCount(Integer readCount) {
+        this.readCount = readCount;
+    }
+
+    public Integer getCommentCount() {
+        return commentCount;
+    }
+
+    public void setCommentCount(Integer commentCount) {
+        this.commentCount = commentCount;
+    }
+
+    public String getAlbumPics() {
+        return albumPics;
+    }
+
+    public void setAlbumPics(String albumPics) {
+        this.albumPics = albumPics;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Integer getShowStatus() {
+        return showStatus;
+    }
+
+    public void setShowStatus(Integer showStatus) {
+        this.showStatus = showStatus;
+    }
+
+    public Integer getForwardCount() {
+        return forwardCount;
+    }
+
+    public void setForwardCount(Integer forwardCount) {
+        this.forwardCount = forwardCount;
+    }
+
+    public String getCategoryName() {
+        return categoryName;
+    }
+
+    public void setCategoryName(String categoryName) {
+        this.categoryName = categoryName;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", categoryId=").append(categoryId);
+        sb.append(", title=").append(title);
+        sb.append(", pic=").append(pic);
+        sb.append(", productCount=").append(productCount);
+        sb.append(", recommendStatus=").append(recommendStatus);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", collectCount=").append(collectCount);
+        sb.append(", readCount=").append(readCount);
+        sb.append(", commentCount=").append(commentCount);
+        sb.append(", albumPics=").append(albumPics);
+        sb.append(", description=").append(description);
+        sb.append(", showStatus=").append(showStatus);
+        sb.append(", forwardCount=").append(forwardCount);
+        sb.append(", categoryName=").append(categoryName);
+        sb.append(", content=").append(content);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 82 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectCategory.java

@@ -0,0 +1,82 @@
+package com.mtcarpenter.mall.model;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+public class CmsSubjectCategory implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    private String name;
+    @ApiModelProperty(value = "分类图标")
+    private String icon;
+    @ApiModelProperty(value = "专题数量")
+    private Integer subjectCount;
+    private Integer showStatus;
+    private Integer sort;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getIcon() {
+        return icon;
+    }
+
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    public Integer getSubjectCount() {
+        return subjectCount;
+    }
+
+    public void setSubjectCount(Integer subjectCount) {
+        this.subjectCount = subjectCount;
+    }
+
+    public Integer getShowStatus() {
+        return showStatus;
+    }
+
+    public void setShowStatus(Integer showStatus) {
+        this.showStatus = showStatus;
+    }
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", name=").append(name);
+        sb.append(", icon=").append(icon);
+        sb.append(", subjectCount=").append(subjectCount);
+        sb.append(", showStatus=").append(showStatus);
+        sb.append(", sort=").append(sort);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 580 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectCategoryExample.java

@@ -0,0 +1,580 @@
+package com.mtcarpenter.mall.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CmsSubjectCategoryExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public CmsSubjectCategoryExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNull() {
+            addCriterion("name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNotNull() {
+            addCriterion("name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualTo(String value) {
+            addCriterion("name =", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualTo(String value) {
+            addCriterion("name <>", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThan(String value) {
+            addCriterion("name >", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualTo(String value) {
+            addCriterion("name >=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThan(String value) {
+            addCriterion("name <", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualTo(String value) {
+            addCriterion("name <=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLike(String value) {
+            addCriterion("name like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotLike(String value) {
+            addCriterion("name not like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIn(List<String> values) {
+            addCriterion("name in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotIn(List<String> values) {
+            addCriterion("name not in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameBetween(String value1, String value2) {
+            addCriterion("name between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotBetween(String value1, String value2) {
+            addCriterion("name not between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconIsNull() {
+            addCriterion("icon is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconIsNotNull() {
+            addCriterion("icon is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconEqualTo(String value) {
+            addCriterion("icon =", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotEqualTo(String value) {
+            addCriterion("icon <>", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconGreaterThan(String value) {
+            addCriterion("icon >", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconGreaterThanOrEqualTo(String value) {
+            addCriterion("icon >=", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconLessThan(String value) {
+            addCriterion("icon <", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconLessThanOrEqualTo(String value) {
+            addCriterion("icon <=", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconLike(String value) {
+            addCriterion("icon like", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotLike(String value) {
+            addCriterion("icon not like", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconIn(List<String> values) {
+            addCriterion("icon in", values, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotIn(List<String> values) {
+            addCriterion("icon not in", values, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconBetween(String value1, String value2) {
+            addCriterion("icon between", value1, value2, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotBetween(String value1, String value2) {
+            addCriterion("icon not between", value1, value2, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountIsNull() {
+            addCriterion("subject_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountIsNotNull() {
+            addCriterion("subject_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountEqualTo(Integer value) {
+            addCriterion("subject_count =", value, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountNotEqualTo(Integer value) {
+            addCriterion("subject_count <>", value, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountGreaterThan(Integer value) {
+            addCriterion("subject_count >", value, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("subject_count >=", value, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountLessThan(Integer value) {
+            addCriterion("subject_count <", value, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountLessThanOrEqualTo(Integer value) {
+            addCriterion("subject_count <=", value, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountIn(List<Integer> values) {
+            addCriterion("subject_count in", values, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountNotIn(List<Integer> values) {
+            addCriterion("subject_count not in", values, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountBetween(Integer value1, Integer value2) {
+            addCriterion("subject_count between", value1, value2, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("subject_count not between", value1, value2, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNull() {
+            addCriterion("show_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNotNull() {
+            addCriterion("show_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusEqualTo(Integer value) {
+            addCriterion("show_status =", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotEqualTo(Integer value) {
+            addCriterion("show_status <>", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThan(Integer value) {
+            addCriterion("show_status >", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("show_status >=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThan(Integer value) {
+            addCriterion("show_status <", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("show_status <=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIn(List<Integer> values) {
+            addCriterion("show_status in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotIn(List<Integer> values) {
+            addCriterion("show_status not in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusBetween(Integer value1, Integer value2) {
+            addCriterion("show_status between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("show_status not between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNull() {
+            addCriterion("sort is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNotNull() {
+            addCriterion("sort is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortEqualTo(Integer value) {
+            addCriterion("sort =", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotEqualTo(Integer value) {
+            addCriterion("sort <>", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThan(Integer value) {
+            addCriterion("sort >", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThanOrEqualTo(Integer value) {
+            addCriterion("sort >=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThan(Integer value) {
+            addCriterion("sort <", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThanOrEqualTo(Integer value) {
+            addCriterion("sort <=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIn(List<Integer> values) {
+            addCriterion("sort in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotIn(List<Integer> values) {
+            addCriterion("sort not in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortBetween(Integer value1, Integer value2) {
+            addCriterion("sort between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotBetween(Integer value1, Integer value2) {
+            addCriterion("sort not between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 89 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectComment.java

@@ -0,0 +1,89 @@
+package com.mtcarpenter.mall.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class CmsSubjectComment implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    private Long subjectId;
+    private String memberNickName;
+    private String memberIcon;
+    private String content;
+    private Date createTime;
+    private Integer showStatus;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Long subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    public String getMemberNickName() {
+        return memberNickName;
+    }
+
+    public void setMemberNickName(String memberNickName) {
+        this.memberNickName = memberNickName;
+    }
+
+    public String getMemberIcon() {
+        return memberIcon;
+    }
+
+    public void setMemberIcon(String memberIcon) {
+        this.memberIcon = memberIcon;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getShowStatus() {
+        return showStatus;
+    }
+
+    public void setShowStatus(Integer showStatus) {
+        this.showStatus = showStatus;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", subjectId=").append(subjectId);
+        sb.append(", memberNickName=").append(memberNickName);
+        sb.append(", memberIcon=").append(memberIcon);
+        sb.append(", content=").append(content);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", showStatus=").append(showStatus);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 651 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectCommentExample.java

@@ -0,0 +1,651 @@
+package com.mtcarpenter.mall.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class CmsSubjectCommentExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public CmsSubjectCommentExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdIsNull() {
+            addCriterion("subject_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdIsNotNull() {
+            addCriterion("subject_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdEqualTo(Long value) {
+            addCriterion("subject_id =", value, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdNotEqualTo(Long value) {
+            addCriterion("subject_id <>", value, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdGreaterThan(Long value) {
+            addCriterion("subject_id >", value, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("subject_id >=", value, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdLessThan(Long value) {
+            addCriterion("subject_id <", value, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdLessThanOrEqualTo(Long value) {
+            addCriterion("subject_id <=", value, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdIn(List<Long> values) {
+            addCriterion("subject_id in", values, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdNotIn(List<Long> values) {
+            addCriterion("subject_id not in", values, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdBetween(Long value1, Long value2) {
+            addCriterion("subject_id between", value1, value2, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdNotBetween(Long value1, Long value2) {
+            addCriterion("subject_id not between", value1, value2, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameIsNull() {
+            addCriterion("member_nick_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameIsNotNull() {
+            addCriterion("member_nick_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameEqualTo(String value) {
+            addCriterion("member_nick_name =", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameNotEqualTo(String value) {
+            addCriterion("member_nick_name <>", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameGreaterThan(String value) {
+            addCriterion("member_nick_name >", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameGreaterThanOrEqualTo(String value) {
+            addCriterion("member_nick_name >=", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameLessThan(String value) {
+            addCriterion("member_nick_name <", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameLessThanOrEqualTo(String value) {
+            addCriterion("member_nick_name <=", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameLike(String value) {
+            addCriterion("member_nick_name like", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameNotLike(String value) {
+            addCriterion("member_nick_name not like", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameIn(List<String> values) {
+            addCriterion("member_nick_name in", values, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameNotIn(List<String> values) {
+            addCriterion("member_nick_name not in", values, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameBetween(String value1, String value2) {
+            addCriterion("member_nick_name between", value1, value2, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameNotBetween(String value1, String value2) {
+            addCriterion("member_nick_name not between", value1, value2, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconIsNull() {
+            addCriterion("member_icon is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconIsNotNull() {
+            addCriterion("member_icon is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconEqualTo(String value) {
+            addCriterion("member_icon =", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconNotEqualTo(String value) {
+            addCriterion("member_icon <>", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconGreaterThan(String value) {
+            addCriterion("member_icon >", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconGreaterThanOrEqualTo(String value) {
+            addCriterion("member_icon >=", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconLessThan(String value) {
+            addCriterion("member_icon <", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconLessThanOrEqualTo(String value) {
+            addCriterion("member_icon <=", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconLike(String value) {
+            addCriterion("member_icon like", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconNotLike(String value) {
+            addCriterion("member_icon not like", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconIn(List<String> values) {
+            addCriterion("member_icon in", values, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconNotIn(List<String> values) {
+            addCriterion("member_icon not in", values, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconBetween(String value1, String value2) {
+            addCriterion("member_icon between", value1, value2, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconNotBetween(String value1, String value2) {
+            addCriterion("member_icon not between", value1, value2, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIsNull() {
+            addCriterion("content is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIsNotNull() {
+            addCriterion("content is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentEqualTo(String value) {
+            addCriterion("content =", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotEqualTo(String value) {
+            addCriterion("content <>", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentGreaterThan(String value) {
+            addCriterion("content >", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentGreaterThanOrEqualTo(String value) {
+            addCriterion("content >=", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLessThan(String value) {
+            addCriterion("content <", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLessThanOrEqualTo(String value) {
+            addCriterion("content <=", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLike(String value) {
+            addCriterion("content like", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotLike(String value) {
+            addCriterion("content not like", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIn(List<String> values) {
+            addCriterion("content in", values, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotIn(List<String> values) {
+            addCriterion("content not in", values, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentBetween(String value1, String value2) {
+            addCriterion("content between", value1, value2, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotBetween(String value1, String value2) {
+            addCriterion("content not between", value1, value2, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNull() {
+            addCriterion("show_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNotNull() {
+            addCriterion("show_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusEqualTo(Integer value) {
+            addCriterion("show_status =", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotEqualTo(Integer value) {
+            addCriterion("show_status <>", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThan(Integer value) {
+            addCriterion("show_status >", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("show_status >=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThan(Integer value) {
+            addCriterion("show_status <", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("show_status <=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIn(List<Integer> values) {
+            addCriterion("show_status in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotIn(List<Integer> values) {
+            addCriterion("show_status not in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusBetween(Integer value1, Integer value2) {
+            addCriterion("show_status between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("show_status not between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

File diff suppressed because it is too large
+ 1151 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectExample.java


+ 49 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectProductRelation.java

@@ -0,0 +1,49 @@
+package com.mtcarpenter.mall.model;
+
+
+import java.io.Serializable;
+
+public class CmsSubjectProductRelation implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    private Long subjectId;
+    private Long productId;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Long subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    public Long getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Long productId) {
+        this.productId = productId;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", subjectId=").append(subjectId);
+        sb.append(", productId=").append(productId);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 380 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsSubjectProductRelationExample.java

@@ -0,0 +1,380 @@
+package com.mtcarpenter.mall.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CmsSubjectProductRelationExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public CmsSubjectProductRelationExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdIsNull() {
+            addCriterion("subject_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdIsNotNull() {
+            addCriterion("subject_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdEqualTo(Long value) {
+            addCriterion("subject_id =", value, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdNotEqualTo(Long value) {
+            addCriterion("subject_id <>", value, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdGreaterThan(Long value) {
+            addCriterion("subject_id >", value, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("subject_id >=", value, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdLessThan(Long value) {
+            addCriterion("subject_id <", value, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdLessThanOrEqualTo(Long value) {
+            addCriterion("subject_id <=", value, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdIn(List<Long> values) {
+            addCriterion("subject_id in", values, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdNotIn(List<Long> values) {
+            addCriterion("subject_id not in", values, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdBetween(Long value1, Long value2) {
+            addCriterion("subject_id between", value1, value2, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectIdNotBetween(Long value1, Long value2) {
+            addCriterion("subject_id not between", value1, value2, "subjectId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdIsNull() {
+            addCriterion("product_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdIsNotNull() {
+            addCriterion("product_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdEqualTo(Long value) {
+            addCriterion("product_id =", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdNotEqualTo(Long value) {
+            addCriterion("product_id <>", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdGreaterThan(Long value) {
+            addCriterion("product_id >", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("product_id >=", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdLessThan(Long value) {
+            addCriterion("product_id <", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdLessThanOrEqualTo(Long value) {
+            addCriterion("product_id <=", value, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdIn(List<Long> values) {
+            addCriterion("product_id in", values, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdNotIn(List<Long> values) {
+            addCriterion("product_id not in", values, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdBetween(Long value1, Long value2) {
+            addCriterion("product_id between", value1, value2, "productId");
+            return (Criteria) this;
+        }
+
+        public Criteria andProductIdNotBetween(Long value1, Long value2) {
+            addCriterion("product_id not between", value1, value2, "productId");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 146 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsTopic.java

@@ -0,0 +1,146 @@
+package com.mtcarpenter.mall.model;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class CmsTopic implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    private Long categoryId;
+    private String name;
+    private Date createTime;
+    private Date startTime;
+    private Date endTime;
+    @ApiModelProperty(value = "参与人数")
+    private Integer attendCount;
+    @ApiModelProperty(value = "关注人数")
+    private Integer attentionCount;
+    private Integer readCount;
+    @ApiModelProperty(value = "奖品名称")
+    private String awardName;
+    @ApiModelProperty(value = "参与方式")
+    private String attendType;
+    @ApiModelProperty(value = "话题内容")
+    private String content;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getCategoryId() {
+        return categoryId;
+    }
+
+    public void setCategoryId(Long categoryId) {
+        this.categoryId = categoryId;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public Integer getAttendCount() {
+        return attendCount;
+    }
+
+    public void setAttendCount(Integer attendCount) {
+        this.attendCount = attendCount;
+    }
+
+    public Integer getAttentionCount() {
+        return attentionCount;
+    }
+
+    public void setAttentionCount(Integer attentionCount) {
+        this.attentionCount = attentionCount;
+    }
+
+    public Integer getReadCount() {
+        return readCount;
+    }
+
+    public void setReadCount(Integer readCount) {
+        this.readCount = readCount;
+    }
+
+    public String getAwardName() {
+        return awardName;
+    }
+
+    public void setAwardName(String awardName) {
+        this.awardName = awardName;
+    }
+
+    public String getAttendType() {
+        return attendType;
+    }
+
+    public void setAttendType(String attendType) {
+        this.attendType = attendType;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", categoryId=").append(categoryId);
+        sb.append(", name=").append(name);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", startTime=").append(startTime);
+        sb.append(", endTime=").append(endTime);
+        sb.append(", attendCount=").append(attendCount);
+        sb.append(", attentionCount=").append(attentionCount);
+        sb.append(", readCount=").append(readCount);
+        sb.append(", awardName=").append(awardName);
+        sb.append(", attendType=").append(attendType);
+        sb.append(", content=").append(content);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 82 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsTopicCategory.java

@@ -0,0 +1,82 @@
+package com.mtcarpenter.mall.model;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+public class CmsTopicCategory implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    private String name;
+    @ApiModelProperty(value = "分类图标")
+    private String icon;
+    @ApiModelProperty(value = "专题数量")
+    private Integer subjectCount;
+    private Integer showStatus;
+    private Integer sort;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getIcon() {
+        return icon;
+    }
+
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    public Integer getSubjectCount() {
+        return subjectCount;
+    }
+
+    public void setSubjectCount(Integer subjectCount) {
+        this.subjectCount = subjectCount;
+    }
+
+    public Integer getShowStatus() {
+        return showStatus;
+    }
+
+    public void setShowStatus(Integer showStatus) {
+        this.showStatus = showStatus;
+    }
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", name=").append(name);
+        sb.append(", icon=").append(icon);
+        sb.append(", subjectCount=").append(subjectCount);
+        sb.append(", showStatus=").append(showStatus);
+        sb.append(", sort=").append(sort);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 580 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsTopicCategoryExample.java

@@ -0,0 +1,580 @@
+package com.mtcarpenter.mall.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CmsTopicCategoryExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public CmsTopicCategoryExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNull() {
+            addCriterion("name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNotNull() {
+            addCriterion("name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualTo(String value) {
+            addCriterion("name =", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualTo(String value) {
+            addCriterion("name <>", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThan(String value) {
+            addCriterion("name >", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualTo(String value) {
+            addCriterion("name >=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThan(String value) {
+            addCriterion("name <", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualTo(String value) {
+            addCriterion("name <=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLike(String value) {
+            addCriterion("name like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotLike(String value) {
+            addCriterion("name not like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIn(List<String> values) {
+            addCriterion("name in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotIn(List<String> values) {
+            addCriterion("name not in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameBetween(String value1, String value2) {
+            addCriterion("name between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotBetween(String value1, String value2) {
+            addCriterion("name not between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconIsNull() {
+            addCriterion("icon is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconIsNotNull() {
+            addCriterion("icon is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconEqualTo(String value) {
+            addCriterion("icon =", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotEqualTo(String value) {
+            addCriterion("icon <>", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconGreaterThan(String value) {
+            addCriterion("icon >", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconGreaterThanOrEqualTo(String value) {
+            addCriterion("icon >=", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconLessThan(String value) {
+            addCriterion("icon <", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconLessThanOrEqualTo(String value) {
+            addCriterion("icon <=", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconLike(String value) {
+            addCriterion("icon like", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotLike(String value) {
+            addCriterion("icon not like", value, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconIn(List<String> values) {
+            addCriterion("icon in", values, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotIn(List<String> values) {
+            addCriterion("icon not in", values, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconBetween(String value1, String value2) {
+            addCriterion("icon between", value1, value2, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andIconNotBetween(String value1, String value2) {
+            addCriterion("icon not between", value1, value2, "icon");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountIsNull() {
+            addCriterion("subject_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountIsNotNull() {
+            addCriterion("subject_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountEqualTo(Integer value) {
+            addCriterion("subject_count =", value, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountNotEqualTo(Integer value) {
+            addCriterion("subject_count <>", value, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountGreaterThan(Integer value) {
+            addCriterion("subject_count >", value, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("subject_count >=", value, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountLessThan(Integer value) {
+            addCriterion("subject_count <", value, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountLessThanOrEqualTo(Integer value) {
+            addCriterion("subject_count <=", value, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountIn(List<Integer> values) {
+            addCriterion("subject_count in", values, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountNotIn(List<Integer> values) {
+            addCriterion("subject_count not in", values, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountBetween(Integer value1, Integer value2) {
+            addCriterion("subject_count between", value1, value2, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("subject_count not between", value1, value2, "subjectCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNull() {
+            addCriterion("show_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNotNull() {
+            addCriterion("show_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusEqualTo(Integer value) {
+            addCriterion("show_status =", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotEqualTo(Integer value) {
+            addCriterion("show_status <>", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThan(Integer value) {
+            addCriterion("show_status >", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("show_status >=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThan(Integer value) {
+            addCriterion("show_status <", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("show_status <=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIn(List<Integer> values) {
+            addCriterion("show_status in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotIn(List<Integer> values) {
+            addCriterion("show_status not in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusBetween(Integer value1, Integer value2) {
+            addCriterion("show_status between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("show_status not between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNull() {
+            addCriterion("sort is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNotNull() {
+            addCriterion("sort is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortEqualTo(Integer value) {
+            addCriterion("sort =", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotEqualTo(Integer value) {
+            addCriterion("sort <>", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThan(Integer value) {
+            addCriterion("sort >", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThanOrEqualTo(Integer value) {
+            addCriterion("sort >=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThan(Integer value) {
+            addCriterion("sort <", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThanOrEqualTo(Integer value) {
+            addCriterion("sort <=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIn(List<Integer> values) {
+            addCriterion("sort in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotIn(List<Integer> values) {
+            addCriterion("sort not in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortBetween(Integer value1, Integer value2) {
+            addCriterion("sort between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotBetween(Integer value1, Integer value2) {
+            addCriterion("sort not between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 89 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsTopicComment.java

@@ -0,0 +1,89 @@
+package com.mtcarpenter.mall.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class CmsTopicComment implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    private String memberNickName;
+    private Long topicId;
+    private String memberIcon;
+    private String content;
+    private Date createTime;
+    private Integer showStatus;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getMemberNickName() {
+        return memberNickName;
+    }
+
+    public void setMemberNickName(String memberNickName) {
+        this.memberNickName = memberNickName;
+    }
+
+    public Long getTopicId() {
+        return topicId;
+    }
+
+    public void setTopicId(Long topicId) {
+        this.topicId = topicId;
+    }
+
+    public String getMemberIcon() {
+        return memberIcon;
+    }
+
+    public void setMemberIcon(String memberIcon) {
+        this.memberIcon = memberIcon;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Integer getShowStatus() {
+        return showStatus;
+    }
+
+    public void setShowStatus(Integer showStatus) {
+        this.showStatus = showStatus;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", memberNickName=").append(memberNickName);
+        sb.append(", topicId=").append(topicId);
+        sb.append(", memberIcon=").append(memberIcon);
+        sb.append(", content=").append(content);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", showStatus=").append(showStatus);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 651 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsTopicCommentExample.java

@@ -0,0 +1,651 @@
+package com.mtcarpenter.mall.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class CmsTopicCommentExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public CmsTopicCommentExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameIsNull() {
+            addCriterion("member_nick_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameIsNotNull() {
+            addCriterion("member_nick_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameEqualTo(String value) {
+            addCriterion("member_nick_name =", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameNotEqualTo(String value) {
+            addCriterion("member_nick_name <>", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameGreaterThan(String value) {
+            addCriterion("member_nick_name >", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameGreaterThanOrEqualTo(String value) {
+            addCriterion("member_nick_name >=", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameLessThan(String value) {
+            addCriterion("member_nick_name <", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameLessThanOrEqualTo(String value) {
+            addCriterion("member_nick_name <=", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameLike(String value) {
+            addCriterion("member_nick_name like", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameNotLike(String value) {
+            addCriterion("member_nick_name not like", value, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameIn(List<String> values) {
+            addCriterion("member_nick_name in", values, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameNotIn(List<String> values) {
+            addCriterion("member_nick_name not in", values, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameBetween(String value1, String value2) {
+            addCriterion("member_nick_name between", value1, value2, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberNickNameNotBetween(String value1, String value2) {
+            addCriterion("member_nick_name not between", value1, value2, "memberNickName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTopicIdIsNull() {
+            addCriterion("topic_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTopicIdIsNotNull() {
+            addCriterion("topic_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTopicIdEqualTo(Long value) {
+            addCriterion("topic_id =", value, "topicId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTopicIdNotEqualTo(Long value) {
+            addCriterion("topic_id <>", value, "topicId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTopicIdGreaterThan(Long value) {
+            addCriterion("topic_id >", value, "topicId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTopicIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("topic_id >=", value, "topicId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTopicIdLessThan(Long value) {
+            addCriterion("topic_id <", value, "topicId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTopicIdLessThanOrEqualTo(Long value) {
+            addCriterion("topic_id <=", value, "topicId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTopicIdIn(List<Long> values) {
+            addCriterion("topic_id in", values, "topicId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTopicIdNotIn(List<Long> values) {
+            addCriterion("topic_id not in", values, "topicId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTopicIdBetween(Long value1, Long value2) {
+            addCriterion("topic_id between", value1, value2, "topicId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTopicIdNotBetween(Long value1, Long value2) {
+            addCriterion("topic_id not between", value1, value2, "topicId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconIsNull() {
+            addCriterion("member_icon is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconIsNotNull() {
+            addCriterion("member_icon is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconEqualTo(String value) {
+            addCriterion("member_icon =", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconNotEqualTo(String value) {
+            addCriterion("member_icon <>", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconGreaterThan(String value) {
+            addCriterion("member_icon >", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconGreaterThanOrEqualTo(String value) {
+            addCriterion("member_icon >=", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconLessThan(String value) {
+            addCriterion("member_icon <", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconLessThanOrEqualTo(String value) {
+            addCriterion("member_icon <=", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconLike(String value) {
+            addCriterion("member_icon like", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconNotLike(String value) {
+            addCriterion("member_icon not like", value, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconIn(List<String> values) {
+            addCriterion("member_icon in", values, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconNotIn(List<String> values) {
+            addCriterion("member_icon not in", values, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconBetween(String value1, String value2) {
+            addCriterion("member_icon between", value1, value2, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberIconNotBetween(String value1, String value2) {
+            addCriterion("member_icon not between", value1, value2, "memberIcon");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIsNull() {
+            addCriterion("content is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIsNotNull() {
+            addCriterion("content is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentEqualTo(String value) {
+            addCriterion("content =", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotEqualTo(String value) {
+            addCriterion("content <>", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentGreaterThan(String value) {
+            addCriterion("content >", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentGreaterThanOrEqualTo(String value) {
+            addCriterion("content >=", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLessThan(String value) {
+            addCriterion("content <", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLessThanOrEqualTo(String value) {
+            addCriterion("content <=", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLike(String value) {
+            addCriterion("content like", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotLike(String value) {
+            addCriterion("content not like", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIn(List<String> values) {
+            addCriterion("content in", values, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotIn(List<String> values) {
+            addCriterion("content not in", values, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentBetween(String value1, String value2) {
+            addCriterion("content between", value1, value2, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotBetween(String value1, String value2) {
+            addCriterion("content not between", value1, value2, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNull() {
+            addCriterion("show_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIsNotNull() {
+            addCriterion("show_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusEqualTo(Integer value) {
+            addCriterion("show_status =", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotEqualTo(Integer value) {
+            addCriterion("show_status <>", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThan(Integer value) {
+            addCriterion("show_status >", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("show_status >=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThan(Integer value) {
+            addCriterion("show_status <", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("show_status <=", value, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusIn(List<Integer> values) {
+            addCriterion("show_status in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotIn(List<Integer> values) {
+            addCriterion("show_status not in", values, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusBetween(Integer value1, Integer value2) {
+            addCriterion("show_status between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andShowStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("show_status not between", value1, value2, "showStatus");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 891 - 0
mall-admin-cms/cms-mbg/src/main/java/com/mtcarpenter/mall/model/CmsTopicExample.java

@@ -0,0 +1,891 @@
+package com.mtcarpenter.mall.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class CmsTopicExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public CmsTopicExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdIsNull() {
+            addCriterion("category_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdIsNotNull() {
+            addCriterion("category_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdEqualTo(Long value) {
+            addCriterion("category_id =", value, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdNotEqualTo(Long value) {
+            addCriterion("category_id <>", value, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdGreaterThan(Long value) {
+            addCriterion("category_id >", value, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("category_id >=", value, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdLessThan(Long value) {
+            addCriterion("category_id <", value, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdLessThanOrEqualTo(Long value) {
+            addCriterion("category_id <=", value, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdIn(List<Long> values) {
+            addCriterion("category_id in", values, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdNotIn(List<Long> values) {
+            addCriterion("category_id not in", values, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdBetween(Long value1, Long value2) {
+            addCriterion("category_id between", value1, value2, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIdNotBetween(Long value1, Long value2) {
+            addCriterion("category_id not between", value1, value2, "categoryId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNull() {
+            addCriterion("name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNotNull() {
+            addCriterion("name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualTo(String value) {
+            addCriterion("name =", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualTo(String value) {
+            addCriterion("name <>", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThan(String value) {
+            addCriterion("name >", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualTo(String value) {
+            addCriterion("name >=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThan(String value) {
+            addCriterion("name <", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualTo(String value) {
+            addCriterion("name <=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLike(String value) {
+            addCriterion("name like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotLike(String value) {
+            addCriterion("name not like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIn(List<String> values) {
+            addCriterion("name in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotIn(List<String> values) {
+            addCriterion("name not in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameBetween(String value1, String value2) {
+            addCriterion("name between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotBetween(String value1, String value2) {
+            addCriterion("name not between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeIsNull() {
+            addCriterion("start_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeIsNotNull() {
+            addCriterion("start_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeEqualTo(Date value) {
+            addCriterion("start_time =", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeNotEqualTo(Date value) {
+            addCriterion("start_time <>", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeGreaterThan(Date value) {
+            addCriterion("start_time >", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("start_time >=", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeLessThan(Date value) {
+            addCriterion("start_time <", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeLessThanOrEqualTo(Date value) {
+            addCriterion("start_time <=", value, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeIn(List<Date> values) {
+            addCriterion("start_time in", values, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeNotIn(List<Date> values) {
+            addCriterion("start_time not in", values, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeBetween(Date value1, Date value2) {
+            addCriterion("start_time between", value1, value2, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStartTimeNotBetween(Date value1, Date value2) {
+            addCriterion("start_time not between", value1, value2, "startTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeIsNull() {
+            addCriterion("end_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeIsNotNull() {
+            addCriterion("end_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeEqualTo(Date value) {
+            addCriterion("end_time =", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeNotEqualTo(Date value) {
+            addCriterion("end_time <>", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeGreaterThan(Date value) {
+            addCriterion("end_time >", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("end_time >=", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeLessThan(Date value) {
+            addCriterion("end_time <", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeLessThanOrEqualTo(Date value) {
+            addCriterion("end_time <=", value, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeIn(List<Date> values) {
+            addCriterion("end_time in", values, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeNotIn(List<Date> values) {
+            addCriterion("end_time not in", values, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeBetween(Date value1, Date value2) {
+            addCriterion("end_time between", value1, value2, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andEndTimeNotBetween(Date value1, Date value2) {
+            addCriterion("end_time not between", value1, value2, "endTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendCountIsNull() {
+            addCriterion("attend_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendCountIsNotNull() {
+            addCriterion("attend_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendCountEqualTo(Integer value) {
+            addCriterion("attend_count =", value, "attendCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendCountNotEqualTo(Integer value) {
+            addCriterion("attend_count <>", value, "attendCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendCountGreaterThan(Integer value) {
+            addCriterion("attend_count >", value, "attendCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("attend_count >=", value, "attendCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendCountLessThan(Integer value) {
+            addCriterion("attend_count <", value, "attendCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendCountLessThanOrEqualTo(Integer value) {
+            addCriterion("attend_count <=", value, "attendCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendCountIn(List<Integer> values) {
+            addCriterion("attend_count in", values, "attendCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendCountNotIn(List<Integer> values) {
+            addCriterion("attend_count not in", values, "attendCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendCountBetween(Integer value1, Integer value2) {
+            addCriterion("attend_count between", value1, value2, "attendCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("attend_count not between", value1, value2, "attendCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttentionCountIsNull() {
+            addCriterion("attention_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttentionCountIsNotNull() {
+            addCriterion("attention_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttentionCountEqualTo(Integer value) {
+            addCriterion("attention_count =", value, "attentionCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttentionCountNotEqualTo(Integer value) {
+            addCriterion("attention_count <>", value, "attentionCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttentionCountGreaterThan(Integer value) {
+            addCriterion("attention_count >", value, "attentionCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttentionCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("attention_count >=", value, "attentionCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttentionCountLessThan(Integer value) {
+            addCriterion("attention_count <", value, "attentionCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttentionCountLessThanOrEqualTo(Integer value) {
+            addCriterion("attention_count <=", value, "attentionCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttentionCountIn(List<Integer> values) {
+            addCriterion("attention_count in", values, "attentionCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttentionCountNotIn(List<Integer> values) {
+            addCriterion("attention_count not in", values, "attentionCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttentionCountBetween(Integer value1, Integer value2) {
+            addCriterion("attention_count between", value1, value2, "attentionCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttentionCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("attention_count not between", value1, value2, "attentionCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountIsNull() {
+            addCriterion("read_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountIsNotNull() {
+            addCriterion("read_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountEqualTo(Integer value) {
+            addCriterion("read_count =", value, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountNotEqualTo(Integer value) {
+            addCriterion("read_count <>", value, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountGreaterThan(Integer value) {
+            addCriterion("read_count >", value, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("read_count >=", value, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountLessThan(Integer value) {
+            addCriterion("read_count <", value, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountLessThanOrEqualTo(Integer value) {
+            addCriterion("read_count <=", value, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountIn(List<Integer> values) {
+            addCriterion("read_count in", values, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountNotIn(List<Integer> values) {
+            addCriterion("read_count not in", values, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountBetween(Integer value1, Integer value2) {
+            addCriterion("read_count between", value1, value2, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andReadCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("read_count not between", value1, value2, "readCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameIsNull() {
+            addCriterion("award_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameIsNotNull() {
+            addCriterion("award_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameEqualTo(String value) {
+            addCriterion("award_name =", value, "awardName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameNotEqualTo(String value) {
+            addCriterion("award_name <>", value, "awardName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameGreaterThan(String value) {
+            addCriterion("award_name >", value, "awardName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameGreaterThanOrEqualTo(String value) {
+            addCriterion("award_name >=", value, "awardName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameLessThan(String value) {
+            addCriterion("award_name <", value, "awardName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameLessThanOrEqualTo(String value) {
+            addCriterion("award_name <=", value, "awardName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameLike(String value) {
+            addCriterion("award_name like", value, "awardName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameNotLike(String value) {
+            addCriterion("award_name not like", value, "awardName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameIn(List<String> values) {
+            addCriterion("award_name in", values, "awardName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameNotIn(List<String> values) {
+            addCriterion("award_name not in", values, "awardName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameBetween(String value1, String value2) {
+            addCriterion("award_name between", value1, value2, "awardName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAwardNameNotBetween(String value1, String value2) {
+            addCriterion("award_name not between", value1, value2, "awardName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeIsNull() {
+            addCriterion("attend_type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeIsNotNull() {
+            addCriterion("attend_type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeEqualTo(String value) {
+            addCriterion("attend_type =", value, "attendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeNotEqualTo(String value) {
+            addCriterion("attend_type <>", value, "attendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeGreaterThan(String value) {
+            addCriterion("attend_type >", value, "attendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeGreaterThanOrEqualTo(String value) {
+            addCriterion("attend_type >=", value, "attendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeLessThan(String value) {
+            addCriterion("attend_type <", value, "attendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeLessThanOrEqualTo(String value) {
+            addCriterion("attend_type <=", value, "attendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeLike(String value) {
+            addCriterion("attend_type like", value, "attendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeNotLike(String value) {
+            addCriterion("attend_type not like", value, "attendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeIn(List<String> values) {
+            addCriterion("attend_type in", values, "attendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeNotIn(List<String> values) {
+            addCriterion("attend_type not in", values, "attendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeBetween(String value1, String value2) {
+            addCriterion("attend_type between", value1, value2, "attendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andAttendTypeNotBetween(String value1, String value2) {
+            addCriterion("attend_type not between", value1, value2, "attendType");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 226 - 0
mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsHelpCategoryMapper.xml

@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.mapper.CmsHelpCategoryMapper">
+  <resultMap id="BaseResultMap" type="com.mtcarpenter.mall.model.CmsHelpCategory">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="icon" jdbcType="VARCHAR" property="icon" />
+    <result column="help_count" jdbcType="INTEGER" property="helpCount" />
+    <result column="show_status" jdbcType="INTEGER" property="showStatus" />
+    <result column="sort" jdbcType="INTEGER" property="sort" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, name, icon, help_count, show_status, sort
+  </sql>
+  <select id="selectByExample" parameterType="com.mtcarpenter.mall.model.CmsHelpCategoryExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cms_help_category
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from cms_help_category
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from cms_help_category
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.mtcarpenter.mall.model.CmsHelpCategoryExample">
+    delete from cms_help_category
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.mtcarpenter.mall.model.CmsHelpCategory">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_help_category (name, icon, help_count, 
+      show_status, sort)
+    values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{helpCount,jdbcType=INTEGER}, 
+      #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.mtcarpenter.mall.model.CmsHelpCategory">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_help_category
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="name != null">
+        name,
+      </if>
+      <if test="icon != null">
+        icon,
+      </if>
+      <if test="helpCount != null">
+        help_count,
+      </if>
+      <if test="showStatus != null">
+        show_status,
+      </if>
+      <if test="sort != null">
+        sort,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="icon != null">
+        #{icon,jdbcType=VARCHAR},
+      </if>
+      <if test="helpCount != null">
+        #{helpCount,jdbcType=INTEGER},
+      </if>
+      <if test="showStatus != null">
+        #{showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sort != null">
+        #{sort,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.mtcarpenter.mall.model.CmsHelpCategoryExample" resultType="java.lang.Long">
+    select count(*) from cms_help_category
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cms_help_category
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.name != null">
+        name = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.icon != null">
+        icon = #{record.icon,jdbcType=VARCHAR},
+      </if>
+      <if test="record.helpCount != null">
+        help_count = #{record.helpCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.showStatus != null">
+        show_status = #{record.showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.sort != null">
+        sort = #{record.sort,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cms_help_category
+    set id = #{record.id,jdbcType=BIGINT},
+      name = #{record.name,jdbcType=VARCHAR},
+      icon = #{record.icon,jdbcType=VARCHAR},
+      help_count = #{record.helpCount,jdbcType=INTEGER},
+      show_status = #{record.showStatus,jdbcType=INTEGER},
+      sort = #{record.sort,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.mtcarpenter.mall.model.CmsHelpCategory">
+    update cms_help_category
+    <set>
+      <if test="name != null">
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="icon != null">
+        icon = #{icon,jdbcType=VARCHAR},
+      </if>
+      <if test="helpCount != null">
+        help_count = #{helpCount,jdbcType=INTEGER},
+      </if>
+      <if test="showStatus != null">
+        show_status = #{showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sort != null">
+        sort = #{sort,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.mtcarpenter.mall.model.CmsHelpCategory">
+    update cms_help_category
+    set name = #{name,jdbcType=VARCHAR},
+      icon = #{icon,jdbcType=VARCHAR},
+      help_count = #{helpCount,jdbcType=INTEGER},
+      show_status = #{showStatus,jdbcType=INTEGER},
+      sort = #{sort,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 304 - 0
mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsHelpMapper.xml

@@ -0,0 +1,304 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.mapper.CmsHelpMapper">
+  <resultMap id="BaseResultMap" type="com.mtcarpenter.mall.model.CmsHelp">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="category_id" jdbcType="BIGINT" property="categoryId" />
+    <result column="icon" jdbcType="VARCHAR" property="icon" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="show_status" jdbcType="INTEGER" property="showStatus" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="read_count" jdbcType="INTEGER" property="readCount" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.mtcarpenter.mall.model.CmsHelp">
+    <result column="content" jdbcType="LONGVARCHAR" property="content" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, category_id, icon, title, show_status, create_time, read_count
+  </sql>
+  <sql id="Blob_Column_List">
+    content
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.mtcarpenter.mall.model.CmsHelpExample" resultMap="ResultMapWithBLOBs">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from cms_help
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.mtcarpenter.mall.model.CmsHelpExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cms_help
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from cms_help
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from cms_help
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.mtcarpenter.mall.model.CmsHelpExample">
+    delete from cms_help
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.mtcarpenter.mall.model.CmsHelp">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_help (category_id, icon, title, 
+      show_status, create_time, read_count, 
+      content)
+    values (#{categoryId,jdbcType=BIGINT}, #{icon,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, 
+      #{showStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{readCount,jdbcType=INTEGER}, 
+      #{content,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.mtcarpenter.mall.model.CmsHelp">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_help
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="categoryId != null">
+        category_id,
+      </if>
+      <if test="icon != null">
+        icon,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="showStatus != null">
+        show_status,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="readCount != null">
+        read_count,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="categoryId != null">
+        #{categoryId,jdbcType=BIGINT},
+      </if>
+      <if test="icon != null">
+        #{icon,jdbcType=VARCHAR},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="showStatus != null">
+        #{showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="readCount != null">
+        #{readCount,jdbcType=INTEGER},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.mtcarpenter.mall.model.CmsHelpExample" resultType="java.lang.Long">
+    select count(*) from cms_help
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cms_help
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.categoryId != null">
+        category_id = #{record.categoryId,jdbcType=BIGINT},
+      </if>
+      <if test="record.icon != null">
+        icon = #{record.icon,jdbcType=VARCHAR},
+      </if>
+      <if test="record.title != null">
+        title = #{record.title,jdbcType=VARCHAR},
+      </if>
+      <if test="record.showStatus != null">
+        show_status = #{record.showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.readCount != null">
+        read_count = #{record.readCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.content != null">
+        content = #{record.content,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    update cms_help
+    set id = #{record.id,jdbcType=BIGINT},
+      category_id = #{record.categoryId,jdbcType=BIGINT},
+      icon = #{record.icon,jdbcType=VARCHAR},
+      title = #{record.title,jdbcType=VARCHAR},
+      show_status = #{record.showStatus,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      read_count = #{record.readCount,jdbcType=INTEGER},
+      content = #{record.content,jdbcType=LONGVARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cms_help
+    set id = #{record.id,jdbcType=BIGINT},
+      category_id = #{record.categoryId,jdbcType=BIGINT},
+      icon = #{record.icon,jdbcType=VARCHAR},
+      title = #{record.title,jdbcType=VARCHAR},
+      show_status = #{record.showStatus,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      read_count = #{record.readCount,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.mtcarpenter.mall.model.CmsHelp">
+    update cms_help
+    <set>
+      <if test="categoryId != null">
+        category_id = #{categoryId,jdbcType=BIGINT},
+      </if>
+      <if test="icon != null">
+        icon = #{icon,jdbcType=VARCHAR},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="showStatus != null">
+        show_status = #{showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="readCount != null">
+        read_count = #{readCount,jdbcType=INTEGER},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.mtcarpenter.mall.model.CmsHelp">
+    update cms_help
+    set category_id = #{categoryId,jdbcType=BIGINT},
+      icon = #{icon,jdbcType=VARCHAR},
+      title = #{title,jdbcType=VARCHAR},
+      show_status = #{showStatus,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      read_count = #{readCount,jdbcType=INTEGER},
+      content = #{content,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.mtcarpenter.mall.model.CmsHelp">
+    update cms_help
+    set category_id = #{categoryId,jdbcType=BIGINT},
+      icon = #{icon,jdbcType=VARCHAR},
+      title = #{title,jdbcType=VARCHAR},
+      show_status = #{showStatus,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      read_count = #{readCount,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 211 - 0
mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsMemberReportMapper.xml

@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.mapper.CmsMemberReportMapper">
+  <resultMap id="BaseResultMap" type="com.mtcarpenter.mall.model.CmsMemberReport">
+    <result column="id" jdbcType="BIGINT" property="id" />
+    <result column="report_type" jdbcType="INTEGER" property="reportType" />
+    <result column="report_member_name" jdbcType="VARCHAR" property="reportMemberName" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="report_object" jdbcType="VARCHAR" property="reportObject" />
+    <result column="report_status" jdbcType="INTEGER" property="reportStatus" />
+    <result column="handle_status" jdbcType="INTEGER" property="handleStatus" />
+    <result column="note" jdbcType="VARCHAR" property="note" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, report_type, report_member_name, create_time, report_object, report_status, handle_status, 
+    note
+  </sql>
+  <select id="selectByExample" parameterType="com.mtcarpenter.mall.model.CmsMemberReportExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cms_member_report
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <delete id="deleteByExample" parameterType="com.mtcarpenter.mall.model.CmsMemberReportExample">
+    delete from cms_member_report
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.mtcarpenter.mall.model.CmsMemberReport">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_member_report (report_type, report_member_name, create_time, 
+      report_object, report_status, handle_status, 
+      note)
+    values (#{reportType,jdbcType=INTEGER}, #{reportMemberName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{reportObject,jdbcType=VARCHAR}, #{reportStatus,jdbcType=INTEGER}, #{handleStatus,jdbcType=INTEGER}, 
+      #{note,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.mtcarpenter.mall.model.CmsMemberReport">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_member_report
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="reportType != null">
+        report_type,
+      </if>
+      <if test="reportMemberName != null">
+        report_member_name,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="reportObject != null">
+        report_object,
+      </if>
+      <if test="reportStatus != null">
+        report_status,
+      </if>
+      <if test="handleStatus != null">
+        handle_status,
+      </if>
+      <if test="note != null">
+        note,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="reportType != null">
+        #{reportType,jdbcType=INTEGER},
+      </if>
+      <if test="reportMemberName != null">
+        #{reportMemberName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="reportObject != null">
+        #{reportObject,jdbcType=VARCHAR},
+      </if>
+      <if test="reportStatus != null">
+        #{reportStatus,jdbcType=INTEGER},
+      </if>
+      <if test="handleStatus != null">
+        #{handleStatus,jdbcType=INTEGER},
+      </if>
+      <if test="note != null">
+        #{note,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.mtcarpenter.mall.model.CmsMemberReportExample" resultType="java.lang.Long">
+    select count(*) from cms_member_report
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cms_member_report
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.reportType != null">
+        report_type = #{record.reportType,jdbcType=INTEGER},
+      </if>
+      <if test="record.reportMemberName != null">
+        report_member_name = #{record.reportMemberName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.reportObject != null">
+        report_object = #{record.reportObject,jdbcType=VARCHAR},
+      </if>
+      <if test="record.reportStatus != null">
+        report_status = #{record.reportStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.handleStatus != null">
+        handle_status = #{record.handleStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.note != null">
+        note = #{record.note,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cms_member_report
+    set id = #{record.id,jdbcType=BIGINT},
+      report_type = #{record.reportType,jdbcType=INTEGER},
+      report_member_name = #{record.reportMemberName,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      report_object = #{record.reportObject,jdbcType=VARCHAR},
+      report_status = #{record.reportStatus,jdbcType=INTEGER},
+      handle_status = #{record.handleStatus,jdbcType=INTEGER},
+      note = #{record.note,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+</mapper>

+ 268 - 0
mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsPrefrenceAreaMapper.xml

@@ -0,0 +1,268 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.mapper.CmsPrefrenceAreaMapper">
+  <resultMap id="BaseResultMap" type="com.mtcarpenter.mall.model.CmsPrefrenceArea">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="sub_title" jdbcType="VARCHAR" property="subTitle" />
+    <result column="sort" jdbcType="INTEGER" property="sort" />
+    <result column="show_status" jdbcType="INTEGER" property="showStatus" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.mtcarpenter.mall.model.CmsPrefrenceArea">
+    <result column="pic" jdbcType="VARBINARY" property="pic" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, name, sub_title, sort, show_status
+  </sql>
+  <sql id="Blob_Column_List">
+    pic
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceAreaExample" resultMap="ResultMapWithBLOBs">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from cms_prefrence_area
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceAreaExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cms_prefrence_area
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from cms_prefrence_area
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from cms_prefrence_area
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceAreaExample">
+    delete from cms_prefrence_area
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceArea">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_prefrence_area (name, sub_title, sort, 
+      show_status, pic)
+    values (#{name,jdbcType=VARCHAR}, #{subTitle,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, 
+      #{showStatus,jdbcType=INTEGER}, #{pic,jdbcType=VARBINARY})
+  </insert>
+  <insert id="insertSelective" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceArea">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_prefrence_area
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="name != null">
+        name,
+      </if>
+      <if test="subTitle != null">
+        sub_title,
+      </if>
+      <if test="sort != null">
+        sort,
+      </if>
+      <if test="showStatus != null">
+        show_status,
+      </if>
+      <if test="pic != null">
+        pic,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="subTitle != null">
+        #{subTitle,jdbcType=VARCHAR},
+      </if>
+      <if test="sort != null">
+        #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="showStatus != null">
+        #{showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="pic != null">
+        #{pic,jdbcType=VARBINARY},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceAreaExample" resultType="java.lang.Long">
+    select count(*) from cms_prefrence_area
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cms_prefrence_area
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.name != null">
+        name = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.subTitle != null">
+        sub_title = #{record.subTitle,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sort != null">
+        sort = #{record.sort,jdbcType=INTEGER},
+      </if>
+      <if test="record.showStatus != null">
+        show_status = #{record.showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.pic != null">
+        pic = #{record.pic,jdbcType=VARBINARY},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    update cms_prefrence_area
+    set id = #{record.id,jdbcType=BIGINT},
+      name = #{record.name,jdbcType=VARCHAR},
+      sub_title = #{record.subTitle,jdbcType=VARCHAR},
+      sort = #{record.sort,jdbcType=INTEGER},
+      show_status = #{record.showStatus,jdbcType=INTEGER},
+      pic = #{record.pic,jdbcType=VARBINARY}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cms_prefrence_area
+    set id = #{record.id,jdbcType=BIGINT},
+      name = #{record.name,jdbcType=VARCHAR},
+      sub_title = #{record.subTitle,jdbcType=VARCHAR},
+      sort = #{record.sort,jdbcType=INTEGER},
+      show_status = #{record.showStatus,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceArea">
+    update cms_prefrence_area
+    <set>
+      <if test="name != null">
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="subTitle != null">
+        sub_title = #{subTitle,jdbcType=VARCHAR},
+      </if>
+      <if test="sort != null">
+        sort = #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="showStatus != null">
+        show_status = #{showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="pic != null">
+        pic = #{pic,jdbcType=VARBINARY},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceArea">
+    update cms_prefrence_area
+    set name = #{name,jdbcType=VARCHAR},
+      sub_title = #{subTitle,jdbcType=VARCHAR},
+      sort = #{sort,jdbcType=INTEGER},
+      show_status = #{showStatus,jdbcType=INTEGER},
+      pic = #{pic,jdbcType=VARBINARY}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceArea">
+    update cms_prefrence_area
+    set name = #{name,jdbcType=VARCHAR},
+      sub_title = #{subTitle,jdbcType=VARCHAR},
+      sort = #{sort,jdbcType=INTEGER},
+      show_status = #{showStatus,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 179 - 0
mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsPrefrenceAreaProductRelationMapper.xml

@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.mapper.CmsPrefrenceAreaProductRelationMapper">
+  <resultMap id="BaseResultMap" type="com.mtcarpenter.mall.model.CmsPrefrenceAreaProductRelation">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="prefrence_area_id" jdbcType="BIGINT" property="prefrenceAreaId" />
+    <result column="product_id" jdbcType="BIGINT" property="productId" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, prefrence_area_id, product_id
+  </sql>
+  <select id="selectByExample" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceAreaProductRelationExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cms_prefrence_area_product_relation
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from cms_prefrence_area_product_relation
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from cms_prefrence_area_product_relation
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceAreaProductRelationExample">
+    delete from cms_prefrence_area_product_relation
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceAreaProductRelation">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_prefrence_area_product_relation (prefrence_area_id, product_id)
+    values (#{prefrenceAreaId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceAreaProductRelation">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_prefrence_area_product_relation
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="prefrenceAreaId != null">
+        prefrence_area_id,
+      </if>
+      <if test="productId != null">
+        product_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="prefrenceAreaId != null">
+        #{prefrenceAreaId,jdbcType=BIGINT},
+      </if>
+      <if test="productId != null">
+        #{productId,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceAreaProductRelationExample" resultType="java.lang.Long">
+    select count(*) from cms_prefrence_area_product_relation
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cms_prefrence_area_product_relation
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.prefrenceAreaId != null">
+        prefrence_area_id = #{record.prefrenceAreaId,jdbcType=BIGINT},
+      </if>
+      <if test="record.productId != null">
+        product_id = #{record.productId,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cms_prefrence_area_product_relation
+    set id = #{record.id,jdbcType=BIGINT},
+      prefrence_area_id = #{record.prefrenceAreaId,jdbcType=BIGINT},
+      product_id = #{record.productId,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceAreaProductRelation">
+    update cms_prefrence_area_product_relation
+    <set>
+      <if test="prefrenceAreaId != null">
+        prefrence_area_id = #{prefrenceAreaId,jdbcType=BIGINT},
+      </if>
+      <if test="productId != null">
+        product_id = #{productId,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.mtcarpenter.mall.model.CmsPrefrenceAreaProductRelation">
+    update cms_prefrence_area_product_relation
+    set prefrence_area_id = #{prefrenceAreaId,jdbcType=BIGINT},
+      product_id = #{productId,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 226 - 0
mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsSubjectCategoryMapper.xml

@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.mapper.CmsSubjectCategoryMapper">
+  <resultMap id="BaseResultMap" type="com.mtcarpenter.mall.model.CmsSubjectCategory">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="icon" jdbcType="VARCHAR" property="icon" />
+    <result column="subject_count" jdbcType="INTEGER" property="subjectCount" />
+    <result column="show_status" jdbcType="INTEGER" property="showStatus" />
+    <result column="sort" jdbcType="INTEGER" property="sort" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, name, icon, subject_count, show_status, sort
+  </sql>
+  <select id="selectByExample" parameterType="com.mtcarpenter.mall.model.CmsSubjectCategoryExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cms_subject_category
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from cms_subject_category
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from cms_subject_category
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.mtcarpenter.mall.model.CmsSubjectCategoryExample">
+    delete from cms_subject_category
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.mtcarpenter.mall.model.CmsSubjectCategory">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_subject_category (name, icon, subject_count, 
+      show_status, sort)
+    values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{subjectCount,jdbcType=INTEGER}, 
+      #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.mtcarpenter.mall.model.CmsSubjectCategory">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_subject_category
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="name != null">
+        name,
+      </if>
+      <if test="icon != null">
+        icon,
+      </if>
+      <if test="subjectCount != null">
+        subject_count,
+      </if>
+      <if test="showStatus != null">
+        show_status,
+      </if>
+      <if test="sort != null">
+        sort,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="icon != null">
+        #{icon,jdbcType=VARCHAR},
+      </if>
+      <if test="subjectCount != null">
+        #{subjectCount,jdbcType=INTEGER},
+      </if>
+      <if test="showStatus != null">
+        #{showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sort != null">
+        #{sort,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.mtcarpenter.mall.model.CmsSubjectCategoryExample" resultType="java.lang.Long">
+    select count(*) from cms_subject_category
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cms_subject_category
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.name != null">
+        name = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.icon != null">
+        icon = #{record.icon,jdbcType=VARCHAR},
+      </if>
+      <if test="record.subjectCount != null">
+        subject_count = #{record.subjectCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.showStatus != null">
+        show_status = #{record.showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.sort != null">
+        sort = #{record.sort,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cms_subject_category
+    set id = #{record.id,jdbcType=BIGINT},
+      name = #{record.name,jdbcType=VARCHAR},
+      icon = #{record.icon,jdbcType=VARCHAR},
+      subject_count = #{record.subjectCount,jdbcType=INTEGER},
+      show_status = #{record.showStatus,jdbcType=INTEGER},
+      sort = #{record.sort,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.mtcarpenter.mall.model.CmsSubjectCategory">
+    update cms_subject_category
+    <set>
+      <if test="name != null">
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="icon != null">
+        icon = #{icon,jdbcType=VARCHAR},
+      </if>
+      <if test="subjectCount != null">
+        subject_count = #{subjectCount,jdbcType=INTEGER},
+      </if>
+      <if test="showStatus != null">
+        show_status = #{showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sort != null">
+        sort = #{sort,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.mtcarpenter.mall.model.CmsSubjectCategory">
+    update cms_subject_category
+    set name = #{name,jdbcType=VARCHAR},
+      icon = #{icon,jdbcType=VARCHAR},
+      subject_count = #{subjectCount,jdbcType=INTEGER},
+      show_status = #{showStatus,jdbcType=INTEGER},
+      sort = #{sort,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 243 - 0
mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsSubjectCommentMapper.xml

@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.mapper.CmsSubjectCommentMapper">
+  <resultMap id="BaseResultMap" type="com.mtcarpenter.mall.model.CmsSubjectComment">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="subject_id" jdbcType="BIGINT" property="subjectId" />
+    <result column="member_nick_name" jdbcType="VARCHAR" property="memberNickName" />
+    <result column="member_icon" jdbcType="VARCHAR" property="memberIcon" />
+    <result column="content" jdbcType="VARCHAR" property="content" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="show_status" jdbcType="INTEGER" property="showStatus" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, subject_id, member_nick_name, member_icon, content, create_time, show_status
+  </sql>
+  <select id="selectByExample" parameterType="com.mtcarpenter.mall.model.CmsSubjectCommentExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cms_subject_comment
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from cms_subject_comment
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from cms_subject_comment
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.mtcarpenter.mall.model.CmsSubjectCommentExample">
+    delete from cms_subject_comment
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.mtcarpenter.mall.model.CmsSubjectComment">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_subject_comment (subject_id, member_nick_name, member_icon, 
+      content, create_time, show_status
+      )
+    values (#{subjectId,jdbcType=BIGINT}, #{memberNickName,jdbcType=VARCHAR}, #{memberIcon,jdbcType=VARCHAR}, 
+      #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.mtcarpenter.mall.model.CmsSubjectComment">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_subject_comment
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="subjectId != null">
+        subject_id,
+      </if>
+      <if test="memberNickName != null">
+        member_nick_name,
+      </if>
+      <if test="memberIcon != null">
+        member_icon,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="showStatus != null">
+        show_status,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="subjectId != null">
+        #{subjectId,jdbcType=BIGINT},
+      </if>
+      <if test="memberNickName != null">
+        #{memberNickName,jdbcType=VARCHAR},
+      </if>
+      <if test="memberIcon != null">
+        #{memberIcon,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="showStatus != null">
+        #{showStatus,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.mtcarpenter.mall.model.CmsSubjectCommentExample" resultType="java.lang.Long">
+    select count(*) from cms_subject_comment
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cms_subject_comment
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.subjectId != null">
+        subject_id = #{record.subjectId,jdbcType=BIGINT},
+      </if>
+      <if test="record.memberNickName != null">
+        member_nick_name = #{record.memberNickName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.memberIcon != null">
+        member_icon = #{record.memberIcon,jdbcType=VARCHAR},
+      </if>
+      <if test="record.content != null">
+        content = #{record.content,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.showStatus != null">
+        show_status = #{record.showStatus,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cms_subject_comment
+    set id = #{record.id,jdbcType=BIGINT},
+      subject_id = #{record.subjectId,jdbcType=BIGINT},
+      member_nick_name = #{record.memberNickName,jdbcType=VARCHAR},
+      member_icon = #{record.memberIcon,jdbcType=VARCHAR},
+      content = #{record.content,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      show_status = #{record.showStatus,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.mtcarpenter.mall.model.CmsSubjectComment">
+    update cms_subject_comment
+    <set>
+      <if test="subjectId != null">
+        subject_id = #{subjectId,jdbcType=BIGINT},
+      </if>
+      <if test="memberNickName != null">
+        member_nick_name = #{memberNickName,jdbcType=VARCHAR},
+      </if>
+      <if test="memberIcon != null">
+        member_icon = #{memberIcon,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="showStatus != null">
+        show_status = #{showStatus,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.mtcarpenter.mall.model.CmsSubjectComment">
+    update cms_subject_comment
+    set subject_id = #{subjectId,jdbcType=BIGINT},
+      member_nick_name = #{memberNickName,jdbcType=VARCHAR},
+      member_icon = #{memberIcon,jdbcType=VARCHAR},
+      content = #{content,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      show_status = #{showStatus,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 447 - 0
mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsSubjectMapper.xml

@@ -0,0 +1,447 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.mapper.CmsSubjectMapper">
+  <resultMap id="BaseResultMap" type="com.mtcarpenter.mall.model.CmsSubject">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="category_id" jdbcType="BIGINT" property="categoryId" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="pic" jdbcType="VARCHAR" property="pic" />
+    <result column="product_count" jdbcType="INTEGER" property="productCount" />
+    <result column="recommend_status" jdbcType="INTEGER" property="recommendStatus" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="collect_count" jdbcType="INTEGER" property="collectCount" />
+    <result column="read_count" jdbcType="INTEGER" property="readCount" />
+    <result column="comment_count" jdbcType="INTEGER" property="commentCount" />
+    <result column="album_pics" jdbcType="VARCHAR" property="albumPics" />
+    <result column="description" jdbcType="VARCHAR" property="description" />
+    <result column="show_status" jdbcType="INTEGER" property="showStatus" />
+    <result column="forward_count" jdbcType="INTEGER" property="forwardCount" />
+    <result column="category_name" jdbcType="VARCHAR" property="categoryName" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.mtcarpenter.mall.model.CmsSubject">
+    <result column="content" jdbcType="LONGVARCHAR" property="content" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, category_id, title, pic, product_count, recommend_status, create_time, collect_count, 
+    read_count, comment_count, album_pics, description, show_status, forward_count, category_name
+  </sql>
+  <sql id="Blob_Column_List">
+    content
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.mtcarpenter.mall.model.CmsSubjectExample" resultMap="ResultMapWithBLOBs">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from cms_subject
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.mtcarpenter.mall.model.CmsSubjectExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cms_subject
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from cms_subject
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from cms_subject
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.mtcarpenter.mall.model.CmsSubjectExample">
+    delete from cms_subject
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.mtcarpenter.mall.model.CmsSubject">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_subject (category_id, title, pic, 
+      product_count, recommend_status, create_time, 
+      collect_count, read_count, comment_count, 
+      album_pics, description, show_status, 
+      forward_count, category_name, content
+      )
+    values (#{categoryId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{pic,jdbcType=VARCHAR}, 
+      #{productCount,jdbcType=INTEGER}, #{recommendStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{collectCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{commentCount,jdbcType=INTEGER}, 
+      #{albumPics,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{showStatus,jdbcType=INTEGER}, 
+      #{forwardCount,jdbcType=INTEGER}, #{categoryName,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.mtcarpenter.mall.model.CmsSubject">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_subject
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="categoryId != null">
+        category_id,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="pic != null">
+        pic,
+      </if>
+      <if test="productCount != null">
+        product_count,
+      </if>
+      <if test="recommendStatus != null">
+        recommend_status,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="collectCount != null">
+        collect_count,
+      </if>
+      <if test="readCount != null">
+        read_count,
+      </if>
+      <if test="commentCount != null">
+        comment_count,
+      </if>
+      <if test="albumPics != null">
+        album_pics,
+      </if>
+      <if test="description != null">
+        description,
+      </if>
+      <if test="showStatus != null">
+        show_status,
+      </if>
+      <if test="forwardCount != null">
+        forward_count,
+      </if>
+      <if test="categoryName != null">
+        category_name,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="categoryId != null">
+        #{categoryId,jdbcType=BIGINT},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="pic != null">
+        #{pic,jdbcType=VARCHAR},
+      </if>
+      <if test="productCount != null">
+        #{productCount,jdbcType=INTEGER},
+      </if>
+      <if test="recommendStatus != null">
+        #{recommendStatus,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="collectCount != null">
+        #{collectCount,jdbcType=INTEGER},
+      </if>
+      <if test="readCount != null">
+        #{readCount,jdbcType=INTEGER},
+      </if>
+      <if test="commentCount != null">
+        #{commentCount,jdbcType=INTEGER},
+      </if>
+      <if test="albumPics != null">
+        #{albumPics,jdbcType=VARCHAR},
+      </if>
+      <if test="description != null">
+        #{description,jdbcType=VARCHAR},
+      </if>
+      <if test="showStatus != null">
+        #{showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="forwardCount != null">
+        #{forwardCount,jdbcType=INTEGER},
+      </if>
+      <if test="categoryName != null">
+        #{categoryName,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.mtcarpenter.mall.model.CmsSubjectExample" resultType="java.lang.Long">
+    select count(*) from cms_subject
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cms_subject
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.categoryId != null">
+        category_id = #{record.categoryId,jdbcType=BIGINT},
+      </if>
+      <if test="record.title != null">
+        title = #{record.title,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pic != null">
+        pic = #{record.pic,jdbcType=VARCHAR},
+      </if>
+      <if test="record.productCount != null">
+        product_count = #{record.productCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.recommendStatus != null">
+        recommend_status = #{record.recommendStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.collectCount != null">
+        collect_count = #{record.collectCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.readCount != null">
+        read_count = #{record.readCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.commentCount != null">
+        comment_count = #{record.commentCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.albumPics != null">
+        album_pics = #{record.albumPics,jdbcType=VARCHAR},
+      </if>
+      <if test="record.description != null">
+        description = #{record.description,jdbcType=VARCHAR},
+      </if>
+      <if test="record.showStatus != null">
+        show_status = #{record.showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.forwardCount != null">
+        forward_count = #{record.forwardCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.categoryName != null">
+        category_name = #{record.categoryName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.content != null">
+        content = #{record.content,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    update cms_subject
+    set id = #{record.id,jdbcType=BIGINT},
+      category_id = #{record.categoryId,jdbcType=BIGINT},
+      title = #{record.title,jdbcType=VARCHAR},
+      pic = #{record.pic,jdbcType=VARCHAR},
+      product_count = #{record.productCount,jdbcType=INTEGER},
+      recommend_status = #{record.recommendStatus,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      collect_count = #{record.collectCount,jdbcType=INTEGER},
+      read_count = #{record.readCount,jdbcType=INTEGER},
+      comment_count = #{record.commentCount,jdbcType=INTEGER},
+      album_pics = #{record.albumPics,jdbcType=VARCHAR},
+      description = #{record.description,jdbcType=VARCHAR},
+      show_status = #{record.showStatus,jdbcType=INTEGER},
+      forward_count = #{record.forwardCount,jdbcType=INTEGER},
+      category_name = #{record.categoryName,jdbcType=VARCHAR},
+      content = #{record.content,jdbcType=LONGVARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cms_subject
+    set id = #{record.id,jdbcType=BIGINT},
+      category_id = #{record.categoryId,jdbcType=BIGINT},
+      title = #{record.title,jdbcType=VARCHAR},
+      pic = #{record.pic,jdbcType=VARCHAR},
+      product_count = #{record.productCount,jdbcType=INTEGER},
+      recommend_status = #{record.recommendStatus,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      collect_count = #{record.collectCount,jdbcType=INTEGER},
+      read_count = #{record.readCount,jdbcType=INTEGER},
+      comment_count = #{record.commentCount,jdbcType=INTEGER},
+      album_pics = #{record.albumPics,jdbcType=VARCHAR},
+      description = #{record.description,jdbcType=VARCHAR},
+      show_status = #{record.showStatus,jdbcType=INTEGER},
+      forward_count = #{record.forwardCount,jdbcType=INTEGER},
+      category_name = #{record.categoryName,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.mtcarpenter.mall.model.CmsSubject">
+    update cms_subject
+    <set>
+      <if test="categoryId != null">
+        category_id = #{categoryId,jdbcType=BIGINT},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="pic != null">
+        pic = #{pic,jdbcType=VARCHAR},
+      </if>
+      <if test="productCount != null">
+        product_count = #{productCount,jdbcType=INTEGER},
+      </if>
+      <if test="recommendStatus != null">
+        recommend_status = #{recommendStatus,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="collectCount != null">
+        collect_count = #{collectCount,jdbcType=INTEGER},
+      </if>
+      <if test="readCount != null">
+        read_count = #{readCount,jdbcType=INTEGER},
+      </if>
+      <if test="commentCount != null">
+        comment_count = #{commentCount,jdbcType=INTEGER},
+      </if>
+      <if test="albumPics != null">
+        album_pics = #{albumPics,jdbcType=VARCHAR},
+      </if>
+      <if test="description != null">
+        description = #{description,jdbcType=VARCHAR},
+      </if>
+      <if test="showStatus != null">
+        show_status = #{showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="forwardCount != null">
+        forward_count = #{forwardCount,jdbcType=INTEGER},
+      </if>
+      <if test="categoryName != null">
+        category_name = #{categoryName,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.mtcarpenter.mall.model.CmsSubject">
+    update cms_subject
+    set category_id = #{categoryId,jdbcType=BIGINT},
+      title = #{title,jdbcType=VARCHAR},
+      pic = #{pic,jdbcType=VARCHAR},
+      product_count = #{productCount,jdbcType=INTEGER},
+      recommend_status = #{recommendStatus,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      collect_count = #{collectCount,jdbcType=INTEGER},
+      read_count = #{readCount,jdbcType=INTEGER},
+      comment_count = #{commentCount,jdbcType=INTEGER},
+      album_pics = #{albumPics,jdbcType=VARCHAR},
+      description = #{description,jdbcType=VARCHAR},
+      show_status = #{showStatus,jdbcType=INTEGER},
+      forward_count = #{forwardCount,jdbcType=INTEGER},
+      category_name = #{categoryName,jdbcType=VARCHAR},
+      content = #{content,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.mtcarpenter.mall.model.CmsSubject">
+    update cms_subject
+    set category_id = #{categoryId,jdbcType=BIGINT},
+      title = #{title,jdbcType=VARCHAR},
+      pic = #{pic,jdbcType=VARCHAR},
+      product_count = #{productCount,jdbcType=INTEGER},
+      recommend_status = #{recommendStatus,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      collect_count = #{collectCount,jdbcType=INTEGER},
+      read_count = #{readCount,jdbcType=INTEGER},
+      comment_count = #{commentCount,jdbcType=INTEGER},
+      album_pics = #{albumPics,jdbcType=VARCHAR},
+      description = #{description,jdbcType=VARCHAR},
+      show_status = #{showStatus,jdbcType=INTEGER},
+      forward_count = #{forwardCount,jdbcType=INTEGER},
+      category_name = #{categoryName,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 179 - 0
mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsSubjectProductRelationMapper.xml

@@ -0,0 +1,179 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.mapper.CmsSubjectProductRelationMapper">
+  <resultMap id="BaseResultMap" type="com.mtcarpenter.mall.model.CmsSubjectProductRelation">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="subject_id" jdbcType="BIGINT" property="subjectId" />
+    <result column="product_id" jdbcType="BIGINT" property="productId" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, subject_id, product_id
+  </sql>
+  <select id="selectByExample" parameterType="com.mtcarpenter.mall.model.CmsSubjectProductRelationExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cms_subject_product_relation
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from cms_subject_product_relation
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from cms_subject_product_relation
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.mtcarpenter.mall.model.CmsSubjectProductRelationExample">
+    delete from cms_subject_product_relation
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.mtcarpenter.mall.model.CmsSubjectProductRelation">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_subject_product_relation (subject_id, product_id)
+    values (#{subjectId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.mtcarpenter.mall.model.CmsSubjectProductRelation">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_subject_product_relation
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="subjectId != null">
+        subject_id,
+      </if>
+      <if test="productId != null">
+        product_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="subjectId != null">
+        #{subjectId,jdbcType=BIGINT},
+      </if>
+      <if test="productId != null">
+        #{productId,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.mtcarpenter.mall.model.CmsSubjectProductRelationExample" resultType="java.lang.Long">
+    select count(*) from cms_subject_product_relation
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cms_subject_product_relation
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.subjectId != null">
+        subject_id = #{record.subjectId,jdbcType=BIGINT},
+      </if>
+      <if test="record.productId != null">
+        product_id = #{record.productId,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cms_subject_product_relation
+    set id = #{record.id,jdbcType=BIGINT},
+      subject_id = #{record.subjectId,jdbcType=BIGINT},
+      product_id = #{record.productId,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.mtcarpenter.mall.model.CmsSubjectProductRelation">
+    update cms_subject_product_relation
+    <set>
+      <if test="subjectId != null">
+        subject_id = #{subjectId,jdbcType=BIGINT},
+      </if>
+      <if test="productId != null">
+        product_id = #{productId,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.mtcarpenter.mall.model.CmsSubjectProductRelation">
+    update cms_subject_product_relation
+    set subject_id = #{subjectId,jdbcType=BIGINT},
+      product_id = #{productId,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 226 - 0
mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsTopicCategoryMapper.xml

@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.mapper.CmsTopicCategoryMapper">
+  <resultMap id="BaseResultMap" type="com.mtcarpenter.mall.model.CmsTopicCategory">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="icon" jdbcType="VARCHAR" property="icon" />
+    <result column="subject_count" jdbcType="INTEGER" property="subjectCount" />
+    <result column="show_status" jdbcType="INTEGER" property="showStatus" />
+    <result column="sort" jdbcType="INTEGER" property="sort" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, name, icon, subject_count, show_status, sort
+  </sql>
+  <select id="selectByExample" parameterType="com.mtcarpenter.mall.model.CmsTopicCategoryExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cms_topic_category
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from cms_topic_category
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from cms_topic_category
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.mtcarpenter.mall.model.CmsTopicCategoryExample">
+    delete from cms_topic_category
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.mtcarpenter.mall.model.CmsTopicCategory">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_topic_category (name, icon, subject_count, 
+      show_status, sort)
+    values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{subjectCount,jdbcType=INTEGER}, 
+      #{showStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER})
+  </insert>
+  <insert id="insertSelective" parameterType="com.mtcarpenter.mall.model.CmsTopicCategory">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_topic_category
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="name != null">
+        name,
+      </if>
+      <if test="icon != null">
+        icon,
+      </if>
+      <if test="subjectCount != null">
+        subject_count,
+      </if>
+      <if test="showStatus != null">
+        show_status,
+      </if>
+      <if test="sort != null">
+        sort,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="icon != null">
+        #{icon,jdbcType=VARCHAR},
+      </if>
+      <if test="subjectCount != null">
+        #{subjectCount,jdbcType=INTEGER},
+      </if>
+      <if test="showStatus != null">
+        #{showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sort != null">
+        #{sort,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.mtcarpenter.mall.model.CmsTopicCategoryExample" resultType="java.lang.Long">
+    select count(*) from cms_topic_category
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cms_topic_category
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.name != null">
+        name = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.icon != null">
+        icon = #{record.icon,jdbcType=VARCHAR},
+      </if>
+      <if test="record.subjectCount != null">
+        subject_count = #{record.subjectCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.showStatus != null">
+        show_status = #{record.showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.sort != null">
+        sort = #{record.sort,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cms_topic_category
+    set id = #{record.id,jdbcType=BIGINT},
+      name = #{record.name,jdbcType=VARCHAR},
+      icon = #{record.icon,jdbcType=VARCHAR},
+      subject_count = #{record.subjectCount,jdbcType=INTEGER},
+      show_status = #{record.showStatus,jdbcType=INTEGER},
+      sort = #{record.sort,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.mtcarpenter.mall.model.CmsTopicCategory">
+    update cms_topic_category
+    <set>
+      <if test="name != null">
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="icon != null">
+        icon = #{icon,jdbcType=VARCHAR},
+      </if>
+      <if test="subjectCount != null">
+        subject_count = #{subjectCount,jdbcType=INTEGER},
+      </if>
+      <if test="showStatus != null">
+        show_status = #{showStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sort != null">
+        sort = #{sort,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.mtcarpenter.mall.model.CmsTopicCategory">
+    update cms_topic_category
+    set name = #{name,jdbcType=VARCHAR},
+      icon = #{icon,jdbcType=VARCHAR},
+      subject_count = #{subjectCount,jdbcType=INTEGER},
+      show_status = #{showStatus,jdbcType=INTEGER},
+      sort = #{sort,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 243 - 0
mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsTopicCommentMapper.xml

@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.mapper.CmsTopicCommentMapper">
+  <resultMap id="BaseResultMap" type="com.mtcarpenter.mall.model.CmsTopicComment">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="member_nick_name" jdbcType="VARCHAR" property="memberNickName" />
+    <result column="topic_id" jdbcType="BIGINT" property="topicId" />
+    <result column="member_icon" jdbcType="VARCHAR" property="memberIcon" />
+    <result column="content" jdbcType="VARCHAR" property="content" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="show_status" jdbcType="INTEGER" property="showStatus" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, member_nick_name, topic_id, member_icon, content, create_time, show_status
+  </sql>
+  <select id="selectByExample" parameterType="com.mtcarpenter.mall.model.CmsTopicCommentExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cms_topic_comment
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from cms_topic_comment
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from cms_topic_comment
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.mtcarpenter.mall.model.CmsTopicCommentExample">
+    delete from cms_topic_comment
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.mtcarpenter.mall.model.CmsTopicComment">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_topic_comment (member_nick_name, topic_id, member_icon, 
+      content, create_time, show_status
+      )
+    values (#{memberNickName,jdbcType=VARCHAR}, #{topicId,jdbcType=BIGINT}, #{memberIcon,jdbcType=VARCHAR}, 
+      #{content,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{showStatus,jdbcType=INTEGER}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.mtcarpenter.mall.model.CmsTopicComment">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_topic_comment
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="memberNickName != null">
+        member_nick_name,
+      </if>
+      <if test="topicId != null">
+        topic_id,
+      </if>
+      <if test="memberIcon != null">
+        member_icon,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="showStatus != null">
+        show_status,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="memberNickName != null">
+        #{memberNickName,jdbcType=VARCHAR},
+      </if>
+      <if test="topicId != null">
+        #{topicId,jdbcType=BIGINT},
+      </if>
+      <if test="memberIcon != null">
+        #{memberIcon,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="showStatus != null">
+        #{showStatus,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.mtcarpenter.mall.model.CmsTopicCommentExample" resultType="java.lang.Long">
+    select count(*) from cms_topic_comment
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cms_topic_comment
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.memberNickName != null">
+        member_nick_name = #{record.memberNickName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.topicId != null">
+        topic_id = #{record.topicId,jdbcType=BIGINT},
+      </if>
+      <if test="record.memberIcon != null">
+        member_icon = #{record.memberIcon,jdbcType=VARCHAR},
+      </if>
+      <if test="record.content != null">
+        content = #{record.content,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.showStatus != null">
+        show_status = #{record.showStatus,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cms_topic_comment
+    set id = #{record.id,jdbcType=BIGINT},
+      member_nick_name = #{record.memberNickName,jdbcType=VARCHAR},
+      topic_id = #{record.topicId,jdbcType=BIGINT},
+      member_icon = #{record.memberIcon,jdbcType=VARCHAR},
+      content = #{record.content,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      show_status = #{record.showStatus,jdbcType=INTEGER}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.mtcarpenter.mall.model.CmsTopicComment">
+    update cms_topic_comment
+    <set>
+      <if test="memberNickName != null">
+        member_nick_name = #{memberNickName,jdbcType=VARCHAR},
+      </if>
+      <if test="topicId != null">
+        topic_id = #{topicId,jdbcType=BIGINT},
+      </if>
+      <if test="memberIcon != null">
+        member_icon = #{memberIcon,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="showStatus != null">
+        show_status = #{showStatus,jdbcType=INTEGER},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.mtcarpenter.mall.model.CmsTopicComment">
+    update cms_topic_comment
+    set member_nick_name = #{memberNickName,jdbcType=VARCHAR},
+      topic_id = #{topicId,jdbcType=BIGINT},
+      member_icon = #{memberIcon,jdbcType=VARCHAR},
+      content = #{content,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      show_status = #{showStatus,jdbcType=INTEGER}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 375 - 0
mall-admin-cms/cms-mbg/src/main/resources/com/mtcarpenter/mall/mapper/CmsTopicMapper.xml

@@ -0,0 +1,375 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.mapper.CmsTopicMapper">
+  <resultMap id="BaseResultMap" type="com.mtcarpenter.mall.model.CmsTopic">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="category_id" jdbcType="BIGINT" property="categoryId" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
+    <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
+    <result column="attend_count" jdbcType="INTEGER" property="attendCount" />
+    <result column="attention_count" jdbcType="INTEGER" property="attentionCount" />
+    <result column="read_count" jdbcType="INTEGER" property="readCount" />
+    <result column="award_name" jdbcType="VARCHAR" property="awardName" />
+    <result column="attend_type" jdbcType="VARCHAR" property="attendType" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.mtcarpenter.mall.model.CmsTopic">
+    <result column="content" jdbcType="LONGVARCHAR" property="content" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, category_id, name, create_time, start_time, end_time, attend_count, attention_count, 
+    read_count, award_name, attend_type
+  </sql>
+  <sql id="Blob_Column_List">
+    content
+  </sql>
+  <select id="selectByExampleWithBLOBs" parameterType="com.mtcarpenter.mall.model.CmsTopicExample" resultMap="ResultMapWithBLOBs">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from cms_topic
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByExample" parameterType="com.mtcarpenter.mall.model.CmsTopicExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cms_topic
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    select 
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from cms_topic
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from cms_topic
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.mtcarpenter.mall.model.CmsTopicExample">
+    delete from cms_topic
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.mtcarpenter.mall.model.CmsTopic">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_topic (category_id, name, create_time, 
+      start_time, end_time, attend_count, 
+      attention_count, read_count, award_name, 
+      attend_type, content)
+    values (#{categoryId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{attendCount,jdbcType=INTEGER}, 
+      #{attentionCount,jdbcType=INTEGER}, #{readCount,jdbcType=INTEGER}, #{awardName,jdbcType=VARCHAR}, 
+      #{attendType,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.mtcarpenter.mall.model.CmsTopic">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cms_topic
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="categoryId != null">
+        category_id,
+      </if>
+      <if test="name != null">
+        name,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="startTime != null">
+        start_time,
+      </if>
+      <if test="endTime != null">
+        end_time,
+      </if>
+      <if test="attendCount != null">
+        attend_count,
+      </if>
+      <if test="attentionCount != null">
+        attention_count,
+      </if>
+      <if test="readCount != null">
+        read_count,
+      </if>
+      <if test="awardName != null">
+        award_name,
+      </if>
+      <if test="attendType != null">
+        attend_type,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="categoryId != null">
+        #{categoryId,jdbcType=BIGINT},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="startTime != null">
+        #{startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endTime != null">
+        #{endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="attendCount != null">
+        #{attendCount,jdbcType=INTEGER},
+      </if>
+      <if test="attentionCount != null">
+        #{attentionCount,jdbcType=INTEGER},
+      </if>
+      <if test="readCount != null">
+        #{readCount,jdbcType=INTEGER},
+      </if>
+      <if test="awardName != null">
+        #{awardName,jdbcType=VARCHAR},
+      </if>
+      <if test="attendType != null">
+        #{attendType,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.mtcarpenter.mall.model.CmsTopicExample" resultType="java.lang.Long">
+    select count(*) from cms_topic
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cms_topic
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.categoryId != null">
+        category_id = #{record.categoryId,jdbcType=BIGINT},
+      </if>
+      <if test="record.name != null">
+        name = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.startTime != null">
+        start_time = #{record.startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.endTime != null">
+        end_time = #{record.endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.attendCount != null">
+        attend_count = #{record.attendCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.attentionCount != null">
+        attention_count = #{record.attentionCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.readCount != null">
+        read_count = #{record.readCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.awardName != null">
+        award_name = #{record.awardName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.attendType != null">
+        attend_type = #{record.attendType,jdbcType=VARCHAR},
+      </if>
+      <if test="record.content != null">
+        content = #{record.content,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExampleWithBLOBs" parameterType="map">
+    update cms_topic
+    set id = #{record.id,jdbcType=BIGINT},
+      category_id = #{record.categoryId,jdbcType=BIGINT},
+      name = #{record.name,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      start_time = #{record.startTime,jdbcType=TIMESTAMP},
+      end_time = #{record.endTime,jdbcType=TIMESTAMP},
+      attend_count = #{record.attendCount,jdbcType=INTEGER},
+      attention_count = #{record.attentionCount,jdbcType=INTEGER},
+      read_count = #{record.readCount,jdbcType=INTEGER},
+      award_name = #{record.awardName,jdbcType=VARCHAR},
+      attend_type = #{record.attendType,jdbcType=VARCHAR},
+      content = #{record.content,jdbcType=LONGVARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cms_topic
+    set id = #{record.id,jdbcType=BIGINT},
+      category_id = #{record.categoryId,jdbcType=BIGINT},
+      name = #{record.name,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      start_time = #{record.startTime,jdbcType=TIMESTAMP},
+      end_time = #{record.endTime,jdbcType=TIMESTAMP},
+      attend_count = #{record.attendCount,jdbcType=INTEGER},
+      attention_count = #{record.attentionCount,jdbcType=INTEGER},
+      read_count = #{record.readCount,jdbcType=INTEGER},
+      award_name = #{record.awardName,jdbcType=VARCHAR},
+      attend_type = #{record.attendType,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.mtcarpenter.mall.model.CmsTopic">
+    update cms_topic
+    <set>
+      <if test="categoryId != null">
+        category_id = #{categoryId,jdbcType=BIGINT},
+      </if>
+      <if test="name != null">
+        name = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="startTime != null">
+        start_time = #{startTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="endTime != null">
+        end_time = #{endTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="attendCount != null">
+        attend_count = #{attendCount,jdbcType=INTEGER},
+      </if>
+      <if test="attentionCount != null">
+        attention_count = #{attentionCount,jdbcType=INTEGER},
+      </if>
+      <if test="readCount != null">
+        read_count = #{readCount,jdbcType=INTEGER},
+      </if>
+      <if test="awardName != null">
+        award_name = #{awardName,jdbcType=VARCHAR},
+      </if>
+      <if test="attendType != null">
+        attend_type = #{attendType,jdbcType=VARCHAR},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.mtcarpenter.mall.model.CmsTopic">
+    update cms_topic
+    set category_id = #{categoryId,jdbcType=BIGINT},
+      name = #{name,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      start_time = #{startTime,jdbcType=TIMESTAMP},
+      end_time = #{endTime,jdbcType=TIMESTAMP},
+      attend_count = #{attendCount,jdbcType=INTEGER},
+      attention_count = #{attentionCount,jdbcType=INTEGER},
+      read_count = #{readCount,jdbcType=INTEGER},
+      award_name = #{awardName,jdbcType=VARCHAR},
+      attend_type = #{attendType,jdbcType=VARCHAR},
+      content = #{content,jdbcType=LONGVARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.mtcarpenter.mall.model.CmsTopic">
+    update cms_topic
+    set category_id = #{categoryId,jdbcType=BIGINT},
+      name = #{name,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      start_time = #{startTime,jdbcType=TIMESTAMP},
+      end_time = #{endTime,jdbcType=TIMESTAMP},
+      attend_count = #{attendCount,jdbcType=INTEGER},
+      attention_count = #{attentionCount,jdbcType=INTEGER},
+      read_count = #{readCount,jdbcType=INTEGER},
+      award_name = #{awardName,jdbcType=VARCHAR},
+      attend_type = #{attendType,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 4 - 0
mall-admin-cms/cms-mbg/src/main/resources/generator.properties

@@ -0,0 +1,4 @@
+jdbc.driverClass=com.mysql.cj.jdbc.Driver
+jdbc.connectionURL=jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+jdbc.userId=root
+jdbc.password=123456

+ 44 - 0
mall-admin-cms/cms-mbg/src/main/resources/generatorConfig.xml

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE generatorConfiguration
+        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
+        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
+
+<generatorConfiguration>
+    <properties resource="generator.properties"/>
+    <context id="MySqlContext" targetRuntime="MyBatis3" defaultModelType="flat">
+        <property name="beginningDelimiter" value="`"/>
+        <property name="endingDelimiter" value="`"/>
+        <property name="javaFileEncoding" value="UTF-8"/>
+        <!-- 为模型生成序列化方法-->
+        <plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>
+        <!-- 为生成的Java模型创建一个toString方法 -->
+        <plugin type="org.mybatis.generator.plugins.ToStringPlugin"/>
+        <!--生成mapper.xml时覆盖原文件-->
+        <plugin type="org.mybatis.generator.plugins.UnmergeableXmlMappersPlugin" />
+        <commentGenerator type="com.mtcarpenter.mall.CommentGenerator">
+            <!-- 是否去除自动生成的注释 true:是 : false:否 -->
+            <property name="suppressAllComments" value="true"/>
+            <property name="suppressDate" value="true"/>
+            <property name="addRemarkComments" value="true"/>
+        </commentGenerator>
+
+        <jdbcConnection driverClass="${jdbc.driverClass}"
+                        connectionURL="${jdbc.connectionURL}"
+                        userId="${jdbc.userId}"
+                        password="${jdbc.password}">
+            <!--解决mysql驱动升级到8.0后不生成指定数据库代码的问题-->
+            <property name="nullCatalogMeansCurrent" value="true" />
+        </jdbcConnection>
+
+        <javaModelGenerator targetPackage="com.mtcarpenter.mall.model" targetProject="mall-admin-cms\cms-mbg\src\main\java"/>
+
+        <sqlMapGenerator targetPackage="com.mtcarpenter.mall.mapper" targetProject="mall-admin-cms\cms-mbg\src\main\resources"/>
+
+        <javaClientGenerator type="XMLMAPPER" targetPackage="com.mtcarpenter.mall.mapper"
+                             targetProject="mall-admin-cms\cms-mbg\src\main\java"/>
+        <!--生成全部表tableName设为%-->
+        <table tableName="cms%">
+            <generatedKey column="id" sqlStatement="MySql" identity="true"/>
+        </table>
+    </context>
+</generatorConfiguration>

+ 70 - 0
mall-admin-cms/cms-server/pom.xml

@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>mall-admin-cms</artifactId>
+        <groupId>com.mtcarpenter</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>jar</packaging>
+    <artifactId>cms-server</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.mtcarpenter</groupId>
+            <artifactId>cms-common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>com.mtcarpenter</groupId>
+            <artifactId>pms-common</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>com.mtcarpenter</groupId>
+            <artifactId>cms-mbg</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <!-- nacos discovery-->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
+        </dependency>
+        <!-- nacos config -->
+        <dependency>
+            <groupId>com.alibaba.cloud</groupId>
+            <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
+        </dependency>
+        <!--zipkin-->
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-zipkin</artifactId>
+        </dependency>
+        <!-- spring boot admin client -->
+        <dependency>
+            <groupId>de.codecentric</groupId>
+            <artifactId>spring-boot-admin-starter-client</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>net.logstash.logback</groupId>
+            <artifactId>logstash-logback-encoder</artifactId>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+</project>

+ 16 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/CmsAdminApplication.java

@@ -0,0 +1,16 @@
+package com.mtcarpenter.mall;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+/**
+ * @author mtcarpenter
+ * @github https://github.com/mtcarpenter/mall-cloud-alibaba
+ * @desc 微信公众号:山间木匠
+ */
+@SpringBootApplication
+public class CmsAdminApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(CmsAdminApplication.class, args);
+    }
+}

+ 43 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/component/BindingResultAspect.java

@@ -0,0 +1,43 @@
+package com.mtcarpenter.mall.component;
+
+import com.mtcarpenter.mall.common.api.CommonResult;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Pointcut;
+import org.springframework.core.annotation.Order;
+import org.springframework.stereotype.Component;
+import org.springframework.validation.BindingResult;
+import org.springframework.validation.FieldError;
+
+/**
+ * HibernateValidator错误结果处理切面
+ * Created by macro on 2018/4/26.
+ */
+@Aspect
+@Component
+@Order(2)
+public class BindingResultAspect {
+    @Pointcut("execution(public * com.mtcarpenter.mall.controller.*.*(..))")
+    public void BindingResult() {
+    }
+
+    @Around("BindingResult()")
+    public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
+        Object[] args = joinPoint.getArgs();
+        for (Object arg : args) {
+            if (arg instanceof BindingResult) {
+                BindingResult result = (BindingResult) arg;
+                if (result.hasErrors()) {
+                    FieldError fieldError = result.getFieldError();
+                    if(fieldError!=null){
+                        return CommonResult.validateFailed(fieldError.getDefaultMessage());
+                    }else{
+                        return CommonResult.validateFailed();
+                    }
+                }
+            }
+        }
+        return joinPoint.proceed();
+    }
+}

+ 15 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/config/MyBatisConfig.java

@@ -0,0 +1,15 @@
+package com.mtcarpenter.mall.config;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.transaction.annotation.EnableTransactionManagement;
+
+/**
+ * MyBatis相关配置
+ * Created by macro on 2019/4/8.
+ */
+@Configuration
+@EnableTransactionManagement
+@MapperScan({"com.mtcarpenter.mall.mapper","com.mtcarpenter.mall.dao"})
+public class MyBatisConfig {
+}

+ 77 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/config/Swagger2Config.java

@@ -0,0 +1,77 @@
+package com.mtcarpenter.mall.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.*;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spi.service.contexts.SecurityContext;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ *  Swagger API文档相关配置
+ * Created by macro on 2018/4/26.
+ */
+@Configuration
+@EnableSwagger2
+public class Swagger2Config {
+    @Bean
+    public Docket createRestApi(){
+        return new Docket(DocumentationType.SWAGGER_2)
+                .apiInfo(apiInfo())
+                .select()
+                .apis(RequestHandlerSelectors.basePackage("com.mtcarpenter.mall.controller"))
+                .paths(PathSelectors.any())
+                .build()
+                .securitySchemes(securitySchemes())
+                .securityContexts(securityContexts());
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder()
+                .title("mall后台系统")
+                .description("mall后台模块")
+                .contact(new Contact("macro","",""))
+                .version("1.0")
+                .build();
+    }
+
+    private List<ApiKey> securitySchemes() {
+        //设置请求头信息
+        List<ApiKey> result = new ArrayList<>();
+        ApiKey apiKey = new ApiKey("Authorization", "Authorization", "header");
+        result.add(apiKey);
+        return result;
+    }
+
+    private List<SecurityContext> securityContexts() {
+        //设置需要登录认证的路径
+        List<SecurityContext> result = new ArrayList<>();
+        result.add(getContextByPath("/brand/.*"));
+        result.add(getContextByPath("/product/.*"));
+        result.add(getContextByPath("/productCategory/.*"));
+        return result;
+    }
+
+    private SecurityContext getContextByPath(String pathRegex){
+        return SecurityContext.builder()
+                .securityReferences(defaultAuth())
+                .forPaths(PathSelectors.regex(pathRegex))
+                .build();
+    }
+
+    private List<SecurityReference> defaultAuth() {
+        List<SecurityReference> result = new ArrayList<>();
+        AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
+        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
+        authorizationScopes[0] = authorizationScope;
+        result.add(new SecurityReference("Authorization", authorizationScopes));
+        return result;
+    }
+}

+ 62 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/controller/CmsPrefrenceAreaController.java

@@ -0,0 +1,62 @@
+package com.mtcarpenter.mall.controller;
+
+import com.mtcarpenter.mall.common.CmsPrefrenceAreaProductRelationInput;
+import com.mtcarpenter.mall.common.api.CommonResult;
+import com.mtcarpenter.mall.model.CmsPrefrenceArea;
+import com.mtcarpenter.mall.service.CmsPrefrenceAreaService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商品优选管理Controller
+ * Created by macro on 2018/6/1.
+ */
+@Controller
+@Api(tags = "CmsPrefrenceAreaController", description = "商品优选管理")
+@RequestMapping("/prefrenceArea")
+public class CmsPrefrenceAreaController {
+    @Autowired
+    private CmsPrefrenceAreaService prefrenceAreaService;
+
+    @ApiOperation("获取所有商品优选")
+    @RequestMapping(value = "/listAll", method = RequestMethod.GET)
+    @ResponseBody
+    public CommonResult<List<CmsPrefrenceArea>> listAll() {
+        List<CmsPrefrenceArea> prefrenceAreaList = prefrenceAreaService.listAll();
+        return CommonResult.success(prefrenceAreaList);
+    }
+
+    @ApiOperation("批量关联专题")
+    @RequestMapping(value = "/relateAndInsertList", method = RequestMethod.POST)
+    @ResponseBody
+    public CommonResult relateAndInsertList(@RequestBody List<CmsPrefrenceAreaProductRelationInput> productRelationInput,
+                                            @RequestParam("productId") Long productId) {
+        prefrenceAreaService.relateAndInsertList(productRelationInput, productId);
+        return CommonResult.success(null);
+    }
+
+    @ApiOperation("批量更新关联专题")
+    @RequestMapping(value = "/relateAndUpdateList", method = RequestMethod.POST)
+    @ResponseBody
+    public CommonResult relateAndUpdateList(@RequestBody List<CmsPrefrenceAreaProductRelationInput> productRelationInput,
+                                            @RequestParam("productId") Long productId) {
+
+        prefrenceAreaService.relateAndUpdateList(productRelationInput, productId);
+        return CommonResult.success(null);
+    }
+
+
+    @ApiOperation("通过id查询关联专题")
+    @RequestMapping(value = "/relationByProductId", method = RequestMethod.GET)
+    @ResponseBody
+    public CommonResult<List<CmsPrefrenceAreaProductRelationInput>> relationByProductId(@RequestParam("productId") Long productId) {
+        List<CmsPrefrenceAreaProductRelationInput> productRelationList = prefrenceAreaService.relationByProductId(productId);
+        return CommonResult.success(productRelationList);
+    }
+
+}

+ 71 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/controller/CmsSubjectController.java

@@ -0,0 +1,71 @@
+package com.mtcarpenter.mall.controller;
+
+import com.mtcarpenter.mall.common.api.CommonPage;
+import com.mtcarpenter.mall.common.api.CommonResult;
+import com.mtcarpenter.mall.model.CmsSubject;
+import com.mtcarpenter.mall.model.CmsSubjectProductRelation;
+import com.mtcarpenter.mall.service.CmsSubjectService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import com.mtcarpenter.mall.common.CmsSubjectProductRelationInput;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 商品专题Controller
+ * Created by macro on 2018/6/1.
+ */
+@Controller
+@Api(tags = "CmsSubjectController", description = "商品专题管理")
+@RequestMapping("/subject")
+public class CmsSubjectController {
+    @Autowired
+    private CmsSubjectService subjectService;
+
+    @ApiOperation("获取全部商品专题")
+    @RequestMapping(value = "/listAll", method = RequestMethod.GET)
+    @ResponseBody
+    public CommonResult<List<CmsSubject>> listAll() {
+        List<CmsSubject> subjectList = subjectService.listAll();
+        return CommonResult.success(subjectList);
+    }
+
+    @ApiOperation(value = "根据专题名称分页获取专题")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    @ResponseBody
+    public CommonResult<CommonPage<CmsSubject>> getList(@RequestParam(value = "keyword", required = false) String keyword,
+                                                        @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+                                                        @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
+        List<CmsSubject> subjectList = subjectService.list(keyword, pageNum, pageSize);
+        return CommonResult.success(CommonPage.restPage(subjectList));
+    }
+
+    @ApiOperation("批量插入关联优选")
+    @RequestMapping(value = "/relateAndInsertList", method = RequestMethod.POST)
+    @ResponseBody
+    public CommonResult relateAndInsertList(@RequestBody List<CmsSubjectProductRelationInput> productRelationInputs ,
+                                            @RequestParam("productId") Long productId ) {
+        subjectService.relateAndInsertList(productRelationInputs,productId);
+        return CommonResult.success(null);
+    }
+
+    @ApiOperation("批量更新关联优选")
+    @RequestMapping(value = "/relateAndUpdateList", method = RequestMethod.POST)
+    @ResponseBody
+    public CommonResult relateAndUpdateList(@RequestBody List<CmsSubjectProductRelationInput> productRelationInputs ,
+                                            @RequestParam("productId") Long productId ) {
+        subjectService.relateAndUpdateList(productRelationInputs,productId);
+        return CommonResult.success(null);
+    }
+
+    @ApiOperation("通过id查询关联优选")
+    @RequestMapping(value = "/relationByProductId", method = RequestMethod.GET)
+    @ResponseBody
+    public CommonResult<List<CmsSubjectProductRelationInput>> relationByProductId(@RequestParam("productId") Long productId ) {
+        List<CmsSubjectProductRelationInput> productRelationList = subjectService.relationByProductId(productId);
+        return CommonResult.success(productRelationList);
+    }
+}

+ 28 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/controller/ConfigController.java

@@ -0,0 +1,28 @@
+package com.mtcarpenter.mall.controller;
+
+import com.mtcarpenter.mall.common.api.CommonResult;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author mtcarpenter
+ * @github https://github.com/mtcarpenter/mall-cloud-alibaba
+ * @desc 微信公众号:山间木匠
+ */
+@RestController
+@RequestMapping("/config")
+@RefreshScope
+public class ConfigController {
+
+    @Value("${spring.application.name}")
+    private String applicationName;
+
+    @RequestMapping("/get")
+    public CommonResult get() {
+        return CommonResult.success("nacos config RefreshScope :" + applicationName);
+    }
+
+
+}

+ 25 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/dao/CmsPrefrenceAreaProductRelationDao.java

@@ -0,0 +1,25 @@
+package com.mtcarpenter.mall.dao;
+
+import com.mtcarpenter.mall.model.CmsPrefrenceAreaProductRelation;
+import com.mtcarpenter.mall.model.CmsSubjectProductRelation;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 自定义优选和商品关系操作Dao
+ * Created by macro on 2018/4/26.
+ */
+public interface CmsPrefrenceAreaProductRelationDao {
+    /**
+     * 批量创建
+     */
+    int insertList(@Param("list") List<CmsPrefrenceAreaProductRelation> prefrenceAreaProductRelationList);
+
+    /**
+     * 根据商品 id 获取 优选
+     * @param productId
+     * @return
+     */
+    List<CmsPrefrenceAreaProductRelation> selectPrefrenceAreaProductRelationByProductId(@Param("productId") Long productId);
+ }

+ 25 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/dao/CmsSubjectProductRelationDao.java

@@ -0,0 +1,25 @@
+package com.mtcarpenter.mall.dao;
+
+import com.mtcarpenter.mall.model.CmsSubjectProductRelation;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 自定义商品和专题关系操作Dao
+ * Created by macro on 2018/4/26.
+ */
+public interface CmsSubjectProductRelationDao {
+    /**
+     * 批量创建
+     */
+    int insertList(@Param("list") List<CmsSubjectProductRelation> subjectProductRelationList);
+
+    /**
+     * 根据商品id 查询专题信息
+     * @param productId
+     * @return
+     */
+    List<CmsSubjectProductRelation> selectSubjectProductRelationByProductId(@Param("productId") Long productId);
+
+}

+ 38 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/service/CmsPrefrenceAreaService.java

@@ -0,0 +1,38 @@
+package com.mtcarpenter.mall.service;
+
+import com.mtcarpenter.mall.model.CmsPrefrenceArea;
+import com.mtcarpenter.mall.common.CmsPrefrenceAreaProductRelationInput;
+
+import java.util.List;
+
+/**
+ * 优选专区Service
+ * Created by macro on 2018/6/1.
+ */
+public interface CmsPrefrenceAreaService {
+    /**
+     * 获取所有优选专区
+     */
+    List<CmsPrefrenceArea> listAll();
+
+    /**
+     * 批量 插入 优选专区
+     * @param productRelationInput
+     * @param productId
+     */
+    void relateAndInsertList(List<CmsPrefrenceAreaProductRelationInput> productRelationInput, Long productId);
+
+    /**
+     * 批量 更新 优选专区
+     * @param productRelationInput
+     * @param productId
+     */
+    void relateAndUpdateList(List<CmsPrefrenceAreaProductRelationInput> productRelationInput, Long productId);
+
+    /**
+     * 通过id 查询  优选专区
+     * @param productId
+     * @return
+     */
+    List<CmsPrefrenceAreaProductRelationInput> relationByProductId(Long productId);
+}

+ 43 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/service/CmsSubjectService.java

@@ -0,0 +1,43 @@
+package com.mtcarpenter.mall.service;
+
+import com.mtcarpenter.mall.model.CmsSubject;
+import com.mtcarpenter.mall.common.CmsSubjectProductRelationInput;
+
+import java.util.List;
+
+/**
+ * 商品专题Service
+ * Created by macro on 2018/6/1.
+ */
+public interface CmsSubjectService {
+    /**
+     * 查询所有专题
+     */
+    List<CmsSubject> listAll();
+
+    /**
+     * 分页查询专题
+     */
+    List<CmsSubject> list(String keyword, Integer pageNum, Integer pageSize);
+
+    /**
+     * 批量插入专题
+     * @param productRelationInputs
+     * @param productId
+     */
+    void relateAndInsertList(List<CmsSubjectProductRelationInput> productRelationInputs, Long productId);
+
+    /**
+     * 批量更新
+     * @param productRelationInputs
+     * @param productId
+     */
+    void relateAndUpdateList(List<CmsSubjectProductRelationInput> productRelationInputs, Long productId);
+
+    /**
+     * 通过id查询关联优选
+     * @param productId
+     * @return
+     */
+    List<CmsSubjectProductRelationInput> relationByProductId(Long productId);
+}

+ 80 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/service/impl/CmsPrefrenceAreaServiceImpl.java

@@ -0,0 +1,80 @@
+package com.mtcarpenter.mall.service.impl;
+
+import com.mtcarpenter.mall.dao.CmsPrefrenceAreaProductRelationDao;
+import com.mtcarpenter.mall.mapper.CmsPrefrenceAreaMapper;
+import com.mtcarpenter.mall.mapper.CmsPrefrenceAreaProductRelationMapper;
+import com.mtcarpenter.mall.model.*;
+import com.mtcarpenter.mall.service.CmsPrefrenceAreaService;
+import com.mtcarpenter.mall.common.CmsPrefrenceAreaProductRelationInput;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 商品优选Service实现类
+ * Created by macro on 2018/6/1.
+ */
+@Service
+public class CmsPrefrenceAreaServiceImpl implements CmsPrefrenceAreaService {
+    @Autowired
+    private CmsPrefrenceAreaMapper prefrenceAreaMapper;
+
+    @Autowired
+    private CmsPrefrenceAreaProductRelationDao cmsPrefrenceAreaProductRelationDao;
+
+    @Autowired
+    private CmsPrefrenceAreaProductRelationMapper cmsPrefrenceAreaProductRelationMapper;
+
+
+    @Override
+    public List<CmsPrefrenceArea> listAll() {
+        return prefrenceAreaMapper.selectByExample(new CmsPrefrenceAreaExample());
+    }
+
+    @Override
+    public void relateAndInsertList(List<CmsPrefrenceAreaProductRelationInput> productRelationInput, Long productId) {
+        List<CmsPrefrenceAreaProductRelation> productRelationList = relationConvert(productRelationInput, productId);
+        cmsPrefrenceAreaProductRelationDao.insertList(productRelationList);
+    }
+
+
+
+    @Override
+    public void relateAndUpdateList(List<CmsPrefrenceAreaProductRelationInput> productRelationInput, Long productId) {
+        List<CmsPrefrenceAreaProductRelation> productRelationList = relationConvert(productRelationInput, productId);
+        //关联优选
+        CmsPrefrenceAreaProductRelationExample preferenceAreaExample = new CmsPrefrenceAreaProductRelationExample();
+        preferenceAreaExample.createCriteria().andProductIdEqualTo(productId);
+        cmsPrefrenceAreaProductRelationMapper.deleteByExample(preferenceAreaExample);
+        cmsPrefrenceAreaProductRelationDao.insertList(productRelationList);
+    }
+
+    /**
+     * 通过id 查询  优选专区
+     *
+     * @param productId
+     * @return
+     */
+    @Override
+    public List<CmsPrefrenceAreaProductRelationInput> relationByProductId(Long productId) {
+        List<CmsPrefrenceAreaProductRelation> productRelationList = cmsPrefrenceAreaProductRelationDao.selectPrefrenceAreaProductRelationByProductId(productId);
+        List<CmsPrefrenceAreaProductRelationInput> productRelationInputs = productRelationList.stream().map(p -> {
+            CmsPrefrenceAreaProductRelationInput relationInput = new CmsPrefrenceAreaProductRelationInput();
+            BeanUtils.copyProperties(p, relationInput);
+            return relationInput;
+        }).collect(Collectors.toList());
+        return productRelationInputs;
+    }
+
+    private List<CmsPrefrenceAreaProductRelation> relationConvert(List<CmsPrefrenceAreaProductRelationInput> productRelationInput, Long productId) {
+        return productRelationInput.stream().map(p -> {
+            CmsPrefrenceAreaProductRelation cmsSubjectProductRelation = new CmsPrefrenceAreaProductRelation();
+            BeanUtils.copyProperties(p, cmsSubjectProductRelation);
+            cmsSubjectProductRelation.setProductId(productId);
+            return cmsSubjectProductRelation;
+        }).collect(Collectors.toList());
+    }
+}

+ 91 - 0
mall-admin-cms/cms-server/src/main/java/com/mtcarpenter/mall/service/impl/CmsSubjectServiceImpl.java

@@ -0,0 +1,91 @@
+package com.mtcarpenter.mall.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.mtcarpenter.mall.dao.CmsSubjectProductRelationDao;
+import com.mtcarpenter.mall.mapper.CmsSubjectMapper;
+import com.mtcarpenter.mall.mapper.CmsSubjectProductRelationMapper;
+import com.mtcarpenter.mall.model.CmsSubject;
+import com.mtcarpenter.mall.model.CmsSubjectExample;
+import com.mtcarpenter.mall.model.CmsSubjectProductRelation;
+import com.mtcarpenter.mall.model.CmsSubjectProductRelationExample;
+import com.mtcarpenter.mall.service.CmsSubjectService;
+import com.mtcarpenter.mall.common.CmsSubjectProductRelationInput;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.StringUtils;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 商品专题Service实现类
+ * Created by macro on 2018/6/1.
+ */
+@Service
+public class CmsSubjectServiceImpl implements CmsSubjectService {
+    @Autowired
+    private CmsSubjectMapper subjectMapper;
+
+    @Autowired
+    private CmsSubjectProductRelationDao subjectProductRelationDao;
+
+    @Autowired
+    private CmsSubjectProductRelationMapper subjectProductRelationMapper;
+
+
+    @Override
+    public List<CmsSubject> listAll() {
+        return subjectMapper.selectByExample(new CmsSubjectExample());
+    }
+
+    @Override
+    public List<CmsSubject> list(String keyword, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        CmsSubjectExample example = new CmsSubjectExample();
+        CmsSubjectExample.Criteria criteria = example.createCriteria();
+        if (!StringUtils.isEmpty(keyword)) {
+            criteria.andTitleLike("%" + keyword + "%");
+        }
+        return subjectMapper.selectByExample(example);
+    }
+
+    @Override
+    public void relateAndInsertList(List<CmsSubjectProductRelationInput> productRelationInputs, Long productId) {
+        List<CmsSubjectProductRelation> productRelationList = relationConvert(productRelationInputs, productId);
+        subjectProductRelationDao.insertList(productRelationList);
+    }
+
+
+
+    @Override
+    public void relateAndUpdateList(List<CmsSubjectProductRelationInput> productRelationInputs, Long productId) {
+        List<CmsSubjectProductRelation> productRelationList = relationConvert(productRelationInputs, productId);
+        //关联专题
+        CmsSubjectProductRelationExample subjectProductRelationExample = new CmsSubjectProductRelationExample();
+        subjectProductRelationExample.createCriteria().andProductIdEqualTo(productId);
+        subjectProductRelationMapper.deleteByExample(subjectProductRelationExample);
+        subjectProductRelationDao.insertList(productRelationList);
+    }
+
+    @Override
+    public List<CmsSubjectProductRelationInput> relationByProductId(Long productId) {
+        List<CmsSubjectProductRelation> productRelationList = subjectProductRelationDao.selectSubjectProductRelationByProductId(productId);
+        List<CmsSubjectProductRelationInput> productRelationInputs = productRelationList.stream().map(p -> {
+            CmsSubjectProductRelationInput cmsSubjectProductRelationInput = new CmsSubjectProductRelationInput();
+            BeanUtils.copyProperties(p, cmsSubjectProductRelationInput);
+            return cmsSubjectProductRelationInput;
+        }).collect(Collectors.toList());
+        return productRelationInputs;
+    }
+
+
+    private List<CmsSubjectProductRelation> relationConvert(List<CmsSubjectProductRelationInput> productRelationInputs, Long productId) {
+        return productRelationInputs.stream().map(p -> {
+            CmsSubjectProductRelation cmsSubjectProductRelation = new CmsSubjectProductRelation();
+            BeanUtils.copyProperties(p, cmsSubjectProductRelation);
+            cmsSubjectProductRelation.setProductId(productId);
+            return cmsSubjectProductRelation;
+        }).collect(Collectors.toList());
+    }
+}

+ 55 - 0
mall-admin-cms/cms-server/src/main/resources/application-dev.yml

@@ -0,0 +1,55 @@
+spring:
+  datasource:
+    url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
+    username: root
+    password: 123456
+    druid:
+      initial-size: 5 #连接池初始化大小
+      min-idle: 10 #最小空闲连接数
+      max-active: 20 #最大连接数
+      web-stat-filter:
+        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*" #不统计这些请求数据
+      stat-view-servlet: #访问监控网页的登录用户名和密码
+        login-username: druid
+        login-password: druid
+  redis:
+    host: localhost # Redis服务器地址
+    database: 0 # Redis数据库索引(默认为0)
+    port: 6379 # Redis服务器连接端口
+    password: # Redis服务器连接密码(默认为空)
+    timeout: 300ms # 连接超时时间(毫秒)
+
+  zipkin:
+    base-url: http://localhost:9411
+    locator:
+      discovery:
+        enabled: true
+  sleuth:
+    sampler:
+      # zipkin 抽样比例 在默认情况下,该值为0.1
+      probability: 1.0
+  boot:
+    admin:
+      client:
+        # admin 服务端的地址
+        url: http://localhost:8095
+
+management:
+  endpoints:
+    web:
+      exposure:
+        include: '*'
+  endpoint:
+    health:
+      # 展示详情
+      show-details: always
+
+mybatis:
+  mapper-locations:
+    - classpath:dao/*.xml
+    - classpath*:com/**/mapper/*.xml
+logging:
+  level:
+    root: info #日志配置DEBUG,INFO,WARN,ERROR
+    com.mtcarpenter.mall: debug
+

+ 16 - 0
mall-admin-cms/cms-server/src/main/resources/bootstrap.yml

@@ -0,0 +1,16 @@
+server:
+  port: 8085
+spring:
+  profiles:
+    # dev 默认为开发环境 , prod 线上环境
+    active: prod
+  application:
+    name: mall-admin-cms
+  cloud:
+    nacos:
+      discovery:
+        server-addr: 127.0.0.1:8848
+      config:
+        server-addr: 127.0.0.1:8848
+        prefix: mall-admin-cms
+        file-extension: yaml

+ 15 - 0
mall-admin-cms/cms-server/src/main/resources/dao/CmsPrefrenceAreaProductRelationDao.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.dao.CmsPrefrenceAreaProductRelationDao">
+    <insert id="insertList">
+        insert into cms_prefrence_area_product_relation (prefrence_area_id, product_id) values
+        <foreach collection="list" item="item" separator="," index="index">
+            (#{item.prefrenceAreaId,jdbcType=BIGINT},
+            #{item.productId,jdbcType=BIGINT})
+        </foreach>
+    </insert>
+
+    <select id="selectPrefrenceAreaProductRelationByProductId" resultMap="com.mtcarpenter.mall.mapper.CmsPrefrenceAreaProductRelationMapper.BaseResultMap">
+        select * from cms_prefrence_area_product_relation where product_id=#{productId}
+    </select>
+</mapper>

+ 14 - 0
mall-admin-cms/cms-server/src/main/resources/dao/CmsSubjectProductRelationDao.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.mtcarpenter.mall.dao.CmsSubjectProductRelationDao">
+    <insert id="insertList">
+        insert into cms_subject_product_relation (subject_id, product_id) values
+        <foreach collection="list" item="item" separator="," index="index">
+            (#{item.subjectId,jdbcType=BIGINT},
+            #{item.productId,jdbcType=BIGINT})
+        </foreach>
+    </insert>
+    <select id="selectSubjectProductRelationByProductId" resultMap="com.mtcarpenter.mall.mapper.CmsSubjectProductRelationMapper.BaseResultMap">
+        select * from cms_subject_product_relation where product_id=#{productId}
+    </select>
+</mapper>

+ 31 - 0
mall-admin-cms/cms-server/src/main/resources/logback-spring.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE configuration>
+<configuration>
+    <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
+    <include resource="org/springframework/boot/logging/logback/console-appender.xml"/>
+    <!--应用名称-->
+    <property name="APP_NAME" value="mall-admin"/>
+    <!--日志文件保存路径-->
+    <property name="LOG_FILE_PATH" value="${LOG_FILE:-${LOG_PATH:-${LOG_TEMP:-${java.io.tmpdir:-/tmp}}}/logs}"/>
+    <contextName>${APP_NAME}</contextName>
+    <!--每天记录日志到文件appender-->
+    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${LOG_FILE_PATH}/${APP_NAME}-%d{yyyy-MM-dd}.log</fileNamePattern>
+            <maxHistory>30</maxHistory>
+        </rollingPolicy>
+        <encoder>
+            <pattern>${FILE_LOG_PATTERN}</pattern>
+        </encoder>
+    </appender>
+    <!--输出到logstash的appender-->
+    <appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
+        <destination>localhost:4560</destination>
+        <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>
+    </appender>
+    <root level="INFO">
+        <appender-ref ref="CONSOLE"/>
+        <appender-ref ref="FILE"/>
+        <appender-ref ref="LOGSTASH"/>
+    </root>
+</configuration>

+ 25 - 0
mall-admin-cms/cms-server/src/test/java/com/mtcarpenter/mall/service/impl/CmsPrefrenceAreaServiceImplTest.java

@@ -0,0 +1,25 @@
+package com.mtcarpenter.mall.service.impl;
+
+import com.mtcarpenter.mall.service.CmsPrefrenceAreaService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import static org.junit.Assert.*;
+
+@SpringBootTest
+@RunWith(SpringRunner.class)
+public class CmsPrefrenceAreaServiceImplTest {
+
+
+    @Autowired
+    private CmsPrefrenceAreaService cmsPrefrenceAreaService;
+
+    @Test
+    public void listAll() {
+        System.out.println(cmsPrefrenceAreaService.listAll());
+
+    }
+}

+ 23 - 0
mall-admin-cms/pom.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>forest-cloud</artifactId>
+        <groupId>com.mtcarpenter</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <description>后端内容服务</description>
+
+
+    <artifactId>mall-admin-cms</artifactId>
+    <packaging>pom</packaging>
+    <modules>
+        <module>cms-common</module>
+        <module>cms-mbg</module>
+        <module>cms-server</module>
+    </modules>
+
+
+</project>

+ 15 - 0
mall-admin-oms/oms-common/pom.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>mall-admin-oms</artifactId>
+        <groupId>com.mtcarpenter</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>oms-common</artifactId>
+
+
+</project>

+ 33 - 0
mall-admin-oms/oms-mbg/pom.xml

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>mall-admin-oms</artifactId>
+        <groupId>com.mtcarpenter</groupId>
+        <version>0.0.1-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>oms-mbg</artifactId>
+
+    <dependencies>
+        <dependency>
+            <groupId>com.mtcarpenter</groupId>
+            <artifactId>mall-common</artifactId>
+            <version>${mall.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.generator</groupId>
+            <artifactId>mybatis-generator-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+    </dependencies>
+</project>

+ 73 - 0
mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/CommentGenerator.java

@@ -0,0 +1,73 @@
+package com.mtcarpenter.mall;
+
+import org.mybatis.generator.api.IntrospectedColumn;
+import org.mybatis.generator.api.IntrospectedTable;
+import org.mybatis.generator.api.dom.java.CompilationUnit;
+import org.mybatis.generator.api.dom.java.Field;
+import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
+import org.mybatis.generator.internal.DefaultCommentGenerator;
+import org.mybatis.generator.internal.util.StringUtility;
+
+import java.util.Properties;
+
+/**
+ * 自定义注释生成器
+ * Created by macro on 2018/4/26.
+ */
+public class CommentGenerator extends DefaultCommentGenerator {
+    private boolean addRemarkComments = false;
+    private static final String EXAMPLE_SUFFIX="Example";
+    private static final String API_MODEL_PROPERTY_FULL_CLASS_NAME="io.swagger.annotations.ApiModelProperty";
+
+    /**
+     * 设置用户配置的参数
+     */
+    @Override
+    public void addConfigurationProperties(Properties properties) {
+        super.addConfigurationProperties(properties);
+        this.addRemarkComments = StringUtility.isTrue(properties.getProperty("addRemarkComments"));
+    }
+
+    /**
+     * 给字段添加注释
+     */
+    @Override
+    public void addFieldComment(Field field, IntrospectedTable introspectedTable,
+                                IntrospectedColumn introspectedColumn) {
+        String remarks = introspectedColumn.getRemarks();
+        //根据参数和备注信息判断是否添加备注信息
+        if(addRemarkComments&&StringUtility.stringHasValue(remarks)){
+//            addFieldJavaDoc(field, remarks);
+            //数据库中特殊字符需要转义
+            if(remarks.contains("\"")){
+                remarks = remarks.replace("\"","'");
+            }
+            //给model的字段添加swagger注解
+            field.addJavaDocLine("@ApiModelProperty(value = \""+remarks+"\")");
+        }
+    }
+
+    /**
+     * 给model的字段添加注释
+     */
+    private void addFieldJavaDoc(Field field, String remarks) {
+        //文档注释开始
+        field.addJavaDocLine("/**");
+        //获取数据库字段的备注信息
+        String[] remarkLines = remarks.split(System.getProperty("line.separator"));
+        for(String remarkLine:remarkLines){
+            field.addJavaDocLine(" * "+remarkLine);
+        }
+        addJavadocTag(field, false);
+        field.addJavaDocLine(" */");
+    }
+
+    @Override
+    public void addJavaFileComment(CompilationUnit compilationUnit) {
+        super.addJavaFileComment(compilationUnit);
+        //只在model中添加swagger注解类的导入
+        if(!compilationUnit.isJavaInterface()&&!compilationUnit.getType().getFullyQualifiedName().contains(EXAMPLE_SUFFIX)){
+            compilationUnit.addImportedType(new FullyQualifiedJavaType(API_MODEL_PROPERTY_FULL_CLASS_NAME));
+        }
+    }
+}

+ 38 - 0
mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/Generator.java

@@ -0,0 +1,38 @@
+package com.mtcarpenter.mall;
+
+import org.mybatis.generator.api.MyBatisGenerator;
+import org.mybatis.generator.config.Configuration;
+import org.mybatis.generator.config.xml.ConfigurationParser;
+import org.mybatis.generator.internal.DefaultShellCallback;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 用于生产MBG的代码
+ * Created by macro on 2018/4/26.
+ */
+public class Generator {
+    public static void main(String[] args) throws Exception {
+        //MBG 执行过程中的警告信息
+        List<String> warnings = new ArrayList<String>();
+        //当生成的代码重复时,覆盖原代码
+        boolean overwrite = true;
+        //读取我们的 MBG 配置文件
+        InputStream is = Generator.class.getResourceAsStream("/generatorConfig.xml");
+        ConfigurationParser cp = new ConfigurationParser(warnings);
+        Configuration config = cp.parseConfiguration(is);
+        is.close();
+
+        DefaultShellCallback callback = new DefaultShellCallback(overwrite);
+        //创建 MBG
+        MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
+        //执行生成代码
+        myBatisGenerator.generate(null);
+        //输出警告信息
+        for (String warning : warnings) {
+            System.out.println(warning);
+        }
+    }
+}

+ 30 - 0
mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsCartItemMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.OmsCartItem;
+import com.mtcarpenter.mall.model.OmsCartItemExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface OmsCartItemMapper {
+    long countByExample(OmsCartItemExample example);
+
+    int deleteByExample(OmsCartItemExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(OmsCartItem record);
+
+    int insertSelective(OmsCartItem record);
+
+    List<OmsCartItem> selectByExample(OmsCartItemExample example);
+
+    OmsCartItem selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") OmsCartItem record, @Param("example") OmsCartItemExample example);
+
+    int updateByExample(@Param("record") OmsCartItem record, @Param("example") OmsCartItemExample example);
+
+    int updateByPrimaryKeySelective(OmsCartItem record);
+
+    int updateByPrimaryKey(OmsCartItem record);
+}

+ 30 - 0
mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsCompanyAddressMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.OmsCompanyAddress;
+import com.mtcarpenter.mall.model.OmsCompanyAddressExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface OmsCompanyAddressMapper {
+    long countByExample(OmsCompanyAddressExample example);
+
+    int deleteByExample(OmsCompanyAddressExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(OmsCompanyAddress record);
+
+    int insertSelective(OmsCompanyAddress record);
+
+    List<OmsCompanyAddress> selectByExample(OmsCompanyAddressExample example);
+
+    OmsCompanyAddress selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") OmsCompanyAddress record, @Param("example") OmsCompanyAddressExample example);
+
+    int updateByExample(@Param("record") OmsCompanyAddress record, @Param("example") OmsCompanyAddressExample example);
+
+    int updateByPrimaryKeySelective(OmsCompanyAddress record);
+
+    int updateByPrimaryKey(OmsCompanyAddress record);
+}

+ 30 - 0
mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsOrderItemMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.OmsOrderItem;
+import com.mtcarpenter.mall.model.OmsOrderItemExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface OmsOrderItemMapper {
+    long countByExample(OmsOrderItemExample example);
+
+    int deleteByExample(OmsOrderItemExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(OmsOrderItem record);
+
+    int insertSelective(OmsOrderItem record);
+
+    List<OmsOrderItem> selectByExample(OmsOrderItemExample example);
+
+    OmsOrderItem selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") OmsOrderItem record, @Param("example") OmsOrderItemExample example);
+
+    int updateByExample(@Param("record") OmsOrderItem record, @Param("example") OmsOrderItemExample example);
+
+    int updateByPrimaryKeySelective(OmsOrderItem record);
+
+    int updateByPrimaryKey(OmsOrderItem record);
+}

+ 30 - 0
mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsOrderMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.OmsOrder;
+import com.mtcarpenter.mall.model.OmsOrderExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface OmsOrderMapper {
+    long countByExample(OmsOrderExample example);
+
+    int deleteByExample(OmsOrderExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(OmsOrder record);
+
+    int insertSelective(OmsOrder record);
+
+    List<OmsOrder> selectByExample(OmsOrderExample example);
+
+    OmsOrder selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") OmsOrder record, @Param("example") OmsOrderExample example);
+
+    int updateByExample(@Param("record") OmsOrder record, @Param("example") OmsOrderExample example);
+
+    int updateByPrimaryKeySelective(OmsOrder record);
+
+    int updateByPrimaryKey(OmsOrder record);
+}

+ 30 - 0
mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsOrderOperateHistoryMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.OmsOrderOperateHistory;
+import com.mtcarpenter.mall.model.OmsOrderOperateHistoryExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface OmsOrderOperateHistoryMapper {
+    long countByExample(OmsOrderOperateHistoryExample example);
+
+    int deleteByExample(OmsOrderOperateHistoryExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(OmsOrderOperateHistory record);
+
+    int insertSelective(OmsOrderOperateHistory record);
+
+    List<OmsOrderOperateHistory> selectByExample(OmsOrderOperateHistoryExample example);
+
+    OmsOrderOperateHistory selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") OmsOrderOperateHistory record, @Param("example") OmsOrderOperateHistoryExample example);
+
+    int updateByExample(@Param("record") OmsOrderOperateHistory record, @Param("example") OmsOrderOperateHistoryExample example);
+
+    int updateByPrimaryKeySelective(OmsOrderOperateHistory record);
+
+    int updateByPrimaryKey(OmsOrderOperateHistory record);
+}

+ 30 - 0
mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsOrderReturnApplyMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.OmsOrderReturnApply;
+import com.mtcarpenter.mall.model.OmsOrderReturnApplyExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface OmsOrderReturnApplyMapper {
+    long countByExample(OmsOrderReturnApplyExample example);
+
+    int deleteByExample(OmsOrderReturnApplyExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(OmsOrderReturnApply record);
+
+    int insertSelective(OmsOrderReturnApply record);
+
+    List<OmsOrderReturnApply> selectByExample(OmsOrderReturnApplyExample example);
+
+    OmsOrderReturnApply selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") OmsOrderReturnApply record, @Param("example") OmsOrderReturnApplyExample example);
+
+    int updateByExample(@Param("record") OmsOrderReturnApply record, @Param("example") OmsOrderReturnApplyExample example);
+
+    int updateByPrimaryKeySelective(OmsOrderReturnApply record);
+
+    int updateByPrimaryKey(OmsOrderReturnApply record);
+}

+ 30 - 0
mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsOrderReturnReasonMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.OmsOrderReturnReason;
+import com.mtcarpenter.mall.model.OmsOrderReturnReasonExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface OmsOrderReturnReasonMapper {
+    long countByExample(OmsOrderReturnReasonExample example);
+
+    int deleteByExample(OmsOrderReturnReasonExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(OmsOrderReturnReason record);
+
+    int insertSelective(OmsOrderReturnReason record);
+
+    List<OmsOrderReturnReason> selectByExample(OmsOrderReturnReasonExample example);
+
+    OmsOrderReturnReason selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") OmsOrderReturnReason record, @Param("example") OmsOrderReturnReasonExample example);
+
+    int updateByExample(@Param("record") OmsOrderReturnReason record, @Param("example") OmsOrderReturnReasonExample example);
+
+    int updateByPrimaryKeySelective(OmsOrderReturnReason record);
+
+    int updateByPrimaryKey(OmsOrderReturnReason record);
+}

+ 30 - 0
mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/mapper/OmsOrderSettingMapper.java

@@ -0,0 +1,30 @@
+package com.mtcarpenter.mall.mapper;
+
+import com.mtcarpenter.mall.model.OmsOrderSetting;
+import com.mtcarpenter.mall.model.OmsOrderSettingExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface OmsOrderSettingMapper {
+    long countByExample(OmsOrderSettingExample example);
+
+    int deleteByExample(OmsOrderSettingExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(OmsOrderSetting record);
+
+    int insertSelective(OmsOrderSetting record);
+
+    List<OmsOrderSetting> selectByExample(OmsOrderSettingExample example);
+
+    OmsOrderSetting selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") OmsOrderSetting record, @Param("example") OmsOrderSettingExample example);
+
+    int updateByExample(@Param("record") OmsOrderSetting record, @Param("example") OmsOrderSettingExample example);
+
+    int updateByPrimaryKeySelective(OmsOrderSetting record);
+
+    int updateByPrimaryKey(OmsOrderSetting record);
+}

+ 214 - 0
mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/model/OmsCartItem.java

@@ -0,0 +1,214 @@
+package com.mtcarpenter.mall.model;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class OmsCartItem implements Serializable {
+    private static final long serialVersionUID = 1L;
+    private Long id;
+    private Long productId;
+    private Long productSkuId;
+    private Long memberId;
+    @ApiModelProperty(value = "购买数量")
+    private Integer quantity;
+    @ApiModelProperty(value = "添加到购物车的价格")
+    private BigDecimal price;
+    @ApiModelProperty(value = "商品主图")
+    private String productPic;
+    @ApiModelProperty(value = "商品名称")
+    private String productName;
+    @ApiModelProperty(value = "商品副标题(卖点)")
+    private String productSubTitle;
+    @ApiModelProperty(value = "商品sku条码")
+    private String productSkuCode;
+    @ApiModelProperty(value = "会员昵称")
+    private String memberNickname;
+    @ApiModelProperty(value = "创建时间")
+    private Date createDate;
+    @ApiModelProperty(value = "修改时间")
+    private Date modifyDate;
+    @ApiModelProperty(value = "是否删除")
+    private Integer deleteStatus;
+    @ApiModelProperty(value = "商品分类")
+    private Long productCategoryId;
+    private String productBrand;
+    private String productSn;
+    @ApiModelProperty(value = "商品销售属性:[{'key':'颜色','value':'颜色'},{'key':'容量','value':'4G'}]")
+    private String productAttr;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Long productId) {
+        this.productId = productId;
+    }
+
+    public Long getProductSkuId() {
+        return productSkuId;
+    }
+
+    public void setProductSkuId(Long productSkuId) {
+        this.productSkuId = productSkuId;
+    }
+
+    public Long getMemberId() {
+        return memberId;
+    }
+
+    public void setMemberId(Long memberId) {
+        this.memberId = memberId;
+    }
+
+    public Integer getQuantity() {
+        return quantity;
+    }
+
+    public void setQuantity(Integer quantity) {
+        this.quantity = quantity;
+    }
+
+    public BigDecimal getPrice() {
+        return price;
+    }
+
+    public void setPrice(BigDecimal price) {
+        this.price = price;
+    }
+
+    public String getProductPic() {
+        return productPic;
+    }
+
+    public void setProductPic(String productPic) {
+        this.productPic = productPic;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public String getProductSubTitle() {
+        return productSubTitle;
+    }
+
+    public void setProductSubTitle(String productSubTitle) {
+        this.productSubTitle = productSubTitle;
+    }
+
+    public String getProductSkuCode() {
+        return productSkuCode;
+    }
+
+    public void setProductSkuCode(String productSkuCode) {
+        this.productSkuCode = productSkuCode;
+    }
+
+    public String getMemberNickname() {
+        return memberNickname;
+    }
+
+    public void setMemberNickname(String memberNickname) {
+        this.memberNickname = memberNickname;
+    }
+
+    public Date getCreateDate() {
+        return createDate;
+    }
+
+    public void setCreateDate(Date createDate) {
+        this.createDate = createDate;
+    }
+
+    public Date getModifyDate() {
+        return modifyDate;
+    }
+
+    public void setModifyDate(Date modifyDate) {
+        this.modifyDate = modifyDate;
+    }
+
+    public Integer getDeleteStatus() {
+        return deleteStatus;
+    }
+
+    public void setDeleteStatus(Integer deleteStatus) {
+        this.deleteStatus = deleteStatus;
+    }
+
+    public Long getProductCategoryId() {
+        return productCategoryId;
+    }
+
+    public void setProductCategoryId(Long productCategoryId) {
+        this.productCategoryId = productCategoryId;
+    }
+
+    public String getProductBrand() {
+        return productBrand;
+    }
+
+    public void setProductBrand(String productBrand) {
+        this.productBrand = productBrand;
+    }
+
+    public String getProductSn() {
+        return productSn;
+    }
+
+    public void setProductSn(String productSn) {
+        this.productSn = productSn;
+    }
+
+    public String getProductAttr() {
+        return productAttr;
+    }
+
+    public void setProductAttr(String productAttr) {
+        this.productAttr = productAttr;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", productId=").append(productId);
+        sb.append(", productSkuId=").append(productSkuId);
+        sb.append(", memberId=").append(memberId);
+        sb.append(", quantity=").append(quantity);
+        sb.append(", price=").append(price);
+        sb.append(", productPic=").append(productPic);
+        sb.append(", productName=").append(productName);
+        sb.append(", productSubTitle=").append(productSubTitle);
+        sb.append(", productSkuCode=").append(productSkuCode);
+        sb.append(", memberNickname=").append(memberNickname);
+        sb.append(", createDate=").append(createDate);
+        sb.append(", modifyDate=").append(modifyDate);
+        sb.append(", deleteStatus=").append(deleteStatus);
+        sb.append(", productCategoryId=").append(productCategoryId);
+        sb.append(", productBrand=").append(productBrand);
+        sb.append(", productSn=").append(productSn);
+        sb.append(", productAttr=").append(productAttr);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 0 - 0
mall-admin-oms/oms-mbg/src/main/java/com/mtcarpenter/mall/model/OmsCartItemExample.java


Some files were not shown because too many files changed in this diff