Browse Source

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

0714Star 11 months ago
parent
commit
8d066f8092
65 changed files with 4397 additions and 263 deletions
  1. 1 0
      .gitignore
  2. 10 0
      .idea/jarRepositories.xml
  3. 1 1
      .idea/misc.xml
  4. 6 0
      .idea/vcs.xml
  5. 40 1
      springboot/pom.xml
  6. 1 0
      springboot/src/main/java/com/example/SpringbootApplication.java
  7. 89 0
      springboot/src/main/java/com/example/common/config/DruidConfig.java
  8. 78 0
      springboot/src/main/java/com/example/common/config/Properties/DruidProperties.java
  9. 86 0
      springboot/src/main/java/com/example/controller/AuditsController.java
  10. 1 1
      springboot/src/main/java/com/example/controller/FileController.java
  11. 86 0
      springboot/src/main/java/com/example/controller/OrdersController.java
  12. 86 0
      springboot/src/main/java/com/example/controller/ProductController.java
  13. 86 0
      springboot/src/main/java/com/example/controller/ProductypeController.java
  14. 86 0
      springboot/src/main/java/com/example/controller/SaleStatementController.java
  15. 86 0
      springboot/src/main/java/com/example/controller/StoreController.java
  16. 86 0
      springboot/src/main/java/com/example/controller/UserController.java
  17. 18 2
      springboot/src/main/java/com/example/controller/WebController.java
  18. 82 0
      springboot/src/main/java/com/example/entity/Audits.java
  19. 123 0
      springboot/src/main/java/com/example/entity/Orders.java
  20. 83 0
      springboot/src/main/java/com/example/entity/Product.java
  21. 32 0
      springboot/src/main/java/com/example/entity/Productype.java
  22. 73 0
      springboot/src/main/java/com/example/entity/SaleStatement.java
  23. 62 0
      springboot/src/main/java/com/example/entity/Store.java
  24. 123 0
      springboot/src/main/java/com/example/entity/User.java
  25. 36 0
      springboot/src/main/java/com/example/mapper/AuditsMapper.java
  26. 36 0
      springboot/src/main/java/com/example/mapper/OrdersMapper.java
  27. 36 0
      springboot/src/main/java/com/example/mapper/ProductMapper.java
  28. 36 0
      springboot/src/main/java/com/example/mapper/ProductypeMapper.java
  29. 36 0
      springboot/src/main/java/com/example/mapper/SaleStatementMapper.java
  30. 36 0
      springboot/src/main/java/com/example/mapper/StoreMapper.java
  31. 41 0
      springboot/src/main/java/com/example/mapper/UserMapper.java
  32. 73 0
      springboot/src/main/java/com/example/service/AuditsService.java
  33. 73 0
      springboot/src/main/java/com/example/service/OrdersService.java
  34. 73 0
      springboot/src/main/java/com/example/service/ProductService.java
  35. 73 0
      springboot/src/main/java/com/example/service/ProductypeService.java
  36. 73 0
      springboot/src/main/java/com/example/service/SaleStatementService.java
  37. 73 0
      springboot/src/main/java/com/example/service/StoreService.java
  38. 98 0
      springboot/src/main/java/com/example/service/UserService.java
  39. 5 5
      springboot/src/main/java/com/example/utils/generate/CodeGenerator.java
  40. 57 0
      springboot/src/main/resources/application-druid.yml
  41. 4 4
      springboot/src/main/resources/application.yml
  42. 86 0
      springboot/src/main/resources/mapper/AuditsMapper.xml
  43. 110 0
      springboot/src/main/resources/mapper/OrdersMapper.xml
  44. 86 0
      springboot/src/main/resources/mapper/ProductMapper.xml
  45. 56 0
      springboot/src/main/resources/mapper/ProductypeMapper.xml
  46. 80 0
      springboot/src/main/resources/mapper/SaleStatementMapper.xml
  47. 74 0
      springboot/src/main/resources/mapper/StoreMapper.xml
  48. 124 0
      springboot/src/main/resources/mapper/UserMapper.xml
  49. 0 42
      springboot/src/main/resources/sql/address.sql
  50. 0 44
      springboot/src/main/resources/sql/admin.sql
  51. 0 44
      springboot/src/main/resources/sql/adminstore.sql
  52. 0 40
      springboot/src/main/resources/sql/notice.sql
  53. 0 45
      springboot/src/main/resources/sql/user.sql
  54. 23 7
      vue/src/router/index.js
  55. 130 0
      vue/src/views/AdminMgr.vue
  56. 3 0
      vue/src/views/Login.vue
  57. 21 19
      vue/src/views/Manager.vue
  58. 175 8
      vue/src/views/manager/Manager/Audit.vue
  59. 46 0
      vue/src/views/manager/ShopManager/AdminHome.vue
  60. 200 0
      vue/src/views/manager/ShopManager/Orders.vue
  61. 183 0
      vue/src/views/manager/ShopManager/Product.vue
  62. 163 0
      vue/src/views/manager/ShopManager/ProductType.vue
  63. 179 0
      vue/src/views/manager/ShopManager/SaleStatement.vue
  64. 175 0
      vue/src/views/manager/ShopManager/Store.vue
  65. 199 0
      vue/src/views/manager/ShopManager/User.vue

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+/vue/node_modules/

+ 10 - 0
.idea/jarRepositories.xml

@@ -1,6 +1,11 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="RemoteRepositoriesConfiguration">
+    <remote-repository>
+      <option name="id" value="spring-milestones" />
+      <option name="name" value="Spring Milestones" />
+      <option name="url" value="https://repo.spring.io/milestone" />
+    </remote-repository>
     <remote-repository>
       <option name="id" value="public" />
       <option name="name" value="aliyun nexus" />
@@ -11,6 +16,11 @@
       <option name="name" value="Maven Central repository" />
       <option name="url" value="https://repo1.maven.org/maven2" />
     </remote-repository>
+    <remote-repository>
+      <option name="id" value="spring-snapshots" />
+      <option name="name" value="Spring Snapshots" />
+      <option name="url" value="https://repo.spring.io/snapshot" />
+    </remote-repository>
     <remote-repository>
       <option name="id" value="jboss.community" />
       <option name="name" value="JBoss Community repository" />

+ 1 - 1
.idea/misc.xml

@@ -12,7 +12,7 @@
       </list>
     </option>
   </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_20" default="true" project-jdk-name="20" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/out" />
   </component>
 </project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 40 - 1
springboot/pom.xml

@@ -20,6 +20,7 @@
         <java.version>1.8</java.version>
     </properties>
 
+
     <dependencies>
         <dependency>
             <groupId>org.springframework.boot</groupId>
@@ -62,7 +63,17 @@
             <artifactId>java-jwt</artifactId>
             <version>4.3.0</version>
         </dependency>
-
+        <!-- 数据库连接池  -->
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>1.2.8</version>
+        </dependency>
+<!--        openai      -->
+        <dependency>
+            <groupId>org.springframework.ai</groupId>
+            <artifactId>spring-ai-openai-spring-boot-starter</artifactId>
+        </dependency>
     </dependencies>
 
     <build>
@@ -86,5 +97,33 @@
                 <enabled>true</enabled>
             </releases>
         </repository>
+<!--    openAi 下载仓库-->
+        <repository>
+            <id>spring-milestones</id>
+            <name>Spring Milestones</name>
+            <url>https://repo.spring.io/milestone</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>spring-snapshots</id>
+            <name>Spring Snapshots</name>
+            <url>https://repo.spring.io/snapshot</url>
+            <releases>
+                <enabled>false</enabled>
+            </releases>
+        </repository>
     </repositories>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.ai</groupId>
+                <artifactId>spring-ai-bom</artifactId>
+                <version>0.8.1-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
 </project>

+ 1 - 0
springboot/src/main/java/com/example/SpringbootApplication.java

@@ -10,6 +10,7 @@ public class SpringbootApplication {
 
     public static void main(String[] args) {
         SpringApplication.run(SpringbootApplication.class, args);
+        System.out.println("服务器运行成功了...Tomcat started on port(s): 2441 (http) with context path ''");
     }
 
 }

+ 89 - 0
springboot/src/main/java/com/example/common/config/DruidConfig.java

@@ -0,0 +1,89 @@
+package com.example.common.config;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder;
+import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
+import com.alibaba.druid.util.Utils;
+import com.example.common.config.Properties.DruidProperties;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.servlet.*;
+import javax.sql.DataSource;
+import java.io.IOException;
+
+/**
+ * 功能: Druid数据库连接池配置,依赖于DruidProperties获取配置文件的信息
+ *
+ * @author 熊浩毅
+ * @time 2024-04-15 12:25
+ * @Description
+ */
+@Configuration
+public class DruidConfig { // druid数据源
+
+    @Bean
+    @ConfigurationProperties("spring.datasource.druid.master") // 主数据源配置
+    public DataSource masterDataSource(DruidProperties druidProperties){
+        DruidDataSource dataSource =DruidDataSourceBuilder.create().build();
+        return druidProperties.dataSource(dataSource);
+    }
+
+    @Bean
+    @ConfigurationProperties("spring.datasource.druid.slave")// 从数据源配置
+    @ConditionalOnProperty(prefix = "spring.datasource.druid.slave", name = "enabled", havingValue = "true")
+    public DataSource slaveDataSource(DruidProperties druidProperties)
+    {
+        DruidDataSource dataSource = DruidDataSourceBuilder.create().build();
+        return druidProperties.dataSource(dataSource);
+    }
+//////////////////////////// 不重要
+    /**去除监控页面底部的广告
+     *
+     */
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    @Bean
+    @ConditionalOnProperty(name = "spring.datasource.druid.statViewServlet.enabled", havingValue = "true")
+    public FilterRegistrationBean removeDruidFilterRegistrationBean(DruidStatProperties properties)
+    {
+        // 获取web监控页面的参数
+        DruidStatProperties.StatViewServlet config = properties.getStatViewServlet();
+        // 提取common.js的配置路径
+        String pattern = config.getUrlPattern() != null ? config.getUrlPattern() : "/druid/*";
+        String commonJsPattern = pattern.replaceAll("\\*", "js/common.js");
+        final String filePath = "support/http/resources/js/common.js";
+        // 创建filter进行过滤
+        Filter filter = new Filter()
+        {
+            @Override
+            public void init(FilterConfig filterConfig) throws ServletException
+            {
+            }
+            @Override
+            public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
+                    throws IOException, ServletException
+            {
+                chain.doFilter(request, response);
+                // 重置缓冲区,响应头不会被重置
+                response.resetBuffer();
+                // 获取common.js
+                String text = Utils.readFromResource(filePath);
+                // 正则替换banner, 除去底部的广告信息
+                text = text.replaceAll("<a.*?banner\"></a><br/>", "");
+                text = text.replaceAll("powered.*?shrek.wang</a>", "");
+                response.getWriter().write(text);
+            }
+            @Override
+            public void destroy()
+            {
+            }
+        };
+        FilterRegistrationBean registrationBean = new FilterRegistrationBean();
+        registrationBean.setFilter(filter);
+        registrationBean.addUrlPatterns(commonJsPattern);
+        return registrationBean;
+    }
+}

+ 78 - 0
springboot/src/main/java/com/example/common/config/Properties/DruidProperties.java

@@ -0,0 +1,78 @@
+package com.example.common.config.Properties;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * 功能:从 applicaiton-durid.yml 文件中获取连接池的配置参数
+ *
+ * @author 熊浩毅
+ * @time 2024-04-15 12:50
+ * @Description
+ */
+@Configuration
+public class DruidProperties {
+    @Value("${spring.datasource.druid.initialSize}")
+    private int initialSize;
+
+    @Value("${spring.datasource.druid.minIdle}")
+    private int minIdle;
+
+    @Value("${spring.datasource.druid.maxActive}")
+    private int maxActive;
+
+    @Value("${spring.datasource.druid.maxWait}")
+    private int maxWait;
+
+    @Value("${spring.datasource.druid.timeBetweenEvictionRunsMillis}")
+    private int timeBetweenEvictionRunsMillis;
+
+    @Value("${spring.datasource.druid.minEvictableIdleTimeMillis}")
+    private int minEvictableIdleTimeMillis;
+
+    @Value("${spring.datasource.druid.maxEvictableIdleTimeMillis}")
+    private int maxEvictableIdleTimeMillis;
+
+    @Value("${spring.datasource.druid.validationQuery}")
+    private String validationQuery;
+
+    @Value("${spring.datasource.druid.testWhileIdle}")
+    private boolean testWhileIdle;
+
+    @Value("${spring.datasource.druid.testOnBorrow}")
+    private boolean testOnBorrow;
+
+    @Value("${spring.datasource.druid.testOnReturn}")
+    private boolean testOnReturn;
+
+    public DruidDataSource dataSource(DruidDataSource datasource)
+    {
+        /** 配置初始化大小、最小、最大 */
+        datasource.setInitialSize(initialSize);
+        datasource.setMaxActive(maxActive);
+        datasource.setMinIdle(minIdle);
+
+        /** 配置获取连接等待超时的时间 */
+        datasource.setMaxWait(maxWait);
+
+        /** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */
+        datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis);
+
+        /** 配置一个连接在池中最小、最大生存的时间,单位是毫秒 */
+        datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis);
+        datasource.setMaxEvictableIdleTimeMillis(maxEvictableIdleTimeMillis);
+
+        /**
+         * 用来检测连接是否有效的sql,要求是一个查询语句,常用select 'x'。如果validationQuery为null,testOnBorrow、testOnReturn、testWhileIdle都不会起作用。
+         */
+        datasource.setValidationQuery(validationQuery);
+        /** 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 */
+        datasource.setTestWhileIdle(testWhileIdle);
+        /** 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */
+        datasource.setTestOnBorrow(testOnBorrow);
+        /** 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */
+        datasource.setTestOnReturn(testOnReturn);
+        return datasource;
+    }
+}

+ 86 - 0
springboot/src/main/java/com/example/controller/AuditsController.java

