From 8ad07bd89eea15ea8ff9e0408616db290a96b131 Mon Sep 17 00:00:00 2001
From: wanglizhong <wlz>
Date: 星期四, 01 五月 2025 10:13:54 +0800
Subject: [PATCH] feat:上传客户配置
---
ruoyi-system/src/main/resources/mapper/system/ServiceOrderMapper.xml | 43 +
ruoyi-ui/src/views/system/clientApp/index.vue | 356 +++++++++++++
ruoyi-ui/src/api/system/clientApp.js | 53 ++
ruoyi-system/src/main/java/com/ruoyi/system/service/IServiceOrderService.java | 8
ruoyi-ui/package.json | 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysClientAppController.java | 99 +++
sql/ry_20250417.sql | 29 +
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ServiceOrderServiceImpl.java | 30
ruoyi-ui/src/views/system/serviceOrder/anonymous.vue | 82 +++
ruoyi-framework/src/main/java/com/ruoyi/framework/config/DruidConfig.java | 15
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java | 19
ruoyi-system/src/main/java/com/ruoyi/system/mapper/ServiceOrderMapper.java | 18
ruoyi-ui/src/router/index.js | 6
ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml | 9
ruoyi-admin/pom.xml | 6
ruoyi-common/src/main/java/com/ruoyi/common/enums/DataSourceType.java | 3
ruoyi-system/pom.xml | 1
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClientApp.java | 128 ++++
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysClientAppService.java | 57 ++
ruoyi-system/src/main/resources/mapper/system/SysClientAppMapper.xml | 101 +++
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysClientAppMapper.java | 57 ++
sql/sys_client_app.sql | 26 +
ruoyi-admin/src/main/resources/application.yml | 4
ruoyi-ui/src/api/system/order.js | 9
/dev/null | 23
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysClientAppServiceImpl.java | 121 ++++
ruoyi-admin/src/main/resources/application-druid.yml | 3
ruoyi-system/src/main/java/com/ruoyi/system/domain/ServiceOrder.java | 70 +
ruoyi-ui/src/views/system/serviceOrder/index.vue | 146 +---
ruoyi-admin/src/main/resources/sql/menu_client_app.sql | 22
30 files changed, 1,365 insertions(+), 180 deletions(-)
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index 9617d01..3ba8d4a 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -42,7 +42,11 @@
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>com.microsoft.sqlserver</groupId>
+ <artifactId>mssql-jdbc</artifactId>
+ <version>9.4.0.jre8</version>
+ </dependency>
<!-- 鏍稿績妯″潡-->
<dependency>
<groupId>com.ruoyi</groupId>
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/framework/config/DynamicDataSourceConfig.java b/ruoyi-admin/src/main/java/com/ruoyi/framework/config/DynamicDataSourceConfig.java
deleted file mode 100644
index 0519ecb..0000000
--- a/ruoyi-admin/src/main/java/com/ruoyi/framework/config/DynamicDataSourceConfig.java
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/framework/datasource/DataSourceType.java b/ruoyi-admin/src/main/java/com/ruoyi/framework/datasource/DataSourceType.java
deleted file mode 100644
index 0519ecb..0000000
--- a/ruoyi-admin/src/main/java/com/ruoyi/framework/datasource/DataSourceType.java
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java
index 9482e69..5b3308c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/ServiceOrderController.java
@@ -1,6 +1,10 @@
package com.ruoyi.web.controller.system;
import java.util.List;
+
+import com.ruoyi.common.annotation.DataSource;
+import com.ruoyi.common.constant.HttpStatus;
+import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
@@ -20,8 +24,7 @@
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.ServiceOrder;
import com.ruoyi.system.service.IServiceOrderService;
-import com.ruoyi.framework.datasource.annotation.DataSource;
-import com.ruoyi.framework.datasource.DataSourceType;
+
import javax.servlet.http.HttpServletResponse;
@@ -43,9 +46,17 @@
@PreAuthorize("@ss.hasPermi('system:order:list')")
@GetMapping("/list")
public TableDataInfo list(ServiceOrder serviceOrder) {
- startPage();
+ // 鑾峰彇鎬绘暟
+ int total = serviceOrderService.selectServiceOrderCount(serviceOrder);
+ // 鑾峰彇鍒嗛〉鏁版嵁
List<ServiceOrder> list = serviceOrderService.selectServiceOrderList(serviceOrder);
- return getDataTable(list);
+ // 璁剧疆鎬绘暟
+ TableDataInfo rspData = new TableDataInfo();
+ rspData.setCode(HttpStatus.SUCCESS);
+ rspData.setMsg("鏌ヨ鎴愬姛");
+ rspData.setRows(list);
+ rspData.setTotal(total);
+ return rspData;
}
@Log(title = "鏈嶅姟璁㈠崟", businessType = BusinessType.EXPORT)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysClientAppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysClientAppController.java
new file mode 100644
index 0000000..95a3557
--- /dev/null
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysClientAppController.java
@@ -0,0 +1,99 @@
+package com.ruoyi.web.controller.system;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.SysClientApp;
+import com.ruoyi.system.service.ISysClientAppService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 瀹㈡埛搴旂敤閰嶇疆Controller
+ */
+@RestController
+@RequestMapping("/system/clientApp")
+public class SysClientAppController extends BaseController {
+ @Autowired
+ private ISysClientAppService sysClientAppService;
+
+ /**
+ * 鏌ヨ瀹㈡埛搴旂敤閰嶇疆鍒楄〃
+ */
+ @PreAuthorize("@ss.hasPermi('system:clientApp:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(SysClientApp sysClientApp) {
+ startPage();
+ List<SysClientApp> list = sysClientAppService.selectSysClientAppList(sysClientApp);
+ return getDataTable(list);
+ }
+
+ /**
+ * 瀵煎嚭瀹㈡埛搴旂敤閰嶇疆鍒楄〃
+ */
+ @PreAuthorize("@ss.hasPermi('system:clientApp:export')")
+ @Log(title = "瀹㈡埛搴旂敤閰嶇疆", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, SysClientApp sysClientApp) {
+ List<SysClientApp> list = sysClientAppService.selectSysClientAppList(sysClientApp);
+ ExcelUtil<SysClientApp> util = new ExcelUtil<SysClientApp>(SysClientApp.class);
+ util.exportExcel(response, list, "瀹㈡埛搴旂敤閰嶇疆鏁版嵁");
+ }
+
+ /**
+ * 鑾峰彇瀹㈡埛搴旂敤閰嶇疆璇︾粏淇℃伅
+ */
+ @PreAuthorize("@ss.hasPermi('system:clientApp:query')")
+ @GetMapping(value = "/{appId}")
+ public AjaxResult getInfo(@PathVariable("appId") Long appId) {
+ return success(sysClientAppService.selectSysClientAppByAppId(appId));
+ }
+
+ /**
+ * 鏂板瀹㈡埛搴旂敤閰嶇疆
+ */
+ @PreAuthorize("@ss.hasPermi('system:clientApp:add')")
+ @Log(title = "瀹㈡埛搴旂敤閰嶇疆", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody SysClientApp sysClientApp) {
+ return toAjax(sysClientAppService.insertSysClientApp(sysClientApp));
+ }
+
+ /**
+ * 淇敼瀹㈡埛搴旂敤閰嶇疆
+ */
+ @PreAuthorize("@ss.hasPermi('system:clientApp:edit')")
+ @Log(title = "瀹㈡埛搴旂敤閰嶇疆", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody SysClientApp sysClientApp) {
+ try {
+ return toAjax(sysClientAppService.updateSysClientApp(sysClientApp));
+ }catch (Exception ex){
+ return AjaxResult.error(ex.getMessage());
+ }
+ }
+
+ /**
+ * 鍒犻櫎瀹㈡埛搴旂敤閰嶇疆
+ */
+ @PreAuthorize("@ss.hasPermi('system:clientApp:remove')")
+ @Log(title = "瀹㈡埛搴旂敤閰嶇疆", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{appIds}")
+ public AjaxResult remove(@PathVariable Long[] appIds) {
+ return toAjax(sysClientAppService.deleteSysClientAppByAppIds(appIds));
+ }
+}
+
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml
index 3442df1..963268b 100644
--- a/ruoyi-admin/src/main/resources/application-druid.yml
+++ b/ruoyi-admin/src/main/resources/application-druid.yml
@@ -17,6 +17,7 @@
password: camesa
driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
enabled: true
+ validationQuery: SELECT 1
slave:
# 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴
enabled: false
@@ -42,7 +43,7 @@
# 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�澶х敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣
maxEvictableIdleTimeMillis: 900000
# 閰嶇疆妫�娴嬭繛鎺ユ槸鍚︽湁鏁�
- validationQuery: SELECT 1 FROM DUAL
+ validationQuery: SELECT 1
testWhileIdle: true
testOnBorrow: false
testOnReturn: false
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 80e05fc..db0b9f1 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -12,6 +12,10 @@
addressEnabled: false
# 楠岃瘉鐮佺被鍨� math 鏁板瓧璁$畻 char 瀛楃楠岃瘉
captchaType: math
+ # 鍖垮悕璁块棶閰嶇疆
+ anonymous:
+ appId: appId1
+ securityKey: your_security_key
# 寮�鍙戠幆澧冮厤缃�
server:
diff --git a/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml b/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
index ac47c03..04111e8 100644
--- a/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
+++ b/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml
@@ -14,7 +14,14 @@
<!-- 鎸囧畾 MyBatis 鎵�鐢ㄦ棩蹇楃殑鍏蜂綋瀹炵幇 -->
<setting name="logImpl" value="SLF4J" />
<!-- 浣跨敤椹煎嘲鍛藉悕娉曡浆鎹㈠瓧娈� -->
- <!-- <setting name="mapUnderscoreToCamelCase" value="true"/> -->
+ <setting name="mapUnderscoreToCamelCase" value="true"/>
+ <!-- 浣跨敤鍒楀埆鍚嶆浛鎹㈠垪鍚� 榛樿:true -->
+ <setting name="useColumnLabel" value="true" />
+ <!-- 閰嶇疆SQL Server鏂硅█ -->
+ <setting name="databaseId" value="sqlserver" />
+ <!-- SQL Server鐗瑰畾閰嶇疆 -->
+ <setting name="jdbcTypeForNull" value="NULL"/>
+ <setting name="defaultExecutorType" value="BATCH"/>
</settings>
</configuration>
diff --git a/ruoyi-admin/src/main/resources/sql/menu_client_app.sql b/ruoyi-admin/src/main/resources/sql/menu_client_app.sql
new file mode 100644
index 0000000..b9a1c92
--- /dev/null
+++ b/ruoyi-admin/src/main/resources/sql/menu_client_app.sql
@@ -0,0 +1,22 @@
+-- 鑿滃崟 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('瀹㈡埛搴旂敤閰嶇疆', '1', '1', 'clientApp', 'system/clientApp/index', 1, 0, 'C', '0', '0', 'system:clientApp:list', 'app', 'admin', sysdate(), '', null, '瀹㈡埛搴旂敤閰嶇疆鑿滃崟');
+
+-- 鎸夐挳鐖惰彍鍗旾D
+SELECT @parentId := LAST_INSERT_ID();
+
+-- 鎸夐挳 SQL
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('瀹㈡埛搴旂敤閰嶇疆鏌ヨ', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'system:clientApp:query', '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('瀹㈡埛搴旂敤閰嶇疆鏂板', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'system:clientApp:add', '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('瀹㈡埛搴旂敤閰嶇疆淇敼', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'system:clientApp:edit', '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('瀹㈡埛搴旂敤閰嶇疆鍒犻櫎', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'system:clientApp:remove', '#', 'admin', sysdate(), '', null, '');
+
+insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
+values('瀹㈡埛搴旂敤閰嶇疆瀵煎嚭', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'system:clientApp:export', '#', 'admin', sysdate(), '', null, '');
\ No newline at end of file
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/enums/DataSourceType.java b/ruoyi-common/src/main/java/com/ruoyi/common/enums/DataSourceType.java
index 0d945be..bf9f4d9 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/enums/DataSourceType.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/enums/DataSourceType.java
@@ -15,5 +15,6 @@
/**
* 浠庡簱
*/
- SLAVE
+ SLAVE,
+ SQLSERVER
}
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/DruidConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/DruidConfig.java
index f6abac1..c59f20a 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/DruidConfig.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/DruidConfig.java
@@ -9,6 +9,8 @@
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.sql.DataSource;
+
+import com.ruoyi.common.enums.DataSourceType;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
@@ -19,7 +21,6 @@
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.ruoyi.common.enums.DataSourceType;
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.framework.config.properties.DruidProperties;
import com.ruoyi.framework.datasource.DynamicDataSource;
@@ -48,14 +49,22 @@
DruidDataSource dataSource = DruidDataSourceBuilder.create().build();
return druidProperties.dataSource(dataSource);
}
+ @Bean
+ @ConfigurationProperties("spring.datasource.druid.sqlserver")
+ @ConditionalOnProperty(prefix = "spring.datasource.druid.sqlserver", name = "enabled", havingValue = "true")
+ public DataSource sqlserverDataSource(DruidProperties druidProperties) {
+
+ DruidDataSource dataSource = DruidDataSourceBuilder.create().build();
+ return druidProperties.dataSource(dataSource);
+ }
@Bean(name = "dynamicDataSource")
@Primary
- public DynamicDataSource dataSource(DataSource masterDataSource)
- {
+ public DynamicDataSource dataSource(DataSource masterDataSource) {
Map<Object, Object> targetDataSources = new HashMap<>();
targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource);
setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource");
+ setDataSource(targetDataSources, DataSourceType.SQLSERVER.name(), "sqlserverDataSource");
return new DynamicDataSource(masterDataSource, targetDataSources);
}
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DataSourceType.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DataSourceType.java
deleted file mode 100644
index eb06fc7..0000000
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DataSourceType.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.ruoyi.framework.datasource;
-
-/**
- * 鏁版嵁婧愮被鍨�
- *
- * @author ruoyi
- */
-public enum DataSourceType {
- /**
- * 涓诲簱
- */
- MASTER,
-
- /**
- * 浠庡簱
- */
- SLAVE,
-
- /**
- * SQL Server
- */
- SQLSERVER
-}
\ No newline at end of file
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/annotation/DataSource.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/annotation/DataSource.java
deleted file mode 100644
index 513274b..0000000
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/annotation/DataSource.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.ruoyi.framework.datasource.annotation;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-import com.ruoyi.framework.datasource.DataSourceType;
-
-/**
- * 鑷畾涔夊鏁版嵁婧愬垏鎹㈡敞瑙�
- *
- * @author ruoyi
- */
-@Target({ ElementType.METHOD, ElementType.TYPE })
-@Retention(RetentionPolicy.RUNTIME)
-@Documented
-public @interface DataSource {
- /**
- * 鍒囨崲鏁版嵁婧愬悕绉�
- */
- public DataSourceType value() default DataSourceType.MASTER;
-}
\ No newline at end of file
diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml
index ebb3991..b5db5b3 100644
--- a/ruoyi-system/pom.xml
+++ b/ruoyi-system/pom.xml
@@ -27,6 +27,7 @@
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
<version>3.5.1</version>
</dependency>
+
</dependencies>
</project>
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/ServiceOrder.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/ServiceOrder.java
index 4cefa3f..1310953 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/ServiceOrder.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/ServiceOrder.java
@@ -10,16 +10,18 @@
/**
* 鏈嶅姟璁㈠崟瀵硅薄 service_order
+ *
+ * @author ruoyi
*/
public class ServiceOrder extends BaseEntity {
private static final long serialVersionUID = 1L;
- /** 璁㈠崟ID */
+ /** 鏈嶅姟璁㈠崟ID */
private Long serviceOrdId;
/** 鐢ㄦ埛ID */
@Excel(name = "鐢ㄦ埛ID")
- private Integer serviceOrdUserID;
+ private Long serviceOrdUserID;
/** 璁㈠崟绫诲埆 */
@Excel(name = "璁㈠崟绫诲埆")
@@ -43,36 +45,36 @@
@Excel(name = "棰勭害鏃ユ湡", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date serviceOrdApptDate;
- /** 鍏徃鍚嶇О */
- @Excel(name = "鍏徃鍚嶇О")
+ /** 鑱旂郴浜哄鍚� */
+ @Excel(name = "鑱旂郴浜哄鍚�")
private String serviceOrdCoName;
- /** 鍏徃鐢佃瘽 */
- @Excel(name = "鍏徃鐢佃瘽")
+ /** 鑱旂郴浜虹數璇� */
+ @Excel(name = "鑱旂郴浜虹數璇�")
private String serviceOrdCoPhone;
- /** 鐥呬汉濮撳悕 */
- @Excel(name = "鐥呬汉濮撳悕")
+ /** 鎮h�呭鍚� */
+ @Excel(name = "鎮h�呭鍚�")
private String serviceOrdPtName;
- /** 鐥呬汉骞撮緞 */
- @Excel(name = "鐥呬汉骞撮緞")
+ /** 鎮h�呭勾榫� */
+ @Excel(name = "鎮h�呭勾榫�")
private String serviceOrdPtAge;
- /** 鐥呬汉鎬у埆 */
- @Excel(name = "鐥呬汉鎬у埆")
+ /** 鎮h�呮�у埆 */
+ @Excel(name = "鎮h�呮�у埆")
private String serviceOrdPtSex;
- /** 鐥呬汉浣撻噸 */
- @Excel(name = "鐥呬汉浣撻噸")
+ /** 鎮h�呬綋閲� */
+ @Excel(name = "鎮h�呬綋閲�")
private String serviceOrdPtKG;
- /** 鐥呬汉鍥界睄 */
- @Excel(name = "鐥呬汉鍥界睄")
+ /** 鎮h�呭浗绫� */
+ @Excel(name = "鎮h�呭浗绫�")
private String serviceOrdPtNat;
- /** 鐥呬汉韬唤璇佸彿 */
- @Excel(name = "鐥呬汉韬唤璇佸彿")
+ /** 鎮h�呰韩浠借瘉鍙� */
+ @Excel(name = "鎮h�呰韩浠借瘉鍙�")
private String serviceOrdPtIDCard;
/** 鍑哄彂鐪佷唤 */
@@ -111,9 +113,13 @@
@Excel(name = "鏀粯閲戦")
private BigDecimal serviceOrdTraPaidPrice;
- /** 璁㈠崟澶囨敞 */
- @Excel(name = "璁㈠崟澶囨敞")
+ /** 澶囨敞 */
+ @Excel(name = "澶囨敞")
private String serviceOrdUnitRemarks;
+
+ /** 鍒嗛〉鍙傛暟 */
+ private Integer pageNum;
+ private Integer pageSize;
// Getters and Setters
public Long getServiceOrdId() {
@@ -124,11 +130,11 @@
this.serviceOrdId = serviceOrdId;
}
- public Integer getServiceOrdUserID() {
+ public Long getServiceOrdUserID() {
return serviceOrdUserID;
}
- public void setServiceOrdUserID(Integer serviceOrdUserID) {
+ public void setServiceOrdUserID(Long serviceOrdUserID) {
this.serviceOrdUserID = serviceOrdUserID;
}
@@ -316,9 +322,25 @@
this.serviceOrdUnitRemarks = serviceOrdUnitRemarks;
}
+ public Integer getPageNum() {
+ return pageNum;
+ }
+
+ public void setPageNum(Integer pageNum) {
+ this.pageNum = pageNum;
+ }
+
+ public Integer getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(Integer pageSize) {
+ this.pageSize = pageSize;
+ }
+
@Override
public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("serviceOrdId", getServiceOrdId())
.append("serviceOrdUserID", getServiceOrdUserID())
.append("serviceOrdClass", getServiceOrdClass())
@@ -344,6 +366,8 @@
.append("serviceOrdTraPaidType", getServiceOrdTraPaidType())
.append("serviceOrdTraPaidPrice", getServiceOrdTraPaidPrice())
.append("serviceOrdUnitRemarks", getServiceOrdUnitRemarks())
+ .append("pageNum", getPageNum())
+ .append("pageSize", getPageSize())
.toString();
}
}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClientApp.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClientApp.java
new file mode 100644
index 0000000..6c1de16
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysClientApp.java
@@ -0,0 +1,128 @@
+package com.ruoyi.system.domain;
+
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.util.Date;
+
+/**
+ * 瀹㈡埛搴旂敤閰嶇疆瀵硅薄 sys_client_app
+ */
+public class SysClientApp extends BaseEntity {
+ private static final long serialVersionUID = 1L;
+
+ /** 搴旂敤ID */
+ private Long appId;
+
+ /** 瀹㈡埛鍚嶇О */
+ @Excel(name = "瀹㈡埛鍚嶇О")
+ private String clientName;
+
+ /** 搴旂敤鏍囪瘑 */
+ @Excel(name = "搴旂敤鏍囪瘑")
+ private String appKey;
+
+ /** 瀹夊叏瀵嗛挜 */
+ @Excel(name = "瀹夊叏瀵嗛挜")
+ private String securityKey;
+
+ /** 鏈夋晥鏈熷紑濮嬫椂闂� */
+ @Excel(name = "鏈夋晥鏈熷紑濮嬫椂闂�", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date validStartTime;
+
+ /** 鏈夋晥鏈熺粨鏉熸椂闂� */
+ @Excel(name = "鏈夋晥鏈熺粨鏉熸椂闂�", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+ private Date validEndTime;
+
+ /** 鐘舵�侊紙0姝e父 1鍋滅敤锛� */
+ @Excel(name = "鐘舵��", readConverterExp = "0=姝e父,1=鍋滅敤")
+ private String status;
+
+ /** 鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛� */
+ private String delFlag;
+
+ public Long getAppId() {
+ return appId;
+ }
+
+ public void setAppId(Long appId) {
+ this.appId = appId;
+ }
+
+ public String getClientName() {
+ return clientName;
+ }
+
+ public void setClientName(String clientName) {
+ this.clientName = clientName;
+ }
+
+ public String getAppKey() {
+ return appKey;
+ }
+
+ public void setAppKey(String appKey) {
+ this.appKey = appKey;
+ }
+
+ public String getSecurityKey() {
+ return securityKey;
+ }
+
+ public void setSecurityKey(String securityKey) {
+ this.securityKey = securityKey;
+ }
+
+ public Date getValidStartTime() {
+ return validStartTime;
+ }
+
+ public void setValidStartTime(Date validStartTime) {
+ this.validStartTime = validStartTime;
+ }
+
+ public Date getValidEndTime() {
+ return validEndTime;
+ }
+
+ public void setValidEndTime(Date validEndTime) {
+ this.validEndTime = validEndTime;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getDelFlag() {
+ return delFlag;
+ }
+
+ public void setDelFlag(String delFlag) {
+ this.delFlag = delFlag;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+ .append("appId", getAppId())
+ .append("clientName", getClientName())
+ .append("appKey", getAppKey())
+ .append("securityKey", getSecurityKey())
+ .append("validStartTime", getValidStartTime())
+ .append("validEndTime", getValidEndTime())
+ .append("status", getStatus())
+ .append("delFlag", getDelFlag())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .append("remark", getRemark())
+ .toString();
+ }
+}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ServiceOrderMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ServiceOrderMapper.java
index 409f713..9e6e200 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ServiceOrderMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ServiceOrderMapper.java
@@ -2,10 +2,14 @@
import java.util.List;
import com.ruoyi.system.domain.ServiceOrder;
+import com.ruoyi.common.annotation.DataSource;
+import com.ruoyi.common.enums.DataSourceType;
+import org.apache.ibatis.annotations.Param;
/**
* 鏈嶅姟璁㈠崟Mapper鎺ュ彛
*/
+@DataSource(DataSourceType.SQLSERVER)
public interface ServiceOrderMapper {
/**
* 鏌ヨ鏈嶅姟璁㈠崟
@@ -19,9 +23,21 @@
* 鏌ヨ鏈嶅姟璁㈠崟鍒楄〃
*
* @param serviceOrder 鏈嶅姟璁㈠崟
+ * @param offset 璧峰浣嶇疆
+ * @param pageSize 姣忛〉澶у皬
* @return 鏈嶅姟璁㈠崟闆嗗悎
*/
- public List<ServiceOrder> selectServiceOrderList(ServiceOrder serviceOrder);
+ public List<ServiceOrder> selectServiceOrderList(@Param("serviceOrder") ServiceOrder serviceOrder,
+ @Param("offset") int offset,
+ @Param("pageSize") int pageSize);
+
+ /**
+ * 鏌ヨ鏈嶅姟璁㈠崟鎬绘暟
+ *
+ * @param serviceOrder 鏈嶅姟璁㈠崟淇℃伅
+ * @return 鏈嶅姟璁㈠崟鎬绘暟
+ */
+ public int selectServiceOrderCount(@Param("serviceOrder") ServiceOrder serviceOrder);
/**
* 鏂板鏈嶅姟璁㈠崟
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysClientAppMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysClientAppMapper.java
new file mode 100644
index 0000000..d9f364a
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysClientAppMapper.java
@@ -0,0 +1,57 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.SysClientApp;
+
+/**
+ * 瀹㈡埛搴旂敤閰嶇疆Mapper鎺ュ彛
+ */
+public interface SysClientAppMapper {
+ /**
+ * 鏌ヨ瀹㈡埛搴旂敤閰嶇疆
+ *
+ * @param appId 瀹㈡埛搴旂敤閰嶇疆涓婚敭
+ * @return 瀹㈡埛搴旂敤閰嶇疆
+ */
+ public SysClientApp selectSysClientAppByAppId(Long appId);
+
+ /**
+ * 鏌ヨ瀹㈡埛搴旂敤閰嶇疆鍒楄〃
+ *
+ * @param sysClientApp 瀹㈡埛搴旂敤閰嶇疆
+ * @return 瀹㈡埛搴旂敤閰嶇疆闆嗗悎
+ */
+ public List<SysClientApp> selectSysClientAppList(SysClientApp sysClientApp);
+
+ /**
+ * 鏂板瀹㈡埛搴旂敤閰嶇疆
+ *
+ * @param sysClientApp 瀹㈡埛搴旂敤閰嶇疆
+ * @return 缁撴灉
+ */
+ public int insertSysClientApp(SysClientApp sysClientApp);
+
+ /**
+ * 淇敼瀹㈡埛搴旂敤閰嶇疆
+ *
+ * @param sysClientApp 瀹㈡埛搴旂敤閰嶇疆
+ * @return 缁撴灉
+ */
+ public int updateSysClientApp(SysClientApp sysClientApp);
+
+ /**
+ * 鍒犻櫎瀹㈡埛搴旂敤閰嶇疆
+ *
+ * @param appId 瀹㈡埛搴旂敤閰嶇疆涓婚敭
+ * @return 缁撴灉
+ */
+ public int deleteSysClientAppByAppId(Long appId);
+
+ /**
+ * 鎵归噺鍒犻櫎瀹㈡埛搴旂敤閰嶇疆
+ *
+ * @param appIds 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
+ * @return 缁撴灉
+ */
+ public int deleteSysClientAppByAppIds(Long[] appIds);
+}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IServiceOrderService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IServiceOrderService.java
index 5c423bb..8f41b31 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/IServiceOrderService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IServiceOrderService.java
@@ -24,6 +24,14 @@
public List<ServiceOrder> selectServiceOrderList(ServiceOrder serviceOrder);
/**
+ * 鏌ヨ鏈嶅姟璁㈠崟鎬绘暟
+ *
+ * @param serviceOrder 鏈嶅姟璁㈠崟淇℃伅
+ * @return 鏈嶅姟璁㈠崟鎬绘暟
+ */
+ public int selectServiceOrderCount(ServiceOrder serviceOrder);
+
+ /**
* 鏂板鏈嶅姟璁㈠崟
*
* @param serviceOrder 鏈嶅姟璁㈠崟
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysClientAppService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysClientAppService.java
new file mode 100644
index 0000000..5d2b008
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysClientAppService.java
@@ -0,0 +1,57 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.SysClientApp;
+
+/**
+ * 瀹㈡埛搴旂敤閰嶇疆Service鎺ュ彛
+ */
+public interface ISysClientAppService {
+ /**
+ * 鏌ヨ瀹㈡埛搴旂敤閰嶇疆
+ *
+ * @param appId 瀹㈡埛搴旂敤閰嶇疆涓婚敭
+ * @return 瀹㈡埛搴旂敤閰嶇疆
+ */
+ public SysClientApp selectSysClientAppByAppId(Long appId);
+
+ /**
+ * 鏌ヨ瀹㈡埛搴旂敤閰嶇疆鍒楄〃
+ *
+ * @param sysClientApp 瀹㈡埛搴旂敤閰嶇疆
+ * @return 瀹㈡埛搴旂敤閰嶇疆闆嗗悎
+ */
+ public List<SysClientApp> selectSysClientAppList(SysClientApp sysClientApp);
+
+ /**
+ * 鏂板瀹㈡埛搴旂敤閰嶇疆
+ *
+ * @param sysClientApp 瀹㈡埛搴旂敤閰嶇疆
+ * @return 缁撴灉
+ */
+ public int insertSysClientApp(SysClientApp sysClientApp);
+
+ /**
+ * 淇敼瀹㈡埛搴旂敤閰嶇疆
+ *
+ * @param sysClientApp 瀹㈡埛搴旂敤閰嶇疆
+ * @return 缁撴灉
+ */
+ public int updateSysClientApp(SysClientApp sysClientApp);
+
+ /**
+ * 鎵归噺鍒犻櫎瀹㈡埛搴旂敤閰嶇疆
+ *
+ * @param appIds 闇�瑕佸垹闄ょ殑瀹㈡埛搴旂敤閰嶇疆涓婚敭闆嗗悎
+ * @return 缁撴灉
+ */
+ public int deleteSysClientAppByAppIds(Long[] appIds);
+
+ /**
+ * 鍒犻櫎瀹㈡埛搴旂敤閰嶇疆淇℃伅
+ *
+ * @param appId 瀹㈡埛搴旂敤閰嶇疆涓婚敭
+ * @return 缁撴灉
+ */
+ public int deleteSysClientAppByAppId(Long appId);
+}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ServiceOrderServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ServiceOrderServiceImpl.java
index ddac2e4..5e8f22c 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ServiceOrderServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ServiceOrderServiceImpl.java
@@ -6,9 +6,12 @@
import com.ruoyi.system.mapper.ServiceOrderMapper;
import com.ruoyi.system.domain.ServiceOrder;
import com.ruoyi.system.service.IServiceOrderService;
+import com.ruoyi.common.utils.PageUtils;
/**
- * 鏈嶅姟璁㈠崟Service涓氬姟灞傚鐞�
+ * 鏈嶅姟璁㈠崟 鏈嶅姟灞傚疄鐜�
+ *
+ * @author ruoyi
*/
@Service
public class ServiceOrderServiceImpl implements IServiceOrderService {
@@ -16,10 +19,10 @@
private ServiceOrderMapper serviceOrderMapper;
/**
- * 鏌ヨ鏈嶅姟璁㈠崟
+ * 鏌ヨ鏈嶅姟璁㈠崟淇℃伅
*
* @param serviceOrdId 鏈嶅姟璁㈠崟涓婚敭
- * @return 鏈嶅姟璁㈠崟
+ * @return 鏈嶅姟璁㈠崟淇℃伅
*/
@Override
public ServiceOrder selectServiceOrderById(Long serviceOrdId) {
@@ -29,18 +32,25 @@
/**
* 鏌ヨ鏈嶅姟璁㈠崟鍒楄〃
*
- * @param serviceOrder 鏈嶅姟璁㈠崟
- * @return 鏈嶅姟璁㈠崟
+ * @param serviceOrder 鏈嶅姟璁㈠崟淇℃伅
+ * @return 鏈嶅姟璁㈠崟闆嗗悎
*/
@Override
public List<ServiceOrder> selectServiceOrderList(ServiceOrder serviceOrder) {
- return serviceOrderMapper.selectServiceOrderList(serviceOrder);
+ // 璁$畻鍋忕Щ閲�
+ int offset = (serviceOrder.getPageNum() - 1) * serviceOrder.getPageSize();
+ return serviceOrderMapper.selectServiceOrderList(serviceOrder, offset, serviceOrder.getPageSize());
+ }
+
+ @Override
+ public int selectServiceOrderCount(ServiceOrder serviceOrder) {
+ return serviceOrderMapper.selectServiceOrderCount(serviceOrder);
}
/**
* 鏂板鏈嶅姟璁㈠崟
*
- * @param serviceOrder 鏈嶅姟璁㈠崟
+ * @param serviceOrder 鏈嶅姟璁㈠崟淇℃伅
* @return 缁撴灉
*/
@Override
@@ -51,7 +61,7 @@
/**
* 淇敼鏈嶅姟璁㈠崟
*
- * @param serviceOrder 鏈嶅姟璁㈠崟
+ * @param serviceOrder 鏈嶅姟璁㈠崟淇℃伅
* @return 缁撴灉
*/
@Override
@@ -60,9 +70,9 @@
}
/**
- * 鎵归噺鍒犻櫎鏈嶅姟璁㈠崟
+ * 鍒犻櫎鏈嶅姟璁㈠崟瀵硅薄
*
- * @param serviceOrdIds 闇�瑕佸垹闄ょ殑鏈嶅姟璁㈠崟涓婚敭
+ * @param serviceOrdIds 闇�瑕佸垹闄ょ殑鏁版嵁ID
* @return 缁撴灉
*/
@Override
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysClientAppServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysClientAppServiceImpl.java
new file mode 100644
index 0000000..f7e1844
--- /dev/null
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysClientAppServiceImpl.java
@@ -0,0 +1,121 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.SysClientAppMapper;
+import com.ruoyi.system.domain.SysClientApp;
+import com.ruoyi.system.service.ISysClientAppService;
+import com.ruoyi.common.utils.SecurityUtils;
+
+/**
+ * 瀹㈡埛搴旂敤閰嶇疆 鏈嶅姟灞傚疄鐜�
+ */
+@Service
+public class SysClientAppServiceImpl implements ISysClientAppService {
+ @Autowired
+ private SysClientAppMapper sysClientAppMapper;
+
+ /**
+ * 鏌ヨ瀹㈡埛搴旂敤閰嶇疆淇℃伅
+ *
+ * @param appId 瀹㈡埛搴旂敤閰嶇疆涓婚敭
+ * @return 瀹㈡埛搴旂敤閰嶇疆淇℃伅
+ */
+ @Override
+ public SysClientApp selectSysClientAppByAppId(Long appId) {
+ return sysClientAppMapper.selectSysClientAppByAppId(appId);
+ }
+
+ /**
+ * 鏌ヨ瀹㈡埛搴旂敤閰嶇疆鍒楄〃
+ *
+ * @param sysClientApp 瀹㈡埛搴旂敤閰嶇疆淇℃伅
+ * @return 瀹㈡埛搴旂敤閰嶇疆闆嗗悎
+ */
+ @Override
+ public List<SysClientApp> selectSysClientAppList(SysClientApp sysClientApp) {
+ return sysClientAppMapper.selectSysClientAppList(sysClientApp);
+ }
+
+ /**
+ * 鏂板瀹㈡埛搴旂敤閰嶇疆
+ *
+ * @param sysClientApp 瀹㈡埛搴旂敤閰嶇疆淇℃伅
+ * @return 缁撴灉
+ */
+ @Override
+ public int insertSysClientApp(SysClientApp sysClientApp) {
+ return sysClientAppMapper.insertSysClientApp(sysClientApp);
+ }
+
+ /**
+ * 淇敼瀹㈡埛搴旂敤閰嶇疆
+ *
+ * @param sysClientApp 瀹㈡埛搴旂敤閰嶇疆淇℃伅
+ * @return 缁撴灉
+ */
+ @Override
+ public int updateSysClientApp(SysClientApp sysClientApp) {
+ if (sysClientApp == null || sysClientApp.getAppId() == null) {
+ throw new RuntimeException("搴旂敤ID涓嶈兘涓虹┖");
+ }
+
+ try {
+ // 璁剧疆鏇存柊浜�
+ sysClientApp.setUpdateBy(SecurityUtils.getUsername());
+
+ // 妫�鏌ヨ褰曟槸鍚﹀瓨鍦�
+ SysClientApp existApp = sysClientAppMapper.selectSysClientAppByAppId(sysClientApp.getAppId());
+ if (existApp == null) {
+ throw new RuntimeException("搴旂敤閰嶇疆涓嶅瓨鍦�");
+ }
+
+ // 鎵撳嵃鏇存柊鍓嶇殑鏁版嵁
+ System.out.println("鏇存柊鍓嶇殑鏁版嵁: " + existApp);
+ System.out.println("瑕佹洿鏂扮殑鏁版嵁: " + sysClientApp);
+
+ // 鎵ц鏇存柊
+ int row = sysClientAppMapper.updateSysClientApp(sysClientApp);
+ System.out.println("鏇存柊缁撴灉: " + row);
+
+ // 楠岃瘉鏇存柊鏄惁鎴愬姛
+ SysClientApp updatedApp = sysClientAppMapper.selectSysClientAppByAppId(sysClientApp.getAppId());
+ System.out.println("鏇存柊鍚庣殑鏁版嵁: " + updatedApp);
+
+ // 濡傛灉鏁版嵁搴撶‘瀹炴洿鏂颁簡锛屼絾杩斿洖鍊煎紓甯革紝鎴戜滑杩斿洖1琛ㄧず鎴愬姛
+ if (row < 0 && updatedApp != null) {
+ System.out.println("妫�娴嬪埌鏁版嵁搴撳凡鏇存柊锛屼絾杩斿洖鍊煎紓甯革紝杩斿洖1");
+ return 1;
+ }
+
+ return row;
+ } catch (Exception e) {
+ System.err.println("鏇存柊寮傚父: " + e.getMessage());
+ e.printStackTrace();
+ throw e;
+ }
+ }
+
+ /**
+ * 鎵归噺鍒犻櫎瀹㈡埛搴旂敤閰嶇疆
+ *
+ * @param appIds 闇�瑕佸垹闄ょ殑瀹㈡埛搴旂敤閰嶇疆涓婚敭
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteSysClientAppByAppIds(Long[] appIds) {
+ return sysClientAppMapper.deleteSysClientAppByAppIds(appIds);
+ }
+
+ /**
+ * 鍒犻櫎瀹㈡埛搴旂敤閰嶇疆淇℃伅
+ *
+ * @param appId 瀹㈡埛搴旂敤閰嶇疆涓婚敭
+ * @return 缁撴灉
+ */
+ @Override
+ public int deleteSysClientAppByAppId(Long appId) {
+ return sysClientAppMapper.deleteSysClientAppByAppId(appId);
+ }
+}
\ No newline at end of file
diff --git a/ruoyi-system/src/main/resources/mapper/system/ServiceOrderMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ServiceOrderMapper.xml
index 861731f..3320df2 100644
--- a/ruoyi-system/src/main/resources/mapper/system/ServiceOrderMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/ServiceOrderMapper.xml
@@ -36,22 +36,37 @@
select ServiceOrdID, ServiceOrdUserID, ServiceOrdClass, ServiceOrdType, ServiceOrdState, ServiceOrdStartDate, ServiceOrdApptDate, ServiceOrdCoName, ServiceOrdCoPhone, ServiceOrdPtName, ServiceOrdPtAge, ServiceOrdPtSex, ServiceOrdPtKG, ServiceOrdPtNat, ServiceOrdPtIDCard, ServiceOrdTraProvince, ServiceOrdTraCity, ServiceOrdTraStreet, ServiceOrdTraEnd, ServiceOrdTraDistance, ServiceOrdTraUnitPrice, ServiceOrdTraTxnPrice, ServiceOrdTraPaidType, ServiceOrdTraPaidPrice, ServiceOrdUnitRemarks from ServiceOrder
</sql>
- <select id="selectServiceOrderList" parameterType="ServiceOrder" resultMap="ServiceOrderResult">
- <include refid="selectServiceOrderVo"/>
+ <sql id="selectServiceOrderWhere">
<where>
- <if test="serviceOrdUserID != null "> and ServiceOrdUserID = #{serviceOrdUserID}</if>
- <if test="serviceOrdClass != null and serviceOrdClass != ''"> and ServiceOrdClass = #{serviceOrdClass}</if>
- <if test="serviceOrdType != null "> and ServiceOrdType = #{serviceOrdType}</if>
- <if test="serviceOrdState != null "> and ServiceOrdState = #{serviceOrdState}</if>
- <if test="serviceOrdStartDate != null "> and ServiceOrdStartDate = #{serviceOrdStartDate}</if>
- <if test="serviceOrdApptDate != null "> and ServiceOrdApptDate = #{serviceOrdApptDate}</if>
- <if test="serviceOrdCoName != null and serviceOrdCoName != ''"> and ServiceOrdCoName like concat('%', #{serviceOrdCoName}, '%')</if>
- <if test="serviceOrdCoPhone != null and serviceOrdCoPhone != ''"> and ServiceOrdCoPhone = #{serviceOrdCoPhone}</if>
- <if test="serviceOrdPtName != null and serviceOrdPtName != ''"> and ServiceOrdPtName like concat('%', #{serviceOrdPtName}, '%')</if>
- <if test="serviceOrdPtAge != null and serviceOrdPtAge != ''"> and ServiceOrdPtAge = #{serviceOrdPtAge}</if>
- <if test="serviceOrdPtSex != null and serviceOrdPtSex != ''"> and ServiceOrdPtSex = #{serviceOrdPtSex}</if>
- <if test="serviceOrdPtIDCard != null and serviceOrdPtIDCard != ''"> and ServiceOrdPtIDCard = #{serviceOrdPtIDCard}</if>
+ <if test="serviceOrder.serviceOrdUserID != null "> and ServiceOrdUserID = #{serviceOrder.serviceOrdUserID}</if>
+ <if test="serviceOrder.serviceOrdClass != null and serviceOrder.serviceOrdClass != ''"> and ServiceOrdClass = #{serviceOrder.serviceOrdClass}</if>
+ <if test="serviceOrder.serviceOrdType != null "> and ServiceOrdType = #{serviceOrder.serviceOrdType}</if>
+ <if test="serviceOrder.serviceOrdState != null "> and ServiceOrdState = #{serviceOrder.serviceOrdState}</if>
+ <if test="serviceOrder.serviceOrdStartDate != null "> and ServiceOrdStartDate = #{serviceOrder.serviceOrdStartDate}</if>
+ <if test="serviceOrder.serviceOrdApptDate != null "> and ServiceOrdApptDate = #{serviceOrder.serviceOrdApptDate}</if>
+ <if test="serviceOrder.serviceOrdCoName != null and serviceOrder.serviceOrdCoName != ''"> and ServiceOrdCoName like '%' + #{serviceOrder.serviceOrdCoName} + '%'</if>
+ <if test="serviceOrder.serviceOrdCoPhone != null and serviceOrder.serviceOrdCoPhone != ''"> and ServiceOrdCoPhone = #{serviceOrder.serviceOrdCoPhone}</if>
+ <if test="serviceOrder.serviceOrdPtName != null and serviceOrder.serviceOrdPtName != ''"> and ServiceOrdPtName like '%' + #{serviceOrder.serviceOrdPtName} + '%'</if>
+ <if test="serviceOrder.serviceOrdPtAge != null and serviceOrder.serviceOrdPtAge != ''"> and ServiceOrdPtAge = #{serviceOrder.serviceOrdPtAge}</if>
+ <if test="serviceOrder.serviceOrdPtSex != null and serviceOrder.serviceOrdPtSex != ''"> and ServiceOrdPtSex = #{serviceOrder.serviceOrdPtSex}</if>
+ <if test="serviceOrder.serviceOrdPtIDCard != null and serviceOrder.serviceOrdPtIDCard != ''"> and ServiceOrdPtIDCard = #{serviceOrder.serviceOrdPtIDCard}</if>
</where>
+ </sql>
+
+ <select id="selectServiceOrderList" resultMap="ServiceOrderResult">
+ SELECT *
+ FROM (
+ SELECT ROW_NUMBER() OVER (ORDER BY ServiceOrdID) AS RowNum, *
+ FROM ServiceOrder
+ <include refid="selectServiceOrderWhere"/>
+ ) AS TempTable
+ WHERE RowNum BETWEEN #{offset} + 1 AND #{offset} + #{pageSize}
+ </select>
+
+ <select id="selectServiceOrderCount" resultType="Integer">
+ SELECT COUNT(1)
+ FROM ServiceOrder
+ <include refid="selectServiceOrderWhere"/>
</select>
<select id="selectServiceOrderById" parameterType="Long" resultMap="ServiceOrderResult">
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysClientAppMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysClientAppMapper.xml
new file mode 100644
index 0000000..2e3eca6
--- /dev/null
+++ b/ruoyi-system/src/main/resources/mapper/system/SysClientAppMapper.xml
@@ -0,0 +1,101 @@
+<?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.ruoyi.system.mapper.SysClientAppMapper">
+
+ <resultMap type="SysClientApp" id="SysClientAppResult">
+ <result property="appId" column="app_id" />
+ <result property="clientName" column="client_name" />
+ <result property="appKey" column="app_key" />
+ <result property="securityKey" column="security_key" />
+ <result property="validStartTime" column="valid_start_time" />
+ <result property="validEndTime" column="valid_end_time" />
+ <result property="status" column="status" />
+ <result property="delFlag" column="del_flag" />
+ <result property="createBy" column="create_by" />
+ <result property="createTime" column="create_time" />
+ <result property="updateBy" column="update_by" />
+ <result property="updateTime" column="update_time" />
+ <result property="remark" column="remark" />
+ </resultMap>
+
+ <sql id="selectSysClientAppVo">
+ select app_id, client_name, app_key, security_key, valid_start_time, valid_end_time, status, del_flag, create_by, create_time, update_by, update_time, remark from sys_client_app
+ </sql>
+
+ <select id="selectSysClientAppList" parameterType="SysClientApp" resultMap="SysClientAppResult">
+ <include refid="selectSysClientAppVo"/>
+ <where>
+ <if test="clientName != null and clientName != ''"> and client_name like concat('%', #{clientName}, '%')</if>
+ <if test="appKey != null and appKey != ''"> and app_key = #{appKey}</if>
+ <if test="status != null and status != ''"> and status = #{status}</if>
+ <if test="validStartTime != null "> and valid_start_time >= #{validStartTime}</if>
+ <if test="validEndTime != null "> and valid_end_time <= #{validEndTime}</if>
+ </where>
+ </select>
+
+ <select id="selectSysClientAppByAppId" parameterType="Long" resultMap="SysClientAppResult">
+ <include refid="selectSysClientAppVo"/>
+ where app_id = #{appId}
+ </select>
+
+ <insert id="insertSysClientApp" parameterType="SysClientApp" useGeneratedKeys="true" keyProperty="appId">
+ insert into sys_client_app
+ <trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="clientName != null">client_name,</if>
+ <if test="appKey != null">app_key,</if>
+ <if test="securityKey != null">security_key,</if>
+ <if test="validStartTime != null">valid_start_time,</if>
+ <if test="validEndTime != null">valid_end_time,</if>
+ <if test="status != null">status,</if>
+ <if test="delFlag != null">del_flag,</if>
+ <if test="createBy != null">create_by,</if>
+ <if test="createTime != null">create_time,</if>
+ <if test="updateBy != null">update_by,</if>
+ <if test="updateTime != null">update_time,</if>
+ <if test="remark != null">remark,</if>
+ </trim>
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="clientName != null">#{clientName},</if>
+ <if test="appKey != null">#{appKey},</if>
+ <if test="securityKey != null">#{securityKey},</if>
+ <if test="validStartTime != null">#{validStartTime},</if>
+ <if test="validEndTime != null">#{validEndTime},</if>
+ <if test="status != null">#{status},</if>
+ <if test="delFlag != null">#{delFlag},</if>
+ <if test="createBy != null">#{createBy},</if>
+ <if test="createTime != null">#{createTime},</if>
+ <if test="updateBy != null">#{updateBy},</if>
+ <if test="updateTime != null">#{updateTime},</if>
+ <if test="remark != null">#{remark},</if>
+ </trim>
+ </insert>
+
+ <update id="updateSysClientApp" parameterType="SysClientApp">
+ update sys_client_app
+ <set>
+ <if test="clientName != null and clientName != ''">client_name = #{clientName},</if>
+ <if test="appKey != null and appKey != ''">app_key = #{appKey},</if>
+ <if test="securityKey != null and securityKey != ''">security_key = #{securityKey},</if>
+ <if test="validStartTime != null">valid_start_time = #{validStartTime},</if>
+ <if test="validEndTime != null">valid_end_time = #{validEndTime},</if>
+ <if test="status != null and status != ''">status = #{status},</if>
+ <if test="remark != null">remark = #{remark},</if>
+ <if test="updateBy != null">update_by = #{updateBy},</if>
+ update_time = sysdate()
+ </set>
+ where app_id = #{appId}
+ </update>
+
+ <delete id="deleteSysClientAppByAppId" parameterType="Long">
+ delete from sys_client_app where app_id = #{appId}
+ </delete>
+
+ <delete id="deleteSysClientAppByAppIds" parameterType="Long">
+ delete from sys_client_app where app_id in
+ <foreach item="appId" collection="array" open="(" separator="," close=")">
+ #{appId}
+ </foreach>
+ </delete>
+</mapper>
\ No newline at end of file
diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json
index 3893f08..e7b33f4 100644
--- a/ruoyi-ui/package.json
+++ b/ruoyi-ui/package.json
@@ -48,6 +48,7 @@
"js-beautify": "1.13.0",
"js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1",
+ "md5": "^2.3.0",
"nprogress": "0.2.0",
"quill": "2.0.2",
"screenfull": "5.0.2",
diff --git a/ruoyi-ui/src/api/system/clientApp.js b/ruoyi-ui/src/api/system/clientApp.js
new file mode 100644
index 0000000..a125b53
--- /dev/null
+++ b/ruoyi-ui/src/api/system/clientApp.js
@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 鏌ヨ瀹㈡埛搴旂敤閰嶇疆鍒楄〃
+export function listClientApp(query) {
+ return request({
+ url: '/system/clientApp/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 鏌ヨ瀹㈡埛搴旂敤閰嶇疆璇︾粏
+export function getClientApp(appId) {
+ return request({
+ url: '/system/clientApp/' + appId,
+ method: 'get'
+ })
+}
+
+// 鏂板瀹㈡埛搴旂敤閰嶇疆
+export function addClientApp(data) {
+ return request({
+ url: '/system/clientApp',
+ method: 'post',
+ data: data
+ })
+}
+
+// 淇敼瀹㈡埛搴旂敤閰嶇疆
+export function updateClientApp(data) {
+ return request({
+ url: '/system/clientApp',
+ method: 'put',
+ data: data
+ })
+}
+
+// 鍒犻櫎瀹㈡埛搴旂敤閰嶇疆
+export function delClientApp(appId) {
+ return request({
+ url: '/system/clientApp/' + appId,
+ method: 'delete'
+ })
+}
+
+// 瀵煎嚭瀹㈡埛搴旂敤閰嶇疆
+export function exportClientApp(query) {
+ return request({
+ url: '/system/clientApp/export',
+ method: 'post',
+ params: query
+ })
+}
\ No newline at end of file
diff --git a/ruoyi-ui/src/api/system/order.js b/ruoyi-ui/src/api/system/order.js
index 98b4bd4..ccb017e 100644
--- a/ruoyi-ui/src/api/system/order.js
+++ b/ruoyi-ui/src/api/system/order.js
@@ -9,6 +9,15 @@
})
}
+// 楠岃瘉璁㈠崟璁块棶鍙傛暟
+export function validateOrderAccess(params) {
+ return request({
+ url: '/system/order/validate/check',
+ method: 'get',
+ params: params
+ })
+}
+
// 鏌ヨ鏈嶅姟璁㈠崟璇︾粏
export function getOrder(serviceOrdId) {
return request({
diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index 71907b6..4550b66 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -52,6 +52,12 @@
hidden: true
},
{
+ path: '/system/order/anonymous',
+ component: () => import('@/views/system/serviceOrder/anonymous'),
+ hidden: true,
+ meta: { title: '鍖垮悕璁㈠崟鏌ョ湅', icon: 'eye',anonymous: true }
+ },
+ {
path: '/404',
component: () => import('@/views/error/404'),
hidden: true
diff --git a/ruoyi-ui/src/views/system/clientApp/index.vue b/ruoyi-ui/src/views/system/clientApp/index.vue
new file mode 100644
index 0000000..31ef400
--- /dev/null
+++ b/ruoyi-ui/src/views/system/clientApp/index.vue
@@ -0,0 +1,356 @@
+<template>
+ <div class="app-container">
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+ <el-form-item label="瀹㈡埛鍚嶇О" prop="clientName">
+ <el-input
+ v-model="queryParams.clientName"
+ placeholder="璇疯緭鍏ュ鎴峰悕绉�"
+ clearable
+ size="small"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="搴旂敤鏍囪瘑" prop="appKey">
+ <el-input
+ v-model="queryParams.appKey"
+ placeholder="璇疯緭鍏ュ簲鐢ㄦ爣璇�"
+ clearable
+ size="small"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="鐘舵��" prop="status">
+ <el-select v-model="queryParams.status" placeholder="璇烽�夋嫨鐘舵��" clearable size="small">
+ <el-option
+ v-for="dict in dict.type.sys_normal_disable"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value"
+ />
+ </el-select>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
+
+ <el-row :gutter="10" class="mb8">
+ <el-col :span="1.5">
+ <el-button
+ type="primary"
+ plain
+ icon="el-icon-plus"
+ size="mini"
+ @click="handleAdd"
+ v-hasPermi="['system:clientApp:add']"
+ >鏂板</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="success"
+ plain
+ icon="el-icon-edit"
+ size="mini"
+ :disabled="single"
+ @click="handleUpdate"
+ v-hasPermi="['system:clientApp:edit']"
+ >淇敼</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="danger"
+ plain
+ icon="el-icon-delete"
+ size="mini"
+ :disabled="multiple"
+ @click="handleDelete"
+ v-hasPermi="['system:clientApp:remove']"
+ >鍒犻櫎</el-button>
+ </el-col>
+ <el-col :span="1.5">
+ <el-button
+ type="warning"
+ plain
+ icon="el-icon-download"
+ size="mini"
+ @click="handleExport"
+ v-hasPermi="['system:clientApp:export']"
+ >瀵煎嚭</el-button>
+ </el-col>
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+ </el-row>
+
+ <el-table v-loading="loading" :data="clientAppList" @selection-change="handleSelectionChange">
+ <el-table-column type="selection" width="55" align="center" />
+ <el-table-column label="搴旂敤ID" align="center" prop="appId" />
+ <el-table-column label="瀹㈡埛鍚嶇О" align="center" prop="clientName" />
+ <el-table-column label="搴旂敤鏍囪瘑" align="center" prop="appKey" />
+ <el-table-column label="瀹夊叏瀵嗛挜" align="center" prop="securityKey" />
+ <el-table-column label="鏈夋晥鏈熷紑濮�" align="center" prop="validStartTime" width="180">
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.validStartTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鏈夋晥鏈熺粨鏉�" align="center" prop="validEndTime" width="180">
+ <template slot-scope="scope">
+ <span>{{ parseTime(scope.row.validEndTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+ </template>
+ </el-table-column>
+ <el-table-column label="鐘舵��" align="center" prop="status">
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
+ <template slot-scope="scope">
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-edit"
+ @click="handleUpdate(scope.row)"
+ v-hasPermi="['system:clientApp:edit']"
+ >淇敼</el-button>
+ <el-button
+ size="mini"
+ type="text"
+ icon="el-icon-delete"
+ @click="handleDelete(scope.row)"
+ v-hasPermi="['system:clientApp:remove']"
+ >鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <pagination
+ v-show="total>0"
+ :total="total"
+ :page.sync="queryParams.pageNum"
+ :limit.sync="queryParams.pageSize"
+ @pagination="getList"
+ />
+
+ <!-- 娣诲姞鎴栦慨鏀瑰鎴峰簲鐢ㄩ厤缃璇濇 -->
+ <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+ <el-form-item label="瀹㈡埛鍚嶇О" prop="clientName">
+ <el-input v-model="form.clientName" placeholder="璇疯緭鍏ュ鎴峰悕绉�" />
+ </el-form-item>
+ <el-form-item label="搴旂敤鏍囪瘑" prop="appKey">
+ <el-input v-model="form.appKey" placeholder="璇疯緭鍏ュ簲鐢ㄦ爣璇�" />
+ </el-form-item>
+ <el-form-item label="瀹夊叏瀵嗛挜" prop="securityKey">
+ <el-input v-model="form.securityKey" placeholder="璇疯緭鍏ュ畨鍏ㄥ瘑閽�" />
+ </el-form-item>
+ <el-form-item label="鏈夋晥鏈�" prop="validTime">
+ <el-date-picker
+ v-model="validTime"
+ type="datetimerange"
+ range-separator="鑷�"
+ start-placeholder="寮�濮嬫棩鏈�"
+ end-placeholder="缁撴潫鏃ユ湡"
+ value-format="yyyy-MM-dd HH:mm:ss"
+ @change="handleValidTimeChange"
+ ></el-date-picker>
+ </el-form-item>
+ <el-form-item label="鐘舵��" prop="status">
+ <el-radio-group v-model="form.status">
+ <el-radio
+ v-for="dict in dict.type.sys_normal_disable"
+ :key="dict.value"
+ :label="dict.value"
+ >{{dict.label}}</el-radio>
+ </el-radio-group>
+ </el-form-item>
+ <el-form-item label="澶囨敞" prop="remark">
+ <el-input v-model="form.remark" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" />
+ </el-form-item>
+ </el-form>
+ <div slot="footer" class="dialog-footer">
+ <el-button type="primary" @click="submitForm">纭� 瀹�</el-button>
+ <el-button @click="cancel">鍙� 娑�</el-button>
+ </div>
+ </el-dialog>
+ </div>
+</template>
+
+<script>
+import { listClientApp, getClientApp, delClientApp, addClientApp, updateClientApp, exportClientApp } from "@/api/system/clientApp";
+
+export default {
+ name: "ClientApp",
+ dicts: ['sys_normal_disable'],
+ data() {
+ return {
+ // 閬僵灞�
+ loading: true,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 鎬绘潯鏁�
+ total: 0,
+ // 瀹㈡埛搴旂敤閰嶇疆琛ㄦ牸鏁版嵁
+ clientAppList: [],
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ // 鏈夋晥鏈熸椂闂磋寖鍥�
+ validTime: [],
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ clientName: null,
+ appKey: null,
+ status: null
+ },
+ // 琛ㄥ崟鍙傛暟
+ form: {},
+ // 琛ㄥ崟鏍¢獙
+ rules: {
+ clientName: [
+ { required: true, message: "瀹㈡埛鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }
+ ],
+ appKey: [
+ { required: true, message: "搴旂敤鏍囪瘑涓嶈兘涓虹┖", trigger: "blur" }
+ ],
+ securityKey: [
+ { required: true, message: "瀹夊叏瀵嗛挜涓嶈兘涓虹┖", trigger: "blur" }
+ ],
+ status: [
+ { required: true, message: "鐘舵�佷笉鑳戒负绌�", trigger: "change" }
+ ]
+ }
+ };
+ },
+ created() {
+ this.getList();
+ },
+ methods: {
+ /** 鏌ヨ瀹㈡埛搴旂敤閰嶇疆鍒楄〃 */
+ getList() {
+ this.loading = true;
+ listClientApp(this.queryParams).then(response => {
+ this.clientAppList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+ // 鍙栨秷鎸夐挳
+ cancel() {
+ this.open = false;
+ this.reset();
+ },
+ // 琛ㄥ崟閲嶇疆
+ reset() {
+ this.form = {
+ appId: null,
+ clientName: null,
+ appKey: null,
+ securityKey: null,
+ validStartTime: null,
+ validEndTime: null,
+ status: "0",
+ remark: null
+ };
+ this.validTime = [];
+ this.resetForm("form");
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.resetForm("queryForm");
+ this.handleQuery();
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ this.ids = selection.map(item => item.appId)
+ this.single = selection.length!==1
+ this.multiple = !selection.length
+ },
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ this.reset();
+ this.open = true;
+ this.title = "娣诲姞瀹㈡埛搴旂敤閰嶇疆";
+ },
+ /** 淇敼鎸夐挳鎿嶄綔 */
+ handleUpdate(row) {
+ this.reset();
+ const appId = row.appId || this.ids[0];
+ if (!appId) {
+ this.$modal.msgError("璇烽�夋嫨瑕佷慨鏀圭殑鏁版嵁");
+ return;
+ }
+ getClientApp(appId).then(response => {
+ this.form = response.data;
+ // 纭繚鏃堕棿鏍煎紡姝g‘
+ if (this.form.validStartTime && this.form.validEndTime) {
+ this.validTime = [
+ this.parseTime(this.form.validStartTime, '{y}-{m}-{d} {h}:{i}:{s}'),
+ this.parseTime(this.form.validEndTime, '{y}-{m}-{d} {h}:{i}:{s}')
+ ];
+ }
+ this.open = true;
+ this.title = "淇敼瀹㈡埛搴旂敤閰嶇疆";
+ });
+ },
+ /** 鎻愪氦鎸夐挳 */
+ submitForm() {
+ this.$refs["form"].validate(valid => {
+ if (valid) {
+ if (this.form.appId != null) {
+ updateClientApp(this.form).then(response => {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ this.open = false;
+ this.getList();
+ });
+ } else {
+ addClientApp(this.form).then(response => {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.open = false;
+ this.getList();
+ });
+ }
+ }
+ });
+ },
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete(row) {
+ const appIds = row.appId || this.ids;
+ this.$modal.confirm('鏄惁纭鍒犻櫎瀹㈡埛搴旂敤閰嶇疆缂栧彿涓�"' + appIds + '"鐨勬暟鎹」锛�').then(function() {
+ return delClientApp(appIds);
+ }).then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ }).catch(() => {});
+ },
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ this.download('system/clientApp/export', {
+ ...this.queryParams
+ }, `clientApp_${new Date().getTime()}.xlsx`)
+ },
+ // 澶勭悊鏈夋晥鏈熸椂闂村彉鍖�
+ handleValidTimeChange(val) {
+ if (val) {
+ this.form.validStartTime = val[0];
+ this.form.validEndTime = val[1];
+ } else {
+ this.form.validStartTime = null;
+ this.form.validEndTime = null;
+ }
+ }
+ }
+};
+</script>
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/system/serviceOrder/anonymous.vue b/ruoyi-ui/src/views/system/serviceOrder/anonymous.vue
new file mode 100644
index 0000000..ed3246e
--- /dev/null
+++ b/ruoyi-ui/src/views/system/serviceOrder/anonymous.vue
@@ -0,0 +1,82 @@
+<template>
+ <div class="app-container">
+ <div v-if="!validated" class="loading-container">
+ <el-alert
+ :title="errorMessage || '姝e湪鍔犺浇璁㈠崟鏁版嵁...'"
+ :type="errorMessage ? 'error' : 'info'"
+ :closable="false"
+ show-icon>
+ </el-alert>
+ </div>
+ <div v-else>
+ <!-- 澶嶇敤璁㈠崟璇︽儏灞曠ず閫昏緫 -->
+ <el-descriptions title="鏈嶅姟璁㈠崟璇︽儏" :column="2" border>
+ <el-descriptions-item label="璁㈠崟缂栧彿">{{ orderInfo.serviceOrdId }}</el-descriptions-item>
+ <el-descriptions-item label="鑱旂郴浜�">{{ orderInfo.serviceOrdCoName }}</el-descriptions-item>
+ <el-descriptions-item label="鎮h�呭鍚�">{{ orderInfo.serviceOrdPtName }}</el-descriptions-item>
+ <el-descriptions-item label="鑱旂郴鐢佃瘽">{{ orderInfo.serviceOrdCoPhone }}</el-descriptions-item>
+ <el-descriptions-item label="鎮h�呮�у埆">{{ orderInfo.serviceOrdPtSex }}</el-descriptions-item>
+ <el-descriptions-item label="鍑哄彂鏃堕棿">{{ orderInfo.serviceOrdStartDate }}</el-descriptions-item>
+ <el-descriptions-item label="鐩殑鍦板潃">{{ orderInfo.serviceOrdTraEnd }}</el-descriptions-item>
+ <el-descriptions-item label="璁㈠崟鐘舵��">
+ <dict-tag :options="dict.type.sys_order_status" :value="orderInfo.serviceOrdState"/>
+ </el-descriptions-item>
+ </el-descriptions>
+ </div>
+ </div>
+</template>
+
+<script>
+import { getOrder } from "@/api/system/order";
+import { validateOrderAccess } from "@/api/system/order";
+
+export default {
+ name: "AnonymousOrder",
+ dicts: ['sys_order_status'],
+ data() {
+ return {
+ validated: false,
+ orderInfo: {},
+ errorMessage: ''
+ };
+ },
+ created() {
+ this.validateAndLoad();
+ },
+ methods: {
+ async validateAndLoad() {
+ try {
+ // 璋冪敤鍚庣楠岃瘉鎺ュ彛
+ const validateResult = await validateOrderAccess(this.$route.query);
+ if (validateResult.code !== 200) {
+ this.errorMessage = validateResult.msg;
+ this.validated = true;
+ setTimeout(() => {
+ this.$router.push('/401');
+ }, 2000);
+ return;
+ }
+
+ // 楠岃瘉閫氳繃鍚庡姞杞借鍗曟暟鎹�
+ const response = await getOrder(this.$route.query.serviceOrderId);
+ this.orderInfo = response.data;
+ this.validated = true;
+ } catch (error) {
+ console.error('楠岃瘉鎴栧姞杞借鍗曟暟鎹け璐�:', error);
+ this.errorMessage = '楠岃瘉鎴栧姞杞借鍗曟暟鎹け璐ワ紝璇风◢鍚庨噸璇�';
+ this.validated = true;
+ setTimeout(() => {
+ this.$router.push('/401');
+ }, 2000);
+ }
+ }
+ }
+};
+</script>
+
+<style scoped>
+.loading-container {
+ margin: 20px;
+ text-align: center;
+}
+</style>
\ No newline at end of file
diff --git a/ruoyi-ui/src/views/system/order/order.vue b/ruoyi-ui/src/views/system/serviceOrder/index.vue
similarity index 67%
rename from ruoyi-ui/src/views/system/order/order.vue
rename to ruoyi-ui/src/views/system/serviceOrder/index.vue
index 4d530eb..c1f36e4 100644
--- a/ruoyi-ui/src/views/system/order/order.vue
+++ b/ruoyi-ui/src/views/system/serviceOrder/index.vue
@@ -1,19 +1,28 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
- <el-form-item label="璁㈠崟ID" prop="serviceOrdId">
+ <el-form-item label="璁㈠崟缂栧彿" prop="serviceOrdId">
<el-input
v-model="queryParams.serviceOrdId"
- placeholder="璇疯緭鍏ヨ鍗旾D"
+ placeholder="璇疯緭鍏ヨ鍗曠紪鍙�"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
- <el-form-item label="鐥呬汉濮撳悕" prop="serviceOrdPtName">
+ <el-form-item label="鎮h�呭鍚�" prop="serviceOrdPtName">
<el-input
v-model="queryParams.serviceOrdPtName"
- placeholder="璇疯緭鍏ョ梾浜哄鍚�"
+ placeholder="璇疯緭鍏ユ偅鑰呭鍚�"
+ clearable
+ size="small"
+ @keyup.enter.native="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="鑱旂郴鐢佃瘽" prop="serviceOrdCoPhone">
+ <el-input
+ v-model="queryParams.serviceOrdCoPhone"
+ placeholder="璇疯緭鍏ヨ仈绯荤數璇�"
clearable
size="small"
@keyup.enter.native="handleQuery"
@@ -22,24 +31,12 @@
<el-form-item label="璁㈠崟鐘舵��" prop="serviceOrdState">
<el-select v-model="queryParams.serviceOrdState" placeholder="璇烽�夋嫨璁㈠崟鐘舵��" clearable size="small">
<el-option
- v-for="dict in dict.type.sys_order_state"
+ v-for="dict in dict.type.sys_order_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
- </el-form-item>
- <el-form-item label="寮�濮嬫棩鏈�">
- <el-date-picker
- v-model="dateRange"
- size="small"
- style="width: 240px"
- value-format="yyyy-MM-dd"
- type="daterange"
- range-separator="-"
- start-placeholder="寮�濮嬫棩鏈�"
- end-placeholder="缁撴潫鏃ユ湡"
- ></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
@@ -95,23 +92,21 @@
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
- <el-table-column label="璁㈠崟ID" align="center" prop="serviceOrdId" />
- <el-table-column label="鐥呬汉濮撳悕" align="center" prop="serviceOrdPtName" />
- <el-table-column label="鐥呬汉骞撮緞" align="center" prop="serviceOrdPtAge" />
- <el-table-column label="鐥呬汉鎬у埆" align="center" prop="serviceOrdPtSex" />
+ <el-table-column label="璁㈠崟缂栧彿" align="center" prop="serviceOrdId" />
+ <el-table-column label="鑱旂郴浜�" align="center" prop="serviceOrdCoName"/>
+ <el-table-column label="鎮h�呭鍚�" align="center" prop="serviceOrdPtName"/>
+ <el-table-column label="鑱旂郴鐢佃瘽" align="center" prop="serviceOrdCoPhone"/>
+ <el-table-column label="鎮h�呮�у埆" align="center" prop="serviceOrdPtSex"/>
+ <el-table-column label="鍑哄彂鏃堕棿" align="center" prop="serviceOrdStartDate" />
+ <el-table-column label="鐩殑鍦板潃" align="center" prop="serviceOrdTraEnd" />
<el-table-column label="璁㈠崟鐘舵��" align="center" prop="serviceOrdState">
<template slot-scope="scope">
- <dict-tag :options="dict.type.sys_order_state" :value="scope.row.serviceOrdState"/>
+ <dict-tag :options="dict.type.sys_order_status" :value="scope.row.serviceOrdState"/>
</template>
</el-table-column>
- <el-table-column label="寮�濮嬫棩鏈�" align="center" prop="serviceOrdStartDate" width="180">
+ <el-table-column label="鍒涘缓鏃堕棿" align="center" prop="createTime" width="180">
<template slot-scope="scope">
- <span>{{ parseTime(scope.row.serviceOrdStartDate, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column label="棰勭害鏃ユ湡" align="center" prop="serviceOrdApptDate" width="180">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.serviceOrdApptDate, '{y}-{m}-{d}') }}</span>
+ <span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
@@ -145,50 +140,30 @@
<!-- 娣诲姞鎴栦慨鏀规湇鍔¤鍗曞璇濇 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
- <el-form-item label="鐥呬汉濮撳悕" prop="serviceOrdPtName">
- <el-input v-model="form.serviceOrdPtName" placeholder="璇疯緭鍏ョ梾浜哄鍚�" />
+ <el-form-item label="鎮h�呭鍚�" prop="serviceOrdPtName">
+ <el-input v-model="form.serviceOrdPtName" placeholder="璇疯緭鍏ユ偅鑰呭鍚�" />
</el-form-item>
- <el-form-item label="鐥呬汉骞撮緞" prop="serviceOrdPtAge">
- <el-input v-model="form.serviceOrdPtAge" placeholder="璇疯緭鍏ョ梾浜哄勾榫�" />
+ <el-form-item label="鑱旂郴鐢佃瘽" prop="serviceOrdCoPhone">
+ <el-input v-model="form.serviceOrdCoPhone" placeholder="璇疯緭鍏ヨ仈绯荤數璇�" />
</el-form-item>
- <el-form-item label="鐥呬汉鎬у埆" prop="serviceOrdPtSex">
- <el-select v-model="form.serviceOrdPtSex" placeholder="璇烽�夋嫨鐥呬汉鎬у埆">
- <el-option
- v-for="dict in dict.type.sys_user_sex"
- :key="dict.value"
- :label="dict.label"
- :value="dict.value"
- ></el-option>
- </el-select>
+ <el-form-item label="鍑哄彂鍦板潃" prop="serviceOrdTraStreet">
+ <el-input v-model="form.serviceOrdTraStreet" placeholder="璇疯緭鍏ュ嚭鍙戝湴鍧�" />
+ </el-form-item>
+ <el-form-item label="鐩殑鍦板潃" prop="serviceOrdTraEnd">
+ <el-input v-model="form.serviceOrdTraEnd" placeholder="璇疯緭鍏ョ洰鐨勫湴鍧�" />
</el-form-item>
<el-form-item label="璁㈠崟鐘舵��" prop="serviceOrdState">
<el-select v-model="form.serviceOrdState" placeholder="璇烽�夋嫨璁㈠崟鐘舵��">
<el-option
- v-for="dict in dict.type.sys_order_state"
+ v-for="dict in dict.type.sys_order_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
- <el-form-item label="寮�濮嬫棩鏈�" prop="serviceOrdStartDate">
- <el-date-picker
- v-model="form.serviceOrdStartDate"
- type="datetime"
- placeholder="閫夋嫨寮�濮嬫棩鏈�"
- value-format="yyyy-MM-dd HH:mm:ss"
- />
- </el-form-item>
- <el-form-item label="棰勭害鏃ユ湡" prop="serviceOrdApptDate">
- <el-date-picker
- v-model="form.serviceOrdApptDate"
- type="datetime"
- placeholder="閫夋嫨棰勭害鏃ユ湡"
- value-format="yyyy-MM-dd HH:mm:ss"
- />
- </el-form-item>
- <el-form-item label="璁㈠崟澶囨敞" prop="serviceOrdUnitRemarks">
- <el-input v-model="form.serviceOrdUnitRemarks" type="textarea" placeholder="璇疯緭鍏ヨ鍗曞娉�" />
+ <el-form-item label="澶囨敞" prop="serviceOrdUnitRemarks">
+ <el-input v-model="form.serviceOrdUnitRemarks" type="textarea" placeholder="璇疯緭鍏ュ娉�" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -204,7 +179,7 @@
export default {
name: "Order",
- dicts: ['sys_order_state', 'sys_user_sex'],
+ dicts: ['sys_order_status'],
data() {
return {
// 閬僵灞�
@@ -225,14 +200,13 @@
title: "",
// 鏄惁鏄剧ず寮瑰嚭灞�
open: false,
- // 鏃ユ湡鑼冨洿
- dateRange: [],
// 鏌ヨ鍙傛暟
queryParams: {
pageNum: 1,
pageSize: 10,
serviceOrdId: null,
serviceOrdPtName: null,
+ serviceOrdCoPhone: null,
serviceOrdState: null
},
// 琛ㄥ崟鍙傛暟
@@ -240,22 +214,19 @@
// 琛ㄥ崟鏍¢獙
rules: {
serviceOrdPtName: [
- { required: true, message: "鐥呬汉濮撳悕涓嶈兘涓虹┖", trigger: "blur" }
+ { required: true, message: "鎮h�呭鍚嶄笉鑳戒负绌�", trigger: "blur" }
],
- serviceOrdPtAge: [
- { required: true, message: "鐥呬汉骞撮緞涓嶈兘涓虹┖", trigger: "blur" }
+ serviceOrdCoPhone: [
+ { required: true, message: "鑱旂郴鐢佃瘽涓嶈兘涓虹┖", trigger: "blur" }
],
- serviceOrdPtSex: [
- { required: true, message: "鐥呬汉鎬у埆涓嶈兘涓虹┖", trigger: "change" }
+ serviceOrdTraStreet: [
+ { required: true, message: "鍑哄彂鍦板潃涓嶈兘涓虹┖", trigger: "blur" }
+ ],
+ serviceOrdTraEnd: [
+ { required: true, message: "鐩殑鍦板潃涓嶈兘涓虹┖", trigger: "blur" }
],
serviceOrdState: [
{ required: true, message: "璁㈠崟鐘舵�佷笉鑳戒负绌�", trigger: "change" }
- ],
- serviceOrdStartDate: [
- { required: true, message: "寮�濮嬫棩鏈熶笉鑳戒负绌�", trigger: "blur" }
- ],
- serviceOrdApptDate: [
- { required: true, message: "棰勭害鏃ユ湡涓嶈兘涓虹┖", trigger: "blur" }
]
}
};
@@ -267,7 +238,7 @@
/** 鏌ヨ鏈嶅姟璁㈠崟鍒楄〃 */
getList() {
this.loading = true;
- listOrder(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+ listOrder(this.queryParams).then(response => {
this.orderList = response.rows;
this.total = response.total;
this.loading = false;
@@ -282,29 +253,11 @@
reset() {
this.form = {
serviceOrdId: null,
- serviceOrdUserID: null,
- serviceOrdClass: null,
- serviceOrdType: null,
- serviceOrdState: null,
- serviceOrdStartDate: null,
- serviceOrdApptDate: null,
- serviceOrdCoName: null,
- serviceOrdCoPhone: null,
serviceOrdPtName: null,
- serviceOrdPtAge: null,
- serviceOrdPtSex: null,
- serviceOrdPtKG: null,
- serviceOrdPtNat: null,
- serviceOrdPtIDCard: null,
- serviceOrdTraProvince: null,
- serviceOrdTraCity: null,
+ serviceOrdCoPhone: null,
serviceOrdTraStreet: null,
serviceOrdTraEnd: null,
- serviceOrdTraDistance: null,
- serviceOrdTraUnitPrice: null,
- serviceOrdTraTxnPrice: null,
- serviceOrdTraPaidType: null,
- serviceOrdTraPaidPrice: null,
+ serviceOrdState: null,
serviceOrdUnitRemarks: null
};
this.resetForm("form");
@@ -316,7 +269,6 @@
},
/** 閲嶇疆鎸夐挳鎿嶄綔 */
resetQuery() {
- this.dateRange = [];
this.resetForm("queryForm");
this.handleQuery();
},
diff --git a/sql/ry_20250417.sql b/sql/ry_20250417.sql
index d6ee79f..37e9a96 100644
--- a/sql/ry_20250417.sql
+++ b/sql/ry_20250417.sql
@@ -701,4 +701,31 @@
update_by varchar(64) default '' comment '鏇存柊鑰�',
update_time datetime comment '鏇存柊鏃堕棿',
primary key (column_id)
-) engine=innodb auto_increment=1 comment = '浠g爜鐢熸垚涓氬姟琛ㄥ瓧娈�';
\ No newline at end of file
+) engine=innodb auto_increment=1 comment = '浠g爜鐢熸垚涓氬姟琛ㄥ瓧娈�';
+
+
+-- ----------------------------
+-- 20銆佸鎴峰簲鐢ㄩ厤缃〃
+-- ----------------------------
+drop table if exists sys_client_app;
+create table sys_client_app (
+ app_id bigint(20) not null auto_increment comment '搴旂敤ID',
+ client_name varchar(50) not null comment '瀹㈡埛鍚嶇О',
+ app_key varchar(64) not null comment '搴旂敤鏍囪瘑',
+ security_key varchar(64) not null comment '瀹夊叏瀵嗛挜',
+ valid_start_time datetime comment '鏈夋晥鏈熷紑濮嬫椂闂�',
+ valid_end_time datetime comment '鏈夋晥鏈熺粨鏉熸椂闂�',
+ status char(1) default '0' comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+ del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
+ create_by varchar(64) default '' comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by varchar(64) default '' comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ remark varchar(500) default null comment '澶囨敞',
+ primary key (app_id),
+ unique (app_key)
+) engine=innodb auto_increment=100 comment = '瀹㈡埛搴旂敤閰嶇疆琛�';
+
+-- ----------------------------
+-- 鍒濆鍖�-瀹㈡埛搴旂敤閰嶇疆琛ㄦ暟鎹�
+-- ----------------------------
\ No newline at end of file
diff --git a/sql/sys_client_app.sql b/sql/sys_client_app.sql
new file mode 100644
index 0000000..79293aa
--- /dev/null
+++ b/sql/sys_client_app.sql
@@ -0,0 +1,26 @@
+-- ----------------------------
+-- 瀹㈡埛搴旂敤閰嶇疆琛�
+-- ----------------------------
+drop table if exists sys_client_app;
+create table sys_client_app (
+ app_id bigint(20) not null auto_increment comment '搴旂敤ID',
+ client_name varchar(50) not null comment '瀹㈡埛鍚嶇О',
+ app_key varchar(64) not null comment '搴旂敤鏍囪瘑',
+ security_key varchar(64) not null comment '瀹夊叏瀵嗛挜',
+ valid_start_time datetime comment '鏈夋晥鏈熷紑濮嬫椂闂�',
+ valid_end_time datetime comment '鏈夋晥鏈熺粨鏉熸椂闂�',
+ status char(1) default '0' comment '鐘舵�侊紙0姝e父 1鍋滅敤锛�',
+ del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 2浠h〃鍒犻櫎锛�',
+ create_by varchar(64) default '' comment '鍒涘缓鑰�',
+ create_time datetime comment '鍒涘缓鏃堕棿',
+ update_by varchar(64) default '' comment '鏇存柊鑰�',
+ update_time datetime comment '鏇存柊鏃堕棿',
+ remark varchar(500) default null comment '澶囨敞',
+ primary key (app_id),
+ unique (app_key)
+) engine=innodb auto_increment=100 comment = '瀹㈡埛搴旂敤閰嶇疆琛�';
+
+-- ----------------------------
+-- 鍒濆鍖�-瀹㈡埛搴旂敤閰嶇疆琛ㄦ暟鎹�
+-- ----------------------------
+insert into sys_client_app values(1, '娴嬭瘯瀹㈡埛', 'appId1', 'your_security_key', sysdate(), date_add(sysdate(), interval 1 year), '0', '0', 'admin', sysdate(), '', null, '娴嬭瘯瀹㈡埛搴旂敤');
\ No newline at end of file
--
Gitblit v1.9.1