diff --git a/smart-api/smart-api-system/pom.xml b/smart-api/smart-api-system/pom.xml
index 156b13fe369aca0f1bf63aa6397adb885108e6ab..1d29d07cdfcb7f12c3b8d700f0ed4448346fa8a8 100644
--- a/smart-api/smart-api-system/pom.xml
+++ b/smart-api/smart-api-system/pom.xml
@@ -22,7 +22,11 @@
com.ruoyi
smart-common-core
-
+
diff --git a/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/RemoteUserService.java b/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/RemoteUserService.java
index 962e2bcec310c6290a425d7b5c3ee2af179d3477..04d4a66356e34822bab450b079ce3245bfa74005 100644
--- a/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/RemoteUserService.java
+++ b/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/RemoteUserService.java
@@ -24,4 +24,13 @@ public interface RemoteUserService
*/
@GetMapping(value = "/user/info/{username}")
public R getUserInfo(@PathVariable("username") String username);
+
+
+ /**
+ * 通过用户ID查询用户信息
+ * @param userId
+ * @return
+ */
+ @GetMapping(value = "/user/getById/{userId}")
+ public R getUserInfoById(@PathVariable("userId") Long userId);
}
diff --git a/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/domain/SysDept.java b/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/domain/SysDept.java
index 702a5e093ce1073e35014081630ef8aeb90c98de..44c020769287fc8a613235fda8081db132e83457 100644
--- a/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/domain/SysDept.java
+++ b/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/domain/SysDept.java
@@ -14,7 +14,10 @@ import com.zhentao.common.core.web.domain.BaseEntity;
*
* @author ruoyi
*/
-public class SysDept extends BaseEntity
+public class
+
+
+ SysDept extends BaseEntity
{
private static final long serialVersionUID = 1L;
diff --git a/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/domain/SysUser.java b/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/domain/SysUser.java
index ee837bf5b5440687071d17d91020a97341b373d4..c12367f2992647f161db5ce4f6336060748ef082 100644
--- a/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/domain/SysUser.java
+++ b/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/domain/SysUser.java
@@ -5,6 +5,8 @@ import java.util.List;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonProperty;
diff --git a/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/factory/RemoteUserFallbackFactory.java b/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/factory/RemoteUserFallbackFactory.java
index 76c658add8be73721193351ca5769e66c37deba4..a6ec784e659024934c17d80e492f026982367e88 100644
--- a/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/factory/RemoteUserFallbackFactory.java
+++ b/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/factory/RemoteUserFallbackFactory.java
@@ -29,6 +29,12 @@ public class RemoteUserFallbackFactory implements FallbackFactory getUserInfoById(Long userId) {
+
+ return R.fail("获取用户失败:{}"+ throwable.getMessage());
+ }
};
}
}
diff --git a/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/model/LoginUser.java b/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/model/LoginUser.java
index 1cddf7d733b01f65002be635f15ed8a1e677ac07..125e70b85bb0a18a72a4b851b8604e10c3f69049 100644
--- a/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/model/LoginUser.java
+++ b/smart-api/smart-api-system/src/main/java/com/zhentao/system/api/model/LoginUser.java
@@ -2,15 +2,16 @@ package com.zhentao.system.api.model;
import java.io.Serializable;
import java.util.Set;
+
import com.zhentao.system.api.domain.SysUser;
+import org.springframework.format.annotation.DateTimeFormat;
/**
* 用户信息
*
* @author ruoyi
*/
-public class LoginUser implements Serializable
-{
+public class LoginUser implements Serializable {
private static final long serialVersionUID = 1L;
/**
diff --git a/smart-auth/src/main/resources/bootstrap.yml b/smart-auth/src/main/resources/bootstrap.yml
index a1a570c14bbb8ae6d24c8629bc90fc649eb4cc2d..42b160238e87663a8645583c4825ab5be25d1084 100644
--- a/smart-auth/src/main/resources/bootstrap.yml
+++ b/smart-auth/src/main/resources/bootstrap.yml
@@ -15,9 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
config:
# 配置中心地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/smart-common/smart-common-core/src/main/java/com/zhentao/common/core/config/MybatisPlusConfig.java b/smart-common/smart-common-core/src/main/java/com/zhentao/common/core/config/MybatisPlusConfig.java
index 14a039b00efa6db7d7f4a04f102a7b1fc9659e20..74f399022ca1a172ab4fa470d3904b443fac2e8b 100644
--- a/smart-common/smart-common-core/src/main/java/com/zhentao/common/core/config/MybatisPlusConfig.java
+++ b/smart-common/smart-common-core/src/main/java/com/zhentao/common/core/config/MybatisPlusConfig.java
@@ -25,7 +25,7 @@ public class MybatisPlusConfig {
// 乐观锁插件
interceptor.addInnerInterceptor(optimisticLockerInnerInterceptor());
// 阻断插件
- interceptor.addInnerInterceptor(blockAttackInnerInterceptor());
+// interceptor.addInnerInterceptor(blockAttackInnerInterceptor());
return interceptor;
}
@@ -51,7 +51,7 @@ public class MybatisPlusConfig {
/**
* 如果是对全表的删除或更新操作,就会终止该操作 https://baomidou.com/guide/interceptor-block-attack.html
*/
- public BlockAttackInnerInterceptor blockAttackInnerInterceptor() {
- return new BlockAttackInnerInterceptor();
- }
+// public BlockAttackInnerInterceptor blockAttackInnerInterceptor() {
+// return new BlockAttackInnerInterceptor();
+// }
}
diff --git a/smart-common/smart-common-core/src/main/java/com/zhentao/common/core/web/page/PageDomain.java b/smart-common/smart-common-core/src/main/java/com/zhentao/common/core/web/page/PageDomain.java
index a01bac30df21a231afdecee629b67f618f81d811..8be9711c22926699d5029877ff1fad74cdfa722c 100644
--- a/smart-common/smart-common-core/src/main/java/com/zhentao/common/core/web/page/PageDomain.java
+++ b/smart-common/smart-common-core/src/main/java/com/zhentao/common/core/web/page/PageDomain.java
@@ -20,6 +20,7 @@ public class PageDomain
/** 排序的方向desc或者asc */
private String isAsc = "asc";
+ private Boolean reasonable =true;
public String getOrderBy()
{
@@ -69,4 +70,15 @@ public class PageDomain
{
this.isAsc = isAsc;
}
+
+
+ public Boolean getReasonable() {
+ if (StringUtils.isNull(reasonable)) {
+ return Boolean.TRUE;
+ }
+ return reasonable;
+ }
+ public void setReasonable(Boolean reasonable) {
+ this.reasonable = reasonable;
+ }
}
diff --git a/smart-gateway/src/main/java/com/zhentao/gateway/RuoYiGatewayApplication.java b/smart-gateway/src/main/java/com/zhentao/gateway/RuoYiGatewayApplication.java
index 5100e7006a27acc84578708ae58b70c7966f4ee8..edb3e3e9943baa8fd94beb14a943d5408d040b40 100644
--- a/smart-gateway/src/main/java/com/zhentao/gateway/RuoYiGatewayApplication.java
+++ b/smart-gateway/src/main/java/com/zhentao/gateway/RuoYiGatewayApplication.java
@@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.context.ConfigurableApplicationContext;
/**
* 网关启动程序
@@ -16,7 +17,8 @@ public class RuoYiGatewayApplication
{
public static void main(String[] args)
{
- SpringApplication.run(RuoYiGatewayApplication.class, args);
+ ConfigurableApplicationContext run = SpringApplication.run(RuoYiGatewayApplication.class, args);
+ System.out.println(run);
System.out.println("(♥◠‿◠)ノ゙ 若依网关启动成功 ლ(´ڡ`ლ)゙ \n" +
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
diff --git a/smart-gateway/src/main/java/com/zhentao/gateway/config/CaptchaConfig.java b/smart-gateway/src/main/java/com/zhentao/gateway/config/CaptchaConfig.java
index 9a06ab9c64cb54fa8a5a6950df5cc2a0cbbc8efe..f94dee7651ae085a612e41954037b716dc6b3248 100644
--- a/smart-gateway/src/main/java/com/zhentao/gateway/config/CaptchaConfig.java
+++ b/smart-gateway/src/main/java/com/zhentao/gateway/config/CaptchaConfig.java
@@ -63,7 +63,7 @@ public class CaptchaConfig
// KAPTCHA_SESSION_KEY
properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCodeMath");
// 验证码文本生成器
- properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, "com.ruoyi.gateway.config.KaptchaTextCreator");
+ properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, "com.zhentao.gateway.config.KaptchaTextCreator");
// 验证码文本字符间距 默认为2
properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_SPACE, "3");
// 验证码文本字符长度 默认为5
diff --git a/smart-gateway/src/main/resources/bootstrap.yml b/smart-gateway/src/main/resources/bootstrap.yml
index 3711f32eda869fa46ee7868b394936971b9c9057..bec1923e759da3694255eb2a3f167d8f6c3c4734 100644
--- a/smart-gateway/src/main/resources/bootstrap.yml
+++ b/smart-gateway/src/main/resources/bootstrap.yml
@@ -17,9 +17,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
config:
# 配置中心地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/smart-modules/smart-file/src/main/resources/bootstrap.yml b/smart-modules/smart-file/src/main/resources/bootstrap.yml
index bd5059d60d05278fd4dc4da910572caa3dbbd3d6..890cfdd12ee2ef9e4fe37dfbe5b399c5ee583137 100644
--- a/smart-modules/smart-file/src/main/resources/bootstrap.yml
+++ b/smart-modules/smart-file/src/main/resources/bootstrap.yml
@@ -15,9 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
config:
# 配置中心地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/smart-modules/smart-gen/src/main/resources/bootstrap.yml b/smart-modules/smart-gen/src/main/resources/bootstrap.yml
index ae9e10e5e556c87ca0271354861a500442a0046b..89ead2d01bcffa5bff4ed736aa86965d3dd1bb9f 100644
--- a/smart-modules/smart-gen/src/main/resources/bootstrap.yml
+++ b/smart-modules/smart-gen/src/main/resources/bootstrap.yml
@@ -15,9 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
config:
# 配置中心地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/smart-modules/smart-job/src/main/resources/bootstrap.yml b/smart-modules/smart-job/src/main/resources/bootstrap.yml
index 083386ec62f7224f1ba2fb079e2bad59c0e4f2af..b690b0b74dfdb999a75fab1d2077c1e740ea7962 100644
--- a/smart-modules/smart-job/src/main/resources/bootstrap.yml
+++ b/smart-modules/smart-job/src/main/resources/bootstrap.yml
@@ -15,9 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
config:
# 配置中心地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
# 配置文件格式
file-extension: yml
# 共享配置
diff --git a/smart-modules/smart-system/pom.xml b/smart-modules/smart-system/pom.xml
index 154bd65679371a68cf37e24e28e1eff889578d23..172fa73859fd992d423de317ac4bc9e48ffd1930 100644
--- a/smart-modules/smart-system/pom.xml
+++ b/smart-modules/smart-system/pom.xml
@@ -16,7 +16,16 @@
-
+
+ io.minio
+ minio
+ 8.2.2
+
+
+ com.github.pagehelper
+ pagehelper-spring-boot-starter
+ 1.4.1
+
com.alibaba.cloud
@@ -82,6 +91,22 @@
com.baomidou
mybatis-plus-boot-starter
+
+ org.projectlombok
+ lombok
+
+
+ io.minio
+ minio
+ 8.2.2
+ compile
+
+
+ io.minio
+ minio
+ 8.2.2
+ compile
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/RuoYiSystemApplication.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/RuoYiSystemApplication.java
index 965669723360b94a4cda7cac972ab751bebbdc05..0afed3cd80a9f75950a10ccf76685646d1f23309 100644
--- a/smart-modules/smart-system/src/main/java/com/zhentao/system/RuoYiSystemApplication.java
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/RuoYiSystemApplication.java
@@ -1,10 +1,12 @@
package com.zhentao.system;
+import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import com.zhentao.common.security.annotation.EnableCustomConfig;
import com.zhentao.common.security.annotation.EnableRyFeignClients;
import com.zhentao.common.swagger.annotation.EnableCustomSwagger2;
+import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 系统模块
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/AttendanceRecordController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/AttendanceRecordController.java
new file mode 100644
index 0000000000000000000000000000000000000000..b2c5cc08cd4d142e12fda1385a59f006f7918ac3
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/AttendanceRecordController.java
@@ -0,0 +1,63 @@
+package com.zhentao.system.controller;
+
+
+
+import com.zhentao.common.core.utils.SecurityUtils;
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.AttendanceRecord;
+import com.zhentao.system.service.AttendanceRecordService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@RestController
+@RequestMapping("/record")
+public class AttendanceRecordController {
+ @Resource
+ private AttendanceRecordService recordService;
+ //打卡
+ @GetMapping("/today")
+ public AjaxResult getTodayRecord() {
+ try {
+ Long userId = SecurityUtils.getUserId();
+ AttendanceRecord record = recordService.getTodayRecord(userId);
+ return AjaxResult.success(record);
+ } catch (Exception e) {
+ return AjaxResult.error("获取今日打卡记录失败");
+ }
+ }
+ @PostMapping("/check")
+ public AjaxResult check(@RequestParam String type) {
+ try {
+ Long userId = SecurityUtils.getUserId();
+ boolean success;
+ if ("checkIn".equals(type)) {
+ success = recordService.checkIn(userId);
+ } else if ("checkOut".equals(type)) {
+ success = recordService.checkOut(userId);
+ } else {
+ return AjaxResult.error("无效的打卡类型");
+ }
+ return success ? AjaxResult.success() : AjaxResult.error("打卡失败");
+ } catch (Exception e) {
+ return AjaxResult.error(e.getMessage());
+ }
+ }
+ @GetMapping("/list")
+ public AjaxResult list(Long employeeNo, String yearMonth){
+ List all = recordService.all(employeeNo,yearMonth);
+ return AjaxResult.success(all);
+ }
+ @GetMapping("/export")
+ public AjaxResult export(String yearMonth){
+ Long employeeId = SecurityUtils.getUserId();
+ List all = recordService.all(employeeId,yearMonth);
+ for (AttendanceRecord attendanceRecord : all) {
+ String username = SecurityUtils.getUsername();
+ attendanceRecord.setUserName(username);
+ }
+ return AjaxResult.success(all);
+ }
+
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarAccessRecordController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarAccessRecordController.java
new file mode 100644
index 0000000000000000000000000000000000000000..953cb287e2067e540f007bd07b6a2a2eb35417c1
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarAccessRecordController.java
@@ -0,0 +1,4 @@
+package com.zhentao.system.controller;
+
+public class CarAccessRecordController {
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarBlacklistController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarBlacklistController.java
new file mode 100644
index 0000000000000000000000000000000000000000..437fee622fab2fd4b70a4a9e34548357b06b8bc4
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarBlacklistController.java
@@ -0,0 +1,132 @@
+package com.zhentao.system.controller;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.zhentao.common.core.constant.HttpStatus;
+import com.zhentao.common.core.utils.StringUtils;
+import com.zhentao.common.core.utils.poi.ExcelUtil;
+import com.zhentao.common.core.utils.sql.SqlUtil;
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.common.core.web.page.PageDomain;
+import com.zhentao.common.core.web.page.TableDataInfo;
+import com.zhentao.common.core.web.page.TableSupport;
+import com.zhentao.common.log.annotation.Log;
+import com.zhentao.common.log.enums.BusinessType;
+import com.zhentao.common.security.annotation.PreAuthorize;
+import com.zhentao.system.domain.CarBlacklist;
+import com.zhentao.system.domain.CarWhitelist;
+import com.zhentao.system.service.CarBlacklistService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import java.io.IOException;
+import java.util.List;
+
+import static com.github.pagehelper.page.PageMethod.startPage;
+
+@RestController
+@RequestMapping("/blacklist")
+public class CarBlacklistController {
+ @Autowired
+ private CarBlacklistService carBlacklistService;
+
+ /**
+ * 查询车辆黑名单列表
+ */
+ @PreAuthorize(hasAnyPermi = "@ss.hasPermi('system:blacklist:list')")
+ @GetMapping("/list")
+ public TableDataInfo list(CarBlacklist carBlacklist)
+ {
+ startPage();
+ List list = carBlacklistService.selectCarBlacklistList(carBlacklist);
+ return getDataTable(list);
+ }
+ protected TableDataInfo getDataTable(List> list)
+ {
+ TableDataInfo rspData = new TableDataInfo();
+ rspData.setCode(HttpStatus.SUCCESS);
+ rspData.setRows(list);
+ rspData.setMsg("查询成功");
+ rspData.setTotal(new PageInfo(list).getTotal());
+ return rspData;
+ }
+ protected void startPage()
+ {
+ PageDomain pageDomain = TableSupport.buildPageRequest();
+ Integer pageNum = pageDomain.getPageNum();
+ Integer pageSize = pageDomain.getPageSize();
+ if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize))
+ {
+ String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
+ PageHelper.startPage(pageNum, pageSize, orderBy);
+ }
+ }
+
+ /**
+ * 导出车辆黑名单列表
+ */
+ @PreAuthorize(hasAnyPermi = "@ss.hasPermi('system:blacklist:export')")
+ @Log(title = "车辆黑名单", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, CarBlacklist carBlacklist) throws IOException {
+ List list = carBlacklistService.selectCarBlacklistList(carBlacklist);
+ ExcelUtil util = new ExcelUtil(CarBlacklist.class);
+ util.exportExcel(response, list, "车辆黑名单数据");
+ }
+
+ /**
+ * 获取车辆黑名单详细信息
+ */
+ @PreAuthorize(hasAnyPermi = "@ss.hasPermi('system:blacklist:query')")
+ @GetMapping(value = "/{blacklistId}")
+ public AjaxResult getInfo(@PathVariable("blacklistId") Long blacklistId)
+ {
+ return AjaxResult.success(carBlacklistService.selectCarBlacklistByBlacklistId(blacklistId));
+ }
+
+ /**
+ * 新增车辆黑名单
+ */
+ @PreAuthorize(hasAnyPermi = "@ss.hasPermi('system:blacklist:add')")
+ @Log(title = "车辆黑名单", businessType = BusinessType.INSERT)
+ @PostMapping
+ public AjaxResult add(@RequestBody CarBlacklist carBlacklist)
+ {
+ if (!carBlacklistService.checkPlateNumberUnique(carBlacklist.getPlateNumber()))
+ {
+ return AjaxResult.error("新增车辆黑名单'" + carBlacklist.getPlateNumber() + "'失败,车牌号码已存在");
+ }
+ return toAjax(carBlacklistService.insertCarBlacklist(carBlacklist));
+ }
+
+ /**
+ * 修改车辆黑名单
+ */
+ @PreAuthorize(hasAnyPermi = "@ss.hasPermi('system:blacklist:edit')")
+ @Log(title = "车辆黑名单", businessType = BusinessType.UPDATE)
+ @PutMapping
+ public AjaxResult edit(@RequestBody CarBlacklist carBlacklist)
+ {
+ return toAjax(carBlacklistService.updateCarBlacklist(carBlacklist));
+ }
+
+ /**
+ * 删除车辆黑名单
+ */
+ @PreAuthorize(hasAnyPermi = "@ss.hasPermi('system:blacklist:remove')")
+ @Log(title = "车辆黑名单", businessType = BusinessType.DELETE)
+ @DeleteMapping("/{blacklistIds}")
+ public AjaxResult remove(@PathVariable Long[] blacklistIds)
+ {
+ return toAjax(carBlacklistService.deleteCarBlacklistByBlacklistIds(blacklistIds));
+ }
+ protected AjaxResult toAjax(int rows)
+ {
+ return rows > 0 ? AjaxResult.success() : AjaxResult.error();
+ }
+
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarInfoController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarInfoController.java
new file mode 100644
index 0000000000000000000000000000000000000000..9cf052fe31258c242471c38be898ad630103ddb4
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarInfoController.java
@@ -0,0 +1,4 @@
+package com.zhentao.system.controller;
+
+public class CarInfoController {
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarSpecialPlateController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarSpecialPlateController.java
new file mode 100644
index 0000000000000000000000000000000000000000..8b732b1f8542c3e37f86836656ea5bfedead9b3c
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarSpecialPlateController.java
@@ -0,0 +1,4 @@
+package com.zhentao.system.controller;
+
+public class CarSpecialPlateController {
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarWhitelistController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarWhitelistController.java
new file mode 100644
index 0000000000000000000000000000000000000000..b653e77a83bc76b9f294327ed18847a36671b1ef
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CarWhitelistController.java
@@ -0,0 +1,94 @@
+package com.zhentao.system.controller;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.zhentao.common.core.utils.StringUtils;
+import com.zhentao.common.core.utils.sql.SqlUtil;
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.common.core.web.page.PageDomain;
+import com.zhentao.common.core.web.page.TableDataInfo;
+import com.zhentao.common.core.web.page.TableSupport;
+import com.zhentao.system.domain.CarWhitelist;
+import com.zhentao.system.service.CarWhitelistService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+@RestController
+@RequestMapping("/whitelist")
+public class CarWhitelistController {
+ @Resource
+ private CarWhitelistService carWhitelistService;
+
+ /**
+ * 查询白名单列表
+ */
+ @GetMapping("/list")
+ public TableDataInfo list(CarWhitelist carWhitelist) {
+ startPage();
+ List list = carWhitelistService.selectCarWhitelistList(carWhitelist);
+ return getDataTable(list);
+ }
+ private void startPage() {
+ PageDomain pageDomain = TableSupport.buildPageRequest();
+ Integer pageNum = pageDomain.getPageNum();
+ Integer pageSize = pageDomain.getPageSize();
+ if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
+ String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
+ Boolean reasonable = pageDomain.getReasonable();
+ PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
+ }
+ }
+ private TableDataInfo getDataTable(List list) {
+ TableDataInfo rspData = new TableDataInfo();
+ rspData.setCode(200);
+ rspData.setMsg("查询成功");
+ rspData.setRows(list);
+ rspData.setTotal(new PageInfo(list).getTotal());
+ return rspData;
+ }
+
+ /**
+ * 获取白名单详细信息
+ */
+ @GetMapping(value = "/{whitelistId}")
+ public AjaxResult getInfo(@PathVariable("whitelistId") Long whitelistId) {
+ return AjaxResult.success(carWhitelistService.selectCarWhitelistByWhitelistId(whitelistId));
+ }
+
+ /**
+ * 新增白名单
+ */
+ @PostMapping
+ public AjaxResult add(@RequestBody CarWhitelist carWhitelist) {
+ return toAjax(carWhitelistService.insertCarWhitelist(carWhitelist));
+ }
+
+ /**
+ * 修改白名单
+ */
+ @PostMapping("/edit") // 改为 POST 方法
+ public AjaxResult edit(@RequestBody CarWhitelist carWhitelist) {
+ return toAjax(carWhitelistService.updateCarWhitelist(carWhitelist));
+ }
+
+ /**
+ * 删除白名单
+ */
+ @DeleteMapping("/{whitelistIds}")
+ public AjaxResult remove(@PathVariable Long[] whitelistIds) {
+ return toAjax(carWhitelistService.deleteCarWhitelistByWhitelistIds(whitelistIds));
+ }
+
+ /**
+ * 修改状态
+ */
+ @PostMapping("/changeStatus")
+ public AjaxResult changeStatus(@RequestBody CarWhitelist carWhitelist) {
+ return toAjax(carWhitelistService.updateCarWhitelist(carWhitelist));
+ }
+
+ protected AjaxResult toAjax(int rows) {
+ return rows > 0 ? AjaxResult.success() : AjaxResult.error();
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CouponController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CouponController.java
new file mode 100644
index 0000000000000000000000000000000000000000..822c8a9f089e0de369508d1743c1972e9e6d075f
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CouponController.java
@@ -0,0 +1,71 @@
+package com.zhentao.system.controller;
+
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.Coupon;
+import com.zhentao.system.domain.vo.CouponVo;
+import com.zhentao.system.domain.vo.CouponVos;
+import com.zhentao.system.service.CouponService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping("/coupon")
+public class CouponController {
+
+@Resource
+private CouponService couponService;
+
+
+ /**
+ * 管理端查询优惠卷
+ * @param couponVo
+ * @return
+ */
+ @GetMapping("/couponList")
+ public AjaxResult ListCoupon(CouponVo couponVo){
+ return couponService.ListCoupon(couponVo);
+}
+
+ /**
+ * 添加优惠卷
+ * @param couponVos
+ * @return
+ */
+ @PostMapping("/addCoupon")
+public AjaxResult addCoupon(@RequestBody CouponVos couponVos){
+ return couponService.addCoupon(couponVos);
+}
+
+ /**
+ * 修改优惠卷状态
+ * @param coupon
+ * @return
+ */
+
+ @PostMapping("/stateCoupon")
+ public AjaxResult stateCoupon(@RequestBody Coupon coupon){
+ return couponService.stateCoupon(coupon);
+}
+
+
+ /**
+ * 更新优惠卷
+ * @param couponVos
+ * @return
+ */
+ @PostMapping("/updateCoupon")
+ public AjaxResult updateCoupon(@RequestBody CouponVos couponVos){
+ return couponService.updateCoupon(couponVos);
+}
+
+ /**
+ * app端查询优惠卷
+ */
+ @GetMapping("/appListCoupon")
+ public AjaxResult appListCoupon(Coupon coupon){
+ return couponService.appListCoupon(coupon);
+}
+
+
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CouponRecordController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CouponRecordController.java
new file mode 100644
index 0000000000000000000000000000000000000000..cb5d14c5d8d22faf1899c6c88dd07a9c7782c6ea
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/CouponRecordController.java
@@ -0,0 +1,38 @@
+package com.zhentao.system.controller;
+
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.vo.CouponRecordVo;
+import com.zhentao.system.service.CouponRecordService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping("/couponRecord")
+public class CouponRecordController {
+
+ @Resource
+ private CouponRecordService couponRecordService;
+
+
+
+ /**
+ * 领取优惠卷
+ * @param couponId
+ * @return
+ */
+ @PostMapping("/addCouponRecord")
+ public AjaxResult addCouponRecord(@RequestParam Long couponId) {
+ return couponRecordService.addCouponRecord(couponId);
+ }
+
+ /**
+ * 查询优惠卷领取记录
+ */
+
+ @GetMapping("/listCouponRecord")
+ public AjaxResult listCouponRecord(CouponRecordVo couponRecordVo) {
+ return couponRecordService.ListCouponRecord(couponRecordVo);
+ }
+
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/FeeRuleController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/FeeRuleController.java
new file mode 100644
index 0000000000000000000000000000000000000000..a1e183b9883dc3ba5ee9b88e22fc35704e515dfa
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/FeeRuleController.java
@@ -0,0 +1,30 @@
+package com.zhentao.system.controller;
+
+import com.zhentao.system.domain.FeeRule;
+import com.zhentao.system.service.FeeRuleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.math.BigDecimal;
+import java.text.ParseException;
+
+/**
+ * @ClassName: FeeRuleController
+ * @Author: 大毅
+ * @Date: 2025/2/11 12:44
+ */
+@RestController
+@RequestMapping("/feeRule")
+public class FeeRuleController {
+ @Autowired
+ private FeeRuleService feeRuleService;
+
+ // 计算收费规则
+ @PostMapping("/calculateFeeRule")
+ public BigDecimal calculateFeeRule(@RequestBody FeeRule feeRule) throws ParseException {
+ return feeRuleService.calculateFeeRule(feeRule);
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/ParkLaneController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/ParkLaneController.java
new file mode 100644
index 0000000000000000000000000000000000000000..3a9af80d28c12df5cfa6127bf753c8649b2fae0a
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/ParkLaneController.java
@@ -0,0 +1,61 @@
+package com.zhentao.system.controller;
+
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.ParkLane;
+import com.zhentao.system.domain.vo.ParkLaneVo;
+import com.zhentao.system.service.ParkLaneService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping("/lane")
+public class ParkLaneController {
+
+
+ @Autowired
+ private ParkLaneService parkLaneService;
+
+
+ /**
+ * 查询所有车道
+ * @param parkLaneVo
+ * @return
+ */
+ @GetMapping("/ListLane")
+ public AjaxResult ListLane(ParkLaneVo parkLaneVo) {
+ return parkLaneService.ListLane(parkLaneVo);
+ }
+
+ /**
+ * 新增车道
+ * @param parkLane
+ * @return
+ */
+ @PostMapping("/addLane")
+ public AjaxResult addLane(@RequestBody ParkLane parkLane) {
+ return parkLaneService.addLane(parkLane);
+ }
+
+ /**
+ * 修改车道信息
+ * @param parkLane
+ * @return
+ */
+ @PostMapping("/updateLane")
+ public AjaxResult updateLane(@RequestBody ParkLane parkLane) {
+ return parkLaneService.updateLane(parkLane);
+ }
+
+
+ /**
+ * 生成二维码并且绑定二维码
+ * @param parkLane
+ * @return
+ */
+ @PostMapping("/generateQrCode")
+ public AjaxResult generateQrCode(@RequestBody ParkLane parkLane) {
+ return parkLaneService.generateQrCode(parkLane);
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/ParkLotController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/ParkLotController.java
new file mode 100644
index 0000000000000000000000000000000000000000..a4958ea7867920fb0ad6556113b3a655b0c12ecf
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/ParkLotController.java
@@ -0,0 +1,69 @@
+package com.zhentao.system.controller;
+
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.ParkLot;
+import com.zhentao.system.service.ParkLotService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@RestController
+@RequestMapping("/lot")
+public class ParkLotController {
+
+@Resource
+private ParkLotService parkLotService;
+
+
+ /**
+ * 停车场列表
+ * @return
+ */
+ @GetMapping("/ListLot")
+ public AjaxResult ListLot(){
+ return parkLotService.ListLot();
+}
+
+
+ /**
+ * 新增停车场
+ * @param parkLot
+ * @return
+ */
+ @PostMapping("/addLot")
+ public AjaxResult addLot(@RequestBody ParkLot parkLot){
+ return parkLotService.addLot(parkLot);
+ }
+
+ /**
+ * 修改停车场
+ * @param parkLot
+ * @return
+ */
+ @PostMapping("/updateLot")
+ public AjaxResult updateLot(@RequestBody ParkLot parkLot){
+ return parkLotService.updateLot(parkLot);
+ }
+
+ /**
+ * 删除停车场
+ * @param parkLot
+ * @return
+ */
+ @PostMapping("/deleteLot")
+ public AjaxResult deleteLot(@RequestBody ParkLot parkLot){
+ return parkLotService.deleteLot(parkLot);
+ }
+
+ /**
+ * 根据lotId查询停车场
+ * @param
+ * @return
+ */
+ @GetMapping("/getLotById")
+ public AjaxResult getLotById(){
+ List list = parkLotService.list();
+ return AjaxResult.success(list);
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/ParkPaymentConfigController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/ParkPaymentConfigController.java
new file mode 100644
index 0000000000000000000000000000000000000000..748bd339c9e19ca0b5c1c60ef469010c5c07e4ea
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/ParkPaymentConfigController.java
@@ -0,0 +1,59 @@
+package com.zhentao.system.controller;
+
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.ParkPaymentConfig;
+import com.zhentao.system.domain.vo.ParkPaymentConfigVo;
+import com.zhentao.system.service.ParkPaymentConfigService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping("/paymentConfig")
+public class ParkPaymentConfigController {
+
+ @Resource
+ public ParkPaymentConfigService parkPaymentConfigService;
+
+
+ /**
+ * 查询支付配置列表
+ * @param paymentConfigVo
+ * @return
+ */
+ @GetMapping("/ListPaymentConfig")
+ public AjaxResult ListPaymentConfig(ParkPaymentConfigVo paymentConfigVo){
+ return parkPaymentConfigService.ListPaymentConfig(paymentConfigVo);
+ }
+
+ /**
+ * 新增支付配置
+ * @param paymentConfig
+ * @return
+ */
+ @PostMapping("/addPaymentConfig")
+ public AjaxResult addPaymentConfig(@RequestBody ParkPaymentConfig paymentConfig){
+ return parkPaymentConfigService.addPaymentConfig(paymentConfig);
+ }
+
+
+ /**
+ * 修改支付配置
+ * @param paymentConfig
+ * @return
+ */
+ @PostMapping("/updatePaymentConfig")
+ public AjaxResult updatePaymentConfig(@RequestBody ParkPaymentConfig paymentConfig){
+ return parkPaymentConfigService.updatePaymentConfig(paymentConfig);
+ }
+
+ /**
+ * 删除支付配置
+ * @param paymentConfig
+ * @return
+ */
+ @PostMapping("/deletePaymentConfig")
+ public AjaxResult deletePaymentConfig( ParkPaymentConfig paymentConfig){
+ return parkPaymentConfigService.deletePaymentConfig(paymentConfig);
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/ParkSpotController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/ParkSpotController.java
new file mode 100644
index 0000000000000000000000000000000000000000..b54077a08ff18bf2f5a6b6a6ccdf2fe81dad973d
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/ParkSpotController.java
@@ -0,0 +1,59 @@
+package com.zhentao.system.controller;
+
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.ParkSpot;
+import com.zhentao.system.domain.vo.ParkSpotVo;
+import com.zhentao.system.service.ParkSpotService;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping("/parkSpot")
+public class ParkSpotController {
+
+
+ @Resource
+ private ParkSpotService parkSpotService;
+
+
+ /**
+ * 查询泊位信息
+ * @param parkSpotVo
+ * @return
+ */
+ @GetMapping("parkSpotList")
+ public AjaxResult parkSpotList(ParkSpotVo parkSpotVo){
+ return parkSpotService.parkSpotList(parkSpotVo);
+ }
+
+ /**
+ * 新增泊位信息
+ * @param parkSpot
+ * @return
+ */
+ @PostMapping("addParkSpot")
+ public AjaxResult addParkSpot(@RequestBody ParkSpot parkSpot){
+ return parkSpotService.addParkSpot(parkSpot);
+ }
+
+ /**
+ * 修改泊位信息
+ * @param parkSpot
+ * @return
+ */
+ @PostMapping("updateParkSpot")
+ public AjaxResult updateParkSpot(@RequestBody ParkSpot parkSpot){
+ return parkSpotService.updateParkSpot(parkSpot);
+ }
+
+ /**
+ * 删除泊位信息
+ * @param parkSpot
+ * @return
+ */
+ @PostMapping("deleteParkSpot")
+ public AjaxResult deleteParkSpot(ParkSpot parkSpot){
+ return parkSpotService.deleteParkSpot(parkSpot);
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/SysCarouselController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/SysCarouselController.java
new file mode 100644
index 0000000000000000000000000000000000000000..471213e02507e19b126fec146dd5561617d7078b
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/SysCarouselController.java
@@ -0,0 +1,90 @@
+package com.zhentao.system.controller;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.zhentao.common.core.utils.StringUtils;
+import com.zhentao.common.core.utils.sql.SqlUtil;
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.common.core.web.page.PageDomain;
+import com.zhentao.common.core.web.page.TableDataInfo;
+import com.zhentao.common.core.web.page.TableSupport;
+import com.zhentao.system.domain.SysCarousel;
+import com.zhentao.system.service.SysCarouselService;
+import io.minio.*;
+import io.minio.http.Method;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import static com.zhentao.common.core.web.domain.AjaxResult.success;
+
+@RestController
+@RequestMapping("/carousel")
+public class SysCarouselController {
+ @Autowired
+ private SysCarouselService carouselService;
+
+ @GetMapping("/list")
+ public TableDataInfo list(SysCarousel carousel) {
+ startPage();
+ List list = carouselService.selectCarouselList(carousel);
+ System.err.println(list);
+ return getDataTable(list);
+ }
+
+ private void startPage() {
+ PageDomain pageDomain = TableSupport.buildPageRequest();
+ Integer pageNum = pageDomain.getPageNum();
+ Integer pageSize = pageDomain.getPageSize();
+ if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) {
+ String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
+ Boolean reasonable = pageDomain.getReasonable();
+ PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
+ }
+ }
+
+ private TableDataInfo getDataTable(List list) {
+ TableDataInfo rspData = new TableDataInfo();
+ rspData.setCode(200);
+ rspData.setMsg("查询成功");
+ rspData.setRows(list);
+ rspData.setTotal(new PageInfo(list).getTotal());
+ return rspData;
+ }
+
+
+ @GetMapping(value = "/{carouselId}")
+ public AjaxResult getInfo(@PathVariable("carouselId") Long carouselId) {
+ return success(carouselService.selectCarouselById(carouselId));
+ }
+
+ @PostMapping
+ public AjaxResult add(@RequestBody SysCarousel carousel) {
+ return toAjax(carouselService.insertCarousel(carousel));
+ }
+
+ @PutMapping
+ public AjaxResult edit(@RequestBody SysCarousel carousel) {
+ return toAjax(carouselService.updateCarousel(carousel));
+ }
+
+ @DeleteMapping("/{carouselIds}")
+ public AjaxResult remove(@PathVariable Long[] carouselIds) {
+ return toAjax(carouselService.deleteCarouselByIds(carouselIds));
+ }
+
+ @PutMapping("/changeStatus")
+ public AjaxResult changeStatus(@RequestBody SysCarousel carousel) {
+ return toAjax(carouselService.changeStatus(carousel));
+ }
+
+ /**
+ * 将操作结果转换为 AjaxResult
+ */
+ private AjaxResult toAjax(int rows) {
+ return rows > 0 ? success() : AjaxResult.error();
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/SysUserController.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/SysUserController.java
index f0f857edd7e9244d2f0d5956e91d8dcc7daad1c7..c1aee445065f9d9e07b890eabacbb0c211593314 100644
--- a/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/SysUserController.java
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/controller/SysUserController.java
@@ -121,6 +121,29 @@ public class SysUserController extends BaseController
return R.ok(sysUserVo);
}
+
+ /**
+ * 根据用户id获取当前用户信息
+ */
+ @GetMapping("/getById/{userId}")
+ public R info(@PathVariable("userId") Long userId)
+ {
+ SysUser sysUser = userService.selectUserById(userId);
+ if (StringUtils.isNull(sysUser))
+ {
+ return R.fail("用户名或密码错误");
+ }
+ /* // 角色集合
+ Set roles = permissionService.getRolePermission(sysUser.getUserId());
+ // 权限集合
+ Set permissions = permissionService.getMenuPermission(sysUser.getUserId());*/
+ LoginUser sysUserVo = new LoginUser();
+ sysUserVo.setSysUser(sysUser);
+// sysUserVo.setRoles(roles);
+// sysUserVo.setPermissions(permissions);
+ return R.ok(sysUserVo);
+ }
+
/**
* 获取用户信息
*
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/AttendanceRecord.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/AttendanceRecord.java
new file mode 100644
index 0000000000000000000000000000000000000000..9d5e817d4ef1d2d6de15b039fc4e83acadcc8fce
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/AttendanceRecord.java
@@ -0,0 +1,119 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ *
+ * @TableName attendance_record
+ */
+@TableName(value ="attendance_record")
+@Data
+public class AttendanceRecord implements Serializable {
+ /**
+ *
+ */
+ @TableId(type = IdType.AUTO)
+ private Integer id;
+
+ /**
+ * 工号
+ */
+ private String employeeId;
+
+ /**
+ * 日期
+ */
+ private Date date;
+
+ /**
+ * 签到时间
+ */
+ private Date checkIn;
+
+ /**
+ * 签退时间
+ */
+ private Date checkOut;
+
+ /**
+ * 状态:正常、迟到、早退、缺勤
+ */
+ private String status;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ /**
+ *
+ */
+ private Date createTime;
+ @TableField(exist = false)
+ private String userName;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ AttendanceRecord other = (AttendanceRecord) that;
+ return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+ && (this.getEmployeeId() == null ? other.getEmployeeId() == null : this.getEmployeeId().equals(other.getEmployeeId()))
+ && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()))
+ && (this.getCheckIn() == null ? other.getCheckIn() == null : this.getCheckIn().equals(other.getCheckIn()))
+ && (this.getCheckOut() == null ? other.getCheckOut() == null : this.getCheckOut().equals(other.getCheckOut()))
+ && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+ && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+ result = prime * result + ((getEmployeeId() == null) ? 0 : getEmployeeId().hashCode());
+ result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode());
+ result = prime * result + ((getCheckIn() == null) ? 0 : getCheckIn().hashCode());
+ result = prime * result + ((getCheckOut() == null) ? 0 : getCheckOut().hashCode());
+ result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+ result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", id=").append(id);
+ sb.append(", employeeId=").append(employeeId);
+ sb.append(", date=").append(date);
+ sb.append(", checkIn=").append(checkIn);
+ sb.append(", checkOut=").append(checkOut);
+ sb.append(", status=").append(status);
+ sb.append(", remark=").append(remark);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/BaseEntity.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/BaseEntity.java
new file mode 100644
index 0000000000000000000000000000000000000000..16dc52ccf177643dab547218eb7511db5f78cd92
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/BaseEntity.java
@@ -0,0 +1,40 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+@Data
+public class BaseEntity implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /** 创建者 */
+ private String createBy;
+
+ /** 创建时间 */
+ private Date createTime;
+
+ /** 更新者 */
+ private String updateBy;
+
+ /** 更新时间 */
+ private Date updateTime;
+
+ /** 备注 */
+ private String remark;
+
+ /** 请求参数 */
+ @TableField(exist = false)
+ private Map params;
+
+ public Map getParams() {
+ if (params == null) {
+ params = new HashMap<>();
+ }
+ return params;
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarAccessRecord.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarAccessRecord.java
new file mode 100644
index 0000000000000000000000000000000000000000..58321e584c7e33403beb8f58d5bc60a52de9d466
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarAccessRecord.java
@@ -0,0 +1,133 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 车辆进出记录表
+ * @TableName car_access_record
+ */
+@TableName(value ="car_access_record")
+@Data
+public class CarAccessRecord implements Serializable {
+ /**
+ * 记录ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long recordId;
+
+ /**
+ * 车牌号码
+ */
+ private String plateNumber;
+
+ /**
+ * 类型(1:进场 2:出场)
+ */
+ private String accessType;
+
+ /**
+ * 时间
+ */
+ private Date accessTime;
+
+ /**
+ * 设备ID
+ */
+ private String deviceId;
+
+ /**
+ * 设备名称
+ */
+ private String deviceName;
+
+ /**
+ * 抓拍图片URL
+ */
+ private String imageUrl;
+
+ /**
+ * 名单类型(1:黑名单 2:白名单 3:特殊车牌)
+ */
+ private String listType;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ CarAccessRecord other = (CarAccessRecord) that;
+ return (this.getRecordId() == null ? other.getRecordId() == null : this.getRecordId().equals(other.getRecordId()))
+ && (this.getPlateNumber() == null ? other.getPlateNumber() == null : this.getPlateNumber().equals(other.getPlateNumber()))
+ && (this.getAccessType() == null ? other.getAccessType() == null : this.getAccessType().equals(other.getAccessType()))
+ && (this.getAccessTime() == null ? other.getAccessTime() == null : this.getAccessTime().equals(other.getAccessTime()))
+ && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId()))
+ && (this.getDeviceName() == null ? other.getDeviceName() == null : this.getDeviceName().equals(other.getDeviceName()))
+ && (this.getImageUrl() == null ? other.getImageUrl() == null : this.getImageUrl().equals(other.getImageUrl()))
+ && (this.getListType() == null ? other.getListType() == null : this.getListType().equals(other.getListType()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+ && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getRecordId() == null) ? 0 : getRecordId().hashCode());
+ result = prime * result + ((getPlateNumber() == null) ? 0 : getPlateNumber().hashCode());
+ result = prime * result + ((getAccessType() == null) ? 0 : getAccessType().hashCode());
+ result = prime * result + ((getAccessTime() == null) ? 0 : getAccessTime().hashCode());
+ result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode());
+ result = prime * result + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode());
+ result = prime * result + ((getImageUrl() == null) ? 0 : getImageUrl().hashCode());
+ result = prime * result + ((getListType() == null) ? 0 : getListType().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", recordId=").append(recordId);
+ sb.append(", plateNumber=").append(plateNumber);
+ sb.append(", accessType=").append(accessType);
+ sb.append(", accessTime=").append(accessTime);
+ sb.append(", deviceId=").append(deviceId);
+ sb.append(", deviceName=").append(deviceName);
+ sb.append(", imageUrl=").append(imageUrl);
+ sb.append(", listType=").append(listType);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", remark=").append(remark);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarBlacklist.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarBlacklist.java
new file mode 100644
index 0000000000000000000000000000000000000000..bca5c0dd1dfd7635f612b05523acb685562186ef
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarBlacklist.java
@@ -0,0 +1,149 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zhentao.common.core.annotation.Excel;
+import lombok.Data;
+
+/**
+ * 车辆黑名单表
+ * @TableName car_blacklist
+ */
+@TableName(value ="car_blacklist")
+@Data
+public class CarBlacklist implements Serializable {
+ /**
+ * 黑名单ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long blacklistId;
+
+ /**
+ * 车牌号码
+ */
+ private String plateNumber;
+
+ /**
+ * 加入原因
+ */
+ private String reason;
+
+ /**
+ * 生效时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date startTime;
+
+ /**
+ * 失效时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date endTime;
+
+ /**
+ * 状态(0:生效 1:失效)
+ */
+ private String status;
+
+ /**
+ * 创建者
+ */
+ private String createBy;
+
+ /**
+ * 创建时间
+ */
+
+ private Date createTime;
+
+ /**
+ * 更新者
+ */
+ private String updateBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updateTime;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ CarBlacklist other = (CarBlacklist) that;
+ return (this.getBlacklistId() == null ? other.getBlacklistId() == null : this.getBlacklistId().equals(other.getBlacklistId()))
+ && (this.getPlateNumber() == null ? other.getPlateNumber() == null : this.getPlateNumber().equals(other.getPlateNumber()))
+ && (this.getReason() == null ? other.getReason() == null : this.getReason().equals(other.getReason()))
+ && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
+ && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
+ && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+ && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+ && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
+ && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getBlacklistId() == null) ? 0 : getBlacklistId().hashCode());
+ result = prime * result + ((getPlateNumber() == null) ? 0 : getPlateNumber().hashCode());
+ result = prime * result + ((getReason() == null) ? 0 : getReason().hashCode());
+ result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
+ result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
+ result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+ result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+ result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", blacklistId=").append(blacklistId);
+ sb.append(", plateNumber=").append(plateNumber);
+ sb.append(", reason=").append(reason);
+ sb.append(", startTime=").append(startTime);
+ sb.append(", endTime=").append(endTime);
+ sb.append(", status=").append(status);
+ sb.append(", createBy=").append(createBy);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", updateBy=").append(updateBy);
+ sb.append(", updateTime=").append(updateTime);
+ sb.append(", remark=").append(remark);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarInfo.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarInfo.java
new file mode 100644
index 0000000000000000000000000000000000000000..ad8bf771330f130e649893e31bdc46d79d8c932d
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarInfo.java
@@ -0,0 +1,157 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 车辆信息表
+ * @TableName car_info
+ */
+@TableName(value ="car_info")
+@Data
+public class CarInfo implements Serializable {
+ /**
+ * 车辆ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long carId;
+
+ /**
+ * 车牌号码
+ */
+ private String plateNumber;
+
+ /**
+ * 车牌颜色
+ */
+ private String plateColor;
+
+ /**
+ * 车辆类型(1:小型车 2:中型车 3:大型车)
+ */
+ private String carType;
+
+ /**
+ * 车主姓名
+ */
+ private Integer userId;
+
+ /**
+ * 车主电话
+ */
+ private String ownerPhone;
+
+ /**
+ * 绑定时间
+ */
+ private Date bindTime;
+
+ /**
+ * 状态(0:正常 1:禁用)
+ */
+ private String status;
+
+ /**
+ * 创建者
+ */
+ private String createBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 更新者
+ */
+ private String updateBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updateTime;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ CarInfo other = (CarInfo) that;
+ return (this.getCarId() == null ? other.getCarId() == null : this.getCarId().equals(other.getCarId()))
+ && (this.getPlateNumber() == null ? other.getPlateNumber() == null : this.getPlateNumber().equals(other.getPlateNumber()))
+ && (this.getPlateColor() == null ? other.getPlateColor() == null : this.getPlateColor().equals(other.getPlateColor()))
+ && (this.getCarType() == null ? other.getCarType() == null : this.getCarType().equals(other.getCarType()))
+ && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
+ && (this.getOwnerPhone() == null ? other.getOwnerPhone() == null : this.getOwnerPhone().equals(other.getOwnerPhone()))
+ && (this.getBindTime() == null ? other.getBindTime() == null : this.getBindTime().equals(other.getBindTime()))
+ && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+ && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+ && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
+ && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getCarId() == null) ? 0 : getCarId().hashCode());
+ result = prime * result + ((getPlateNumber() == null) ? 0 : getPlateNumber().hashCode());
+ result = prime * result + ((getPlateColor() == null) ? 0 : getPlateColor().hashCode());
+ result = prime * result + ((getCarType() == null) ? 0 : getCarType().hashCode());
+ result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
+ result = prime * result + ((getOwnerPhone() == null) ? 0 : getOwnerPhone().hashCode());
+ result = prime * result + ((getBindTime() == null) ? 0 : getBindTime().hashCode());
+ result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+ result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+ result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", carId=").append(carId);
+ sb.append(", plateNumber=").append(plateNumber);
+ sb.append(", plateColor=").append(plateColor);
+ sb.append(", carType=").append(carType);
+ sb.append(", ownerName=").append(userId);
+ sb.append(", ownerPhone=").append(ownerPhone);
+ sb.append(", bindTime=").append(bindTime);
+ sb.append(", status=").append(status);
+ sb.append(", createBy=").append(createBy);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", updateBy=").append(updateBy);
+ sb.append(", updateTime=").append(updateTime);
+ sb.append(", remark=").append(remark);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarSpecialPlate.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarSpecialPlate.java
new file mode 100644
index 0000000000000000000000000000000000000000..b62fdc7ffc16494caf50080ae2908ec7ea14b058
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarSpecialPlate.java
@@ -0,0 +1,133 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 特殊车牌配置表
+ * @TableName car_special_plate
+ */
+@TableName(value ="car_special_plate")
+@Data
+public class CarSpecialPlate implements Serializable {
+ /**
+ * 配置ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long plateId;
+
+ /**
+ * 车牌前缀
+ */
+ private String platePrefix;
+
+ /**
+ * 车牌类型(1:军车 2:警车 3:使馆车 4:教练车)
+ */
+ private String plateType;
+
+ /**
+ * 描述
+ */
+ private String description;
+
+ /**
+ * 状态(0:启用 1:停用)
+ */
+ private String status;
+
+ /**
+ * 创建者
+ */
+ private String createBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 更新者
+ */
+ private String updateBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updateTime;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public boolean equals(Object that) {
+ if (this == that) {
+ return true;
+ }
+ if (that == null) {
+ return false;
+ }
+ if (getClass() != that.getClass()) {
+ return false;
+ }
+ CarSpecialPlate other = (CarSpecialPlate) that;
+ return (this.getPlateId() == null ? other.getPlateId() == null : this.getPlateId().equals(other.getPlateId()))
+ && (this.getPlatePrefix() == null ? other.getPlatePrefix() == null : this.getPlatePrefix().equals(other.getPlatePrefix()))
+ && (this.getPlateType() == null ? other.getPlateType() == null : this.getPlateType().equals(other.getPlateType()))
+ && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
+ && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+ && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
+ && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+ && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
+ && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
+ && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((getPlateId() == null) ? 0 : getPlateId().hashCode());
+ result = prime * result + ((getPlatePrefix() == null) ? 0 : getPlatePrefix().hashCode());
+ result = prime * result + ((getPlateType() == null) ? 0 : getPlateType().hashCode());
+ result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
+ result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+ result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
+ result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+ result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
+ result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
+ result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(getClass().getSimpleName());
+ sb.append(" [");
+ sb.append("Hash = ").append(hashCode());
+ sb.append(", plateId=").append(plateId);
+ sb.append(", platePrefix=").append(platePrefix);
+ sb.append(", plateType=").append(plateType);
+ sb.append(", description=").append(description);
+ sb.append(", status=").append(status);
+ sb.append(", createBy=").append(createBy);
+ sb.append(", createTime=").append(createTime);
+ sb.append(", updateBy=").append(updateBy);
+ sb.append(", updateTime=").append(updateTime);
+ sb.append(", remark=").append(remark);
+ sb.append(", serialVersionUID=").append(serialVersionUID);
+ sb.append("]");
+ return sb.toString();
+ }
+}
\ No newline at end of file
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarWhitelist.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarWhitelist.java
new file mode 100644
index 0000000000000000000000000000000000000000..9ba530e0071da489bcdc09b247fdd5a966508fdb
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CarWhitelist.java
@@ -0,0 +1,55 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.Map;
+
+@TableName(value ="car_whitelist")
+@Data
+public class CarWhitelist implements Serializable {
+
+ @TableId(type = IdType.AUTO)
+ private Long whitelistId;
+
+ private String plateNumber;
+
+ private String type;
+
+ private String reason;
+
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date startTime;
+
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private Date endTime;
+
+ private String status;
+
+ private String createBy;
+
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date createTime;
+
+ private String updateBy;
+
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date updateTime;
+
+ private String remark;
+
+ @TableField(exist = false)
+ private Map params;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/Coupon.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/Coupon.java
new file mode 100644
index 0000000000000000000000000000000000000000..62991defee70289a251e6d5d5ae572a503a872ce
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/Coupon.java
@@ -0,0 +1,233 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 优惠券表
+ * @TableName coupon
+ */
+@TableName(value ="coupon")
+public class Coupon implements Serializable {
+ /**
+ * 优惠券ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 优惠券名称
+ */
+ private String name;
+
+ /**
+ * 优惠券类型(AMOUNT:减免金额、DISCOUNT:折扣券、FREE:全免券、TIME:减时券)
+ */
+ private Object type;
+
+ /**
+ * 优惠券面值
+ */
+ private BigDecimal value;
+
+ /**
+ * 使用说明
+ */
+ private String description;
+
+ /**
+ * 优惠券有效期开始时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+ private Date validFrom;
+
+ /**
+ * 优惠券有效期结束时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+ private Date validTo;
+
+ /**
+ * 优惠券总数量
+ */
+ private Integer totalQuantity;
+
+ /**
+ * 已领取数量
+ */
+ private Integer receivedQuantity;
+
+ /**
+ * 每人最多领取总数
+ */
+ private Integer perUserLimit;
+
+ /**
+ * 最低使用金额
+ */
+ private BigDecimal minAmount;
+
+ /**
+ * 状态(ENABLED:启用、DISABLED:禁用)
+ */
+ private Object status;
+
+ /**
+ * 创建人ID
+ */
+ private Long creatorId;
+
+ /**
+ * 创建时间
+ */
+ private Date createdAt;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedAt;
+
+ /**
+ * 删除时间
+ */
+ private Date deletedAt;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Object getType() {
+ return type;
+ }
+
+ public void setType(Object type) {
+ this.type = type;
+ }
+
+ public BigDecimal getValue() {
+ return value;
+ }
+
+ public void setValue(BigDecimal value) {
+ this.value = value;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public Date getValidFrom() {
+ return validFrom;
+ }
+
+ public void setValidFrom(Date validFrom) {
+ this.validFrom = validFrom;
+ }
+
+ public Date getValidTo() {
+ return validTo;
+ }
+
+ public void setValidTo(Date validTo) {
+ this.validTo = validTo;
+ }
+
+ public Integer getTotalQuantity() {
+ return totalQuantity;
+ }
+
+ public void setTotalQuantity(Integer totalQuantity) {
+ this.totalQuantity = totalQuantity;
+ }
+
+ public Integer getReceivedQuantity() {
+ return receivedQuantity;
+ }
+
+ public void setReceivedQuantity(Integer receivedQuantity) {
+ this.receivedQuantity = receivedQuantity;
+ }
+
+ public Integer getPerUserLimit() {
+ return perUserLimit;
+ }
+
+ public void setPerUserLimit(Integer perUserLimit) {
+ this.perUserLimit = perUserLimit;
+ }
+
+ public BigDecimal getMinAmount() {
+ return minAmount;
+ }
+
+ public void setMinAmount(BigDecimal minAmount) {
+ this.minAmount = minAmount;
+ }
+
+ public Object getStatus() {
+ return status;
+ }
+
+ public void setStatus(Object status) {
+ this.status = status;
+ }
+
+ public Long getCreatorId() {
+ return creatorId;
+ }
+
+ public void setCreatorId(Long creatorId) {
+ this.creatorId = creatorId;
+ }
+
+ public Date getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(Date createdAt) {
+ this.createdAt = createdAt;
+ }
+
+ public Date getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public void setUpdatedAt(Date updatedAt) {
+ this.updatedAt = updatedAt;
+ }
+
+ public Date getDeletedAt() {
+ return deletedAt;
+ }
+
+ public void setDeletedAt(Date deletedAt) {
+ this.deletedAt = deletedAt;
+ }
+}
\ No newline at end of file
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CouponRecord.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CouponRecord.java
new file mode 100644
index 0000000000000000000000000000000000000000..22845fd902d0226c0dc1cb75d2b83cc7f2839881
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/CouponRecord.java
@@ -0,0 +1,185 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 优惠券领取记录表
+ * @TableName coupon_record
+ */
+@TableName(value ="coupon_record")
+public class CouponRecord implements Serializable {
+ /**
+ * 记录ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 优惠券ID
+ */
+ private Long couponId;
+
+ /**
+ * 领取人ID
+ */
+ private Long userId;
+
+ /**
+ * 使用订单ID
+ */
+ private Long orderId;
+
+ /**
+ * 状态(UNUSED:未使用、USED:已使用、EXPIRED:已过期、INVALID:已作废)
+ */
+ private Object status;
+
+ /**
+ * 实际优惠金额
+ */
+ private BigDecimal amountUsed;
+
+ /**
+ * 领取时间
+ */
+ private Date receivedAt;
+
+ /**
+ * 使用时间
+ */
+ private Date usedAt;
+
+ /**
+ * 过期时间
+ */
+ private Date expiredAt;
+
+ /**
+ * 创建时间
+ */
+ private Date createdAt;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedAt;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @TableField(exist = false)
+ private String cname;
+
+ @TableField(exist = false)
+ private String uname;
+
+ public String getCname() {
+ return cname;
+ }
+
+ public void setCname(String cname) {
+ this.cname = cname;
+ }
+
+ public String getUname() {
+ return uname;
+ }
+
+ public void setUname(String uname) {
+ this.uname = uname;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public Long getCouponId() {
+ return couponId;
+ }
+
+ public void setCouponId(Long couponId) {
+ this.couponId = couponId;
+ }
+
+ public Long getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Long userId) {
+ this.userId = userId;
+ }
+
+ public Long getOrderId() {
+ return orderId;
+ }
+
+ public void setOrderId(Long orderId) {
+ this.orderId = orderId;
+ }
+
+ public Object getStatus() {
+ return status;
+ }
+
+ public void setStatus(Object status) {
+ this.status = status;
+ }
+
+ public BigDecimal getAmountUsed() {
+ return amountUsed;
+ }
+
+ public void setAmountUsed(BigDecimal amountUsed) {
+ this.amountUsed = amountUsed;
+ }
+
+ public Date getReceivedAt() {
+ return receivedAt;
+ }
+
+ public void setReceivedAt(Date receivedAt) {
+ this.receivedAt = receivedAt;
+ }
+
+ public Date getUsedAt() {
+ return usedAt;
+ }
+
+ public void setUsedAt(Date usedAt) {
+ this.usedAt = usedAt;
+ }
+
+ public Date getExpiredAt() {
+ return expiredAt;
+ }
+
+ public void setExpiredAt(Date expiredAt) {
+ this.expiredAt = expiredAt;
+ }
+
+ public Date getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(Date createdAt) {
+ this.createdAt = createdAt;
+ }
+
+ public Date getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public void setUpdatedAt(Date updatedAt) {
+ this.updatedAt = updatedAt;
+ }
+}
\ No newline at end of file
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/FeeRule.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/FeeRule.java
new file mode 100644
index 0000000000000000000000000000000000000000..de1cc8b0c73ee7f2ec47ed88a2375f5bddde9440
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/FeeRule.java
@@ -0,0 +1,68 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+/**
+ * 收费规则表
+ * @TableName fee_rule
+ */
+@TableName(value ="fee_rule")
+@Data
+public class FeeRule implements Serializable {
+ /**
+ * 收费规则表id
+ */
+ @TableId(type = IdType.AUTO)
+ private Integer id;
+
+ /**
+ * 时段规则起始时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+ private Date starterTime;
+
+ /**
+ * 时段规则结束时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+ private Date endTime;
+
+
+ /**
+ * 规则类型 0:按时间 1:免费 2:包月
+ */
+ private Integer ruleStatus;
+
+ /**
+ * 单价(元/小时)
+ */
+ private BigDecimal unitPrice;
+
+ /**
+ * 假期类型 0:正常 1:节假日
+ */
+ private Integer holidayStatus;
+
+
+ /**
+ * 是否热点时间 0:没在热点 1:热点时间
+ */
+ private Integer hotspotStatus;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkArea.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkArea.java
new file mode 100644
index 0000000000000000000000000000000000000000..13ac5615d2940ec9ac884e121741e71a33a4d208
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkArea.java
@@ -0,0 +1,174 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+/**
+ * 区域表 - 用于管理行政区划层级结构
+ * @TableName park_area
+ */
+@TableName(value ="park_area")
+public class ParkArea implements Serializable {
+ /**
+ * 区域ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long areaId;
+
+ /**
+ * 区域名称
+ */
+ private String areaName;
+
+ /**
+ * 区域编码
+ */
+ private String areaCode;
+
+ /**
+ * 父区域ID
+ */
+ private Long parentId;
+
+ /**
+ * 祖级列表,以逗号分隔
+ */
+ private String ancestors;
+
+ /**
+ * 显示顺序
+ */
+ private Integer orderNum;
+
+ /**
+ * 状态(0正常 1停用)
+ */
+ private String status;
+
+ /**
+ * 删除标志(0代表存在 2代表删除)
+ */
+ private String delFlag;
+
+ /**
+ * 创建者
+ */
+ private String createBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 更新者
+ */
+ private String updateBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updateTime;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ public Long getAreaId() {
+ return areaId;
+ }
+
+ public void setAreaId(Long areaId) {
+ this.areaId = areaId;
+ }
+
+ public String getAreaName() {
+ return areaName;
+ }
+
+ public void setAreaName(String areaName) {
+ this.areaName = areaName;
+ }
+
+ public String getAreaCode() {
+ return areaCode;
+ }
+
+ public void setAreaCode(String areaCode) {
+ this.areaCode = areaCode;
+ }
+
+ public Long getParentId() {
+ return parentId;
+ }
+
+ public void setParentId(Long parentId) {
+ this.parentId = parentId;
+ }
+
+ public String getAncestors() {
+ return ancestors;
+ }
+
+ public void setAncestors(String ancestors) {
+ this.ancestors = ancestors;
+ }
+
+ public Integer getOrderNum() {
+ return orderNum;
+ }
+
+ public void setOrderNum(Integer orderNum) {
+ this.orderNum = orderNum;
+ }
+
+ 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;
+ }
+
+ public String getCreateBy() {
+ return createBy;
+ }
+
+ public void setCreateBy(String createBy) {
+ this.createBy = createBy;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getUpdateBy() {
+ return updateBy;
+ }
+
+ public void setUpdateBy(String updateBy) {
+ this.updateBy = updateBy;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+}
\ No newline at end of file
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkLane.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkLane.java
new file mode 100644
index 0000000000000000000000000000000000000000..6be36d2749e769d5e802f56206e9b5ab830477af
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkLane.java
@@ -0,0 +1,186 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 车道表 - 用于管理停车场出入口车道及二维码
+ * @TableName park_lane
+ */
+@TableName(value ="park_lane")
+public class ParkLane implements Serializable {
+ /**
+ * 车道ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long laneId;
+
+ /**
+ * 车道名称
+ */
+ private String laneName;
+
+ /**
+ * 车道编码,用于唯一标识
+ */
+ private String laneCode;
+
+ /**
+ * 所属停车场ID,关联park_lot表
+ */
+ private Long lotId;
+
+ /**
+ * 车道类型(1入口 2出口)
+ */
+ private String laneType;
+
+ /**
+ * 二维码链接,用于车辆进出扫码
+ */
+ private String qrCode;
+
+ /**
+ * 状态(0正常 1停用)
+ */
+ private String status;
+
+ /**
+ * 删除标志(0代表存在 2代表删除)
+ */
+ private String delFlag;
+
+ /**
+ * 创建者
+ */
+ private String createBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 更新者
+ */
+ private String updateBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updateTime;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ @TableField(exist = false)
+ private String LotName;
+
+ public String getLotName() {
+ return LotName;
+ }
+
+ public void setLotName(String lotName) {
+ LotName = lotName;
+ }
+
+ public Long getLaneId() {
+ return laneId;
+ }
+
+ public void setLaneId(Long laneId) {
+ this.laneId = laneId;
+ }
+
+ public String getLaneName() {
+ return laneName;
+ }
+
+ public void setLaneName(String laneName) {
+ this.laneName = laneName;
+ }
+
+ public String getLaneCode() {
+ return laneCode;
+ }
+
+ public void setLaneCode(String laneCode) {
+ this.laneCode = laneCode;
+ }
+
+ public Long getLotId() {
+ return lotId;
+ }
+
+ public void setLotId(Long lotId) {
+ this.lotId = lotId;
+ }
+
+ public String getLaneType() {
+ return laneType;
+ }
+
+ public void setLaneType(String laneType) {
+ this.laneType = laneType;
+ }
+
+ public String getQrCode() {
+ return qrCode;
+ }
+
+ public void setQrCode(String qrCode) {
+ this.qrCode = qrCode;
+ }
+
+ 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;
+ }
+
+ public String getCreateBy() {
+ return createBy;
+ }
+
+ public void setCreateBy(String createBy) {
+ this.createBy = createBy;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getUpdateBy() {
+ return updateBy;
+ }
+
+ public void setUpdateBy(String updateBy) {
+ this.updateBy = updateBy;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+}
\ No newline at end of file
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkLot.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkLot.java
new file mode 100644
index 0000000000000000000000000000000000000000..915a75fe118096da1d515954616b6b4e78a2863c
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkLot.java
@@ -0,0 +1,257 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 停车场表 - 用于管理停车场基础信息及实时状态
+ * @TableName park_lot
+ */
+@TableName(value ="park_lot")
+public class ParkLot implements Serializable {
+ /**
+ * 停车场ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long lotId;
+
+ /**
+ * 停车场名称
+ */
+ private String lotName;
+
+ /**
+ * 停车场编码,用于唯一标识
+ */
+ private String lotCode;
+
+ /**
+ * 停车场类型(1路边 2场库)
+ */
+ private String lotType;
+
+ /**
+ * 所属区域ID,关联park_area表
+ */
+ private Long areaId;
+
+ /**
+ * 所属道路ID,关联park_road表,路边停车必填
+ */
+ private Long roadId;
+
+ /**
+ * 总泊位数
+ */
+ private Integer totalSpots;
+
+ /**
+ * 已用泊位数,实时更新
+ */
+ private Integer usedSpots;
+
+ /**
+ * 空闲泊位数,实时更新
+ */
+ private Integer freeSpots;
+
+ /**
+ * 详细地址
+ */
+ private String address;
+
+ /**
+ * 经度,用于地图定位
+ */
+ private BigDecimal longitude;
+
+ /**
+ * 纬度,用于地图定位
+ */
+ private BigDecimal latitude;
+
+ /**
+ * 状态(0正常 1停用)
+ */
+ private String status;
+
+ /**
+ * 删除标志(0代表存在 2代表删除)
+ */
+ private String delFlag;
+
+ /**
+ * 创建者
+ */
+ private String createBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 更新者
+ */
+ private String updateBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updateTime;
+
+
+
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ public Long getLotId() {
+ return lotId;
+ }
+
+ public void setLotId(Long lotId) {
+ this.lotId = lotId;
+ }
+
+ public String getLotName() {
+ return lotName;
+ }
+
+ public void setLotName(String lotName) {
+ this.lotName = lotName;
+ }
+
+ public String getLotCode() {
+ return lotCode;
+ }
+
+ public void setLotCode(String lotCode) {
+ this.lotCode = lotCode;
+ }
+
+ public String getLotType() {
+ return lotType;
+ }
+
+ public void setLotType(String lotType) {
+ this.lotType = lotType;
+ }
+
+ public Long getAreaId() {
+ return areaId;
+ }
+
+ public void setAreaId(Long areaId) {
+ this.areaId = areaId;
+ }
+
+ public Long getRoadId() {
+ return roadId;
+ }
+
+ public void setRoadId(Long roadId) {
+ this.roadId = roadId;
+ }
+
+ public Integer getTotalSpots() {
+ return totalSpots;
+ }
+
+ public void setTotalSpots(Integer totalSpots) {
+ this.totalSpots = totalSpots;
+ }
+
+ public Integer getUsedSpots() {
+ return usedSpots;
+ }
+
+ public void setUsedSpots(Integer usedSpots) {
+ this.usedSpots = usedSpots;
+ }
+
+ public Integer getFreeSpots() {
+ return freeSpots;
+ }
+
+ public void setFreeSpots(Integer freeSpots) {
+ this.freeSpots = freeSpots;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public BigDecimal getLongitude() {
+ return longitude;
+ }
+
+ public void setLongitude(BigDecimal longitude) {
+ this.longitude = longitude;
+ }
+
+ public BigDecimal getLatitude() {
+ return latitude;
+ }
+
+ public void setLatitude(BigDecimal latitude) {
+ this.latitude = latitude;
+ }
+
+ 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;
+ }
+
+ public String getCreateBy() {
+ return createBy;
+ }
+
+ public void setCreateBy(String createBy) {
+ this.createBy = createBy;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getUpdateBy() {
+ return updateBy;
+ }
+
+ public void setUpdateBy(String updateBy) {
+ this.updateBy = updateBy;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+}
\ No newline at end of file
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkPaymentConfig.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkPaymentConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..424e48647afaa01ae618e2fd9ebda648d532491a
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkPaymentConfig.java
@@ -0,0 +1,201 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 无感支付配置表 - 用于管理各停车场支付渠道配置
+ * @TableName park_payment_config
+ */
+@TableName(value ="park_payment_config")
+public class ParkPaymentConfig implements Serializable {
+ /**
+ * 配置ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long configId;
+
+ /**
+ * 停车场ID,关联park_lot表
+ */
+ private Long lotId;
+
+ /**
+ * 支付类型(1微信 2支付宝)
+ */
+ private String payType;
+
+ /**
+ * 商户号,支付平台提供
+ */
+ private String merchantId;
+
+ /**
+ * 商户名称,支付平台登记名称
+ */
+ private String merchantName;
+
+ /**
+ * 应用ID,支付平台提供
+ */
+ private String appId;
+
+ /**
+ * 商户密钥,支付平台提供
+ */
+ private String merchantKey;
+
+ /**
+ * 优先级(数字越大优先级越高)
+ */
+ private Integer priority;
+
+ /**
+ * 状态(0正常 1停用)
+ */
+ private String status;
+
+ /**
+ * 删除标志(0代表存在 2代表删除)
+ */
+ private String delFlag;
+
+ /**
+ * 创建者
+ */
+ private String createBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 更新者
+ */
+ private String updateBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updateTime;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ public Long getConfigId() {
+ return configId;
+ }
+
+ public void setConfigId(Long configId) {
+ this.configId = configId;
+ }
+
+ public Long getLotId() {
+ return lotId;
+ }
+
+ public void setLotId(Long lotId) {
+ this.lotId = lotId;
+ }
+
+ public String getPayType() {
+ return payType;
+ }
+
+ public void setPayType(String payType) {
+ this.payType = payType;
+ }
+
+ public String getMerchantId() {
+ return merchantId;
+ }
+
+ public void setMerchantId(String merchantId) {
+ this.merchantId = merchantId;
+ }
+
+ public String getMerchantName() {
+ return merchantName;
+ }
+
+ public void setMerchantName(String merchantName) {
+ this.merchantName = merchantName;
+ }
+
+ public String getAppId() {
+ return appId;
+ }
+
+ public void setAppId(String appId) {
+ this.appId = appId;
+ }
+
+ public String getMerchantKey() {
+ return merchantKey;
+ }
+
+ public void setMerchantKey(String merchantKey) {
+ this.merchantKey = merchantKey;
+ }
+
+ public Integer getPriority() {
+ return priority;
+ }
+
+ public void setPriority(Integer priority) {
+ this.priority = priority;
+ }
+
+ 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;
+ }
+
+ public String getCreateBy() {
+ return createBy;
+ }
+
+ public void setCreateBy(String createBy) {
+ this.createBy = createBy;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getUpdateBy() {
+ return updateBy;
+ }
+
+ public void setUpdateBy(String updateBy) {
+ this.updateBy = updateBy;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+}
\ No newline at end of file
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkRoad.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkRoad.java
new file mode 100644
index 0000000000000000000000000000000000000000..ff12cf9962d4e9688ace3165ffa994f9b0fb1b2e
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkRoad.java
@@ -0,0 +1,163 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 道路表 - 用于管理道路基础信息
+ * @TableName park_road
+ */
+@TableName(value ="park_road")
+public class ParkRoad implements Serializable {
+ /**
+ * 道路ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long roadId;
+
+ /**
+ * 道路名称
+ */
+ private String roadName;
+
+ /**
+ * 道路编码,可用于标识道路
+ */
+ private String roadCode;
+
+ /**
+ * 所属区域ID,关联park_area表
+ */
+ private Long areaId;
+
+ /**
+ * 道路长度(米)
+ */
+ private BigDecimal roadLength;
+
+ /**
+ * 状态(0正常 1停用)
+ */
+ private String status;
+
+ /**
+ * 删除标志(0代表存在 2代表删除)
+ */
+ private String delFlag;
+
+ /**
+ * 创建者
+ */
+ private String createBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 更新者
+ */
+ private String updateBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updateTime;
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ public Long getRoadId() {
+ return roadId;
+ }
+
+ public void setRoadId(Long roadId) {
+ this.roadId = roadId;
+ }
+
+ public String getRoadName() {
+ return roadName;
+ }
+
+ public void setRoadName(String roadName) {
+ this.roadName = roadName;
+ }
+
+ public String getRoadCode() {
+ return roadCode;
+ }
+
+ public void setRoadCode(String roadCode) {
+ this.roadCode = roadCode;
+ }
+
+ public Long getAreaId() {
+ return areaId;
+ }
+
+ public void setAreaId(Long areaId) {
+ this.areaId = areaId;
+ }
+
+ public BigDecimal getRoadLength() {
+ return roadLength;
+ }
+
+ public void setRoadLength(BigDecimal roadLength) {
+ this.roadLength = roadLength;
+ }
+
+ 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;
+ }
+
+ public String getCreateBy() {
+ return createBy;
+ }
+
+ public void setCreateBy(String createBy) {
+ this.createBy = createBy;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getUpdateBy() {
+ return updateBy;
+ }
+
+ public void setUpdateBy(String updateBy) {
+ this.updateBy = updateBy;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+}
\ No newline at end of file
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkSpot.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkSpot.java
new file mode 100644
index 0000000000000000000000000000000000000000..ef9c4cff93ec9cd0fc49425924beb3d7a5c9ec09
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/ParkSpot.java
@@ -0,0 +1,173 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 泊位表 - 用于管理停车位信息及使用状态
+ * @TableName park_spot
+ */
+@TableName(value ="park_spot")
+public class ParkSpot implements Serializable {
+ /**
+ * 泊位ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long spotId;
+
+ /**
+ * 泊位编号,用于标识具体车位
+ */
+ private String spotCode;
+
+ /**
+ * 所属停车场ID,关联park_lot表
+ */
+ private Long lotId;
+
+ /**
+ * 泊位类型(1普通 2充电 3无障碍)
+ */
+ private String spotType;
+
+ /**
+ * 是否占用(0空闲 1占用),实时更新
+ */
+ private String isOccupied;
+
+ /**
+ * 状态(0正常 1停用)
+ */
+ private String status;
+
+ /**
+ * 删除标志(0代表存在 2代表删除)
+ */
+ private String delFlag;
+
+ /**
+ * 创建者
+ */
+ private String createBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createTime;
+
+ /**
+ * 更新者
+ */
+ private String updateBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updateTime;
+
+ @TableField(exist = false)
+ private String lotName;
+
+ public String getLotName() {
+ return lotName;
+ }
+
+ public void setLotName(String lotName) {
+ this.lotName = lotName;
+ }
+
+ @TableField(exist = false)
+ private static final long serialVersionUID = 1L;
+
+ public Long getSpotId() {
+ return spotId;
+ }
+
+ public void setSpotId(Long spotId) {
+ this.spotId = spotId;
+ }
+
+ public String getSpotCode() {
+ return spotCode;
+ }
+
+ public void setSpotCode(String spotCode) {
+ this.spotCode = spotCode;
+ }
+
+ public Long getLotId() {
+ return lotId;
+ }
+
+ public void setLotId(Long lotId) {
+ this.lotId = lotId;
+ }
+
+ public String getSpotType() {
+ return spotType;
+ }
+
+ public void setSpotType(String spotType) {
+ this.spotType = spotType;
+ }
+
+ public String getIsOccupied() {
+ return isOccupied;
+ }
+
+ public void setIsOccupied(String isOccupied) {
+ this.isOccupied = isOccupied;
+ }
+
+ 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;
+ }
+
+ public String getCreateBy() {
+ return createBy;
+ }
+
+ public void setCreateBy(String createBy) {
+ this.createBy = createBy;
+ }
+
+ public Date getCreateTime() {
+ return createTime;
+ }
+
+ public void setCreateTime(Date createTime) {
+ this.createTime = createTime;
+ }
+
+ public String getUpdateBy() {
+ return updateBy;
+ }
+
+ public void setUpdateBy(String updateBy) {
+ this.updateBy = updateBy;
+ }
+
+ public Date getUpdateTime() {
+ return updateTime;
+ }
+
+ public void setUpdateTime(Date updateTime) {
+ this.updateTime = updateTime;
+ }
+}
\ No newline at end of file
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/SysCarousel.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/SysCarousel.java
new file mode 100644
index 0000000000000000000000000000000000000000..5a46dd08c4398b6762ba447d27fcca0f5d830777
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/SysCarousel.java
@@ -0,0 +1,59 @@
+package com.zhentao.system.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.util.Date;
+
+/**
+ * 轮播图管理表
+ * @TableName sys_carousel
+ */
+@TableName(value ="sys_carousel")
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class SysCarousel extends BaseEntity {
+ /**
+ * 轮播图ID
+ */
+ @TableId(type = IdType.AUTO)
+ private Long carouselId;
+
+ /**
+ * 标题
+ */
+ private String title;
+
+ /**
+ * 图片地址
+ */
+ private String imageUrl;
+
+ /**
+ * 跳转链接
+ */
+ private String linkUrl;
+
+ /**
+ * 排序号
+ */
+ private Integer sortOrder;
+
+ /**
+ * 状态(0正常 1停用)
+ */
+ private String status;
+
+ /**
+ * 展示开始时间
+ */
+ private Date startTime;
+
+ /**
+ * 展示结束时间
+ */
+ private Date endTime;
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/CouponRecordVo.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/CouponRecordVo.java
new file mode 100644
index 0000000000000000000000000000000000000000..4aa3ef8fa0184df2f8b78851d2fdefbc4eed3e3b
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/CouponRecordVo.java
@@ -0,0 +1,25 @@
+package com.zhentao.system.domain.vo;
+
+public class CouponRecordVo {
+
+ private Integer pageNum=1;
+
+ private Integer pageSize=5;
+
+
+ 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;
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/CouponVo.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/CouponVo.java
new file mode 100644
index 0000000000000000000000000000000000000000..812f799ff505118789ddde28b8204349c1b8a59d
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/CouponVo.java
@@ -0,0 +1,67 @@
+package com.zhentao.system.domain.vo;
+
+public class CouponVo {
+
+ private Integer pageNum = 1;
+ private Integer pageSize = 5;
+
+ // 优惠券名称
+ private String name;
+
+ // 优惠券类型
+ private String type;
+
+ // 优惠券状态
+ private String status;
+
+ // 日期范围
+ private String dateRange;
+
+ 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;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(String status) {
+ this.status = status;
+ }
+
+ public String getDateRange() {
+ return dateRange;
+ }
+
+ public void setDateRange(String dateRange) {
+ this.dateRange = dateRange;
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/CouponVos.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/CouponVos.java
new file mode 100644
index 0000000000000000000000000000000000000000..297430d4edb3885611faaec255fb190ec246f696
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/CouponVos.java
@@ -0,0 +1,110 @@
+package com.zhentao.system.domain.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class CouponVos {
+
+ private Long id;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ /** 优惠券名称 */
+ private String name;
+
+ /** 优惠券类型 */
+ private String type;
+
+ /** 优惠券面值 */
+ private BigDecimal value;
+
+ /** 有效期开始时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+ private Date validFrom;
+
+ /** 有效期结束时间 */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+ private Date validTo;
+
+ /** 发放总量 */
+ private Integer totalQuantity;
+
+ /** 每人限领数量 */
+ private Integer perUserLimit;
+
+ /** 使用说明 */
+ private String description;
+
+ // Getters and Setters
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public BigDecimal getValue() {
+ return value;
+ }
+
+ public void setValue(BigDecimal value) {
+ this.value = value;
+ }
+
+ public Date getValidFrom() {
+ return validFrom;
+ }
+
+ public void setValidFrom(Date validFrom) {
+ this.validFrom = validFrom;
+ }
+
+ public Date getValidTo() {
+ return validTo;
+ }
+
+ public void setValidTo(Date validTo) {
+ this.validTo = validTo;
+ }
+
+ public Integer getTotalQuantity() {
+ return totalQuantity;
+ }
+
+ public void setTotalQuantity(Integer totalQuantity) {
+ this.totalQuantity = totalQuantity;
+ }
+
+ public Integer getPerUserLimit() {
+ return perUserLimit;
+ }
+
+ public void setPerUserLimit(Integer perUserLimit) {
+ this.perUserLimit = perUserLimit;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/ParkLaneVo.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/ParkLaneVo.java
new file mode 100644
index 0000000000000000000000000000000000000000..383f6889a1dc8c7b49aa2c79b6d4baede74ffc63
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/ParkLaneVo.java
@@ -0,0 +1,43 @@
+package com.zhentao.system.domain.vo;
+public class ParkLaneVo {
+
+ private String LaneName;
+
+ private Integer lotId;
+
+ private Integer pageNum;
+
+ private Integer pageSize;
+
+ public String getLaneName() {
+ return LaneName;
+ }
+
+ public void setLaneName(String laneName) {
+ LaneName = laneName;
+ }
+
+ public Integer getLotId() {
+ return lotId;
+ }
+
+ public void setLotId(Integer lotId) {
+ this.lotId = lotId;
+ }
+
+ 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;
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/ParkPaymentConfigVo.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/ParkPaymentConfigVo.java
new file mode 100644
index 0000000000000000000000000000000000000000..cfd0ad93c06240a65e4de5f925a5f18fda40fe0c
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/ParkPaymentConfigVo.java
@@ -0,0 +1,24 @@
+package com.zhentao.system.domain.vo;
+
+public class ParkPaymentConfigVo {
+
+ private Integer pageNum=1;
+
+ private Integer pageSize=10;
+
+ 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;
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/ParkSpotVo.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/ParkSpotVo.java
new file mode 100644
index 0000000000000000000000000000000000000000..19cc042023f13d4f9b0367a900bd2fceb0c2f15a
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/domain/vo/ParkSpotVo.java
@@ -0,0 +1,53 @@
+package com.zhentao.system.domain.vo;
+
+public class ParkSpotVo {
+
+ private String spotCode;
+
+ private String spotType;
+
+ private Integer pageNum=1;
+
+ public Integer getLotId() {
+ return lotId;
+ }
+
+ public void setLotId(Integer lotId) {
+ this.lotId = lotId;
+ }
+
+ private Integer pageSize=10;
+
+ private Integer lotId;
+ public String getSpotCode() {
+ return spotCode;
+ }
+
+ public void setSpotCode(String spotCode) {
+ this.spotCode = spotCode;
+ }
+
+ public String getSpotType() {
+ return spotType;
+ }
+
+ public void setSpotType(String spotType) {
+ this.spotType = spotType;
+ }
+
+ 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;
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/AttendanceRecordMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/AttendanceRecordMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..421f7f110a09421180477a1b913f7e13f9fa0862
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/AttendanceRecordMapper.java
@@ -0,0 +1,33 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.AttendanceRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.sql.Time;
+import java.util.List;
+
+/**
+* @author 17074
+* @description 针对表【attendance_record】的数据库操作Mapper
+* @createDate 2025-02-11 11:10:27
+* @Entity com.zhentao.system.domain.AttendanceRecord
+*/
+public interface AttendanceRecordMapper extends BaseMapper {
+
+ AttendanceRecord getTodayRecord(Long userId);
+
+ int updateCheckIn(@Param("userId") Long userId,
+ @Param("checkInTime") Time checkInTime,
+ @Param("status") String status);
+
+ int updateCheckOut(@Param("userId") Long userId,
+ @Param("checkOutTime") Time checkOutTime,
+ @Param("status") String status);
+
+ List listaa(@Param("employeeId") Long employeeId,@Param("yearMonth") String yearMonth);
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarAccessRecordMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarAccessRecordMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..0aeb1f479e8dd3b0ef1049720d8892d776ad6fcb
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarAccessRecordMapper.java
@@ -0,0 +1,18 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.CarAccessRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author 17074
+* @description 针对表【car_access_record(车辆进出记录表)】的数据库操作Mapper
+* @createDate 2025-02-17 09:43:31
+* @Entity com.zhentao.system.domain.CarAccessRecord
+*/
+public interface CarAccessRecordMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarBlacklistMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarBlacklistMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..307d2c61b932109ccfc4c2066173d8ddf997b265
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarBlacklistMapper.java
@@ -0,0 +1,76 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.CarBlacklist;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+* @author 17074
+* @description 针对表【car_blacklist(车辆黑名单表)】的数据库操作Mapper
+* @createDate 2025-02-17 09:43:31
+* @Entity com.zhentao.system.domain.CarBlacklist
+*/
+public interface CarBlacklistMapper extends BaseMapper {
+ /**
+ * 查询车辆黑名单列表
+ *
+ * @param carBlacklist 车辆黑名单
+ * @return 车辆黑名单集合
+ */
+ public List selectCarBlacklistList(CarBlacklist carBlacklist);
+
+ /**
+ * 查询车辆黑名单详细
+ *
+ * @param blacklistId 车辆黑名单主键
+ * @return 车辆黑名单
+ */
+ public CarBlacklist selectCarBlacklistByBlacklistId(Long blacklistId);
+
+ /**
+ * 新增车辆黑名单
+ *
+ * @param carBlacklist 车辆黑名单
+ * @return 结果
+ */
+ public int insertCarBlacklist(CarBlacklist carBlacklist);
+
+ /**
+ * 修改车辆黑名单
+ *
+ * @param carBlacklist 车辆黑名单
+ * @return 结果
+ */
+ public int updateCarBlacklist(CarBlacklist carBlacklist);
+
+ /**
+ * 删除车辆黑名单
+ *
+ * @param blacklistId 车辆黑名单主键
+ * @return 结果
+ */
+ public int deleteCarBlacklistByBlacklistId(Long blacklistId);
+
+ /**
+ * 批量删除车辆黑名单
+ *
+ * @param blacklistIds 需要删除的数据主键集合
+ * @return 结果
+ */
+ public int deleteCarBlacklistByBlacklistIds(Long[] blacklistIds);
+
+ /**
+ * 校验车牌号码是否唯一
+ *
+ * @param plateNumber 车牌号码
+ * @return 结果
+ */
+ public CarBlacklist checkPlateNumberUnique(String plateNumber);
+
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarInfoMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarInfoMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..0e19b0ea25043aa2e9e8c5513b8c918a626b9f80
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarInfoMapper.java
@@ -0,0 +1,18 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.CarInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author 17074
+* @description 针对表【car_info(车辆信息表)】的数据库操作Mapper
+* @createDate 2025-02-17 09:43:31
+* @Entity com.zhentao.system.domain.CarInfo
+*/
+public interface CarInfoMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarSpecialPlateMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarSpecialPlateMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..22b25f629ba5ca193917d29fb3305f74faf9a87d
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarSpecialPlateMapper.java
@@ -0,0 +1,18 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.CarSpecialPlate;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author 17074
+* @description 针对表【car_special_plate(特殊车牌配置表)】的数据库操作Mapper
+* @createDate 2025-02-17 09:43:31
+* @Entity com.zhentao.system.domain.CarSpecialPlate
+*/
+public interface CarSpecialPlateMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarWhitelistMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarWhitelistMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..3f34ac2d2cb51e2006673e7937ad9d29caa465cf
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CarWhitelistMapper.java
@@ -0,0 +1,31 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.CarWhitelist;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+* @author 17074
+* @description 针对表【car_whitelist(车辆白名单表)】的数据库操作Mapper
+* @createDate 2025-02-17 09:43:31
+* @Entity com.zhentao.system.domain.CarWhitelist
+*/
+public interface CarWhitelistMapper extends BaseMapper {
+
+ int deleteCarWhitelistByWhitelistId(Long whitelistId);
+
+ int deleteCarWhitelistByWhitelistIds(Long[] whitelistIds);
+
+ int updateCarWhitelist(CarWhitelist carWhitelist);
+
+ int insertCarWhitelist(CarWhitelist carWhitelist);
+
+ List selectCarWhitelistList(CarWhitelist carWhitelist);
+
+ CarWhitelist selectCarWhitelistByWhitelistId(Long whitelistId);
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CouponMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CouponMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..3bc9c5a57548bf2090014f2a92d0997448f85f4a
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CouponMapper.java
@@ -0,0 +1,22 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.Coupon;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+* @author Administrator
+* @description 针对表【coupon(优惠券表)】的数据库操作Mapper
+* @createDate 2025-02-14 13:30:53
+* @Entity com.zhentao.system.domain.Coupon
+*/
+public interface CouponMapper extends BaseMapper {
+
+ int incrementReceivedQuantity(Long id);
+
+ int decrementTotalQuantityAndIncrementReceivedQuantity(@Param("couponId") Long couponId, @Param("quantity") int quantity);
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CouponRecordMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CouponRecordMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..d2c9338a59e3d715f9f73ea39c99b8fc3b890f77
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/CouponRecordMapper.java
@@ -0,0 +1,20 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.CouponRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+* @author Administrator
+* @description 针对表【coupon_record(优惠券领取记录表)】的数据库操作Mapper
+* @createDate 2025-02-14 13:30:53
+* @Entity com.zhentao.system.domain.CouponRecord
+*/
+public interface CouponRecordMapper extends BaseMapper {
+
+ Integer countByUserIdAndCouponId(@Param("userId") Long userId, @Param("couponId") Long couponId);
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/FeeRuleMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/FeeRuleMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..8aec03a5d2640c870fc7c887806215a443508681
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/FeeRuleMapper.java
@@ -0,0 +1,18 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.FeeRule;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author 31919
+* @description 针对表【fee_rule(收费规则表)】的数据库操作Mapper
+* @createDate 2025-02-11 13:41:38
+* @Entity com.zhentao.system.domain.FeeRule
+*/
+public interface FeeRuleMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkAreaMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkAreaMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..363fbfbd7ed71e8a65f8beaa7f7a938818164495
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkAreaMapper.java
@@ -0,0 +1,18 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.ParkArea;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author Administrator
+* @description 针对表【park_area(区域表 - 用于管理行政区划层级结构)】的数据库操作Mapper
+* @createDate 2025-02-11 14:47:01
+* @Entity com.zhentao.system.domain.ParkArea
+*/
+public interface ParkAreaMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkLaneMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkLaneMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..3598bf467af033e7be1a8f5958cbcf34cffc6597
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkLaneMapper.java
@@ -0,0 +1,20 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.ParkLane;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @author Administrator
+* @description 针对表【park_lane(车道表 - 用于管理停车场出入口车道及二维码)】的数据库操作Mapper
+* @createDate 2025-02-11 14:47:01
+* @Entity com.zhentao.system.domain.ParkLane
+*/
+
+public interface ParkLaneMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkLotMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkLotMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..02d24c4e85ca153fad99df21b8e1edffbcceaeb0
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkLotMapper.java
@@ -0,0 +1,23 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.ParkLot;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author Administrator
+* @description 针对表【park_lot(停车场表 - 用于管理停车场基础信息及实时状态)】的数据库操作Mapper
+* @createDate 2025-02-11 14:47:01
+* @Entity com.zhentao.system.domain.ParkLot
+*/
+public interface ParkLotMapper extends BaseMapper {
+ /**
+ * 修改
+ * @param parkLot1
+ * @return
+ */
+ int updateLot(ParkLot parkLot1);
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkPaymentConfigMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkPaymentConfigMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..f14455858c1c385c8c3eb43c3eb95a8b90bfd9f4
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkPaymentConfigMapper.java
@@ -0,0 +1,18 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.ParkPaymentConfig;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author Administrator
+* @description 针对表【park_payment_config(无感支付配置表 - 用于管理各停车场支付渠道配置)】的数据库操作Mapper
+* @createDate 2025-02-11 14:47:01
+* @Entity com.zhentao.system.domain.ParkPaymentConfig
+*/
+public interface ParkPaymentConfigMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkRoadMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkRoadMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..d5df48e3efcdbc038d70b16523f9a55da6010781
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkRoadMapper.java
@@ -0,0 +1,18 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.ParkRoad;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author Administrator
+* @description 针对表【park_road(道路表 - 用于管理道路基础信息)】的数据库操作Mapper
+* @createDate 2025-02-11 14:47:01
+* @Entity com.zhentao.system.domain.ParkRoad
+*/
+public interface ParkRoadMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkSpotMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkSpotMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..a7aa3acebbac5f46d79594691a2a5898e3f774ab
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/ParkSpotMapper.java
@@ -0,0 +1,18 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.ParkSpot;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author Administrator
+* @description 针对表【park_spot(泊位表 - 用于管理停车位信息及使用状态)】的数据库操作Mapper
+* @createDate 2025-02-11 14:47:01
+* @Entity com.zhentao.system.domain.ParkSpot
+*/
+public interface ParkSpotMapper extends BaseMapper {
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/SysCarouselMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/SysCarouselMapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..50c294ee65064f885b0441d5c6bc3eacafee067e
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/SysCarouselMapper.java
@@ -0,0 +1,29 @@
+package com.zhentao.system.mapper;
+
+import com.zhentao.system.domain.SysCarousel;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+import java.util.List;
+
+/**
+* @author 17074
+* @description 针对表【sys_carousel(轮播图管理表)】的数据库操作Mapper
+* @createDate 2025-02-13 13:57:32
+* @Entity com.zhentao.system.domain.SysCarousel
+*/
+public interface SysCarouselMapper extends BaseMapper {
+
+ List selectCarouselList(SysCarousel carousel);
+
+ SysCarousel selectCarouselById(Long carouselId);
+
+ int insertCarousel(SysCarousel carousel);
+
+ int updateCarousel(SysCarousel carousel);
+
+ int deleteCarouselByIds(Long[] carouselIds);
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/SysUserMapper.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/SysUserMapper.java
index f4e6018791eeadf6ea5023fd63db2818e2f4e647..2a59c51a129951a2c6662f49affc2f3da3c24f50 100644
--- a/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/SysUserMapper.java
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/mapper/SysUserMapper.java
@@ -11,6 +11,7 @@ import com.zhentao.system.api.domain.SysUser;
*
* @author ruoyi
*/
+
public interface SysUserMapper
{
/**
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/AttendanceRecordService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/AttendanceRecordService.java
new file mode 100644
index 0000000000000000000000000000000000000000..4167595d242a9dd5e9479e863c5f3360f5fb9c79
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/AttendanceRecordService.java
@@ -0,0 +1,22 @@
+package com.zhentao.system.service;
+
+import com.zhentao.system.domain.AttendanceRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+* @author 17074
+* @description 针对表【attendance_record】的数据库操作Service
+* @createDate 2025-02-11 11:10:27
+*/
+public interface AttendanceRecordService extends IService {
+
+ AttendanceRecord getTodayRecord(Long userId);
+
+ boolean checkIn(Long userId);
+
+ boolean checkOut(Long userId);
+
+ List all(Long employeeId, String yearMonth);
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarAccessRecordService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarAccessRecordService.java
new file mode 100644
index 0000000000000000000000000000000000000000..96ad9fb80506192d234b8214a70846855081e64e
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarAccessRecordService.java
@@ -0,0 +1,13 @@
+package com.zhentao.system.service;
+
+import com.zhentao.system.domain.CarAccessRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author 17074
+* @description 针对表【car_access_record(车辆进出记录表)】的数据库操作Service
+* @createDate 2025-02-17 09:43:31
+*/
+public interface CarAccessRecordService extends IService {
+
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarBlacklistService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarBlacklistService.java
new file mode 100644
index 0000000000000000000000000000000000000000..4ca24503f542edbc0ef07a76797514eb012408e1
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarBlacklistService.java
@@ -0,0 +1,70 @@
+package com.zhentao.system.service;
+
+import com.zhentao.system.domain.CarBlacklist;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+* @author 17074
+* @description 针对表【car_blacklist(车辆黑名单表)】的数据库操作Service
+* @createDate 2025-02-17 09:43:31
+*/
+public interface CarBlacklistService extends IService {
+
+ /**
+ * 查询车辆黑名单列表
+ *
+ * @param carBlacklist 车辆黑名单
+ * @return 车辆黑名单集合
+ */
+ public List selectCarBlacklistList(CarBlacklist carBlacklist);
+
+ /**
+ * 查询车辆黑名单详细
+ *
+ * @param blacklistId 车辆黑名单主键
+ * @return 车辆黑名单
+ */
+ public CarBlacklist selectCarBlacklistByBlacklistId(Long blacklistId);
+
+ /**
+ * 新增车辆黑名单
+ *
+ * @param carBlacklist 车辆黑名单
+ * @return 结果
+ */
+ public int insertCarBlacklist(CarBlacklist carBlacklist);
+
+ /**
+ * 修改车辆黑名单
+ *
+ * @param carBlacklist 车辆黑名单
+ * @return 结果
+ */
+ public int updateCarBlacklist(CarBlacklist carBlacklist);
+
+ /**
+ * 批量删除车辆黑名单
+ *
+ * @param blacklistIds 需要删除的车辆黑名单主键集合
+ * @return 结果
+ */
+ public int deleteCarBlacklistByBlacklistIds(Long[] blacklistIds);
+
+ /**
+ * 删除车辆黑名单信息
+ *
+ * @param blacklistId 车辆黑名单主键
+ * @return 结果
+ */
+ public int deleteCarBlacklistByBlacklistId(Long blacklistId);
+
+ /**
+ * 校验车牌号码是否唯一
+ *
+ * @param plateNumber 车牌号码
+ * @return 结果
+ */
+ public boolean checkPlateNumberUnique(String plateNumber);
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarInfoService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarInfoService.java
new file mode 100644
index 0000000000000000000000000000000000000000..4f6cedbc6689cd42dcea60ba5a65d754e484df39
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarInfoService.java
@@ -0,0 +1,13 @@
+package com.zhentao.system.service;
+
+import com.zhentao.system.domain.CarInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author 17074
+* @description 针对表【car_info(车辆信息表)】的数据库操作Service
+* @createDate 2025-02-17 09:43:31
+*/
+public interface CarInfoService extends IService {
+
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarSpecialPlateService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarSpecialPlateService.java
new file mode 100644
index 0000000000000000000000000000000000000000..a33498a9aec585b04dfdb3b86e84d2c9b75237dc
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarSpecialPlateService.java
@@ -0,0 +1,13 @@
+package com.zhentao.system.service;
+
+import com.zhentao.system.domain.CarSpecialPlate;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author 17074
+* @description 针对表【car_special_plate(特殊车牌配置表)】的数据库操作Service
+* @createDate 2025-02-17 09:43:31
+*/
+public interface CarSpecialPlateService extends IService {
+
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarWhitelistService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarWhitelistService.java
new file mode 100644
index 0000000000000000000000000000000000000000..27617f2bc95d5087ca054156263a18043601d914
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CarWhitelistService.java
@@ -0,0 +1,44 @@
+package com.zhentao.system.service;
+
+import com.zhentao.system.domain.CarWhitelist;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+* @author 17074
+* @description 针对表【car_whitelist(车辆白名单表)】的数据库操作Service
+* @createDate 2025-02-17 09:43:31
+*/
+public interface CarWhitelistService extends IService {
+
+ /**
+ * 查询白名单
+ */
+ public CarWhitelist selectCarWhitelistByWhitelistId(Long whitelistId);
+
+ /**
+ * 查询白名单列表
+ */
+ public List selectCarWhitelistList(CarWhitelist carWhitelist);
+
+ /**
+ * 新增白名单
+ */
+ public int insertCarWhitelist(CarWhitelist carWhitelist);
+
+ /**
+ * 修改白名单
+ */
+ public int updateCarWhitelist(CarWhitelist carWhitelist);
+
+ /**
+ * 批量删除白名单
+ */
+ public int deleteCarWhitelistByWhitelistIds(Long[] whitelistIds);
+
+ /**
+ * 删除白名单信息
+ */
+ public int deleteCarWhitelistByWhitelistId(Long whitelistId);
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CouponRecordService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CouponRecordService.java
new file mode 100644
index 0000000000000000000000000000000000000000..fc89625be405efeb345d082263325f6fe7e41b20
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CouponRecordService.java
@@ -0,0 +1,31 @@
+package com.zhentao.system.service;
+
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.CouponRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zhentao.system.domain.vo.CouponRecordVo;
+
+/**
+* @author Administrator
+* @description 针对表【coupon_record(优惠券领取记录表)】的数据库操作Service
+* @createDate 2025-02-14 13:30:53
+*/
+public interface CouponRecordService extends IService {
+
+ /**
+ * 领取优惠卷
+ * @param couponId
+ * @return
+ */
+
+ AjaxResult addCouponRecord(Long couponId);
+
+
+ /**
+ * 查询优惠卷领取记录
+ * @param couponRecordVo
+ * @return
+ */
+ AjaxResult ListCouponRecord(CouponRecordVo couponRecordVo);
+
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CouponService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CouponService.java
new file mode 100644
index 0000000000000000000000000000000000000000..d30fe6d3d8b1af99b3747a42ad3ccb50997e86d9
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/CouponService.java
@@ -0,0 +1,49 @@
+package com.zhentao.system.service;
+
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.Coupon;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zhentao.system.domain.vo.CouponVo;
+import com.zhentao.system.domain.vo.CouponVos;
+
+/**
+* @author Administrator
+* @description 针对表【coupon(优惠券表)】的数据库操作Service
+* @createDate 2025-02-14 13:30:53
+*/
+public interface CouponService extends IService {
+ /**
+ * 查询优惠卷
+ * @param couponVo
+ * @return
+ */
+ AjaxResult ListCoupon(CouponVo couponVo);
+
+ /**
+ * 新建优惠卷
+ * @param couponVos
+ * @return
+ */
+ AjaxResult addCoupon(CouponVos couponVos);
+
+ /**
+ * 修改优惠卷状态
+ * @param coupon
+ * @return
+ */
+ AjaxResult stateCoupon(Coupon coupon);
+
+ /**
+ * 更新优惠卷
+ * @param couponVos
+ * @return
+ */
+ AjaxResult updateCoupon(CouponVos couponVos);
+
+ /**
+ * app查询优惠卷列表
+ * @param coupon
+ * @return
+ */
+ AjaxResult appListCoupon(Coupon coupon);
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/FeeRuleService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/FeeRuleService.java
new file mode 100644
index 0000000000000000000000000000000000000000..a8144b4dab2a3ed1188765a1936121daad90e526
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/FeeRuleService.java
@@ -0,0 +1,17 @@
+package com.zhentao.system.service;
+
+import com.zhentao.system.domain.FeeRule;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.math.BigDecimal;
+import java.text.ParseException;
+
+/**
+* @author 31919
+* @description 针对表【fee_rule(收费规则表)】的数据库操作Service
+* @createDate 2025-02-11 13:41:38
+*/
+public interface FeeRuleService extends IService {
+
+ BigDecimal calculateFeeRule(FeeRule feeRule) throws ParseException;
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkAreaService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkAreaService.java
new file mode 100644
index 0000000000000000000000000000000000000000..5087ecbff45294836922a546280076347b929865
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkAreaService.java
@@ -0,0 +1,13 @@
+package com.zhentao.system.service;
+
+import com.zhentao.system.domain.ParkArea;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author Administrator
+* @description 针对表【park_area(区域表 - 用于管理行政区划层级结构)】的数据库操作Service
+* @createDate 2025-02-11 14:47:01
+*/
+public interface ParkAreaService extends IService {
+
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkLaneService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkLaneService.java
new file mode 100644
index 0000000000000000000000000000000000000000..acbefe9477e83c4c0a5dece39c4ddede0ebdfef2
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkLaneService.java
@@ -0,0 +1,41 @@
+package com.zhentao.system.service;
+
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.ParkLane;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zhentao.system.domain.vo.ParkLaneVo;
+
+/**
+* @author Administrator
+* @description 针对表【park_lane(车道表 - 用于管理停车场出入口车道及二维码)】的数据库操作Service
+* @createDate 2025-02-11 14:47:01
+*/
+public interface ParkLaneService extends IService {
+ /**
+ * 新增车道
+ * @param parkLane
+ * @return
+ */
+ AjaxResult addLane(ParkLane parkLane);
+
+ /**
+ * 修改车道
+ * @param parkLane
+ * @return
+ */
+ AjaxResult updateLane(ParkLane parkLane);
+
+ /**
+ * 查询车道
+ * @param parkLaneVo
+ * @return
+ */
+ AjaxResult ListLane(ParkLaneVo parkLaneVo);
+
+ /**
+ * 生成二维码
+ * @param parkLane
+ * @return
+ */
+ AjaxResult generateQrCode(ParkLane parkLane);
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkLotService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkLotService.java
new file mode 100644
index 0000000000000000000000000000000000000000..a963db1a3cbda48fb483ca5f8c88b438a3ea211a
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkLotService.java
@@ -0,0 +1,40 @@
+package com.zhentao.system.service;
+
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.ParkLot;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author Administrator
+* @description 针对表【park_lot(停车场表 - 用于管理停车场基础信息及实时状态)】的数据库操作Service
+* @createDate 2025-02-11 14:47:01
+*/
+public interface ParkLotService extends IService {
+
+ /**
+ * 查询停车场列表
+ * @return
+ */
+ AjaxResult ListLot();
+
+ /**
+ * 新增停车场
+ * @param parkLot
+ * @return
+ */
+ AjaxResult addLot(ParkLot parkLot);
+
+ /**
+ * 修改停车场
+ * @param parkLot
+ * @return
+ */
+ AjaxResult updateLot(ParkLot parkLot);
+
+ /**
+ * 删除停车场
+ * @param parkLot
+ * @return
+ */
+ AjaxResult deleteLot(ParkLot parkLot);
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkPaymentConfigService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkPaymentConfigService.java
new file mode 100644
index 0000000000000000000000000000000000000000..5df5467a7075281ae0596ca0f54f7a29f872e890
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkPaymentConfigService.java
@@ -0,0 +1,41 @@
+package com.zhentao.system.service;
+
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.ParkPaymentConfig;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zhentao.system.domain.vo.ParkPaymentConfigVo;
+
+/**
+* @author Administrator
+* @description 针对表【park_payment_config(无感支付配置表 - 用于管理各停车场支付渠道配置)】的数据库操作Service
+* @createDate 2025-02-11 14:47:01
+*/
+public interface ParkPaymentConfigService extends IService {
+ /**
+ * 无感支付配置表 - 用于管理各停车场支付渠道配置
+ * @param paymentConfigVo
+ * @return
+ */
+ AjaxResult ListPaymentConfig(ParkPaymentConfigVo paymentConfigVo);
+
+ /**
+ * 添加无感支付配置
+ * @param paymentConfig
+ * @return
+ */
+ AjaxResult addPaymentConfig(ParkPaymentConfig paymentConfig);
+
+ /**
+ * 修改无感支付配置
+ * @param paymentConfig
+ * @return
+ */
+ AjaxResult updatePaymentConfig(ParkPaymentConfig paymentConfig);
+
+ /**
+ * 删除无感支付配置
+ * @param paymentConfig
+ * @return
+ */
+ AjaxResult deletePaymentConfig(ParkPaymentConfig paymentConfig);
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkRoadService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkRoadService.java
new file mode 100644
index 0000000000000000000000000000000000000000..8bd3d97e70d046986240c854a32e31b7ceb777f0
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkRoadService.java
@@ -0,0 +1,13 @@
+package com.zhentao.system.service;
+
+import com.zhentao.system.domain.ParkRoad;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author Administrator
+* @description 针对表【park_road(道路表 - 用于管理道路基础信息)】的数据库操作Service
+* @createDate 2025-02-11 14:47:01
+*/
+public interface ParkRoadService extends IService {
+
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkSpotService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkSpotService.java
new file mode 100644
index 0000000000000000000000000000000000000000..57581850020243b7c51a34889f26ebcfc00e44e2
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/ParkSpotService.java
@@ -0,0 +1,43 @@
+package com.zhentao.system.service;
+
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.ParkSpot;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zhentao.system.domain.vo.ParkSpotVo;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @author Administrator
+* @description 针对表【park_spot(泊位表 - 用于管理停车位信息及使用状态)】的数据库操作Service
+* @createDate 2025-02-11 14:47:01
+*/
+@Mapper
+public interface ParkSpotService extends IService {
+ /**
+ * 泊位列表
+ * @param parkSpotVo
+ * @return
+ */
+ AjaxResult parkSpotList(ParkSpotVo parkSpotVo);
+
+ /**
+ * 新增泊位
+ * @param parkSpot
+ * @return
+ */
+ AjaxResult addParkSpot(ParkSpot parkSpot);
+
+ /**
+ * 修改泊位信息
+ * @param parkSpot
+ * @return
+ */
+ AjaxResult updateParkSpot(ParkSpot parkSpot);
+
+ /**
+ * 删除泊位信息
+ * @param parkSpot
+ * @return
+ */
+ AjaxResult deleteParkSpot(ParkSpot parkSpot);
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/SysCarouselService.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/SysCarouselService.java
new file mode 100644
index 0000000000000000000000000000000000000000..adab7d944f1ac553615b84835f5c73e6eff10506
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/SysCarouselService.java
@@ -0,0 +1,26 @@
+package com.zhentao.system.service;
+
+import com.zhentao.system.domain.SysCarousel;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+* @author 17074
+* @description 针对表【sys_carousel(轮播图管理表)】的数据库操作Service
+* @createDate 2025-02-13 13:57:32
+*/
+public interface SysCarouselService extends IService {
+
+ List selectCarouselList(SysCarousel carousel);
+
+ public SysCarousel selectCarouselById(Long carouselId);
+
+ int insertCarousel(SysCarousel carousel);
+
+ int updateCarousel(SysCarousel carousel);
+
+ int deleteCarouselByIds(Long[] carouselIds);
+
+ int changeStatus(SysCarousel carousel);
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/AttendanceRecordServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/AttendanceRecordServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..8ba124468d9275a9f4c2e527134ea1ffaab09615
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/AttendanceRecordServiceImpl.java
@@ -0,0 +1,97 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.system.domain.AttendanceRecord;
+import com.zhentao.system.service.AttendanceRecordService;
+import com.zhentao.system.mapper.AttendanceRecordMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.sql.Time;
+import java.time.LocalTime;
+import java.util.Date;
+import java.util.List;
+
+/**
+* @author 17074
+* @description 针对表【attendance_record】的数据库操作Service实现
+* @createDate 2025-02-11 11:10:27
+*/
+@Service
+public class AttendanceRecordServiceImpl extends ServiceImpl
+ implements AttendanceRecordService{
+ @Resource
+ private AttendanceRecordMapper attendanceRecordMapper;
+ @Override
+ public AttendanceRecord getTodayRecord(Long userId) {
+ AttendanceRecord todayRecord = attendanceRecordMapper.getTodayRecord(userId);
+ System.err.println(todayRecord);
+ System.err.println(userId);
+ return todayRecord;
+
+ }
+
+ @Override
+ @Transactional
+ public boolean checkIn(Long userId) {
+ // 获取当前时间
+ LocalTime now = LocalTime.now();
+ Time checkInTime = Time.valueOf(now);
+
+ // 判断打卡状态
+ String status = "正常";
+ if (now.isAfter(LocalTime.of(9, 30))) {
+ status = "迟到";
+ }
+ System.err.println(userId + " " + checkInTime + " " + status);
+ // 更新打卡记录
+ int rows = attendanceRecordMapper.updateCheckIn(userId, checkInTime, status);
+ if (rows == 0) {
+ // 如果没有记录则创建新记录
+ AttendanceRecord record = new AttendanceRecord();
+ record.setEmployeeId(String.valueOf(userId));
+ record.setDate(new Date());
+ record.setCheckIn(checkInTime);
+ record.setStatus(status);
+ return attendanceRecordMapper.insert(record) > 0;
+ }
+ return true;
+ }
+
+ @Override
+ @Transactional
+ public boolean checkOut(Long userId) {
+ // 获取当前时间
+ LocalTime now = LocalTime.now();
+ Time checkOutTime = Time.valueOf(now);
+
+ // 获取当前记录
+ AttendanceRecord record = getTodayRecord(userId);
+ if (record == null) {
+ throw new RuntimeException("未找到上班打卡记录");
+ }
+
+ // 判断打卡状态
+ String status = record.getStatus();
+ if (now.isBefore(LocalTime.of(17, 30))) {
+ status = "早退";
+ }
+
+ // 更新打卡记录
+ return attendanceRecordMapper.updateCheckOut(userId, checkOutTime, status)<0;
+ }
+
+ @Override
+ public List all(Long employeeId, String yearMonth) {
+ List listaa = attendanceRecordMapper.listaa(employeeId, yearMonth);
+ System.out.println(listaa+"--------------------");
+ return listaa;
+ }
+
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarAccessRecordServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarAccessRecordServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..6018f60a948b0548f6db133b64b8feec3f3bde95
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarAccessRecordServiceImpl.java
@@ -0,0 +1,22 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.system.domain.CarAccessRecord;
+import com.zhentao.system.service.CarAccessRecordService;
+import com.zhentao.system.mapper.CarAccessRecordMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author 17074
+* @description 针对表【car_access_record(车辆进出记录表)】的数据库操作Service实现
+* @createDate 2025-02-17 09:43:31
+*/
+@Service
+public class CarAccessRecordServiceImpl extends ServiceImpl
+ implements CarAccessRecordService{
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarBlacklistServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarBlacklistServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..f34bb5bf7e404fcbb5c344843d1cb21cf47e15b4
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarBlacklistServiceImpl.java
@@ -0,0 +1,103 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.common.core.utils.DateUtils;
+import com.zhentao.system.domain.CarBlacklist;
+import com.zhentao.system.service.CarBlacklistService;
+import com.zhentao.system.mapper.CarBlacklistMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+* @author 17074
+* @description 针对表【car_blacklist(车辆黑名单表)】的数据库操作Service实现
+* @createDate 2025-02-17 09:43:31
+*/
+@Service
+public class CarBlacklistServiceImpl extends ServiceImpl
+ implements CarBlacklistService{
+
+ @Resource
+ private CarBlacklistMapper carBlacklistMapper;
+
+ /**
+ * 查询车辆黑名单列表
+ *
+ * @param carBlacklist 车辆黑名单
+ * @return 车辆黑名单
+ */
+ @Override
+ public List selectCarBlacklistList(CarBlacklist carBlacklist)
+ {
+ return carBlacklistMapper.selectCarBlacklistList(carBlacklist);
+ }
+
+ @Override
+ public boolean checkPlateNumberUnique(String plateNumber) {
+ return carBlacklistMapper.checkPlateNumberUnique(plateNumber)==null ;
+ }
+
+ /**
+ * 查询车辆黑名单详细
+ *
+ * @param blacklistId 车辆黑名单主键
+ * @return 车辆黑名单
+ */
+ @Override
+ public CarBlacklist selectCarBlacklistByBlacklistId(Long blacklistId)
+ {
+ return carBlacklistMapper.selectCarBlacklistByBlacklistId(blacklistId);
+ }
+
+ /**
+ * 新增车辆黑名单
+ *
+ * @param carBlacklist 车辆黑名单
+ * @return 结果
+ */
+ @Override
+ public int insertCarBlacklist(CarBlacklist carBlacklist)
+ {
+ carBlacklist.setCreateTime(DateUtils.getNowDate());
+ return carBlacklistMapper.insertCarBlacklist(carBlacklist);
+ }
+
+ /**
+ * 修改车辆黑名单
+ *
+ * @param carBlacklist 车辆黑名单
+ * @return 结果
+ */
+ @Override
+ public int updateCarBlacklist(CarBlacklist carBlacklist)
+ {
+ carBlacklist.setUpdateTime(DateUtils.getNowDate());
+ return carBlacklistMapper.updateCarBlacklist(carBlacklist);
+ }
+
+ /**
+ * 批量删除车辆黑名单
+ *
+ * @param blacklistIds 需要删除的车辆黑名单主键
+ * @return 结果
+ */
+ @Override
+ public int deleteCarBlacklistByBlacklistIds(Long[] blacklistIds)
+ {
+ return carBlacklistMapper.deleteCarBlacklistByBlacklistIds(blacklistIds);
+ }
+
+ @Override
+ public int deleteCarBlacklistByBlacklistId(Long blacklistId) {
+ return carBlacklistMapper.deleteCarBlacklistByBlacklistId(blacklistId);
+ }
+
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarInfoServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarInfoServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..9b001c755fec02c7fe5288912232acc509ce386b
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarInfoServiceImpl.java
@@ -0,0 +1,22 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.system.domain.CarInfo;
+import com.zhentao.system.service.CarInfoService;
+import com.zhentao.system.mapper.CarInfoMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author 17074
+* @description 针对表【car_info(车辆信息表)】的数据库操作Service实现
+* @createDate 2025-02-17 09:43:31
+*/
+@Service
+public class CarInfoServiceImpl extends ServiceImpl
+ implements CarInfoService{
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarSpecialPlateServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarSpecialPlateServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..56ccfa7ccb3c147944c1f62af81d37be3915e86f
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarSpecialPlateServiceImpl.java
@@ -0,0 +1,22 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.system.domain.CarSpecialPlate;
+import com.zhentao.system.service.CarSpecialPlateService;
+import com.zhentao.system.mapper.CarSpecialPlateMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author 17074
+* @description 针对表【car_special_plate(特殊车牌配置表)】的数据库操作Service实现
+* @createDate 2025-02-17 09:43:31
+*/
+@Service
+public class CarSpecialPlateServiceImpl extends ServiceImpl
+ implements CarSpecialPlateService{
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarWhitelistServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarWhitelistServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..1b145239df14e3823186e265a5535713ae6a94e4
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CarWhitelistServiceImpl.java
@@ -0,0 +1,64 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.system.domain.CarWhitelist;
+import com.zhentao.system.service.CarWhitelistService;
+import com.zhentao.system.mapper.CarWhitelistMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+* @author 17074
+* @description 针对表【car_whitelist(车辆白名单表)】的数据库操作Service实现
+* @createDate 2025-02-17 09:43:31
+*/
+@Service
+public class CarWhitelistServiceImpl extends ServiceImpl
+ implements CarWhitelistService{
+ @Autowired
+ private CarWhitelistMapper carWhitelistMapper;
+
+ @Override
+ public CarWhitelist selectCarWhitelistByWhitelistId(Long whitelistId) {
+ return carWhitelistMapper.selectCarWhitelistByWhitelistId(whitelistId);
+ }
+
+ @Override
+ public List selectCarWhitelistList(CarWhitelist carWhitelist) {
+ return carWhitelistMapper.selectCarWhitelistList(carWhitelist);
+ }
+
+
+ @Override
+ public int insertCarWhitelist(CarWhitelist carWhitelist) {
+ // 设置默认值
+ if (carWhitelist.getType() == null) {
+ carWhitelist.setType("1"); // 默认为新能源车
+ }
+ if (carWhitelist.getStatus() == null) {
+ carWhitelist.setStatus("0"); // 默认为生效状态
+ }
+ return baseMapper.insert(carWhitelist); // 使用 MyBatis-Plus 的 insert 方法
+ }
+
+ @Override
+ public int updateCarWhitelist(CarWhitelist carWhitelist) {
+ return carWhitelistMapper.updateCarWhitelist(carWhitelist);
+ }
+
+ @Override
+ public int deleteCarWhitelistByWhitelistIds(Long[] whitelistIds) {
+ return carWhitelistMapper.deleteCarWhitelistByWhitelistIds(whitelistIds);
+ }
+
+ @Override
+ public int deleteCarWhitelistByWhitelistId(Long whitelistId) {
+ return carWhitelistMapper.deleteCarWhitelistByWhitelistId(whitelistId);
+ }
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CouponRecordServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CouponRecordServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..9071ebb07bac3952b6f6bf0e7d1c06741c596f9b
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CouponRecordServiceImpl.java
@@ -0,0 +1,155 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.common.core.domain.R;
+import com.zhentao.common.core.exception.BaseException;
+import com.zhentao.common.core.utils.SecurityUtils;
+import com.zhentao.common.core.utils.StringUtils;
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.api.RemoteUserService;
+import com.zhentao.system.api.domain.SysUser;
+import com.zhentao.system.api.model.LoginUser;
+import com.zhentao.system.domain.Coupon;
+import com.zhentao.system.domain.CouponRecord;
+import com.zhentao.system.domain.vo.CouponRecordVo;
+import com.zhentao.system.mapper.CouponMapper;
+import com.zhentao.system.service.CouponRecordService;
+import com.zhentao.system.mapper.CouponRecordMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+
+/**
+* @author Administrator
+* @description 针对表【coupon_record(优惠券领取记录表)】的数据库操作Service实现
+* @createDate 2025-02-14 13:30:53
+*/
+@Service
+public class CouponRecordServiceImpl extends ServiceImpl
+ implements CouponRecordService{
+
+
+ @Resource
+ private CouponRecordMapper couponRecordMapper;
+
+
+ @Resource
+ private CouponMapper couponMapper;
+
+ @Resource
+ private RemoteUserService remoteUserService;
+ /**
+ * 领取优惠券
+ * @param couponId 优惠券记录
+ * @return 操作结果
+ */
+ @Override
+ @Transactional(rollbackFor = Exception.class) // 添加事务管理
+ public AjaxResult addCouponRecord(Long couponId) {
+ Long userId = SecurityUtils.getUserId();
+// Long userId = couponRecord.getUserId();
+ Date now = new Date();
+ int quantity = 1; // 假设每次领取 1 张优惠券
+
+ // 查询优惠券信息
+ Coupon coupon = couponMapper.selectById(couponId);
+ if (coupon == null) {
+ return AjaxResult.error("优惠券不存在");
+ }
+
+ // 检查优惠券状态是否启用
+ if (!"ENABLED".equals(coupon.getStatus())) {
+ return AjaxResult.error("优惠券未启用");
+ }
+
+ // 检查优惠券是否在有效期内
+ if (now.before(coupon.getValidFrom()) || now.after(coupon.getValidTo())) {
+ return AjaxResult.error("优惠券不在有效期内");
+ }
+
+ // 检查优惠券是否还有剩余
+ if (coupon.getTotalQuantity() < quantity) {
+ return AjaxResult.error("优惠券已被领完");
+ }
+
+ // 检查用户领取数量是否超过限制
+ Integer userReceived = couponRecordMapper.countByUserIdAndCouponId(userId, couponId);
+ if (userReceived >= coupon.getPerUserLimit()) {
+ return AjaxResult.error("已超过每人领取限制");
+ }
+
+ // 更新优惠券的总数量和领取数量
+ int updated = couponMapper.decrementTotalQuantityAndIncrementReceivedQuantity(couponId, quantity);
+ if (updated == 0) {
+ return AjaxResult.error("领取失败,优惠券已被领完或超过限制");
+ }
+
+ CouponRecord couponRecord = new CouponRecord();
+
+ // 创建领取记录
+ createCouponRecord(couponRecord, coupon, now);
+
+ // 插入领取记录
+ couponRecordMapper.insert(couponRecord);
+
+ return AjaxResult.success("领取成功");
+ }
+
+ /**
+ * 查询优惠卷记录
+ * @param couponRecordVo
+ * @return
+ */
+ @Override
+ public AjaxResult ListCouponRecord(CouponRecordVo couponRecordVo) {
+ Page page = new Page<>(couponRecordVo.getPageNum(),couponRecordVo.getPageSize());
+ Page page1 = couponRecordMapper.selectPage(page, null);
+ page1.getRecords().forEach(bo->{
+ Long couponId = bo.getCouponId();
+ Coupon coupon1 = couponMapper.selectById(couponId);
+ bo.setCname(coupon1.getName());
+ Long userId = bo.getUserId();
+ R userInfoById = remoteUserService.getUserInfoById(userId);
+ if (R.FAIL == userInfoById.getCode())
+ {
+ throw new BaseException(userInfoById.getMsg());
+ }
+// System.err.println(userInfoById.getData()+"---------------");
+ if(!StringUtils.isNull(userInfoById.getData())) {
+ LoginUser loginUser = userInfoById.getData();
+ SysUser sysUser = loginUser.getSysUser();
+ bo.setUname(sysUser.getUserName());
+ }
+ });
+ return AjaxResult.success(page1);
+ }
+
+ /**
+ * 创建优惠券记录
+ * @param couponRecord 优惠券记录
+ * @param coupon 优惠券信息
+ * @param now 当前时间
+ */
+ private void createCouponRecord(CouponRecord couponRecord, Coupon coupon, Date now) {
+ couponRecord.setUserId(SecurityUtils.getUserId());// 设置用户ID
+ couponRecord.setCouponId(coupon.getId());
+ couponRecord.setStatus("UNUSED"); // 设置状态为未使用
+ couponRecord.setReceivedAt(now); // 设置领取时间
+ couponRecord.setExpiredAt(coupon.getValidTo()); // 设置过期时间
+ couponRecord.setCreatedAt(now); // 设置创建时间
+ couponRecord.setUpdatedAt(now); // 设置更新时间
+
+ // 如果是金额优惠券,设置优惠金额
+ if ("AMOUNT".equals(coupon.getType())) {
+ couponRecord.setAmountUsed(coupon.getValue());
+ }
+ }
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CouponServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CouponServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..386d667080d5522d551a683f0fa1ff820dbad6a5
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/CouponServiceImpl.java
@@ -0,0 +1,232 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.Coupon;
+import com.zhentao.system.domain.vo.CouponVo;
+import com.zhentao.system.domain.vo.CouponVos;
+import com.zhentao.system.service.CouponService;
+import com.zhentao.system.mapper.CouponMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+
+/**
+* @author Administrator
+* @description 针对表【coupon(优惠券表)】的数据库操作Service实现
+* @createDate 2025-02-14 13:30:53
+*/
+@Service
+public class CouponServiceImpl extends ServiceImpl
+ implements CouponService{
+
+ @Resource
+ private CouponMapper couponMapper;
+
+
+ /**
+ * 查询优惠卷
+ * @param couponVo
+ * @return
+ */
+ @Override
+ public AjaxResult ListCoupon(CouponVo couponVo) {
+ Page page = new Page<>(couponVo.getPageNum(), couponVo.getPageSize());
+
+ // 创建查询条件构造器
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+
+ // 根据优惠券名称模糊查询
+ queryWrapper.like(StringUtils.isNotEmpty(couponVo.getName()),
+ Coupon::getName, couponVo.getName());
+
+ // 根据优惠券类型查询 (AMOUNT-减免金额, DISCOUNT-折扣券, FREE-全免券, TIME-减时券)
+ queryWrapper.eq(StringUtils.isNotEmpty(couponVo.getType()),
+ Coupon::getType, couponVo.getType());
+
+ // 根据状态查询 (ENABLED-启用, DISABLED-禁用)
+ queryWrapper.eq(StringUtils.isNotEmpty(couponVo.getStatus()),
+ Coupon::getStatus, couponVo.getStatus());
+
+ // 根据有效期查询
+ if (couponVo.getDateRange() != null && !couponVo.getDateRange().isEmpty()) {
+ String[] dateRange = couponVo.getDateRange().split("至");
+ if (dateRange.length == 2) {
+ queryWrapper.ge(Coupon::getValidFrom, dateRange[0].trim())
+ .le(Coupon::getValidTo, dateRange[1].trim());
+ }
+ }
+
+ // 执行分页查询
+ Page couponPage = couponMapper.selectPage(page, queryWrapper);
+
+ return AjaxResult.success(couponPage);
+ }
+
+ /**
+ * 添加优惠券
+ * @param couponVos 优惠券信息
+ * @return AjaxResult
+ */
+ @Override
+ public AjaxResult addCoupon(CouponVos couponVos) {
+ // 参数校验
+ if (StringUtils.isBlank(couponVos.getName())) {
+ return AjaxResult.error("优惠券名称不能为空");
+ }
+ if (StringUtils.isBlank(couponVos.getType())) {
+ return AjaxResult.error("优惠券类型不能为空");
+ }
+ if (couponVos.getValue() == null) {
+ return AjaxResult.error("优惠券面值不能为空");
+ }
+ if (couponVos.getValidFrom() == null || couponVos.getValidTo() == null) {
+ return AjaxResult.error("优惠券有效期不能为空");
+ }
+ if (couponVos.getTotalQuantity() == null || couponVos.getTotalQuantity() <= 0) {
+ return AjaxResult.error("发放总量必须大于0");
+ }
+ if (couponVos.getPerUserLimit() == null || couponVos.getPerUserLimit() <= 0) {
+ return AjaxResult.error("每人限领数量必须大于0");
+ }
+
+ // 创建优惠券对象并设置属性
+ Coupon coupon = new Coupon();
+ coupon.setName(couponVos.getName());
+ coupon.setType(couponVos.getType());
+ coupon.setValue(couponVos.getValue());
+ coupon.setDescription(couponVos.getDescription());
+
+ // 设置有效期
+ coupon.setValidFrom(couponVos.getValidFrom());
+ coupon.setValidTo(couponVos.getValidTo());
+
+ coupon.setTotalQuantity(couponVos.getTotalQuantity());
+ coupon.setPerUserLimit(couponVos.getPerUserLimit());
+
+ // 设置默认值
+ coupon.setReceivedQuantity(0);
+ coupon.setStatus("ENABLED"); // 默认启用状态
+ coupon.setCreatorId(1L); // 这里应该设置为当前登录用户的ID
+ coupon.setCreatedAt(new Date());
+
+ // 保存优惠券
+ boolean success = save(coupon);
+
+ return success ? AjaxResult.success("优惠券创建成功") : AjaxResult.error("优惠券创建失败");
+ }
+
+ @Override
+ public AjaxResult stateCoupon(Coupon coupon) {
+ if (coupon == null || coupon.getId() == null) {
+ return AjaxResult.error("参数错误");
+ }
+
+ // 先查询当前优惠券
+ Coupon existCoupon = getById(coupon.getId());
+ if (existCoupon == null) {
+ return AjaxResult.error("优惠券不存在");
+ }
+
+ // 更新状态
+ Coupon updateCoupon = new Coupon();
+ updateCoupon.setId(coupon.getId());
+ updateCoupon.setUpdatedAt(new Date());
+
+ // 根据当前状态切换
+ if ("ENABLED".equals(existCoupon.getStatus())) {
+ updateCoupon.setStatus("DISABLED"); // 当前是启用,则改为禁用
+ } else {
+ updateCoupon.setStatus("ENABLED"); // 当前是禁用,则改为启用
+ }
+
+ boolean success = updateById(updateCoupon);
+ if (success) {
+ return AjaxResult.success("优惠券状态修改成功");
+ } else {
+ return AjaxResult.error("优惠券状态修改失败");
+ }
+ }
+
+ @Override
+ public AjaxResult updateCoupon(CouponVos couponVos) {
+ // 参数校验
+ if (couponVos.getId() == null) {
+ return AjaxResult.error("优惠券ID不能为空");
+ }
+ if (StringUtils.isBlank(couponVos.getName())) {
+ return AjaxResult.error("优惠券名称不能为空");
+ }
+ if (StringUtils.isBlank(couponVos.getType())) {
+ return AjaxResult.error("优惠券类型不能为空");
+ }
+ if (couponVos.getValue() == null) {
+ return AjaxResult.error("优惠券面值不能为空");
+ }
+ if (couponVos.getValidFrom() == null || couponVos.getValidTo() == null) {
+ return AjaxResult.error("优惠券有效期不能为空");
+ }
+ if (couponVos.getTotalQuantity() == null || couponVos.getTotalQuantity() <= 0) {
+ return AjaxResult.error("发放总量必须大于0");
+ }
+ if (couponVos.getPerUserLimit() == null || couponVos.getPerUserLimit() <= 0) {
+ return AjaxResult.error("每人限领数量必须大于0");
+ }
+
+ // 查询原有优惠券
+ Coupon existCoupon = getById(couponVos.getId());
+ if (existCoupon == null) {
+ return AjaxResult.error("优惠券不存在");
+ }
+
+ // 创建更新对象
+ Coupon updateCoupon = new Coupon();
+ updateCoupon.setId(couponVos.getId());
+ updateCoupon.setName(couponVos.getName());
+ updateCoupon.setType(couponVos.getType());
+ updateCoupon.setValue(couponVos.getValue());
+ updateCoupon.setDescription(couponVos.getDescription());
+ updateCoupon.setValidFrom(couponVos.getValidFrom());
+ updateCoupon.setValidTo(couponVos.getValidTo());
+ updateCoupon.setTotalQuantity(couponVos.getTotalQuantity());
+ updateCoupon.setPerUserLimit(couponVos.getPerUserLimit());
+ updateCoupon.setUpdatedAt(new Date());
+
+ // 执行更新操作
+ boolean success = updateById(updateCoupon);
+
+ return success ? AjaxResult.success("优惠券更新成功") : AjaxResult.error("优惠券更新失败");
+ }
+
+ /**
+ * app端查询优惠券
+ * @param coupon 包含查询条件的优惠券对象
+ * @return 优惠券列表
+ */
+ @Override
+ public AjaxResult appListCoupon(Coupon coupon) {
+ // 创建查询条件
+ LambdaQueryWrapper queryWrapper = Wrappers.lambdaQuery();
+ // 只查询启用状态的优惠券
+ queryWrapper.eq(Coupon::getStatus, "ENABLED");
+ // 按创建时间降序排序,最新的优惠券显示在前面
+ queryWrapper.orderByDesc(Coupon::getCreatedAt);
+
+ List coupons = couponMapper.selectList(queryWrapper);
+ return AjaxResult.success(coupons);
+ }
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/FeeRuleServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/FeeRuleServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..7bdec0574a5e127cbff11bd9f9664dc097de8505
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/FeeRuleServiceImpl.java
@@ -0,0 +1,93 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.system.domain.FeeRule;
+import com.zhentao.system.service.FeeRuleService;
+import com.zhentao.system.mapper.FeeRuleMapper;
+import com.zhentao.system.utils.HolidayUtil;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+* @author 31919
+* @descripti`on 针对表【fee_rule(收费规则表)】的数据库操作Service实现
+* @createDate 2025-02-11 13:41:38
+*/
+@Service
+@Component
+public class FeeRuleServiceImpl extends ServiceImpl
+ implements FeeRuleService{
+
+ // 基础费率(元/小时)
+ private static final BigDecimal BASE_RATE = new BigDecimal("2");
+ // 节假日倍率
+ private static final BigDecimal HOLIDAY_MULTIPLIER = new BigDecimal("1.3");
+ // 热点时间停车加收费(元/小时)
+ private static final BigDecimal SPOT_RATE = new BigDecimal("5");
+
+
+ @Resource
+ private FeeRuleMapper feeRuleMapper;
+
+
+
+ /**
+ * 计算停车费用
+ * @param feeRule 停车规则对象,包含开始时间、结束时间等信息
+ * @return 总费用(单位:元)
+ * @throws ParseException 如果日期解析失败
+ */
+ public BigDecimal calculateFeeRule(FeeRule feeRule) throws ParseException {
+ BigDecimal totalFee = BigDecimal.ZERO;
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+
+ // 计算停车时长(分钟)
+ long parkingMinutes = (feeRule.getEndTime().getTime() - feeRule.getStarterTime().getTime()) / (60 * 1000);
+
+ // 停车时间在15分钟内,免费
+ if (parkingMinutes <= 15) {
+ feeRule.setRuleStatus(1); // 设置规则状态为免费
+ return BigDecimal.ZERO;
+ }
+
+ // 计算停车小时数(不满1小时按1小时算)
+ int hours = (int) Math.ceil(parkingMinutes / 60.0);
+ totalFee = BigDecimal.valueOf(hours).multiply(BASE_RATE);
+
+ // 判断是否节假日
+ List datesBetween = HolidayUtil.getDatesBetween(feeRule.getStarterTime(), feeRule.getEndTime());
+ boolean isHoliday = datesBetween.stream().anyMatch(date -> {
+ try {
+ String dateStr = dateFormat.format(date);
+ return !HolidayUtil.isWorkingDay(dateStr).equals("0");
+ } catch (Exception e) {
+ throw new RuntimeException("日期解析失败", e);
+ }
+ });
+ if (isHoliday) {
+ feeRule.setHolidayStatus(1); // 设置节假日状态
+ totalFee = totalFee.multiply(HOLIDAY_MULTIPLIER); // 应用节假日费率
+ }
+
+ // 判断是否在热点时段
+ if (HolidayUtil.containsPeakHours(feeRule.getStarterTime(), feeRule.getEndTime())) {
+ feeRule.setHotspotStatus(1); // 设置热点时段状态
+ totalFee = totalFee.add(SPOT_RATE); // 增加热点时段附加费用
+ }
+
+ return totalFee;
+ }
+
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkAreaServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkAreaServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..f77662b418ea5ed15281d132813c68f3286e82f4
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkAreaServiceImpl.java
@@ -0,0 +1,22 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.system.domain.ParkArea;
+import com.zhentao.system.service.ParkAreaService;
+import com.zhentao.system.mapper.ParkAreaMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author Administrator
+* @description 针对表【park_area(区域表 - 用于管理行政区划层级结构)】的数据库操作Service实现
+* @createDate 2025-02-11 14:47:01
+*/
+@Service
+public class ParkAreaServiceImpl extends ServiceImpl
+ implements ParkAreaService{
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkLaneServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkLaneServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..36410681a47a5ad23fc19c8b27ee4fe3111e1a53
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkLaneServiceImpl.java
@@ -0,0 +1,146 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.ParkLane;
+import com.zhentao.system.domain.ParkLot;
+import com.zhentao.system.domain.vo.ParkLaneVo;
+import com.zhentao.system.mapper.ParkLotMapper;
+import com.zhentao.system.service.ParkLaneService;
+import com.zhentao.system.mapper.ParkLaneMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+
+/**
+* @author Administrator
+* @description 针对表【park_lane(车道表 - 用于管理停车场出入口车道及二维码)】的数据库操作Service实现
+* @createDate 2025-02-11 14:47:01
+*/
+@Service
+public class ParkLaneServiceImpl extends ServiceImpl
+ implements ParkLaneService{
+
+ @Resource
+ private ParkLaneMapper parkLaneMapper;
+
+ @Resource
+ private ParkLotMapper parkLotMapper;
+
+ /**
+ * 新增车道
+ * @param parkLane
+ * @return
+ */
+ @Override
+ public AjaxResult addLane(ParkLane parkLane) {
+ ParkLane parkLane1 = new ParkLane();
+ parkLane1.setLaneName(parkLane.getLaneName());
+ parkLane1.setLaneType(parkLane.getLaneType());
+ parkLane1.setLaneCode(parkLane.getLaneCode());
+ parkLane1.setLotId(parkLane.getLotId());
+ parkLane1.setStatus(parkLane.getStatus());
+ parkLane1.setCreateBy("admin");
+ parkLane1.setCreateTime(new Date());
+ int insert = parkLaneMapper.insert(parkLane1);
+
+ if (insert > 0) {
+ return AjaxResult.success("车道新增成功");
+ }else {
+ return AjaxResult.error("车道新增失败");
+ }
+ }
+
+ /**
+ * 编辑车道
+ * @param parkLane
+ * @return
+ */
+ @Override
+ public AjaxResult updateLane(ParkLane parkLane) {
+ ParkLane existingLane = parkLaneMapper.selectById(parkLane.getLaneId());
+ if (existingLane == null) {
+ return AjaxResult.error("车道不存在");
+ }
+
+ // Update fields
+ existingLane.setLaneName(parkLane.getLaneName());
+ existingLane.setLaneType(parkLane.getLaneType());
+ existingLane.setLaneCode(parkLane.getLaneCode());
+ existingLane.setLotId(parkLane.getLotId());
+ existingLane.setStatus(parkLane.getStatus());
+ existingLane.setUpdateBy("admin");
+ existingLane.setUpdateTime(new Date());
+
+ int update = parkLaneMapper.updateById(existingLane);
+ if (update > 0) {
+ return AjaxResult.success("车道修改成功");
+ } else {
+ return AjaxResult.error("车道修改失败");
+ }
+ }
+
+ /**
+ * 查询车道
+ * @param parkLaneVo
+ * @return
+ */
+ @Override
+ public AjaxResult ListLane(ParkLaneVo parkLaneVo) {
+ // 创建分页对象
+ Page page = new Page<>(parkLaneVo.getPageNum(), parkLaneVo.getPageSize());
+
+ // 构建查询条件
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+
+ // 根据车道名称模糊查询
+ if (StringUtils.isNotBlank(parkLaneVo.getLaneName())) {
+ queryWrapper.like(ParkLane::getLaneName, parkLaneVo.getLaneName());
+ }
+
+ // 根据停车场ID查询
+ if (parkLaneVo.getLotId() != null) {
+ queryWrapper.eq(ParkLane::getLotId, parkLaneVo.getLotId());
+
+ }
+
+ // 执行分页查询
+ Page parkLanePage = parkLaneMapper.selectPage(page, queryWrapper);
+ parkLanePage.getRecords().forEach(parkLane -> {
+ ParkLot parkLot = parkLotMapper.selectById(parkLane.getLotId());
+
+ parkLane.setLotName(parkLot.getLotName());
+ });
+ return AjaxResult.success(parkLanePage);
+ }
+
+ /**
+ * 生成二维码并且绑定
+ * @param parkLane
+ * @return
+ */
+ @Override
+ public AjaxResult generateQrCode(ParkLane parkLane) {
+
+ ParkLane parkLane1 = parkLaneMapper.selectById(parkLane.getLaneId());
+ if (parkLane1 == null){
+ return AjaxResult.error("车道不存在");
+ }
+ parkLane1.setQrCode(parkLane.getQrCode());
+ int update = parkLaneMapper.updateById(parkLane1);
+ if (update > 0){
+ return AjaxResult.success("二维码生成成功");
+ }else {
+ return AjaxResult.error("二维码生成失败");
+ }
+ }
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkLotServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkLotServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..b37c7d4408922c7e7d182e883ab05f3a1c97faf3
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkLotServiceImpl.java
@@ -0,0 +1,91 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.ParkLot;
+import com.zhentao.system.service.ParkLotService;
+import com.zhentao.system.mapper.ParkLotMapper;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+* @author Administrator
+* @description 针对表【park_lot(停车场表 - 用于管理停车场基础信息及实时状态)】的数据库操作Service实现
+* @createDate 2025-02-11 14:47:01
+*/
+@Service
+public class ParkLotServiceImpl extends ServiceImpl
+ implements ParkLotService{
+
+ @Resource
+ private ParkLotMapper parkLotMapper;
+
+ /**
+ * 查询停车场列表
+ * @return
+ */
+ @Override
+ public AjaxResult ListLot() {
+ List parkLots = parkLotMapper.selectList(null);
+
+ return AjaxResult.success(parkLots);
+ }
+
+ /**
+ * 新增停车场
+ * @param parkLot
+ * @return
+ */
+ @Override
+ public AjaxResult addLot(ParkLot parkLot) {
+
+ ParkLot parkLot1 = new ParkLot();
+ parkLot1.setLotName(parkLot.getLotName());
+ parkLot1.setLotType(parkLot.getLotType());
+ parkLot1.setLotCode(parkLot.getLotCode());
+ parkLot1.setTotalSpots(parkLot.getTotalSpots());
+ parkLot1.setAddress(parkLot.getAddress());
+ boolean save = this.save(parkLot1);
+ return save ? AjaxResult.success("新增停车场成功") : AjaxResult.error("新增停车场失败");
+ }
+
+ /**
+ * 修改停车场
+ * @param parkLot
+ * @return
+ */
+ @Override
+ @Transactional
+ public AjaxResult updateLot(ParkLot parkLot) {
+ ParkLot parkLot1 = new ParkLot();
+ parkLot1.setLotName(parkLot.getLotName());
+ parkLot1.setLotType(parkLot.getLotType());
+ parkLot1.setLotCode(parkLot.getLotCode());
+ parkLot1.setTotalSpots(parkLot.getTotalSpots());
+ parkLot1.setAddress(parkLot.getAddress());
+ int i = parkLotMapper.updateLot(parkLot1);
+ if (i>0){
+ return AjaxResult.success("修改停车场成功");
+ }else {
+ return AjaxResult.error("修改停车场失败");
+ }
+ }
+
+ /**
+ * 删除停车场
+ * @param parkLot
+ * @return
+ */
+ @Override
+ public AjaxResult deleteLot(ParkLot parkLot) {
+ boolean b = this.removeById(parkLot.getLotId());
+ return b ? AjaxResult.success("删除停车场成功") : AjaxResult.error("删除停车场失败");
+ }
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkPaymentConfigServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkPaymentConfigServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..57249b555220b175cfe0641e18f7b7ace85a8067
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkPaymentConfigServiceImpl.java
@@ -0,0 +1,106 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.ParkPaymentConfig;
+import com.zhentao.system.domain.vo.ParkPaymentConfigVo;
+import com.zhentao.system.service.ParkPaymentConfigService;
+import com.zhentao.system.mapper.ParkPaymentConfigMapper;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+/**
+* @author Administrator
+* @description 针对表【park_payment_config(无感支付配置表 - 用于管理各停车场支付渠道配置)】的数据库操作Service实现
+* @createDate 2025-02-11 14:47:01
+*/
+@Service
+public class ParkPaymentConfigServiceImpl extends ServiceImpl
+ implements ParkPaymentConfigService{
+
+ @Resource
+ public ParkPaymentConfigMapper parkPaymentConfigMapper;
+
+ /**
+ * 查询无感支付配置
+ * @param paymentConfigVo
+ * @return
+ */
+ @Override
+ public AjaxResult ListPaymentConfig(ParkPaymentConfigVo paymentConfigVo) {
+ Page page = new Page<>(paymentConfigVo.getPageNum(),paymentConfigVo.getPageSize());
+ Page page1 = this.page(page);
+ return AjaxResult.success(page1);
+ }
+
+ /**
+ * 添加无感支付配置
+ * @param paymentConfig
+ * @return
+ */
+ @Override
+ public AjaxResult addPaymentConfig(ParkPaymentConfig paymentConfig) {
+ // 验证该停车场是否已存在相同支付类型的配置
+ Long count = lambdaQuery()
+ .eq(ParkPaymentConfig::getLotId, paymentConfig.getLotId())
+ .eq(ParkPaymentConfig::getPayType, paymentConfig.getPayType())
+ .count();
+ if (count > 0) {
+ return AjaxResult.error("该停车场已存在相同支付类型的配置");
+ }
+
+ boolean success = save(paymentConfig);
+ return success ? AjaxResult.success() : AjaxResult.error("添加失败");
+ }
+
+ /**
+ * 修改无感支付配置
+ * @param paymentConfig
+ * @return
+ */
+ @Override
+ public AjaxResult updatePaymentConfig(ParkPaymentConfig paymentConfig) {
+ // 验证是否存在
+ ParkPaymentConfig existing = getById(paymentConfig.getConfigId());
+ if (existing == null) {
+ return AjaxResult.error("配置不存在");
+ }
+
+ // 如果修改了停车场或支付类型,需要检查是否存在重复配置
+ if (!existing.getLotId().equals(paymentConfig.getLotId()) ||
+ !existing.getPayType().equals(paymentConfig.getPayType())) {
+ Long count = lambdaQuery()
+ .eq(ParkPaymentConfig::getLotId, paymentConfig.getLotId())
+ .eq(ParkPaymentConfig::getPayType, paymentConfig.getPayType())
+ .ne(ParkPaymentConfig::getConfigId, paymentConfig.getConfigId())
+ .count();
+ if (count > 0) {
+ return AjaxResult.error("该停车场已存在相同支付类型的配置");
+ }
+ }
+
+ boolean success = updateById(paymentConfig);
+ return success ? AjaxResult.success() : AjaxResult.error("修改失败");
+ }
+
+ /**
+ * 删除无感支付配置
+ * @param paymentConfig
+ * @return
+ */
+ @Override
+ public AjaxResult deletePaymentConfig(ParkPaymentConfig paymentConfig) {
+ if (paymentConfig.getConfigId() == null) {
+ return AjaxResult.error("参数错误");
+ }
+
+ boolean success = removeById(paymentConfig.getConfigId());
+ return success ? AjaxResult.success() : AjaxResult.error("删除失败");
+ }
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkRoadServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkRoadServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..8cc107eb1b6651be40eab57135646a7319d70eea
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkRoadServiceImpl.java
@@ -0,0 +1,22 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.system.domain.ParkRoad;
+import com.zhentao.system.service.ParkRoadService;
+import com.zhentao.system.mapper.ParkRoadMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author Administrator
+* @description 针对表【park_road(道路表 - 用于管理道路基础信息)】的数据库操作Service实现
+* @createDate 2025-02-11 14:47:01
+*/
+@Service
+public class ParkRoadServiceImpl extends ServiceImpl
+ implements ParkRoadService{
+
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkSpotServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkSpotServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..c886c31c58ed03a3b72d9e00f5e08a8d609998b9
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/ParkSpotServiceImpl.java
@@ -0,0 +1,167 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.common.core.web.domain.AjaxResult;
+import com.zhentao.system.domain.ParkLot;
+import com.zhentao.system.domain.ParkSpot;
+import com.zhentao.system.domain.vo.ParkSpotVo;
+import com.zhentao.system.mapper.ParkLotMapper;
+import com.zhentao.system.service.ParkSpotService;
+import com.zhentao.system.mapper.ParkSpotMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+
+/**
+* @author Administrator
+* @description 针对表【park_spot(泊位表 - 用于管理停车位信息及使用状态)】的数据库操作Service实现
+* @createDate 2025-02-11 14:47:01
+*/
+@Service
+public class ParkSpotServiceImpl extends ServiceImpl
+ implements ParkSpotService{
+ @Autowired
+ private ParkSpotMapper parkSpotMapper;
+
+ @Autowired
+ private ParkLotMapper parkLotMapper;
+
+ /**
+ * 查询泊位信息
+ * @param parkSpotVo
+ * @return
+ */
+ @Override
+ public AjaxResult parkSpotList(ParkSpotVo parkSpotVo) {
+ // 创建分页对象
+ Page page = new Page<>(parkSpotVo.getPageNum(), parkSpotVo.getPageSize());
+
+ // 构建查询条件
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+
+ // 根据停车场ID查询
+ if (parkSpotVo.getLotId() != null) {
+ queryWrapper.eq(ParkSpot::getLotId, parkSpotVo.getLotId());
+ }
+
+ // 根据泊位编号模糊查询
+ if (StringUtils.isNotBlank(parkSpotVo.getSpotCode())) {
+ queryWrapper.like(ParkSpot::getSpotCode, parkSpotVo.getSpotCode());
+ }
+
+ // 根据泊位类型精确查询
+ if (StringUtils.isNotBlank(parkSpotVo.getSpotType())) {
+ queryWrapper.eq(ParkSpot::getSpotType, parkSpotVo.getSpotType());
+ }
+
+ // 只查询未删除的记录
+ queryWrapper.eq(ParkSpot::getDelFlag, "0");
+
+ // 按创建时间降序排序
+ queryWrapper.orderByDesc(ParkSpot::getCreateTime);
+
+ // 执行分页查询
+ Page parkSpotPage = parkSpotMapper.selectPage(page, queryWrapper);
+ parkSpotPage.getRecords().forEach(bo->{
+ Long lotId = bo.getLotId();
+ ParkLot parkLot = parkLotMapper.selectById(lotId);
+ bo.setLotName(parkLot.getLotName());
+ });
+ return AjaxResult.success(parkSpotPage);
+ }
+
+ /**
+ * 添加泊位信息
+ * @param parkSpot
+ * @return
+ */
+ @Override
+ public AjaxResult addParkSpot(ParkSpot parkSpot) {
+ // 参数校验
+ if (StringUtils.isBlank(parkSpot.getSpotCode())) {
+ return AjaxResult.error("泊位编号不能为空");
+ }
+ if (StringUtils.isBlank(parkSpot.getSpotType())) {
+ return AjaxResult.error("泊位类型不能为空");
+ }
+
+ // 检查泊位编号是否已存在
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(ParkSpot::getSpotCode, parkSpot.getSpotCode())
+ .eq(ParkSpot::getDelFlag, "0");
+ if (parkSpotMapper.selectCount(queryWrapper) > 0) {
+ return AjaxResult.error("泊位编号已存在");
+ }
+
+ // 设置默认值
+ parkSpot.setDelFlag("0"); // 未删除
+ if (parkSpot.getStatus() == null) {
+ parkSpot.setStatus("1"); // 默认正常状态
+ }
+ parkSpot.setCreateBy("admin");
+ parkSpot.setCreateTime(new Date());
+ // 保存泊位信息
+ int rows = parkSpotMapper.insert(parkSpot);
+ return rows > 0 ? AjaxResult.success("添加成功") : AjaxResult.error("添加失败");
+ }
+
+ /**
+ * 修改泊位信息
+ * @param parkSpot
+ * @return
+ */
+ @Override
+ public AjaxResult updateParkSpot(ParkSpot parkSpot) {
+ // 参数校验
+ if (parkSpot.getSpotId() == null) {
+ return AjaxResult.error("泊位ID不能为空");
+ }
+ if (StringUtils.isBlank(parkSpot.getSpotCode())) {
+ return AjaxResult.error("泊位编号不能为空");
+ }
+ if (StringUtils.isBlank(parkSpot.getSpotType())) {
+ return AjaxResult.error("泊位类型不能为空");
+ }
+
+ // 检查泊位编号是否与其他泊位重复
+ LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>();
+ queryWrapper.eq(ParkSpot::getSpotCode, parkSpot.getSpotCode())
+ .eq(ParkSpot::getDelFlag, "0")
+ .ne(ParkSpot::getSpotId, parkSpot.getSpotId()); // 排除当前记录
+ if (parkSpotMapper.selectCount(queryWrapper) > 0) {
+ return AjaxResult.error("泊位编号已存在");
+ }
+ parkSpot.setUpdateBy("admin");
+ parkSpot.setUpdateTime(new Date());
+ // 更新泊位信息
+ int rows = parkSpotMapper.updateById(parkSpot);
+ return rows > 0 ? AjaxResult.success("修改成功") : AjaxResult.error("修改失败");
+ }
+
+ /**
+ * 删除泊位信息
+ * @param parkSpot
+ * @return
+ */
+ @Override
+ public AjaxResult deleteParkSpot(ParkSpot parkSpot) {
+ if (parkSpot.getSpotId() != null) {
+ parkSpot.setDelFlag("1"); // 删除标记
+ parkSpot.setUpdateBy("admin");
+ parkSpot.setUpdateTime(new Date());
+ int rows = parkSpotMapper.updateById(parkSpot);
+ return rows > 0 ? AjaxResult.success("删除成功") : AjaxResult.error("删除失败");
+ }else {
+ return AjaxResult.error("泊位ID不能为空");
+ }
+ }
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/SysCarouselServiceImpl.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/SysCarouselServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..bdb4683fba50a97c29da92061cc6a7a5f7a4baeb
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/service/impl/SysCarouselServiceImpl.java
@@ -0,0 +1,62 @@
+package com.zhentao.system.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zhentao.common.core.utils.DateUtils;
+import com.zhentao.common.core.utils.SecurityUtils;
+import com.zhentao.system.domain.SysCarousel;
+import com.zhentao.system.service.SysCarouselService;
+import com.zhentao.system.mapper.SysCarouselMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+* @author 17074
+* @description 针对表【sys_carousel(轮播图管理表)】的数据库操作Service实现
+* @createDate 2025-02-13 13:57:32
+*/
+@Service
+public class SysCarouselServiceImpl extends ServiceImpl
+ implements SysCarouselService{
+ @Autowired
+ private SysCarouselMapper carouselMapper;
+
+ @Override
+ public List selectCarouselList(SysCarousel carousel) {
+ return carouselMapper.selectCarouselList(carousel);
+ }
+
+ @Override
+ public SysCarousel selectCarouselById(Long carouselId) {
+ return carouselMapper.selectCarouselById(carouselId);
+ }
+
+ @Override
+ public int insertCarousel(SysCarousel carousel) {
+ carousel.setCreateBy(SecurityUtils.getUsername());
+ carousel.setCreateTime(DateUtils.getNowDate());
+ return carouselMapper.insertCarousel(carousel);
+ }
+
+ @Override
+ public int updateCarousel(SysCarousel carousel) {
+ carousel.setUpdateBy(SecurityUtils.getUsername());
+ carousel.setUpdateTime(DateUtils.getNowDate());
+ return carouselMapper.updateCarousel(carousel);
+ }
+
+ @Override
+ public int deleteCarouselByIds(Long[] carouselIds) {
+ return carouselMapper.deleteCarouselByIds(carouselIds);
+ }
+
+ @Override
+ public int changeStatus(SysCarousel carousel) {
+ return carouselMapper.updateCarousel(carousel);
+ }
+}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/utils/DateUtil.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/utils/DateUtil.java
new file mode 100644
index 0000000000000000000000000000000000000000..7120cd52647825c16fd4f765ff5ad6cdb0e740f4
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/utils/DateUtil.java
@@ -0,0 +1,1339 @@
+package com.zhentao.system.utils;
+
+import com.zhentao.common.core.utils.DateUtils;
+
+import java.text.DateFormat;
+import java.text.DecimalFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * 日期工具
+ */
+public class DateUtil {
+ /**
+ * 输出当天的时间,格式如:20151207
+ *
+ * @return
+ */
+ public static String today() {
+ SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
+ return format.format(new Date());
+ }
+
+ /**
+ * 当前时间
+ * @return
+ */
+ public static String currTime() {
+ SimpleDateFormat sdfDetail = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ Date date = new Date();
+ return sdfDetail.format(date);
+ }
+
+ /**
+ * 当前年
+ * @return
+ */
+ public static String currYear() {
+ SimpleDateFormat sdfDetail = new SimpleDateFormat("yyyy");
+ Date date = new Date();
+ return sdfDetail.format(date);
+ }
+
+ public static String format(Date date, String tpl) {
+ SimpleDateFormat format = new SimpleDateFormat(tpl);
+ return format.format(date);
+ }
+
+ /**
+ * 任意一天的开始时间
+ *
+ * @return date
+ */
+ public static Date startOfDay(Date date) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ calendar.set(Calendar.HOUR_OF_DAY, 0);
+ calendar.set(Calendar.MINUTE, 0);
+ calendar.set(Calendar.SECOND, 0);
+ calendar.set(Calendar.MILLISECOND, 0);
+ Date returnDate = calendar.getTime();
+ return returnDate;
+ }
+
+ /**
+ * 任意一天的结束时间
+ *
+ * @return date
+ */
+ public static Date endOfDay(Date date) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ calendar.set(Calendar.HOUR_OF_DAY, 23);
+ calendar.set(Calendar.MINUTE, 59);
+ calendar.set(Calendar.SECOND, 59);
+ calendar.set(Calendar.MILLISECOND, 999);
+ Date returnDate = calendar.getTime();
+ return returnDate;
+ }
+
+ /**
+ * 获取时间戳的开始时间
+ * @param timestamp
+ */
+ public static Long startOfDayByTimestamp(Long timestamp) {
+ Date date = new Date(timestamp);
+ return startOfDay(date).getTime();
+ }
+
+ /**
+ * 获取时间戳的结束时间
+ * zg
+ * @param timestamp
+ */
+ public static Long endOfDayByTimestamp(Long timestamp) {
+ Date date = new Date(timestamp);
+ return endOfDay(date).getTime();
+ }
+
+ /**
+ * 当天的开始时间
+ *
+ * @return
+ */
+ public static Date startOfTodDay() {
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(Calendar.HOUR_OF_DAY, 0);
+ calendar.set(Calendar.MINUTE, 0);
+ calendar.set(Calendar.SECOND, 0);
+ calendar.set(Calendar.MILLISECOND, 0);
+ Date date = calendar.getTime();
+ return date;
+ }
+
+ /**
+ * 当天的结束时间
+ *
+ * @return
+ */
+ public static Date endOfTodDay() {
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(Calendar.HOUR_OF_DAY, 23);
+ calendar.set(Calendar.MINUTE, 59);
+ calendar.set(Calendar.SECOND, 59);
+ calendar.set(Calendar.MILLISECOND, 999);
+ Date date = calendar.getTime();
+ return date;
+ }
+
+ /**
+ * 昨天的开始时间
+ *
+ * @return
+ */
+ public static Date startOfyesterday() {
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(Calendar.HOUR_OF_DAY, 0);
+ calendar.set(Calendar.MINUTE, 0);
+ calendar.set(Calendar.SECOND, 0);
+ calendar.add(Calendar.DATE, -1);
+ calendar.set(Calendar.MILLISECOND, 0);
+ Date date = calendar.getTime();
+ return date;
+ }
+
+ /**
+ * 昨天的结束时间
+ *
+ * @return
+ */
+ public static Date endOfyesterday() {
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(Calendar.HOUR_OF_DAY, 23);
+ calendar.set(Calendar.MINUTE, 59);
+ calendar.set(Calendar.SECOND, 59);
+ calendar.set(Calendar.MILLISECOND, 999);
+ calendar.add(Calendar.DATE, -1);
+ Date date = calendar.getTime();
+ return date;
+ }
+
+ /**
+ * 功能:获取本周的开始时间 示例:2013-05-13 00:00:00
+ */
+ public static Date startOfThisWeek() {// 当周开始时间
+ Calendar currentDate = Calendar.getInstance();
+ currentDate.setFirstDayOfWeek(Calendar.MONDAY);
+ currentDate.set(Calendar.HOUR_OF_DAY, 0);
+ currentDate.set(Calendar.MINUTE, 0);
+ currentDate.set(Calendar.SECOND, 0);
+ currentDate.set(Calendar.MILLISECOND, 0);
+ currentDate.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
+ Date date = currentDate.getTime();
+ return date;
+ }
+
+ /**
+ * 功能:获取String日期对应的时间戳
+ * format 格式自定
+ *
+ * @return
+ */
+ public static Long formatStringToStamp(String base, String format) {
+ DateFormat df = new SimpleDateFormat(format);
+ Date baseTime;
+ Long stamp = null;
+ try {
+ baseTime = df.parse(base);
+ stamp = baseTime.getTime();
+ } catch (Exception e) {
+ return null;
+ }
+ return stamp;
+ }
+
+ /**
+ * 功能:获取String日期对应的时间
+ * isTotal = false ;yyyy-MM-dd格式限定
+ * isTotal = true ;yyyy-MM-dd hh-mm-ss格式限定
+ */
+ public static Date formatStringToDate(String base, Boolean isTotal) {
+ String format = isTotal ? "yyyy-MM-dd hh-mm-ss" : "yyyy-MM-dd";
+ DateFormat df = new SimpleDateFormat(format);
+ Date baseTime;
+ try {
+ baseTime = df.parse(base);
+ } catch (Exception e) {
+ return null;
+ }
+ return baseTime;
+ }
+
+ /**
+ * 功能:获取本周的结束时间 示例:2013-05-19 23:59:59
+ */
+ public static Date endOfThisWeek() {// 当周结束时间
+ Calendar currentDate = Calendar.getInstance();
+ currentDate.setFirstDayOfWeek(Calendar.MONDAY);
+ currentDate.set(Calendar.HOUR_OF_DAY, 23);
+ currentDate.set(Calendar.MINUTE, 59);
+ currentDate.set(Calendar.SECOND, 59);
+ currentDate.set(Calendar.MILLISECOND, 999);
+ currentDate.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
+ Date date = currentDate.getTime();
+ return date;
+ }
+
+ /**
+ * 功能:获取本月的开始时间
+ */
+ public static Date startOfThisMonth() {// 当周开始时间
+ Calendar currentDate = Calendar.getInstance();
+ currentDate.set(Calendar.HOUR_OF_DAY, 0);
+ currentDate.set(Calendar.MINUTE, 0);
+ currentDate.set(Calendar.SECOND, 0);
+ currentDate.set(Calendar.MILLISECOND, 0);
+ currentDate.set(Calendar.DAY_OF_MONTH, 1);
+ Date date = currentDate.getTime();
+ return date;
+ }
+
+ public static Date endOfThisMonth() {
+ Calendar cal = Calendar.getInstance();
+ cal.set(Calendar.DAY_OF_MONTH, 1);
+ cal.set(Calendar.HOUR_OF_DAY, 23);
+ cal.set(Calendar.MINUTE, 59);
+ cal.set(Calendar.SECOND, 59);
+ cal.set(Calendar.MILLISECOND, 999);
+ cal.add(Calendar.MONTH, 1);
+ cal.add(Calendar.DATE, -1);
+ Date date = cal.getTime();
+ return date;
+ }
+
+ /**
+ * 功能:获取上月的开始时间
+ */
+ public static Date startOfLastMonth() {// 当周开始时间
+ Calendar currentDate = Calendar.getInstance();
+ currentDate.set(Calendar.HOUR_OF_DAY, 0);
+ currentDate.set(Calendar.MINUTE, 0);
+ currentDate.set(Calendar.SECOND, 0);
+ currentDate.set(Calendar.MILLISECOND, 0);
+ currentDate.set(Calendar.DAY_OF_MONTH, 1);
+ currentDate.add(Calendar.MONTH, -1);
+ Date date = currentDate.getTime();
+ return date;
+ }
+
+ /**
+ * 功能:获取上月的结束时间
+ */
+ public static Date endOfLastMonth() {
+ Calendar cal = Calendar.getInstance();
+ cal.set(Calendar.DAY_OF_MONTH, 1);
+ cal.set(Calendar.HOUR_OF_DAY, 23);
+ cal.set(Calendar.MINUTE, 59);
+ cal.set(Calendar.SECOND, 59);
+ cal.set(Calendar.MILLISECOND, 999);
+ cal.add(Calendar.DATE, -1);
+ Date date = cal.getTime();
+ return date;
+ }
+
+ private static final int[] DAY_OF_MONTH = new int[]{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
+
+ public static final String[] DATE_FORMATS = new String[]{"yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM-dd",
+ "yyyy-MM", "yyyy-MM-dd HH:mm:ss.S", "yyyy年MM月dd日", "yyyy年MM月dd日 HH:mm", "yyyyMMdd", "yyyy年MM月dd日 HH:mm:ss",
+ "MM.dd"};
+
+ /**
+ * 将传入的日期转化为"yyyy-MM-dd"形式的字符串
+ *
+ * @param dt 日期
+ * @return 指定日期格式的字符串
+ */
+ public static String formatDate(Date dt) {
+
+ return formatDate("yyyy-MM-dd", dt);
+ }
+
+ /**
+ * 将传入的日期转化为"yyyy-MM-dd HH:mm:ss"形式的字符串
+ *
+ * @param dt 日期
+ * @return 指定日期格式的字符串
+ */
+ public static String formatDateYMDHMS(Date dt) {
+
+ return formatDate("yyyy-MM-dd HH:mm:ss", dt);
+ }
+
+ /**
+ * 将传入的日期转化为"yyyy-MM-dd HH:mm"形式的字符串
+ *
+ * @param dt 日期
+ * @return 指定日期格式的字符串
+ */
+ public static String formatDateYMDHM(Date dt) {
+
+ return formatDate("yyyy-MM-dd HH:mm", dt);
+ }
+
+ /**
+ * 将传入的日期以指定格式转成字符串
+ *
+ * @param format
+ * @param dt
+ * @return
+ */
+ public static String formatDate(String format, Date dt) {
+ if (dt == null) {
+ return "";
+ }
+ if (format.isEmpty()) {
+ format = "yyyy-MM-dd";
+ }
+
+ SimpleDateFormat fmt = new SimpleDateFormat(format);
+ return fmt.format(dt);
+ }
+
+ /**
+ * 将日期字符串转为日期
+ *
+ * @param dateStr 日期字符串
+ * @return
+ */
+ public static Date parseDate(String dateStr) {
+
+ return parseDate(dateStr, DATE_FORMATS);
+ }
+
+ /**
+ * 将日期字符串转为指定格式的日期
+ *
+ * @param dateStr 日期字符串
+ * @param format 日期格式
+ * @return
+ */
+ public static Date parseDate(String dateStr, String format) {
+
+ return parseDate(dateStr, new String[]{format});
+ }
+
+ private static Date parseDate(String dateStr, String[] parsePatterns) {
+
+ try {
+ return DateUtils.parseDate(dateStr, parsePatterns);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ /**
+ * 获取今天的日期
+ *
+ * @return
+ */
+ public static Date getToday() {
+ Calendar cal = Calendar.getInstance();
+ cal.set(Calendar.HOUR_OF_DAY, 0);
+ cal.set(Calendar.MINUTE, 0);
+ cal.set(Calendar.SECOND, 0);
+ cal.set(Calendar.MILLISECOND, 0);
+
+ return cal.getTime();
+ }
+
+ /**
+ * 得到传入日期n天后的日期,如果传入日期为null,则表示当前日期n天后的日期
+ *
+ * @param dt 日期
+ * @param days 可以为任何整数,负数表示前days天,正数表示后days天
+ * @return Date
+ */
+ public static Date getAddDayDate(Date dt, int days) {
+ Calendar cal = Calendar.getInstance();
+ if (dt != null) {
+ cal.setTime(dt);
+ }
+ cal.add(Calendar.DAY_OF_MONTH, days);
+ return cal.getTime();
+ }
+
+ /**
+ * 得到当前日期几天后(plusDays>0)or 几天前(plusDays<0)的指定格式的字符串日期
+ *
+ * @param
+ * @param plusDays
+ * @param dateFormat
+ * @return
+ */
+ public static String getAddDayDateFromToday(int plusDays, String dateFormat) {
+ Calendar cal = Calendar.getInstance();
+
+ cal.add(Calendar.DAY_OF_MONTH, plusDays);
+
+ return formatDate(dateFormat, cal.getTime());
+ }
+
+ /**
+ * 给定的时间再加上指定小时数,如果传入日期为null,能以当前时间计算
+ *
+ * @param dt
+ * @param hours
+ * @return
+ * @author Alex Zhang
+ */
+ public static Date getAddHourDate(Date dt, int hours) {
+
+ if (dt == null)
+ dt = new Date(System.currentTimeMillis());
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(dt);
+ cal.add(Calendar.HOUR, hours);
+
+ return cal.getTime();
+ }
+
+ /**
+ * 给定的时间再加上指定分钟数
+ *
+ * @param dt
+ * @param minutes
+ * @return
+ */
+ public static Date getAddMinuteDate(Date dt, int minutes) {
+ if (dt == null)
+ dt = new Date(System.currentTimeMillis());
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(dt);
+ cal.add(Calendar.MINUTE, minutes);
+
+ return cal.getTime();
+ }
+
+ /**
+ * 给定的时间再加上指定月份数
+ *
+ * @param dt
+ * @param months
+ * @return
+ */
+ public static Date getAddMonthDate(Date dt, int months) {
+
+ if (dt == null)
+ dt = new Date(System.currentTimeMillis());
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(dt);
+ cal.add(Calendar.MONTH, months);
+
+ return cal.getTime();
+ }
+
+ /**
+ * 给定的时间再加上指定年
+ * @param dt
+ * @param year
+ * @return
+ */
+ public static Date getAddYearDate(Date dt, int year) {
+
+ if (dt == null)
+ dt = new Date(System.currentTimeMillis());
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(dt);
+ cal.add(Calendar.YEAR, year);
+
+ return cal.getTime();
+ }
+
+ /**
+ * 获得某天的零点时刻0:0:0
+ *
+ * @param date 日期
+ * @return
+ */
+ public static Date getDayBegin(Date date) {
+
+ if (date == null)
+ return null;
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ cal.set(Calendar.HOUR_OF_DAY, 0);
+ cal.set(Calendar.MINUTE, 0);
+ cal.set(Calendar.SECOND, 0);
+ cal.set(Calendar.MILLISECOND, 0);
+ return cal.getTime();
+ }
+
+ /**
+ * 获得某天的截至时刻23:59:59
+ *
+ * @param date
+ * @return
+ */
+ public static Date getDayEnd(Date date) {
+
+ if (date == null)
+ return null;
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ cal.set(Calendar.HOUR_OF_DAY, 23);
+ cal.set(Calendar.MINUTE, 59);
+ cal.set(Calendar.SECOND, 59);
+ cal.set(Calendar.MILLISECOND, 999);
+ return cal.getTime();
+ }
+
+ /**
+ * 某月的起始时间,eg:param:2011-11-10 12:10:50.999, return:2011-11-1 00:00:00.000
+ */
+ public static Date getMonthBeginTime(Date dt) {
+
+ if (dt == null)
+ dt = new Date(System.currentTimeMillis());
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(dt);
+ cal.set(Calendar.DAY_OF_MONTH, 1);
+ cal.set(Calendar.HOUR_OF_DAY, 0);
+ cal.set(Calendar.MINUTE, 0);
+ cal.set(Calendar.SECOND, 0);
+ cal.set(Calendar.MILLISECOND, 0);
+ return cal.getTime();
+ }
+
+ /**
+ * 某月的截止时间,eg:param:2011-11-10 12:10:50.999, return:2011-11-30 23:59:59.999
+ */
+ public static Date getMonthEndTime(Date dt) {
+
+ if (dt == null)
+ dt = new Date(System.currentTimeMillis());
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(dt);
+ cal.set(Calendar.MONTH, cal.get(Calendar.MONTH) + 1);
+ cal.set(Calendar.DAY_OF_MONTH, 1);
+ cal.set(Calendar.HOUR_OF_DAY, 0);
+ cal.set(Calendar.MINUTE, 0);
+ cal.set(Calendar.SECOND, 0);
+ cal.set(Calendar.MILLISECOND, -1);
+ return cal.getTime();
+ }
+
+ /**
+ * 获得传入日期的年\月\日,以整型数组方式返回
+ *
+ * @param dt
+ * @return int[]
+ */
+ public static int[] getTimeArray(Date dt) {
+
+ if (dt == null)
+ dt = new Date(System.currentTimeMillis());
+ int[] timeArray = new int[3];
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(dt);
+ timeArray[0] = cal.get(Calendar.YEAR);
+ timeArray[1] = cal.get(Calendar.MONTH) + 1;
+ timeArray[2] = cal.get(Calendar.DAY_OF_MONTH);
+ return timeArray;
+ }
+
+ /**
+ * 获得传入日期的年\月\日\小时\分,以整型数组方式返回
+ *
+ * @param dt
+ * @return
+ */
+ public static int[] timeArray(Date dt) {
+
+ if (dt == null)
+ dt = new Date(System.currentTimeMillis());
+ int[] timeArray = new int[5];
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(dt);
+ timeArray[0] = cal.get(Calendar.YEAR);
+ timeArray[1] = cal.get(Calendar.MONTH) + 1;
+ timeArray[2] = cal.get(Calendar.DAY_OF_MONTH);
+ timeArray[3] = cal.get(Calendar.HOUR_OF_DAY);
+ timeArray[4] = cal.get(Calendar.MINUTE);
+ return timeArray;
+ }
+
+ /**
+ * 根据年月日得到Date类型时间
+ *
+ * @param year
+ * @param month
+ * @param day
+ * @return Date
+ */
+ public static Date getTime(Integer year, Integer month, Integer day) {
+
+ Calendar cal = Calendar.getInstance();
+ if (year != null)
+ cal.set(Calendar.YEAR, year);
+ if (month != null)
+ cal.set(Calendar.MONTH, month - 1);
+ if (day != null)
+ cal.set(Calendar.DAY_OF_MONTH, day);
+ return cal.getTime();
+ }
+
+ /**
+ * @param parrern 格式化字符串 例如:yyyy-MM-dd
+ * @param str 时间字符串 例如:2007-08-01
+ * @return 出错返回null
+ * 通过格式化字符串得到时间
+ */
+ public static Date getDateFromPattern(String parrern, String str) {
+ SimpleDateFormat fmt = new SimpleDateFormat(parrern);
+ try {
+ return fmt.parse(str);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ /**
+ * 计算两个日期间相隔的小时
+ *
+ * @param d1 日期1
+ * @param d2 日期2
+ * @return
+ */
+ public static int getHourBetween(Date d1, Date d2) {
+
+ long m = d1.getTime();
+ long n = d2.getTime();
+ return (int) ((m - n) / 3600000);
+ }
+
+ /**
+ * 取得两个时间之间的天数,可能是负数(第二个时间的日期小于第一个时间的日期)。如果两个时间在同一天,则返回0
+ *
+ * @param d1 第一个时间
+ * @param d2 第二个时间
+ * @return
+ * @author Derek
+ * @version 1.0 2009-10-14
+ */
+ public static int getDayBetween(Date d1, Date d2) {
+
+ Calendar c1 = Calendar.getInstance();
+ c1.setTime(d1);
+ Calendar c2 = Calendar.getInstance();
+ c2.setTime(d2);
+ return (int) ((c2.getTimeInMillis() - c1.getTimeInMillis()) / 86400000);
+ }
+
+ /**
+ * 计算两个日期间相隔的秒数
+ *
+ * @param d1 日期1
+ * @param d2 日期2
+ * @return
+ */
+ public static long getSecondBetweem(Date d1, Date d2) {
+
+ return (d1.getTime() - d2.getTime()) / 1000;
+ }
+
+ /**
+ * 计算两个日期间相隔的月份数
+ *
+ * @param d1 日期1
+ * @param d2 日期2
+ * @return
+ */
+ public static int getMonthBetween(Date d1, Date d2) {
+
+ Calendar c1 = Calendar.getInstance();
+ Calendar c2 = Calendar.getInstance();
+ c1.setTime(d1);
+ c2.setTime(d2);
+
+ return (c1.get(Calendar.YEAR) - c2.get(Calendar.YEAR)) * 12 + (c1.get(Calendar.MONTH) - c2.get(Calendar.MONTH));
+ }
+
+ /**
+ * 通过生日得到当前年龄
+ *
+ * @param birthDay 以字符串表示的生日
+ * @return 返回以以字符串表示的年龄, 最小为0
+ */
+ public static String getAge(String birthDay) {
+
+ if (birthDay.startsWith("0000")) {
+ return "未知";
+ }
+ if (!birthDay.matches("[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}")) {
+ return "未知";
+ }
+ return getAge(parseDate(birthDay, "yyyy-MM-dd"));
+ }
+
+ /**
+ * 通过生日得到当前年龄
+ *
+ * @param birthDate 以日期表示的生日
+ * @return 返回以以字符串表示的年龄, 最小为0
+ */
+ public static String getAge(Date birthDate) {
+
+ if (birthDate == null) {
+ return "未知";
+ }
+
+ Calendar cal = Calendar.getInstance();
+ if (cal.before(birthDate)) {
+ throw new IllegalArgumentException("The birthDay is before Now. It is unbelievable!");
+ }
+ int yearNow = cal.get(Calendar.YEAR);
+ int monthNow = cal.get(Calendar.MONTH);
+ int dayOfMonthNow = cal.get(Calendar.DAY_OF_MONTH);
+ cal.setTime(birthDate);
+ int yearBirth = cal.get(Calendar.YEAR);
+ int monthBirth = cal.get(Calendar.MONTH);
+ int dayOfMonthBirth = cal.get(Calendar.DAY_OF_MONTH);
+ int age = yearNow - yearBirth;
+ if (monthNow <= monthBirth) {
+ if (monthNow == monthBirth) {
+ if (dayOfMonthNow < dayOfMonthBirth) {
+ age--;
+ } else {
+ }
+ } else {
+ age--;
+ }
+ } else {
+ }
+ return age + "";
+ }
+
+ @SuppressWarnings("deprecation")
+ public static int getIntAge(Date brithday) {
+
+ if (brithday != null) {
+ int dateMiss = Calendar.getInstance().getTime().getDate() - brithday.getDate();// 日差距
+ int monthMiss = Calendar.getInstance().getTime().getMonth() - brithday.getMonth();// 月份差距
+ int yearMiss = Calendar.getInstance().getTime().getYear() - brithday.getYear();// 年份差距
+ if (monthMiss > 0 || (monthMiss == 0 && dateMiss >= 0)) {
+ return yearMiss;
+ } else {
+ return yearMiss - 1;// 周岁少两岁,SO在去掉一年
+ }
+ }
+ return 0;
+ }
+
+ /**
+ * 根据周几的数字标记获得周几的汉字描述
+ */
+ public static String getCnWeekDesc(int weekNum) {
+ String strWeek = "";
+ switch (weekNum) {
+ case 1:
+ strWeek = "周一";
+ break;
+ case 2:
+ strWeek = "周二";
+ break;
+ case 3:
+ strWeek = "周三";
+ break;
+ case 4:
+ strWeek = "周四";
+ break;
+ case 5:
+ strWeek = "周五";
+ break;
+ case 6:
+ strWeek = "周六";
+ break;
+ case 7:
+ strWeek = "周日";
+ break;
+ }
+ return strWeek;
+ }
+
+ /**
+ * 获得"上下午"标识
+ *
+ * @param date
+ * @return
+ */
+ public static String getCnAMPM(Date date) {
+
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ if (Calendar.AM == cal.get(Calendar.AM_PM))
+ return "上午";
+ else
+ return "下午";
+
+ }
+
+ /**
+ * 判断两个日期是否相等
+ *
+ * @param d1 日期1
+ * @param d2 日期2
+ * @return
+ */
+ public static boolean isTimeEquals(Date d1, Date d2) {
+
+ if (d1 == null || d2 == null)
+ return false;
+ return Math.abs(d1.getTime() - d2.getTime()) < 50;
+ }
+
+ /**
+ * 获取一个日期的年份
+ *
+ * @param date 日期
+ * @return
+ */
+ public static int getYear(Date date) {
+
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ return cal.get(Calendar.YEAR);
+ }
+
+ /**
+ * 获取一个日期的月份
+ *
+ * @param date 日期
+ * @return
+ */
+ public static int getMonthOfYear(Date date) {
+
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ return cal.get(Calendar.MONTH);
+ }
+
+ /**
+ * 获取一个日期的天数
+ *
+ * @param date
+ * @return
+ */
+ public static int getDay(Date date) {
+
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+
+ return calendar.get(Calendar.DAY_OF_MONTH);
+ }
+
+ /**
+ * 获取一个日期的小时数
+ *
+ * @param date
+ * @return
+ */
+ public static int getHour(Date date) {
+
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+
+ return calendar.get(Calendar.HOUR_OF_DAY);
+ }
+
+ /**
+ * 获取一个日期的分钟
+ *
+ * @param date 日期
+ * @return
+ */
+ public static int getMinute(Date date) {
+
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+
+ return calendar.get(Calendar.MINUTE);
+ }
+
+ /**
+ * 获取一个日期的秒数
+ *
+ * @param date 日期
+ * @return
+ */
+ public static int getSecond(Date date) {
+
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+
+ return calendar.get(Calendar.SECOND);
+ }
+
+ /**
+ * 获取一个月的最大天数
+ *
+ * @param year 年份
+ * @param month 月份
+ * @return
+ */
+ public static int getMaxDayOfMonth(int year, int month) {
+
+ if (month == 1 && isLeapYear(year)) {
+ return 29;
+ }
+ return DAY_OF_MONTH[month];
+ }
+
+ /**
+ * 判断是否是润年
+ *
+ * @param year 年份
+ * @return
+ */
+ public static boolean isLeapYear(int year) {
+
+ Calendar calendar = Calendar.getInstance();
+ return ((GregorianCalendar) calendar).isLeapYear(year);
+ }
+
+ /**
+ * 得到本周的起始时间
+ *
+ * @param currentDate
+ * @return
+ */
+ public static Date getBeginDateofThisWeek(Date currentDate) {
+ Calendar current = Calendar.getInstance();
+ current.setTime(currentDate);
+ int dayOfWeek = current.get(Calendar.DAY_OF_WEEK);
+
+ if (dayOfWeek == 1) { // 如果是星期天,星期一则往前退6天
+ current.add(Calendar.DAY_OF_MONTH, -6);
+ } else {
+ current.add(Calendar.DAY_OF_MONTH, 2 - dayOfWeek);
+ }
+
+ current.set(Calendar.HOUR_OF_DAY, 0);
+ current.set(Calendar.MINUTE, 0);
+ current.set(Calendar.SECOND, 0);
+ current.set(Calendar.MILLISECOND, 0);
+
+ return current.getTime();
+ }
+
+ @SuppressWarnings("deprecation")
+ public static void main(String[] args) {
+
+ Date addYearDate = getAddYearDate(new Date(), 2);
+ System.out.println(formatDateYMDHMS(addYearDate));
+ }
+
+ /**
+ * 转化时间从指定格式日期为长整形
+ *
+ * @param format
+ * @param time
+ * @return
+ */
+ public static Long convertDateStringToDateLong(String format, String time) throws ParseException {
+ if (time == null || time.trim().equals("")) {
+ return null;
+ }
+ SimpleDateFormat fmt = new SimpleDateFormat(format);
+ Date d = fmt.parse(time);
+ return d.getTime();
+ }
+
+ /**
+ * 获得指定格式日期
+ *
+ * @param date 日期
+ * @param format 指定格式
+ * @return
+ */
+ public static Date getFormatDate(Date date, String format) {
+ if (null == date) {
+ return null;
+ }
+ if (null == format) {
+ return parseDate(formatDate("yyyy-MM-dd", date), "yyyy-MM-dd");
+ }
+ return parseDate(formatDate(format, date), format);
+ }
+
+ public static int getMinuteBetween(Date d1, Date d2) {
+ if (d1 == null || d2 == null)
+ return 0;
+ long m = d1.getTime();
+ long n = d2.getTime();
+ return (int) ((m - n) / 60000);
+ }
+
+ /**
+ * 计算创建时间到现在过去多久了
+ *
+ * @param createTime
+ * @return
+ */
+ public static String getPastTime(Date createTime) {
+
+ String pastTime;
+ Date current = new Date();
+ int days = getDayBetween(current, createTime);
+ int hours = 0;
+ int mins = 0;
+ if (days > 0) {
+ pastTime = "1天前";
+ } else if ((hours = getHourBetween(current, createTime)) > 0) {
+ pastTime = hours + "小时前";
+ } else if ((mins = getMinuteBetween(current, createTime)) > 0) {
+ pastTime = mins + "分钟前";
+ } else {
+ long seconds = getSecondBetweem(current, createTime);
+ if (seconds > 5) {
+ pastTime = seconds + "秒前";
+ } else {
+ pastTime = "刚刚";
+ }
+ }
+ return pastTime;
+ }
+
+ /**
+ * 获取从今天开始未来一周的星期和日期的映射表 1-星期一:2014-05-12,2-星期二:2014-05-13.....
+ *
+ * @return
+ */
+ public static Map getDateForWeekDay() {
+ Map weekDayDateMap = new HashMap();
+ Calendar calendar = Calendar.getInstance();
+ for (int i = 1; i <= 7; i++) {
+ int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK) - 1;
+ if (dayOfWeek == 0) {
+ dayOfWeek = 7;
+ }
+ weekDayDateMap.put(dayOfWeek + "", calendar.getTime());
+ calendar.add(Calendar.DAY_OF_MONTH, 1);
+ }
+ return weekDayDateMap;
+ }
+
+ /**
+ * 获得本日星期数,星期一:1,星期日:7 如果传入null则默认为本日
+ *
+ * @return
+ */
+ public static int getDayOfWeek(Calendar calendar) {
+ int today;
+ if (calendar != null) {
+ today = calendar.get(Calendar.DAY_OF_WEEK);
+ } else {
+ today = Calendar.getInstance().get(Calendar.DAY_OF_WEEK);
+ }
+ if (today == 1)
+ return 7;
+ else
+ return today - 1;
+ }
+
+ /**
+ * 获取日期的中国式星期几(1-7分别代表周一至周日)
+ *
+ * @param date
+ * @return
+ */
+ public static int getDayOfWeek(Date date) {
+ if (date == null) {
+ date = new Date();
+ }
+
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ return getDayOfWeek(cal);
+ }
+
+ /**
+ * 判断两个日期是否为同一天
+ *
+ * @param date1
+ * @param date2
+ * @return
+ */
+ public static boolean isSameDate(Date date1, Date date2) {
+ if (date1 == null || date2 == null) {
+ return false;
+ }
+
+ Calendar calendar1 = Calendar.getInstance();
+ Calendar calendar2 = Calendar.getInstance();
+ calendar1.setTime(date1);
+ calendar2.setTime(date2);
+
+ if (calendar1.get(Calendar.YEAR) == calendar2.get(Calendar.YEAR)
+ && calendar1.get(Calendar.MONTH) == calendar2.get(Calendar.MONTH)
+ && calendar1.get(Calendar.DAY_OF_MONTH) == calendar2.get(Calendar.DAY_OF_MONTH)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ public static String formatDuration(long duration) {
+ float secondUnit = 1000;
+ String formatDuration = "";
+ DecimalFormat decimalFormat = new DecimalFormat(".00");
+
+ if (duration < secondUnit) {
+ formatDuration = duration + "(毫秒)";
+ } else if (duration < secondUnit * 60) {
+ formatDuration = decimalFormat.format(duration / secondUnit) + "(秒)";
+ } else if (duration < secondUnit * 3600) {
+ formatDuration = decimalFormat.format(duration / (secondUnit * 60)) + "(分钟)";
+ } else if (duration < secondUnit * 3600 * 60) {
+ formatDuration = decimalFormat.format(duration / (secondUnit * 3600)) + "(小时)";
+ } else {
+ formatDuration = decimalFormat.format(duration / (secondUnit * 3600 * 24)) + "(天)";
+ }
+
+ return formatDuration;
+ }
+
+ public static long getTodayBeginTime() {
+ return getDayBegin(new Date()).getTime();
+ }
+
+ public static long getTodayEndTime() {
+ return getDayEnd(new Date()).getTime();
+ }
+
+ /**
+ * 比较两个时间大小
+ *
+ * @param startTime
+ * @param endTime
+ * @return int
+ * @method compareDate()
+ */
+ public static int compareDate(String startTime, String endTime) throws ParseException {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Date d1 = sdf.parse(startTime);
+ Date d2 = sdf.parse(endTime);
+ return d1.compareTo(d2);
+ }
+
+ /**
+ * 是否是一个日期格式
+ * @param time
+ * @param pattern
+ * @return
+ */
+ public static boolean isTime(String time,String pattern) {
+ SimpleDateFormat sdf = new SimpleDateFormat(pattern);
+ try {
+ sdf.setLenient(false);
+ sdf.parse(time);
+ } catch (ParseException e) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * 转换时间标准格式 yyyy-MM-dd HH:mm:ss
+ */
+ public static final ThreadLocal yMdHms = new ThreadLocal() {
+ @Override
+ protected DateFormat initialValue() {
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ }
+ };
+
+
+ /**
+ * 转换时间标准格式 yyyy-MM-dd
+ */
+ public static final ThreadLocal yMd = new ThreadLocal() {
+ @Override
+ protected DateFormat initialValue() {
+ return new SimpleDateFormat("yyyy-MM-dd");
+ }
+ };
+
+ /**
+ * 转换时间标准格式 yyyy-MM-dd HH:mm
+ */
+ public static final ThreadLocal yMdHm = new ThreadLocal() {
+ @Override
+ protected DateFormat initialValue() {
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm");
+ }
+ };
+
+// /**
+// * 校验时间冲突
+// * @param dateA 2021-02-08 13:00~2021-02-08 13:00
+// * @param dateB 2021-02-08 13:00~2021-02-08 13:00
+// * @return 冲突返回true,不冲突返回false
+// */
+// public static Boolean checkDateConflict(String dateA, String dateB) {
+// List dateAList = new ArrayList<>(Arrays.asList(dateA.split("~")));
+// List dateBList = new ArrayList<>(Arrays.asList(dateB.split("~")));
+// try {
+// Date dateA1 = DateUtil.yMdHm.get().parse(dateAList.get(0));
+// Date dateA2 = DateUtil.yMdHm.get().parse(dateAList.get(1));
+// Date dateB1 = DateUtil.yMdHm.get().parse(dateBList.get(0));
+// Date dateB2 = DateUtil.yMdHm.get().parse(dateBList.get(1));
+// //dateA开始时间大于dateB结束时间,不冲突
+// if (dateA1.compareTo(dateB2) >= 0) {
+// return false;
+// }
+// //dateA结束时间小于dateB开始时间,不冲突
+// if (dateA2.compareTo(dateB1) <= 0) {
+// return false;
+// }
+// } catch (ParseException e) {
+// throw new MessageException("时间格式异常");
+// }
+// return true;
+// }
+
+ /**
+ * 计算一个日期N天后的时间
+ * @param date
+ * @param n
+ * @return
+ * @throws ParseException
+ */
+ public static String afterNDay(Date date,int n){
+ Calendar c=Calendar.getInstance();
+ SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+ c.setTime(date);
+ c.add(Calendar.DATE,n);
+ Date d2=c.getTime();
+ String s=df.format(d2);
+ return s;
+ }
+
+ /**
+ * 计算两个日期相差了多少天
+ * @param date1
+ * @param date2
+ * @return
+ */
+ public static int differentDaysByMillisecond(Date date1,Date date2) {
+ int days = (int) ((date2.getTime() - date1.getTime()) / (1000*3600*24));
+ return days;
+ }
+
+ /**
+ * 计算两个字符串日期(格式“yyyy-MM-dd”)相差了多少天
+ * @param date1
+ * @param date2
+ * @return
+ */
+ public static int differentStrDaysByMillisecond(String date1,String date2) {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Date parse1 = null;
+ Date parse2 = null;
+ try {
+ parse1 = sdf.parse(date1);
+ parse2 = sdf.parse(date2);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ int days = (int) ((parse1.getTime() - parse2.getTime()) / (1000*3600*24));
+ return days;
+ }
+
+ /**
+ * 获取本周周一 yyyy-MM-dd
+ * @return
+ */
+ public static String getWeekBegin(){
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Calendar cal = Calendar.getInstance();
+ //设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一
+ cal.setFirstDayOfWeek(Calendar.MONDAY);
+ //获得当前日期是一个星期的第几天
+ int dayWeek = cal.get(Calendar.DAY_OF_WEEK);
+ if(dayWeek==1){
+ dayWeek = 8;
+ }
+ // 根据日历的规则,给当前日期减去星期几与一个星期第一天的差值
+ cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - dayWeek);
+ Date mondayDate = cal.getTime();
+ String weekBegin = sdf.format(mondayDate);
+ return weekBegin;
+ }
+
+ /**
+ * 获取本周周一 yyyy-MM-dd
+ * @return
+ */
+ public static String getWeekEnd(){
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Calendar cal = Calendar.getInstance();
+ //设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一
+ cal.setFirstDayOfWeek(Calendar.MONDAY);
+ //获得当前日期是一个星期的第几天
+ int dayWeek = cal.get(Calendar.DAY_OF_WEEK);
+ if(dayWeek==1){
+ dayWeek = 8;
+ }
+ cal.add(Calendar.DATE, 4 +cal.getFirstDayOfWeek());
+ Date sundayDate = cal.getTime();
+ String weekEnd = sdf.format(sundayDate);
+ return weekEnd;
+ }
+
+}
+
+
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/utils/HolidayUtil.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/utils/HolidayUtil.java
new file mode 100644
index 0000000000000000000000000000000000000000..c21f44b72d3da04132a911b176f6fbd4a153b14a
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/utils/HolidayUtil.java
@@ -0,0 +1,158 @@
+package com.zhentao.system.utils;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.temporal.ChronoUnit;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * 判断今天是工作日/周末/节假日 工具类
+ * //0 上班 1周末 2节假日
+ */
+public class HolidayUtil {
+
+
+ // 节假日数据缓存
+ private static final Map> holiday = new ConcurrentHashMap<>();
+ // 调休日数据缓存
+ private static final Map> extraWorkDay = new ConcurrentHashMap<>();
+
+ /**
+ * 判断是否为工作日
+ * @param dateStr 日期字符串(格式:yyyy-MM-dd)
+ * @return "0":工作日,"1":周末,"2":节假日
+ * @throws ParseException 如果日期解析失败
+ */
+ public static String isWorkingDay(String dateStr) throws ParseException, IOException {
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+ Date date = dateFormat.parse(dateStr);
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+
+ // 获取年份
+ String year = new SimpleDateFormat("yyyy").format(date);
+
+ // 如果缓存中没有该年份的节假日数据,则从API获取
+ if (!holiday.containsKey(year)) {
+ fetchHolidays(year);
+ }
+
+ // 判断是否为节假日
+ if (holiday.get(year).contains(dateStr)) {
+ return "2";
+ }
+ // 判断是否为调休日
+ if (extraWorkDay.get(year).contains(dateStr)) {
+ return "0";
+ }
+ // 判断是否为周末
+ int weekday = calendar.get(Calendar.DAY_OF_WEEK);
+ if (weekday == Calendar.SATURDAY || weekday == Calendar.SUNDAY) {
+ return "1";
+ }
+ // 默认工作日
+ return "0";
+ }
+
+ /**
+ * 从API获取节假日数据
+ * @param year 年份(格式:yyyy)
+ * @throws IOException 如果网络请求失败
+ */
+ private static void fetchHolidays(String year) throws IOException {
+ String httpUrl = "https://timor.tech/api/holiday/year/" + year;
+ URL url = new URL(httpUrl);
+ URLConnection connection = url.openConnection();
+ connection.setRequestProperty("User-Agent", "Mozilla/4.76");
+
+ try (InputStream is = connection.getInputStream();
+ BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"))) {
+ StringBuilder response = new StringBuilder();
+ String line;
+ while ((line = reader.readLine()) != null) {
+ response.append(line);
+ }
+
+ // 解析API响应
+ JSONObject json = JSON.parseObject(response.toString());
+ JSONObject holidayData = json.getJSONObject("holiday");
+ List holidays = new ArrayList<>();
+ List extraWorkDays = new ArrayList<>();
+
+ for (Map.Entry entry : holidayData.entrySet()) {
+ JSONObject dayInfo = JSON.parseObject(entry.getValue().toString());
+ if ("true".equals(dayInfo.getString("holiday"))) {
+ holidays.add(dayInfo.getString("date"));
+ } else {
+ extraWorkDays.add(dayInfo.getString("date"));
+ }
+ }
+
+ // 更新缓存
+ holiday.put(year, holidays);
+ extraWorkDay.put(year, extraWorkDays);
+ }
+ }
+
+ /**
+ * 获取两个日期之间的所有日期
+ * @param start 开始时间
+ * @param end 结束时间
+ * @return 日期列表
+ */
+ public static List getDatesBetween(Date start, Date end) {
+ List dates = new ArrayList<>();
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(start);
+ while (!calendar.getTime().after(end)) {
+ dates.add(calendar.getTime());
+ calendar.add(Calendar.DATE, 1);
+ }
+ return dates;
+ }
+
+ /**
+ * 判断时间段内是否包含热点时段(18:00-20:00)
+ * @param start 开始时间
+ * @param end 结束时间
+ * @return 包含热点时段返回true,否则返回false
+ */
+ public static boolean containsPeakHours(Date start, Date end) {
+ LocalDateTime startLdt = toLocalDateTime(start);
+ LocalDateTime endLdt = toLocalDateTime(end);
+ LocalDate currentDate = startLdt.toLocalDate();
+
+ while (!currentDate.isAfter(endLdt.toLocalDate())) {
+ LocalDateTime peakStart = currentDate.atTime(18, 0);
+ LocalDateTime peakEnd = currentDate.atTime(20, 0);
+ if (startLdt.isBefore(peakEnd) && endLdt.isAfter(peakStart)) {
+ return true;
+ }
+ currentDate = currentDate.plusDays(1);
+ }
+ return false;
+ }
+
+ /**
+ * 将Date转换为LocalDateTime
+ * @param date 日期
+ * @return LocalDateTime对象
+ */
+ public static LocalDateTime toLocalDateTime(Date date) {
+ return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime();
+ }
+}
diff --git a/smart-modules/smart-system/src/main/java/com/zhentao/system/utils/ServletUtils.java b/smart-modules/smart-system/src/main/java/com/zhentao/system/utils/ServletUtils.java
new file mode 100644
index 0000000000000000000000000000000000000000..3a7906082bfed5a1d940d673f48705faa76d8724
--- /dev/null
+++ b/smart-modules/smart-system/src/main/java/com/zhentao/system/utils/ServletUtils.java
@@ -0,0 +1,84 @@
+package com.ruoyi.common.utils;
+
+import java.io.IOException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import com.zhentao.common.core.text.Convert;
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+/**
+ * 客户端工具类
+ */
+public class ServletUtils {
+ /**
+ * 获取String参数
+ */
+ public static String getParameter(String name) {
+ return getRequest().getParameter(name);
+ }
+
+ /**
+ * 获取String参数
+ */
+ public static String getParameter(String name, String defaultValue) {
+ return Convert.toStr(getRequest().getParameter(name), defaultValue);
+ }
+
+ /**
+ * 获取Integer参数
+ */
+ public static Integer getParameterToInt(String name) {
+ return Convert.toInt(getRequest().getParameter(name));
+ }
+
+ /**
+ * 获取Integer参数
+ */
+ public static Integer getParameterToInt(String name, Integer defaultValue) {
+ return Convert.toInt(getRequest().getParameter(name), defaultValue);
+ }
+
+ /**
+ * 获取Boolean参数
+ */
+ public static Boolean getParameterToBool(String name) {
+ return Convert.toBool(getRequest().getParameter(name));
+ }
+
+ /**
+ * 获取Boolean参数
+ */
+ public static Boolean getParameterToBool(String name, Boolean defaultValue) {
+ return Convert.toBool(getRequest().getParameter(name), defaultValue);
+ }
+
+ /**
+ * 获取request
+ */
+ public static HttpServletRequest getRequest() {
+ return getRequestAttributes().getRequest();
+ }
+
+ /**
+ * 获取response
+ */
+ public static HttpServletResponse getResponse() {
+ return getRequestAttributes().getResponse();
+ }
+
+ /**
+ * 获取session
+ */
+ public static HttpSession getSession() {
+ return getRequest().getSession();
+ }
+
+ public static ServletRequestAttributes getRequestAttributes() {
+ RequestAttributes attributes = RequestContextHolder.getRequestAttributes();
+ return (ServletRequestAttributes) attributes;
+ }
+}
diff --git a/smart-modules/smart-system/src/main/resources/bootstrap.yml b/smart-modules/smart-system/src/main/resources/bootstrap.yml
index afe5f2b1f84298715eebbf5a76c27733b6049eb5..669c9a5e091867df4d0c13546eac32641baa30a2 100644
--- a/smart-modules/smart-system/src/main/resources/bootstrap.yml
+++ b/smart-modules/smart-system/src/main/resources/bootstrap.yml
@@ -4,6 +4,9 @@ server:
# Spring
spring:
+# jackson:
+# date-format: yyyy-MM-dd HH:mm:ss
+# time-zone: GMT+8
application:
# 应用名称
name: ruoyi-system
@@ -15,11 +18,15 @@ spring:
discovery:
# 服务注册地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
config:
# 配置中心地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
# 配置文件格式
file-extension: yml
# 共享配置
shared-configs:
- - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
+ - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
\ No newline at end of file
diff --git a/smart-modules/smart-system/src/main/resources/mapper/AttendanceRecordMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/AttendanceRecordMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..21a291e22da587b473ea842c2758e9c335ccd01f
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/AttendanceRecordMapper.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id,employee_id,date,
+ check_in,check_out,status,
+ remark,create_time
+
+
+ update attendance_record set check_in = #{checkInTime},status = #{status} where employee_id = #{userId} and date = CURDATE()
+
+
+ update attendance_record set check_out = #{checkOutTime},status = #{status} where employee_id = #{userId} and date = CURDATE()
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/CarAccessRecordMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/CarAccessRecordMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4cdced06f5b55a32b2fecf817eb1bc15a4ab43bf
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/CarAccessRecordMapper.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ record_id,plate_number,access_type,
+ access_time,device_id,device_name,
+ image_url,list_type,create_time,
+ remark
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/CarBlacklistMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/CarBlacklistMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b5267c02db3a839d2df083675d4c4965e883bdcb
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/CarBlacklistMapper.xml
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ blacklist_id,plate_number,reason,
+ start_time,end_time,status,
+ create_by,create_time,update_by,
+ update_time,remark
+
+
+
+
+
+
+
+ insert into car_blacklist
+
+ plate_number,
+ reason,
+ start_time,
+ end_time,
+ status,
+ create_by,
+ create_time,
+ update_by,
+ update_time,
+ remark,
+
+
+ #{plateNumber},
+ #{reason},
+ #{startTime},
+ #{endTime},
+ #{status},
+ #{createBy},
+ #{createTime},
+ #{updateBy},
+ #{updateTime},
+ #{remark},
+
+
+
+
+ update car_blacklist
+
+ plate_number = #{plateNumber},
+ reason = #{reason},
+ start_time = #{startTime},
+ end_time = #{endTime},
+ status = #{status},
+ update_by = #{updateBy},
+ update_time = #{updateTime},
+ remark = #{remark},
+
+ where blacklist_id = #{blacklistId}
+
+
+
+ delete from car_blacklist where blacklist_id = #{blacklistId}
+
+
+
+ delete from car_blacklist where blacklist_id in
+
+ #{blacklistId}
+
+
+
+ delete from car_blacklist where blacklist_id = #{blacklistId}
+
+
+ delete from car_blacklist where blacklist_id in
+
+ #{blacklistId}
+
+
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/CarInfoMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/CarInfoMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..dea95bc7e1f0f15bf2569c96c916267a49b8f89f
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/CarInfoMapper.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ car_id,plate_number,plate_color,
+ car_type,user_id,owner_phone,
+ bind_time,status,create_by,
+ create_time,update_by,update_time,
+ remark
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/CarSpecialPlateMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/CarSpecialPlateMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..8fc0fc5fe832d1007f0dea17eab9483c4da0b533
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/CarSpecialPlateMapper.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ plate_id,plate_prefix,plate_type,
+ description,status,create_by,
+ create_time,update_by,update_time,
+ remark
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/CarWhitelistMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/CarWhitelistMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..a7bb11131bf15f7be755a47d9dce1a0737a9acc1
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/CarWhitelistMapper.xml
@@ -0,0 +1,115 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ whitelist_id,plate_number,type,
+ reason,start_time,end_time,
+ status,create_by,create_time,
+ update_by,update_time,remark
+
+
+ insert into car_whitelist
+
+ plate_number,
+ type,
+ reason,
+ start_time,
+ end_time,
+ status,
+ create_by,
+ create_time,
+ update_by,
+ update_time,
+ remark,
+
+
+ #{plateNumber},
+ #{type},
+ #{reason},
+ #{startTime},
+ #{endTime},
+ #{status},
+ #{createBy},
+ #{createTime},
+ #{updateBy},
+ #{updateTime},
+ #{remark},
+
+
+
+
+
+
+
+
+
+ update car_whitelist
+
+ plate_number = #{plateNumber},
+ reason = #{reason},
+ start_time = #{startTime},
+ end_time = #{endTime},
+ status = #{status},
+ update_by = #{updateBy},
+ update_time = #{updateTime},
+ remark = #{remark},
+
+ where whitelist_id = #{whitelistId}
+
+
+
+ delete from car_whitelist where whitelist_id = #{whitelistId}
+
+
+
+ delete from car_whitelist where whitelist_id in
+
+ #{whitelistId}
+
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/SmartCsMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/FeeRuleMapper.xml
similarity index 34%
rename from smart-modules/smart-system/src/main/resources/mapper/SmartCsMapper.xml
rename to smart-modules/smart-system/src/main/resources/mapper/FeeRuleMapper.xml
index 9c0df5c1c5d4d04a5f333cd7dd84757f5e75cc7c..8e27b767f4b85aa6250cb7f3cc9e6a9744293b28 100644
--- a/smart-modules/smart-system/src/main/resources/mapper/SmartCsMapper.xml
+++ b/smart-modules/smart-system/src/main/resources/mapper/FeeRuleMapper.xml
@@ -2,14 +2,21 @@
-
+
-
+
-
+
+
+
+
+
+
- id,cs
+ id,starter_time,end_time,
+ vehicle_type_id,rule_status,unit_price,
+ holiday_status,create_time
diff --git a/smart-modules/smart-system/src/main/resources/mapper/SysCarouselMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/SysCarouselMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..0b616ac9f9d6f7e3e5702aca53e764528ce5db9e
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/SysCarouselMapper.xml
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select carousel_id, title, image_url, link_url, sort_order, status, start_time, end_time,
+ create_by, create_time, update_by, update_time, remark
+ from sys_carousel
+
+
+
+ carousel_id,title,image_url,
+ link_url,sort_order,status,
+ start_time,end_time,create_by,
+ create_time,update_by,update_time,
+ remark
+
+
+
+
+
+
+ insert into sys_carousel
+
+ title,
+ image_url,
+ link_url,
+ sort_order,
+ status,
+ start_time,
+ end_time,
+ create_by,
+ remark,
+ create_time
+
+
+ #{title},
+ #{imageUrl},
+ #{linkUrl},
+ #{sortOrder},
+ #{status},
+ #{startTime},
+ #{endTime},
+ #{createBy},
+ #{remark},
+ sysdate()
+
+
+
+
+ update sys_carousel
+
+ title = #{title},
+ image_url = #{imageUrl},
+ link_url = #{linkUrl},
+ sort_order = #{sortOrder},
+ status = #{status},
+ start_time = #{startTime},
+ end_time = #{endTime},
+ update_by = #{updateBy},
+ remark = #{remark},
+ update_time = sysdate()
+
+ where carousel_id = #{carouselId}
+
+
+
+ delete from sys_carousel where carousel_id = #{carouselId}
+
+
+
+ delete from sys_carousel where carousel_id in
+
+ #{carouselId}
+
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/system/CouponMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/system/CouponMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..8175a91b1ed7b0e562c5cb5af3d269ecdfd6bd3b
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/system/CouponMapper.xml
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id,name,type,
+ value,description,valid_from,
+ valid_to,total_quantity,received_quantity,
+ per_user_limit,min_amount,status,
+ creator_id,created_at,updated_at,
+ deleted_at
+
+
+ UPDATE coupon
+ SET received_quantity = received_quantity + 1
+ WHERE id = #{couponId}
+ AND received_quantity + 1 <= total_quantity
+
+
+ UPDATE coupon
+ SET total_quantity = total_quantity - #{quantity},
+ received_quantity = received_quantity + #{quantity}
+ WHERE id = #{couponId}
+ AND total_quantity >= #{quantity}
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/system/CouponRecordMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/system/CouponRecordMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..7141091ffe511a7705d8598410479c7b7012418f
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/system/CouponRecordMapper.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/system/ParkAreaMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/system/ParkAreaMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f418ec3543e1b9e1921c9360d4b93f936a88ec6d
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/system/ParkAreaMapper.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ area_id,area_name,area_code,
+ parent_id,ancestors,order_num,
+ status,del_flag,create_by,
+ create_time,update_by,update_time
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/system/ParkLaneMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/system/ParkLaneMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..dc7e873a908f539add1f41e6a49d64e7d67aa1d1
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/system/ParkLaneMapper.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lane_id,lane_name,lane_code,
+ lot_id,lane_type,qr_code,
+ status,del_flag,create_by,
+ create_time,update_by,update_time
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/system/ParkLotMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/system/ParkLotMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b6a012139b6f7b1f2fb4868af661a8037e4561c8
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/system/ParkLotMapper.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ update park_lot
+
+
+ lot_name = #{lotName},
+
+
+ lot_code = #{lotCode},
+
+
+ lot_type = #{lotType},
+
+
+ total_spots = #{totalSpots},
+
+
+ address = #{address}
+
+
+
+
+ lot_id = #{lotId}
+
+
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/system/ParkPaymentConfigMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/system/ParkPaymentConfigMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ba21f65a36d0d4ef173dacdbbd502e9533a6e3aa
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/system/ParkPaymentConfigMapper.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ config_id,lot_id,pay_type,
+ merchant_id,merchant_name,app_id,
+ merchant_key,priority,status,
+ del_flag,create_by,create_time,
+ update_by,update_time
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/system/ParkRoadMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/system/ParkRoadMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6194546199e4d6c58826cfbfb5e60b429c4b1d90
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/system/ParkRoadMapper.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ road_id,road_name,road_code,
+ area_id,road_length,status,
+ del_flag,create_by,create_time,
+ update_by,update_time
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/system/ParkSpotMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/system/ParkSpotMapper.xml
new file mode 100644
index 0000000000000000000000000000000000000000..308d405a9ba6f19d05190b56553c15e935cad242
--- /dev/null
+++ b/smart-modules/smart-system/src/main/resources/mapper/system/ParkSpotMapper.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ spot_id,spot_code,lot_id,
+ spot_type,is_occupied,status,
+ del_flag,create_by,create_time,
+ update_by,update_time
+
+
diff --git a/smart-modules/smart-system/src/main/resources/mapper/system/SysUserMapper.xml b/smart-modules/smart-system/src/main/resources/mapper/system/SysUserMapper.xml
index b1ab20ea1a78842e628359a2e87aeade0d4f2780..80c88e3c68e561bd7cfb6512a739d6ab9ec78213 100644
--- a/smart-modules/smart-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/smart-modules/smart-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
diff --git a/smart-visual/smart-monitor/src/main/resources/bootstrap.yml b/smart-visual/smart-monitor/src/main/resources/bootstrap.yml
index e83fd3119c83778c66dd9edd97da571f7c1e53a9..759d6b3edfc74a4b15f431619bf1ac4626531990 100644
--- a/smart-visual/smart-monitor/src/main/resources/bootstrap.yml
+++ b/smart-visual/smart-monitor/src/main/resources/bootstrap.yml
@@ -1,6 +1,6 @@
# Tomcat
server:
- port: 9100
+ port: 8087
# Spring
spring:
@@ -15,9 +15,13 @@ spring:
discovery:
# 服务注册地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
config:
# 配置中心地址
server-addr: 8.130.77.16:8848
+ namespace: f88b5d72-2b61-4e80-91c2-1081ecf0df5a
+ group: DEFAULT_GROUP
# 配置文件格式
file-extension: yml
# 共享配置