@@ -0,0 +1,86 @@
+package com.example.controller;
+
+import com.example.common.Result;
+import com.example.entity.Audits;
+import com.example.service.AuditsService;
+import com.github.pagehelper.PageInfo;
+import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 申请审核表前端操作接口
+ **/
+@RestController
+@RequestMapping("/audits")
+public class AuditsController {
+
+    @Resource
+    private AuditsService auditsService;
+
+    /**
+     * 新增
+     */
+    @PostMapping("/add")
+    public Result add(@RequestBody Audits audits) {
+        auditsService.add(audits);
+        return Result.success();
+    }
+
+    /**
+     * 删除
+     */
+    @DeleteMapping("/delete/{id}")
+    public Result deleteById(@PathVariable Integer id) {
+        auditsService.deleteById(id);
+        return Result.success();
+    }
+
+    /**
+     * 批量删除
+     */
+    @DeleteMapping("/delete/batch")
+    public Result deleteBatch(@RequestBody List<Integer> ids) {
+        auditsService.deleteBatch(ids);
+        return Result.success();
+    }
+
+    /**
+     * 修改
+     */
+    @PutMapping("/update")
+    public Result updateById(@RequestBody Audits audits) {
+        auditsService.updateById(audits);
+        return Result.success();
+    }
+
+    /**
+     * 根据ID查询
+     */
+    @GetMapping("/selectById/{id}")
+    public Result selectById(@PathVariable Integer id) {
+        Audits audits = auditsService.selectById(id);
+        return Result.success(audits);
+    }
+
+    /**
+     * 查询所有
+     */
+    @GetMapping("/selectAll")
+    public Result selectAll(Audits audits) {
+        List<Audits> list = auditsService.selectAll(audits);
+        return Result.success(list);
+    }
+
+    /**
+     * 分页查询
+     */
+    @GetMapping("/selectPage")
+    public Result selectPage(Audits audits,
+                             @RequestParam(defaultValue = "1") Integer pageNum,
+                             @RequestParam(defaultValue = "10") Integer pageSize) {
+        PageInfo<Audits> page = auditsService.selectPage(audits, pageNum, pageSize);
+        return Result.success(page);
+    }
+
+}

+ 1 - 1
springboot/src/main/java/com/example/controller/FileController.java

@@ -23,7 +23,7 @@ public class FileController {
     // 文件上传存储路径
     private static final String filePath = System.getProperty("user.dir") + "/files/";
 
-    @Value("${server.port:9090}")
+    @Value("${server.port:8080}")
     private String port;
 
     @Value("${ip:localhost}")

+ 86 - 0
springboot/src/main/java/com/example/controller/OrdersController.java

@@ -0,0 +1,86 @@
+package com.example.controller;
+
+import com.example.common.Result;
+import com.example.entity.Orders;
+import com.example.service.OrdersService;
+import com.github.pagehelper.PageInfo;
+import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 订单表前端操作接口
+ **/
+@RestController
+@RequestMapping("/orders")
+public class OrdersController {
+
+    @Resource
+    private OrdersService ordersService;
+
+    /**
+     * 新增
+     */
+    @PostMapping("/add")
+    public Result add(@RequestBody Orders orders) {
+        ordersService.add(orders);
+        return Result.success();
+    }
+
+    /**
+     * 删除
+     */
+    @DeleteMapping("/delete/{id}")
+    public Result deleteById(@PathVariable Integer id) {
+        ordersService.deleteById(id);
+        return Result.success();
+    }
+
+    /**
+     * 批量删除
+     */
+    @DeleteMapping("/delete/batch")
+    public Result deleteBatch(@RequestBody List<Integer> ids) {
+        ordersService.deleteBatch(ids);
+        return Result.success();
+    }
+
+    /**
+     * 修改
+     */
+    @PutMapping("/update")
+    public Result updateById(@RequestBody Orders orders) {
+        ordersService.updateById(orders);
+        return Result.success();
+    }
+
+    /**
+     * 根据ID查询
+     */
+    @GetMapping("/selectById/{id}")
+    public Result selectById(@PathVariable Integer id) {
+        Orders orders = ordersService.selectById(id);
+        return Result.success(orders);
+    }
+
+    /**
+     * 查询所有
+     */
+    @GetMapping("/selectAll")
+    public Result selectAll(Orders orders) {
+        List<Orders> list = ordersService.selectAll(orders);
+        return Result.success(list);
+    }
+
+    /**
+     * 分页查询
+     */
+    @GetMapping("/selectPage")
+    public Result selectPage(Orders orders,
+                             @RequestParam(defaultValue = "1") Integer pageNum,
+                             @RequestParam(defaultValue = "10") Integer pageSize) {
+        PageInfo<Orders> page = ordersService.selectPage(orders, pageNum, pageSize);
+        return Result.success(page);
+    }
+
+}

+ 86 - 0
springboot/src/main/java/com/example/controller/ProductController.java

@@ -0,0 +1,86 @@
+package com.example.controller;
+
+import com.example.common.Result;
+import com.example.entity.Product;
+import com.example.service.ProductService;
+import com.github.pagehelper.PageInfo;
+import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 前端操作接口
+ **/
+@RestController
+@RequestMapping("/product")
+public class ProductController {
+
+    @Resource
+    private ProductService productService;
+
+    /**
+     * 新增
+     */
+    @PostMapping("/add")
+    public Result add(@RequestBody Product product) {
+        productService.add(product);
+        return Result.success();
+    }
+
+    /**
+     * 删除
+     */
+    @DeleteMapping("/delete/{id}")
+    public Result deleteById(@PathVariable Integer id) {
+        productService.deleteById(id);
+        return Result.success();
+    }
+
+    /**
+     * 批量删除
+     */
+    @DeleteMapping("/delete/batch")
+    public Result deleteBatch(@RequestBody List<Integer> ids) {
+        productService.deleteBatch(ids);
+        return Result.success();
+    }
+
+    /**
+     * 修改
+     */
+    @PutMapping("/update")
+    public Result updateById(@RequestBody Product product) {
+        productService.updateById(product);
+        return Result.success();
+    }
+
+    /**
+     * 根据ID查询
+     */
+    @GetMapping("/selectById/{id}")
+    public Result selectById(@PathVariable Integer id) {
+        Product product = productService.selectById(id);
+        return Result.success(product);
+    }
+
+    /**
+     * 查询所有
+     */
+    @GetMapping("/selectAll")
+    public Result selectAll(Product product) {
+        List<Product> list = productService.selectAll(product);
+        return Result.success(list);
+    }
+
+    /**
+     * 分页查询
+     */
+    @GetMapping("/selectPage")
+    public Result selectPage(Product product,
+                             @RequestParam(defaultValue = "1") Integer pageNum,
+                             @RequestParam(defaultValue = "10") Integer pageSize) {
+        PageInfo<Product> page = productService.selectPage(product, pageNum, pageSize);
+        return Result.success(page);
+    }
+
+}

+ 86 - 0
springboot/src/main/java/com/example/controller/ProductypeController.java

@@ -0,0 +1,86 @@
+package com.example.controller;
+
+import com.example.common.Result;
+import com.example.entity.Productype;
+import com.example.service.ProductypeService;
+import com.github.pagehelper.PageInfo;
+import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 前端操作接口
+ **/
+@RestController
+@RequestMapping("/productype")
+public class ProductypeController {
+
+    @Resource
+    private ProductypeService productypeService;
+
+    /**
+     * 新增
+     */
+    @PostMapping("/add")
+    public Result add(@RequestBody Productype productype) {
+        productypeService.add(productype);
+        return Result.success();
+    }
+
+    /**
+     * 删除
+     */
+    @DeleteMapping("/delete/{id}")
+    public Result deleteById(@PathVariable Integer id) {
+        productypeService.deleteById(id);
+        return Result.success();
+    }
+
+    /**
+     * 批量删除
+     */
+    @DeleteMapping("/delete/batch")
+    public Result deleteBatch(@RequestBody List<Integer> ids) {
+        productypeService.deleteBatch(ids);
+        return Result.success();
+    }
+
+    /**
+     * 修改
+     */
+    @PutMapping("/update")
+    public Result updateById(@RequestBody Productype productype) {
+        productypeService.updateById(productype);
+        return Result.success();
+    }
+
+    /**
+     * 根据ID查询
+     */
+    @GetMapping("/selectById/{id}")
+    public Result selectById(@PathVariable Integer id) {
+        Productype productype = productypeService.selectById(id);
+        return Result.success(productype);
+    }
+
+    /**
+     * 查询所有
+     */
+    @GetMapping("/selectAll")
+    public Result selectAll(Productype productype) {
+        List<Productype> list = productypeService.selectAll(productype);
+        return Result.success(list);
+    }
+
+    /**
+     * 分页查询
+     */
+    @GetMapping("/selectPage")
+    public Result selectPage(Productype productype,
+                             @RequestParam(defaultValue = "1") Integer pageNum,
+                             @RequestParam(defaultValue = "10") Integer pageSize) {
+        PageInfo<Productype> page = productypeService.selectPage(productype, pageNum, pageSize);
+        return Result.success(page);
+    }
+
+}

+ 86 - 0
springboot/src/main/java/com/example/controller/SaleStatementController.java

@@ -0,0 +1,86 @@
+package com.example.controller;
+
+import com.example.common.Result;
+import com.example.entity.SaleStatement;
+import com.example.service.SaleStatementService;
+import com.github.pagehelper.PageInfo;
+import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 销量表前端操作接口
+ **/
+@RestController
+@RequestMapping("/saleStatement")
+public class SaleStatementController {
+
+    @Resource
+    private SaleStatementService saleStatementService;
+
+    /**
+     * 新增
+     */
+    @PostMapping("/add")
+    public Result add(@RequestBody SaleStatement saleStatement) {
+        saleStatementService.add(saleStatement);
+        return Result.success();
+    }
+
+    /**
+     * 删除
+     */
+    @DeleteMapping("/delete/{id}")
+    public Result deleteById(@PathVariable Integer id) {
+        saleStatementService.deleteById(id);
+        return Result.success();
+    }
+
+    /**
+     * 批量删除
+     */
+    @DeleteMapping("/delete/batch")
+    public Result deleteBatch(@RequestBody List<Integer> ids) {
+        saleStatementService.deleteBatch(ids);
+        return Result.success();
+    }
+
+    /**
+     * 修改
+     */
+    @PutMapping("/update")
+    public Result updateById(@RequestBody SaleStatement saleStatement) {
+        saleStatementService.updateById(saleStatement);
+        return Result.success();
+    }
+
+    /**
+     * 根据ID查询
+     */
+    @GetMapping("/selectById/{id}")
+    public Result selectById(@PathVariable Integer id) {
+        SaleStatement saleStatement = saleStatementService.selectById(id);
+        return Result.success(saleStatement);
+    }
+
+    /**
+     * 查询所有
+     */
+    @GetMapping("/selectAll")
+    public Result selectAll(SaleStatement saleStatement) {
+        List<SaleStatement> list = saleStatementService.selectAll(saleStatement);
+        return Result.success(list);
+    }
+
+    /**
+     * 分页查询
+     */
+    @GetMapping("/selectPage")
+    public Result selectPage(SaleStatement saleStatement,
+                             @RequestParam(defaultValue = "1") Integer pageNum,
+                             @RequestParam(defaultValue = "10") Integer pageSize) {
+        PageInfo<SaleStatement> page = saleStatementService.selectPage(saleStatement, pageNum, pageSize);
+        return Result.success(page);
+    }
+
+}

+ 86 - 0
springboot/src/main/java/com/example/controller/StoreController.java

@@ -0,0 +1,86 @@
+package com.example.controller;
+
+import com.example.common.Result;
+import com.example.entity.Store;
+import com.example.service.StoreService;
+import com.github.pagehelper.PageInfo;
+import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 前端操作接口
+ **/
+@RestController
+@RequestMapping("/store")
+public class StoreController {
+
+    @Resource
+    private StoreService storeService;
+
+    /**
+     * 新增
+     */
+    @PostMapping("/add")
+    public Result add(@RequestBody Store store) {
+        storeService.add(store);
+        return Result.success();
+    }
+
+    /**
+     * 删除
+     */
+    @DeleteMapping("/delete/{id}")
+    public Result deleteById(@PathVariable Integer id) {
+        storeService.deleteById(id);
+        return Result.success();
+    }
+
+    /**
+     * 批量删除
+     */
+    @DeleteMapping("/delete/batch")
+    public Result deleteBatch(@RequestBody List<Integer> ids) {
+        storeService.deleteBatch(ids);
+        return Result.success();
+    }
+
+    /**
+     * 修改
+     */
+    @PutMapping("/update")
+    public Result updateById(@RequestBody Store store) {
+        storeService.updateById(store);
+        return Result.success();
+    }
+
+    /**
+     * 根据ID查询
+     */
+    @GetMapping("/selectById/{id}")
+    public Result selectById(@PathVariable Integer id) {
+        Store store = storeService.selectById(id);
+        return Result.success(store);
+    }
+
+    /**
+     * 查询所有
+     */
+    @GetMapping("/selectAll")
+    public Result selectAll(Store store) {
+        List<Store> list = storeService.selectAll(store);
+        return Result.success(list);
+    }
+
+    /**
+     * 分页查询
+     */
+    @GetMapping("/selectPage")
+    public Result selectPage(Store store,
+                             @RequestParam(defaultValue = "1") Integer pageNum,
+                             @RequestParam(defaultValue = "10") Integer pageSize) {
+        PageInfo<Store> page = storeService.selectPage(store, pageNum, pageSize);
+        return Result.success(page);
+    }
+
+}

+ 86 - 0
springboot/src/main/java/com/example/controller/UserController.java

@@ -0,0 +1,86 @@
+package com.example.controller;
+
+import com.example.common.Result;
+import com.example.entity.User;
+import com.example.service.UserService;
+import com.github.pagehelper.PageInfo;
+import org.springframework.web.bind.annotation.*;
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * 客户表前端操作接口
+ **/
+@RestController
+@RequestMapping("/user")
+public class UserController {
+
+    @Resource
+    private UserService userService;
+
+    /**
+     * 新增
+     */
+    @PostMapping("/add")
+    public Result add(@RequestBody User user) {
+        userService.add(user);
+        return Result.success();
+    }
+
+    /**
+     * 删除
+     */
+    @DeleteMapping("/delete/{id}")
+    public Result deleteById(@PathVariable Integer id) {
+        userService.deleteById(id);
+        return Result.success();
+    }
+
+    /**
+     * 批量删除
+     */
+    @DeleteMapping("/delete/batch")
+    public Result deleteBatch(@RequestBody List<Integer> ids) {
+        userService.deleteBatch(ids);
+        return Result.success();
+    }
+
+    /**
+     * 修改
+     */
+    @PutMapping("/update")
+    public Result updateById(@RequestBody User user) {
+        userService.updateById(user);
+        return Result.success();
+    }
+
+    /**
+     * 根据ID查询
+     */
+    @GetMapping("/selectById/{id}")
+    public Result selectById(@PathVariable Integer id) {
+        User user = userService.selectById(id);
+        return Result.success(user);
+    }
+
+    /**
+     * 查询所有
+     */
+    @GetMapping("/selectAll")
+    public Result selectAll(User user) {
+        List<User> list = userService.selectAll(user);
+        return Result.success(list);
+    }
+
+    /**
+     * 分页查询
+     */
+    @GetMapping("/selectPage")
+    public Result selectPage(User user,
+                             @RequestParam(defaultValue = "1") Integer pageNum,
+                             @RequestParam(defaultValue = "10") Integer pageSize) {
+        PageInfo<User> page = userService.selectPage(user, pageNum, pageSize);
+        return Result.success(page);
+    }
+
+}

+ 18 - 2
springboot/src/main/java/com/example/controller/WebController.java

@@ -7,18 +7,26 @@ import com.example.common.enums.ResultCodeEnum;
 import com.example.common.enums.RoleEnum;
 import com.example.entity.Account;
 import com.example.service.AdminService;
+import com.example.service.AdminStoreService;
+import com.example.service.UserService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 
 /**
- * 基础前端接口
+ * 无token 前端接口
  */
 @RestController
 public class WebController {
-
+    private static final Logger log = LoggerFactory.getLogger(WebController.class);
     @Resource
     private AdminService adminService;
+    @Resource
+    private AdminStoreService adminStoreService;
+    @Resource
+    private UserService userService;
 
     @GetMapping("/")
     public Result hello() {
@@ -36,6 +44,10 @@ public class WebController {
         }
         if (RoleEnum.ADMIN.name().equals(account.getRole())) {
             account = adminService.login(account);
+        }else if(RoleEnum.STOREKEEPER.name().equals(account.getRole())){
+            account = adminStoreService.login(account);
+        }else if(RoleEnum.USER.name().equals(account.getRole())){
+            account = userService.login(account);
         }
         return Result.success(account);
     }
@@ -51,6 +63,8 @@ public class WebController {
         }
         if (RoleEnum.ADMIN.name().equals(account.getRole())) {
             adminService.register(account);
+        }else if(RoleEnum.STOREKEEPER.name().equals(account.getRole())){
+            adminStoreService.register(account);
         }
         return Result.success();
     }
@@ -70,4 +84,6 @@ public class WebController {
         return Result.success();
     }
 
+
+
 }

