Эх сурвалжийг харах

建立了product、store、sale_statement、orders、audits表,修改了vue的路由表,拆分了管理员和店主管理界面,对这些表进行了简单了CRUD的前端后端编写(未完善)、拆分了application配置文件

0714Star 1 жил өмнө
parent
commit
6b880cb072
82 өөрчлөгдсөн 1350 нэмэгдсэн , 0 устгасан
  1. 124 0
      .idea/uiDesigner.xml
  2. 264 0
      springboot/src/main/resources/sql/fruit_farmer.sql
  3. 57 0
      springboot/target/classes/application-druid.yml
  4. 31 0
      springboot/target/classes/application.yml
  5. BIN
      springboot/target/classes/com/example/SpringbootApplication.class
  6. BIN
      springboot/target/classes/com/example/common/Constants.class
  7. BIN
      springboot/target/classes/com/example/common/Result.class
  8. BIN
      springboot/target/classes/com/example/common/config/CorsConfig.class
  9. BIN
      springboot/target/classes/com/example/common/config/DruidConfig$1.class
  10. BIN
      springboot/target/classes/com/example/common/config/DruidConfig.class
  11. BIN
      springboot/target/classes/com/example/common/config/JwtInterceptor.class
  12. BIN
      springboot/target/classes/com/example/common/config/Properties/DruidProperties.class
  13. BIN
      springboot/target/classes/com/example/common/config/WebConfig.class
  14. BIN
      springboot/target/classes/com/example/common/enums/OrderStatusDELIVERY.class
  15. BIN
      springboot/target/classes/com/example/common/enums/OrderStatusToShop.class
  16. BIN
      springboot/target/classes/com/example/common/enums/OrderType.class
  17. BIN
      springboot/target/classes/com/example/common/enums/ResultCodeEnum.class
  18. BIN
      springboot/target/classes/com/example/common/enums/RoleEnum.class
  19. BIN
      springboot/target/classes/com/example/controller/AdminController.class
  20. BIN
      springboot/target/classes/com/example/controller/AdminstoreController.class
  21. BIN
      springboot/target/classes/com/example/controller/AuditsController.class
  22. BIN
      springboot/target/classes/com/example/controller/FileController.class
  23. BIN
      springboot/target/classes/com/example/controller/NoticeController.class
  24. BIN
      springboot/target/classes/com/example/controller/OrdersController.class
  25. BIN
      springboot/target/classes/com/example/controller/ProductController.class
  26. BIN
      springboot/target/classes/com/example/controller/ProductypeController.class
  27. BIN
      springboot/target/classes/com/example/controller/SaleStatementController.class
  28. BIN
      springboot/target/classes/com/example/controller/StoreController.class
  29. BIN
      springboot/target/classes/com/example/controller/UserController.class
  30. BIN
      springboot/target/classes/com/example/controller/WebController.class
  31. BIN
      springboot/target/classes/com/example/entity/Account.class
  32. BIN
      springboot/target/classes/com/example/entity/Admin.class
  33. BIN
      springboot/target/classes/com/example/entity/Adminstore.class
  34. BIN
      springboot/target/classes/com/example/entity/Audits.class
  35. BIN
      springboot/target/classes/com/example/entity/Notice.class
  36. BIN
      springboot/target/classes/com/example/entity/Orders.class
  37. BIN
      springboot/target/classes/com/example/entity/Product.class
  38. BIN
      springboot/target/classes/com/example/entity/Productype.class
  39. BIN
      springboot/target/classes/com/example/entity/SaleStatement.class
  40. BIN
      springboot/target/classes/com/example/entity/Store.class
  41. BIN
      springboot/target/classes/com/example/entity/User.class
  42. BIN
      springboot/target/classes/com/example/exception/CustomException.class
  43. BIN
      springboot/target/classes/com/example/exception/GlobalExceptionHandler.class
  44. BIN
      springboot/target/classes/com/example/mapper/AdminMapper.class
  45. BIN
      springboot/target/classes/com/example/mapper/AdminstoreMapper.class
  46. BIN
      springboot/target/classes/com/example/mapper/AuditsMapper.class
  47. BIN
      springboot/target/classes/com/example/mapper/NoticeMapper.class
  48. BIN
      springboot/target/classes/com/example/mapper/OrdersMapper.class
  49. BIN
      springboot/target/classes/com/example/mapper/ProductMapper.class
  50. BIN
      springboot/target/classes/com/example/mapper/ProductypeMapper.class
  51. BIN
      springboot/target/classes/com/example/mapper/SaleStatementMapper.class
  52. BIN
      springboot/target/classes/com/example/mapper/StoreMapper.class
  53. BIN
      springboot/target/classes/com/example/mapper/UserMapper.class
  54. BIN
      springboot/target/classes/com/example/service/AdminService.class
  55. BIN
      springboot/target/classes/com/example/service/AdminStoreService.class
  56. BIN
      springboot/target/classes/com/example/service/AuditsService.class
  57. BIN
      springboot/target/classes/com/example/service/NoticeService.class
  58. BIN
      springboot/target/classes/com/example/service/OrdersService.class
  59. BIN
      springboot/target/classes/com/example/service/ProductService.class
  60. BIN
      springboot/target/classes/com/example/service/ProductypeService.class
  61. BIN
      springboot/target/classes/com/example/service/SaleStatementService.class
  62. BIN
      springboot/target/classes/com/example/service/StoreService.class
  63. BIN
      springboot/target/classes/com/example/service/UserService.class
  64. BIN
      springboot/target/classes/com/example/utils/TokenUtils.class
  65. BIN
      springboot/target/classes/com/example/utils/generate/CodeGenerator.class
  66. BIN
      springboot/target/classes/com/example/utils/generate/ControllerGenerator.class
  67. BIN
      springboot/target/classes/com/example/utils/generate/EntityGenerator.class
  68. BIN
      springboot/target/classes/com/example/utils/generate/MapperGenerator.class
  69. BIN
      springboot/target/classes/com/example/utils/generate/ServiceGenerator.class
  70. BIN
      springboot/target/classes/com/example/utils/generate/Table.class
  71. BIN
      springboot/target/classes/com/example/utils/generate/TableColumn.class
  72. BIN
      springboot/target/classes/com/example/utils/generate/VueGenerator.class
  73. 91 0
      springboot/target/classes/mapper/AdminMapper.xml
  74. 93 0
      springboot/target/classes/mapper/AdminstoreMapper.xml
  75. 86 0
      springboot/target/classes/mapper/AuditsMapper.xml
  76. 74 0
      springboot/target/classes/mapper/NoticeMapper.xml
  77. 110 0
      springboot/target/classes/mapper/OrdersMapper.xml
  78. 86 0
      springboot/target/classes/mapper/ProductMapper.xml
  79. 56 0
      springboot/target/classes/mapper/ProductypeMapper.xml
  80. 80 0
      springboot/target/classes/mapper/SaleStatementMapper.xml
  81. 74 0
      springboot/target/classes/mapper/StoreMapper.xml
  82. 124 0
      springboot/target/classes/mapper/UserMapper.xml

