From 425c2b6ff142fd04e40b2d980c0129869d2e8045 Mon Sep 17 00:00:00 2001 From: Jiang Peng <2622360564@qq.com> Date: Fri, 31 May 2024 22:02:55 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=BF=90=E8=90=A5=E5=B9=B3=E5=8F=B0/?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=B8=9A=E5=8A=A1=E7=B3=BB=E7=BB=9F(?= =?UTF-8?q?=E5=AE=8C=E5=96=84)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../muyu-job/src/main/resources/bootstrap.yml | 2 +- .../domain/remote/RemoteFileService.java | 29 ++++++++++++ .../domain/remote/RemoteLogService.java | 42 +++++++++++++++++ .../domain/remote/RemoteUserService.java | 46 +++++++++++++++++++ .../factory/RemoteFileFallbackFactory.java | 31 +++++++++++++ .../factory/RemoteLogFallbackFactory.java | 37 +++++++++++++++ .../factory/RemoteUserFallbackFactory.java | 41 +++++++++++++++++ 7 files changed, 227 insertions(+), 1 deletion(-) create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteFileService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteLogService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteUserService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteFileFallbackFactory.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteLogFallbackFactory.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteUserFallbackFactory.java diff --git a/muyu-modules/muyu-job/src/main/resources/bootstrap.yml b/muyu-modules/muyu-job/src/main/resources/bootstrap.yml index 779de83..d4f8a1a 100644 --- a/muyu-modules/muyu-job/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-job/src/main/resources/bootstrap.yml @@ -1,6 +1,6 @@ # Tomcat server: - port: 9203 + port: 9205 # Spring spring: diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteFileService.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteFileService.java new file mode 100644 index 0000000..83ba13c --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteFileService.java @@ -0,0 +1,29 @@ +package com.muyu.net.working.domain.remote; + +import com.muyu.common.core.constant.ServiceNameConstants; +import com.muyu.common.core.domain.Result; +import com.muyu.common.system.domain.SysFile; +import com.muyu.common.system.remote.factory.RemoteFileFallbackFactory; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +/** + * 文件服务 + * + * @author muyu + */ +@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class) +public interface RemoteFileService { + /** + * 上传文件 + * + * @param file 文件信息 + * + * @return 结果 + */ + @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + public Result upload (@RequestPart(value = "file") MultipartFile file); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteLogService.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteLogService.java new file mode 100644 index 0000000..8f1d9d0 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteLogService.java @@ -0,0 +1,42 @@ +package com.muyu.net.working.domain.remote; + +import com.muyu.common.core.constant.SecurityConstants; +import com.muyu.common.core.constant.ServiceNameConstants; +import com.muyu.common.core.domain.Result; +import com.muyu.common.system.domain.SysLogininfor; +import com.muyu.common.system.domain.SysOperLog; +import com.muyu.common.system.remote.factory.RemoteLogFallbackFactory; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; + +/** + * 日志服务 + * + * @author muyu + */ +@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class) +public interface RemoteLogService { + /** + * 保存系统日志 + * + * @param sysOperLog 日志实体 + * @param source 请求来源 + * + * @return 结果 + */ + @PostMapping("/operlog") + public Result saveLog (@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception; + + /** + * 保存访问记录 + * + * @param sysLogininfor 访问实体 + * @param source 请求来源 + * + * @return 结果 + */ + @PostMapping("/logininfor") + public Result saveLogininfor (@RequestBody SysLogininfor sysLogininfor, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteUserService.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteUserService.java new file mode 100644 index 0000000..20a28cf --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteUserService.java @@ -0,0 +1,46 @@ +package com.muyu.net.working.domain.remote; + +import com.muyu.common.core.constant.SecurityConstants; +import com.muyu.common.core.constant.ServiceNameConstants; +import com.muyu.common.core.domain.Result; +import com.muyu.common.system.domain.LoginUser; +import com.muyu.common.system.domain.SysUser; +import com.muyu.common.system.remote.factory.RemoteUserFallbackFactory; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +/** + * 用户服务 + * + * @author muyu + */ +@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) +public interface RemoteUserService { + /** + * 通过用户名查询用户信息 + * + * @param username 用户名 + * @param source 请求来源 + * + * @return 结果 + */ + @GetMapping("/user/info/{username}") + public Result getUserInfo (@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); + + + + @PostMapping("/user") + public Result add (@Validated @RequestBody SysUser user); + + /** + * 注册用户信息 + * + * @param sysUser 用户信息 + * @param source 请求来源 + * + * @return 结果 + */ + @PostMapping("/user/register") + public Result registerUserInfo (@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteFileFallbackFactory.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteFileFallbackFactory.java new file mode 100644 index 0000000..661d860 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteFileFallbackFactory.java @@ -0,0 +1,31 @@ +package com.muyu.net.working.domain.remote.factory; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.system.domain.SysFile; +import com.muyu.common.system.remote.RemoteFileService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cloud.openfeign.FallbackFactory; +import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; + +/** + * 文件服务降级处理 + * + * @author muyu + */ +@Component +public class RemoteFileFallbackFactory implements FallbackFactory { + private static final Logger log = LoggerFactory.getLogger(RemoteFileFallbackFactory.class); + + @Override + public RemoteFileService create (Throwable throwable) { + log.error("文件服务调用失败:{}", throwable.getMessage()); + return new RemoteFileService() { + @Override + public Result upload (MultipartFile file) { + return Result.error("上传文件失败:" + throwable.getMessage()); + } + }; + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteLogFallbackFactory.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteLogFallbackFactory.java new file mode 100644 index 0000000..d2f44aa --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteLogFallbackFactory.java @@ -0,0 +1,37 @@ +package com.muyu.net.working.domain.remote.factory; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.system.domain.SysLogininfor; +import com.muyu.common.system.domain.SysOperLog; +import com.muyu.common.system.remote.RemoteLogService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cloud.openfeign.FallbackFactory; +import org.springframework.stereotype.Component; + +/** + * 日志服务降级处理 + * + * @author muyu + */ +@Component +public class RemoteLogFallbackFactory implements FallbackFactory { + private static final Logger log = LoggerFactory.getLogger(RemoteLogFallbackFactory.class); + + @Override + public RemoteLogService create (Throwable throwable) { + log.error("日志服务调用失败:{}", throwable.getMessage()); + return new RemoteLogService() { + @Override + public Result saveLog (SysOperLog sysOperLog, String source) { + return Result.error("保存操作日志失败:" + throwable.getMessage()); + } + + @Override + public Result saveLogininfor (SysLogininfor sysLogininfor, String source) { + return Result.error("保存登录日志失败:" + throwable.getMessage()); + } + }; + + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteUserFallbackFactory.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteUserFallbackFactory.java new file mode 100644 index 0000000..75bd839 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteUserFallbackFactory.java @@ -0,0 +1,41 @@ +package com.muyu.net.working.domain.remote.factory; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.system.domain.LoginUser; +import com.muyu.common.system.domain.SysUser; +import com.muyu.common.system.remote.RemoteUserService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.cloud.openfeign.FallbackFactory; +import org.springframework.stereotype.Component; + +/** + * 用户服务降级处理 + * + * @author muyu + */ +@Component +public class RemoteUserFallbackFactory implements FallbackFactory { + private static final Logger log = LoggerFactory.getLogger(RemoteUserFallbackFactory.class); + + @Override + public RemoteUserService create (Throwable throwable) { + log.error("用户服务调用失败:{}", throwable.getMessage()); + return new RemoteUserService() { + @Override + public Result getUserInfo (String username, String source) { + return Result.error("获取用户失败:" + throwable.getMessage()); + } + + @Override + public Result add(SysUser user) { + return Result.error("获取用户失败:{}", throwable.getMessage()); + } + + @Override + public Result registerUserInfo (SysUser sysUser, String source) { + return Result.error("注册用户失败:" + throwable.getMessage()); + } + }; + } +} From 6f6f8ade9268591a4fa49e38064bd8b31a2ed7df Mon Sep 17 00:00:00 2001 From: Jiang Peng <2622360564@qq.com> Date: Sat, 1 Jun 2024 20:47:21 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=BF=90=E8=90=A5=E5=B9=B3=E5=8F=B0/?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E4=B8=9A=E5=8A=A1=E7=B3=BB=E7=BB=9F(?= =?UTF-8?q?=E5=AE=8C=E5=96=84)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../muyu/net/working/domain/AddService.java | 33 +++ .../net/working/domain/Certification.java | 38 +++ .../muyu/net/working/domain/Enterprise.java | 227 ++++++++++++++++ .../muyu/net/working/domain/FenceGroups.java | 33 +++ .../com/muyu/net/working/domain/Fences.java | 60 +++++ .../muyu/net/working/domain/Information.java | 161 ++++++++++++ .../net/working/domain/ModeOfPayment.java | 31 +++ .../net/working/domain/OpenServiceAdd.java | 34 +++ .../com/muyu/net/working/domain/PayOf.java | 37 +++ .../com/muyu/net/working/domain/Type.java | 64 +++++ .../com/muyu/net/working/domain/Vehicle.java | 35 +++ .../domain/remote/RemoteFileService.java | 29 -- .../domain/remote/RemoteLogService.java | 42 --- .../domain/remote/RemoteUserService.java | 46 ---- .../factory/RemoteFileFallbackFactory.java | 31 --- .../factory/RemoteLogFallbackFactory.java | 37 --- .../factory/RemoteUserFallbackFactory.java | 41 --- .../networking/NetworkingApplication.java | 23 ++ .../controller/AddServiceController.java | 98 +++++++ .../controller/CertificationController.java | 98 +++++++ .../controller/EnterpriseController.java | 100 +++++++ .../controller/InformationController.java | 98 +++++++ .../controller/ModeOfPaymentIdController.java | 98 +++++++ .../controller/OpenServiceController.java | 98 +++++++ .../controller/PayForController.java | 98 +++++++ .../networking/controller/TypeController.java | 99 +++++++ .../networking/mapper/AddServiceMapper.java | 63 +++++ .../mapper/CertificationMapper.java | 63 +++++ .../networking/mapper/EnterpriseMapper.java | 70 +++++ .../muyu/networking/mapper/FenceMapper.java | 18 ++ .../networking/mapper/InformationMapper.java | 63 +++++ .../mapper/ModeOfPaymentIdMapper.java | 63 +++++ .../networking/mapper/OpenServiceMapper.java | 63 +++++ .../muyu/networking/mapper/PayOfMapper.java | 62 +++++ .../muyu/networking/mapper/TypeMapper.java | 62 +++++ .../com/muyu/networking/opFen/SysUserNet.java | 21 ++ .../networking/service/AddServiceService.java | 63 +++++ .../service/CertificationService.java | 63 +++++ .../networking/service/EnterpriseService.java | 70 +++++ .../muyu/networking/service/FenceService.java | 16 ++ .../service/IInformationService.java | 64 +++++ .../muyu/networking/service/ITypeService.java | 63 +++++ .../service/ModeOfPaymentIdService.java | 63 +++++ .../service/OpenServiceService.java | 63 +++++ .../muyu/networking/service/PayOfService.java | 63 +++++ .../service/impl/AddServiceServiceImpl.java | 97 +++++++ .../impl/CertificationServiceImpl.java | 99 +++++++ .../service/impl/EnterpriseServiceImpl.java | 247 ++++++++++++++++++ .../service/impl/FenceServiceImpl.java | 21 ++ .../service/impl/InformationServiceImpl.java | 100 +++++++ .../impl/ModeOfPaymentIdServiceImpl.java | 99 +++++++ .../service/impl/OpenServiceServiceImpl.java | 98 +++++++ .../service/impl/PayOfServiceImpl.java | 98 +++++++ .../service/impl/TypeServiceImpl.java | 99 +++++++ .../resources/mapper/AddServiceMapper.xml | 76 ++++++ .../resources/mapper/CertificationMapper.xml | 86 ++++++ .../resources/mapper/EnterpriseMapper.xml | 134 ++++++++++ .../resources/mapper/InformationMapper.xml | 107 ++++++++ .../mapper/ModeOfPaymentIdMapper.xml | 76 ++++++ .../resources/mapper/OpenServiceMapper.xml | 76 ++++++ .../main/resources/mapper/PayForMapper.xml | 86 ++++++ .../src/main/resources/mapper/TypeMapper.xml | 78 ++++++ 62 files changed, 4316 insertions(+), 226 deletions(-) create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/AddService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Certification.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Enterprise.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/FenceGroups.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Fences.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Information.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/ModeOfPayment.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/OpenServiceAdd.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/PayOf.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Type.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Vehicle.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteFileService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteLogService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteUserService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteFileFallbackFactory.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteLogFallbackFactory.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteUserFallbackFactory.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/NetworkingApplication.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/AddServiceController.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/CertificationController.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/EnterpriseController.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/InformationController.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/ModeOfPaymentIdController.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/OpenServiceController.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/PayForController.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/TypeController.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/AddServiceMapper.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/CertificationMapper.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/EnterpriseMapper.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/FenceMapper.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/InformationMapper.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/ModeOfPaymentIdMapper.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/OpenServiceMapper.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/PayOfMapper.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/TypeMapper.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/opFen/SysUserNet.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/AddServiceService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/CertificationService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/EnterpriseService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/FenceService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/IInformationService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ITypeService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ModeOfPaymentIdService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/OpenServiceService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/PayOfService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/AddServiceServiceImpl.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/CertificationServiceImpl.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/EnterpriseServiceImpl.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/FenceServiceImpl.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/InformationServiceImpl.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/ModeOfPaymentIdServiceImpl.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/OpenServiceServiceImpl.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/PayOfServiceImpl.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/TypeServiceImpl.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/AddServiceMapper.xml create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/CertificationMapper.xml create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/EnterpriseMapper.xml create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/InformationMapper.xml create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/ModeOfPaymentIdMapper.xml create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/OpenServiceMapper.xml create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/PayForMapper.xml create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/TypeMapper.xml diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/AddService.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/AddService.java new file mode 100644 index 0000000..3974cfe --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/AddService.java @@ -0,0 +1,33 @@ +package com.muyu.net.working.domain; + +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +/** 增值服务 + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/25 9:03 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@SuperBuilder +public class AddService extends BaseEntity { + /** + *增值服务id + * */ + private Long id; + /** + *增值类型 + * */ + private Integer addValue; + + + + + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Certification.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Certification.java new file mode 100644 index 0000000..9e8c5f1 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Certification.java @@ -0,0 +1,38 @@ +package com.muyu.net.working.domain; + +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +/** 企业认证表 + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/25 9:05 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@SuperBuilder +public class Certification extends BaseEntity { + /** + *企业认证id + * **/ + private Long id; + /** + *审核报告人 + * **/ + private String auditor; + /** + *待审核,已通过,未通过 + * **/ + private String stat; + /** + *审核报告 + * **/ + private String auditReason; + + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Enterprise.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Enterprise.java new file mode 100644 index 0000000..2f87cca --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Enterprise.java @@ -0,0 +1,227 @@ +package com.muyu.net.working.domain; + +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; + +/** 企业入驻 + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/25 8:51 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class Enterprise extends BaseEntity { + /** + *q企业入驻id + * **/ + private Long id; + /** + *企业名称 + * **/ + private String enterpriseName; + /** + *法定代表人 + * **/ + private String legalPerson; + /** + *企业注册时获得的合法经营码 + * **/ + private String businessLicenseNumber; + /** + *企业成立的日期 + * **/ + private Date establishmentDate; + /** + *经营范围 + * **/ + private String businessScope; + /** + *注册地址 + * **/ + private String address; + /** + *联系企业的电话 + * **/ + private String contactPhone; + /** + *公司邮箱 + * **/ + private String email; + /** + *企业当前的状态 + * **/ + private String status; + /** + *企业入驻平台的日期 + * **/ + private Date registrationDate; + /** + *企业认证 + * **/ + private String certification; + /** + *开通服务id + * **/ + private Long openServiceId; + /** + *增值服务id + * **/ + private Integer addServiceId; + + /*** + * 开通服务 + * */ + private String openAdd; + + + public String getOpenAdd() { + return openAdd; + } + + public void setOpenAdd(String openAdd) { + this.openAdd = openAdd; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getEnterpriseName() { + return enterpriseName; + } + + public void setEnterpriseName(String enterpriseName) { + this.enterpriseName = enterpriseName; + } + + public String getLegalPerson() { + return legalPerson; + } + + public void setLegalPerson(String legalPerson) { + this.legalPerson = legalPerson; + } + + public String getBusinessLicenseNumber() { + return businessLicenseNumber; + } + + public void setBusinessLicenseNumber(String businessLicenseNumber) { + this.businessLicenseNumber = businessLicenseNumber; + } + + public Date getEstablishmentDate() { + return establishmentDate; + } + + public void setEstablishmentDate(Date establishmentData) { + this.establishmentDate = establishmentData; + } + + public String getBusinessScope() { + return businessScope; + } + + public void setBusinessScope(String businessScope) { + this.businessScope = businessScope; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getContactPhone() { + return contactPhone; + } + + public void setContactPhone(String contactPhone) { + this.contactPhone = contactPhone; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Date getRegistrationDate() { + return registrationDate; + } + + public void setRegistrationDate(Date registrationDate) { + this.registrationDate = registrationDate; + } + + + public String getCertification() { + return certification; + } + + public void setCertification(String certification) { + this.certification = certification; + } + + public Long getOpenServiceId() { + return openServiceId; + } + + public void setOpenServiceId(Long openServiceId) { + this.openServiceId = openServiceId; + } + + public Integer getAddServiceId() { + return addServiceId; + } + + public void setAddServiceId(Integer addServiceId) { + this.addServiceId = addServiceId; + } + + @Override + public String toString(){ + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id",getId()) + .append("enterpriseName",getEnterpriseName()) + .append("legalPerson",getLegalPerson()) + .append("businessLicenseNumber",getBusinessLicenseNumber()) + .append("establishmentDate",getEstablishmentDate()) + .append("businessScope",getBusinessScope()) + .append("address",getAddress()) + .append("contactPhone",getContactPhone()) + .append("email",getEmail()) + .append("status",getStatus()) + .append("registrationDate",getRegistrationDate()) + .append("certification",getCertification()) + .append("openServiceId",getOpenServiceId()) + .append("addServiceId",getAddServiceId()) + .toString(); + } + + + } diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/FenceGroups.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/FenceGroups.java new file mode 100644 index 0000000..281fa37 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/FenceGroups.java @@ -0,0 +1,33 @@ +package com.muyu.net.working.domain; + +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** 电字围栏组 + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/31 15:16 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class FenceGroups extends BaseEntity { + /** + *属性组id + * */ + private Long id; + /** + *属性组名称 + * */ + private String groupName; + /** + *电子围栏集合 + * */ + private List fencesList; + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Fences.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Fences.java new file mode 100644 index 0000000..ab76e8e --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Fences.java @@ -0,0 +1,60 @@ +package com.muyu.net.working.domain; + +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +/** 电子围栏 + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/31 15:11 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@SuperBuilder +public class Fences extends BaseEntity { + /** + * + *围栏id + * **/ + private Long id; + /** + *围栏组id + * + * **/ + private String groupId; + /** + *电子围栏名称 + * + * **/ + private String fenceName; + /** + * + *围栏类型 :原型 多边 + * **/ + private String fenceType; + /** + * + *半径 + * **/ + private Double radius; + /** + * 驶入 驶出 + * + * **/ + private String eventType; + /** + *围栏状态 + * + * **/ + private String staut; + /** + *坐标 + * + * **/ + private String polygonPoints; +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Information.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Information.java new file mode 100644 index 0000000..9f77548 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Information.java @@ -0,0 +1,161 @@ +package com.muyu.net.working.domain; + +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 车辆基本信息 + * + * @author ruoyi + * @date 2024-05-27 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@SuperBuilder +public class Information extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 车辆vin */ + @Excel(name = "车辆vin") + private String number; + + /** 车辆类型 */ + @Excel(name = "车辆类型") + private Long typeId; + + /** 电子围栏id */ + @Excel(name = "电子围栏id") + private Long electronicId; + + /** 电机厂商 */ + @Excel(name = "电机厂商") + private String motor; + + /** 电池厂商 */ + @Excel(name = "电池厂商") + private String battery; + + /** 电机编号 */ + @Excel(name = "电机编号") + private String motorNumber; + + /** 电池编号 */ + @Excel(name = "电池编号") + private String batteryNumber; + + /** 企业id */ + @Excel(name = "企业id") + private Long enterpriseId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setNumber(String number) + { + this.number = number; + } + + public String getNumber() + { + return number; + } + public void setTypeId(Long typeId) + { + this.typeId = typeId; + } + + public Long getTypeId() + { + return typeId; + } + public void setElectronicId(Long electronicId) + { + this.electronicId = electronicId; + } + + public Long getElectronicId() + { + return electronicId; + } + public void setMotor(String motor) + { + this.motor = motor; + } + + public String getMotor() + { + return motor; + } + public void setBattery(String battery) + { + this.battery = battery; + } + + public String getBattery() + { + return battery; + } + public void setMotorNumber(String motorNumber) + { + this.motorNumber = motorNumber; + } + + public String getMotorNumber() + { + return motorNumber; + } + public void setBatteryNumber(String batteryNumber) + { + this.batteryNumber = batteryNumber; + } + + public String getBatteryNumber() + { + return batteryNumber; + } + public void setEnterpriseId(Long enterpriseId) + { + this.enterpriseId = enterpriseId; + } + + public Long getEnterpriseId() + { + return enterpriseId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("number", getNumber()) + .append("typeId", getTypeId()) + .append("electronicId", getElectronicId()) + .append("motor", getMotor()) + .append("battery", getBattery()) + .append("motorNumber", getMotorNumber()) + .append("batteryNumber", getBatteryNumber()) + .append("enterpriseId", getEnterpriseId()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/ModeOfPayment.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/ModeOfPayment.java new file mode 100644 index 0000000..a703398 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/ModeOfPayment.java @@ -0,0 +1,31 @@ +package com.muyu.net.working.domain; + + +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +/** 支付方式 + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/25 9:35 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@SuperBuilder +public class ModeOfPayment extends BaseEntity { + /*** + * 支付id + * */ + private Long id; + /*** + * 支付方式/类型 + * */ + private String payment; + + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/OpenServiceAdd.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/OpenServiceAdd.java new file mode 100644 index 0000000..6577379 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/OpenServiceAdd.java @@ -0,0 +1,34 @@ +package com.muyu.net.working.domain; + +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +/**开通服务 + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/26 9:19 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@SuperBuilder +public class OpenServiceAdd extends BaseEntity { + + + /** + * + *开通服务id + * */ + private Long id; + /** + *1开通 2未开通 + * + * */ + private String ActivateTheService; + + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/PayOf.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/PayOf.java new file mode 100644 index 0000000..13a693d --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/PayOf.java @@ -0,0 +1,37 @@ +package com.muyu.net.working.domain; + +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +/** 支付表 + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/25 9:33 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor@SuperBuilder +public class PayOf extends BaseEntity { + /** + * 支付id + * */ + private Long id; + /** + * 企业id + * */ + private Long enterpriseId; + /** + * 支付方式/类型(id) + * */ + private Long modeOfPaymentId; + /** + * 需要支付的金额 + * */ + private Double price; + + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Type.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Type.java new file mode 100644 index 0000000..d0df5ac --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Type.java @@ -0,0 +1,64 @@ +package com.muyu.net.working.domain; + +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 车辆类型信息 + * + * @author ruoyi + * @date 2024-05-27 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@SuperBuilder +public class Type extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 车辆类型 */ + @Excel(name = "车辆类型") + private String typeName; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setTypeName(String typeName) + { + this.typeName = typeName; + } + + public String getTypeName() + { + return typeName; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("typeName", getTypeName()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Vehicle.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Vehicle.java new file mode 100644 index 0000000..6ec6fa8 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Vehicle.java @@ -0,0 +1,35 @@ +package com.muyu.net.working.domain; + +import com.muyu.common.core.web.domain.BaseEntity; + +import java.util.Date; + +/** 车辆入驻表 + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/26 20:31 + */ +public class Vehicle extends BaseEntity { + private Long id; + // 车辆唯一标识 + private String vin; + // 车辆识别号码(VIN) + private String brand;// 品牌 + private String model; + private int manufactureYear; // 生产年份 + private String bodyType; // 车身类型,例如"Sedan", "SUV" + private String color; // 车身颜色 + private double engineCapacity; + // 发动机排量,单位升 + private String fuelType; // 燃油类型,例如"Petrol", "Diesel", "Electric" + private String transmission;// 变速器类型,例如"Automatic", "Manual" + private String driveType; // 驱动方式,例如"FWD", "RWD", "AWD" + private long mileage; // 行驶里程,单位公 + private Date registrationDate; // 注册日期 + private String registrationNumber; // 车牌号码 + private String ownerId; + + + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteFileService.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteFileService.java deleted file mode 100644 index 83ba13c..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteFileService.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.muyu.net.working.domain.remote; - -import com.muyu.common.core.constant.ServiceNameConstants; -import com.muyu.common.core.domain.Result; -import com.muyu.common.system.domain.SysFile; -import com.muyu.common.system.remote.factory.RemoteFileFallbackFactory; -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -/** - * 文件服务 - * - * @author muyu - */ -@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class) -public interface RemoteFileService { - /** - * 上传文件 - * - * @param file 文件信息 - * - * @return 结果 - */ - @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) - public Result upload (@RequestPart(value = "file") MultipartFile file); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteLogService.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteLogService.java deleted file mode 100644 index 8f1d9d0..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteLogService.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.muyu.net.working.domain.remote; - -import com.muyu.common.core.constant.SecurityConstants; -import com.muyu.common.core.constant.ServiceNameConstants; -import com.muyu.common.core.domain.Result; -import com.muyu.common.system.domain.SysLogininfor; -import com.muyu.common.system.domain.SysOperLog; -import com.muyu.common.system.remote.factory.RemoteLogFallbackFactory; -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; - -/** - * 日志服务 - * - * @author muyu - */ -@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class) -public interface RemoteLogService { - /** - * 保存系统日志 - * - * @param sysOperLog 日志实体 - * @param source 请求来源 - * - * @return 结果 - */ - @PostMapping("/operlog") - public Result saveLog (@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception; - - /** - * 保存访问记录 - * - * @param sysLogininfor 访问实体 - * @param source 请求来源 - * - * @return 结果 - */ - @PostMapping("/logininfor") - public Result saveLogininfor (@RequestBody SysLogininfor sysLogininfor, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteUserService.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteUserService.java deleted file mode 100644 index 20a28cf..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/RemoteUserService.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.muyu.net.working.domain.remote; - -import com.muyu.common.core.constant.SecurityConstants; -import com.muyu.common.core.constant.ServiceNameConstants; -import com.muyu.common.core.domain.Result; -import com.muyu.common.system.domain.LoginUser; -import com.muyu.common.system.domain.SysUser; -import com.muyu.common.system.remote.factory.RemoteUserFallbackFactory; -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -/** - * 用户服务 - * - * @author muyu - */ -@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) -public interface RemoteUserService { - /** - * 通过用户名查询用户信息 - * - * @param username 用户名 - * @param source 请求来源 - * - * @return 结果 - */ - @GetMapping("/user/info/{username}") - public Result getUserInfo (@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); - - - - @PostMapping("/user") - public Result add (@Validated @RequestBody SysUser user); - - /** - * 注册用户信息 - * - * @param sysUser 用户信息 - * @param source 请求来源 - * - * @return 结果 - */ - @PostMapping("/user/register") - public Result registerUserInfo (@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteFileFallbackFactory.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteFileFallbackFactory.java deleted file mode 100644 index 661d860..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteFileFallbackFactory.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.muyu.net.working.domain.remote.factory; - -import com.muyu.common.core.domain.Result; -import com.muyu.common.system.domain.SysFile; -import com.muyu.common.system.remote.RemoteFileService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.cloud.openfeign.FallbackFactory; -import org.springframework.stereotype.Component; -import org.springframework.web.multipart.MultipartFile; - -/** - * 文件服务降级处理 - * - * @author muyu - */ -@Component -public class RemoteFileFallbackFactory implements FallbackFactory { - private static final Logger log = LoggerFactory.getLogger(RemoteFileFallbackFactory.class); - - @Override - public RemoteFileService create (Throwable throwable) { - log.error("文件服务调用失败:{}", throwable.getMessage()); - return new RemoteFileService() { - @Override - public Result upload (MultipartFile file) { - return Result.error("上传文件失败:" + throwable.getMessage()); - } - }; - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteLogFallbackFactory.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteLogFallbackFactory.java deleted file mode 100644 index d2f44aa..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteLogFallbackFactory.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.muyu.net.working.domain.remote.factory; - -import com.muyu.common.core.domain.Result; -import com.muyu.common.system.domain.SysLogininfor; -import com.muyu.common.system.domain.SysOperLog; -import com.muyu.common.system.remote.RemoteLogService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.cloud.openfeign.FallbackFactory; -import org.springframework.stereotype.Component; - -/** - * 日志服务降级处理 - * - * @author muyu - */ -@Component -public class RemoteLogFallbackFactory implements FallbackFactory { - private static final Logger log = LoggerFactory.getLogger(RemoteLogFallbackFactory.class); - - @Override - public RemoteLogService create (Throwable throwable) { - log.error("日志服务调用失败:{}", throwable.getMessage()); - return new RemoteLogService() { - @Override - public Result saveLog (SysOperLog sysOperLog, String source) { - return Result.error("保存操作日志失败:" + throwable.getMessage()); - } - - @Override - public Result saveLogininfor (SysLogininfor sysLogininfor, String source) { - return Result.error("保存登录日志失败:" + throwable.getMessage()); - } - }; - - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteUserFallbackFactory.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteUserFallbackFactory.java deleted file mode 100644 index 75bd839..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/remote/factory/RemoteUserFallbackFactory.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.muyu.net.working.domain.remote.factory; - -import com.muyu.common.core.domain.Result; -import com.muyu.common.system.domain.LoginUser; -import com.muyu.common.system.domain.SysUser; -import com.muyu.common.system.remote.RemoteUserService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.cloud.openfeign.FallbackFactory; -import org.springframework.stereotype.Component; - -/** - * 用户服务降级处理 - * - * @author muyu - */ -@Component -public class RemoteUserFallbackFactory implements FallbackFactory { - private static final Logger log = LoggerFactory.getLogger(RemoteUserFallbackFactory.class); - - @Override - public RemoteUserService create (Throwable throwable) { - log.error("用户服务调用失败:{}", throwable.getMessage()); - return new RemoteUserService() { - @Override - public Result getUserInfo (String username, String source) { - return Result.error("获取用户失败:" + throwable.getMessage()); - } - - @Override - public Result add(SysUser user) { - return Result.error("获取用户失败:{}", throwable.getMessage()); - } - - @Override - public Result registerUserInfo (SysUser sysUser, String source) { - return Result.error("注册用户失败:" + throwable.getMessage()); - } - }; - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/NetworkingApplication.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/NetworkingApplication.java new file mode 100644 index 0000000..3ac951f --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/NetworkingApplication.java @@ -0,0 +1,23 @@ +package com.muyu.networking; + +import com.muyu.common.security.annotation.EnableCustomConfig; +import com.muyu.common.security.annotation.EnableMyFeignClients; +import com.muyu.common.swagger.annotation.EnableCustomSwagger2; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/25 8:45 + */ +@EnableCustomConfig +@EnableCustomSwagger2 +@EnableMyFeignClients +@SpringBootApplication +public class NetworkingApplication { + public static void main(String[] args) { + SpringApplication.run(NetworkingApplication.class, args); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/AddServiceController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/AddServiceController.java new file mode 100644 index 0000000..fdf40b1 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/AddServiceController.java @@ -0,0 +1,98 @@ +package com.muyu.networking.controller; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.web.page.TableDataInfo; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.domain.AddService; +import com.muyu.networking.service.AddServiceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2024-05-25 + */ +@RestController +@RequestMapping("/addService") +public class AddServiceController extends BaseController +{ + @Autowired + private AddServiceService addServiceService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:service:list") + @GetMapping("/list") + public Result> list(AddService addService) + { + startPage(); + List list = addServiceService.selectAddServiceList(addService); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:service:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AddService addService) + { + List list = addServiceService.selectAddServiceList(addService); + ExcelUtil util = new ExcelUtil(AddService.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:service:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(addServiceService.selectAddServiceById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:service:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody AddService addService) + { + return toAjax(addServiceService.insertAddService(addService)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:service:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody AddService addService) + { + return toAjax(addServiceService.updateAddService(addService)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:service:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(addServiceService.deleteAddServiceByIds(ids)); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/CertificationController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/CertificationController.java new file mode 100644 index 0000000..8796092 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/CertificationController.java @@ -0,0 +1,98 @@ +package com.muyu.networking.controller; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.web.page.TableDataInfo; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.domain.Certification; +import com.muyu.networking.service.CertificationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2024-05-25 + */ +@RestController +@RequestMapping("/certification") +public class CertificationController extends BaseController +{ + @Autowired + private CertificationService certificationService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:certification:list") + @GetMapping("/list") + public Result> list(Certification certification) + { + startPage(); + List list = certificationService.selectCertificationList(certification); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:certification:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Certification certification) + { + List list = certificationService.selectCertificationList(certification); + ExcelUtil util = new ExcelUtil(Certification.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:certification:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(certificationService.selectCertificationById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:certification:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody Certification certification) + { + return toAjax(certificationService.insertCertification(certification)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:certification:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody Certification certification) + { + return toAjax(certificationService.updateCertification(certification)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:certification:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(certificationService.deleteCertificationByIds(ids)); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/EnterpriseController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/EnterpriseController.java new file mode 100644 index 0000000..f77c987 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/EnterpriseController.java @@ -0,0 +1,100 @@ +package com.muyu.networking.controller; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.web.page.TableDataInfo; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.domain.Enterprise; +import com.muyu.networking.service.EnterpriseService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2024-05-25 + */ +@RestController +@RequestMapping("/enterprise") +public class EnterpriseController extends BaseController +{ + @Autowired + private EnterpriseService enterpriseService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:enterprise:list") + @GetMapping("/list") + public Result> list(Enterprise enterprise) + { + startPage(); + List list = enterpriseService.selectEnterpriseList(enterprise); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:enterprise:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Enterprise enterprise) + { + List list = enterpriseService.selectEnterpriseList(enterprise); + ExcelUtil util = new ExcelUtil(Enterprise.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:enterprise:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(enterpriseService.selectEnterpriseById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:enterprise:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody Enterprise enterprise) + { + return toAjax(enterpriseService.insertEnterprise(enterprise)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:enterprise:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody Enterprise enterprise) + { + return toAjax(enterpriseService.updateEnterprise(enterprise)); + } + + + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:enterprise:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(enterpriseService.deleteEnterpriseByIds(ids)); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/InformationController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/InformationController.java new file mode 100644 index 0000000..b516054 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/InformationController.java @@ -0,0 +1,98 @@ +package com.muyu.networking.controller; + + +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.web.page.TableDataInfo; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.domain.Information; +import com.muyu.networking.service.IInformationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2024-05-27 + */ +@RestController +@RequestMapping("/information") +public class InformationController extends BaseController +{ + @Autowired + private IInformationService informationService; + + /** + * 查询【请填写功能名称】列表 + */ + + @GetMapping("/list") + public Result> list(Information information) + { + startPage(); + List list = informationService.selectInformationList(information); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Information information) + { + List list = informationService.selectInformationList(information); + ExcelUtil util = new ExcelUtil(Information.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(informationService.selectInformationById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody Information information) + { + return toAjax(informationService.insertInformation(information)); + } + + /** + * 修改【请填写功能名称】 + */ + + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody Information information) + { + return toAjax(informationService.updateInformation(information)); + } + + /** + * 删除【请填写功能名称】 + */ + + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(informationService.deleteInformationByIds(ids)); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/ModeOfPaymentIdController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/ModeOfPaymentIdController.java new file mode 100644 index 0000000..2144c6e --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/ModeOfPaymentIdController.java @@ -0,0 +1,98 @@ +package com.muyu.networking.controller; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.web.page.TableDataInfo; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.domain.ModeOfPayment; +import com.muyu.networking.service.ModeOfPaymentIdService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2024-05-25 + */ +@RestController +@RequestMapping("/id") +public class ModeOfPaymentIdController extends BaseController +{ + @Autowired + private ModeOfPaymentIdService modeOfPaymentIdService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:id:list") + @GetMapping("/list") + public Result> list(ModeOfPayment modeOfPaymentId) + { + startPage(); + List list = modeOfPaymentIdService.selectModeOfPaymentIdList(modeOfPaymentId); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:id:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ModeOfPayment modeOfPaymentId) + { + List list = modeOfPaymentIdService.selectModeOfPaymentIdList(modeOfPaymentId); + ExcelUtil util = new ExcelUtil(ModeOfPayment.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:id:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(modeOfPaymentIdService.selectModeOfPaymentIdById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:id:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody ModeOfPayment modeOfPaymentId) + { + return toAjax(modeOfPaymentIdService.insertModeOfPaymentId(modeOfPaymentId)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:id:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody ModeOfPayment modeOfPaymentId) + { + return toAjax(modeOfPaymentIdService.updateModeOfPaymentId(modeOfPaymentId)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:id:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(modeOfPaymentIdService.deleteModeOfPaymentIdByIds(ids)); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/OpenServiceController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/OpenServiceController.java new file mode 100644 index 0000000..8f7b91b --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/OpenServiceController.java @@ -0,0 +1,98 @@ +package com.muyu.networking.controller; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.web.page.TableDataInfo; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.domain.OpenServiceAdd; +import com.muyu.networking.service.OpenServiceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2024-05-25 + */ +@RestController +@RequestMapping("/service") +public class OpenServiceController extends BaseController +{ + @Autowired + private OpenServiceService openServiceService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:service:list") + @GetMapping("/list") + public Result> list(OpenServiceAdd openService) + { + startPage(); + List list = openServiceService.selectOpenServiceList(openService); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:service:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, OpenServiceAdd openService) + { + List list = openServiceService.selectOpenServiceList(openService); + ExcelUtil util = new ExcelUtil(OpenServiceAdd.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:service:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(openServiceService.selectOpenServiceById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:service:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody OpenServiceAdd openService) + { + return toAjax(openServiceService.insertOpenService(openService)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:service:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody OpenServiceAdd openService) + { + return toAjax(openServiceService.updateOpenService(openService)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:service:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(openServiceService.deleteOpenServiceByIds(ids)); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/PayForController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/PayForController.java new file mode 100644 index 0000000..68fe28f --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/PayForController.java @@ -0,0 +1,98 @@ +package com.muyu.networking.controller; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.web.page.TableDataInfo; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.domain.PayOf; +import com.muyu.networking.service.PayOfService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2024-05-25 + */ +@RestController +@RequestMapping("/for") +public class PayForController extends BaseController +{ + @Autowired + private PayOfService payForService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:for:list") + @GetMapping("/list") + public Result> list(PayOf payFor) + { + startPage(); + List list = payForService.selectPayOfList(payFor); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:for:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, PayOf payFor) + { + List list = payForService.selectPayOfList(payFor); + ExcelUtil util = new ExcelUtil(PayOf.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:for:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(payForService.selectPayOfById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:for:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody PayOf payFor) + { + return toAjax(payForService.insertPayOf(payFor)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:for:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody PayOf payFor) + { + return toAjax(payForService.updatePayOf(payFor)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:for:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(payForService.deletePayOfByIds(ids)); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/TypeController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/TypeController.java new file mode 100644 index 0000000..7fc0b09 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/TypeController.java @@ -0,0 +1,99 @@ +package com.muyu.networking.controller; + + +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.web.page.TableDataInfo; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.domain.Type; +import com.muyu.networking.service.ITypeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2024-05-27 + */ +@RestController +@RequestMapping("/type") +public class TypeController extends BaseController +{ + @Autowired + private ITypeService typeService; + + /** + * 查询【请填写功能名称】列表 + */ + @RequiresPermissions("system:type:list") + @GetMapping("/list") + public Result> list(Type type) + { + startPage(); + List list = typeService.selectTypeList(type); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @RequiresPermissions("system:type:export") + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Type type) + { + List list = typeService.selectTypeList(type); + ExcelUtil util = new ExcelUtil(Type.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @RequiresPermissions("system:type:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(typeService.selectTypeById(id)); + } + + /** + * 新增【请填写功能名称】 + */ + @RequiresPermissions("system:type:add") + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody Type type) + { + return toAjax(typeService.insertType(type)); + } + + /** + * 修改【请填写功能名称】 + */ + @RequiresPermissions("system:type:edit") + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody Type type) + { + return toAjax(typeService.updateType(type)); + } + + /** + * 删除【请填写功能名称】 + */ + @RequiresPermissions("system:type:remove") + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(typeService.deleteTypeByIds(ids)); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/AddServiceMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/AddServiceMapper.java new file mode 100644 index 0000000..c0220ad --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/AddServiceMapper.java @@ -0,0 +1,63 @@ +package com.muyu.networking.mapper; + + +import com.muyu.domain.AddService; + +import java.util.List; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2024-05-25 + */ +public interface AddServiceMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public AddService selectAddServiceById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param addService 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectAddServiceList(AddService addService); + + /** + * 新增【请填写功能名称】 + * + * @param addService 【请填写功能名称】 + * @return 结果 + */ + public int insertAddService(AddService addService); + + /** + * 修改【请填写功能名称】 + * + * @param addService 【请填写功能名称】 + * @return 结果 + */ + public int updateAddService(AddService addService); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteAddServiceById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAddServiceByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/CertificationMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/CertificationMapper.java new file mode 100644 index 0000000..d9cbce2 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/CertificationMapper.java @@ -0,0 +1,63 @@ +package com.muyu.networking.mapper; + + +import com.muyu.domain.Certification; + +import java.util.List; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2024-05-25 + */ +public interface CertificationMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public Certification selectCertificationById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param certification 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectCertificationList(Certification certification); + + /** + * 新增【请填写功能名称】 + * + * @param certification 【请填写功能名称】 + * @return 结果 + */ + public int insertCertification(Certification certification); + + /** + * 修改【请填写功能名称】 + * + * @param certification 【请填写功能名称】 + * @return 结果 + */ + public int updateCertification(Certification certification); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteCertificationById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCertificationByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/EnterpriseMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/EnterpriseMapper.java new file mode 100644 index 0000000..0d40d26 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/EnterpriseMapper.java @@ -0,0 +1,70 @@ +package com.muyu.networking.mapper; + +import com.muyu.domain.Enterprise; + +import java.util.List; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2024-05-25 + */ +public interface EnterpriseMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public Enterprise selectEnterpriseById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param enterprise 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectEnterpriseList(Enterprise enterprise); + + /** + * 新增【请填写功能名称】 + * + * @param enterprise 【请填写功能名称】 + * @return 结果 + */ + public int insertEnterprise(Enterprise enterprise); + + /** + * 修改【请填写功能名称】 + * + * @param enterprise 【请填写功能名称】 + * @return 结果 + */ + public int updateEnterprise(Enterprise enterprise); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteEnterpriseById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteEnterpriseByIds(Long[] ids); + + /** + * 修改开通服务状态 + * */ + public int updateEnterpriseStatus(Long id,String openAdd); + + + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/FenceMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/FenceMapper.java new file mode 100644 index 0000000..5b516f3 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/FenceMapper.java @@ -0,0 +1,18 @@ +package com.muyu.networking.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.muyu.domain.Fences; +import org.apache.ibatis.annotations.Mapper; + +/** + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/31 16:21 + */ +@Mapper +public interface FenceMapper extends BaseMapper { + + int addFeace(Fences fences); + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/InformationMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/InformationMapper.java new file mode 100644 index 0000000..5b5b52e --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/InformationMapper.java @@ -0,0 +1,63 @@ +package com.muyu.networking.mapper; + + +import com.muyu.domain.Information; + +import java.util.List; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2024-05-27 + */ +public interface InformationMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public Information selectInformationById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param information 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectInformationList(Information information); + + /** + * 新增【请填写功能名称】 + * + * @param information 【请填写功能名称】 + * @return 结果 + */ + public int insertInformation(Information information); + + /** + * 修改【请填写功能名称】 + * + * @param information 【请填写功能名称】 + * @return 结果 + */ + public int updateInformation(Information information); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteInformationById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteInformationByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/ModeOfPaymentIdMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/ModeOfPaymentIdMapper.java new file mode 100644 index 0000000..3d43c1d --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/ModeOfPaymentIdMapper.java @@ -0,0 +1,63 @@ +package com.muyu.networking.mapper; + + +import com.muyu.domain.ModeOfPayment; + +import java.util.List; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2024-05-25 + */ +public interface ModeOfPaymentIdMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public ModeOfPayment selectModeOfPaymentIdById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param modeOfPaymentId 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectModeOfPaymentIdList(ModeOfPayment modeOfPaymentId); + + /** + * 新增【请填写功能名称】 + * + * @param modeOfPaymentId 【请填写功能名称】 + * @return 结果 + */ + public int insertModeOfPaymentId(ModeOfPayment modeOfPaymentId); + + /** + * 修改【请填写功能名称】 + * + * @param modeOfPaymentId 【请填写功能名称】 + * @return 结果 + */ + public int updateModeOfPaymentId(ModeOfPayment modeOfPaymentId); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteModeOfPaymentIdById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteModeOfPaymentIdByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/OpenServiceMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/OpenServiceMapper.java new file mode 100644 index 0000000..f702c2a --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/OpenServiceMapper.java @@ -0,0 +1,63 @@ +package com.muyu.networking.mapper; + +import com.muyu.domain.OpenServiceAdd; + +import java.util.List; + + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2024-05-25 + */ +public interface OpenServiceMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public OpenServiceAdd selectOpenServiceById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param openService 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectOpenServiceList(OpenServiceAdd openService); + + /** + * 新增【请填写功能名称】 + * + * @param openService 【请填写功能名称】 + * @return 结果 + */ + public int insertOpenService(OpenServiceAdd openService); + + /** + * 修改【请填写功能名称】 + * + * @param openService 【请填写功能名称】 + * @return 结果 + */ + public int updateOpenService(OpenServiceAdd openService); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteOpenServiceById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteOpenServiceByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/PayOfMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/PayOfMapper.java new file mode 100644 index 0000000..f930474 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/PayOfMapper.java @@ -0,0 +1,62 @@ +package com.muyu.networking.mapper; + +import com.muyu.domain.PayOf; + +import java.util.List; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2024-05-25 + */ +public interface PayOfMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public PayOf selectPayOfById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param PayOf 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectPayOfList(PayOf PayOf); + + /** + * 新增【请填写功能名称】 + * + * @param PayOf 【请填写功能名称】 + * @return 结果 + */ + public int insertPayOf(PayOf PayOf); + + /** + * 修改【请填写功能名称】 + * + * @param PayOf 【请填写功能名称】 + * @return 结果 + */ + public int updatePayOf(PayOf PayOf); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deletePayOfById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deletePayOfByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/TypeMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/TypeMapper.java new file mode 100644 index 0000000..6ccdab4 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/TypeMapper.java @@ -0,0 +1,62 @@ +package com.muyu.networking.mapper; + +import com.muyu.domain.Type; + +import java.util.List; + +/** + * 【请填写功能名称】Mapper接口 + * + * @author ruoyi + * @date 2024-05-27 + */ +public interface TypeMapper +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public Type selectTypeById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param type 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectTypeList(Type type); + + /** + * 新增【请填写功能名称】 + * + * @param type 【请填写功能名称】 + * @return 结果 + */ + public int insertType(Type type); + + /** + * 修改【请填写功能名称】 + * + * @param type 【请填写功能名称】 + * @return 结果 + */ + public int updateType(Type type); + + /** + * 删除【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteTypeById(Long id); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTypeByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/opFen/SysUserNet.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/opFen/SysUserNet.java new file mode 100644 index 0000000..a5af976 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/opFen/SysUserNet.java @@ -0,0 +1,21 @@ +package com.muyu.networking.opFen; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.system.domain.SysUser; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +/** + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/27 15:11 + */ +@FeignClient("muyu-system") +public interface SysUserNet { + + @PostMapping("/system/user") + public Result add (@Validated @RequestBody SysUser user); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/AddServiceService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/AddServiceService.java new file mode 100644 index 0000000..3007a55 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/AddServiceService.java @@ -0,0 +1,63 @@ +package com.muyu.networking.service; + + +import com.muyu.domain.AddService; + +import java.util.List; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2024-05-25 + */ +public interface AddServiceService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public AddService selectAddServiceById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param addService 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectAddServiceList(AddService addService); + + /** + * 新增【请填写功能名称】 + * + * @param addService 【请填写功能名称】 + * @return 结果 + */ + public int insertAddService(AddService addService); + + /** + * 修改【请填写功能名称】 + * + * @param addService 【请填写功能名称】 + * @return 结果 + */ + public int updateAddService(AddService addService); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteAddServiceByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteAddServiceById(Long id); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/CertificationService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/CertificationService.java new file mode 100644 index 0000000..bae4ad1 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/CertificationService.java @@ -0,0 +1,63 @@ +package com.muyu.networking.service; + + +import com.muyu.domain.Certification; + +import java.util.List; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2024-05-25 + */ +public interface CertificationService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public Certification selectCertificationById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param certification 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectCertificationList(Certification certification); + + /** + * 新增【请填写功能名称】 + * + * @param certification 【请填写功能名称】 + * @return 结果 + */ + public int insertCertification(Certification certification); + + /** + * 修改【请填写功能名称】 + * + * @param certification 【请填写功能名称】 + * @return 结果 + */ + public int updateCertification(Certification certification); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteCertificationByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteCertificationById(Long id); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/EnterpriseService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/EnterpriseService.java new file mode 100644 index 0000000..ff3f7dd --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/EnterpriseService.java @@ -0,0 +1,70 @@ +package com.muyu.networking.service; +import com.muyu.domain.Enterprise; + +import java.util.List; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2024-05-25 + */ +public interface EnterpriseService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public Enterprise selectEnterpriseById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param enterprise 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectEnterpriseList(Enterprise enterprise); + + /** + * 新增【请填写功能名称】 + * + * @param enterprise 【请填写功能名称】 + * @return 结果 + */ + public int insertEnterprise(Enterprise enterprise); + + /** + * 修改【请填写功能名称】 + * + * @param enterprise 【请填写功能名称】 + * @return 结果 + */ + public int updateEnterprise(Enterprise enterprise); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteEnterpriseByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteEnterpriseById(Long id); + + + /** + * 修改服务开通的状态 + * **/ + public int updateEnterpriseStatus(Long id,String openAdd); + + + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/FenceService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/FenceService.java new file mode 100644 index 0000000..245ebb8 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/FenceService.java @@ -0,0 +1,16 @@ +package com.muyu.networking.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.muyu.domain.Fences; + +/** + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/31 16:22 + */ +public interface FenceService extends IService { + + int insertFence(Fences fences); + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/IInformationService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/IInformationService.java new file mode 100644 index 0000000..7297cb2 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/IInformationService.java @@ -0,0 +1,64 @@ +package com.muyu.networking.service; + + +import com.baomidou.mybatisplus.extension.service.IService; +import com.muyu.domain.Information; + +import java.util.List; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2024-05-27 + */ +public interface IInformationService extends IService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public Information selectInformationById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param information 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectInformationList(Information information); + + /** + * 新增【请填写功能名称】 + * + * @param information 【请填写功能名称】 + * @return 结果 + */ + public int insertInformation(Information information); + + /** + * 修改【请填写功能名称】 + * + * @param information 【请填写功能名称】 + * @return 结果 + */ + public int updateInformation(Information information); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteInformationByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteInformationById(Long id); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ITypeService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ITypeService.java new file mode 100644 index 0000000..dcdc008 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ITypeService.java @@ -0,0 +1,63 @@ +package com.muyu.networking.service; + + +import com.muyu.domain.Type; + +import java.util.List; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2024-05-27 + */ +public interface ITypeService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public Type selectTypeById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param type 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectTypeList(Type type); + + /** + * 新增【请填写功能名称】 + * + * @param type 【请填写功能名称】 + * @return 结果 + */ + public int insertType(Type type); + + /** + * 修改【请填写功能名称】 + * + * @param type 【请填写功能名称】 + * @return 结果 + */ + public int updateType(Type type); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteTypeByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteTypeById(Long id); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ModeOfPaymentIdService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ModeOfPaymentIdService.java new file mode 100644 index 0000000..c783389 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ModeOfPaymentIdService.java @@ -0,0 +1,63 @@ +package com.muyu.networking.service; + + +import com.muyu.domain.ModeOfPayment; + +import java.util.List; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2024-05-25 + */ +public interface ModeOfPaymentIdService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public ModeOfPayment selectModeOfPaymentIdById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param modeOfPaymentId 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectModeOfPaymentIdList(ModeOfPayment modeOfPaymentId); + + /** + * 新增【请填写功能名称】 + * + * @param modeOfPaymentId 【请填写功能名称】 + * @return 结果 + */ + public int insertModeOfPaymentId(ModeOfPayment modeOfPaymentId); + + /** + * 修改【请填写功能名称】 + * + * @param modeOfPaymentId 【请填写功能名称】 + * @return 结果 + */ + public int updateModeOfPaymentId(ModeOfPayment modeOfPaymentId); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteModeOfPaymentIdByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteModeOfPaymentIdById(Long id); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/OpenServiceService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/OpenServiceService.java new file mode 100644 index 0000000..d606ee8 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/OpenServiceService.java @@ -0,0 +1,63 @@ +package com.muyu.networking.service; + + +import com.muyu.domain.OpenServiceAdd; + +import java.util.List; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2024-05-25 + */ +public interface OpenServiceService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public OpenServiceAdd selectOpenServiceById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param openService 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectOpenServiceList(OpenServiceAdd openService); + + /** + * 新增【请填写功能名称】 + * + * @param openService 【请填写功能名称】 + * @return 结果 + */ + public int insertOpenService(OpenServiceAdd openService); + + /** + * 修改【请填写功能名称】 + * + * @param openService 【请填写功能名称】 + * @return 结果 + */ + public int updateOpenService(OpenServiceAdd openService); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deleteOpenServiceByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deleteOpenServiceById(Long id); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/PayOfService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/PayOfService.java new file mode 100644 index 0000000..9d94ff8 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/PayOfService.java @@ -0,0 +1,63 @@ +package com.muyu.networking.service; + + +import com.muyu.domain.PayOf; + +import java.util.List; + +/** + * 【请填写功能名称】Service接口 + * + * @author ruoyi + * @date 2024-05-25 + */ +public interface PayOfService +{ + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + public PayOf selectPayOfById(Long id); + + /** + * 查询【请填写功能名称】列表 + * + * @param PayOf 【请填写功能名称】 + * @return 【请填写功能名称】集合 + */ + public List selectPayOfList(PayOf PayOf); + + /** + * 新增【请填写功能名称】 + * + * @param PayOf 【请填写功能名称】 + * @return 结果 + */ + public int insertPayOf(PayOf PayOf); + + /** + * 修改【请填写功能名称】 + * + * @param PayOf 【请填写功能名称】 + * @return 结果 + */ + public int updatePayOf(PayOf PayOf); + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键集合 + * @return 结果 + */ + public int deletePayOfByIds(Long[] ids); + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + public int deletePayOfById(Long id); +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/AddServiceServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/AddServiceServiceImpl.java new file mode 100644 index 0000000..b0f3a3d --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/AddServiceServiceImpl.java @@ -0,0 +1,97 @@ +package com.muyu.networking.service.impl; + +import com.muyu.common.core.utils.DateUtils; +import com.muyu.domain.AddService; +import com.muyu.networking.mapper.AddServiceMapper; +import com.muyu.networking.service.AddServiceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2024-05-25 + */ +@Service +public class AddServiceServiceImpl implements AddServiceService +{ + @Autowired + private AddServiceMapper addServiceMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public AddService selectAddServiceById(Long id) + { + return addServiceMapper.selectAddServiceById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param addService 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectAddServiceList(AddService addService) + { + return addServiceMapper.selectAddServiceList(addService); + } + + /** + * 新增【请填写功能名称】 + * + * @param addService 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertAddService(AddService addService) + { + addService.setCreateTime(DateUtils.getNowDate()); + return addServiceMapper.insertAddService(addService); + } + + /** + * 修改【请填写功能名称】 + * + * @param addService 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateAddService(AddService addService) + { + addService.setUpdateTime(DateUtils.getNowDate()); + return addServiceMapper.updateAddService(addService); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteAddServiceByIds(Long[] ids) + { + return addServiceMapper.deleteAddServiceByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteAddServiceById(Long id) + { + return addServiceMapper.deleteAddServiceById(id); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/CertificationServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/CertificationServiceImpl.java new file mode 100644 index 0000000..9023eb0 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/CertificationServiceImpl.java @@ -0,0 +1,99 @@ +package com.muyu.networking.service.impl; + + +import com.muyu.common.core.utils.DateUtils; +import com.muyu.domain.Certification; +import com.muyu.networking.mapper.CertificationMapper; +import com.muyu.networking.service.CertificationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2024-05-25 + */ +@Service +public class CertificationServiceImpl implements CertificationService +{ + @Autowired + private CertificationMapper certificationMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public Certification selectCertificationById(Long id) + { + return certificationMapper.selectCertificationById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param certification 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectCertificationList(Certification certification) + { + return certificationMapper.selectCertificationList(certification); + } + + /** + * 新增【请填写功能名称】 + * + * @param certification 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertCertification(Certification certification) + { + certification.setCreateTime(DateUtils.getNowDate()); + return certificationMapper.insertCertification(certification); + } + + /** + * 修改【请填写功能名称】 + * + * @param certification 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateCertification(Certification certification) + { + certification.setUpdateTime(DateUtils.getNowDate()); + return certificationMapper.updateCertification(certification); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteCertificationByIds(Long[] ids) + { + return certificationMapper.deleteCertificationByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteCertificationById(Long id) + { + return certificationMapper.deleteCertificationById(id); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/EnterpriseServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/EnterpriseServiceImpl.java new file mode 100644 index 0000000..f870ba8 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/EnterpriseServiceImpl.java @@ -0,0 +1,247 @@ +package com.muyu.networking.service.impl; + + +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.DateUtils; +import com.muyu.common.security.utils.SecurityUtils; +import com.muyu.common.system.domain.SysUser; +import com.muyu.common.system.remote.RemoteUserService; +import com.muyu.domain.Enterprise; +import com.muyu.networking.mapper.EnterpriseMapper; +import com.muyu.networking.service.EnterpriseService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.UUID; + + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2024-05-25 + */ +@Service +public class EnterpriseServiceImpl implements EnterpriseService +{ + @Autowired + private EnterpriseMapper enterpriseMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public Enterprise selectEnterpriseById(Long id) + { + return enterpriseMapper.selectEnterpriseById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param enterprise 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectEnterpriseList(Enterprise enterprise) + { + return enterpriseMapper.selectEnterpriseList(enterprise); + } + @Autowired + private RemoteUserService remoteUserService; + /** + * 新增【请填写功能名称】 + * + * @param enterprise 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertEnterprise(Enterprise enterprise) + { + enterprise.setCreateBy(SecurityUtils.getUsername()); + enterprise.setCreateTime(DateUtils.getNowDate()); + enterprise.setBusinessLicenseNumber(UUID.randomUUID().toString().replaceAll("-","")); + enterprise.setStatus("1"); + enterprise.setCertification("1"); + enterprise.setOpenAdd("0"); + SysUser sysUser = SysUser.builder().userName(enterprise.getEnterpriseName()) + .password("admin") + .nickName(enterprise.getEnterpriseName()). + userType(String.valueOf(enterprise.getId())) + .build(); + Result add = remoteUserService.add(sysUser); + return enterpriseMapper.insertEnterprise(enterprise); + } + /** + * 修改【请填写功能名称】 + * + * @param enterprise 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateEnterprise(Enterprise enterprise) + { + enterprise.setUpdateTime(DateUtils.getNowDate()); + return enterpriseMapper.updateEnterprise(enterprise); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteEnterpriseByIds(Long[] ids) + { + return enterpriseMapper.deleteEnterpriseByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteEnterpriseById(Long id) + { + return enterpriseMapper.deleteEnterpriseById(id); + } + + @Override + public int updateEnterpriseStatus(Long id, String openAdd) { + if (enterpriseMapper.updateEnterpriseStatus(id, openAdd) > 0) { + return 1; + } + return 0; + } + + +//public void DockerMySQLExample() throws IOException { +// //配置docker 客户端配置 +// DefaultDockerClientConfig.createDefaultConfigBuilder() +// .withDockerHost("tcp://115.159.67.205:3306") // 使用Docker守护进程地址 +// .build(); +// DockerClient dockerClient = DockerClientBuilder.getInstance().build(); +// +// try { +// CreateContainerCmd createContainerCmd = dockerClient.createContainerCmd("mysql:latest") +// .withName("my-mysql-container") +// .withEnv("MYSQL_ROOT_PASSWORD=my-secret-pw"); +// CreateContainerResponse container = createContainerCmd.exec(); +// System.out.println("Created container " + container.getId()); +// dockerClient.startContainerCmd(container.getId()).exec(); +// InspectContainerResponse inspectContainerResponse = dockerClient.inspectContainerCmd(container.getId()).exec(); +// System.out.println("Started container " + container.getId()); +// System.out.println("Container started, inspecting logs:"); +// InputStream logs = dockerClient.logContainerCmd(container.getId()) +// .withStdErr(true) +// .withStdOut(true) +// .withFollowStream(true) +// .exec(); +// try (BufferedReader reader = new BufferedReader(new InputStreamReader(logs))) { +// String line; +// while ((line = reader.readLine()) != null) { +// System.out.println(line); +// } +// } +// ExecCreateCmdResponse execCreateCmdResponse = dockerClient.execCreateCmd(container.getId()) +// .withCmd("mysql", "-u", "root", "-p", "my-secret-pw", "my_database") +// .exec(); +// } +// catch (Exception e) { +// e.printStackTrace(); +// } +// dockerClient.close(); +//} + + + + + + + + +// public void DockerMySQLExample() throws IOException { +// // 配置Docker客户端 +// DefaultDockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder() +// .withDockerHost("tcp://115.159.67.205:3306") // 使用Docker守护进程地址 +// .build(); +// DockerClient dockerClient = DockerClientBuilder.getInstance(config).build(); +// +// try { +// // 创建新的MySQL容器 +// CreateContainerCmd createContainerCmd = dockerClient.createContainerCmd("mysql:latest") +// .withName("my-mysql-container") +// .withEnv("MYSQL_ROOT_PASSWORD=my-secret-pw"); +// +// CreateContainerResponse container = createContainerCmd.exec(); +// System.out.println("Created container " + container.getId()); +// +// // 启动MySQL容器 +// dockerClient.startContainerCmd(container.getId()).exec(); +// +// // 执行初始化脚本 +// String initScript = "CREATE DATABASE IF NOT EXISTS mydb;\n" + +// "GRANT ALL PRIVILEGES ON mydb.* TO 'myuser' IDENTIFIED BY 'mypass';"; +// +// // 获取容器的进程信息 +// InspectContainerResponse inspectContainerResponse = dockerClient.inspectContainerCmd(container.getId()).exec(); +// String containerId = inspectContainerResponse.getId(); +// +// // 将初始化脚本通过stdin传递给MySQL +// String execId = dockerClient.execCreateCmd(containerId, "/bin/bash", "-c", "mysql -u root -p$MYSQL_ROOT_PASSWORD") +// .withAttachStdout(true) +// .withAttachStdin(true) +// .exec() +// .getId(); +// +// try (ExecStartResultCallback callback = new ExecStartResultCallback()) { +// +// InputStream execStream = dockerClient.execStartCmd(execId).withDetach(false) +// .withTty(false) +// .withCmd(initScript) +// .exec() +// .getExecResult() +// .getStdout(); +// +// // 读取并打印脚本执行结果 +// BufferedReader reader = new BufferedReader(new InputStreamReader(execStream)); +// String line; +// while ((line = reader.readLine()) != null) { +// System.out.println(line); +// } +// } +// } catch (Exception e) { +// e.printStackTrace(); +// } finally { +// // 清理资源,移除容器 +// dockerClient.close(); +// } +// } + + + + + + + + + + + + + + + + + + + } + + diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/FenceServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/FenceServiceImpl.java new file mode 100644 index 0000000..ee35916 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/FenceServiceImpl.java @@ -0,0 +1,21 @@ +package com.muyu.networking.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.muyu.domain.Fences; +import com.muyu.networking.mapper.FenceMapper; +import com.muyu.networking.service.FenceService; + +/** + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/31 16:23 + */ +public class FenceServiceImpl extends ServiceImpl implements FenceService { + + + @Override + public int insertFence(Fences fences) { + return 0; + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/InformationServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/InformationServiceImpl.java new file mode 100644 index 0000000..3263937 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/InformationServiceImpl.java @@ -0,0 +1,100 @@ +package com.muyu.networking.service.impl; + +import com.muyu.common.core.utils.DateUtils; +import com.muyu.domain.Information; +import com.muyu.networking.mapper.InformationMapper; +import com.muyu.networking.service.IInformationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2024-05-27 + */ +@Service +public class InformationServiceImpl implements IInformationService +{ + @Autowired + private InformationMapper informationMapper; + + + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public Information selectInformationById(Long id) + { + return informationMapper.selectInformationById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param information 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectInformationList(Information information) + { + return informationMapper.selectInformationList(information); + } + + /** + * 新增【请填写功能名称】 + * + * @param information 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertInformation(Information information) + { + information.setCreateTime(DateUtils.getNowDate()); + return informationMapper.insertInformation(information); + } + + /** + * 修改【请填写功能名称】 + * + * @param information 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateInformation(Information information) + { + information.setUpdateTime(DateUtils.getNowDate()); + return informationMapper.updateInformation(information); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteInformationByIds(Long[] ids) + { + return informationMapper.deleteInformationByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteInformationById(Long id) + { + return informationMapper.deleteInformationById(id); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/ModeOfPaymentIdServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/ModeOfPaymentIdServiceImpl.java new file mode 100644 index 0000000..ba379ae --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/ModeOfPaymentIdServiceImpl.java @@ -0,0 +1,99 @@ +package com.muyu.networking.service.impl; + + +import com.muyu.common.core.utils.DateUtils; +import com.muyu.domain.ModeOfPayment; +import com.muyu.networking.mapper.ModeOfPaymentIdMapper; +import com.muyu.networking.service.ModeOfPaymentIdService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2024-05-25 + */ +@Service +public class ModeOfPaymentIdServiceImpl implements ModeOfPaymentIdService +{ + @Autowired + private ModeOfPaymentIdMapper modeOfPaymentIdMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public ModeOfPayment selectModeOfPaymentIdById(Long id) + { + return modeOfPaymentIdMapper.selectModeOfPaymentIdById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param modeOfPaymentId 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectModeOfPaymentIdList(ModeOfPayment modeOfPaymentId) + { + return modeOfPaymentIdMapper.selectModeOfPaymentIdList(modeOfPaymentId); + } + + /** + * 新增【请填写功能名称】 + * + * @param modeOfPaymentId 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertModeOfPaymentId(ModeOfPayment modeOfPaymentId) + { + modeOfPaymentId.setCreateTime(DateUtils.getNowDate()); + return modeOfPaymentIdMapper.insertModeOfPaymentId(modeOfPaymentId); + } + + /** + * 修改【请填写功能名称】 + * + * @param modeOfPaymentId 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateModeOfPaymentId(ModeOfPayment modeOfPaymentId) + { + modeOfPaymentId.setUpdateTime(DateUtils.getNowDate()); + return modeOfPaymentIdMapper.updateModeOfPaymentId(modeOfPaymentId); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteModeOfPaymentIdByIds(Long[] ids) + { + return modeOfPaymentIdMapper.deleteModeOfPaymentIdByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteModeOfPaymentIdById(Long id) + { + return modeOfPaymentIdMapper.deleteModeOfPaymentIdById(id); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/OpenServiceServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/OpenServiceServiceImpl.java new file mode 100644 index 0000000..6d1dcb0 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/OpenServiceServiceImpl.java @@ -0,0 +1,98 @@ +package com.muyu.networking.service.impl; + +import com.muyu.common.core.utils.DateUtils; +import com.muyu.domain.OpenServiceAdd; +import com.muyu.networking.mapper.OpenServiceMapper; +import com.muyu.networking.service.OpenServiceService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2024-05-25 + */ +@Service +public class OpenServiceServiceImpl implements OpenServiceService +{ + @Autowired + private OpenServiceMapper openServiceMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public OpenServiceAdd selectOpenServiceById(Long id) + { + return openServiceMapper.selectOpenServiceById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param openService 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectOpenServiceList(OpenServiceAdd openService) + { + return openServiceMapper.selectOpenServiceList(openService); + } + + /** + * 新增【请填写功能名称】 + * + * @param openService 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertOpenService(OpenServiceAdd openService) + { + openService.setCreateTime(DateUtils.getNowDate()); + return openServiceMapper.insertOpenService(openService); + } + + /** + * 修改【请填写功能名称】 + * + * @param openService 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateOpenService(OpenServiceAdd openService) + { + openService.setUpdateTime(DateUtils.getNowDate()); + return openServiceMapper.updateOpenService(openService); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteOpenServiceByIds(Long[] ids) + { + return openServiceMapper.deleteOpenServiceByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteOpenServiceById(Long id) + { + return openServiceMapper.deleteOpenServiceById(id); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/PayOfServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/PayOfServiceImpl.java new file mode 100644 index 0000000..58cbf2b --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/PayOfServiceImpl.java @@ -0,0 +1,98 @@ +package com.muyu.networking.service.impl; + +import com.muyu.common.core.utils.DateUtils; +import com.muyu.domain.PayOf; +import com.muyu.networking.mapper.PayOfMapper; +import com.muyu.networking.service.PayOfService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2024-05-25 + */ +@Service +public class PayOfServiceImpl implements PayOfService +{ + @Autowired + private PayOfMapper payOfMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public PayOf selectPayOfById(Long id) + { + return payOfMapper.selectPayOfById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param PayOf 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectPayOfList(PayOf PayOf) + { + return payOfMapper.selectPayOfList(PayOf); + } + + /** + * 新增【请填写功能名称】 + * + * @param PayOf 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertPayOf(PayOf PayOf) + { + PayOf.setCreateTime(DateUtils.getNowDate()); + return payOfMapper.insertPayOf(PayOf); + } + + /** + * 修改【请填写功能名称】 + * + * @param PayOf 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updatePayOf(PayOf PayOf) + { + PayOf.setUpdateTime(DateUtils.getNowDate()); + return payOfMapper.updatePayOf(PayOf); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deletePayOfByIds(Long[] ids) + { + return payOfMapper.deletePayOfByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deletePayOfById(Long id) + { + return payOfMapper.deletePayOfById(id); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/TypeServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/TypeServiceImpl.java new file mode 100644 index 0000000..5d33126 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/TypeServiceImpl.java @@ -0,0 +1,99 @@ +package com.muyu.networking.service.impl; + + +import com.muyu.common.core.utils.DateUtils; +import com.muyu.domain.Type; +import com.muyu.networking.mapper.TypeMapper; +import com.muyu.networking.service.ITypeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + + +/** + * 【请填写功能名称】Service业务层处理 + * + * @author ruoyi + * @date 2024-05-27 + */ +@Service +public class TypeServiceImpl implements ITypeService +{ + @Autowired + private TypeMapper typeMapper; + + /** + * 查询【请填写功能名称】 + * + * @param id 【请填写功能名称】主键 + * @return 【请填写功能名称】 + */ + @Override + public Type selectTypeById(Long id) + { + return typeMapper.selectTypeById(id); + } + + /** + * 查询【请填写功能名称】列表 + * + * @param type 【请填写功能名称】 + * @return 【请填写功能名称】 + */ + @Override + public List selectTypeList(Type type) + { + return typeMapper.selectTypeList(type); + } + + /** + * 新增【请填写功能名称】 + * + * @param type 【请填写功能名称】 + * @return 结果 + */ + @Override + public int insertType(Type type) + { + type.setCreateTime(DateUtils.getNowDate()); + return typeMapper.insertType(type); + } + + /** + * 修改【请填写功能名称】 + * + * @param type 【请填写功能名称】 + * @return 结果 + */ + @Override + public int updateType(Type type) + { + type.setUpdateTime(DateUtils.getNowDate()); + return typeMapper.updateType(type); + } + + /** + * 批量删除【请填写功能名称】 + * + * @param ids 需要删除的【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteTypeByIds(Long[] ids) + { + return typeMapper.deleteTypeByIds(ids); + } + + /** + * 删除【请填写功能名称】信息 + * + * @param id 【请填写功能名称】主键 + * @return 结果 + */ + @Override + public int deleteTypeById(Long id) + { + return typeMapper.deleteTypeById(id); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/AddServiceMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/AddServiceMapper.xml new file mode 100644 index 0000000..813e61f --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/AddServiceMapper.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + select id, add_value, remark, create_by, create_time, update_time, update_by from add_service + + + + + + + + insert into add_service + + add_value, + remark, + create_by, + create_time, + update_time, + update_by, + + + #{addValue}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateTime}, + #{updateBy}, + + + + + update add_service + + add_value = #{addValue}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_time = #{updateTime}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from add_service where id = #{id} + + + + delete from add_service where id in + + #{id} + + + diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/CertificationMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/CertificationMapper.xml new file mode 100644 index 0000000..5718ea6 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/CertificationMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + select id, auditor, stat, audit_reason, remark, create_by, create_time, update_by, update_time from certification + + + + + + + + insert into certification + + auditor, + stat, + audit_reason, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{auditor}, + #{stat}, + #{auditReason}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update certification + + auditor = #{auditor}, + stat = #{stat}, + audit_reason = #{auditReason}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from certification where id = #{id} + + + + delete from certification where id in + + #{id} + + + diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/EnterpriseMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/EnterpriseMapper.xml new file mode 100644 index 0000000..f09838e --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/EnterpriseMapper.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, enterprise_name,open_add, legal_person, business_license_number, establishment_date, business_scope, address, contact_phone, email, status, registration_date, certification, remark, create_by, create_time, update_time, update_by from enterprise + + + + + + + + insert into enterprise + + enterprise_name, + legal_person, + business_license_number, + establishment_date, + business_scope, + address, + contact_phone, + email, + status, + registration_date, + certification, + remark, + create_by, + create_time, + update_time, + update_by, + open_add, + + + #{enterpriseName}, + #{legalPerson}, + #{businessLicenseNumber}, + #{establishmentDate}, + #{businessScope}, + #{address}, + #{contactPhone}, + #{email}, + #{status}, + #{registrationDate}, + #{certification}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateTime}, + #{updateBy}, + #{openAdd}, + + + + + update enterprise + + enterprise_name = #{enterpriseName}, + legal_person = #{legalPerson}, + business_license_number = #{businessLicenseNumber}, + establishment_date = #{establishmentDate}, + business_scope = #{businessScope}, + address = #{address}, + contact_phone = #{contactPhone}, + email = #{email}, + status = #{status}, + registration_date = #{registrationDate}, + certification = #{certification}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_time = #{updateTime}, + update_by = #{updateBy}, + open_add = #{openAdd}, + + where id = #{id} + + + update enterprise set open_add = #{openAdd} where id = #{id} + + + + delete from enterprise where id = #{id} + + + + delete from enterprise where id in + + #{id} + + + diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/InformationMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/InformationMapper.xml new file mode 100644 index 0000000..9181320 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/InformationMapper.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + select id, number, type_id, electronic_id, motor, battery, motor_number, battery_number, enterprise_id, remark, create_by, create_time, update_time from information + + + + + + + + insert into information + + number, + type_id, + electronic_id, + motor, + battery, + motor_number, + battery_number, + enterprise_id, + remark, + create_by, + create_time, + update_time, + + + #{number}, + #{typeId}, + #{electronicId}, + #{motor}, + #{battery}, + #{motorNumber}, + #{batteryNumber}, + #{enterpriseId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateTime}, + + + + + update information + + number = #{number}, + type_id = #{typeId}, + electronic_id = #{electronicId}, + motor = #{motor}, + battery = #{battery}, + motor_number = #{motorNumber}, + battery_number = #{batteryNumber}, + enterprise_id = #{enterpriseId}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from information where id = #{id} + + + + delete from information where id in + + #{id} + + + diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/ModeOfPaymentIdMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/ModeOfPaymentIdMapper.xml new file mode 100644 index 0000000..e9c171e --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/ModeOfPaymentIdMapper.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + select id, payment, remark, create_by, create_time, update_time, update_by from mode_of_payment_id + + + + + + + + insert into mode_of_payment_id + + payment, + remark, + create_by, + create_time, + update_time, + update_by, + + + #{payment}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateTime}, + #{updateBy}, + + + + + update mode_of_payment_id + + payment = #{payment}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_time = #{updateTime}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from mode_of_payment_id where id = #{id} + + + + delete from mode_of_payment_id where id in + + #{id} + + + diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/OpenServiceMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/OpenServiceMapper.xml new file mode 100644 index 0000000..26c162b --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/OpenServiceMapper.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + select id, activate_the_service, remark, create_by, create_time, update_time, update_by from open_service + + + + + + + + insert into open_service + + activate_the_service, + remark, + create_by, + create_time, + update_time, + update_by, + + + #{activateTheService}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateTime}, + #{updateBy}, + + + + + update open_service + + activate_the_service = #{activateTheService}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_time = #{updateTime}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from open_service where id = #{id} + + + + delete from open_service where id in + + #{id} + + + diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/PayForMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/PayForMapper.xml new file mode 100644 index 0000000..951f496 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/PayForMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + select id, enterprise_id, mode_of_payment_id, price, remark, create_by, create_time, update_time, update_by from pay_for + + + + + + + + insert into pay_for + + enterprise_id, + mode_of_payment_id, + price, + remark, + create_by, + create_time, + update_time, + update_by, + + + #{enterpriseId}, + #{modeOfPaymentId}, + #{price}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateTime}, + #{updateBy}, + + + + + update pay_for + + enterprise_id = #{enterpriseId}, + mode_of_payment_id = #{modeOfPaymentId}, + price = #{price}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_time = #{updateTime}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from pay_for where id = #{id} + + + + delete from pay_for where id in + + #{id} + + + diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/TypeMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/TypeMapper.xml new file mode 100644 index 0000000..42c7e43 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/TypeMapper.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + select id, type_name, remark, create_by, create_time, update_time, update_by from type + + + + + + + + insert into type + + id, + type_name, + remark, + create_by, + create_time, + update_time, + update_by, + + + #{id}, + #{typeName}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateTime}, + #{updateBy}, + + + + + update type + + type_name = #{typeName}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_time = #{updateTime}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from type where id = #{id} + + + + delete from type where id in + + #{id} + + + From 2b7c46093f2206c0e90204e963e8a64dec5c89d7 Mon Sep 17 00:00:00 2001 From: Jiang Peng <2622360564@qq.com> Date: Mon, 3 Jun 2024 21:12:05 +0800 Subject: [PATCH 3/7] =?UTF-8?q?feat():=E8=BF=90=E8=90=A5=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?/=E5=AE=A2=E6=88=B7=E4=B8=9A=E5=8A=A1=E7=B3=BB=E7=BB=9F(?= =?UTF-8?q?=E5=AE=8C=E5=96=84)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../muyu-customer-business-client/pom.xml | 20 + .../muyu-customer-business-common/pom.xml | 32 ++ .../muyu/customer/business/domain/Fence.java | 89 ++++ .../customer/business/domain/Vehicle.java | 197 +++++++++ .../business/domain/req/FenceEditReq.java | 38 ++ .../business/domain/req/FenceQueryReq.java | 38 ++ .../business/domain/req/FenceSaveReq.java | 46 +++ .../business/domain/req/VehicleEditReq.java | 91 +++++ .../business/domain/req/VehicleQueryReq.java | 91 +++++ .../business/domain/req/VehicleSaveReq.java | 111 +++++ .../muyu-customer-business-remote/pom.xml | 20 + .../muyu-customer-business-server/pom.xml | 116 ++++++ .../MuYuCustomerBusinessApplication.java | 23 ++ .../business/controller/FenceController.java | 111 +++++ .../controller/VehicleController.java | 111 +++++ .../customer/business/mapper/FenceMapper.java | 15 + .../business/mapper/VehicleMapper.java | 15 + .../business/service/FenceService.java | 22 + .../business/service/VehicleService.java | 22 + .../service/impl/FenceServiceImpl.java | 53 +++ .../service/impl/VehicleServiceImpl.java | 101 +++++ .../src/main/resources/banner.txt | 2 + .../src/main/resources/bootstrap.yml | 29 ++ .../src/main/resources/logback.xml | 74 ++++ .../mapper/customerBusiness/FenceMapper.xml | 22 + .../mapper/customerBusiness/VehicleMapper.xml | 34 ++ muyu-modules/muyu-customer-business/pom.xml | 27 ++ .../muyu/net/working/domain/AddService.java | 33 -- .../net/working/domain/Certification.java | 38 -- .../muyu/net/working/domain/Enterprise.java | 383 ++++++++---------- .../muyu/net/working/domain/FenceGroups.java | 33 -- .../com/muyu/net/working/domain/Fences.java | 60 --- .../muyu/net/working/domain/Information.java | 161 -------- .../net/working/domain/ModeOfPayment.java | 31 -- .../net/working/domain/OpenServiceAdd.java | 34 -- .../com/muyu/net/working/domain/PayOf.java | 37 -- .../com/muyu/net/working/domain/Type.java | 64 --- .../com/muyu/net/working/domain/Vehicle.java | 35 -- .../working/domain/req/EnterpriseEditReq.java | 91 +++++ .../domain/req/EnterpriseQueryReq.java | 91 +++++ .../working/domain/req/EnterpriseSaveReq.java | 111 +++++ .../working/MuYuNetWorkingApplication.java} | 16 +- .../controller/EnterpriseController.java | 111 +++++ .../net/working/mapper/EnterpriseMapper.java | 15 + .../working/service/EnterpriseService.java | 22 + .../service/impl/EnterpriseServiceImpl.java | 101 +++++ .../controller/AddServiceController.java | 98 ----- .../controller/CertificationController.java | 98 ----- .../controller/EnterpriseController.java | 100 ----- .../controller/InformationController.java | 98 ----- .../controller/ModeOfPaymentIdController.java | 98 ----- .../controller/OpenServiceController.java | 98 ----- .../controller/PayForController.java | 98 ----- .../networking/controller/TypeController.java | 99 ----- .../networking/mapper/AddServiceMapper.java | 63 --- .../mapper/CertificationMapper.java | 63 --- .../networking/mapper/EnterpriseMapper.java | 70 ---- .../muyu/networking/mapper/FenceMapper.java | 18 - .../networking/mapper/InformationMapper.java | 63 --- .../mapper/ModeOfPaymentIdMapper.java | 63 --- .../networking/mapper/OpenServiceMapper.java | 63 --- .../muyu/networking/mapper/PayOfMapper.java | 62 --- .../muyu/networking/mapper/TypeMapper.java | 62 --- .../com/muyu/networking/opFen/SysUserNet.java | 21 - .../networking/service/AddServiceService.java | 63 --- .../service/CertificationService.java | 63 --- .../networking/service/EnterpriseService.java | 70 ---- .../muyu/networking/service/FenceService.java | 16 - .../service/IInformationService.java | 64 --- .../muyu/networking/service/ITypeService.java | 63 --- .../service/ModeOfPaymentIdService.java | 63 --- .../service/OpenServiceService.java | 63 --- .../muyu/networking/service/PayOfService.java | 63 --- .../service/impl/AddServiceServiceImpl.java | 97 ----- .../impl/CertificationServiceImpl.java | 99 ----- .../service/impl/EnterpriseServiceImpl.java | 247 ----------- .../service/impl/FenceServiceImpl.java | 21 - .../service/impl/InformationServiceImpl.java | 100 ----- .../impl/ModeOfPaymentIdServiceImpl.java | 99 ----- .../service/impl/OpenServiceServiceImpl.java | 98 ----- .../service/impl/PayOfServiceImpl.java | 98 ----- .../service/impl/TypeServiceImpl.java | 99 ----- .../resources/mapper/AddServiceMapper.xml | 76 ---- .../resources/mapper/CertificationMapper.xml | 86 ---- .../resources/mapper/EnterpriseMapper.xml | 134 ------ .../resources/mapper/InformationMapper.xml | 107 ----- .../mapper/ModeOfPaymentIdMapper.xml | 76 ---- .../resources/mapper/OpenServiceMapper.xml | 76 ---- .../main/resources/mapper/PayForMapper.xml | 86 ---- .../src/main/resources/mapper/TypeMapper.xml | 78 ---- .../mapper/netWorking/EnterpriseMapper.xml | 34 ++ muyu-modules/muyu-net-working/pom.xml | 6 +- muyu-modules/pom.xml | 1 + 93 files changed, 2316 insertions(+), 4282 deletions(-) create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-client/pom.xml create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-common/pom.xml create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Fence.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Vehicle.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceEditReq.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceQueryReq.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceSaveReq.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleEditReq.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleQueryReq.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleSaveReq.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-remote/pom.xml create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/pom.xml create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/MuYuCustomerBusinessApplication.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/FenceController.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/VehicleController.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/mapper/FenceMapper.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/mapper/VehicleMapper.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/FenceService.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/VehicleService.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/impl/FenceServiceImpl.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/impl/VehicleServiceImpl.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/banner.txt create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/bootstrap.yml create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/logback.xml create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/FenceMapper.xml create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/VehicleMapper.xml create mode 100644 muyu-modules/muyu-customer-business/pom.xml delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/AddService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Certification.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/FenceGroups.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Fences.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Information.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/ModeOfPayment.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/OpenServiceAdd.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/PayOf.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Type.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Vehicle.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseEditReq.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseQueryReq.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseSaveReq.java rename muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/{networking/NetworkingApplication.java => net/working/MuYuNetWorkingApplication.java} (58%) create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/controller/EnterpriseController.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/mapper/EnterpriseMapper.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/EnterpriseService.java create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/impl/EnterpriseServiceImpl.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/AddServiceController.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/CertificationController.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/EnterpriseController.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/InformationController.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/ModeOfPaymentIdController.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/OpenServiceController.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/PayForController.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/TypeController.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/AddServiceMapper.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/CertificationMapper.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/EnterpriseMapper.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/FenceMapper.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/InformationMapper.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/ModeOfPaymentIdMapper.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/OpenServiceMapper.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/PayOfMapper.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/TypeMapper.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/opFen/SysUserNet.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/AddServiceService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/CertificationService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/EnterpriseService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/FenceService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/IInformationService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ITypeService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ModeOfPaymentIdService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/OpenServiceService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/PayOfService.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/AddServiceServiceImpl.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/CertificationServiceImpl.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/EnterpriseServiceImpl.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/FenceServiceImpl.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/InformationServiceImpl.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/ModeOfPaymentIdServiceImpl.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/OpenServiceServiceImpl.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/PayOfServiceImpl.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/TypeServiceImpl.java delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/AddServiceMapper.xml delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/CertificationMapper.xml delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/EnterpriseMapper.xml delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/InformationMapper.xml delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/ModeOfPaymentIdMapper.xml delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/OpenServiceMapper.xml delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/PayForMapper.xml delete mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/TypeMapper.xml create mode 100644 muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/netWorking/EnterpriseMapper.xml diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-client/pom.xml b/muyu-modules/muyu-customer-business/muyu-customer-business-client/pom.xml new file mode 100644 index 0000000..f3f2fe6 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-client/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.muyu + muyu-customer-business + 3.6.3 + + + muyu-customer-business-client + + + 17 + 17 + UTF-8 + + + diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/pom.xml b/muyu-modules/muyu-customer-business/muyu-customer-business-common/pom.xml new file mode 100644 index 0000000..11c439c --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/pom.xml @@ -0,0 +1,32 @@ + + + 4.0.0 + + com.muyu + muyu-customer-business + 3.6.3 + + + muyu-customer-business-common + + + 17 + 17 + UTF-8 + + + + + com.muyu + muyu-common-core + 3.6.3 + + + com.muyu + muyu-common-security + + + + diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Fence.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Fence.java new file mode 100644 index 0000000..40ae606 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Fence.java @@ -0,0 +1,89 @@ +package com.muyu.customer.business.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 lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.experimental.SuperBuilder; +import io.swagger.annotations.*; +import com.muyu.common.core.annotation.Excel; +import com.muyu.customer.business.domain.req.FenceQueryReq; +import com.muyu.customer.business.domain.req.FenceSaveReq; +import com.muyu.customer.business.domain.req.FenceEditReq; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 电子围栏对象 fence + * + * @author muyu + * @date 2024-05-31 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@TableName("fence") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Fence", description = "电子围栏") +public class Fence extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** id */ + @TableId(value = "id",type = IdType.AUTO) + @ApiModelProperty(name = "id", value = "id") + private Long id; + + /** 电子围栏名称 */ + @Excel(name = "电子围栏名称") + @ApiModelProperty(name = "电子围栏名称", value = "电子围栏名称") + private String name; + + /** 围栏类型 */ + @Excel(name = "围栏类型") + @ApiModelProperty(name = "围栏类型", value = "围栏类型") + private String fenceType; + + /** 经纬度信息 */ + @Excel(name = "经纬度信息") + @ApiModelProperty(name = "经纬度信息", value = "经纬度信息") + private String longitudeAndLatitude; + + /** + * 查询构造器 + */ + public static Fence queryBuild( FenceQueryReq fenceQueryReq){ + return Fence.builder() + .name(fenceQueryReq.getName()) + .fenceType(fenceQueryReq.getFenceType()) + .longitudeAndLatitude(fenceQueryReq.getLongitudeAndLatitude()) + .build(); + } + + /** + * 添加构造器 + */ + public static Fence saveBuild(FenceSaveReq fenceSaveReq){ + return Fence.builder() + .name(fenceSaveReq.getName()) + .fenceType(fenceSaveReq.getFenceType()) + .longitudeAndLatitude(fenceSaveReq.getLongitudeAndLatitude()) + .build(); + } + + /** + * 修改构造器 + */ + public static Fence editBuild(Long id, FenceEditReq fenceEditReq){ + return Fence.builder() + .id(id) + .name(fenceEditReq.getName()) + .fenceType(fenceEditReq.getFenceType()) + .longitudeAndLatitude(fenceEditReq.getLongitudeAndLatitude()) + .build(); + } + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Vehicle.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Vehicle.java new file mode 100644 index 0000000..df46a7e --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Vehicle.java @@ -0,0 +1,197 @@ +package com.muyu.customer.business.domain; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.muyu.common.security.utils.SecurityUtils; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.experimental.SuperBuilder; +import io.swagger.annotations.*; +import com.muyu.common.core.annotation.Excel; +import com.muyu.customer.business.domain.req.VehicleQueryReq; +import com.muyu.customer.business.domain.req.VehicleSaveReq; +import com.muyu.customer.business.domain.req.VehicleEditReq; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 车辆录入对象 vehicle + * + * @author muyu + * @date 2024-05-27 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@TableName("vehicle") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Vehicle", description = "车辆录入") +public class Vehicle extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** 车辆id */ + @TableId(value = "id",type = IdType.AUTO) + @ApiModelProperty(name = "车辆id", value = "车辆id") + private Long id; + + /** 车辆vin */ + @Excel(name = "车辆vin") + @ApiModelProperty(name = "车辆vin", value = "车辆vin") + private String vin; + + /** 品牌 */ + @Excel(name = "品牌") + @ApiModelProperty(name = "品牌", value = "品牌") + private String brand; + + /** 型号 */ + @Excel(name = "型号") + @ApiModelProperty(name = "型号", value = "型号") + private String model; + + /** 生产日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty(name = "生产日期", value = "生产日期") + private Date productionDate; + + /** 车身类型 */ + @Excel(name = "车身类型") + @ApiModelProperty(name = "车身类型", value = "车身类型") + private String bodyType; + + /** 车身颜色 */ + @Excel(name = "车身颜色") + @ApiModelProperty(name = "车身颜色", value = "车身颜色") + private String color; + + /** 发动机排量 */ + @Excel(name = "发动机排量") + @ApiModelProperty(name = "发动机排量", value = "发动机排量") + private BigDecimal engineCapacity; + + /** 燃油类型 */ + @Excel(name = "燃油类型") + @ApiModelProperty(name = "燃油类型", value = "燃油类型") + private String fuelType; + + /** 变速器类型 */ + @Excel(name = "变速器类型") + @ApiModelProperty(name = "变速器类型", value = "变速器类型") + private String transmission; + + /** 驱动方式 */ + @Excel(name = "驱动方式") + @ApiModelProperty(name = "驱动方式", value = "驱动方式") + private String driveType; + + /** 行驶里程 */ + @Excel(name = "行驶里程") + @ApiModelProperty(name = "行驶里程", value = "行驶里程") + private BigDecimal mileage; + + /** 注册日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "注册日期", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty(name = "注册日期", value = "注册日期") + private Date registrationDate; + + /** 车牌号码 */ + @Excel(name = "车牌号码") + @ApiModelProperty(name = "车牌号码", value = "车牌号码") + private String licenseNumber; + + /** 持有者 */ + @Excel(name = "持有者") + @ApiModelProperty(name = "持有者", value = "持有者") + private String holder; + + /** 车辆类型 */ + @Excel(name = "车辆类型") + @ApiModelProperty(name = "车辆类型", value = "车辆类型") + private String vehicleType; + + /** + * 查询构造器 + */ + public static Vehicle queryBuild( VehicleQueryReq vehicleQueryReq){ + return Vehicle.builder() + .vin(vehicleQueryReq.getVin()) + .brand(vehicleQueryReq.getBrand()) + .model(vehicleQueryReq.getModel()) + .productionDate(vehicleQueryReq.getProductionDate()) + .bodyType(vehicleQueryReq.getBodyType()) + .color(vehicleQueryReq.getColor()) + .engineCapacity(vehicleQueryReq.getEngineCapacity()) + .fuelType(vehicleQueryReq.getFuelType()) + .transmission(vehicleQueryReq.getTransmission()) + .driveType(vehicleQueryReq.getDriveType()) + .mileage(vehicleQueryReq.getMileage()) + .registrationDate(vehicleQueryReq.getRegistrationDate()) + .licenseNumber(vehicleQueryReq.getLicenseNumber()) + .holder(vehicleQueryReq.getHolder()) + .vehicleType(vehicleQueryReq.getVehicleType()) + .build(); + } + + /** + * 添加构造器 + */ + public static Vehicle saveBuild(VehicleSaveReq vehicleSaveReq){ + return Vehicle.builder() + .vin(vehicleSaveReq.getVin()) + .brand(vehicleSaveReq.getBrand()) + .model(vehicleSaveReq.getModel()) + .productionDate(vehicleSaveReq.getProductionDate()) + .bodyType(vehicleSaveReq.getBodyType()) + .color(vehicleSaveReq.getColor()) + .engineCapacity(vehicleSaveReq.getEngineCapacity()) + .fuelType(vehicleSaveReq.getFuelType()) + .transmission(vehicleSaveReq.getTransmission()) + .driveType(vehicleSaveReq.getDriveType()) + .mileage(vehicleSaveReq.getMileage()) + .registrationDate(vehicleSaveReq.getRegistrationDate()) + .licenseNumber(vehicleSaveReq.getLicenseNumber()) + .holder(vehicleSaveReq.getHolder()) + .vehicleType(vehicleSaveReq.getVehicleType()) + .createTime(new Date()) + .createBy(SecurityUtils.getUsername()) + .remark(vehicleSaveReq.getRemark()) + .build(); + } + + /** + * 修改构造器 + */ + public static Vehicle editBuild(Long id, VehicleEditReq vehicleEditReq){ + return Vehicle.builder() + .id(id) + .vin(vehicleEditReq.getVin()) + .brand(vehicleEditReq.getBrand()) + .model(vehicleEditReq.getModel()) + .productionDate(vehicleEditReq.getProductionDate()) + .bodyType(vehicleEditReq.getBodyType()) + .color(vehicleEditReq.getColor()) + .engineCapacity(vehicleEditReq.getEngineCapacity()) + .fuelType(vehicleEditReq.getFuelType()) + .transmission(vehicleEditReq.getTransmission()) + .driveType(vehicleEditReq.getDriveType()) + .mileage(vehicleEditReq.getMileage()) + .registrationDate(vehicleEditReq.getRegistrationDate()) + .licenseNumber(vehicleEditReq.getLicenseNumber()) + .holder(vehicleEditReq.getHolder()) + .vehicleType(vehicleEditReq.getVehicleType()) + .updateTime(new Date()) + .updateBy(SecurityUtils.getUsername()) + .remark(vehicleEditReq.getRemark()) + .build(); + } + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceEditReq.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceEditReq.java new file mode 100644 index 0000000..90a34f5 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceEditReq.java @@ -0,0 +1,38 @@ +package com.muyu.customer.business.domain.req; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.experimental.SuperBuilder; +import io.swagger.annotations.*; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 电子围栏对象 fence + * + * @author muyu + * @date 2024-05-31 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(value = "FenceEditReq", description = "电子围栏") +public class FenceEditReq extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** 电子围栏名称 */ + @ApiModelProperty(name = "电子围栏名称", value = "电子围栏名称") + private String name; + + /** 围栏类型 */ + @ApiModelProperty(name = "围栏类型", value = "围栏类型") + private String fenceType; + + /** 经纬度信息 */ + @ApiModelProperty(name = "经纬度信息", value = "经纬度信息") + private String longitudeAndLatitude; + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceQueryReq.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceQueryReq.java new file mode 100644 index 0000000..f80157d --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceQueryReq.java @@ -0,0 +1,38 @@ +package com.muyu.customer.business.domain.req; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.experimental.SuperBuilder; +import io.swagger.annotations.*; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 电子围栏对象 fence + * + * @author muyu + * @date 2024-05-31 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(value = "FenceQueryReq", description = "电子围栏") +public class FenceQueryReq extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** 电子围栏名称 */ + @ApiModelProperty(name = "电子围栏名称", value = "电子围栏名称") + private String name; + + /** 围栏类型 */ + @ApiModelProperty(name = "围栏类型", value = "围栏类型") + private String fenceType; + + /** 经纬度信息 */ + @ApiModelProperty(name = "经纬度信息", value = "经纬度信息") + private String longitudeAndLatitude; + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceSaveReq.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceSaveReq.java new file mode 100644 index 0000000..9244ffe --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/FenceSaveReq.java @@ -0,0 +1,46 @@ +package com.muyu.customer.business.domain.req; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.experimental.SuperBuilder; +import io.swagger.annotations.*; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 电子围栏对象 fence + * + * @author muyu + * @date 2024-05-31 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(value = "FenceSaveReq", description = "电子围栏") +public class FenceSaveReq extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** id */ + + @ApiModelProperty(name = "id", value = "id") + private Long id; + + /** 电子围栏名称 */ + + @ApiModelProperty(name = "电子围栏名称", value = "电子围栏名称") + private String name; + + /** 围栏类型 */ + + @ApiModelProperty(name = "围栏类型", value = "围栏类型") + private String fenceType; + + /** 经纬度信息 */ + + @ApiModelProperty(name = "经纬度信息", value = "经纬度信息") + private String longitudeAndLatitude; + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleEditReq.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleEditReq.java new file mode 100644 index 0000000..8e2b936 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleEditReq.java @@ -0,0 +1,91 @@ +package com.muyu.customer.business.domain.req; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.experimental.SuperBuilder; +import io.swagger.annotations.*; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 车辆录入对象 vehicle + * + * @author muyu + * @date 2024-05-27 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(value = "VehicleEditReq", description = "车辆录入") +public class VehicleEditReq extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** 车辆vin */ + @ApiModelProperty(name = "车辆vin", value = "车辆vin") + private String vin; + + /** 品牌 */ + @ApiModelProperty(name = "品牌", value = "品牌") + private String brand; + + /** 型号 */ + @ApiModelProperty(name = "型号", value = "型号") + private String model; + + /** 生产日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "生产日期", value = "生产日期") + private Date productionDate; + + /** 车身类型 */ + @ApiModelProperty(name = "车身类型", value = "车身类型") + private String bodyType; + + /** 车身颜色 */ + @ApiModelProperty(name = "车身颜色", value = "车身颜色") + private String color; + + /** 发动机排量 */ + @ApiModelProperty(name = "发动机排量", value = "发动机排量") + private BigDecimal engineCapacity; + + /** 燃油类型 */ + @ApiModelProperty(name = "燃油类型", value = "燃油类型") + private String fuelType; + + /** 变速器类型 */ + @ApiModelProperty(name = "变速器类型", value = "变速器类型") + private String transmission; + + /** 驱动方式 */ + @ApiModelProperty(name = "驱动方式", value = "驱动方式") + private String driveType; + + /** 行驶里程 */ + @ApiModelProperty(name = "行驶里程", value = "行驶里程") + private BigDecimal mileage; + + /** 注册日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "注册日期", value = "注册日期") + private Date registrationDate; + + /** 车牌号码 */ + @ApiModelProperty(name = "车牌号码", value = "车牌号码") + private String licenseNumber; + + /** 持有者 */ + @ApiModelProperty(name = "持有者", value = "持有者") + private String holder; + + /** 车辆类型 */ + @ApiModelProperty(name = "车辆类型", value = "车辆类型") + private String vehicleType; + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleQueryReq.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleQueryReq.java new file mode 100644 index 0000000..0d7d90b --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleQueryReq.java @@ -0,0 +1,91 @@ +package com.muyu.customer.business.domain.req; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.experimental.SuperBuilder; +import io.swagger.annotations.*; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 车辆录入对象 vehicle + * + * @author muyu + * @date 2024-05-27 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(value = "VehicleQueryReq", description = "车辆录入") +public class VehicleQueryReq extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** 车辆vin */ + @ApiModelProperty(name = "车辆vin", value = "车辆vin") + private String vin; + + /** 品牌 */ + @ApiModelProperty(name = "品牌", value = "品牌") + private String brand; + + /** 型号 */ + @ApiModelProperty(name = "型号", value = "型号") + private String model; + + /** 生产日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "生产日期", value = "生产日期") + private Date productionDate; + + /** 车身类型 */ + @ApiModelProperty(name = "车身类型", value = "车身类型") + private String bodyType; + + /** 车身颜色 */ + @ApiModelProperty(name = "车身颜色", value = "车身颜色") + private String color; + + /** 发动机排量 */ + @ApiModelProperty(name = "发动机排量", value = "发动机排量") + private BigDecimal engineCapacity; + + /** 燃油类型 */ + @ApiModelProperty(name = "燃油类型", value = "燃油类型") + private String fuelType; + + /** 变速器类型 */ + @ApiModelProperty(name = "变速器类型", value = "变速器类型") + private String transmission; + + /** 驱动方式 */ + @ApiModelProperty(name = "驱动方式", value = "驱动方式") + private String driveType; + + /** 行驶里程 */ + @ApiModelProperty(name = "行驶里程", value = "行驶里程") + private BigDecimal mileage; + + /** 注册日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "注册日期", value = "注册日期") + private Date registrationDate; + + /** 车牌号码 */ + @ApiModelProperty(name = "车牌号码", value = "车牌号码") + private String licenseNumber; + + /** 持有者 */ + @ApiModelProperty(name = "持有者", value = "持有者") + private String holder; + + /** 车辆类型 */ + @ApiModelProperty(name = "车辆类型", value = "车辆类型") + private String vehicleType; + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleSaveReq.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleSaveReq.java new file mode 100644 index 0000000..6a3c222 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/req/VehicleSaveReq.java @@ -0,0 +1,111 @@ +package com.muyu.customer.business.domain.req; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.experimental.SuperBuilder; +import io.swagger.annotations.*; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 车辆录入对象 vehicle + * + * @author muyu + * @date 2024-05-27 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(value = "VehicleSaveReq", description = "车辆录入") +public class VehicleSaveReq extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** 车辆id */ + + @ApiModelProperty(name = "车辆id", value = "车辆id") + private Long id; + + /** 车辆vin */ + + @ApiModelProperty(name = "车辆vin", value = "车辆vin") + private String vin; + + /** 品牌 */ + + @ApiModelProperty(name = "品牌", value = "品牌") + private String brand; + + /** 型号 */ + + @ApiModelProperty(name = "型号", value = "型号") + private String model; + + /** 生产日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + + @ApiModelProperty(name = "生产日期", value = "生产日期") + private Date productionDate; + + /** 车身类型 */ + + @ApiModelProperty(name = "车身类型", value = "车身类型") + private String bodyType; + + /** 车身颜色 */ + + @ApiModelProperty(name = "车身颜色", value = "车身颜色") + private String color; + + /** 发动机排量 */ + + @ApiModelProperty(name = "发动机排量", value = "发动机排量") + private BigDecimal engineCapacity; + + /** 燃油类型 */ + + @ApiModelProperty(name = "燃油类型", value = "燃油类型") + private String fuelType; + + /** 变速器类型 */ + + @ApiModelProperty(name = "变速器类型", value = "变速器类型") + private String transmission; + + /** 驱动方式 */ + + @ApiModelProperty(name = "驱动方式", value = "驱动方式") + private String driveType; + + /** 行驶里程 */ + + @ApiModelProperty(name = "行驶里程", value = "行驶里程") + private BigDecimal mileage; + + /** 注册日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + + @ApiModelProperty(name = "注册日期", value = "注册日期") + private Date registrationDate; + + /** 车牌号码 */ + + @ApiModelProperty(name = "车牌号码", value = "车牌号码") + private String licenseNumber; + + /** 持有者 */ + + @ApiModelProperty(name = "持有者", value = "持有者") + private String holder; + + /** 车辆类型 */ + + @ApiModelProperty(name = "车辆类型", value = "车辆类型") + private String vehicleType; + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-remote/pom.xml b/muyu-modules/muyu-customer-business/muyu-customer-business-remote/pom.xml new file mode 100644 index 0000000..7276ccd --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-remote/pom.xml @@ -0,0 +1,20 @@ + + + 4.0.0 + + com.muyu + muyu-customer-business + 3.6.3 + + + muyu-customer-business-remote + + + 17 + 17 + UTF-8 + + + diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/pom.xml b/muyu-modules/muyu-customer-business/muyu-customer-business-server/pom.xml new file mode 100644 index 0000000..72d1dec --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/pom.xml @@ -0,0 +1,116 @@ + + + 4.0.0 + + com.muyu + muyu-customer-business + 3.6.3 + + + muyu-customer-business-server + + + 17 + 17 + UTF-8 + + + + + + com.muyu + muyu-customer-business-common + 3.6.3 + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-sentinel + + + + + org.springframework.boot + spring-boot-starter-actuator + + + + + io.springfox + springfox-swagger-ui + ${swagger.fox.version} + + + + + com.mysql + mysql-connector-j + + + + + com.muyu + muyu-common-datasource + + + + + com.muyu + muyu-common-datascope + + + + + com.muyu + muyu-common-log + + + + + com.muyu + muyu-common-swagger + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + + diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/MuYuCustomerBusinessApplication.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/MuYuCustomerBusinessApplication.java new file mode 100644 index 0000000..e949ff3 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/MuYuCustomerBusinessApplication.java @@ -0,0 +1,23 @@ +package com.muyu.customer.business; + +import com.muyu.common.security.annotation.EnableCustomConfig; +import com.muyu.common.security.annotation.EnableMyFeignClients; +import com.muyu.common.swagger.annotation.EnableCustomSwagger2; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * 车联网客户业务系统启动类 MuYuCustomerBusinessApplication + * + * @author DeKangLiu + * Date 2024/5/27 16:51 + */ +@EnableCustomConfig +@EnableCustomSwagger2 +@EnableMyFeignClients +@SpringBootApplication +public class MuYuCustomerBusinessApplication { + public static void main (String[] args) { + SpringApplication.run(MuYuCustomerBusinessApplication.class, args); + } +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/FenceController.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/FenceController.java new file mode 100644 index 0000000..61fd27c --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/FenceController.java @@ -0,0 +1,111 @@ +package com.muyu.customer.business.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.customer.business.domain.Fence; +import com.muyu.customer.business.domain.req.FenceQueryReq; +import com.muyu.customer.business.domain.req.FenceSaveReq; +import com.muyu.customer.business.domain.req.FenceEditReq; +import com.muyu.customer.business.service.FenceService; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 电子围栏Controller + * + * @author muyu + * @date 2024-05-31 + */ +@Api(tags = "电子围栏") +@RestController +@RequestMapping("/fence") +public class FenceController extends BaseController { + @Autowired + private FenceService fenceService; + + /** + * 查询电子围栏列表 + */ + @ApiOperation("获取电子围栏列表") + @RequiresPermissions("customerBusiness:fence:list") + @GetMapping("/list") + public Result> list(FenceQueryReq fenceQueryReq) { + startPage(); + List list = fenceService.list(Fence.queryBuild(fenceQueryReq)); + return getDataTable(list); + } + + /** + * 导出电子围栏列表 + */ + @ApiOperation("导出电子围栏列表") + @RequiresPermissions("customerBusiness:fence:export") + @Log(title = "电子围栏", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Fence fence) { + List list = fenceService.list(fence); + ExcelUtil util = new ExcelUtil(Fence.class); + util.exportExcel(response, list, "电子围栏数据"); + } + + /** + * 获取电子围栏详细信息 + */ + @ApiOperation("获取电子围栏详细信息") + @RequiresPermissions("customerBusiness:fence:query") + @GetMapping(value = "/{id}") + @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class) + public Result getInfo(@PathVariable("id") Long id) { + return Result.success(fenceService.getById(id)); + } + + /** + * 新增电子围栏 + */ + @RequiresPermissions("customerBusiness:fence:add") + @Log(title = "电子围栏", businessType = BusinessType.INSERT) + @PostMapping + @ApiOperation("新增电子围栏") + public Result add(@RequestBody FenceSaveReq fenceSaveReq) { + return toAjax(fenceService.save(Fence.saveBuild(fenceSaveReq))); + } + + /** + * 修改电子围栏 + */ + @RequiresPermissions("customerBusiness:fence:edit") + @Log(title = "电子围栏", businessType = BusinessType.UPDATE) + @PutMapping("/{id}") + @ApiOperation("修改电子围栏") + public Result edit(@PathVariable Long id, @RequestBody FenceEditReq fenceEditReq) { + return toAjax(fenceService.updateById(Fence.editBuild(id,fenceEditReq))); + } + + /** + * 删除电子围栏 + */ + @RequiresPermissions("customerBusiness:fence:remove") + @Log(title = "电子围栏", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + @ApiOperation("删除电子围栏") + @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4") + public Result remove(@PathVariable List ids) { + return toAjax(fenceService.removeBatchByIds(ids)); + } +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/VehicleController.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/VehicleController.java new file mode 100644 index 0000000..4e3e0fe --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/VehicleController.java @@ -0,0 +1,111 @@ +package com.muyu.customer.business.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.customer.business.domain.Vehicle; +import com.muyu.customer.business.domain.req.VehicleQueryReq; +import com.muyu.customer.business.domain.req.VehicleSaveReq; +import com.muyu.customer.business.domain.req.VehicleEditReq; +import com.muyu.customer.business.service.VehicleService; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 车辆录入Controller + * + * @author muyu + * @date 2024-05-27 + */ +@Api(tags = "车辆录入") +@RestController +@RequestMapping("/vehicle") +public class VehicleController extends BaseController { + @Autowired + private VehicleService vehicleService; + + /** + * 查询车辆录入列表 + */ + @ApiOperation("获取车辆录入列表") + @RequiresPermissions("customerBusiness:vehicle:list") + @GetMapping("/list") + public Result> list(VehicleQueryReq vehicleQueryReq) { + startPage(); + List list = vehicleService.list(Vehicle.queryBuild(vehicleQueryReq)); + return getDataTable(list); + } + + /** + * 导出车辆录入列表 + */ + @ApiOperation("导出车辆录入列表") + @RequiresPermissions("customerBusiness:vehicle:export") + @Log(title = "车辆录入", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Vehicle vehicle) { + List list = vehicleService.list(vehicle); + ExcelUtil util = new ExcelUtil(Vehicle.class); + util.exportExcel(response, list, "车辆录入数据"); + } + + /** + * 获取车辆录入详细信息 + */ + @ApiOperation("获取车辆录入详细信息") + @RequiresPermissions("customerBusiness:vehicle:query") + @GetMapping(value = "/{id}") + @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class) + public Result getInfo(@PathVariable("id") Long id) { + return Result.success(vehicleService.getById(id)); + } + + /** + * 新增车辆录入 + */ + @RequiresPermissions("customerBusiness:vehicle:add") + @Log(title = "车辆录入", businessType = BusinessType.INSERT) + @PostMapping + @ApiOperation("新增车辆录入") + public Result add(@RequestBody VehicleSaveReq vehicleSaveReq) { + return toAjax(vehicleService.save(Vehicle.saveBuild(vehicleSaveReq))); + } + + /** + * 修改车辆录入 + */ + @RequiresPermissions("customerBusiness:vehicle:edit") + @Log(title = "车辆录入", businessType = BusinessType.UPDATE) + @PutMapping("/{id}") + @ApiOperation("修改车辆录入") + public Result edit(@PathVariable Long id, @RequestBody VehicleEditReq vehicleEditReq) { + return toAjax(vehicleService.updateById(Vehicle.editBuild(id,vehicleEditReq))); + } + + /** + * 删除车辆录入 + */ + @RequiresPermissions("customerBusiness:vehicle:remove") + @Log(title = "车辆录入", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + @ApiOperation("删除车辆录入") + @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4") + public Result remove(@PathVariable List ids) { + return toAjax(vehicleService.removeBatchByIds(ids)); + } +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/mapper/FenceMapper.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/mapper/FenceMapper.java new file mode 100644 index 0000000..3c9b260 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/mapper/FenceMapper.java @@ -0,0 +1,15 @@ +package com.muyu.customer.business.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.muyu.customer.business.domain.Fence; + +/** + * 电子围栏Mapper接口 + * + * @author muyu + * @date 2024-05-31 + */ +public interface FenceMapper extends BaseMapper { + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/mapper/VehicleMapper.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/mapper/VehicleMapper.java new file mode 100644 index 0000000..aa124e4 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/mapper/VehicleMapper.java @@ -0,0 +1,15 @@ +package com.muyu.customer.business.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.muyu.customer.business.domain.Vehicle; + +/** + * 车辆录入Mapper接口 + * + * @author muyu + * @date 2024-05-27 + */ +public interface VehicleMapper extends BaseMapper { + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/FenceService.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/FenceService.java new file mode 100644 index 0000000..5c7970d --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/FenceService.java @@ -0,0 +1,22 @@ +package com.muyu.customer.business.service; + +import java.util.List; +import com.muyu.customer.business.domain.Fence; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * 电子围栏Service接口 + * + * @author muyu + * @date 2024-05-31 + */ +public interface FenceService extends IService { + /** + * 查询电子围栏列表 + * + * @param fence 电子围栏 + * @return 电子围栏集合 + */ + public List list(Fence fence); + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/VehicleService.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/VehicleService.java new file mode 100644 index 0000000..dd96af7 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/VehicleService.java @@ -0,0 +1,22 @@ +package com.muyu.customer.business.service; + +import java.util.List; +import com.muyu.customer.business.domain.Vehicle; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * 车辆录入Service接口 + * + * @author muyu + * @date 2024-05-27 + */ +public interface VehicleService extends IService { + /** + * 查询车辆录入列表 + * + * @param vehicle 车辆录入 + * @return 车辆录入集合 + */ + public List list(Vehicle vehicle); + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/impl/FenceServiceImpl.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/impl/FenceServiceImpl.java new file mode 100644 index 0000000..bd60d0c --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/impl/FenceServiceImpl.java @@ -0,0 +1,53 @@ +package com.muyu.customer.business.service.impl; + +import java.util.List; + +import com.muyu.common.core.utils.ObjUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import com.muyu.customer.business.mapper.FenceMapper; +import com.muyu.customer.business.domain.Fence; +import com.muyu.customer.business.service.FenceService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; + +/** + * 电子围栏Service业务层处理 + * + * @author muyu + * @date 2024-05-31 + */ +@Slf4j +@Service +public class FenceServiceImpl extends ServiceImpl implements FenceService { + + /** + * 查询电子围栏列表 + * + * @param fence 电子围栏 + * @return 电子围栏 + */ + @Override + public List list(Fence fence) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + + + if (ObjUtils.notNull(fence.getName())){ + queryWrapper.like(Fence::getName, fence.getName()); + } + + if (ObjUtils.notNull(fence.getFenceType())){ + queryWrapper.eq(Fence::getFenceType, fence.getFenceType()); + } + + if (ObjUtils.notNull(fence.getLongitudeAndLatitude())){ + queryWrapper.eq(Fence::getLongitudeAndLatitude, fence.getLongitudeAndLatitude()); + } + + + + + + return list(queryWrapper); + } +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/impl/VehicleServiceImpl.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/impl/VehicleServiceImpl.java new file mode 100644 index 0000000..f2bbe1a --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/impl/VehicleServiceImpl.java @@ -0,0 +1,101 @@ +package com.muyu.customer.business.service.impl; + +import java.util.List; + +import com.muyu.common.core.utils.ObjUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import com.muyu.customer.business.mapper.VehicleMapper; +import com.muyu.customer.business.domain.Vehicle; +import com.muyu.customer.business.service.VehicleService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; + +/** + * 车辆录入Service业务层处理 + * + * @author muyu + * @date 2024-05-27 + */ +@Slf4j +@Service +public class VehicleServiceImpl extends ServiceImpl implements VehicleService { + + /** + * 查询车辆录入列表 + * + * @param vehicle 车辆录入 + * @return 车辆录入 + */ + @Override + public List list(Vehicle vehicle) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + + + if (ObjUtils.notNull(vehicle.getVin())){ + queryWrapper.eq(Vehicle::getVin, vehicle.getVin()); + } + + if (ObjUtils.notNull(vehicle.getBrand())){ + queryWrapper.eq(Vehicle::getBrand, vehicle.getBrand()); + } + + if (ObjUtils.notNull(vehicle.getModel())){ + queryWrapper.eq(Vehicle::getModel, vehicle.getModel()); + } + + if (ObjUtils.notNull(vehicle.getProductionDate())){ + queryWrapper.eq(Vehicle::getProductionDate, vehicle.getProductionDate()); + } + + if (ObjUtils.notNull(vehicle.getBodyType())){ + queryWrapper.eq(Vehicle::getBodyType, vehicle.getBodyType()); + } + + if (ObjUtils.notNull(vehicle.getColor())){ + queryWrapper.eq(Vehicle::getColor, vehicle.getColor()); + } + + if (ObjUtils.notNull(vehicle.getEngineCapacity())){ + queryWrapper.eq(Vehicle::getEngineCapacity, vehicle.getEngineCapacity()); + } + + if (ObjUtils.notNull(vehicle.getFuelType())){ + queryWrapper.eq(Vehicle::getFuelType, vehicle.getFuelType()); + } + + if (ObjUtils.notNull(vehicle.getTransmission())){ + queryWrapper.eq(Vehicle::getTransmission, vehicle.getTransmission()); + } + + if (ObjUtils.notNull(vehicle.getDriveType())){ + queryWrapper.eq(Vehicle::getDriveType, vehicle.getDriveType()); + } + + if (ObjUtils.notNull(vehicle.getMileage())){ + queryWrapper.eq(Vehicle::getMileage, vehicle.getMileage()); + } + + if (ObjUtils.notNull(vehicle.getRegistrationDate())){ + queryWrapper.eq(Vehicle::getRegistrationDate, vehicle.getRegistrationDate()); + } + + if (ObjUtils.notNull(vehicle.getLicenseNumber())){ + queryWrapper.eq(Vehicle::getLicenseNumber, vehicle.getLicenseNumber()); + } + + if (ObjUtils.notNull(vehicle.getHolder())){ + queryWrapper.eq(Vehicle::getHolder, vehicle.getHolder()); + } + + if (ObjUtils.notNull(vehicle.getVehicleType())){ + queryWrapper.eq(Vehicle::getVehicleType, vehicle.getVehicleType()); + } + + + + + + return list(queryWrapper); + } +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/banner.txt b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/banner.txt new file mode 100644 index 0000000..0dd5eee --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/banner.txt @@ -0,0 +1,2 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/bootstrap.yml b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..01c25bc --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/bootstrap.yml @@ -0,0 +1,29 @@ +# Tomcat +server: + port: 9206 + +# Spring +spring: + application: + # 应用名称 + name: muyu-customer-business + profiles: + # 环境配置 + active: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 101.34.248.9:8848 + config: + # 配置中心地址 + server-addr: 101.34.248.9:8848 + namespace: b9d88e07-8713-4ccd-8e98-d7c19f40fe74 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} +logging: + level: + com.muyu.net.working.mapper: DEBUG diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/logback.xml b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/logback.xml new file mode 100644 index 0000000..2748efd --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/logback.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + + + + + + + + + + + + + diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/FenceMapper.xml b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/FenceMapper.xml new file mode 100644 index 0000000..7df3b30 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/FenceMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + select id, name, fence_type, longitude_and_latitude, create_by, create_time, update_by, update_time, remark from fence + + diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/VehicleMapper.xml b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/VehicleMapper.xml new file mode 100644 index 0000000..b43bc4b --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/VehicleMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, vin, brand, model, production_date, body_type, color, engine_capacity, fuel_type, transmission, drive_type, mileage, registration_date, license_number, holder, vehicle_type, create_by, create_time, update_by, update_time, remark from vehicle + + diff --git a/muyu-modules/muyu-customer-business/pom.xml b/muyu-modules/muyu-customer-business/pom.xml new file mode 100644 index 0000000..5740d2f --- /dev/null +++ b/muyu-modules/muyu-customer-business/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + com.muyu + muyu-modules + 3.6.3 + + + muyu-customer-business + pom + + muyu-customer-business-client + muyu-customer-business-remote + muyu-customer-business-common + muyu-customer-business-server + + + + 17 + 17 + UTF-8 + + + diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/AddService.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/AddService.java deleted file mode 100644 index 3974cfe..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/AddService.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.muyu.net.working.domain; - -import com.muyu.common.core.web.domain.BaseEntity; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; - -/** 增值服务 - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/25 9:03 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -@SuperBuilder -public class AddService extends BaseEntity { - /** - *增值服务id - * */ - private Long id; - /** - *增值类型 - * */ - private Integer addValue; - - - - - -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Certification.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Certification.java deleted file mode 100644 index 9e8c5f1..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Certification.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.muyu.net.working.domain; - -import com.muyu.common.core.web.domain.BaseEntity; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; - -/** 企业认证表 - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/25 9:05 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -@SuperBuilder -public class Certification extends BaseEntity { - /** - *企业认证id - * **/ - private Long id; - /** - *审核报告人 - * **/ - private String auditor; - /** - *待审核,已通过,未通过 - * **/ - private String stat; - /** - *审核报告 - * **/ - private String auditReason; - - -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Enterprise.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Enterprise.java index 2f87cca..6a11f5b 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Enterprise.java +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Enterprise.java @@ -1,227 +1,196 @@ package com.muyu.net.working.domain; -import com.muyu.common.core.web.domain.BaseEntity; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +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 lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.experimental.SuperBuilder; +import io.swagger.annotations.*; +import com.muyu.common.core.annotation.Excel; +import com.muyu.net.working.domain.req.EnterpriseQueryReq; +import com.muyu.net.working.domain.req.EnterpriseSaveReq; +import com.muyu.net.working.domain.req.EnterpriseEditReq; +import com.muyu.common.core.web.domain.BaseEntity; -/** 企业入驻 - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/25 8:51 +/** + * 企业信息对象 enterprise + * + * @author muyu + * @date 2024-05-27 */ @Data -@AllArgsConstructor +@SuperBuilder @NoArgsConstructor +@AllArgsConstructor +@TableName("enterprise") +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Enterprise", description = "企业信息") public class Enterprise extends BaseEntity { - /** - *q企业入驻id - * **/ - private Long id; - /** - *企业名称 - * **/ - private String enterpriseName; - /** - *法定代表人 - * **/ + + private static final long serialVersionUID = 1L; + + /** 主键 */ + @TableId(value = "id",type = IdType.AUTO) + @ApiModelProperty(name = "主键", value = "主键") + private String id; + + /** 企业名称 */ + @Excel(name = "企业名称") + @ApiModelProperty(name = "企业名称", value = "企业名称") + private String ebterpriseName; + + /** 法定代表人 */ + @Excel(name = "法定代表人") + @ApiModelProperty(name = "法定代表人", value = "法定代表人") private String legalPerson; - /** - *企业注册时获得的合法经营码 - * **/ - private String businessLicenseNumber; - /** - *企业成立的日期 - * **/ - private Date establishmentDate; - /** - *经营范围 - * **/ + + /** 经营执照凭证号码 */ + @Excel(name = "经营执照凭证号码") + @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") + private String businessLincenseNumber; + + /** 企业成立时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "企业成立时间", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty(name = "企业成立时间", value = "企业成立时间") + private Date estabinessDate; + + /** 经营范围 */ + @Excel(name = "经营范围") + @ApiModelProperty(name = "经营范围", value = "经营范围") private String businessScope; - /** - *注册地址 - * **/ + + /** 注册地址 */ + @Excel(name = "注册地址") + @ApiModelProperty(name = "注册地址", value = "注册地址") private String address; - /** - *联系企业的电话 - * **/ + + /** 企业联系方式 */ + @Excel(name = "企业联系方式") + @ApiModelProperty(name = "企业联系方式", value = "企业联系方式") private String contactPhone; - /** - *公司邮箱 - * **/ + + /** 公司邮箱 */ + @Excel(name = "公司邮箱") + @ApiModelProperty(name = "公司邮箱", value = "公司邮箱") private String email; - /** - *企业当前的状态 - * **/ + + /** 企业当前状态 */ + @Excel(name = "企业当前状态") + @ApiModelProperty(name = "企业当前状态", value = "企业当前状态") private String status; - /** - *企业入驻平台的日期 - * **/ + + /** 企业入驻平台时期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "企业入驻平台时期", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") private Date registrationDate; + + /** 企业认证id */ + @Excel(name = "企业认证id") + @ApiModelProperty(name = "企业认证id", value = "企业认证id") + private Long certificationId; + + /** 认证时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "认证时间", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty(name = "认证时间", value = "认证时间") + private Date authenticationDate; + + /** 服务级别 */ + @Excel(name = "服务级别") + @ApiModelProperty(name = "服务级别", value = "服务级别") + private Long serviceLevel; + + /** 开通服务id */ + @Excel(name = "开通服务id") + @ApiModelProperty(name = "开通服务id", value = "开通服务id") + private Long openServerId; + + /** 增值服务id */ + @Excel(name = "增值服务id") + @ApiModelProperty(name = "增值服务id", value = "增值服务id") + private Long addServerId; + /** - *企业认证 - * **/ - private String certification; + * 查询构造器 + */ + public static Enterprise queryBuild( EnterpriseQueryReq enterpriseQueryReq){ + return Enterprise.builder() + .ebterpriseName(enterpriseQueryReq.getEbterpriseName()) + .legalPerson(enterpriseQueryReq.getLegalPerson()) + .businessLincenseNumber(enterpriseQueryReq.getBusinessLincenseNumber()) + .estabinessDate(enterpriseQueryReq.getEstabinessDate()) + .businessScope(enterpriseQueryReq.getBusinessScope()) + .address(enterpriseQueryReq.getAddress()) + .contactPhone(enterpriseQueryReq.getContactPhone()) + .email(enterpriseQueryReq.getEmail()) + .status(enterpriseQueryReq.getStatus()) + .registrationDate(enterpriseQueryReq.getRegistrationDate()) + .certificationId(enterpriseQueryReq.getCertificationId()) + .authenticationDate(enterpriseQueryReq.getAuthenticationDate()) + .serviceLevel(enterpriseQueryReq.getServiceLevel()) + .openServerId(enterpriseQueryReq.getOpenServerId()) + .addServerId(enterpriseQueryReq.getAddServerId()) + .build(); + } + /** - *开通服务id - * **/ - private Long openServiceId; + * 添加构造器 + */ + public static Enterprise saveBuild(EnterpriseSaveReq enterpriseSaveReq){ + return Enterprise.builder() + .ebterpriseName(enterpriseSaveReq.getEbterpriseName()) + .legalPerson(enterpriseSaveReq.getLegalPerson()) + .businessLincenseNumber(enterpriseSaveReq.getBusinessLincenseNumber()) + .estabinessDate(enterpriseSaveReq.getEstabinessDate()) + .businessScope(enterpriseSaveReq.getBusinessScope()) + .address(enterpriseSaveReq.getAddress()) + .contactPhone(enterpriseSaveReq.getContactPhone()) + .email(enterpriseSaveReq.getEmail()) + .status(enterpriseSaveReq.getStatus()) + .registrationDate(enterpriseSaveReq.getRegistrationDate()) + .certificationId(enterpriseSaveReq.getCertificationId()) + .authenticationDate(enterpriseSaveReq.getAuthenticationDate()) + .serviceLevel(enterpriseSaveReq.getServiceLevel()) + .openServerId(enterpriseSaveReq.getOpenServerId()) + .addServerId(enterpriseSaveReq.getAddServerId()) + .createBy(enterpriseSaveReq.getCreateBy()) + .createTime(new Date()) + .remark(enterpriseSaveReq.getRemark()) + .build(); + } + /** - *增值服务id - * **/ - private Integer addServiceId; - - /*** - * 开通服务 - * */ - private String openAdd; - - - public String getOpenAdd() { - return openAdd; + * 修改构造器 + */ + public static Enterprise editBuild(String id, EnterpriseEditReq enterpriseEditReq){ + return Enterprise.builder() + .id(id) + .ebterpriseName(enterpriseEditReq.getEbterpriseName()) + .legalPerson(enterpriseEditReq.getLegalPerson()) + .businessLincenseNumber(enterpriseEditReq.getBusinessLincenseNumber()) + .estabinessDate(enterpriseEditReq.getEstabinessDate()) + .businessScope(enterpriseEditReq.getBusinessScope()) + .address(enterpriseEditReq.getAddress()) + .contactPhone(enterpriseEditReq.getContactPhone()) + .email(enterpriseEditReq.getEmail()) + .status(enterpriseEditReq.getStatus()) + .registrationDate(enterpriseEditReq.getRegistrationDate()) + .certificationId(enterpriseEditReq.getCertificationId()) + .authenticationDate(enterpriseEditReq.getAuthenticationDate()) + .serviceLevel(enterpriseEditReq.getServiceLevel()) + .openServerId(enterpriseEditReq.getOpenServerId()) + .addServerId(enterpriseEditReq.getAddServerId()) + .updateBy(enterpriseEditReq.getUpdateBy()) + .updateTime(new Date()) + .remark(enterpriseEditReq.getRemark()) + .build(); } - public void setOpenAdd(String openAdd) { - this.openAdd = openAdd; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getEnterpriseName() { - return enterpriseName; - } - - public void setEnterpriseName(String enterpriseName) { - this.enterpriseName = enterpriseName; - } - - public String getLegalPerson() { - return legalPerson; - } - - public void setLegalPerson(String legalPerson) { - this.legalPerson = legalPerson; - } - - public String getBusinessLicenseNumber() { - return businessLicenseNumber; - } - - public void setBusinessLicenseNumber(String businessLicenseNumber) { - this.businessLicenseNumber = businessLicenseNumber; - } - - public Date getEstablishmentDate() { - return establishmentDate; - } - - public void setEstablishmentDate(Date establishmentData) { - this.establishmentDate = establishmentData; - } - - public String getBusinessScope() { - return businessScope; - } - - public void setBusinessScope(String businessScope) { - this.businessScope = businessScope; - } - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public String getContactPhone() { - return contactPhone; - } - - public void setContactPhone(String contactPhone) { - this.contactPhone = contactPhone; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public Date getRegistrationDate() { - return registrationDate; - } - - public void setRegistrationDate(Date registrationDate) { - this.registrationDate = registrationDate; - } - - - public String getCertification() { - return certification; - } - - public void setCertification(String certification) { - this.certification = certification; - } - - public Long getOpenServiceId() { - return openServiceId; - } - - public void setOpenServiceId(Long openServiceId) { - this.openServiceId = openServiceId; - } - - public Integer getAddServiceId() { - return addServiceId; - } - - public void setAddServiceId(Integer addServiceId) { - this.addServiceId = addServiceId; - } - - @Override - public String toString(){ - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("id",getId()) - .append("enterpriseName",getEnterpriseName()) - .append("legalPerson",getLegalPerson()) - .append("businessLicenseNumber",getBusinessLicenseNumber()) - .append("establishmentDate",getEstablishmentDate()) - .append("businessScope",getBusinessScope()) - .append("address",getAddress()) - .append("contactPhone",getContactPhone()) - .append("email",getEmail()) - .append("status",getStatus()) - .append("registrationDate",getRegistrationDate()) - .append("certification",getCertification()) - .append("openServiceId",getOpenServiceId()) - .append("addServiceId",getAddServiceId()) - .toString(); - } - - - } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/FenceGroups.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/FenceGroups.java deleted file mode 100644 index 281fa37..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/FenceGroups.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.muyu.net.working.domain; - -import com.muyu.common.core.web.domain.BaseEntity; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.util.List; - -/** 电字围栏组 - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/31 15:16 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -public class FenceGroups extends BaseEntity { - /** - *属性组id - * */ - private Long id; - /** - *属性组名称 - * */ - private String groupName; - /** - *电子围栏集合 - * */ - private List fencesList; - -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Fences.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Fences.java deleted file mode 100644 index ab76e8e..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Fences.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.muyu.net.working.domain; - -import com.muyu.common.core.web.domain.BaseEntity; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; - -/** 电子围栏 - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/31 15:11 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -@SuperBuilder -public class Fences extends BaseEntity { - /** - * - *围栏id - * **/ - private Long id; - /** - *围栏组id - * - * **/ - private String groupId; - /** - *电子围栏名称 - * - * **/ - private String fenceName; - /** - * - *围栏类型 :原型 多边 - * **/ - private String fenceType; - /** - * - *半径 - * **/ - private Double radius; - /** - * 驶入 驶出 - * - * **/ - private String eventType; - /** - *围栏状态 - * - * **/ - private String staut; - /** - *坐标 - * - * **/ - private String polygonPoints; -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Information.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Information.java deleted file mode 100644 index 9f77548..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Information.java +++ /dev/null @@ -1,161 +0,0 @@ -package com.muyu.net.working.domain; - -import com.muyu.common.core.annotation.Excel; -import com.muyu.common.core.web.domain.BaseEntity; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * 车辆基本信息 - * - * @author ruoyi - * @date 2024-05-27 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -@SuperBuilder -public class Information extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** $column.columnComment */ - private Long id; - - /** 车辆vin */ - @Excel(name = "车辆vin") - private String number; - - /** 车辆类型 */ - @Excel(name = "车辆类型") - private Long typeId; - - /** 电子围栏id */ - @Excel(name = "电子围栏id") - private Long electronicId; - - /** 电机厂商 */ - @Excel(name = "电机厂商") - private String motor; - - /** 电池厂商 */ - @Excel(name = "电池厂商") - private String battery; - - /** 电机编号 */ - @Excel(name = "电机编号") - private String motorNumber; - - /** 电池编号 */ - @Excel(name = "电池编号") - private String batteryNumber; - - /** 企业id */ - @Excel(name = "企业id") - private Long enterpriseId; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setNumber(String number) - { - this.number = number; - } - - public String getNumber() - { - return number; - } - public void setTypeId(Long typeId) - { - this.typeId = typeId; - } - - public Long getTypeId() - { - return typeId; - } - public void setElectronicId(Long electronicId) - { - this.electronicId = electronicId; - } - - public Long getElectronicId() - { - return electronicId; - } - public void setMotor(String motor) - { - this.motor = motor; - } - - public String getMotor() - { - return motor; - } - public void setBattery(String battery) - { - this.battery = battery; - } - - public String getBattery() - { - return battery; - } - public void setMotorNumber(String motorNumber) - { - this.motorNumber = motorNumber; - } - - public String getMotorNumber() - { - return motorNumber; - } - public void setBatteryNumber(String batteryNumber) - { - this.batteryNumber = batteryNumber; - } - - public String getBatteryNumber() - { - return batteryNumber; - } - public void setEnterpriseId(Long enterpriseId) - { - this.enterpriseId = enterpriseId; - } - - public Long getEnterpriseId() - { - return enterpriseId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("number", getNumber()) - .append("typeId", getTypeId()) - .append("electronicId", getElectronicId()) - .append("motor", getMotor()) - .append("battery", getBattery()) - .append("motorNumber", getMotorNumber()) - .append("batteryNumber", getBatteryNumber()) - .append("enterpriseId", getEnterpriseId()) - .append("remark", getRemark()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateTime", getUpdateTime()) - .toString(); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/ModeOfPayment.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/ModeOfPayment.java deleted file mode 100644 index a703398..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/ModeOfPayment.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.muyu.net.working.domain; - - -import com.muyu.common.core.web.domain.BaseEntity; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; - -/** 支付方式 - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/25 9:35 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -@SuperBuilder -public class ModeOfPayment extends BaseEntity { - /*** - * 支付id - * */ - private Long id; - /*** - * 支付方式/类型 - * */ - private String payment; - - -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/OpenServiceAdd.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/OpenServiceAdd.java deleted file mode 100644 index 6577379..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/OpenServiceAdd.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.muyu.net.working.domain; - -import com.muyu.common.core.web.domain.BaseEntity; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; - -/**开通服务 - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/26 9:19 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -@SuperBuilder -public class OpenServiceAdd extends BaseEntity { - - - /** - * - *开通服务id - * */ - private Long id; - /** - *1开通 2未开通 - * - * */ - private String ActivateTheService; - - -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/PayOf.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/PayOf.java deleted file mode 100644 index 13a693d..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/PayOf.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.muyu.net.working.domain; - -import com.muyu.common.core.web.domain.BaseEntity; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; - -/** 支付表 - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/25 9:33 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor@SuperBuilder -public class PayOf extends BaseEntity { - /** - * 支付id - * */ - private Long id; - /** - * 企业id - * */ - private Long enterpriseId; - /** - * 支付方式/类型(id) - * */ - private Long modeOfPaymentId; - /** - * 需要支付的金额 - * */ - private Double price; - - -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Type.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Type.java deleted file mode 100644 index d0df5ac..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Type.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.muyu.net.working.domain; - -import com.muyu.common.core.annotation.Excel; -import com.muyu.common.core.web.domain.BaseEntity; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * 车辆类型信息 - * - * @author ruoyi - * @date 2024-05-27 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -@SuperBuilder -public class Type extends BaseEntity -{ - private static final long serialVersionUID = 1L; - - /** $column.columnComment */ - private Long id; - - /** 车辆类型 */ - @Excel(name = "车辆类型") - private String typeName; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setTypeName(String typeName) - { - this.typeName = typeName; - } - - public String getTypeName() - { - return typeName; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("typeName", getTypeName()) - .append("remark", getRemark()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateTime", getUpdateTime()) - .append("updateBy", getUpdateBy()) - .toString(); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Vehicle.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Vehicle.java deleted file mode 100644 index 6ec6fa8..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/Vehicle.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.muyu.net.working.domain; - -import com.muyu.common.core.web.domain.BaseEntity; - -import java.util.Date; - -/** 车辆入驻表 - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/26 20:31 - */ -public class Vehicle extends BaseEntity { - private Long id; - // 车辆唯一标识 - private String vin; - // 车辆识别号码(VIN) - private String brand;// 品牌 - private String model; - private int manufactureYear; // 生产年份 - private String bodyType; // 车身类型,例如"Sedan", "SUV" - private String color; // 车身颜色 - private double engineCapacity; - // 发动机排量,单位升 - private String fuelType; // 燃油类型,例如"Petrol", "Diesel", "Electric" - private String transmission;// 变速器类型,例如"Automatic", "Manual" - private String driveType; // 驱动方式,例如"FWD", "RWD", "AWD" - private long mileage; // 行驶里程,单位公 - private Date registrationDate; // 注册日期 - private String registrationNumber; // 车牌号码 - private String ownerId; - - - -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseEditReq.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseEditReq.java new file mode 100644 index 0000000..7284615 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseEditReq.java @@ -0,0 +1,91 @@ +package com.muyu.net.working.domain.req; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.experimental.SuperBuilder; +import io.swagger.annotations.*; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 企业信息对象 enterprise + * + * @author muyu + * @date 2024-05-27 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(value = "EnterpriseEditReq", description = "企业信息") +public class EnterpriseEditReq extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** 企业名称 */ + @ApiModelProperty(name = "企业名称", value = "企业名称") + private String ebterpriseName; + + /** 法定代表人 */ + @ApiModelProperty(name = "法定代表人", value = "法定代表人") + private String legalPerson; + + /** 经营执照凭证号码 */ + @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") + private String businessLincenseNumber; + + /** 企业成立时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "企业成立时间", value = "企业成立时间") + private Date estabinessDate; + + /** 经营范围 */ + @ApiModelProperty(name = "经营范围", value = "经营范围") + private String businessScope; + + /** 注册地址 */ + @ApiModelProperty(name = "注册地址", value = "注册地址") + private String address; + + /** 企业联系方式 */ + @ApiModelProperty(name = "企业联系方式", value = "企业联系方式") + private String contactPhone; + + /** 公司邮箱 */ + @ApiModelProperty(name = "公司邮箱", value = "公司邮箱") + private String email; + + /** 企业当前状态 */ + @ApiModelProperty(name = "企业当前状态", value = "企业当前状态") + private String status; + + /** 企业入驻平台时期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") + private Date registrationDate; + + /** 企业认证id */ + @ApiModelProperty(name = "企业认证id", value = "企业认证id") + private Long certificationId; + + /** 认证时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "认证时间", value = "认证时间") + private Date authenticationDate; + + /** 服务级别 */ + @ApiModelProperty(name = "服务级别", value = "服务级别") + private Long serviceLevel; + + /** 开通服务id */ + @ApiModelProperty(name = "开通服务id", value = "开通服务id") + private Long openServerId; + + /** 增值服务id */ + @ApiModelProperty(name = "增值服务id", value = "增值服务id") + private Long addServerId; + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseQueryReq.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseQueryReq.java new file mode 100644 index 0000000..2b893a3 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseQueryReq.java @@ -0,0 +1,91 @@ +package com.muyu.net.working.domain.req; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.experimental.SuperBuilder; +import io.swagger.annotations.*; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 企业信息对象 enterprise + * + * @author muyu + * @date 2024-05-27 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(value = "EnterpriseQueryReq", description = "企业信息") +public class EnterpriseQueryReq extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** 企业名称 */ + @ApiModelProperty(name = "企业名称", value = "企业名称") + private String ebterpriseName; + + /** 法定代表人 */ + @ApiModelProperty(name = "法定代表人", value = "法定代表人") + private String legalPerson; + + /** 经营执照凭证号码 */ + @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") + private String businessLincenseNumber; + + /** 企业成立时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "企业成立时间", value = "企业成立时间") + private Date estabinessDate; + + /** 经营范围 */ + @ApiModelProperty(name = "经营范围", value = "经营范围") + private String businessScope; + + /** 注册地址 */ + @ApiModelProperty(name = "注册地址", value = "注册地址") + private String address; + + /** 企业联系方式 */ + @ApiModelProperty(name = "企业联系方式", value = "企业联系方式") + private String contactPhone; + + /** 公司邮箱 */ + @ApiModelProperty(name = "公司邮箱", value = "公司邮箱") + private String email; + + /** 企业当前状态 */ + @ApiModelProperty(name = "企业当前状态", value = "企业当前状态") + private String status; + + /** 企业入驻平台时期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") + private Date registrationDate; + + /** 企业认证id */ + @ApiModelProperty(name = "企业认证id", value = "企业认证id") + private Long certificationId; + + /** 认证时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @ApiModelProperty(name = "认证时间", value = "认证时间") + private Date authenticationDate; + + /** 服务级别 */ + @ApiModelProperty(name = "服务级别", value = "服务级别") + private Long serviceLevel; + + /** 开通服务id */ + @ApiModelProperty(name = "开通服务id", value = "开通服务id") + private Long openServerId; + + /** 增值服务id */ + @ApiModelProperty(name = "增值服务id", value = "增值服务id") + private Long addServerId; + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseSaveReq.java b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseSaveReq.java new file mode 100644 index 0000000..03c34b6 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-common/src/main/java/com/muyu/net/working/domain/req/EnterpriseSaveReq.java @@ -0,0 +1,111 @@ +package com.muyu.net.working.domain.req; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.AllArgsConstructor; +import lombok.experimental.SuperBuilder; +import io.swagger.annotations.*; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 企业信息对象 enterprise + * + * @author muyu + * @date 2024-05-27 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(value = "EnterpriseSaveReq", description = "企业信息") +public class EnterpriseSaveReq extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** 主键 */ + + @ApiModelProperty(name = "主键", value = "主键") + private String id; + + /** 企业名称 */ + + @ApiModelProperty(name = "企业名称", value = "企业名称") + private String ebterpriseName; + + /** 法定代表人 */ + + @ApiModelProperty(name = "法定代表人", value = "法定代表人") + private String legalPerson; + + /** 经营执照凭证号码 */ + + @ApiModelProperty(name = "经营执照凭证号码", value = "经营执照凭证号码") + private String businessLincenseNumber; + + /** 企业成立时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + + @ApiModelProperty(name = "企业成立时间", value = "企业成立时间") + private Date estabinessDate; + + /** 经营范围 */ + + @ApiModelProperty(name = "经营范围", value = "经营范围") + private String businessScope; + + /** 注册地址 */ + + @ApiModelProperty(name = "注册地址", value = "注册地址") + private String address; + + /** 企业联系方式 */ + + @ApiModelProperty(name = "企业联系方式", value = "企业联系方式") + private String contactPhone; + + /** 公司邮箱 */ + + @ApiModelProperty(name = "公司邮箱", value = "公司邮箱") + private String email; + + /** 企业当前状态 */ + + @ApiModelProperty(name = "企业当前状态", value = "企业当前状态") + private String status; + + /** 企业入驻平台时期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + + @ApiModelProperty(name = "企业入驻平台时期", value = "企业入驻平台时期") + private Date registrationDate; + + /** 企业认证id */ + + @ApiModelProperty(name = "企业认证id", value = "企业认证id") + private Long certificationId; + + /** 认证时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + + @ApiModelProperty(name = "认证时间", value = "认证时间") + private Date authenticationDate; + + /** 服务级别 */ + + @ApiModelProperty(name = "服务级别", value = "服务级别") + private Long serviceLevel; + + /** 开通服务id */ + + @ApiModelProperty(name = "开通服务id", value = "开通服务id") + private Long openServerId; + + /** 增值服务id */ + + @ApiModelProperty(name = "增值服务id", value = "增值服务id") + private Long addServerId; + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/NetworkingApplication.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/MuYuNetWorkingApplication.java similarity index 58% rename from muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/NetworkingApplication.java rename to muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/MuYuNetWorkingApplication.java index 3ac951f..b0eaf90 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/NetworkingApplication.java +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/MuYuNetWorkingApplication.java @@ -1,4 +1,4 @@ -package com.muyu.networking; +package com.muyu.net.working; import com.muyu.common.security.annotation.EnableCustomConfig; import com.muyu.common.security.annotation.EnableMyFeignClients; @@ -7,17 +7,17 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /** - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/25 8:45 + * 车联网运营平台启动类 MuYuNetWorkingApplication + * + * @author DeKangLiu + * Date 2024/5/26 21:45 */ @EnableCustomConfig @EnableCustomSwagger2 @EnableMyFeignClients @SpringBootApplication -public class NetworkingApplication { - public static void main(String[] args) { - SpringApplication.run(NetworkingApplication.class, args); +public class MuYuNetWorkingApplication { + public static void main (String[] args) { + SpringApplication.run(MuYuNetWorkingApplication.class, args); } } diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/controller/EnterpriseController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/controller/EnterpriseController.java new file mode 100644 index 0000000..0618b4d --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/controller/EnterpriseController.java @@ -0,0 +1,111 @@ +package com.muyu.net.working.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.net.working.domain.Enterprise; +import com.muyu.net.working.domain.req.EnterpriseQueryReq; +import com.muyu.net.working.domain.req.EnterpriseSaveReq; +import com.muyu.net.working.domain.req.EnterpriseEditReq; +import com.muyu.net.working.service.EnterpriseService; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 企业信息Controller + * + * @author muyu + * @date 2024-05-27 + */ +@Api(tags = "企业信息") +@RestController +@RequestMapping("/car") +public class EnterpriseController extends BaseController { + @Autowired + private EnterpriseService enterpriseService; + + /** + * 查询企业信息列表 + */ + @ApiOperation("获取企业信息列表") + @RequiresPermissions("netWorking:car:list") + @GetMapping("/list") + public Result> list(EnterpriseQueryReq enterpriseQueryReq) { + startPage(); + List list = enterpriseService.list(Enterprise.queryBuild(enterpriseQueryReq)); + return getDataTable(list); + } + + /** + * 导出企业信息列表 + */ + @ApiOperation("导出企业信息列表") + @RequiresPermissions("netWorking:car:export") + @Log(title = "企业信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Enterprise enterprise) { + List list = enterpriseService.list(enterprise); + ExcelUtil util = new ExcelUtil(Enterprise.class); + util.exportExcel(response, list, "企业信息数据"); + } + + /** + * 获取企业信息详细信息 + */ + @ApiOperation("获取企业信息详细信息") + @RequiresPermissions("netWorking:car:query") + @GetMapping(value = "/{id}") + @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class) + public Result getInfo(@PathVariable("id") String id) { + return Result.success(enterpriseService.getById(id)); + } + + /** + * 新增企业信息 + */ + @RequiresPermissions("netWorking:car:add") + @Log(title = "企业信息", businessType = BusinessType.INSERT) + @PostMapping + @ApiOperation("新增企业信息") + public Result add(@RequestBody EnterpriseSaveReq enterpriseSaveReq) { + return toAjax(enterpriseService.save(Enterprise.saveBuild(enterpriseSaveReq))); + } + + /** + * 修改企业信息 + */ + @RequiresPermissions("netWorking:car:edit") + @Log(title = "企业信息", businessType = BusinessType.UPDATE) + @PutMapping("/{id}") + @ApiOperation("修改企业信息") + public Result edit(@PathVariable String id, @RequestBody EnterpriseEditReq enterpriseEditReq) { + return toAjax(enterpriseService.updateById(Enterprise.editBuild(id,enterpriseEditReq))); + } + + /** + * 删除企业信息 + */ + @RequiresPermissions("netWorking:car:remove") + @Log(title = "企业信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + @ApiOperation("删除企业信息") + @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4") + public Result remove(@PathVariable List ids) { + return toAjax(enterpriseService.removeBatchByIds(ids)); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/mapper/EnterpriseMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/mapper/EnterpriseMapper.java new file mode 100644 index 0000000..0a82543 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/mapper/EnterpriseMapper.java @@ -0,0 +1,15 @@ +package com.muyu.net.working.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.muyu.net.working.domain.Enterprise; + +/** + * 企业信息Mapper接口 + * + * @author muyu + * @date 2024-05-27 + */ +public interface EnterpriseMapper extends BaseMapper { + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/EnterpriseService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/EnterpriseService.java new file mode 100644 index 0000000..5bb5b4a --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/EnterpriseService.java @@ -0,0 +1,22 @@ +package com.muyu.net.working.service; + +import java.util.List; +import com.muyu.net.working.domain.Enterprise; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * 企业信息Service接口 + * + * @author muyu + * @date 2024-05-27 + */ +public interface EnterpriseService extends IService { + /** + * 查询企业信息列表 + * + * @param enterprise 企业信息 + * @return 企业信息集合 + */ + public List list(Enterprise enterprise); + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/impl/EnterpriseServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/impl/EnterpriseServiceImpl.java new file mode 100644 index 0000000..5ca6b7d --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/service/impl/EnterpriseServiceImpl.java @@ -0,0 +1,101 @@ +package com.muyu.net.working.service.impl; + +import java.util.List; + +import com.muyu.common.core.utils.ObjUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import com.muyu.net.working.mapper.EnterpriseMapper; +import com.muyu.net.working.domain.Enterprise; +import com.muyu.net.working.service.EnterpriseService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; + +/** + * 企业信息Service业务层处理 + * + * @author muyu + * @date 2024-05-27 + */ +@Slf4j +@Service +public class EnterpriseServiceImpl extends ServiceImpl implements EnterpriseService { + + /** + * 查询企业信息列表 + * + * @param enterprise 企业信息 + * @return 企业信息 + */ + @Override + public List list(Enterprise enterprise) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + + + if (ObjUtils.notNull(enterprise.getEbterpriseName())){ + queryWrapper.like(Enterprise::getEbterpriseName, enterprise.getEbterpriseName()); + } + + if (ObjUtils.notNull(enterprise.getLegalPerson())){ + queryWrapper.eq(Enterprise::getLegalPerson, enterprise.getLegalPerson()); + } + + if (ObjUtils.notNull(enterprise.getBusinessLincenseNumber())){ + queryWrapper.eq(Enterprise::getBusinessLincenseNumber, enterprise.getBusinessLincenseNumber()); + } + + if (ObjUtils.notNull(enterprise.getEstabinessDate())){ + queryWrapper.eq(Enterprise::getEstabinessDate, enterprise.getEstabinessDate()); + } + + if (ObjUtils.notNull(enterprise.getBusinessScope())){ + queryWrapper.eq(Enterprise::getBusinessScope, enterprise.getBusinessScope()); + } + + if (ObjUtils.notNull(enterprise.getAddress())){ + queryWrapper.eq(Enterprise::getAddress, enterprise.getAddress()); + } + + if (ObjUtils.notNull(enterprise.getContactPhone())){ + queryWrapper.eq(Enterprise::getContactPhone, enterprise.getContactPhone()); + } + + if (ObjUtils.notNull(enterprise.getEmail())){ + queryWrapper.eq(Enterprise::getEmail, enterprise.getEmail()); + } + + if (ObjUtils.notNull(enterprise.getStatus())){ + queryWrapper.eq(Enterprise::getStatus, enterprise.getStatus()); + } + + if (ObjUtils.notNull(enterprise.getRegistrationDate())){ + queryWrapper.eq(Enterprise::getRegistrationDate, enterprise.getRegistrationDate()); + } + + if (ObjUtils.notNull(enterprise.getCertificationId())){ + queryWrapper.eq(Enterprise::getCertificationId, enterprise.getCertificationId()); + } + + if (ObjUtils.notNull(enterprise.getAuthenticationDate())){ + queryWrapper.eq(Enterprise::getAuthenticationDate, enterprise.getAuthenticationDate()); + } + + if (ObjUtils.notNull(enterprise.getServiceLevel())){ + queryWrapper.eq(Enterprise::getServiceLevel, enterprise.getServiceLevel()); + } + + if (ObjUtils.notNull(enterprise.getOpenServerId())){ + queryWrapper.eq(Enterprise::getOpenServerId, enterprise.getOpenServerId()); + } + + if (ObjUtils.notNull(enterprise.getAddServerId())){ + queryWrapper.eq(Enterprise::getAddServerId, enterprise.getAddServerId()); + } + + + + + + return list(queryWrapper); + } +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/AddServiceController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/AddServiceController.java deleted file mode 100644 index fdf40b1..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/AddServiceController.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.muyu.networking.controller; - -import com.muyu.common.core.domain.Result; -import com.muyu.common.core.utils.poi.ExcelUtil; -import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.web.page.TableDataInfo; -import com.muyu.common.log.annotation.Log; -import com.muyu.common.log.enums.BusinessType; -import com.muyu.common.security.annotation.RequiresPermissions; -import com.muyu.domain.AddService; -import com.muyu.networking.service.AddServiceService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * 【请填写功能名称】Controller - * - * @author ruoyi - * @date 2024-05-25 - */ -@RestController -@RequestMapping("/addService") -public class AddServiceController extends BaseController -{ - @Autowired - private AddServiceService addServiceService; - - /** - * 查询【请填写功能名称】列表 - */ - @RequiresPermissions("system:service:list") - @GetMapping("/list") - public Result> list(AddService addService) - { - startPage(); - List list = addServiceService.selectAddServiceList(addService); - return getDataTable(list); - } - - /** - * 导出【请填写功能名称】列表 - */ - @RequiresPermissions("system:service:export") - @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, AddService addService) - { - List list = addServiceService.selectAddServiceList(addService); - ExcelUtil util = new ExcelUtil(AddService.class); - util.exportExcel(response, list, "【请填写功能名称】数据"); - } - - /** - * 获取【请填写功能名称】详细信息 - */ - @RequiresPermissions("system:service:query") - @GetMapping(value = "/{id}") - public Result getInfo(@PathVariable("id") Long id) - { - return success(addServiceService.selectAddServiceById(id)); - } - - /** - * 新增【请填写功能名称】 - */ - @RequiresPermissions("system:service:add") - @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) - @PostMapping - public Result add(@RequestBody AddService addService) - { - return toAjax(addServiceService.insertAddService(addService)); - } - - /** - * 修改【请填写功能名称】 - */ - @RequiresPermissions("system:service:edit") - @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) - @PutMapping - public Result edit(@RequestBody AddService addService) - { - return toAjax(addServiceService.updateAddService(addService)); - } - - /** - * 删除【请填写功能名称】 - */ - @RequiresPermissions("system:service:remove") - @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public Result remove(@PathVariable Long[] ids) - { - return toAjax(addServiceService.deleteAddServiceByIds(ids)); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/CertificationController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/CertificationController.java deleted file mode 100644 index 8796092..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/CertificationController.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.muyu.networking.controller; - -import com.muyu.common.core.domain.Result; -import com.muyu.common.core.utils.poi.ExcelUtil; -import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.web.page.TableDataInfo; -import com.muyu.common.log.annotation.Log; -import com.muyu.common.log.enums.BusinessType; -import com.muyu.common.security.annotation.RequiresPermissions; -import com.muyu.domain.Certification; -import com.muyu.networking.service.CertificationService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * 【请填写功能名称】Controller - * - * @author ruoyi - * @date 2024-05-25 - */ -@RestController -@RequestMapping("/certification") -public class CertificationController extends BaseController -{ - @Autowired - private CertificationService certificationService; - - /** - * 查询【请填写功能名称】列表 - */ - @RequiresPermissions("system:certification:list") - @GetMapping("/list") - public Result> list(Certification certification) - { - startPage(); - List list = certificationService.selectCertificationList(certification); - return getDataTable(list); - } - - /** - * 导出【请填写功能名称】列表 - */ - @RequiresPermissions("system:certification:export") - @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, Certification certification) - { - List list = certificationService.selectCertificationList(certification); - ExcelUtil util = new ExcelUtil(Certification.class); - util.exportExcel(response, list, "【请填写功能名称】数据"); - } - - /** - * 获取【请填写功能名称】详细信息 - */ - @RequiresPermissions("system:certification:query") - @GetMapping(value = "/{id}") - public Result getInfo(@PathVariable("id") Long id) - { - return success(certificationService.selectCertificationById(id)); - } - - /** - * 新增【请填写功能名称】 - */ - @RequiresPermissions("system:certification:add") - @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) - @PostMapping - public Result add(@RequestBody Certification certification) - { - return toAjax(certificationService.insertCertification(certification)); - } - - /** - * 修改【请填写功能名称】 - */ - @RequiresPermissions("system:certification:edit") - @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) - @PutMapping - public Result edit(@RequestBody Certification certification) - { - return toAjax(certificationService.updateCertification(certification)); - } - - /** - * 删除【请填写功能名称】 - */ - @RequiresPermissions("system:certification:remove") - @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public Result remove(@PathVariable Long[] ids) - { - return toAjax(certificationService.deleteCertificationByIds(ids)); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/EnterpriseController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/EnterpriseController.java deleted file mode 100644 index f77c987..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/EnterpriseController.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.muyu.networking.controller; - -import com.muyu.common.core.domain.Result; -import com.muyu.common.core.utils.poi.ExcelUtil; -import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.web.page.TableDataInfo; -import com.muyu.common.log.annotation.Log; -import com.muyu.common.log.enums.BusinessType; -import com.muyu.common.security.annotation.RequiresPermissions; -import com.muyu.domain.Enterprise; -import com.muyu.networking.service.EnterpriseService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * 【请填写功能名称】Controller - * - * @author ruoyi - * @date 2024-05-25 - */ -@RestController -@RequestMapping("/enterprise") -public class EnterpriseController extends BaseController -{ - @Autowired - private EnterpriseService enterpriseService; - - /** - * 查询【请填写功能名称】列表 - */ - @RequiresPermissions("system:enterprise:list") - @GetMapping("/list") - public Result> list(Enterprise enterprise) - { - startPage(); - List list = enterpriseService.selectEnterpriseList(enterprise); - return getDataTable(list); - } - - /** - * 导出【请填写功能名称】列表 - */ - @RequiresPermissions("system:enterprise:export") - @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, Enterprise enterprise) - { - List list = enterpriseService.selectEnterpriseList(enterprise); - ExcelUtil util = new ExcelUtil(Enterprise.class); - util.exportExcel(response, list, "【请填写功能名称】数据"); - } - - /** - * 获取【请填写功能名称】详细信息 - */ - @RequiresPermissions("system:enterprise:query") - @GetMapping(value = "/{id}") - public Result getInfo(@PathVariable("id") Long id) - { - return success(enterpriseService.selectEnterpriseById(id)); - } - - /** - * 新增【请填写功能名称】 - */ - @RequiresPermissions("system:enterprise:add") - @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) - @PostMapping - public Result add(@RequestBody Enterprise enterprise) - { - return toAjax(enterpriseService.insertEnterprise(enterprise)); - } - - /** - * 修改【请填写功能名称】 - */ - @RequiresPermissions("system:enterprise:edit") - @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) - @PutMapping - public Result edit(@RequestBody Enterprise enterprise) - { - return toAjax(enterpriseService.updateEnterprise(enterprise)); - } - - - - /** - * 删除【请填写功能名称】 - */ - @RequiresPermissions("system:enterprise:remove") - @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public Result remove(@PathVariable Long[] ids) - { - return toAjax(enterpriseService.deleteEnterpriseByIds(ids)); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/InformationController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/InformationController.java deleted file mode 100644 index b516054..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/InformationController.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.muyu.networking.controller; - - -import com.muyu.common.core.domain.Result; -import com.muyu.common.core.utils.poi.ExcelUtil; -import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.web.page.TableDataInfo; -import com.muyu.common.log.annotation.Log; -import com.muyu.common.log.enums.BusinessType; -import com.muyu.domain.Information; -import com.muyu.networking.service.IInformationService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * 【请填写功能名称】Controller - * - * @author ruoyi - * @date 2024-05-27 - */ -@RestController -@RequestMapping("/information") -public class InformationController extends BaseController -{ - @Autowired - private IInformationService informationService; - - /** - * 查询【请填写功能名称】列表 - */ - - @GetMapping("/list") - public Result> list(Information information) - { - startPage(); - List list = informationService.selectInformationList(information); - return getDataTable(list); - } - - /** - * 导出【请填写功能名称】列表 - */ - - @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, Information information) - { - List list = informationService.selectInformationList(information); - ExcelUtil util = new ExcelUtil(Information.class); - util.exportExcel(response, list, "【请填写功能名称】数据"); - } - - /** - * 获取【请填写功能名称】详细信息 - */ - - @GetMapping(value = "/{id}") - public Result getInfo(@PathVariable("id") Long id) - { - return success(informationService.selectInformationById(id)); - } - - /** - * 新增【请填写功能名称】 - */ - - @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) - @PostMapping - public Result add(@RequestBody Information information) - { - return toAjax(informationService.insertInformation(information)); - } - - /** - * 修改【请填写功能名称】 - */ - - @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) - @PutMapping - public Result edit(@RequestBody Information information) - { - return toAjax(informationService.updateInformation(information)); - } - - /** - * 删除【请填写功能名称】 - */ - - @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public Result remove(@PathVariable Long[] ids) - { - return toAjax(informationService.deleteInformationByIds(ids)); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/ModeOfPaymentIdController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/ModeOfPaymentIdController.java deleted file mode 100644 index 2144c6e..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/ModeOfPaymentIdController.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.muyu.networking.controller; - -import com.muyu.common.core.domain.Result; -import com.muyu.common.core.utils.poi.ExcelUtil; -import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.web.page.TableDataInfo; -import com.muyu.common.log.annotation.Log; -import com.muyu.common.log.enums.BusinessType; -import com.muyu.common.security.annotation.RequiresPermissions; -import com.muyu.domain.ModeOfPayment; -import com.muyu.networking.service.ModeOfPaymentIdService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * 【请填写功能名称】Controller - * - * @author ruoyi - * @date 2024-05-25 - */ -@RestController -@RequestMapping("/id") -public class ModeOfPaymentIdController extends BaseController -{ - @Autowired - private ModeOfPaymentIdService modeOfPaymentIdService; - - /** - * 查询【请填写功能名称】列表 - */ - @RequiresPermissions("system:id:list") - @GetMapping("/list") - public Result> list(ModeOfPayment modeOfPaymentId) - { - startPage(); - List list = modeOfPaymentIdService.selectModeOfPaymentIdList(modeOfPaymentId); - return getDataTable(list); - } - - /** - * 导出【请填写功能名称】列表 - */ - @RequiresPermissions("system:id:export") - @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, ModeOfPayment modeOfPaymentId) - { - List list = modeOfPaymentIdService.selectModeOfPaymentIdList(modeOfPaymentId); - ExcelUtil util = new ExcelUtil(ModeOfPayment.class); - util.exportExcel(response, list, "【请填写功能名称】数据"); - } - - /** - * 获取【请填写功能名称】详细信息 - */ - @RequiresPermissions("system:id:query") - @GetMapping(value = "/{id}") - public Result getInfo(@PathVariable("id") Long id) - { - return success(modeOfPaymentIdService.selectModeOfPaymentIdById(id)); - } - - /** - * 新增【请填写功能名称】 - */ - @RequiresPermissions("system:id:add") - @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) - @PostMapping - public Result add(@RequestBody ModeOfPayment modeOfPaymentId) - { - return toAjax(modeOfPaymentIdService.insertModeOfPaymentId(modeOfPaymentId)); - } - - /** - * 修改【请填写功能名称】 - */ - @RequiresPermissions("system:id:edit") - @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) - @PutMapping - public Result edit(@RequestBody ModeOfPayment modeOfPaymentId) - { - return toAjax(modeOfPaymentIdService.updateModeOfPaymentId(modeOfPaymentId)); - } - - /** - * 删除【请填写功能名称】 - */ - @RequiresPermissions("system:id:remove") - @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public Result remove(@PathVariable Long[] ids) - { - return toAjax(modeOfPaymentIdService.deleteModeOfPaymentIdByIds(ids)); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/OpenServiceController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/OpenServiceController.java deleted file mode 100644 index 8f7b91b..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/OpenServiceController.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.muyu.networking.controller; - -import com.muyu.common.core.domain.Result; -import com.muyu.common.core.utils.poi.ExcelUtil; -import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.web.page.TableDataInfo; -import com.muyu.common.log.annotation.Log; -import com.muyu.common.log.enums.BusinessType; -import com.muyu.common.security.annotation.RequiresPermissions; -import com.muyu.domain.OpenServiceAdd; -import com.muyu.networking.service.OpenServiceService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * 【请填写功能名称】Controller - * - * @author ruoyi - * @date 2024-05-25 - */ -@RestController -@RequestMapping("/service") -public class OpenServiceController extends BaseController -{ - @Autowired - private OpenServiceService openServiceService; - - /** - * 查询【请填写功能名称】列表 - */ - @RequiresPermissions("system:service:list") - @GetMapping("/list") - public Result> list(OpenServiceAdd openService) - { - startPage(); - List list = openServiceService.selectOpenServiceList(openService); - return getDataTable(list); - } - - /** - * 导出【请填写功能名称】列表 - */ - @RequiresPermissions("system:service:export") - @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, OpenServiceAdd openService) - { - List list = openServiceService.selectOpenServiceList(openService); - ExcelUtil util = new ExcelUtil(OpenServiceAdd.class); - util.exportExcel(response, list, "【请填写功能名称】数据"); - } - - /** - * 获取【请填写功能名称】详细信息 - */ - @RequiresPermissions("system:service:query") - @GetMapping(value = "/{id}") - public Result getInfo(@PathVariable("id") Long id) - { - return success(openServiceService.selectOpenServiceById(id)); - } - - /** - * 新增【请填写功能名称】 - */ - @RequiresPermissions("system:service:add") - @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) - @PostMapping - public Result add(@RequestBody OpenServiceAdd openService) - { - return toAjax(openServiceService.insertOpenService(openService)); - } - - /** - * 修改【请填写功能名称】 - */ - @RequiresPermissions("system:service:edit") - @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) - @PutMapping - public Result edit(@RequestBody OpenServiceAdd openService) - { - return toAjax(openServiceService.updateOpenService(openService)); - } - - /** - * 删除【请填写功能名称】 - */ - @RequiresPermissions("system:service:remove") - @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public Result remove(@PathVariable Long[] ids) - { - return toAjax(openServiceService.deleteOpenServiceByIds(ids)); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/PayForController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/PayForController.java deleted file mode 100644 index 68fe28f..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/PayForController.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.muyu.networking.controller; - -import com.muyu.common.core.domain.Result; -import com.muyu.common.core.utils.poi.ExcelUtil; -import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.web.page.TableDataInfo; -import com.muyu.common.log.annotation.Log; -import com.muyu.common.log.enums.BusinessType; -import com.muyu.common.security.annotation.RequiresPermissions; -import com.muyu.domain.PayOf; -import com.muyu.networking.service.PayOfService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * 【请填写功能名称】Controller - * - * @author ruoyi - * @date 2024-05-25 - */ -@RestController -@RequestMapping("/for") -public class PayForController extends BaseController -{ - @Autowired - private PayOfService payForService; - - /** - * 查询【请填写功能名称】列表 - */ - @RequiresPermissions("system:for:list") - @GetMapping("/list") - public Result> list(PayOf payFor) - { - startPage(); - List list = payForService.selectPayOfList(payFor); - return getDataTable(list); - } - - /** - * 导出【请填写功能名称】列表 - */ - @RequiresPermissions("system:for:export") - @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, PayOf payFor) - { - List list = payForService.selectPayOfList(payFor); - ExcelUtil util = new ExcelUtil(PayOf.class); - util.exportExcel(response, list, "【请填写功能名称】数据"); - } - - /** - * 获取【请填写功能名称】详细信息 - */ - @RequiresPermissions("system:for:query") - @GetMapping(value = "/{id}") - public Result getInfo(@PathVariable("id") Long id) - { - return success(payForService.selectPayOfById(id)); - } - - /** - * 新增【请填写功能名称】 - */ - @RequiresPermissions("system:for:add") - @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) - @PostMapping - public Result add(@RequestBody PayOf payFor) - { - return toAjax(payForService.insertPayOf(payFor)); - } - - /** - * 修改【请填写功能名称】 - */ - @RequiresPermissions("system:for:edit") - @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) - @PutMapping - public Result edit(@RequestBody PayOf payFor) - { - return toAjax(payForService.updatePayOf(payFor)); - } - - /** - * 删除【请填写功能名称】 - */ - @RequiresPermissions("system:for:remove") - @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public Result remove(@PathVariable Long[] ids) - { - return toAjax(payForService.deletePayOfByIds(ids)); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/TypeController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/TypeController.java deleted file mode 100644 index 7fc0b09..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/controller/TypeController.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.muyu.networking.controller; - - -import com.muyu.common.core.domain.Result; -import com.muyu.common.core.utils.poi.ExcelUtil; -import com.muyu.common.core.web.controller.BaseController; -import com.muyu.common.core.web.page.TableDataInfo; -import com.muyu.common.log.annotation.Log; -import com.muyu.common.log.enums.BusinessType; -import com.muyu.common.security.annotation.RequiresPermissions; -import com.muyu.domain.Type; -import com.muyu.networking.service.ITypeService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import javax.servlet.http.HttpServletResponse; -import java.util.List; - -/** - * 【请填写功能名称】Controller - * - * @author ruoyi - * @date 2024-05-27 - */ -@RestController -@RequestMapping("/type") -public class TypeController extends BaseController -{ - @Autowired - private ITypeService typeService; - - /** - * 查询【请填写功能名称】列表 - */ - @RequiresPermissions("system:type:list") - @GetMapping("/list") - public Result> list(Type type) - { - startPage(); - List list = typeService.selectTypeList(type); - return getDataTable(list); - } - - /** - * 导出【请填写功能名称】列表 - */ - @RequiresPermissions("system:type:export") - @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, Type type) - { - List list = typeService.selectTypeList(type); - ExcelUtil util = new ExcelUtil(Type.class); - util.exportExcel(response, list, "【请填写功能名称】数据"); - } - - /** - * 获取【请填写功能名称】详细信息 - */ - @RequiresPermissions("system:type:query") - @GetMapping(value = "/{id}") - public Result getInfo(@PathVariable("id") Long id) - { - return success(typeService.selectTypeById(id)); - } - - /** - * 新增【请填写功能名称】 - */ - @RequiresPermissions("system:type:add") - @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) - @PostMapping - public Result add(@RequestBody Type type) - { - return toAjax(typeService.insertType(type)); - } - - /** - * 修改【请填写功能名称】 - */ - @RequiresPermissions("system:type:edit") - @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) - @PutMapping - public Result edit(@RequestBody Type type) - { - return toAjax(typeService.updateType(type)); - } - - /** - * 删除【请填写功能名称】 - */ - @RequiresPermissions("system:type:remove") - @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public Result remove(@PathVariable Long[] ids) - { - return toAjax(typeService.deleteTypeByIds(ids)); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/AddServiceMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/AddServiceMapper.java deleted file mode 100644 index c0220ad..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/AddServiceMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.muyu.networking.mapper; - - -import com.muyu.domain.AddService; - -import java.util.List; - -/** - * 【请填写功能名称】Mapper接口 - * - * @author ruoyi - * @date 2024-05-25 - */ -public interface AddServiceMapper -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public AddService selectAddServiceById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param addService 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectAddServiceList(AddService addService); - - /** - * 新增【请填写功能名称】 - * - * @param addService 【请填写功能名称】 - * @return 结果 - */ - public int insertAddService(AddService addService); - - /** - * 修改【请填写功能名称】 - * - * @param addService 【请填写功能名称】 - * @return 结果 - */ - public int updateAddService(AddService addService); - - /** - * 删除【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteAddServiceById(Long id); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteAddServiceByIds(Long[] ids); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/CertificationMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/CertificationMapper.java deleted file mode 100644 index d9cbce2..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/CertificationMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.muyu.networking.mapper; - - -import com.muyu.domain.Certification; - -import java.util.List; - -/** - * 【请填写功能名称】Mapper接口 - * - * @author ruoyi - * @date 2024-05-25 - */ -public interface CertificationMapper -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public Certification selectCertificationById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param certification 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectCertificationList(Certification certification); - - /** - * 新增【请填写功能名称】 - * - * @param certification 【请填写功能名称】 - * @return 结果 - */ - public int insertCertification(Certification certification); - - /** - * 修改【请填写功能名称】 - * - * @param certification 【请填写功能名称】 - * @return 结果 - */ - public int updateCertification(Certification certification); - - /** - * 删除【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteCertificationById(Long id); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteCertificationByIds(Long[] ids); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/EnterpriseMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/EnterpriseMapper.java deleted file mode 100644 index 0d40d26..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/EnterpriseMapper.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.muyu.networking.mapper; - -import com.muyu.domain.Enterprise; - -import java.util.List; - -/** - * 【请填写功能名称】Mapper接口 - * - * @author ruoyi - * @date 2024-05-25 - */ -public interface EnterpriseMapper -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public Enterprise selectEnterpriseById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param enterprise 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectEnterpriseList(Enterprise enterprise); - - /** - * 新增【请填写功能名称】 - * - * @param enterprise 【请填写功能名称】 - * @return 结果 - */ - public int insertEnterprise(Enterprise enterprise); - - /** - * 修改【请填写功能名称】 - * - * @param enterprise 【请填写功能名称】 - * @return 结果 - */ - public int updateEnterprise(Enterprise enterprise); - - /** - * 删除【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteEnterpriseById(Long id); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteEnterpriseByIds(Long[] ids); - - /** - * 修改开通服务状态 - * */ - public int updateEnterpriseStatus(Long id,String openAdd); - - - -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/FenceMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/FenceMapper.java deleted file mode 100644 index 5b516f3..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/FenceMapper.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.muyu.networking.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.muyu.domain.Fences; -import org.apache.ibatis.annotations.Mapper; - -/** - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/31 16:21 - */ -@Mapper -public interface FenceMapper extends BaseMapper { - - int addFeace(Fences fences); - -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/InformationMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/InformationMapper.java deleted file mode 100644 index 5b5b52e..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/InformationMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.muyu.networking.mapper; - - -import com.muyu.domain.Information; - -import java.util.List; - -/** - * 【请填写功能名称】Mapper接口 - * - * @author ruoyi - * @date 2024-05-27 - */ -public interface InformationMapper -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public Information selectInformationById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param information 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectInformationList(Information information); - - /** - * 新增【请填写功能名称】 - * - * @param information 【请填写功能名称】 - * @return 结果 - */ - public int insertInformation(Information information); - - /** - * 修改【请填写功能名称】 - * - * @param information 【请填写功能名称】 - * @return 结果 - */ - public int updateInformation(Information information); - - /** - * 删除【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteInformationById(Long id); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteInformationByIds(Long[] ids); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/ModeOfPaymentIdMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/ModeOfPaymentIdMapper.java deleted file mode 100644 index 3d43c1d..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/ModeOfPaymentIdMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.muyu.networking.mapper; - - -import com.muyu.domain.ModeOfPayment; - -import java.util.List; - -/** - * 【请填写功能名称】Mapper接口 - * - * @author ruoyi - * @date 2024-05-25 - */ -public interface ModeOfPaymentIdMapper -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public ModeOfPayment selectModeOfPaymentIdById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param modeOfPaymentId 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectModeOfPaymentIdList(ModeOfPayment modeOfPaymentId); - - /** - * 新增【请填写功能名称】 - * - * @param modeOfPaymentId 【请填写功能名称】 - * @return 结果 - */ - public int insertModeOfPaymentId(ModeOfPayment modeOfPaymentId); - - /** - * 修改【请填写功能名称】 - * - * @param modeOfPaymentId 【请填写功能名称】 - * @return 结果 - */ - public int updateModeOfPaymentId(ModeOfPayment modeOfPaymentId); - - /** - * 删除【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteModeOfPaymentIdById(Long id); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteModeOfPaymentIdByIds(Long[] ids); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/OpenServiceMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/OpenServiceMapper.java deleted file mode 100644 index f702c2a..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/OpenServiceMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.muyu.networking.mapper; - -import com.muyu.domain.OpenServiceAdd; - -import java.util.List; - - -/** - * 【请填写功能名称】Mapper接口 - * - * @author ruoyi - * @date 2024-05-25 - */ -public interface OpenServiceMapper -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public OpenServiceAdd selectOpenServiceById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param openService 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectOpenServiceList(OpenServiceAdd openService); - - /** - * 新增【请填写功能名称】 - * - * @param openService 【请填写功能名称】 - * @return 结果 - */ - public int insertOpenService(OpenServiceAdd openService); - - /** - * 修改【请填写功能名称】 - * - * @param openService 【请填写功能名称】 - * @return 结果 - */ - public int updateOpenService(OpenServiceAdd openService); - - /** - * 删除【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteOpenServiceById(Long id); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteOpenServiceByIds(Long[] ids); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/PayOfMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/PayOfMapper.java deleted file mode 100644 index f930474..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/PayOfMapper.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.muyu.networking.mapper; - -import com.muyu.domain.PayOf; - -import java.util.List; - -/** - * 【请填写功能名称】Mapper接口 - * - * @author ruoyi - * @date 2024-05-25 - */ -public interface PayOfMapper -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public PayOf selectPayOfById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param PayOf 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectPayOfList(PayOf PayOf); - - /** - * 新增【请填写功能名称】 - * - * @param PayOf 【请填写功能名称】 - * @return 结果 - */ - public int insertPayOf(PayOf PayOf); - - /** - * 修改【请填写功能名称】 - * - * @param PayOf 【请填写功能名称】 - * @return 结果 - */ - public int updatePayOf(PayOf PayOf); - - /** - * 删除【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deletePayOfById(Long id); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deletePayOfByIds(Long[] ids); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/TypeMapper.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/TypeMapper.java deleted file mode 100644 index 6ccdab4..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/mapper/TypeMapper.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.muyu.networking.mapper; - -import com.muyu.domain.Type; - -import java.util.List; - -/** - * 【请填写功能名称】Mapper接口 - * - * @author ruoyi - * @date 2024-05-27 - */ -public interface TypeMapper -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public Type selectTypeById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param type 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectTypeList(Type type); - - /** - * 新增【请填写功能名称】 - * - * @param type 【请填写功能名称】 - * @return 结果 - */ - public int insertType(Type type); - - /** - * 修改【请填写功能名称】 - * - * @param type 【请填写功能名称】 - * @return 结果 - */ - public int updateType(Type type); - - /** - * 删除【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteTypeById(Long id); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的数据主键集合 - * @return 结果 - */ - public int deleteTypeByIds(Long[] ids); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/opFen/SysUserNet.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/opFen/SysUserNet.java deleted file mode 100644 index a5af976..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/opFen/SysUserNet.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.muyu.networking.opFen; - -import com.muyu.common.core.domain.Result; -import com.muyu.common.system.domain.SysUser; -import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; - -/** - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/27 15:11 - */ -@FeignClient("muyu-system") -public interface SysUserNet { - - @PostMapping("/system/user") - public Result add (@Validated @RequestBody SysUser user); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/AddServiceService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/AddServiceService.java deleted file mode 100644 index 3007a55..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/AddServiceService.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.muyu.networking.service; - - -import com.muyu.domain.AddService; - -import java.util.List; - -/** - * 【请填写功能名称】Service接口 - * - * @author ruoyi - * @date 2024-05-25 - */ -public interface AddServiceService -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public AddService selectAddServiceById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param addService 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectAddServiceList(AddService addService); - - /** - * 新增【请填写功能名称】 - * - * @param addService 【请填写功能名称】 - * @return 结果 - */ - public int insertAddService(AddService addService); - - /** - * 修改【请填写功能名称】 - * - * @param addService 【请填写功能名称】 - * @return 结果 - */ - public int updateAddService(AddService addService); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键集合 - * @return 结果 - */ - public int deleteAddServiceByIds(Long[] ids); - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteAddServiceById(Long id); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/CertificationService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/CertificationService.java deleted file mode 100644 index bae4ad1..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/CertificationService.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.muyu.networking.service; - - -import com.muyu.domain.Certification; - -import java.util.List; - -/** - * 【请填写功能名称】Service接口 - * - * @author ruoyi - * @date 2024-05-25 - */ -public interface CertificationService -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public Certification selectCertificationById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param certification 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectCertificationList(Certification certification); - - /** - * 新增【请填写功能名称】 - * - * @param certification 【请填写功能名称】 - * @return 结果 - */ - public int insertCertification(Certification certification); - - /** - * 修改【请填写功能名称】 - * - * @param certification 【请填写功能名称】 - * @return 结果 - */ - public int updateCertification(Certification certification); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键集合 - * @return 结果 - */ - public int deleteCertificationByIds(Long[] ids); - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteCertificationById(Long id); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/EnterpriseService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/EnterpriseService.java deleted file mode 100644 index ff3f7dd..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/EnterpriseService.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.muyu.networking.service; -import com.muyu.domain.Enterprise; - -import java.util.List; - -/** - * 【请填写功能名称】Service接口 - * - * @author ruoyi - * @date 2024-05-25 - */ -public interface EnterpriseService -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public Enterprise selectEnterpriseById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param enterprise 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectEnterpriseList(Enterprise enterprise); - - /** - * 新增【请填写功能名称】 - * - * @param enterprise 【请填写功能名称】 - * @return 结果 - */ - public int insertEnterprise(Enterprise enterprise); - - /** - * 修改【请填写功能名称】 - * - * @param enterprise 【请填写功能名称】 - * @return 结果 - */ - public int updateEnterprise(Enterprise enterprise); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键集合 - * @return 结果 - */ - public int deleteEnterpriseByIds(Long[] ids); - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteEnterpriseById(Long id); - - - /** - * 修改服务开通的状态 - * **/ - public int updateEnterpriseStatus(Long id,String openAdd); - - - -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/FenceService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/FenceService.java deleted file mode 100644 index 245ebb8..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/FenceService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.muyu.networking.service; - -import com.baomidou.mybatisplus.extension.service.IService; -import com.muyu.domain.Fences; - -/** - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/31 16:22 - */ -public interface FenceService extends IService { - - int insertFence(Fences fences); - -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/IInformationService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/IInformationService.java deleted file mode 100644 index 7297cb2..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/IInformationService.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.muyu.networking.service; - - -import com.baomidou.mybatisplus.extension.service.IService; -import com.muyu.domain.Information; - -import java.util.List; - -/** - * 【请填写功能名称】Service接口 - * - * @author ruoyi - * @date 2024-05-27 - */ -public interface IInformationService extends IService -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public Information selectInformationById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param information 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectInformationList(Information information); - - /** - * 新增【请填写功能名称】 - * - * @param information 【请填写功能名称】 - * @return 结果 - */ - public int insertInformation(Information information); - - /** - * 修改【请填写功能名称】 - * - * @param information 【请填写功能名称】 - * @return 结果 - */ - public int updateInformation(Information information); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键集合 - * @return 结果 - */ - public int deleteInformationByIds(Long[] ids); - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteInformationById(Long id); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ITypeService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ITypeService.java deleted file mode 100644 index dcdc008..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ITypeService.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.muyu.networking.service; - - -import com.muyu.domain.Type; - -import java.util.List; - -/** - * 【请填写功能名称】Service接口 - * - * @author ruoyi - * @date 2024-05-27 - */ -public interface ITypeService -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public Type selectTypeById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param type 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectTypeList(Type type); - - /** - * 新增【请填写功能名称】 - * - * @param type 【请填写功能名称】 - * @return 结果 - */ - public int insertType(Type type); - - /** - * 修改【请填写功能名称】 - * - * @param type 【请填写功能名称】 - * @return 结果 - */ - public int updateType(Type type); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键集合 - * @return 结果 - */ - public int deleteTypeByIds(Long[] ids); - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteTypeById(Long id); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ModeOfPaymentIdService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ModeOfPaymentIdService.java deleted file mode 100644 index c783389..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/ModeOfPaymentIdService.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.muyu.networking.service; - - -import com.muyu.domain.ModeOfPayment; - -import java.util.List; - -/** - * 【请填写功能名称】Service接口 - * - * @author ruoyi - * @date 2024-05-25 - */ -public interface ModeOfPaymentIdService -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public ModeOfPayment selectModeOfPaymentIdById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param modeOfPaymentId 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectModeOfPaymentIdList(ModeOfPayment modeOfPaymentId); - - /** - * 新增【请填写功能名称】 - * - * @param modeOfPaymentId 【请填写功能名称】 - * @return 结果 - */ - public int insertModeOfPaymentId(ModeOfPayment modeOfPaymentId); - - /** - * 修改【请填写功能名称】 - * - * @param modeOfPaymentId 【请填写功能名称】 - * @return 结果 - */ - public int updateModeOfPaymentId(ModeOfPayment modeOfPaymentId); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键集合 - * @return 结果 - */ - public int deleteModeOfPaymentIdByIds(Long[] ids); - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteModeOfPaymentIdById(Long id); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/OpenServiceService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/OpenServiceService.java deleted file mode 100644 index d606ee8..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/OpenServiceService.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.muyu.networking.service; - - -import com.muyu.domain.OpenServiceAdd; - -import java.util.List; - -/** - * 【请填写功能名称】Service接口 - * - * @author ruoyi - * @date 2024-05-25 - */ -public interface OpenServiceService -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public OpenServiceAdd selectOpenServiceById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param openService 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectOpenServiceList(OpenServiceAdd openService); - - /** - * 新增【请填写功能名称】 - * - * @param openService 【请填写功能名称】 - * @return 结果 - */ - public int insertOpenService(OpenServiceAdd openService); - - /** - * 修改【请填写功能名称】 - * - * @param openService 【请填写功能名称】 - * @return 结果 - */ - public int updateOpenService(OpenServiceAdd openService); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键集合 - * @return 结果 - */ - public int deleteOpenServiceByIds(Long[] ids); - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deleteOpenServiceById(Long id); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/PayOfService.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/PayOfService.java deleted file mode 100644 index 9d94ff8..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/PayOfService.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.muyu.networking.service; - - -import com.muyu.domain.PayOf; - -import java.util.List; - -/** - * 【请填写功能名称】Service接口 - * - * @author ruoyi - * @date 2024-05-25 - */ -public interface PayOfService -{ - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - public PayOf selectPayOfById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param PayOf 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectPayOfList(PayOf PayOf); - - /** - * 新增【请填写功能名称】 - * - * @param PayOf 【请填写功能名称】 - * @return 结果 - */ - public int insertPayOf(PayOf PayOf); - - /** - * 修改【请填写功能名称】 - * - * @param PayOf 【请填写功能名称】 - * @return 结果 - */ - public int updatePayOf(PayOf PayOf); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键集合 - * @return 结果 - */ - public int deletePayOfByIds(Long[] ids); - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - public int deletePayOfById(Long id); -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/AddServiceServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/AddServiceServiceImpl.java deleted file mode 100644 index b0f3a3d..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/AddServiceServiceImpl.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.muyu.networking.service.impl; - -import com.muyu.common.core.utils.DateUtils; -import com.muyu.domain.AddService; -import com.muyu.networking.mapper.AddServiceMapper; -import com.muyu.networking.service.AddServiceService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author ruoyi - * @date 2024-05-25 - */ -@Service -public class AddServiceServiceImpl implements AddServiceService -{ - @Autowired - private AddServiceMapper addServiceMapper; - - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - @Override - public AddService selectAddServiceById(Long id) - { - return addServiceMapper.selectAddServiceById(id); - } - - /** - * 查询【请填写功能名称】列表 - * - * @param addService 【请填写功能名称】 - * @return 【请填写功能名称】 - */ - @Override - public List selectAddServiceList(AddService addService) - { - return addServiceMapper.selectAddServiceList(addService); - } - - /** - * 新增【请填写功能名称】 - * - * @param addService 【请填写功能名称】 - * @return 结果 - */ - @Override - public int insertAddService(AddService addService) - { - addService.setCreateTime(DateUtils.getNowDate()); - return addServiceMapper.insertAddService(addService); - } - - /** - * 修改【请填写功能名称】 - * - * @param addService 【请填写功能名称】 - * @return 结果 - */ - @Override - public int updateAddService(AddService addService) - { - addService.setUpdateTime(DateUtils.getNowDate()); - return addServiceMapper.updateAddService(addService); - } - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteAddServiceByIds(Long[] ids) - { - return addServiceMapper.deleteAddServiceByIds(ids); - } - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteAddServiceById(Long id) - { - return addServiceMapper.deleteAddServiceById(id); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/CertificationServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/CertificationServiceImpl.java deleted file mode 100644 index 9023eb0..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/CertificationServiceImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.muyu.networking.service.impl; - - -import com.muyu.common.core.utils.DateUtils; -import com.muyu.domain.Certification; -import com.muyu.networking.mapper.CertificationMapper; -import com.muyu.networking.service.CertificationService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author ruoyi - * @date 2024-05-25 - */ -@Service -public class CertificationServiceImpl implements CertificationService -{ - @Autowired - private CertificationMapper certificationMapper; - - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - @Override - public Certification selectCertificationById(Long id) - { - return certificationMapper.selectCertificationById(id); - } - - /** - * 查询【请填写功能名称】列表 - * - * @param certification 【请填写功能名称】 - * @return 【请填写功能名称】 - */ - @Override - public List selectCertificationList(Certification certification) - { - return certificationMapper.selectCertificationList(certification); - } - - /** - * 新增【请填写功能名称】 - * - * @param certification 【请填写功能名称】 - * @return 结果 - */ - @Override - public int insertCertification(Certification certification) - { - certification.setCreateTime(DateUtils.getNowDate()); - return certificationMapper.insertCertification(certification); - } - - /** - * 修改【请填写功能名称】 - * - * @param certification 【请填写功能名称】 - * @return 结果 - */ - @Override - public int updateCertification(Certification certification) - { - certification.setUpdateTime(DateUtils.getNowDate()); - return certificationMapper.updateCertification(certification); - } - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteCertificationByIds(Long[] ids) - { - return certificationMapper.deleteCertificationByIds(ids); - } - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteCertificationById(Long id) - { - return certificationMapper.deleteCertificationById(id); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/EnterpriseServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/EnterpriseServiceImpl.java deleted file mode 100644 index f870ba8..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/EnterpriseServiceImpl.java +++ /dev/null @@ -1,247 +0,0 @@ -package com.muyu.networking.service.impl; - - -import com.muyu.common.core.domain.Result; -import com.muyu.common.core.utils.DateUtils; -import com.muyu.common.security.utils.SecurityUtils; -import com.muyu.common.system.domain.SysUser; -import com.muyu.common.system.remote.RemoteUserService; -import com.muyu.domain.Enterprise; -import com.muyu.networking.mapper.EnterpriseMapper; -import com.muyu.networking.service.EnterpriseService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; -import java.util.UUID; - - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author ruoyi - * @date 2024-05-25 - */ -@Service -public class EnterpriseServiceImpl implements EnterpriseService -{ - @Autowired - private EnterpriseMapper enterpriseMapper; - - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - @Override - public Enterprise selectEnterpriseById(Long id) - { - return enterpriseMapper.selectEnterpriseById(id); - } - - /** - * 查询【请填写功能名称】列表 - * - * @param enterprise 【请填写功能名称】 - * @return 【请填写功能名称】 - */ - @Override - public List selectEnterpriseList(Enterprise enterprise) - { - return enterpriseMapper.selectEnterpriseList(enterprise); - } - @Autowired - private RemoteUserService remoteUserService; - /** - * 新增【请填写功能名称】 - * - * @param enterprise 【请填写功能名称】 - * @return 结果 - */ - @Override - public int insertEnterprise(Enterprise enterprise) - { - enterprise.setCreateBy(SecurityUtils.getUsername()); - enterprise.setCreateTime(DateUtils.getNowDate()); - enterprise.setBusinessLicenseNumber(UUID.randomUUID().toString().replaceAll("-","")); - enterprise.setStatus("1"); - enterprise.setCertification("1"); - enterprise.setOpenAdd("0"); - SysUser sysUser = SysUser.builder().userName(enterprise.getEnterpriseName()) - .password("admin") - .nickName(enterprise.getEnterpriseName()). - userType(String.valueOf(enterprise.getId())) - .build(); - Result add = remoteUserService.add(sysUser); - return enterpriseMapper.insertEnterprise(enterprise); - } - /** - * 修改【请填写功能名称】 - * - * @param enterprise 【请填写功能名称】 - * @return 结果 - */ - @Override - public int updateEnterprise(Enterprise enterprise) - { - enterprise.setUpdateTime(DateUtils.getNowDate()); - return enterpriseMapper.updateEnterprise(enterprise); - } - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteEnterpriseByIds(Long[] ids) - { - return enterpriseMapper.deleteEnterpriseByIds(ids); - } - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteEnterpriseById(Long id) - { - return enterpriseMapper.deleteEnterpriseById(id); - } - - @Override - public int updateEnterpriseStatus(Long id, String openAdd) { - if (enterpriseMapper.updateEnterpriseStatus(id, openAdd) > 0) { - return 1; - } - return 0; - } - - -//public void DockerMySQLExample() throws IOException { -// //配置docker 客户端配置 -// DefaultDockerClientConfig.createDefaultConfigBuilder() -// .withDockerHost("tcp://115.159.67.205:3306") // 使用Docker守护进程地址 -// .build(); -// DockerClient dockerClient = DockerClientBuilder.getInstance().build(); -// -// try { -// CreateContainerCmd createContainerCmd = dockerClient.createContainerCmd("mysql:latest") -// .withName("my-mysql-container") -// .withEnv("MYSQL_ROOT_PASSWORD=my-secret-pw"); -// CreateContainerResponse container = createContainerCmd.exec(); -// System.out.println("Created container " + container.getId()); -// dockerClient.startContainerCmd(container.getId()).exec(); -// InspectContainerResponse inspectContainerResponse = dockerClient.inspectContainerCmd(container.getId()).exec(); -// System.out.println("Started container " + container.getId()); -// System.out.println("Container started, inspecting logs:"); -// InputStream logs = dockerClient.logContainerCmd(container.getId()) -// .withStdErr(true) -// .withStdOut(true) -// .withFollowStream(true) -// .exec(); -// try (BufferedReader reader = new BufferedReader(new InputStreamReader(logs))) { -// String line; -// while ((line = reader.readLine()) != null) { -// System.out.println(line); -// } -// } -// ExecCreateCmdResponse execCreateCmdResponse = dockerClient.execCreateCmd(container.getId()) -// .withCmd("mysql", "-u", "root", "-p", "my-secret-pw", "my_database") -// .exec(); -// } -// catch (Exception e) { -// e.printStackTrace(); -// } -// dockerClient.close(); -//} - - - - - - - - -// public void DockerMySQLExample() throws IOException { -// // 配置Docker客户端 -// DefaultDockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder() -// .withDockerHost("tcp://115.159.67.205:3306") // 使用Docker守护进程地址 -// .build(); -// DockerClient dockerClient = DockerClientBuilder.getInstance(config).build(); -// -// try { -// // 创建新的MySQL容器 -// CreateContainerCmd createContainerCmd = dockerClient.createContainerCmd("mysql:latest") -// .withName("my-mysql-container") -// .withEnv("MYSQL_ROOT_PASSWORD=my-secret-pw"); -// -// CreateContainerResponse container = createContainerCmd.exec(); -// System.out.println("Created container " + container.getId()); -// -// // 启动MySQL容器 -// dockerClient.startContainerCmd(container.getId()).exec(); -// -// // 执行初始化脚本 -// String initScript = "CREATE DATABASE IF NOT EXISTS mydb;\n" + -// "GRANT ALL PRIVILEGES ON mydb.* TO 'myuser' IDENTIFIED BY 'mypass';"; -// -// // 获取容器的进程信息 -// InspectContainerResponse inspectContainerResponse = dockerClient.inspectContainerCmd(container.getId()).exec(); -// String containerId = inspectContainerResponse.getId(); -// -// // 将初始化脚本通过stdin传递给MySQL -// String execId = dockerClient.execCreateCmd(containerId, "/bin/bash", "-c", "mysql -u root -p$MYSQL_ROOT_PASSWORD") -// .withAttachStdout(true) -// .withAttachStdin(true) -// .exec() -// .getId(); -// -// try (ExecStartResultCallback callback = new ExecStartResultCallback()) { -// -// InputStream execStream = dockerClient.execStartCmd(execId).withDetach(false) -// .withTty(false) -// .withCmd(initScript) -// .exec() -// .getExecResult() -// .getStdout(); -// -// // 读取并打印脚本执行结果 -// BufferedReader reader = new BufferedReader(new InputStreamReader(execStream)); -// String line; -// while ((line = reader.readLine()) != null) { -// System.out.println(line); -// } -// } -// } catch (Exception e) { -// e.printStackTrace(); -// } finally { -// // 清理资源,移除容器 -// dockerClient.close(); -// } -// } - - - - - - - - - - - - - - - - - - - } - - diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/FenceServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/FenceServiceImpl.java deleted file mode 100644 index ee35916..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/FenceServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.muyu.networking.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.muyu.domain.Fences; -import com.muyu.networking.mapper.FenceMapper; -import com.muyu.networking.service.FenceService; - -/** - * @ClassDescription: - * @JdkVersion: 17 - * @Author: zhangxu - * @Created: 2024/5/31 16:23 - */ -public class FenceServiceImpl extends ServiceImpl implements FenceService { - - - @Override - public int insertFence(Fences fences) { - return 0; - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/InformationServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/InformationServiceImpl.java deleted file mode 100644 index 3263937..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/InformationServiceImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.muyu.networking.service.impl; - -import com.muyu.common.core.utils.DateUtils; -import com.muyu.domain.Information; -import com.muyu.networking.mapper.InformationMapper; -import com.muyu.networking.service.IInformationService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author ruoyi - * @date 2024-05-27 - */ -@Service -public class InformationServiceImpl implements IInformationService -{ - @Autowired - private InformationMapper informationMapper; - - - - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - @Override - public Information selectInformationById(Long id) - { - return informationMapper.selectInformationById(id); - } - - /** - * 查询【请填写功能名称】列表 - * - * @param information 【请填写功能名称】 - * @return 【请填写功能名称】 - */ - @Override - public List selectInformationList(Information information) - { - return informationMapper.selectInformationList(information); - } - - /** - * 新增【请填写功能名称】 - * - * @param information 【请填写功能名称】 - * @return 结果 - */ - @Override - public int insertInformation(Information information) - { - information.setCreateTime(DateUtils.getNowDate()); - return informationMapper.insertInformation(information); - } - - /** - * 修改【请填写功能名称】 - * - * @param information 【请填写功能名称】 - * @return 结果 - */ - @Override - public int updateInformation(Information information) - { - information.setUpdateTime(DateUtils.getNowDate()); - return informationMapper.updateInformation(information); - } - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteInformationByIds(Long[] ids) - { - return informationMapper.deleteInformationByIds(ids); - } - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteInformationById(Long id) - { - return informationMapper.deleteInformationById(id); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/ModeOfPaymentIdServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/ModeOfPaymentIdServiceImpl.java deleted file mode 100644 index ba379ae..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/ModeOfPaymentIdServiceImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.muyu.networking.service.impl; - - -import com.muyu.common.core.utils.DateUtils; -import com.muyu.domain.ModeOfPayment; -import com.muyu.networking.mapper.ModeOfPaymentIdMapper; -import com.muyu.networking.service.ModeOfPaymentIdService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author ruoyi - * @date 2024-05-25 - */ -@Service -public class ModeOfPaymentIdServiceImpl implements ModeOfPaymentIdService -{ - @Autowired - private ModeOfPaymentIdMapper modeOfPaymentIdMapper; - - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - @Override - public ModeOfPayment selectModeOfPaymentIdById(Long id) - { - return modeOfPaymentIdMapper.selectModeOfPaymentIdById(id); - } - - /** - * 查询【请填写功能名称】列表 - * - * @param modeOfPaymentId 【请填写功能名称】 - * @return 【请填写功能名称】 - */ - @Override - public List selectModeOfPaymentIdList(ModeOfPayment modeOfPaymentId) - { - return modeOfPaymentIdMapper.selectModeOfPaymentIdList(modeOfPaymentId); - } - - /** - * 新增【请填写功能名称】 - * - * @param modeOfPaymentId 【请填写功能名称】 - * @return 结果 - */ - @Override - public int insertModeOfPaymentId(ModeOfPayment modeOfPaymentId) - { - modeOfPaymentId.setCreateTime(DateUtils.getNowDate()); - return modeOfPaymentIdMapper.insertModeOfPaymentId(modeOfPaymentId); - } - - /** - * 修改【请填写功能名称】 - * - * @param modeOfPaymentId 【请填写功能名称】 - * @return 结果 - */ - @Override - public int updateModeOfPaymentId(ModeOfPayment modeOfPaymentId) - { - modeOfPaymentId.setUpdateTime(DateUtils.getNowDate()); - return modeOfPaymentIdMapper.updateModeOfPaymentId(modeOfPaymentId); - } - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteModeOfPaymentIdByIds(Long[] ids) - { - return modeOfPaymentIdMapper.deleteModeOfPaymentIdByIds(ids); - } - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteModeOfPaymentIdById(Long id) - { - return modeOfPaymentIdMapper.deleteModeOfPaymentIdById(id); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/OpenServiceServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/OpenServiceServiceImpl.java deleted file mode 100644 index 6d1dcb0..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/OpenServiceServiceImpl.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.muyu.networking.service.impl; - -import com.muyu.common.core.utils.DateUtils; -import com.muyu.domain.OpenServiceAdd; -import com.muyu.networking.mapper.OpenServiceMapper; -import com.muyu.networking.service.OpenServiceService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author ruoyi - * @date 2024-05-25 - */ -@Service -public class OpenServiceServiceImpl implements OpenServiceService -{ - @Autowired - private OpenServiceMapper openServiceMapper; - - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - @Override - public OpenServiceAdd selectOpenServiceById(Long id) - { - return openServiceMapper.selectOpenServiceById(id); - } - - /** - * 查询【请填写功能名称】列表 - * - * @param openService 【请填写功能名称】 - * @return 【请填写功能名称】 - */ - @Override - public List selectOpenServiceList(OpenServiceAdd openService) - { - return openServiceMapper.selectOpenServiceList(openService); - } - - /** - * 新增【请填写功能名称】 - * - * @param openService 【请填写功能名称】 - * @return 结果 - */ - @Override - public int insertOpenService(OpenServiceAdd openService) - { - openService.setCreateTime(DateUtils.getNowDate()); - return openServiceMapper.insertOpenService(openService); - } - - /** - * 修改【请填写功能名称】 - * - * @param openService 【请填写功能名称】 - * @return 结果 - */ - @Override - public int updateOpenService(OpenServiceAdd openService) - { - openService.setUpdateTime(DateUtils.getNowDate()); - return openServiceMapper.updateOpenService(openService); - } - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteOpenServiceByIds(Long[] ids) - { - return openServiceMapper.deleteOpenServiceByIds(ids); - } - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteOpenServiceById(Long id) - { - return openServiceMapper.deleteOpenServiceById(id); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/PayOfServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/PayOfServiceImpl.java deleted file mode 100644 index 58cbf2b..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/PayOfServiceImpl.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.muyu.networking.service.impl; - -import com.muyu.common.core.utils.DateUtils; -import com.muyu.domain.PayOf; -import com.muyu.networking.mapper.PayOfMapper; -import com.muyu.networking.service.PayOfService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author ruoyi - * @date 2024-05-25 - */ -@Service -public class PayOfServiceImpl implements PayOfService -{ - @Autowired - private PayOfMapper payOfMapper; - - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - @Override - public PayOf selectPayOfById(Long id) - { - return payOfMapper.selectPayOfById(id); - } - - /** - * 查询【请填写功能名称】列表 - * - * @param PayOf 【请填写功能名称】 - * @return 【请填写功能名称】 - */ - @Override - public List selectPayOfList(PayOf PayOf) - { - return payOfMapper.selectPayOfList(PayOf); - } - - /** - * 新增【请填写功能名称】 - * - * @param PayOf 【请填写功能名称】 - * @return 结果 - */ - @Override - public int insertPayOf(PayOf PayOf) - { - PayOf.setCreateTime(DateUtils.getNowDate()); - return payOfMapper.insertPayOf(PayOf); - } - - /** - * 修改【请填写功能名称】 - * - * @param PayOf 【请填写功能名称】 - * @return 结果 - */ - @Override - public int updatePayOf(PayOf PayOf) - { - PayOf.setUpdateTime(DateUtils.getNowDate()); - return payOfMapper.updatePayOf(PayOf); - } - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deletePayOfByIds(Long[] ids) - { - return payOfMapper.deletePayOfByIds(ids); - } - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deletePayOfById(Long id) - { - return payOfMapper.deletePayOfById(id); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/TypeServiceImpl.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/TypeServiceImpl.java deleted file mode 100644 index 5d33126..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/networking/service/impl/TypeServiceImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.muyu.networking.service.impl; - - -import com.muyu.common.core.utils.DateUtils; -import com.muyu.domain.Type; -import com.muyu.networking.mapper.TypeMapper; -import com.muyu.networking.service.ITypeService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author ruoyi - * @date 2024-05-27 - */ -@Service -public class TypeServiceImpl implements ITypeService -{ - @Autowired - private TypeMapper typeMapper; - - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】主键 - * @return 【请填写功能名称】 - */ - @Override - public Type selectTypeById(Long id) - { - return typeMapper.selectTypeById(id); - } - - /** - * 查询【请填写功能名称】列表 - * - * @param type 【请填写功能名称】 - * @return 【请填写功能名称】 - */ - @Override - public List selectTypeList(Type type) - { - return typeMapper.selectTypeList(type); - } - - /** - * 新增【请填写功能名称】 - * - * @param type 【请填写功能名称】 - * @return 结果 - */ - @Override - public int insertType(Type type) - { - type.setCreateTime(DateUtils.getNowDate()); - return typeMapper.insertType(type); - } - - /** - * 修改【请填写功能名称】 - * - * @param type 【请填写功能名称】 - * @return 结果 - */ - @Override - public int updateType(Type type) - { - type.setUpdateTime(DateUtils.getNowDate()); - return typeMapper.updateType(type); - } - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteTypeByIds(Long[] ids) - { - return typeMapper.deleteTypeByIds(ids); - } - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】主键 - * @return 结果 - */ - @Override - public int deleteTypeById(Long id) - { - return typeMapper.deleteTypeById(id); - } -} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/AddServiceMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/AddServiceMapper.xml deleted file mode 100644 index 813e61f..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/AddServiceMapper.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - select id, add_value, remark, create_by, create_time, update_time, update_by from add_service - - - - - - - - insert into add_service - - add_value, - remark, - create_by, - create_time, - update_time, - update_by, - - - #{addValue}, - #{remark}, - #{createBy}, - #{createTime}, - #{updateTime}, - #{updateBy}, - - - - - update add_service - - add_value = #{addValue}, - remark = #{remark}, - create_by = #{createBy}, - create_time = #{createTime}, - update_time = #{updateTime}, - update_by = #{updateBy}, - - where id = #{id} - - - - delete from add_service where id = #{id} - - - - delete from add_service where id in - - #{id} - - - diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/CertificationMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/CertificationMapper.xml deleted file mode 100644 index 5718ea6..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/CertificationMapper.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - select id, auditor, stat, audit_reason, remark, create_by, create_time, update_by, update_time from certification - - - - - - - - insert into certification - - auditor, - stat, - audit_reason, - remark, - create_by, - create_time, - update_by, - update_time, - - - #{auditor}, - #{stat}, - #{auditReason}, - #{remark}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - - - - - update certification - - auditor = #{auditor}, - stat = #{stat}, - audit_reason = #{auditReason}, - remark = #{remark}, - create_by = #{createBy}, - create_time = #{createTime}, - update_by = #{updateBy}, - update_time = #{updateTime}, - - where id = #{id} - - - - delete from certification where id = #{id} - - - - delete from certification where id in - - #{id} - - - diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/EnterpriseMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/EnterpriseMapper.xml deleted file mode 100644 index f09838e..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/EnterpriseMapper.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - select id, enterprise_name,open_add, legal_person, business_license_number, establishment_date, business_scope, address, contact_phone, email, status, registration_date, certification, remark, create_by, create_time, update_time, update_by from enterprise - - - - - - - - insert into enterprise - - enterprise_name, - legal_person, - business_license_number, - establishment_date, - business_scope, - address, - contact_phone, - email, - status, - registration_date, - certification, - remark, - create_by, - create_time, - update_time, - update_by, - open_add, - - - #{enterpriseName}, - #{legalPerson}, - #{businessLicenseNumber}, - #{establishmentDate}, - #{businessScope}, - #{address}, - #{contactPhone}, - #{email}, - #{status}, - #{registrationDate}, - #{certification}, - #{remark}, - #{createBy}, - #{createTime}, - #{updateTime}, - #{updateBy}, - #{openAdd}, - - - - - update enterprise - - enterprise_name = #{enterpriseName}, - legal_person = #{legalPerson}, - business_license_number = #{businessLicenseNumber}, - establishment_date = #{establishmentDate}, - business_scope = #{businessScope}, - address = #{address}, - contact_phone = #{contactPhone}, - email = #{email}, - status = #{status}, - registration_date = #{registrationDate}, - certification = #{certification}, - remark = #{remark}, - create_by = #{createBy}, - create_time = #{createTime}, - update_time = #{updateTime}, - update_by = #{updateBy}, - open_add = #{openAdd}, - - where id = #{id} - - - update enterprise set open_add = #{openAdd} where id = #{id} - - - - delete from enterprise where id = #{id} - - - - delete from enterprise where id in - - #{id} - - - diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/InformationMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/InformationMapper.xml deleted file mode 100644 index 9181320..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/InformationMapper.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - select id, number, type_id, electronic_id, motor, battery, motor_number, battery_number, enterprise_id, remark, create_by, create_time, update_time from information - - - - - - - - insert into information - - number, - type_id, - electronic_id, - motor, - battery, - motor_number, - battery_number, - enterprise_id, - remark, - create_by, - create_time, - update_time, - - - #{number}, - #{typeId}, - #{electronicId}, - #{motor}, - #{battery}, - #{motorNumber}, - #{batteryNumber}, - #{enterpriseId}, - #{remark}, - #{createBy}, - #{createTime}, - #{updateTime}, - - - - - update information - - number = #{number}, - type_id = #{typeId}, - electronic_id = #{electronicId}, - motor = #{motor}, - battery = #{battery}, - motor_number = #{motorNumber}, - battery_number = #{batteryNumber}, - enterprise_id = #{enterpriseId}, - remark = #{remark}, - create_by = #{createBy}, - create_time = #{createTime}, - update_time = #{updateTime}, - - where id = #{id} - - - - delete from information where id = #{id} - - - - delete from information where id in - - #{id} - - - diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/ModeOfPaymentIdMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/ModeOfPaymentIdMapper.xml deleted file mode 100644 index e9c171e..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/ModeOfPaymentIdMapper.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - select id, payment, remark, create_by, create_time, update_time, update_by from mode_of_payment_id - - - - - - - - insert into mode_of_payment_id - - payment, - remark, - create_by, - create_time, - update_time, - update_by, - - - #{payment}, - #{remark}, - #{createBy}, - #{createTime}, - #{updateTime}, - #{updateBy}, - - - - - update mode_of_payment_id - - payment = #{payment}, - remark = #{remark}, - create_by = #{createBy}, - create_time = #{createTime}, - update_time = #{updateTime}, - update_by = #{updateBy}, - - where id = #{id} - - - - delete from mode_of_payment_id where id = #{id} - - - - delete from mode_of_payment_id where id in - - #{id} - - - diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/OpenServiceMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/OpenServiceMapper.xml deleted file mode 100644 index 26c162b..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/OpenServiceMapper.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - select id, activate_the_service, remark, create_by, create_time, update_time, update_by from open_service - - - - - - - - insert into open_service - - activate_the_service, - remark, - create_by, - create_time, - update_time, - update_by, - - - #{activateTheService}, - #{remark}, - #{createBy}, - #{createTime}, - #{updateTime}, - #{updateBy}, - - - - - update open_service - - activate_the_service = #{activateTheService}, - remark = #{remark}, - create_by = #{createBy}, - create_time = #{createTime}, - update_time = #{updateTime}, - update_by = #{updateBy}, - - where id = #{id} - - - - delete from open_service where id = #{id} - - - - delete from open_service where id in - - #{id} - - - diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/PayForMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/PayForMapper.xml deleted file mode 100644 index 951f496..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/PayForMapper.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - select id, enterprise_id, mode_of_payment_id, price, remark, create_by, create_time, update_time, update_by from pay_for - - - - - - - - insert into pay_for - - enterprise_id, - mode_of_payment_id, - price, - remark, - create_by, - create_time, - update_time, - update_by, - - - #{enterpriseId}, - #{modeOfPaymentId}, - #{price}, - #{remark}, - #{createBy}, - #{createTime}, - #{updateTime}, - #{updateBy}, - - - - - update pay_for - - enterprise_id = #{enterpriseId}, - mode_of_payment_id = #{modeOfPaymentId}, - price = #{price}, - remark = #{remark}, - create_by = #{createBy}, - create_time = #{createTime}, - update_time = #{updateTime}, - update_by = #{updateBy}, - - where id = #{id} - - - - delete from pay_for where id = #{id} - - - - delete from pay_for where id in - - #{id} - - - diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/TypeMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/TypeMapper.xml deleted file mode 100644 index 42c7e43..0000000 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/TypeMapper.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - select id, type_name, remark, create_by, create_time, update_time, update_by from type - - - - - - - - insert into type - - id, - type_name, - remark, - create_by, - create_time, - update_time, - update_by, - - - #{id}, - #{typeName}, - #{remark}, - #{createBy}, - #{createTime}, - #{updateTime}, - #{updateBy}, - - - - - update type - - type_name = #{typeName}, - remark = #{remark}, - create_by = #{createBy}, - create_time = #{createTime}, - update_time = #{updateTime}, - update_by = #{updateBy}, - - where id = #{id} - - - - delete from type where id = #{id} - - - - delete from type where id in - - #{id} - - - diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/netWorking/EnterpriseMapper.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/netWorking/EnterpriseMapper.xml new file mode 100644 index 0000000..74678d7 --- /dev/null +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/resources/mapper/netWorking/EnterpriseMapper.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, ebterprise_name, legal_person, business_lincense_number, estabiness_date, business_scope, address, contact_phone, email, status, registration_date, certification_id, authentication_date, service_level, open_server_id, add_server_id, create_by, create_time, update_by, update_time, remark from enterprise + + diff --git a/muyu-modules/muyu-net-working/pom.xml b/muyu-modules/muyu-net-working/pom.xml index 7fca981..7f34462 100644 --- a/muyu-modules/muyu-net-working/pom.xml +++ b/muyu-modules/muyu-net-working/pom.xml @@ -9,8 +9,10 @@ 3.6.3 - muyu-net-working pom + + muyu-net-working车联网运营平台模块 + muyu-net-working-common muyu-net-working-server @@ -18,6 +20,8 @@ muyu-net-working-remote + muyu-net-working + 17 17 diff --git a/muyu-modules/pom.xml b/muyu-modules/pom.xml index 30a6b4c..6a377cc 100644 --- a/muyu-modules/pom.xml +++ b/muyu-modules/pom.xml @@ -14,6 +14,7 @@ muyu-job muyu-file muyu-net-working + muyu-customer-business muyu-modules From 0d3377c4839333344b9d1200132ad4edc4891e00 Mon Sep 17 00:00:00 2001 From: Jiang Peng <2622360564@qq.com> Date: Tue, 4 Jun 2024 17:09:27 +0800 Subject: [PATCH 4/7] =?UTF-8?q?fix():=E5=A4=9A=E6=95=B0=E6=8D=AE=E6=BA=90(?= =?UTF-8?q?=E5=88=9D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cloud-modules-many-datasource/pom.xml | 112 ++++++++++++++++++ .../CloudManySourceApplication.java | 23 ++++ .../datasource/config/DatasourceContent.java | 15 +++ .../datasource/config/ManyDataSource.java | 84 +++++++++++++ .../datasource/config/domain/Vehicle.java | 93 +++++++++++++++ .../config/domain/model/DataSourceInfo.java | 50 ++++++++ .../config/domain/model/EnterPriseInfo.java | 24 ++++ .../factory/DruidDataSourceFactory.java | 38 ++++++ .../holder/DynamicDataSourceHolder.java | 42 +++++++ .../config/role/DynamicDataSource.java | 40 +++++++ .../src/main/resources/banner.txt | 2 + .../src/main/resources/bootstrap.yml | 29 +++++ .../src/main/resources/logback.xml | 74 ++++++++++++ muyu-modules/pom.xml | 1 + 14 files changed, 627 insertions(+) create mode 100644 muyu-modules/cloud-modules-many-datasource/pom.xml create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/CloudManySourceApplication.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/DatasourceContent.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/Vehicle.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/DataSourceInfo.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/EnterPriseInfo.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/factory/DruidDataSourceFactory.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/holder/DynamicDataSourceHolder.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DynamicDataSource.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/resources/banner.txt create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/resources/bootstrap.yml create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/resources/logback.xml diff --git a/muyu-modules/cloud-modules-many-datasource/pom.xml b/muyu-modules/cloud-modules-many-datasource/pom.xml new file mode 100644 index 0000000..b0fbd66 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/pom.xml @@ -0,0 +1,112 @@ + + + 4.0.0 + + com.muyu + muyu-modules + 3.6.3 + + + cloud-modules-many-datasource + + 动态数据源 + + + 17 + 17 + UTF-8 + + + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-sentinel + + + + + org.springframework.boot + spring-boot-starter-actuator + + + + + io.springfox + springfox-swagger-ui + ${swagger.fox.version} + + + + + com.mysql + mysql-connector-j + + + + + com.muyu + muyu-common-datasource + + + + + com.muyu + muyu-common-datascope + + + + + com.muyu + muyu-common-log + + + + + com.muyu + muyu-common-swagger + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + + + diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/CloudManySourceApplication.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/CloudManySourceApplication.java new file mode 100644 index 0000000..40d7361 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/CloudManySourceApplication.java @@ -0,0 +1,23 @@ +package com.muyu.cloud.many.datasource; + +import com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DynamicDataSourceAutoConfiguration; +import com.muyu.common.security.annotation.EnableCustomConfig; +import com.muyu.common.security.annotation.EnableMyFeignClients; +import com.muyu.common.swagger.annotation.EnableCustomSwagger2; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; + +@EnableCustomConfig +@EnableCustomSwagger2 +@EnableMyFeignClients +@SpringBootApplication(exclude = + {DynamicDataSourceAutoConfiguration.class, DataSourceAutoConfiguration.class} +) +public class CloudManySourceApplication { + + public static void main(String[] args) { + SpringApplication.run(CloudManySourceApplication.class); + } + +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/DatasourceContent.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/DatasourceContent.java new file mode 100644 index 0000000..ec0987a --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/DatasourceContent.java @@ -0,0 +1,15 @@ +package com.muyu.cloud.many.datasource.config; + +/** + * @author DongZl + * @description: 数据源常量 + * @Date 2023-8-1 上午 11:02 + */ +public class DatasourceContent { + + public final static String DATASOURCE_URL = "jdbc:mysql://{}:{}/vehicle_networking?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8"; + + public final static String USER_NAME = "root"; + + public final static String PASSWORD = "L041120D"; +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java new file mode 100644 index 0000000..d901d46 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java @@ -0,0 +1,84 @@ +package com.muyu.cloud.many.datasource.config; + +import com.alibaba.druid.pool.DruidDataSource; +import com.alibaba.druid.pool.DruidDataSourceFactory; +import com.muyu.cloud.many.datasource.config.domain.model.DataSourceInfo; +import com.muyu.cloud.many.datasource.config.domain.model.EnterPriseInfo; +import com.muyu.cloud.many.datasource.config.role.DynamicDataSource; +import com.muyu.common.core.utils.SpringUtils; +import lombok.AllArgsConstructor; +import lombok.extern.log4j.Log4j2; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Primary; +import org.springframework.stereotype.Component; + +import javax.annotation.PostConstruct; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 多数据源 ManyDataSource + * + * @author DeKangLiu + * Date 2024/6/3 20:01 + */ +@Component +@Log4j2 +@AllArgsConstructor +public class ManyDataSource { + + @PostConstruct + public void init(){ + new Thread(()->{ + try { + Thread.sleep(5000); + } catch (InterruptedException ignored) {} + DruidDataSourceFactory druidDataSourceFactory= SpringUtils.getBean(DruidDataSourceFactory.class); + DynamicDataSource dynamicDataSource= SpringUtils.getBean(DynamicDataSource.class); + EnterPriseInfo enterPriseInfo = EnterPriseInfo.builder() + .entCode("liu_0603") + .ip("192.168.116.129") + .port(3308) + .build(); + + DataSourceInfo dataSourceInfo = DataSourceInfo.hostAndPortBuild(enterPriseInfo.getEntCode(), enterPriseInfo.getIp(), enterPriseInfo.getPort()); + DruidDataSource druidDataSource = druidDataSourceFactory.create(dataSourceInfo); + dynamicDataSource.put(dataSourceInfo.getKey(), druidDataSource); + }).start(); + } + + + private List dataSourceInfoList(){ + List list = new ArrayList<>(); + list.add( + EnterPriseInfo.builder() + .entCode("liu_0604") + .ip("192.168.116.129") + .port(3307) + .build() + ); + return list; + } + + @Bean + @Primary + public DynamicDataSource dynamicDataSource(DruidDataSourceFactory druidDataSourceFactory) { + + //企业列表 企业CODE 端口 ip + Map dataSourceMap = new HashMap<>(); + dataSourceInfoList() + .stream() + .map(enterPriseInfo -> DataSourceInfo.hostAndPortBuild(enterPriseInfo.getEntCode(), enterPriseInfo.getIp(),enterPriseInfo.getPort())) + .forEach(dataSourceInfo -> { + dataSourceMap.put(dataSourceInfo.getKey(), druidDataSourceFactory.create(dataSourceInfo)); + }); + //设置动态数据源 + DynamicDataSource dynamicDataSource = new DynamicDataSource(); + dynamicDataSource.setTargetDataSources(dataSourceMap); + //将数据源信息备份在defineTargetDataSources中 + dynamicDataSource.setDefineTargetDataSources(dataSourceMap); + return dynamicDataSource; + } +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/Vehicle.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/Vehicle.java new file mode 100644 index 0000000..18a26b9 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/Vehicle.java @@ -0,0 +1,93 @@ +package com.muyu.cloud.many.datasource.config.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import com.muyu.common.security.utils.SecurityUtils; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 车辆录入对象 vehicle + * + * @author muyu + * @date 2024-05-27 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@TableName("vehicle") +public class Vehicle extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** 车辆id */ + @TableId(value = "id",type = IdType.AUTO) + private Long id; + + /** 车辆vin */ + private String vin; + + /** 品牌 */ + private String brand; + + /** 型号 */ + private String model; + + /** 生产日期 */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private Date productionDate; + + /** 车身类型 */ + private String bodyType; + + /** 车身颜色 */ + private String color; + + /** 发动机排量 */ + private BigDecimal engineCapacity; + + /** 燃油类型 */ + private String fuelType; + + /** 变速器类型 */ + private String transmission; + + /** 驱动方式 */ + private String driveType; + + /** 行驶里程 */ + @Excel(name = "行驶里程") + @ApiModelProperty(name = "行驶里程", value = "行驶里程") + private BigDecimal mileage; + + /** 注册日期 */ + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") + private Date registrationDate; + + /** 车牌号码 */ + private String licenseNumber; + + /** 持有者 */ + private String holder; + + /** 车辆类型 */ + private String vehicleType; + + +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/DataSourceInfo.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/DataSourceInfo.java new file mode 100644 index 0000000..4813c09 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/DataSourceInfo.java @@ -0,0 +1,50 @@ +package com.muyu.cloud.many.datasource.config.domain.model; + + +import com.muyu.common.core.utils.StringUtils; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author DongZl + * @description: 数据源实体类 + * @Date 2023-8-1 上午 11:15 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class DataSourceInfo { + + /** + * 键 + */ + private String key; + + /** + * 地址 + */ + private String url; + + /** + * 用户名 + */ + private String userName; + + /** + * 用户密码 + */ + private String password; + + + public static DataSourceInfo hostAndPortBuild(String key,String host, Integer port){ + return DataSourceInfo.builder() + .key(key) + .url(StringUtils.format(DATASOURCE_URL, host, port,port)) + .password(PASSWORD) + .userName(USER_NAME) + .build(); + } +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/EnterPriseInfo.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/EnterPriseInfo.java new file mode 100644 index 0000000..f6c7b67 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/EnterPriseInfo.java @@ -0,0 +1,24 @@ +package com.muyu.cloud.many.datasource.config.domain.model; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 企业信息 EnterPriseInfo + * + * Date 2024/6/4 08:53 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class EnterPriseInfo { + + private String entCode; + + private String ip; + + private Integer port; +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/factory/DruidDataSourceFactory.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/factory/DruidDataSourceFactory.java new file mode 100644 index 0000000..946ff2d --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/factory/DruidDataSourceFactory.java @@ -0,0 +1,38 @@ +package com.muyu.cloud.many.datasource.config.factory; + +import com.alibaba.druid.pool.DruidDataSource; +import com.muyu.cloud.many.datasource.config.domain.model.DataSourceInfo; +import lombok.extern.log4j.Log4j2; +import org.springframework.stereotype.Component; + +import java.sql.SQLException; + +/** + * Druid工厂 DruidDataSourceFactory + * + * Date 2024/6/3 20:12 + */ +@Log4j2 +@Component +public class DruidDataSourceFactory { + /** + * @Description: 根据传递的数据源信息测试数据库连接 + * @Author Dongzl + */ + public DruidDataSource create(DataSourceInfo dataSourceInfo) { + DruidDataSource druidDataSource = new DruidDataSource(); + druidDataSource.setUrl(dataSourceInfo.getUrl()); + druidDataSource.setUsername(dataSourceInfo.getUserName()); + druidDataSource.setPassword(dataSourceInfo.getPassword()); + druidDataSource.setBreakAfterAcquireFailure(true); + druidDataSource.setConnectionErrorRetryAttempts(0); + try { + druidDataSource.getConnection(2000); + log.info("{} -> 数据源连接成功", dataSourceInfo.getKey()); + return druidDataSource; + } catch (SQLException throwables) { + log.error("数据源 {} 连接失败,用户名:{},密码 {}",dataSourceInfo.getUrl(),dataSourceInfo.getUserName(),dataSourceInfo.getPassword()); + return null; + } + } +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/holder/DynamicDataSourceHolder.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/holder/DynamicDataSourceHolder.java new file mode 100644 index 0000000..275af01 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/holder/DynamicDataSourceHolder.java @@ -0,0 +1,42 @@ +package com.muyu.cloud.many.datasource.config.holder; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.Assert; + +/** + * 数据源切换处理 + * + * @author Dongzl + */ +@Slf4j +public class DynamicDataSourceHolder { + /** + * 保存动态数据源名称 + */ + private static final ThreadLocal DYNAMIC_DATASOURCE_KEY = new ThreadLocal<>(); + + /** + * 设置/切换数据源,决定当前线程使用哪个数据源 + */ + public static void setDynamicDataSourceKey(String key){ + log.info("数据源切换为:{}",key); + DYNAMIC_DATASOURCE_KEY.set(key); + } + + /** + * 获取动态数据源名称,默认使用mater数据源 + */ + public static String getDynamicDataSourceKey(){ + String key = DYNAMIC_DATASOURCE_KEY.get(); + Assert.notNull(key, "请携带数据标识"); + return key; + } + + /** + * 移除当前数据源 + */ + public static void removeDynamicDataSourceKey(){ + log.info("移除数据源:{}",DYNAMIC_DATASOURCE_KEY.get()); + DYNAMIC_DATASOURCE_KEY.remove(); + } +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DynamicDataSource.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DynamicDataSource.java new file mode 100644 index 0000000..8e594e6 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DynamicDataSource.java @@ -0,0 +1,40 @@ +package com.muyu.cloud.many.datasource.config.role; + +import com.alibaba.druid.pool.DruidDataSource; +import com.muyu.cloud.many.datasource.config.holder.DynamicDataSourceHolder; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; + +import java.util.Map; + +/** + * 动态数据源 + * 调用AddDefineDataSource组件的addDefineDynamicDataSource()方法,获取原来targetdatasources的map,并将新的数据源信息添加到map中,并替换targetdatasources中的map + * 切换数据源时可以使用@DataSource(value = "数据源名称"),或者DynamicDataSourceContextHolder.setContextKey("数据源名称") + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class DynamicDataSource extends AbstractRoutingDataSource { + //备份所有数据源信息,备份的是个 指针!!! + private Map defineTargetDataSources; + + /** + * 添加数据库 + * @param key 键 + * @param value 数据值 + */ + public void put(String key, DruidDataSource value){ + defineTargetDataSources.put(key,value); + } + + /** + * 决定当前线程使用哪个数据源 + */ + @Override + protected Object determineCurrentLookupKey() { + return DynamicDataSourceHolder.getDynamicDataSourceKey(); + } +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/resources/banner.txt b/muyu-modules/cloud-modules-many-datasource/src/main/resources/banner.txt new file mode 100644 index 0000000..0dd5eee --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/resources/banner.txt @@ -0,0 +1,2 @@ +Spring Boot Version: ${spring-boot.version} +Spring Application Name: ${spring.application.name} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/resources/bootstrap.yml b/muyu-modules/cloud-modules-many-datasource/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..6926276 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/resources/bootstrap.yml @@ -0,0 +1,29 @@ +# Tomcat +server: + port: 9208 + +# Spring +spring: + application: + # 应用名称 + name: cloud-many-datasource + profiles: + # 环境配置 + active: dev + cloud: + nacos: + discovery: + # 服务注册地址 + server-addr: 101.34.248.9:8848 + config: + # 配置中心地址 + server-addr: 101.34.248.9:8848 + namespace: b9d88e07-8713-4ccd-8e98-d7c19f40fe74 + # 配置文件格式 + file-extension: yml + # 共享配置 + shared-configs: + - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} +logging: + level: + com.muyu.cloud.mapper: DEBUG diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/resources/logback.xml b/muyu-modules/cloud-modules-many-datasource/src/main/resources/logback.xml new file mode 100644 index 0000000..fcb3f83 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/resources/logback.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + ${log.pattern} + + + + + + ${log.path}/info.log + + + + ${log.path}/info.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + INFO + + ACCEPT + + DENY + + + + + ${log.path}/error.log + + + + ${log.path}/error.%d{yyyy-MM-dd}.log + + 60 + + + ${log.pattern} + + + + ERROR + + ACCEPT + + DENY + + + + + + + + + + + + + + + + + + diff --git a/muyu-modules/pom.xml b/muyu-modules/pom.xml index 6a377cc..4bd9dd3 100644 --- a/muyu-modules/pom.xml +++ b/muyu-modules/pom.xml @@ -15,6 +15,7 @@ muyu-file muyu-net-working muyu-customer-business + cloud-modules-many-datasource muyu-modules From 6f2496fe9cdfe2c6bab8060f5aefee2149dc167b Mon Sep 17 00:00:00 2001 From: Jiang Peng <2622360564@qq.com> Date: Wed, 5 Jun 2024 22:33:07 +0800 Subject: [PATCH 5/7] =?UTF-8?q?fix():=E5=9B=B4=E6=A0=8F=E7=BB=84+=E5=A4=9A?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E9=83=A8=E5=88=86(=E6=94=B9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cloud-modules-many-datasource/pom.xml | 6 ++ .../datasource/config/ManyDataSource.java | 10 +-- .../config/domain/model/DataSourceInfo.java | 7 +- .../datasource/config/role/DataSourceAsp.java | 34 ++++++++ .../muyu/customer/business/domain/Group.java | 36 ++++++++ .../business/controller/GroupController.java | 86 +++++++++++++++++++ .../customer/business/mapper/GroupMapper.java | 58 +++++++++++++ .../business/service/GroupService.java | 57 ++++++++++++ .../service/impl/GroupServiceImpl.java | 47 ++++++++++ .../mapper/customerBusiness/GroupMapper.xml | 77 +++++++++++++++++ 10 files changed, 410 insertions(+), 8 deletions(-) create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DataSourceAsp.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Group.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/GroupController.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/mapper/GroupMapper.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/GroupService.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/impl/GroupServiceImpl.java create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/GroupMapper.xml diff --git a/muyu-modules/cloud-modules-many-datasource/pom.xml b/muyu-modules/cloud-modules-many-datasource/pom.xml index b0fbd66..32beee1 100644 --- a/muyu-modules/cloud-modules-many-datasource/pom.xml +++ b/muyu-modules/cloud-modules-many-datasource/pom.xml @@ -21,6 +21,12 @@ + + com.muyu + muyu-customer-business-server + 3.6.3 + + com.alibaba.cloud diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java index d901d46..2fe2c6f 100644 --- a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java @@ -1,7 +1,7 @@ package com.muyu.cloud.many.datasource.config; import com.alibaba.druid.pool.DruidDataSource; -import com.alibaba.druid.pool.DruidDataSourceFactory; +import com.muyu.cloud.many.datasource.config.factory.DruidDataSourceFactory; import com.muyu.cloud.many.datasource.config.domain.model.DataSourceInfo; import com.muyu.cloud.many.datasource.config.domain.model.EnterPriseInfo; import com.muyu.cloud.many.datasource.config.role.DynamicDataSource; @@ -38,8 +38,8 @@ public class ManyDataSource { DruidDataSourceFactory druidDataSourceFactory= SpringUtils.getBean(DruidDataSourceFactory.class); DynamicDataSource dynamicDataSource= SpringUtils.getBean(DynamicDataSource.class); EnterPriseInfo enterPriseInfo = EnterPriseInfo.builder() - .entCode("liu_0603") - .ip("192.168.116.129") + .entCode("jiang_0604") + .ip("101.34.248.9") .port(3308) .build(); @@ -54,8 +54,8 @@ public class ManyDataSource { List list = new ArrayList<>(); list.add( EnterPriseInfo.builder() - .entCode("liu_0604") - .ip("192.168.116.129") + .entCode("jiang_0604") + .ip("101.34.248.9") .port(3307) .build() ); diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/DataSourceInfo.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/DataSourceInfo.java index 4813c09..c6ea5f8 100644 --- a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/DataSourceInfo.java +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/DataSourceInfo.java @@ -7,6 +7,8 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import static com.muyu.cloud.many.datasource.config.DatasourceContent.*; + /** * @author DongZl * @description: 数据源实体类 @@ -34,15 +36,14 @@ public class DataSourceInfo { private String userName; /** - * 用户密码 + * 密码 */ private String password; - public static DataSourceInfo hostAndPortBuild(String key,String host, Integer port){ return DataSourceInfo.builder() .key(key) - .url(StringUtils.format(DATASOURCE_URL, host, port,port)) + .url(StringUtils.format(DATASOURCE_URL, host,port)) .password(PASSWORD) .userName(USER_NAME) .build(); diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DataSourceAsp.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DataSourceAsp.java new file mode 100644 index 0000000..d34018c --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DataSourceAsp.java @@ -0,0 +1,34 @@ +package com.muyu.cloud.many.datasource.config.role; + +import com.muyu.cloud.many.datasource.config.holder.DynamicDataSourceHolder; +import com.muyu.common.security.utils.SecurityUtils; +import org.aspectj.lang.annotation.After; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.aspectj.lang.annotation.Pointcut; +import org.springframework.stereotype.Component; + +/** + * 数据源切面 + */ +@Aspect +@Component +public class DataSourceAsp { + + @Pointcut("execution(public * com.muyu.customer.business.controller.*Controller.*(..))") + public void pointcut(){ + + } + + @Before("pointcut()") + public void beforeMethod(){ + Long storeId = SecurityUtils.getLoginUser().getUserid(); + DynamicDataSourceHolder.setDynamicDataSourceKey("test_"+storeId); + } + + @After("pointcut()") + public void afterMethod(){ + DynamicDataSourceHolder.removeDynamicDataSourceKey(); + } + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Group.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Group.java new file mode 100644 index 0000000..95e0d3b --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Group.java @@ -0,0 +1,36 @@ +package com.muyu.customer.business.domain; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.experimental.StandardException; +import lombok.experimental.SuperBuilder; + +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("group") +public class Group extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 围栏组id + */ + private Long id; + + /** + * 围栏组名称 + */ + @Excel(name = "围栏组名称") + private String groupName; + + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/GroupController.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/GroupController.java new file mode 100644 index 0000000..1d9ce25 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/controller/GroupController.java @@ -0,0 +1,86 @@ +package com.muyu.customer.business.controller; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.web.page.TableDataInfo; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.customer.business.domain.Group; +import com.muyu.customer.business.service.GroupService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +@RestController +@RequestMapping("/group") +public class GroupController extends BaseController +{ + @Autowired + private GroupService groupService; + + /** + * 查询围栏组列表 + */ + @GetMapping("/list") + public Result> list(Group group) + { + startPage(); + List list = groupService.selectGroupList(group); + return getDataTable(list); + } + + /** + * 导出围栏组列表 + */ + @Log(title = "围栏组", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Group group) + { + List list = groupService.selectGroupList(group); + ExcelUtil util = new ExcelUtil(Group.class); + util.exportExcel(response, list, "围栏组数据"); + } + + /** + * 获取围栏组详细信息 + */ + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(groupService.selectGroupById(id)); + } + + /** + * 新增围栏组 + */ + @Log(title = "围栏组", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody Group group) + { + return toAjax(groupService.insertGroup(group)); + } + + /** + * 修改围栏组 + */ + @Log(title = "围栏组", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody Group group) + { + return toAjax(groupService.updateGroup(group)); + } + + /** + * 删除围栏组 + */ + @Log(title = "围栏组", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(groupService.deleteGroupByIds(ids)); + } + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/mapper/GroupMapper.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/mapper/GroupMapper.java new file mode 100644 index 0000000..9d80e97 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/mapper/GroupMapper.java @@ -0,0 +1,58 @@ +package com.muyu.customer.business.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.muyu.customer.business.domain.Group; + +import java.util.List; + +public interface GroupMapper extends BaseMapper { + + /** + * 查询围栏组 + * + * @param id 围栏组主键 + * @return 围栏组 + */ + public Group selectGroupById(Long id); + + /** + * 查询围栏组列表 + * + * @param group 围栏组 + * @return 围栏组集合 + */ + public List selectGroupList(Group group); + + /** + * 新增围栏组 + * + * @param group 围栏组 + * @return 结果 + */ + public int insertGroup(Group group); + + /** + * 修改围栏组 + * + * @param group 围栏组 + * @return 结果 + */ + public int updateGroup(Group group); + + /** + * 删除围栏组 + * + * @param id 围栏组主键 + * @return 结果 + */ + public int deleteGroupById(Long id); + + /** + * 批量删除围栏组 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteGroupByIds(Long[] ids); + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/GroupService.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/GroupService.java new file mode 100644 index 0000000..cfe8609 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/GroupService.java @@ -0,0 +1,57 @@ +package com.muyu.customer.business.service; + +import com.muyu.customer.business.domain.Group; + +import java.util.List; + +public interface GroupService { + + /** + * 查询围栏组 + * + * @param id 围栏组主键 + * @return 围栏组 + */ + public Group selectGroupById(Long id); + + /** + * 查询围栏组列表 + * + * @param group 围栏组 + * @return 围栏组集合 + */ + public List selectGroupList(Group group); + + /** + * 新增围栏组 + * + * @param group 围栏组 + * @return 结果 + */ + public int insertGroup(Group group); + + /** + * 修改围栏组 + * + * @param group 围栏组 + * @return 结果 + */ + public int updateGroup(Group group); + + /** + * 批量删除围栏组 + * + * @param ids 需要删除的围栏组主键集合 + * @return 结果 + */ + public int deleteGroupByIds(Long[] ids); + + /** + * 删除围栏组信息 + * + * @param id 围栏组主键 + * @return 结果 + */ + public int deleteGroupById(Long id); + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/impl/GroupServiceImpl.java b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/impl/GroupServiceImpl.java new file mode 100644 index 0000000..08e0861 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/java/com/muyu/customer/business/service/impl/GroupServiceImpl.java @@ -0,0 +1,47 @@ +package com.muyu.customer.business.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.muyu.customer.business.domain.Group; +import com.muyu.customer.business.mapper.GroupMapper; +import com.muyu.customer.business.service.GroupService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class GroupServiceImpl extends ServiceImpl implements GroupService { + + @Autowired + private GroupMapper groupMapper; + @Override + public Group selectGroupById(Long id) { + return groupMapper.selectGroupById(id); + } + + @Override + public List selectGroupList(Group group) { + return groupMapper.selectGroupList(group); + } + + @Override + public int insertGroup(Group group) { + return groupMapper.insertGroup(group); + } + + @Override + public int updateGroup(Group group) { + return groupMapper.updateGroup(group); + } + + @Override + public int deleteGroupByIds(Long[] ids) { + return groupMapper.deleteGroupByIds(ids); + } + + @Override + public int deleteGroupById(Long id) { + return groupMapper.deleteGroupById(id); + } + +} diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/GroupMapper.xml b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/GroupMapper.xml new file mode 100644 index 0000000..63bc66d --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-server/src/main/resources/mapper/customerBusiness/GroupMapper.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + select id, group_name, remark, create_by, create_time, update_by, update_time from `group` + + + + + + + + insert into `group` + + group_name, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{groupName}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update `group` + + group_name = #{groupName}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from `group` where id = #{id} + + + + delete from `group` where id in + + #{id} + + + From 02f4b99e79399b074f9f6395cdfd7e5822a44781 Mon Sep 17 00:00:00 2001 From: Jiang Peng <2622360564@qq.com> Date: Thu, 6 Jun 2024 21:44:04 +0800 Subject: [PATCH 6/7] =?UTF-8?q?fix():=E5=A4=9A=E6=95=B0=E6=8D=AE=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/exception/ServiceException.java | 2 +- .../cloud-modules-many-datasource/pom.xml | 6 -- .../datasource/config/ManyDataSource.java | 12 +-- .../{ => contents}/DatasourceContent.java | 6 +- .../config/contents/SaaSConstant.java | 11 +++ .../datasource/config/domain/Vehicle.java | 93 ------------------ .../config/domain/model/DataSourceInfo.java | 8 +- .../config/exception/SaaSException.java | 25 +++++ .../config/interceptor/SaaSInterceptor.java | 53 +++++++++++ .../config/interceptor/WebMvcSaaSConfig.java | 31 ++++++ .../datasource/config/role/DataSourceAsp.java | 34 ------- .../config/role/DynamicDataSource.java | 12 +++ .../controller/VehicleController.java | 29 ++++++ .../cloud/many/datasource/domain/Vehicle.java | 94 +++++++++++++++++++ .../many/datasource/mapper/VehicleMapper.java | 13 +++ ...ot.autoconfigure.AutoConfiguration.imports | 1 + 16 files changed, 284 insertions(+), 146 deletions(-) rename muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/{ => contents}/DatasourceContent.java (50%) create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/contents/SaaSConstant.java delete mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/Vehicle.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/exception/SaaSException.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/interceptor/SaaSInterceptor.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/interceptor/WebMvcSaaSConfig.java delete mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DataSourceAsp.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/controller/VehicleController.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/domain/Vehicle.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/mapper/VehicleMapper.java create mode 100644 muyu-modules/cloud-modules-many-datasource/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/ServiceException.java b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/ServiceException.java index 5039bc0..11bb283 100644 --- a/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/ServiceException.java +++ b/muyu-common/muyu-common-core/src/main/java/com/muyu/common/core/exception/ServiceException.java @@ -5,7 +5,7 @@ package com.muyu.common.core.exception; * * @author muyu */ -public final class ServiceException extends RuntimeException { +public class ServiceException extends RuntimeException { private static final long serialVersionUID = 1L; /** diff --git a/muyu-modules/cloud-modules-many-datasource/pom.xml b/muyu-modules/cloud-modules-many-datasource/pom.xml index 32beee1..b0fbd66 100644 --- a/muyu-modules/cloud-modules-many-datasource/pom.xml +++ b/muyu-modules/cloud-modules-many-datasource/pom.xml @@ -21,12 +21,6 @@ - - com.muyu - muyu-customer-business-server - 3.6.3 - - com.alibaba.cloud diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java index 2fe2c6f..36a9094 100644 --- a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/ManyDataSource.java @@ -1,9 +1,9 @@ package com.muyu.cloud.many.datasource.config; import com.alibaba.druid.pool.DruidDataSource; -import com.muyu.cloud.many.datasource.config.factory.DruidDataSourceFactory; import com.muyu.cloud.many.datasource.config.domain.model.DataSourceInfo; import com.muyu.cloud.many.datasource.config.domain.model.EnterPriseInfo; +import com.muyu.cloud.many.datasource.config.factory.DruidDataSourceFactory; import com.muyu.cloud.many.datasource.config.role.DynamicDataSource; import com.muyu.common.core.utils.SpringUtils; import lombok.AllArgsConstructor; @@ -21,7 +21,6 @@ import java.util.Map; /** * 多数据源 ManyDataSource * - * @author DeKangLiu * Date 2024/6/3 20:01 */ @Component @@ -33,12 +32,12 @@ public class ManyDataSource { public void init(){ new Thread(()->{ try { - Thread.sleep(5000); + Thread.sleep(10000); } catch (InterruptedException ignored) {} DruidDataSourceFactory druidDataSourceFactory= SpringUtils.getBean(DruidDataSourceFactory.class); DynamicDataSource dynamicDataSource= SpringUtils.getBean(DynamicDataSource.class); EnterPriseInfo enterPriseInfo = EnterPriseInfo.builder() - .entCode("jiang_0604") + .entCode("jiang_0530") .ip("101.34.248.9") .port(3308) .build(); @@ -54,9 +53,9 @@ public class ManyDataSource { List list = new ArrayList<>(); list.add( EnterPriseInfo.builder() - .entCode("jiang_0604") + .entCode("jiang_0606") .ip("101.34.248.9") - .port(3307) + .port(3309) .build() ); return list; @@ -76,6 +75,7 @@ public class ManyDataSource { }); //设置动态数据源 DynamicDataSource dynamicDataSource = new DynamicDataSource(); +// dynamicDataSource.setDefaultTargetDataSource(masterDataSource()); dynamicDataSource.setTargetDataSources(dataSourceMap); //将数据源信息备份在defineTargetDataSources中 dynamicDataSource.setDefineTargetDataSources(dataSourceMap); diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/DatasourceContent.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/contents/DatasourceContent.java similarity index 50% rename from muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/DatasourceContent.java rename to muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/contents/DatasourceContent.java index ec0987a..d0b781a 100644 --- a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/DatasourceContent.java +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/contents/DatasourceContent.java @@ -1,4 +1,4 @@ -package com.muyu.cloud.many.datasource.config; +package com.muyu.cloud.many.datasource.config.contents; /** * @author DongZl @@ -7,9 +7,9 @@ package com.muyu.cloud.many.datasource.config; */ public class DatasourceContent { - public final static String DATASOURCE_URL = "jdbc:mysql://{}:{}/vehicle_networking?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8"; + public final static String DATASOURCE_URL = "jdbc:mysql://{}:{}/etltest?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8"; public final static String USER_NAME = "root"; - public final static String PASSWORD = "L041120D"; + public final static String PASSWORD = "Jp991103"; } diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/contents/SaaSConstant.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/contents/SaaSConstant.java new file mode 100644 index 0000000..dadc3f0 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/contents/SaaSConstant.java @@ -0,0 +1,11 @@ +package com.muyu.cloud.many.datasource.config.contents; + +/** + * SaaS常量 SaaSConstant + * + * Date 2024/6/4 18:34 + */ +public class SaaSConstant { + + public final static String SAAS_KEY="enterprise-code"; +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/Vehicle.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/Vehicle.java deleted file mode 100644 index 18a26b9..0000000 --- a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/Vehicle.java +++ /dev/null @@ -1,93 +0,0 @@ -package com.muyu.cloud.many.datasource.config.domain; - -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.muyu.common.core.annotation.Excel; -import com.muyu.common.core.web.domain.BaseEntity; -import com.muyu.common.security.utils.SecurityUtils; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; -import org.springframework.format.annotation.DateTimeFormat; - -import java.math.BigDecimal; -import java.util.Date; - -/** - * 车辆录入对象 vehicle - * - * @author muyu - * @date 2024-05-27 - */ -@Data -@SuperBuilder -@NoArgsConstructor -@AllArgsConstructor -@TableName("vehicle") -public class Vehicle extends BaseEntity { - - private static final long serialVersionUID = 1L; - - /** 车辆id */ - @TableId(value = "id",type = IdType.AUTO) - private Long id; - - /** 车辆vin */ - private String vin; - - /** 品牌 */ - private String brand; - - /** 型号 */ - private String model; - - /** 生产日期 */ - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") - private Date productionDate; - - /** 车身类型 */ - private String bodyType; - - /** 车身颜色 */ - private String color; - - /** 发动机排量 */ - private BigDecimal engineCapacity; - - /** 燃油类型 */ - private String fuelType; - - /** 变速器类型 */ - private String transmission; - - /** 驱动方式 */ - private String driveType; - - /** 行驶里程 */ - @Excel(name = "行驶里程") - @ApiModelProperty(name = "行驶里程", value = "行驶里程") - private BigDecimal mileage; - - /** 注册日期 */ - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") - private Date registrationDate; - - /** 车牌号码 */ - private String licenseNumber; - - /** 持有者 */ - private String holder; - - /** 车辆类型 */ - private String vehicleType; - - -} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/DataSourceInfo.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/DataSourceInfo.java index c6ea5f8..ea12bd0 100644 --- a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/DataSourceInfo.java +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/domain/model/DataSourceInfo.java @@ -7,7 +7,8 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import static com.muyu.cloud.many.datasource.config.DatasourceContent.*; +import static com.muyu.cloud.many.datasource.config.contents.DatasourceContent.*; + /** * @author DongZl @@ -36,14 +37,15 @@ public class DataSourceInfo { private String userName; /** - * 密码 + * 用户密码 */ private String password; + public static DataSourceInfo hostAndPortBuild(String key,String host, Integer port){ return DataSourceInfo.builder() .key(key) - .url(StringUtils.format(DATASOURCE_URL, host,port)) + .url(StringUtils.format(DATASOURCE_URL, host, port,port)) .password(PASSWORD) .userName(USER_NAME) .build(); diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/exception/SaaSException.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/exception/SaaSException.java new file mode 100644 index 0000000..c44c2c8 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/exception/SaaSException.java @@ -0,0 +1,25 @@ +package com.muyu.cloud.many.datasource.config.exception; + +import com.muyu.common.core.exception.ServiceException; + +/** + * SaaS异常类 SaaSException + * + * Date 2024/6/4 18:45 + */ +public class SaaSException extends ServiceException { + + public SaaSException(String message, Integer code) { + super(message, code); + } + + public SaaSException(String message) { + super(message); + } + + + public SaaSException() { + super(); + } + +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/interceptor/SaaSInterceptor.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/interceptor/SaaSInterceptor.java new file mode 100644 index 0000000..c2b6569 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/interceptor/SaaSInterceptor.java @@ -0,0 +1,53 @@ +package com.muyu.cloud.many.datasource.config.interceptor; + +import com.muyu.cloud.many.datasource.config.contents.SaaSConstant; +import com.muyu.cloud.many.datasource.config.exception.SaaSException; +import com.muyu.cloud.many.datasource.config.holder.DynamicDataSourceHolder; +import com.muyu.cloud.many.datasource.config.role.DynamicDataSource; +import com.muyu.common.core.utils.ServletUtils; +import com.muyu.common.core.utils.SpringUtils; +import org.springframework.web.method.HandlerMethod; +import org.springframework.web.servlet.AsyncHandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * SaaS拦截器 SaaSInterceptor + * + * Date 2024/6/4 14:39 + */ +public class SaaSInterceptor implements AsyncHandlerInterceptor { + + /** + * 之前 + */ + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + if (!(handler instanceof HandlerMethod)){ + return true; + } + + String SaasKey = ServletUtils.getHeader(request, SaaSConstant.SAAS_KEY); + + if (SaasKey==null){ + throw new SaaSException("SaaS非法访问"); + } else { + DynamicDataSource dynamicDataSource = SpringUtils.getBean(DynamicDataSource.class); + if (!dynamicDataSource.hashKye(SaasKey)){ + throw new SaaSException("SaaS非法访问"); + } + } + DynamicDataSourceHolder.setDynamicDataSourceKey(SaasKey); + return true; + } + + /** + * 之后 + */ + @Override + public void afterConcurrentHandlingStarted(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + DynamicDataSourceHolder.removeDynamicDataSourceKey(); + } + +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/interceptor/WebMvcSaaSConfig.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/interceptor/WebMvcSaaSConfig.java new file mode 100644 index 0000000..d434663 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/interceptor/WebMvcSaaSConfig.java @@ -0,0 +1,31 @@ +package com.muyu.cloud.many.datasource.config.interceptor; + +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * 拦截器配置 + * + * @author muyu + */ +public class WebMvcSaaSConfig implements WebMvcConfigurer { + /** + * 不需要拦截地址 + */ + public static final String[] excludeUrls = {"/login", "/logout", "/refresh"}; + + @Override + public void addInterceptors (InterceptorRegistry registry) { + registry.addInterceptor(getHeaderInterceptor()) + .addPathPatterns("/**") + .excludePathPatterns(excludeUrls) + .order(-10); + } + + /** + * 自定义请求头拦截器 + */ + public SaaSInterceptor getHeaderInterceptor () { + return new SaaSInterceptor(); + } +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DataSourceAsp.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DataSourceAsp.java deleted file mode 100644 index d34018c..0000000 --- a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DataSourceAsp.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.muyu.cloud.many.datasource.config.role; - -import com.muyu.cloud.many.datasource.config.holder.DynamicDataSourceHolder; -import com.muyu.common.security.utils.SecurityUtils; -import org.aspectj.lang.annotation.After; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Before; -import org.aspectj.lang.annotation.Pointcut; -import org.springframework.stereotype.Component; - -/** - * 数据源切面 - */ -@Aspect -@Component -public class DataSourceAsp { - - @Pointcut("execution(public * com.muyu.customer.business.controller.*Controller.*(..))") - public void pointcut(){ - - } - - @Before("pointcut()") - public void beforeMethod(){ - Long storeId = SecurityUtils.getLoginUser().getUserid(); - DynamicDataSourceHolder.setDynamicDataSourceKey("test_"+storeId); - } - - @After("pointcut()") - public void afterMethod(){ - DynamicDataSourceHolder.removeDynamicDataSourceKey(); - } - -} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DynamicDataSource.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DynamicDataSource.java index 8e594e6..6a9b74c 100644 --- a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DynamicDataSource.java +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/config/role/DynamicDataSource.java @@ -13,6 +13,7 @@ import java.util.Map; * 动态数据源 * 调用AddDefineDataSource组件的addDefineDynamicDataSource()方法,获取原来targetdatasources的map,并将新的数据源信息添加到map中,并替换targetdatasources中的map * 切换数据源时可以使用@DataSource(value = "数据源名称"),或者DynamicDataSourceContextHolder.setContextKey("数据源名称") + * @author Dongzl */ @Data @AllArgsConstructor @@ -21,6 +22,16 @@ public class DynamicDataSource extends AbstractRoutingDataSource { //备份所有数据源信息,备份的是个 指针!!! private Map defineTargetDataSources; + /** + * 判定键是否出站了 + * @param key 键 + * @return 存在结束 true 存在 false 不存在 + */ + public boolean hashKye(String key){ + return defineTargetDataSources.containsKey(key); + } + + /** * 添加数据库 * @param key 键 @@ -28,6 +39,7 @@ public class DynamicDataSource extends AbstractRoutingDataSource { */ public void put(String key, DruidDataSource value){ defineTargetDataSources.put(key,value); + this.afterPropertiesSet(); } /** diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/controller/VehicleController.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/controller/VehicleController.java new file mode 100644 index 0000000..1c709ba --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/controller/VehicleController.java @@ -0,0 +1,29 @@ +package com.muyu.cloud.many.datasource.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.muyu.cloud.many.datasource.domain.Vehicle; +import com.muyu.cloud.many.datasource.mapper.VehicleMapper; +import com.muyu.common.core.domain.Result; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * 车辆控制层 VehicleController + * + * Date 2024/6/4 14:08 + */ +@RestController +@RequestMapping("/vehicle") +public class VehicleController { + @Autowired + private VehicleMapper vehicleMapper; + + @GetMapping("/list/all") + public Result> findAll () { + return Result.success(vehicleMapper.selectList(new QueryWrapper<>())); + } +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/domain/Vehicle.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/domain/Vehicle.java new file mode 100644 index 0000000..644a6f1 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/domain/Vehicle.java @@ -0,0 +1,94 @@ +package com.muyu.cloud.many.datasource.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.models.auth.In; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 车辆录入对象 vehicle + * + * @author muyu + * @date 2024-05-27 + */ +@Data +@SuperBuilder +@NoArgsConstructor +@AllArgsConstructor +@TableName(value = "user") +public class Vehicle extends BaseEntity { + + private static final long serialVersionUID = 1L; + + private String name; + private Integer age; + +// /** 车辆id */ +// @TableId(value = "id",type = IdType.AUTO) +// private Long id; +// +// /** 车辆vin */ +// private String vin; +// +// /** 品牌 */ +// private String brand; +// +// /** 型号 */ +// private String model; +// +// /** 生产日期 */ +// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") +// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") +// private Date productionDate; +// +// /** 车身类型 */ +// private String bodyType; +// +// /** 车身颜色 */ +// private String color; +// +// /** 发动机排量 */ +// private BigDecimal engineCapacity; +// +// /** 燃油类型 */ +// private String fuelType; +// +// /** 变速器类型 */ +// private String transmission; +// +// /** 驱动方式 */ +// private String driveType; +// +// /** 行驶里程 */ +// @Excel(name = "行驶里程") +// @ApiModelProperty(name = "行驶里程", value = "行驶里程") +// private BigDecimal mileage; +// +// /** 注册日期 */ +// @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") +// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") +// private Date registrationDate; +// +// /** 车牌号码 */ +// private String licenseNumber; +// +// /** 持有者 */ +// private String holder; +// +// /** 车辆类型 */ +// private String vehicleType; + + +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/mapper/VehicleMapper.java b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/mapper/VehicleMapper.java new file mode 100644 index 0000000..d671b6f --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/java/com/muyu/cloud/many/datasource/mapper/VehicleMapper.java @@ -0,0 +1,13 @@ +package com.muyu.cloud.many.datasource.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.muyu.cloud.many.datasource.domain.Vehicle; + +/** + * 车辆mapper VehicleMapper + * + * Date 2024/6/4 14:07 + */ +public interface VehicleMapper extends BaseMapper { + +} diff --git a/muyu-modules/cloud-modules-many-datasource/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/muyu-modules/cloud-modules-many-datasource/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..4c75219 --- /dev/null +++ b/muyu-modules/cloud-modules-many-datasource/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +com.muyu.cloud.many.datasource.config.interceptor.WebMvcSaaSConfig From 7abf1c69bf61b2c12888a05b50b6e04d78c4ea9a Mon Sep 17 00:00:00 2001 From: Jiang Peng <2622360564@qq.com> Date: Fri, 7 Jun 2024 22:30:01 +0800 Subject: [PATCH 7/7] =?UTF-8?q?fix():=E4=BC=81=E4=B8=9A=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E6=96=B0=E6=B7=BB=E5=8A=A0=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E7=94=A8=E6=88=B7=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../muyu/customer/business/domain/Atlas.java | 24 ++++ .../muyu-net-working-server/pom.xml | 5 + .../controller/EnterpriseController.java | 110 +++++++++++++++--- .../system/controller/SysDeptController.java | 7 ++ .../com/muyu/system/mapper/SysDeptMapper.java | 3 + .../system/remote/RemoteSysDeptService.java | 28 +++++ .../system/remote/RemoteSysUserService.java | 28 +++++ .../remote/factory/RemoteSysDeptFactory.java | 42 +++++++ .../remote/factory/RemoteSysUserFactory.java | 31 +++++ .../muyu/system/service/SysDeptService.java | 3 + .../service/impl/SysDeptServiceImpl.java | 5 + ...ot.autoconfigure.AutoConfiguration.imports | 2 + .../resources/mapper/system/SysDeptMapper.xml | 5 + 13 files changed, 274 insertions(+), 19 deletions(-) create mode 100644 muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Atlas.java create mode 100644 muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysDeptService.java create mode 100644 muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysUserService.java create mode 100644 muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/factory/RemoteSysDeptFactory.java create mode 100644 muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/factory/RemoteSysUserFactory.java create mode 100644 muyu-modules/muyu-system/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git a/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Atlas.java b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Atlas.java new file mode 100644 index 0000000..4948886 --- /dev/null +++ b/muyu-modules/muyu-customer-business/muyu-customer-business-common/src/main/java/com/muyu/customer/business/domain/Atlas.java @@ -0,0 +1,24 @@ +package com.muyu.customer.business.domain; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +@Data +@SuperBuilder +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class Atlas { + + private String Q; + + private String R; + + private String lat; + + private String lng; + +} diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/pom.xml b/muyu-modules/muyu-net-working/muyu-net-working-server/pom.xml index f684d79..011895c 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/pom.xml +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/pom.xml @@ -20,6 +20,11 @@ + + com.muyu + muyu-modules-system + 3.6.3 + com.muyu muyu-net-working-common diff --git a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/controller/EnterpriseController.java b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/controller/EnterpriseController.java index 0618b4d..03e2871 100644 --- a/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/controller/EnterpriseController.java +++ b/muyu-modules/muyu-net-working/muyu-net-working-server/src/main/java/com/muyu/net/working/controller/EnterpriseController.java @@ -1,9 +1,17 @@ package com.muyu.net.working.controller; +import java.util.Date; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.muyu.common.security.utils.SecurityUtils; +import com.muyu.common.system.domain.LoginUser; +import com.muyu.common.system.domain.SysDept; +import com.muyu.common.system.domain.SysUser; +import com.muyu.system.remote.RemoteSysDeptService; +import com.muyu.system.remote.RemoteSysUserService; import io.swagger.annotations.*; +import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -32,17 +40,25 @@ import com.muyu.common.core.web.page.TableDataInfo; * @author muyu * @date 2024-05-27 */ -@Api(tags = "企业信息") +@Api(tags = "车辆运营平台") +@Log4j2 @RestController @RequestMapping("/car") public class EnterpriseController extends BaseController { + @Autowired private EnterpriseService enterpriseService; + @Autowired + private RemoteSysDeptService remoteSysDeptService; + + @Autowired + private RemoteSysUserService remoteSysUserService; + /** - * 查询企业信息列表 + * 查询车辆运营平台列表 */ - @ApiOperation("获取企业信息列表") + @ApiOperation("获取车辆运营平台列表") @RequiresPermissions("netWorking:car:list") @GetMapping("/list") public Result> list(EnterpriseQueryReq enterpriseQueryReq) { @@ -52,22 +68,22 @@ public class EnterpriseController extends BaseController { } /** - * 导出企业信息列表 + * 导出车辆运营平台列表 */ - @ApiOperation("导出企业信息列表") + @ApiOperation("导出车辆运营平台列表") @RequiresPermissions("netWorking:car:export") - @Log(title = "企业信息", businessType = BusinessType.EXPORT) + @Log(title = "车辆运营平台", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, Enterprise enterprise) { List list = enterpriseService.list(enterprise); ExcelUtil util = new ExcelUtil(Enterprise.class); - util.exportExcel(response, list, "企业信息数据"); + util.exportExcel(response, list, "车辆运营平台数据"); } /** - * 获取企业信息详细信息 + * 获取车辆运营平台详细信息 */ - @ApiOperation("获取企业信息详细信息") + @ApiOperation("获取车辆运营平台详细信息") @RequiresPermissions("netWorking:car:query") @GetMapping(value = "/{id}") @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class) @@ -76,36 +92,92 @@ public class EnterpriseController extends BaseController { } /** - * 新增企业信息 + * 新增车辆运营平台 */ @RequiresPermissions("netWorking:car:add") - @Log(title = "企业信息", businessType = BusinessType.INSERT) + @Log(title = "车辆运营平台", businessType = BusinessType.INSERT) @PostMapping - @ApiOperation("新增企业信息") + @ApiOperation("新增车辆运营平台") public Result add(@RequestBody EnterpriseSaveReq enterpriseSaveReq) { + LoginUser loginUser = SecurityUtils.getLoginUser(); + SysUser sysUser = loginUser.getSysUser(); + Result DeptList = remoteSysDeptService.selectDeptByName(enterpriseSaveReq.getEbterpriseName()); + SysDept sysDept = DeptList.getData(); + if(sysDept!=null){ + return Result.error("部门名称重复"); + } + addDept(enterpriseSaveReq, sysUser); + addUser(enterpriseSaveReq,sysUser); + return toAjax(enterpriseService.save(Enterprise.saveBuild(enterpriseSaveReq))); } /** - * 修改企业信息 + * 添加部门表信息 + * @param enterpriseSaveReq + * @param sysUser + * @return + */ + public void addDept(EnterpriseSaveReq enterpriseSaveReq,SysUser sysUser){ + + SysDept DeptBuild = SysDept.builder() + .deptName(enterpriseSaveReq.getEbterpriseName()) + .parentId(100L) + .ancestors("0,100") + .orderNum(2) + .status("0") + .createBy(sysUser.getUserName()) + .createTime(new Date()) + .leader(sysUser.getNickName()) + .phone(sysUser.getPhonenumber()) + .email(sysUser.getEmail()) + .delFlag("0") + .build(); + remoteSysDeptService.add(DeptBuild); + } + + public void addUser(EnterpriseSaveReq enterpriseSaveReq,SysUser sysUser){ + Result sysDeptResult = remoteSysDeptService.selectDeptByName(enterpriseSaveReq.getEbterpriseName()); + SysDept sysDept = sysDeptResult.getData(); + SysUser UserBuild = SysUser.builder() + .userName(enterpriseSaveReq.getEbterpriseName()) + .nickName(enterpriseSaveReq.getEbterpriseName()) + .password("123456") + .deptId(sysDept.getDeptId()) + .email(enterpriseSaveReq.getEmail()) + .phonenumber(enterpriseSaveReq.getContactPhone()) + .status("0") + .delFlag("0") + .roleId(3L) + .roleIds(new Long[]{3L}) + .createBy(sysUser.getUserName()) + .createTime(new Date()) + .remark(enterpriseSaveReq.getRemark()) + .build(); + remoteSysUserService.add(UserBuild); + } + + /** + * 修改车辆运营平台 */ @RequiresPermissions("netWorking:car:edit") - @Log(title = "企业信息", businessType = BusinessType.UPDATE) + @Log(title = "车辆运营平台", businessType = BusinessType.UPDATE) @PutMapping("/{id}") - @ApiOperation("修改企业信息") + @ApiOperation("修改车辆运营平台") public Result edit(@PathVariable String id, @RequestBody EnterpriseEditReq enterpriseEditReq) { return toAjax(enterpriseService.updateById(Enterprise.editBuild(id,enterpriseEditReq))); } /** - * 删除企业信息 + * 删除车辆运营平台 */ @RequiresPermissions("netWorking:car:remove") - @Log(title = "企业信息", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - @ApiOperation("删除企业信息") + @Log(title = "车辆运营平台", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + @ApiOperation("删除车辆运营平台") @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "String", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4") public Result remove(@PathVariable List ids) { + return toAjax(enterpriseService.removeBatchByIds(ids)); } } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDeptController.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDeptController.java index f1ed572..861797e 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDeptController.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/controller/SysDeptController.java @@ -39,6 +39,12 @@ public class SysDeptController extends BaseController { return success(depts); } + @GetMapping("/selectDeptByName") + public Result selectDeptByName (@RequestParam("name") String name) { + SysDept sysDept = deptService.selectDeptByName(name); + return Result.success(sysDept); + } + /** * 查询部门列表(排除节点) */ @@ -50,6 +56,7 @@ public class SysDeptController extends BaseController { return success(depts); } + /** * 根据部门编号获取详细信息 */ diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDeptMapper.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDeptMapper.java index 5ef9ab4..c6b3616 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDeptMapper.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/mapper/SysDeptMapper.java @@ -128,4 +128,7 @@ public interface SysDeptMapper extends BaseMapper { * @return 结果 */ public int deleteDeptById (Long deptId); + + SysDept selectDeptByName(@Param("name") String name); + } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysDeptService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysDeptService.java new file mode 100644 index 0000000..ead697e --- /dev/null +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysDeptService.java @@ -0,0 +1,28 @@ +package com.muyu.system.remote; + +import com.muyu.common.core.constant.ServiceNameConstants; +import com.muyu.common.core.domain.Result; +import com.muyu.common.system.domain.SysDept; +import com.muyu.system.remote.factory.RemoteSysDeptFactory; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +@FeignClient( + contextId = "remoteSysDeptService", + value = ServiceNameConstants.SYSTEM_SERVICE, + fallbackFactory = RemoteSysDeptFactory.class, + path = "/dept" +) +public interface RemoteSysDeptService { + + @GetMapping("/selectDeptByName") + public Result selectDeptByName (@RequestParam("name") String name); + + @PostMapping + public Result add (@Validated @RequestBody SysDept dept); + +} diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysUserService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysUserService.java new file mode 100644 index 0000000..db9965f --- /dev/null +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/RemoteSysUserService.java @@ -0,0 +1,28 @@ +package com.muyu.system.remote; + +import com.muyu.common.core.constant.ServiceNameConstants; +import com.muyu.common.core.domain.Result; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.common.system.domain.SysUser; +import com.muyu.system.remote.factory.RemoteSysUserFactory; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +@FeignClient( + contextId = "remoteSysUserService", + value = ServiceNameConstants.SYSTEM_SERVICE, + fallbackFactory = RemoteSysUserFactory.class, + path = "/user" +) +public interface RemoteSysUserService { + /** + * 新增用户服务 + * @param user + * @return Result + */ + @RequiresPermissions("system:user:add") + @PostMapping + public Result add (@Validated @RequestBody SysUser user); +} diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/factory/RemoteSysDeptFactory.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/factory/RemoteSysDeptFactory.java new file mode 100644 index 0000000..90c268f --- /dev/null +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/factory/RemoteSysDeptFactory.java @@ -0,0 +1,42 @@ +package com.muyu.system.remote.factory; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.system.domain.SysDept; +import com.muyu.system.remote.RemoteSysDeptService; +import lombok.extern.log4j.Log4j2; +import org.springframework.cloud.openfeign.FallbackFactory; + +/** + * 远程调用部门熔断器 RemoteSysDeptFactory + * + * @author DeKangLiu + * Date 2024/6/7 09:00 + */ +@Log4j2 +public class RemoteSysDeptFactory implements FallbackFactory { + @Override + public RemoteSysDeptService create(Throwable cause) { + + return new RemoteSysDeptService() { + /** + * 查找部门列表 + * @param name + * @return + */ + @Override + public Result selectDeptByName(String name) { + return Result.error(cause.getMessage()); + } + + /** + * 添加部门管理 + * @param dept + * @return + */ + @Override + public Result add(SysDept dept) { + return Result.error(cause.getMessage()); + } + }; + } +} diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/factory/RemoteSysUserFactory.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/factory/RemoteSysUserFactory.java new file mode 100644 index 0000000..5a29ff7 --- /dev/null +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/remote/factory/RemoteSysUserFactory.java @@ -0,0 +1,31 @@ +package com.muyu.system.remote.factory; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.system.domain.SysUser; +import com.muyu.system.remote.RemoteSysUserService; +import org.springframework.cloud.openfeign.FallbackFactory; + +/** + * 远程调用用户熔断器 RemoteSysUserFactory + * + * @author DeKangLiu + * Date 2024/6/7 08:54 + */ +public class RemoteSysUserFactory implements FallbackFactory { + + @Override + public RemoteSysUserService create(Throwable cause) { + return new RemoteSysUserService() { + + /** + * 新增用户服务 + * @param user + * @return + */ + @Override + public Result add(SysUser user) { + return Result.error(cause.getMessage()); + } + }; + } +} diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDeptService.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDeptService.java index 140cf91..cdb1d87 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDeptService.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/SysDeptService.java @@ -135,4 +135,7 @@ public interface SysDeptService extends IService { * @return 结果 */ public int deleteDeptById (Long deptId); + + SysDept selectDeptByName(String name); + } diff --git a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysDeptServiceImpl.java b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysDeptServiceImpl.java index a55301b..ba48c34 100644 --- a/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysDeptServiceImpl.java +++ b/muyu-modules/muyu-system/src/main/java/com/muyu/system/service/impl/SysDeptServiceImpl.java @@ -280,6 +280,11 @@ public class SysDeptServiceImpl extends ServiceImpl impl return deptMapper.deleteDeptById(deptId); } + @Override + public SysDept selectDeptByName(String name) { + return deptMapper.selectDeptByName(name); + } + /** * 递归列表 */ diff --git a/muyu-modules/muyu-system/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/muyu-modules/muyu-system/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..0649d01 --- /dev/null +++ b/muyu-modules/muyu-system/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1,2 @@ +com.muyu.system.remote.factory.RemoteSysDeptFactory +com.muyu.system.remote.factory.RemoteSysUserFactory diff --git a/muyu-modules/muyu-system/src/main/resources/mapper/system/SysDeptMapper.xml b/muyu-modules/muyu-system/src/main/resources/mapper/system/SysDeptMapper.xml index a571d8b..26f759a 100644 --- a/muyu-modules/muyu-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/muyu-modules/muyu-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -180,4 +180,9 @@ where dept_id = #{deptId} + + +