+ 82 - 0
springboot/src/main/java/com/example/entity/Audits.java

@@ -0,0 +1,82 @@
+package com.example.entity;
+
+import java.io.Serializable;
+
+/**
+ * 申请审核表
+*/
+public class Audits implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Integer id;
+    /** 身份证 */
+    private String idcard;
+    /** 营业执照url */
+    private String businessLicense;
+    /** 申请理由 */
+    private String reason;
+    /** 市区营业图片 */
+    private String picsUrl;
+    /** 监控地址 */
+    private String cameraUrl;
+    /** 店铺申请人id用adminstore的id */
+    private Integer storeId;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getIdcard() {
+        return idcard;
+    }
+
+    public void setIdcard(String idcard) {
+        this.idcard = idcard;
+    }
+
+    public String getBusinessLicense() {
+        return businessLicense;
+    }
+
+    public void setBusinessLicense(String businessLicense) {
+        this.businessLicense = businessLicense;
+    }
+
+    public String getReason() {
+        return reason;
+    }
+
+    public void setReason(String reason) {
+        this.reason = reason;
+    }
+
+    public String getPicsUrl() {
+        return picsUrl;
+    }
+
+    public void setPicsUrl(String picsUrl) {
+        this.picsUrl = picsUrl;
+    }
+
+    public String getCameraUrl() {
+        return cameraUrl;
+    }
+
+    public void setCameraUrl(String cameraUrl) {
+        this.cameraUrl = cameraUrl;
+    }
+
+    public Integer getStoreId() {
+        return storeId;
+    }
+
+    public void setStoreId(Integer storeId) {
+        this.storeId = storeId;
+    }
+
+}

+ 123 - 0
springboot/src/main/java/com/example/entity/Orders.java

@@ -0,0 +1,123 @@
+package com.example.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * 订单表
+*/
+public class Orders implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Integer id;
+    /** 实付金额 */
+    private BigDecimal bitPay;
+    /** 应付金额 */
+    private BigDecimal originPay;
+    /** 下单用户id */
+    private Integer userId;
+    /** 收货地址id */
+    private Integer addressId;
+    /** 预计送达时间 */
+    private String timePre;
+    /** 下单时间 */
+    private String timeOrder;
+    /** 订单状态 */
+    private String orderState;
+    /** 订单备注 */
+    private String orderRemark;
+    /** 交易单号 */
+    private String transCode;
+    /** 订单类型id */
+    private Integer orderTypeId;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public BigDecimal getBitPay() {
+        return bitPay;
+    }
+
+    public void setBitPay(BigDecimal bitPay) {
+        this.bitPay = bitPay;
+    }
+
+    public BigDecimal getOriginPay() {
+        return originPay;
+    }
+
+    public void setOriginPay(BigDecimal originPay) {
+        this.originPay = originPay;
+    }
+
+    public Integer getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Integer userId) {
+        this.userId = userId;
+    }
+
+    public Integer getAddressId() {
+        return addressId;
+    }
+
+    public void setAddressId(Integer addressId) {
+        this.addressId = addressId;
+    }
+
+    public String getTimePre() {
+        return timePre;
+    }
+
+    public void setTimePre(String timePre) {
+        this.timePre = timePre;
+    }
+
+    public String getTimeOrder() {
+        return timeOrder;
+    }
+
+    public void setTimeOrder(String timeOrder) {
+        this.timeOrder = timeOrder;
+    }
+
+    public String getOrderState() {
+        return orderState;
+    }
+
+    public void setOrderState(String orderState) {
+        this.orderState = orderState;
+    }
+
+    public String getOrderRemark() {
+        return orderRemark;
+    }
+
+    public void setOrderRemark(String orderRemark) {
+        this.orderRemark = orderRemark;
+    }
+
+    public String getTransCode() {
+        return transCode;
+    }
+
+    public void setTransCode(String transCode) {
+        this.transCode = transCode;
+    }
+
+    public Integer getOrderTypeId() {
+        return orderTypeId;
+    }
+
+    public void setOrderTypeId(Integer orderTypeId) {
+        this.orderTypeId = orderTypeId;
+    }
+
+}

+ 83 - 0
springboot/src/main/java/com/example/entity/Product.java

@@ -0,0 +1,83 @@
+package com.example.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * 
+*/
+public class Product implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Integer id;
+    /** 产品状态 */
+    private String productState;
+    /** 产品名称 */
+    private String productName;
+    /** 产品图标url */
+    private String productIcons;
+    /** 产品类型ids */
+    private String productTypeIds;
+    /** 定价 */
+    private BigDecimal productBidPrice;
+    /** 实付价格 */
+    private BigDecimal productSellPrice;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getProductState() {
+        return productState;
+    }
+
+    public void setProductState(String productState) {
+        this.productState = productState;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public String getProductIcons() {
+        return productIcons;
+    }
+
+    public void setProductIcons(String productIcons) {
+        this.productIcons = productIcons;
+    }
+
+    public String getProductTypeIds() {
+        return productTypeIds;
+    }
+
+    public void setProductTypeIds(String productTypeIds) {
+        this.productTypeIds = productTypeIds;
+    }
+
+    public BigDecimal getProductBidPrice() {
+        return productBidPrice;
+    }
+
+    public void setProductBidPrice(BigDecimal productBidPrice) {
+        this.productBidPrice = productBidPrice;
+    }
+
+    public BigDecimal getProductSellPrice() {
+        return productSellPrice;
+    }
+
+    public void setProductSellPrice(BigDecimal productSellPrice) {
+        this.productSellPrice = productSellPrice;
+    }
+
+}

+ 32 - 0
springboot/src/main/java/com/example/entity/Productype.java

@@ -0,0 +1,32 @@
+package com.example.entity;
+
+import java.io.Serializable;
+
+/**
+ * 
+*/
+public class Productype implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Integer id;
+    /** 产品名称 */
+    private String productName;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+}

+ 73 - 0
springboot/src/main/java/com/example/entity/SaleStatement.java

@@ -0,0 +1,73 @@
+package com.example.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * 销量表
+*/
+public class SaleStatement implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Integer id;
+    /** 店铺id */
+    private Integer shopId;
+    /** 商品数量 */
+    private Integer count;
+    /** 完成时间 */
+    private String timeOver;
+    /** 商品id */
+    private Integer productId;
+    /** 金额 */
+    private BigDecimal amount;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getShopId() {
+        return shopId;
+    }
+
+    public void setShopId(Integer shopId) {
+        this.shopId = shopId;
+    }
+
+    public Integer getCount() {
+        return count;
+    }
+
+    public void setCount(Integer count) {
+        this.count = count;
+    }
+
+    public String getTimeOver() {
+        return timeOver;
+    }
+
+    public void setTimeOver(String timeOver) {
+        this.timeOver = timeOver;
+    }
+
+    public Integer getProductId() {
+        return productId;
+    }
+
+    public void setProductId(Integer productId) {
+        this.productId = productId;
+    }
+
+    public BigDecimal getAmount() {
+        return amount;
+    }
+
+    public void setAmount(BigDecimal amount) {
+        this.amount = amount;
+    }
+
+}

+ 62 - 0
springboot/src/main/java/com/example/entity/Store.java

@@ -0,0 +1,62 @@
+package com.example.entity;
+
+import java.io.Serializable;
+
+/**
+ * 
+*/
+public class Store implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** id */
+    private Integer id;
+    /** 店铺主id */
+    private Integer ownerId;
+    /** 产品列表ids */
+    private String productsIds;
+    /** 地址列表ids */
+    private String addressIds;
+    /**  */
+    private String productTypeIds;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getOwnerId() {
+        return ownerId;
+    }
+
+    public void setOwnerId(Integer ownerId) {
+        this.ownerId = ownerId;
+    }
+
+    public String getProductsIds() {
+        return productsIds;
+    }
+
+    public void setProductsIds(String productsIds) {
+        this.productsIds = productsIds;
+    }
+
+    public String getAddressIds() {
+        return addressIds;
+    }
+
+    public void setAddressIds(String addressIds) {
+        this.addressIds = addressIds;
+    }
+
+    public String getProductTypeIds() {
+        return productTypeIds;
+    }
+
+    public void setProductTypeIds(String productTypeIds) {
+        this.productTypeIds = productTypeIds;
+    }
+
+}

+ 123 - 0
springboot/src/main/java/com/example/entity/User.java

@@ -0,0 +1,123 @@
+package com.example.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * 客户表
+*/
+public class User implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /** 用户id */
+    private Integer id;
+    /** 用户名 */
+    private String username;
+    /** 密码 */
+    private String password;
+    /** 用户昵称 */
+    private String name;
+    /** 头像网址 */
+    private String avatar;
+    /** 用户类型 */
+    private String role;
+    /** 性别 */
+    private String sex;
+    /** 手机号 */
+    private String phone;
+    /** 金额 */
+    private BigDecimal account;
+    /** openid */
+    private String openid;
+    /** 用户地址ids */
+    private String addressIds;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public String getUsername() {
+        return username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
+    public String getRole() {
+        return role;
+    }
+
+    public void setRole(String role) {
+        this.role = role;
+    }
+
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
+    public BigDecimal getAccount() {
+        return account;
+    }
+
+    public void setAccount(BigDecimal account) {
+        this.account = account;
+    }
+
+    public String getOpenid() {
+        return openid;
+    }
+
+    public void setOpenid(String openid) {
+        this.openid = openid;
+    }
+
+    public String getAddressIds() {
+        return addressIds;
+    }
+
+    public void setAddressIds(String addressIds) {
+        this.addressIds = addressIds;
+    }
+
+}

+ 36 - 0
springboot/src/main/java/com/example/mapper/AuditsMapper.java

@@ -0,0 +1,36 @@
+package com.example.mapper;
+
+import com.example.entity.Audits;
+import java.util.List;
+
+/**
+ * 操作audits相关数据接口
+*/
+public interface AuditsMapper {
+
+    /**
+      * 新增
+    */
+    int insert(Audits audits);
+
+    /**
+      * 删除
+    */
+    int deleteById(Integer id);
+
+    /**
+      * 修改
+    */
+    int updateById(Audits audits);
+
+    /**
+      * 根据ID查询
+    */
+    Audits selectById(Integer id);
+
+    /**
+      * 查询所有
+    */
+    List<Audits> selectAll(Audits audits);
+
+}

+ 36 - 0
springboot/src/main/java/com/example/mapper/OrdersMapper.java

@@ -0,0 +1,36 @@
+package com.example.mapper;
+
+import com.example.entity.Orders;
+import java.util.List;
+
+/**
+ * 操作orders相关数据接口
+*/
+public interface OrdersMapper {
+
+    /**
+      * 新增
+    */
+    int insert(Orders orders);
+
+    /**
+      * 删除
+    */
+    int deleteById(Integer id);
+
+    /**
+      * 修改
+    */
+    int updateById(Orders orders);
+
+    /**
+      * 根据ID查询
+    */
+    Orders selectById(Integer id);
+
+    /**
+      * 查询所有
+    */
+    List<Orders> selectAll(Orders orders);
+
+}

+ 36 - 0
springboot/src/main/java/com/example/mapper/ProductMapper.java

@@ -0,0 +1,36 @@
+package com.example.mapper;
+
+import com.example.entity.Product;
+import java.util.List;
+
+/**
+ * 操作product相关数据接口
+*/
+public interface ProductMapper {
+
+    /**
+      * 新增
+    */
+    int insert(Product product);
+
+    /**
+      * 删除
+    */
+    int deleteById(Integer id);
+
+    /**
+      * 修改
+    */
+    int updateById(Product product);
+
+    /**
+      * 根据ID查询
+    */
+    Product selectById(Integer id);
+
+    /**
+      * 查询所有
+    */
+    List<Product> selectAll(Product product);
+
+}

+ 36 - 0
springboot/src/main/java/com/example/mapper/ProductypeMapper.java