+ 124 - 0
.idea/uiDesigner.xml

@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+          <preferred-size width="-1" height="20" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+      </item>
+      <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
+        <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+      </item>
+    </group>
+  </component>
+</project>

+ 264 - 0
springboot/src/main/resources/sql/fruit_farmer.sql

@@ -0,0 +1,264 @@
+/*
+ Navicat Premium Data Transfer
+
+ Source Server         : 熊浩毅
+ Source Server Type    : MySQL
+ Source Server Version : 80033
+ Source Host           : localhost:3306
+ Source Schema         : fruit_farmer
+
+ Target Server Type    : MySQL
+ Target Server Version : 80033
+ File Encoding         : 65001
+
+ Date: 16/04/2024 16:48:46
+*/
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for address
+-- ----------------------------
+DROP TABLE IF EXISTS `address`;
+CREATE TABLE `address`  (
+  `id` int NOT NULL AUTO_INCREMENT COMMENT '地址id',
+  `user_id` int NOT NULL COMMENT '用户id',
+  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '地址',
+  `door_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '门牌号',
+  `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货电话',
+  `recipient_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货人姓名',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `user_id`(`user_id` ASC) USING BTREE,
+  CONSTRAINT `address_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
+) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '用户地址表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of address
+-- ----------------------------
+INSERT INTO `address` VALUES (9, 2, '江西财经大学枫林园', '2#524', '12345678910', '瑶妹');
+INSERT INTO `address` VALUES (10, 1, '江西省南昌市经济开发区双港西大街绿地悦公馆', '5#2701', '18779165101', '小淮');
+
+-- ----------------------------
+-- Table structure for admin
+-- ----------------------------
+DROP TABLE IF EXISTS `admin`;
+CREATE TABLE `admin`  (
+  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
+  `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户名',
+  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '密码',
+  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '姓名',
+  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '头像',
+  `role` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '角色标识',
+  `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '电话',
+  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '邮箱',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '管理员' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Records of admin
+-- ----------------------------
+INSERT INTO `admin` VALUES (1, 'admin', 'admin', '超级管理员', 'http://118.89.54.252:8714/files/1697438073596-avatar.png', 'ADMIN', '13677889922', 'admin@xm.com');
+INSERT INTO `admin` VALUES (2, '熊浩毅', '123', '熊浩毅超级管理员', 'http://118.89.54.252:8714/files/1697438073596-avatar.png', 'ADMIN', '18779165101', '3132710967@qq.com');
+INSERT INTO `admin` VALUES (3, '任瑶', '123', '任瑶超级管理员', 'http://118.89.54.252:8714/files/1697438073596-avatar.png', 'ADMIN', NULL, NULL);
+INSERT INTO `admin` VALUES (4, '詹志炜', '123', '詹志炜超级管理员', NULL, 'ADMIN', NULL, NULL);
+
+-- ----------------------------
+-- Table structure for adminstore
+-- ----------------------------
+DROP TABLE IF EXISTS `adminstore`;
+CREATE TABLE `adminstore`  (
+  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
+  `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户名',
+  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '密码',
+  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '姓名',
+  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '头像',
+  `role` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '角色标识',
+  `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '电话',
+  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '邮箱',
+  `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '店铺地址',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '店铺管理员' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Records of adminstore
+-- ----------------------------
+INSERT INTO `adminstore` VALUES (1, '熊浩毅', '123', '淮店主', NULL, 'STOREKEEPER', '18779165101', '3132710967@qq.com', NULL);
+INSERT INTO `adminstore` VALUES (2, '任瑶', '123', '瑶店主', NULL, 'STOREKEEPER', NULL, NULL, NULL);
+INSERT INTO `adminstore` VALUES (3, 'sj', '123', '君君店主', NULL, 'STOREKEEPER', NULL, NULL, NULL);
+INSERT INTO `adminstore` VALUES (5, '淮', '123', '熊浩毅', NULL, 'STOREKEEPER', NULL, NULL, NULL);
+INSERT INTO `adminstore` VALUES (6, 'admin', 'admin', '店主', NULL, 'STOREKEEPER', NULL, NULL, NULL);
+INSERT INTO `adminstore` VALUES (7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+
+-- ----------------------------
+-- Table structure for audits
+-- ----------------------------
+DROP TABLE IF EXISTS `audits`;
+CREATE TABLE `audits`  (
+  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `idcard` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '身份证',
+  `business_license` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '营业执照url',
+  `reason` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '申请理由',
+  `pics_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '市区营业图片',
+  `camera_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '监控地址',
+  `store_id` int NULL DEFAULT NULL COMMENT '店铺申请人id用adminstore的id',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '申请审核表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of audits
+-- ----------------------------
+INSERT INTO `audits` VALUES (1, '36012220030714xxxx', '1', '想开一个果茶店铺', NULL, NULL, NULL);
+
+-- ----------------------------
+-- Table structure for notice
+-- ----------------------------
+DROP TABLE IF EXISTS `notice`;
+CREATE TABLE `notice`  (
+  `id` int NOT NULL AUTO_INCREMENT COMMENT 'ID',
+  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '标题',
+  `content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '内容',
+  `time` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '创建时间',
+  `user` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '创建人',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '公告信息表' ROW_FORMAT = DYNAMIC;
+
+-- ----------------------------
+-- Records of notice
+-- ----------------------------
+INSERT INTO `notice` VALUES (1, '今天系统正式上线,开始内测', '今天系统正式上线,开始内测', '2024-4-01', 'admin');
+INSERT INTO `notice` VALUES (2, '所有功能都已完成,可以正常使用', '所有功能都已完成,可以正常使用', '2024-4-01', 'admin');
+INSERT INTO `notice` VALUES (3, '今天天气很不错,可以出去一起玩了', '今天天气很不错,可以出去一起玩了', '2024-4-01', 'admin');
+INSERT INTO `notice` VALUES (4, '通知提醒', '自2024年4月16日起开始进行项目开发', '2024-04-16', 'admin');
+
+-- ----------------------------
+-- Table structure for orders
+-- ----------------------------
+DROP TABLE IF EXISTS `orders`;
+CREATE TABLE `orders`  (
+  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `bit_pay` decimal(10, 2) NULL DEFAULT NULL COMMENT '实付金额',
+  `origin_pay` decimal(10, 2) NULL DEFAULT NULL COMMENT '应付金额',
+  `user_id` int NULL DEFAULT NULL COMMENT '下单用户id',
+  `address_id` int NULL DEFAULT NULL COMMENT '收货地址id',
+  `time_pre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预计送达时间',
+  `time_order` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '下单时间',
+  `order_state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '订单状态',
+  `order_remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '订单备注',
+  `trans_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '交易单号',
+  `order_type_id` int NULL DEFAULT NULL COMMENT '订单类型id',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `user_id`(`user_id` ASC) USING BTREE,
+  INDEX `address_id`(`address_id` ASC) USING BTREE,
+  INDEX `order_type_id`(`order_type_id` ASC) USING BTREE,
+  CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
+  CONSTRAINT `orders_ibfk_2` FOREIGN KEY (`address_id`) REFERENCES `address` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
+  CONSTRAINT `orders_ibfk_3` FOREIGN KEY (`order_type_id`) REFERENCES `product_type` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '订单表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of orders
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for product
+-- ----------------------------
+DROP TABLE IF EXISTS `product`;
+CREATE TABLE `product`  (
+  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `product_state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '产品状态',
+  `product_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '产品名称',
+  `product_icons` json NULL COMMENT '产品图标url',
+  `product_type_ids` json NULL COMMENT '产品类型ids',
+  `product_bid_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '定价',
+  `product_sell_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '实付价格',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of product
+-- ----------------------------
+INSERT INTO `product` VALUES (1, 'SALE', '苹果', '[1, 2, 3]', '[1, 2, 3]', NULL, NULL);
+
+-- ----------------------------
+-- Table structure for product_type
+-- ----------------------------
+DROP TABLE IF EXISTS `product_type`;
+CREATE TABLE `product_type`  (
+  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `product_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '产品名称',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of product_type
+-- ----------------------------
+INSERT INTO `product_type` VALUES (1, '水果');
+INSERT INTO `product_type` VALUES (2, '蔬菜');
+INSERT INTO `product_type` VALUES (3, '活动每日促销好礼');
+
+-- ----------------------------
+-- Table structure for sale_statement
+-- ----------------------------
+DROP TABLE IF EXISTS `sale_statement`;
+CREATE TABLE `sale_statement`  (
+  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `shop_id` int NOT NULL COMMENT '店铺id',
+  `count` int NULL DEFAULT NULL COMMENT '商品数量',
+  `time_over` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '完成时间',
+  `product_id` int NULL DEFAULT NULL COMMENT '商品id',
+  `amount` decimal(10, 2) NULL DEFAULT NULL COMMENT '金额',
+  PRIMARY KEY (`id`, `shop_id`) USING BTREE
+) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '销量表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of sale_statement
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for store
+-- ----------------------------
+DROP TABLE IF EXISTS `store`;
+CREATE TABLE `store`  (
+  `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
+  `owner_id` int NULL DEFAULT NULL COMMENT '店铺主id',
+  `products_ids` json NULL COMMENT '产品列表ids',
+  `address_ids` json NULL COMMENT '地址列表ids',
+  `product_type_ids` json NULL COMMENT '产品类型ids',
+  PRIMARY KEY (`id`) USING BTREE,
+  INDEX `owner_id`(`owner_id` ASC) USING BTREE,
+  CONSTRAINT `store_ibfk_1` FOREIGN KEY (`owner_id`) REFERENCES `adminstore` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
+) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of store
+-- ----------------------------
+INSERT INTO `store` VALUES (1, 1, '[1, 2, 3]', '[1, 2, 3]', '[1, 2, 3]');
+
+-- ----------------------------
+-- Table structure for user
+-- ----------------------------
+DROP TABLE IF EXISTS `user`;
+CREATE TABLE `user`  (
+  `id` int NOT NULL AUTO_INCREMENT COMMENT '用户id',
+  `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户名',
+  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '密码',
+  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户昵称',
+  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '头像网址',
+  `role` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '用户类型',
+  `sex` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '性别',
+  `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '手机号',
+  `account` decimal(10, 2) NULL DEFAULT NULL COMMENT '金额',
+  `openid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'openid',
+  `address_ids` json NULL COMMENT '用户地址ids',
+  PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '客户表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of user
+-- ----------------------------
+INSERT INTO `user` VALUES (1, 'user', '123', '爱喝茶的小淮', NULL, 'USER', '男', '18779165101', 7451.00, NULL, '[1, 2, 3]');
+INSERT INTO `user` VALUES (2, 'ry', '123', '喝奶茶的瑶妹', NULL, 'USER', '男', '18779165101', 9934.00, NULL, NULL);
+INSERT INTO `user` VALUES (17, '淮小瑞1708502748', 'oYA-Q58ysBMJZymzkAQpBRx_Isc0', '淮小瑞1708502748', NULL, 'USER', NULL, NULL, 0.00, 'oYA-Q58ysBMJZymzkAQpBRx_Isc0', NULL);
+
+SET FOREIGN_KEY_CHECKS = 1;

+ 57 - 0
springboot/target/classes/application-druid.yml

@@ -0,0 +1,57 @@
+# 数据源配置
+spring:
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driverClassName: com.mysql.cj.jdbc.Driver
+    druid:
+      # 主库数据源
+      master:
+        url: jdbc:mysql://localhost:3306/fruit_farmer?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true
+        username: root
+        password: 0714@Xhy
+      # 从库数据源
+      slave:
+        # 从数据源开关/默认关闭
+        enabled: false
+        url:
+        username:
+        password:
+      # 初始连接数
+      initialSize: 5
+      # 最小连接池数量
+      minIdle: 10
+      # 最大连接池数量
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      # 配置一个连接在池中最大生存的时间,单位是毫秒
+      maxEvictableIdleTimeMillis: 900000
+      # 配置检测连接是否有效
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      webStatFilter:
+        enabled: true
+      statViewServlet:
+        enabled: true
+        # 设置白名单,不填则允许所有访问
+        allow:
+        url-pattern: /druid/*
+        # 控制台管理用户名和密码
+        login-username: xhy
+        login-password: 123456
+      filter:
+        stat:
+          enabled: true
+          # 慢SQL记录
+          log-slow-sql: true
+          slow-sql-millis: 1000
+          merge-sql: true
+        wall:
+          config:
+            multi-statement-allow: true

+ 31 - 0
springboot/target/classes/application.yml

@@ -0,0 +1,31 @@
+server:
+  port: 2441
+
+# 数据库配置
+spring:
+  profiles:
+    active: druid # 使用druid这个配置文件的配置
+    url: jdbc:mysql://localhost:3306/fruit_farmer?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2b8&allowPublicKeyRetrieval=true
+    username: root
+    password: 0714@Xhy
+  servlet:
+    multipart:
+      max-file-size: 100MB
+      max-request-size: 100MB
+
+# 配置mybatis实体和xml映射
+mybatis:
+  mapper-locations: classpath:mapper/*.xml
+  type-aliases-package: com.example.entity
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    map-underscore-to-camel-case: true
+
+# 分页
+pagehelper:
+  helper-dialect: mysql
+  reasonable: true
+  support-methods-arguments: true
+  params: count=countSql
+
+ip: localhost

BIN
springboot/target/classes/com/example/SpringbootApplication.class


BIN
springboot/target/classes/com/example/common/Constants.class


BIN
springboot/target/classes/com/example/common/Result.class


BIN
springboot/target/classes/com/example/common/config/CorsConfig.class


BIN
springboot/target/classes/com/example/common/config/DruidConfig$1.class


BIN
springboot/target/classes/com/example/common/config/DruidConfig.class


BIN
springboot/target/classes/com/example/common/config/JwtInterceptor.class


BIN
springboot/target/classes/com/example/common/config/Properties/DruidProperties.class


BIN
springboot/target/classes/com/example/common/config/WebConfig.class


BIN
springboot/target/classes/com/example/common/enums/OrderStatusDELIVERY.class


BIN
springboot/target/classes/com/example/common/enums/OrderStatusToShop.class


BIN
springboot/target/classes/com/example/common/enums/OrderType.class


BIN
springboot/target/classes/com/example/common/enums/ResultCodeEnum.class


BIN
springboot/target/classes/com/example/common/enums/RoleEnum.class


BIN
springboot/target/classes/com/example/controller/AdminController.class


BIN
springboot/target/classes/com/example/controller/AdminstoreController.class


BIN
springboot/target/classes/com/example/controller/AuditsController.class


BIN
springboot/target/classes/com/example/controller/FileController.class


BIN
springboot/target/classes/com/example/controller/NoticeController.class


BIN
springboot/target/classes/com/example/controller/OrdersController.class


BIN
springboot/target/classes/com/example/controller/ProductController.class


BIN
springboot/target/classes/com/example/controller/ProductypeController.class


BIN
springboot/target/classes/com/example/controller/SaleStatementController.class


BIN
springboot/target/classes/com/example/controller/StoreController.class


BIN
springboot/target/classes/com/example/controller/UserController.class


BIN
springboot/target/classes/com/example/controller/WebController.class


BIN
springboot/target/classes/com/example/entity/Account.class


BIN
springboot/target/classes/com/example/entity/Admin.class


BIN
springboot/target/classes/com/example/entity/Adminstore.class


BIN
springboot/target/classes/com/example/entity/Audits.class


BIN
springboot/target/classes/com/example/entity/Notice.class


BIN
springboot/target/classes/com/example/entity/Orders.class


BIN
springboot/target/classes/com/example/entity/Product.class


BIN
springboot/target/classes/com/example/entity/Productype.class


BIN
springboot/target/classes/com/example/entity/SaleStatement.class


BIN
springboot/target/classes/com/example/entity/Store.class


BIN
springboot/target/classes/com/example/entity/User.class


BIN
springboot/target/classes/com/example/exception/CustomException.class


BIN
springboot/target/classes/com/example/exception/GlobalExceptionHandler.class


BIN
springboot/target/classes/com/example/mapper/AdminMapper.class


BIN
springboot/target/classes/com/example/mapper/AdminstoreMapper.class


BIN
springboot/target/classes/com/example/mapper/AuditsMapper.class


BIN
springboot/target/classes/com/example/mapper/NoticeMapper.class


BIN
springboot/target/classes/com/example/mapper/OrdersMapper.class


BIN
springboot/target/classes/com/example/mapper/ProductMapper.class


BIN
springboot/target/classes/com/example/mapper/ProductypeMapper.class


BIN
springboot/target/classes/com/example/mapper/SaleStatementMapper.class


BIN
springboot/target/classes/com/example/mapper/StoreMapper.class


BIN
springboot/target/classes/com/example/mapper/UserMapper.class


BIN
springboot/target/classes/com/example/service/AdminService.class


BIN
springboot/target/classes/com/example/service/AdminStoreService.class


BIN
springboot/target/classes/com/example/service/AuditsService.class


BIN
springboot/target/classes/com/example/service/NoticeService.class


BIN
springboot/target/classes/com/example/service/OrdersService.class


BIN
springboot/target/classes/com/example/service/ProductService.class


BIN
springboot/target/classes/com/example/service/ProductypeService.class


BIN
springboot/target/classes/com/example/service/SaleStatementService.class


BIN
springboot/target/classes/com/example/service/StoreService.class


BIN
springboot/target/classes/com/example/service/UserService.class


BIN
springboot/target/classes/com/example/utils/TokenUtils.class


BIN
springboot/target/classes/com/example/utils/generate/CodeGenerator.class


BIN
springboot/target/classes/com/example/utils/generate/ControllerGenerator.class


BIN
springboot/target/classes/com/example/utils/generate/EntityGenerator.class


BIN
springboot/target/classes/com/example/utils/generate/MapperGenerator.class


BIN
springboot/target/classes/com/example/utils/generate/ServiceGenerator.class


BIN
springboot/target/classes/com/example/utils/generate/Table.class


BIN
springboot/target/classes/com/example/utils/generate/TableColumn.class


BIN
springboot/target/classes/com/example/utils/generate/VueGenerator.class


+ 91 - 0
springboot/target/classes/mapper/AdminMapper.xml

@@ -0,0 +1,91 @@
+<?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.example.mapper.AdminMapper">
+
+    <sql id="Base_Column_List">
+        id,username,password,name,phone,email,avatar,role
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Admin">
+        select
+        <include refid="Base_Column_List" />
+        from admin
+        <where>
+            <if test="id != null"> and id= #{id}</if>
+            <if test="username != null"> and username like concat('%', #{username}, '%')</if>
+            <if test="password != null"> and password= #{password}</if>
+            <if test="name != null"> and name= #{name}</if>
+            <if test="phone != null"> and phone= #{phone}</if>
+            <if test="email != null"> and email= #{email}</if>
+            <if test="avatar != null"> and avatar= #{avatar}</if>
+            <if test="role != null"> and role= #{role}</if>
+        </where>
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Admin">
+        select
+        <include refid="Base_Column_List" />
+        from admin
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from admin
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Admin" useGeneratedKeys="true">
+        insert into admin
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                <if test="id != null">id,</if>
+                <if test="username != null">username,</if>
+                <if test="password != null">password,</if>
+                <if test="name != null">name,</if>
+                <if test="phone != null">phone,</if>
+                <if test="email != null">email,</if>
+                <if test="avatar != null">avatar,</if>
+                <if test="role != null">role,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                <if test="id != null">#{id},</if>
+                <if test="username != null">#{username},</if>
+                <if test="password != null">#{password},</if>
+                <if test="name != null">#{name},</if>
+                <if test="phone != null">#{phone},</if>
+                <if test="email != null">#{email},</if>
+                <if test="avatar != null">#{avatar},</if>
+                <if test="role != null">#{role},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Admin">
+        update admin
+        <set>
+            <if test="username != null">
+                username = #{username},
+            </if>
+            <if test="password != null">
+                password = #{password},
+            </if>
+            <if test="name != null">
+                name = #{name},
+            </if>
+            <if test="phone != null">
+                phone = #{phone},
+            </if>
+            <if test="email != null">
+                email = #{email},
+            </if>
+            <if test="avatar != null">
+                avatar = #{avatar},
+            </if>
+            <if test="role != null">
+                role = #{role},
+            </if>
+        </set>
+        where id = #{id} 
+    </update>
+
+</mapper>

+ 93 - 0
springboot/target/classes/mapper/AdminstoreMapper.xml

@@ -0,0 +1,93 @@
+<?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.example.mapper.AdminstoreMapper">
+
+    <sql id="Base_Column_List">
+        id,username,password,name,avatar,role,phone,email
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Adminstore">
+        select
+        <include refid="Base_Column_List" />
+        from adminstore
+        <where>
+            <if test="id != null"> and id = #{id}</if>
+            <if test="username != null"> and username like concat('%', #{username}, '%')</if>
+            <if test="password != null"> and password like concat('%', #{password}, '%')</if>
+            <if test="name != null"> and name like concat('%', #{name}, '%')</if>
+            <if test="avatar != null"> and avatar like concat('%', #{avatar}, '%')</if>
+            <if test="role != null"> and role like concat('%', #{role}, '%')</if>
+            <if test="phone != null"> and phone like concat('%', #{phone}, '%')</if>
+            <if test="email != null"> and email like concat('%', #{email}, '%')</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Adminstore">
+        select
+        <include refid="Base_Column_List" />
+        from adminstore
+        where id = #{id}
+    </select>
+
+
+    <delete id="deleteById">
+        delete from adminstore
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Adminstore" useGeneratedKeys="true">
+        insert into adminstore
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="username != null">username,</if>
+            <if test="password != null">password,</if>
+            <if test="name != null">name,</if>
+            <if test="avatar != null">avatar,</if>
+            <if test="role != null">role,</if>
+            <if test="phone != null">phone,</if>
+            <if test="email != null">email,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="username != null">#{username},</if>
+            <if test="password != null">#{password},</if>
+            <if test="name != null">#{name},</if>
+            <if test="avatar != null">#{avatar},</if>
+            <if test="role != null">#{role},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="email != null">#{email},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Adminstore">
+        update adminstore
+        <set>
+            <if test="username != null">
+                username = #{username},
+            </if>
+            <if test="password != null">
+                password = #{password},
+            </if>
+            <if test="name != null">
+                name = #{name},
+            </if>
+            <if test="avatar != null">
+                avatar = #{avatar},
+            </if>
+            <if test="role != null">
+                role = #{role},
+            </if>
+            <if test="phone != null">
+                phone = #{phone},
+            </if>
+            <if test="email != null">
+                email = #{email},
+            </if>
+        </set>
+        where id = #{id} 
+    </update>
+
+</mapper>

+ 86 - 0
springboot/target/classes/mapper/AuditsMapper.xml

@@ -0,0 +1,86 @@
+<?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.example.mapper.AuditsMapper">
+
+    <sql id="Base_Column_List">
+        id,idcard,business_license,reason,pics_url,camera_url,store_id
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Audits">
+        select
+        <include refid="Base_Column_List" />
+        from audits
+        <where>
+            <if test="id != null"> and id = #{id}</if>
+            <if test="idcard != null"> and idcard like concat('%', #{idcard}, '%')</if>
+            <if test="businessLicense != null"> and business_license like concat('%', #{businessLicense}, '%')</if>
+            <if test="reason != null"> and reason like concat('%', #{reason}, '%')</if>
+            <if test="picsUrl != null"> and pics_url like concat('%', #{picsUrl}, '%')</if>
+            <if test="cameraUrl != null"> and camera_url like concat('%', #{cameraUrl}, '%')</if>
+            <if test="storeId != null"> and store_id = #{storeId}</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Audits">
+        select
+        <include refid="Base_Column_List" />
+        from audits
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from audits
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Audits" useGeneratedKeys="true">
+        insert into audits
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="idcard != null">idcard,</if>
+            <if test="businessLicense != null">business_license,</if>
+            <if test="reason != null">reason,</if>
+            <if test="picsUrl != null">pics_url,</if>
+            <if test="cameraUrl != null">camera_url,</if>
+            <if test="storeId != null">store_id,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="idcard != null">#{idcard},</if>
+            <if test="businessLicense != null">#{businessLicense},</if>
+            <if test="reason != null">#{reason},</if>
+            <if test="picsUrl != null">#{picsUrl},</if>
+            <if test="cameraUrl != null">#{cameraUrl},</if>
+            <if test="storeId != null">#{storeId},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Audits">
+        update audits
+        <set>
+            <if test="idcard != null">
+                idcard = #{idcard},
+            </if>
+            <if test="businessLicense != null">
+                business_license = #{businessLicense},
+            </if>
+            <if test="reason != null">
+                reason = #{reason},
+            </if>
+            <if test="picsUrl != null">
+                pics_url = #{picsUrl},
+            </if>
+            <if test="cameraUrl != null">
+                camera_url = #{cameraUrl},
+            </if>
+            <if test="storeId != null">
+                store_id = #{storeId},
+            </if>
+        </set>
+        where id = #{id} 
+    </update>
+
+</mapper>

+ 74 - 0
springboot/target/classes/mapper/NoticeMapper.xml

@@ -0,0 +1,74 @@
+<?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.example.mapper.NoticeMapper">
+
+    <sql id="Base_Column_List">
+        id,title,content,time,user
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Notice">
+        select
+        <include refid="Base_Column_List" />
+        from notice
+        <where>
+            <if test="id != null"> and id= #{id}</if>
+            <if test="title != null"> and title like concat('%', #{title}, '%')</if>
+            <if test="content != null"> and content= #{content}</if>
+            <if test="time != null"> and time= #{time}</if>
+            <if test="user != null"> and user= #{user}</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Notice">
+        select
+        <include refid="Base_Column_List" />
+        from notice
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from notice
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Notice" useGeneratedKeys="true">
+        insert into notice
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+                <if test="id != null">id,</if>
+                <if test="title != null">title,</if>
+                <if test="content != null">content,</if>
+                <if test="time != null">time,</if>
+                <if test="user != null">user,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+                <if test="id != null">#{id},</if>
+                <if test="title != null">#{title},</if>
+                <if test="content != null">#{content},</if>
+                <if test="time != null">#{time},</if>
+                <if test="user != null">#{user},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Notice">
+        update notice
+        <set>
+            <if test="title != null">
+                title = #{title},
+            </if>
+            <if test="content != null">
+                content = #{content},
+            </if>
+            <if test="time != null">
+                time = #{time},
+            </if>
+            <if test="user != null">
+                user = #{user},
+            </if>
+        </set>
+        where id = #{id} 
+    </update>
+
+</mapper>

+ 110 - 0
springboot/target/classes/mapper/OrdersMapper.xml

@@ -0,0 +1,110 @@
+<?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.example.mapper.OrdersMapper">
+
+    <sql id="Base_Column_List">
+        id,bit_pay,origin_pay,user_id,address_id,time_pre,time_order,order_state,order_remark,trans_code,order_type_id
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Orders">
+        select
+        <include refid="Base_Column_List" />
+        from orders
+        <where>
+            <if test="id != null"> and id = #{id}</if>
+            <if test="bitPay != null"> and bit_pay = #{bitPay}</if>
+            <if test="originPay != null"> and origin_pay = #{originPay}</if>
+            <if test="userId != null"> and user_id = #{userId}</if>
+            <if test="addressId != null"> and address_id = #{addressId}</if>
+            <if test="timePre != null"> and time_pre like concat('%', #{timePre}, '%')</if>
+            <if test="timeOrder != null"> and time_order like concat('%', #{timeOrder}, '%')</if>
+            <if test="orderState != null"> and order_state like concat('%', #{orderState}, '%')</if>
+            <if test="orderRemark != null"> and order_remark like concat('%', #{orderRemark}, '%')</if>
+            <if test="transCode != null"> and trans_code like concat('%', #{transCode}, '%')</if>
+            <if test="orderTypeId != null"> and order_type_id = #{orderTypeId}</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Orders">
+        select
+        <include refid="Base_Column_List" />
+        from orders
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from orders
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Orders" useGeneratedKeys="true">
+        insert into orders
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="bitPay != null">bit_pay,</if>
+            <if test="originPay != null">origin_pay,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="addressId != null">address_id,</if>
+            <if test="timePre != null">time_pre,</if>
+            <if test="timeOrder != null">time_order,</if>
+            <if test="orderState != null">order_state,</if>
+            <if test="orderRemark != null">order_remark,</if>
+            <if test="transCode != null">trans_code,</if>
+            <if test="orderTypeId != null">order_type_id,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="bitPay != null">#{bitPay},</if>
+            <if test="originPay != null">#{originPay},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="addressId != null">#{addressId},</if>
+            <if test="timePre != null">#{timePre},</if>
+            <if test="timeOrder != null">#{timeOrder},</if>
+            <if test="orderState != null">#{orderState},</if>
+            <if test="orderRemark != null">#{orderRemark},</if>
+            <if test="transCode != null">#{transCode},</if>
+            <if test="orderTypeId != null">#{orderTypeId},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Orders">
+        update orders
+        <set>
+            <if test="bitPay != null">
+                bit_pay = #{bitPay},
+            </if>
+            <if test="originPay != null">
+                origin_pay = #{originPay},
+            </if>
+            <if test="userId != null">
+                user_id = #{userId},
+            </if>
+            <if test="addressId != null">
+                address_id = #{addressId},
+            </if>
+            <if test="timePre != null">
+                time_pre = #{timePre},
+            </if>
+            <if test="timeOrder != null">
+                time_order = #{timeOrder},
+            </if>
+            <if test="orderState != null">
+                order_state = #{orderState},
+            </if>
+            <if test="orderRemark != null">
+                order_remark = #{orderRemark},
+            </if>
+            <if test="transCode != null">
+                trans_code = #{transCode},
+            </if>
+            <if test="orderTypeId != null">
+                order_type_id = #{orderTypeId},
+            </if>
+        </set>
+        where id = #{id} 
+    </update>
+
+</mapper>

+ 86 - 0
springboot/target/classes/mapper/ProductMapper.xml

@@ -0,0 +1,86 @@
+<?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.example.mapper.ProductMapper">
+
+    <sql id="Base_Column_List">
+        id,product_state,product_name,product_icons,product_ids,product_bid_price,product_sell_price
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Product">
+        select
+        <include refid="Base_Column_List" />
+        from product
+        <where>
+            <if test="id != null"> and id = #{id}</if>
+            <if test="productState != null"> and product_state like concat('%', #{productState}, '%')</if>
+            <if test="productName != null"> and product_name like concat('%', #{productName}, '%')</if>
+            <if test="productIcons != null"> and product_icons like concat('%', #{productIcons}, '%')</if>
+            <if test="productTypeIds != null"> and product_type_ids like concat('%', #{productIds}, '%')</if>
+            <if test="productBidPrice != null"> and product_bid_price = #{productBidPrice}</if>
+            <if test="productSellPrice != null"> and product_sell_price = #{productSellPrice}</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Product">
+        select
+        <include refid="Base_Column_List" />
+        from product
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from product
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Product" useGeneratedKeys="true">
+        insert into product
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="productState != null">product_state,</if>
+            <if test="productName != null">product_name,</if>
+            <if test="productIcons != null">product_icons,</if>
+            <if test="productTypeIds != null">product_type_ids,</if>
+            <if test="productBidPrice != null">product_bid_price,</if>
+            <if test="productSellPrice != null">product_sell_price,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="productState != null">#{productState},</if>
+            <if test="productName != null">#{productName},</if>
+            <if test="productIcons != null">#{productIcons},</if>
+            <if test="productTypeIds != null">#{productTypeIds},</if>
+            <if test="productBidPrice != null">#{productBidPrice},</if>
+            <if test="productSellPrice != null">#{productSellPrice},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Product">
+        update product
+        <set>
+            <if test="productState != null">
+                product_state = #{productState},
+            </if>
+            <if test="productName != null">
+                product_name = #{productName},
+            </if>
+            <if test="productIcons != null">
+                product_icons = #{productIcons},
+            </if>
+            <if test="productIds != null">
+                product_type_ids = #{productTypeIds},
+            </if>
+            <if test="productBidPrice != null">
+                product_bid_price = #{productBidPrice},
+            </if>
+            <if test="productSellPrice != null">
+                product_sell_price = #{productSellPrice},
+            </if>
+        </set>
+        where id = #{id} 
+    </update>
+
+</mapper>

+ 56 - 0
springboot/target/classes/mapper/ProductypeMapper.xml

@@ -0,0 +1,56 @@
+<?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.example.mapper.ProductypeMapper">
+
+    <sql id="Base_Column_List">
+        id,product_name
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Productype">
+        select
+        <include refid="Base_Column_List" />
+        from product_type
+        <where>
+            <if test="id != null"> and id = #{id}</if>
+            <if test="productName != null"> and product_name like concat('%', #{productName}, '%')</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Productype">
+        select
+        <include refid="Base_Column_List" />
+        from product_type
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from product_type
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Productype" useGeneratedKeys="true">
+        insert into product_type
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="productName != null">product_name,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="productName != null">#{productName},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Productype">
+        update product_type
+        <set>
+            <if test="productName != null">
+                product_name = #{productName},
+            </if>
+        </set>
+        where id = #{id} 
+    </update>
+
+</mapper>

+ 80 - 0
springboot/target/classes/mapper/SaleStatementMapper.xml

@@ -0,0 +1,80 @@
+<?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.example.mapper.SaleStatementMapper">
+
+    <sql id="Base_Column_List">
+        id,shop_id,count,time_over,product_id,amount
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.SaleStatement">
+        select
+        <include refid="Base_Column_List" />
+        from sale_statement
+        <where>
+            <if test="id != null"> and id = #{id}</if>
+            <if test="shopId != null"> and shop_id = #{shopId}</if>
+            <if test="count != null"> and count = #{count}</if>
+            <if test="timeOver != null"> and time_over like concat('%', #{timeOver}, '%')</if>
+            <if test="productId != null"> and product_id = #{productId}</if>
+            <if test="amount != null"> and amount = #{amount}</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.SaleStatement">
+        select
+        <include refid="Base_Column_List" />
+        from sale_statement
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from sale_statement
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.SaleStatement" useGeneratedKeys="true">
+        insert into sale_statement
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="shopId != null">shop_id,</if>
+            <if test="count != null">count,</if>
+            <if test="timeOver != null">time_over,</if>
+            <if test="productId != null">product_id,</if>
+            <if test="amount != null">amount,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="shopId != null">#{shopId},</if>
+            <if test="count != null">#{count},</if>
+            <if test="timeOver != null">#{timeOver},</if>
+            <if test="productId != null">#{productId},</if>
+            <if test="amount != null">#{amount},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.SaleStatement">
+        update sale_statement
+        <set>
+            <if test="shopId != null">
+                shop_id = #{shopId},
+            </if>
+            <if test="count != null">
+                count = #{count},
+            </if>
+            <if test="timeOver != null">
+                time_over = #{timeOver},
+            </if>
+            <if test="productId != null">
+                product_id = #{productId},
+            </if>
+            <if test="amount != null">
+                amount = #{amount},
+            </if>
+        </set>
+        where id = #{id} 
+    </update>
+
+</mapper>

+ 74 - 0
springboot/target/classes/mapper/StoreMapper.xml

@@ -0,0 +1,74 @@
+<?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.example.mapper.StoreMapper">
+
+    <sql id="Base_Column_List">
+        id,owner_id,products_ids,address_ids,product_type_ids
+    </sql>
+
+    <select id="selectAll" resultType="com.example.entity.Store">
+        select
+        <include refid="Base_Column_List" />
+        from store
+        <where>
+            <if test="id != null"> and id = #{id}</if>
+            <if test="ownerId != null"> and owner_id = #{ownerId}</if>
+            <if test="productsIds != null"> and products_ids like concat('%', #{productsIds}, '%')</if>
+            <if test="addressIds != null"> and address_ids like concat('%', #{addressIds}, '%')</if>
+            <if test="productTypeIds != null"> and product_type_ids like concat('%', #{productTypeIds}, '%')</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.Store">
+        select
+        <include refid="Base_Column_List" />
+        from store
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from store
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.Store" useGeneratedKeys="true">
+        insert into store
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="ownerId != null">owner_id,</if>
+            <if test="productsIds != null">products_ids,</if>
+            <if test="addressIds != null">address_ids,</if>
+            <if test="productTypeIds != null">product_type_ids,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="ownerId != null">#{ownerId},</if>
+            <if test="productsIds != null">#{productsIds},</if>
+            <if test="addressIds != null">#{addressIds},</if>
+            <if test="productTypeIds != null">#{productTypeIds},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.Store">
+        update store
+        <set>
+            <if test="ownerId != null">
+                owner_id = #{ownerId},
+            </if>
+            <if test="productsIds != null">
+                products_ids = #{productsIds},
+            </if>
+            <if test="addressIds != null">
+                address_ids = #{addressIds},
+            </if>
+            <if test="productTypeIds != null">
+                product_type_ids = #{productTypeIds},
+            </if>
+        </set>
+        where id = #{id} 
+    </update>
+
+</mapper>

+ 124 - 0
springboot/target/classes/mapper/UserMapper.xml

@@ -0,0 +1,124 @@
+<?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.example.mapper.UserMapper">
+
+    <sql id="Base_Column_List">
+        id,username,password,name,avatar,role,sex,phone,account,openid,address_ids
+    </sql>
+
+    <!--    用户名查询 -->
+    <select id="selectByUserName" resultType="com.example.entity.Account">
+        select
+        <include refid="Base_Column_List" />
+        from user
+        where username = #{username}
+    </select>
+    <!--    根据openid查找查找用户信息 -->
+    <select id="selectByOpenid" resultType="com.example.entity.User">
+        select
+        <include refid="Base_Column_List" />
+        from user
+        where openid = #{openid}
+    </select>
+    <select id="selectAll" resultType="com.example.entity.User">
+        select
+        <include refid="Base_Column_List" />
+        from user
+        <where>
+            <if test="id != null"> and id = #{id}</if>
+            <if test="username != null"> and username like concat('%', #{username}, '%')</if>
+            <if test="password != null"> and password like concat('%', #{password}, '%')</if>
+            <if test="name != null"> and name like concat('%', #{name}, '%')</if>
+            <if test="avatar != null"> and avatar like concat('%', #{avatar}, '%')</if>
+            <if test="role != null"> and role like concat('%', #{role}, '%')</if>
+            <if test="sex != null"> and sex like concat('%', #{sex}, '%')</if>
+            <if test="phone != null"> and phone like concat('%', #{phone}, '%')</if>
+            <if test="account != null"> and account = #{account}</if>
+            <if test="openid != null"> and openid like concat('%', #{openid}, '%')</if>
+            <if test="addressIds != null"> and address_ids like concat('%', #{addressIds}, '%')</if>
+        </where>
+        order by id desc
+    </select>
+
+    <select id="selectById" resultType="com.example.entity.User">
+        select
+        <include refid="Base_Column_List" />
+        from user
+        where id = #{id}
+    </select>
+
+    <delete id="deleteById">
+        delete from user
+        where  id = #{id}
+    </delete>
+
+    <insert id="insert" parameterType="com.example.entity.User" useGeneratedKeys="true">
+        insert into user
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="username != null">username,</if>
+            <if test="password != null">password,</if>
+            <if test="name != null">name,</if>
+            <if test="avatar != null">avatar,</if>
+            <if test="role != null">role,</if>
+            <if test="sex != null">sex,</if>
+            <if test="phone != null">phone,</if>
+            <if test="account != null">account,</if>
+            <if test="openid != null">openid,</if>
+            <if test="addressIds != null">address_ids,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="username != null">#{username},</if>
+            <if test="password != null">#{password},</if>
+            <if test="name != null">#{name},</if>
+            <if test="avatar != null">#{avatar},</if>
+            <if test="role != null">#{role},</if>
+            <if test="sex != null">#{sex},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="account != null">#{account},</if>
+            <if test="openid != null">#{openid},</if>
+            <if test="addressIds != null">#{addressIds},</if>
+        </trim>
+    </insert>
+
+    <update id="updateById" parameterType="com.example.entity.User">
+        update user
+        <set>
+            <if test="username != null">
+                username = #{username},
+            </if>
+            <if test="password != null">
+                password = #{password},
+            </if>
+            <if test="name != null">
+                name = #{name},
+            </if>
+            <if test="avatar != null">
+                avatar = #{avatar},
+            </if>
+            <if test="role != null">
+                role = #{role},
+            </if>
+            <if test="sex != null">
+                sex = #{sex},
+            </if>
+            <if test="phone != null">
+                phone = #{phone},
+            </if>
+            <if test="account != null">
+                account = #{account},
+            </if>
+            <if test="openid != null">
+                openid = #{openid},
+            </if>
+            <if test="addressIds != null">
+                address_ids = #{addressIds},
+            </if>
+        </set>
+        where id = #{id} 
+    </update>
+
+</mapper>