suochencheng 6 anni fa
commit
449a4fec5c
100 ha cambiato i file con 22237 aggiunte e 0 eliminazioni
  1. 6 0
      .gitignore
  2. 6 0
      README.md
  3. 120 0
      log.txt
  4. 998 0
      pom.xml
  5. 10 0
      runConfigurations/Install_Dependencies.xml
  6. 75 0
      runConfigurations/Tomcat.xml
  7. 12 0
      runConfigurations/Vue_Build.xml
  8. 12 0
      runConfigurations/Vue_Server.xml
  9. 331 0
      src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java
  10. 36 0
      src/main/java/com/izouma/awesomeadmin/constant/RongConstant.java
  11. 17 0
      src/main/java/com/izouma/awesomeadmin/container/DateConverter.java
  12. 26 0
      src/main/java/com/izouma/awesomeadmin/container/Lifecycle.java
  13. 70 0
      src/main/java/com/izouma/awesomeadmin/container/StartupListener.java
  14. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/ActivityBannerMapper.java
  15. 569 0
      src/main/java/com/izouma/awesomeadmin/dao/ActivityBannerMapper.xml
  16. 36 0
      src/main/java/com/izouma/awesomeadmin/dao/ActivityInfoMapper.java
  17. 632 0
      src/main/java/com/izouma/awesomeadmin/dao/ActivityInfoMapper.xml
  18. 36 0
      src/main/java/com/izouma/awesomeadmin/dao/ActivityLogMapper.java
  19. 666 0
      src/main/java/com/izouma/awesomeadmin/dao/ActivityLogMapper.xml
  20. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/ActivityTypeMapper.java
  21. 413 0
      src/main/java/com/izouma/awesomeadmin/dao/ActivityTypeMapper.xml
  22. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/AlipayTempMapper.java
  23. 527 0
      src/main/java/com/izouma/awesomeadmin/dao/AlipayTempMapper.xml
  24. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/BannerInfoMapper.java
  25. 440 0
      src/main/java/com/izouma/awesomeadmin/dao/BannerInfoMapper.xml
  26. 27 0
      src/main/java/com/izouma/awesomeadmin/dao/CommonQueryMapper.java
  27. 189 0
      src/main/java/com/izouma/awesomeadmin/dao/CommonQueryMapper.xml
  28. 27 0
      src/main/java/com/izouma/awesomeadmin/dao/CommonQuerySqlServerMapper.java
  29. 182 0
      src/main/java/com/izouma/awesomeadmin/dao/CommonQuerySqlServerMapper.xml
  30. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/CouponDetailMapper.java
  31. 550 0
      src/main/java/com/izouma/awesomeadmin/dao/CouponDetailMapper.xml
  32. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/CouponInfoMapper.java
  33. 650 0
      src/main/java/com/izouma/awesomeadmin/dao/CouponInfoMapper.xml
  34. 36 0
      src/main/java/com/izouma/awesomeadmin/dao/DataSourceInfoMapper.java
  35. 327 0
      src/main/java/com/izouma/awesomeadmin/dao/DataSourceInfoMapper.xml
  36. 51 0
      src/main/java/com/izouma/awesomeadmin/dao/DepartInfoMapper.java
  37. 341 0
      src/main/java/com/izouma/awesomeadmin/dao/DepartInfoMapper.xml
  38. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/GenCodeMapper.java
  39. 265 0
      src/main/java/com/izouma/awesomeadmin/dao/GenCodeMapper.xml
  40. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/GenTestTableMapper.java
  41. 209 0
      src/main/java/com/izouma/awesomeadmin/dao/GenTestTableMapper.xml
  42. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/LogisticsInfoMapper.java
  43. 245 0
      src/main/java/com/izouma/awesomeadmin/dao/LogisticsInfoMapper.xml
  44. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/MemberCoinMapper.java
  45. 450 0
      src/main/java/com/izouma/awesomeadmin/dao/MemberCoinMapper.xml
  46. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/MemberCoinTixianMapper.java
  47. 664 0
      src/main/java/com/izouma/awesomeadmin/dao/MemberCoinTixianMapper.xml
  48. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/MemberPointMapper.java
  49. 450 0
      src/main/java/com/izouma/awesomeadmin/dao/MemberPointMapper.xml
  50. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/OrderAddressMapper.java
  51. 486 0
      src/main/java/com/izouma/awesomeadmin/dao/OrderAddressMapper.xml
  52. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/OrderLogisticsMapper.java
  53. 459 0
      src/main/java/com/izouma/awesomeadmin/dao/OrderLogisticsMapper.xml
  54. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/PowerInfoMapper.java
  55. 224 0
      src/main/java/com/izouma/awesomeadmin/dao/PowerInfoMapper.xml
  56. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/ProductCollectionMapper.java
  57. 394 0
      src/main/java/com/izouma/awesomeadmin/dao/ProductCollectionMapper.xml
  58. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/ProductCommentImageMapper.java
  59. 463 0
      src/main/java/com/izouma/awesomeadmin/dao/ProductCommentImageMapper.xml
  60. 36 0
      src/main/java/com/izouma/awesomeadmin/dao/ProductCommentMapper.java
  61. 605 0
      src/main/java/com/izouma/awesomeadmin/dao/ProductCommentMapper.xml
  62. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/ProductImageMapper.java
  63. 415 0
      src/main/java/com/izouma/awesomeadmin/dao/ProductImageMapper.xml
  64. 36 0
      src/main/java/com/izouma/awesomeadmin/dao/ProductInfoMapper.java
  65. 913 0
      src/main/java/com/izouma/awesomeadmin/dao/ProductInfoMapper.xml
  66. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/ProductPriceMapper.java
  67. 506 0
      src/main/java/com/izouma/awesomeadmin/dao/ProductPriceMapper.xml
  68. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/QueryConfigMapper.java
  69. 363 0
      src/main/java/com/izouma/awesomeadmin/dao/QueryConfigMapper.xml
  70. 36 0
      src/main/java/com/izouma/awesomeadmin/dao/RechargeRecordMapper.java
  71. 531 0
      src/main/java/com/izouma/awesomeadmin/dao/RechargeRecordMapper.xml
  72. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/RecommenderLogMapper.java
  73. 390 0
      src/main/java/com/izouma/awesomeadmin/dao/RecommenderLogMapper.xml
  74. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/RefundApplicationMapper.java
  75. 681 0
      src/main/java/com/izouma/awesomeadmin/dao/RefundApplicationMapper.xml
  76. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/RefundMessageMapper.java
  77. 436 0
      src/main/java/com/izouma/awesomeadmin/dao/RefundMessageMapper.xml
  78. 26 0
      src/main/java/com/izouma/awesomeadmin/dao/RongYunTokenMapper.java
  79. 95 0
      src/main/java/com/izouma/awesomeadmin/dao/RongYunTokenMapper.xml
  80. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/StoreCollectionMapper.java
  81. 382 0
      src/main/java/com/izouma/awesomeadmin/dao/StoreCollectionMapper.xml
  82. 46 0
      src/main/java/com/izouma/awesomeadmin/dao/StoreInfoMapper.java
  83. 1500 0
      src/main/java/com/izouma/awesomeadmin/dao/StoreInfoMapper.xml
  84. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/StoreLabelMapper.java
  85. 348 0
      src/main/java/com/izouma/awesomeadmin/dao/StoreLabelMapper.xml
  86. 51 0
      src/main/java/com/izouma/awesomeadmin/dao/SuperUserMapper.java
  87. 88 0
      src/main/java/com/izouma/awesomeadmin/dao/SuperUserMapper.xml
  88. 14 0
      src/main/java/com/izouma/awesomeadmin/dao/SysAppTokenMapper.java
  89. 18 0
      src/main/java/com/izouma/awesomeadmin/dao/SysAppTokenMapper.xml
  90. 33 0
      src/main/java/com/izouma/awesomeadmin/dao/SysDataruleMapper.java
  91. 153 0
      src/main/java/com/izouma/awesomeadmin/dao/SysDataruleMapper.xml
  92. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/SysMenuMapper.java
  93. 386 0
      src/main/java/com/izouma/awesomeadmin/dao/SysMenuMapper.xml
  94. 47 0
      src/main/java/com/izouma/awesomeadmin/dao/SysRoleMapper.java
  95. 372 0
      src/main/java/com/izouma/awesomeadmin/dao/SysRoleMapper.xml
  96. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/SystemConfigMapper.java
  97. 525 0
      src/main/java/com/izouma/awesomeadmin/dao/SystemConfigMapper.xml
  98. 34 0
      src/main/java/com/izouma/awesomeadmin/dao/TableFieldMapper.java
  99. 494 0
      src/main/java/com/izouma/awesomeadmin/dao/TableFieldMapper.xml
  100. 36 0
      src/main/java/com/izouma/awesomeadmin/dao/UserAddressMapper.java

+ 6 - 0
.gitignore

@@ -0,0 +1,6 @@
+.vscode
+.DS_Store
+.idea
+node_modules/
+/target
+*.iml

+ 6 - 0
README.md

@@ -0,0 +1,6 @@
+# 后台项目模版
+* IDEA 直接打开项目
+* 复制 runConfigurations 文件夹至 .idea 文件夹下
+* 运行 Install Dependencies
+* 同时运行 Tomcat 和 Vue Server
+* 访问 [http://localhost:8081](http://localhost:8081)

+ 120 - 0
log.txt

@@ -0,0 +1,120 @@
+[2018-07-31 18:41:11] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-07-31 18:48:18] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-07-31 18:49:35] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-07-31 18:50:31] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 09:25:51] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 09:41:52] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 09:51:56] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 09:58:08] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 09:58:30] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 09:58:55] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:00:32] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:10:38] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:12:06] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:13:31] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:14:54] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:15:45] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:22:01] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:23:51] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:25:15] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:25:30] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:26:59] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:29:33] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:36:11] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:39:47] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-01 10:41:23] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-08 19:00:42] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-08 19:02:19] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-08 19:03:57] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-08 19:04:18] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-08 19:08:49] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-27 14:25:47] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-27 14:30:57] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-27 14:31:13] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-08-27 14:32:17] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-09-03 16:10:11] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-09-03 16:12:59] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-09-03 16:14:31] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-09-03 16:19:40] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-09-03 18:07:29] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-12-29 14:28:56] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-12-29 15:13:31] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2018-12-29 15:13:34] [ERROR] - updateTarget 更新识别图异常
+java.io.IOException: Attempted read from closed stream.
+	at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:167)
+	at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:137)
+	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:284)
+	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:326)
+	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
+	at java.io.InputStreamReader.read(InputStreamReader.java:184)
+	at java.io.Reader.read(Reader.java:140)
+	at org.apache.http.util.EntityUtils.toString(EntityUtils.java:247)
+	at org.apache.http.util.EntityUtils.toString(EntityUtils.java:291)
+	at com.izouma.awesomeadmin.vuforia.VuforiaUtil.updateTarget(VuforiaUtil.java:132)
+	at VuforialUtilTest.UpdateTargetTest(VuforialUtilTest.java:34)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:498)
+	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
+	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
+	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
+	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
+	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
+	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
+	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
+	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
+	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
+	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
+	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
+	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
+	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
+	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
+	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
+	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
+	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
+	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
+	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
+	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
+	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
+	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
+	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
+	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
+[2018-12-29 15:15:26] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2019-01-02 16:39:27] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2019-01-02 17:12:39] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2019-01-02 17:14:37] [ERROR] - getTarget 获取识别图异常
+org.json.JSONException: JSONObject["target_record"] not a string.
+	at org.json.JSONObject.getString(JSONObject.java:721)
+	at com.izouma.awesomeadmin.vuforia.VuforiaUtil.getTarget(VuforiaUtil.java:216)
+	at VuforialUtilTest.GetTargetTest(VuforialUtilTest.java:45)
+	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+	at java.lang.reflect.Method.invoke(Method.java:498)
+	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
+	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
+	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
+	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
+	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
+	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
+	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
+	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
+	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:252)
+	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
+	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
+	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
+	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
+	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
+	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
+	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
+	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
+	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
+	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
+	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
+	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
+	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
+	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
+	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
+[2019-01-02 17:14:54] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.
+[2019-01-02 17:44:01] [WARN ] - Bad pool size config, start 3 < min 5. Using 5 as start.

+ 998 - 0
pom.xml

@@ -0,0 +1,998 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>com.izouma</groupId>
+    <artifactId>awesome-admin</artifactId>
+    <version>1.0.0</version>
+    <packaging>war</packaging>
+
+    <name>awesome-admin</name>
+    <url>http://www.izouma.com</url>
+
+    <!-- 项目属性 -->
+    <properties>
+        <!-- other libs -->
+        <lib.path>${basedir}/src/main/webapp/WEB-INF/lib</lib.path>
+        <!-- main version setting -->
+        <spring.version>4.3.5.RELEASE</spring.version>
+        <validator.version>5.4.0.Final</validator.version>
+        <mybatis.version>3.3.1</mybatis.version>
+        <mybatis-spring.version>1.2.2</mybatis-spring.version>
+        <druid.version>1.0.31</druid.version>
+        <ehcache.version>2.6.11</ehcache.version>
+        <ehcache-web.version>2.0.4</ehcache-web.version>
+        <shiro.version>1.4.0</shiro.version>
+        <sitemesh.version>2.4.2</sitemesh.version>
+        <activiti.version>5.22.0</activiti.version>
+
+        <!-- tools version setting -->
+        <slf4j.version>1.7.25</slf4j.version>
+        <log4j.version>1.2.17</log4j.version>
+        <commons-io.version>2.4</commons-io.version>
+        <commons-codec.version>1.9</commons-codec.version>
+        <commons-fileupload.version>1.3.1</commons-fileupload.version>
+        <commons-beanutils.version>1.9.1</commons-beanutils.version>
+        <jackson.version>2.8.6</jackson.version>
+        <fastjson.version>1.1.40</fastjson.version>
+        <xstream.version>1.4.9</xstream.version>
+        <dozer.version>5.5.1</dozer.version>
+        <poi.version>3.9</poi.version>
+        <freemarker.version>2.3.25-incubating</freemarker.version>
+        <quartz.version>2.2.3</quartz.version>
+        <ckfinder.version>2.3</ckfinder.version>
+
+        <guava.version>20.0</guava.version>
+        <commons-lang3.version>3.5</commons-lang3.version>
+        <commons-text.version>1.3</commons-text.version>
+        <commons-collections.version>4.1</commons-collections.version>
+
+        <!-- jdbc driver setting -->
+        <mysql.driver.version>5.1.30</mysql.driver.version>
+        <sqlserver.driver.version>4.0.0</sqlserver.driver.version>
+        <oracle.driver.version>10.2.0.4.0</oracle.driver.version>
+        <mssql.driver.version>1.3.1</mssql.driver.version>
+
+        <!-- environment setting -->
+        <jdk.version>1.8</jdk.version>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <downloadSources>true</downloadSources>
+
+    </properties>
+    <!-- 设定仓库 -->
+    <!--<repositories>-->
+    <!--<repository>-->
+    <!--<id>central-repos</id>-->
+    <!--<name>Central Repository</name>-->
+    <!--<url>http://maven.aliyun.com/nexus/content/groups/public/</url>-->
+    <!--<releases>-->
+    <!--<enabled>true</enabled>-->
+    <!--</releases>-->
+    <!--<snapshots>-->
+    <!--<enabled>false</enabled>-->
+    <!--</snapshots>-->
+    <!--</repository>-->
+
+    <!--<repository>-->
+    <!--<id>central-repos2</id>-->
+    <!--<name>Central Repository 2</name>-->
+    <!--<url>http://mvnrepo.code.taobao.org/nexus/content/repositories/snapshots/</url>-->
+    <!--<releases>-->
+    <!--<enabled>true</enabled>-->
+    <!--</releases>-->
+    <!--<snapshots>-->
+    <!--<enabled>false</enabled>-->
+    <!--</snapshots>-->
+    <!--</repository>-->
+
+    <!--<repository>-->
+    <!--<id>springsource-repos</id>-->
+    <!--<name>SpringSource Repository</name>-->
+    <!--<url>http://mvnrepo.code.taobao.org/nexus/content/repositories/releases/</url>-->
+    <!--<releases>-->
+    <!--<enabled>true</enabled>-->
+    <!--</releases>-->
+    <!--<snapshots>-->
+    <!--<enabled>false</enabled>-->
+    <!--</snapshots>-->
+    <!--</repository>-->
+    <!---->
+    <!--<repository>-->
+    <!--<id>bitwalker.user-agent-utils.mvn.repo</id>-->
+    <!--<url>https://nexus.jackpinetech.com/nexus/content/groups/public</url>-->
+    <!--&lt;!&ndash; use snapshot version &ndash;&gt;-->
+    <!--<snapshots>-->
+    <!--<updatePolicy>always</updatePolicy>-->
+    <!--</snapshots>-->
+    <!--</repository>-->
+    <!--</repositories>-->
+    <build>
+        <finalName>awesome-admin</finalName>
+        <resources>
+            <resource>
+                <directory>src/main/java</directory>
+                <filtering>true</filtering>
+                <includes>
+                    <include>**/*.xml</include>
+                    <include>**/*.properties</include>
+                </includes>
+            </resource>
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+        </resources>
+
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>${jdk.version}</source>
+                    <target>${jdk.version}</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.10</version>
+                <configuration>
+                    <skip>true</skip>
+                    <testFailureIgnore>true</testFailureIgnore>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <!-- 依赖项定义 -->
+    <dependencies>
+        <!-- SPRING begin -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-core</artifactId>
+            <version>${spring.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-beans</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-aop</artifactId>
+            <version>${spring.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-tx</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-expression</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+
+        <!-- spring orm -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-orm</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-jdbc</artifactId>
+            <version>${spring.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>c3p0</groupId>
+                    <artifactId>c3p0</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!-- spring websocket-->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-websocket</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-messaging</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+
+        <!-- bean validate -->
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <version>${validator.version}</version>
+        </dependency>
+        <!-- SPRING end -->
+
+        <!-- AOP begin -->
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjrt</artifactId>
+            <version>1.7.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.aspectj</groupId>
+            <artifactId>aspectjweaver</artifactId>
+            <version>1.7.4</version>
+        </dependency>
+        <dependency>
+            <groupId>cglib</groupId>
+            <artifactId>cglib</artifactId>
+            <version>3.1</version>
+        </dependency>
+        <!-- AOP end -->
+
+        <!-- PERSISTENCE begin -->
+
+        <!-- MyBatis -->
+        <dependency>
+            <groupId>org.mybatis</groupId>
+            <artifactId>mybatis</artifactId>
+            <version>${mybatis.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis</groupId>
+            <artifactId>mybatis-spring</artifactId>
+            <version>${mybatis-spring.version}</version>
+        </dependency>
+
+        <!-- connection pool -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid</artifactId>
+            <version>${druid.version}</version>
+        </dependency>
+
+        <!-- jdbc driver -->
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>${mysql.driver.version}</version>
+        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>com.microsoft.sqlserver</groupId>-->
+            <!--<artifactId>sqljdbc4</artifactId>-->
+            <!--<version>${sqlserver.driver.version}</version>-->
+        <!--</dependency>-->
+        <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/sqljdbc4 -->
+        <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc -->
+        <dependency>
+            <groupId>com.microsoft.sqlserver</groupId>
+            <artifactId>mssql-jdbc</artifactId>
+            <version>6.4.0.jre8</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.mchange</groupId>
+            <artifactId>c3p0</artifactId>
+            <version>0.9.5.2</version>
+        </dependency>
+
+        <!-- WEB begin -->
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-web</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-webmvc</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-oxm</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>opensymphony</groupId>
+            <artifactId>sitemesh</artifactId>
+            <version>${sitemesh.version}</version>
+        </dependency>
+        <!--<dependency>-->
+        <!--<groupId>taglibs</groupId>-->
+        <!--<artifactId>standard</artifactId>-->
+        <!--<version>1.1.2</version>-->
+        <!--<type>jar</type>-->
+        <!--</dependency>-->
+
+
+        <dependency>
+            <groupId>javax</groupId>
+            <artifactId>javaee-api</artifactId>
+            <version>7.0</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>jstl</artifactId>
+            <version>1.2</version>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet.jsp</groupId>
+            <artifactId>jsp-api</artifactId>
+            <version>2.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <!--  <dependency>
+             <groupId>javax.servlet</groupId>
+             <artifactId>javax.servlet-api</artifactId>
+             <version>3.0.1</version>
+             <scope>provided</scope>
+         </dependency>
+         <dependency>
+             <groupId>javax.servlet.jsp</groupId>
+             <artifactId>jsp-api</artifactId>
+             <version>2.2</version>
+             <scope>provided</scope>
+         </dependency>-->
+
+        <dependency>
+            <groupId>net.sf.ehcache</groupId>
+            <artifactId>ehcache-core</artifactId>
+            <version>${ehcache.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jgroups</groupId>
+            <artifactId>jgroups</artifactId>
+            <version>3.6.6.Final</version>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+            <version>2.8.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+            <version>2.4.2</version>
+        </dependency>
+        <dependency>
+            <groupId>de.ruedigermoeller</groupId>
+            <artifactId>fst</artifactId>
+            <version>2.42</version>
+        </dependency>
+        <dependency>
+            <groupId>com.esotericsoftware</groupId>
+            <artifactId>kryo-shaded</artifactId>
+            <version>3.0.0</version>
+        </dependency>
+        <!-- CACHE end -->
+
+        <!-- SECURITY begin -->
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-core</artifactId>
+            <version>${shiro.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-spring</artifactId>
+            <version>${shiro.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-cas</artifactId>
+            <version>${shiro.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-web</artifactId>
+            <version>${shiro.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-ehcache</artifactId>
+            <version>${shiro.version}</version>
+        </dependency>
+        <!-- SECURITY end -->
+
+        <!-- Activiti -->
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-engine</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-spring</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-explorer</artifactId>
+            <version>${activiti.version}</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>vaadin</artifactId>
+                    <groupId>com.vaadin</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>dcharts-widget</artifactId>
+                    <groupId>org.vaadin.addons</groupId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>activiti-simple-workflow</artifactId>
+                    <groupId>org.activiti</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-modeler</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-rest</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-diagram-rest</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-json-converter</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-cxf</artifactId>
+            <version>${activiti.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>2.11.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-api</artifactId>
+            <version>2.7.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>2.7.6</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http-jetty</artifactId>
+            <version>2.7.6</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+            <version>2.7.6</version>
+        </dependency>
+        <dependency>
+            <groupId>com.sun.xml.bind</groupId>
+            <artifactId>jaxb-impl</artifactId>
+            <version>2.2.11</version>
+        </dependency>
+
+
+        <!-- LOGGING begin -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
+        <!-- common-logging 实际调用slf4j -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
+        <!-- java.util.logging 实际调用slf4j -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jul-to-slf4j</artifactId>
+            <version>${slf4j.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+            <version>${log4j.version}</version>
+        </dependency>
+        <!-- LOGGING end -->
+
+        <!-- GENERAL UTILS begin -->
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>${commons-io.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>${commons-codec.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>${commons-fileupload.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-beanutils</groupId>
+            <artifactId>commons-beanutils</artifactId>
+            <version>${commons-beanutils.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>commons-logging</groupId>
+                    <artifactId>commons-logging</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-text</artifactId>
+            <version>${commons-text.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-collections4</artifactId>
+            <version>${commons-collections.version}</version>
+        </dependency>
+
+
+        <!-- jackson json -->
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-core</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-annotations</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.fasterxml.jackson.module</groupId>
+            <artifactId>jackson-module-jaxb-annotations</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+
+        <!-- fastjson json-->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>${fastjson.version}</version>
+        </dependency>
+
+        <!-- xstream xml -->
+        <dependency>
+            <groupId>com.thoughtworks.xstream</groupId>
+            <artifactId>xstream</artifactId>
+            <version>${xstream.version}</version>
+        </dependency>
+
+        <!-- pojo copy -->
+        <dependency>
+            <groupId>net.sf.dozer</groupId>
+            <artifactId>dozer</artifactId>
+            <version>${dozer.version}</version>
+        </dependency>
+
+        <!-- https://mvnrepository.com/artifact/com.belerweb/pinyin4j -->
+        <dependency>
+            <groupId>com.belerweb</groupId>
+            <artifactId>pinyin4j</artifactId>
+            <version>2.5.1</version>
+        </dependency>
+
+
+        <!-- template engine -->
+        <dependency>
+            <groupId>org.freemarker</groupId>
+            <artifactId>freemarker</artifactId>
+            <version>${freemarker.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.ibeetl</groupId>
+            <artifactId>beetl</artifactId>
+            <version>2.7.5</version>
+        </dependency>
+
+        <!-- email -->
+        <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>mail</artifactId>
+            <version>1.4.7</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.activation</groupId>
+            <artifactId>activation</artifactId>
+            <version>1.1.1</version>
+        </dependency>
+
+        <!-- poi office -->
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml-schemas</artifactId>
+            <version>${poi.version}</version>
+        </dependency>
+
+        <!-- image util -->
+        <dependency>
+            <groupId>com.drewnoakes</groupId>
+            <artifactId>metadata-extractor</artifactId>
+            <version>2.10.1</version>
+        </dependency>
+
+        <!-- 条形码、二维码生成  -->
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>core</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>batik</groupId>
+            <artifactId>batik-util</artifactId>
+            <version>1.6-1</version>
+        </dependency>
+
+        <!-- quartz -->
+        <dependency>
+            <groupId>org.quartz-scheduler</groupId>
+            <artifactId>quartz</artifactId>
+            <version>${quartz.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>c3p0</groupId>
+                    <artifactId>c3p0</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.quartz-scheduler</groupId>
+            <artifactId>quartz-jobs</artifactId>
+            <version>${quartz.version}</version>
+        </dependency>
+
+        <!--&lt;!&ndash; 中文分词 &ndash;&gt;-->
+        <!--<dependency>-->
+        <!--<groupId>org.wltea</groupId>-->
+        <!--<artifactId>analyzer</artifactId>-->
+        <!--<version>2012_u6</version>-->
+        <!--</dependency>-->
+        <!-- GENERAL UTILS end -->
+
+        <!-- sigar -->
+        <!-- https://mvnrepository.com/artifact/org.fusesource/sigar -->
+        <dependency>
+            <groupId>org.fusesource</groupId>
+            <artifactId>sigar</artifactId>
+            <version>1.6.4</version>
+        </dependency>
+        <!-- CKFinder begin -->
+        <dependency>
+            <groupId>net.coobird</groupId>
+            <artifactId>thumbnailator</artifactId>
+            <version>0.4.8</version>
+        </dependency>
+        <!--<dependency>-->
+        <!--<groupId>com.ckfinder</groupId>-->
+        <!--<artifactId>apache-ant-zip</artifactId>-->
+        <!--<version>${ckfinder.version}</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->
+        <!--<groupId>com.ckfinder</groupId>-->
+        <!--<artifactId>ckfinder</artifactId>-->
+        <!--<version>${ckfinder.version}</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->
+        <!--<groupId>com.ckfinder</groupId>-->
+        <!--<artifactId>ckfinderplugin-fileeditor</artifactId>-->
+        <!--<version>${ckfinder.version}</version>-->
+        <!--</dependency>-->
+        <!--<dependency>-->
+        <!--<groupId>com.ckfinder</groupId>-->
+        <!--<artifactId>ckfinderplugin-imageresize</artifactId>-->
+        <!--<version>${ckfinder.version}</version>-->
+        <!--</dependency>-->
+        <!-- CKFinder end -->
+
+        <!-- Echarts图表依赖包开始 -->
+        <!-- https://mvnrepository.com/artifact/com.github.abel533/ECharts -->
+        <dependency>
+            <groupId>com.github.abel533</groupId>
+            <artifactId>ECharts</artifactId>
+            <version>3.0.0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.6.2</version>
+        </dependency>
+        <!-- Echarts图表依赖包结束 -->
+
+        <!-- TEST begin -->
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.12</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-test</artifactId>
+            <version>${spring.version}</version>
+        </dependency>
+        <!-- TEST end -->
+        <dependency>
+            <groupId>eu.bitwalker</groupId>
+            <artifactId>UserAgentUtils</artifactId>
+            <version>1.20</version>
+        </dependency>
+
+        <!--httpcore -->
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpcore</artifactId>
+            <version>4.4.4</version>
+        </dependency>
+
+
+        <!-- swagger-springmvc -->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>2.7.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>2.7.0</version>
+        </dependency>
+        <!-- swagger-springmvc -->
+
+        <!--httpclient -->
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.2</version>
+        </dependency>
+
+        <!-- UTILS begin -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+            <version>${guava.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <version>${commons-lang3.version}</version>
+        </dependency>
+        <!-- UTILS end -->
+
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-core</artifactId>
+            <version>4.0.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
+            <version>1.1.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun</groupId>
+            <artifactId>aliyun-java-sdk-vod</artifactId>
+            <version>2.2.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>2.0.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>aopalliance</groupId>
+            <artifactId>aopalliance</artifactId>
+            <version>1.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>dom4j</groupId>
+            <artifactId>dom4j</artifactId>
+            <version>1.6.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>net.sf.ezmorph</groupId>
+            <artifactId>ezmorph</artifactId>
+            <version>1.0.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss.logging</groupId>
+            <artifactId>jboss-logging</artifactId>
+            <version>3.3.0.Final</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jboss</groupId>
+            <artifactId>jboss-vfs</artifactId>
+            <version>3.2.12.Final</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jdom</groupId>
+            <artifactId>jdom</artifactId>
+            <version>1.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.codehaus.jettison</groupId>
+            <artifactId>jettison</artifactId>
+            <version>1.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>net.sf.json-lib</groupId>
+            <artifactId>json-lib</artifactId>
+            <classifier>jdk15</classifier>
+            <version>2.4</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+            <version>20160810</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.drewnoakes</groupId>
+            <artifactId>metadata-extractor</artifactId>
+            <version>2.10.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>net.coobird</groupId>
+            <artifactId>thumbnailator</artifactId>
+            <version>0.4.8</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.adobe.xmp</groupId>
+            <artifactId>xmpcore</artifactId>
+            <version>5.1.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>xpp3</groupId>
+            <artifactId>xpp3_min</artifactId>
+            <version>1.1.4c</version>
+        </dependency>
+
+        <!--<dependency>-->
+            <!--<groupId>org.apache.velocity</groupId>-->
+            <!--<artifactId>velocity-engine-core</artifactId>-->
+            <!--<version>2.0</version>-->
+        <!--</dependency>-->
+        <!-- https://mvnrepository.com/artifact/org.apache.velocity/velocity -->
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity</artifactId>
+            <version>1.7</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity-tools</artifactId>
+            <version>2.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.uuid</groupId>
+            <artifactId>java-uuid-generator</artifactId>
+            <version>3.1.3</version>
+        </dependency>
+        <!--<dependency>-->
+            <!--<groupId>com.baidu</groupId>-->
+            <!--<artifactId>ueditor</artifactId>-->
+            <!--<version>1.1.2</version>-->
+            <!--<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/ueditor-1.1.2.jar</systemPath>-->
+        <!--</dependency>-->
+
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-api</artifactId>
+            <version>0.10.1</version>
+        </dependency>
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-impl</artifactId>
+            <version>0.10.1</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt-jackson</artifactId>
+            <version>0.10.1</version>
+            <scope>runtime</scope>
+        </dependency>
+
+
+        <dependency>
+            <groupId>com.alipay.sdk</groupId>
+            <artifactId>alipay-sdk-java</artifactId>
+            <version>3.3.49.ALL</version>
+        </dependency>
+
+    </dependencies>
+
+</project>

+ 10 - 0
runConfigurations/Install_Dependencies.xml

@@ -0,0 +1,10 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="Install Dependencies" type="js.build_tools.npm" factoryName="npm">
+    <package-json value="$PROJECT_DIR$/src/main/vue/package.json" />
+    <command value="install" />
+    <arguments value="-verbose" />
+    <node-interpreter value="project" />
+    <envs />
+    <method />
+  </configuration>
+</component>

+ 75 - 0
runConfigurations/Tomcat.xml

@@ -0,0 +1,75 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="Tomcat" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat 8.5.30" ALTERNATIVE_JRE_ENABLED="false">
+    <option name="OPEN_IN_BROWSER" value="false" />
+    <option name="UPDATE_ON_FRAME_DEACTIVATION" value="true" />
+    <option name="UPDATING_POLICY" value="redeploy-artifacts" />
+    <deployment>
+      <artifact name="awesome-admin:war exploded">
+        <settings>
+          <option name="CONTEXT_PATH" value="/" />
+        </settings>
+      </artifact>
+    </deployment>
+    <server-settings>
+      <option name="BASE_DIRECTORY_NAME" value="Unnamed_awesome-admin" />
+    </server-settings>
+    <predefined_log_file id="Tomcat" enabled="true" />
+    <predefined_log_file id="Tomcat Catalina" enabled="true" />
+    <predefined_log_file id="Tomcat Manager" enabled="false" />
+    <predefined_log_file id="Tomcat Host Manager" enabled="false" />
+    <predefined_log_file id="Tomcat Localhost Access" enabled="false" />
+    <RunnerSettings RunnerId="Debug">
+      <option name="DEBUG_PORT" value="51593" />
+    </RunnerSettings>
+    <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover">
+      <option name="USE_ENV_VARIABLES" value="true" />
+      <STARTUP>
+        <option name="USE_DEFAULT" value="true" />
+        <option name="SCRIPT" value="" />
+        <option name="VM_PARAMETERS" value="" />
+        <option name="PROGRAM_PARAMETERS" value="" />
+      </STARTUP>
+      <SHUTDOWN>
+        <option name="USE_DEFAULT" value="true" />
+        <option name="SCRIPT" value="" />
+        <option name="VM_PARAMETERS" value="" />
+        <option name="PROGRAM_PARAMETERS" value="" />
+      </SHUTDOWN>
+    </ConfigurationWrapper>
+    <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug">
+      <option name="USE_ENV_VARIABLES" value="true" />
+      <STARTUP>
+        <option name="USE_DEFAULT" value="true" />
+        <option name="SCRIPT" value="" />
+        <option name="VM_PARAMETERS" value="" />
+        <option name="PROGRAM_PARAMETERS" value="" />
+      </STARTUP>
+      <SHUTDOWN>
+        <option name="USE_DEFAULT" value="true" />
+        <option name="SCRIPT" value="" />
+        <option name="VM_PARAMETERS" value="" />
+        <option name="PROGRAM_PARAMETERS" value="" />
+      </SHUTDOWN>
+    </ConfigurationWrapper>
+    <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run">
+      <option name="USE_ENV_VARIABLES" value="true" />
+      <STARTUP>
+        <option name="USE_DEFAULT" value="true" />
+        <option name="SCRIPT" value="" />
+        <option name="VM_PARAMETERS" value="" />
+        <option name="PROGRAM_PARAMETERS" value="" />
+      </STARTUP>
+      <SHUTDOWN>
+        <option name="USE_DEFAULT" value="true" />
+        <option name="SCRIPT" value="" />
+        <option name="VM_PARAMETERS" value="" />
+        <option name="PROGRAM_PARAMETERS" value="" />
+      </SHUTDOWN>
+    </ConfigurationWrapper>
+    <method>
+      <option name="BuildArtifacts" enabled="true">
+        <artifact name="awesome-admin:war exploded" />
+      </option>
+    </method>
+  </configuration>
+</component>

+ 12 - 0
runConfigurations/Vue_Build.xml

@@ -0,0 +1,12 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="Vue Build" type="js.build_tools.npm" factoryName="npm">
+    <package-json value="$PROJECT_DIR$/src/main/vue/package.json" />
+    <command value="run" />
+    <scripts>
+      <script value="build" />
+    </scripts>
+    <node-interpreter value="project" />
+    <envs />
+    <method />
+  </configuration>
+</component>

+ 12 - 0
runConfigurations/Vue_Server.xml

@@ -0,0 +1,12 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="Vue Server" type="js.build_tools.npm" factoryName="npm">
+    <package-json value="$PROJECT_DIR$/src/main/vue/package.json" />
+    <command value="run" />
+    <scripts>
+      <script value="dev" />
+    </scripts>
+    <node-interpreter value="project" />
+    <envs />
+    <method />
+  </configuration>
+</component>

+ 331 - 0
src/main/java/com/izouma/awesomeadmin/constant/AppConstant.java

@@ -0,0 +1,331 @@
+package com.izouma.awesomeadmin.constant;
+
+/**
+ * <p>
+ * app常量
+ * </p>
+ */
+public interface AppConstant {
+
+
+//    /**
+//     * 商户号
+//     */
+//    String MCH_ID = "1379284802";
+//
+//    /**
+//     * 子商户号
+//     */
+//    String SUB_MCH_ID = "";
+//
+//    /**
+//     * 商户密钥
+//     */
+//    String MCH_SECRET = "R4q0yoo5GXh9A3CDiKJ6v7hgiE0aT0rM";
+
+    /**
+     * 货币类型
+     */
+    String FEE_TYPE = "CNY";
+
+    /**
+     * 交易类型 扫码
+     */
+    String TRADE_TYPE_NATIVE = "NATIVE";
+
+    /**
+     * 交易类型 公众号H5
+     */
+    String TRADE_TYPE_JSAPI = "JSAPI";
+
+    /**
+     * 交易类型 APP
+     */
+    String TRADE_TYPE_APP = "APP";
+
+    /**
+     * 设备号 PC网页或公众号内支付请传"WEB"
+     */
+    String DEVICE_INFO = "WEB";
+
+//    /**
+//     * 标题
+//     */
+//    String BODY = "工蜂家服产品";
+//
+//    /**
+//     * 标题
+//     */
+//    String BODY_RECHARGE = "工蜂家服充值";
+//
+//    /**
+//     * 通知地址
+//     */
+//    String NOTIFY_URL = "http://www.gfjiafu.com/wxpay/notify";
+//
+//    /**
+//     * 通知地址
+//     */
+//    String GXNOTIFY_URL = "http://www.gfjiafu.com/GXwxpay/notify";
+//
+//    /**
+//     * 通知地址
+//     */
+//    String NOTIFY_URL_RECHARGE = "http://www.gfjiafu.com/wxpay/notifyRecharge";
+//
+//    /**
+//     * 商户名称
+//     */
+//    String SEND_NAME = "工蜂家服";
+
+    String PAGE = "page";
+
+
+    public interface PayMode {
+
+        /**
+         * 支付宝
+         */
+        Integer ALIPAY = 0;
+
+        /**
+         * 微信
+         */
+        Integer WEI_XIN = 1;
+
+        /**
+         * 电子币
+         */
+        Integer COIN = 2;
+
+
+        /**
+         * 第三方支付
+         */
+        Integer AG_PAY = 3;
+
+    }
+
+    public interface InergralUpdateType {
+
+        /**
+         * 产品抵扣
+         */
+        Integer DISCOUNT = 0;
+
+        /**
+         * 任务
+         */
+        Integer TASK = 1;
+
+        /**
+         * 充值
+         */
+        Integer RECHARGE = 2;
+    }
+
+    public interface OrderStatus {
+
+        /**
+         * 下单,待付款
+         */
+        Integer NO_PAY = 0;
+
+        /**
+         * 支付完成,待上传原图、代发货
+         */
+        Integer PAY_OVER = 1;
+
+        /**
+         * 待修图、已发货
+         */
+        Integer WAIT_REPAIR = 2;
+
+        /**
+         * 修图完成待验收、
+         */
+        Integer ACCEPT = 3;
+
+        /**
+         * 验收不通过,待返修
+         */
+        Integer REWORK = 4;
+
+
+        /**
+         * 验收完成待评论、已收货待评论
+         */
+        Integer FINISH = 5;
+
+        /**
+         * 结束
+         */
+        Integer END = 6;
+
+
+        /**
+         * 退款中
+         */
+        Integer REFUNDING = 7;
+
+        /**
+         * 已经取消
+         */
+        Integer CANCEL = 8;
+
+
+        /**
+         * 退款失败
+         */
+        Integer REFUND_FAIL = 9;
+
+        /**
+         * 退款成功
+         */
+        Integer REFUND_SUCCESS = 10;
+
+
+    }
+
+    /**
+     * <p>货币类型。</p>
+     *
+     * @author 姓名 <br />
+     * 更新履历 <br />
+     * 日期 : 姓名: 更新内容<br />
+     * @version 1.0
+     */
+    public interface CoinType {
+
+        /**
+         * 充值
+         */
+        Integer RECHARGE = 0;
+
+        /**
+         * 消费
+         */
+        Integer CONSUMPTION = 1;
+
+        /**
+         * 兑换
+         */
+        Integer EXCHANGE = 2;
+
+        /**
+         * 提现
+         */
+        Integer CASH = 3;
+
+        /**
+         * 税收
+         */
+        Integer TAXES = 4;
+
+
+        /**
+         * 销售
+         */
+        Integer SALE = 5;
+
+        /**
+         * 返还
+         */
+        Integer FAN_HUAN = 6;
+
+
+        /**
+         * 退款
+         */
+        Integer REFUND = 7;
+
+        /**
+         * 赠送
+         */
+        Integer SONG = 8;
+
+    }
+
+    public interface Aliapi {
+
+        /**
+         * 交易创建,等待买家付款
+         */
+        String WAIT_BUYER_PAY = "WAIT_BUYER_PAY";
+
+        /**
+         * 未付款交易超时关闭,或支付完成后全额退款
+         */
+        String TRADE_CLOSED = "TRADE_CLOSED";
+
+        /**
+         * 交易支付成功
+         */
+        String TRADE_SUCCESS = "TRADE_SUCCESS";
+
+        /**
+         * 交易结束,不可退款
+         */
+        String TRADE_FINISHED = "TRADE_FINISHED";
+
+        /**
+         * typeFlag, 购买,订单付款
+         */
+        Integer BUY = 0;
+
+        /**
+         * typeFlag,充值
+         */
+        Integer RECHARGE = 1;
+
+        /**
+         * 押金
+         */
+        Integer CASH_PLEDGE = 2;
+
+    }
+
+    /**
+     * 推广码类型
+     */
+    public interface MarketType {
+
+        /**
+         * 减免
+         */
+        Integer REDUCTION = 1;
+
+        /**
+         * 折扣
+         */
+        Integer DISCOUNT = 2;
+    }
+
+
+    /**
+     * 退款状态
+     */
+    public interface RefundStatus {
+
+        /**
+         * 申请中
+         */
+        Integer APPLY = 0;
+
+        /**
+         * 成功
+         */
+        Integer SUCCESS = 1;
+
+        /**
+         * 失败
+         */
+        Integer FAIL = 2;
+
+        /**
+         * 取消
+         */
+        Integer CANCEL = 3;
+    }
+
+}

+ 36 - 0
src/main/java/com/izouma/awesomeadmin/constant/RongConstant.java

@@ -0,0 +1,36 @@
+package com.izouma.awesomeadmin.constant;
+
+/**
+ * 
+ * <p>
+ * 融云常量
+ * </p>
+ */
+public interface RongConstant {
+
+    /**
+     * 验证码模板
+     */
+    String VERIFY_TEMPLATEID = "fMsDXJ0Y4pCbrtN4a66JGx";
+
+    /**
+     * 通知模板
+     */
+    String NOTIFY_TEMPLATEID = "a6ZrRkr3AKqaDMizqPhFEi";
+
+    /**
+     * 提交订单
+     */
+    String TI_JIAO_DIN_DAN   = "0Q3R5Enjk_58Ycq-XEqAQt";
+
+    /**
+     * 派送订单
+     */
+    String PAI_SONG_DIN_DAN  = "e5daKayLkqi8WJnckJguke";
+
+    /**
+     * 通用
+     */
+    String COMMON_TEMPLATEID = "e8kzeKB5Ahx9Vnm7tPESn3";
+
+}

+ 17 - 0
src/main/java/com/izouma/awesomeadmin/container/DateConverter.java

@@ -0,0 +1,17 @@
+package com.izouma.awesomeadmin.container;
+
+import org.springframework.core.convert.converter.Converter;
+
+import java.util.Date;
+
+public class DateConverter implements Converter<String, Date> {
+    @Override
+    public Date convert(String source) {
+        try {
+            return new Date(Long.valueOf(source));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+}

+ 26 - 0
src/main/java/com/izouma/awesomeadmin/container/Lifecycle.java

@@ -0,0 +1,26 @@
+package com.izouma.awesomeadmin.container;
+
+/**
+ * 启动项,可在容器启动时加载
+ * @author Administrator
+ *
+ */
+public interface Lifecycle {
+	/**
+	 * 启动初始化
+	 * @return
+	 */
+	boolean init();
+	
+	/**
+	 * 启动项信息
+	 * @return
+	 */
+	String getItemInfo();
+	
+	/**
+	 * 关闭
+	 * @return
+	 */
+	boolean close();	
+}

+ 70 - 0
src/main/java/com/izouma/awesomeadmin/container/StartupListener.java

@@ -0,0 +1,70 @@
+package com.izouma.awesomeadmin.container;
+
+import com.izouma.awesomeadmin.util.Const;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * 启动监听方法
+ *
+ * @author OnceMad
+ */
+public class StartupListener implements ServletContextListener {
+
+    private static List<Lifecycle> startups = new LinkedList<Lifecycle>();
+
+    static {
+        //startups.add(new PhotoCheckWorker());
+    }
+
+
+    @Override
+    public void contextInitialized(ServletContextEvent sce) {
+
+        System.out.println("==================context Initialized=====================");
+
+        for (Lifecycle lifecycle : startups) {
+            System.out.print(lifecycle.getItemInfo() + " is start ");
+            if (lifecycle.init()) {
+                System.out.println(" successfully.");
+            } else {
+                System.out.println(" fail.");
+            }
+        }
+
+        initConst();
+
+
+        System.out.println("============context Initialized successfully===============");
+    }
+
+
+    @Override
+    public void contextDestroyed(ServletContextEvent sce) {
+
+        System.out.println("==================context Destroyed=====================");
+
+        for (Lifecycle lifecycle : startups) {
+            System.out.print(lifecycle.getItemInfo() + " is close ");
+            if (lifecycle.close()) {
+                System.out.println(" successfully.");
+            } else {
+                System.out.println(" fail.");
+            }
+        }
+
+    }
+
+
+    private void initConst() {
+
+        Const con = new Const();
+        con.initData();
+        System.out.println("============init const successfully===============");
+    }
+
+
+}

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/ActivityBannerMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.ActivityBanner;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.ActivityBannerMapper")
+public interface ActivityBannerMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(ActivityBanner record);
+
+    ActivityBanner selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ActivityBanner record);
+
+    List<ActivityBanner> queryAllActivityBanner(ActivityBanner record);
+
+    List<ActivityBanner> queryActivityBannerByPage(Map<String, Object> parameter);
+
+    int delete(ActivityBanner record);
+
+    ActivityBanner queryActivityBanner(ActivityBanner record);
+
+    List<ActivityBanner> query(ActivityBanner record);
+}
+

File diff suppressed because it is too large
+ 569 - 0
src/main/java/com/izouma/awesomeadmin/dao/ActivityBannerMapper.xml


+ 36 - 0
src/main/java/com/izouma/awesomeadmin/dao/ActivityInfoMapper.java

@@ -0,0 +1,36 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.ActivityInfo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.ActivityInfoMapper")
+public interface ActivityInfoMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(ActivityInfo record);
+
+    ActivityInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ActivityInfo record);
+
+    List<ActivityInfo> queryAllActivityInfo(ActivityInfo record);
+
+    List<ActivityInfo> queryActivityInfoByPage(Map<String, Object> parameter);
+
+    int delete(ActivityInfo record);
+
+    ActivityInfo queryActivityInfo(ActivityInfo record);
+
+    List<ActivityInfo> query(ActivityInfo record);
+
+    ActivityInfo queryUsedActivityInfo(ActivityInfo record);
+}
+

+ 632 - 0
src/main/java/com/izouma/awesomeadmin/dao/ActivityInfoMapper.xml

@@ -0,0 +1,632 @@
+<?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.izouma.awesomeadmin.dao.ActivityInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ActivityInfo">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="name" property="name" jdbcType="VARCHAR"/>
+        <result column="type_id" property="typeId" jdbcType="INTEGER"/>
+        <result column="min_value" property="minValue" jdbcType="VARCHAR"/>
+        <result column="max_value" property="maxValue" jdbcType="VARCHAR"/>
+        <result column="ratio" property="ratio" jdbcType="VARCHAR"/>
+        <result column="begin_time" property="beginTime" jdbcType="TIMESTAMP"/>
+        <result column="end_time" property="endTime" jdbcType="TIMESTAMP"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <result column="limit_num" property="limitNum" jdbcType="VARCHAR"/>
+        <result column="use_flag" property="useFlag" jdbcType="CHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            name,
+
+            type_id,
+
+            min_value,
+
+            max_value,
+
+            ratio,
+
+            begin_time,
+
+            end_time,
+
+            remark,
+
+            limit_num,
+
+            use_flag,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from activity_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from activity_info
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ActivityInfo" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into activity_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="name!= null">
+                name,
+            </if>
+            <if test="typeId!= null">
+                type_id,
+            </if>
+            <if test="minValue!= null">
+                min_value,
+            </if>
+            <if test="maxValue!= null">
+                max_value,
+            </if>
+            <if test="ratio!= null">
+                ratio,
+            </if>
+            <if test="beginTime!= null">
+                begin_time,
+            </if>
+            <if test="endTime!= null">
+                end_time,
+            </if>
+            <if test="remark!= null">
+                remark,
+            </if>
+            <if test="limitNum!= null">
+                limit_num,
+            </if>
+            <if test="useFlag!= null">
+                use_flag,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="typeId != null">
+                #{typeId,jdbcType=INTEGER},
+            </if>
+            <if test="minValue != null">
+                #{minValue,jdbcType=VARCHAR},
+            </if>
+            <if test="maxValue != null">
+                #{maxValue,jdbcType=VARCHAR},
+            </if>
+            <if test="ratio != null">
+                #{ratio,jdbcType=VARCHAR},
+            </if>
+            <if test="beginTime != null">
+                #{beginTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="endTime != null">
+                #{endTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="limitNum != null">
+                #{limitNum,jdbcType=VARCHAR},
+            </if>
+            <if test="useFlag != null">
+                #{useFlag,jdbcType=CHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ActivityInfo">
+        update activity_info
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                name= #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="typeId != null">
+                type_id= #{typeId,jdbcType=INTEGER},
+            </if>
+            <if test="minValue != null">
+                min_value= #{minValue,jdbcType=VARCHAR},
+            </if>
+            <if test="maxValue != null">
+                max_value= #{maxValue,jdbcType=VARCHAR},
+            </if>
+            <if test="ratio != null">
+                ratio= #{ratio,jdbcType=VARCHAR},
+            </if>
+            <if test="beginTime != null">
+                begin_time= #{beginTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="endTime != null">
+                end_time= #{endTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="remark != null">
+                remark= #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="limitNum != null">
+                limit_num= #{limitNum,jdbcType=VARCHAR},
+            </if>
+            <if test="useFlag != null">
+                use_flag= #{useFlag,jdbcType=CHAR},
+            </if>
+        </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="queryActivityInfoByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ActivityInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from activity_info
+        <where>
+            and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.name != null and !&quot;&quot;.equals(record.name)">
+                and name = #{record.name}
+            </if>
+            <if test="record.typeId != null and !&quot;&quot;.equals(record.typeId)">
+                and type_id = #{record.typeId}
+            </if>
+            <if test="record.minValue != null and !&quot;&quot;.equals(record.minValue)">
+                and min_value = #{record.minValue}
+            </if>
+            <if test="record.maxValue != null and !&quot;&quot;.equals(record.maxValue)">
+                and max_value = #{record.maxValue}
+            </if>
+            <if test="record.ratio != null and !&quot;&quot;.equals(record.ratio)">
+                and ratio = #{record.ratio}
+            </if>
+            <if test="record.beginTime != null and !&quot;&quot;.equals(record.beginTime)">
+                and begin_time = #{record.beginTime}
+            </if>
+            <if test="record.endTime != null and !&quot;&quot;.equals(record.endTime)">
+                and end_time = #{record.endTime}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and remark = #{record.remark}
+            </if>
+            <if test="record.limitNum != null and !&quot;&quot;.equals(record.limitNum)">
+                and limit_num = #{record.limitNum}
+            </if>
+            <if test="record.useFlag != null and !&quot;&quot;.equals(record.useFlag)">
+                and use_flag = #{record.useFlag}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR name LIKE concat('%',#{record.searchKey},'%')
+                    OR min_value LIKE concat('%',#{record.searchKey},'%')
+                    OR max_value LIKE concat('%',#{record.searchKey},'%')
+                    OR ratio LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                    OR limit_num LIKE concat('%',#{record.searchKey},'%')
+                    OR use_flag LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllActivityInfo" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ActivityInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from activity_info
+        <where>
+            and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+            <if test="typeId != null and !&quot;&quot;.equals(typeId)">
+                and type_id = #{typeId}
+            </if>
+            <if test="minValue != null and !&quot;&quot;.equals(minValue)">
+                and min_value = #{minValue}
+            </if>
+            <if test="maxValue != null and !&quot;&quot;.equals(maxValue)">
+                and max_value = #{maxValue}
+            </if>
+            <if test="ratio != null and !&quot;&quot;.equals(ratio)">
+                and ratio = #{ratio}
+            </if>
+            <if test="beginTime != null and !&quot;&quot;.equals(beginTime)">
+                and begin_time = #{beginTime}
+            </if>
+            <if test="endTime != null and !&quot;&quot;.equals(endTime)">
+                and end_time = #{endTime}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="limitNum != null and !&quot;&quot;.equals(limitNum)">
+                and limit_num = #{limitNum}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR name LIKE concat('%',#{searchKey},'%')
+                    OR min_value LIKE concat('%',#{searchKey},'%')
+                    OR max_value LIKE concat('%',#{searchKey},'%')
+                    OR ratio LIKE concat('%',#{searchKey},'%')
+                    OR remark LIKE concat('%',#{searchKey},'%')
+                    OR limit_num LIKE concat('%',#{searchKey},'%')
+                    OR use_flag LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryActivityInfo" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ActivityInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from activity_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+            <if test="typeId != null and !&quot;&quot;.equals(typeId)">
+                and type_id = #{typeId}
+            </if>
+            <if test="minValue != null and !&quot;&quot;.equals(minValue)">
+                and min_value = #{minValue}
+            </if>
+            <if test="maxValue != null and !&quot;&quot;.equals(maxValue)">
+                and max_value = #{maxValue}
+            </if>
+            <if test="ratio != null and !&quot;&quot;.equals(ratio)">
+                and ratio = #{ratio}
+            </if>
+            <if test="beginTime != null and !&quot;&quot;.equals(beginTime)">
+                and begin_time = #{beginTime}
+            </if>
+            <if test="endTime != null and !&quot;&quot;.equals(endTime)">
+                and end_time = #{endTime}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="limitNum != null and !&quot;&quot;.equals(limitNum)">
+                and limit_num = #{limitNum}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <select id="queryUsedActivityInfo" parameterType="java.util.Map"
+            resultMap="ActivityInfoWithType">
+        select
+        <include refid="Base_Column_List"/>
+        from activity_info
+        <where>
+            and del_flag = 'N'
+            and use_flag = 'Y'
+            <![CDATA[ AND  begin_time < NOW() AND  end_time > NOW() ]]>
+
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+            <if test="typeId != null and !&quot;&quot;.equals(typeId)">
+                and type_id = #{typeId}
+            </if>
+            <if test="minValue != null and !&quot;&quot;.equals(minValue)">
+                and min_value = #{minValue}
+            </if>
+            <if test="maxValue != null and !&quot;&quot;.equals(maxValue)">
+                and max_value = #{maxValue}
+            </if>
+            <if test="ratio != null and !&quot;&quot;.equals(ratio)">
+                and ratio = #{ratio}
+            </if>
+            <if test="beginTime != null and !&quot;&quot;.equals(beginTime)">
+                and begin_time = #{beginTime}
+            </if>
+            <if test="endTime != null and !&quot;&quot;.equals(endTime)">
+                and end_time = #{endTime}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="limitNum != null and !&quot;&quot;.equals(limitNum)">
+                and limit_num = #{limitNum}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+
+        </where>
+        ORDER BY id DESC
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE activity_info SET del_flag = 'Y'
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ActivityInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from activity_info
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+
+
+    <resultMap id="ActivityInfoWithType" type="com.izouma.awesomeadmin.model.ActivityInfo" extends="BaseResultMap">
+
+
+        <association property="activityType"
+                     javaType="com.izouma.awesomeadmin.model.ActivityType"
+                     select="com.izouma.awesomeadmin.dao.ActivityTypeMapper.queryActivityType"
+                     column="{ id = type_id }"/>
+
+    </resultMap>
+
+</mapper>
+

+ 36 - 0
src/main/java/com/izouma/awesomeadmin/dao/ActivityLogMapper.java

@@ -0,0 +1,36 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.ActivityLog;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.ActivityLogMapper")
+public interface ActivityLogMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(ActivityLog record);
+
+    ActivityLog selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ActivityLog record);
+
+    List<ActivityLog> queryAllActivityLog(ActivityLog record);
+
+    List<ActivityLog> queryActivityLogByPage(Map<String, Object> parameter);
+
+    int delete(ActivityLog record);
+
+    ActivityLog queryActivityLog(ActivityLog record);
+
+    ActivityLog queryLimitActivityLog(ActivityLog record);
+
+    List<ActivityLog> query(ActivityLog record);
+}
+

File diff suppressed because it is too large
+ 666 - 0
src/main/java/com/izouma/awesomeadmin/dao/ActivityLogMapper.xml


+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/ActivityTypeMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.ActivityType;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.ActivityTypeMapper")
+public interface ActivityTypeMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(ActivityType record);
+
+    ActivityType selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ActivityType record);
+
+    List<ActivityType> queryAllActivityType(ActivityType record);
+
+    List<ActivityType> queryActivityTypeByPage(Map<String, Object> parameter);
+
+    int delete(ActivityType record);
+
+    ActivityType queryActivityType(ActivityType record);
+
+    List<ActivityType> query(ActivityType record);
+}
+

+ 413 - 0
src/main/java/com/izouma/awesomeadmin/dao/ActivityTypeMapper.xml

@@ -0,0 +1,413 @@
+<?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.izouma.awesomeadmin.dao.ActivityTypeMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ActivityType" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
+                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
+                                <result column="type_name" property="typeName" jdbcType="VARCHAR" />
+                                <result column="limit_num" property="limitNum" jdbcType="VARCHAR" />
+                                <result column="remark" property="remark" jdbcType="VARCHAR" />
+                                <result column="use_flag" property="useFlag" jdbcType="CHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            type_name,
+
+            limit_num,
+
+            remark,
+
+            use_flag,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from activity_type
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from activity_type
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ActivityType" useGeneratedKeys="true" keyProperty="id">
+        insert into activity_type
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="updateTime!= null" >
+                update_time,
+            </if>
+                <if test="updateUser!= null" >
+                update_user,
+            </if>
+                <if test="createTime!= null" >
+                create_time,
+            </if>
+                <if test="createUser!= null" >
+                create_user,
+            </if>
+                <if test="typeName!= null" >
+                type_name,
+            </if>
+                <if test="limitNum!= null" >
+                limit_num,
+            </if>
+                <if test="remark!= null" >
+                remark,
+            </if>
+                <if test="useFlag!= null" >
+                use_flag,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="updateUser != null" >
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="createUser != null" >
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="typeName != null" >
+                #{typeName,jdbcType=VARCHAR},
+            </if>
+                    <if test="limitNum != null" >
+                #{limitNum,jdbcType=VARCHAR},
+            </if>
+                    <if test="remark != null" >
+                #{remark,jdbcType=VARCHAR},
+            </if>
+                    <if test="useFlag != null" >
+                #{useFlag,jdbcType=CHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ActivityType" >
+        update activity_type
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="updateTime != null" >
+               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="updateUser != null" >
+               update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="createTime != null" >
+               create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="createUser != null" >
+               create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="typeName != null" >
+               type_name= #{typeName,jdbcType=VARCHAR},
+            </if>
+                     <if test="limitNum != null" >
+               limit_num= #{limitNum,jdbcType=VARCHAR},
+            </if>
+                     <if test="remark != null" >
+               remark= #{remark,jdbcType=VARCHAR},
+            </if>
+                     <if test="useFlag != null" >
+               use_flag= #{useFlag,jdbcType=CHAR},
+            </if>
+                 </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="queryActivityTypeByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ActivityType">
+        select <include refid="Base_Column_List"/> from activity_type
+        <where>
+            and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and  update_time = #{record.updateTime}
+            </if>
+                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and  update_user = #{record.updateUser}
+            </if>
+                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and  create_time = #{record.createTime}
+            </if>
+                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and  create_user = #{record.createUser}
+            </if>
+                     <if test="record.typeName != null and !&quot;&quot;.equals(record.typeName)">
+                and  type_name = #{record.typeName}
+            </if>
+                     <if test="record.limitNum != null and !&quot;&quot;.equals(record.limitNum)">
+                and  limit_num = #{record.limitNum}
+            </if>
+                     <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and  remark = #{record.remark}
+            </if>
+                     <if test="record.useFlag != null and !&quot;&quot;.equals(record.useFlag)">
+                and  use_flag = #{record.useFlag}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  type_name LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  limit_num LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  remark LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  use_flag LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllActivityType" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ActivityType">
+        select <include refid="Base_Column_List"/> from activity_type
+        <where>
+            and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and  update_time = #{updateTime}
+            </if>
+                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and  update_user = #{updateUser}
+            </if>
+                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and  create_time = #{createTime}
+            </if>
+                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and  create_user = #{createUser}
+            </if>
+                    <if test="typeName != null and !&quot;&quot;.equals(typeName)">
+                and  type_name = #{typeName}
+            </if>
+                    <if test="limitNum != null and !&quot;&quot;.equals(limitNum)">
+                and  limit_num = #{limitNum}
+            </if>
+                    <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and  remark = #{remark}
+            </if>
+                    <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and  use_flag = #{useFlag}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  type_name LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  limit_num LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  remark LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  use_flag LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryActivityType" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ActivityType">
+        select <include refid="Base_Column_List"/> from activity_type
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+                     <if test="typeName != null and !&quot;&quot;.equals(typeName)">
+                and type_name = #{typeName}
+            </if>
+                     <if test="limitNum != null and !&quot;&quot;.equals(limitNum)">
+                and limit_num = #{limitNum}
+            </if>
+                     <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+                     <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE activity_type SET del_flag = 'Y'
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ActivityType">
+        select <include refid="Base_Column_List"/> from activity_type
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/AlipayTempMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.AlipayTemp;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.AlipayTempMapper")
+public interface AlipayTempMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(AlipayTemp record);
+
+    AlipayTemp selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(AlipayTemp record);
+
+    List<AlipayTemp> queryAllAlipayTemp(AlipayTemp record);
+
+    List<AlipayTemp> queryAlipayTempByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    AlipayTemp queryAlipayTemp(AlipayTemp record);
+
+    List<AlipayTemp> query(AlipayTemp record);
+}
+

File diff suppressed because it is too large
+ 527 - 0
src/main/java/com/izouma/awesomeadmin/dao/AlipayTempMapper.xml


+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/BannerInfoMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.BannerInfo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.BannerInfoMapper")
+public interface BannerInfoMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(BannerInfo record);
+
+    BannerInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(BannerInfo record);
+
+    List<BannerInfo> queryAllBannerInfo(BannerInfo record);
+
+    List<BannerInfo> queryBannerInfoByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    BannerInfo queryBannerInfo(BannerInfo record);
+
+    List<BannerInfo> query(BannerInfo record);
+}
+

+ 440 - 0
src/main/java/com/izouma/awesomeadmin/dao/BannerInfoMapper.xml

@@ -0,0 +1,440 @@
+<?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.izouma.awesomeadmin.dao.BannerInfoMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.BannerInfo" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
+                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
+                                <result column="location" property="location" jdbcType="VARCHAR" />
+                                <result column="title" property="title" jdbcType="VARCHAR" />
+                                <result column="subtitle" property="subtitle" jdbcType="VARCHAR" />
+                                <result column="url" property="url" jdbcType="VARCHAR" />
+                                <result column="image_url" property="imageUrl" jdbcType="VARCHAR" />
+                                <result column="rank" property="rank" jdbcType="INTEGER" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            location,
+
+            title,
+
+            subtitle,
+
+            url,
+
+            image_url,
+
+            rank,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from banner_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from banner_info
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.BannerInfo" useGeneratedKeys="true" keyProperty="id">
+        insert into banner_info
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="updateTime!= null" >
+                update_time,
+            </if>
+                <if test="updateUser!= null" >
+                update_user,
+            </if>
+                <if test="createTime!= null" >
+                create_time,
+            </if>
+                <if test="createUser!= null" >
+                create_user,
+            </if>
+                <if test="location!= null" >
+                location,
+            </if>
+                <if test="title!= null" >
+                title,
+            </if>
+                <if test="subtitle!= null" >
+                subtitle,
+            </if>
+                <if test="url!= null" >
+                url,
+            </if>
+                <if test="imageUrl!= null" >
+                image_url,
+            </if>
+                <if test="rank!= null" >
+                rank,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="updateUser != null" >
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="createUser != null" >
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="location != null" >
+                #{location,jdbcType=VARCHAR},
+            </if>
+                    <if test="title != null" >
+                #{title,jdbcType=VARCHAR},
+            </if>
+                    <if test="subtitle != null" >
+                #{subtitle,jdbcType=VARCHAR},
+            </if>
+                    <if test="url != null" >
+                #{url,jdbcType=VARCHAR},
+            </if>
+                    <if test="imageUrl != null" >
+                #{imageUrl,jdbcType=VARCHAR},
+            </if>
+                    <if test="rank != null" >
+                #{rank,jdbcType=INTEGER},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.BannerInfo" >
+        update banner_info
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="updateTime != null" >
+               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="updateUser != null" >
+               update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="createTime != null" >
+               create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="createUser != null" >
+               create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="location != null" >
+               location= #{location,jdbcType=VARCHAR},
+            </if>
+                     <if test="title != null" >
+               title= #{title,jdbcType=VARCHAR},
+            </if>
+                     <if test="subtitle != null" >
+               subtitle= #{subtitle,jdbcType=VARCHAR},
+            </if>
+                     <if test="url != null" >
+               url= #{url,jdbcType=VARCHAR},
+            </if>
+                     <if test="imageUrl != null" >
+               image_url= #{imageUrl,jdbcType=VARCHAR},
+            </if>
+                     <if test="rank != null" >
+               rank= #{rank,jdbcType=INTEGER},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryBannerInfoByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.BannerInfo">
+        select <include refid="Base_Column_List"/> from banner_info
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and  update_time = #{record.updateTime}
+            </if>
+                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and  update_user = #{record.updateUser}
+            </if>
+                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and  create_time = #{record.createTime}
+            </if>
+                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and  create_user = #{record.createUser}
+            </if>
+                     <if test="record.location != null and !&quot;&quot;.equals(record.location)">
+                and  location = #{record.location}
+            </if>
+                     <if test="record.title != null and !&quot;&quot;.equals(record.title)">
+                and  title = #{record.title}
+            </if>
+                     <if test="record.subtitle != null and !&quot;&quot;.equals(record.subtitle)">
+                and  subtitle = #{record.subtitle}
+            </if>
+                     <if test="record.url != null and !&quot;&quot;.equals(record.url)">
+                and  url = #{record.url}
+            </if>
+                     <if test="record.imageUrl != null and !&quot;&quot;.equals(record.imageUrl)">
+                and  image_url = #{record.imageUrl}
+            </if>
+                     <if test="record.rank != null and !&quot;&quot;.equals(record.rank)">
+                and  rank = #{record.rank}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  location LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  title LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  subtitle LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  url LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  image_url LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  rank LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        location , rank desc, id desc
+    </select>
+    <select id="queryAllBannerInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.BannerInfo">
+        select <include refid="Base_Column_List"/> from banner_info
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and  update_time = #{updateTime}
+            </if>
+                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and  update_user = #{updateUser}
+            </if>
+                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and  create_time = #{createTime}
+            </if>
+                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and  create_user = #{createUser}
+            </if>
+                    <if test="location != null and !&quot;&quot;.equals(location)">
+                and  location = #{location}
+            </if>
+                    <if test="title != null and !&quot;&quot;.equals(title)">
+                and  title = #{title}
+            </if>
+                    <if test="subtitle != null and !&quot;&quot;.equals(subtitle)">
+                and  subtitle = #{subtitle}
+            </if>
+                    <if test="url != null and !&quot;&quot;.equals(url)">
+                and  url = #{url}
+            </if>
+                    <if test="imageUrl != null and !&quot;&quot;.equals(imageUrl)">
+                and  image_url = #{imageUrl}
+            </if>
+                    <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and  rank = #{rank}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  location LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  title LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  subtitle LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  url LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  image_url LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  rank LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        location , rank desc, id desc
+    </select>
+    <select id="queryBannerInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.BannerInfo">
+        select <include refid="Base_Column_List"/> from banner_info
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+                     <if test="location != null and !&quot;&quot;.equals(location)">
+                and location = #{location}
+            </if>
+                     <if test="title != null and !&quot;&quot;.equals(title)">
+                and title = #{title}
+            </if>
+                     <if test="subtitle != null and !&quot;&quot;.equals(subtitle)">
+                and subtitle = #{subtitle}
+            </if>
+                     <if test="url != null and !&quot;&quot;.equals(url)">
+                and url = #{url}
+            </if>
+                     <if test="imageUrl != null and !&quot;&quot;.equals(imageUrl)">
+                and image_url = #{imageUrl}
+            </if>
+                     <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and rank = #{rank}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE banner_info SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.BannerInfo">
+        select <include refid="Base_Column_List"/> from banner_info
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 27 - 0
src/main/java/com/izouma/awesomeadmin/dao/CommonQueryMapper.java

@@ -0,0 +1,27 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.datasource.DataSource;
+import com.izouma.awesomeadmin.model.CommonQuery;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+@DataSource("dataSource")
+@Repository("com.izouma.awesomeadmin.dao.CommonQueryMapper")
+public interface CommonQueryMapper {
+
+
+    List<Map> getTableListByPage(Map<String, Object> parameter);
+
+    List<Map> getTableListAll(CommonQuery record);
+
+    Map selectByPrimaryKey(CommonQuery record);
+
+
+    int insertSelective(Map<String, Object> parameter);
+
+    int updateByPrimaryKeySelective(Map<String, Object> parameter);
+
+    int delete(CommonQuery record);
+}

+ 189 - 0
src/main/java/com/izouma/awesomeadmin/dao/CommonQueryMapper.xml

@@ -0,0 +1,189 @@
+<?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.izouma.awesomeadmin.dao.CommonQueryMapper">
+
+
+    <select id="getTableListByPage" resultType="java.util.Map">
+
+        SELECT * FROM ${record.tableName}
+        <where>
+            and (del_flag = 'N' or del_flag = '0')
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <foreach item="item" index="index" collection="record.searchColumn.split('_,')">
+                        OR ${item} LIKE concat('%',#{record.searchKey},'%')
+                    </foreach>
+                </trim>
+            </if>
+
+
+        </where>
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+            order by
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+
+        </if>
+
+    </select>
+
+    <select id="getTableListAll" resultType="java.util.Map">
+
+        SELECT * FROM ${tableName}
+        <where>
+            and (del_flag = 'N' or del_flag = '0')
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <foreach item="item" index="index" collection="searchColumn.split('_,')">
+                        OR ${item} LIKE concat('%',#{searchKey},'%')
+                    </foreach>
+                </trim>
+            </if>
+
+        </where>
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+            order by
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+
+        </if>
+
+    </select>
+
+
+    <select id="selectByPrimaryKey" resultType="java.util.Map" parameterType="java.util.Map">
+        select
+        *
+        from ${tableName}
+        where id = #{primaryKey,jdbcType=INTEGER}
+    </select>
+
+    <insert id="insertSelective" parameterType="java.util.Map" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into ${tableName}
+
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+
+            <foreach item="item" index="index" collection="formData.keys">
+                <if test="formData[item]!= null">
+                    ${item},
+                </if>
+            </foreach>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+
+            <foreach item="item" index="index" collection="formData.keys">
+                <if test="formData[item]!= null">
+                    #{formData[${item}]},
+                </if>
+            </foreach>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="java.util.Map">
+        update ${tableName}
+        <set>
+
+            <foreach item="item" index="index" collection="formData.keys">
+                <if test="formData[item]!= null">
+                    ${item} = #{formData[${item}]},
+                </if>
+            </foreach>
+
+        </set>
+        where id = #{primaryKey,jdbcType=INTEGER}
+    </update>
+
+    <update id="delete">
+        UPDATE ${tableName} SET del_flag = 'Y'
+        <where>
+            AND id = #{primaryKey}
+        </where>
+    </update>
+</mapper>

+ 27 - 0
src/main/java/com/izouma/awesomeadmin/dao/CommonQuerySqlServerMapper.java

@@ -0,0 +1,27 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.datasource.DataSource;
+import com.izouma.awesomeadmin.model.CommonQuery;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+@DataSource("dataSource")
+@Repository("com.izouma.awesomeadmin.dao.CommonQuerySqlServerMapper")
+public interface CommonQuerySqlServerMapper {
+
+    List<Map> getTableListByPage(Map<String, Object> parameter);
+
+    List<Map> getTableListAll(CommonQuery record);
+
+    Map selectByPrimaryKey(CommonQuery record);
+
+
+    int insertSelective(Map<String, Object> parameter);
+
+    int updateByPrimaryKeySelective(Map<String, Object> parameter);
+
+
+    int delete(CommonQuery record);
+}

+ 182 - 0
src/main/java/com/izouma/awesomeadmin/dao/CommonQuerySqlServerMapper.xml

@@ -0,0 +1,182 @@
+<?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.izouma.awesomeadmin.dao.CommonQuerySqlServerMapper">
+
+
+    <select id="getTableListByPage" resultType="java.util.Map">
+
+        SELECT * FROM ${record.tableName}
+        <where>
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <foreach item="item" index="index" collection="record.searchColumn.split('_,')">
+                        OR ${item} LIKE concat('%',#{record.searchKey},'%')
+                    </foreach>
+                </trim>
+            </if>
+
+        </where>
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+            order by
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+
+        </if>
+
+    </select>
+
+    <select id="getTableListAll" resultType="java.util.Map">
+
+        SELECT * FROM ${tableName}
+        <where>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    <foreach item="item" index="index" collection="searchColumn.split('_,')">
+                        OR ${item} LIKE concat('%',#{searchKey},'%')
+                    </foreach>
+                </trim>
+            </if>
+
+        </where>
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+            order by
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+
+        </if>
+
+    </select>
+
+    <select id="selectByPrimaryKey" resultType="java.util.Map" parameterType="java.util.Map">
+        select
+        *
+        from ${tableName}
+        where id = #{primaryKey,jdbcType=INTEGER}
+    </select>
+
+    <insert id="insertSelective" parameterType="java.util.Map" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into ${tableName}
+
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+
+            <foreach item="item" index="index" collection="formData.keys">
+                <if test="formData[item]!= null">
+                    ${item},
+                </if>
+            </foreach>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+
+            <foreach item="item" index="index" collection="formData.keys">
+                <if test="formData[item]!= null">
+                    #{formData[${item}]},
+                </if>
+            </foreach>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="java.util.Map">
+        update ${tableName}
+        <set>
+
+            <foreach item="item" index="index" collection="formData.keys">
+                <if test="formData[item]!= null">
+                    ${item} = #{formData[${item}]},
+                </if>
+            </foreach>
+
+        </set>
+        where id = #{primaryKey,jdbcType=INTEGER}
+    </update>
+
+    <delete id="delete">
+        delete from ${tableName}
+        where id = #{primaryKey,jdbcType=INTEGER}
+    </delete>
+</mapper>

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/CouponDetailMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.CouponDetail;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.CouponDetailMapper")
+public interface CouponDetailMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(CouponDetail record);
+
+    CouponDetail selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(CouponDetail record);
+
+    List<CouponDetail> queryAllCouponDetail(CouponDetail record);
+
+    List<CouponDetail> queryCouponDetailByPage(Map<String, Object> parameter);
+
+    int delete(CouponDetail record);
+
+    CouponDetail queryCouponDetail(CouponDetail record);
+
+    List<CouponDetail> query(CouponDetail record);
+}
+

+ 550 - 0
src/main/java/com/izouma/awesomeadmin/dao/CouponDetailMapper.xml

@@ -0,0 +1,550 @@
+<?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.izouma.awesomeadmin.dao.CouponDetailMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.CouponDetail">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="coupon_id" property="couponId" jdbcType="INTEGER"/>
+        <result column="store_id" property="storeId" jdbcType="INTEGER"/>
+        <result column="coupon_code" property="couponCode" jdbcType="VARCHAR"/>
+        <result column="use_times" property="useTimes" jdbcType="INTEGER"/>
+        <result column="receive_flag" property="receiveFlag" jdbcType="CHAR"/>
+        <result column="receive_time" property="receiveTime" jdbcType="TIMESTAMP"/>
+        <result column="use_flag" property="useFlag" jdbcType="CHAR"/>
+        <result column="use_time" property="useTime" jdbcType="TIMESTAMP"/>
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            coupon_id,
+
+            store_id,
+
+            coupon_code,
+
+            use_times,
+
+            receive_flag,
+
+            receive_time,
+
+            use_flag,
+
+            use_time,
+
+            user_id,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from coupon_detail
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from coupon_detail
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.CouponDetail" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into coupon_detail
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="couponId!= null">
+                coupon_id,
+            </if>
+            <if test="storeId!= null">
+                store_id,
+            </if>
+            <if test="couponCode!= null">
+                coupon_code,
+            </if>
+            <if test="useTimes!= null">
+                use_times,
+            </if>
+            <if test="receiveFlag!= null">
+                receive_flag,
+            </if>
+            <if test="receiveTime!= null">
+                receive_time,
+            </if>
+            <if test="useFlag!= null">
+                use_flag,
+            </if>
+            <if test="useTime!= null">
+                use_time,
+            </if>
+            <if test="userId!= null">
+                user_id,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="couponId != null">
+                #{couponId,jdbcType=INTEGER},
+            </if>
+            <if test="storeId != null">
+                #{storeId,jdbcType=INTEGER},
+            </if>
+            <if test="couponCode != null">
+                #{couponCode,jdbcType=VARCHAR},
+            </if>
+            <if test="useTimes != null">
+                #{useTimes,jdbcType=INTEGER},
+            </if>
+            <if test="receiveFlag != null">
+                #{receiveFlag,jdbcType=CHAR},
+            </if>
+            <if test="receiveTime != null">
+                #{receiveTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="useFlag != null">
+                #{useFlag,jdbcType=CHAR},
+            </if>
+            <if test="useTime != null">
+                #{useTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="userId != null">
+                #{userId,jdbcType=INTEGER},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.CouponDetail">
+        update coupon_detail
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="couponId != null">
+                coupon_id= #{couponId,jdbcType=INTEGER},
+            </if>
+            <if test="storeId != null">
+                store_id= #{storeId,jdbcType=INTEGER},
+            </if>
+            <if test="couponCode != null">
+                coupon_code= #{couponCode,jdbcType=VARCHAR},
+            </if>
+            <if test="useTimes != null">
+                use_times= #{useTimes,jdbcType=INTEGER},
+            </if>
+            <if test="receiveFlag != null">
+                receive_flag= #{receiveFlag,jdbcType=CHAR},
+            </if>
+            <if test="receiveTime != null">
+                receive_time= #{receiveTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="useFlag != null">
+                use_flag= #{useFlag,jdbcType=CHAR},
+            </if>
+            <if test="useTime != null">
+                use_time= #{useTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="userId != null">
+                user_id= #{userId,jdbcType=INTEGER},
+            </if>
+        </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="queryCouponDetailByPage" parameterType="java.util.Map"
+            resultMap="AllCouponDetailResult">
+        select
+        <include refid="Base_Column_List"/>
+        from coupon_detail
+        <where>
+            and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.couponId != null and !&quot;&quot;.equals(record.couponId)">
+                and coupon_id = #{record.couponId}
+            </if>
+            <if test="record.storeId != null and !&quot;&quot;.equals(record.storeId)">
+                and store_id = #{record.storeId}
+            </if>
+            <if test="record.couponCode != null and !&quot;&quot;.equals(record.couponCode)">
+                and coupon_code = #{record.couponCode}
+            </if>
+            <if test="record.useTimes != null and !&quot;&quot;.equals(record.useTimes)">
+                and use_times = #{record.useTimes}
+            </if>
+            <if test="record.receiveFlag != null and !&quot;&quot;.equals(record.receiveFlag)">
+                and receive_flag = #{record.receiveFlag}
+            </if>
+            <if test="record.receiveTime != null and !&quot;&quot;.equals(record.receiveTime)">
+                and receive_time = #{record.receiveTime}
+            </if>
+            <if test="record.useFlag != null and !&quot;&quot;.equals(record.useFlag)">
+                and use_flag = #{record.useFlag}
+            </if>
+            <if test="record.useTime != null and !&quot;&quot;.equals(record.useTime)">
+                and use_time = #{record.useTime}
+            </if>
+            <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and user_id = #{record.userId}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR coupon_id LIKE concat('%',#{record.searchKey},'%')
+                    OR store_id LIKE concat('%',#{record.searchKey},'%')
+                    OR coupon_code LIKE concat('%',#{record.searchKey},'%')
+                    OR use_times LIKE concat('%',#{record.searchKey},'%')
+                    OR receive_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR receive_time LIKE concat('%',#{record.searchKey},'%')
+                    OR use_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR use_time LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllCouponDetail" parameterType="java.util.Map"
+            resultMap="AllCouponDetailResult">
+        select
+        <include refid="Base_Column_List"/>
+        from coupon_detail
+        <where>
+            and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="couponId != null and !&quot;&quot;.equals(couponId)">
+                and coupon_id = #{couponId}
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="couponCode != null and !&quot;&quot;.equals(couponCode)">
+                and coupon_code = #{couponCode}
+            </if>
+            <if test="useTimes != null and !&quot;&quot;.equals(useTimes)">
+                and use_times = #{useTimes}
+            </if>
+            <if test="receiveFlag != null and !&quot;&quot;.equals(receiveFlag)">
+                and receive_flag = #{receiveFlag}
+            </if>
+            <if test="receiveTime != null and !&quot;&quot;.equals(receiveTime)">
+                and receive_time = #{receiveTime}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="useTime != null and !&quot;&quot;.equals(useTime)">
+                and use_time = #{useTime}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR coupon_id LIKE concat('%',#{searchKey},'%')
+                    OR store_id LIKE concat('%',#{searchKey},'%')
+                    OR coupon_code LIKE concat('%',#{searchKey},'%')
+                    OR use_times LIKE concat('%',#{searchKey},'%')
+                    OR receive_flag LIKE concat('%',#{searchKey},'%')
+                    OR receive_time LIKE concat('%',#{searchKey},'%')
+                    OR use_flag LIKE concat('%',#{searchKey},'%')
+                    OR use_time LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryCouponDetail" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.CouponDetail">
+        select
+        <include refid="Base_Column_List"/>
+        from coupon_detail
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="couponId != null and !&quot;&quot;.equals(couponId)">
+                and coupon_id = #{couponId}
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="couponCode != null and !&quot;&quot;.equals(couponCode)">
+                and coupon_code = #{couponCode}
+            </if>
+            <if test="useTimes != null and !&quot;&quot;.equals(useTimes)">
+                and use_times = #{useTimes}
+            </if>
+            <if test="receiveFlag != null and !&quot;&quot;.equals(receiveFlag)">
+                and receive_flag = #{receiveFlag}
+            </if>
+            <if test="receiveTime != null and !&quot;&quot;.equals(receiveTime)">
+                and receive_time = #{receiveTime}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="useTime != null and !&quot;&quot;.equals(useTime)">
+                and use_time = #{useTime}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE coupon_detail SET del_flag = 'Y'
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.CouponDetail">
+        select
+        <include refid="Base_Column_List"/>
+        from coupon_detail
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+
+
+    <resultMap id="AllCouponDetailResult" type="com.izouma.awesomeadmin.model.CouponDetail" extends="BaseResultMap">
+
+
+        <association property="userInfo"
+                     javaType="com.izouma.awesomeadmin.model.UserInfo"
+                     select="com.izouma.awesomeadmin.dao.UserInfoMapper.querySingleUserInfo"
+                     column="{ id = user_id }"/>
+
+    </resultMap>
+
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/CouponInfoMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.CouponInfo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.CouponInfoMapper")
+public interface CouponInfoMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(CouponInfo record);
+
+    CouponInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(CouponInfo record);
+
+    List<CouponInfo> queryAllCouponInfo(CouponInfo record);
+
+    List<CouponInfo> queryCouponInfoByPage(Map<String, Object> parameter);
+
+    int delete(CouponInfo record);
+
+    CouponInfo queryCouponInfo(CouponInfo record);
+
+    List<CouponInfo> query(CouponInfo record);
+}
+

+ 650 - 0
src/main/java/com/izouma/awesomeadmin/dao/CouponInfoMapper.xml

@@ -0,0 +1,650 @@
+<?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.izouma.awesomeadmin.dao.CouponInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.CouponInfo">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="name" property="name" jdbcType="VARCHAR"/>
+        <result column="discription" property="discription" jdbcType="VARCHAR"/>
+        <result column="discount_money" property="discountMoney" jdbcType="DECIMAL"/>
+        <result column="limit_money" property="limitMoney" jdbcType="DECIMAL"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+        <result column="status_flag" property="statusFlag" jdbcType="INTEGER"/>
+        <result column="available_days" property="availableDays" jdbcType="INTEGER"/>
+        <result column="use_times" property="useTimes" jdbcType="INTEGER"/>
+        <result column="begin_time" property="beginTime" jdbcType="TIMESTAMP"/>
+        <result column="end_time" property="endTime" jdbcType="TIMESTAMP"/>
+        <result column="on_shelf" property="onShelf" jdbcType="CHAR"/>
+        <result column="open_flag" property="openFlag" jdbcType="CHAR"/>
+        <result column="store_id" property="storeId" jdbcType="INTEGER"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            name,
+
+            discription,
+
+            discount_money,
+
+            limit_money,
+
+            type_flag,
+
+            status_flag,
+
+            available_days,
+
+            use_times,
+
+            begin_time,
+
+            end_time,
+
+            on_shelf,
+
+            open_flag,
+
+            store_id,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from coupon_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from coupon_info
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.CouponInfo" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into coupon_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="name!= null">
+                name,
+            </if>
+            <if test="discription!= null">
+                discription,
+            </if>
+            <if test="discountMoney!= null">
+                discount_money,
+            </if>
+            <if test="limitMoney!= null">
+                limit_money,
+            </if>
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="statusFlag!= null">
+                status_flag,
+            </if>
+            <if test="availableDays!= null">
+                available_days,
+            </if>
+            <if test="useTimes!= null">
+                use_times,
+            </if>
+            <if test="beginTime!= null">
+                begin_time,
+            </if>
+            <if test="endTime!= null">
+                end_time,
+            </if>
+            <if test="onShelf!= null">
+                on_shelf,
+            </if>
+            <if test="openFlag!= null">
+                open_flag,
+            </if>
+            <if test="storeId!= null">
+                store_id,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="discription != null">
+                #{discription,jdbcType=VARCHAR},
+            </if>
+            <if test="discountMoney != null">
+                #{discountMoney,jdbcType=DECIMAL},
+            </if>
+            <if test="limitMoney != null">
+                #{limitMoney,jdbcType=DECIMAL},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="statusFlag != null">
+                #{statusFlag,jdbcType=INTEGER},
+            </if>
+            <if test="availableDays != null">
+                #{availableDays,jdbcType=INTEGER},
+            </if>
+            <if test="useTimes != null">
+                #{useTimes,jdbcType=INTEGER},
+            </if>
+            <if test="beginTime != null">
+                #{beginTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="endTime != null">
+                #{endTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="onShelf != null">
+                #{onShelf,jdbcType=CHAR},
+            </if>
+            <if test="openFlag != null">
+                #{openFlag,jdbcType=CHAR},
+            </if>
+            <if test="storeId != null">
+                #{storeId,jdbcType=INTEGER},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.CouponInfo">
+        update coupon_info
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                name= #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="discription != null">
+                discription= #{discription,jdbcType=VARCHAR},
+            </if>
+            <if test="discountMoney != null">
+                discount_money= #{discountMoney,jdbcType=DECIMAL},
+            </if>
+            <if test="limitMoney != null">
+                limit_money= #{limitMoney,jdbcType=DECIMAL},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="statusFlag != null">
+                status_flag= #{statusFlag,jdbcType=INTEGER},
+            </if>
+            <if test="availableDays != null">
+                available_days= #{availableDays,jdbcType=INTEGER},
+            </if>
+            <if test="useTimes != null">
+                use_times= #{useTimes,jdbcType=INTEGER},
+            </if>
+            <if test="beginTime != null">
+                begin_time= #{beginTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="endTime != null">
+                end_time= #{endTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="onShelf != null">
+                on_shelf= #{onShelf,jdbcType=CHAR},
+            </if>
+            <if test="openFlag != null">
+                open_flag= #{openFlag,jdbcType=CHAR},
+            </if>
+            <if test="storeId != null">
+                store_id= #{storeId,jdbcType=INTEGER},
+            </if>
+        </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="queryCouponInfoByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.CouponInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from coupon_info
+        <where>
+            and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.name != null and !&quot;&quot;.equals(record.name)">
+                and name = #{record.name}
+            </if>
+            <if test="record.discription != null and !&quot;&quot;.equals(record.discription)">
+                and discription = #{record.discription}
+            </if>
+            <if test="record.discountMoney != null and !&quot;&quot;.equals(record.discountMoney)">
+                and discount_money = #{record.discountMoney}
+            </if>
+            <if test="record.limitMoney != null and !&quot;&quot;.equals(record.limitMoney)">
+                and limit_money = #{record.limitMoney}
+            </if>
+            <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and type_flag = #{record.typeFlag}
+            </if>
+            <if test="record.statusFlag != null and !&quot;&quot;.equals(record.statusFlag)">
+                and status_flag = #{record.statusFlag}
+            </if>
+            <if test="record.availableDays != null and !&quot;&quot;.equals(record.availableDays)">
+                and available_days = #{record.availableDays}
+            </if>
+            <if test="record.useTimes != null and !&quot;&quot;.equals(record.useTimes)">
+                and use_times = #{record.useTimes}
+            </if>
+            <if test="record.beginTime != null and !&quot;&quot;.equals(record.beginTime)">
+                and begin_time = #{record.beginTime}
+            </if>
+            <if test="record.endTime != null and !&quot;&quot;.equals(record.endTime)">
+                and end_time = #{record.endTime}
+            </if>
+            <if test="record.onShelf != null and !&quot;&quot;.equals(record.onShelf)">
+                and on_shelf = #{record.onShelf}
+            </if>
+            <if test="record.openFlag != null and !&quot;&quot;.equals(record.openFlag)">
+                and open_flag = #{record.openFlag}
+            </if>
+            <if test="record.storeId != null and !&quot;&quot;.equals(record.storeId)">
+                and store_id = #{record.storeId}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR name LIKE concat('%',#{record.searchKey},'%')
+                    OR discription LIKE concat('%',#{record.searchKey},'%')
+                    OR discount_money LIKE concat('%',#{record.searchKey},'%')
+                    OR limit_money LIKE concat('%',#{record.searchKey},'%')
+                    OR on_shelf LIKE concat('%',#{record.searchKey},'%')
+                    OR open_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR store_id LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllCouponInfo" parameterType="java.util.Map" resultMap="AllCouponInfoResult">
+        select
+        <include refid="Base_Column_List"/>
+        , #{receiveFlag} as receive_flag
+        <if test="userId != null and !&quot;&quot;.equals(userId)">
+            , (
+            SELECT
+            COUNT(1)
+            FROM
+            user_coupon
+            WHERE
+            del_flag = 'N'
+            AND coupon_id = coupon_info.id
+            and user_id = #{userId}
+            ) as user_count
+        </if>
+
+        from coupon_info
+        <where>
+            and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+            <if test="discription != null and !&quot;&quot;.equals(discription)">
+                and discription = #{discription}
+            </if>
+            <if test="discountMoney != null and !&quot;&quot;.equals(discountMoney)">
+                and discount_money = #{discountMoney}
+            </if>
+            <if test="limitMoney != null and !&quot;&quot;.equals(limitMoney)">
+                and limit_money = #{limitMoney}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="statusFlag != null and !&quot;&quot;.equals(statusFlag)">
+                and status_flag = #{statusFlag}
+            </if>
+            <if test="availableDays != null and !&quot;&quot;.equals(availableDays)">
+                and available_days = #{availableDays}
+            </if>
+            <if test="useTimes != null and !&quot;&quot;.equals(useTimes)">
+                and use_times = #{useTimes}
+            </if>
+            <if test="beginTime != null and !&quot;&quot;.equals(beginTime)">
+                and begin_time = #{beginTime}
+            </if>
+            <if test="endTime != null and !&quot;&quot;.equals(endTime)">
+                and end_time = #{endTime}
+            </if>
+            <if test="onShelf != null and !&quot;&quot;.equals(onShelf)">
+                and on_shelf = #{onShelf}
+            </if>
+            <if test="openFlag != null and !&quot;&quot;.equals(openFlag)">
+                and open_flag = #{openFlag}
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR name LIKE concat('%',#{searchKey},'%')
+                    OR discription LIKE concat('%',#{searchKey},'%')
+                    OR discount_money LIKE concat('%',#{searchKey},'%')
+                    OR limit_money LIKE concat('%',#{searchKey},'%')
+                    OR on_shelf LIKE concat('%',#{searchKey},'%')
+                    OR open_flag LIKE concat('%',#{searchKey},'%')
+                    OR store_id LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryCouponInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.CouponInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from coupon_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+            <if test="discription != null and !&quot;&quot;.equals(discription)">
+                and discription = #{discription}
+            </if>
+            <if test="discountMoney != null and !&quot;&quot;.equals(discountMoney)">
+                and discount_money = #{discountMoney}
+            </if>
+            <if test="limitMoney != null and !&quot;&quot;.equals(limitMoney)">
+                and limit_money = #{limitMoney}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="statusFlag != null and !&quot;&quot;.equals(statusFlag)">
+                and status_flag = #{statusFlag}
+            </if>
+            <if test="availableDays != null and !&quot;&quot;.equals(availableDays)">
+                and available_days = #{availableDays}
+            </if>
+            <if test="useTimes != null and !&quot;&quot;.equals(useTimes)">
+                and use_times = #{useTimes}
+            </if>
+            <if test="beginTime != null and !&quot;&quot;.equals(beginTime)">
+                and begin_time = #{beginTime}
+            </if>
+            <if test="endTime != null and !&quot;&quot;.equals(endTime)">
+                and end_time = #{endTime}
+            </if>
+            <if test="onShelf != null and !&quot;&quot;.equals(onShelf)">
+                and on_shelf = #{onShelf}
+            </if>
+            <if test="openFlag != null and !&quot;&quot;.equals(openFlag)">
+                and open_flag = #{openFlag}
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE coupon_info SET del_flag = 'Y'
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.CouponInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from coupon_info
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+
+
+    <resultMap id="AllCouponInfoResult" type="com.izouma.awesomeadmin.model.CouponInfo"
+               extends="BaseResultMap">
+
+        <association property="storeInfo"
+                     javaType="com.izouma.awesomeadmin.model.StoreInfo"
+                     select="com.izouma.awesomeadmin.dao.StoreInfoMapper.queryStoreInfo"
+                     column="{ id = store_id }"/>
+
+        <collection property="couponDetailList"
+                    ofType="com.izouma.awesomeadmin.model.CouponDetail"
+                    select="com.izouma.awesomeadmin.dao.CouponDetailMapper.queryAllCouponDetail"
+                    column="{ couponId = id, receiveFlag = receive_flag }"/>
+
+
+    </resultMap>
+
+</mapper>
+

+ 36 - 0
src/main/java/com/izouma/awesomeadmin/dao/DataSourceInfoMapper.java

@@ -0,0 +1,36 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.DataSourceInfo;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Dao接口
+ */
+@Component
+@Repository("com.zoumaframe.dao.DataSourceInfoMapper")
+public interface DataSourceInfoMapper {
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(DataSourceInfo record);
+
+    DataSourceInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(DataSourceInfo record);
+
+    List<DataSourceInfo> queryAllDataSourceInfo(DataSourceInfo record);
+
+    List<DataSourceInfo> queryDataSourceInfoByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    DataSourceInfo queryDataSourceInfo(DataSourceInfo record);
+
+    List<DataSourceInfo> query(DataSourceInfo record);
+}
+

+ 327 - 0
src/main/java/com/izouma/awesomeadmin/dao/DataSourceInfoMapper.xml

@@ -0,0 +1,327 @@
+<?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.izouma.awesomeadmin.dao.DataSourceInfoMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.DataSourceInfo" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="code" property="code" jdbcType="VARCHAR" />
+                                <result column="database_type" property="databaseType" jdbcType="VARCHAR" />
+                                <result column="url" property="url" jdbcType="VARCHAR" />
+                                <result column="username" property="username" jdbcType="VARCHAR" />
+                                <result column="password" property="password" jdbcType="VARCHAR" />
+                                <result column="database_name" property="databaseName" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            code,
+
+            database_type,
+
+            url,
+
+            username,
+
+            password,
+
+            database_name,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from sys_data_source_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from sys_data_source_info
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.DataSourceInfo" useGeneratedKeys="true" keyProperty="id">
+        insert into sys_data_source_info
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="code!= null" >
+                code,
+            </if>
+                <if test="databaseType!= null" >
+                database_type,
+            </if>
+                <if test="url!= null" >
+                url,
+            </if>
+                <if test="username!= null" >
+                username,
+            </if>
+                <if test="password!= null" >
+                password,
+            </if>
+                <if test="databaseName!= null" >
+                database_name,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="code != null" >
+                #{code,jdbcType=VARCHAR},
+            </if>
+                    <if test="databaseType != null" >
+                #{databaseType,jdbcType=VARCHAR},
+            </if>
+                    <if test="url != null" >
+                #{url,jdbcType=VARCHAR},
+            </if>
+                    <if test="username != null" >
+                #{username,jdbcType=VARCHAR},
+            </if>
+                    <if test="password != null" >
+                #{password,jdbcType=VARCHAR},
+            </if>
+                    <if test="databaseName != null" >
+                #{databaseName,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.DataSourceInfo" >
+        update sys_data_source_info
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="code != null" >
+               code= #{code,jdbcType=VARCHAR},
+            </if>
+                     <if test="databaseType != null" >
+               database_type= #{databaseType,jdbcType=VARCHAR},
+            </if>
+                     <if test="url != null" >
+               url= #{url,jdbcType=VARCHAR},
+            </if>
+                     <if test="username != null" >
+               username= #{username,jdbcType=VARCHAR},
+            </if>
+                     <if test="password != null" >
+               password= #{password,jdbcType=VARCHAR},
+            </if>
+                     <if test="databaseName != null" >
+               database_name= #{databaseName,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryDataSourceInfoByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DataSourceInfo">
+        select <include refid="Base_Column_List"/> from sys_data_source_info
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.code != null and !&quot;&quot;.equals(record.code)">
+                and  code = #{record.code}
+            </if>
+                     <if test="record.databaseType != null and !&quot;&quot;.equals(record.databaseType)">
+                and  database_type = #{record.databaseType}
+            </if>
+                     <if test="record.url != null and !&quot;&quot;.equals(record.url)">
+                and  url = #{record.url}
+            </if>
+                     <if test="record.username != null and !&quot;&quot;.equals(record.username)">
+                and  username = #{record.username}
+            </if>
+                     <if test="record.password != null and !&quot;&quot;.equals(record.password)">
+                and  password = #{record.password}
+            </if>
+                     <if test="record.databaseName != null and !&quot;&quot;.equals(record.databaseName)">
+                and  database_name = #{record.databaseName}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                OR  code LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  database_type LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  url LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  username LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  password LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  database_name LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllDataSourceInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DataSourceInfo">
+        select <include refid="Base_Column_List"/> from sys_data_source_info
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="code != null and !&quot;&quot;.equals(code)">
+                and  code = #{code}
+            </if>
+                    <if test="databaseType != null and !&quot;&quot;.equals(databaseType)">
+                and  database_type = #{databaseType}
+            </if>
+                    <if test="url != null and !&quot;&quot;.equals(url)">
+                and  url = #{url}
+            </if>
+                    <if test="username != null and !&quot;&quot;.equals(username)">
+                and  username = #{username}
+            </if>
+                    <if test="password != null and !&quot;&quot;.equals(password)">
+                and  password = #{password}
+            </if>
+                    <if test="databaseName != null and !&quot;&quot;.equals(databaseName)">
+                and  database_name = #{databaseName}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                OR  code LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  database_type LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  url LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  username LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  password LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  database_name LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryDataSourceInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DataSourceInfo">
+        select <include refid="Base_Column_List"/> from sys_data_source_info
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="code != null and !&quot;&quot;.equals(code)">
+                and code = #{code}
+            </if>
+                     <if test="databaseType != null and !&quot;&quot;.equals(databaseType)">
+                and database_type = #{databaseType}
+            </if>
+                     <if test="url != null and !&quot;&quot;.equals(url)">
+                and url = #{url}
+            </if>
+                     <if test="username != null and !&quot;&quot;.equals(username)">
+                and username = #{username}
+            </if>
+                     <if test="password != null and !&quot;&quot;.equals(password)">
+                and password = #{password}
+            </if>
+                     <if test="databaseName != null and !&quot;&quot;.equals(databaseName)">
+                and database_name = #{databaseName}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE sys_data_source_info SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DataSourceInfo">
+        select <include refid="Base_Column_List"/> from sys_data_source_info
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                    </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 51 - 0
src/main/java/com/izouma/awesomeadmin/dao/DepartInfoMapper.java

@@ -0,0 +1,51 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import com.izouma.awesomeadmin.model.UserInfo;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import com.izouma.awesomeadmin.model.DepartInfo;
+
+/**
+ * depart_info Dao接口
+ * Thu Apr 26 10:56:37 CST 2018  Suo Chen Cheng
+ */
+@Repository("com.izouma.awesomeadmin.dao.DepartInfoMapper")
+public interface DepartInfoMapper {
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(DepartInfo record);
+
+    DepartInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(DepartInfo record);
+
+    List<DepartInfo> queryAllDepartInfo(DepartInfo record);
+
+    List<DepartInfo> queryDepartInfosByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    DepartInfo queryDepartInfo(DepartInfo record);
+
+    List<DepartInfo> findPower(DepartInfo record);
+
+    List<DepartInfo> getParentList(Integer id);
+
+    List<DepartInfo> selectByPrimaryKeys(String ids);
+
+    List<DepartInfo> getUserDeparts(@Param("userId") Integer userId);
+
+    int setUserDeparts(@Param("userId") Integer userId, @Param("departs") List<String> departs);
+
+    int clearUserDeparts(@Param("userId") Integer userId);
+
+    String getUserDepartId(Integer id);
+
+    List<UserInfo> getDepartUsers(Integer departId);
+}
+

+ 341 - 0
src/main/java/com/izouma/awesomeadmin/dao/DepartInfoMapper.xml

@@ -0,0 +1,341 @@
+<?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.izouma.awesomeadmin.dao.DepartInfoMapper" >
+	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.DepartInfo" >
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="depart_name" property="departName" jdbcType="VARCHAR" />
+		<result column="parent_id" property="parentId" jdbcType="INTEGER" />
+		<result column="all_parent_id" property="allParentId" jdbcType="VARCHAR" />
+		<result column="description" property="description" jdbcType="VARCHAR" />
+		<result column="depart_code" property="departCode" jdbcType="VARCHAR" />
+		<result column="org_code" property="orgCode" jdbcType="VARCHAR" />
+		<result column="type" property="type" jdbcType="INTEGER" />
+		<result column="remark" property="remark" jdbcType="VARCHAR" />
+		<result column="sort" property="sort" jdbcType="INTEGER" />
+		<result column="del_flag" property="delFlag" jdbcType="CHAR" />
+		<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+		<result column="permission" property="permission" jdbcType="VARCHAR" />
+	</resultMap>
+	<sql id="Base_Column_List" >
+		 id, depart_name, parent_id, all_parent_id, description, depart_code, org_code, type, remark, sort, del_flag, create_time, permission
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_depart
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+	<select id="selectByPrimaryKeys" resultMap="BaseResultMap" parameterType="java.lang.String" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_depart
+		where FIND_IN_SET(id, #{ids,jdbcType=INTEGER}) and del_flag = 'N'
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+		delete from sys_depart
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.DepartInfo" useGeneratedKeys="true" keyProperty="id">
+		insert into sys_depart
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,	
+			</if>
+			<if test="departName != null" >
+				depart_name,	
+			</if>
+			<if test="parentId != null" >
+				parent_id,	
+			</if>
+			<if test="allParentId != null" >
+				all_parent_id,	
+			</if>
+			<if test="description != null" >
+				description,	
+			</if>
+			<if test="departCode != null" >
+				depart_code,	
+			</if>
+			<if test="orgCode != null" >
+				org_code,	
+			</if>
+			<if test="type != null" >
+				type,	
+			</if>
+			<if test="remark != null" >
+				remark,	
+			</if>
+			<if test="sort != null" >
+				sort,
+			</if>
+			<if test="delFlag != null" >
+				del_flag,	
+			</if>
+			<if test="createTime != null" >
+				create_time,	
+			</if>
+			<if test="permission != null" >
+				permission,	
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=INTEGER},	
+			</if>
+			<if test="departName != null" >
+				#{departName,jdbcType=VARCHAR},	
+			</if>
+			<if test="parentId != null" >
+				#{parentId,jdbcType=INTEGER},	
+			</if>
+			<if test="allParentId != null" >
+				#{allParentId,jdbcType=VARCHAR},	
+			</if>
+			<if test="description != null" >
+				#{description,jdbcType=VARCHAR},	
+			</if>
+			<if test="departCode != null" >
+				#{departCode,jdbcType=VARCHAR},	
+			</if>
+			<if test="orgCode != null" >
+				#{orgCode,jdbcType=VARCHAR},	
+			</if>
+			<if test="type != null" >
+				#{type,jdbcType=INTEGER},	
+			</if>
+			<if test="remark != null" >
+				#{remark,jdbcType=VARCHAR},	
+			</if>
+			<if test="sort != null" >
+				#{sort,jdbcType=INTEGER},
+			</if>
+			<if test="delFlag != null" >
+				#{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="createTime != null" >
+				#{createTime,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="permission != null" >
+				#{permission,jdbcType=VARCHAR},	
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.DepartInfo" >
+		UPDATE sys_depart
+		<set >
+			<if test="departName != null" >
+				depart_name = #{departName,jdbcType=VARCHAR},	
+			</if>
+			<if test="parentId != null" >
+				parent_id = #{parentId,jdbcType=INTEGER},	
+			</if>
+			<if test="allParentId != null" >
+				all_parent_id = #{allParentId,jdbcType=VARCHAR},	
+			</if>
+			<if test="description != null" >
+				description = #{description,jdbcType=VARCHAR},	
+			</if>
+			<if test="departCode != null" >
+				depart_code = #{departCode,jdbcType=VARCHAR},	
+			</if>
+			<if test="orgCode != null" >
+				org_code = #{orgCode,jdbcType=VARCHAR},	
+			</if>
+			<if test="type != null" >
+				type = #{type,jdbcType=INTEGER},	
+			</if>
+			<if test="remark != null" >
+				remark = #{remark,jdbcType=VARCHAR},	
+			</if>
+			<if test="sort != null" >
+				sort = #{sort,jdbcType=INTEGER},
+			</if>
+			<if test="delFlag != null" >
+				del_flag = #{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="createTime != null" >
+				create_time = #{createTime,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="permission != null" >
+				permission = #{permission,jdbcType=VARCHAR},	
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<select id="queryDepartInfosByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DepartInfo">
+		select <include refid="Base_Column_List"/> from sys_depart
+		<where>
+			and del_flag = 'N'
+			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
+				and id = #{record.id}	
+			</if>
+			<if test="record.departName != null and !&quot;&quot;.equals(record.departName)">
+				and depart_name = #{record.departName}	
+			</if>
+			<if test="record.parentId != null and !&quot;&quot;.equals(record.parentId)">
+				and parent_id = #{record.parentId}	
+			</if>
+			<if test="record.allParentId != null and !&quot;&quot;.equals(record.allParentId)">
+				and all_parent_id = #{record.allParentId}	
+			</if>
+			<if test="record.description != null and !&quot;&quot;.equals(record.description)">
+				and description = #{record.description}	
+			</if>
+			<if test="record.departCode != null and !&quot;&quot;.equals(record.departCode)">
+				and depart_code = #{record.departCode}	
+			</if>
+			<if test="record.orgCode != null and !&quot;&quot;.equals(record.orgCode)">
+				and org_code = #{record.orgCode}	
+			</if>
+			<if test="record.type != null and !&quot;&quot;.equals(record.type)">
+				and type = #{record.type}	
+			</if>
+			<if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+				and remark = #{record.remark}	
+			</if>
+			<if test="record.sort != null and !&quot;&quot;.equals(record.sort)">
+				and sort = #{record.sort}
+			</if>
+			<if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+				and del_flag = #{record.delFlag}	
+			</if>
+			<if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+				and create_time = #{record.createTime}	
+			</if>
+			<if test="record.permission != null and !&quot;&quot;.equals(record.permission)">
+				and permission = #{record.permission}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryAllDepartInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DepartInfo">
+		select <include refid="Base_Column_List"/> from sys_depart
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="departName != null and !&quot;&quot;.equals(departName)">
+				and depart_name = #{departName}	
+			</if>
+			<if test="parentId != null and !&quot;&quot;.equals(parentId)">
+				and parent_id = #{parentId}	
+			</if>
+			<if test="allParentId != null and !&quot;&quot;.equals(allParentId)">
+				and all_parent_id = #{allParentId}	
+			</if>
+			<if test="description != null and !&quot;&quot;.equals(description)">
+				and description = #{description}	
+			</if>
+			<if test="departCode != null and !&quot;&quot;.equals(departCode)">
+				and depart_code = #{departCode}	
+			</if>
+			<if test="orgCode != null and !&quot;&quot;.equals(orgCode)">
+				and org_code = #{orgCode}	
+			</if>
+			<if test="type != null and !&quot;&quot;.equals(type)">
+				and type = #{type}	
+			</if>
+			<if test="remark != null and !&quot;&quot;.equals(remark)">
+				and remark = #{remark}	
+			</if>
+			<if test="sort != null and !&quot;&quot;.equals(sort)">
+				and sort = #{sort}
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="createTime != null and !&quot;&quot;.equals(createTime)">
+				and create_time = #{createTime}	
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryDepartInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DepartInfo">
+		select <include refid="Base_Column_List"/> from sys_depart
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="departName != null and !&quot;&quot;.equals(departName)">
+				and depart_name = #{departName}	
+			</if>
+			<if test="parentId != null and !&quot;&quot;.equals(parentId)">
+				and parent_id = #{parentId}	
+			</if>
+			<if test="allParentId != null and !&quot;&quot;.equals(allParentId)">
+				and all_parent_id = #{allParentId}	
+			</if>
+			<if test="description != null and !&quot;&quot;.equals(description)">
+				and description = #{description}	
+			</if>
+			<if test="departCode != null and !&quot;&quot;.equals(departCode)">
+				and depart_code = #{departCode}	
+			</if>
+			<if test="orgCode != null and !&quot;&quot;.equals(orgCode)">
+				and org_code = #{orgCode}	
+			</if>
+			<if test="type != null and !&quot;&quot;.equals(type)">
+				and type = #{type}	
+			</if>
+			<if test="remark != null and !&quot;&quot;.equals(remark)">
+				and remark = #{remark}	
+			</if>
+			<if test="sort != null and !&quot;&quot;.equals(sort)">
+				and sort = #{sort}
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="createTime != null and !&quot;&quot;.equals(createTime)">
+				and create_time = #{createTime}	
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}	
+			</if>
+		</where>
+		LIMIT 1
+	</select>
+    <select id="findPower" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DepartInfo">
+		select * from sys_depart where all_parent_id  LIKE '${allParentId}%'  and id=  #{parentId}
+	</select>
+    <update id="delete">
+		UPDATE sys_depart SET del_flag = 'Y'
+		<where>
+			AND id = #{id}
+		</where>
+	</update>
+
+	<select id="getParentList" resultType="departInfo" parameterType="integer">
+	    SELECT * from sys_depart WHERE FIND_IN_SET(id,(SELECT all_parent_id from sys_depart WHERE id  = #{id})) AND del_flag = 'N'
+	</select>
+
+	<select id="getUserDeparts" resultType="com.izouma.awesomeadmin.model.DepartInfo">
+		select
+		<include refid="Base_Column_List" />
+		from sys_depart
+		where id in (select depart_id from sys_user_depart where user_id = #{userId})
+		and del_flag = 'N'
+	</select>
+    <insert id="setUserDeparts">
+		insert into sys_user_depart (user_id, depart_id)
+		values
+		<foreach collection="departs" item="departId" separator=",">
+			(#{userId}, #{departId})
+		</foreach>
+	</insert>
+	<delete id="clearUserDeparts">
+		delete from sys_user_depart where user_id = #{userId}
+	</delete>
+	<select id="getUserDepartId" resultType="java.lang.String">
+		SELECT group_concat(depart_id) FROM sys_user_depart WHERE user_id = #{id}
+	</select>
+	<select id="getDepartUsers" resultType="com.izouma.awesomeadmin.model.UserInfo">
+		select * from sys_user where id in (select user_id from sys_user_depart where depart_id = #{departId}) and del_flag = 'N'
+	</select>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/GenCodeMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.stereotype.Repository;
+
+import com.izouma.awesomeadmin.model.GenCode;
+
+/**
+ * gen_code_model Dao接口
+ * Fri May 04 15:57:06 CST 2018  Suo Chen Cheng
+ */ 
+@Repository("com.izouma.awesomeadmin.dao.GenCodeModelMapper")
+public interface GenCodeMapper {
+
+	int deleteByPrimaryKey(Integer id);
+
+	int insertSelective(GenCode record);
+
+	GenCode selectByPrimaryKey(Integer id);
+
+	int updateByPrimaryKeySelective(GenCode record);
+
+	List <GenCode> queryAllGenCode(GenCode record);
+
+	List <GenCode> queryGenCodeByPage(Map <String, Object> parameter);
+
+	int delete(String id);
+
+	GenCode queryGenCode(GenCode record);
+}
+

+ 265 - 0
src/main/java/com/izouma/awesomeadmin/dao/GenCodeMapper.xml

@@ -0,0 +1,265 @@
+<?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.izouma.awesomeadmin.dao.GenCodeMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.GenCode">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="tableName" property="tableName" jdbcType="VARCHAR"/>
+        <result column="className" property="className" jdbcType="VARCHAR"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <result column="genTable" property="genTable" jdbcType="BIT"/>
+        <result column="genClass" property="genClass" jdbcType="BIT"/>
+        <result column="genList" property="genList" jdbcType="BIT"/>
+        <result column="genForm" property="genForm" jdbcType="BIT"/>
+        <result column="field_id" property="fieldId" jdbcType="VARCHAR"/>
+        <result column="gen_json" property="genJson" jdbcType="VARCHAR"/>
+        <result column="del_flag" property="delFlag" jdbcType="VARCHAR"/>
+        <result column="type_flag" property="typeFlag" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+		 id, tableName, className, remark, genTable, genClass,
+		 genList, genForm, field_id, gen_json, del_flag, type_flag
+	</sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_gen_code
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+		delete from sys_gen_code
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.GenCode" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_gen_code
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                id,
+            </if>
+            <if test="tableName != null">
+                tableName,
+            </if>
+            <if test="className != null">
+                className,
+            </if>
+            <if test="remark != null">
+                remark,
+            </if>
+            <if test="genTable != null">
+                genTable,
+            </if>
+            <if test="genClass != null">
+                genClass,
+            </if>
+            <if test="genList != null">
+                genList,
+            </if>
+            <if test="genForm != null">
+                genForm,
+            </if>
+            <if test="fieldId != null">
+                field_id,
+            </if>
+            <if test="genJson != null">
+                gen_json,
+            </if>
+            <if test="typeFlag != null">
+                type_flag,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="tableName != null">
+                #{tableName,jdbcType=VARCHAR},
+            </if>
+            <if test="className != null">
+                #{className,jdbcType=VARCHAR},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="genTable != null">
+                #{genTable,jdbcType=BIT},
+            </if>
+            <if test="genClass != null">
+                #{genClass,jdbcType=BIT},
+            </if>
+            <if test="genList != null">
+                #{genList,jdbcType=BIT},
+            </if>
+            <if test="genForm != null">
+                #{genForm,jdbcType=BIT},
+            </if>
+            <if test="fieldId != null">
+                #{fieldId,jdbcType=VARCHAR},
+            </if>
+            <if test="genJson != null">
+                #{genJson,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.GenCode">
+        update sys_gen_code
+        <set>
+            <if test="tableName != null">
+                tableName = #{tableName,jdbcType=VARCHAR},
+            </if>
+            <if test="className != null">
+                className = #{className,jdbcType=VARCHAR},
+            </if>
+            <if test="remark != null">
+                remark = #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="genTable != null">
+                genTable = #{genTable,jdbcType=BIT},
+            </if>
+            <if test="genClass != null">
+                genClass = #{genClass,jdbcType=BIT},
+            </if>
+            <if test="genList != null">
+                genList = #{genList,jdbcType=BIT},
+            </if>
+            <if test="genForm != null">
+                genForm = #{genForm,jdbcType=BIT},
+            </if>
+            <if test="fieldId != null">
+                field_id = #{fieldId,jdbcType=VARCHAR},
+            </if>
+            <if test="genJson != null">
+                gen_json = #{genJson,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                type_flag = #{typeFlag,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryGenCodeByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenCode">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_gen_code
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.tableName != null and !&quot;&quot;.equals(record.tableName)">
+                and tableName = #{record.tableName}
+            </if>
+            <if test="record.className != null and !&quot;&quot;.equals(record.className)">
+                and className = #{record.className}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and remark = #{record.remark}
+            </if>
+            <if test="record.genTable != null and !&quot;&quot;.equals(record.genTable)">
+                and genTable = #{record.genTable}
+            </if>
+            <if test="record.genClass != null and !&quot;&quot;.equals(record.genClass)">
+                and genClass = #{record.genClass}
+            </if>
+            <if test="record.genList != null and !&quot;&quot;.equals(record.genList)">
+                and genList = #{record.genList}
+            </if>
+            <if test="record.genForm != null and !&quot;&quot;.equals(record.genForm)">
+                and genForm = #{record.genForm}
+            </if>
+            <if test="record.fieldId != null and !&quot;&quot;.equals(record.fieldId)">
+                and field_id = #{record.fieldId}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR tableName LIKE concat('%',#{record.searchKey},'%')
+                    OR className LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllGenCode" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenCode">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_gen_code
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="tableName != null and !&quot;&quot;.equals(tableName)">
+                and tableName = #{tableName}
+            </if>
+            <if test="className != null and !&quot;&quot;.equals(className)">
+                and className = #{className}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="genTable != null and !&quot;&quot;.equals(genTable)">
+                and genTable = #{genTable}
+            </if>
+            <if test="genClass != null and !&quot;&quot;.equals(genClass)">
+                and genClass = #{genClass}
+            </if>
+            <if test="genList != null and !&quot;&quot;.equals(genList)">
+                and genList = #{genList}
+            </if>
+            <if test="genForm != null and !&quot;&quot;.equals(genForm)">
+                and genForm = #{genForm}
+            </if>
+            <if test="fieldId != null and !&quot;&quot;.equals(fieldId)">
+                and field_id = #{fieldId}
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryGenCode" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenCode">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_gen_code
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="tableName != null and !&quot;&quot;.equals(tableName)">
+                and tableName = #{tableName}
+            </if>
+            <if test="className != null and !&quot;&quot;.equals(className)">
+                and className = #{className}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="genTable != null and !&quot;&quot;.equals(genTable)">
+                and genTable = #{genTable}
+            </if>
+            <if test="genClass != null and !&quot;&quot;.equals(genClass)">
+                and genClass = #{genClass}
+            </if>
+            <if test="genList != null and !&quot;&quot;.equals(genList)">
+                and genList = #{genList}
+            </if>
+            <if test="genForm != null and !&quot;&quot;.equals(genForm)">
+                and genForm = #{genForm}
+            </if>
+            <if test="fieldId != null and !&quot;&quot;.equals(fieldId)">
+                and field_id = #{fieldId}
+            </if>
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE sys_gen_code SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/GenTestTableMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.stereotype.Repository;
+
+import com.izouma.awesomeadmin.model.GenTestTable;
+
+/**
+ * gen_test_table Dao接口
+ * Fri Apr 20 09:24:30 CST 2018  Suo Chen Cheng
+ */ 
+@Repository("com.izouma.awesomeadmin.dao.GenTestTableMapper")
+public interface GenTestTableMapper {
+
+	int deleteByPrimaryKey(Integer id);
+
+	int insertSelective(GenTestTable record);
+
+	GenTestTable selectByPrimaryKey(Integer id);
+
+	int updateByPrimaryKeySelective(GenTestTable record);
+
+	List <GenTestTable> queryAllGenTestTable(GenTestTable record);
+
+	List <GenTestTable> queryGenTestTablesByPage(Map <String, Object> parameter);
+
+	int delete(String id);
+
+	GenTestTable queryGenTestTable(GenTestTable record);
+}
+

+ 209 - 0
src/main/java/com/izouma/awesomeadmin/dao/GenTestTableMapper.xml

@@ -0,0 +1,209 @@
+<?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.izouma.awesomeadmin.dao.GenTestTableMapper" >
+	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.GenTestTable" >
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="my_column" property="myColumn" jdbcType="VARCHAR" />
+		<result column="aaa_test" property="aaaTest" jdbcType="VARCHAR" />
+		<result column="bbb_flag" property="bbbFlag" jdbcType="CHAR" />
+		<result column="no_comment" property="noComment" jdbcType="VARCHAR" />
+		<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+		<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+		<result column="del_flag" property="delFlag" jdbcType="CHAR" />
+	</resultMap>
+	<sql id="Base_Column_List" >
+		 id, my_column, aaa_test, bbb_flag, no_comment, create_time, update_time, del_flag
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+		select
+		<include refid="Base_Column_List" />
+		from gen_test_table
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+		delete from gen_test_table
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.GenTestTable" useGeneratedKeys="true" keyProperty="id">
+		insert into gen_test_table
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,	
+			</if>
+			<if test="myColumn != null" >
+				my_column,	
+			</if>
+			<if test="aaaTest != null" >
+				aaa_test,	
+			</if>
+			<if test="bbbFlag != null" >
+				bbb_flag,	
+			</if>
+			<if test="noComment != null" >
+				no_comment,	
+			</if>
+			<if test="createTime != null" >
+				create_time,	
+			</if>
+			<if test="updateTime != null" >
+				update_time,	
+			</if>
+			<if test="delFlag != null" >
+				del_flag,	
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=INTEGER},	
+			</if>
+			<if test="myColumn != null" >
+				#{myColumn,jdbcType=VARCHAR},	
+			</if>
+			<if test="aaaTest != null" >
+				#{aaaTest,jdbcType=VARCHAR},	
+			</if>
+			<if test="bbbFlag != null" >
+				#{bbbFlag,jdbcType=CHAR},	
+			</if>
+			<if test="noComment != null" >
+				#{noComment,jdbcType=VARCHAR},	
+			</if>
+			<if test="createTime != null" >
+				#{createTime,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="updateTime != null" >
+				#{updateTime,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="delFlag != null" >
+				#{delFlag,jdbcType=CHAR},	
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.GenTestTable" >
+		update gen_test_table
+		<set >
+			<if test="myColumn != null" >
+				my_column = #{myColumn,jdbcType=VARCHAR},	
+			</if>
+			<if test="aaaTest != null" >
+				aaa_test = #{aaaTest,jdbcType=VARCHAR},	
+			</if>
+			<if test="bbbFlag != null" >
+				bbb_flag = #{bbbFlag,jdbcType=CHAR},	
+			</if>
+			<if test="noComment != null" >
+				no_comment = #{noComment,jdbcType=VARCHAR},	
+			</if>
+			<if test="createTime != null" >
+				create_time = #{createTime,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="updateTime != null" >
+				update_time = #{updateTime,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="delFlag != null" >
+				del_flag = #{delFlag,jdbcType=CHAR},	
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<select id="queryGenTestTablesByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenTestTable">
+		select <include refid="Base_Column_List"/> from gen_test_table
+		<where>
+			and del_flag = 'N'
+			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
+				and id = #{record.id}	
+			</if>
+			<if test="record.myColumn != null and !&quot;&quot;.equals(record.myColumn)">
+				and my_column = #{record.myColumn}	
+			</if>
+			<if test="record.aaaTest != null and !&quot;&quot;.equals(record.aaaTest)">
+				and aaa_test = #{record.aaaTest}	
+			</if>
+			<if test="record.bbbFlag != null and !&quot;&quot;.equals(record.bbbFlag)">
+				and bbb_flag = #{record.bbbFlag}	
+			</if>
+			<if test="record.noComment != null and !&quot;&quot;.equals(record.noComment)">
+				and no_comment = #{record.noComment}	
+			</if>
+			<if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+				and create_time = #{record.createTime}	
+			</if>
+			<if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+				and update_time = #{record.updateTime}	
+			</if>
+			<if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+				and del_flag = #{record.delFlag}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryAllGenTestTable" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenTestTable">
+		select <include refid="Base_Column_List"/> from gen_test_table
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="myColumn != null and !&quot;&quot;.equals(myColumn)">
+				and my_column = #{myColumn}	
+			</if>
+			<if test="aaaTest != null and !&quot;&quot;.equals(aaaTest)">
+				and aaa_test = #{aaaTest}	
+			</if>
+			<if test="bbbFlag != null and !&quot;&quot;.equals(bbbFlag)">
+				and bbb_flag = #{bbbFlag}	
+			</if>
+			<if test="noComment != null and !&quot;&quot;.equals(noComment)">
+				and no_comment = #{noComment}	
+			</if>
+			<if test="createTime != null and !&quot;&quot;.equals(createTime)">
+				and create_time = #{createTime}	
+			</if>
+			<if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+				and update_time = #{updateTime}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryGenTestTable" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenTestTable">
+		select <include refid="Base_Column_List"/> from gen_test_table
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="myColumn != null and !&quot;&quot;.equals(myColumn)">
+				and my_column = #{myColumn}	
+			</if>
+			<if test="aaaTest != null and !&quot;&quot;.equals(aaaTest)">
+				and aaa_test = #{aaaTest}	
+			</if>
+			<if test="bbbFlag != null and !&quot;&quot;.equals(bbbFlag)">
+				and bbb_flag = #{bbbFlag}	
+			</if>
+			<if test="noComment != null and !&quot;&quot;.equals(noComment)">
+				and no_comment = #{noComment}	
+			</if>
+			<if test="createTime != null and !&quot;&quot;.equals(createTime)">
+				and create_time = #{createTime}	
+			</if>
+			<if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+				and update_time = #{updateTime}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+		</where>
+		LIMIT 1
+	</select>
+	<update id="delete">
+		UPDATE gen_test_table SET del_flag = 'Y'
+		<where>
+			AND id = #{id}
+		</where>
+	</update>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/LogisticsInfoMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.LogisticsInfo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.LogisticsInfoMapper")
+public interface LogisticsInfoMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(LogisticsInfo record);
+
+    LogisticsInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(LogisticsInfo record);
+
+    List<LogisticsInfo> queryAllLogisticsInfo(LogisticsInfo record);
+
+    List<LogisticsInfo> queryLogisticsInfoByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    LogisticsInfo queryLogisticsInfo(LogisticsInfo record);
+
+    List<LogisticsInfo> query(LogisticsInfo record);
+}
+

+ 245 - 0
src/main/java/com/izouma/awesomeadmin/dao/LogisticsInfoMapper.xml

@@ -0,0 +1,245 @@
+<?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.izouma.awesomeadmin.dao.LogisticsInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.LogisticsInfo">
+        <result column="code" property="code" jdbcType="VARCHAR"/>
+        <result column="name" property="name" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            code,
+
+            name,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from logistics_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from logistics_info
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.LogisticsInfo" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into logistics_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="code!= null">
+                code,
+            </if>
+            <if test="name!= null">
+                name,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="code != null">
+                #{code,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                #{name,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.LogisticsInfo">
+        update logistics_info
+        <set>
+            <if test="code != null">
+                code= #{code,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                name= #{name,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="queryLogisticsInfoByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.LogisticsInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from logistics_info
+        <where>
+            <if test="record.code != null and !&quot;&quot;.equals(record.code)">
+                and code = #{record.code}
+            </if>
+            <if test="record.name != null and !&quot;&quot;.equals(record.name)">
+                and name = #{record.name}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR code LIKE concat('%',#{record.searchKey},'%')
+                    OR name LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        code
+    </select>
+    <select id="queryAllLogisticsInfo" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.LogisticsInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from logistics_info
+        <where>
+            <if test="code != null and !&quot;&quot;.equals(code)">
+                and code = #{code}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR code LIKE concat('%',#{searchKey},'%')
+                    OR name LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        code
+    </select>
+    <select id="queryLogisticsInfo" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.LogisticsInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from logistics_info
+        <where>
+            and del_flag = 'N'
+            <if test="code != null and !&quot;&quot;.equals(code)">
+                and code = #{code}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE logistics_info SET del_flag = 'Y'
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.LogisticsInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from logistics_info
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/MemberCoinMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.MemberCoin;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.izouma.awesomeadmin.dao.MemberCoinMapper")
+public interface MemberCoinMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(MemberCoin record);
+
+    MemberCoin selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(MemberCoin record);
+
+    List<MemberCoin> queryAllMemberCoin(MemberCoin record);
+
+    List<MemberCoin> queryMemberCoinByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    MemberCoin queryMemberCoin(MemberCoin record);
+
+    List<MemberCoin> query(MemberCoin record);
+}
+

+ 450 - 0
src/main/java/com/izouma/awesomeadmin/dao/MemberCoinMapper.xml

@@ -0,0 +1,450 @@
+<?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.izouma.awesomeadmin.dao.MemberCoinMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.MemberCoin">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="user_id" property="userId" jdbcType="VARCHAR"/>
+        <result column="order_id" property="orderId" jdbcType="VARCHAR"/>
+        <result column="money" property="money" jdbcType="VARCHAR"/>
+        <result column="balance" property="balance" jdbcType="VARCHAR"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            user_id,
+
+            order_id,
+
+            money,
+
+            balance,
+
+            type_flag,
+
+            remark,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from member_coin
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from member_coin
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.MemberCoin" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into member_coin
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="userId!= null">
+                user_id,
+            </if>
+            <if test="orderId!= null">
+                order_id,
+            </if>
+            <if test="money!= null">
+                money,
+            </if>
+            <if test="balance!= null">
+                balance,
+            </if>
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="remark!= null">
+                remark,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="userId != null">
+                #{userId,jdbcType=VARCHAR},
+            </if>
+            <if test="orderId != null">
+                #{orderId,jdbcType=VARCHAR},
+            </if>
+            <if test="money != null">
+                #{money,jdbcType=VARCHAR},
+            </if>
+            <if test="balance != null">
+                #{balance,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.MemberCoin">
+        update member_coin
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="userId != null">
+                user_id= #{userId,jdbcType=VARCHAR},
+            </if>
+            <if test="orderId != null">
+                order_id= #{orderId,jdbcType=VARCHAR},
+            </if>
+            <if test="money != null">
+                money= #{money,jdbcType=VARCHAR},
+            </if>
+            <if test="balance != null">
+                balance= #{balance,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="remark != null">
+                remark= #{remark,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryMemberCoinByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.MemberCoin">
+        select
+        <include refid="Base_Column_List"/>
+        from member_coin
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and user_id = #{record.userId}
+            </if>
+            <if test="record.orderId != null and !&quot;&quot;.equals(record.orderId)">
+                and order_id = #{record.orderId}
+            </if>
+            <if test="record.money != null and !&quot;&quot;.equals(record.money)">
+                and money = #{record.money}
+            </if>
+            <if test="record.balance != null and !&quot;&quot;.equals(record.balance)">
+                and balance = #{record.balance}
+            </if>
+            <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and type_flag = #{record.typeFlag}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and remark = #{record.remark}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR user_id LIKE concat('%',#{record.searchKey},'%')
+                    OR order_id LIKE concat('%',#{record.searchKey},'%')
+                    OR money LIKE concat('%',#{record.searchKey},'%')
+                    OR balance LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllMemberCoin" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.MemberCoin">
+        select
+        <include refid="Base_Column_List"/>
+        from member_coin
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and order_id = #{orderId}
+            </if>
+            <if test="money != null and !&quot;&quot;.equals(money)">
+                and money = #{money}
+            </if>
+            <if test="balance != null and !&quot;&quot;.equals(balance)">
+                and balance = #{balance}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR user_id LIKE concat('%',#{searchKey},'%')
+                    OR order_id LIKE concat('%',#{searchKey},'%')
+                    OR money LIKE concat('%',#{searchKey},'%')
+                    OR balance LIKE concat('%',#{searchKey},'%')
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                    OR remark LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryMemberCoin" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.MemberCoin">
+        select
+        <include refid="Base_Column_List"/>
+        from member_coin
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and order_id = #{orderId}
+            </if>
+            <if test="money != null and !&quot;&quot;.equals(money)">
+                and money = #{money}
+            </if>
+            <if test="balance != null and !&quot;&quot;.equals(balance)">
+                and balance = #{balance}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE member_coin SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.MemberCoin">
+        select
+        <include refid="Base_Column_List"/>
+        from member_coin
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/MemberCoinTixianMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.MemberCoinTixian;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.MemberCoinTixianMapper")
+public interface MemberCoinTixianMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(MemberCoinTixian record);
+
+    MemberCoinTixian selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(MemberCoinTixian record);
+
+    List<MemberCoinTixian> queryAllMemberCoinTixian(MemberCoinTixian record);
+
+    List<MemberCoinTixian> queryMemberCoinTixianByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    MemberCoinTixian queryMemberCoinTixian(MemberCoinTixian record);
+
+    List<MemberCoinTixian> query(MemberCoinTixian record);
+}
+

+ 664 - 0
src/main/java/com/izouma/awesomeadmin/dao/MemberCoinTixianMapper.xml

@@ -0,0 +1,664 @@
+<?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.izouma.awesomeadmin.dao.MemberCoinTixianMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.MemberCoinTixian">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="user_id" property="userId" jdbcType="VARCHAR"/>
+        <result column="money" property="money" jdbcType="VARCHAR"/>
+        <result column="status_flag" property="statusFlag" jdbcType="INTEGER"/>
+        <result column="fee" property="fee" jdbcType="VARCHAR"/>
+        <result column="net_amount" property="netAmount" jdbcType="VARCHAR"/>
+        <result column="deal_user" property="dealUser" jdbcType="VARCHAR"/>
+        <result column="deal_time" property="dealTime" jdbcType="VARCHAR"/>
+        <result column="wechat" property="wechat" jdbcType="VARCHAR"/>
+        <result column="alipay" property="alipay" jdbcType="VARCHAR"/>
+        <result column="bank_card" property="bankCard" jdbcType="VARCHAR"/>
+        <result column="bank_name" property="bankName" jdbcType="VARCHAR"/>
+        <result column="open_name" property="openName" jdbcType="VARCHAR"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <result column="tixian_code" property="tixianCode" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            user_id,
+
+            money,
+
+            status_flag,
+
+            fee,
+
+            net_amount,
+
+            deal_user,
+
+            deal_time,
+
+            wechat,
+
+            alipay,
+
+            bank_card,
+
+            bank_name,
+
+            open_name,
+
+            type_flag,
+
+            remark,
+
+            tixian_code,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from member_coin_tixian
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from member_coin_tixian
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.MemberCoinTixian" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into member_coin_tixian
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="userId!= null">
+                user_id,
+            </if>
+            <if test="money!= null">
+                money,
+            </if>
+            <if test="statusFlag!= null">
+                status_flag,
+            </if>
+            <if test="fee!= null">
+                fee,
+            </if>
+            <if test="netAmount!= null">
+                net_amount,
+            </if>
+            <if test="dealUser!= null">
+                deal_user,
+            </if>
+            <if test="dealTime!= null">
+                deal_time,
+            </if>
+            <if test="wechat!= null">
+                wechat,
+            </if>
+            <if test="alipay!= null">
+                alipay,
+            </if>
+            <if test="bankCard!= null">
+                bank_card,
+            </if>
+            <if test="bankName!= null">
+                bank_name,
+            </if>
+            <if test="openName!= null">
+                open_name,
+            </if>
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="remark!= null">
+                remark,
+            </if>
+            <if test="tixianCode!= null">
+                tixian_code,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="userId != null">
+                #{userId,jdbcType=VARCHAR},
+            </if>
+            <if test="money != null">
+                #{money,jdbcType=VARCHAR},
+            </if>
+            <if test="statusFlag != null">
+                #{statusFlag,jdbcType=INTEGER},
+            </if>
+            <if test="fee != null">
+                #{fee,jdbcType=VARCHAR},
+            </if>
+            <if test="netAmount != null">
+                #{netAmount,jdbcType=VARCHAR},
+            </if>
+            <if test="dealUser != null">
+                #{dealUser,jdbcType=VARCHAR},
+            </if>
+            <if test="dealTime != null">
+                #{dealTime,jdbcType=VARCHAR},
+            </if>
+            <if test="wechat != null">
+                #{wechat,jdbcType=VARCHAR},
+            </if>
+            <if test="alipay != null">
+                #{alipay,jdbcType=VARCHAR},
+            </if>
+            <if test="bankCard != null">
+                #{bankCard,jdbcType=VARCHAR},
+            </if>
+            <if test="bankName != null">
+                #{bankName,jdbcType=VARCHAR},
+            </if>
+            <if test="openName != null">
+                #{openName,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="tixianCode != null">
+                #{tixianCode,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.MemberCoinTixian">
+        update member_coin_tixian
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="userId != null">
+                user_id= #{userId,jdbcType=VARCHAR},
+            </if>
+            <if test="money != null">
+                money= #{money,jdbcType=VARCHAR},
+            </if>
+            <if test="statusFlag != null">
+                status_flag= #{statusFlag,jdbcType=INTEGER},
+            </if>
+            <if test="fee != null">
+                fee= #{fee,jdbcType=VARCHAR},
+            </if>
+            <if test="netAmount != null">
+                net_amount= #{netAmount,jdbcType=VARCHAR},
+            </if>
+            <if test="dealUser != null">
+                deal_user= #{dealUser,jdbcType=VARCHAR},
+            </if>
+            <if test="dealTime != null">
+                deal_time= #{dealTime,jdbcType=VARCHAR},
+            </if>
+            <if test="wechat != null">
+                wechat= #{wechat,jdbcType=VARCHAR},
+            </if>
+            <if test="alipay != null">
+                alipay= #{alipay,jdbcType=VARCHAR},
+            </if>
+            <if test="bankCard != null">
+                bank_card= #{bankCard,jdbcType=VARCHAR},
+            </if>
+            <if test="bankName != null">
+                bank_name= #{bankName,jdbcType=VARCHAR},
+            </if>
+            <if test="openName != null">
+                open_name= #{openName,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="remark != null">
+                remark= #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="tixianCode != null">
+                tixian_code= #{tixianCode,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryMemberCoinTixianByPage" parameterType="java.util.Map"
+            resultMap="AllInfoForGetOne">
+        select
+        <include refid="Base_Column_List"/>
+        from member_coin_tixian
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and user_id = #{record.userId}
+            </if>
+            <if test="record.money != null and !&quot;&quot;.equals(record.money)">
+                and money = #{record.money}
+            </if>
+            <if test="record.statusFlag != null and !&quot;&quot;.equals(record.statusFlag)">
+                and status_flag = #{record.statusFlag}
+            </if>
+            <if test="record.fee != null and !&quot;&quot;.equals(record.fee)">
+                and fee = #{record.fee}
+            </if>
+            <if test="record.netAmount != null and !&quot;&quot;.equals(record.netAmount)">
+                and net_amount = #{record.netAmount}
+            </if>
+            <if test="record.dealUser != null and !&quot;&quot;.equals(record.dealUser)">
+                and deal_user = #{record.dealUser}
+            </if>
+            <if test="record.dealTime != null and !&quot;&quot;.equals(record.dealTime)">
+                and deal_time = #{record.dealTime}
+            </if>
+            <if test="record.wechat != null and !&quot;&quot;.equals(record.wechat)">
+                and wechat = #{record.wechat}
+            </if>
+            <if test="record.alipay != null and !&quot;&quot;.equals(record.alipay)">
+                and alipay = #{record.alipay}
+            </if>
+            <if test="record.bankCard != null and !&quot;&quot;.equals(record.bankCard)">
+                and bank_card = #{record.bankCard}
+            </if>
+            <if test="record.bankName != null and !&quot;&quot;.equals(record.bankName)">
+                and bank_name = #{record.bankName}
+            </if>
+            <if test="record.openName != null and !&quot;&quot;.equals(record.openName)">
+                and open_name = #{record.openName}
+            </if>
+            <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and type_flag = #{record.typeFlag}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and remark = #{record.remark}
+            </if>
+            <if test="record.tixianCode != null and !&quot;&quot;.equals(record.tixianCode)">
+                and tixian_code = #{record.tixianCode}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR user_id LIKE concat('%',#{record.searchKey},'%')
+                    OR money LIKE concat('%',#{record.searchKey},'%')
+                    OR status_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR fee LIKE concat('%',#{record.searchKey},'%')
+                    OR net_amount LIKE concat('%',#{record.searchKey},'%')
+                    OR deal_user LIKE concat('%',#{record.searchKey},'%')
+                    OR deal_time LIKE concat('%',#{record.searchKey},'%')
+                    OR wechat LIKE concat('%',#{record.searchKey},'%')
+                    OR alipay LIKE concat('%',#{record.searchKey},'%')
+                    OR bank_card LIKE concat('%',#{record.searchKey},'%')
+                    OR bank_name LIKE concat('%',#{record.searchKey},'%')
+                    OR open_name LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                    OR tixian_code LIKE concat('%',#{record.tixianCode},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllMemberCoinTixian" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.MemberCoinTixian">
+        select
+        <include refid="Base_Column_List"/>
+        from member_coin_tixian
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="money != null and !&quot;&quot;.equals(money)">
+                and money = #{money}
+            </if>
+            <if test="statusFlag != null and !&quot;&quot;.equals(statusFlag)">
+                and status_flag = #{statusFlag}
+            </if>
+            <if test="fee != null and !&quot;&quot;.equals(fee)">
+                and fee = #{fee}
+            </if>
+            <if test="netAmount != null and !&quot;&quot;.equals(netAmount)">
+                and net_amount = #{netAmount}
+            </if>
+            <if test="dealUser != null and !&quot;&quot;.equals(dealUser)">
+                and deal_user = #{dealUser}
+            </if>
+            <if test="dealTime != null and !&quot;&quot;.equals(dealTime)">
+                and deal_time = #{dealTime}
+            </if>
+            <if test="wechat != null and !&quot;&quot;.equals(wechat)">
+                and wechat = #{wechat}
+            </if>
+            <if test="alipay != null and !&quot;&quot;.equals(alipay)">
+                and alipay = #{alipay}
+            </if>
+            <if test="bankCard != null and !&quot;&quot;.equals(bankCard)">
+                and bank_card = #{bankCard}
+            </if>
+            <if test="bankName != null and !&quot;&quot;.equals(bankName)">
+                and bank_name = #{bankName}
+            </if>
+            <if test="openName != null and !&quot;&quot;.equals(openName)">
+                and open_name = #{openName}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR user_id LIKE concat('%',#{searchKey},'%')
+                    OR money LIKE concat('%',#{searchKey},'%')
+                    OR status_flag LIKE concat('%',#{searchKey},'%')
+                    OR fee LIKE concat('%',#{searchKey},'%')
+                    OR net_amount LIKE concat('%',#{searchKey},'%')
+                    OR deal_user LIKE concat('%',#{searchKey},'%')
+                    OR deal_time LIKE concat('%',#{searchKey},'%')
+                    OR wechat LIKE concat('%',#{searchKey},'%')
+                    OR alipay LIKE concat('%',#{searchKey},'%')
+                    OR bank_card LIKE concat('%',#{searchKey},'%')
+                    OR bank_name LIKE concat('%',#{searchKey},'%')
+                    OR open_name LIKE concat('%',#{searchKey},'%')
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                    OR remark LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryMemberCoinTixian" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.MemberCoinTixian">
+        select
+        <include refid="Base_Column_List"/>
+        from member_coin_tixian
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="money != null and !&quot;&quot;.equals(money)">
+                and money = #{money}
+            </if>
+            <if test="statusFlag != null and !&quot;&quot;.equals(statusFlag)">
+                and status_flag = #{statusFlag}
+            </if>
+            <if test="fee != null and !&quot;&quot;.equals(fee)">
+                and fee = #{fee}
+            </if>
+            <if test="netAmount != null and !&quot;&quot;.equals(netAmount)">
+                and net_amount = #{netAmount}
+            </if>
+            <if test="dealUser != null and !&quot;&quot;.equals(dealUser)">
+                and deal_user = #{dealUser}
+            </if>
+            <if test="dealTime != null and !&quot;&quot;.equals(dealTime)">
+                and deal_time = #{dealTime}
+            </if>
+            <if test="wechat != null and !&quot;&quot;.equals(wechat)">
+                and wechat = #{wechat}
+            </if>
+            <if test="alipay != null and !&quot;&quot;.equals(alipay)">
+                and alipay = #{alipay}
+            </if>
+            <if test="bankCard != null and !&quot;&quot;.equals(bankCard)">
+                and bank_card = #{bankCard}
+            </if>
+            <if test="bankName != null and !&quot;&quot;.equals(bankName)">
+                and bank_name = #{bankName}
+            </if>
+            <if test="openName != null and !&quot;&quot;.equals(openName)">
+                and open_name = #{openName}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE member_coin_tixian SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.MemberCoinTixian">
+        select
+        <include refid="Base_Column_List"/>
+        from member_coin_tixian
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+
+    <resultMap id="AllInfoForGetOne" type="com.izouma.awesomeadmin.model.MemberCoinTixian" extends="BaseResultMap">
+
+
+        <association property="userInfo"
+                     javaType="com.izouma.awesomeadmin.model.UserInfo"
+                     select="com.izouma.awesomeadmin.dao.UserInfoMapper.querySingleUserInfo"
+                     column="{ id = user_id }"/>
+
+
+    </resultMap>
+
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/MemberPointMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.MemberPoint;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.izouma.awesomeadmin.dao.MemberPointMapper")
+public interface MemberPointMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(MemberPoint record);
+
+    MemberPoint selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(MemberPoint record);
+
+    List<MemberPoint> queryAllMemberPoint(MemberPoint record);
+
+    List<MemberPoint> queryMemberPointByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    MemberPoint queryMemberPoint(MemberPoint record);
+
+    List<MemberPoint> query(MemberPoint record);
+}
+

+ 450 - 0
src/main/java/com/izouma/awesomeadmin/dao/MemberPointMapper.xml

@@ -0,0 +1,450 @@
+<?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.izouma.awesomeadmin.dao.MemberPointMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.MemberPoint" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
+                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
+                                <result column="user_id" property="userId" jdbcType="VARCHAR" />
+                                <result column="order_id" property="orderId" jdbcType="VARCHAR" />
+                                <result column="money" property="money" jdbcType="VARCHAR" />
+                                <result column="balance" property="balance" jdbcType="VARCHAR" />
+                                <result column="type_flag" property="typeFlag" jdbcType="INTEGER" />
+                                <result column="remark" property="remark" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            user_id,
+
+            order_id,
+
+            money,
+
+            balance,
+
+            type_flag,
+
+            remark,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from member_point
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from member_point
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.MemberPoint" useGeneratedKeys="true" keyProperty="id">
+        insert into member_point
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="updateTime!= null" >
+                update_time,
+            </if>
+                <if test="updateUser!= null" >
+                update_user,
+            </if>
+                <if test="createTime!= null" >
+                create_time,
+            </if>
+                <if test="createUser!= null" >
+                create_user,
+            </if>
+                <if test="userId!= null" >
+                user_id,
+            </if>
+                <if test="orderId!= null" >
+                order_id,
+            </if>
+                <if test="money!= null" >
+                money,
+            </if>
+                <if test="balance!= null" >
+                balance,
+            </if>
+                <if test="typeFlag!= null" >
+                type_flag,
+            </if>
+                <if test="remark!= null" >
+                remark,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="updateUser != null" >
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="createUser != null" >
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="userId != null" >
+                #{userId,jdbcType=VARCHAR},
+            </if>
+                    <if test="orderId != null" >
+                #{orderId,jdbcType=VARCHAR},
+            </if>
+                    <if test="money != null" >
+                #{money,jdbcType=VARCHAR},
+            </if>
+                    <if test="balance != null" >
+                #{balance,jdbcType=VARCHAR},
+            </if>
+                    <if test="typeFlag != null" >
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+                    <if test="remark != null" >
+                #{remark,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.MemberPoint" >
+        update member_point
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="updateTime != null" >
+               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="updateUser != null" >
+               update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="createTime != null" >
+               create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="createUser != null" >
+               create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="userId != null" >
+               user_id= #{userId,jdbcType=VARCHAR},
+            </if>
+                     <if test="orderId != null" >
+               order_id= #{orderId,jdbcType=VARCHAR},
+            </if>
+                     <if test="money != null" >
+               money= #{money,jdbcType=VARCHAR},
+            </if>
+                     <if test="balance != null" >
+               balance= #{balance,jdbcType=VARCHAR},
+            </if>
+                     <if test="typeFlag != null" >
+               type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+                     <if test="remark != null" >
+               remark= #{remark,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryMemberPointByPage" parameterType="java.util.Map" resultMap="AllInfoForGetOne">
+        select <include refid="Base_Column_List"/> from member_point
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and  update_time = #{record.updateTime}
+            </if>
+                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and  update_user = #{record.updateUser}
+            </if>
+                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and  create_time = #{record.createTime}
+            </if>
+                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and  create_user = #{record.createUser}
+            </if>
+                     <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and  user_id = #{record.userId}
+            </if>
+                     <if test="record.orderId != null and !&quot;&quot;.equals(record.orderId)">
+                and  order_id = #{record.orderId}
+            </if>
+                     <if test="record.money != null and !&quot;&quot;.equals(record.money)">
+                and  money = #{record.money}
+            </if>
+                     <if test="record.balance != null and !&quot;&quot;.equals(record.balance)">
+                and  balance = #{record.balance}
+            </if>
+                     <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and  type_flag = #{record.typeFlag}
+            </if>
+                     <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and  remark = #{record.remark}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  user_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  order_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  money LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  balance LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  type_flag LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  remark LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllMemberPoint" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.MemberPoint">
+        select <include refid="Base_Column_List"/> from member_point
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and  update_time = #{updateTime}
+            </if>
+                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and  update_user = #{updateUser}
+            </if>
+                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and  create_time = #{createTime}
+            </if>
+                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and  create_user = #{createUser}
+            </if>
+                    <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and  user_id = #{userId}
+            </if>
+                    <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and  order_id = #{orderId}
+            </if>
+                    <if test="money != null and !&quot;&quot;.equals(money)">
+                and  money = #{money}
+            </if>
+                    <if test="balance != null and !&quot;&quot;.equals(balance)">
+                and  balance = #{balance}
+            </if>
+                    <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and  type_flag = #{typeFlag}
+            </if>
+                    <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and  remark = #{remark}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  user_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  order_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  money LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  balance LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  type_flag LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  remark LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryMemberPoint" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.MemberPoint">
+        select <include refid="Base_Column_List"/> from member_point
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+                     <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+                     <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and order_id = #{orderId}
+            </if>
+                     <if test="money != null and !&quot;&quot;.equals(money)">
+                and money = #{money}
+            </if>
+                     <if test="balance != null and !&quot;&quot;.equals(balance)">
+                and balance = #{balance}
+            </if>
+                     <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+                     <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE member_point SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.MemberPoint">
+        select <include refid="Base_Column_List"/> from member_point
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+
+    <resultMap id="AllInfoForGetOne" type="com.izouma.awesomeadmin.model.MemberPoint" extends="BaseResultMap">
+
+
+        <association property="userOrder"
+                     javaType="com.izouma.awesomeadmin.model.UserOrder"
+                     select="com.izouma.awesomeadmin.dao.UserOrderMapper.queryUserOrder"
+                     column="{ id = order_id }"/>
+
+    </resultMap>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/OrderAddressMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.OrderAddress;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.OrderAddressMapper")
+public interface OrderAddressMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(OrderAddress record);
+
+    OrderAddress selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(OrderAddress record);
+
+    List<OrderAddress> queryAllOrderAddress(OrderAddress record);
+
+    List<OrderAddress> queryOrderAddressByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    OrderAddress queryOrderAddress(OrderAddress record);
+
+    List<OrderAddress> query(OrderAddress record);
+}
+

+ 486 - 0
src/main/java/com/izouma/awesomeadmin/dao/OrderAddressMapper.xml

@@ -0,0 +1,486 @@
+<?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.izouma.awesomeadmin.dao.OrderAddressMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.OrderAddress" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
+                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
+                                <result column="order_id" property="orderId" jdbcType="INTEGER" />
+                                <result column="user_id" property="userId" jdbcType="INTEGER" />
+                                <result column="real_name" property="realName" jdbcType="VARCHAR" />
+                                <result column="telephone" property="telephone" jdbcType="VARCHAR" />
+                                <result column="postcode" property="postcode" jdbcType="VARCHAR" />
+                                <result column="address" property="address" jdbcType="VARCHAR" />
+                                <result column="address_detail" property="addressDetail" jdbcType="VARCHAR" />
+                                <result column="user_address_id" property="userAddressId" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            order_id,
+
+            user_id,
+
+            real_name,
+
+            telephone,
+
+            postcode,
+
+            address,
+
+            address_detail,
+
+            user_address_id,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from order_address
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from order_address
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.OrderAddress" useGeneratedKeys="true" keyProperty="id">
+        insert into order_address
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="updateTime!= null" >
+                update_time,
+            </if>
+                <if test="updateUser!= null" >
+                update_user,
+            </if>
+                <if test="createTime!= null" >
+                create_time,
+            </if>
+                <if test="createUser!= null" >
+                create_user,
+            </if>
+                <if test="orderId!= null" >
+                order_id,
+            </if>
+                <if test="userId!= null" >
+                user_id,
+            </if>
+                <if test="realName!= null" >
+                real_name,
+            </if>
+                <if test="telephone!= null" >
+                telephone,
+            </if>
+                <if test="postcode!= null" >
+                postcode,
+            </if>
+                <if test="address!= null" >
+                address,
+            </if>
+                <if test="addressDetail!= null" >
+                address_detail,
+            </if>
+                <if test="userAddressId!= null" >
+                user_address_id,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="updateUser != null" >
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="createUser != null" >
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="orderId != null" >
+                #{orderId,jdbcType=INTEGER},
+            </if>
+                    <if test="userId != null" >
+                #{userId,jdbcType=INTEGER},
+            </if>
+                    <if test="realName != null" >
+                #{realName,jdbcType=VARCHAR},
+            </if>
+                    <if test="telephone != null" >
+                #{telephone,jdbcType=VARCHAR},
+            </if>
+                    <if test="postcode != null" >
+                #{postcode,jdbcType=VARCHAR},
+            </if>
+                    <if test="address != null" >
+                #{address,jdbcType=VARCHAR},
+            </if>
+                    <if test="addressDetail != null" >
+                #{addressDetail,jdbcType=VARCHAR},
+            </if>
+                    <if test="userAddressId != null" >
+                #{userAddressId,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.OrderAddress" >
+        update order_address
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="updateTime != null" >
+               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="updateUser != null" >
+               update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="createTime != null" >
+               create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="createUser != null" >
+               create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="orderId != null" >
+               order_id= #{orderId,jdbcType=INTEGER},
+            </if>
+                     <if test="userId != null" >
+               user_id= #{userId,jdbcType=INTEGER},
+            </if>
+                     <if test="realName != null" >
+               real_name= #{realName,jdbcType=VARCHAR},
+            </if>
+                     <if test="telephone != null" >
+               telephone= #{telephone,jdbcType=VARCHAR},
+            </if>
+                     <if test="postcode != null" >
+               postcode= #{postcode,jdbcType=VARCHAR},
+            </if>
+                     <if test="address != null" >
+               address= #{address,jdbcType=VARCHAR},
+            </if>
+                     <if test="addressDetail != null" >
+               address_detail= #{addressDetail,jdbcType=VARCHAR},
+            </if>
+                     <if test="userAddressId != null" >
+               user_address_id= #{userAddressId,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryOrderAddressByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderAddress">
+        select <include refid="Base_Column_List"/> from order_address
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and  update_time = #{record.updateTime}
+            </if>
+                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and  update_user = #{record.updateUser}
+            </if>
+                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and  create_time = #{record.createTime}
+            </if>
+                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and  create_user = #{record.createUser}
+            </if>
+                     <if test="record.orderId != null and !&quot;&quot;.equals(record.orderId)">
+                and  order_id = #{record.orderId}
+            </if>
+                     <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and  user_id = #{record.userId}
+            </if>
+                     <if test="record.realName != null and !&quot;&quot;.equals(record.realName)">
+                and  real_name = #{record.realName}
+            </if>
+                     <if test="record.telephone != null and !&quot;&quot;.equals(record.telephone)">
+                and  telephone = #{record.telephone}
+            </if>
+                     <if test="record.postcode != null and !&quot;&quot;.equals(record.postcode)">
+                and  postcode = #{record.postcode}
+            </if>
+                     <if test="record.address != null and !&quot;&quot;.equals(record.address)">
+                and  address = #{record.address}
+            </if>
+                     <if test="record.addressDetail != null and !&quot;&quot;.equals(record.addressDetail)">
+                and  address_detail = #{record.addressDetail}
+            </if>
+                     <if test="record.userAddressId != null and !&quot;&quot;.equals(record.userAddressId)">
+                and  user_address_id = #{record.userAddressId}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  order_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  user_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  real_name LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  telephone LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  postcode LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  address LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  address_detail LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  user_address_id LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllOrderAddress" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderAddress">
+        select <include refid="Base_Column_List"/> from order_address
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and  update_time = #{updateTime}
+            </if>
+                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and  update_user = #{updateUser}
+            </if>
+                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and  create_time = #{createTime}
+            </if>
+                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and  create_user = #{createUser}
+            </if>
+                    <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and  order_id = #{orderId}
+            </if>
+                    <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and  user_id = #{userId}
+            </if>
+                    <if test="realName != null and !&quot;&quot;.equals(realName)">
+                and  real_name = #{realName}
+            </if>
+                    <if test="telephone != null and !&quot;&quot;.equals(telephone)">
+                and  telephone = #{telephone}
+            </if>
+                    <if test="postcode != null and !&quot;&quot;.equals(postcode)">
+                and  postcode = #{postcode}
+            </if>
+                    <if test="address != null and !&quot;&quot;.equals(address)">
+                and  address = #{address}
+            </if>
+                    <if test="addressDetail != null and !&quot;&quot;.equals(addressDetail)">
+                and  address_detail = #{addressDetail}
+            </if>
+                    <if test="userAddressId != null and !&quot;&quot;.equals(userAddressId)">
+                and  user_address_id = #{userAddressId}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  order_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  user_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  real_name LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  telephone LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  postcode LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  address LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  address_detail LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  user_address_id LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryOrderAddress" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderAddress">
+        select <include refid="Base_Column_List"/> from order_address
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+                     <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and order_id = #{orderId}
+            </if>
+                     <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+                     <if test="realName != null and !&quot;&quot;.equals(realName)">
+                and real_name = #{realName}
+            </if>
+                     <if test="telephone != null and !&quot;&quot;.equals(telephone)">
+                and telephone = #{telephone}
+            </if>
+                     <if test="postcode != null and !&quot;&quot;.equals(postcode)">
+                and postcode = #{postcode}
+            </if>
+                     <if test="address != null and !&quot;&quot;.equals(address)">
+                and address = #{address}
+            </if>
+                     <if test="addressDetail != null and !&quot;&quot;.equals(addressDetail)">
+                and address_detail = #{addressDetail}
+            </if>
+                     <if test="userAddressId != null and !&quot;&quot;.equals(userAddressId)">
+                and user_address_id = #{userAddressId}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE order_address SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderAddress">
+        select <include refid="Base_Column_List"/> from order_address
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/OrderLogisticsMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.OrderLogistics;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.OrderLogisticsMapper")
+public interface OrderLogisticsMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(OrderLogistics record);
+
+    OrderLogistics selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(OrderLogistics record);
+
+    List<OrderLogistics> queryAllOrderLogistics(OrderLogistics record);
+
+    List<OrderLogistics> queryOrderLogisticsByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    OrderLogistics queryOrderLogistics(OrderLogistics record);
+
+    List<OrderLogistics> query(OrderLogistics record);
+}
+

+ 459 - 0
src/main/java/com/izouma/awesomeadmin/dao/OrderLogisticsMapper.xml

@@ -0,0 +1,459 @@
+<?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.izouma.awesomeadmin.dao.OrderLogisticsMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.OrderLogistics" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
+                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
+                                <result column="order_id" property="orderId" jdbcType="VARCHAR" />
+                                <result column="user_id" property="userId" jdbcType="VARCHAR" />
+                                <result column="logistic" property="logistic" jdbcType="VARCHAR" />
+                                <result column="tracking_no" property="trackingNo" jdbcType="VARCHAR" />
+                                <result column="type_flag" property="typeFlag" jdbcType="INTEGER" />
+                                <result column="remark" property="remark" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            order_id,
+
+            user_id,
+
+            logistic,
+
+            tracking_no,
+
+            type_flag,
+
+            remark,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from order_logistics
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from order_logistics
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.OrderLogistics" useGeneratedKeys="true" keyProperty="id">
+        insert into order_logistics
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="updateTime!= null" >
+                update_time,
+            </if>
+                <if test="updateUser!= null" >
+                update_user,
+            </if>
+                <if test="createTime!= null" >
+                create_time,
+            </if>
+                <if test="createUser!= null" >
+                create_user,
+            </if>
+                <if test="orderId!= null" >
+                order_id,
+            </if>
+                <if test="userId!= null" >
+                user_id,
+            </if>
+                <if test="logistic!= null" >
+                logistic,
+            </if>
+                <if test="trackingNo!= null" >
+                tracking_no,
+            </if>
+                <if test="typeFlag!= null" >
+                type_flag,
+            </if>
+                <if test="remark!= null" >
+                remark,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="updateUser != null" >
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="createUser != null" >
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="orderId != null" >
+                #{orderId,jdbcType=VARCHAR},
+            </if>
+                    <if test="userId != null" >
+                #{userId,jdbcType=VARCHAR},
+            </if>
+                    <if test="logistic != null" >
+                #{logistic,jdbcType=VARCHAR},
+            </if>
+                    <if test="trackingNo != null" >
+                #{trackingNo,jdbcType=VARCHAR},
+            </if>
+                    <if test="typeFlag != null" >
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+                    <if test="remark != null" >
+                #{remark,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.OrderLogistics" >
+        update order_logistics
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="updateTime != null" >
+               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="updateUser != null" >
+               update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="createTime != null" >
+               create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="createUser != null" >
+               create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="orderId != null" >
+               order_id= #{orderId,jdbcType=VARCHAR},
+            </if>
+                     <if test="userId != null" >
+               user_id= #{userId,jdbcType=VARCHAR},
+            </if>
+                     <if test="logistic != null" >
+               logistic= #{logistic,jdbcType=VARCHAR},
+            </if>
+                     <if test="trackingNo != null" >
+               tracking_no= #{trackingNo,jdbcType=VARCHAR},
+            </if>
+                     <if test="typeFlag != null" >
+               type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+                     <if test="remark != null" >
+               remark= #{remark,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="queryOrderLogisticsByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderLogistics">
+        select <include refid="Base_Column_List"/> from order_logistics
+        <where>
+            and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and  update_time = #{record.updateTime}
+            </if>
+                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and  update_user = #{record.updateUser}
+            </if>
+                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and  create_time = #{record.createTime}
+            </if>
+                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and  create_user = #{record.createUser}
+            </if>
+                     <if test="record.orderId != null and !&quot;&quot;.equals(record.orderId)">
+                and  order_id = #{record.orderId}
+            </if>
+                     <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and  user_id = #{record.userId}
+            </if>
+                     <if test="record.logistic != null and !&quot;&quot;.equals(record.logistic)">
+                and  logistic = #{record.logistic}
+            </if>
+                     <if test="record.trackingNo != null and !&quot;&quot;.equals(record.trackingNo)">
+                and  tracking_no = #{record.trackingNo}
+            </if>
+                     <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and  type_flag = #{record.typeFlag}
+            </if>
+                     <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and  remark = #{record.remark}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  order_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  user_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  logistic LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  tracking_no LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  type_flag LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  remark LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllOrderLogistics" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderLogistics">
+        select <include refid="Base_Column_List"/> from order_logistics
+        <where>
+            and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and  update_time = #{updateTime}
+            </if>
+                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and  update_user = #{updateUser}
+            </if>
+                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and  create_time = #{createTime}
+            </if>
+                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and  create_user = #{createUser}
+            </if>
+                    <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and  order_id = #{orderId}
+            </if>
+                    <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and  user_id = #{userId}
+            </if>
+                    <if test="logistic != null and !&quot;&quot;.equals(logistic)">
+                and  logistic = #{logistic}
+            </if>
+                    <if test="trackingNo != null and !&quot;&quot;.equals(trackingNo)">
+                and  tracking_no = #{trackingNo}
+            </if>
+                    <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and  type_flag = #{typeFlag}
+            </if>
+                    <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and  remark = #{remark}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  order_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  user_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  logistic LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  tracking_no LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  type_flag LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  remark LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryOrderLogistics" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderLogistics">
+        select <include refid="Base_Column_List"/> from order_logistics
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+                     <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and order_id = #{orderId}
+            </if>
+                     <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+                     <if test="logistic != null and !&quot;&quot;.equals(logistic)">
+                and logistic = #{logistic}
+            </if>
+                     <if test="trackingNo != null and !&quot;&quot;.equals(trackingNo)">
+                and tracking_no = #{trackingNo}
+            </if>
+                     <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+                     <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE order_logistics SET del_flag = 'Y'
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.OrderLogistics">
+        select <include refid="Base_Column_List"/> from order_logistics
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/PowerInfoMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.PowerInfo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * power_info Dao接口
+ * Wed Apr 11 11:04:02 CST 2018  Suo Chen Cheng
+ */ 
+@Repository("com.zoumaframe.dao.PowerInfoMapper")
+public interface PowerInfoMapper {
+
+	int deleteByPrimaryKey(Integer id);
+
+	int insertSelective(PowerInfo record);
+
+	PowerInfo selectByPrimaryKey(Integer id);
+
+	int updateByPrimaryKeySelective(PowerInfo record);
+
+	List<PowerInfo> queryAllPowerInfo(PowerInfo record);
+
+	List<PowerInfo> queryPowerInfosByPage(Map<String, Object> parameter);
+
+	int delete(String id);
+
+	PowerInfo queryPowerInfo(PowerInfo record);
+
+	int deleteByRoleId(String roleId);
+}
+

+ 224 - 0
src/main/java/com/izouma/awesomeadmin/dao/PowerInfoMapper.xml

@@ -0,0 +1,224 @@
+<?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.izouma.awesomeadmin.dao.PowerInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.PowerInfo">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="role_id" property="roleId" jdbcType="INTEGER"/>
+        <result column="menu_id" property="menuId" jdbcType="INTEGER"/>
+        <result column="can_add" property="canAdd" jdbcType="INTEGER"/>
+        <result column="can_delete" property="canDelete" jdbcType="INTEGER"/>
+        <result column="can_update" property="canUpdate" jdbcType="INTEGER"/>
+        <result column="can_select" property="canSelect" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+		 id, role_id, menu_id, can_add, can_delete, can_update, can_select, del_flag
+	</sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_power_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+		delete from sys_power_info
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.PowerInfo" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_power_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                id,
+            </if>
+            <if test="roleId != null">
+                role_id,
+            </if>
+            <if test="menuId != null">
+                menu_id,
+            </if>
+            <if test="canAdd != null">
+                can_add,
+            </if>
+            <if test="canDelete != null">
+                can_delete,
+            </if>
+            <if test="canUpdate != null">
+                can_update,
+            </if>
+            <if test="canSelect != null">
+                can_select,
+            </if>
+            <if test="delFlag != null">
+                del_flag,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="roleId != null">
+                #{roleId,jdbcType=INTEGER},
+            </if>
+            <if test="menuId != null">
+                #{menuId,jdbcType=INTEGER},
+            </if>
+            <if test="canAdd != null">
+                #{canAdd,jdbcType=INTEGER},
+            </if>
+            <if test="canDelete != null">
+                #{canDelete,jdbcType=INTEGER},
+            </if>
+            <if test="canUpdate != null">
+                #{canUpdate,jdbcType=INTEGER},
+            </if>
+            <if test="canSelect != null">
+                #{canSelect,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.PowerInfo">
+        update sys_power_info
+        <set>
+            <if test="roleId != null">
+                role_id = #{roleId,jdbcType=INTEGER},
+            </if>
+            <if test="menuId != null">
+                menu_id = #{menuId,jdbcType=INTEGER},
+            </if>
+            <if test="canAdd != null">
+                can_add = #{canAdd,jdbcType=INTEGER},
+            </if>
+            <if test="canDelete != null">
+                can_delete = #{canDelete,jdbcType=INTEGER},
+            </if>
+            <if test="canUpdate != null">
+                can_update = #{canUpdate,jdbcType=INTEGER},
+            </if>
+            <if test="canSelect != null">
+                can_select = #{canSelect,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag = #{delFlag,jdbcType=CHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryPowerInfosByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.PowerInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_power_info
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.roleId != null and !&quot;&quot;.equals(record.roleId)">
+                and role_id = #{record.roleId}
+            </if>
+            <if test="record.menuId != null and !&quot;&quot;.equals(record.menuId)">
+                and menu_id = #{record.menuId}
+            </if>
+            <if test="record.canAdd != null and !&quot;&quot;.equals(record.canAdd)">
+                and can_add = #{record.canAdd}
+            </if>
+            <if test="record.canDelete != null and !&quot;&quot;.equals(record.canDelete)">
+                and can_delete = #{record.canDelete}
+            </if>
+            <if test="record.canUpdate != null and !&quot;&quot;.equals(record.canUpdate)">
+                and can_update = #{record.canUpdate}
+            </if>
+            <if test="record.canSelect != null and !&quot;&quot;.equals(record.canSelect)">
+                and can_select = #{record.canSelect}
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllPowerInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PowerInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_power_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="roleId != null and !&quot;&quot;.equals(roleId)">
+                and role_id = #{roleId}
+            </if>
+            <if test="menuId != null and !&quot;&quot;.equals(menuId)">
+                and menu_id = #{menuId}
+            </if>
+            <if test="canAdd != null and !&quot;&quot;.equals(canAdd)">
+                and can_add = #{canAdd}
+            </if>
+            <if test="canDelete != null and !&quot;&quot;.equals(canDelete)">
+                and can_delete = #{canDelete}
+            </if>
+            <if test="canUpdate != null and !&quot;&quot;.equals(canUpdate)">
+                and can_update = #{canUpdate}
+            </if>
+            <if test="canSelect != null and !&quot;&quot;.equals(canSelect)">
+                and can_select = #{canSelect}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="roleIdStr != null and !&quot;&quot;.equals(roleIdStr)">
+                and role_id in (${roleIdStr})
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryPowerInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PowerInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_power_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="roleId != null and !&quot;&quot;.equals(roleId)">
+                and role_id = #{roleId}
+            </if>
+            <if test="menuId != null and !&quot;&quot;.equals(menuId)">
+                and menu_id = #{menuId}
+            </if>
+            <if test="canAdd != null and !&quot;&quot;.equals(canAdd)">
+                and can_add = #{canAdd}
+            </if>
+            <if test="canDelete != null and !&quot;&quot;.equals(canDelete)">
+                and can_delete = #{canDelete}
+            </if>
+            <if test="canUpdate != null and !&quot;&quot;.equals(canUpdate)">
+                and can_update = #{canUpdate}
+            </if>
+            <if test="canSelect != null and !&quot;&quot;.equals(canSelect)">
+                and can_select = #{canSelect}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE sys_power_info SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+
+    <update id="deleteByRoleId">
+        UPDATE sys_power_info SET del_flag = 'Y'
+        <where>
+            AND role_id = #{roleId}
+        </where>
+    </update>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/ProductCollectionMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.ProductCollection;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.ProductCollectionMapper")
+public interface ProductCollectionMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(ProductCollection record);
+
+    ProductCollection selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ProductCollection record);
+
+    List<ProductCollection> queryAllProductCollection(ProductCollection record);
+
+    List<ProductCollection> queryProductCollectionByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    ProductCollection queryProductCollection(ProductCollection record);
+
+    List<ProductCollection> query(ProductCollection record);
+}
+

+ 394 - 0
src/main/java/com/izouma/awesomeadmin/dao/ProductCollectionMapper.xml

@@ -0,0 +1,394 @@
+<?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.izouma.awesomeadmin.dao.ProductCollectionMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ProductCollection">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+        <result column="user_id" property="userId" jdbcType="VARCHAR"/>
+        <result column="target_id" property="targetId" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            type_flag,
+
+            user_id,
+
+            target_id,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from product_collection
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from product_collection
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ProductCollection" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into product_collection
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="userId!= null">
+                user_id,
+            </if>
+            <if test="targetId!= null">
+                target_id,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="userId != null">
+                #{userId,jdbcType=VARCHAR},
+            </if>
+            <if test="targetId != null">
+                #{targetId,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ProductCollection">
+        update product_collection
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="userId != null">
+                user_id= #{userId,jdbcType=VARCHAR},
+            </if>
+            <if test="targetId != null">
+                target_id= #{targetId,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryProductCollectionByPage" parameterType="java.util.Map"
+            resultMap="AllInfoForList">
+        select
+        <include refid="Base_Column_List"/>
+        from product_collection
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and type_flag = #{record.typeFlag}
+            </if>
+            <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and user_id = #{record.userId}
+            </if>
+            <if test="record.targetId != null and !&quot;&quot;.equals(record.targetId)">
+                and target_id = #{record.targetId}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR user_id LIKE concat('%',#{record.searchKey},'%')
+                    OR target_id LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllProductCollection" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ProductCollection">
+        select
+        <include refid="Base_Column_List"/>
+        from product_collection
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="targetId != null and !&quot;&quot;.equals(targetId)">
+                and target_id = #{targetId}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                    OR user_id LIKE concat('%',#{searchKey},'%')
+                    OR target_id LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryProductCollection" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ProductCollection">
+        select
+        <include refid="Base_Column_List"/>
+        from product_collection
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="targetId != null and !&quot;&quot;.equals(targetId)">
+                and target_id = #{targetId}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE product_collection SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductCollection">
+        select
+        <include refid="Base_Column_List"/>
+        from product_collection
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+
+    <resultMap id="AllInfoForList" type="com.izouma.awesomeadmin.model.ProductCollection" extends="BaseResultMap">
+
+
+        <association property="productInfo"
+                     javaType="com.izouma.awesomeadmin.model.ProductInfo"
+                     select="com.izouma.awesomeadmin.dao.ProductInfoMapper.queryProductInfo"
+                     column="{ id = target_id }"/>
+
+    </resultMap>
+
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/ProductCommentImageMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.ProductCommentImage;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.ProductCommentImageMapper")
+public interface ProductCommentImageMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(ProductCommentImage record);
+
+    ProductCommentImage selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ProductCommentImage record);
+
+    List<ProductCommentImage> queryAllProductCommentImage(ProductCommentImage record);
+
+    List<ProductCommentImage> queryProductCommentImageByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    ProductCommentImage queryProductCommentImage(ProductCommentImage record);
+
+    List<ProductCommentImage> query(ProductCommentImage record);
+}
+

+ 463 - 0
src/main/java/com/izouma/awesomeadmin/dao/ProductCommentImageMapper.xml

@@ -0,0 +1,463 @@
+<?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.izouma.awesomeadmin.dao.ProductCommentImageMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ProductCommentImage" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
+                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
+                                <result column="product_id" property="productId" jdbcType="VARCHAR" />
+                                <result column="order_id" property="orderId" jdbcType="VARCHAR" />
+                                <result column="user_id" property="userId" jdbcType="VARCHAR" />
+                                <result column="store_id" property="storeId" jdbcType="VARCHAR" />
+                                <result column="comment_id" property="commentId" jdbcType="VARCHAR" />
+                                <result column="image_url" property="imageUrl" jdbcType="VARCHAR" />
+                                <result column="image_size" property="imageSize" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            product_id,
+
+            order_id,
+
+            user_id,
+
+            store_id,
+
+            comment_id,
+
+            image_url,
+
+            image_size,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from product_comment_image
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from product_comment_image
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ProductCommentImage" useGeneratedKeys="true" keyProperty="id">
+        insert into product_comment_image
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="updateTime!= null" >
+                update_time,
+            </if>
+                <if test="updateUser!= null" >
+                update_user,
+            </if>
+                <if test="createTime!= null" >
+                create_time,
+            </if>
+                <if test="createUser!= null" >
+                create_user,
+            </if>
+                <if test="productId!= null" >
+                product_id,
+            </if>
+                <if test="orderId!= null" >
+                order_id,
+            </if>
+                <if test="userId!= null" >
+                user_id,
+            </if>
+                <if test="storeId!= null" >
+                store_id,
+            </if>
+                <if test="commentId!= null" >
+                comment_id,
+            </if>
+                <if test="imageUrl!= null" >
+                image_url,
+            </if>
+                <if test="imageSize!= null" >
+                image_size,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="updateUser != null" >
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="createUser != null" >
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="productId != null" >
+                #{productId,jdbcType=VARCHAR},
+            </if>
+                    <if test="orderId != null" >
+                #{orderId,jdbcType=VARCHAR},
+            </if>
+                    <if test="userId != null" >
+                #{userId,jdbcType=VARCHAR},
+            </if>
+                    <if test="storeId != null" >
+                #{storeId,jdbcType=VARCHAR},
+            </if>
+                    <if test="commentId != null" >
+                #{commentId,jdbcType=VARCHAR},
+            </if>
+                    <if test="imageUrl != null" >
+                #{imageUrl,jdbcType=VARCHAR},
+            </if>
+                    <if test="imageSize != null" >
+                #{imageSize,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ProductCommentImage" >
+        update product_comment_image
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="updateTime != null" >
+               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="updateUser != null" >
+               update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="createTime != null" >
+               create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="createUser != null" >
+               create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="productId != null" >
+               product_id= #{productId,jdbcType=VARCHAR},
+            </if>
+                     <if test="orderId != null" >
+               order_id= #{orderId,jdbcType=VARCHAR},
+            </if>
+                     <if test="userId != null" >
+               user_id= #{userId,jdbcType=VARCHAR},
+            </if>
+                     <if test="storeId != null" >
+               store_id= #{storeId,jdbcType=VARCHAR},
+            </if>
+                     <if test="commentId != null" >
+               comment_id= #{commentId,jdbcType=VARCHAR},
+            </if>
+                     <if test="imageUrl != null" >
+               image_url= #{imageUrl,jdbcType=VARCHAR},
+            </if>
+                     <if test="imageSize != null" >
+               image_size= #{imageSize,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryProductCommentImageByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductCommentImage">
+        select <include refid="Base_Column_List"/> from product_comment_image
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and  update_time = #{record.updateTime}
+            </if>
+                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and  update_user = #{record.updateUser}
+            </if>
+                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and  create_time = #{record.createTime}
+            </if>
+                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and  create_user = #{record.createUser}
+            </if>
+                     <if test="record.productId != null and !&quot;&quot;.equals(record.productId)">
+                and  product_id = #{record.productId}
+            </if>
+                     <if test="record.orderId != null and !&quot;&quot;.equals(record.orderId)">
+                and  order_id = #{record.orderId}
+            </if>
+                     <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and  user_id = #{record.userId}
+            </if>
+                     <if test="record.storeId != null and !&quot;&quot;.equals(record.storeId)">
+                and  store_id = #{record.storeId}
+            </if>
+                     <if test="record.commentId != null and !&quot;&quot;.equals(record.commentId)">
+                and  comment_id = #{record.commentId}
+            </if>
+                     <if test="record.imageUrl != null and !&quot;&quot;.equals(record.imageUrl)">
+                and  image_url = #{record.imageUrl}
+            </if>
+                     <if test="record.imageSize != null and !&quot;&quot;.equals(record.imageSize)">
+                and  image_size = #{record.imageSize}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  product_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  order_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  user_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  store_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  comment_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  image_url LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  image_size LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllProductCommentImage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductCommentImage">
+        select <include refid="Base_Column_List"/> from product_comment_image
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and  update_time = #{updateTime}
+            </if>
+                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and  update_user = #{updateUser}
+            </if>
+                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and  create_time = #{createTime}
+            </if>
+                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and  create_user = #{createUser}
+            </if>
+                    <if test="productId != null and !&quot;&quot;.equals(productId)">
+                and  product_id = #{productId}
+            </if>
+                    <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and  order_id = #{orderId}
+            </if>
+                    <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and  user_id = #{userId}
+            </if>
+                    <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and  store_id = #{storeId}
+            </if>
+                    <if test="commentId != null and !&quot;&quot;.equals(commentId)">
+                and  comment_id = #{commentId}
+            </if>
+                    <if test="imageUrl != null and !&quot;&quot;.equals(imageUrl)">
+                and  image_url = #{imageUrl}
+            </if>
+                    <if test="imageSize != null and !&quot;&quot;.equals(imageSize)">
+                and  image_size = #{imageSize}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  product_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  order_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  user_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  store_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  comment_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  image_url LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  image_size LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryProductCommentImage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductCommentImage">
+        select <include refid="Base_Column_List"/> from product_comment_image
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+                     <if test="productId != null and !&quot;&quot;.equals(productId)">
+                and product_id = #{productId}
+            </if>
+                     <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and order_id = #{orderId}
+            </if>
+                     <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+                     <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+                     <if test="commentId != null and !&quot;&quot;.equals(commentId)">
+                and comment_id = #{commentId}
+            </if>
+                     <if test="imageUrl != null and !&quot;&quot;.equals(imageUrl)">
+                and image_url = #{imageUrl}
+            </if>
+                     <if test="imageSize != null and !&quot;&quot;.equals(imageSize)">
+                and image_size = #{imageSize}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE product_comment_image SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductCommentImage">
+        select <include refid="Base_Column_List"/> from product_comment_image
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 36 - 0
src/main/java/com/izouma/awesomeadmin/dao/ProductCommentMapper.java

@@ -0,0 +1,36 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.ProductComment;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Dao接口
+ */
+@Repository("com.zoumaframe.dao.ProductCommentMapper")
+public interface ProductCommentMapper {
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(ProductComment record);
+
+    ProductComment selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ProductComment record);
+
+    List<ProductComment> queryAllProductComment(ProductComment record);
+
+    List<ProductComment> queryProductCommentByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    ProductComment queryProductComment(ProductComment record);
+
+    List<ProductComment> query(ProductComment record);
+
+    ProductComment getCount(ProductComment record);
+}
+

+ 605 - 0
src/main/java/com/izouma/awesomeadmin/dao/ProductCommentMapper.xml

@@ -0,0 +1,605 @@
+<?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.izouma.awesomeadmin.dao.ProductCommentMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ProductComment">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="product_id" property="productId" jdbcType="VARCHAR"/>
+        <result column="order_id" property="orderId" jdbcType="VARCHAR"/>
+        <result column="user_id" property="userId" jdbcType="VARCHAR"/>
+        <result column="store_id" property="storeId" jdbcType="VARCHAR"/>
+        <result column="context" property="context" jdbcType="VARCHAR"/>
+        <result column="star_level" property="starLevel" jdbcType="VARCHAR"/>
+        <result column="anonymous" property="anonymous" jdbcType="CHAR"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+        <result column="service_level" property="serviceLevel" jdbcType="VARCHAR"/>
+        <result column="reply_level" property="replyLevel" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            product_id,
+
+            order_id,
+
+            user_id,
+
+            store_id,
+
+            context,
+
+            star_level,
+
+            anonymous,
+
+            type_flag,
+
+            service_level,
+
+            reply_level,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from product_comment
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from product_comment
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ProductComment" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into product_comment
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="productId!= null">
+                product_id,
+            </if>
+            <if test="orderId!= null">
+                order_id,
+            </if>
+            <if test="userId!= null">
+                user_id,
+            </if>
+            <if test="storeId!= null">
+                store_id,
+            </if>
+            <if test="context!= null">
+                context,
+            </if>
+            <if test="starLevel!= null">
+                star_level,
+            </if>
+            <if test="anonymous!= null">
+                anonymous,
+            </if>
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="serviceLevel!= null">
+                service_level,
+            </if>
+            <if test="replyLevel!= null">
+                reply_level,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="productId != null">
+                #{productId,jdbcType=VARCHAR},
+            </if>
+            <if test="orderId != null">
+                #{orderId,jdbcType=VARCHAR},
+            </if>
+            <if test="userId != null">
+                #{userId,jdbcType=VARCHAR},
+            </if>
+            <if test="storeId != null">
+                #{storeId,jdbcType=VARCHAR},
+            </if>
+            <if test="context != null">
+                #{context,jdbcType=VARCHAR},
+            </if>
+            <if test="starLevel != null">
+                #{starLevel,jdbcType=VARCHAR},
+            </if>
+            <if test="anonymous != null">
+                #{anonymous,jdbcType=CHAR},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="serviceLevel != null">
+                #{serviceLevel,jdbcType=VARCHAR},
+            </if>
+            <if test="replyLevel != null">
+                #{replyLevel,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ProductComment">
+        update product_comment
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="productId != null">
+                product_id= #{productId,jdbcType=VARCHAR},
+            </if>
+            <if test="orderId != null">
+                order_id= #{orderId,jdbcType=VARCHAR},
+            </if>
+            <if test="userId != null">
+                user_id= #{userId,jdbcType=VARCHAR},
+            </if>
+            <if test="storeId != null">
+                store_id= #{storeId,jdbcType=VARCHAR},
+            </if>
+            <if test="context != null">
+                context= #{context,jdbcType=VARCHAR},
+            </if>
+            <if test="starLevel != null">
+                star_level= #{starLevel,jdbcType=VARCHAR},
+            </if>
+            <if test="anonymous != null">
+                anonymous= #{anonymous,jdbcType=CHAR},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="serviceLevel != null">
+                service_level= #{serviceLevel,jdbcType=VARCHAR},
+            </if>
+            <if test="replyLevel != null">
+                reply_level= #{replyLevel,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryProductCommentByPage" parameterType="java.util.Map"
+            resultMap="AllInfoForGetList">
+        select
+        <include refid="Base_Column_List"/>
+        from product_comment
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.productId != null and !&quot;&quot;.equals(record.productId)">
+                and product_id = #{record.productId}
+            </if>
+            <if test="record.orderId != null and !&quot;&quot;.equals(record.orderId)">
+                and order_id = #{record.orderId}
+            </if>
+            <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and user_id = #{record.userId}
+            </if>
+            <if test="record.storeId != null and !&quot;&quot;.equals(record.storeId)">
+                and store_id = #{record.storeId}
+            </if>
+            <if test="record.context != null and !&quot;&quot;.equals(record.context)">
+                and context = #{record.context}
+            </if>
+            <if test="record.starLevel != null and !&quot;&quot;.equals(record.starLevel)">
+                and star_level = #{record.starLevel}
+            </if>
+            <if test="record.anonymous != null and !&quot;&quot;.equals(record.anonymous)">
+                and anonymous = #{record.anonymous}
+            </if>
+            <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and type_flag = #{record.typeFlag}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR product_id LIKE concat('%',#{record.searchKey},'%')
+                    OR order_id LIKE concat('%',#{record.searchKey},'%')
+                    OR user_id LIKE concat('%',#{record.searchKey},'%')
+                    OR store_id LIKE concat('%',#{record.searchKey},'%')
+                    OR context LIKE concat('%',#{record.searchKey},'%')
+                    OR star_level LIKE concat('%',#{record.searchKey},'%')
+                    OR anonymous LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllProductComment" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ProductComment">
+        select
+        <include refid="Base_Column_List"/>
+        from product_comment
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="productId != null and !&quot;&quot;.equals(productId)">
+                and product_id = #{productId}
+            </if>
+            <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and order_id = #{orderId}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="context != null and !&quot;&quot;.equals(context)">
+                and context = #{context}
+            </if>
+            <if test="starLevel != null and !&quot;&quot;.equals(starLevel)">
+                and star_level = #{starLevel}
+            </if>
+            <if test="anonymous != null and !&quot;&quot;.equals(anonymous)">
+                and anonymous = #{anonymous}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR product_id LIKE concat('%',#{searchKey},'%')
+                    OR order_id LIKE concat('%',#{searchKey},'%')
+                    OR user_id LIKE concat('%',#{searchKey},'%')
+                    OR store_id LIKE concat('%',#{searchKey},'%')
+                    OR context LIKE concat('%',#{searchKey},'%')
+                    OR star_level LIKE concat('%',#{searchKey},'%')
+                    OR anonymous LIKE concat('%',#{searchKey},'%')
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryProductComment" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ProductComment">
+        select
+        <include refid="Base_Column_List"/>
+        from product_comment
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="productId != null and !&quot;&quot;.equals(productId)">
+                and product_id = #{productId}
+            </if>
+            <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and order_id = #{orderId}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="context != null and !&quot;&quot;.equals(context)">
+                and context = #{context}
+            </if>
+            <if test="starLevel != null and !&quot;&quot;.equals(starLevel)">
+                and star_level = #{starLevel}
+            </if>
+            <if test="anonymous != null and !&quot;&quot;.equals(anonymous)">
+                and anonymous = #{anonymous}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <select id="getCount" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductComment">
+        select count(1) commentCount, AVG(star_level) AS star_level , AVG(service_level) AS service_level ,
+        AVG(reply_level) AS reply_level from product_comment
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="productId != null and !&quot;&quot;.equals(productId)">
+                and product_id = #{productId}
+            </if>
+            <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and order_id = #{orderId}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+                and type_flag = 1
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="context != null and !&quot;&quot;.equals(context)">
+                and context = #{context}
+            </if>
+            <if test="starLevel != null and !&quot;&quot;.equals(starLevel)">
+                and star_level = #{starLevel}
+            </if>
+            <if test="anonymous != null and !&quot;&quot;.equals(anonymous)">
+                and anonymous = #{anonymous}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE product_comment SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductComment">
+        select
+        <include refid="Base_Column_List"/>
+        from product_comment
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+
+    <resultMap id="AllInfoForGetOne" type="com.izouma.awesomeadmin.model.ProductComment" extends="BaseResultMap">
+
+
+        <collection property="productCommentImageList"
+                    ofType="com.izouma.awesomeadmin.model.ProductCommentImage"
+                    select="com.izouma.awesomeadmin.dao.ProductCommentImageMapper.queryAllProductCommentImage"
+                    column="{ productId = id }"/>
+
+    </resultMap>
+
+    <resultMap id="AllInfoForGetList" type="com.izouma.awesomeadmin.model.ProductComment" extends="BaseResultMap">
+
+
+        <association property="userInfo"
+                     javaType="com.izouma.awesomeadmin.model.UserInfo"
+                     select="com.izouma.awesomeadmin.dao.UserInfoMapper.querySingleUserInfo"
+                     column="{ id = user_id }"/>
+
+        <association property="productInfo"
+                     javaType="com.izouma.awesomeadmin.model.ProductInfo"
+                     select="com.izouma.awesomeadmin.dao.ProductInfoMapper.queryProductInfo"
+                     column="{ id = product_id }"/>
+
+        <collection property="productCommentImageList"
+                    ofType="com.izouma.awesomeadmin.model.ProductCommentImage"
+                    select="com.izouma.awesomeadmin.dao.ProductCommentImageMapper.queryAllProductCommentImage"
+                    column="{ commentId = id }"/>
+
+    </resultMap>
+
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/ProductImageMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.ProductImage;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.ProductImageMapper")
+public interface ProductImageMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(ProductImage record);
+
+    ProductImage selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ProductImage record);
+
+    List<ProductImage> queryAllProductImage(ProductImage record);
+
+    List<ProductImage> queryProductImageByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    ProductImage queryProductImage(ProductImage record);
+
+    List<ProductImage> query(ProductImage record);
+}
+

+ 415 - 0
src/main/java/com/izouma/awesomeadmin/dao/ProductImageMapper.xml

@@ -0,0 +1,415 @@
+<?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.izouma.awesomeadmin.dao.ProductImageMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ProductImage" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
+                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
+                                <result column="product_id" property="productId" jdbcType="VARCHAR" />
+                                <result column="image" property="image" jdbcType="VARCHAR" />
+                                <result column="remark" property="remark" jdbcType="VARCHAR" />
+                                <result column="rank" property="rank" jdbcType="INTEGER" />
+                                <result column="name" property="name" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            product_id,
+
+            image,
+
+            remark,
+
+            rank,
+
+            name,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from product_image
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from product_image
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ProductImage" useGeneratedKeys="true" keyProperty="id">
+        insert into product_image
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="updateTime!= null" >
+                update_time,
+            </if>
+                <if test="updateUser!= null" >
+                update_user,
+            </if>
+                <if test="createTime!= null" >
+                create_time,
+            </if>
+                <if test="createUser!= null" >
+                create_user,
+            </if>
+                <if test="productId!= null" >
+                product_id,
+            </if>
+                <if test="image!= null" >
+                image,
+            </if>
+                <if test="remark!= null" >
+                remark,
+            </if>
+                <if test="rank!= null" >
+                rank,
+            </if>
+                <if test="name!= null" >
+                name,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="updateUser != null" >
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="createUser != null" >
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="productId != null" >
+                #{productId,jdbcType=VARCHAR},
+            </if>
+                    <if test="image != null" >
+                #{image,jdbcType=VARCHAR},
+            </if>
+                    <if test="remark != null" >
+                #{remark,jdbcType=VARCHAR},
+            </if>
+                    <if test="rank != null" >
+                #{rank,jdbcType=INTEGER},
+            </if>
+                    <if test="name != null" >
+                #{name,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ProductImage" >
+        update product_image
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="updateTime != null" >
+               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="updateUser != null" >
+               update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="createTime != null" >
+               create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="createUser != null" >
+               create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="productId != null" >
+               product_id= #{productId,jdbcType=VARCHAR},
+            </if>
+                     <if test="image != null" >
+               image= #{image,jdbcType=VARCHAR},
+            </if>
+                     <if test="remark != null" >
+               remark= #{remark,jdbcType=VARCHAR},
+            </if>
+                     <if test="rank != null" >
+               rank= #{rank,jdbcType=INTEGER},
+            </if>
+                     <if test="name != null" >
+               name= #{name,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryProductImageByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductImage">
+        select <include refid="Base_Column_List"/> from product_image
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and  update_time = #{record.updateTime}
+            </if>
+                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and  update_user = #{record.updateUser}
+            </if>
+                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and  create_time = #{record.createTime}
+            </if>
+                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and  create_user = #{record.createUser}
+            </if>
+                     <if test="record.productId != null and !&quot;&quot;.equals(record.productId)">
+                and  product_id = #{record.productId}
+            </if>
+                     <if test="record.image != null and !&quot;&quot;.equals(record.image)">
+                and  image = #{record.image}
+            </if>
+                     <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and  remark = #{record.remark}
+            </if>
+                     <if test="record.rank != null and !&quot;&quot;.equals(record.rank)">
+                and  rank = #{record.rank}
+            </if>
+                     <if test="record.name != null and !&quot;&quot;.equals(record.name)">
+                and  name = #{record.name}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  product_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                                                                                     OR  remark LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  rank LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  name LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        rank desc, id
+    </select>
+    <select id="queryAllProductImage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductImage">
+        select <include refid="Base_Column_List"/> from product_image
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and  update_time = #{updateTime}
+            </if>
+                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and  update_user = #{updateUser}
+            </if>
+                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and  create_time = #{createTime}
+            </if>
+                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and  create_user = #{createUser}
+            </if>
+                    <if test="productId != null and !&quot;&quot;.equals(productId)">
+                and  product_id = #{productId}
+            </if>
+                    <if test="image != null and !&quot;&quot;.equals(image)">
+                and  image = #{image}
+            </if>
+                    <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and  remark = #{remark}
+            </if>
+                    <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and  rank = #{rank}
+            </if>
+                    <if test="name != null and !&quot;&quot;.equals(name)">
+                and  name = #{name}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  product_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                                                                                                                        OR  remark LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  rank LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  name LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        rank desc,id
+    </select>
+    <select id="queryProductImage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductImage">
+        select <include refid="Base_Column_List"/> from product_image
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+                     <if test="productId != null and !&quot;&quot;.equals(productId)">
+                and product_id = #{productId}
+            </if>
+                     <if test="image != null and !&quot;&quot;.equals(image)">
+                and image = #{image}
+            </if>
+                     <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+                     <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and rank = #{rank}
+            </if>
+                     <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE product_image SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductImage">
+        select <include refid="Base_Column_List"/> from product_image
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 36 - 0
src/main/java/com/izouma/awesomeadmin/dao/ProductInfoMapper.java

@@ -0,0 +1,36 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.ProductInfo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.ProductInfoMapper")
+public interface ProductInfoMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(ProductInfo record);
+
+    ProductInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ProductInfo record);
+
+    List<ProductInfo> queryAllProductInfo(ProductInfo record);
+
+    List<ProductInfo> queryAllProductInfoForHome(ProductInfo record);
+
+    List<ProductInfo> queryProductInfoByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    ProductInfo queryProductInfo(ProductInfo record);
+
+    List<ProductInfo> query(ProductInfo record);
+}
+

+ 913 - 0
src/main/java/com/izouma/awesomeadmin/dao/ProductInfoMapper.xml

@@ -0,0 +1,913 @@
+<?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.izouma.awesomeadmin.dao.ProductInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ProductInfo">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="service_type" property="serviceType" jdbcType="VARCHAR"/>
+        <result column="subclass" property="subclass" jdbcType="VARCHAR"/>
+        <result column="title" property="title" jdbcType="VARCHAR"/>
+        <result column="image" property="image" jdbcType="VARCHAR"/>
+        <result column="service_detail" property="serviceDetail" jdbcType="VARCHAR"/>
+        <result column="inventory" property="inventory" jdbcType="INTEGER"/>
+        <result column="on_shelf" property="onShelf" jdbcType="CHAR"/>
+        <result column="use_flag" property="useFlag" jdbcType="CHAR"/>
+        <result column="hot_flag" property="hotFlag" jdbcType="INTEGER"/>
+        <result column="home_flag" property="homeFlag" jdbcType="INTEGER"/>
+        <result column="rank" property="rank" jdbcType="INTEGER"/>
+        <result column="store_id" property="storeId" jdbcType="INTEGER"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+        <result column="sales_volume" property="salesVolume" jdbcType="INTEGER"/>
+        <result column="price" property="price" jdbcType="DECIMAL"/>
+        <result column="product_detail" property="productDetail" jdbcType="VARCHAR"/>
+        <result column="out_url" property="outUrl" jdbcType="VARCHAR"/>
+        <result column="out_flag" property="outFlag" jdbcType="CHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            service_type,
+
+            subclass,
+
+            title,
+
+            image,
+
+            service_detail,
+
+            inventory,
+
+            on_shelf,
+
+            use_flag,
+
+            hot_flag,
+
+            home_flag,
+
+            rank,
+
+            store_id,
+
+            type_flag,
+
+            sales_volume,
+
+            price,
+
+            product_detail,
+
+            out_url,
+
+            out_flag,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from product_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from product_info
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ProductInfo" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into product_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="serviceType!= null">
+                service_type,
+            </if>
+            <if test="subclass!= null">
+                subclass,
+            </if>
+            <if test="title!= null">
+                title,
+            </if>
+            <if test="image!= null">
+                image,
+            </if>
+            <if test="serviceDetail!= null">
+                service_detail,
+            </if>
+            <if test="inventory!= null">
+                inventory,
+            </if>
+            <if test="onShelf!= null">
+                on_shelf,
+            </if>
+            <if test="useFlag!= null">
+                use_flag,
+            </if>
+            <if test="hotFlag!= null">
+                hot_flag,
+            </if>
+            <if test="homeFlag!= null">
+                home_flag,
+            </if>
+            <if test="rank!= null">
+                rank,
+            </if>
+            <if test="storeId!= null">
+                store_id,
+            </if>
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="salesVolume!= null">
+                sales_volume,
+            </if>
+            <if test="price!= null">
+                price,
+            </if>
+            <if test="productDetail!= null">
+                product_detail,
+            </if>
+            <if test="outUrl!= null">
+                out_url,
+            </if>
+            <if test="outFlag != null">
+                out_flag,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="serviceType != null">
+                #{serviceType,jdbcType=VARCHAR},
+            </if>
+            <if test="subclass != null">
+                #{subclass,jdbcType=VARCHAR},
+            </if>
+            <if test="title != null">
+                #{title,jdbcType=VARCHAR},
+            </if>
+            <if test="image != null">
+                #{image,jdbcType=VARCHAR},
+            </if>
+            <if test="serviceDetail != null">
+                #{serviceDetail,jdbcType=VARCHAR},
+            </if>
+            <if test="inventory != null">
+                #{inventory,jdbcType=INTEGER},
+            </if>
+            <if test="onShelf != null">
+                #{onShelf,jdbcType=CHAR},
+            </if>
+            <if test="useFlag != null">
+                #{useFlag,jdbcType=CHAR},
+            </if>
+            <if test="hotFlag != null">
+                #{hotFlag,jdbcType=INTEGER},
+            </if>
+            <if test="homeFlag != null">
+                #{homeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="rank != null">
+                #{rank,jdbcType=INTEGER},
+            </if>
+            <if test="storeId != null">
+                #{storeId,jdbcType=INTEGER},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="salesVolume != null">
+                #{salesVolume,jdbcType=INTEGER},
+            </if>
+            <if test="price != null">
+                #{price,jdbcType=DECIMAL},
+            </if>
+            <if test="productDetail != null">
+                #{productDetail,jdbcType=VARCHAR},
+            </if>
+            <if test="outUrl != null">
+                #{outUrl,jdbcType=VARCHAR},
+            </if>
+            <if test="outFlag != null">
+                #{outFlag,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ProductInfo">
+        update product_info
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="serviceType != null">
+                service_type= #{serviceType,jdbcType=VARCHAR},
+            </if>
+            <if test="subclass != null">
+                subclass= #{subclass,jdbcType=VARCHAR},
+            </if>
+            <if test="title != null">
+                title= #{title,jdbcType=VARCHAR},
+            </if>
+            <if test="image != null">
+                image= #{image,jdbcType=VARCHAR},
+            </if>
+            <if test="serviceDetail != null">
+                service_detail= #{serviceDetail,jdbcType=VARCHAR},
+            </if>
+            <if test="inventory != null">
+                inventory= #{inventory,jdbcType=INTEGER},
+            </if>
+            <if test="onShelf != null">
+                on_shelf= #{onShelf,jdbcType=CHAR},
+            </if>
+            <if test="useFlag != null">
+                use_flag= #{useFlag,jdbcType=CHAR},
+            </if>
+            <if test="hotFlag != null">
+                hot_flag= #{hotFlag,jdbcType=INTEGER},
+            </if>
+            <if test="homeFlag != null">
+                home_flag= #{homeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="rank != null">
+                rank= #{rank,jdbcType=INTEGER},
+            </if>
+            <if test="storeId != null">
+                store_id= #{storeId,jdbcType=INTEGER},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="salesVolume != null">
+                sales_volume= #{salesVolume,jdbcType=INTEGER},
+            </if>
+            <if test="price != null">
+                price= #{price,jdbcType=DECIMAL},
+            </if>
+            <if test="productDetail != null">
+                product_detail= #{productDetail,jdbcType=VARCHAR},
+            </if>
+            <if test="outUrl != null">
+                out_url= #{outUrl,jdbcType=VARCHAR},
+            </if>
+            <if test="outFlag != null">
+                out_flag = #{outFlag,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="queryProductInfoByPage" parameterType="java.util.Map"
+            resultMap="AllInfoForGetList">
+        select
+        <include refid="Base_Column_List"/>,
+
+        (SELECT
+        AVG(
+        star_level + service_level + reply_level
+        ) / 3
+        FROM
+        `product_comment`
+        WHERE
+        del_flag = 'N'
+        AND product_id = product_info.id ) as  dsr
+
+        from product_info
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.serviceType != null and !&quot;&quot;.equals(record.serviceType)">
+                and service_type = #{record.serviceType}
+            </if>
+            <if test="record.subclass != null and !&quot;&quot;.equals(record.subclass)">
+                and subclass = #{record.subclass}
+            </if>
+            <if test="record.title != null and !&quot;&quot;.equals(record.title)">
+                and title = #{record.title}
+            </if>
+            <if test="record.image != null and !&quot;&quot;.equals(record.image)">
+                and image = #{record.image}
+            </if>
+            <if test="record.serviceDetail != null and !&quot;&quot;.equals(record.serviceDetail)">
+                and service_detail = #{record.serviceDetail}
+            </if>
+            <if test="record.inventory != null and !&quot;&quot;.equals(record.inventory)">
+                and inventory = #{record.inventory}
+            </if>
+            <if test="record.onShelf != null and !&quot;&quot;.equals(record.onShelf)">
+                and on_shelf = #{record.onShelf}
+            </if>
+            <if test="record.useFlag != null and !&quot;&quot;.equals(record.useFlag)">
+                and use_flag = #{record.useFlag}
+            </if>
+            <if test="record.hotFlag != null and !&quot;&quot;.equals(record.hotFlag)">
+                and hot_flag = #{record.hotFlag}
+            </if>
+            <if test="record.homeFlag != null and !&quot;&quot;.equals(record.homeFlag)">
+                and home_flag = #{record.homeFlag}
+            </if>
+            <if test="record.rank != null and !&quot;&quot;.equals(record.rank)">
+                and rank = #{record.rank}
+            </if>
+            <if test="record.storeId != null and !&quot;&quot;.equals(record.storeId)">
+                and store_id = #{record.storeId}
+            </if>
+            <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and type_flag = #{record.typeFlag}
+            </if>
+            <if test="record.salesVolume != null and !&quot;&quot;.equals(record.salesVolume)">
+                and sales_volume = #{record.salesVolume}
+            </if>
+            <if test="record.minPrice != null and !&quot;&quot;.equals(record.minPrice)">
+                <![CDATA[and price >= #{record.minPrice}]]>
+            </if>
+            <if test="record.maxPrice != null and !&quot;&quot;.equals(record.maxPrice)">
+                <![CDATA[and price <= #{record.maxPrice}]]>
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR service_type LIKE concat('%',#{record.searchKey},'%')
+                    OR subclass LIKE concat('%',#{record.searchKey},'%')
+                    OR title LIKE concat('%',#{record.searchKey},'%')
+                    OR service_detail LIKE concat('%',#{record.searchKey},'%')
+                    OR inventory LIKE concat('%',#{record.searchKey},'%')
+                    OR on_shelf LIKE concat('%',#{record.searchKey},'%')
+                    OR use_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR hot_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR home_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR rank LIKE concat('%',#{record.searchKey},'%')
+                    OR store_id LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR sales_volume LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        rank desc, id desc
+    </select>
+    <select id="queryAllProductInfo" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ProductInfo">
+        select
+        <include refid="Base_Column_List"/>,
+        (SELECT
+        AVG(
+        product_comment.star_level + product_comment.service_level + product_comment.reply_level
+        ) / 3
+        FROM
+        `product_comment`
+        WHERE
+        product_comment.del_flag = 'N'
+        AND product_comment.product_id = product_info.id ) as  dsr
+
+        from product_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="serviceType != null and !&quot;&quot;.equals(serviceType)">
+                and service_type = #{serviceType}
+            </if>
+            <if test="subclass != null and !&quot;&quot;.equals(subclass)">
+                and subclass = #{subclass}
+            </if>
+            <if test="title != null and !&quot;&quot;.equals(title)">
+                and title = #{title}
+            </if>
+            <if test="image != null and !&quot;&quot;.equals(image)">
+                and image = #{image}
+            </if>
+            <if test="serviceDetail != null and !&quot;&quot;.equals(serviceDetail)">
+                and service_detail = #{serviceDetail}
+            </if>
+            <if test="inventory != null and !&quot;&quot;.equals(inventory)">
+                and inventory = #{inventory}
+            </if>
+            <if test="onShelf != null and !&quot;&quot;.equals(onShelf)">
+                and on_shelf = #{onShelf}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="hotFlag != null and !&quot;&quot;.equals(hotFlag)">
+                and hot_flag = #{hotFlag}
+            </if>
+            <if test="homeFlag != null and !&quot;&quot;.equals(homeFlag)">
+                and home_flag = #{homeFlag}
+            </if>
+            <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and rank = #{rank}
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="salesVolume != null and !&quot;&quot;.equals(salesVolume)">
+                and sales_volume = #{salesVolume}
+            </if>
+            <if test="minPrice != null and !&quot;&quot;.equals(minPrice)">
+                <![CDATA[and price >= #{minPrice}]]>
+            </if>
+            <if test="maxPrice != null and !&quot;&quot;.equals(maxPrice)">
+                <![CDATA[and price <= #{maxPrice}]]>
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR service_type LIKE concat('%',#{searchKey},'%')
+                    OR subclass LIKE concat('%',#{searchKey},'%')
+                    OR title LIKE concat('%',#{searchKey},'%')
+                    OR service_detail LIKE concat('%',#{searchKey},'%')
+                    OR inventory LIKE concat('%',#{searchKey},'%')
+                    OR on_shelf LIKE concat('%',#{searchKey},'%')
+                    OR use_flag LIKE concat('%',#{searchKey},'%')
+                    OR hot_flag LIKE concat('%',#{searchKey},'%')
+                    OR home_flag LIKE concat('%',#{searchKey},'%')
+                    OR rank LIKE concat('%',#{searchKey},'%')
+                    OR store_id LIKE concat('%',#{searchKey},'%')
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                    OR sales_volume LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        rank desc, id desc
+    </select>
+    <select id="queryAllProductInfoForHome" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ProductInfo">
+        select
+        <include refid="Base_Column_List"/>,
+        (SELECT
+        AVG(
+        product_comment.star_level + product_comment.service_level + product_comment.reply_level
+        ) / 3
+        FROM
+        `product_comment`
+        WHERE
+        product_comment.del_flag = 'N'
+        AND product_comment.product_id = product_info.id ) as  dsr
+
+        from product_info
+        <where>
+            and del_flag = 'N'
+            and use_flag = 'Y'
+            and  on_shelf = 'Y'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="serviceType != null and !&quot;&quot;.equals(serviceType)">
+                and service_type = #{serviceType}
+            </if>
+            <if test="subclass != null and !&quot;&quot;.equals(subclass)">
+                and subclass = #{subclass}
+            </if>
+            <if test="title != null and !&quot;&quot;.equals(title)">
+                and title = #{title}
+            </if>
+            <if test="image != null and !&quot;&quot;.equals(image)">
+                and image = #{image}
+            </if>
+            <if test="serviceDetail != null and !&quot;&quot;.equals(serviceDetail)">
+                and service_detail = #{serviceDetail}
+            </if>
+            <if test="inventory != null and !&quot;&quot;.equals(inventory)">
+                and inventory = #{inventory}
+            </if>
+            <if test="onShelf != null and !&quot;&quot;.equals(onShelf)">
+                and on_shelf = #{onShelf}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="hotFlag != null and !&quot;&quot;.equals(hotFlag)">
+                and hot_flag = #{hotFlag}
+            </if>
+            <if test="homeFlag != null and !&quot;&quot;.equals(homeFlag)">
+                and home_flag = #{homeFlag}
+            </if>
+            <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and rank = #{rank}
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="salesVolume != null and !&quot;&quot;.equals(salesVolume)">
+                and sales_volume = #{salesVolume}
+            </if>
+            <if test="minPrice != null and !&quot;&quot;.equals(minPrice)">
+                <![CDATA[and price >= #{minPrice}]]>
+            </if>
+            <if test="maxPrice != null and !&quot;&quot;.equals(maxPrice)">
+                <![CDATA[and price <= #{maxPrice}]]>
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR service_type LIKE concat('%',#{searchKey},'%')
+                    OR subclass LIKE concat('%',#{searchKey},'%')
+                    OR title LIKE concat('%',#{searchKey},'%')
+                    OR service_detail LIKE concat('%',#{searchKey},'%')
+                    OR inventory LIKE concat('%',#{searchKey},'%')
+                    OR on_shelf LIKE concat('%',#{searchKey},'%')
+                    OR use_flag LIKE concat('%',#{searchKey},'%')
+                    OR hot_flag LIKE concat('%',#{searchKey},'%')
+                    OR home_flag LIKE concat('%',#{searchKey},'%')
+                    OR rank LIKE concat('%',#{searchKey},'%')
+                    OR store_id LIKE concat('%',#{searchKey},'%')
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                    OR sales_volume LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        rank desc, id desc
+
+        LIMIT 4
+
+    </select>
+    <select id="queryProductInfo" parameterType="java.util.Map" resultMap="AllInfoForGetOne">
+        select
+        <include refid="Base_Column_List"/>
+        from product_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="serviceType != null and !&quot;&quot;.equals(serviceType)">
+                and service_type = #{serviceType}
+            </if>
+            <if test="subclass != null and !&quot;&quot;.equals(subclass)">
+                and subclass = #{subclass}
+            </if>
+            <if test="title != null and !&quot;&quot;.equals(title)">
+                and title = #{title}
+            </if>
+            <if test="image != null and !&quot;&quot;.equals(image)">
+                and image = #{image}
+            </if>
+            <if test="serviceDetail != null and !&quot;&quot;.equals(serviceDetail)">
+                and service_detail = #{serviceDetail}
+            </if>
+            <if test="inventory != null and !&quot;&quot;.equals(inventory)">
+                and inventory = #{inventory}
+            </if>
+            <if test="onShelf != null and !&quot;&quot;.equals(onShelf)">
+                and on_shelf = #{onShelf}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="hotFlag != null and !&quot;&quot;.equals(hotFlag)">
+                and hot_flag = #{hotFlag}
+            </if>
+            <if test="homeFlag != null and !&quot;&quot;.equals(homeFlag)">
+                and home_flag = #{homeFlag}
+            </if>
+            <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and rank = #{rank}
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="salesVolume != null and !&quot;&quot;.equals(salesVolume)">
+                and sales_volume = #{salesVolume}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE product_info SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from product_info
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+
+    <resultMap id="AllInfoForGetOne" type="com.izouma.awesomeadmin.model.ProductInfo" extends="BaseResultMap">
+
+
+        <association property="storeInfo"
+                     javaType="com.izouma.awesomeadmin.model.StoreInfo"
+                     select="com.izouma.awesomeadmin.dao.StoreInfoMapper.queryStoreInfo"
+                     column="{ id = store_id }"/>
+
+        <collection property="productPriceList"
+                    ofType="com.izouma.awesomeadmin.model.ProductPrice"
+                    select="com.izouma.awesomeadmin.dao.ProductPriceMapper.queryAllProductPrice"
+                    column="{ productId = id }"/>
+
+    </resultMap>
+    <resultMap id="AllInfoForGetList" type="com.izouma.awesomeadmin.model.ProductInfo" extends="BaseResultMap">
+
+
+        <association property="storeInfo"
+                     javaType="com.izouma.awesomeadmin.model.StoreInfo"
+                     select="com.izouma.awesomeadmin.dao.StoreInfoMapper.queryStoreInfo"
+                     column="{ id = store_id }"/>
+
+    </resultMap>
+
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/ProductPriceMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.ProductPrice;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.ProductPriceMapper")
+public interface ProductPriceMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(ProductPrice record);
+
+    ProductPrice selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(ProductPrice record);
+
+    List<ProductPrice> queryAllProductPrice(ProductPrice record);
+
+    List<ProductPrice> queryProductPriceByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    ProductPrice queryProductPrice(ProductPrice record);
+
+    List<ProductPrice> query(ProductPrice record);
+}
+

+ 506 - 0
src/main/java/com/izouma/awesomeadmin/dao/ProductPriceMapper.xml

@@ -0,0 +1,506 @@
+<?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.izouma.awesomeadmin.dao.ProductPriceMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.ProductPrice">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="product_id" property="productId" jdbcType="VARCHAR"/>
+        <result column="name" property="name" jdbcType="VARCHAR"/>
+        <result column="price" property="price" jdbcType="DECIMAL"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+        <result column="min_counts" property="minCounts" jdbcType="INTEGER"/>
+        <result column="max_counts" property="maxCounts" jdbcType="INTEGER"/>
+        <result column="inventory" property="inventory" jdbcType="INTEGER"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            product_id,
+
+            name,
+
+            price,
+
+            type_flag,
+
+            min_counts,
+
+            max_counts,
+
+            inventory,
+
+            remark,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from product_price
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from product_price
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.ProductPrice" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into product_price
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="productId!= null">
+                product_id,
+            </if>
+            <if test="name!= null">
+                name,
+            </if>
+            <if test="price!= null">
+                price,
+            </if>
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="minCounts!= null">
+                min_counts,
+            </if>
+            <if test="maxCounts!= null and maxCounts&gt;0">
+                max_counts,
+            </if>
+            <if test="inventory!= null">
+                inventory,
+            </if>
+            <if test="remark!= null">
+                remark,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="productId != null">
+                #{productId,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="price != null">
+                #{price,jdbcType=DECIMAL},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="minCounts != null">
+                #{minCounts,jdbcType=INTEGER},
+            </if>
+            <if test="maxCounts != null and maxCounts&gt;0">
+                #{maxCounts,jdbcType=INTEGER},
+            </if>
+            <if test="inventory != null">
+                #{inventory,jdbcType=INTEGER},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.ProductPrice">
+        update product_price
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="productId != null">
+                product_id= #{productId,jdbcType=VARCHAR},
+            </if>
+            <if test="name != null">
+                name= #{name,jdbcType=VARCHAR},
+            </if>
+            <if test="price != null">
+                price= #{price,jdbcType=DECIMAL},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="minCounts != null">
+                min_counts= #{minCounts,jdbcType=INTEGER},
+            </if>
+            <if test="maxCounts != null">
+                <choose>
+                    <when test="maxCounts&lt;0">
+                        max_counts = null,
+                    </when>
+                    <otherwise>
+                        max_counts= #{maxCounts,jdbcType=INTEGER},
+                    </otherwise>
+                </choose>
+
+            </if>
+            <if test="inventory != null">
+                inventory= #{inventory,jdbcType=INTEGER},
+            </if>
+            <if test="remark != null">
+                remark= #{remark,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryProductPriceByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ProductPrice">
+        select
+        <include refid="Base_Column_List"/>
+        from product_price
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.productId != null and !&quot;&quot;.equals(record.productId)">
+                and product_id = #{record.productId}
+            </if>
+            <if test="record.name != null and !&quot;&quot;.equals(record.name)">
+                and name = #{record.name}
+            </if>
+            <if test="record.price != null and !&quot;&quot;.equals(record.price)">
+                and price = #{record.price}
+            </if>
+            <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and type_flag = #{record.typeFlag}
+            </if>
+            <if test="record.minCounts != null and !&quot;&quot;.equals(record.minCounts)">
+                and min_counts = #{record.minCounts}
+            </if>
+            <if test="record.maxCounts != null and !&quot;&quot;.equals(record.maxCounts)">
+                and max_counts = #{record.maxCounts}
+            </if>
+            <if test="record.inventory != null and !&quot;&quot;.equals(record.inventory)">
+                and inventory = #{record.inventory}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and remark = #{record.remark}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR product_id LIKE concat('%',#{record.searchKey},'%')
+                    OR name LIKE concat('%',#{record.searchKey},'%')
+                    OR price LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR min_counts LIKE concat('%',#{record.searchKey},'%')
+                    OR max_counts LIKE concat('%',#{record.searchKey},'%')
+                    OR inventory LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        product_id, type_flag , id desc
+    </select>
+    <select id="queryAllProductPrice" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ProductPrice">
+        select
+        <include refid="Base_Column_List"/>
+        from product_price
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="productId != null and !&quot;&quot;.equals(productId)">
+                and product_id = #{productId}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+            <if test="price != null and !&quot;&quot;.equals(price)">
+                and price = #{price}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="minCounts != null and !&quot;&quot;.equals(minCounts)">
+                and min_counts = #{minCounts}
+            </if>
+            <if test="maxCounts != null and !&quot;&quot;.equals(maxCounts)">
+                and max_counts = #{maxCounts}
+            </if>
+            <if test="inventory != null and !&quot;&quot;.equals(inventory)">
+                and inventory = #{inventory}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR product_id LIKE concat('%',#{searchKey},'%')
+                    OR name LIKE concat('%',#{searchKey},'%')
+                    OR price LIKE concat('%',#{searchKey},'%')
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                    OR min_counts LIKE concat('%',#{searchKey},'%')
+                    OR max_counts LIKE concat('%',#{searchKey},'%')
+                    OR inventory LIKE concat('%',#{searchKey},'%')
+                    OR remark LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        product_id, type_flag , id desc
+    </select>
+    <select id="queryProductPrice" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.ProductPrice">
+        select
+        <include refid="Base_Column_List"/>
+        from product_price
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="productId != null and !&quot;&quot;.equals(productId)">
+                and product_id = #{productId}
+            </if>
+            <if test="name != null and !&quot;&quot;.equals(name)">
+                and name = #{name}
+            </if>
+            <if test="price != null and !&quot;&quot;.equals(price)">
+                and price = #{price}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="minCounts != null and !&quot;&quot;.equals(minCounts)">
+                and min_counts = #{minCounts}
+            </if>
+            <if test="maxCounts != null and !&quot;&quot;.equals(maxCounts)">
+                and max_counts = #{maxCounts}
+            </if>
+            <if test="inventory != null and !&quot;&quot;.equals(inventory)">
+                and inventory = #{inventory}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE product_price SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.ProductPrice">
+        select
+        <include refid="Base_Column_List"/>
+        from product_price
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/QueryConfigMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.*;
+import com.izouma.awesomeadmin.datasource.DataSource;
+import org.springframework.stereotype.Repository;
+import com.izouma.awesomeadmin.model.QueryConfig;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.QueryConfigMapper")
+public interface QueryConfigMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(QueryConfig record);
+
+    QueryConfig selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(QueryConfig record);
+
+    List<QueryConfig> queryAllQueryConfig(QueryConfig record);
+
+    List<QueryConfig> queryQueryConfigByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    QueryConfig queryQueryConfig(QueryConfig record);
+
+    List<QueryConfig> query(QueryConfig record);
+}
+

+ 363 - 0
src/main/java/com/izouma/awesomeadmin/dao/QueryConfigMapper.xml

@@ -0,0 +1,363 @@
+<?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.izouma.awesomeadmin.dao.QueryConfigMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.QueryConfig">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="code" property="code" jdbcType="VARCHAR"/>
+        <result column="table_name" property="tableName" jdbcType="VARCHAR"/>
+        <result column="tableColumns" property="tablecolumns" jdbcType="VARCHAR"/>
+        <result column="dataBaseType" property="databasetype" jdbcType="VARCHAR"/>
+        <result column="modules" property="modules" jdbcType="VARCHAR"/>
+        <result column="data_source_code" property="dataSourceCode" jdbcType="VARCHAR"/>
+        <result column="config_json" property="configJson" jdbcType="VARCHAR"/>
+        <result column="type_flag" property="typeFlag" jdbcType="VARCHAR"/>
+        <result column="sub_json" property="subJson" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            code,
+
+            table_name,
+
+            tableColumns,
+
+            dataBaseType,
+
+            modules,
+
+            data_source_code,
+
+            config_json,
+
+            type_flag,
+
+            sub_json,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_query_config
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from sys_query_config
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.QueryConfig" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_query_config
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="code!= null">
+                code,
+            </if>
+            <if test="tableName!= null">
+                table_name,
+            </if>
+            <if test="tablecolumns!= null">
+                tableColumns,
+            </if>
+            <if test="databasetype!= null">
+                dataBaseType,
+            </if>
+            <if test="modules!= null">
+                modules,
+            </if>
+            <if test="dataSourceCode!= null">
+                data_source_code,
+            </if>
+            <if test="configJson!= null">
+                config_json,
+            </if>
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="subJson!= null">
+                sub_json,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="code != null">
+                #{code,jdbcType=VARCHAR},
+            </if>
+            <if test="tableName != null">
+                #{tableName,jdbcType=VARCHAR},
+            </if>
+            <if test="tablecolumns != null">
+                #{tablecolumns,jdbcType=VARCHAR},
+            </if>
+            <if test="databasetype != null">
+                #{databasetype,jdbcType=VARCHAR},
+            </if>
+            <if test="modules != null">
+                #{modules,jdbcType=VARCHAR},
+            </if>
+            <if test="dataSourceCode != null">
+                #{dataSourceCode,jdbcType=VARCHAR},
+            </if>
+            <if test="configJson != null">
+                #{configJson,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=VARCHAR},
+            </if>
+            <if test="subJson != null">
+                #{subJson,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.QueryConfig">
+        update sys_query_config
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="code != null">
+                code= #{code,jdbcType=VARCHAR},
+            </if>
+            <if test="tableName != null">
+                table_name= #{tableName,jdbcType=VARCHAR},
+            </if>
+            <if test="tablecolumns != null">
+                tableColumns= #{tablecolumns,jdbcType=VARCHAR},
+            </if>
+            <if test="databasetype != null">
+                dataBaseType= #{databasetype,jdbcType=VARCHAR},
+            </if>
+            <if test="modules != null">
+                modules= #{modules,jdbcType=VARCHAR},
+            </if>
+            <if test="dataSourceCode != null">
+                data_source_code= #{dataSourceCode,jdbcType=VARCHAR},
+            </if>
+            <if test="configJson != null">
+                config_json= #{configJson,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=VARCHAR},
+            </if>
+            <if test="subJson != null">
+                sub_json= #{subJson,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryQueryConfigByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.QueryConfig">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_query_config
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.code != null and !&quot;&quot;.equals(record.code)">
+                and code = #{record.code}
+            </if>
+            <if test="record.tableName != null and !&quot;&quot;.equals(record.tableName)">
+                and table_name = #{record.tableName}
+            </if>
+            <if test="record.tablecolumns != null and !&quot;&quot;.equals(record.tablecolumns)">
+                and tableColumns = #{record.tablecolumns}
+            </if>
+            <if test="record.databasetype != null and !&quot;&quot;.equals(record.databasetype)">
+                and dataBaseType = #{record.databasetype}
+            </if>
+            <if test="record.modules != null and !&quot;&quot;.equals(record.modules)">
+                and modules = #{record.modules}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR code LIKE concat('%',#{record.searchKey},'%')
+                    OR table_name LIKE concat('%',#{record.searchKey},'%')
+                    OR tableColumns LIKE concat('%',#{record.searchKey},'%')
+                    OR dataBaseType LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllQueryConfig" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.QueryConfig">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_query_config
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="code != null and !&quot;&quot;.equals(code)">
+                and code = #{code}
+            </if>
+            <if test="tableName != null and !&quot;&quot;.equals(tableName)">
+                and table_name = #{tableName}
+            </if>
+            <if test="tablecolumns != null and !&quot;&quot;.equals(tablecolumns)">
+                and tableColumns = #{tablecolumns}
+            </if>
+            <if test="databasetype != null and !&quot;&quot;.equals(databasetype)">
+                and dataBaseType = #{databasetype}
+            </if>
+            <if test="modules != null and !&quot;&quot;.equals(modules)">
+                and modules = #{modules}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR code LIKE concat('%',#{searchKey},'%')
+                    OR table_name LIKE concat('%',#{searchKey},'%')
+                    OR tableColumns LIKE concat('%',#{searchKey},'%')
+                    OR dataBaseType LIKE concat('%',#{searchKey},'%')
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryQueryConfig" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.QueryConfig">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_query_config
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="code != null and !&quot;&quot;.equals(code)">
+                and code = #{code}
+            </if>
+            <if test="tableName != null and !&quot;&quot;.equals(tableName)">
+                and table_name = #{tableName}
+            </if>
+            <if test="tablecolumns != null and !&quot;&quot;.equals(tablecolumns)">
+                and tableColumns = #{tablecolumns}
+            </if>
+            <if test="databasetype != null and !&quot;&quot;.equals(databasetype)">
+                and dataBaseType = #{databasetype}
+            </if>
+            <if test="modules != null and !&quot;&quot;.equals(modules)">
+                and modules = #{modules}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE sys_query_config SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.QueryConfig">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_query_config
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 36 - 0
src/main/java/com/izouma/awesomeadmin/dao/RechargeRecordMapper.java

@@ -0,0 +1,36 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.RechargeRecord;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.RechargeRecordMapper")
+public interface RechargeRecordMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(RechargeRecord record);
+
+    RechargeRecord selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(RechargeRecord record);
+
+    List<RechargeRecord> queryAllRechargeRecord(RechargeRecord record);
+
+    List<RechargeRecord> queryRechargeRecordByPage(Map<String, Object> parameter);
+
+    int delete(RechargeRecord record);
+
+    RechargeRecord queryRechargeRecord(RechargeRecord record);
+
+    List<RechargeRecord> query(RechargeRecord record);
+
+    List<RechargeRecord> queryActivityRechargeRecord(RechargeRecord record);
+}
+

+ 531 - 0
src/main/java/com/izouma/awesomeadmin/dao/RechargeRecordMapper.xml

@@ -0,0 +1,531 @@
+<?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.izouma.awesomeadmin.dao.RechargeRecordMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.RechargeRecord">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+        <result column="money" property="money" jdbcType="DECIMAL"/>
+        <result column="cash" property="cash" jdbcType="DECIMAL"/>
+        <result column="balance" property="balance" jdbcType="DECIMAL"/>
+        <result column="out_trade_no" property="outTradeNo" jdbcType="VARCHAR"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            user_id,
+
+            type_flag,
+
+            money,
+
+            cash,
+
+            balance,
+
+            out_trade_no,
+
+            remark,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from recharge_record
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from recharge_record
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.RechargeRecord" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into recharge_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="userId!= null">
+                user_id,
+            </if>
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="money!= null">
+                money,
+            </if>
+            <if test="cash!= null">
+                cash,
+            </if>
+            <if test="balance!= null">
+                balance,
+            </if>
+            <if test="outTradeNo!= null">
+                out_trade_no,
+            </if>
+            <if test="remark!= null">
+                remark,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="userId != null">
+                #{userId,jdbcType=INTEGER},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="money != null">
+                #{money,jdbcType=DECIMAL},
+            </if>
+            <if test="cash != null">
+                #{cash,jdbcType=DECIMAL},
+            </if>
+            <if test="balance != null">
+                #{balance,jdbcType=DECIMAL},
+            </if>
+            <if test="outTradeNo != null">
+                #{outTradeNo,jdbcType=VARCHAR},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.RechargeRecord">
+        update recharge_record
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="userId != null">
+                user_id= #{userId,jdbcType=INTEGER},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="money != null">
+                money= #{money,jdbcType=DECIMAL},
+            </if>
+            <if test="cash != null">
+                cash= #{cash,jdbcType=DECIMAL},
+            </if>
+            <if test="balance != null">
+                balance= #{balance,jdbcType=DECIMAL},
+            </if>
+            <if test="outTradeNo != null">
+                out_trade_no= #{outTradeNo,jdbcType=VARCHAR},
+            </if>
+            <if test="remark != null">
+                remark= #{remark,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="queryRechargeRecordByPage" parameterType="java.util.Map"
+            resultMap="allInfoRechargeRecordResult">
+        select
+        <include refid="Base_Column_List"/>
+        from recharge_record
+        <where>
+            and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and user_id = #{record.userId}
+            </if>
+            <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and type_flag = #{record.typeFlag}
+            </if>
+            <if test="record.money != null and !&quot;&quot;.equals(record.money)">
+                and money = #{record.money}
+            </if>
+            <if test="record.cash != null and !&quot;&quot;.equals(record.cash)">
+                and cash = #{record.cash}
+            </if>
+            <if test="record.balance != null and !&quot;&quot;.equals(record.balance)">
+                and balance = #{record.balance}
+            </if>
+            <if test="record.outTradeNo != null and !&quot;&quot;.equals(record.outTradeNo)">
+                and out_trade_no = #{record.outTradeNo}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and remark = #{record.remark}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR user_id LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR money LIKE concat('%',#{record.searchKey},'%')
+                    OR cash LIKE concat('%',#{record.searchKey},'%')
+                    OR balance LIKE concat('%',#{record.searchKey},'%')
+                    OR out_trade_no LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllRechargeRecord" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.RechargeRecord">
+        select
+        <include refid="Base_Column_List"/>
+        from recharge_record
+        <where>
+            and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="money != null and !&quot;&quot;.equals(money)">
+                and money = #{money}
+            </if>
+            <if test="cash != null and !&quot;&quot;.equals(cash)">
+                and cash = #{cash}
+            </if>
+            <if test="balance != null and !&quot;&quot;.equals(balance)">
+                and balance = #{balance}
+            </if>
+            <if test="outTradeNo != null and !&quot;&quot;.equals(outTradeNo)">
+                and out_trade_no = #{outTradeNo}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR user_id LIKE concat('%',#{searchKey},'%')
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                    OR money LIKE concat('%',#{searchKey},'%')
+                    OR cash LIKE concat('%',#{searchKey},'%')
+                    OR balance LIKE concat('%',#{searchKey},'%')
+                    OR out_trade_no LIKE concat('%',#{searchKey},'%')
+                    OR remark LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryRechargeRecord" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.RechargeRecord">
+        select
+        <include refid="Base_Column_List"/>
+        from recharge_record
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="money != null and !&quot;&quot;.equals(money)">
+                and money = #{money}
+            </if>
+            <if test="cash != null and !&quot;&quot;.equals(cash)">
+                and cash = #{cash}
+            </if>
+            <if test="balance != null and !&quot;&quot;.equals(balance)">
+                and balance = #{balance}
+            </if>
+            <if test="outTradeNo != null and !&quot;&quot;.equals(outTradeNo)">
+                and out_trade_no = #{outTradeNo}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE recharge_record SET del_flag = 'Y'
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.RechargeRecord">
+        select
+        <include refid="Base_Column_List"/>
+        from recharge_record
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+
+    <select id="queryActivityRechargeRecord" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.RechargeRecord">
+
+        SELECT
+        recharge_record.*
+        FROM
+        recharge_record,
+        (
+        SELECT
+        user_id,
+        min(id) AS id
+        FROM
+        recharge_record
+        where
+         del_flag = 'N'
+          <![CDATA[ AND  create_time >= #{beginTime} AND  create_time <= #{endTime} ]]>
+        GROUP BY
+        user_id
+        ) aaa
+        WHERE
+        recharge_record.id = aaa.id
+        ORDER BY
+        recharge_record.id
+
+    </select>
+
+    <resultMap id="allInfoRechargeRecordResult" type="com.izouma.awesomeadmin.model.RechargeRecord"
+               extends="BaseResultMap">
+
+
+        <association property="userInfo"
+                     javaType="com.izouma.awesomeadmin.model.UserInfo"
+                     select="com.izouma.awesomeadmin.dao.UserInfoMapper.querySingleUserInfo"
+                     column="{ id = user_id }"/>
+    </resultMap>
+
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/RecommenderLogMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.RecommenderLog;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.RecommenderLogMapper")
+public interface RecommenderLogMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(RecommenderLog record);
+
+    RecommenderLog selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(RecommenderLog record);
+
+    List<RecommenderLog> queryAllRecommenderLog(RecommenderLog record);
+
+    List<RecommenderLog> queryRecommenderLogByPage(Map<String, Object> parameter);
+
+    int delete(RecommenderLog record);
+
+    RecommenderLog queryRecommenderLog(RecommenderLog record);
+
+    List<RecommenderLog> query(RecommenderLog record);
+}
+

+ 390 - 0
src/main/java/com/izouma/awesomeadmin/dao/RecommenderLogMapper.xml

@@ -0,0 +1,390 @@
+<?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.izouma.awesomeadmin.dao.RecommenderLogMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.RecommenderLog" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
+                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
+                                <result column="user_id" property="userId" jdbcType="INTEGER" />
+                                <result column="telephone" property="telephone" jdbcType="VARCHAR" />
+                                <result column="remark" property="remark" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            user_id,
+
+            telephone,
+
+            remark,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from recommender_log
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from recommender_log
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.RecommenderLog" useGeneratedKeys="true" keyProperty="id">
+        insert into recommender_log
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="updateTime!= null" >
+                update_time,
+            </if>
+                <if test="updateUser!= null" >
+                update_user,
+            </if>
+                <if test="createTime!= null" >
+                create_time,
+            </if>
+                <if test="createUser!= null" >
+                create_user,
+            </if>
+                <if test="userId!= null" >
+                user_id,
+            </if>
+                <if test="telephone!= null" >
+                telephone,
+            </if>
+                <if test="remark!= null" >
+                remark,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="updateUser != null" >
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="createUser != null" >
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="userId != null" >
+                #{userId,jdbcType=INTEGER},
+            </if>
+                    <if test="telephone != null" >
+                #{telephone,jdbcType=VARCHAR},
+            </if>
+                    <if test="remark != null" >
+                #{remark,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.RecommenderLog" >
+        update recommender_log
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="updateTime != null" >
+               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="updateUser != null" >
+               update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="createTime != null" >
+               create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="createUser != null" >
+               create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="userId != null" >
+               user_id= #{userId,jdbcType=INTEGER},
+            </if>
+                     <if test="telephone != null" >
+               telephone= #{telephone,jdbcType=VARCHAR},
+            </if>
+                     <if test="remark != null" >
+               remark= #{remark,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="queryRecommenderLogByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.RecommenderLog">
+        select <include refid="Base_Column_List"/> from recommender_log
+        <where>
+            and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and  update_time = #{record.updateTime}
+            </if>
+                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and  update_user = #{record.updateUser}
+            </if>
+                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and  create_time = #{record.createTime}
+            </if>
+                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and  create_user = #{record.createUser}
+            </if>
+                     <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and  user_id = #{record.userId}
+            </if>
+                     <if test="record.telephone != null and !&quot;&quot;.equals(record.telephone)">
+                and  telephone = #{record.telephone}
+            </if>
+                     <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and  remark = #{record.remark}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  user_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  telephone LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  remark LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllRecommenderLog" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.RecommenderLog">
+        select <include refid="Base_Column_List"/> from recommender_log
+        <where>
+            and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and  update_time = #{updateTime}
+            </if>
+                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and  update_user = #{updateUser}
+            </if>
+                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and  create_time = #{createTime}
+            </if>
+                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and  create_user = #{createUser}
+            </if>
+                    <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and  user_id = #{userId}
+            </if>
+                    <if test="telephone != null and !&quot;&quot;.equals(telephone)">
+                and  telephone = #{telephone}
+            </if>
+                    <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and  remark = #{remark}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  user_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  telephone LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  remark LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryRecommenderLog" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.RecommenderLog">
+        select <include refid="Base_Column_List"/> from recommender_log
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+                     <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+                     <if test="telephone != null and !&quot;&quot;.equals(telephone)">
+                and telephone = #{telephone}
+            </if>
+                     <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE recommender_log SET del_flag = 'Y'
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.RecommenderLog">
+        select <include refid="Base_Column_List"/> from recommender_log
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/RefundApplicationMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.RefundApplication;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.RefundApplicationMapper")
+public interface RefundApplicationMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(RefundApplication record);
+
+    RefundApplication selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(RefundApplication record);
+
+    List<RefundApplication> queryAllRefundApplication(RefundApplication record);
+
+    List<RefundApplication> queryRefundApplicationByPage(Map<String, Object> parameter);
+
+    int delete(RefundApplication record);
+
+    RefundApplication queryRefundApplication(RefundApplication record);
+
+    List<RefundApplication> query(RefundApplication record);
+}
+

+ 681 - 0
src/main/java/com/izouma/awesomeadmin/dao/RefundApplicationMapper.xml

@@ -0,0 +1,681 @@
+<?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.izouma.awesomeadmin.dao.RefundApplicationMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.RefundApplication">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="refund_code" property="refundCode" jdbcType="VARCHAR"/>
+        <result column="apply_time" property="applyTime" jdbcType="TIMESTAMP"/>
+        <result column="status_flag" property="statusFlag" jdbcType="INTEGER"/>
+        <result column="order_id" property="orderId" jdbcType="INTEGER"/>
+        <result column="refund_money" property="refundMoney" jdbcType="DECIMAL"/>
+        <result column="work_remark" property="workRemark" jdbcType="VARCHAR"/>
+        <result column="refund_reason" property="refundReason" jdbcType="VARCHAR"/>
+        <result column="remark" property="remark" jdbcType="VARCHAR"/>
+        <result column="image_url" property="imageUrl" jdbcType="VARCHAR"/>
+        <result column="arbitration_flag" property="arbitrationFlag" jdbcType="CHAR"/>
+        <result column="refund_time" property="refundTime" jdbcType="TIMESTAMP"/>
+        <result column="arbitration_result" property="arbitrationResult" jdbcType="CHAR"/>
+        <result column="store_id" property="storeId" jdbcType="INTEGER"/>
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            refund_code,
+
+            apply_time,
+
+            status_flag,
+
+            order_id,
+
+            refund_money,
+
+            work_remark,
+
+            refund_reason,
+
+            remark,
+
+            image_url,
+
+            arbitration_flag,
+
+            refund_time,
+
+            arbitration_result,
+
+            store_id,
+
+            user_id,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="AllRefundApplicationResult" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from refund_application
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from refund_application
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.RefundApplication" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into refund_application
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="refundCode!= null">
+                refund_code,
+            </if>
+            <if test="applyTime!= null">
+                apply_time,
+            </if>
+            <if test="statusFlag!= null">
+                status_flag,
+            </if>
+            <if test="orderId!= null">
+                order_id,
+            </if>
+            <if test="refundMoney!= null">
+                refund_money,
+            </if>
+            <if test="workRemark!= null">
+                work_remark,
+            </if>
+            <if test="refundReason!= null">
+                refund_reason,
+            </if>
+            <if test="remark!= null">
+                remark,
+            </if>
+            <if test="imageUrl!= null">
+                image_url,
+            </if>
+            <if test="arbitrationFlag!= null">
+                arbitration_flag,
+            </if>
+            <if test="refundTime!= null">
+                refund_time,
+            </if>
+            <if test="arbitrationResult!= null">
+                arbitration_result,
+            </if>
+            <if test="storeId!= null">
+                store_id,
+            </if>
+            <if test="userId!= null">
+                user_id,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="refundCode != null">
+                #{refundCode,jdbcType=VARCHAR},
+            </if>
+            <if test="applyTime != null">
+                #{applyTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="statusFlag != null">
+                #{statusFlag,jdbcType=INTEGER},
+            </if>
+            <if test="orderId != null">
+                #{orderId,jdbcType=INTEGER},
+            </if>
+            <if test="refundMoney != null">
+                #{refundMoney,jdbcType=DECIMAL},
+            </if>
+            <if test="workRemark != null">
+                #{workRemark,jdbcType=VARCHAR},
+            </if>
+            <if test="refundReason != null">
+                #{refundReason,jdbcType=VARCHAR},
+            </if>
+            <if test="remark != null">
+                #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="imageUrl != null">
+                #{imageUrl,jdbcType=VARCHAR},
+            </if>
+            <if test="arbitrationFlag != null">
+                #{arbitrationFlag,jdbcType=CHAR},
+            </if>
+            <if test="refundTime != null">
+                #{refundTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="arbitrationResult != null">
+                #{arbitrationResult,jdbcType=CHAR},
+            </if>
+            <if test="storeId != null">
+                #{storeId,jdbcType=INTEGER},
+            </if>
+            <if test="userId != null">
+                #{userId,jdbcType=INTEGER},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.RefundApplication">
+        update refund_application
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="refundCode != null">
+                refund_code= #{refundCode,jdbcType=VARCHAR},
+            </if>
+            <if test="applyTime != null">
+                apply_time= #{applyTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="statusFlag != null">
+                status_flag= #{statusFlag,jdbcType=INTEGER},
+            </if>
+            <if test="orderId != null">
+                order_id= #{orderId,jdbcType=INTEGER},
+            </if>
+            <if test="refundMoney != null">
+                refund_money= #{refundMoney,jdbcType=DECIMAL},
+            </if>
+            <if test="workRemark != null">
+                work_remark= #{workRemark,jdbcType=VARCHAR},
+            </if>
+            <if test="refundReason != null">
+                refund_reason= #{refundReason,jdbcType=VARCHAR},
+            </if>
+            <if test="remark != null">
+                remark= #{remark,jdbcType=VARCHAR},
+            </if>
+            <if test="imageUrl != null">
+                image_url= #{imageUrl,jdbcType=VARCHAR},
+            </if>
+            <if test="arbitrationFlag != null">
+                arbitration_flag= #{arbitrationFlag,jdbcType=CHAR},
+            </if>
+            <if test="refundTime != null">
+                refund_time= #{refundTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="arbitrationResult != null">
+                arbitration_result= #{arbitrationResult,jdbcType=CHAR},
+            </if>
+            <if test="storeId != null">
+                store_id= #{storeId,jdbcType=INTEGER},
+            </if>
+            <if test="userId != null">
+                user_id= #{userId,jdbcType=INTEGER},
+            </if>
+        </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="queryRefundApplicationByPage" parameterType="java.util.Map"
+            resultMap="AllRefundApplicationResult">
+        select
+        <include refid="Base_Column_List"/>
+        from refund_application
+        <where>
+            and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.refundCode != null and !&quot;&quot;.equals(record.refundCode)">
+                and refund_code = #{record.refundCode}
+            </if>
+            <if test="record.applyTime != null and !&quot;&quot;.equals(record.applyTime)">
+                and apply_time = #{record.applyTime}
+            </if>
+            <if test="record.statusFlag != null and !&quot;&quot;.equals(record.statusFlag)">
+                and status_flag = #{record.statusFlag}
+            </if>
+            <if test="record.orderId != null and !&quot;&quot;.equals(record.orderId)">
+                and order_id = #{record.orderId}
+            </if>
+            <if test="record.refundMoney != null and !&quot;&quot;.equals(record.refundMoney)">
+                and refund_money = #{record.refundMoney}
+            </if>
+            <if test="record.workRemark != null and !&quot;&quot;.equals(record.workRemark)">
+                and work_remark = #{record.workRemark}
+            </if>
+            <if test="record.refundReason != null and !&quot;&quot;.equals(record.refundReason)">
+                and refund_reason = #{record.refundReason}
+            </if>
+            <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and remark = #{record.remark}
+            </if>
+            <if test="record.imageUrl != null and !&quot;&quot;.equals(record.imageUrl)">
+                and image_url = #{record.imageUrl}
+            </if>
+            <if test="record.arbitrationFlag != null and !&quot;&quot;.equals(record.arbitrationFlag)">
+                and arbitration_flag = #{record.arbitrationFlag}
+            </if>
+            <if test="record.refundTime != null and !&quot;&quot;.equals(record.refundTime)">
+                and refund_time = #{record.refundTime}
+            </if>
+            <if test="record.arbitrationResult != null and !&quot;&quot;.equals(record.arbitrationResult)">
+                and arbitration_result = #{record.arbitrationResult}
+            </if>
+            <if test="record.storeId != null and !&quot;&quot;.equals(record.storeId)">
+                and store_id = #{record.storeId}
+            </if>
+            <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and user_id = #{record.userId}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR refund_code LIKE concat('%',#{record.searchKey},'%')
+                    OR apply_time LIKE concat('%',#{record.searchKey},'%')
+                    OR status_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR order_id LIKE concat('%',#{record.searchKey},'%')
+                    OR refund_money LIKE concat('%',#{record.searchKey},'%')
+                    OR work_remark LIKE concat('%',#{record.searchKey},'%')
+                    OR refund_reason LIKE concat('%',#{record.searchKey},'%')
+                    OR remark LIKE concat('%',#{record.searchKey},'%')
+                    OR image_url LIKE concat('%',#{record.searchKey},'%')
+                    OR arbitration_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR refund_time LIKE concat('%',#{record.searchKey},'%')
+                    OR arbitration_result LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllRefundApplication" parameterType="java.util.Map"
+            resultMap="AllRefundApplicationResult">
+        select
+        <include refid="Base_Column_List"/>
+        from refund_application
+        <where>
+            and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="refundCode != null and !&quot;&quot;.equals(refundCode)">
+                and refund_code = #{refundCode}
+            </if>
+            <if test="applyTime != null and !&quot;&quot;.equals(applyTime)">
+                and apply_time = #{applyTime}
+            </if>
+            <if test="statusFlag != null and !&quot;&quot;.equals(statusFlag)">
+                and status_flag = #{statusFlag}
+            </if>
+            <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and order_id = #{orderId}
+            </if>
+            <if test="refundMoney != null and !&quot;&quot;.equals(refundMoney)">
+                and refund_money = #{refundMoney}
+            </if>
+            <if test="workRemark != null and !&quot;&quot;.equals(workRemark)">
+                and work_remark = #{workRemark}
+            </if>
+            <if test="refundReason != null and !&quot;&quot;.equals(refundReason)">
+                and refund_reason = #{refundReason}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="imageUrl != null and !&quot;&quot;.equals(imageUrl)">
+                and image_url = #{imageUrl}
+            </if>
+            <if test="arbitrationFlag != null and !&quot;&quot;.equals(arbitrationFlag)">
+                and arbitration_flag = #{arbitrationFlag}
+            </if>
+            <if test="refundTime != null and !&quot;&quot;.equals(refundTime)">
+                and refund_time = #{refundTime}
+            </if>
+            <if test="arbitrationResult != null and !&quot;&quot;.equals(arbitrationResult)">
+                and arbitration_result = #{arbitrationResult}
+            </if>
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR refund_code LIKE concat('%',#{searchKey},'%')
+                    OR apply_time LIKE concat('%',#{searchKey},'%')
+                    OR status_flag LIKE concat('%',#{searchKey},'%')
+                    OR order_id LIKE concat('%',#{searchKey},'%')
+                    OR refund_money LIKE concat('%',#{searchKey},'%')
+                    OR work_remark LIKE concat('%',#{searchKey},'%')
+                    OR refund_reason LIKE concat('%',#{searchKey},'%')
+                    OR remark LIKE concat('%',#{searchKey},'%')
+                    OR image_url LIKE concat('%',#{searchKey},'%')
+                    OR arbitration_flag LIKE concat('%',#{searchKey},'%')
+                    OR refund_time LIKE concat('%',#{searchKey},'%')
+                    OR arbitration_result LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryRefundApplication" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.RefundApplication">
+        select
+        <include refid="Base_Column_List"/>
+        from refund_application
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="refundCode != null and !&quot;&quot;.equals(refundCode)">
+                and refund_code = #{refundCode}
+            </if>
+            <if test="applyTime != null and !&quot;&quot;.equals(applyTime)">
+                and apply_time = #{applyTime}
+            </if>
+            <if test="statusFlag != null and !&quot;&quot;.equals(statusFlag)">
+                and status_flag = #{statusFlag}
+            </if>
+            <if test="orderId != null and !&quot;&quot;.equals(orderId)">
+                and order_id = #{orderId}
+            </if>
+            <if test="refundMoney != null and !&quot;&quot;.equals(refundMoney)">
+                and refund_money = #{refundMoney}
+            </if>
+            <if test="workRemark != null and !&quot;&quot;.equals(workRemark)">
+                and work_remark = #{workRemark}
+            </if>
+            <if test="refundReason != null and !&quot;&quot;.equals(refundReason)">
+                and refund_reason = #{refundReason}
+            </if>
+            <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+            <if test="imageUrl != null and !&quot;&quot;.equals(imageUrl)">
+                and image_url = #{imageUrl}
+            </if>
+            <if test="arbitrationFlag != null and !&quot;&quot;.equals(arbitrationFlag)">
+                and arbitration_flag = #{arbitrationFlag}
+            </if>
+            <if test="refundTime != null and !&quot;&quot;.equals(refundTime)">
+                and refund_time = #{refundTime}
+            </if>
+            <if test="arbitrationResult != null and !&quot;&quot;.equals(arbitrationResult)">
+                and arbitration_result = #{arbitrationResult}
+            </if>
+
+            <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE refund_application SET del_flag = 'Y'
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.RefundApplication">
+        select
+        <include refid="Base_Column_List"/>
+        from refund_application
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+
+
+    <resultMap id="AllRefundApplicationResult" type="com.izouma.awesomeadmin.model.RefundApplication"
+               extends="BaseResultMap">
+
+
+        <association property="userOrder"
+                     javaType="com.izouma.awesomeadmin.model.UserOrder"
+                     select="com.izouma.awesomeadmin.dao.UserOrderMapper.querySingleUserOrder"
+                     column="{ id = order_id }"/>
+
+        <association property="storeInfo"
+                     javaType="com.izouma.awesomeadmin.model.StoreInfo"
+                     select="com.izouma.awesomeadmin.dao.StoreInfoMapper.queryStoreInfo"
+                     column="{ id = store_id }"/>
+
+        <association property="userInfo"
+                     javaType="com.izouma.awesomeadmin.model.UserInfo"
+                     select="com.izouma.awesomeadmin.dao.UserInfoMapper.querySingleUserInfo"
+                     column="{ id = user_id }"/>
+
+        <collection property="refundMessageList"
+                    ofType="com.izouma.awesomeadmin.model.RefundMessage"
+                    select="com.izouma.awesomeadmin.dao.RefundMessageMapper.queryAllRefundMessage"
+                    column="{ refundId = id }"/>
+
+
+    </resultMap>
+
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/RefundMessageMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.RefundMessage;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.RefundMessageMapper")
+public interface RefundMessageMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(RefundMessage record);
+
+    RefundMessage selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(RefundMessage record);
+
+    List<RefundMessage> queryAllRefundMessage(RefundMessage record);
+
+    List<RefundMessage> queryRefundMessageByPage(Map<String, Object> parameter);
+
+    int delete(RefundMessage record);
+
+    RefundMessage queryRefundMessage(RefundMessage record);
+
+    List<RefundMessage> query(RefundMessage record);
+}
+

+ 436 - 0
src/main/java/com/izouma/awesomeadmin/dao/RefundMessageMapper.xml

@@ -0,0 +1,436 @@
+<?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.izouma.awesomeadmin.dao.RefundMessageMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.RefundMessage" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
+                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
+                                <result column="refund_id" property="refundId" jdbcType="INTEGER" />
+                                <result column="remark" property="remark" jdbcType="VARCHAR" />
+                                <result column="type_flag" property="typeFlag" jdbcType="INTEGER" />
+                                <result column="user_id" property="userId" jdbcType="INTEGER" />
+                                <result column="store_id" property="storeId" jdbcType="INTEGER" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            refund_id,
+
+            remark,
+
+            type_flag,
+
+            user_id,
+
+            store_id,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from refund_message
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from refund_message
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.RefundMessage" useGeneratedKeys="true" keyProperty="id">
+        insert into refund_message
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="updateTime!= null" >
+                update_time,
+            </if>
+                <if test="updateUser!= null" >
+                update_user,
+            </if>
+                <if test="createTime!= null" >
+                create_time,
+            </if>
+                <if test="createUser!= null" >
+                create_user,
+            </if>
+                <if test="refundId!= null" >
+                refund_id,
+            </if>
+                <if test="remark!= null" >
+                remark,
+            </if>
+                <if test="typeFlag!= null" >
+                type_flag,
+            </if>
+                <if test="userId!= null" >
+                user_id,
+            </if>
+                <if test="storeId!= null" >
+                store_id,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="updateUser != null" >
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="createUser != null" >
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="refundId != null" >
+                #{refundId,jdbcType=INTEGER},
+            </if>
+                    <if test="remark != null" >
+                #{remark,jdbcType=VARCHAR},
+            </if>
+                    <if test="typeFlag != null" >
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+                    <if test="userId != null" >
+                #{userId,jdbcType=INTEGER},
+            </if>
+                    <if test="storeId != null" >
+                #{storeId,jdbcType=INTEGER},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.RefundMessage" >
+        update refund_message
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="updateTime != null" >
+               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="updateUser != null" >
+               update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="createTime != null" >
+               create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="createUser != null" >
+               create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="refundId != null" >
+               refund_id= #{refundId,jdbcType=INTEGER},
+            </if>
+                     <if test="remark != null" >
+               remark= #{remark,jdbcType=VARCHAR},
+            </if>
+                     <if test="typeFlag != null" >
+               type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+                     <if test="userId != null" >
+               user_id= #{userId,jdbcType=INTEGER},
+            </if>
+                     <if test="storeId != null" >
+               store_id= #{storeId,jdbcType=INTEGER},
+            </if>
+                 </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="queryRefundMessageByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.RefundMessage">
+        select <include refid="Base_Column_List"/> from refund_message
+        <where>
+            and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and  update_time = #{record.updateTime}
+            </if>
+                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and  update_user = #{record.updateUser}
+            </if>
+                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and  create_time = #{record.createTime}
+            </if>
+                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and  create_user = #{record.createUser}
+            </if>
+                     <if test="record.refundId != null and !&quot;&quot;.equals(record.refundId)">
+                and  refund_id = #{record.refundId}
+            </if>
+                     <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and  remark = #{record.remark}
+            </if>
+                     <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and  type_flag = #{record.typeFlag}
+            </if>
+                     <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and  user_id = #{record.userId}
+            </if>
+                     <if test="record.storeId != null and !&quot;&quot;.equals(record.storeId)">
+                and  store_id = #{record.storeId}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  refund_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  remark LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  type_flag LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  user_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  store_id LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllRefundMessage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.RefundMessage">
+        select <include refid="Base_Column_List"/> from refund_message
+        <where>
+            and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and  update_time = #{updateTime}
+            </if>
+                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and  update_user = #{updateUser}
+            </if>
+                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and  create_time = #{createTime}
+            </if>
+                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and  create_user = #{createUser}
+            </if>
+                    <if test="refundId != null and !&quot;&quot;.equals(refundId)">
+                and  refund_id = #{refundId}
+            </if>
+                    <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and  remark = #{remark}
+            </if>
+                    <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and  type_flag = #{typeFlag}
+            </if>
+                    <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and  user_id = #{userId}
+            </if>
+                    <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and  store_id = #{storeId}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  refund_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  remark LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  type_flag LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  user_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  store_id LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryRefundMessage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.RefundMessage">
+        select <include refid="Base_Column_List"/> from refund_message
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+                     <if test="refundId != null and !&quot;&quot;.equals(refundId)">
+                and refund_id = #{refundId}
+            </if>
+                     <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+                     <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+                     <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+                     <if test="storeId != null and !&quot;&quot;.equals(storeId)">
+                and store_id = #{storeId}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE refund_message SET del_flag = 'Y'
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.RefundMessage">
+        select <include refid="Base_Column_List"/> from refund_message
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 26 - 0
src/main/java/com/izouma/awesomeadmin/dao/RongYunTokenMapper.java

@@ -0,0 +1,26 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.RongYunToken;
+
+public interface RongYunTokenMapper {
+
+    int deleteByPrimaryKey(Long id);
+
+
+    int insert(RongYunToken record);
+
+
+    int insertSelective(RongYunToken record);
+
+
+    RongYunToken selectByPrimaryKey(Long id);
+
+
+    int updateByPrimaryKeySelective(RongYunToken record);
+
+
+    int updateByPrimaryKey(RongYunToken record);
+
+
+    RongYunToken getRongToken(String rongKey);
+}

+ 95 - 0
src/main/java/com/izouma/awesomeadmin/dao/RongYunTokenMapper.xml

@@ -0,0 +1,95 @@
+<?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.izouma.awesomeadmin.dao.RongYunTokenMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.RongYunToken">
+        <id column="id" property="id" jdbcType="BIGINT"/>
+        <result column="user_id" property="userId" jdbcType="VARCHAR"/>
+        <result column="token" property="token" jdbcType="VARCHAR"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+      id, user_id, token, type_flag
+    </sql>
+
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_rong_yun_token
+        where id = #{id,jdbcType=BIGINT}
+    </select>
+
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+        delete from sys_rong_yun_token
+        where id = #{id,jdbcType=BIGINT}
+    </delete>
+
+    <insert id="insert" parameterType="com.izouma.awesomeadmin.model.RongYunToken" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_rong_yun_token (id, user_id, token)
+        values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{token,jdbcType=VARCHAR})
+    </insert>
+
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.RongYunToken" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_rong_yun_token
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                id,
+            </if>
+            <if test="userId != null">
+                user_id,
+            </if>
+            <if test="token != null">
+                token,
+            </if>
+            <if test="typeFlag != null">
+                type_flag,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=BIGINT},
+            </if>
+            <if test="userId != null">
+                #{userId,jdbcType=BIGINT},
+            </if>
+            <if test="token != null">
+                #{token,jdbcType=VARCHAR},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+        </trim>
+    </insert>
+
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.RongYunToken">
+        update sys_rong_yun_token
+        <set>
+            <if test="userId != null">
+                user_id = #{userId,jdbcType=BIGINT},
+            </if>
+            <if test="token != null">
+                token = #{token,jdbcType=VARCHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=BIGINT}
+    </update>
+
+    <update id="updateByPrimaryKey" parameterType="com.izouma.awesomeadmin.model.RongYunToken">
+        update sys_rong_yun_token
+        set user_id = #{userId,jdbcType=BIGINT},
+            token = #{token,jdbcType=VARCHAR}
+        where id = #{id,jdbcType=BIGINT}
+    </update>
+
+    <select id="getRongToken" resultType="com.izouma.awesomeadmin.model.RongYunToken" parameterType="string">
+		SELECT
+		*
+		FROM sys_rong_yun_token
+		WHERE user_id = #{rongKey}
+		order by id desc
+		LIMIT 1
+	</select>
+
+</mapper>

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/StoreCollectionMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.StoreCollection;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.StoreCollectionMapper")
+public interface StoreCollectionMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(StoreCollection record);
+
+    StoreCollection selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(StoreCollection record);
+
+    List<StoreCollection> queryAllStoreCollection(StoreCollection record);
+
+    List<StoreCollection> queryStoreCollectionByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    StoreCollection queryStoreCollection(StoreCollection record);
+
+    List<StoreCollection> query(StoreCollection record);
+}
+

+ 382 - 0
src/main/java/com/izouma/awesomeadmin/dao/StoreCollectionMapper.xml

@@ -0,0 +1,382 @@
+<?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.izouma.awesomeadmin.dao.StoreCollectionMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.StoreCollection" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
+                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
+                                <result column="type_flag" property="typeFlag" jdbcType="INTEGER" />
+                                <result column="user_id" property="userId" jdbcType="VARCHAR" />
+                                <result column="target_id" property="targetId" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            type_flag,
+
+            user_id,
+
+            target_id,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from store_collection
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from store_collection
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.StoreCollection" useGeneratedKeys="true" keyProperty="id">
+        insert into store_collection
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="updateTime!= null" >
+                update_time,
+            </if>
+                <if test="updateUser!= null" >
+                update_user,
+            </if>
+                <if test="createTime!= null" >
+                create_time,
+            </if>
+                <if test="createUser!= null" >
+                create_user,
+            </if>
+                <if test="typeFlag!= null" >
+                type_flag,
+            </if>
+                <if test="userId!= null" >
+                user_id,
+            </if>
+                <if test="targetId!= null" >
+                target_id,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="updateUser != null" >
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="createUser != null" >
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="typeFlag != null" >
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+                    <if test="userId != null" >
+                #{userId,jdbcType=VARCHAR},
+            </if>
+                    <if test="targetId != null" >
+                #{targetId,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.StoreCollection" >
+        update store_collection
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="updateTime != null" >
+               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="updateUser != null" >
+               update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="createTime != null" >
+               create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="createUser != null" >
+               create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="typeFlag != null" >
+               type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+                     <if test="userId != null" >
+               user_id= #{userId,jdbcType=VARCHAR},
+            </if>
+                     <if test="targetId != null" >
+               target_id= #{targetId,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryStoreCollectionByPage" parameterType="java.util.Map" resultMap="AllInfoForList">
+        select <include refid="Base_Column_List"/> from store_collection
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and  update_time = #{record.updateTime}
+            </if>
+                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and  update_user = #{record.updateUser}
+            </if>
+                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and  create_time = #{record.createTime}
+            </if>
+                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and  create_user = #{record.createUser}
+            </if>
+                     <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and  type_flag = #{record.typeFlag}
+            </if>
+                     <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and  user_id = #{record.userId}
+            </if>
+                     <if test="record.targetId != null and !&quot;&quot;.equals(record.targetId)">
+                and  target_id = #{record.targetId}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  type_flag LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  user_id LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  target_id LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllStoreCollection" parameterType="java.util.Map" resultMap="AllInfoForList">
+        select <include refid="Base_Column_List"/> from store_collection
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and  update_time = #{updateTime}
+            </if>
+                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and  update_user = #{updateUser}
+            </if>
+                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and  create_time = #{createTime}
+            </if>
+                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and  create_user = #{createUser}
+            </if>
+                    <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and  type_flag = #{typeFlag}
+            </if>
+                    <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and  user_id = #{userId}
+            </if>
+                    <if test="targetId != null and !&quot;&quot;.equals(targetId)">
+                and  target_id = #{targetId}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  type_flag LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  user_id LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  target_id LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryStoreCollection" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.StoreCollection">
+        select <include refid="Base_Column_List"/> from store_collection
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+                     <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+                     <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+                     <if test="targetId != null and !&quot;&quot;.equals(targetId)">
+                and target_id = #{targetId}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE store_collection SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.StoreCollection">
+        select <include refid="Base_Column_List"/> from store_collection
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+
+    <resultMap id="AllInfoForList" type="com.izouma.awesomeadmin.model.StoreCollection" extends="BaseResultMap">
+
+
+        <association property="storeInfo"
+                     javaType="com.izouma.awesomeadmin.model.StoreInfo"
+                     select="com.izouma.awesomeadmin.dao.StoreInfoMapper.queryStoreInfo"
+                     column="{ id = target_id }"/>
+
+    </resultMap>
+
+</mapper>
+

+ 46 - 0
src/main/java/com/izouma/awesomeadmin/dao/StoreInfoMapper.java

@@ -0,0 +1,46 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.StoreInfo;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.StoreInfoMapper")
+public interface StoreInfoMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(StoreInfo record);
+
+    StoreInfo selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(StoreInfo record);
+
+    List<StoreInfo> queryAllStoreInfo(StoreInfo record);
+
+    List<StoreInfo> queryAllStoreInfoForHome(StoreInfo record);
+
+    List<StoreInfo> queryStoreInfoByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    StoreInfo queryStoreInfo(StoreInfo record);
+
+    List<StoreInfo> query(StoreInfo record);
+
+    int updateUseFlagByUserId(Map<String, Object> parameter);
+
+    StoreInfo queryStoreInfoReworkRate(String id);
+
+    StoreInfo sameOrLast(Map<String, Object> parameter);
+
+    List<StoreInfo> queryAllStoreInfoForHomeShoreInfo(StoreInfo record);
+
+    List<StoreInfo> queryAllStoreInfoForHomeShoreAndProduct(StoreInfo record);
+}
+

+ 1500 - 0
src/main/java/com/izouma/awesomeadmin/dao/StoreInfoMapper.xml

@@ -0,0 +1,1500 @@
+<?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.izouma.awesomeadmin.dao.StoreInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.StoreInfo">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="user_id" property="userId" jdbcType="INTEGER"/>
+        <result column="user_name" property="userName" jdbcType="VARCHAR"/>
+        <result column="store_name" property="storeName" jdbcType="VARCHAR"/>
+        <result column="service_type" property="serviceType" jdbcType="VARCHAR"/>
+        <result column="description" property="description" jdbcType="VARCHAR"/>
+        <result column="icon" property="icon" jdbcType="VARCHAR"/>
+        <result column="province" property="province" jdbcType="VARCHAR"/>
+        <result column="citye" property="citye" jdbcType="VARCHAR"/>
+        <result column="district" property="district" jdbcType="VARCHAR"/>
+        <result column="address_detail" property="addressDetail" jdbcType="VARCHAR"/>
+        <result column="bank_card" property="bankCard" jdbcType="VARCHAR"/>
+        <result column="bank_name" property="bankName" jdbcType="VARCHAR"/>
+        <result column="open_name" property="openName" jdbcType="VARCHAR"/>
+        <result column="credit" property="credit" jdbcType="VARCHAR"/>
+        <result column="use_flag" property="useFlag" jdbcType="CHAR"/>
+        <result column="rank" property="rank" jdbcType="INTEGER"/>
+        <result column="response_time" property="responseTime" jdbcType="INTEGER"/>
+        <result column="rework_rate" property="reworkRate" jdbcType="INTEGER"/>
+        <result column="hot_flag" property="hotFlag" jdbcType="INTEGER"/>
+        <result column="home_flag" property="homeFlag" jdbcType="INTEGER"/>
+        <result column="type_flag" property="typeFlag" jdbcType="INTEGER"/>
+        <result column="subclass" property="subclass" jdbcType="VARCHAR"/>
+        <result column="storelabel" property="storelabel" jdbcType="VARCHAR"/>
+        <result column="memory_space" property="memorySpace" jdbcType="DECIMAL"/>
+        <result column="alibaba" property="alibaba" jdbcType="VARCHAR"/>
+        <result column="qq" property="qq" jdbcType="VARCHAR"/>
+        <result column="alibaba_nick" property="alibabaNick" jdbcType="VARCHAR"/>
+        <result column="qq_nick" property="qqNick" jdbcType="VARCHAR"/>
+        <result column="signing" property="signing" jdbcType="CHAR"/>
+        <result column="album_price" property="albumPrice" jdbcType="INTEGER"/>
+        <result column="rate_flag" property="rateFlag" jdbcType="CHAR"/>
+        <result column="order_rate" property="orderRate" jdbcType="INTEGER"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            user_id,
+
+            user_name,
+
+            store_name,
+
+            service_type,
+
+            description,
+
+            icon,
+
+            province,
+
+            citye,
+
+            district,
+
+            address_detail,
+
+            bank_card,
+
+            bank_name,
+
+            open_name,
+
+            credit,
+
+            use_flag,
+
+            rank,
+
+            response_time,
+
+            rework_rate,
+
+            hot_flag,
+
+            home_flag,
+
+            type_flag,
+
+            subclass,
+
+            storelabel,
+
+            memory_space,
+
+            alibaba,
+
+            qq,
+
+            alibaba_nick,
+
+            qq_nick,
+            signing,
+            album_price,
+            rate_flag,
+            order_rate,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from store_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from store_info
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.StoreInfo" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into store_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="userId!= null">
+                user_id,
+            </if>
+            <if test="userName!= null">
+                user_name,
+            </if>
+            <if test="storeName!= null">
+                store_name,
+            </if>
+            <if test="serviceType!= null">
+                service_type,
+            </if>
+            <if test="description!= null">
+                description,
+            </if>
+            <if test="icon!= null">
+                icon,
+            </if>
+            <if test="province!= null">
+                province,
+            </if>
+            <if test="citye!= null">
+                citye,
+            </if>
+            <if test="district!= null">
+                district,
+            </if>
+            <if test="addressDetail!= null">
+                address_detail,
+            </if>
+            <if test="bankCard!= null">
+                bank_card,
+            </if>
+            <if test="bankName!= null">
+                bank_name,
+            </if>
+            <if test="openName!= null">
+                open_name,
+            </if>
+            <if test="credit!= null">
+                credit,
+            </if>
+            <if test="useFlag!= null">
+                use_flag,
+            </if>
+            <if test="rank!= null">
+                rank,
+            </if>
+            <if test="responseTime!= null">
+                response_time,
+            </if>
+            <if test="reworkRate!= null">
+                rework_rate,
+            </if>
+            <if test="hotFlag!= null">
+                hot_flag,
+            </if>
+            <if test="homeFlag!= null">
+                home_flag,
+            </if>
+            <if test="typeFlag!= null">
+                type_flag,
+            </if>
+            <if test="subclass!= null">
+                subclass,
+            </if>
+            <if test="storelabel!= null">
+                storelabel,
+            </if>
+            <if test="memorySpace!= null">
+                memory_space,
+            </if>
+            <if test="alibaba!= null">
+                alibaba,
+            </if>
+            <if test="qq!= null">
+                qq,
+            </if>
+            <if test="alibabaNick!= null">
+                alibaba_nick,
+            </if>
+            <if test="qqNick!= null">
+                qq_nick,
+            </if>
+            <if test="signing!= null">
+                signing,
+            </if>
+            <if test="albumPrice!= null">
+                album_price,
+            </if>
+            <if test="rateFlag!= null">
+                rate_flag,
+            </if>
+            <if test="orderRate!= null">
+                order_rate,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="userId != null">
+                #{userId,jdbcType=INTEGER},
+            </if>
+            <if test="userName != null">
+                #{userName,jdbcType=VARCHAR},
+            </if>
+            <if test="storeName != null">
+                #{storeName,jdbcType=VARCHAR},
+            </if>
+            <if test="serviceType != null">
+                #{serviceType,jdbcType=VARCHAR},
+            </if>
+            <if test="description != null">
+                #{description,jdbcType=VARCHAR},
+            </if>
+            <if test="icon != null">
+                #{icon,jdbcType=VARCHAR},
+            </if>
+            <if test="province != null">
+                #{province,jdbcType=VARCHAR},
+            </if>
+            <if test="citye != null">
+                #{citye,jdbcType=VARCHAR},
+            </if>
+            <if test="district != null">
+                #{district,jdbcType=VARCHAR},
+            </if>
+            <if test="addressDetail != null">
+                #{addressDetail,jdbcType=VARCHAR},
+            </if>
+            <if test="bankCard != null">
+                #{bankCard,jdbcType=VARCHAR},
+            </if>
+            <if test="bankName != null">
+                #{bankName,jdbcType=VARCHAR},
+            </if>
+            <if test="openName != null">
+                #{openName,jdbcType=VARCHAR},
+            </if>
+            <if test="credit != null">
+                #{credit,jdbcType=VARCHAR},
+            </if>
+            <if test="useFlag != null">
+                #{useFlag,jdbcType=CHAR},
+            </if>
+            <if test="rank != null">
+                #{rank,jdbcType=INTEGER},
+            </if>
+            <if test="responseTime != null">
+                #{responseTime,jdbcType=INTEGER},
+            </if>
+            <if test="reworkRate != null">
+                #{reworkRate,jdbcType=INTEGER},
+            </if>
+            <if test="hotFlag != null">
+                #{hotFlag,jdbcType=INTEGER},
+            </if>
+            <if test="homeFlag != null">
+                #{homeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="typeFlag != null">
+                #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="subclass != null">
+                #{subclass,jdbcType=VARCHAR},
+            </if>
+            <if test="storelabel != null">
+                #{storelabel,jdbcType=VARCHAR},
+            </if>
+            <if test="memorySpace != null">
+                #{memorySpace,jdbcType=DECIMAL},
+            </if>
+            <if test="alibaba != null">
+                #{alibaba,jdbcType=VARCHAR},
+            </if>
+            <if test="qq != null">
+                #{qq,jdbcType=VARCHAR},
+            </if>
+            <if test="alibabaNick != null">
+                #{alibabaNick,jdbcType=VARCHAR},
+            </if>
+            <if test="qqNick != null">
+                #{qqNick,jdbcType=VARCHAR},
+            </if>
+            <if test="signing != null">
+                #{signing,jdbcType=CHAR},
+            </if>
+            <if test="albumPrice != null">
+                #{albumPrice},
+            </if>
+            <if test="rateFlag != null">
+                #{rateFlag},
+            </if>
+            <if test="orderRate != null">
+                #{orderRate},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.StoreInfo">
+        update store_info
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="userId != null">
+                user_id= #{userId,jdbcType=INTEGER},
+            </if>
+            <if test="userName != null">
+                user_name= #{userName,jdbcType=VARCHAR},
+            </if>
+            <if test="storeName != null">
+                store_name= #{storeName,jdbcType=VARCHAR},
+            </if>
+            <if test="serviceType != null">
+                service_type= #{serviceType,jdbcType=VARCHAR},
+            </if>
+            <if test="description != null">
+                description= #{description,jdbcType=VARCHAR},
+            </if>
+            <if test="icon != null">
+                icon= #{icon,jdbcType=VARCHAR},
+            </if>
+            <if test="province != null">
+                province= #{province,jdbcType=VARCHAR},
+            </if>
+            <if test="citye != null">
+                citye= #{citye,jdbcType=VARCHAR},
+            </if>
+            <if test="district != null">
+                district= #{district,jdbcType=VARCHAR},
+            </if>
+            <if test="addressDetail != null">
+                address_detail= #{addressDetail,jdbcType=VARCHAR},
+            </if>
+            <if test="bankCard != null">
+                bank_card= #{bankCard,jdbcType=VARCHAR},
+            </if>
+            <if test="bankName != null">
+                bank_name= #{bankName,jdbcType=VARCHAR},
+            </if>
+            <if test="openName != null">
+                open_name= #{openName,jdbcType=VARCHAR},
+            </if>
+            <if test="credit != null">
+                credit= #{credit,jdbcType=VARCHAR},
+            </if>
+            <if test="useFlag != null">
+                use_flag= #{useFlag,jdbcType=CHAR},
+            </if>
+            <if test="rank != null">
+                rank= #{rank,jdbcType=INTEGER},
+            </if>
+            <if test="responseTime != null">
+                response_time= #{responseTime,jdbcType=INTEGER},
+            </if>
+            <if test="reworkRate != null">
+                rework_rate= #{reworkRate,jdbcType=INTEGER},
+            </if>
+            <if test="hotFlag != null">
+                hot_flag= #{hotFlag,jdbcType=INTEGER},
+            </if>
+            <if test="homeFlag != null">
+                home_flag= #{homeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag,jdbcType=INTEGER},
+            </if>
+            <if test="subclass != null">
+                subclass= #{subclass,jdbcType=VARCHAR},
+            </if>
+            <if test="storelabel != null">
+                storelabel= #{storelabel,jdbcType=VARCHAR},
+            </if>
+            <if test="memorySpace != null">
+                memory_space= #{memorySpace,jdbcType=VARCHAR},
+            </if>
+            <if test="alibaba != null">
+                alibaba = #{alibaba,jdbcType=VARCHAR},
+            </if>
+            <if test="qq != null">
+                qq= #{qq,jdbcType=VARCHAR},
+            </if>
+            <if test="alibabaNick != null">
+                alibaba_nick = #{alibabaNick,jdbcType=VARCHAR},
+            </if>
+            <if test="qqNick != null">
+                qq_nick = #{qqNick,jdbcType=VARCHAR},
+            </if>
+            <if test="signing != null">
+                signing = #{signing,jdbcType=CHAR},
+            </if>
+            <if test="albumPrice != null">
+                album_price = #{albumPrice},
+            </if>
+            <if test="rateFlag != null">
+                rate_flag = #{rateFlag,jdbcType=CHAR},
+            </if>
+            <if test="orderRate != null">
+                order_rate = #{orderRate},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+
+    <sql id="salesSql">
+
+        ,(SELECT SUM(user_order.quantity) FROM user_order WHERE user_order.del_flag='N' AND user_order.store_id = store_info.id) as  total_sales,
+            (SELECT SUM(user_order.quantity) FROM user_order WHERE user_order.del_flag='N' AND user_order.store_id = store_info.id AND DATE_FORMAT( user_order.create_time, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' ) ) as  month_sales
+    </sql>
+    <sql id="companyFlagSql">
+, (
+		SELECT
+			sys_user.company_flag
+		FROM
+			sys_user
+		WHERE
+			sys_user.del_flag = 'N'
+		AND sys_user.id = store_info.user_id
+	) AS company_flag
+
+    </sql>
+    <sql id="DSRSql">
+
+         ,
+        (SELECT
+        AVG(
+        product_comment.star_level + product_comment.service_level + product_comment.reply_level
+        ) / 3
+        FROM
+        `product_comment`
+        WHERE
+        product_comment.del_flag = 'N'
+        AND product_comment.store_id = store_info.id ) as  dsr
+        ,
+        (
+        SELECT
+        SUM(product_info.sales_volume)
+        FROM
+        product_info
+        WHERE
+        product_info.del_flag = 'N'
+        AND product_info.store_id = store_info.id
+        ) as  sales_volume
+        ,
+        (
+        SELECT
+        AVG(product_info.price)
+        FROM
+        product_info
+        WHERE
+        product_info.del_flag = 'N'
+        AND product_info.store_id = store_info.id
+        ) as  price
+    </sql>
+
+    <select id="queryStoreInfoByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.StoreInfo">
+        select
+        <include refid="Base_Column_List"/>
+        <if test="record.salesFlag != null and !&quot;&quot;.equals(record.salesFlag)">
+            <include refid="salesSql"/>
+        </if>
+
+        <include refid="DSRSql"/>
+
+        <include refid="companyFlagSql"/>
+
+
+        from store_info
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.userId != null and !&quot;&quot;.equals(record.userId)">
+                and user_id = #{record.userId}
+            </if>
+            <if test="record.userName != null and !&quot;&quot;.equals(record.userName)">
+                and user_name = #{record.userName}
+            </if>
+            <if test="record.storeName != null and !&quot;&quot;.equals(record.storeName)">
+                and store_name = #{record.storeName}
+            </if>
+            <if test="record.serviceType != null and !&quot;&quot;.equals(record.serviceType)">
+                and service_type = #{record.serviceType}
+            </if>
+            <if test="record.description != null and !&quot;&quot;.equals(record.description)">
+                and description = #{record.description}
+            </if>
+            <if test="record.icon != null and !&quot;&quot;.equals(record.icon)">
+                and icon = #{record.icon}
+            </if>
+            <if test="record.province != null and !&quot;&quot;.equals(record.province)">
+                and province = #{record.province}
+            </if>
+            <if test="record.citye != null and !&quot;&quot;.equals(record.citye)">
+                and citye = #{record.citye}
+            </if>
+            <if test="record.district != null and !&quot;&quot;.equals(record.district)">
+                and district = #{record.district}
+            </if>
+            <if test="record.addressDetail != null and !&quot;&quot;.equals(record.addressDetail)">
+                and address_detail = #{record.addressDetail}
+            </if>
+            <if test="record.bankCard != null and !&quot;&quot;.equals(record.bankCard)">
+                and bank_card = #{record.bankCard}
+            </if>
+            <if test="record.bankName != null and !&quot;&quot;.equals(record.bankName)">
+                and bank_name = #{record.bankName}
+            </if>
+            <if test="record.openName != null and !&quot;&quot;.equals(record.openName)">
+                and open_name = #{record.openName}
+            </if>
+            <if test="record.credit != null and !&quot;&quot;.equals(record.credit)">
+                and credit = #{record.credit}
+            </if>
+            <if test="record.useFlag != null and !&quot;&quot;.equals(record.useFlag)">
+                and use_flag = #{record.useFlag}
+            </if>
+            <if test="record.rank != null and !&quot;&quot;.equals(record.rank)">
+                and rank = #{record.rank}
+            </if>
+            <if test="record.responseTime != null and !&quot;&quot;.equals(record.responseTime)">
+                and response_time = #{record.responseTime}
+            </if>
+            <if test="record.reworkRate != null and !&quot;&quot;.equals(record.reworkRate)">
+                and rework_rate = #{record.reworkRate}
+            </if>
+            <if test="record.hotFlag != null and !&quot;&quot;.equals(record.hotFlag)">
+                and hot_flag = #{record.hotFlag}
+            </if>
+            <if test="record.homeFlag != null and !&quot;&quot;.equals(record.homeFlag)">
+                and home_flag = #{record.homeFlag}
+            </if>
+            <if test="record.typeFlag != null and !&quot;&quot;.equals(record.typeFlag)">
+                and type_flag = #{record.typeFlag}
+            </if>
+            <if test="record.signing != null and !&quot;&quot;.equals(record.signing)">
+                and signing = #{record.signing}
+            </if>
+            <if test="record.rateFlag != null and !&quot;&quot;.equals(record.rateFlag)">
+                and rate_flag = #{record.rateFlag}
+            </if>
+            <if test="record.subclass != null and !&quot;&quot;.equals(record.subclass)">
+                and subclass = #{record.subclass}
+            </if>
+            <if test="record.companyFlag != null and !&quot;&quot;.equals(record.companyFlag)">
+                and user_id in (
+                SELECT
+                id
+                FROM
+                sys_user
+                WHERE
+                sys_user.del_flag = 'N'
+                AND sys_user.company_flag = #{record.companyFlag}
+                )
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR user_id LIKE concat('%',#{record.searchKey},'%')
+                    OR user_name LIKE concat('%',#{record.searchKey},'%')
+                    OR store_name LIKE concat('%',#{record.searchKey},'%')
+                    OR service_type LIKE concat('%',#{record.searchKey},'%')
+                    OR description LIKE concat('%',#{record.searchKey},'%')
+                    OR province LIKE concat('%',#{record.searchKey},'%')
+                    OR citye LIKE concat('%',#{record.searchKey},'%')
+                    OR district LIKE concat('%',#{record.searchKey},'%')
+                    OR address_detail LIKE concat('%',#{record.searchKey},'%')
+                    OR bank_card LIKE concat('%',#{record.searchKey},'%')
+                    OR bank_name LIKE concat('%',#{record.searchKey},'%')
+                    OR open_name LIKE concat('%',#{record.searchKey},'%')
+                    OR credit LIKE concat('%',#{record.searchKey},'%')
+                    OR use_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR rank LIKE concat('%',#{record.searchKey},'%')
+                    OR response_time LIKE concat('%',#{record.searchKey},'%')
+                    OR rework_rate LIKE concat('%',#{record.searchKey},'%')
+                    OR hot_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR home_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR type_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR subclass LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        rank desc , id desc
+    </select>
+    <select id="queryAllStoreInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.StoreInfo">
+        select
+        <include refid="Base_Column_List"/>
+        <if test="salesFlag != null and !&quot;&quot;.equals(salesFlag)">
+            <include refid="salesSql"/>
+        </if>
+        from store_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="userName != null and !&quot;&quot;.equals(userName)">
+                and user_name = #{userName}
+            </if>
+            <if test="storeName != null and !&quot;&quot;.equals(storeName)">
+                and store_name = #{storeName}
+            </if>
+            <if test="serviceType != null and !&quot;&quot;.equals(serviceType)">
+                and service_type = #{serviceType}
+            </if>
+            <if test="description != null and !&quot;&quot;.equals(description)">
+                and description = #{description}
+            </if>
+            <if test="icon != null and !&quot;&quot;.equals(icon)">
+                and icon = #{icon}
+            </if>
+            <if test="province != null and !&quot;&quot;.equals(province)">
+                and province = #{province}
+            </if>
+            <if test="citye != null and !&quot;&quot;.equals(citye)">
+                and citye = #{citye}
+            </if>
+            <if test="district != null and !&quot;&quot;.equals(district)">
+                and district = #{district}
+            </if>
+            <if test="addressDetail != null and !&quot;&quot;.equals(addressDetail)">
+                and address_detail = #{addressDetail}
+            </if>
+            <if test="bankCard != null and !&quot;&quot;.equals(bankCard)">
+                and bank_card = #{bankCard}
+            </if>
+            <if test="bankName != null and !&quot;&quot;.equals(bankName)">
+                and bank_name = #{bankName}
+            </if>
+            <if test="openName != null and !&quot;&quot;.equals(openName)">
+                and open_name = #{openName}
+            </if>
+            <if test="credit != null and !&quot;&quot;.equals(credit)">
+                and credit = #{credit}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and rank = #{rank}
+            </if>
+            <if test="responseTime != null and !&quot;&quot;.equals(responseTime)">
+                and response_time = #{responseTime}
+            </if>
+            <if test="reworkRate != null and !&quot;&quot;.equals(reworkRate)">
+                and rework_rate = #{reworkRate}
+            </if>
+            <if test="hotFlag != null and !&quot;&quot;.equals(hotFlag)">
+                and hot_flag = #{hotFlag}
+            </if>
+            <if test="homeFlag != null and !&quot;&quot;.equals(homeFlag)">
+                and home_flag = #{homeFlag}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="signing != null and !&quot;&quot;.equals(signing)">
+                and signing = #{signing}
+            </if>
+
+            <if test="rateFlag != null and !&quot;&quot;.equals(rateFlag)">
+                and rate_flag = #{rateFlag}
+            </if>
+
+            <if test="subclass != null and !&quot;&quot;.equals(subclass)">
+                and subclass = #{subclass}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR user_id LIKE concat('%',#{searchKey},'%')
+                    OR user_name LIKE concat('%',#{searchKey},'%')
+                    OR store_name LIKE concat('%',#{searchKey},'%')
+                    OR service_type LIKE concat('%',#{searchKey},'%')
+                    OR description LIKE concat('%',#{searchKey},'%')
+                    OR province LIKE concat('%',#{searchKey},'%')
+                    OR citye LIKE concat('%',#{searchKey},'%')
+                    OR district LIKE concat('%',#{searchKey},'%')
+                    OR address_detail LIKE concat('%',#{searchKey},'%')
+                    OR bank_card LIKE concat('%',#{searchKey},'%')
+                    OR bank_name LIKE concat('%',#{searchKey},'%')
+                    OR open_name LIKE concat('%',#{searchKey},'%')
+                    OR credit LIKE concat('%',#{searchKey},'%')
+                    OR use_flag LIKE concat('%',#{searchKey},'%')
+                    OR rank LIKE concat('%',#{searchKey},'%')
+                    OR response_time LIKE concat('%',#{searchKey},'%')
+                    OR rework_rate LIKE concat('%',#{searchKey},'%')
+                    OR hot_flag LIKE concat('%',#{searchKey},'%')
+                    OR home_flag LIKE concat('%',#{searchKey},'%')
+                    OR type_flag LIKE concat('%',#{searchKey},'%')
+                    OR subclass LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        rank desc , id desc
+        <if test="limitNum != null and !&quot;&quot;.equals(limitNum)">
+            LIMIT #{limitNum}
+        </if>
+    </select>
+    <select id="queryAllStoreInfoForHome" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.StoreInfo">
+        select
+        <include refid="Base_Column_List"/>
+        <if test="salesFlag != null and !&quot;&quot;.equals(salesFlag)">
+            <include refid="salesSql"/>
+        </if>
+
+        <include refid="companyFlagSql"/>
+
+        from store_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="userName != null and !&quot;&quot;.equals(userName)">
+                and user_name = #{userName}
+            </if>
+            <if test="storeName != null and !&quot;&quot;.equals(storeName)">
+                and store_name = #{storeName}
+            </if>
+            <if test="serviceType != null and !&quot;&quot;.equals(serviceType)">
+                and service_type = #{serviceType}
+            </if>
+            <if test="description != null and !&quot;&quot;.equals(description)">
+                and description = #{description}
+            </if>
+            <if test="icon != null and !&quot;&quot;.equals(icon)">
+                and icon = #{icon}
+            </if>
+            <if test="province != null and !&quot;&quot;.equals(province)">
+                and province = #{province}
+            </if>
+            <if test="citye != null and !&quot;&quot;.equals(citye)">
+                and citye = #{citye}
+            </if>
+            <if test="district != null and !&quot;&quot;.equals(district)">
+                and district = #{district}
+            </if>
+            <if test="addressDetail != null and !&quot;&quot;.equals(addressDetail)">
+                and address_detail = #{addressDetail}
+            </if>
+            <if test="bankCard != null and !&quot;&quot;.equals(bankCard)">
+                and bank_card = #{bankCard}
+            </if>
+            <if test="bankName != null and !&quot;&quot;.equals(bankName)">
+                and bank_name = #{bankName}
+            </if>
+            <if test="openName != null and !&quot;&quot;.equals(openName)">
+                and open_name = #{openName}
+            </if>
+            <if test="credit != null and !&quot;&quot;.equals(credit)">
+                and credit = #{credit}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and rank = #{rank}
+            </if>
+            <if test="responseTime != null and !&quot;&quot;.equals(responseTime)">
+                and response_time = #{responseTime}
+            </if>
+            <if test="reworkRate != null and !&quot;&quot;.equals(reworkRate)">
+                and rework_rate = #{reworkRate}
+            </if>
+            <if test="hotFlag != null and !&quot;&quot;.equals(hotFlag)">
+                and hot_flag = #{hotFlag}
+            </if>
+            <if test="homeFlag != null and !&quot;&quot;.equals(homeFlag)">
+                and home_flag = #{homeFlag}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="signing != null and !&quot;&quot;.equals(signing)">
+                and signing = #{signing}
+            </if>
+            <if test="rateFlag != null and !&quot;&quot;.equals(rateFlag)">
+                and rate_flag = #{rateFlag}
+            </if>
+            <if test="subclass != null and !&quot;&quot;.equals(subclass)">
+                and subclass = #{subclass}
+            </if>
+        </where>
+        order by
+        rank desc , id desc
+        <if test="limitNum != null and !&quot;&quot;.equals(limitNum)">
+            LIMIT #{limitNum}
+        </if>
+    </select>
+    <select id="queryAllStoreInfoForHomeShoreInfo" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.StoreInfo">
+        select
+        <include refid="Base_Column_List"/>
+        <if test="salesFlag != null and !&quot;&quot;.equals(salesFlag)">
+            <include refid="salesSql"/>
+        </if>
+        <include refid="companyFlagSql"/>
+        from store_info
+        <where>
+            and del_flag = 'N'
+            and  home_flag = 1
+            and use_flag = 'Y'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="userName != null and !&quot;&quot;.equals(userName)">
+                and user_name = #{userName}
+            </if>
+            <if test="storeName != null and !&quot;&quot;.equals(storeName)">
+                and store_name = #{storeName}
+            </if>
+            <if test="serviceType != null and !&quot;&quot;.equals(serviceType)">
+                and service_type = #{serviceType}
+            </if>
+            <if test="description != null and !&quot;&quot;.equals(description)">
+                and description = #{description}
+            </if>
+            <if test="icon != null and !&quot;&quot;.equals(icon)">
+                and icon = #{icon}
+            </if>
+            <if test="province != null and !&quot;&quot;.equals(province)">
+                and province = #{province}
+            </if>
+            <if test="citye != null and !&quot;&quot;.equals(citye)">
+                and citye = #{citye}
+            </if>
+            <if test="district != null and !&quot;&quot;.equals(district)">
+                and district = #{district}
+            </if>
+            <if test="addressDetail != null and !&quot;&quot;.equals(addressDetail)">
+                and address_detail = #{addressDetail}
+            </if>
+            <if test="bankCard != null and !&quot;&quot;.equals(bankCard)">
+                and bank_card = #{bankCard}
+            </if>
+            <if test="bankName != null and !&quot;&quot;.equals(bankName)">
+                and bank_name = #{bankName}
+            </if>
+            <if test="openName != null and !&quot;&quot;.equals(openName)">
+                and open_name = #{openName}
+            </if>
+            <if test="credit != null and !&quot;&quot;.equals(credit)">
+                and credit = #{credit}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and rank = #{rank}
+            </if>
+            <if test="responseTime != null and !&quot;&quot;.equals(responseTime)">
+                and response_time = #{responseTime}
+            </if>
+            <if test="reworkRate != null and !&quot;&quot;.equals(reworkRate)">
+                and rework_rate = #{reworkRate}
+            </if>
+            <if test="hotFlag != null and !&quot;&quot;.equals(hotFlag)">
+                and hot_flag = #{hotFlag}
+            </if>
+            <if test="homeFlag != null and !&quot;&quot;.equals(homeFlag)">
+                and home_flag = #{homeFlag}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="signing != null and !&quot;&quot;.equals(signing)">
+                and signing = #{signing}
+            </if>
+            <if test="rateFlag != null and !&quot;&quot;.equals(rateFlag)">
+                and rate_flag = #{rateFlag}
+            </if>
+            <if test="subclass != null and !&quot;&quot;.equals(subclass)">
+                and subclass = #{subclass}
+            </if>
+        </where>
+        order by
+        signing desc , rank desc , id desc
+        <if test="limitNum != null and !&quot;&quot;.equals(limitNum)">
+            LIMIT #{limitNum}
+        </if>
+    </select>
+    <select id="queryAllStoreInfoForHomeShoreAndProduct" parameterType="java.util.Map"
+            resultMap="HomeShoreAndProduct">
+        select
+        <include refid="Base_Column_List"/>
+        <if test="salesFlag != null and !&quot;&quot;.equals(salesFlag)">
+            <include refid="salesSql"/>
+        </if>
+        <include refid="companyFlagSql"/>
+        from store_info
+        <where>
+            and del_flag = 'N'
+            and  home_flag = 1
+            and use_flag = 'Y'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="userName != null and !&quot;&quot;.equals(userName)">
+                and user_name = #{userName}
+            </if>
+            <if test="storeName != null and !&quot;&quot;.equals(storeName)">
+                and store_name = #{storeName}
+            </if>
+            <if test="serviceType != null and !&quot;&quot;.equals(serviceType)">
+                and service_type = #{serviceType}
+            </if>
+            <if test="description != null and !&quot;&quot;.equals(description)">
+                and description = #{description}
+            </if>
+            <if test="icon != null and !&quot;&quot;.equals(icon)">
+                and icon = #{icon}
+            </if>
+            <if test="province != null and !&quot;&quot;.equals(province)">
+                and province = #{province}
+            </if>
+            <if test="citye != null and !&quot;&quot;.equals(citye)">
+                and citye = #{citye}
+            </if>
+            <if test="district != null and !&quot;&quot;.equals(district)">
+                and district = #{district}
+            </if>
+            <if test="addressDetail != null and !&quot;&quot;.equals(addressDetail)">
+                and address_detail = #{addressDetail}
+            </if>
+            <if test="bankCard != null and !&quot;&quot;.equals(bankCard)">
+                and bank_card = #{bankCard}
+            </if>
+            <if test="bankName != null and !&quot;&quot;.equals(bankName)">
+                and bank_name = #{bankName}
+            </if>
+            <if test="openName != null and !&quot;&quot;.equals(openName)">
+                and open_name = #{openName}
+            </if>
+            <if test="credit != null and !&quot;&quot;.equals(credit)">
+                and credit = #{credit}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and rank = #{rank}
+            </if>
+            <if test="responseTime != null and !&quot;&quot;.equals(responseTime)">
+                and response_time = #{responseTime}
+            </if>
+            <if test="reworkRate != null and !&quot;&quot;.equals(reworkRate)">
+                and rework_rate = #{reworkRate}
+            </if>
+            <if test="hotFlag != null and !&quot;&quot;.equals(hotFlag)">
+                and hot_flag = #{hotFlag}
+            </if>
+            <if test="homeFlag != null and !&quot;&quot;.equals(homeFlag)">
+                and home_flag = #{homeFlag}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="signing != null and !&quot;&quot;.equals(signing)">
+                and signing = #{signing}
+            </if>
+            <if test="rateFlag != null and !&quot;&quot;.equals(rateFlag)">
+                and rate_flag = #{rateFlag}
+            </if>
+            <if test="subclass != null and !&quot;&quot;.equals(subclass)">
+                and subclass = #{subclass}
+            </if>
+        </where>
+        order by
+        signing desc , rank desc , id desc
+        <if test="limitNum != null and !&quot;&quot;.equals(limitNum)">
+            LIMIT #{limitNum}
+        </if>
+    </select>
+    <select id="queryStoreInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.StoreInfo">
+        select
+        <include refid="Base_Column_List"/>
+        <if test="salesFlag != null and !&quot;&quot;.equals(salesFlag)">
+            <include refid="salesSql"/>
+        </if>
+        <include refid="companyFlagSql"/>
+        from store_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="userId != null and !&quot;&quot;.equals(userId)">
+                and user_id = #{userId}
+            </if>
+            <if test="userName != null and !&quot;&quot;.equals(userName)">
+                and user_name = #{userName}
+            </if>
+            <if test="storeName != null and !&quot;&quot;.equals(storeName)">
+                and store_name = #{storeName}
+            </if>
+            <if test="serviceType != null and !&quot;&quot;.equals(serviceType)">
+                and service_type = #{serviceType}
+            </if>
+            <if test="description != null and !&quot;&quot;.equals(description)">
+                and description = #{description}
+            </if>
+            <if test="icon != null and !&quot;&quot;.equals(icon)">
+                and icon = #{icon}
+            </if>
+            <if test="province != null and !&quot;&quot;.equals(province)">
+                and province = #{province}
+            </if>
+            <if test="citye != null and !&quot;&quot;.equals(citye)">
+                and citye = #{citye}
+            </if>
+            <if test="district != null and !&quot;&quot;.equals(district)">
+                and district = #{district}
+            </if>
+            <if test="addressDetail != null and !&quot;&quot;.equals(addressDetail)">
+                and address_detail = #{addressDetail}
+            </if>
+            <if test="bankCard != null and !&quot;&quot;.equals(bankCard)">
+                and bank_card = #{bankCard}
+            </if>
+            <if test="bankName != null and !&quot;&quot;.equals(bankName)">
+                and bank_name = #{bankName}
+            </if>
+            <if test="openName != null and !&quot;&quot;.equals(openName)">
+                and open_name = #{openName}
+            </if>
+            <if test="credit != null and !&quot;&quot;.equals(credit)">
+                and credit = #{credit}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="rank != null and !&quot;&quot;.equals(rank)">
+                and rank = #{rank}
+            </if>
+            <if test="responseTime != null and !&quot;&quot;.equals(responseTime)">
+                and response_time = #{responseTime}
+            </if>
+            <if test="reworkRate != null and !&quot;&quot;.equals(reworkRate)">
+                and rework_rate = #{reworkRate}
+            </if>
+            <if test="hotFlag != null and !&quot;&quot;.equals(hotFlag)">
+                and hot_flag = #{hotFlag}
+            </if>
+            <if test="homeFlag != null and !&quot;&quot;.equals(homeFlag)">
+                and home_flag = #{homeFlag}
+            </if>
+            <if test="typeFlag != null and !&quot;&quot;.equals(typeFlag)">
+                and type_flag = #{typeFlag}
+            </if>
+            <if test="subclass != null and !&quot;&quot;.equals(subclass)">
+                and subclass = #{subclass}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE store_info SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <update id="updateUseFlagByUserId">
+        UPDATE store_info
+        <set>
+            <if test="useFlag != null">
+                use_flag= #{useFlag},
+            </if>
+            <if test="typeFlag != null">
+                type_flag= #{typeFlag},
+            </if>
+            <if test="memorySpace != null">
+                memory_space= #{memorySpace},
+            </if>
+        </set>
+        <where>
+            AND del_flag = 'N'
+            AND user_id = #{userId}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.StoreInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from store_info
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+
+    <select id="sameOrLast" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.StoreInfo">
+        SELECT
+            (
+                SELECT
+                    COUNT(1)
+                FROM
+                    sys_user
+                WHERE
+                    del_flag = 'N'
+                AND DATE_FORMAT(create_time, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')
+            ) AS user_same_month,
+            (
+                SELECT
+                    COUNT(1)
+                FROM
+                    sys_user
+                WHERE
+                    del_flag = 'N'
+                AND PERIOD_DIFF(
+                    date_format(now(), '%Y%m'),
+                    date_format(create_time, '%Y%m')
+                ) = 1
+            ) AS user_last_month,
+            (
+                SELECT
+                    COUNT(1)
+                FROM
+                    store_info
+                WHERE
+                    del_flag = 'N'
+                AND DATE_FORMAT(create_time, '%Y%m') = DATE_FORMAT(CURDATE(), '%Y%m')
+            ) AS store_same_month,
+            (
+                SELECT
+                    COUNT(1)
+                FROM
+                    store_info
+                WHERE
+                    del_flag = 'N'
+                AND PERIOD_DIFF(
+                    date_format(now(), '%Y%m'),
+                    date_format(create_time, '%Y%m')
+                ) = 1
+            ) AS store_last_month;
+    </select>
+
+    <select id="queryStoreInfoReworkRate" resultType="com.izouma.awesomeadmin.model.StoreInfo"
+            parameterType="java.util.Map">
+        SELECT
+        ROUND(
+	AVG(
+		(
+			(
+				SELECT
+					COUNT(1)
+				FROM
+					order_repair_detail
+				WHERE
+					repair_id = (
+						SELECT
+							id
+						FROM
+							`order_repair`
+						WHERE
+							del_flag = 'N'
+						AND order_id = user_order.id
+						AND type_flag = 0
+						LIMIT 1
+					)
+			) * 0.5 + (
+				SELECT
+					COUNT(1)
+				FROM
+					order_repair_detail
+				WHERE
+					repair_id = (
+						SELECT
+							id
+						FROM
+							`order_repair`
+						WHERE
+							del_flag = 'N'
+						AND order_id = user_order.id
+						AND type_flag = 1
+						LIMIT 1
+					)
+			) * 1 + (
+				SELECT
+					COUNT(1)
+				FROM
+					order_repair_detail
+				WHERE
+					repair_id = (
+						SELECT
+							id
+						FROM
+							`order_repair`
+						WHERE
+							del_flag = 'N'
+						AND order_id = user_order.id
+						AND type_flag = 2
+						LIMIT 1
+					)
+			) * 2
+		) / quantity
+	)*100) AS rework_rate
+FROM
+	`user_order`
+WHERE
+	del_flag = 'N'
+AND store_id = #{id}
+    </select>
+
+
+    <resultMap id="HomeShoreAndProduct" type="com.izouma.awesomeadmin.model.StoreInfo" extends="BaseResultMap">
+
+
+        <collection property="productInfoList"
+                     ofType="com.izouma.awesomeadmin.model.ProductInfo"
+                     select="com.izouma.awesomeadmin.dao.ProductInfoMapper.queryAllProductInfoForHome"
+                     column="{ storeId = id }"/>
+
+    </resultMap>
+
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/StoreLabelMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.StoreLabel;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.StoreLabelMapper")
+public interface StoreLabelMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(StoreLabel record);
+
+    StoreLabel selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(StoreLabel record);
+
+    List<StoreLabel> queryAllStoreLabel(StoreLabel record);
+
+    List<StoreLabel> queryStoreLabelByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    StoreLabel queryStoreLabel(StoreLabel record);
+
+    List<StoreLabel> query(StoreLabel record);
+}
+

+ 348 - 0
src/main/java/com/izouma/awesomeadmin/dao/StoreLabelMapper.xml

@@ -0,0 +1,348 @@
+<?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.izouma.awesomeadmin.dao.StoreLabelMapper" >
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.StoreLabel" >
+                <id column="id" property="id" jdbcType="INTEGER" />
+                                        <result column="del_flag" property="delFlag" jdbcType="CHAR" />
+                                <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
+                                <result column="update_user" property="updateUser" jdbcType="VARCHAR" />
+                                <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
+                                <result column="create_user" property="createUser" jdbcType="VARCHAR" />
+                                <result column="label_name" property="labelName" jdbcType="VARCHAR" />
+                                <result column="remark" property="remark" jdbcType="VARCHAR" />
+            </resultMap>
+    <sql id="Base_Column_List" >
+        <trim  suffixOverrides="," >
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            label_name,
+
+            remark,
+
+            </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+        select
+        <include refid="Base_Column_List" />
+        from store_label
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+        delete from store_label
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.StoreLabel" useGeneratedKeys="true" keyProperty="id">
+        insert into store_label
+        <trim prefix="(" suffix=")" suffixOverrides="," >
+                <if test="id!= null" >
+                id,
+            </if>
+                <if test="delFlag!= null" >
+                del_flag,
+            </if>
+                <if test="updateTime!= null" >
+                update_time,
+            </if>
+                <if test="updateUser!= null" >
+                update_user,
+            </if>
+                <if test="createTime!= null" >
+                create_time,
+            </if>
+                <if test="createUser!= null" >
+                create_user,
+            </if>
+                <if test="labelName!= null" >
+                label_name,
+            </if>
+                <if test="remark!= null" >
+                remark,
+            </if>
+            </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides="," >
+                    <if test="id != null" >
+                #{id,jdbcType=INTEGER},
+            </if>
+                    <if test="delFlag != null" >
+                #{delFlag,jdbcType=CHAR},
+            </if>
+                    <if test="updateTime != null" >
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="updateUser != null" >
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="createTime != null" >
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                    <if test="createUser != null" >
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+                    <if test="labelName != null" >
+                #{labelName,jdbcType=VARCHAR},
+            </if>
+                    <if test="remark != null" >
+                #{remark,jdbcType=VARCHAR},
+            </if>
+                </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.StoreLabel" >
+        update store_label
+        <set >
+                    <if test="id != null" >
+               id= #{id,jdbcType=INTEGER},
+            </if>
+                     <if test="delFlag != null" >
+               del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+                     <if test="updateTime != null" >
+               update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="updateUser != null" >
+               update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="createTime != null" >
+               create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+                     <if test="createUser != null" >
+               create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+                     <if test="labelName != null" >
+               label_name= #{labelName,jdbcType=VARCHAR},
+            </if>
+                     <if test="remark != null" >
+               remark= #{remark,jdbcType=VARCHAR},
+            </if>
+                 </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryStoreLabelByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.StoreLabel">
+        select <include refid="Base_Column_List"/> from store_label
+        <where>
+            and del_flag = 'N'
+                    <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and  id = #{record.id}
+            </if>
+                     <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and  del_flag = #{record.delFlag}
+            </if>
+                     <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and  update_time = #{record.updateTime}
+            </if>
+                     <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and  update_user = #{record.updateUser}
+            </if>
+                     <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and  create_time = #{record.createTime}
+            </if>
+                     <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and  create_user = #{record.createUser}
+            </if>
+                     <if test="record.labelName != null and !&quot;&quot;.equals(record.labelName)">
+                and  label_name = #{record.labelName}
+            </if>
+                     <if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+                and  remark = #{record.remark}
+            </if>
+                  <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+             <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                    OR  label_name LIKE concat('%',#{record.searchKey},'%')
+                                                                                                    OR  remark LIKE concat('%',#{record.searchKey},'%')
+                                                             </trim>
+         </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllStoreLabel" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.StoreLabel">
+        select <include refid="Base_Column_List"/> from store_label
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and  id = #{id}
+            </if>
+                    <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and  del_flag = #{delFlag}
+            </if>
+                    <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and  update_time = #{updateTime}
+            </if>
+                    <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and  update_user = #{updateUser}
+            </if>
+                    <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and  create_time = #{createTime}
+            </if>
+                    <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and  create_user = #{createUser}
+            </if>
+                    <if test="labelName != null and !&quot;&quot;.equals(labelName)">
+                and  label_name = #{labelName}
+            </if>
+                    <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and  remark = #{remark}
+            </if>
+                    <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR" >
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                OR  label_name LIKE concat('%',#{searchKey},'%')
+                                                                                                                                                        OR  remark LIKE concat('%',#{searchKey},'%')
+                                                                                        </trim>
+            </if>
+<if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+    <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+        <choose>
+            <when test="item.indexOf('like') != -1">
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        concat('%',#{itemDetail},'%')
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </when>
+            <otherwise>
+                <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                    <if test="detailIndex == 3">
+                        #{itemDetail}
+                    </if>
+
+                    <if test="detailIndex &lt; 3">
+                        ${itemDetail}
+                    </if>
+
+                </foreach>
+            </otherwise>
+        </choose>
+
+
+    </foreach>
+
+
+</if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="queryStoreLabel" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.StoreLabel">
+        select <include refid="Base_Column_List"/> from store_label
+        <where>
+            and del_flag = 'N'
+                    <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+                     <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+                     <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+                     <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+                     <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+                     <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+                     <if test="labelName != null and !&quot;&quot;.equals(labelName)">
+                and label_name = #{labelName}
+            </if>
+                     <if test="remark != null and !&quot;&quot;.equals(remark)">
+                and remark = #{remark}
+            </if>
+         
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE store_label SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.StoreLabel">
+        select <include refid="Base_Column_List"/> from store_label
+        <where>
+            and del_flag = 'N'
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 51 - 0
src/main/java/com/izouma/awesomeadmin/dao/SuperUserMapper.java

@@ -0,0 +1,51 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.stereotype.Repository;
+
+import com.izouma.awesomeadmin.model.SuperUser;
+
+@Repository("com.izouma.awesomeadmin.dao.SuperUserMapper")
+public interface SuperUserMapper {
+
+    /**
+     * 
+     * <p>获取用户列表。</p>
+     *
+     * @return TblUser list
+     */
+    List <SuperUser> queryAllUsers();
+
+
+    /**
+     * 
+     * <p>分页查询,需要以ByPage结尾。</p>
+     *
+     * @return
+     */
+    List <SuperUser> queryAllUsersByPage(Map <String, Object> parameter);
+
+
+    /**
+     * 
+     * <p>根据用户id获取单个用户。</p>
+     *
+     * @param id
+     * @return
+     */
+    SuperUser queryUserById(String userId);
+
+
+    int save(SuperUser superUser);
+
+
+    int updateUserInfo(Map <String, Object> parameter);
+
+
+    int delete(String userId);
+
+
+    SuperUser userLogin(Map <String, Object> parameter);
+}

+ 88 - 0
src/main/java/com/izouma/awesomeadmin/dao/SuperUserMapper.xml

@@ -0,0 +1,88 @@
+<?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.izouma.awesomeadmin.dao.SuperUserMapper">
+    <sql id="columns">
+        user_id, power, password, user_name, profile, del_flag
+  	</sql>
+
+    <select id="queryUserById" resultType="com.izouma.awesomeadmin.model.SuperUser" parameterType="string">
+        SELECT
+        <include refid="columns"/>
+        FROM sys_super_user
+        WHERE user_id = #{userId}
+        LIMIT 1
+    </select>
+
+    <select id="userLogin" resultType="com.izouma.awesomeadmin.model.SuperUser" parameterType="map">
+        SELECT
+        <include refid="columns"/>
+        FROM sys_super_user
+        WHERE user_name = #{username}
+        and password = #{password}
+        LIMIT 1
+    </select>
+
+    <select id="queryAllUsers" resultType="com.izouma.awesomeadmin.model.SuperUser">
+        SELECT
+        <include refid="columns"/>
+        FROM sys_super_user
+        where del_flag = 'N'
+        order by user_id
+        <!-- 为了测试只取100个 -->
+        <!-- LIMIT 100  -->
+    </select>
+
+    <select id="queryAllUsersByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SuperUser">
+        select
+        <include refid="columns"/>
+        from sys_super_user
+        <where>
+            <!--  
+            <if test="userInfo.userId != null and !&quot;&quot;.equals(userInfo.userId)">
+                and user_id=#{userInfo.userId}
+            </if>
+            <if test="userInfo.username != null and !&quot;&quot;.equals(userInfo.username.trim())">
+                and user_name like '%' #{userInfo.username} '%'
+            </if>
+            -->
+        </where>
+        order by user_id
+    </select>
+
+    <insert id="save" parameterType="com.izouma.awesomeadmin.model.SuperUser" useGeneratedKeys="true" keyProperty="id">
+	    INSERT INTO sys_super_user (user_name, power, password, profile)
+        VALUES (#{username}, #{power}, #{password}, #{profile})
+    </insert>
+
+    <update id="updateUserInfo">
+        UPDATE sys_super_user
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userInfo.userId != null">
+                user_Id = #{userInfo.userId},
+            </if>
+            <if test="userInfo.username != null">
+                user_name = #{userInfo.username},
+            </if>
+            <if test="userInfo.password != null">
+                password = #{userInfo.password},
+            </if>
+            <if test="userInfo.profile != null">
+                profile = #{userInfo.profile},
+            </if>
+            <if test="userInfo.power != null">
+                power = #{userInfo.power},
+            </if>
+        </trim>
+        <where>
+            AND user_id = #{userId}
+        </where>
+    </update>
+
+    <update id="delete">
+        UPDATE sys_super_user SET del_flag = 'Y'
+        <where>
+            AND user_id = #{userId}
+        </where>
+    </update>
+</mapper>

+ 14 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysAppTokenMapper.java

@@ -0,0 +1,14 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.shiro.AppToken;
+import org.apache.ibatis.annotations.Param;
+
+public interface SysAppTokenMapper {
+    int saveToken(@Param("userId") Integer userId, @Param("token") String token);
+
+    AppToken getToken(String token);
+
+    int delToken(String token);
+
+    int delUserToken(Integer userId);
+}

+ 18 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysAppTokenMapper.xml

@@ -0,0 +1,18 @@
+<?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.izouma.awesomeadmin.dao.SysAppTokenMapper">
+    <insert id="saveToken">
+        insert into sys_app_token (user_id, token)
+        values (#{userId}, #{token})
+    </insert>
+    <delete id="delToken">
+        delete from sys_app_token where token = #{token}
+    </delete>
+    <delete id="delUserToken">
+        delete from sys_app_token where user_id = #{userId}
+    </delete>
+    <select id="getToken" resultType="com.izouma.awesomeadmin.shiro.AppToken">
+        select * from sys_app_token where token = #{token}
+    </select>
+
+</mapper>

+ 33 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysDataruleMapper.java

@@ -0,0 +1,33 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import com.izouma.awesomeadmin.model.SysDatarule;
+import org.springframework.stereotype.Repository;
+
+
+/**
+ * sys_datarule Dao接口
+ * Tue Apr 17 10:44:06 CST 2018  Suo Chen Cheng
+ */ 
+@Repository("com.izouma.awesomeadmin.dao.SysDataruleMapper")
+public interface SysDataruleMapper {
+
+	int deleteByPrimaryKey(Integer id);
+
+	int insertSelective(SysDatarule record);
+
+	SysDatarule selectByPrimaryKey(Integer id);
+
+	int updateByPrimaryKeySelective(SysDatarule record);
+
+	List <SysDatarule> queryAllSysDatarule(SysDatarule record);
+
+	List <SysDatarule> querySysDatarulesByPage(Map <String, Object> parameter);
+
+	int delete(String id);
+
+	SysDatarule querySysDatarule(SysDatarule record);
+}
+

+ 153 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysDataruleMapper.xml

@@ -0,0 +1,153 @@
+<?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.izouma.awesomeadmin.dao.SysDataruleMapper" >
+	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.SysDatarule" >
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="datarule_name" property="dataruleName" jdbcType="VARCHAR" />
+		<result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
+		<result column="del_flag" property="delFlag" jdbcType="CHAR" />
+		<result column="permission" property="permission" jdbcType="VARCHAR" />
+	</resultMap>
+	<sql id="Base_Column_List" >
+		 id, datarule_name, create_date, del_flag,permission
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_datarule
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+		delete from sys_datarule
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.SysDatarule" useGeneratedKeys="true" keyProperty="id">
+		insert into sys_datarule
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,	
+			</if>
+			<if test="dataruleName != null" >
+				datarule_name,	
+			</if>
+			<if test="createDate != null" >
+				create_date,	
+			</if>
+			<if test="delFlag != null" >
+				del_flag,	
+			</if>
+			<if test="permission != null" >
+				permission,
+			</if>
+
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=INTEGER},	
+			</if>
+			<if test="dataruleName != null" >
+				#{dataruleName,jdbcType=VARCHAR},	
+			</if>
+			<if test="createDate != null" >
+				#{createDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="delFlag != null" >
+				#{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="permission != null" >
+				#{permission,jdbcType=VARCHAR},
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.SysDatarule" >
+		update sys_datarule
+		<set >
+			<if test="dataruleName != null" >
+				datarule_name = #{dataruleName,jdbcType=VARCHAR},	
+			</if>
+			<if test="createDate != null" >
+				create_date = #{createDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="delFlag != null" >
+				del_flag = #{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="permission != null" >
+				permission = #{permission,jdbcType=VARCHAR},
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<select id="querySysDatarulesByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysDatarule">
+		select <include refid="Base_Column_List"/> from sys_datarule
+		<where>
+			and del_flag = 'N'
+			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
+				and id = #{record.id}	
+			</if>
+			<if test="record.dataruleName != null and !&quot;&quot;.equals(record.dataruleName)">
+				and datarule_name = #{record.dataruleName}	
+			</if>
+			<if test="record.createDate != null and !&quot;&quot;.equals(record.createDate)">
+				and create_date = #{record.createDate}	
+			</if>
+			<if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+				and del_flag = #{record.delFlag}	
+			</if>
+			<if test="record.permission != null and !&quot;&quot;.equals(record.permission)">
+				and permission = #{record.permission}
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryAllSysDatarule" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysDatarule">
+		select <include refid="Base_Column_List"/> from sys_datarule
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="dataruleName != null and !&quot;&quot;.equals(dataruleName)">
+				and datarule_name = #{dataruleName}	
+			</if>
+			<if test="createDate != null and !&quot;&quot;.equals(createDate)">
+				and create_date = #{createDate}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="querySysDatarule" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysDatarule">
+		select <include refid="Base_Column_List"/> from sys_datarule
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="dataruleName != null and !&quot;&quot;.equals(dataruleName)">
+				and datarule_name = #{dataruleName}	
+			</if>
+			<if test="createDate != null and !&quot;&quot;.equals(createDate)">
+				and create_date = #{createDate}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}
+			</if>
+		</where>
+		LIMIT 1
+	</select>
+	<update id="delete">
+		UPDATE sys_datarule SET del_flag = 'Y'
+		<where>
+			AND id = #{id}
+		</where>
+	</update>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysMenuMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.SysMenu;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * sys_menu Dao接口
+ * Tue Apr 10 18:09:44 CST 2018  Suo Chen Cheng
+ */ 
+@Repository("com.zoumaframe.dao.SysMenuMapper")
+public interface SysMenuMapper {
+
+	int deleteByPrimaryKey(Integer id);
+
+	int insertSelective(SysMenu record);
+
+	SysMenu selectByPrimaryKey(Integer id);
+
+	List<SysMenu> selectByPrimaryKeys(String ids);
+
+	int updateByPrimaryKeySelective(SysMenu record);
+
+	List<SysMenu> queryAllSysMenu(SysMenu record);
+
+	List<SysMenu> querySysMenusByPage(Map<String, Object> parameter);
+
+	int delete(String id);
+
+	SysMenu querySysMenu(SysMenu record);
+}
+

+ 386 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysMenuMapper.xml

@@ -0,0 +1,386 @@
+<?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.izouma.awesomeadmin.dao.SysMenuMapper" >
+	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.SysMenu" >
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="parent_id" property="parentId" jdbcType="INTEGER" />
+		<result column="parent_ids" property="parentIds" jdbcType="VARCHAR" />
+		<result column="name" property="name" jdbcType="VARCHAR" />
+		<result column="sort" property="sort" jdbcType="DECIMAL" />
+		<result column="href" property="href" jdbcType="VARCHAR" />
+		<result column="target" property="target" jdbcType="VARCHAR" />
+		<result column="icon" property="icon" jdbcType="VARCHAR" />
+		<result column="is_show" property="isShow" jdbcType="CHAR" />
+		<result column="permission" property="permission" jdbcType="VARCHAR" />
+		<result column="create_by" property="createBy" jdbcType="VARCHAR" />
+		<result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
+		<result column="update_by" property="updateBy" jdbcType="VARCHAR" />
+		<result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
+		<result column="remarks" property="remarks" jdbcType="VARCHAR" />
+		<result column="del_flag" property="delFlag" jdbcType="CHAR" />
+		<result column="menu_type" property="menuType" jdbcType="CHAR" />
+	</resultMap>
+	<sql id="Base_Column_List" >
+		 id, parent_id, parent_ids, name, sort, href, target, icon, is_show, permission, create_by, create_date, update_by, update_date, remarks, del_flag, menu_type
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_menu
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+	<select id="selectByPrimaryKeys" resultMap="BaseResultMap" parameterType="java.lang.String" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_menu
+		where FIND_IN_SET(id, #{ids,jdbcType=INTEGER}) and del_flag = 'N'
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+		delete from sys_menu
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.SysMenu" useGeneratedKeys="true" keyProperty="id">
+		insert into sys_menu
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,	
+			</if>
+			<if test="parentId != null" >
+				parent_id,	
+			</if>
+			<if test="parentIds != null" >
+				parent_ids,	
+			</if>
+			<if test="name != null" >
+				name,	
+			</if>
+			<if test="sort != null" >
+				sort,	
+			</if>
+			<if test="href != null" >
+				href,	
+			</if>
+			<if test="target != null" >
+				target,	
+			</if>
+			<if test="icon != null" >
+				icon,	
+			</if>
+			<if test="isShow != null" >
+				is_show,	
+			</if>
+			<if test="permission != null" >
+				permission,	
+			</if>
+			<if test="createBy != null" >
+				create_by,	
+			</if>
+			<if test="createDate != null" >
+				create_date,	
+			</if>
+			<if test="updateBy != null" >
+				update_by,	
+			</if>
+			<if test="updateDate != null" >
+				update_date,	
+			</if>
+			<if test="remarks != null" >
+				remarks,	
+			</if>
+			<if test="delFlag != null" >
+				del_flag,	
+			</if>
+			<if test="menuType != null" >
+				menu_type,	
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=INTEGER},	
+			</if>
+			<if test="parentId != null" >
+				#{parentId,jdbcType=INTEGER},	
+			</if>
+			<if test="parentIds != null" >
+				#{parentIds,jdbcType=VARCHAR},	
+			</if>
+			<if test="name != null" >
+				#{name,jdbcType=VARCHAR},	
+			</if>
+			<if test="sort != null" >
+				#{sort,jdbcType=DECIMAL},	
+			</if>
+			<if test="href != null" >
+				#{href,jdbcType=VARCHAR},	
+			</if>
+			<if test="target != null" >
+				#{target,jdbcType=VARCHAR},	
+			</if>
+			<if test="icon != null" >
+				#{icon,jdbcType=VARCHAR},	
+			</if>
+			<if test="isShow != null" >
+				#{isShow,jdbcType=CHAR},	
+			</if>
+			<if test="permission != null" >
+				#{permission,jdbcType=VARCHAR},	
+			</if>
+			<if test="createBy != null" >
+				#{createBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="createDate != null" >
+				#{createDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="updateBy != null" >
+				#{updateBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="updateDate != null" >
+				#{updateDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="remarks != null" >
+				#{remarks,jdbcType=VARCHAR},	
+			</if>
+			<if test="delFlag != null" >
+				#{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="menuType != null" >
+				#{menuType,jdbcType=CHAR},	
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.SysMenu" >
+		update sys_menu
+		<set >
+			<if test="parentId != null" >
+				parent_id = #{parentId,jdbcType=INTEGER},	
+			</if>
+			<if test="parentIds != null" >
+				parent_ids = #{parentIds,jdbcType=VARCHAR},	
+			</if>
+			<if test="name != null" >
+				name = #{name,jdbcType=VARCHAR},	
+			</if>
+			<if test="sort != null" >
+				sort = #{sort,jdbcType=DECIMAL},	
+			</if>
+			<if test="href != null" >
+				href = #{href,jdbcType=VARCHAR},	
+			</if>
+			<if test="target != null" >
+				target = #{target,jdbcType=VARCHAR},	
+			</if>
+			<if test="icon != null" >
+				icon = #{icon,jdbcType=VARCHAR},	
+			</if>
+			<if test="isShow != null" >
+				is_show = #{isShow,jdbcType=CHAR},	
+			</if>
+			<if test="permission != null" >
+				permission = #{permission,jdbcType=VARCHAR},	
+			</if>
+			<if test="createBy != null" >
+				create_by = #{createBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="createDate != null" >
+				create_date = #{createDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="updateBy != null" >
+				update_by = #{updateBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="updateDate != null" >
+				update_date = #{updateDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="remarks != null" >
+				remarks = #{remarks,jdbcType=VARCHAR},	
+			</if>
+			<if test="delFlag != null" >
+				del_flag = #{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="menuType != null" >
+				menu_type = #{menuType,jdbcType=CHAR},	
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<select id="querySysMenusByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysMenu">
+		select <include refid="Base_Column_List"/> from sys_menu
+		<where>
+			and del_flag = 'N'
+			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
+				and id = #{record.id}	
+			</if>
+			<if test="record.parentId != null and !&quot;&quot;.equals(record.parentId)">
+				and parent_id = #{record.parentId}	
+			</if>
+			<if test="record.parentIds != null and !&quot;&quot;.equals(record.parentIds)">
+				and parent_ids = #{record.parentIds}	
+			</if>
+			<if test="record.name != null and !&quot;&quot;.equals(record.name)">
+				and name = #{record.name}	
+			</if>
+			<if test="record.sort != null and !&quot;&quot;.equals(record.sort)">
+				and sort = #{record.sort}	
+			</if>
+			<if test="record.href != null and !&quot;&quot;.equals(record.href)">
+				and href = #{record.href}	
+			</if>
+			<if test="record.target != null and !&quot;&quot;.equals(record.target)">
+				and target = #{record.target}	
+			</if>
+			<if test="record.icon != null and !&quot;&quot;.equals(record.icon)">
+				and icon = #{record.icon}	
+			</if>
+			<if test="record.isShow != null and !&quot;&quot;.equals(record.isShow)">
+				and is_show = #{record.isShow}	
+			</if>
+			<if test="record.permission != null and !&quot;&quot;.equals(record.permission)">
+				and permission = #{record.permission}	
+			</if>
+			<if test="record.createBy != null and !&quot;&quot;.equals(record.createBy)">
+				and create_by = #{record.createBy}	
+			</if>
+			<if test="record.createDate != null and !&quot;&quot;.equals(record.createDate)">
+				and create_date = #{record.createDate}	
+			</if>
+			<if test="record.updateBy != null and !&quot;&quot;.equals(record.updateBy)">
+				and update_by = #{record.updateBy}	
+			</if>
+			<if test="record.updateDate != null and !&quot;&quot;.equals(record.updateDate)">
+				and update_date = #{record.updateDate}	
+			</if>
+			<if test="record.remarks != null and !&quot;&quot;.equals(record.remarks)">
+				and remarks = #{record.remarks}	
+			</if>
+			<if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+				and del_flag = #{record.delFlag}	
+			</if>
+			<if test="record.menuType != null and !&quot;&quot;.equals(record.menuType)">
+				and menu_type = #{record.menuType}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryAllSysMenu" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysMenu">
+		select <include refid="Base_Column_List"/> from sys_menu
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="parentId != null and !&quot;&quot;.equals(parentId)">
+				and parent_id = #{parentId}	
+			</if>
+			<if test="parentIds != null and !&quot;&quot;.equals(parentIds)">
+				and parent_ids = #{parentIds}	
+			</if>
+			<if test="name != null and !&quot;&quot;.equals(name)">
+				and name = #{name}	
+			</if>
+			<if test="sort != null and !&quot;&quot;.equals(sort)">
+				and sort = #{sort}	
+			</if>
+			<if test="href != null and !&quot;&quot;.equals(href)">
+				and href = #{href}	
+			</if>
+			<if test="target != null and !&quot;&quot;.equals(target)">
+				and target = #{target}	
+			</if>
+			<if test="icon != null and !&quot;&quot;.equals(icon)">
+				and icon = #{icon}	
+			</if>
+			<if test="isShow != null and !&quot;&quot;.equals(isShow)">
+				and is_show = #{isShow}	
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}	
+			</if>
+			<if test="createBy != null and !&quot;&quot;.equals(createBy)">
+				and create_by = #{createBy}	
+			</if>
+			<if test="createDate != null and !&quot;&quot;.equals(createDate)">
+				and create_date = #{createDate}	
+			</if>
+			<if test="updateBy != null and !&quot;&quot;.equals(updateBy)">
+				and update_by = #{updateBy}	
+			</if>
+			<if test="updateDate != null and !&quot;&quot;.equals(updateDate)">
+				and update_date = #{updateDate}	
+			</if>
+			<if test="remarks != null and !&quot;&quot;.equals(remarks)">
+				and remarks = #{remarks}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="menuType != null and !&quot;&quot;.equals(menuType)">
+				and menu_type = #{menuType}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="querySysMenu" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysMenu">
+		select <include refid="Base_Column_List"/> from sys_menu
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="parentId != null and !&quot;&quot;.equals(parentId)">
+				and parent_id = #{parentId}	
+			</if>
+			<if test="parentIds != null and !&quot;&quot;.equals(parentIds)">
+				and parent_ids = #{parentIds}	
+			</if>
+			<if test="name != null and !&quot;&quot;.equals(name)">
+				and name = #{name}	
+			</if>
+			<if test="sort != null and !&quot;&quot;.equals(sort)">
+				and sort = #{sort}	
+			</if>
+			<if test="href != null and !&quot;&quot;.equals(href)">
+				and href = #{href}	
+			</if>
+			<if test="target != null and !&quot;&quot;.equals(target)">
+				and target = #{target}	
+			</if>
+			<if test="icon != null and !&quot;&quot;.equals(icon)">
+				and icon = #{icon}	
+			</if>
+			<if test="isShow != null and !&quot;&quot;.equals(isShow)">
+				and is_show = #{isShow}	
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}	
+			</if>
+			<if test="createBy != null and !&quot;&quot;.equals(createBy)">
+				and create_by = #{createBy}	
+			</if>
+			<if test="createDate != null and !&quot;&quot;.equals(createDate)">
+				and create_date = #{createDate}	
+			</if>
+			<if test="updateBy != null and !&quot;&quot;.equals(updateBy)">
+				and update_by = #{updateBy}	
+			</if>
+			<if test="updateDate != null and !&quot;&quot;.equals(updateDate)">
+				and update_date = #{updateDate}	
+			</if>
+			<if test="remarks != null and !&quot;&quot;.equals(remarks)">
+				and remarks = #{remarks}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="menuType != null and !&quot;&quot;.equals(menuType)">
+				and menu_type = #{menuType}	
+			</if>
+		</where>
+		LIMIT 1
+	</select>
+	<update id="delete">
+		UPDATE sys_menu SET del_flag = 'Y'
+		<where>
+			AND id = #{id}
+		</where>
+	</update>
+</mapper>
+

+ 47 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysRoleMapper.java

@@ -0,0 +1,47 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.SysRole;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * sys_role Dao接口
+ * Tue Apr 10 18:09:56 CST 2018  Suo Chen Cheng
+ */
+@Repository("com.zoumaframe.dao.SysRoleMapper")
+public interface SysRoleMapper {
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(SysRole record);
+
+    SysRole selectByPrimaryKey(Integer id);
+
+    List<SysRole> selectByPrimaryKeys(@Param("ids") String ids);
+
+    int updateByPrimaryKeySelective(SysRole record);
+
+    List<SysRole> queryAllSysRole(SysRole record);
+
+    List<SysRole> querySysRolesByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    SysRole querySysRole(SysRole record);
+
+    List<SysRole> getUserRoles(@Param("userId") Integer userId);
+
+    int setUserRoles(@Param("userId") Integer userId, @Param("roles") List<String> roles);
+
+    int clearUserRoles(@Param("userId") Integer userId);
+
+    int addUserRole(@Param("userId") Integer userId, @Param("roleId") Integer roleId);
+
+    int removeUserRole(@Param("userId") Integer userId, @Param("roleId") Integer roleId);
+
+    String getUserRoleId(Integer id);
+}
+

+ 372 - 0
src/main/java/com/izouma/awesomeadmin/dao/SysRoleMapper.xml

@@ -0,0 +1,372 @@
+<?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.izouma.awesomeadmin.dao.SysRoleMapper" >
+	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.SysRole" >
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="office_id" property="officeId" jdbcType="VARCHAR" />
+		<result column="name" property="name" jdbcType="VARCHAR" />
+		<result column="enname" property="enname" jdbcType="VARCHAR" />
+		<result column="role_type" property="roleType" jdbcType="VARCHAR" />
+		<result column="is_sys" property="isSys" jdbcType="VARCHAR" />
+		<result column="useable" property="useable" jdbcType="VARCHAR" />
+		<result column="create_by" property="createBy" jdbcType="VARCHAR" />
+		<result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
+		<result column="update_by" property="updateBy" jdbcType="VARCHAR" />
+		<result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
+		<result column="remarks" property="remarks" jdbcType="VARCHAR" />
+		<result column="del_flag" property="delFlag" jdbcType="CHAR" />
+		<result column="menu_ids" property="menuIds" jdbcType="VARCHAR" />
+		<result column="permission" property="permission" jdbcType="VARCHAR" />
+	</resultMap>
+	<sql id="Base_Column_List" >
+		 id, office_id, name, enname, role_type, is_sys, useable, create_by, create_date, update_by, update_date, remarks, del_flag,menu_ids,permission
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_role
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+		delete from sys_role
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.SysRole" useGeneratedKeys="true" keyProperty="id">
+		insert into sys_role
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,	
+			</if>
+			<if test="officeId != null" >
+				office_id,	
+			</if>
+			<if test="name != null" >
+				name,	
+			</if>
+			<if test="enname != null" >
+				enname,	
+			</if>
+			<if test="roleType != null" >
+				role_type,	
+			</if>
+			<if test="isSys != null" >
+				is_sys,	
+			</if>
+			<if test="useable != null" >
+				useable,	
+			</if>
+			<if test="createBy != null" >
+				create_by,	
+			</if>
+			<if test="createDate != null" >
+				create_date,	
+			</if>
+			<if test="updateBy != null" >
+				update_by,	
+			</if>
+			<if test="updateDate != null" >
+				update_date,	
+			</if>
+			<if test="remarks != null" >
+				remarks,	
+			</if>
+			<if test="menuIds != null" >
+				menu_ids,
+			</if>
+			<if test="permission != null" >
+				permission,
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=INTEGER},	
+			</if>
+			<if test="officeId != null" >
+				#{officeId,jdbcType=VARCHAR},	
+			</if>
+			<if test="name != null" >
+				#{name,jdbcType=VARCHAR},	
+			</if>
+			<if test="enname != null" >
+				#{enname,jdbcType=VARCHAR},	
+			</if>
+			<if test="roleType != null" >
+				#{roleType,jdbcType=VARCHAR},	
+			</if>
+			<if test="isSys != null" >
+				#{isSys,jdbcType=VARCHAR},	
+			</if>
+			<if test="useable != null" >
+				#{useable,jdbcType=VARCHAR},	
+			</if>
+			<if test="createBy != null" >
+				#{createBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="createDate != null" >
+				#{createDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="updateBy != null" >
+				#{updateBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="updateDate != null" >
+				#{updateDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="remarks != null" >
+				#{remarks,jdbcType=VARCHAR},	
+			</if>
+			<if test="menuIds != null" >
+				#{menuIds,jdbcType=VARCHAR},
+			</if>
+			<if test="permission != null" >
+				#{permission,jdbcType=VARCHAR},
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.SysRole" >
+		update sys_role
+		<set >
+			<if test="officeId != null" >
+				office_id = #{officeId,jdbcType=VARCHAR},	
+			</if>
+			<if test="name != null" >
+				name = #{name,jdbcType=VARCHAR},	
+			</if>
+			<if test="enname != null" >
+				enname = #{enname,jdbcType=VARCHAR},	
+			</if>
+			<if test="roleType != null" >
+				role_type = #{roleType,jdbcType=VARCHAR},	
+			</if>
+			<if test="isSys != null" >
+				is_sys = #{isSys,jdbcType=VARCHAR},	
+			</if>
+			<if test="useable != null" >
+				useable = #{useable,jdbcType=VARCHAR},	
+			</if>
+			<if test="createBy != null" >
+				create_by = #{createBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="createDate != null" >
+				create_date = #{createDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="updateBy != null" >
+				update_by = #{updateBy,jdbcType=VARCHAR},	
+			</if>
+			<if test="updateDate != null" >
+				update_date = #{updateDate,jdbcType=TIMESTAMP},	
+			</if>
+			<if test="remarks != null" >
+				remarks = #{remarks,jdbcType=VARCHAR},	
+			</if>
+			<if test="delFlag != null" >
+				del_flag = #{delFlag,jdbcType=CHAR},	
+			</if>
+			<if test="menuIds != null" >
+				menu_ids = #{menuIds,jdbcType=VARCHAR},
+			</if>
+			<if test="permission != null" >
+				permission = #{permission,jdbcType=VARCHAR},
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<select id="querySysRolesByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysRole">
+		select <include refid="Base_Column_List"/> from sys_role
+		<where>
+			and del_flag = 'N'
+			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
+				and id = #{record.id}	
+			</if>
+			<if test="record.officeId != null and !&quot;&quot;.equals(record.officeId)">
+				and office_id = #{record.officeId}	
+			</if>
+			<if test="record.name != null and !&quot;&quot;.equals(record.name)">
+				and name = #{record.name}	
+			</if>
+			<if test="record.enname != null and !&quot;&quot;.equals(record.enname)">
+				and enname = #{record.enname}	
+			</if>
+			<if test="record.roleType != null and !&quot;&quot;.equals(record.roleType)">
+				and role_type = #{record.roleType}	
+			</if>
+			<if test="record.isSys != null and !&quot;&quot;.equals(record.isSys)">
+				and is_sys = #{record.isSys}	
+			</if>
+			<if test="record.useable != null and !&quot;&quot;.equals(record.useable)">
+				and useable = #{record.useable}	
+			</if>
+			<if test="record.createBy != null and !&quot;&quot;.equals(record.createBy)">
+				and create_by = #{record.createBy}	
+			</if>
+			<if test="record.createDate != null and !&quot;&quot;.equals(record.createDate)">
+				and create_date = #{record.createDate}	
+			</if>
+			<if test="record.updateBy != null and !&quot;&quot;.equals(record.updateBy)">
+				and update_by = #{record.updateBy}	
+			</if>
+			<if test="record.updateDate != null and !&quot;&quot;.equals(record.updateDate)">
+				and update_date = #{record.updateDate}	
+			</if>
+			<if test="record.remarks != null and !&quot;&quot;.equals(record.remarks)">
+				and remarks = #{record.remarks}	
+			</if>
+			<if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+				and del_flag = #{record.delFlag}	
+			</if>
+			<if test="record.menuIds != null and !&quot;&quot;.equals(record.menuIds)">
+				and menu_ids = #{record.menuIds}
+			</if>
+			<if test="record.permission != null and !&quot;&quot;.equals(record.permission)">
+				and permission = #{record.permission}
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryAllSysRole" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysRole">
+		select <include refid="Base_Column_List"/> from sys_role
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="officeId != null and !&quot;&quot;.equals(officeId)">
+				and office_id = #{officeId}	
+			</if>
+			<if test="name != null and !&quot;&quot;.equals(name)">
+				and name = #{name}	
+			</if>
+			<if test="enname != null and !&quot;&quot;.equals(enname)">
+				and enname = #{enname}	
+			</if>
+			<if test="roleType != null and !&quot;&quot;.equals(roleType)">
+				and role_type = #{roleType}	
+			</if>
+			<if test="isSys != null and !&quot;&quot;.equals(isSys)">
+				and is_sys = #{isSys}	
+			</if>
+			<if test="useable != null and !&quot;&quot;.equals(useable)">
+				and useable = #{useable}	
+			</if>
+			<if test="createBy != null and !&quot;&quot;.equals(createBy)">
+				and create_by = #{createBy}	
+			</if>
+			<if test="createDate != null and !&quot;&quot;.equals(createDate)">
+				and create_date = #{createDate}	
+			</if>
+			<if test="updateBy != null and !&quot;&quot;.equals(updateBy)">
+				and update_by = #{updateBy}	
+			</if>
+			<if test="updateDate != null and !&quot;&quot;.equals(updateDate)">
+				and update_date = #{updateDate}	
+			</if>
+			<if test="remarks != null and !&quot;&quot;.equals(remarks)">
+				and remarks = #{remarks}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="idStr != null and !&quot;&quot;.equals(idStr)">
+				and id in  (${idStr})
+			</if>
+			<if test="menuIds != null and !&quot;&quot;.equals(menuIds)">
+				and menu_ids = #{menuIds}
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="querySysRole" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SysRole">
+		select <include refid="Base_Column_List"/> from sys_role
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="officeId != null and !&quot;&quot;.equals(officeId)">
+				and office_id = #{officeId}	
+			</if>
+			<if test="name != null and !&quot;&quot;.equals(name)">
+				and name = #{name}	
+			</if>
+			<if test="enname != null and !&quot;&quot;.equals(enname)">
+				and enname = #{enname}	
+			</if>
+			<if test="roleType != null and !&quot;&quot;.equals(roleType)">
+				and role_type = #{roleType}	
+			</if>
+			<if test="isSys != null and !&quot;&quot;.equals(isSys)">
+				and is_sys = #{isSys}	
+			</if>
+			<if test="useable != null and !&quot;&quot;.equals(useable)">
+				and useable = #{useable}	
+			</if>
+			<if test="createBy != null and !&quot;&quot;.equals(createBy)">
+				and create_by = #{createBy}	
+			</if>
+			<if test="createDate != null and !&quot;&quot;.equals(createDate)">
+				and create_date = #{createDate}	
+			</if>
+			<if test="updateBy != null and !&quot;&quot;.equals(updateBy)">
+				and update_by = #{updateBy}	
+			</if>
+			<if test="updateDate != null and !&quot;&quot;.equals(updateDate)">
+				and update_date = #{updateDate}	
+			</if>
+			<if test="remarks != null and !&quot;&quot;.equals(remarks)">
+				and remarks = #{remarks}	
+			</if>
+			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+				and del_flag = #{delFlag}	
+			</if>
+			<if test="menuIds != null and !&quot;&quot;.equals(menuIds)">
+				and menu_ids = #{menuIds}
+			</if>
+			<if test="permission != null and !&quot;&quot;.equals(permission)">
+				and permission = #{permission}
+			</if>
+		</where>
+		LIMIT 1
+	</select>
+    <select id="selectByPrimaryKeys" resultType="com.izouma.awesomeadmin.model.SysRole">
+		select
+		<include refid="Base_Column_List" />
+		from sys_role
+		where id in (${ids})
+		and del_flag = 'N'
+	</select>
+    <select id="getUserRoles" resultType="com.izouma.awesomeadmin.model.SysRole">
+		select
+		<include refid="Base_Column_List" />
+		from sys_role
+		where id in (select role_id from sys_user_role where user_id = #{userId})
+		and del_flag = 'N'
+	</select>
+    <update id="delete">
+		UPDATE sys_role SET del_flag = 'Y'
+		<where>
+			AND id = #{id}
+		</where>
+	</update>
+	<insert id="setUserRoles">
+		insert into sys_user_role (user_id, role_id)
+		values
+		<foreach collection="roles" item="roleId" separator=",">
+			(#{userId}, #{roleId})
+		</foreach>
+	</insert>
+    <delete id="clearUserRoles">
+		delete from sys_user_role where user_id = #{userId}
+	</delete>
+	<insert id="addUserRole">
+		insert into sys_user_role (user_id, role_id) values (#{userId}, #{roleId})
+	</insert>
+	<delete id="removeUserRole">
+		delete from sys_user_role when user_id = #{userId} and role_id = #{roleId}
+	</delete>
+	<select id="getUserRoleId" resultType="java.lang.String">
+		SELECT group_concat(role_id) FROM sys_user_role WHERE user_id = #{id}
+	</select>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/SystemConfigMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.SystemConfig;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.SystemConfigMapper")
+public interface SystemConfigMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(SystemConfig record);
+
+    SystemConfig selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(SystemConfig record);
+
+    List<SystemConfig> queryAllSystemConfig(SystemConfig record);
+
+    List<SystemConfig> querySystemConfigByPage(Map<String, Object> parameter);
+
+    int delete(SystemConfig record);
+
+    SystemConfig querySystemConfig(SystemConfig record);
+
+    List<SystemConfig> query(SystemConfig record);
+}
+

+ 525 - 0
src/main/java/com/izouma/awesomeadmin/dao/SystemConfigMapper.xml

@@ -0,0 +1,525 @@
+<?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.izouma.awesomeadmin.dao.SystemConfigMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.SystemConfig">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
+        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
+        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
+        <result column="order_rate" property="orderRate" jdbcType="VARCHAR"/>
+        <result column="tixian_rate" property="tixianRate" jdbcType="VARCHAR"/>
+        <result column="extra" property="extra" jdbcType="VARCHAR"/>
+        <result column="use_flag" property="useFlag" jdbcType="CHAR"/>
+        <result column="personal_deposit" property="personalDeposit" jdbcType="INTEGER"/>
+        <result column="company_deposit" property="companyDeposit" jdbcType="INTEGER"/>
+        <result column="personal_size" property="personalSize" jdbcType="INTEGER"/>
+        <result column="company_size" property="companySize" jdbcType="INTEGER"/>
+        <result column="msg_notice" property="msgNotice" jdbcType="INTEGER"/>
+        <result column="save_notice" property="saveNotice" jdbcType="INTEGER"/>
+        <result column="session_time" property="sessionTime" jdbcType="INTEGER"/>
+        <result column="wx_pay" property="wxPay" jdbcType="CHAR"/>
+        <result column="ali_pay" property="aliPay" jdbcType="CHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
+        <trim suffixOverrides=",">
+            id,
+
+            del_flag,
+
+            update_time,
+
+            update_user,
+
+            create_time,
+
+            create_user,
+
+            order_rate,
+
+            tixian_rate,
+
+            extra,
+
+            use_flag,
+
+            personal_deposit,
+
+            company_deposit,
+
+            personal_size,
+
+            company_size,
+
+            msg_notice,
+
+            save_notice,
+
+            session_time,
+
+            wx_pay,
+
+            ali_pay,
+
+        </trim>
+    </sql>
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from system_config
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+        delete from system_config
+        where id = #{id,jdbcType=INTEGER}
+    </delete>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.SystemConfig" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into system_config
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id!= null">
+                id,
+            </if>
+            <if test="delFlag!= null">
+                del_flag,
+            </if>
+            <if test="updateTime!= null">
+                update_time,
+            </if>
+            <if test="updateUser!= null">
+                update_user,
+            </if>
+            <if test="createTime!= null">
+                create_time,
+            </if>
+            <if test="createUser!= null">
+                create_user,
+            </if>
+            <if test="orderRate!= null">
+                order_rate,
+            </if>
+            <if test="tixianRate!= null">
+                tixian_rate,
+            </if>
+            <if test="extra!= null">
+                extra,
+            </if>
+            <if test="useFlag!= null">
+                use_flag,
+            </if>
+            <if test="personalDeposit!= null">
+                personal_deposit,
+            </if>
+            <if test="companyDeposit!= null">
+                company_deposit,
+            </if>
+            <if test="personalSize!= null">
+                personal_size,
+            </if>
+            <if test="companySize!= null">
+                company_size,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="orderRate != null">
+                #{orderRate,jdbcType=VARCHAR},
+            </if>
+            <if test="tixianRate != null">
+                #{tixianRate,jdbcType=VARCHAR},
+            </if>
+            <if test="extra != null">
+                #{extra,jdbcType=VARCHAR},
+            </if>
+            <if test="useFlag != null">
+                #{useFlag,jdbcType=CHAR},
+            </if>
+            <if test="personalDeposit != null">
+                #{personalDeposit,jdbcType=INTEGER},
+            </if>
+            <if test="companyDeposit != null">
+                #{companyDeposit,jdbcType=INTEGER},
+            </if>
+            <if test="personalSize != null">
+                #{personalSize,jdbcType=INTEGER},
+            </if>
+            <if test="companySize != null">
+                #{companySize,jdbcType=INTEGER},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.SystemConfig">
+        update system_config
+        <set>
+            <if test="id != null">
+                id= #{id,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag= #{delFlag,jdbcType=CHAR},
+            </if>
+            <if test="updateTime != null">
+                update_time= #{updateTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="updateUser != null">
+                update_user= #{updateUser,jdbcType=VARCHAR},
+            </if>
+            <if test="createTime != null">
+                create_time= #{createTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="createUser != null">
+                create_user= #{createUser,jdbcType=VARCHAR},
+            </if>
+            <if test="orderRate != null">
+                order_rate= #{orderRate,jdbcType=VARCHAR},
+            </if>
+            <if test="tixianRate != null">
+                tixian_rate= #{tixianRate,jdbcType=VARCHAR},
+            </if>
+            <if test="extra != null">
+                extra= #{extra,jdbcType=VARCHAR},
+            </if>
+            <if test="useFlag != null">
+                use_flag= #{useFlag,jdbcType=CHAR},
+            </if>
+            <if test="personalDeposit != null">
+                personal_deposit= #{personalDeposit,jdbcType=INTEGER},
+            </if>
+            <if test="companyDeposit != null">
+                company_deposit= #{companyDeposit,jdbcType=INTEGER},
+            </if>
+            <if test="personalSize != null">
+                personal_size= #{personalSize,jdbcType=INTEGER},
+            </if>
+            <if test="companySize != null">
+                company_size= #{companySize,jdbcType=INTEGER},
+            </if>
+            <if test="msgNotice != null">
+                msg_notice= #{msgNotice,jdbcType=INTEGER},
+            </if>
+            <if test="saveNotice != null">
+                save_notice= #{saveNotice,jdbcType=INTEGER},
+            </if>
+            <if test="sessionTime != null">
+                session_time= #{sessionTime,jdbcType=INTEGER},
+            </if>
+            <if test="wxPay != null">
+                wx_pay= #{wxPay,jdbcType=CHAR},
+            </if>
+            <if test="aliPay != null">
+                ali_pay= #{aliPay,jdbcType=CHAR},
+            </if>
+        </set>
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+
+    </update>
+    <select id="querySystemConfigByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.SystemConfig">
+        select
+        <include refid="Base_Column_List"/>
+        from system_config
+        <where>
+            and del_flag = 'N'
+            <if test="record.idStr != null and !&quot;&quot;.equals(record.idStr)">
+                and id in (${record.idStr})
+            </if>
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.delFlag != null and !&quot;&quot;.equals(record.delFlag)">
+                and del_flag = #{record.delFlag}
+            </if>
+            <if test="record.updateTime != null and !&quot;&quot;.equals(record.updateTime)">
+                and update_time = #{record.updateTime}
+            </if>
+            <if test="record.updateUser != null and !&quot;&quot;.equals(record.updateUser)">
+                and update_user = #{record.updateUser}
+            </if>
+            <if test="record.createTime != null and !&quot;&quot;.equals(record.createTime)">
+                and create_time = #{record.createTime}
+            </if>
+            <if test="record.createUser != null and !&quot;&quot;.equals(record.createUser)">
+                and create_user = #{record.createUser}
+            </if>
+            <if test="record.orderRate != null and !&quot;&quot;.equals(record.orderRate)">
+                and order_rate = #{record.orderRate}
+            </if>
+            <if test="record.tixianRate != null and !&quot;&quot;.equals(record.tixianRate)">
+                and tixian_rate = #{record.tixianRate}
+            </if>
+            <if test="record.extra != null and !&quot;&quot;.equals(record.extra)">
+                and extra = #{record.extra}
+            </if>
+            <if test="record.useFlag != null and !&quot;&quot;.equals(record.useFlag)">
+                and use_flag = #{record.useFlag}
+            </if>
+            <if test="record.personalDeposit != null and !&quot;&quot;.equals(record.personalDeposit)">
+                and personal_deposit = #{record.personalDeposit}
+            </if>
+            <if test="record.companyDeposit != null and !&quot;&quot;.equals(record.companyDeposit)">
+                and company_deposit = #{record.companyDeposit}
+            </if>
+            <if test="record.searchKey != null and !&quot;&quot;.equals(record.searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR order_rate LIKE concat('%',#{record.searchKey},'%')
+                    OR tixian_rate LIKE concat('%',#{record.searchKey},'%')
+                    OR extra LIKE concat('%',#{record.searchKey},'%')
+                    OR use_flag LIKE concat('%',#{record.searchKey},'%')
+                    OR personal_deposit LIKE concat('%',#{record.searchKey},'%')
+                    OR company_deposit LIKE concat('%',#{record.searchKey},'%')
+                </trim>
+            </if>
+
+            <if test="record.advancedQuery != null and !&quot;&quot;.equals(record.advancedQuery)">
+                <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+
+        </where>
+        order by
+
+        <if test="record.orderByStr != null and !&quot;&quot;.equals(record.orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+        id desc
+    </select>
+    <select id="queryAllSystemConfig" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.SystemConfig">
+        select
+        <include refid="Base_Column_List"/>
+        from system_config
+        <where>
+            and del_flag = 'N'
+            <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+                and id in (${idStr})
+            </if>
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="orderRate != null and !&quot;&quot;.equals(orderRate)">
+                and order_rate = #{orderRate}
+            </if>
+            <if test="tixianRate != null and !&quot;&quot;.equals(tixianRate)">
+                and tixian_rate = #{tixianRate}
+            </if>
+            <if test="extra != null and !&quot;&quot;.equals(extra)">
+                and extra = #{extra}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="personalDeposit != null and !&quot;&quot;.equals(personalDeposit)">
+                and personal_deposit = #{personalDeposit}
+            </if>
+            <if test="companyDeposit != null and !&quot;&quot;.equals(companyDeposit)">
+                and company_deposit = #{companyDeposit}
+            </if>
+            <if test="searchKey != null and !&quot;&quot;.equals(searchKey)">
+                <trim prefix="and (" suffix=")" prefixOverrides="OR">
+                    OR order_rate LIKE concat('%',#{searchKey},'%')
+                    OR tixian_rate LIKE concat('%',#{searchKey},'%')
+                    OR extra LIKE concat('%',#{searchKey},'%')
+                    OR use_flag LIKE concat('%',#{searchKey},'%')
+                    OR personal_deposit LIKE concat('%',#{searchKey},'%')
+                    OR company_deposit LIKE concat('%',#{searchKey},'%')
+                </trim>
+            </if>
+            <if test="advancedQuery != null and !&quot;&quot;.equals(advancedQuery)">
+                <foreach item="item" index="index" collection="advancedQuery.split('_;')">
+                    <choose>
+                        <when test="item.indexOf('like') != -1">
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    concat('%',#{itemDetail},'%')
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </when>
+                        <otherwise>
+                            <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                                <if test="detailIndex == 3">
+                                    #{itemDetail}
+                                </if>
+
+                                <if test="detailIndex &lt; 3">
+                                    ${itemDetail}
+                                </if>
+
+                            </foreach>
+                        </otherwise>
+                    </choose>
+
+
+                </foreach>
+
+
+            </if>
+        </where>
+        order by
+
+        <if test="orderByStr != null and !&quot;&quot;.equals(orderByStr)">
+
+
+            <trim suffixOverrides=",">
+                <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
+                    <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
+                        ${itemDetail}
+                    </foreach>
+                </foreach>
+            </trim>
+            ,
+        </if>
+
+        id desc
+    </select>
+    <select id="querySystemConfig" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.SystemConfig">
+        select
+        <include refid="Base_Column_List"/>
+        from system_config
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="updateTime != null and !&quot;&quot;.equals(updateTime)">
+                and update_time = #{updateTime}
+            </if>
+            <if test="updateUser != null and !&quot;&quot;.equals(updateUser)">
+                and update_user = #{updateUser}
+            </if>
+            <if test="createTime != null and !&quot;&quot;.equals(createTime)">
+                and create_time = #{createTime}
+            </if>
+            <if test="createUser != null and !&quot;&quot;.equals(createUser)">
+                and create_user = #{createUser}
+            </if>
+            <if test="orderRate != null and !&quot;&quot;.equals(orderRate)">
+                and order_rate = #{orderRate}
+            </if>
+            <if test="tixianRate != null and !&quot;&quot;.equals(tixianRate)">
+                and tixian_rate = #{tixianRate}
+            </if>
+            <if test="extra != null and !&quot;&quot;.equals(extra)">
+                and extra = #{extra}
+            </if>
+            <if test="useFlag != null and !&quot;&quot;.equals(useFlag)">
+                and use_flag = #{useFlag}
+            </if>
+            <if test="personalDeposit != null and !&quot;&quot;.equals(personalDeposit)">
+                and personal_deposit = #{personalDeposit}
+            </if>
+            <if test="companyDeposit != null and !&quot;&quot;.equals(companyDeposit)">
+                and company_deposit = #{companyDeposit}
+            </if>
+
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE system_config SET del_flag = 'Y'
+        where
+        <if test="id != null and !&quot;&quot;.equals(id)">
+            id = #{id,jdbcType=INTEGER}
+        </if>
+
+        <if test="idStr != null and !&quot;&quot;.equals(idStr)">
+            id in (${idStr})
+        </if>
+    </update>
+    <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SystemConfig">
+        select
+        <include refid="Base_Column_List"/>
+        from system_config
+        <where>
+            and del_flag = 'N'
+        </where>
+        order by id desc
+    </select>
+</mapper>
+

+ 34 - 0
src/main/java/com/izouma/awesomeadmin/dao/TableFieldMapper.java

@@ -0,0 +1,34 @@
+package com.izouma.awesomeadmin.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.stereotype.Repository;
+
+import com.izouma.awesomeadmin.model.TableField;
+
+/**
+ * table_field Dao接口
+ * Fri May 04 13:38:24 CST 2018  Suo Chen Cheng
+ */ 
+@Repository("com.izouma.awesomeadmin.dao.TableFieldMapper")
+public interface TableFieldMapper {
+
+	int deleteByPrimaryKey(Integer id);
+
+	int insertSelective(TableField record);
+
+	TableField selectByPrimaryKey(Integer id);
+
+	int updateByPrimaryKeySelective(TableField record);
+
+	List <TableField> queryAllTableField(TableField record);
+
+	List <TableField> queryTableFieldsByPage(Map <String, Object> parameter);
+
+	int delete(String id);
+
+	TableField queryTableField(TableField record);
+
+}
+

+ 494 - 0
src/main/java/com/izouma/awesomeadmin/dao/TableFieldMapper.xml

@@ -0,0 +1,494 @@
+<?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.izouma.awesomeadmin.dao.TableFieldMapper" >
+	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.TableField" >
+		<id column="id" property="id" jdbcType="INTEGER" />
+		<result column="name" property="name" jdbcType="VARCHAR" />
+		<result column="remark" property="remark" jdbcType="VARCHAR" />
+		<result column="jdbcType" property="jdbcType" jdbcType="VARCHAR" />
+		<result column="javaType" property="javaType" jdbcType="VARCHAR" />
+		<result column="length" property="length" jdbcType="INTEGER" />
+		<result column="decimalPlaces" property="decimalPlaces" jdbcType="INTEGER" />
+		<result column="defaultValue" property="defaultValue" jdbcType="VARCHAR" />
+		<result column="notNull" property="notNull" jdbcType="BIT" />
+		<result column="primaryKey" property="primaryKey" jdbcType="BIT" />
+		<result column="autoIncrease" property="autoIncrease" jdbcType="BIT" />
+		<result column="showInList" property="showInList" jdbcType="BIT" />
+		<result column="showInForm" property="showInForm" jdbcType="BIT" />
+		<result column="searchable" property="searchable" jdbcType="BIT" />
+		<result column="formType" property="formType" jdbcType="VARCHAR" />
+		<result column="searchMethod" property="searchMethod" jdbcType="VARCHAR" />
+		<result column="required" property="required" jdbcType="BIT" />
+		<result column="validate" property="validate" jdbcType="BIT" />
+		<result column="minLength" property="minLength" jdbcType="INTEGER" />
+		<result column="maxLength" property="maxLength" jdbcType="INTEGER" />
+		<result column="min" property="min" jdbcType="VARCHAR" />
+		<result column="max" property="max" jdbcType="VARCHAR" />
+		<result column="validatorType" property="validatorType" jdbcType="VARCHAR" />
+	</resultMap>
+	<sql id="Base_Column_List" >
+		 id, 'name', remark, jdbcType, javaType, 'length', decimalPlaces, defaultValue, notNull, primaryKey, autoIncrease, showInList, showInForm, searchable, formType, searchMethod, required, validate, minLength, maxLength, 'min','max', validatorType
+	</sql>
+	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+		select
+		<include refid="Base_Column_List" />
+		from sys_table_field
+		where id = #{id,jdbcType=INTEGER}
+	</select>
+	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
+		delete from sys_table_field
+		where id = #{id,jdbcType=INTEGER}
+	</delete>
+	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.TableField" useGeneratedKeys="true" keyProperty="id">
+		insert into sys_table_field
+		<trim prefix="(" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				id,	
+			</if>
+			<if test="name != null" >
+				name,	
+			</if>
+			<if test="remark != null" >
+				remark,	
+			</if>
+			<if test="jdbcType != null" >
+				jdbcType,	
+			</if>
+			<if test="javaType != null" >
+				javaType,	
+			</if>
+			<if test="length != null" >
+				length,	
+			</if>
+			<if test="decimalPlaces != null" >
+				decimalPlaces,	
+			</if>
+			<if test="defaultValue != null" >
+				defaultValue,	
+			</if>
+			<if test="notNull != null" >
+				notNull,	
+			</if>
+			<if test="primaryKey != null" >
+				primaryKey,	
+			</if>
+			<if test="autoIncrease != null" >
+				autoIncrease,	
+			</if>
+			<if test="showInList != null" >
+				showInList,	
+			</if>
+			<if test="showInForm != null" >
+				showInForm,	
+			</if>
+			<if test="searchable != null" >
+				searchable,	
+			</if>
+			<if test="formType != null" >
+				formType,	
+			</if>
+			<if test="searchMethod != null" >
+				searchMethod,	
+			</if>
+			<if test="required != null" >
+				required,	
+			</if>
+			<if test="validate != null" >
+				validate,	
+			</if>
+			<if test="minLength != null" >
+				minLength,	
+			</if>
+			<if test="maxLength != null" >
+				maxLength,	
+			</if>
+			<if test="min != null" >
+				min,	
+			</if>
+			<if test="max != null" >
+				max,	
+			</if>
+			<if test="validatorType != null" >
+				validatorType,	
+			</if>
+		</trim>
+		<trim prefix="values (" suffix=")" suffixOverrides="," >
+			<if test="id != null" >
+				#{id,jdbcType=INTEGER},	
+			</if>
+			<if test="name != null" >
+				#{name,jdbcType=VARCHAR},	
+			</if>
+			<if test="remark != null" >
+				#{remark,jdbcType=VARCHAR},	
+			</if>
+			<if test="jdbcType != null" >
+				#{jdbcType,jdbcType=VARCHAR},	
+			</if>
+			<if test="javaType != null" >
+				#{javaType,jdbcType=VARCHAR},	
+			</if>
+			<if test="length != null" >
+				#{length,jdbcType=INTEGER},	
+			</if>
+			<if test="decimalPlaces != null" >
+				#{decimalPlaces,jdbcType=INTEGER},	
+			</if>
+			<if test="defaultValue != null" >
+				#{defaultValue,jdbcType=VARCHAR},	
+			</if>
+			<if test="notNull != null" >
+				#{notNull,jdbcType=BIT},	
+			</if>
+			<if test="primaryKey != null" >
+				#{primaryKey,jdbcType=BIT},	
+			</if>
+			<if test="autoIncrease != null" >
+				#{autoIncrease,jdbcType=BIT},	
+			</if>
+			<if test="showInList != null" >
+				#{showInList,jdbcType=BIT},	
+			</if>
+			<if test="showInForm != null" >
+				#{showInForm,jdbcType=BIT},	
+			</if>
+			<if test="searchable != null" >
+				#{searchable,jdbcType=BIT},	
+			</if>
+			<if test="formType != null" >
+				#{formType,jdbcType=VARCHAR},	
+			</if>
+			<if test="searchMethod != null" >
+				#{searchMethod,jdbcType=VARCHAR},	
+			</if>
+			<if test="required != null" >
+				#{required,jdbcType=BIT},	
+			</if>
+			<if test="validate != null" >
+				#{validate,jdbcType=BIT},	
+			</if>
+			<if test="minLength != null" >
+				#{minLength,jdbcType=INTEGER},	
+			</if>
+			<if test="maxLength != null" >
+				#{maxLength,jdbcType=INTEGER},	
+			</if>
+			<if test="min != null" >
+				#{min,jdbcType=VARCHAR},	
+			</if>
+			<if test="max != null" >
+				#{max,jdbcType=VARCHAR},	
+			</if>
+			<if test="validatorType != null" >
+				#{validatorType,jdbcType=VARCHAR},	
+			</if>
+		</trim>
+	</insert>
+	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.TableField" >
+		update sys_table_field
+		<set >
+			<if test="name != null" >
+				name = #{name,jdbcType=VARCHAR},	
+			</if>
+			<if test="remark != null" >
+				remark = #{remark,jdbcType=VARCHAR},	
+			</if>
+			<if test="jdbcType != null" >
+				jdbcType = #{jdbcType,jdbcType=VARCHAR},	
+			</if>
+			<if test="javaType != null" >
+				javaType = #{javaType,jdbcType=VARCHAR},	
+			</if>
+			<if test="length != null" >
+				length = #{length,jdbcType=INTEGER},	
+			</if>
+			<if test="decimalPlaces != null" >
+				decimalPlaces = #{decimalPlaces,jdbcType=INTEGER},	
+			</if>
+			<if test="defaultValue != null" >
+				defaultValue = #{defaultValue,jdbcType=VARCHAR},	
+			</if>
+			<if test="notNull != null" >
+				notNull = #{notNull,jdbcType=BIT},	
+			</if>
+			<if test="primaryKey != null" >
+				primaryKey = #{primaryKey,jdbcType=BIT},	
+			</if>
+			<if test="autoIncrease != null" >
+				autoIncrease = #{autoIncrease,jdbcType=BIT},	
+			</if>
+			<if test="showInList != null" >
+				showInList = #{showInList,jdbcType=BIT},	
+			</if>
+			<if test="showInForm != null" >
+				showInForm = #{showInForm,jdbcType=BIT},	
+			</if>
+			<if test="searchable != null" >
+				searchable = #{searchable,jdbcType=BIT},	
+			</if>
+			<if test="formType != null" >
+				formType = #{formType,jdbcType=VARCHAR},	
+			</if>
+			<if test="searchMethod != null" >
+				searchMethod = #{searchMethod,jdbcType=VARCHAR},	
+			</if>
+			<if test="required != null" >
+				required = #{required,jdbcType=BIT},	
+			</if>
+			<if test="validate != null" >
+				validate = #{validate,jdbcType=BIT},	
+			</if>
+			<if test="minLength != null" >
+				minLength = #{minLength,jdbcType=INTEGER},	
+			</if>
+			<if test="maxLength != null" >
+				maxLength = #{maxLength,jdbcType=INTEGER},	
+			</if>
+			<if test="min != null" >
+				min = #{min,jdbcType=VARCHAR},	
+			</if>
+			<if test="max != null" >
+				max = #{max,jdbcType=VARCHAR},	
+			</if>
+			<if test="validatorType != null" >
+				validatorType = #{validatorType,jdbcType=VARCHAR},	
+			</if>
+		</set>
+		where id = #{id,jdbcType=INTEGER}
+	</update>
+	<select id="queryTableFieldsByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TableField">
+		select <include refid="Base_Column_List"/> from sys_table_field
+		<where>
+			and del_flag = 'N'
+			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
+				and id = #{record.id}	
+			</if>
+			<if test="record.name != null and !&quot;&quot;.equals(record.name)">
+				and name = #{record.name}	
+			</if>
+			<if test="record.remark != null and !&quot;&quot;.equals(record.remark)">
+				and remark = #{record.remark}	
+			</if>
+			<if test="record.jdbcType != null and !&quot;&quot;.equals(record.jdbcType)">
+				and jdbcType = #{record.jdbcType}	
+			</if>
+			<if test="record.javaType != null and !&quot;&quot;.equals(record.javaType)">
+				and javaType = #{record.javaType}	
+			</if>
+			<if test="record.length != null and !&quot;&quot;.equals(record.length)">
+				and length = #{record.length}	
+			</if>
+			<if test="record.decimalPlaces != null and !&quot;&quot;.equals(record.decimalPlaces)">
+				and decimalPlaces = #{record.decimalPlaces}	
+			</if>
+			<if test="record.defaultValue != null and !&quot;&quot;.equals(record.defaultValue)">
+				and defaultValue = #{record.defaultValue}	
+			</if>
+			<if test="record.notNull != null and !&quot;&quot;.equals(record.notNull)">
+				and notNull = #{record.notNull}	
+			</if>
+			<if test="record.primaryKey != null and !&quot;&quot;.equals(record.primaryKey)">
+				and primaryKey = #{record.primaryKey}	
+			</if>
+			<if test="record.autoIncrease != null and !&quot;&quot;.equals(record.autoIncrease)">
+				and autoIncrease = #{record.autoIncrease}	
+			</if>
+			<if test="record.showInList != null and !&quot;&quot;.equals(record.showInList)">
+				and showInList = #{record.showInList}	
+			</if>
+			<if test="record.showInForm != null and !&quot;&quot;.equals(record.showInForm)">
+				and showInForm = #{record.showInForm}	
+			</if>
+			<if test="record.searchable != null and !&quot;&quot;.equals(record.searchable)">
+				and searchable = #{record.searchable}	
+			</if>
+			<if test="record.formType != null and !&quot;&quot;.equals(record.formType)">
+				and formType = #{record.formType}	
+			</if>
+			<if test="record.searchMethod != null and !&quot;&quot;.equals(record.searchMethod)">
+				and searchMethod = #{record.searchMethod}	
+			</if>
+			<if test="record.required != null and !&quot;&quot;.equals(record.required)">
+				and required = #{record.required}	
+			</if>
+			<if test="record.validate != null and !&quot;&quot;.equals(record.validate)">
+				and validate = #{record.validate}	
+			</if>
+			<if test="record.minLength != null and !&quot;&quot;.equals(record.minLength)">
+				and minLength = #{record.minLength}	
+			</if>
+			<if test="record.maxLength != null and !&quot;&quot;.equals(record.maxLength)">
+				and maxLength = #{record.maxLength}	
+			</if>
+			<if test="record.min != null and !&quot;&quot;.equals(record.min)">
+				and min = #{record.min}	
+			</if>
+			<if test="record.max != null and !&quot;&quot;.equals(record.max)">
+				and max = #{record.max}	
+			</if>
+			<if test="record.validatorType != null and !&quot;&quot;.equals(record.validatorType)">
+				and validatorType = #{record.validatorType}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryAllTableField" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TableField">
+		select <include refid="Base_Column_List"/> from sys_table_field
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="name != null and !&quot;&quot;.equals(name)">
+				and name = #{name}	
+			</if>
+			<if test="remark != null and !&quot;&quot;.equals(remark)">
+				and remark = #{remark}	
+			</if>
+			<if test="jdbcType != null and !&quot;&quot;.equals(jdbcType)">
+				and jdbcType = #{jdbcType}	
+			</if>
+			<if test="javaType != null and !&quot;&quot;.equals(javaType)">
+				and javaType = #{javaType}	
+			</if>
+			<if test="length != null and !&quot;&quot;.equals(length)">
+				and length = #{length}	
+			</if>
+			<if test="decimalPlaces != null and !&quot;&quot;.equals(decimalPlaces)">
+				and decimalPlaces = #{decimalPlaces}	
+			</if>
+			<if test="defaultValue != null and !&quot;&quot;.equals(defaultValue)">
+				and defaultValue = #{defaultValue}	
+			</if>
+			<if test="notNull != null and !&quot;&quot;.equals(notNull)">
+				and notNull = #{notNull}	
+			</if>
+			<if test="primaryKey != null and !&quot;&quot;.equals(primaryKey)">
+				and primaryKey = #{primaryKey}	
+			</if>
+			<if test="autoIncrease != null and !&quot;&quot;.equals(autoIncrease)">
+				and autoIncrease = #{autoIncrease}	
+			</if>
+			<if test="showInList != null and !&quot;&quot;.equals(showInList)">
+				and showInList = #{showInList}	
+			</if>
+			<if test="showInForm != null and !&quot;&quot;.equals(showInForm)">
+				and showInForm = #{showInForm}	
+			</if>
+			<if test="searchable != null and !&quot;&quot;.equals(searchable)">
+				and searchable = #{searchable}	
+			</if>
+			<if test="formType != null and !&quot;&quot;.equals(formType)">
+				and formType = #{formType}	
+			</if>
+			<if test="searchMethod != null and !&quot;&quot;.equals(searchMethod)">
+				and searchMethod = #{searchMethod}	
+			</if>
+			<if test="required != null and !&quot;&quot;.equals(required)">
+				and required = #{required}	
+			</if>
+			<if test="validate != null and !&quot;&quot;.equals(validate)">
+				and validate = #{validate}	
+			</if>
+			<if test="minLength != null and !&quot;&quot;.equals(minLength)">
+				and minLength = #{minLength}	
+			</if>
+			<if test="maxLength != null and !&quot;&quot;.equals(maxLength)">
+				and maxLength = #{maxLength}	
+			</if>
+			<if test="min != null and !&quot;&quot;.equals(min)">
+				and min = #{min}	
+			</if>
+			<if test="max != null and !&quot;&quot;.equals(max)">
+				and max = #{max}	
+			</if>
+			<if test="validatorType != null and !&quot;&quot;.equals(validatorType)">
+				and validatorType = #{validatorType}	
+			</if>
+		</where>
+		order by id desc
+	</select>
+	<select id="queryTableField" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TableField">
+		select <include refid="Base_Column_List"/> from sys_table_field
+		<where>
+			and del_flag = 'N'
+			<if test="id != null and !&quot;&quot;.equals(id)">
+				and id = #{id}	
+			</if>
+			<if test="name != null and !&quot;&quot;.equals(name)">
+				and name = #{name}	
+			</if>
+			<if test="remark != null and !&quot;&quot;.equals(remark)">
+				and remark = #{remark}	
+			</if>
+			<if test="jdbcType != null and !&quot;&quot;.equals(jdbcType)">
+				and jdbcType = #{jdbcType}	
+			</if>
+			<if test="javaType != null and !&quot;&quot;.equals(javaType)">
+				and javaType = #{javaType}	
+			</if>
+			<if test="length != null and !&quot;&quot;.equals(length)">
+				and length = #{length}	
+			</if>
+			<if test="decimalPlaces != null and !&quot;&quot;.equals(decimalPlaces)">
+				and decimalPlaces = #{decimalPlaces}	
+			</if>
+			<if test="defaultValue != null and !&quot;&quot;.equals(defaultValue)">
+				and defaultValue = #{defaultValue}	
+			</if>
+			<if test="notNull != null and !&quot;&quot;.equals(notNull)">
+				and notNull = #{notNull}	
+			</if>
+			<if test="primaryKey != null and !&quot;&quot;.equals(primaryKey)">
+				and primaryKey = #{primaryKey}	
+			</if>
+			<if test="autoIncrease != null and !&quot;&quot;.equals(autoIncrease)">
+				and autoIncrease = #{autoIncrease}	
+			</if>
+			<if test="showInList != null and !&quot;&quot;.equals(showInList)">
+				and showInList = #{showInList}	
+			</if>
+			<if test="showInForm != null and !&quot;&quot;.equals(showInForm)">
+				and showInForm = #{showInForm}	
+			</if>
+			<if test="searchable != null and !&quot;&quot;.equals(searchable)">
+				and searchable = #{searchable}	
+			</if>
+			<if test="formType != null and !&quot;&quot;.equals(formType)">
+				and formType = #{formType}	
+			</if>
+			<if test="searchMethod != null and !&quot;&quot;.equals(searchMethod)">
+				and searchMethod = #{searchMethod}	
+			</if>
+			<if test="required != null and !&quot;&quot;.equals(required)">
+				and required = #{required}	
+			</if>
+			<if test="validate != null and !&quot;&quot;.equals(validate)">
+				and validate = #{validate}	
+			</if>
+			<if test="minLength != null and !&quot;&quot;.equals(minLength)">
+				and minLength = #{minLength}	
+			</if>
+			<if test="maxLength != null and !&quot;&quot;.equals(maxLength)">
+				and maxLength = #{maxLength}	
+			</if>
+			<if test="min != null and !&quot;&quot;.equals(min)">
+				and min = #{min}	
+			</if>
+			<if test="max != null and !&quot;&quot;.equals(max)">
+				and max = #{max}	
+			</if>
+			<if test="validatorType != null and !&quot;&quot;.equals(validatorType)">
+				and validatorType = #{validatorType}	
+			</if>
+		</where>
+		LIMIT 1
+	</select>
+	<update id="delete">
+		UPDATE sys_table_field SET del_flag = 'Y'
+		<where>
+			AND id = #{id}
+		</where>
+	</update>
+</mapper>
+

+ 36 - 0
src/main/java/com/izouma/awesomeadmin/dao/UserAddressMapper.java

@@ -0,0 +1,36 @@
+package com.izouma.awesomeadmin.dao;
+
+import com.izouma.awesomeadmin.model.UserAddress;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+*  Dao接口
+*/
+@Repository("com.zoumaframe.dao.UserAddressMapper")
+public interface UserAddressMapper{
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insertSelective(UserAddress record);
+
+    UserAddress selectByPrimaryKey(Integer id);
+
+    int updateByPrimaryKeySelective(UserAddress record);
+
+    List<UserAddress> queryAllUserAddress(UserAddress record);
+
+    List<UserAddress> queryUserAddressByPage(Map<String, Object> parameter);
+
+    int delete(String id);
+
+    UserAddress queryUserAddress(UserAddress record);
+
+    List<UserAddress> query(UserAddress record);
+
+    int setDefaultUserAddress(Map<String, Object> parameter);
+}
+

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