@@ -0,0 +1,36 @@
+package com.example.mapper;
+
+import com.example.entity.Productype;
+import java.util.List;
+
+/**
+ * 操作product_type相关数据接口
+*/
+public interface ProductypeMapper {
+
+    /**
+      * 新增
+    */
+    int insert(Productype productype);
+
+    /**
+      * 删除
+    */
+    int deleteById(Integer id);
+
+    /**
+      * 修改
+    */
+    int updateById(Productype productype);
+
+    /**
+      * 根据ID查询
+    */
+    Productype selectById(Integer id);
+
+    /**
+      * 查询所有
+    */
+    List<Productype> selectAll(Productype productype);
+
+}

+ 36 - 0
springboot/src/main/java/com/example/mapper/SaleStatementMapper.java

@@ -0,0 +1,36 @@
+package com.example.mapper;
+
+import com.example.entity.SaleStatement;
+import java.util.List;
+
+/**
+ * 操作sale_statement相关数据接口
+*/
+public interface SaleStatementMapper {
+
+    /**
+      * 新增
+    */
+    int insert(SaleStatement saleStatement);
+
+    /**
+      * 删除
+    */
+    int deleteById(Integer id);
+
+    /**
+      * 修改
+    */
+    int updateById(SaleStatement saleStatement);
+
+    /**
+      * 根据ID查询
+    */
+    SaleStatement selectById(Integer id);
+
+    /**
+      * 查询所有
+    */
+    List<SaleStatement> selectAll(SaleStatement saleStatement);
+
+}

+ 36 - 0
springboot/src/main/java/com/example/mapper/StoreMapper.java

@@ -0,0 +1,36 @@
+package com.example.mapper;
+
+import com.example.entity.Store;
+import java.util.List;
+
+/**
+ * 操作store相关数据接口
+*/
+public interface StoreMapper {
+
+    /**
+      * 新增
+    */
+    int insert(Store store);
+
+    /**
+      * 删除
+    */
+    int deleteById(Integer id);
+
+    /**
+      * 修改
+    */
+    int updateById(Store store);
+
+    /**
+      * 根据ID查询
+    */
+    Store selectById(Integer id);
+
+    /**
+      * 查询所有
+    */
+    List<Store> selectAll(Store store);
+
+}

+ 41 - 0
springboot/src/main/java/com/example/mapper/UserMapper.java

@@ -0,0 +1,41 @@
+package com.example.mapper;
+
+import com.example.entity.Account;
+import com.example.entity.User;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 操作user相关数据接口
+*/
+public interface UserMapper {
+
+    /**
+      * 新增
+    */
+    int insert(User user);
+
+    /**
+      * 删除
+    */
+    int deleteById(Integer id);
+
+    /**
+      * 修改
+    */
+    int updateById(User user);
+
+    /**
+      * 根据ID查询
+    */
+    User selectById(Integer id);
+
+    /**
+      * 查询所有
+    */
+    List<User> selectAll(User user);
+    Account selectByUserName(@Param("username") String username);
+
+    User selectByOpenid(String openid);
+}

+ 73 - 0
springboot/src/main/java/com/example/service/AuditsService.java

@@ -0,0 +1,73 @@
+package com.example.service;
+
+import com.example.entity.Audits;
+import com.example.mapper.AuditsMapper;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import java.util.List;
+
+/**
+ * 申请审核表业务处理
+ **/
+@Service
+public class AuditsService {
+
+    @Resource
+    private AuditsMapper auditsMapper;
+
+    /**
+     * 新增
+     */
+    public void add(Audits audits) {
+        auditsMapper.insert(audits);
+    }
+
+    /**
+     * 删除
+     */
+    public void deleteById(Integer id) {
+        auditsMapper.deleteById(id);
+    }
+
+    /**
+     * 批量删除
+     */
+    public void deleteBatch(List<Integer> ids) {
+        for (Integer id : ids) {
+            auditsMapper.deleteById(id);
+        }
+    }
+
+    /**
+     * 修改
+     */
+    public void updateById(Audits audits) {
+        auditsMapper.updateById(audits);
+    }
+
+    /**
+     * 根据ID查询
+     */
+    public Audits selectById(Integer id) {
+        return auditsMapper.selectById(id);
+    }
+
+    /**
+     * 查询所有
+     */
+    public List<Audits> selectAll(Audits audits) {
+        return auditsMapper.selectAll(audits);
+    }
+
+    /**
+     * 分页查询
+     */
+    public PageInfo<Audits> selectPage(Audits audits, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<Audits> list = auditsMapper.selectAll(audits);
+        return PageInfo.of(list);
+    }
+
+}

+ 73 - 0
springboot/src/main/java/com/example/service/OrdersService.java

@@ -0,0 +1,73 @@
+package com.example.service;
+
+import com.example.entity.Orders;
+import com.example.mapper.OrdersMapper;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import java.util.List;
+
+/**
+ * 订单表业务处理
+ **/
+@Service
+public class OrdersService {
+
+    @Resource
+    private OrdersMapper ordersMapper;
+
+    /**
+     * 新增
+     */
+    public void add(Orders orders) {
+        ordersMapper.insert(orders);
+    }
+
+    /**
+     * 删除
+     */
+    public void deleteById(Integer id) {
+        ordersMapper.deleteById(id);
+    }
+
+    /**
+     * 批量删除
+     */
+    public void deleteBatch(List<Integer> ids) {
+        for (Integer id : ids) {
+            ordersMapper.deleteById(id);
+        }
+    }
+
+    /**
+     * 修改
+     */
+    public void updateById(Orders orders) {
+        ordersMapper.updateById(orders);
+    }
+
+    /**
+     * 根据ID查询
+     */
+    public Orders selectById(Integer id) {
+        return ordersMapper.selectById(id);
+    }
+
+    /**
+     * 查询所有
+     */
+    public List<Orders> selectAll(Orders orders) {
+        return ordersMapper.selectAll(orders);
+    }
+
+    /**
+     * 分页查询
+     */
+    public PageInfo<Orders> selectPage(Orders orders, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<Orders> list = ordersMapper.selectAll(orders);
+        return PageInfo.of(list);
+    }
+
+}

+ 73 - 0
springboot/src/main/java/com/example/service/ProductService.java

@@ -0,0 +1,73 @@
+package com.example.service;
+
+import com.example.entity.Product;
+import com.example.mapper.ProductMapper;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import java.util.List;
+
+/**
+ * 业务处理
+ **/
+@Service
+public class ProductService {
+
+    @Resource
+    private ProductMapper productMapper;
+
+    /**
+     * 新增
+     */
+    public void add(Product product) {
+        productMapper.insert(product);
+    }
+
+    /**
+     * 删除
+     */
+    public void deleteById(Integer id) {
+        productMapper.deleteById(id);
+    }
+
+    /**
+     * 批量删除
+     */
+    public void deleteBatch(List<Integer> ids) {
+        for (Integer id : ids) {
+            productMapper.deleteById(id);
+        }
+    }
+
+    /**
+     * 修改
+     */
+    public void updateById(Product product) {
+        productMapper.updateById(product);
+    }
+
+    /**
+     * 根据ID查询
+     */
+    public Product selectById(Integer id) {
+        return productMapper.selectById(id);
+    }
+
+    /**
+     * 查询所有
+     */
+    public List<Product> selectAll(Product product) {
+        return productMapper.selectAll(product);
+    }
+
+    /**
+     * 分页查询
+     */
+    public PageInfo<Product> selectPage(Product product, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<Product> list = productMapper.selectAll(product);
+        return PageInfo.of(list);
+    }
+
+}

+ 73 - 0
springboot/src/main/java/com/example/service/ProductypeService.java

@@ -0,0 +1,73 @@
+package com.example.service;
+
+import com.example.entity.Productype;
+import com.example.mapper.ProductypeMapper;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import java.util.List;
+
+/**
+ * 业务处理
+ **/
+@Service
+public class ProductypeService {
+
+    @Resource
+    private ProductypeMapper productypeMapper;
+
+    /**
+     * 新增
+     */
+    public void add(Productype productype) {
+        productypeMapper.insert(productype);
+    }
+
+    /**
+     * 删除
+     */
+    public void deleteById(Integer id) {
+        productypeMapper.deleteById(id);
+    }
+
+    /**
+     * 批量删除
+     */
+    public void deleteBatch(List<Integer> ids) {
+        for (Integer id : ids) {
+            productypeMapper.deleteById(id);
+        }
+    }
+
+    /**
+     * 修改
+     */
+    public void updateById(Productype productype) {
+        productypeMapper.updateById(productype);
+    }
+
+    /**
+     * 根据ID查询
+     */
+    public Productype selectById(Integer id) {
+        return productypeMapper.selectById(id);
+    }
+
+    /**
+     * 查询所有
+     */
+    public List<Productype> selectAll(Productype productype) {
+        return productypeMapper.selectAll(productype);
+    }
+
+    /**
+     * 分页查询
+     */
+    public PageInfo<Productype> selectPage(Productype productype, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<Productype> list = productypeMapper.selectAll(productype);
+        return PageInfo.of(list);
+    }
+
+}

+ 73 - 0
springboot/src/main/java/com/example/service/SaleStatementService.java

@@ -0,0 +1,73 @@
+package com.example.service;
+
+import com.example.entity.SaleStatement;
+import com.example.mapper.SaleStatementMapper;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import java.util.List;
+
+/**
+ * 销量表业务处理
+ **/
+@Service
+public class SaleStatementService {
+
+    @Resource
+    private SaleStatementMapper saleStatementMapper;
+
+    /**
+     * 新增
+     */
+    public void add(SaleStatement saleStatement) {
+        saleStatementMapper.insert(saleStatement);
+    }
+
+    /**
+     * 删除
+     */
+    public void deleteById(Integer id) {
+        saleStatementMapper.deleteById(id);
+    }
+
+    /**
+     * 批量删除
+     */
+    public void deleteBatch(List<Integer> ids) {
+        for (Integer id : ids) {
+            saleStatementMapper.deleteById(id);
+        }
+    }
+
+    /**
+     * 修改
+     */
+    public void updateById(SaleStatement saleStatement) {
+        saleStatementMapper.updateById(saleStatement);
+    }
+
+    /**
+     * 根据ID查询
+     */
+    public SaleStatement selectById(Integer id) {
+        return saleStatementMapper.selectById(id);
+    }
+
+    /**
+     * 查询所有
+     */
+    public List<SaleStatement> selectAll(SaleStatement saleStatement) {
+        return saleStatementMapper.selectAll(saleStatement);
+    }
+
+    /**
+     * 分页查询
+     */
+    public PageInfo<SaleStatement> selectPage(SaleStatement saleStatement, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<SaleStatement> list = saleStatementMapper.selectAll(saleStatement);
+        return PageInfo.of(list);
+    }
+
+}

+ 73 - 0
springboot/src/main/java/com/example/service/StoreService.java

@@ -0,0 +1,73 @@
+package com.example.service;
+
+import com.example.entity.Store;
+import com.example.mapper.StoreMapper;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import java.util.List;
+
+/**
+ * 业务处理
+ **/
+@Service
+public class StoreService {
+
+    @Resource
+    private StoreMapper storeMapper;
+
+    /**
+     * 新增
+     */
+    public void add(Store store) {
+        storeMapper.insert(store);
+    }
+
+    /**
+     * 删除
+     */
+    public void deleteById(Integer id) {
+        storeMapper.deleteById(id);
+    }
+
+    /**
+     * 批量删除
+     */
+    public void deleteBatch(List<Integer> ids) {
+        for (Integer id : ids) {
+            storeMapper.deleteById(id);
+        }
+    }
+
+    /**
+     * 修改
+     */
+    public void updateById(Store store) {
+        storeMapper.updateById(store);
+    }
+
+    /**
+     * 根据ID查询
+     */
+    public Store selectById(Integer id) {
+        return storeMapper.selectById(id);
+    }
+
+    /**
+     * 查询所有
+     */
+    public List<Store> selectAll(Store store) {
+        return storeMapper.selectAll(store);
+    }
+
+    /**
+     * 分页查询
+     */
+    public PageInfo<Store> selectPage(Store store, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<Store> list = storeMapper.selectAll(store);
+        return PageInfo.of(list);
+    }
+
+}

+ 98 - 0
springboot/src/main/java/com/example/service/UserService.java

@@ -0,0 +1,98 @@
+package com.example.service;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.example.common.enums.ResultCodeEnum;
+import com.example.common.enums.RoleEnum;
+import com.example.entity.Account;
+import com.example.entity.User;
+import com.example.exception.CustomException;
+import com.example.mapper.UserMapper;
+import com.example.utils.TokenUtils;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import javax.annotation.Resource;
+import org.springframework.stereotype.Service;
+import java.util.List;
+
+/**
+ * 客户表业务处理
+ **/
+@Service
+public class UserService {
+
+    @Resource
+    private UserMapper userMapper;
+
+    /**
+     * 新增
+     */
+    public void add(User user) {
+        userMapper.insert(user);
+    }
+
+    /**
+     * 删除
+     */
+    public void deleteById(Integer id) {
+        userMapper.deleteById(id);
+    }
+
+    /**
+     * 批量删除
+     */
+    public void deleteBatch(List<Integer> ids) {
+        for (Integer id : ids) {
+            userMapper.deleteById(id);
+        }
+    }
+
+    /**
+     * 修改
+     */
+    public void updateById(User user) {
+        userMapper.updateById(user);
+    }
+
+    /**
+     * 根据ID查询
+     */
+    public User selectById(Integer id) {
+        return userMapper.selectById(id);
+    }
+
+    /**
+     * 查询所有
+     */
+    public List<User> selectAll(User user) {
+        return userMapper.selectAll(user);
+    }
+
+    /**
+     * 分页查询
+     */
+    public PageInfo<User> selectPage(User user, Integer pageNum, Integer pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<User> list = userMapper.selectAll(user);
+        return PageInfo.of(list);
+    }
+
+    /**
+     *
+     * @param account
+     * @return
+     */
+    public Account login(Account account) {
+        Account user =userMapper.selectByUserName(account.getUsername());
+        if (ObjectUtil.isNull(user)) {
+            throw new CustomException(ResultCodeEnum.USER_NOT_EXIST_ERROR);
+        }
+        if (!account.getPassword().equals(user.getPassword())) {
+            throw new CustomException(ResultCodeEnum.USER_ACCOUNT_ERROR);
+        }
+        // 生成token
+        String tokenData = user.getId() + "-" + RoleEnum.USER.name();
+        String token = TokenUtils.createToken(tokenData, user.getPassword());
+        user.setToken(token);
+        return user;
+    }
+}

+ 5 - 5
springboot/src/main/java/com/example/utils/generate/CodeGenerator.java

@@ -16,7 +16,7 @@ import java.util.List;
  * 选哟指定数据库的表信息
  */
 public class CodeGenerator {
-    protected static final String url = "jdbc:mysql://localhost:3306/errand?nullCatalogMeansCurrent=true&useInformationSchema=true";
+    protected static final String url = "jdbc:mysql://localhost:3306/fruit_farmer?nullCatalogMeansCurrent=true&useInformationSchema=true";
     protected static final String username = "root";
     protected static final String password = "0714@Xhy";
 
@@ -24,15 +24,15 @@ public class CodeGenerator {
     protected static final String springbootFilePath = projectFilePath + "/springboot/src/main";
     protected static final String javaFilePath = springbootFilePath + "/java";
     protected static final String resourcesFilePath = springbootFilePath + "/resources";
-    protected static final String vueFilePath = projectFilePath + "/vue/src/views/manager";
-    protected static final String basePackageName = "com.xhy";
-    protected static final String baseRootName = "com.xhy.errand";
+    protected static final String vueFilePath = projectFilePath + "/vue/src/views/manager/ShopManager";
+    protected static final String basePackageName = "com.example";
+    protected static final String baseRootName = "com.example";
 
     /**
      * 主类  生成代码
      */
     public static void main(String[] args) {
-        String tableName = "moneytest";
+        String tableName = "user";
         // 生成Entity
         EntityGenerator.generate(tableName);
         // 生成Mapper #

+ 57 - 0
springboot/src/main/resources/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

+ 4 - 4
springboot/src/main/resources/application.yml

@@ -3,11 +3,11 @@ server:
 
 # 数据库配置
 spring:
-  datasource:
-    driver-class-name: com.mysql.cj.jdbc.Driver
-    username: root   #你本地的数据库用户名
-    password: 0714@Xhy #你本地的数据库密码
+  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

+ 86 - 0
springboot/src/main/resources/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>

+ 110 - 0
springboot/src/main/resources/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/src/main/resources/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/src/main/resources/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/src/main/resources/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/src/main/resources/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/src/main/resources/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>

+ 0 - 42
springboot/src/main/resources/sql/address.sql

@@ -1,42 +0,0 @@
-/*
- 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: 14/04/2024 19:15:45
-*/
-
-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', '小淮');
-
-SET FOREIGN_KEY_CHECKS = 1;

+ 0 - 44
springboot/src/main/resources/sql/admin.sql

@@ -1,44 +0,0 @@
-/*
- 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: 14/04/2024 19:15:55
-*/
-
-SET NAMES utf8mb4;
-SET FOREIGN_KEY_CHECKS = 0;
-
--- ----------------------------
--- 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);
-
-SET FOREIGN_KEY_CHECKS = 1;

+ 0 - 44
springboot/src/main/resources/sql/adminstore.sql

@@ -1,44 +0,0 @@
-/*
- 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: 14/04/2024 19:16:07
-*/
-
-SET NAMES utf8mb4;
-SET FOREIGN_KEY_CHECKS = 0;
-
--- ----------------------------
--- 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 '邮箱',
-  PRIMARY KEY (`id`) USING BTREE
-) ENGINE = InnoDB AUTO_INCREMENT = 6 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');
-INSERT INTO `adminstore` VALUES (2, '任瑶', '123', '瑶店主', NULL, 'STOREKEEPER', NULL, NULL);
-INSERT INTO `adminstore` VALUES (3, 'sj', '123', '君君店主', NULL, 'STOREKEEPER', NULL, NULL);
-INSERT INTO `adminstore` VALUES (5, '淮', '123', '熊浩毅', NULL, 'STOREKEEPER', NULL, NULL);
-
-SET FOREIGN_KEY_CHECKS = 1;

+ 0 - 40
springboot/src/main/resources/sql/notice.sql

@@ -1,40 +0,0 @@
-/*
- 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: 14/04/2024 19:16:38
-*/
-
-SET NAMES utf8mb4;
-SET FOREIGN_KEY_CHECKS = 0;
-
--- ----------------------------
--- 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 = 4 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');
-
-SET FOREIGN_KEY_CHECKS = 1;

+ 0 - 45
springboot/src/main/resources/sql/user.sql

@@ -1,45 +0,0 @@
-/*
- 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: 14/04/2024 19:16:46
-*/
-
-SET NAMES utf8mb4;
-SET FOREIGN_KEY_CHECKS = 0;
-
--- ----------------------------
--- 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',
-  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);
-INSERT INTO `user` VALUES (2, 'ry', '123', '喝奶茶的瑶妹', NULL, 'USER', '男', '18779165101', 9934.00, NULL);
-INSERT INTO `user` VALUES (17, '淮小瑞1708502748', 'oYA-Q58ysBMJZymzkAQpBRx_Isc0', '淮小瑞1708502748', NULL, 'USER', NULL, NULL, 0.00, 'oYA-Q58ysBMJZymzkAQpBRx_Isc0');
-
-SET FOREIGN_KEY_CHECKS = 1;

+ 23 - 7
vue/src/router/index.js

@@ -10,7 +10,7 @@ VueRouter.prototype.push = function push (location) {
 }
 
 const routes = [
-  {
+  { // 这个是店铺管理界面
     path: '/',
     name: 'Manager',
     component: () => import('../views/Manager.vue'),
@@ -21,15 +21,32 @@ const routes = [
       { path: 'admin', name: 'Admin', meta: { name: '管理员信息' }, component: () => import('../views/manager/Admin') },
       { path: 'adminPerson', name: 'AdminPerson', meta: { name: '个人信息' }, component: () => import('../views/manager/AdminPerson') },
       { path: 'password', name: 'Password', meta: { name: '修改密码' }, component: () => import('../views/manager/Password') },
-      { path: 'notice', name: 'Notice', meta: { name: '公告信息' }, component: () => import('../views/manager/Notice') },
+      // { path: 'notice', name: 'Notice', meta: { name: '公告信息' }, component: () => import('../views/manager/Notice') },
       { path: 'shopManager', name: 'ShopManager', meta: { name: '店铺管理' }, component: () => import('../views/manager/Shop/Shop.vue') },
-      { path: 'shopOrders', name: 'ShopOrders', meta: { name: '作物生长模块' }, component: () => import('../views/manager/AI/CorpGrown.vue') },
-      { path: 'shopProducts', name: 'ShopProducts', meta: { name: '作物生长模块' }, component: () => import('../views/manager/AI/CorpGrown.vue') },
-      { path: 'shopProducts', name: 'ShopProducts', meta: { name: '作物生长模块' }, component: () => import('../views/manager/AI/CorpGrown.vue') },
+      { path: 'shopOrders', name: 'ShopOrders', meta: { name: '店铺订单' }, component: () => import('../views/manager/Shop/ShopOrders.vue') },
+      { path: 'shopProducts', name: 'ShopProducts', meta: { name: '店铺产品' }, component: () => import('../views/manager/Shop/ShopProducts.vue') },
+      { path: 'corpGrown', name: 'CorpGrown', meta: { name: '作物生长模块' }, component: () => import('../views/manager/AI/CorpGrown.vue') },
       { path: 'shopStatements', name: 'ShopStatements', meta: { name: '店铺报表' }, component: () => import('../views/manager/AI/CorpGrown.vue') },
       { path: 'monitor', name: 'Monitor', meta: { name: '农村监控模块' }, component: () => import('../views/manager/AI/Monitor.vue') },
       { path: 'pestAnalysis', name: 'PestAnalysis', meta: { name: '害虫识别模块' }, component: () => import('../views/manager/AI/PestAnalysis.vue') },
-      { path: 'audit', name: 'Audit', meta: { name: '店铺申请审核' }, component: () => import('../views/manager/Manager/Audit.vue') },
+      // { path: 'audit', name: 'Audit', meta: { name: '店铺申请审核' }, component: () => import('../views/manager/Manager/Audit.vue') },
+    ]
+  },
+  { // 这是管理员界面
+    path:"/adminMgr",
+    name:'AdminManager',
+    component:()=>import('../views/AdminMgr.vue'),
+    redirect:'/adminMgr/home',
+    children: [
+      { path:'/adminMgr/home' , name:'adminHome', meta: {name: '管理员首页' } , component:()=>import('../views/manager/ShopManager/AdminHome.vue')},
+      { path: '/adminMgr/notice', name: 'Notice', meta: { name: '公告信息' }, component: () => import('../views/manager/Notice') },
+      { path: '/adminMgr/ordersManager' , name: 'Orders' ,meta:{name :'订单管理'} ,component:()=>import('../views/manager/ShopManager/Orders.vue')},
+      { path: '/adminMgr/productManager', name:'Products',meta:{name :'产品管理'} ,component:()=>import('../views/manager/ShopManager/Product.vue')},
+      { path: '/adminMgr/saleStatementManager',name:'sale',meta:{name:'销量管理'} ,component:()=>import('../views/manager/ShopManager/SaleStatement.vue')},
+      { path: '/adminMgr/auditManager'  , name:'Audit'    ,meta:{name:'审核管理'} ,component:()=>import('../views/manager/Manager/Audit.vue')},
+      { path: '/adminMgr/productTypeMgr', name:'productType' ,meta:{name:'产品类型管理'} ,component:()=>import('../views/manager/ShopManager/ProductType.vue')},
+      { path: '/adminMgr/store', name:'Store' ,meta:{name:'店铺信息管理'} ,component:()=>import('../views/manager/ShopManager/Store.vue')},
+      { path: '/adminMgr/user', name:'User' ,meta:{name:'用户信息管理'} ,component:()=>import('../views/manager/ShopManager/User.vue')},
     ]
   },
   {
@@ -37,7 +54,6 @@ const routes = [
     name:"AI",
     component:()=>import('../views/manager/AI/Charts.vue'),
     //redirect: '/charts',
-
   },
   {
     path: '/front',

+ 130 - 0
vue/src/views/AdminMgr.vue

@@ -0,0 +1,130 @@
+<template>
+  <div class="manager-container">
+    <!--  头部  -->
+    <div class="manager-header">
+      <div class="manager-header-left">
+        <img src="@/assets/imgs/logo.png" />
+        <div class="title">果蔬农贸<br>管理员系统</div>
+      </div>
+
+      <div class="manager-header-center">
+        <el-breadcrumb separator-class="el-icon-arrow-right">
+          <el-breadcrumb-item :to="{ path: '/adminMgr' }">首页</el-breadcrumb-item>
+          <el-breadcrumb-item :to="{ path: $route.path }">{{ $route.meta.name }}</el-breadcrumb-item>
+        </el-breadcrumb>
+      </div>
+
+      <div class="manager-header-right">
+        <el-dropdown placement="bottom">
+          <div class="avatar">
+            <img :src="user.avatar || 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'" />
+            <div>{{ user.name ||  '管理员' }}</div>
+          </div>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item @click.native="goToPerson">个人信息</el-dropdown-item>
+            <el-dropdown-item @click.native="$router.push('/password')">修改密码</el-dropdown-item>
+            <el-dropdown-item @click.native="logout">退出登录</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </div>
+    </div>
+
+    <!--  主体  -->
+    <div class="manager-main">
+      <!--  侧边栏  -->
+      <div class="manager-main-left">
+        <!--        -->
+        <el-menu :default-openeds="['info', 'user','shop','AI','Admin']" router style="border: none" :default-active="$route.path">
+          <!--          执行路由到/home界面-->
+          <el-menu-item index="/adminMgr">
+            <i class="el-icon-s-home"></i>
+            <span slot="title">系统首页</span>
+          </el-menu-item>
+          <el-submenu index="info">
+            <template slot="title">
+              <i class="el-icon-menu"></i><span>信息管理</span>
+            </template>
+            <el-menu-item index="/adminMgr/notice">公告信息</el-menu-item>
+          </el-submenu>
+
+          <el-submenu index="user">
+            <template slot="title">
+              <i class="el-icon-menu"></i><span>用户管理</span>
+            </template>
+<!--            <el-menu-item index="/admin">管理员信息</el-menu-item>-->
+            <el-menu-item index="/adminMgr/user">用户管理</el-menu-item>
+          </el-submenu>
+
+          <el-submenu index="shop">
+            <template slot="title">
+              <i class="el-icon-menu"></i><span>店铺管理</span>
+            </template>
+            <el-menu-item index="/adminMgr/store">管理店铺</el-menu-item>
+          </el-submenu>
+          <!-- AI 模块 包括视频监控 害虫识别作物判断 等-->
+<!--          <el-submenu index="AI">-->
+<!--            <template slot="title">-->
+<!--              <i class="el-icon-menu"></i><span>高级选项</span>-->
+<!--            </template>-->
+<!--            <el-menu-item index="/corpGrown">作物生长状态</el-menu-item>-->
+<!--            <el-menu-item index="/monitor">农村监控模块</el-menu-item>-->
+<!--            <el-menu-item index="/pestAnalysis">害虫识别模块</el-menu-item>-->
+<!--          </el-submenu>-->
+
+          <el-submenu index = 'Admin'>
+            <template slot="title">
+              <i class="el-icon-menu"></i><span>管理员</span>
+            </template>
+            <el-menu-item index="/adminMgr/auditManager">店铺申请管理</el-menu-item>
+          </el-submenu>
+<!--          <el-submenu index = 'Charts'>-->
+<!--            <template slot="title">-->
+<!--              <i class="el-icon-menu"></i><span>报表</span>-->
+<!--            </template>-->
+<!--            <el-menu-item index="/charts"  @click.native="this.$router.push('/charts')">跳转报表</el-menu-item>-->
+<!--          </el-submenu>-->
+        </el-menu>
+      </div>
+
+      <!--  数据表格  -->
+      <div class="manager-main-right">
+        <router-view @update:user="updateUser" />
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+export default {
+  name: "AdminMgr",
+  data() {
+    return {
+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
+    }
+  },
+  created() {
+    if (!this.user.id) {
+      this.$router.push('/login')
+    }
+  },
+  methods: {
+    updateUser() {
+      this.user = JSON.parse(localStorage.getItem('xm-user') || '{}')   // 重新获取下用户的最新信息
+    },
+    goToPerson() {
+      if (this.user.role === 'ADMIN') {
+        this.$router.push('/adminPerson')
+      }
+    },
+    logout() {
+      localStorage.removeItem('xm-user')
+      this.$router.push('/login')
+    }
+  }
+}
+</script>
+
+<style scoped>
+@import "@/assets/css/manager.css";
+</style>

+ 3 - 0
vue/src/views/Login.vue

@@ -77,7 +77,10 @@ export default {
             if (res.code === '200') {
               localStorage.setItem("xm-user", JSON.stringify(res.data))  // 存储用户数据
               console.log("yes")
+              if(res.data.role == 'STOREKEEPER')
               this.$router.push('/')  // 跳转主页
+              else if(res.data.role== 'ADMIN')
+                this.$router.push('/adminMgr')
               this.$message.success('登录成功')
             } else {
               this.$message.error(res.msg)

+ 21 - 19
vue/src/views/Manager.vue

@@ -40,25 +40,27 @@
             <i class="el-icon-s-home"></i>
             <span slot="title">系统首页</span>
           </el-menu-item>
-          <el-submenu index="info">
-            <template slot="title">
-              <i class="el-icon-menu"></i><span>信息管理</span>
-            </template>
-            <el-menu-item index="/notice">公告信息</el-menu-item>
-          </el-submenu>
+<!--          <el-submenu index="info">-->
+<!--            <template slot="title">-->
+<!--              <i class="el-icon-menu"></i><span>信息管理</span>-->
+<!--            </template>-->
+<!--            <el-menu-item index="/notice">公告信息</el-menu-item>-->
+<!--          </el-submenu>-->
 
-          <el-submenu index="user">
-            <template slot="title">
-              <i class="el-icon-menu"></i><span>用户管理</span>
-            </template>
-            <el-menu-item index="/admin">管理员信息</el-menu-item>
-          </el-submenu>
+<!--          <el-submenu index="user">-->
+<!--            <template slot="title">-->
+<!--              <i class="el-icon-menu"></i><span>用户管理</span>-->
+<!--            </template>-->
+<!--            <el-menu-item index="/admin">管理员信息</el-menu-item>-->
+<!--          </el-submenu>-->
 
           <el-submenu index="shop">
             <template slot="title">
               <i class="el-icon-menu"></i><span>店铺管理</span>
             </template>
-            <el-menu-item index="/shopManager">店铺商品管理</el-menu-item>
+            <el-menu-item index="/shopManager">店铺管理</el-menu-item>
+            <el-menu-item index="/shopOrders">店铺订单管理</el-menu-item>
+            <el-menu-item index="/shopProducts">店铺商品管理</el-menu-item>
           </el-submenu>
 <!-- AI 模块 包括视频监控 害虫识别作物判断 等-->
           <el-submenu index="AI">
@@ -70,12 +72,12 @@
             <el-menu-item index="/pestAnalysis">害虫识别模块</el-menu-item>
           </el-submenu>
 
-          <el-submenu index = 'Admin'>
-            <template slot="title">
-              <i class="el-icon-menu"></i><span>管理员</span>
-            </template>
-            <el-menu-item index="/audit">店铺申请管理</el-menu-item>
-          </el-submenu>
+<!--          <el-submenu index = 'Admin'>-->
+<!--            <template slot="title">-->
+<!--              <i class="el-icon-menu"></i><span>管理员</span>-->
+<!--            </template>-->
+<!--            <el-menu-item index="/audit">店铺申请管理</el-menu-item>-->
+<!--          </el-submenu>-->
           <el-submenu index = 'Charts'>
             <template slot="title">
               <i class="el-icon-menu"></i><span>报表</span>

+ 175 - 8
vue/src/views/manager/Manager/Audit.vue

@@ -1,16 +1,183 @@
+<template>
+  <div>
+    <div class="search">
+      <el-input placeholder="请输入关键字查询" style="width: 200px" v-model="username"></el-input>
+      <el-button type="info" plain style="margin-left: 10px" @click="load(1)">查询</el-button>
+      <el-button type="warning" plain style="margin-left: 10px" @click="reset">重置</el-button>
+    </div>
+
+    <div class="operation">
+      <el-button type="primary" plain @click="handleAdd">新增</el-button>
+      <el-button type="danger" plain @click="delBatch">批量删除</el-button>
+    </div>
+
+    <div class="table">
+      <el-table :data="tableData" strip @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
+        <el-table-column prop="id" label="序号" width="70" align="center" sortable></el-table-column>
+        <el-table-column prop="idcard" label="身份证"></el-table-column>
+        <el-table-column prop="businessLicense" label="营业执照url"></el-table-column>
+        <el-table-column prop="reason" label="申请理由"></el-table-column>
+        <el-table-column prop="picsUrl" label="市区营业图片"></el-table-column>
+        <el-table-column prop="cameraUrl" label="监控地址"></el-table-column>
+        <el-table-column prop="storeId" label="店铺申请人id用adminstore的id"></el-table-column>
+        <el-table-column label="操作" align="center" width="180">
+          <template v-slot="scope">
+            <el-button size="mini" type="primary" plain @click="handleEdit(scope.row)">编辑</el-button>
+            <el-button size="mini" type="danger" plain @click="del(scope.row.id)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination">
+        <el-pagination
+            background
+            @current-change="handleCurrentChange"
+            :current-page="pageNum"
+            :page-sizes="[5, 10, 20]"
+            :page-size="pageSize"
+            layout="total, prev, pager, next"
+            :total="total">
+        </el-pagination>
+      </div>
+    </div>
+
+    <el-dialog title="申请审核表" :visible.sync="fromVisible" width="40%" :close-on-click-modal="false" destroy-on-close>
+      <el-form :model="form" label-width="100px" style="padding-right: 50px" :rules="rules" ref="formRef">
+        <el-form-item label="身份证" prop="idcard">
+          <el-input v-model="form.idcard" placeholder="身份证"></el-input>
+        </el-form-item>
+        <el-form-item label="营业执照url" prop="businessLicense">
+          <el-input v-model="form.businessLicense" placeholder="营业执照url"></el-input>
+        </el-form-item>
+        <el-form-item label="申请理由" prop="reason">
+          <el-input v-model="form.reason" placeholder="申请理由"></el-input>
+        </el-form-item>
+        <el-form-item label="市区营业图片" prop="picsUrl">
+          <el-input v-model="form.picsUrl" placeholder="市区营业图片"></el-input>
+        </el-form-item>
+        <el-form-item label="监控地址" prop="cameraUrl">
+          <el-input v-model="form.cameraUrl" placeholder="监控地址"></el-input>
+        </el-form-item>
+        <el-form-item label="店铺申请人id用adminstore的id" prop="storeId">
+          <el-input v-model="form.storeId" placeholder="店铺申请人id用adminstore的id"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="fromVisible = false">取 消</el-button>
+        <el-button type="primary" @click="save">确 定</el-button>
+      </div>
+    </el-dialog>
+
+
+  </div>
+</template>
 <script>
 export default {
-  name: "Audit"
+  name: "Audit",
+  data() {
+    return {
+      tableData: [],  // 所有的数据
+      pageNum: 1,   // 当前的页码
+      pageSize: 10,  // 每页显示的个数
+      total: 0,
+      username: null,
+      fromVisible: false,
+      form: {},
+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
+      rules: {
+      },
+      ids: []
+    }
+  },
+  created() {
+    this.load(1)
+  },
+  methods: {
+    handleAdd() {   // 新增数据
+      this.form = {}  // 新增数据的时候清空数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    handleEdit(row) {   // 编辑数据
+      this.form = JSON.parse(JSON.stringify(row))  // 给form对象赋值  注意要深拷贝数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    save() {   // 保存按钮触发的逻辑  它会触发新增或者更新
+      this.$refs.formRef.validate((valid) => {
+        if (valid) {
+          this.$request({
+            url: this.form.id ? '/audits/update' : '/audits/add',
+            method: this.form.id ? 'PUT' : 'POST',
+            data: this.form
+          }).then(res => {
+            if (res.code === '200') {  // 表示成功保存
+              this.$message.success('保存成功')
+              this.load(1)
+              this.fromVisible = false
+            } else {
+              this.$message.error(res.msg)  // 弹出错误的信息
+            }
+          })
+        }
+      })
+    },
+    del(id) {   // 单个删除
+      this.$confirm('您确定删除吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/audits/delete/' + id).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    handleSelectionChange(rows) {   // 当前选中的所有的行数据
+      this.ids = rows.map(v => v.id)
+    },
+    delBatch() {   // 批量删除
+      if (!this.ids.length) {
+        this.$message.warning('请选择数据')
+        return
+      }
+      this.$confirm('您确定批量删除这些数据吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/audits/delete/batch', {data: this.ids}).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    load(pageNum) {  // 分页查询
+      if (pageNum) this.pageNum = pageNum
+      this.$request.get('/audits/selectPage', {
+        params: {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          username: this.username,
+        }
+      }).then(res => {
+        this.tableData = res.data?.list
+        this.total = res.data?.total
+      })
+    },
+    reset() {
+      this.username = null
+      this.load(1)
+    },
+    handleCurrentChange(pageNum) {
+      this.load(pageNum)
+    },
+  }
 }
 </script>
 
-<template>
-<div>
-  店铺申请审核界面(仅管理员可见)
-  可以用if else 验证身份类型实现
-</div>
-</template>
-
 <style scoped>
 
 </style>

+ 46 - 0
vue/src/views/manager/ShopManager/AdminHome.vue

@@ -0,0 +1,46 @@
+<template>
+  <div>
+    <div class="card" style="padding: 15px">
+      您好,{{ user?.name }}!
+      今天又是上班的一天
+      欢迎使用管理员后台
+    </div>
+
+    <div style="display: flex; margin: 10px 0">
+      <div style="width: 50%;" class="card">
+        <div style="margin-bottom: 30px; font-size: 20px; font-weight: bold">公告列表</div>
+        <div >
+          <el-timeline  reverse slot="reference">
+            <el-timeline-item v-for="item in notices" :key="item.id" :timestamp="item.time">
+              <el-popover
+                  placement="right"
+                  width="200"
+                  trigger="hover"
+                  :content="item.content">
+                <span slot="reference">{{ item.title }}</span>
+              </el-popover>
+            </el-timeline-item>
+          </el-timeline>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: 'AdminHome',
+  data() {
+    return {
+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
+      notices: []
+    }
+  },
+  created() {
+    this.$request.get('/notice/selectAll').then(res => {
+      this.notices = res.data || []
+    })
+  }
+}
+</script>

+ 200 - 0
vue/src/views/manager/ShopManager/Orders.vue

@@ -0,0 +1,200 @@
+<template>
+  <div>
+    <div class="search">
+      <el-input placeholder="请输入关键字查询" style="width: 200px" v-model="username"></el-input>
+      <el-button type="info" plain style="margin-left: 10px" @click="load(1)">查询</el-button>
+      <el-button type="warning" plain style="margin-left: 10px" @click="reset">重置</el-button>
+    </div>
+
+    <div class="operation">
+      <el-button type="primary" plain @click="handleAdd">新增</el-button>
+      <el-button type="danger" plain @click="delBatch">批量删除</el-button>
+    </div>
+
+    <div class="table">
+      <el-table :data="tableData" strip @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
+        <el-table-column prop="id" label="序号" width="70" align="center" sortable></el-table-column>
+        <el-table-column prop="bitPay" label="实付金额"></el-table-column>
+        <el-table-column prop="originPay" label="应付金额"></el-table-column>
+        <el-table-column prop="userId" label="下单用户id"></el-table-column>
+        <el-table-column prop="addressId" label="收货地址id"></el-table-column>
+        <el-table-column prop="timePre" label="预计送达时间"></el-table-column>
+        <el-table-column prop="timeOrder" label="下单时间"></el-table-column>
+        <el-table-column prop="orderState" label="订单状态"></el-table-column>
+        <el-table-column prop="orderRemark" label="订单备注"></el-table-column>
+        <el-table-column prop="transCode" label="交易单号"></el-table-column>
+        <el-table-column prop="orderTypeId" label="订单类型id"></el-table-column>
+        <el-table-column label="操作" align="center" width="180">
+          <template v-slot="scope">
+            <el-button size="mini" type="primary" plain @click="handleEdit(scope.row)">编辑</el-button>
+            <el-button size="mini" type="danger" plain @click="del(scope.row.id)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination">
+        <el-pagination
+            background
+            @current-change="handleCurrentChange"
+            :current-page="pageNum"
+            :page-sizes="[5, 10, 20]"
+            :page-size="pageSize"
+            layout="total, prev, pager, next"
+            :total="total">
+        </el-pagination>
+      </div>
+    </div>
+
+    <el-dialog title="订单表" :visible.sync="fromVisible" width="40%" :close-on-click-modal="false" destroy-on-close>
+      <el-form :model="form" label-width="100px" style="padding-right: 50px" :rules="rules" ref="formRef">
+        <el-form-item label="实付金额" prop="bitPay">
+          <el-input v-model="form.bitPay" placeholder="实付金额"></el-input>
+        </el-form-item>
+        <el-form-item label="应付金额" prop="originPay">
+          <el-input v-model="form.originPay" placeholder="应付金额"></el-input>
+        </el-form-item>
+        <el-form-item label="下单用户id" prop="userId">
+          <el-input v-model="form.userId" placeholder="下单用户id"></el-input>
+        </el-form-item>
+        <el-form-item label="收货地址id" prop="addressId">
+          <el-input v-model="form.addressId" placeholder="收货地址id"></el-input>
+        </el-form-item>
+        <el-form-item label="预计送达时间" prop="timePre">
+          <el-input v-model="form.timePre" placeholder="预计送达时间"></el-input>
+        </el-form-item>
+        <el-form-item label="下单时间" prop="timeOrder">
+          <el-input v-model="form.timeOrder" placeholder="下单时间"></el-input>
+        </el-form-item>
+        <el-form-item label="订单状态" prop="orderState">
+          <el-input v-model="form.orderState" placeholder="订单状态"></el-input>
+        </el-form-item>
+        <el-form-item label="订单备注" prop="orderRemark">
+          <el-input v-model="form.orderRemark" placeholder="订单备注"></el-input>
+        </el-form-item>
+        <el-form-item label="交易单号" prop="transCode">
+          <el-input v-model="form.transCode" placeholder="交易单号"></el-input>
+        </el-form-item>
+        <el-form-item label="订单类型id" prop="orderTypeId">
+          <el-input v-model="form.orderTypeId" placeholder="订单类型id"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="fromVisible = false">取 消</el-button>
+        <el-button type="primary" @click="save">确 定</el-button>
+      </div>
+    </el-dialog>
+
+
+  </div>
+</template>
+<script>
+export default {
+  name: "Orders",
+  data() {
+    return {
+      tableData: [],  // 所有的数据
+      pageNum: 1,   // 当前的页码
+      pageSize: 10,  // 每页显示的个数
+      total: 0,
+      username: null,
+      fromVisible: false,
+      form: {},
+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
+      rules: {
+      },
+      ids: []
+    }
+  },
+  created() {
+    console.log("Orders.vue")
+    this.load(1)
+  },
+  methods: {
+    handleAdd() {   // 新增数据
+      this.form = {}  // 新增数据的时候清空数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    handleEdit(row) {   // 编辑数据
+      this.form = JSON.parse(JSON.stringify(row))  // 给form对象赋值  注意要深拷贝数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    save() {   // 保存按钮触发的逻辑  它会触发新增或者更新
+      this.$refs.formRef.validate((valid) => {
+        if (valid) {
+          this.$request({
+            url: this.form.id ? '/orders/update' : '/orders/add',
+            method: this.form.id ? 'PUT' : 'POST',
+            data: this.form
+          }).then(res => {
+            if (res.code === '200') {  // 表示成功保存
+              this.$message.success('保存成功')
+              this.load(1)
+              this.fromVisible = false
+            } else {
+              this.$message.error(res.msg)  // 弹出错误的信息
+            }
+          })
+        }
+      })
+    },
+    del(id) {   // 单个删除
+      this.$confirm('您确定删除吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/orders/delete/' + id).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    handleSelectionChange(rows) {   // 当前选中的所有的行数据
+      this.ids = rows.map(v => v.id)
+    },
+    delBatch() {   // 批量删除
+      if (!this.ids.length) {
+        this.$message.warning('请选择数据')
+        return
+      }
+      this.$confirm('您确定批量删除这些数据吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/orders/delete/batch', {data: this.ids}).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    load(pageNum) {  // 分页查询
+      if (pageNum) this.pageNum = pageNum
+      this.$request.get('/orders/selectPage', {
+        params: {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          username: this.username,
+        }
+      }).then(res => {
+        this.tableData = res.data?.list
+        this.total = res.data?.total
+      })
+    },
+    reset() {
+      this.username = null
+      this.load(1)
+    },
+    handleCurrentChange(pageNum) {
+      this.load(pageNum)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 183 - 0
vue/src/views/manager/ShopManager/Product.vue

@@ -0,0 +1,183 @@
+<template>
+  <div>
+    <div class="search">
+      <el-input placeholder="请输入关键字查询" style="width: 200px" v-model="username"></el-input>
+      <el-button type="info" plain style="margin-left: 10px" @click="load(1)">查询</el-button>
+      <el-button type="warning" plain style="margin-left: 10px" @click="reset">重置</el-button>
+    </div>
+
+    <div class="operation">
+      <el-button type="primary" plain @click="handleAdd">新增</el-button>
+      <el-button type="danger" plain @click="delBatch">批量删除</el-button>
+    </div>
+
+    <div class="table">
+      <el-table :data="tableData" strip @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
+        <el-table-column prop="id" label="序号" width="70" align="center" sortable></el-table-column>
+        <el-table-column prop="productState" label="产品状态"></el-table-column>
+        <el-table-column prop="productName" label="产品名称"></el-table-column>
+        <el-table-column prop="productIcons" label="产品图标url"></el-table-column>
+        <el-table-column prop="productTypeIds" label="产品类型ids"></el-table-column>
+        <el-table-column prop="productBidPrice" label="定价"></el-table-column>
+        <el-table-column prop="productSellPrice" label="实付价格"></el-table-column>
+        <el-table-column label="操作" align="center" width="180">
+          <template v-slot="scope">
+            <el-button size="mini" type="primary" plain @click="handleEdit(scope.row)">编辑</el-button>
+            <el-button size="mini" type="danger" plain @click="del(scope.row.id)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination">
+        <el-pagination
+            background
+            @current-change="handleCurrentChange"
+            :current-page="pageNum"
+            :page-sizes="[5, 10, 20]"
+            :page-size="pageSize"
+            layout="total, prev, pager, next"
+            :total="total">
+        </el-pagination>
+      </div>
+    </div>
+
+    <el-dialog title="" :visible.sync="fromVisible" width="40%" :close-on-click-modal="false" destroy-on-close>
+      <el-form :model="form" label-width="100px" style="padding-right: 50px" :rules="rules" ref="formRef">
+        <el-form-item label="产品状态" prop="productState">
+          <el-input v-model="form.productState" placeholder="产品状态"></el-input>
+        </el-form-item>
+        <el-form-item label="产品名称" prop="productName">
+          <el-input v-model="form.productName" placeholder="产品名称"></el-input>
+        </el-form-item>
+        <el-form-item label="产品图标url" prop="productIcons">
+          <el-input v-model="form.productIcons" placeholder="产品图标url"></el-input>
+        </el-form-item>
+        <el-form-item label="产品类型ids" prop="productTypeIds">
+          <el-input v-model="form.productTypeIds" placeholder="产品类型ids"></el-input>
+        </el-form-item>
+        <el-form-item label="定价" prop="productBidPrice">
+          <el-input v-model="form.productBidPrice" placeholder="定价"></el-input>
+        </el-form-item>
+        <el-form-item label="实付价格" prop="productSellPrice">
+          <el-input v-model="form.productSellPrice" placeholder="实付价格"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="fromVisible = false">取 消</el-button>
+        <el-button type="primary" @click="save">确 定</el-button>
+      </div>
+    </el-dialog>
+
+
+  </div>
+</template>
+<script>
+export default {
+  name: "Product",
+  data() {
+    return {
+      tableData: [],  // 所有的数据
+      pageNum: 1,   // 当前的页码
+      pageSize: 10,  // 每页显示的个数
+      total: 0,
+      username: null,
+      fromVisible: false,
+      form: {},
+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
+      rules: {
+      },
+      ids: []
+    }
+  },
+  created() {
+    this.load(1)
+  },
+  methods: {
+    handleAdd() {   // 新增数据
+      this.form = {}  // 新增数据的时候清空数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    handleEdit(row) {   // 编辑数据
+      this.form = JSON.parse(JSON.stringify(row))  // 给form对象赋值  注意要深拷贝数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    save() {   // 保存按钮触发的逻辑  它会触发新增或者更新
+      this.$refs.formRef.validate((valid) => {
+        if (valid) {
+          this.$request({
+            url: this.form.id ? '/product/update' : '/product/add',
+            method: this.form.id ? 'PUT' : 'POST',
+            data: this.form
+          }).then(res => {
+            if (res.code === '200') {  // 表示成功保存
+              this.$message.success('保存成功')
+              this.load(1)
+              this.fromVisible = false
+            } else {
+              this.$message.error(res.msg)  // 弹出错误的信息
+            }
+          })
+        }
+      })
+    },
+    del(id) {   // 单个删除
+      this.$confirm('您确定删除吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/product/delete/' + id).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    handleSelectionChange(rows) {   // 当前选中的所有的行数据
+      this.ids = rows.map(v => v.id)
+    },
+    delBatch() {   // 批量删除
+      if (!this.ids.length) {
+        this.$message.warning('请选择数据')
+        return
+      }
+      this.$confirm('您确定批量删除这些数据吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/product/delete/batch', {data: this.ids}).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    load(pageNum) {  // 分页查询
+      if (pageNum) this.pageNum = pageNum
+      this.$request.get('/product/selectPage', {
+        params: {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          username: this.username,
+        }
+      }).then(res => {
+        this.tableData = res.data?.list
+        this.total = res.data?.total
+      })
+    },
+    reset() {
+      this.username = null
+      this.load(1)
+    },
+    handleCurrentChange(pageNum) {
+      this.load(pageNum)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 163 - 0
vue/src/views/manager/ShopManager/ProductType.vue

@@ -0,0 +1,163 @@
+<template>
+  <div>
+    <div class="search">
+      <el-input placeholder="请输入关键字查询" style="width: 200px" v-model="username"></el-input>
+      <el-button type="info" plain style="margin-left: 10px" @click="load(1)">查询</el-button>
+      <el-button type="warning" plain style="margin-left: 10px" @click="reset">重置</el-button>
+    </div>
+
+    <div class="operation">
+      <el-button type="primary" plain @click="handleAdd">新增</el-button>
+      <el-button type="danger" plain @click="delBatch">批量删除</el-button>
+    </div>
+
+    <div class="table">
+      <el-table :data="tableData" strip @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
+        <el-table-column prop="id" label="序号" width="70" align="center" sortable></el-table-column>
+        <el-table-column prop="productName" label="产品名称"></el-table-column>
+        <el-table-column label="操作" align="center" width="180">
+          <template v-slot="scope">
+            <el-button size="mini" type="primary" plain @click="handleEdit(scope.row)">编辑</el-button>
+            <el-button size="mini" type="danger" plain @click="del(scope.row.id)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination">
+        <el-pagination
+            background
+            @current-change="handleCurrentChange"
+            :current-page="pageNum"
+            :page-sizes="[5, 10, 20]"
+            :page-size="pageSize"
+            layout="total, prev, pager, next"
+            :total="total">
+        </el-pagination>
+      </div>
+    </div>
+
+    <el-dialog title="" :visible.sync="fromVisible" width="40%" :close-on-click-modal="false" destroy-on-close>
+      <el-form :model="form" label-width="100px" style="padding-right: 50px" :rules="rules" ref="formRef">
+        <el-form-item label="产品名称" prop="productName">
+          <el-input v-model="form.productName" placeholder="产品名称"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="fromVisible = false">取 消</el-button>
+        <el-button type="primary" @click="save">确 定</el-button>
+      </div>
+    </el-dialog>
+
+
+  </div>
+</template>
+<script>
+export default {
+  name: "Productype",
+  data() {
+    return {
+      tableData: [],  // 所有的数据
+      pageNum: 1,   // 当前的页码
+      pageSize: 10,  // 每页显示的个数
+      total: 0,
+      username: null,
+      fromVisible: false,
+      form: {},
+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
+      rules: {
+      },
+      ids: []
+    }
+  },
+  created() {
+    this.load(1)
+  },
+  methods: {
+    handleAdd() {   // 新增数据
+      this.form = {}  // 新增数据的时候清空数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    handleEdit(row) {   // 编辑数据
+      this.form = JSON.parse(JSON.stringify(row))  // 给form对象赋值  注意要深拷贝数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    save() {   // 保存按钮触发的逻辑  它会触发新增或者更新
+      this.$refs.formRef.validate((valid) => {
+        if (valid) {
+          this.$request({
+            url: this.form.id ? '/productype/update' : '/productype/add',
+            method: this.form.id ? 'PUT' : 'POST',
+            data: this.form
+          }).then(res => {
+            if (res.code === '200') {  // 表示成功保存
+              this.$message.success('保存成功')
+              this.load(1)
+              this.fromVisible = false
+            } else {
+              this.$message.error(res.msg)  // 弹出错误的信息
+            }
+          })
+        }
+      })
+    },
+    del(id) {   // 单个删除
+      this.$confirm('您确定删除吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/productype/delete/' + id).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    handleSelectionChange(rows) {   // 当前选中的所有的行数据
+      this.ids = rows.map(v => v.id)
+    },
+    delBatch() {   // 批量删除
+      if (!this.ids.length) {
+        this.$message.warning('请选择数据')
+        return
+      }
+      this.$confirm('您确定批量删除这些数据吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/productype/delete/batch', {data: this.ids}).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    load(pageNum) {  // 分页查询
+      if (pageNum) this.pageNum = pageNum
+      this.$request.get('/productype/selectPage', {
+        params: {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          username: this.username,
+        }
+      }).then(res => {
+        this.tableData = res.data?.list
+        this.total = res.data?.total
+      })
+    },
+    reset() {
+      this.username = null
+      this.load(1)
+    },
+    handleCurrentChange(pageNum) {
+      this.load(pageNum)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 179 - 0
vue/src/views/manager/ShopManager/SaleStatement.vue

@@ -0,0 +1,179 @@
+<template>
+  <div>
+    <div class="search">
+      <el-input placeholder="请输入关键字查询" style="width: 200px" v-model="username"></el-input>
+      <el-button type="info" plain style="margin-left: 10px" @click="load(1)">查询</el-button>
+      <el-button type="warning" plain style="margin-left: 10px" @click="reset">重置</el-button>
+    </div>
+
+    <div class="operation">
+      <el-button type="primary" plain @click="handleAdd">新增</el-button>
+      <el-button type="danger" plain @click="delBatch">批量删除</el-button>
+    </div>
+
+    <div class="table">
+      <el-table :data="tableData" strip @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
+        <el-table-column prop="id" label="序号" width="70" align="center" sortable></el-table-column>
+        <el-table-column prop="shopId" label="店铺id"></el-table-column>
+        <el-table-column prop="count" label="商品数量"></el-table-column>
+        <el-table-column prop="timeOver" label="完成时间"></el-table-column>
+        <el-table-column prop="productId" label="商品id"></el-table-column>
+        <el-table-column prop="amount" label="金额"></el-table-column>
+        <el-table-column label="操作" align="center" width="180">
+          <template v-slot="scope">
+            <el-button size="mini" type="primary" plain @click="handleEdit(scope.row)">编辑</el-button>
+            <el-button size="mini" type="danger" plain @click="del(scope.row.id)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination">
+        <el-pagination
+            background
+            @current-change="handleCurrentChange"
+            :current-page="pageNum"
+            :page-sizes="[5, 10, 20]"
+            :page-size="pageSize"
+            layout="total, prev, pager, next"
+            :total="total">
+        </el-pagination>
+      </div>
+    </div>
+
+    <el-dialog title="销量表" :visible.sync="fromVisible" width="40%" :close-on-click-modal="false" destroy-on-close>
+      <el-form :model="form" label-width="100px" style="padding-right: 50px" :rules="rules" ref="formRef">
+        <el-form-item label="店铺id" prop="shopId">
+          <el-input v-model="form.shopId" placeholder="店铺id"></el-input>
+        </el-form-item>
+        <el-form-item label="商品数量" prop="count">
+          <el-input v-model="form.count" placeholder="商品数量"></el-input>
+        </el-form-item>
+        <el-form-item label="完成时间" prop="timeOver">
+          <el-input v-model="form.timeOver" placeholder="完成时间"></el-input>
+        </el-form-item>
+        <el-form-item label="商品id" prop="productId">
+          <el-input v-model="form.productId" placeholder="商品id"></el-input>
+        </el-form-item>
+        <el-form-item label="金额" prop="amount">
+          <el-input v-model="form.amount" placeholder="金额"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="fromVisible = false">取 消</el-button>
+        <el-button type="primary" @click="save">确 定</el-button>
+      </div>
+    </el-dialog>
+
+
+  </div>
+</template>
+<script>
+export default {
+  name: "SaleStatement",
+  data() {
+    return {
+      tableData: [],  // 所有的数据
+      pageNum: 1,   // 当前的页码
+      pageSize: 10,  // 每页显示的个数
+      total: 0,
+      username: null,
+      fromVisible: false,
+      form: {},
+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
+      rules: {
+      },
+      ids: []
+    }
+  },
+  created() {
+    this.load(1)
+  },
+  methods: {
+    handleAdd() {   // 新增数据
+      this.form = {}  // 新增数据的时候清空数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    handleEdit(row) {   // 编辑数据
+      this.form = JSON.parse(JSON.stringify(row))  // 给form对象赋值  注意要深拷贝数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    save() {   // 保存按钮触发的逻辑  它会触发新增或者更新
+      this.$refs.formRef.validate((valid) => {
+        if (valid) {
+          this.$request({
+            url: this.form.id ? '/saleStatement/update' : '/saleStatement/add',
+            method: this.form.id ? 'PUT' : 'POST',
+            data: this.form
+          }).then(res => {
+            if (res.code === '200') {  // 表示成功保存
+              this.$message.success('保存成功')
+              this.load(1)
+              this.fromVisible = false
+            } else {
+              this.$message.error(res.msg)  // 弹出错误的信息
+            }
+          })
+        }
+      })
+    },
+    del(id) {   // 单个删除
+      this.$confirm('您确定删除吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/saleStatement/delete/' + id).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    handleSelectionChange(rows) {   // 当前选中的所有的行数据
+      this.ids = rows.map(v => v.id)
+    },
+    delBatch() {   // 批量删除
+      if (!this.ids.length) {
+        this.$message.warning('请选择数据')
+        return
+      }
+      this.$confirm('您确定批量删除这些数据吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/saleStatement/delete/batch', {data: this.ids}).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    load(pageNum) {  // 分页查询
+      if (pageNum) this.pageNum = pageNum
+      this.$request.get('/saleStatement/selectPage', {
+        params: {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          username: this.username,
+        }
+      }).then(res => {
+        this.tableData = res.data?.list
+        this.total = res.data?.total
+      })
+    },
+    reset() {
+      this.username = null
+      this.load(1)
+    },
+    handleCurrentChange(pageNum) {
+      this.load(pageNum)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 175 - 0
vue/src/views/manager/ShopManager/Store.vue

@@ -0,0 +1,175 @@
+<template>
+  <div>
+    <div class="search">
+      <el-input placeholder="请输入关键字查询" style="width: 200px" v-model="username"></el-input>
+      <el-button type="info" plain style="margin-left: 10px" @click="load(1)">查询</el-button>
+      <el-button type="warning" plain style="margin-left: 10px" @click="reset">重置</el-button>
+    </div>
+
+    <div class="operation">
+      <el-button type="primary" plain @click="handleAdd">新增</el-button>
+      <el-button type="danger" plain @click="delBatch">批量删除</el-button>
+    </div>
+
+    <div class="table">
+      <el-table :data="tableData" strip @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
+        <el-table-column prop="id" label="序号" width="70" align="center" sortable></el-table-column>
+        <el-table-column prop="ownerId" label="店铺主id"></el-table-column>
+        <el-table-column prop="productsIds" label="产品列表ids"></el-table-column>
+        <el-table-column prop="addressIds" label="地址列表ids"></el-table-column>
+        <el-table-column prop="productTypeIds" label="产品类型列表ids"></el-table-column>
+        <el-table-column label="操作" align="center" width="180">
+          <template v-slot="scope">
+            <el-button size="mini" type="primary" plain @click="handleEdit(scope.row)">编辑</el-button>
+            <el-button size="mini" type="danger" plain @click="del(scope.row.id)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination">
+        <el-pagination
+            background
+            @current-change="handleCurrentChange"
+            :current-page="pageNum"
+            :page-sizes="[5, 10, 20]"
+            :page-size="pageSize"
+            layout="total, prev, pager, next"
+            :total="total">
+        </el-pagination>
+      </div>
+    </div>
+
+    <el-dialog title="" :visible.sync="fromVisible" width="40%" :close-on-click-modal="false" destroy-on-close>
+      <el-form :model="form" label-width="100px" style="padding-right: 50px" :rules="rules" ref="formRef">
+        <el-form-item label="店铺主id" prop="ownerId">
+          <el-input v-model="form.ownerId" placeholder="店铺主id"></el-input>
+        </el-form-item>
+        <el-form-item label="产品列表ids" prop="productsIds">
+          <el-input v-model="form.productsIds" placeholder="产品列表ids"></el-input>
+        </el-form-item>
+        <el-form-item label="地址列表ids" prop="addressIds">
+          <el-input v-model="form.addressIds" placeholder="地址列表ids"></el-input>
+        </el-form-item>
+        <el-form-item label="产品类型列表ids" prop="productTypeIds">
+          <el-input v-model="form.productTypeIds" placeholder="产品类型列表ids"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="fromVisible = false">取 消</el-button>
+        <el-button type="primary" @click="save">确 定</el-button>
+      </div>
+    </el-dialog>
+
+
+  </div>
+</template>
+<script>
+export default {
+  name: "Store",
+  data() {
+    return {
+      tableData: [],  // 所有的数据
+      pageNum: 1,   // 当前的页码
+      pageSize: 10,  // 每页显示的个数
+      total: 0,
+      username: null,
+      fromVisible: false,
+      form: {},
+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
+      rules: {
+      },
+      ids: []
+    }
+  },
+  created() {
+    this.load(1)
+  },
+  methods: {
+    handleAdd() {   // 新增数据
+      this.form = {}  // 新增数据的时候清空数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    handleEdit(row) {   // 编辑数据
+      this.form = JSON.parse(JSON.stringify(row))  // 给form对象赋值  注意要深拷贝数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    save() {   // 保存按钮触发的逻辑  它会触发新增或者更新
+      this.$refs.formRef.validate((valid) => {
+        if (valid) {
+          this.$request({
+            url: this.form.id ? '/store/update' : '/store/add',
+            method: this.form.id ? 'PUT' : 'POST',
+            data: this.form
+          }).then(res => {
+            if (res.code === '200') {  // 表示成功保存
+              this.$message.success('保存成功')
+              this.load(1)
+              this.fromVisible = false
+            } else {
+              this.$message.error(res.msg)  // 弹出错误的信息
+            }
+          })
+        }
+      })
+    },
+    del(id) {   // 单个删除
+      this.$confirm('您确定删除吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/store/delete/' + id).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    handleSelectionChange(rows) {   // 当前选中的所有的行数据
+      this.ids = rows.map(v => v.id)
+    },
+    delBatch() {   // 批量删除
+      if (!this.ids.length) {
+        this.$message.warning('请选择数据')
+        return
+      }
+      this.$confirm('您确定批量删除这些数据吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/store/delete/batch', {data: this.ids}).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    load(pageNum) {  // 分页查询
+      if (pageNum) this.pageNum = pageNum
+      this.$request.get('/store/selectPage', {
+        params: {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          username: this.username,
+        }
+      }).then(res => {
+        this.tableData = res.data?.list
+        this.total = res.data?.total
+      })
+    },
+    reset() {
+      this.username = null
+      this.load(1)
+    },
+    handleCurrentChange(pageNum) {
+      this.load(pageNum)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 199 - 0
vue/src/views/manager/ShopManager/User.vue

@@ -0,0 +1,199 @@
+<template>
+  <div>
+    <div class="search">
+      <el-input placeholder="请输入关键字查询" style="width: 200px" v-model="username"></el-input>
+      <el-button type="info" plain style="margin-left: 10px" @click="load(1)">查询</el-button>
+      <el-button type="warning" plain style="margin-left: 10px" @click="reset">重置</el-button>
+    </div>
+
+    <div class="operation">
+      <el-button type="primary" plain @click="handleAdd">新增</el-button>
+      <el-button type="danger" plain @click="delBatch">批量删除</el-button>
+    </div>
+
+    <div class="table">
+      <el-table :data="tableData" strip @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55" align="center"></el-table-column>
+        <el-table-column prop="id" label="序号" width="70" align="center" sortable></el-table-column>
+        <el-table-column prop="username" label="用户名"></el-table-column>
+        <el-table-column prop="password" label="密码"></el-table-column>
+        <el-table-column prop="name" label="用户昵称"></el-table-column>
+        <el-table-column prop="avatar" label="头像网址"></el-table-column>
+        <el-table-column prop="role" label="用户类型"></el-table-column>
+        <el-table-column prop="sex" label="性别"></el-table-column>
+        <el-table-column prop="phone" label="手机号"></el-table-column>
+        <el-table-column prop="account" label="金额"></el-table-column>
+        <el-table-column prop="openid" label="openid"></el-table-column>
+        <el-table-column prop="addressIds" label="用户地址ids"></el-table-column>
+        <el-table-column label="操作" align="center" width="180">
+          <template v-slot="scope">
+            <el-button size="mini" type="primary" plain @click="handleEdit(scope.row)">编辑</el-button>
+            <el-button size="mini" type="danger" plain @click="del(scope.row.id)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+
+      <div class="pagination">
+        <el-pagination
+            background
+            @current-change="handleCurrentChange"
+            :current-page="pageNum"
+            :page-sizes="[5, 10, 20]"
+            :page-size="pageSize"
+            layout="total, prev, pager, next"
+            :total="total">
+        </el-pagination>
+      </div>
+    </div>
+
+    <el-dialog title="客户表" :visible.sync="fromVisible" width="40%" :close-on-click-modal="false" destroy-on-close>
+      <el-form :model="form" label-width="100px" style="padding-right: 50px" :rules="rules" ref="formRef">
+        <el-form-item label="用户名" prop="username">
+          <el-input v-model="form.username" placeholder="用户名"></el-input>
+        </el-form-item>
+        <el-form-item label="密码" prop="password">
+          <el-input v-model="form.password" placeholder="密码"></el-input>
+        </el-form-item>
+        <el-form-item label="用户昵称" prop="name">
+          <el-input v-model="form.name" placeholder="用户昵称"></el-input>
+        </el-form-item>
+        <el-form-item label="头像网址" prop="avatar">
+          <el-input v-model="form.avatar" placeholder="头像网址"></el-input>
+        </el-form-item>
+        <el-form-item label="用户类型" prop="role">
+          <el-input v-model="form.role" placeholder="用户类型"></el-input>
+        </el-form-item>
+        <el-form-item label="性别" prop="sex">
+          <el-input v-model="form.sex" placeholder="性别"></el-input>
+        </el-form-item>
+        <el-form-item label="手机号" prop="phone">
+          <el-input v-model="form.phone" placeholder="手机号"></el-input>
+        </el-form-item>
+        <el-form-item label="金额" prop="account">
+          <el-input v-model="form.account" placeholder="金额"></el-input>
+        </el-form-item>
+        <el-form-item label="openid" prop="openid">
+          <el-input v-model="form.openid" placeholder="openid"></el-input>
+        </el-form-item>
+        <el-form-item label="用户地址ids" prop="addressIds">
+          <el-input v-model="form.addressIds" placeholder="用户地址ids"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="fromVisible = false">取 消</el-button>
+        <el-button type="primary" @click="save">确 定</el-button>
+      </div>
+    </el-dialog>
+
+
+  </div>
+</template>
+<script>
+export default {
+  name: "User",
+  data() {
+    return {
+      tableData: [],  // 所有的数据
+      pageNum: 1,   // 当前的页码
+      pageSize: 10,  // 每页显示的个数
+      total: 0,
+      username: null,
+      fromVisible: false,
+      form: {},
+      user: JSON.parse(localStorage.getItem('xm-user') || '{}'),
+      rules: {
+      },
+      ids: []
+    }
+  },
+  created() {
+    this.load(1)
+  },
+  methods: {
+    handleAdd() {   // 新增数据
+      this.form = {}  // 新增数据的时候清空数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    handleEdit(row) {   // 编辑数据
+      this.form = JSON.parse(JSON.stringify(row))  // 给form对象赋值  注意要深拷贝数据
+      this.fromVisible = true   // 打开弹窗
+    },
+    save() {   // 保存按钮触发的逻辑  它会触发新增或者更新
+      this.$refs.formRef.validate((valid) => {
+        if (valid) {
+          this.$request({
+            url: this.form.id ? '/user/update' : '/user/add',
+            method: this.form.id ? 'PUT' : 'POST',
+            data: this.form
+          }).then(res => {
+            if (res.code === '200') {  // 表示成功保存
+              this.$message.success('保存成功')
+              this.load(1)
+              this.fromVisible = false
+            } else {
+              this.$message.error(res.msg)  // 弹出错误的信息
+            }
+          })
+        }
+      })
+    },
+    del(id) {   // 单个删除
+      this.$confirm('您确定删除吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/user/delete/' + id).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    handleSelectionChange(rows) {   // 当前选中的所有的行数据
+      this.ids = rows.map(v => v.id)
+    },
+    delBatch() {   // 批量删除
+      if (!this.ids.length) {
+        this.$message.warning('请选择数据')
+        return
+      }
+      this.$confirm('您确定批量删除这些数据吗?', '确认删除', {type: "warning"}).then(response => {
+        this.$request.delete('/user/delete/batch', {data: this.ids}).then(res => {
+          if (res.code === '200') {   // 表示操作成功
+            this.$message.success('操作成功')
+            this.load(1)
+          } else {
+            this.$message.error(res.msg)  // 弹出错误的信息
+          }
+        })
+      }).catch(() => {
+      })
+    },
+    load(pageNum) {  // 分页查询
+      if (pageNum) this.pageNum = pageNum
+      this.$request.get('/user/selectPage', {
+        params: {
+          pageNum: this.pageNum,
+          pageSize: this.pageSize,
+          username: this.username,
+        }
+      }).then(res => {
+        this.tableData = res.data?.list
+        this.total = res.data?.total
+      })
+    },
+    reset() {
+      this.username = null
+      this.load(1)
+    },
+    handleCurrentChange(pageNum) {
+      this.load(pageNum)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>