diff --git a/Cpop-Oam/Cpop-Oam-Web/logs/Cpop-Oam-info-20240122.log.2024-01-22 b/Cpop-Oam/Cpop-Oam-Web/logs/Cpop-Oam-info-20240122.log.2024-01-22 deleted file mode 100644 index 99d0655..0000000 --- a/Cpop-Oam/Cpop-Oam-Web/logs/Cpop-Oam-info-20240122.log.2024-01-22 +++ /dev/null @@ -1,61 +0,0 @@ -[2024-01-22 15:21:23.553] INFO [background-preinit] Version.java:21 - HV000001: Hibernate Validator 6.2.5.Final -[2024-01-22 15:21:23.563] INFO [main] StartupInfoLogger.java:55 - Starting CpopDataSyncTests using Java 1.8.0_231 on DESKTOP-PIJFD5O with PID 22368 (started by Lost in E:\Cpop\Cpop-Union\Cpop-Oam\Cpop-Oam-Web) -[2024-01-22 15:21:23.564] INFO [main] SpringApplication.java:637 - The following 3 profiles are active: "prod", "core", "pay" -[2024-01-22 15:21:24.940] INFO [main] RepositoryConfigurationDelegate.java:262 - Multiple Spring Data modules found, entering strict repository configuration mode -[2024-01-22 15:21:24.945] INFO [main] RepositoryConfigurationDelegate.java:132 - Bootstrapping Spring Data Redis repositories in DEFAULT mode. -[2024-01-22 15:21:24.967] INFO [main] RepositoryConfigurationDelegate.java:201 - Finished Spring Data repository scanning in 6 ms. Found 0 Redis repository interfaces. -[2024-01-22 15:21:25.206] INFO [main] LogAccessor.java:292 - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created. -[2024-01-22 15:21:25.221] INFO [main] LogAccessor.java:292 - No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created. -[2024-01-22 15:21:25.688] INFO [main] PostProcessorRegistrationDelegate.java:376 - Bean 'com.mybatisflex.spring.boot.FlexTransactionAutoConfiguration' of type [com.mybatisflex.spring.boot.FlexTransactionAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) -[2024-01-22 15:21:25.997] INFO [main] PostProcessorRegistrationDelegate.java:376 - Bean 'mybatis-flex-com.mybatisflex.spring.boot.MybatisFlexProperties' of type [com.mybatisflex.spring.boot.MybatisFlexProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) -[2024-01-22 15:21:26.008] INFO [main] PostProcessorRegistrationDelegate.java:376 - Bean 'com.mybatisflex.spring.boot.MultiDataSourceAutoConfiguration' of type [com.mybatisflex.spring.boot.MultiDataSourceAutoConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) -[2024-01-22 15:21:26.135] INFO [main] PostProcessorRegistrationDelegate.java:376 - Bean 'redisConfig' of type [com.cpop.core.config.RedisConfig$$EnhancerBySpringCGLIB$$979fa58a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) -[2024-01-22 15:21:27.184] INFO [main] TomcatWebServer.java:108 - Tomcat initialized with port(s): 0 (http) -[2024-01-22 15:21:27.194] INFO [main] DirectJDKLog.java:173 - Initializing ProtocolHandler ["http-nio-auto-1"] -[2024-01-22 15:21:27.197] INFO [main] DirectJDKLog.java:173 - Starting service [Tomcat] -[2024-01-22 15:21:27.197] INFO [main] DirectJDKLog.java:173 - Starting Servlet engine: [Apache Tomcat/9.0.79] -[2024-01-22 15:21:27.417] INFO [main] DirectJDKLog.java:173 - Initializing Spring embedded WebApplicationContext -[2024-01-22 15:21:27.417] INFO [main] ServletWebServerApplicationContext.java:292 - Root WebApplicationContext: initialization completed in 3825 ms -[2024-01-22 15:21:28.467] INFO [main] HikariDataSource.java:110 - HikariPool-1 - Starting... -[2024-01-22 15:21:29.147] INFO [main] HikariDataSource.java:123 - HikariPool-1 - Start completed. -[2024-01-22 15:21:32.104] INFO [main] StdSchedulerFactory.java:1220 - Using default implementation for ThreadExecutor -[2024-01-22 15:21:32.106] INFO [main] SimpleThreadPool.java:268 - Job execution threads will use class loader of thread: main -[2024-01-22 15:21:32.118] INFO [main] SchedulerSignalerImpl.java:61 - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl -[2024-01-22 15:21:32.119] INFO [main] QuartzScheduler.java:229 - Quartz Scheduler v.2.3.2 created. -[2024-01-22 15:21:32.122] INFO [main] JobStoreSupport.java:672 - Using db table-based data access locking (synchronization). -[2024-01-22 15:21:32.124] INFO [main] JobStoreCMT.java:145 - JobStoreCMT initialized. -[2024-01-22 15:21:32.125] INFO [main] QuartzScheduler.java:294 - Scheduler meta-data: Quartz Scheduler (v2.3.2) 'CpopOamScheduler' with instanceId 'NON_CLUSTERED' - Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally. - NOT STARTED. - Currently in standby mode. - Number of jobs executed: 0 - Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 1 threads. - Using job-store 'org.springframework.scheduling.quartz.LocalDataSourceJobStore' - which supports persistence. and is not clustered. - -[2024-01-22 15:21:32.125] INFO [main] StdSchedulerFactory.java:1374 - Quartz scheduler 'CpopOamScheduler' initialized from an externally provided properties instance. -[2024-01-22 15:21:32.126] INFO [main] StdSchedulerFactory.java:1378 - Quartz scheduler version: 2.3.2 -[2024-01-22 15:21:32.126] INFO [main] QuartzScheduler.java:2293 - JobFactory set to: org.springframework.scheduling.quartz.SpringBeanJobFactory@1d5048d1 -[2024-01-22 15:21:32.798] INFO [main] InitConfig.java:41 - ===========================项目启动角色初始化=========================== -[2024-01-22 15:21:34.212] INFO [main] DefaultSecurityFilterChain.java:55 - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@4c3d72fd, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@259c6ab8, org.springframework.security.web.context.SecurityContextPersistenceFilter@39420d59, org.springframework.security.web.header.HeaderWriterFilter@3340ff7c, com.cpop.core.filter.JwtAuthenticationFilter@1488a861, org.springframework.security.web.authentication.logout.LogoutFilter@5bf1b528, com.cpop.core.filter.RepeatableFilter@22e813fc, com.cpop.core.gateway.sys.SysAuthenticationFilter@605eb072, com.cpop.core.gateway.miniProgram.MiniProgramAuthenticationFilter@1fa9692b, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@5dd227b7, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@14ba7f15, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@640a6d4b, org.springframework.security.web.session.SessionManagementFilter@5e198c40, org.springframework.security.web.access.ExceptionTranslationFilter@6cbb6c41, org.springframework.security.web.access.intercept.AuthorizationFilter@7ef7f414] -[2024-01-22 15:21:35.868] INFO [main] LogAccessor.java:174 - Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel -[2024-01-22 15:21:35.868] INFO [main] LogAccessor.java:174 - Channel 'Cpop-Oam-Prod.errorChannel' has 1 subscriber(s). -[2024-01-22 15:21:35.868] INFO [main] LogAccessor.java:292 - started bean '_org.springframework.integration.errorLogger' -[2024-01-22 15:21:35.869] INFO [main] DirectJDKLog.java:173 - Starting ProtocolHandler ["http-nio-auto-1"] -[2024-01-22 15:21:35.893] INFO [main] TomcatWebServer.java:220 - Tomcat started on port(s): 59855 (http) with context path '/Cpop-Oam' -[2024-01-22 15:21:35.895] INFO [main] SchedulerFactoryBean.java:734 - Will start Quartz Scheduler [CpopOamScheduler] in 1 seconds -[2024-01-22 15:21:35.912] INFO [main] StartupInfoLogger.java:61 - Started CpopDataSyncTests in 12.809 seconds (JVM running for 14.317) -[2024-01-22 15:21:36.907] INFO [Quartz Scheduler [CpopOamScheduler]] SchedulerFactoryBean.java:750 - Starting Quartz Scheduler now, after delay of 1 seconds -[2024-01-22 15:21:37.083] INFO [Quartz Scheduler [CpopOamScheduler]] JobStoreSupport.java:866 - Freed 0 triggers from 'acquired' / 'blocked' state. -[2024-01-22 15:21:37.154] INFO [Quartz Scheduler [CpopOamScheduler]] JobStoreSupport.java:876 - Recovering 0 jobs that were in-progress at the time of the last shut-down. -[2024-01-22 15:21:37.154] INFO [Quartz Scheduler [CpopOamScheduler]] JobStoreSupport.java:889 - Recovery complete. -[2024-01-22 15:21:37.188] INFO [Quartz Scheduler [CpopOamScheduler]] JobStoreSupport.java:896 - Removed 0 'complete' triggers. -[2024-01-22 15:21:37.224] INFO [Quartz Scheduler [CpopOamScheduler]] JobStoreSupport.java:901 - Removed 0 stale fired job entries. -[2024-01-22 15:21:37.294] INFO [Quartz Scheduler [CpopOamScheduler]] QuartzScheduler.java:547 - Scheduler CpopOamScheduler_$_NON_CLUSTERED started. -[2024-01-22 15:23:22.877] INFO [SpringApplicationShutdownHook] QuartzScheduler.java:585 - Scheduler CpopOamScheduler_$_NON_CLUSTERED paused. -[2024-01-22 15:23:23.203] INFO [SpringApplicationShutdownHook] LogAccessor.java:174 - Removing {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel -[2024-01-22 15:23:23.203] INFO [SpringApplicationShutdownHook] LogAccessor.java:174 - Channel 'Cpop-Oam-Prod.errorChannel' has 0 subscriber(s). -[2024-01-22 15:23:23.203] INFO [SpringApplicationShutdownHook] LogAccessor.java:292 - stopped bean '_org.springframework.integration.errorLogger' -[2024-01-22 15:23:23.209] INFO [SpringApplicationShutdownHook] SchedulerFactoryBean.java:847 - Shutting down Quartz Scheduler -[2024-01-22 15:23:23.210] INFO [SpringApplicationShutdownHook] QuartzScheduler.java:666 - Scheduler CpopOamScheduler_$_NON_CLUSTERED shutting down. -[2024-01-22 15:23:23.210] INFO [SpringApplicationShutdownHook] QuartzScheduler.java:585 - Scheduler CpopOamScheduler_$_NON_CLUSTERED paused. -[2024-01-22 15:23:23.210] INFO [SpringApplicationShutdownHook] QuartzScheduler.java:740 - Scheduler CpopOamScheduler_$_NON_CLUSTERED shutdown complete. diff --git a/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopDataSyncTests.java b/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopDataSyncTests.java index b3b3f3a..c464b63 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopDataSyncTests.java +++ b/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopDataSyncTests.java @@ -1,6 +1,5 @@ package com.cpop.oam.web; -import com.alibaba.fastjson.JSONArray; import com.cpop.api.cloudDb.core.dto.CloudStoreActiveDto; import com.cpop.api.cloudDb.handler.CloudStoreHandler; import com.cpop.common.utils.StringUtils; @@ -14,14 +13,11 @@ import com.cpop.oam.business.entity.TaskWorkOrder; import com.cpop.oam.business.mapper.TaskWorkOrderMapper; import com.cpop.oam.business.service.ClueService; import com.cpop.oam.business.service.TaskService; -import com.cpop.oam.business.service.TaskWorkOrderService; import com.cpop.system.business.entity.Store; import com.cpop.system.business.entity.StoreSign; -import com.cpop.system.business.entity.WxPayScore; import com.cpop.system.business.mapper.StoreMapper; import com.cpop.system.business.service.StoreService; import com.cpop.system.business.service.StoreSignService; -import com.cpop.system.business.service.WxPayScoreService; import com.mybatisflex.core.datasource.DataSourceKey; import com.mybatisflex.core.query.QueryWrapper; import com.mybatisflex.core.row.Db; @@ -37,7 +33,6 @@ import org.springframework.transaction.annotation.Transactional; import java.time.Duration; import java.time.LocalDate; import java.time.LocalDateTime; -import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Arrays; diff --git a/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopImportTests.java b/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopImportTests.java index b0c9800..fe36781 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopImportTests.java +++ b/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopImportTests.java @@ -4,11 +4,12 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.annotation.JSONField; -import com.cpop.common.utils.StringUtils; -import com.cpop.common.utils.bean.BeanUtils; +import com.cpop.core.mapper.UserMapper; +import com.cpop.core.utils.StringUtils; +import com.cpop.core.utils.bean.BeanUtils; import com.cpop.core.base.entity.BaseEntity; import com.cpop.system.framework.enums.InitRoleEnum; -import com.cpop.core.base.table.SysUser; +import com.cpop.core.base.table.User; import com.cpop.core.utils.RsaUtils; import com.cpop.core.utils.SpringUtils; import com.cpop.jambox.business.entity.*; @@ -18,7 +19,6 @@ import com.cpop.oam.business.entity.*; import com.cpop.oam.business.service.*; import com.cpop.oam.business.vo.StaffInfoVo; import com.cpop.system.business.entity.Store; -import com.cpop.system.business.entity.StoreLicense; import com.cpop.system.business.entity.StoreRenew; import com.cpop.system.business.entity.StoreSign; import com.cpop.system.business.service.*; @@ -42,7 +42,8 @@ import java.time.LocalDate; import java.util.*; import java.util.stream.Collectors; -import static com.cpop.core.base.table.table.SysUserTableDef.SYS_USER; +import static com.cpop.core.base.table.table.SysUserTableDef.USER; +import static com.cpop.core.base.table.table.UserTableDef.USER; import static com.cpop.jambox.business.entity.table.BrandExtendTableDef.BRAND_EXTEND; import static com.cpop.jambox.business.entity.table.StoreExtendTableDef.STORE_EXTEND; import static com.cpop.oam.business.entity.table.StaffTableDef.STAFF; @@ -141,7 +142,7 @@ public class CpopImportTests { StoreExtend storeExtend = new StoreExtend(); storeExtend.setStoreCloudId(item.getStoreCloudId()); Store store = new Store(); - store.setSourceType(SourceType.JAMBOX.toString()) + store.setSourceType("JAMBOX") .setStoreName(item.getName()) .setBrandId(brandCloudIdMap.get(item.brandCloudId).getString("id")); storeExtendStoreMap.put(storeExtend,store); @@ -699,9 +700,9 @@ public class CpopImportTests { //获取已有的员工数据 List rows = Db.selectListByQuery(QueryWrapper.create() .select(STAFF.ID) - .select(SYS_USER.PHONE_NUMBER) + .select(USER.PHONE_NUMBER) .from(STAFF) - .leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID))); + .leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID))); System.out.println(rows); List rowList; try { @@ -768,9 +769,9 @@ public class CpopImportTests { //获取现有所有员工 Map staffMap = SpringUtils.getBean(StaffService.class).listAs(QueryWrapper.create() .select(STAFF.ID, STAFF.NAME) - .select(SYS_USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) + .select(USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) .from(STAFF) - .leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID)), + .leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID)), StaffInfoVo.class).stream().collect(Collectors.toMap(StaffInfoVo::getPhoneNumber, item -> item)); rowList.forEach(item -> { StaffInfoVo afterSales = staffMap.get(oldStaffPhone.get(item.getString("afterSales"))); @@ -816,7 +817,7 @@ public class CpopImportTests { if (StringUtils.isNotBlank(storeId)) { item.put("storeId", storeId); item.put("brandId", storeMap.get(storeId).getBrandId()); - item.put("sourceType", SourceType.JAMBOX.toString()); + item.put("sourceType", "JAMBOX"); } }); List filterList = rowList.stream().filter(item -> StringUtils.isNotBlank(item.getString("storeId"))).collect(Collectors.toList()); @@ -857,9 +858,9 @@ public class CpopImportTests { //获取现有所有员工 Map staffMap = SpringUtils.getBean(StaffService.class).listAs(QueryWrapper.create() .select(STAFF.ID, STAFF.NAME, STAFF.USER_ID) - .select(SYS_USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) + .select(USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) .from(STAFF) - .leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID)), + .leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID)), StaffInfoVo.class).stream().collect(Collectors.toMap(StaffInfoVo::getPhoneNumber, item -> item)); List filterRecordRowList = recordRowList.stream() .filter(item -> StringUtils.isNotBlank(item.getString("phone")) && staffMap.get(item.getString("phone")) != null) @@ -921,9 +922,9 @@ public class CpopImportTests { //获取现有所有员工 Map staffMap = SpringUtils.getBean(StaffService.class).listAs(QueryWrapper.create() .select(STAFF.ID, STAFF.NAME, STAFF.USER_ID) - .select(SYS_USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) + .select(USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) .from(STAFF) - .leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID)), + .leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID)), StaffInfoVo.class).stream().collect(Collectors.toMap(StaffInfoVo::getPhoneNumber, item -> item)); rowList.forEach(item -> { //所有任务预设为迭代任务 @@ -1012,9 +1013,9 @@ public class CpopImportTests { //获取现有所有员工 Map staffMap = SpringUtils.getBean(StaffService.class).listAs(QueryWrapper.create() .select(STAFF.ID, STAFF.NAME, STAFF.USER_ID) - .select(SYS_USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) + .select(USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) .from(STAFF) - .leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID)), + .leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID)), StaffInfoVo.class).stream().collect(Collectors.toMap(StaffInfoVo::getPhoneNumber, item -> item)); rowList.forEach(item -> { //员工 @@ -1183,9 +1184,9 @@ public class CpopImportTests { //获取现有所有员工 Map staffMap = SpringUtils.getBean(StaffService.class).listAs(QueryWrapper.create() .select(STAFF.ID, STAFF.NAME,STAFF.USER_ID) - .select(SYS_USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) + .select(USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) .from(STAFF) - .leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID)), + .leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID)), StaffInfoVo.class).stream().collect(Collectors.toMap(StaffInfoVo::getPhoneNumber, item -> item)); //查询校区 Map cloudToStore = SpringUtils.getBean(StoreExtendService.class).list().stream().collect(Collectors.toMap(StoreExtend::getStoreCloudId, StoreExtend::getStoreId)); @@ -1414,9 +1415,9 @@ public class CpopImportTests { //获取现有所有员工 Map staffMap = SpringUtils.getBean(StaffService.class).listAs(QueryWrapper.create() .select(STAFF.ID, STAFF.NAME,STAFF.USER_ID) - .select(SYS_USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) + .select(USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) .from(STAFF) - .leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID)), + .leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID)), StaffInfoVo.class).stream().collect(Collectors.toMap(StaffInfoVo::getPhoneNumber, item -> item)); TaskService taskService = SpringUtils.getBean(TaskService.class); List taskWorkOrders = new ArrayList<>(); @@ -1511,9 +1512,9 @@ public class CpopImportTests { //获取现有所有员工 Map staffMap = SpringUtils.getBean(StaffService.class).listAs(QueryWrapper.create() .select(STAFF.ID, STAFF.NAME,STAFF.USER_ID) - .select(SYS_USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) + .select(USER.PHONE_NUMBER.as(StaffInfoVo::getPhoneNumber)) .from(STAFF) - .leftJoin(SYS_USER).on(SYS_USER.ID.eq(STAFF.USER_ID)), + .leftJoin(USER).on(USER.ID.eq(STAFF.USER_ID)), StaffInfoVo.class).stream().collect(Collectors.toMap(StaffInfoVo::getPhoneNumber, item -> item)); //获取所有工单 Map workOrderMap = SpringUtils.getBean(TaskWorkOrderService.class).list().stream().filter(item->StringUtils.isNotBlank(item.getUpdateUserId())) @@ -1574,12 +1575,12 @@ public class CpopImportTests { @Test public void batchUpdateStaffPassword(){ - List cpSysUser = DbChain.table("cp_sys_user") + List cpSysUser = DbChain.table("cp_USER") .select("id","phone_number") .where("user_type = 'OAM_USER'") .and("is_delete = 0") .list(); - List entityList = RowUtil.toEntityList(cpSysUser, SysUser.class); + List entityList = RowUtil.toEntityList(cpSysUser, User.class); //加密 RsaUtils rsaUtils = SpringUtils.getBean(RsaUtils.class); entityList.forEach(item -> { @@ -1588,7 +1589,7 @@ public class CpopImportTests { item.setRsaPassword(rsaUtils.encrypt(lastFourChars)); } }); - Db.executeBatch(entityList, CoreMapper.class, CoreMapper::updateSysUser); + Db.executeBatch(entityList, UserMapper.class, UserMapper::update); } /** diff --git a/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopOldDataSyncTests.java b/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopOldDataSyncTests.java index c7f416f..68ee6f4 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopOldDataSyncTests.java +++ b/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopOldDataSyncTests.java @@ -1,6 +1,5 @@ package com.cpop.oam.web; -import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.cpop.common.utils.StringUtils; import com.cpop.system.framework.enums.OrderSource; @@ -9,11 +8,7 @@ import com.cpop.jambox.business.entity.*; import com.cpop.jambox.business.service.*; import com.cpop.pay.framewok.handler.wxPay.WxPayHandler; import com.cpop.system.business.entity.Store; -import com.cpop.system.business.entity.WxPayScore; -import com.cpop.system.business.entity.WxPayScoreDetail; import com.cpop.system.business.service.StoreService; -import com.cpop.system.business.service.WxPayScoreDetailService; -import com.cpop.system.business.service.WxPayScoreService; import com.github.binarywang.wxpay.bean.payscore.PartnerUserSignPlanEntity; import com.github.binarywang.wxpay.bean.payscore.PayScorePlanDetailResult; import com.github.binarywang.wxpay.bean.payscore.WxPartnerPayScoreSignPlanResult; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/CloudUnionCallbackBo.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/CloudUnionCallbackBo.java index 20eda29..21bdce2 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/CloudUnionCallbackBo.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/bo/CloudUnionCallbackBo.java @@ -1,7 +1,5 @@ package com.cpop.oam.business.bo; -import com.cpop.system.business.bo.StoreBo; -import com.cpop.system.business.bo.SyncBrandAndStoreBo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBrandManagerController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBrandManagerController.java index 7b06636..bdc6005 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBrandManagerController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageBrandManagerController.java @@ -4,7 +4,6 @@ import com.cpop.core.base.entity.R; import com.cpop.oam.business.bo.BrandManagerBo; import com.cpop.oam.business.bo.BrandManagerPageBo; import com.cpop.oam.business.service.BrandManagerService; -import com.cpop.system.business.bo.StoreListByBrandBo; import com.cpop.system.business.entity.table.BrandTableDef; import com.cpop.system.business.entity.table.StoreTableDef; import com.cpop.system.business.service.BrandService; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxPayController.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxPayController.java index 561d4a8..907c9cd 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxPayController.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/controller/backstage/BackstageWxPayController.java @@ -5,7 +5,6 @@ import com.cpop.common.utils.StringUtils; import com.cpop.core.base.entity.R; import com.cpop.core.base.exception.ServiceException; import com.cpop.pay.framewok.config.wxPay.WxPayConfiguration; -import com.cpop.system.business.bo.ChangeWechatSharingBo; import com.cpop.system.business.entity.Brand; import com.cpop.system.business.service.BrandService; import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingReceiverRequest; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/CluePutOffServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/CluePutOffServiceImpl.java index f789f07..618fb22 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/CluePutOffServiceImpl.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/CluePutOffServiceImpl.java @@ -11,7 +11,6 @@ import com.cpop.oam.business.service.ClueRecordService; import com.cpop.oam.business.service.ClueService; import com.cpop.oam.business.vo.CluePageVo; import com.cpop.oam.business.vo.PutOffAuditPageVo; -import com.cpop.system.business.bo.StoreRenewBo; import com.cpop.system.business.service.StoreRenewService; import com.mybatisflex.core.paginate.Page; import com.mybatisflex.core.query.QueryWrapper; diff --git a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskWorkOrderServiceImpl.java b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskWorkOrderServiceImpl.java index 3c32bda..407eb50 100644 --- a/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskWorkOrderServiceImpl.java +++ b/Cpop-Oam/src/main/java/com/cpop/oam/business/service/impl/TaskWorkOrderServiceImpl.java @@ -2,9 +2,8 @@ package com.cpop.oam.business.service.impl; import com.alibaba.fastjson.JSONObject; import com.cpop.api.tencent.wxWork.handler.WebHookSendHandler; -import com.cpop.common.utils.DateUtils; -import com.cpop.common.utils.StringUtils; -import com.cpop.common.utils.bean.BeanUtils; +import com.cpop.core.utils.StringUtils; +import com.cpop.core.utils.bean.BeanUtils; import com.cpop.core.base.entity.PageDomain; import com.cpop.core.base.exception.ServiceException; import com.cpop.core.base.exception.UtilException; @@ -176,7 +175,7 @@ public class TaskWorkOrderServiceImpl extends ServiceImpl planDetailList; - /** - * 订单来源 - */ - private OrderSource orderSource = OrderSource.EASY_LEARN; - } diff --git a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/ecpp/EcppHandler.java b/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/ecpp/EcppHandler.java index 29667da..9f381c1 100644 --- a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/ecpp/EcppHandler.java +++ b/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/ecpp/EcppHandler.java @@ -1,7 +1,7 @@ package com.cpop.pay.framewok.handler.ecpp; import com.alibaba.fastjson.JSONObject; -import com.cpop.common.utils.StringUtils; +import com.cpop.core.utils.StringUtils; import com.cpop.core.base.exception.ServiceException; import com.cpop.core.base.exception.UtilException; import com.cpop.pay.framewok.config.ecpp.EcppConfiguration; diff --git a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxPayHandler.java b/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxPayHandler.java index db9935a..6dd35c2 100644 --- a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxPayHandler.java +++ b/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxPayHandler.java @@ -1,139 +1,35 @@ package com.cpop.pay.framewok.handler.wxPay; -import com.alibaba.fastjson.JSONObject; -import com.cpop.common.utils.ServletUtils; -import com.cpop.common.utils.StringUtils; -import com.cpop.core.base.exception.ServiceException; import com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader; -import com.github.binarywang.wxpay.config.WxPayConfig; import com.github.binarywang.wxpay.service.WxPayService; -import com.mybatisflex.core.query.QueryWrapper; -import com.mybatisflex.core.row.Db; -import com.mybatisflex.core.row.Row; +import com.cpop.core.utils.ServletUtils; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletRequest; +import lombok.Getter; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import javax.servlet.http.HttpServletRequest; - /** * @author DB - * @createTime 2023/10/27 15:47 - * @description + * @version 1.0.0 + * @since 2024-03-13 11:29 */ +@Getter @Component @Slf4j public class WxPayHandler { - @Autowired - private WxPayService wxPayService; + /** + * 获取普通微信支付 + */ + @Resource(name = "normalWxPayService") + private WxPayService normalWxPayService; /** - * @descriptions 获取微信支付service - * @author DB - * @date 2023/10/27 15:53 - * @return: com.github.binarywang.wxpay.service.WxPayService + * 获取普通微信支付 */ - public WxPayService getWxPayService(){ - //查询当前登陆用户所在品牌的商户id - JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo(); - if (loginUserInfo == null) { - //直接返回 - return wxPayService; - } - String brandId = loginUserInfo.getString("brandId"); - Row brand = Db.selectOneByQuery("cp_sys_brand", QueryWrapper.create().where("id = ?", brandId)); - if (brand.isEmpty() || StringUtils.isBlank(brand.getString("wxMchId"))) { - throw new ServiceException("当前品牌暂未开通微信支付,请联系相关客服"); - } - //检查是否开启分账 - if (!brand.getBoolean("isOpenSharing")) { - throw new ServiceException("当前商户暂未开启分账,请联系相关客服"); - } - WxPayConfig payConfig = wxPayService.getConfig(); - //子商户信息 - payConfig.setSubMchId(StringUtils.trimToNull(brand.getString("wxMchId"))); - // 可以指定是否使用沙箱环境 - payConfig.setUseSandboxEnv(false); - wxPayService.setConfig(payConfig); - return wxPayService; - } - - /** - * @descriptions 根据商户appid或商户号获取对应微信支付接口 - * @author DB - * @date 2023/10/18 10:34 - * @param subAppId 子商户appid - * @param subMchId 子商户id - * @return: com.github.binarywang.wxpay.service.WxPayService - */ - public WxPayService getWxPayService(String subAppId, String subMchId) { - WxPayConfig payConfig = wxPayService.getConfig(); - //子商户信息 - payConfig.setSubAppId(StringUtils.trimToNull(subAppId)); - payConfig.setSubMchId(StringUtils.trimToNull(subMchId)); - // 可以指定是否使用沙箱环境 - payConfig.setUseSandboxEnv(false); - wxPayService.setConfig(payConfig); - return wxPayService; - } - - /** - * 根据商户appid或商户号获取对应微信支付接口 - * @author DB - * @since 2023/10/18 10:34 - * @param subAppId 子商户appid - * @param subMchId 子商户id - * @param notifyUrl 通知地址 - * @return com.github.binarywang.wxpay.service.WxPayService - */ - public WxPayService getWxPayService(String subAppId, String subMchId, String notifyUrl) { - WxPayConfig payConfig = wxPayService.getConfig(); - //子商户信息 - payConfig.setSubAppId(StringUtils.trimToNull(subAppId)); - payConfig.setSubMchId(StringUtils.trimToNull(subMchId)); - payConfig.setNotifyUrl(notifyUrl); - // 可以指定是否使用沙箱环境 - payConfig.setUseSandboxEnv(false); - wxPayService.setConfig(payConfig); - return wxPayService; - } - - /** - * 获取子商户 - * @author DB - * @since 2023/12/21 - * @param brandId 品牌id - * @param storeId 校区id - * @return String - */ - public String getSubMchId(String brandId, String storeId) { - String wxMchId; - if (StringUtils.isNotEmpty(storeId)){ - //先查校区 - Row store = Db.selectOneByQuery("cp_sys_store", QueryWrapper.create().where("id = ?", storeId)); - if (store != null && StringUtils.isNotBlank(store.getString("wxMchId"))){ - wxMchId = store.getString("wxMchId"); - } else { - //查询品牌 - Row brand = Db.selectOneByQuery("cp_sys_brand", QueryWrapper.create().where("id = ?", brandId)); - if (brand != null && StringUtils.isNotBlank(brand.getString("wxMchId"))){ - wxMchId = brand.getString("wxMchId"); - }else { - wxMchId = null; - } - } - } else { - //查询品牌 - Row brand = Db.selectOneByQuery("cp_sys_brand", QueryWrapper.create().where("id = ?", brandId)); - if (brand != null && StringUtils.isNotBlank(brand.getString("wxMchId"))){ - wxMchId = brand.getString("wxMchId"); - }else { - wxMchId = null; - } - } - return wxMchId; - } + @Resource(name = "serviceWxPayService") + private WxPayService serviceWxPayService; /** * 获取签约头 diff --git a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxPayNormalHandler.java b/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxPayNormalHandler.java deleted file mode 100644 index 7924bc6..0000000 --- a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxPayNormalHandler.java +++ /dev/null @@ -1,65 +0,0 @@ -package com.cpop.pay.framewok.handler.wxPay; - -import com.cpop.core.utils.SpringUtils; -import com.cpop.pay.framewok.config.wxPay.WxPayConfiguration; -import org.checkerframework.checker.units.qual.A; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.Map; -import java.util.SortedMap; -import java.util.TreeMap; - -/** - * @author DB - * @version 1.0.0 - * @since 2024-02-22 20:10 - */ -@Component -public class WxPayNormalHandler { - - @Autowired - private WxUtils wxUtils; - - public T createOrder(String orderId,String openId, BigDecimal price, String body, String ipAddress,String notifyUrl) throws IOException { - SortedMap parameters = new TreeMap(); - parameters.put("appid", "wx20853d18c455e874"); - parameters.put("mch_id", "1618436087"); - parameters.put("openid", openId); - // 默认 "WEB" - parameters.put("device_info", "WEB"); - parameters.put("body", body); - // 32 位随机字符串 - parameters.put("nonce_str", wxUtils.gen32RandomString()); - parameters.put("notify_url", notifyUrl); - parameters.put("out_trade_no", orderId); - parameters.put("total_fee", price.multiply(BigDecimal.valueOf(100)).intValue()); - // parameters.put("total_fee", 1); // 测试时,将支付金额设置为 1 分钱 - parameters.put("spbill_create_ip", ipAddress); - parameters.put("trade_type", "JSAPI"); - // sign 必须在最后 - parameters.put("sign", wxUtils.createSign(parameters, "JamBox20220329174000000000000002")); - // 执行 HTTP 请求,获取接收的字符串(一段 XML) - String result = wxUtils.executeHttpPost("https://api.mch.weixin.qq.com/pay/unifiedorder", parameters); - return wxUtils.createSign2(result, "JamBox20220329174000000000000002"); - } - - public String fail() { - return "\n" + - " \n" + - " \n" + - ""; - } - - public String success() { - return "\n" + - " \n" + - " \n" + - ""; - } -} diff --git a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxUtils.java b/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxUtils.java deleted file mode 100644 index 06f672d..0000000 --- a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/handler/wxPay/WxUtils.java +++ /dev/null @@ -1,283 +0,0 @@ -package com.cpop.pay.framewok.handler.wxPay; - -import com.cpop.common.utils.StringUtils; -import com.cpop.core.base.exception.UtilException; -import com.github.binarywang.wxpay.bean.order.WxPayAppOrderResult; -import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult; -import com.github.binarywang.wxpay.constant.WxPayConstants; -import com.github.binarywang.wxpay.util.SignUtils; -import org.apache.http.HttpResponse; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.HttpClients; -import org.apache.poi.ss.formula.functions.T; -import org.springframework.stereotype.Component; -import org.jdom2.Document; -import org.jdom2.Element; -import org.jdom2.JDOMException; -import org.jdom2.input.SAXBuilder; - -import javax.servlet.http.HttpServletRequest; -import java.io.*; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.*; - -/** - * @author DB - * @version 1.0.0 - * @since 2024-02-22 20:13 - */ -@Component -public class WxUtils { - - /** - * 执行 POST 方法的 HTTP 请求 - * - * @param url - * @param parameters - * @return - * @throws IOException - */ - public String executeHttpPost(String url, SortedMap parameters) throws IOException { - HttpClient client = HttpClients.createDefault(); - HttpPost request = new HttpPost(url); - request.setHeader("Content-type", "application/xml"); - request.setHeader("Accept", "application/xml"); - request.setEntity(new StringEntity(transferMapToXml(parameters), "UTF-8")); - HttpResponse response = client.execute(request); - return readResponse(response); - } - - - /** - * 第一次签名 - * - * @param parameters 数据为服务器生成,下单时必须的字段排序签名 - * @param key - * @return - */ - public String createSign(SortedMap parameters, String key) { - StringBuffer sb = new StringBuffer(); - Set es = parameters.entrySet();//所有参与传参的参数按照accsii排序(升序) - Iterator it = es.iterator(); - while (it.hasNext()) { - Map.Entry entry = (Map.Entry) it.next(); - String k = (String) entry.getKey(); - Object v = entry.getValue(); - if (null != v && !"".equals(v) - && !"sign".equals(k) && !"key".equals(k)) { - sb.append(k + "=" + v + "&"); - } - } - sb.append("key=" + key); - return encodeMD5(sb.toString()); - } - - /** - * 第二次签名 - * - * @param result 数据为微信返回给服务器的数据(XML 的 String),再次签名后传回给客户端(APP)使用 - * @param key 密钥 - * @return - * @throws IOException - */ - public T createSign2(String result, String key) throws IOException { - SortedMap map = new TreeMap<>(transferXmlToMap(result)); - if (StringUtils.equals(map.get("result_code").toString(),"FAIL")){ - throw new UtilException(map.get("err_code_des").toString()); - } - //wxJava获取签名 - String signType = WxPayConstants.SignType.MD5; - String appid = map.get("appid").toString(); - WxPayMpOrderResult payResult = WxPayMpOrderResult.builder() - .appId(appid) - .timeStamp(String.valueOf(System.currentTimeMillis() / 1000)) - .nonceStr(map.get("nonce_str").toString()) - .packageValue("prepay_id=" + map.get("prepay_id")) - .signType(signType) - .build(); - payResult.setPaySign(SignUtils.createSign(payResult, signType, key, null)); - return (T) payResult; - } - - /** - * 验证签名是否正确 - * - * @return boolean - * @throws Exception - */ - public boolean checkSign(SortedMap parameters, String key) throws Exception { - String signWx = parameters.get("sign").toString(); - if (signWx == null) return false; - parameters.remove("sign"); // 需要去掉原 map 中包含的 sign 字段再进行签名 - String signMe = createSign(parameters, key); - return signWx.equals(signMe); - } - - /** - * 读取 request body 内容作为字符串 - * - * @param request - * @return - * @throws IOException - */ - public String readRequest(HttpServletRequest request) throws IOException { - InputStream inputStream; - StringBuffer sb = new StringBuffer(); - inputStream = request.getInputStream(); - String str; - BufferedReader in = new BufferedReader(new InputStreamReader(inputStream, "UTF-8")); - while ((str = in.readLine()) != null) { - sb.append(str); - } - in.close(); - inputStream.close(); - return sb.toString(); - } - - /** - * 读取 response body 内容为字符串 - */ - public String readResponse(HttpResponse response) throws IOException { - BufferedReader in = new BufferedReader( - new InputStreamReader(response.getEntity().getContent())); - String result = new String(); - String line; - while ((line = in.readLine()) != null) { - result += line; - } - return result; - } - - /** - * 将 Map 转化为 XML - * - * @param map - * @return - */ - public String transferMapToXml(SortedMap map) { - StringBuffer sb = new StringBuffer(); - sb.append(""); - for (String key : map.keySet()) { - sb.append("<").append(key).append(">") - .append(map.get(key)) - .append(""); - } - return sb.append("").toString(); - } - - /** - * 将 XML 转化为 map - * - * @param strxml - * @return - * @throws JDOMException - * @throws IOException - */ - public Map transferXmlToMap(String strxml) throws IOException { - strxml = strxml.replaceFirst("encoding=\".*\"", "encoding=\"UTF-8\""); - if (null == strxml || "".equals(strxml)) { - return null; - } - Map m = new HashMap(); - InputStream in = new ByteArrayInputStream(strxml.getBytes("UTF-8")); - SAXBuilder builder = new SAXBuilder(); - Document doc = null; - try { - doc = builder.build(in); - } catch (JDOMException e) { - throw new IOException(e.getMessage()); // 统一转化为 IO 异常输出 - } - // 解析 DOM - Element root = doc.getRootElement(); - List list = root.getChildren(); - Iterator it = list.iterator(); - while (it.hasNext()) { - Element e = (Element) it.next(); - String k = e.getName(); - String v = ""; - List children = e.getChildren(); - if (children.isEmpty()) { - v = e.getTextNormalize(); - } else { - v = getChildrenText(children); - } - m.put(k, v); - } - //关闭流 - in.close(); - return m; - } - - // 辅助 transferXmlToMap 方法递归提取子节点数据 - private String getChildrenText(List children) { - StringBuffer sb = new StringBuffer(); - if (!children.isEmpty()) { - Iterator it = children.iterator(); - while (it.hasNext()) { - Element e = (Element) it.next(); - String name = e.getName(); - String value = e.getTextNormalize(); - List list = e.getChildren(); - sb.append("<" + name + ">"); - if (!list.isEmpty()) { - sb.append(getChildrenText(list)); - } - sb.append(value); - sb.append(""); - } - } - return sb.toString(); - } - - - /** - * 生成 32 位随机字符串,包含:数字、字母大小写 - * - * @return - */ - public String gen32RandomString() { - char[] dict = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; - StringBuffer sb = new StringBuffer(); - Random random = new Random(); - for (int i = 0; i < 32; i++) { - sb.append(String.valueOf(dict[(int) (Math.random() * 36)])); - } - return sb.toString(); - } - - /** - * MD5 签名 - * - * @param str - * @return 签名后的字符串信息 - */ - public String encodeMD5(String str) { - try { - MessageDigest messageDigest = MessageDigest.getInstance("MD5"); - byte[] inputByteArray = (str).getBytes(); - messageDigest.update(inputByteArray); - byte[] resultByteArray = messageDigest.digest(); - return byteArrayToHex(resultByteArray); - } catch (NoSuchAlgorithmException e) { - return null; - } - } - - // 辅助 encodeMD5 方法实现 - private String byteArrayToHex(byte[] byteArray) { - char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; - char[] resultCharArray = new char[byteArray.length * 2]; - int index = 0; - for (byte b : byteArray) { - resultCharArray[index++] = hexDigits[b >>> 4 & 0xf]; - resultCharArray[index++] = hexDigits[b & 0xf]; - } - // 字符数组组合成字符串返回 - return new String(resultCharArray); - } -} diff --git a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/task/WxPayAsyncTask.java b/Cpop-Pay/src/main/java/com/cpop/pay/framewok/task/WxPayAsyncTask.java deleted file mode 100644 index b07b30d..0000000 --- a/Cpop-Pay/src/main/java/com/cpop/pay/framewok/task/WxPayAsyncTask.java +++ /dev/null @@ -1,198 +0,0 @@ -package com.cpop.pay.framewok.task; - -import com.alibaba.fastjson.JSONObject; -import com.cpop.api.tencent.wxWork.handler.WebHookSendHandler; -import com.cpop.common.utils.StringUtils; -import com.cpop.core.base.enums.OrderSource; -import com.cpop.core.base.exception.ServiceException; -import com.cpop.core.service.RedisService; -import com.cpop.core.utils.SpringUtils; -import com.cpop.pay.framewok.config.wxPay.WxPayProperties; -import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; -import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingRequest; -import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingResult; -import com.github.binarywang.wxpay.exception.WxPayException; -import com.github.binarywang.wxpay.service.WxPayService; -import com.mybatisflex.core.query.QueryWrapper; -import com.mybatisflex.core.row.Db; -import com.mybatisflex.core.row.DbChain; -import com.mybatisflex.core.row.Row; -import com.mybatisflex.core.row.RowKey; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Component; - -import java.io.IOException; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.*; - -/** - * @author DB - * @createTime 2023/11/03 11:13 - * @description 微信支付异步处理类 - */ -@Component -public class WxPayAsyncTask { - - @Autowired - private WxPayProperties wxPayProperties; - - /** - * @descriptions 异步分账 - * @author DB - * @date 2023/11/03 11:14 - * @param orderId 订单id - * @param notifyResult 通知结果 - * @param wxPayService 微信支付处理类 - * @return: void - */ - @Async("customAsyncThreadPool") - public void asyncWxPayProfitSharing(String orderId, WxPayOrderNotifyResult notifyResult, WxPayService wxPayService, OrderSource orderSource) { - ProfitSharingRequest profitSharingRequest = buildProfitSharingRequest(orderId, notifyResult, orderSource); - try { - Thread.sleep(5000); - wxPayProfitSharing(profitSharingRequest, wxPayService, 0, orderSource); - } catch (InterruptedException e) { - throw new ServiceException(e.getMessage()); - } - } - - @Async("customAsyncThreadPool") - public void asyncWxPayProfitSharing(String orderId, WxPayOrderNotifyResult notifyResult, WxPayService wxPayService, OrderSource orderSource, Double rate) { - ProfitSharingRequest profitSharingRequest = buildProfitSharingRequest(orderId, notifyResult, orderSource, rate); - try { - Thread.sleep(5000); - wxPayProfitSharing(profitSharingRequest, wxPayService, 0, orderSource); - } catch (InterruptedException e) { - throw new ServiceException(e.getMessage()); - } - } - - /** - * 构建分账请求参数 - * @author DB - * @since 2023/12/28 - * @param orderId 订单号 - * @param notifyResult 通知结果 - * @param orderSource 订单来源 - * @return ProfitSharingRequest - */ - private ProfitSharingRequest buildProfitSharingRequest(String orderId, WxPayOrderNotifyResult notifyResult, OrderSource orderSource) { - return buildProfitSharingRequest(orderId, notifyResult, orderSource, orderSource.getRate()); - } - - /** - * 构建分账请求参数 - * @author DB - * @since 2023/12/28 - * @param orderId 订单号 - * @param notifyResult 通知结果 - * @param orderSource 订单来源 - * @param rate 分账比例 - * @return ProfitSharingRequest - */ - private ProfitSharingRequest buildProfitSharingRequest(String orderId, WxPayOrderNotifyResult notifyResult, OrderSource orderSource, Double rate) { - LocalDateTime now = LocalDateTime.now(); - Double ceil = Math.ceil(notifyResult.getTotalFee() * rate); - Row row = Row.ofKey(RowKey.SNOW_FLAKE_ID) - .set("order_id", orderId) - .set("profit_sharing_status", 0) - .set("amount", ceil.longValue()) - .set("pay_account", notifyResult.getSubMchId()) - .set("order_source",orderSource.toString()) - .set("create_time", now) - .set("update_time", now) - .set("create_user_id", "1") - .set("update_user_id", "1"); - Db.insert("cp_sys_profit_sharing", row); - //固定商户信息 - Map mapReceiver = new HashMap<>(4); - mapReceiver.put("type", "MERCHANT_ID"); - mapReceiver.put("account", wxPayProperties.getSharingAccount()); - mapReceiver.put("amount", ceil.longValue()); - mapReceiver.put("description","分账到服务商"); - List> receivers = new ArrayList<>(); - receivers.add(mapReceiver); - //分账请求参数 - ProfitSharingRequest profitSharingRequest = new ProfitSharingRequest(); - profitSharingRequest.setReceivers(JSONObject.toJSONString(receivers)); - profitSharingRequest.setOutOrderNo(row.getString("id")); - profitSharingRequest.setTransactionId(notifyResult.getTransactionId()); - profitSharingRequest.setSubMchId(notifyResult.getSubMchId()); - return profitSharingRequest; - } - - /** - * 微信支付分账 - * @author DB - * @since 2023/11/03 11:09 - * @param profitSharingRequest 请求参数 - * @param wxPayService 微信服务类 - * @param flag 标记 - */ - private void wxPayProfitSharing(ProfitSharingRequest profitSharingRequest, WxPayService wxPayService, Integer flag, OrderSource orderSource) { - try { - ProfitSharingResult profitSharingResult = wxPayService.getProfitSharingService().profitSharing(profitSharingRequest); - if (StringUtils.equals(profitSharingResult.getResultCode(), "SUCCESS")) { - //存入系统 - DbChain.table("cp_sys_profit_sharing") - .set("out_profit_sharing_id", profitSharingResult.getOrderId()) - .set("profit_sharing_status", 1) - .where("id = ?", profitSharingResult.getOutOrderNo()) - .update(); - //发送通知到财务群 - List phoneList = new ArrayList(); - // 获取审核管理员手机号 - RedisService redisService = SpringUtils.getBean(RedisService.class); - String auditStaffPhone = redisService.getCacheObject("sysConfig:oam:OamCancelAfterVerificationStaffPhone"); - phoneList.add(auditStaffPhone); - try { - //获取订单信息 - Row order = Db.selectOneByQuery("cp_j_easy_learn_order", QueryWrapper.create() - .select("cjelo.id", "cjelo.order_content", "cjelo.out_order_no", "cjelo.order_type", "cjelo.customer_name", "cjelo.customer_phone", "cjelo.total_pay_amount","cjelo.create_time") - .select("csb.brand_name") - .select("css.store_name") - .from("cp_j_easy_learn_order").as("cjelo") - .leftJoin("cp_sys_brand").as("csb").on("csb.id= cjelo.brand_id") - .leftJoin("cp_sys_store").as("css").on("css.id= cjelo.store_id") - .where("cjelo.id = ?", profitSharingResult.getOutOrderNo())); - JSONObject receiver = JSONObject.parseArray(profitSharingRequest.getReceivers()).getJSONObject(0); - SpringUtils.getBean(WebHookSendHandler.class).webHookSendText("a885058b-2478-4df8-bdb7-2bb94a08c1f5", phoneList, - "==========用户订单分账到账==========" + - "\n订单创建时间:" + order.getLocalDateTime("createTime").format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")) + - "\n品牌:" + order.getString("brandName") + - "\n校区:" + order.getString("storeName") + - "\n订单类型:" + order.getInt("orderType") + - "\n受益人:" + order.getInt("customerName") + - "\n电话:" + order.getInt("customerPhone") + - "\n订单金额:" + order.getBigDecimal("totalPayAmount") + - "\n分账金额:" + receiver.get("amount") + - "\n微信订单号:" + profitSharingRequest.getTransactionId() + - "\n商户号:" + profitSharingRequest.getSubMchId() + - "\n到账商户号:" + wxPayProperties.getSharingAccount(), - false); - } catch (IOException e) { - throw new ServiceException("发送任务通知失败!"); - } - } else { - throw new ServiceException(profitSharingResult.getReturnMsg()); - } - } catch (WxPayException e) { - if (flag > 2) { - if (OrderSource.MALL == orderSource) { - //关闭商城支付 - DbChain.table("cp_sys_brand") - .set("is_open_sharing", false) - .where("wx_mch_id = ?", wxPayService.getConfig().getSubMchId()) - .update(); - } - throw new ServiceException(e.getMessage()); - } else { - //重复调用 - flag = flag + 1; - wxPayProfitSharing(profitSharingRequest, wxPayService, flag, orderSource); - } - } - } -} diff --git a/Cpop-System/pom.xml b/Cpop-System/pom.xml index 17ca185..5ba1d8e 100644 --- a/Cpop-System/pom.xml +++ b/Cpop-System/pom.xml @@ -19,10 +19,21 @@ com.cpop Cpop-Core + com.cpop Cpop-Api + + + com.tencentcloudapi + tencentcloud-sdk-java + + + + com.qcloud + cos_api + diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/BrandBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/BrandBo.java index 06a494c..42e8d75 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/BrandBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/BrandBo.java @@ -1,37 +1,108 @@ package com.cpop.system.business.bo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; import lombok.Data; - -import javax.validation.constraints.NotBlank; +import lombok.experimental.Accessors; /** * @author DB - * @createTime 2023/10/25 16:43 - * @description + * @since 2023/10/25 16:43 */ @Data -@ApiModel(value = "品牌参数") +@Accessors(chain = true) +@Schema(description = "品牌请求参数") public class BrandBo { /** * 主键 */ - @ApiModelProperty("主键") + @NotBlank(message = "主键不能为空") + @Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED) private String id; /** * 品牌名 */ - @NotBlank(message = "品牌不能为空") - @ApiModelProperty(value = "品牌名", required = true) + @NotBlank(message = "品牌名不能为空") + @Schema(description = "品牌名",requiredMode = Schema.RequiredMode.REQUIRED) private String brandName; /** - * 微信商户号 + * 负责人 */ - @ApiModelProperty(value = "微信商户号") - private String wxMchId; + @NotBlank(message = "负责人不能为空") + @Schema(description = "负责人",requiredMode = Schema.RequiredMode.REQUIRED) + private String personChargeName; + + /** + * 负责人手机号 + */ + @NotBlank(message = "负责人手机号不能为空") + @Schema(description = "负责人手机号",requiredMode = Schema.RequiredMode.REQUIRED) + private String personChargePhone; + + /** + * 经度 + */ + @NotBlank(message = "经度不能为空") + @Schema(description = "经度",requiredMode = Schema.RequiredMode.REQUIRED) + private String longitude; + + /** + * 纬度 + */ + @NotBlank(message = "纬度不能为空") + @Schema(description = "纬度",requiredMode = Schema.RequiredMode.REQUIRED) + private String latitude; + + /** + * 品牌地址 + */ + @NotBlank(message = "品牌地址不能为空") + @Schema(description = "品牌地址",requiredMode = Schema.RequiredMode.REQUIRED) + private String brandAddr; + + /** + * 总部营业执照地址 + */ + @NotBlank(message = "总部营业执照地址不能为空") + @Schema(description = "总部营业执照地址",requiredMode = Schema.RequiredMode.REQUIRED) + private String licenseAddr; + + /** + * 总部营业执照日期 + */ + @NotBlank(message = "总部营业执照日期不能为空") + @Schema(description = "总部营业执照日期",requiredMode = Schema.RequiredMode.REQUIRED) + private String licenseDate; + + /** + * 总部营业执照公司名 + */ + @NotBlank(message = "总部营业执照公司名不能为空") + @Schema(description = "总部营业执照公司名",requiredMode = Schema.RequiredMode.REQUIRED) + private String licenseFirmName; + + /** + * 总部营业执照法人名 + */ + @NotBlank(message = "总部营业执照法人名不能为空") + @Schema(description = "总部营业执照法人名",requiredMode = Schema.RequiredMode.REQUIRED) + private String licenseUsername; + + /** + * 营业执照社会信用代码 + */ + @NotBlank(message = "总部营业执照社会信用代码不能为空") + @Schema(description = "总部营业执照社会信用代码",requiredMode = Schema.RequiredMode.REQUIRED) + private String licenseCreditCode; + + /** + * 总部营业执照图片地址 + */ + @NotBlank(message = "总部营业执照图片地址不能为空") + @Schema(description = "总部营业执照图片地址",requiredMode = Schema.RequiredMode.REQUIRED) + private String licensePicUrl; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/ChangeWechatSharingBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/ChangeWechatSharingBo.java deleted file mode 100644 index 2a7089e..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/ChangeWechatSharingBo.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.cpop.system.business.bo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; - -/** - * @author DB - * @createTime 2023/11/15 11:52 - * @description - */ -@Data -@ApiModel(value = "微信分账相关参数") -public class ChangeWechatSharingBo implements Serializable { - - /** - * 品牌id - */ - @NotBlank(message = "不能为空") - @ApiModelProperty(value = "品牌id",required = true) - private String brandId; - - /** - * 是否开启分账 - */ - @NotNull(message = "是否开启分账不能为空") - @ApiModelProperty(value = "是否开启分账",required = true) - private Boolean isOpenSharing; -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/DictDataBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/DictDataBo.java index 6d034a6..3e50640 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/DictDataBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/DictDataBo.java @@ -1,13 +1,11 @@ package com.cpop.system.business.bo; -import com.mybatisflex.annotation.Id; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Data; import lombok.experimental.Accessors; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; /** * @author DB @@ -16,71 +14,71 @@ import javax.validation.constraints.NotNull; */ @Data @Accessors(chain = true) -@ApiModel(value = "字典数据参数") +@Schema(description = "字典数据参数") public class DictDataBo { /** * id */ - @ApiModelProperty("id") + @Schema(description = "id") private String id; /** * 排序 */ @NotNull(message = "排序不能为空") - @ApiModelProperty(value = "排序",required = true) + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) private Integer dictSort; /** * 字典标签 */ @NotBlank(message = "字典标签不能为空") - @ApiModelProperty(value = "字典标签",required = true) + @Schema(description = "字典标签", requiredMode = Schema.RequiredMode.REQUIRED) private String dictLabel; /** * 字典键值 */ @NotBlank(message = "字典键值不能为空") - @ApiModelProperty(value = "字典键值",required = true) + @Schema(description = "字典键值", requiredMode = Schema.RequiredMode.REQUIRED) private String dictValue; /** * 字典类型 */ @NotBlank(message = "字典类型不能为空") - @ApiModelProperty(value = "字典类型",required = true) + @Schema(description = "字典类型", requiredMode = Schema.RequiredMode.REQUIRED) private String dictType; /** * 样式属性(其他样式扩展) */ - @ApiModelProperty("样式属性(其他样式扩展)") + @Schema(description = "样式属性(其他样式扩展)") private String cssClass; /** * 表格回显样式 */ - @ApiModelProperty("表格回显样式") + @Schema(description = "表格回显样式") private String listClass; /** * 是否默认(1是 0否) */ - @ApiModelProperty("是否默认(1是 0否)") + @Schema(description = "是否默认(1是 0否)") private Boolean isDefault; /** * 状态(1正常 0停用) */ @NotNull(message = "状态不能为空") - @ApiModelProperty(value = "状态(1正常 0停用)",required = true) + @Schema(description = "状态(1正常 0停用)", requiredMode = Schema.RequiredMode.REQUIRED) private Boolean status; /** * 备注 */ - @ApiModelProperty("备注") + @Schema(description = "备注") private String remark; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/DictDataPageBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/DictDataPageBo.java index 86272f4..85b11fd 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/DictDataPageBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/DictDataPageBo.java @@ -1,7 +1,6 @@ package com.cpop.system.business.bo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -13,24 +12,24 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -@ApiModel(value = "字典数据分页参数") +@Schema(description = "字典数据分页参数") public class DictDataPageBo { /** * 字典标签 */ - @ApiModelProperty("字典标签") + @Schema(description = "字典标签") private String dictLabel; /** * 字典类型 */ - @ApiModelProperty("字典类型") + @Schema(description = "字典类型") private String dictType; /** * 字典状态 */ - @ApiModelProperty("字典状态") + @Schema(description = "字典状态") private Boolean status; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/DictTypeBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/DictTypeBo.java index 835631c..603b414 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/DictTypeBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/DictTypeBo.java @@ -1,13 +1,11 @@ package com.cpop.system.business.bo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Data; import lombok.experimental.Accessors; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; - /** * 字典类型参数 * @version 1.0.0 @@ -16,39 +14,39 @@ import javax.validation.constraints.NotNull; */ @Data @Accessors(chain = true) -@ApiModel(value = "字典类型参数") +@Schema(description = "字典类型参数") public class DictTypeBo { /** * 主键 */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") private String id; /** * 字典名 */ @NotBlank(message = "字典名不能为空") - @ApiModelProperty(value = "字典名",required = true) + @Schema(description = "字典名",requiredMode = Schema.RequiredMode.REQUIRED) private String dictName; /** * 字典类型 */ @NotBlank(message = "字典类型不能为空") - @ApiModelProperty(value = "字典类型",required = true) + @Schema(description = "字典类型",requiredMode = Schema.RequiredMode.REQUIRED) private String dictType; /** * 状态(0正常 1停用) */ @NotNull(message = "状态不能为空") - @ApiModelProperty(value = "状态(0正常 1停用)",required = true) + @Schema(description = "状态(0正常 1停用)",requiredMode = Schema.RequiredMode.REQUIRED) private Boolean status; /** * 备注 */ - @ApiModelProperty(value = "备注") + @Schema(description = "备注") private String remark; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuBo.java index 211c514..8a513b3 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuBo.java @@ -1,13 +1,11 @@ package com.cpop.system.business.bo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Data; import lombok.experimental.Accessors; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; import java.io.Serializable; @@ -19,98 +17,96 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -@ApiModel(value = "SysMenu对象", description = "系统菜单表") -public class MenuBo implements Serializable { - - private static final long serialVersionUID = 1L; +@Schema(description = "菜单对象") +public class MenuBo { /** * 菜单ID */ - @ApiModelProperty("菜单ID") + @Schema(description = "菜单ID") private String id; /** * 父级菜单ID */ - @ApiModelProperty("父级菜单ID") + @Schema(description = "父级菜单ID") private String parentMenu; /** * 菜单名称 */ - @ApiModelProperty("菜单名称") + @Schema(description = "菜单名称") private String name; /** * 菜单图标 */ - @ApiModelProperty(value = "菜单图标") + @Schema(description = "菜单图标") private String icon; /** * 菜单路由,父菜单为空 */ - @ApiModelProperty("菜单路由,父菜单为空") + @Schema(description = "菜单路由,父菜单为空") private String component; /** * 标记菜单的状态 0:禁用 1:启用(根据权限正常显示) */ @NotNull(message = "状态不能为空") - @ApiModelProperty(value = "标记菜单的状态 0:禁用 1:启用(根据权限正常显示)", required = true) + @Schema(description = "标记菜单的状态 0:禁用 1:启用(根据权限正常显示)", requiredMode = Schema.RequiredMode.REQUIRED) private Boolean status; /** * 菜单类型,0:目录,1:菜单,2:按钮 */ @NotNull(message = "菜单类型不能为空") - @ApiModelProperty(value = "菜单类型,0:目录,1:菜单,2:按钮", required = true) + @Schema(description = "菜单类型,0:目录,1:菜单,2:按钮", requiredMode = Schema.RequiredMode.REQUIRED) private Integer type; /** * 权限 */ - @ApiModelProperty("权限") + @Schema(description = "权限") private String permission; /** * 重定向路径,一级菜单有值 */ - @ApiModelProperty("重定向路径,一级菜单有值") + @Schema(description = "重定向路径,一级菜单有值") private String redirect; /** * 排序,值越小越靠前,一级菜单有值 */ @NotNull(message = "排序不能为空") - @ApiModelProperty(value = "排序,值越小越靠前,一级菜单有值", required = true) + @Schema(description = "排序,值越小越靠前,一级菜单有值", requiredMode = Schema.RequiredMode.REQUIRED) private Integer orderNo; /** * 路由地址 */ - @ApiModelProperty(value = "路由地址") + @Schema(description = "路由地址") private String path; /** * 标题 */ @NotBlank(message = "标题不能为空") - @ApiModelProperty(value = "标题", required = true) + @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED) private String title; /** * 隐藏菜单 */ - @ApiModelProperty("隐藏菜单") + @Schema(description = "隐藏菜单") private Boolean hideMenu; /** * 是否忽略KeepAlive缓存 */ @NotNull(message = "是否忽略KeepAlive缓存不能为空") - @ApiModelProperty("是否忽略KeepAlive缓存") + @Schema(description = "是否忽略KeepAlive缓存") private Boolean ignoreKeepAlive; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuListBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuListBo.java index 34fbb5b..c595fc5 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuListBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/MenuListBo.java @@ -1,7 +1,6 @@ package com.cpop.system.business.bo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -14,20 +13,18 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -@ApiModel(description = "菜单传入对象") -public class MenuListBo implements Serializable { - - private static final long serialVersionUID = 1L; +@Schema(description = "菜单传入对象") +public class MenuListBo { /** * 标题 */ - @ApiModelProperty(value = "标题") + @Schema(description = "标题") private String title; /** * 标记菜单的状态 0:禁用 1:启用(根据权限正常显示) */ - @ApiModelProperty(value = "标记菜单的状态 0:禁用 1:启用(根据权限正常显示)") + @Schema(description = "标记菜单的状态 0:禁用 1:启用(根据权限正常显示)") private Boolean status; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleBo.java index 68a94dd..f9e5e44 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleBo.java @@ -1,13 +1,11 @@ package com.cpop.system.business.bo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Data; import lombok.experimental.Accessors; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.io.Serializable; import java.util.List; /** @@ -18,55 +16,53 @@ import java.util.List; */ @Data @Accessors(chain = true) -@ApiModel(value = "SysRole对象", description = "系统角色表") -public class RoleBo implements Serializable { - - private static final long serialVersionUID = 1L; +@Schema(description = "角色对象") +public class RoleBo { /** * 主键 */ - @ApiModelProperty("主键") + @Schema(description = "主键") private String id; /** * 角色名称 */ @NotBlank(message = "角色名称不能为空") - @ApiModelProperty("角色名称") + @Schema(description = "角色名称") private String roleName; /** * 角色值 */ @NotBlank(message = "角色值不能为空") - @ApiModelProperty("角色值") + @Schema(description = "角色值") private String roleValue; /** * 状态 */ @NotNull(message = "状态不能为空") - @ApiModelProperty("状态") + @Schema(description = "状态") private Boolean status; /** * 备注 */ - @ApiModelProperty("备注") + @Schema(description = "备注") private String remark; /** * 排序 */ @NotNull(message = "排序不能为空") - @ApiModelProperty("排序") + @Schema(description = "排序") private Integer orderNo; /** * 菜单集合 */ - @ApiModelProperty("菜单集合") + @Schema(description = "菜单集合") private List menuIds; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/RolePageBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/RolePageBo.java index 050daa8..1a819c1 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/RolePageBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/RolePageBo.java @@ -1,34 +1,29 @@ package com.cpop.system.business.bo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; import java.io.Serializable; /** - * Description: - * date: 2023/5/9 13:58 - * - * @Author DB + * @since 2023/5/9 13:58 + * @author DB */ @Data @Accessors(chain = true) -@ApiModel(value = "SysRole分页对象") -public class RolePageBo implements Serializable { - - private static final long serialVersionUID = 1L; +@Schema(description = "SysRole分页对象") +public class RolePageBo { /** * 角色名称 */ - @ApiModelProperty("角色名称") + @Schema(description = "角色名称") private String roleName; /** * 状态 */ - @ApiModelProperty("状态") + @Schema(description = "状态") private Boolean status; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleStatusBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleStatusBo.java index e33c45b..a3c8948 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleStatusBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/RoleStatusBo.java @@ -1,12 +1,11 @@ package com.cpop.system.business.bo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; +import jakarta.validation.constraints.NotNull; import lombok.Data; import lombok.experimental.Accessors; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; import java.io.Serializable; /** @@ -17,22 +16,20 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -@ApiModel(value = "SysRole状态对象", description = "修改角色状态") -public class RoleStatusBo implements Serializable { - - private static final long serialVersionUID = 1L; +@Schema(description = "角色状态对象") +public class RoleStatusBo { /** * 主键 */ @NotBlank(message = "id不能为空") - @ApiModelProperty(value = "主键",required = true) + @Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED) private String id; /** * 状态 */ @NotNull(message = "状态不能为空") - @ApiModelProperty(value = "状态", required = true) + @Schema(description = "状态",requiredMode = Schema.RequiredMode.REQUIRED) private Boolean status; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreBo.java index 85c5c38..dba1a37 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreBo.java @@ -1,13 +1,10 @@ package com.cpop.system.business.bo; -import com.mybatisflex.annotation.Id; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; import lombok.Data; import lombok.experimental.Accessors; -import javax.validation.constraints.NotBlank; - /** * @author DB * @version 1.0.0 @@ -15,46 +12,84 @@ import javax.validation.constraints.NotBlank; */ @Data @Accessors(chain = true) -@ApiModel(value = "StoreBo对象") +@Schema(description = "StoreBo对象") public class StoreBo { /** - * 店铺/校区id + * 校区ID */ - @ApiModelProperty(value = "店铺/校区id") + @NotBlank(message = "校区ID不能为空") + @Schema(description = "校区ID",requiredMode = Schema.RequiredMode.REQUIRED) private String id; - /** - * 品牌id - */ - @ApiModelProperty(value = "品牌id") - private String brandId; - /** * 店铺/校区名 */ - @NotBlank(message = "不能为空") - @ApiModelProperty(value = "店铺/校区名",required = true) + @NotBlank(message = "店铺/校区名不能为空") + @Schema(description = "店铺/校区名",requiredMode = Schema.RequiredMode.REQUIRED) private String storeName; /** * 负责人 */ @NotBlank(message = "负责人不能为空") - @ApiModelProperty(value = "负责人",required = true) - private String personCharge; + @Schema(description = "负责人",requiredMode = Schema.RequiredMode.REQUIRED) + private String personChargeName; /** * 手机号 */ @NotBlank(message = "手机号不能为空") - @ApiModelProperty(value = "手机号",required = true) - private String phone; + @Schema(description = "手机号",requiredMode = Schema.RequiredMode.REQUIRED) + private String personChargePhone; /** - * 微信商户id + * 店铺/校区地址 */ - @ApiModelProperty(value = "微信商户id") - private String wxMchId; + @NotBlank(message = "店铺/校区地址不能为空") + @Schema(description = "店铺/校区地址",requiredMode = Schema.RequiredMode.REQUIRED) + private String storeAddr; + + /** + * 校区营业执照地址 + */ + @NotBlank(message = "校区营业执照地址不能为空") + @Schema(description = "校区营业执照地址",requiredMode = Schema.RequiredMode.REQUIRED) + private String licenseAddr; + + /** + * 校区营业执照日期 + */ + @NotBlank(message = "校区营业执照日期不能为空") + @Schema(description = "校区营业执照日期",requiredMode = Schema.RequiredMode.REQUIRED) + private String licenseDate; + + /** + * 总部营业执照社会信用代码 + */ + @NotBlank(message = "总部营业执照社会信用代码不能为空") + @Schema(description = "总部营业执照社会信用代码",requiredMode = Schema.RequiredMode.REQUIRED) + private String licenseCreditCode; + + /** + * 校区营业执照公司名 + */ + @NotBlank(message = "校区营业执照公司名不能为空") + @Schema(description = "校区营业执照公司名",requiredMode = Schema.RequiredMode.REQUIRED) + private String licenseFirmName; + + /** + * 校区营业执照法人名 + */ + @NotBlank(message = "校区营业执照法人名不能为空") + @Schema(description = "校区营业执照法人名",requiredMode = Schema.RequiredMode.REQUIRED) + private String licenseUsername; + + /** + * 校区营业执照图片地址 + */ + @NotBlank(message = "校区营业执照图片地址不能为空") + @Schema(description = "校区营业执照图片地址",requiredMode = Schema.RequiredMode.REQUIRED) + private String licensePicUrl; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreListByBrandBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreListByBrandBo.java deleted file mode 100644 index f5248ac..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreListByBrandBo.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.cpop.system.business.bo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.util.List; - -/** - * @author DB - * @version 1.0.0 - * @since 2023-12-07 17:51 - */ -@Data -@Accessors(chain = true) -@ApiModel(value = "StoreListByBrandBo对象") -public class StoreListByBrandBo { - - /** - * 品牌id集合 - */ - @ApiModelProperty("品牌id集合") - private List brandIds; -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/StorePageBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/StorePageBo.java deleted file mode 100644 index 911f530..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/StorePageBo.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * @Author: DB - * @Date: 2023-11-23 15:22:53 - * @Description: 请填写简介 - */ -package com.cpop.system.business.bo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.experimental.Accessors; -import java.io.Serializable; - -@Data -@Accessors(chain = true) -@ApiModel(value = "校区分页对象") -public class StorePageBo implements Serializable { - - /** - * 校区名 - */ - @ApiModelProperty("校区名") - private String name; -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRenewBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRenewBo.java deleted file mode 100644 index cc83d3b..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRenewBo.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.cpop.system.business.bo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.experimental.Accessors; -import org.springframework.format.annotation.DateTimeFormat; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.math.BigDecimal; -import java.time.LocalDate; - -/** - * @author DB - * @version 1.0.0 - * @since 2024-01-11 14:41 - */ -@Data -@Accessors(chain = true) -@ApiModel(value = "StoreRenewBo", description = "校区续费请求") -public class StoreRenewBo { - - /** - * 校区id - */ - @NotBlank(message = "校区id不能为空") - @ApiModelProperty(value = "校区id", required = true) - private String storeId; - - /** - * 续费金额 - */ - @ApiModelProperty(value = "续费金额") - private BigDecimal renewAmount = BigDecimal.ZERO; - - /** - * 续费日期 - */ - @DateTimeFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(value = "续费日期") - private LocalDate renewDate; - - /** - * 续费描述 - */ - @NotBlank(message = "续费描述不能为空") - @ApiModelProperty(value = "续费描述", required = true) - private String renewDesc; - - /** - * 附件 - */ - @NotBlank(message = "附件不能为空") - @ApiModelProperty(value = "附件", required = true) - private String annexUrl; - - /** - * 类型(0:续费;1:延期;2:激活) - */ - @NotNull(message = "类型不能为空") - @ApiModelProperty(value = "类型(0:续费;1:延期;2:激活)", required = true) - private Integer renewType; -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRunOffBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRunOffBo.java index 1410fa3..c4f6f68 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRunOffBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRunOffBo.java @@ -1,11 +1,10 @@ package com.cpop.system.business.bo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotBlank; import lombok.Data; import lombok.experimental.Accessors; -import javax.validation.constraints.NotBlank; /** * @author DB @@ -14,20 +13,20 @@ import javax.validation.constraints.NotBlank; */ @Data @Accessors(chain = true) -@ApiModel(value = "校区/店铺流失请求", description = "校区/店铺请求") +@Schema(description = "校区/店铺流失请求") public class StoreRunOffBo { /** * 主键 */ @NotBlank(message = "主键不能为空") - @ApiModelProperty(value = "主键",required = true) + @Schema(description = "主键",requiredMode = Schema.RequiredMode.REQUIRED) private String id; /** * 流失原因 */ @NotBlank(message = "流失原因不能为空") - @ApiModelProperty(value = "流失原因",required = true) + @Schema(description = "流失原因",requiredMode = Schema.RequiredMode.REQUIRED) private String runOffReason; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRenewPageBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreSignRenewPageBo.java similarity index 57% rename from Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRenewPageBo.java rename to Cpop-System/src/main/java/com/cpop/system/business/bo/StoreSignRenewPageBo.java index 9a5899e..464c169 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRenewPageBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreSignRenewPageBo.java @@ -1,15 +1,12 @@ package com.cpop.system.business.bo; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; import lombok.Data; import lombok.experimental.Accessors; import org.springframework.format.annotation.DateTimeFormat; -import javax.validation.constraints.NotNull; import java.time.LocalDate; -import java.util.List; /** * @author DB @@ -18,38 +15,40 @@ import java.util.List; */ @Data @Accessors(chain = true) -@ApiModel(value = "校区续费分页请求", description = "校区续费分页请求") -public class StoreRenewPageBo { +@Schema(description = "校区签约续费分页请求") +public class StoreSignRenewPageBo { /** * 校区地址或校区名模糊查询 */ - @ApiModelProperty(value = "校区地址或校区名模糊查询") + @Schema(description = "校区地址或校区名模糊查询") private String addrOrName; + /** * 品牌或校区名模糊查询 */ - @ApiModelProperty(value = "品牌或校区名模糊查询") + @Schema(description = "品牌或校区名模糊查询") private String brandOrStore; + /** * 0:待续费;1:已续费;2:已流失 */ @NotNull(message = "续费状态不能为空") - @ApiModelProperty(value = "续费状态",required = true) + @Schema(description = "续费状态",requiredMode = Schema.RequiredMode.REQUIRED) private Integer renewStatus; /** * 续费开始日期 */ @DateTimeFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(value = "续费开始日期") + @Schema(description = "续费开始日期") private LocalDate startDate; /** * 续费结束日期 */ @DateTimeFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(value = "续费结束日期") + @Schema(description = "续费结束日期") private LocalDate endDate; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRenewXmlBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreSignRenewXmlBo.java similarity index 56% rename from Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRenewXmlBo.java rename to Cpop-System/src/main/java/com/cpop/system/business/bo/StoreSignRenewXmlBo.java index fa8cae4..1bc682e 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreRenewXmlBo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/bo/StoreSignRenewXmlBo.java @@ -1,13 +1,10 @@ package com.cpop.system.business.bo; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; import org.springframework.format.annotation.DateTimeFormat; -import javax.validation.constraints.NotNull; import java.time.LocalDate; /** @@ -17,31 +14,31 @@ import java.time.LocalDate; */ @Data @Accessors(chain = true) -@ApiModel(value = "校区续费导出请求", description = "校区续费导出请求") -public class StoreRenewXmlBo { +@Schema(description = "校区签约续费导出请求") +public class StoreSignRenewXmlBo { /** * 校区地址或校区名模糊查询 */ - @ApiModelProperty(value = "校区地址或校区名模糊查询") + @Schema(description = "校区地址或校区名模糊查询") private String addrOrName; /** * 品牌或校区名模糊查询 */ - @ApiModelProperty(value = "品牌或校区名模糊查询") + @Schema(description = "品牌或校区名模糊查询") private String brandOrStore; /** * 续费结束日期 */ @DateTimeFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(value = "续费结束日期") + @Schema(description = "续费结束日期") private LocalDate startDate; /** * 续费开始日期 */ @DateTimeFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty(value = "续费开始日期") + @Schema(description = "续费开始日期") private LocalDate endDate; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/bo/SyncBrandAndStoreBo.java b/Cpop-System/src/main/java/com/cpop/system/business/bo/SyncBrandAndStoreBo.java deleted file mode 100644 index 65b0125..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/bo/SyncBrandAndStoreBo.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.cpop.system.business.bo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.sql.Date; - -/** - * @author DB - * @version 1.0.0 - * @since 2023-12-21 14:46 - */ -@Data -@ApiModel(value = "品牌与校区参数") -public class SyncBrandAndStoreBo { - - /** - * 品牌 - */ - @ApiModelProperty(value = "品牌") - private BrandInfo brandInfo; - - /** - * 校区 - */ - @ApiModelProperty(value = "校区") - private StoreInfo storeInfo; - - - /** - * 品牌信息 - */ - @Data - public static class BrandInfo { - - /** - * 云品牌id - */ - @ApiModelProperty(value = "云品牌id") - private String brandCloudId; - - /** - * 品牌名 - */ - @ApiModelProperty(value = "品牌名") - private String brandName; - } - - /** - * 校区信息 - */ - @Data - public static class StoreInfo { - - /** - * 云品牌id - */ - @ApiModelProperty(value = "云校区id") - private String storeCloudId; - - /** - * 店铺/校区名 - */ - @ApiModelProperty(value = "店铺/校区名") - private String storeName; - - /** - * 店铺/校区地址 - */ - @ApiModelProperty(value = "店铺/校区地址") - private String storeAddr; - - /** - * 负责人 - */ - @ApiModelProperty(value = "负责人") - private String personCharge; - - /** - * 手机号 - */ - @ApiModelProperty(value = "手机号") - private String phone; - - /** - * 营业执照地址 - */ - @ApiModelProperty(value = "营业执照地址") - private String licenseAddr; - - /** - * 营业执照日期 - */ - @ApiModelProperty(value = "营业执照日期") - private Date licenseDate; - - /** - * 营业执照公司名 - */ - @ApiModelProperty(value = "营业执照公司名") - private String licenseName; - - /** - * 营业执照证书码 - */ - @ApiModelProperty(value = "营业执照证书码") - private String licenseCode; - - /** - * 营业执照法人名 - */ - @ApiModelProperty(value = "营业执照法人名") - private String licenseUserName; - - /** - * 营业执照图片地址 - */ - @ApiModelProperty(value = "营业执照图片地址") - private String licensePicUrl; - - /** - * 经度 - */ - @ApiModelProperty(value = "经度") - private String longitude; - - /** - * 纬度 - */ - @ApiModelProperty(value = "纬度") - private String latitude; - } -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageBrandController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageBrandController.java index b1e94b3..b03beb9 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageBrandController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageBrandController.java @@ -1,17 +1,13 @@ package com.cpop.system.business.controller.backstage; -import com.cpop.api.cloudDb.core.dto.CloudBrandDto; -import com.cpop.api.cloudDb.handler.CloudBrandHandler; -import com.cpop.common.utils.bean.BeanUtils; import com.cpop.core.base.entity.R; -import com.cpop.core.utils.SpringUtils; +import com.cpop.core.utils.bean.BeanUtils; import com.cpop.system.business.bo.BrandBo; import com.cpop.system.business.vo.BrandPageVo; import com.mybatisflex.core.paginate.Page; -import com.mybatisflex.core.query.QueryWrapper; -import com.mybatisflex.core.row.Db; -import com.mybatisflex.core.row.Row; -import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; @@ -24,9 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired; import com.cpop.system.business.entity.Brand; import com.cpop.system.business.service.BrandService; import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; /** * 系统-品牌表 控制层。 @@ -35,7 +28,7 @@ import io.swagger.annotations.ApiParam; * @since 2023-10-25 */ @RestController -@Api(tags = "系统-品牌表接口") +@Tag(name = "品牌接口") @RequestMapping("/backstage/brand") public class BackstageBrandController { @@ -43,85 +36,74 @@ public class BackstageBrandController { private BrandService brandService; /** - * @descriptions 新增系统品牌 + * 新增品牌 * @author DB - * @date 2023/10/25 16:53 + * @since 2023/10/25 16:53 * @param bo 品牌参数 - * @return: com.cpop.core.base.entity.R + * @return com.cpop.core.base.entity.R */ @PostMapping("/insertSysBrand") - @ApiOperation("新增系统品牌") - public R insertSysBrand(@RequestBody @ApiParam("系统-品牌") @Validated BrandBo bo) { - Brand entity = BeanUtils.mapToClass(bo, Brand.class); - entity.setSourceType(SourceType.COMMON.toString()); - brandService.save(entity); - return R.ok(); + @Operation(summary = "新增品牌") + @Deprecated(since = "1.1.0") + public R insertSysBrand(@RequestBody @Parameter(description = "品牌") @Validated BrandBo bo) { + return R.fail("新增品牌接口已废弃"); } /** - * @descriptions 修改系统品牌 - * @author DB - * @date 2023/11/10 9:21 + * 修改品牌 + * * @param bo 品牌参数 - * @return: com.cpop.core.base.entity.R + * @return com.cpop.core.base.entity.R + * @author DB + * @since 2023/11/10 9:21 */ - @ApiOperation("修改系统品牌") + @Operation(summary = "修改品牌") @PutMapping("/updateSysBrand") - public R updateSysBrand(@RequestBody @ApiParam("系统-品牌") @Validated BrandBo bo) { + public R updateSysBrand(@RequestBody @Parameter(description = "品牌") @Validated BrandBo bo) { Brand entity = BeanUtils.mapToClass(bo, Brand.class); brandService.updateById(entity); - //获取云品牌拓展 - Row row = Db.selectOneByQuery("cp_j_brand_extend", QueryWrapper.create().where("brand_id = ?", bo.getId())); - if (row != null){ - CloudBrandDto cloudBrandDto = new CloudBrandDto(); - cloudBrandDto.setBrandCloudId(row.getString("brandCloudId")); - cloudBrandDto.setBrandName(bo.getBrandName()); - SpringUtils.getBean(CloudBrandHandler.class).updateBrand(cloudBrandDto); - } return R.ok(); } /** - * @descriptions 导入果酱品牌 + * 导入果酱品牌 * @author DB - * @date 2023/10/25 15:53 + * @since 2023/10/25 15:53 * @param brandId 果酱品牌信息 - * @return: boolean */ @PostMapping("/importJamboxBrand/{brandId}") - @ApiOperation("导入果酱品牌") + @Operation(summary = "导入果酱品牌") + @Deprecated(since = "1.1.0") public R importJamboxBrand(@PathVariable String brandId) { - brandService.importJamboxBrand(brandId); - return R.ok(); + return R.fail("导入果酱品牌接口已废弃"); } /** - * @descriptions 查询品牌分页列表 + * 查询品牌分页列表 * @author DB - * @date 2023/09/13 17:55 + * @since 2023/09/13 17:55 * @param brandName 请求参数 * @return com.cpop.core.base.entity.R> */ - @ApiOperation("查询品牌分页列表") + @Operation(summary = "查询品牌分页列表") @GetMapping("/getBrandPage") - @PreAuthorize("@aps.hasPermission('brandStore:brand:list')") public R> getBrandPageList(String brandName) { Page pageVo = brandService.getBrandPage(brandName); return R.ok(pageVo); } /** - * @descriptions 根据品牌id删除品牌 + * 根据品牌id删除品牌 * @author DB - * @date 2023/11/09 10:31 + * @since 2023/11/09 10:31 * @param id 主键 - * @return: com.cpop.core.base.entity.R + * @return com.cpop.core.base.entity.R */ - @ApiOperation("根据品牌id删除品牌") + @Operation(summary = "根据品牌id删除品牌") @DeleteMapping("/removeBrandById/{id}") + @Deprecated(since = "1.1.0") public R removeBrandById(@PathVariable String id) { - brandService.removeBrandById(id); - return R.ok(); + return R.fail("根据品牌id删除品牌接口已废弃"); } } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictDataController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictDataController.java index bdfd10c..d04267e 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictDataController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictDataController.java @@ -1,13 +1,16 @@ package com.cpop.system.business.controller.backstage; -import com.cpop.common.utils.bean.BeanUtils; import com.cpop.core.base.entity.R; +import com.cpop.core.utils.bean.BeanUtils; import com.cpop.system.business.bo.DictDataBo; import com.cpop.system.business.bo.DictDataPageBo; import com.cpop.system.business.vo.DictDataListVo; import com.cpop.system.business.vo.DictDataPageVo; import com.cpop.system.business.vo.DictDataVo; import com.mybatisflex.core.paginate.Page; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; @@ -20,9 +23,6 @@ import org.springframework.beans.factory.annotation.Autowired; import com.cpop.system.business.entity.DictData; import com.cpop.system.business.service.DictDataService; import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; import java.util.List; @@ -33,7 +33,7 @@ import java.util.List; * @since 2023-12-01 */ @RestController -@Api(tags = "系统-字典数据表接口") +@Tag(name = "字典数据接口") @RequestMapping("/backstage/dictData") public class BackstageDictDataController { @@ -48,8 +48,8 @@ public class BackstageDictDataController { * @return R> */ @GetMapping("/getDictDataPage") - @ApiOperation("获取字典数据分页") - public R> getDictDataPage(@ApiParam("查询参数") DictDataPageBo bo) { + @Operation(summary = "获取字典数据分页") + public R> getDictDataPage(DictDataPageBo bo) { Page page = dictDataService.getDictDataPage(bo); return R.ok(page); } @@ -62,8 +62,8 @@ public class BackstageDictDataController { * @return DictData */ @GetMapping("/getDictDataInfo/{id}") - @ApiOperation("根据主键获取字典数据详情") - public R getDictDataInfo(@PathVariable @ApiParam("字典数据code") String id) { + @Operation(summary = "根据主键获取字典数据详情") + public R getDictDataInfo(@PathVariable @Parameter(description = "字典数据主键") String id) { DictDataVo vo = dictDataService.getDictDataInfo(id); return R.ok(vo); } @@ -76,8 +76,8 @@ public class BackstageDictDataController { * @return R */ @GetMapping("/getDictDataByDictType/{dictType}") - @ApiOperation("根据字典类型获取字典数据") - public R> getDictDataByDictType(@PathVariable @ApiParam("字典数据code") String dictType) { + @Operation(summary = "根据字典类型获取字典数据") + public R> getDictDataByDictType(@PathVariable @Parameter(description = "字典数据类型") String dictType) { List dataList = dictDataService.getDictDataByDictType(dictType); return R.ok(BeanUtils.mapToList(dataList, DictDataListVo.class)); } @@ -90,8 +90,8 @@ public class BackstageDictDataController { * @return R */ @PostMapping("/insertDictData") - @ApiOperation("新增字典数据") - public R insertDictData(@RequestBody @ApiParam("字典数据") @Validated DictDataBo bo) { + @Operation(summary = "新增字典数据") + public R insertDictData(@RequestBody @Parameter(description = "字典数据") @Validated DictDataBo bo) { dictDataService.insertDictData(bo); return R.ok(); } @@ -104,8 +104,8 @@ public class BackstageDictDataController { * @return R */ @PutMapping("/updateDictData") - @ApiOperation("修改字典数据") - public R updateDictData(@RequestBody @ApiParam("字典数据") @Validated DictDataBo bo) { + @Operation(summary = "修改字典数据") + public R updateDictData(@RequestBody @Parameter(description = "字典数据") @Validated DictDataBo bo) { dictDataService.updateDictData(bo); return R.ok(); } @@ -118,7 +118,7 @@ public class BackstageDictDataController { * @return R */ @DeleteMapping("/removeDictData/{id}") - @ApiOperation("删除字典数据") + @Operation(summary = "删除字典数据") public R removeDictData(@PathVariable String id) { dictDataService.removeDictData(id); return R.ok(); diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictTypeController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictTypeController.java index 4c09dc4..834eb62 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictTypeController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageDictTypeController.java @@ -1,14 +1,18 @@ package com.cpop.system.business.controller.backstage; -import com.cpop.common.utils.bean.BeanUtils; +import cn.dev33.satoken.stp.StpUtil; import com.cpop.core.base.entity.R; +import com.cpop.core.base.enums.UserType; import com.cpop.core.base.exception.ServiceException; +import com.cpop.core.utils.bean.BeanUtils; import com.cpop.system.business.bo.DictTypeBo; import com.cpop.system.business.vo.DictTypePageVo; import com.cpop.system.business.vo.DictTypeVo; import com.mybatisflex.core.paginate.Page; import com.mybatisflex.core.query.QueryWrapper; -import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; @@ -21,9 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired; import com.cpop.system.business.entity.DictType; import com.cpop.system.business.service.DictTypeService; import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; import java.util.List; @@ -36,7 +37,7 @@ import static com.cpop.system.business.entity.table.DictTypeTableDef.DICT_TYPE; * @since 2023-12-01 */ @RestController -@Api(tags = "系统管理模块-字典类型接口") +@Tag(name = "字典类型接口") @RequestMapping("/backstage/dictType") public class BackstageDictTypeController { @@ -44,17 +45,16 @@ public class BackstageDictTypeController { private DictTypeService dictTypeService; /** - * 获取系统字典类型分页 + * 获取字典类型分页 * * @param dictName 字典名 - * @return R> + * @return R> * @author DB * @since 2023/12/01 */ - @PreAuthorize("@aps.hasPermission('system:dict:list')") @GetMapping("/getDictTypePage") - @ApiOperation("获取系统字典类型分页") - public R> getDictTypePage(@ApiParam(value = "字典名") String dictName) { + @Operation(summary = "获取字典类型分页") + public R> getDictTypePage(@Parameter(description = "字典名") String dictName) { Page page = dictTypeService.getDictTypePage(dictName); return R.ok(page); } @@ -68,8 +68,8 @@ public class BackstageDictTypeController { * @since 2023/12/01 */ @GetMapping("/getDictTypeInfo/{id}") - @ApiOperation("根据主键获取字典类型详情") - public R getDictTypeInfo(@PathVariable @ApiParam("字典类型主键") String id) { + @Operation(summary = "根据主键获取字典类型详情") + public R getDictTypeInfo(@PathVariable @Parameter(description = "字典类型主键") String id) { DictTypeVo dictType = dictTypeService.getOneAs(QueryWrapper.create().where(DICT_TYPE.ID.eq(id)), DictTypeVo.class); return R.ok(dictType); } @@ -83,14 +83,13 @@ public class BackstageDictTypeController { * @since 2023/12/01 */ @PostMapping("/insertDictType") - @ApiOperation("新增字典类型") + @Operation(summary = "新增字典类型") public R insertDictType(@Validated @RequestBody DictTypeBo bo) { if (!dictTypeService.checkDictTypeUnique(bo)) { throw new ServiceException("新增字典'" + bo.getDictName() + "'失败,字典类型已存在"); } - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); DictType dictType = BeanUtils.mapToClass(bo, DictType.class); - dictType.setUserType(loginUser.getUserType().toString()); + dictType.setUserType((UserType) StpUtil.getSession().get("userType")); dictTypeService.save(dictType); return R.ok(); } @@ -104,7 +103,7 @@ public class BackstageDictTypeController { * @since 2023/12/01 */ @PutMapping("/updateDictType") - @ApiOperation("修改字典类型") + @Operation(summary = "修改字典类型") public R updateDictType(@Validated @RequestBody DictTypeBo bo) { if (!dictTypeService.checkDictTypeUnique(bo)) { throw new ServiceException("修改字典'" + bo.getDictName() + "'失败,字典类型已存在"); @@ -122,8 +121,8 @@ public class BackstageDictTypeController { * @since 2023/12/01 */ @DeleteMapping("/removeById/{id}") - @ApiOperation("根据主键删除字典类型") - public R removeById(@PathVariable @ApiParam("字典类型主键") String id) { + @Operation(summary = "根据主键删除字典类型") + public R removeById(@PathVariable @Parameter(description = "字典类型主键") String id) { dictTypeService.removeDataAndCache(id); return R.ok(); } @@ -135,7 +134,7 @@ public class BackstageDictTypeController { * @author DB * @since 2023/12/01 */ - @ApiOperation("刷新字典缓存") + @Operation(summary = "刷新字典缓存") @PutMapping("/refreshCache") public R refreshCache() { dictTypeService.resetDictCache(); @@ -148,12 +147,11 @@ public class BackstageDictTypeController { * @since 2023/12/01 * @return R> */ - @ApiOperation("获取字典选择框列表") + @Operation(summary = "获取字典选择框列表") @GetMapping("/optionSelect") public R> optionSelect() { - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); List dictTypes = dictTypeService.queryChain() - .where(DICT_TYPE.USER_TYPE.eq(loginUser.getUserType().toString())) + .where(DICT_TYPE.USER_TYPE.eq(StpUtil.getSession().get("userType"))) .listAs(DictTypeVo.class); return R.ok(dictTypes); } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageLoginController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageLoginController.java index 4094c58..2229f64 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageLoginController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageLoginController.java @@ -1,15 +1,19 @@ package com.cpop.system.business.controller.backstage; +import cn.dev33.satoken.stp.StpUtil; import com.cpop.core.base.entity.R; +import com.cpop.core.base.enums.OperationLogEnum; +import com.cpop.core.constant.Constants; +import com.cpop.core.service.OperationLogService; +import com.cpop.core.utils.MessageUtils; +import com.cpop.core.utils.SpringUtils; import com.cpop.system.business.service.LoginService; import com.cpop.system.business.vo.LoginUserInfoVo; import com.cpop.system.business.vo.MenuRouteVo; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; 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 org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Set; @@ -19,7 +23,7 @@ import java.util.Set; * @createTime 2023/09/10 11:13 * @description 系统登陆 */ -@Api(tags = "通用系统登录模块") +@Tag(name = "系统登录模块") @RestController @RequestMapping("/backstage") public class BackstageLoginController { @@ -27,6 +31,20 @@ public class BackstageLoginController { @Autowired private LoginService loginService; + /** + * 系统注销 + * @author DB + * @since 2023/12/2 + * @return SaResult + */ + @Operation(summary="系统注销") + @GetMapping("/logout") + public R logout() { + SpringUtils.getBean(OperationLogService.class).insertOperationLog(Constants.SUCCESS, OperationLogEnum.SYSTEM_LOGOUT, StpUtil.getSession(), MessageUtils.message("i18n_operationLog_systemLogout")); + StpUtil.logout(); + return R.ok(); + } + /** * @author LOST.yuan * @Description 获取登录用户详情 @@ -34,18 +52,18 @@ public class BackstageLoginController { * @return {@link R} **/ @GetMapping("/getUserInfo") - @ApiOperation("获取登录用户详情") + @Operation(summary = "获取登录用户详情") public R getUserInfo() { return R.ok(loginService.getUserInfo()); } /** * @author LOST.yuan - * @Description 获取权限码 - * @date 14:52 2022/9/7 + * 获取权限码 + * @since 14:52 2022/9/7 * @return {@link List} **/ - @ApiOperation("获取权限码") + @Operation(summary = "获取权限码") @GetMapping("/getPermCode") public R> getPermCode(){ Set list = loginService.getPermCode(); @@ -54,11 +72,10 @@ public class BackstageLoginController { /** * @author LOST.yuan - * @Description 获取菜单列表 - * @date 14:52 2022/9/7 - * @return {@link R>} + * 获取菜单列表 + * @since 14:52 2022/9/7 **/ - @ApiOperation("获取菜单列表") + @Operation(summary = "获取菜单列表") @GetMapping("/getMenuList") public R> getMenuList(){ List list = loginService.getSysMenuList(); diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageMenuController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageMenuController.java index 4a6f6bc..bb37b8d 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageMenuController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageMenuController.java @@ -5,10 +5,9 @@ import com.cpop.system.business.bo.MenuBo; import com.cpop.system.business.bo.MenuListBo; import com.cpop.system.business.service.MenuService; import com.cpop.system.business.vo.MenuVo; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -21,7 +20,7 @@ import java.util.List; * @since 2023-10-19 */ @RestController -@Api(tags = "通用系统菜单表接口") +@Tag(name = "菜单接口") @RequestMapping("/backstage/menu") public class BackstageMenuController { @@ -29,14 +28,13 @@ public class BackstageMenuController { private MenuService menuService; /** - * @descriptions 获取系统菜单树列表 + * 获取系统菜单树列表 * @author DB - * @date 2023/09/07 15:48 + * @since 2023/09/07 15:48 * @param bo 请求参数 - * @return com.jambox.core.base.R> + * @return com.cpop.core.base.R> */ - @PreAuthorize("@aps.hasPermission('system:menu:list')") - @ApiOperation("获取系统菜单树列表") + @Operation(summary = "获取系统菜单树列表") @GetMapping("/getSysMenuTreeList") public R> getSysMenuTreeList(MenuListBo bo) { List list = menuService.getSysMenuTreeList(bo); @@ -44,12 +42,12 @@ public class BackstageMenuController { } /** - * @descriptions 获取目录与菜单树 + * 获取目录与菜单树 * @author DB - * @date 2023/09/07 17:41 - * @return com.jambox.core.base.R> + * @since 2023/09/07 17:41 + * @return com.cpop.core.base.R> */ - @ApiOperation("获取目录与菜单树") + @Operation(summary = "获取目录与菜单树") @GetMapping("/getDirectoryAndMenuTreeList") public R> getDirectoryAndMenuTreeList() { List list = menuService.getDirectoryAndMenuTreeList(); @@ -57,14 +55,13 @@ public class BackstageMenuController { } /** - * @descriptions 新增系统菜单 + * 新增菜单 * @author DB - * @date 2023/09/07 17:45 + * @since 2023/09/07 17:45 * @param bo 请求参数 - * @return com.jambox.core.base.R + * @return com.cpop.core.base.R */ - @PreAuthorize("@aps.hasPermission('system:menu:insert')") - @ApiOperation("新增系统菜单") + @Operation(summary = "新增菜单") @PostMapping("/insertSysMenu") public R insertSysMenu(@RequestBody @Validated MenuBo bo) { menuService.insertSysMenu(bo); @@ -72,13 +69,12 @@ public class BackstageMenuController { } /** - * @Description: 修改系统菜单表 + * 修改菜单 * @param bo 请求参数 - * @Author: DB - * @Date: 2023/5/10 16:01 + * @author DB + * @since 2023/5/10 16:01 **/ - @PreAuthorize("@aps.hasPermission('system:menu:update')") - @ApiOperation("修改系统菜单") + @Operation(summary = "修改菜单") @PutMapping("/updateSysMenu") public R updateSysMenu(@RequestBody @Validated MenuBo bo) { menuService.updateSysMenu(bo); @@ -86,13 +82,12 @@ public class BackstageMenuController { } /** - * @Description: 删除系统菜单表 + * 删除菜单 * @param id 主键id - * @Author: DB - * @Date: 2023/5/10 16:01 + * @author DB + * @since 2023/5/10 16:01 **/ - @PreAuthorize("@aps.hasPermission('system:menu:remove')") - @ApiOperation("删除系统菜单") + @Operation(summary = "删除菜单") @DeleteMapping("/removeSysMenu/{id}") public R removeSysMenu(@PathVariable String id) { menuService.removeSysMenu(id); diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageRoleController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageRoleController.java index 3283352..819a1c8 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageRoleController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageRoleController.java @@ -10,10 +10,9 @@ import com.cpop.system.business.service.RoleService; import com.cpop.system.business.vo.MenuVo; import com.cpop.system.business.vo.RolePageVo; import com.mybatisflex.core.paginate.Page; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -26,7 +25,7 @@ import java.util.List; * @since 2023-10-19 */ @RestController -@Api(tags = "系统角色表接口") +@Tag(name = "系统角色表接口") @RequestMapping("/backstage/role") public class BackstageRoleController { @@ -37,29 +36,27 @@ public class BackstageRoleController { private MenuService menuService; /** - * @descriptions 查询系统角色分页列表 + * 查询角色分页列表 * @author DB - * @date 2023/09/10 16:51 + * @since 2023/09/10 16:51 * @param bo 请求参数 * @return R> */ - @PreAuthorize("@aps.hasPermission('system:role:list')") - @ApiOperation("查询系统角色分页列表") + @Operation(summary = "查询角色分页列表") @GetMapping("/getSysRolePageList") public R> getSysRolePageList(RolePageBo bo) { - Page pageVo = roleService.getSysRolePageList(bo); + Page pageVo = roleService.getSysRolePage(bo); return R.ok(pageVo); } /** - * @descriptions 新增角色 + * 新增角色 * @author DB - * @date 2023/10/12 10:48 + * @since 2023/10/12 10:48 * @param bo 请求参数 - * @return: com.cpop.core.base.entity.R + * @return com.cpop.core.base.entity.R */ - @PreAuthorize("@aps.hasPermission('system:role:insert')") - @ApiOperation("新增角色") + @Operation(summary = "新增角色") @PostMapping("/insertSysRole") public R insertSysRole(@RequestBody @Validated RoleBo bo) { roleService.insertSysRole(bo); @@ -67,12 +64,11 @@ public class BackstageRoleController { } /** - * @Description: 获取系统菜单树列表 - * @return: R> - * @Author: DB - * @Date: 2023/5/10 14:39 + * 获取系统菜单树列表 + * @author DB + * @since 2023/5/10 14:39 **/ - @ApiOperation("获取菜单树列表") + @Operation(summary = "获取菜单树列表") @GetMapping("/getSysMenuTreeList") public R> getSysMenuTreeList() { MenuListBo menuListBo = new MenuListBo(); @@ -83,14 +79,13 @@ public class BackstageRoleController { } /** - * @descriptions 修改角色 + * 修改角色 * @author DB - * @date 2023/09/10 17:45 + * @since 2023/09/10 17:45 * @param bo 请求参数 * @return com.jambox.core.base.R */ - @PreAuthorize("@aps.hasPermission('system:role:update')") - @ApiOperation("修改角色") + @Operation(summary = "修改角色") @PutMapping("/updateSysRole") public R updateSysRole(@RequestBody @Validated RoleBo bo) { roleService.updateSysRole(bo); @@ -98,10 +93,13 @@ public class BackstageRoleController { } /** - * 删除系统角色表 + * 删除角色 + * @author DB + * @since 2024/4/17 + * @param id 主键 + * @return R */ - @PreAuthorize("@aps.hasPermission('system:role:remove')") - @ApiOperation("删除系统角色表") + @Operation(summary = "删除角色") @DeleteMapping("/removeSysRole/{id}") public R removeSysRole(@PathVariable String id) { roleService.removeSysRole(id); @@ -109,14 +107,13 @@ public class BackstageRoleController { } /** - * @Description: 设置角色状态 + * 设置角色状态 * @param bo 请求参数 - * @return: R - * @Author: DB - * @Date: 2023/5/9 14:13 + * @return R + * @author DB + * @since 2023/5/9 14:13 **/ - @PreAuthorize("@aps.hasPermission('system:role:update')") - @ApiOperation("设置角色状态") + @Operation(description = "设置角色状态") @PutMapping("/setSysRoleStatus") public R setSysRoleStatus(@RequestBody @Validated RoleStatusBo bo) { roleService.setSysRoleStatus(bo); diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreController.java index 8aa8050..572754a 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreController.java @@ -2,18 +2,16 @@ package com.cpop.system.business.controller.backstage; import com.cpop.core.base.entity.R; import com.cpop.system.business.bo.StoreBo; -import com.cpop.system.business.bo.StorePageBo; -import com.cpop.system.business.bo.StoreRenewBo; import com.cpop.system.business.service.StoreRenewService; import com.cpop.system.business.vo.StorePageVo; import com.mybatisflex.core.paginate.Page; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import org.springframework.beans.factory.annotation.Autowired; import com.cpop.system.business.service.StoreService; -import io.swagger.annotations.Api; /** * 系统-店铺/校区表 控制层。 @@ -22,7 +20,7 @@ import io.swagger.annotations.Api; * @since 2023-10-26 */ @RestController -@Api(tags = "系统-店铺/校区表接口") +@Tag(name = "系统-店铺/校区接口") @RequestMapping("/backstage/store") public class BackstageStoreController { @@ -34,16 +32,15 @@ public class BackstageStoreController { /** * 查询校区分页列表 - * @param bo 请求参数 - * @return R> + * @param name 校区名 + * @return R> * @author Administrator * @since 2023/6/7 0007 10:18 */ - @PreAuthorize("@aps.hasPermission('brandStore:store:list')") - @ApiOperation("查询校区分页列表") + @Operation(summary = "查询校区分页列表") @GetMapping("/getStorePage") - public R> getStorePage(StorePageBo bo) { - Page pageVo = storeService.getStorePage(bo); + public R> getStorePage(@RequestParam(required = false) @Parameter(description = "校区名") String name) { + Page pageVo = storeService.getStorePage(name); return R.ok(pageVo); } @@ -51,14 +48,13 @@ public class BackstageStoreController { * 校区续费 * @author DB * @since 2024/1/11 - * @param bo 请求参数 * @return R */ - @ApiOperation("校区续费") + @Deprecated(since = "1.1.0") + @Operation(summary = "校区续费") @PutMapping("/storeRenew") - public R storeRenew(@RequestBody @Validated StoreRenewBo bo) { - storeRenewService.storeRenew(bo); - return R.ok(); + public R storeRenew() { + return R.fail("校区续费接口已弃用"); } /** @@ -68,8 +64,9 @@ public class BackstageStoreController { * @param bo 请求参数 * @return R */ - @ApiOperation("更新校区") + @Operation(summary = "更新校区") @PutMapping("/updateStore") + @Deprecated(since = "1.1.0") public R updateStore(@RequestBody @Validated StoreBo bo) { storeService.updateStore(bo); return R.ok(); diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreSignController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreSignController.java index fc37dba..8004741 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreSignController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageStoreSignController.java @@ -2,23 +2,23 @@ package com.cpop.system.business.controller.backstage; import com.alibaba.excel.EasyExcel; import com.cpop.core.base.entity.R; -import com.cpop.system.business.bo.StoreRenewPageBo; -import com.cpop.system.business.bo.StoreRenewXmlBo; import com.cpop.system.business.bo.StoreRunOffBo; +import com.cpop.system.business.bo.StoreSignRenewPageBo; +import com.cpop.system.business.bo.StoreSignRenewXmlBo; import com.cpop.system.business.dto.StoreRenewDto; import com.cpop.system.business.service.StoreSignService; -import com.cpop.system.business.vo.StoreRenewPageVo; +import com.cpop.system.business.vo.StoreSignRenewPageVo; import com.mybatisflex.core.paginate.Page; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; -import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; /** * 校区-签约表 控制层。 @@ -27,24 +27,23 @@ import java.net.URLEncoder; * @since 2023-12-13 */ @RestController -@Api(tags = "校区签约续费接口") -@RequestMapping("/backstage/storeSign") +@Tag(name = "校区签约续费接口") +@RequestMapping("/backstage/storeSignRenew") public class BackstageStoreSignController { @Autowired private StoreSignService storeSignService; /** - * 分页查询校区续费 + * 获取校区签约续费分页 * @author DB - * @since 2023/12/14 - * @param bo 请求参数 - * @return Page + * @since 2024/3/7 + * @return R> */ - @GetMapping("/getStoreRenewPage") - @ApiOperation("分页查询校区续费") - public R> getStoreRenewPage(@ApiParam("分页信息") @Validated StoreRenewPageBo bo) { - Page page = storeSignService.getStoreRenewPage(bo); + @GetMapping("/getStoreSignRenewPage") + @Operation(summary = "获取校区签约续费分页") + public R> getStoreSignRenewPage(StoreSignRenewPageBo bo) { + Page page = storeSignService.getStoreSignRenewPage(bo); return R.ok(page); } @@ -56,29 +55,29 @@ public class BackstageStoreSignController { * @return R */ @PostMapping("/runOff") - @ApiOperation("机构流失") - public R runOff(@RequestBody @ApiParam("分页信息") @Validated StoreRunOffBo bo) { + @Operation(summary = "机构流失") + public R runOff(@RequestBody @Validated StoreRunOffBo bo) { storeSignService.runOff(bo); return R.ok(); } /** - * 获取已续费导出数据 + * 获取签约续费导出数据 * @author DB * @since 2023/12/14 * @param response 响应 * @param bo 请求参数 */ - @GetMapping("/getRenewXml") - @ApiOperation("获取已续费导出数据") - public void getRenewXml(HttpServletResponse response, @ApiParam("分页信息") @Validated StoreRenewXmlBo bo) throws IOException { + @PostMapping("/getSignRenewXml") + @Operation(summary = "获取签约续费导出数据") + public void getRenewXml(HttpServletResponse response, @RequestBody @Validated StoreSignRenewXmlBo bo) throws IOException { // 这里注意 有同学反应使用swagger 会导致各种问题,请直接用浏览器或者用postman response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); response.setCharacterEncoding("utf-8"); // 这里URLEncoder.encode可以防止中文乱码 当然和easyExcel没有关系 - String fileName = URLEncoder.encode("已续费数据", "UTF-8").replaceAll("\\+", "%20"); - response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); - EasyExcel.write(response.getOutputStream(), StoreRenewDto.class).sheet("记录").doWrite(storeSignService.getRenewXml(bo)); + String fileName = URLEncoder.encode("已续费数据", StandardCharsets.UTF_8).replaceAll("\\+", "%20"); + response.setHeader("Content-disposition", "attachment;filename*=" + fileName + ".xlsx"); + EasyExcel.write(response.getOutputStream(), StoreRenewDto.class).sheet("记录").doWrite(storeSignService.getSignRenewXml(bo)); } } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageSysCommonController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageSysCommonController.java index 3569ea8..fac104a 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageSysCommonController.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/controller/backstage/BackstageSysCommonController.java @@ -7,9 +7,10 @@ import com.cpop.core.utils.file.FileUploadUtils; import com.cpop.core.utils.file.FileUtils; import com.cpop.system.business.service.StoreService; import com.cpop.system.business.vo.SysFileVo; +import com.cpop.system.framework.handler.TencentCosHandler; import com.qcloud.cos.model.UploadResult; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; @@ -23,57 +24,22 @@ import org.springframework.web.multipart.MultipartFile; * @description 通用接口 */ @Slf4j -@Api(tags = "通用接口") +@Tag(name = "通用接口") @RestController @RequestMapping("/backstage/sysCommon") public class BackstageSysCommonController { - @Autowired - private ServerConfig serverConfig; - - @Autowired - private CpopConfig cpopConfig; - @Autowired private TencentCosHandler tencentCosHandler; - @Autowired - private StoreService storeService; - /** - * 通用上传请求(单个) - */ - @ApiOperation("通用上传请求(单个)") - @PostMapping("/upload") - public R uploadFile(MultipartFile file) { - try { - // 上传文件路径 - String filePath = cpopConfig.getUploadPath(); - // 上传并返回新文件名称 - String fileName = FileUploadUtils.getInstance().upload(filePath, file); - //强制将http变成https - //String https = serverConfig.getUrl().replace("http:", "https:"); - //String url = https + fileName; - String url = serverConfig.getUrl() + fileName; - SysFileVo sysFileVo = new SysFileVo(); - sysFileVo.setUrl(url) - .setFileName(fileName) - .setNewFileName(FileUtils.getInstance().getName(fileName)) - .setOriginalFilename(file.getOriginalFilename()); - return R.ok(sysFileVo); - } catch (Exception e) { - return R.fail(e.getMessage()); - } - } - - /** - * @descriptions cdn加速上传 + * cdn加速上传 * @author DB - * @date 2023/10/31 17:24 + * @since 2023/10/31 17:24 * @param file 文件 - * @return: com.cpop.core.base.entity.R + * @return com.jambox.core.base.R */ - @ApiOperation("cdn加速上传") + @Operation(summary = "cdn上传") @PostMapping("/cdnUpload") public R cdnUpload(MultipartFile file) { UploadResult uploadResult = tencentCosHandler.cdnUpload(file); diff --git a/Cpop-System/src/main/java/com/cpop/system/business/controller/mini/MiniSysCommonController.java b/Cpop-System/src/main/java/com/cpop/system/business/controller/mini/MiniSysCommonController.java deleted file mode 100644 index 64fff7f..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/controller/mini/MiniSysCommonController.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.cpop.system.business.controller.mini; - -import com.cpop.core.base.entity.R; -import com.cpop.system.business.bo.SyncBrandAndStoreBo; -import com.cpop.system.business.service.StoreService; -import com.qcloud.cos.model.UploadResult; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - * @author DB - * @createTime 2023/09/13 15:10 - * @description 通用接口 - */ -@Slf4j -@Api(tags = "通用接口") -@RestController -@RequestMapping("/mini/sysCommon") -public class MiniSysCommonController { - - @Autowired - private StoreService storeService; - - /** - * 小程序同步品牌和校区 - * @author DB - * @since 2023/12/21 - * @param bo 请求参数 - * @return R - */ - @Deprecated - @ApiOperation("小程序同步品牌和校区") - @PostMapping("/miniSyncBrandAndStore") - public R miniSyncBrandAndStore(@RequestBody SyncBrandAndStoreBo bo) { - storeService.miniSyncBrandAndStore(bo); - return R.ok(); - } -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/dto/BizLicenseOcrDto.java b/Cpop-System/src/main/java/com/cpop/system/business/dto/BizLicenseOcrDto.java new file mode 100644 index 0000000..0035bc3 --- /dev/null +++ b/Cpop-System/src/main/java/com/cpop/system/business/dto/BizLicenseOcrDto.java @@ -0,0 +1,47 @@ +package com.cpop.system.business.dto; + +import com.alibaba.fastjson2.annotation.JSONField; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +/** + * @author DB + * @version 1.0.0 + * @since 2024-03-01 16:05 + */ +@Data +@Accessors(chain = true) +@Schema(description = "营业执照返回对象") +public class BizLicenseOcrDto { + + /** + * 营业执照地址 + */ + @JSONField(name = "Address") + private String licenseAddr; + + /** + * 营业执照日期 + */ + @JSONField(name = "Period") + private String licenseDate; + + /** + * 营业执照公司名 + */ + @JSONField(name = "Name") + private String licenseFirmName; + + /** + * 营业执照法人名 + */ + @JSONField(name = "Person") + private String licenseUsername; + + /** + * 营业执照社会信用代码 + */ + @JSONField(name = "RegNum") + private String licenseCreditCode; +} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/dto/StoreRenewDto.java b/Cpop-System/src/main/java/com/cpop/system/business/dto/StoreRenewDto.java index 865e34f..befdea8 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/dto/StoreRenewDto.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/dto/StoreRenewDto.java @@ -1,16 +1,11 @@ package com.cpop.system.business.dto; import com.alibaba.excel.annotation.ExcelProperty; -import com.alibaba.excel.annotation.format.DateTimeFormat; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import org.springframework.security.core.parameters.P; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; -import java.time.OffsetDateTime; /** * @author DB diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/Brand.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/Brand.java index 7c56640..cb1a1eb 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/Brand.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/entity/Brand.java @@ -8,8 +8,6 @@ import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; import java.io.Serializable; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import lombok.*; import lombok.experimental.Accessors; @@ -20,12 +18,12 @@ import lombok.experimental.Accessors; * @since 2023-10-25 */ @Data -@EqualsAndHashCode(callSuper=false) +@EqualsAndHashCode(callSuper = false) @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) -@Table(value = "cp_sys_brand", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) +@Table(value = "j_sys_brand", dataSource = "jambox", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) public class Brand extends BaseEntity implements Serializable { /** @@ -39,20 +37,150 @@ public class Brand extends BaseEntity implements Serializable { */ private String brandName; + /** + * 品牌logo + */ + private String brandLogo; + + /** + * 品牌名简称 + */ + private String simpleBrandName; + /** * 微信商户号 */ private String wxMchId; /** - * 数据来源 + * 微信商户名称 */ - private String sourceType; + private String wxMchName; /** - * 是否开通分账 + * 微信商户管理员 */ - private Boolean isOpenSharing; + private String wxMchAdmin; + + /** + * 授权产品(0:商城;1:先学后付次付;2:先学后付月付;3:一次性支付) + */ + private Integer authProduct; + + /** + * 小程序名 + */ + private String wxMiniName; + + /** + * 负责人 + */ + private String personChargeName; + + /** + * 负责人手机号 + */ + private String personChargePhone; + + /** + * 品牌横图 + */ + private String brandHorizontalGraph; + + /** + * 品牌长图 + */ + private String brandLongChart; + + /** + * 主色系 + */ + private String mainColor; + + /** + * 副色系 + */ + private String secondaryColor; + + /** + * 管理模式(0:全直营;1:直营+加盟;2:全加盟) + */ + private Integer manageType; + + /** + * 省 + */ + private String province; + + /** + * 市 + */ + private String city; + + /** + * 区 + */ + private String region; + + /** + * 经度 + */ + private String longitude; + + /** + * 纬度 + */ + private String latitude; + + /** + * 品牌地址 + */ + private String brandAddr; + + /** + * 品牌学员端二维码 + */ + private String brandWxQr; + + /** + * 总部营业执照地址 + */ + private String licenseAddr; + + /** + * 总部营业执照社会信用代码 + */ + private String licenseCreditCode; + + /** + * 总部营业执照日期 + */ + private String licenseDate; + + /** + * 总部营业执照公司名 + */ + private String licenseFirmName; + + /** + * 总部公司属性(0:个体;1:企业) + */ + private Boolean licenseStats; + + /** + * 总部营业执照法人名 + */ + private String licenseUsername; + + /** + * 总部营业执照图片地址 + */ + private String licensePicUrl; + + /** + * 是否首次登录 + */ + private Boolean perfectInformation; /** * 逻辑删除(0否1是) diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/DictData.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/DictData.java index 6fe57f6..18dbbfb 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/DictData.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/entity/DictData.java @@ -3,12 +3,10 @@ package com.cpop.system.business.entity; import com.cpop.core.base.entity.BaseEntity; import com.cpop.core.base.entity.BaseInsertListener; import com.cpop.core.base.entity.BaseUpdateListener; +import com.cpop.core.base.enums.UserType; import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import lombok.*; import lombok.experimental.Accessors; @@ -81,6 +79,6 @@ public class DictData extends BaseEntity implements Serializable { /** * 用户类型 */ - private String userType; + private UserType userType; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/DictType.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/DictType.java index 047c40c..00868b1 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/DictType.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/entity/DictType.java @@ -3,12 +3,10 @@ package com.cpop.system.business.entity; import com.cpop.core.base.entity.BaseEntity; import com.cpop.core.base.entity.BaseInsertListener; import com.cpop.core.base.entity.BaseUpdateListener; +import com.cpop.core.base.enums.UserType; import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import lombok.*; import lombok.experimental.Accessors; @@ -56,6 +54,6 @@ public class DictType extends BaseEntity implements Serializable { /** * 用户类型 */ - private String userType; + private UserType userType; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/Menu.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/Menu.java index 8189150..1209305 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/Menu.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/entity/Menu.java @@ -3,6 +3,7 @@ package com.cpop.system.business.entity; import com.cpop.core.base.entity.BaseEntity; import com.cpop.core.base.entity.BaseInsertListener; import com.cpop.core.base.entity.BaseUpdateListener; +import com.cpop.core.base.enums.UserType; import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; import lombok.*; @@ -99,6 +100,6 @@ public class Menu extends BaseEntity implements Serializable { /** * 菜单模块 */ - private String userType; + private UserType userType; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/ProfitSharing.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/ProfitSharing.java index 05474a8..952dbc3 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/ProfitSharing.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/entity/ProfitSharing.java @@ -7,9 +7,6 @@ import com.mybatisflex.annotation.Column; import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import lombok.*; import lombok.experimental.Accessors; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/Role.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/Role.java index 8412f09..ab7403a 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/Role.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/entity/Role.java @@ -7,9 +7,6 @@ import com.cpop.core.base.enums.UserType; import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import lombok.*; import lombok.experimental.Accessors; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/RoleMenu.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/RoleMenu.java index c1b2b22..b507c3b 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/RoleMenu.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/entity/RoleMenu.java @@ -3,12 +3,8 @@ package com.cpop.system.business.entity; import com.cpop.core.base.entity.BaseEntity; import com.cpop.core.base.entity.BaseInsertListener; import com.cpop.core.base.entity.BaseUpdateListener; -import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import lombok.*; import lombok.experimental.Accessors; diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/Store.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/Store.java index 348eccb..5dce3b8 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/Store.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/entity/Store.java @@ -23,7 +23,7 @@ import java.io.Serializable; @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) -@Table(value = "cp_sys_store", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) +@Table(value = "j_sys_store", dataSource = "jambox", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) public class Store extends BaseEntity implements Serializable { /** @@ -32,55 +32,50 @@ public class Store extends BaseEntity implements Serializable { @Id private String id; + /** + * 品牌id + */ + private String brandId; + /** * 店铺/校区名 */ private String storeName; + /** + * 负责人 + */ + private String personChargeName; + + /** + * 手机号 + */ + private String personChargePhone; + /** * 店铺/校区地址 */ private String storeAddr; /** - * 负责人 + * 校区横图 */ - private String personCharge; + private String storeHorizontalGraph; /** - * 手机号 + * 省 */ - private String phone; + private String province; /** - * 是否有顾问 + * 市 */ - private Boolean haveCounselor; + private String city; /** - * 是否激活 + * 区 */ - private Boolean haveActive; - - /** - * 品牌id - */ - private String brandId; - - /** - * 来源 - */ - private String sourceType; - - /** - * 是否是测试 - */ - private Boolean isTest; - - /** - * 微信商户id - */ - private String wxMchId; + private String region; /** * 经度 @@ -93,9 +88,164 @@ public class Store extends BaseEntity implements Serializable { private String latitude; /** - * 签约id + * 校区营业执照地址 */ - private String signId; + private String licenseAddr; + + /** + * 校区营业执照日期 + */ + private String licenseDate; + + /** + * 总部营业执照社会信用代码 + */ + private String licenseCreditCode; + + /** + * 校区营业执照公司名 + */ + private String licenseFirmName; + + /** + * 校区公司属性(0:个体;1:企业) + */ + private Boolean licenseStats; + + /** + * 校区营业执照法人名 + */ + private String licenseUsername; + + /** + * 校区营业执照图片地址 + */ + private String licensePicUrl; + + /** + * 微信商户名称 + */ + private String wxMchName; + + /** + * 微信商户号 + */ + private String wxMchId; + + /** + * 微信商户管理员 + */ + private String wxMchAdmin; + + /** + * 授权产品(0:商城;1:先学后付次付;2:先学后付月付;3:一次性支付) + */ + private Integer authProduct; + + /** + * 校区学员端二维码 + */ + private String storeWxQr; + + /** + * 合约内容 + */ + private String contractContent; + + /** + * 合约签名 + */ + private String contractSign; + + /** + * 开启课卡权益审批 + */ + private Boolean openCardEquityAudit; + + /** + * 开启账单变动审核 + */ + private Boolean openBillChangeAudit; + + /** + * 预创建员工权限组 + */ + private Boolean preCreateStaffPermissionGroup; + + /** + * 创建课卡类型 + */ + private Boolean preCreateCardType; + + /** + * 预创建客户类型 + */ + private Boolean preCreateCustomerType; + + /** + * 开启预约人数隐藏 + */ + private Boolean openPreCustomerNumHide; + + /** + * 开启金额隐藏 + */ + private Boolean openAmountHide; + + /** + * 开启预约排队功能 + */ + private Boolean openPreQueue; + + /** + * 开启按课次课消 + */ + private Boolean openClassTimeConsume; + + /** + * 开启自动复制课表 + */ + private Boolean openAutoCopyClassSchedule; + + /** + * 课前可预约时间 + */ + private Integer beforeClassCourseReservationTime; + + /** + * 课前不可预约时间 + */ + private Integer beforeClassNotCourseReservationTime; + + /** + * 课前取消预约时间 + */ + private Integer beforeClassCancelCourseReservationTime; + + /** + * 课前请假时间 + */ + private Integer beforeClassLeaveTime; + + /** + * 新课卡默认缓存时间 + */ + private Integer newClassCardBufferTime; + + /** + * 品牌预设模板id + */ + private String brandPreinstallTemplateId; + + /** + * 是否首次登录 + */ + private Boolean perfectInformation; + + /** + * 授权微信商户(使用品牌绑定的微信商户) + */ + private Boolean authWxMch; /** * 逻辑删除(0否1是) diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreLicense.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreLicense.java deleted file mode 100644 index db9cc2e..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreLicense.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.cpop.system.business.entity; - -import com.cpop.core.base.entity.BaseEntity; -import com.cpop.core.base.entity.BaseInsertListener; -import com.cpop.core.base.entity.BaseUpdateListener; -import com.mybatisflex.annotation.Column; -import com.mybatisflex.annotation.Id; -import com.mybatisflex.annotation.Table; -import java.io.Serializable; -import java.sql.Date; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.*; -import lombok.experimental.Accessors; - -/** - * 校区/店铺营业执照 实体类。 - * - * @author DB - * @since 2023-12-12 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@Builder -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@Table(value = "cp_sys_store_license", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) -public class StoreLicense extends BaseEntity implements Serializable { - - /** - * 营业执照主键 - */ - @Id - private String id; - - /** - * 校区/店铺id - */ - private String storeId; - - /** - * 营业执照地址 - */ - private String licenseAddr; - - /** - * 营业执照日期 - */ - private Date licenseDate; - - /** - * 营业执照公司名 - */ - private String licenseName; - - /** - * 营业执照证书码 - */ - private String licenseCode; - - /** - * 营业执照法人名 - */ - private String licenseUserName; - - /** - * 营业执照图片地址 - */ - private String licensePicUrl; - - - - - - /** - * 逻辑删除(0否1是) - */ - @Column(isLogicDelete = true) - private Boolean isDelete; - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreRenew.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreRenew.java index 954e95b..83b6710 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreRenew.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreRenew.java @@ -8,11 +8,8 @@ import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; import java.io.Serializable; import java.math.BigDecimal; -import java.sql.Date; import java.time.LocalDate; import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import lombok.*; import lombok.experimental.Accessors; @@ -23,12 +20,12 @@ import lombok.experimental.Accessors; * @since 2023-12-14 */ @Data -@EqualsAndHashCode(callSuper=false) +@EqualsAndHashCode(callSuper = false) @Builder @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) -@Table(value = "cp_sys_store_renew", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) +@Table(value = "j_sys_store_renew", dataSource = "jambox", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) public class StoreRenew extends BaseEntity implements Serializable { /** @@ -37,41 +34,40 @@ public class StoreRenew extends BaseEntity implements Serializable { @Id private String id; + /** + * 订单id + */ + private String orderId; + /** * 校区id */ - @Id private String storeId; /** - * 续费金额 + * 生效版本 */ - private BigDecimal renewAmount; + private String takeEffectVersion; /** - * 续费人 + * 生效时间 */ - private String renewStaffId; + private LocalDateTime takeEffectTime; /** - * 续费日期 + * 到期日期 */ - private LocalDate renewDate; + private LocalDate expireDate; /** - * 续费描述 + * 版本描述 */ - private String renewDesc; + private String versionDesc; /** - * 附件 + * 金额 */ - private String annexUrl; - - /** - * 类型(0:续费;1:延期) - */ - private Integer renewType; + private BigDecimal amount; /** * 逻辑删除(0否1是) diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreSign.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreSign.java index b58fcba..bf68d6c 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreSign.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/entity/StoreSign.java @@ -7,11 +7,7 @@ import com.mybatisflex.annotation.Column; import com.mybatisflex.annotation.Id; import com.mybatisflex.annotation.Table; import java.io.Serializable; -import java.sql.Date; import java.time.LocalDate; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import lombok.*; import lombok.experimental.Accessors; @@ -27,7 +23,7 @@ import lombok.experimental.Accessors; @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) -@Table(value = "cp_sys_store_sign", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) +@Table(value = "j_sys_store_sign", dataSource = "jambox", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) public class StoreSign extends BaseEntity implements Serializable { /** @@ -41,6 +37,11 @@ public class StoreSign extends BaseEntity implements Serializable { */ private String storeId; + /** + * 签约状态(0:未签约;1:已签约;2:已过期) + */ + private Integer signStatus; + /** * 到期日期 */ diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/WxPayScore.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/WxPayScore.java deleted file mode 100644 index 834273c..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/WxPayScore.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.cpop.system.business.entity; - -import com.cpop.core.base.entity.BaseEntity; -import com.cpop.core.base.entity.BaseInsertListener; -import com.cpop.core.base.entity.BaseUpdateListener; -import com.mybatisflex.annotation.Column; -import com.mybatisflex.annotation.Id; -import com.mybatisflex.annotation.Table; -import lombok.*; -import lombok.experimental.Accessors; - -import java.io.Serializable; - -/** - * 微信支付分计划表 实体类。 - * - * @author DB - * @since 2024-01-08 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@Builder -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@Table(value = "cp_sys_wx_pay_score", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) -public class WxPayScore extends BaseEntity implements Serializable { - - /** - * 主键 - */ - @Id - private String id; - - /** - * 外部计划id - */ - private String outPlanId; - - /** - * 签约账号信息 - */ - private String signAccount; - - /** - * 计划名 - */ - private String planName; - - /** - * 支付分计划有效期(单位天) - */ - private Integer planDuration; - - /** - * 支付分计划扣费次数 - */ - private Integer deductionQuantity; - - /** - * 支付分计划原总金额(单位分) - */ - private Integer totalOriginalPrice; - - /** - * 支付分计划实际扣费总金额(单位分) - */ - private Integer totalActualPrice; - - /** - * 计划来源 - */ - private String planSource; - - /** - * 课次 - */ - private String classHour; - - /** - * 逻辑删除(0否1是) - */ - @Column(isLogicDelete = true) - private Boolean isDelete; - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/entity/WxPayScoreDetail.java b/Cpop-System/src/main/java/com/cpop/system/business/entity/WxPayScoreDetail.java deleted file mode 100644 index e35cfa9..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/entity/WxPayScoreDetail.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.cpop.system.business.entity; - -import com.cpop.core.base.entity.BaseEntity; -import com.cpop.core.base.entity.BaseInsertListener; -import com.cpop.core.base.entity.BaseUpdateListener; -import com.mybatisflex.annotation.Column; -import com.mybatisflex.annotation.Id; -import com.mybatisflex.annotation.Table; -import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.*; -import lombok.experimental.Accessors; - -/** - * 微信支付分计划详情表 实体类。 - * - * @author DB - * @since 2024-01-08 - */ -@Data -@EqualsAndHashCode(callSuper=false) -@Builder -@NoArgsConstructor -@AllArgsConstructor -@Accessors(chain = true) -@Table(value = "cp_sys_wx_pay_score_detail", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false) -public class WxPayScoreDetail extends BaseEntity implements Serializable { - - /** - * 主键 - */ - @Id - private String id; - - /** - * 系统微信支付分id - */ - @Id - private String sysWxPayScoreId; - - /** - * 计划详情编号 - */ - private Integer planDetailNo; - - /** - * 计划明细原支付金额(单位分) - */ - private Integer originalPrice; - - /** - * 计划明细实际支付金额(单位分) - */ - private Long actualPrice; - - /** - * 计划明细优惠说明 - */ - private String planDiscountDescription; - - /** - * 计划明细名称 - */ - private String planDetailName; - - /** - * 逻辑删除(0否1是) - */ - @Column(isLogicDelete = true) - private Boolean isDelete; - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreLicenseMapper.java b/Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreLicenseMapper.java deleted file mode 100644 index 30b4c4f..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/mapper/StoreLicenseMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.cpop.system.business.mapper; - -import com.mybatisflex.core.BaseMapper; -import com.cpop.system.business.entity.StoreLicense; - -/** - * 校区/店铺营业执照 映射层。 - * - * @author DB - * @since 2023-12-12 - */ -public interface StoreLicenseMapper extends BaseMapper { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/mapper/WxPayScoreDetailMapper.java b/Cpop-System/src/main/java/com/cpop/system/business/mapper/WxPayScoreDetailMapper.java deleted file mode 100644 index b9098cb..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/mapper/WxPayScoreDetailMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.cpop.system.business.mapper; - -import com.mybatisflex.core.BaseMapper; -import com.cpop.system.business.entity.WxPayScoreDetail; - -/** - * 微信支付分计划详情表 映射层。 - * - * @author DB - * @since 2024-01-08 - */ -public interface WxPayScoreDetailMapper extends BaseMapper { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/mapper/WxPayScoreMapper.java b/Cpop-System/src/main/java/com/cpop/system/business/mapper/WxPayScoreMapper.java deleted file mode 100644 index 30275ee..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/mapper/WxPayScoreMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.cpop.system.business.mapper; - -import com.mybatisflex.core.BaseMapper; -import com.cpop.system.business.entity.WxPayScore; - -/** - * 微信支付分计划表 映射层。 - * - * @author DB - * @since 2024-01-08 - */ -public interface WxPayScoreMapper extends BaseMapper { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/BrandService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/BrandService.java index 00aebfd..8711c5a 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/BrandService.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/BrandService.java @@ -14,30 +14,12 @@ import com.cpop.system.business.entity.Brand; public interface BrandService extends IService { /** - * @descriptions 导入果酱品牌 + * 查询品牌分页列表 * @author DB - * @date 2023/10/25 15:54 - * @param brandId 果酱品牌id - * @return: void - */ - void importJamboxBrand(String brandId); - - /** - * @descriptions 查询品牌分页列表 - * @author DB - * @date 2023/10/25 17:32 + * @since 2023/10/25 17:32 * @param brandName 请求参数 - * @return: com.mybatisflex.core.paginate.Page + * @return com.mybatisflex.core.paginate.Page */ Page getBrandPage(String brandName); - /** - * @descriptions 根据品牌id删除品牌 - * @author DB - * @date 2023/11/09 10:34 - * @param id 主键 - * @return: void - */ - void removeBrandById(String id); - } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/LoginService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/LoginService.java index 0d3c67a..7dac208 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/LoginService.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/LoginService.java @@ -8,6 +8,7 @@ import java.util.Set; /** * 系统登陆 + * @author Lost */ public interface LoginService { diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/MenuService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/MenuService.java index bfefb95..84f3ba0 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/MenuService.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/MenuService.java @@ -19,51 +19,48 @@ public interface MenuService extends IService { /** - * @descriptions 获取菜单路由 + * 获取菜单路由 * @author DB - * @date 2023/10/19 16:32 - * @return: java.util.List + * @since 2023/10/19 16:32 */ List getSysMenuList(); /** - * @descriptions 获取系统菜单树列表 + * 获取系统菜单树列表 * @author DB - * @date 2023/09/07 15:53 + * @since 2023/09/07 15:53 * @param bo 请求参数 - * @return java.util.List */ List getSysMenuTreeList(MenuListBo bo); /** - * @descriptions 获取目录与菜单树 + * 获取目录与菜单树 * @author DB - * @date 2023/09/07 17:42 - * @return java.util.List + * @since 2023/09/07 17:42 */ List getDirectoryAndMenuTreeList(); /** - * @descriptions 新增系统菜单 + * 新增菜单 * @author DB - * @date 2023/09/07 17:50 + * @since 2023/09/07 17:50 * @param bo 请求参数 */ void insertSysMenu(MenuBo bo); /** - * @Description: 修改系统菜单表 + * 修改菜单 * @param bo 请求参数 - * @Author: DB - * @Date: 2023/5/10 16:01 + * @author DB + * @since 2023/5/10 16:01 **/ void updateSysMenu(MenuBo bo); /** - * @Description: 删除系统菜单表 + * 删除菜单 * @param id 主键id - * @Author: DB - * @Date: 2023/5/10 16:01 + * @author DB + * @since 2023/5/10 16:01 **/ void removeSysMenu(String id); } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/RoleService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/RoleService.java index bc6019a..7a29688 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/RoleService.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/RoleService.java @@ -17,48 +17,44 @@ import com.cpop.system.business.entity.Role; public interface RoleService extends IService { /** - * @descriptions + * 查询角色分页列表 * @author DB - * @date 2023/10/19 17:13 + * @since 2023/09/10 16:51 * @param bo 请求参数 - * @return: com.mybatisflex.core.paginate.Page + * @return R> */ - Page getSysRolePageList(RolePageBo bo); + Page getSysRolePage(RolePageBo bo); /** - * @descriptions + * 新增角色 * @author DB - * @date 2023/10/19 17:13 + * @since 2023/10/12 10:48 * @param bo 请求参数 - * @return: void */ void insertSysRole(RoleBo bo); /** - * @descriptions + * 修改角色 * @author DB - * @date 2023/10/19 17:14 + * @since 2023/09/10 17:45 * @param bo 请求参数 - * @return: void */ void updateSysRole(RoleBo bo); /** - * @descriptions + * 删除角色 * @author DB - * @date 2023/10/19 17:14 + * @since 2024/4/17 * @param id 主键 - * @return: void */ void removeSysRole(String id); /** - * @descriptions - * @author DB - * @date 2023/10/19 17:14 + * 设置角色状态 * @param bo 请求参数 - * @return: void - */ + * @author DB + * @since 2023/5/9 14:13 + **/ void setSysRoleStatus(RoleStatusBo bo); } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreLicenseService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/StoreLicenseService.java deleted file mode 100644 index 88a4a12..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreLicenseService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.cpop.system.business.service; - -import com.mybatisflex.core.service.IService; -import com.cpop.system.business.entity.StoreLicense; - -/** - * 校区/店铺营业执照 服务层。 - * - * @author DB - * @since 2023-12-12 - */ -public interface StoreLicenseService extends IService { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreRenewService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/StoreRenewService.java index d231cca..55e611d 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreRenewService.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/StoreRenewService.java @@ -1,6 +1,5 @@ package com.cpop.system.business.service; -import com.cpop.system.business.bo.StoreRenewBo; import com.mybatisflex.core.service.IService; import com.cpop.system.business.entity.StoreRenew; @@ -12,11 +11,4 @@ import com.cpop.system.business.entity.StoreRenew; */ public interface StoreRenewService extends IService { - /** - * 校区续费 - * @author DB - * @since 2024/1/11 - * @param bo 请求参数 - */ - void storeRenew(StoreRenewBo bo); } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/StoreService.java index 9e14f5a..d3a5e71 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreService.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/StoreService.java @@ -1,8 +1,6 @@ package com.cpop.system.business.service; import com.cpop.system.business.bo.StoreBo; -import com.cpop.system.business.bo.StorePageBo; -import com.cpop.system.business.bo.SyncBrandAndStoreBo; import com.cpop.system.business.vo.StorePageVo; import com.mybatisflex.core.paginate.Page; import com.mybatisflex.core.service.IService; @@ -16,21 +14,14 @@ import com.cpop.system.business.entity.Store; */ public interface StoreService extends IService { - /** - * @Author: DB - * @description: 获取校区分页列表 - * @Date: 2023-11-23 15:40:30 - * @return {*} - */ - Page getStorePage(StorePageBo bo); - /** - * 小程序同步品牌和校区 - * @author DB - * @since 2023/12/21 - * @param bo 请求参数 + * 查询校区分页列表 + * @param name 请求参数 + * @return R> + * @author Administrator + * @since 2023/6/7 0007 10:18 */ - void miniSyncBrandAndStore(SyncBrandAndStoreBo bo); + Page getStorePage(String name); /** * 更新校区 diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreSignService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/StoreSignService.java index a6eb260..6e5eac3 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/StoreSignService.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/StoreSignService.java @@ -1,15 +1,14 @@ package com.cpop.system.business.service; -import com.cpop.system.business.bo.StoreRenewPageBo; -import com.cpop.system.business.bo.StoreRenewXmlBo; import com.cpop.system.business.bo.StoreRunOffBo; +import com.cpop.system.business.bo.StoreSignRenewPageBo; +import com.cpop.system.business.bo.StoreSignRenewXmlBo; import com.cpop.system.business.dto.StoreRenewDto; -import com.cpop.system.business.vo.StoreRenewPageVo; +import com.cpop.system.business.vo.StoreSignRenewPageVo; import com.mybatisflex.core.paginate.Page; import com.mybatisflex.core.service.IService; import com.cpop.system.business.entity.StoreSign; -import java.util.Collection; import java.util.List; /** @@ -21,13 +20,12 @@ import java.util.List; public interface StoreSignService extends IService { /** - * 分页查询校区续费 + * 获取校区签约续费分页 * @author DB - * @since 2023/12/14 - * @param bo 请求参数 - * @return Page + * @since 2024/3/7 + * @return Page */ - Page getStoreRenewPage(StoreRenewPageBo bo); + Page getStoreSignRenewPage(StoreSignRenewPageBo bo); /** * 机构/店铺流失 @@ -44,5 +42,6 @@ public interface StoreSignService extends IService { * @param bo 请求 * @return List */ - List getRenewXml(StoreRenewXmlBo bo); + List getSignRenewXml(StoreSignRenewXmlBo bo); + } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/WxPayScoreDetailService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/WxPayScoreDetailService.java deleted file mode 100644 index 82c899a..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/WxPayScoreDetailService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.cpop.system.business.service; - -import com.mybatisflex.core.service.IService; -import com.cpop.system.business.entity.WxPayScoreDetail; - -/** - * 微信支付分计划详情表 服务层。 - * - * @author DB - * @since 2024-01-08 - */ -public interface WxPayScoreDetailService extends IService { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/WxPayScoreService.java b/Cpop-System/src/main/java/com/cpop/system/business/service/WxPayScoreService.java deleted file mode 100644 index c2718c3..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/WxPayScoreService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.cpop.system.business.service; - -import com.mybatisflex.core.service.IService; -import com.cpop.system.business.entity.WxPayScore; - -/** - * 微信支付分计划表 服务层。 - * - * @author DB - * @since 2024-01-08 - */ -public interface WxPayScoreService extends IService { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/BrandServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/BrandServiceImpl.java index b56955e..9a3f997 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/BrandServiceImpl.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/BrandServiceImpl.java @@ -1,32 +1,17 @@ package com.cpop.system.business.service.impl; -import com.cpop.common.utils.StringUtils; import com.cpop.core.base.entity.PageDomain; -import com.cpop.core.base.exception.ServiceException; -import com.cpop.core.utils.SpringUtils; import com.cpop.core.utils.SqlUtils; -import com.cpop.system.business.entity.Store; -import com.cpop.system.business.entity.StoreLicense; -import com.cpop.system.business.service.StoreLicenseService; -import com.cpop.system.business.service.StoreService; import com.cpop.system.business.vo.BrandPageVo; -import com.mybatisflex.core.datasource.DataSourceKey; import com.mybatisflex.core.paginate.Page; import com.mybatisflex.core.query.QueryWrapper; -import com.mybatisflex.core.row.*; import com.mybatisflex.spring.service.impl.ServiceImpl; import com.cpop.system.business.entity.Brand; import com.cpop.system.business.mapper.BrandMapper; import com.cpop.system.business.service.BrandService; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.time.LocalDateTime; -import java.util.*; -import java.util.stream.Collectors; import static com.cpop.system.business.entity.table.BrandTableDef.BRAND; -import static com.cpop.system.business.entity.table.StoreTableDef.STORE; /** * 系统-品牌表 服务层实现。 @@ -38,173 +23,21 @@ import static com.cpop.system.business.entity.table.StoreTableDef.STORE; public class BrandServiceImpl extends ServiceImpl implements BrandService { /** - * @descriptions 导入果酱品牌 + * 查询品牌分页列表 * @author DB - * @date 2023/10/25 15:54 - * @param jamboxBrandId 果酱品牌id - * @return: void - */ - @Override - @Transactional(rollbackFor = Exception.class) - public void importJamboxBrand(String jamboxBrandId) { - //获取果酱品牌信息 - Row brand; - try { - DataSourceKey.use("jambox"); - brand = Db.selectOneByQuery(QueryWrapper.create() - .select() - .from("t_brand_info") - .where("id = ?", jamboxBrandId)); - if (brand == null) { - throw new ServiceException("获取果酱品牌失败,请联系相关人员"); - } - } finally { - DataSourceKey.clear(); - } - //查询品牌是否已经录入 - long count = DbChain.table("cp_j_brand_extend") - .where("brand_cloud_id = ?", brand.getString("brandId")) - .and("is_delete = 0") - .count(); - if (count > 0) { - throw new ServiceException("当前品牌已导入,请勿重复导入"); - } - Brand sysBrand = new Brand(); - sysBrand.setBrandName(brand.getString("name")) - .setWxMchId(brand.getString("wxMchId")) - .setSourceType(SourceType.JAMBOX.toString()); - this.save(sysBrand); - //果酱拓展表信息 - LocalDateTime now = LocalDateTime.now(); - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); - RowKey brandKey = RowKey.SNOW_FLAKE_ID; - DbChain.table("cp_j_brand_extend") - .setId(brandKey) - .set("brand_id", sysBrand.getId()) - .set("brand_cloud_id", brand.getString("brandId")) - .set("create_time", now) - .set("update_time", now) - .set("create_user_id", loginUser == null ? "1" : loginUser.getUserId()) - .set("update_user_id", loginUser == null ? "1" : loginUser.getUserId()) - .save(); - //导入果酱品牌关联校区 - importJamboxStore(jamboxBrandId,sysBrand.getId()); - } - - /** - * @descriptions 导入果酱校区id - * @author DB - * @date 2023/10/26 18:30 - * @param jamboxBrandId 果酱品牌id - * @param brandId 品牌id - * @return: void - */ - private void importJamboxStore(String jamboxBrandId, String brandId) { - //获取果酱校区信息 - List storeList; - try { - DataSourceKey.use("jambox"); - storeList = Db.selectListByQuery(QueryWrapper.create() - .select("store_id as storeCloudId", "mechanism as storeName", "address as storeAddr", "charge_name as personCharge", "charge_phone as phone", "X as longitude", "Y as latitude") - .from("t_mechanism_info") - .where("brand_id = ?", jamboxBrandId)); - } finally { - DataSourceKey.clear(); - } - //导入数据 - if (storeList != null) { - List stores = RowUtil.toEntityList(storeList, Store.class); - stores.forEach(item->{ - item.setBrandId(brandId); - item.setSourceType(SourceType.JAMBOX.toString()); - }); - SpringUtils.getBean(StoreService.class).saveBatch(stores); - //保存拓展表 - List storeExtends = new ArrayList<>(); - //果酱拓展表信息 - LocalDateTime now = LocalDateTime.now(); - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); - for (int i = 0; i < storeList.size(); i++) { - Row row = Row.ofKey(RowKey.SNOW_FLAKE_ID); - row.set("store_cloud_id", storeList.get(i).getString("storeCloudId")); - row.set("store_id", stores.get(i).getId()); - row.set("create_time", now); - row.set("update_time", now); - row.set("create_user_id", loginUser == null ? "1" : loginUser.getUserId()); - row.set("update_user_id", loginUser == null ? "1" : loginUser.getUserId()); - storeExtends.add(row); - } - Db.insertBatch("cp_j_store_extend", storeExtends); - //导入证书信息 - List rowList; - try { - DataSourceKey.use("jambox"); - rowList = DbChain.table("t_mechanism_info").select("store_id as storeCloudId", "reg_addr as licenseAddr", "str_to_date(reg_date,'%Y年%m月%d') as licenseDate", "reg_Name as licenseName", - "ness_license_id as licenseCode", "corp_name as licenseUserName", "reg_pic as licensePicUrl") - .where("reg_addr is not null") - .in("store_id", storeList.stream().map(item -> item.getString("storeCloudId")).collect(Collectors.toList())) - .list(); - } finally { - DataSourceKey.clear(); - } - //获取校区信息 - Map storeMap = storeExtends.stream().collect(Collectors.toMap(item->item.getString("store_cloud_id"),item->item.getString("store_id"))); - rowList.forEach(item -> { - item.set("storeId", storeMap.get(item.getString("storeCloudId"))); - }); - List licenseList = RowUtil.toEntityList(rowList, StoreLicense.class).stream().filter(item->item.getStoreId() != null).collect(Collectors.toList()); - SpringUtils.getBean(StoreLicenseService.class).saveBatch(licenseList); - } - } - - /** - * @descriptions 查询品牌分页列表 - * @author DB - * @date 2023/10/25 17:32 - * @param brandName 品牌名 - * @return: com.mybatisflex.core.paginate.Page + * @since 2023/10/25 17:32 + * @param brandName 请求参数 + * @return com.mybatisflex.core.paginate.Page */ @Override public Page getBrandPage(String brandName) { PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); - return this.mapper.paginateAs(pageDomain.getPageNum(), pageDomain.getPageSize(), - QueryWrapper.create() - .select(BRAND.ID, BRAND.BRAND_NAME, BRAND.WX_MCH_ID, BRAND.CREATE_TIME, BRAND.IS_OPEN_SHARING) - .and(BRAND.BRAND_NAME.like(brandName)) + return this.mapper.paginateAs(pageDomain.getPageNum(), pageDomain.getPageSize(), QueryWrapper.create() + .select(BRAND.ID, BRAND.BRAND_NAME, BRAND.WX_MCH_ID, BRAND.CREATE_TIME, BRAND.WX_MCH_ID, BRAND.BRAND_ADDR, BRAND.LICENSE_STATS, BRAND.LICENSE_PIC_URL, BRAND.LICENSE_CREDIT_CODE, + BRAND.LICENSE_FIRM_NAME, BRAND.LICENSE_USERNAME, BRAND.LICENSE_ADDR, BRAND.LICENSE_DATE) + .and(BRAND.BRAND_NAME.likeLeft(brandName)) .orderBy(BRAND.CREATE_TIME.desc()), BrandPageVo.class); } - /** - * @descriptions 根据品牌id删除品牌 - * @author DB - * @date 2023/11/09 10:34 - * @param id 主键 - * @return: void - */ - @Override - @Transactional(rollbackFor = Exception.class) - public void removeBrandById(String id) { - Brand brand = this.getById(id); - StoreService storeService = SpringUtils.getBean(StoreService.class); - if (StringUtils.equals(brand.getSourceType(),SourceType.JAMBOX.toString())){ - //果酱处导入,先删除拓展校区 - List storeList = storeService.queryChain().where(STORE.BRAND_ID.eq(id)).list(); - if (!storeList.isEmpty()){ - DbChain.table("cp_j_store_extend") - .set("is_delete", 1) - .where("store_id in ?", storeList.stream().map(Store::getId).collect(Collectors.toSet())) - .update(); - } - } - //删除校区 - storeService.updateChain().where(STORE.BRAND_ID.eq(brand.getId())).remove(); - //逻辑删除品牌拓展 - DbChain.table("cp_j_brand_extend") - .set("is_delete", 1) - .where("brand_id = ?", id) - .update(); - //删除品牌 - this.removeById(id); - } } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/DictDataServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/DictDataServiceImpl.java index f75b143..00302e6 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/DictDataServiceImpl.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/DictDataServiceImpl.java @@ -1,9 +1,11 @@ package com.cpop.system.business.service.impl; -import com.cpop.common.utils.StringUtils; -import com.cpop.common.utils.bean.BeanUtils; +import cn.dev33.satoken.stp.StpUtil; import com.cpop.core.base.entity.PageDomain; +import com.cpop.core.base.enums.UserType; import com.cpop.core.utils.SqlUtils; +import com.cpop.core.utils.StringUtils; +import com.cpop.core.utils.bean.BeanUtils; import com.cpop.system.business.bo.DictDataBo; import com.cpop.system.business.bo.DictDataPageBo; import com.cpop.system.business.vo.DictDataPageVo; @@ -16,7 +18,6 @@ import com.cpop.system.business.entity.DictData; import com.cpop.system.business.mapper.DictDataMapper; import com.cpop.system.business.service.DictDataService; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; @@ -43,12 +44,11 @@ public class DictDataServiceImpl extends ServiceImpl i */ @Override public Page getDictDataPage(DictDataPageBo bo) { - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); return this.pageAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()), QueryWrapper.create() .select(DICT_DATA.ID, DICT_DATA.DICT_LABEL, DICT_DATA.DICT_VALUE, DICT_DATA.DICT_TYPE, DICT_DATA.UPDATE_TIME,DICT_DATA.STATUS,DICT_DATA.DICT_SORT) - .where(DICT_DATA.USER_TYPE.eq(loginUser.getUserType().toString())) + .where(DICT_DATA.USER_TYPE.eq(StpUtil.getSession().getString("userType"))) .and(DICT_DATA.DICT_TYPE.eq(bo.getDictType())) .and(DICT_DATA.DICT_LABEL.like(bo.getDictLabel())) .and(DICT_DATA.STATUS.eq(bo.getStatus())) @@ -83,12 +83,10 @@ public class DictDataServiceImpl extends ServiceImpl i if (dictCache != null && !dictCache.isEmpty()) { return dictCache; } - //获取当前用户信息 - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); dictCache = this.list(QueryWrapper.create().select(DICT_DATA.ALL_COLUMNS) .where(DICT_DATA.STATUS.eq(1)) .and(DICT_DATA.DICT_TYPE.eq(dictType)) - .and(DICT_DATA.USER_TYPE.eq(loginUser.getUserType().toString())) + .and(DICT_DATA.USER_TYPE.eq(StpUtil.getSession().get("userType"))) .orderBy(DICT_DATA.DICT_SORT.asc())); if (StringUtils.isNotEmpty(dictCache)) { DictUtils.setDictCache(dictType, dictCache); @@ -106,8 +104,7 @@ public class DictDataServiceImpl extends ServiceImpl i @Override public void insertDictData(DictDataBo bo) { DictData dictData = BeanUtils.mapToClass(bo, DictData.class); - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); - dictData.setUserType(loginUser.getUserType().toString()); + dictData.setUserType((UserType) StpUtil.getSession().get("userType")); boolean save = this.save(dictData); if (save) { List dictDatas = getDictDataByDictType(dictData.getDictType()); diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/DictTypeServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/DictTypeServiceImpl.java index 8de2d6e..683e3f6 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/DictTypeServiceImpl.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/DictTypeServiceImpl.java @@ -1,6 +1,7 @@ package com.cpop.system.business.service.impl; -import com.cpop.common.utils.StringUtils; +import cn.dev33.satoken.stp.StpUtil; +import com.cpop.core.utils.StringUtils; import com.cpop.core.base.entity.PageDomain; import com.cpop.core.base.exception.ServiceException; import com.cpop.core.utils.SpringUtils; @@ -48,11 +49,10 @@ public class DictTypeServiceImpl extends ServiceImpl i //获取分页参数 PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); //获取当前登陆用户类型 - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); return this.pageAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()), - QueryWrapper.create().select(DICT_TYPE.ID,DICT_TYPE.STATUS, DICT_TYPE.DICT_NAME, DICT_TYPE.DICT_TYPE_, DICT_TYPE.UPDATE_TIME) - .where(DICT_TYPE.USER_TYPE.eq(loginUser.getUserType().toString())) - .and(DICT_TYPE.DICT_NAME.like(dictName)), + QueryWrapper.create().select(DICT_TYPE.ID, DICT_TYPE.STATUS, DICT_TYPE.DICT_NAME, DICT_TYPE.DICT_TYPE_, DICT_TYPE.UPDATE_TIME) + .where(DICT_TYPE.USER_TYPE.eq(StpUtil.getSession().get("userType"))) + .and(DICT_TYPE.DICT_NAME.likeLeft(dictName)), DictTypePageVo.class); } @@ -67,10 +67,9 @@ public class DictTypeServiceImpl extends ServiceImpl i @Override public Boolean checkDictTypeUnique(DictTypeBo bo) { String dictId = StringUtils.isNotBlank(bo.getId()) ? bo.getId() : "-1"; - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); DictType dictType = this.getOne(QueryWrapper.create() .where(DICT_TYPE.DICT_TYPE_.eq(bo.getDictType())) - .and(DICT_TYPE.USER_TYPE.eq(loginUser.getUserType().toString()))); + .and(DICT_TYPE.USER_TYPE.eq(StpUtil.getSession().get("userType")))); return dictType == null || StringUtils.equals(dictId, dictType.getId()); } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/LoginServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/LoginServiceImpl.java index fc91045..9cfc155 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/LoginServiceImpl.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/LoginServiceImpl.java @@ -1,15 +1,21 @@ package com.cpop.system.business.service.impl; +import cn.dev33.satoken.session.SaSession; +import cn.dev33.satoken.stp.StpUtil; import com.alibaba.fastjson.JSONObject; -import com.cpop.common.constant.Constants; +import com.cpop.core.constant.Constants; import com.cpop.system.business.entity.Menu; +import com.cpop.system.business.entity.StoreSign; import com.cpop.system.business.service.LoginService; import com.cpop.system.business.service.MenuService; +import com.cpop.system.business.service.StoreSignService; import com.cpop.system.business.vo.LoginUserInfoVo; import com.cpop.system.business.vo.MenuRouteVo; +import com.mybatisflex.core.query.QueryWrapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.time.LocalDate; import java.util.Collections; import java.util.List; import java.util.Set; @@ -20,7 +26,6 @@ import static com.cpop.system.business.entity.table.RoleMenuTableDef.ROLE_MENU; import static com.cpop.system.business.entity.table.RoleTableDef.ROLE; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.compress.archivers.dump.DumpArchiveEntry.PERMISSION; import java.util.HashSet; /** @@ -42,17 +47,14 @@ public class LoginServiceImpl implements LoginService { **/ @Override public LoginUserInfoVo getUserInfo() { - // 获取当前登录用户信息 - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); - // 获取申请员工信息 - JSONObject loginStaffInfo = SecurityUtils.getInstance().getLoginUserInfo(); - return new LoginUserInfoVo().setUserId(loginUser.getUserId()) - .setUsername(loginUser.getUsername()) - .setRealName(loginStaffInfo.getString("name")) - .setAvatar(loginStaffInfo.getString("avatar")) - .setPermissions(loginUser.getPermissions()) - .setRoles(Collections.singleton("Cpop")) - .setHomePath(""); + SaSession session = StpUtil.getSession(); + return new LoginUserInfoVo() + .setId((String) session.get("id")) + .setUserId((String) session.get("userId")) + .setUsername((String) session.get("username")) + .setRealName((String) session.get("name")) + .setAvatar((String) session.get("avatar")) + .setPermissions(StpUtil.getPermissionList()); } /** @@ -63,12 +65,10 @@ public class LoginServiceImpl implements LoginService { */ @Override public Set getPermCode() { - // 获取当前登录用户信息 - JSONObject loginUser = SecurityUtils.getInstance().getLoginUserInfo(); - - if (StringUtils.equals(Constants.SUPER_ADMIN, loginUser.getString("userName"))) { + SaSession session = StpUtil.getSession(); + if (StringUtils.equals(Constants.SUPER_ADMIN, session.getString("username"))) { Set permCodes = new HashSet<>(); - permCodes.add("*:*:*"); + permCodes.add("*.*.*"); return permCodes; } else { List menuPermissions = SpringUtils.getBean(MenuService.class) @@ -78,7 +78,7 @@ public class LoginServiceImpl implements LoginService { .on(ROLE_MENU.MENU_ID.eq(MENU.ID)) .leftJoin(ROLE) .on(ROLE.ID.eq(ROLE_MENU.ROLE_ID)) - .where(ROLE.ID.eq(loginUser.getString("roleId"))) + .where(ROLE.ID.eq(session.getString("roleId"))) .and(MENU.TYPE.in(1, 2)) .and(MENU.PERMISSION.isNotNull()) .list(); diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/MenuServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/MenuServiceImpl.java index d3fa85f..7b2be21 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/MenuServiceImpl.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/MenuServiceImpl.java @@ -1,9 +1,12 @@ package com.cpop.system.business.service.impl; +import cn.dev33.satoken.session.SaSession; +import cn.dev33.satoken.stp.StpUtil; import com.alibaba.fastjson.JSONObject; -import com.cpop.common.constant.Constants; -import com.cpop.common.utils.StringUtils; -import com.cpop.common.utils.bean.BeanUtils; +import com.cpop.core.base.enums.UserType; +import com.cpop.core.constant.Constants; +import com.cpop.core.utils.StringUtils; +import com.cpop.core.utils.bean.BeanUtils; import com.cpop.system.framework.enums.InitRoleEnum; import com.cpop.core.base.exception.ServiceException; import com.cpop.system.business.bo.MenuBo; @@ -35,34 +38,30 @@ import static com.cpop.system.business.entity.table.RoleTableDef.ROLE; public class MenuServiceImpl extends ServiceImpl implements MenuService { /** - * @descriptions 获取系统菜单树列表 + * 获取菜单路由 * @author DB - * @date 2023/10/19 14:39 - * @return: java.util.List + * @since 2023/10/19 16:32 */ @Override public List getSysMenuList() { - //获取用户信息 - LoginUser user = SecurityUtils.getInstance().getLoginUser(); - //获取申请员工信息 - JSONObject loginStaffInfo = SecurityUtils.getInstance().getLoginUserInfo(); + SaSession session = StpUtil.getSession(); //超级管理员 - if (Constants.SUPER_ADMIN.equals(user.getUsername())) { + if (Constants.SUPER_ADMIN.equals(session.getString("username"))) { //获取菜单 List list = this.listAs(QueryWrapper.create() .where(MENU.TYPE.in(0, 1)) //构建公共菜单与特有菜单 - .and(MENU.USER_TYPE.eq(user.getUserType())) + .and(MENU.USER_TYPE.eq(session.get("userType"))) .orderBy(MENU.ORDER_NO.asc()), MenuRouteVo.class); return buildMenuRouteTree(list); } else { //一般管理员 - if (StringUtils.equals(loginStaffInfo.getString("roleId"), InitRoleEnum.SUPER_MALL_ROLE.getId())) { + if (StringUtils.equals(session.getString("roleId"), InitRoleEnum.SUPER_MALL_ROLE.getId())) { return buildMenuRouteTree(this.listAs(QueryWrapper.create() .where(MENU.TYPE.in(0, 1)) //构建公共菜单与特有菜单 - .and(MENU.USER_TYPE.eq(user.getUserType())) + .and(MENU.USER_TYPE.eq(session.get("userType"))) .where(MENU.STATUS.eq(1)) .and(MENU.NAME.notIn(Constants.HIDE_MENU.split(","))) .orderBy(MENU.ORDER_NO.asc()), @@ -75,30 +74,39 @@ public class MenuServiceImpl extends ServiceImpl implements Me .where(MENU.STATUS.eq(1)) .and(MENU.TYPE.in(0, 1)) .and(MENU.NAME.notIn(Constants.HIDE_MENU.split(","))) - .and(ROLE_MENU.ROLE_ID.eq(loginStaffInfo.getString("roleId"))) + .and(ROLE_MENU.ROLE_ID.eq(session.getString("roleId"))) //构建公共菜单与特有菜单 - .and(MENU.USER_TYPE.eq(user.getUserType())) + .and(MENU.USER_TYPE.eq(session.get("userType"))) .orderBy(MENU.ORDER_NO.asc()), MenuRouteVo.class)); } } } + /** + * 获取系统菜单树列表 + * @author DB + * @since 2023/09/07 15:53 + * @param bo 请求参数 + */ @Override public List getSysMenuTreeList(MenuListBo bo) { - //获取用户信息 - LoginUser user = SecurityUtils.getInstance().getLoginUser(); return buildMenuTree(this.listAs(QueryWrapper.create() //状态不为空 .and(MENU.STATUS.eq(bo.getStatus())) //标题不为空 .and(MENU.TITLE.like(bo.getTitle())) //构建公共菜单与特有菜单 - .and(MENU.USER_TYPE.eq(user.getUserType())) + .and(MENU.USER_TYPE.eq(StpUtil.getSession().get("userType"))) .and(MENU.NAME.notIn(Constants.HIDE_MENU.split(","))) .orderBy(MENU.ORDER_NO.asc()), MenuVo.class)); } + /** + * 获取目录与菜单树 + * @author DB + * @since 2023/09/07 17:42 + */ @Override public List getDirectoryAndMenuTreeList() { //只读取启用的菜单 @@ -122,7 +130,7 @@ public class MenuServiceImpl extends ServiceImpl implements Me } //构建根节点 List tempList = menus.stream() - .filter(s -> StringUtils.isBlank(s.getParentMenu())).collect(Collectors.toList()); + .filter(s -> StringUtils.isBlank(s.getParentMenu())).toList(); for (MenuVo menu : tempList) { MenuVo menuVo = recursionFn(menus, menu); returnList.add(menuVo); @@ -131,9 +139,9 @@ public class MenuServiceImpl extends ServiceImpl implements Me } /** - * @descriptions 递归列表 + * 递归列表 * @author DB - * @date 2023/09/07 16:36 + * @since 2023/09/07 16:36 * @param list 递归集合 * @param menu 菜单 * @return com.jambox.OAMtem.business.vo.OAMMenuVo @@ -152,17 +160,23 @@ public class MenuServiceImpl extends ServiceImpl implements Me return menu; } + /** + * 新增菜单 + * @author DB + * @since 2023/09/07 17:50 + * @param bo 请求参数 + */ @Override public void insertSysMenu(MenuBo bo) { Menu entity = new Menu(); BeanUtils.copyBeanProp(entity, bo); + SaSession session = StpUtil.getSession(); //设置菜单名 if (StringUtils.isNotBlank(bo.getPath())){ String[] split = bo.getPath().split("/"); String name = StringUtils.getMethodName(split[split.length - 1].replace("/", "")); - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); //名字不能重复 - long count = this.count(QueryWrapper.create().where(MENU.NAME.eq(name)).and(MENU.USER_TYPE.eq(loginUser.getUserType().toString()))); + long count = this.count(QueryWrapper.create().where(MENU.NAME.eq(name)).and(MENU.USER_TYPE.eq(session.get("userType")))); if (count > 0) { throw new ServiceException("命名失败,请调整路径"); } @@ -175,10 +189,16 @@ public class MenuServiceImpl extends ServiceImpl implements Me entity.setComponent("LAYOUT"); } //获取当前用户 - entity.setUserType(SecurityUtils.getInstance().getLoginUser().getUserType().toString()); + entity.setUserType((UserType) session.get("userType")); this.save(entity); } + /** + * 修改菜单 + * @param bo 请求参数 + * @author DB + * @since 2023/5/10 16:01 + **/ @Override public void updateSysMenu(MenuBo bo) { Menu entity = new Menu(); @@ -191,9 +211,8 @@ public class MenuServiceImpl extends ServiceImpl implements Me toUpperCaseString = split[split.length - 2]; } String name = StringUtils.getMethodName(toUpperCaseString.replace("/", "")); - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); //名字不能重复 - long count = this.count(QueryWrapper.create().where(MENU.NAME.eq(name)).and(MENU.USER_TYPE.eq(loginUser.getUserType().toString()))); + long count = this.count(QueryWrapper.create().where(MENU.NAME.eq(name)).and(MENU.USER_TYPE.eq(StpUtil.getSession().get("userType")))); if (count > 1) { throw new ServiceException("命名失败,请调整路径"); } @@ -206,6 +225,12 @@ public class MenuServiceImpl extends ServiceImpl implements Me this.updateById(entity); } + /** + * 删除菜单 + * @param id 主键id + * @author DB + * @since 2023/5/10 16:01 + **/ @Override public void removeSysMenu(String id) { //查询所有 @@ -218,16 +243,16 @@ public class MenuServiceImpl extends ServiceImpl implements Me } /** - * @Description: 递归要删除的菜单集合 + * 递归要删除的菜单集合 * @param list 菜单集合 * @param id id * @param removeIds 删除id集合 - * @Author: DB - * @Date: 2023/5/10 15:27 + * @author DB + * @since 2023/5/10 15:27 **/ private void recursionRemove(List list, String id, List removeIds) { //过滤出删除根菜单 - List sonMenu = list.stream().filter(s -> null != s.getParentMenu()&& s.getParentMenu().equals(id)).collect(Collectors.toList()); + List sonMenu = list.stream().filter(s -> null != s.getParentMenu()&& s.getParentMenu().equals(id)).toList(); if (!sonMenu.isEmpty()) { sonMenu.forEach(item -> { recursionRemove(list, item.getId(), removeIds); @@ -237,11 +262,10 @@ public class MenuServiceImpl extends ServiceImpl implements Me } /** - * @Description: 构建菜单路由树 + * 构建菜单路由树 * @param menus 菜单集合 - * @return: List - * @Author: DB - * @Date: 2023/5/11 9:21 + * @author DB + * @since 2023/5/11 9:21 **/ private List buildMenuRouteTree(List menus) { if (menus.isEmpty()){ @@ -258,8 +282,7 @@ public class MenuServiceImpl extends ServiceImpl implements Me item.setMeta(meta); }); //构建根节点 - List tempList = menus.stream() - .filter(s -> StringUtils.isBlank(s.getParentMenu())).collect(Collectors.toList()); + List tempList = menus.stream().filter(s -> StringUtils.isBlank(s.getParentMenu())).toList(); List menuRoutes = new ArrayList<>(); for (MenuRouteVo menu : tempList) { MenuRouteVo menuVo = recursionMenuRoute(menus, menu); @@ -271,12 +294,11 @@ public class MenuServiceImpl extends ServiceImpl implements Me } /** - * @Description: 递归列表 + * 递归列表 * @param list 菜单集合 * @param menu 菜单 - * @return: MenuRouteVo - * @Author: DB - * @Date: 2023/5/11 9:22 + * @author DB + * @since 2023/5/11 9:22 **/ private MenuRouteVo recursionMenuRoute(List list, MenuRouteVo menu) { // 得到子节点列表 diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/RoleServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/RoleServiceImpl.java index fbc26d1..cd48a91 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/RoleServiceImpl.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/RoleServiceImpl.java @@ -1,9 +1,10 @@ package com.cpop.system.business.service.impl; -import com.cpop.common.constant.Constants; -import com.cpop.common.utils.StringUtils; -import com.cpop.common.utils.bean.BeanUtils; +import cn.dev33.satoken.stp.StpUtil; import com.cpop.core.base.entity.PageDomain; +import com.cpop.core.base.enums.UserType; +import com.cpop.core.utils.StringUtils; +import com.cpop.core.utils.bean.BeanUtils; import com.cpop.system.framework.enums.InitRoleEnum; import com.cpop.core.utils.SpringUtils; import com.cpop.core.utils.SqlUtils; @@ -39,16 +40,14 @@ import static com.cpop.system.business.entity.table.RoleTableDef.ROLE; public class RoleServiceImpl extends ServiceImpl implements RoleService { /** - * @descriptions + * 查询角色分页列表 * @author DB - * @date 2023/10/19 17:13 + * @since 2023/09/10 16:51 * @param bo 请求参数 - * @return: com.mybatisflex.core.paginate.Page + * @return R> */ @Override - public Page getSysRolePageList(RolePageBo bo) { - //获取当前用户 - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); + public Page getSysRolePage(RolePageBo bo) { PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); Page page = this.mapper.paginateAs(pageDomain.getPageNum(), pageDomain.getPageSize(), QueryWrapper.create() @@ -56,7 +55,7 @@ public class RoleServiceImpl extends ServiceImpl implements Ro .where(ROLE.ID.ne(InitRoleEnum.SUPER_OAM_ROLE.getId())) .and(ROLE.ROLE_NAME.like(bo.getRoleName())) .and(ROLE.STATUS.eq(bo.getStatus())) - .and(ROLE.USER_TYPE.eq(loginUser.getUserType())) + .and(ROLE.USER_TYPE.eq(StpUtil.getSession().get("userType"))) .orderBy(ROLE.ORDER_NO.asc()) , RolePageVo.class); if (!page.getRecords().isEmpty()) { @@ -74,18 +73,16 @@ public class RoleServiceImpl extends ServiceImpl implements Ro } /** - * @descriptions + * 新增角色 * @author DB - * @date 2023/10/19 17:13 + * @since 2023/10/12 10:48 * @param bo 请求参数 - * @return: void */ @Override @Transactional(rollbackFor = Exception.class) public void insertSysRole(RoleBo bo) { - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); Role role = BeanUtils.mapToClass(bo, Role.class); - role.setUserType(loginUser.getUserType()); + role.setUserType((UserType) StpUtil.getSession().get("userType")); this.save(role); //将菜单信息录入中间表 if (!bo.getMenuIds().isEmpty()) { @@ -101,11 +98,10 @@ public class RoleServiceImpl extends ServiceImpl implements Ro } /** - * @descriptions + * 修改角色 * @author DB - * @date 2023/10/19 17:14 + * @since 2023/09/10 17:45 * @param bo 请求参数 - * @return: void */ @Override @Transactional(rollbackFor = Exception.class) @@ -131,13 +127,13 @@ public class RoleServiceImpl extends ServiceImpl implements Ro } /** - * @descriptions + * 删除角色 * @author DB - * @date 2023/10/19 17:14 + * @since 2024/4/17 * @param id 主键 - * @return: void */ @Override + @Transactional(rollbackFor = Exception.class) public void removeSysRole(String id) { this.removeById(id); //删除相关联菜单 @@ -145,18 +141,14 @@ public class RoleServiceImpl extends ServiceImpl implements Ro } /** - * @descriptions - * @author DB - * @date 2023/10/19 17:14 + * 设置角色状态 * @param bo 请求参数 - * @return: void - */ + * @author DB + * @since 2023/5/9 14:13 + **/ @Override public void setSysRoleStatus(RoleStatusBo bo) { this.updateById(BeanUtils.mapToClass(bo, Role.class)); } - - - } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreLicenseServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreLicenseServiceImpl.java deleted file mode 100644 index 63198eb..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreLicenseServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.cpop.system.business.service.impl; - -import com.mybatisflex.spring.service.impl.ServiceImpl; -import com.cpop.system.business.entity.StoreLicense; -import com.cpop.system.business.mapper.StoreLicenseMapper; -import com.cpop.system.business.service.StoreLicenseService; -import org.springframework.stereotype.Service; - -/** - * 校区/店铺营业执照 服务层实现。 - * - * @author DB - * @since 2023-12-12 - */ -@Service("storeLicenseService") -public class StoreLicenseServiceImpl extends ServiceImpl implements StoreLicenseService { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreRenewServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreRenewServiceImpl.java index 9dedf4f..4674da7 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreRenewServiceImpl.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreRenewServiceImpl.java @@ -1,40 +1,10 @@ package com.cpop.system.business.service.impl; -import cn.hutool.json.JSONUtil; -import com.alibaba.fastjson.JSONObject; -import com.cpop.common.constant.Constants; -import com.cpop.common.utils.StringUtils; -import com.cpop.common.utils.bean.BeanUtils; -import com.cpop.core.service.RedisService; -import com.cpop.core.utils.SpringUtils; -import com.cpop.system.business.bo.StoreRenewBo; -import com.cpop.system.business.service.StoreService; -import com.cpop.system.business.service.StoreSignService; -import com.cpop.system.framework.constant.SystemRedisKey; -import com.mybatisflex.core.datasource.DataSourceKey; -import com.mybatisflex.core.row.DbChain; -import com.mybatisflex.core.row.Row; -import com.mybatisflex.core.row.RowKey; import com.mybatisflex.spring.service.impl.ServiceImpl; import com.cpop.system.business.entity.StoreRenew; import com.cpop.system.business.mapper.StoreRenewMapper; import com.cpop.system.business.service.StoreRenewService; -import org.bouncycastle.util.StoreException; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.core.TimeoutUtils; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import redis.clients.jedis.Jedis; -import redis.clients.jedis.JedisClientConfig; - -import javax.annotation.Resource; -import java.time.LocalDate; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; -import java.util.concurrent.TimeUnit; - -import static com.cpop.system.business.entity.table.StoreSignTableDef.STORE_SIGN; -import static com.cpop.system.business.entity.table.StoreTableDef.STORE; /** * 校区续费表 服务层实现。 @@ -45,79 +15,4 @@ import static com.cpop.system.business.entity.table.StoreTableDef.STORE; @Service("storeRenewService") public class StoreRenewServiceImpl extends ServiceImpl implements StoreRenewService { - /** - * 校区续费 - * @author DB - * @since 2024/1/11 - * @param bo 请求参数 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public void storeRenew(StoreRenewBo bo) { - StoreRenew storeRenew = BeanUtils.mapToClass(bo, StoreRenew.class); - if (bo.getRenewType() == 2){ - storeRenew.setRenewDate(LocalDate.now().plusYears(1)); - } - JSONObject loginUserInfo = SecurityUtils.getInstance().getLoginUserInfo(); - storeRenew.setRenewStaffId(loginUserInfo.getString("id")); - this.save(storeRenew); - SpringUtils.getBean(StoreService.class).updateChain() - .set(STORE.HAVE_ACTIVE, true) - .where(STORE.ID.eq(bo.getStoreId())) - .update(); - //修改校区签约到期时间 - SpringUtils.getBean(StoreSignService.class).updateChain() - .set(STORE_SIGN.EXPIRE_DATE, storeRenew.getRenewDate()) - .where(STORE_SIGN.STORE_ID.eq(bo.getStoreId())) - .update(); - //修改缓存 - SpringUtils.getBean(RedisService.class).setCacheObject(SystemRedisKey.STORE_SIGN_EXPIRE_DATE + bo.getStoreId(), - storeRenew.getRenewDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) - , 24, TimeUnit.HOURS); - storeRenewOld(storeRenew,loginUserInfo); - } - - /** - * 同步更新旧校区数据 - * @author DB - * @since 2024/1/11 - * @param bo 请求参数 - */ - @Deprecated - private void storeRenewOld(StoreRenew storeRenew,JSONObject loginUserInfo) { - //线上 - if (StringUtils.equals(SpringUtils.getActiveProfile(), "prod")) { - //获取云校区 - Row storeExtend = DbChain.table("cp_j_store_extend").select("store_cloud_id").where("store_id = ?", storeRenew.getStoreId()).one(); - try { - DataSourceKey.use("jambox"); - //修改数据库 - DbChain.table("t_signContract_mechanism") - .set("end_time", storeRenew.getRenewDate()) - .set("last_modified", loginUserInfo.getString("id")) - .where("deleted = 1") - .and("store_id = ?", storeExtend.getString("storeCloudId")) - .update(); - //添加到旧库`t_signContract_mechanism_reason` - LocalDateTime now = LocalDateTime.now(); - Row row = Row.ofKey("reason_id", RowKey.AUTO); - row.set("store_id", storeExtend.getString("storeCloudId")); - row.set("reason", storeRenew.getRenewDesc()); - row.set("pic_url", storeRenew.getAnnexUrl()); - row.set("end_time", storeRenew.getRenewDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); - row.set("deleted", 1); - row.set("creation_time", now); - row.set("creation_by", loginUserInfo.getString("id")); - row.set("last_modification_date", now); - row.set("last_modified", loginUserInfo.getString("id")); - } finally { - DataSourceKey.clear(); - } - Jedis jedis = new Jedis("106.52.49.102", 6333); - jedis.auth("Jambox.123*"); - jedis.select(1); - jedis.set("endTime" + storeExtend.getString("storeCloudId"), storeRenew.getRenewDate().toString()); - jedis.expire("endTime" + storeRenew.getStoreId(), TimeoutUtils.toMillis(24, TimeUnit.MINUTES)); - } - } } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreServiceImpl.java index 9af6cb4..ddbc0ce 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreServiceImpl.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreServiceImpl.java @@ -1,29 +1,18 @@ -/* - * @Author: DB - * - * @Date: 2023-10-26 18:22:22 - * - * @Description: 请填写简介 - */ package com.cpop.system.business.service.impl; import com.alibaba.fastjson.JSONObject; import com.cpop.api.cloudDb.core.dto.CloudStoreDto; import com.cpop.api.cloudDb.handler.CloudStoreHandler; import com.cpop.api.tencent.location.handler.TencentLocationHandler; -import com.cpop.common.utils.bean.BeanUtils; import com.cpop.core.base.entity.PageDomain; import com.cpop.core.utils.SpringUtils; import com.cpop.core.utils.SqlUtils; +import com.cpop.core.utils.bean.BeanUtils; import com.cpop.system.business.bo.StoreBo; -import com.cpop.system.business.bo.StorePageBo; -import com.cpop.system.business.bo.SyncBrandAndStoreBo; import com.cpop.system.business.entity.Brand; import com.cpop.system.business.entity.Store; -import com.cpop.system.business.entity.StoreLicense; import com.cpop.system.business.mapper.StoreMapper; import com.cpop.system.business.service.BrandService; -import com.cpop.system.business.service.StoreLicenseService; import com.cpop.system.business.service.StoreService; import com.cpop.system.business.vo.StorePageVo; import com.mybatisflex.core.paginate.Page; @@ -52,107 +41,28 @@ import static com.cpop.system.business.entity.table.StoreTableDef.STORE; public class StoreServiceImpl extends ServiceImpl implements StoreService { /** - * @Author: DB - * @description: 获取校区分页列表 - * @Date: 2023-11-23 15:35:05 - * @return {*} + * 查询校区分页列表 + * @param name 请求参数 + * @return R> + * @author Administrator + * @since 2023/6/7 0007 10:18 */ @Override - public Page getStorePage(StorePageBo bo) { + public Page getStorePage(String name) { PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); - return this.getMapper().paginateAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()), - QueryWrapper.create().select(STORE.ID, STORE.STORE_NAME, STORE.SOURCE_TYPE, STORE.CREATE_TIME, STORE.STORE_ADDR, STORE.PERSON_CHARGE, STORE.PHONE, STORE.HAVE_ACTIVE, - STORE.HAVE_COUNSELOR, STORE.WX_MCH_ID) + return this.getMapper().paginateAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()), QueryWrapper.create() + .select(STORE.ID, STORE.STORE_NAME, STORE.CREATE_TIME, STORE.STORE_ADDR, STORE.PERSON_CHARGE_NAME.as(StorePageVo::getPersonCharge), + STORE.PERSON_CHARGE_PHONE.as(StorePageVo::getPhone), STORE.WX_MCH_ID) .select(STORE_SIGN.EXPIRE_DATE) - .select(BRAND.BRAND_NAME, BRAND.ID.as(StorePageVo::getBrandId)) - .select("cp_j_store_extend.store_cloud_id as storeCloudId") + .select(BRAND.BRAND_NAME) .from(STORE) .leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID)) .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID)) - .leftJoin("cp_j_store_extend").on("`cp_j_store_extend`.`store_id` = `cp_sys_store`.`id`") - .and(STORE.STORE_NAME.like(bo.getName())) - .orderBy(BRAND.CREATE_TIME.desc()), + .and(STORE.STORE_NAME.like(name)) + .orderBy(STORE.CREATE_TIME.desc()), StorePageVo.class); } - /** - * 小程序同步品牌和校区 - * @author DB - * @since 2023/12/21 - * @param bo 请求参数 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public void miniSyncBrandAndStore(SyncBrandAndStoreBo bo) { - SyncBrandAndStoreBo.BrandInfo brandInfo = bo.getBrandInfo(); - //查询品牌 - Row brandExtend = DbChain.table("cp_j_brand_extend").where("brand_cloud_id = ?", brandInfo.getBrandCloudId()).one(); - Brand brand; - LocalDateTime now = LocalDateTime.now(); - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); - BrandService brandService = SpringUtils.getBean(BrandService.class); - if (brandExtend == null || brandExtend.isEmpty()) { - brand = new Brand(); - brand.setBrandName(brandInfo.getBrandName()).setSourceType(SourceType.JAMBOX.toString()); - brandService.save(brand); - //保存拓展 - RowKey brandKey = RowKey.SNOW_FLAKE_ID; - DbChain.table("cp_j_brand_extend") - .setId(brandKey) - .set("brand_id", brand.getId()) - .set("brand_cloud_id", brandInfo.getBrandCloudId()) - .set("create_time", now) - .set("update_time", now) - .set("create_user_id", loginUser == null ? "1" : loginUser.getUserId()) - .set("update_user_id", loginUser == null ? "1" : loginUser.getUserId()) - .save(); - } else { - brand = brandService.getById(brandExtend.getString("brandId")); - } - Store store = BeanUtils.mapToClass(bo.getStoreInfo(), Store.class); - store.setBrandId(brand.getId()).setSourceType(SourceType.JAMBOX.toString()); - this.save(store); - //拓展 - SyncBrandAndStoreBo.StoreInfo storeInfo = bo.getStoreInfo(); - Row row = Row.ofKey(RowKey.SNOW_FLAKE_ID); - row.set("store_cloud_id", storeInfo.getStoreCloudId()); - row.set("store_id", store.getId()); - row.set("create_time", now); - row.set("update_time", now); - row.set("create_user_id", loginUser == null ? "1" : loginUser.getUserId()); - row.set("update_user_id", loginUser == null ? "1" : loginUser.getUserId()); - Db.insert("cp_j_store_extend",row); - //营业执照 - StoreLicense storeLicense = BeanUtils.mapToClass(bo.getStoreInfo(), StoreLicense.class); - storeLicense.setStoreId(store.getId()); - SpringUtils.getBean(StoreLicenseService.class).save(storeLicense); - //添加线索以及 - Row clue = Row.ofKey(RowKey.SNOW_FLAKE_ID); - clue.set("store_id",store.getId()); - //校区城市 - JSONObject geocoder = SpringUtils.getBean(TencentLocationHandler.class).geocoder(bo.getStoreInfo().getLongitude(), bo.getStoreInfo().getLatitude(), "UGLBZ-LBF3I-ETCGO-UUH5X-QDV45-3LFKA"); - if (geocoder.getInteger("status") == 0){ - clue.set("city",geocoder.getJSONObject("result").getJSONObject("ad_info").getString("city")); - } - clue.set("clue_status",0); - clue.set("create_time", now); - clue.set("update_time", now); - clue.set("create_user_id", loginUser == null ? "1" : loginUser.getUserId()); - clue.set("update_user_id", loginUser == null ? "1" : loginUser.getUserId()); - Db.insert("cp_oam_clue",clue); - //录入记录 - Row clueRecord = Row.ofKey(RowKey.SNOW_FLAKE_ID); - clueRecord.set("clue_id",clue.getString("id")); - clueRecord.set("record_type",0); - clueRecord.set("record_content", "机构负责人" + store.getPersonCharge() + "创建线索"); - clueRecord.set("record_staff_id", "1"); - clueRecord.set("create_time", now); - clueRecord.set("update_time", now); - clueRecord.set("create_user_id", loginUser == null ? "1" : loginUser.getUserId()); - clueRecord.set("update_user_id", loginUser == null ? "1" : loginUser.getUserId()); - Db.insert("cp_oam_clue_record",clueRecord); - } - /** * 更新校区 * @author DB @@ -164,17 +74,5 @@ public class StoreServiceImpl extends ServiceImpl implements public void updateStore(StoreBo bo) { Store store = BeanUtils.mapToClass(bo, Store.class); this.updateById(store); - //获取云信息 - Row row = Db.selectOneByQuery("cp_j_store_extend", QueryWrapper.create() - .select("cjse.store_cloud_id", "cjbe.brand_cloud_id") - .from("cp_j_store_extend").as("cjse") - .leftJoin("cp_sys_store").as("css").on("css.id = cjse.store_id") - .leftJoin("cp_j_brand_extend").as("cjbe").on("cjbe.brand_id = css.brand_id") - .where("cjse.store_id = ?", store.getId())); - CloudStoreDto cloudStoreDto = BeanUtils.mapToClass(store, CloudStoreDto.class); - cloudStoreDto.setBrandCloudId(row.getString("brandCloudId")); - cloudStoreDto.setStoreCloudId(row.getString("storeCloudId")); - //云更新 - SpringUtils.getBean(CloudStoreHandler.class).updateStore(cloudStoreDto); } } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreSignServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreSignServiceImpl.java index 1eddb36..49e2a43 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreSignServiceImpl.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/StoreSignServiceImpl.java @@ -1,18 +1,18 @@ package com.cpop.system.business.service.impl; -import com.cpop.common.utils.StringUtils; import com.cpop.core.base.entity.PageDomain; import com.cpop.core.utils.SpringUtils; import com.cpop.core.utils.SqlUtils; -import com.cpop.system.business.bo.StoreRenewPageBo; -import com.cpop.system.business.bo.StoreRenewXmlBo; +import com.cpop.core.utils.StringUtils; import com.cpop.system.business.bo.StoreRunOffBo; +import com.cpop.system.business.bo.StoreSignRenewPageBo; +import com.cpop.system.business.bo.StoreSignRenewXmlBo; import com.cpop.system.business.dto.StoreRenewDto; import com.cpop.system.business.entity.StoreSign; import com.cpop.system.business.mapper.StoreSignMapper; import com.cpop.system.business.service.StoreRenewService; import com.cpop.system.business.service.StoreSignService; -import com.cpop.system.business.vo.StoreRenewPageVo; +import com.cpop.system.business.vo.StoreSignRenewPageVo; import com.mybatisflex.core.paginate.Page; import com.mybatisflex.core.query.QueryWrapper; import com.mybatisflex.spring.service.impl.ServiceImpl; @@ -21,7 +21,6 @@ import org.springframework.stereotype.Service; import java.util.List; import static com.cpop.system.business.entity.table.BrandTableDef.BRAND; -import static com.cpop.system.business.entity.table.StoreLicenseTableDef.STORE_LICENSE; import static com.cpop.system.business.entity.table.StoreRenewTableDef.STORE_RENEW; import static com.cpop.system.business.entity.table.StoreSignTableDef.STORE_SIGN; import static com.cpop.system.business.entity.table.StoreTableDef.STORE; @@ -37,18 +36,17 @@ import static com.mybatisflex.core.query.QueryMethods.*; public class StoreSignServiceImpl extends ServiceImpl implements StoreSignService { /** - * 分页查询校区续费 + * 获取校区签约续费分页 * @author DB - * @since 2023/12/14 - * @param bo 请求参数 - * @return Page + * @since 2024/3/7 + * @return Page */ @Override - public Page getStoreRenewPage(StoreRenewPageBo bo) { + public Page getStoreSignRenewPage(StoreSignRenewPageBo bo) { PageDomain pageDomain = SqlUtils.getInstance().getPageDomain(); QueryWrapper queryWrapper = QueryWrapper.create(); if (StringUtils.isNotBlank(bo.getAddrOrName())){ - queryWrapper.and(STORE_LICENSE.LICENSE_ADDR.like(bo.getAddrOrName()).or(STORE_LICENSE.LICENSE_NAME.like(bo.getAddrOrName()))); + queryWrapper.and(STORE.LICENSE_ADDR.like(bo.getAddrOrName()).or(STORE.LICENSE_FIRM_NAME.like(bo.getAddrOrName()))); } if (StringUtils.isNotBlank(bo.getBrandOrStore())){ queryWrapper.and(BRAND.BRAND_NAME.like(bo.getBrandOrStore()).or(STORE.STORE_NAME.like(bo.getBrandOrStore()))); @@ -61,47 +59,32 @@ public class StoreSignServiceImpl extends ServiceImpl item.field(StoreRenewPageVo::getLastUpdateStaffName) - .queryWrapper(updateStaff -> queryChain() - .select("name") - .from("cp_oam_staff") - .where("cp_oam_staff.user_id = ?", updateStaff.getLastUpdateUserId()))); + .leftJoin(STORE_RENEW).on(STORE_RENEW.STORE_ID.eq(STORE.ID)), + StoreSignRenewPageVo.class); } /** @@ -126,22 +109,18 @@ public class StoreSignServiceImpl extends ServiceImpl */ @Override - public List getRenewXml(StoreRenewXmlBo bo) { + public List getSignRenewXml(StoreSignRenewXmlBo bo) { return SpringUtils.getBean(StoreRenewService.class).listAs(QueryWrapper.create() .select(BRAND.BRAND_NAME) - .select(STORE.CREATE_TIME.as(StoreRenewDto::getCreateTime), STORE.PERSON_CHARGE, STORE.PHONE, STORE.STORE_NAME) + .select(STORE.CREATE_TIME.as(StoreRenewDto::getCreateTime), STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.STORE_NAME) .select(STORE_SIGN.EXPIRE_DATE, STORE_SIGN.ID) - .select(STORE_LICENSE.LICENSE_ADDR, STORE_LICENSE.LICENSE_NAME, STORE_LICENSE.LICENSE_USER_NAME) - .select(STORE_RENEW.RENEW_DATE, STORE_RENEW.RENEW_AMOUNT) - .select("cos.name as renewStaffName") + .select(STORE.LICENSE_ADDR, STORE.LICENSE_FIRM_NAME, STORE.LICENSE_USERNAME) + .select(STORE_RENEW.CREATE_TIME, STORE_RENEW.AMOUNT) .leftJoin(STORE).on(STORE.ID.eq(STORE_RENEW.STORE_ID)) .leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID)) - .leftJoin(STORE_LICENSE).on(STORE_LICENSE.STORE_ID.eq(STORE.ID)) .leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID)) - .leftJoin("cp_oam_staff").as("cos").on("cos.id = `cp_sys_store_renew`.`renew_staff_id`") - .and(STORE_RENEW.RENEW_DATE.between(bo.getStartDate(), bo.getEndDate())) - .and(BRAND.BRAND_NAME.like(bo.getBrandOrStore()).or(STORE.STORE_NAME.like(bo.getBrandOrStore()))) - .and(STORE_LICENSE.LICENSE_ADDR.like(bo.getAddrOrName()).or(STORE_LICENSE.LICENSE_NAME.like(bo.getAddrOrName()))), + .and(dateFormat(STORE_RENEW.CREATE_TIME, "%Y-%m-%d").between(bo.getStartDate(), bo.getEndDate())) + .and(BRAND.BRAND_NAME.like(bo.getBrandOrStore()).or(STORE.STORE_NAME.like(bo.getBrandOrStore()))), StoreRenewDto.class); } } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/WxPayScoreDetailServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/WxPayScoreDetailServiceImpl.java deleted file mode 100644 index f30e4b7..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/WxPayScoreDetailServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.cpop.system.business.service.impl; - -import com.mybatisflex.spring.service.impl.ServiceImpl; -import com.cpop.system.business.entity.WxPayScoreDetail; -import com.cpop.system.business.mapper.WxPayScoreDetailMapper; -import com.cpop.system.business.service.WxPayScoreDetailService; -import org.springframework.stereotype.Service; - -/** - * 微信支付分计划详情表 服务层实现。 - * - * @author DB - * @since 2024-01-08 - */ -@Service("wxPayScoreDetailService") -public class WxPayScoreDetailServiceImpl extends ServiceImpl implements WxPayScoreDetailService { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/WxPayScoreServiceImpl.java b/Cpop-System/src/main/java/com/cpop/system/business/service/impl/WxPayScoreServiceImpl.java deleted file mode 100644 index 44ee59e..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/service/impl/WxPayScoreServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.cpop.system.business.service.impl; - -import com.mybatisflex.spring.service.impl.ServiceImpl; -import com.cpop.system.business.entity.WxPayScore; -import com.cpop.system.business.mapper.WxPayScoreMapper; -import com.cpop.system.business.service.WxPayScoreService; -import org.springframework.stereotype.Service; - -/** - * 微信支付分计划表 服务层实现。 - * - * @author DB - * @since 2024-01-08 - */ -@Service("wxPayScoreService") -public class WxPayScoreServiceImpl extends ServiceImpl implements WxPayScoreService { - -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/BrandListVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/BrandListVo.java index 1bb555d..7d5bbb1 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/BrandListVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/BrandListVo.java @@ -1,7 +1,6 @@ package com.cpop.system.business.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -14,18 +13,18 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -@ApiModel(value = "Brand列表返回对象") -public class BrandListVo implements Serializable { +@Schema(description = "品牌列表返回对象") +public class BrandListVo { /** * 主键 */ - @ApiModelProperty("主键") + @Schema(description = "主键") private String id; /** * 云函数id */ - @ApiModelProperty("品牌名") + @Schema(description = "品牌名") private String brandName; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/BrandPageVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/BrandPageVo.java index 0396926..82b8943 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/BrandPageVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/BrandPageVo.java @@ -1,12 +1,10 @@ package com.cpop.system.business.vo; import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; -import java.io.Serializable; import java.time.LocalDateTime; /** @@ -16,39 +14,79 @@ import java.time.LocalDateTime; */ @Data @Accessors(chain = true) -@ApiModel(value = "Brand分页返回对象", description = "Brand分页返回对象") -public class BrandPageVo implements Serializable { - - private static final long serialVersionUID = 1L; +@Schema(description = "品牌分页返回对象") +public class BrandPageVo { /** * 主键 */ - @ApiModelProperty("主键") + @Schema(description = "主键") private String id; /** * 云函数id */ - @ApiModelProperty("品牌名") + @Schema(description = "品牌名") private String brandName; /** * 微信商户号 */ - @ApiModelProperty("微信商户号") + @Schema(description = "微信商户号") private String wxMchId; - /** - * 是否开通分账 - */ - @ApiModelProperty("是否开通分账") - private Boolean isOpenSharing; - /** * 创建时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") - @ApiModelProperty("创建时间") + @Schema(description = "创建时间") private LocalDateTime createTime; + + /** + * 品牌总部地址 + */ + @Schema(description = "品牌总部地址") + private String brandAddr; + + /** + * 总部公司属性(0:个体;1:企业) + */ + @Schema(description = "总部公司属性(0:个体;1:企业)") + private Boolean licenseStats; + + /** + * 总部营业执照图片地址 + */ + @Schema(description = "总部营业执照图片地址") + private String licensePicUrl; + + /** + * 总部营业执照社会信用代码 + */ + @Schema(description = "总部营业执照社会信用代码") + private String licenseCreditCode; + + /** + * 总部营业执照公司名 + */ + @Schema(description = "总部营业执照公司名") + private String licenseFirmName; + + /** + * 总部营业执照法人名 + */ + @Schema(description = "总部营业执照法人名") + private String licenseUsername; + + /** + * 总部营业执照地址 + */ + @Schema(description = "总部营业执照地址") + private String licenseAddr; + + /** + * 总部营业执照日期 + */ + @Schema(description = "总部营业执照日期") + private String licenseDate; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/DictDataListVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/DictDataListVo.java index 941d68f..5c92331 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/DictDataListVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/DictDataListVo.java @@ -1,7 +1,6 @@ package com.cpop.system.business.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -12,55 +11,55 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -@ApiModel(value = "字典数据返回对象") +@Schema(description = "字典数据返回对象") public class DictDataListVo { /** * id */ - @ApiModelProperty(value = "id") + @Schema(description = "id") private String id; /** * 字典标签 */ - @ApiModelProperty(value = "字典标签") + @Schema(description = "字典标签") private String dictLabel; /** * 字典值 */ - @ApiModelProperty(value = "字典值") + @Schema(description = "字典值") private String dictValue; /** * 字典类型 */ - @ApiModelProperty(value = "字典类型") + @Schema(description = "字典类型") private String dictType; /** * 排序 */ - @ApiModelProperty(value = "排序") + @Schema(description = "排序") private String dictSort; /** * 样式属性(其他样式扩展) */ - @ApiModelProperty(value = "样式属性(其他样式扩展)") + @Schema(description = "样式属性(其他样式扩展)") private String cssClass; /** * 表格回显样式 */ - @ApiModelProperty(value = "表格回显样式") + @Schema(description = "表格回显样式") private String listClass; /** * 是否默认(1是 0否) */ - @ApiModelProperty(value = "是否默认(1是 0否)") + @Schema(description = "是否默认(1是 0否)") private Boolean isDefault; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/DictDataPageVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/DictDataPageVo.java index c2513c1..73a144f 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/DictDataPageVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/DictDataPageVo.java @@ -1,8 +1,7 @@ package com.cpop.system.business.vo; import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -16,49 +15,49 @@ import java.time.LocalDateTime; */ @Data @Accessors(chain = true) -@ApiModel(value = "字典数据分页") +@Schema(description = "字典数据分页返回") public class DictDataPageVo { /** * id */ - @ApiModelProperty(value = "id") + @Schema(description = "id") private String id; /** * 字典标签 */ - @ApiModelProperty(value = "字典标签") + @Schema(description = "字典标签") private String dictLabel; /** * 字典值 */ - @ApiModelProperty(value = "字典值") + @Schema(description = "字典值") private String dictValue; /** * 字典类型 */ - @ApiModelProperty(value = "字典类型") + @Schema(description = "字典类型") private String dictType; /** * 状态 */ - @ApiModelProperty(value = "状态") + @Schema(description = "状态") private Boolean status; /** * 排序 */ - @ApiModelProperty(value = "排序") + @Schema(description = "排序") private Integer dictSort; /** * 更新时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") - @ApiModelProperty(value = "更新时间") + @Schema(description = "更新时间") private LocalDateTime updateTime; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/DictDataVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/DictDataVo.java index 84d2159..878c62f 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/DictDataVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/DictDataVo.java @@ -1,7 +1,6 @@ package com.cpop.system.business.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -12,66 +11,66 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -@ApiModel(value = "品牌分页返回参数") +@Schema(description = "品牌分页返回参数") public class DictDataVo { /** * id */ - @ApiModelProperty(value = "id") + @Schema(description = "id") private String id; /** * 字典标签 */ - @ApiModelProperty(value = "字典标签") + @Schema(description = "字典标签") private String dictLabel; /** * 字典值 */ - @ApiModelProperty(value = "字典值") + @Schema(description = "字典值") private String dictValue; /** * 字典类型 */ - @ApiModelProperty(value = "字典类型") + @Schema(description = "字典类型") private String dictType; /** * 排序 */ - @ApiModelProperty(value = "排序") + @Schema(description = "排序") private String dictSort; /** * 样式属性(其他样式扩展) */ - @ApiModelProperty(value = "样式属性(其他样式扩展)") + @Schema(description = "样式属性(其他样式扩展)") private String cssClass; /** * 表格回显样式 */ - @ApiModelProperty(value = "表格回显样式") + @Schema(description = "表格回显样式") private String listClass; /** * 是否默认(1是 0否) */ - @ApiModelProperty(value = "是否默认(1是 0否)") + @Schema(description = "是否默认(1是 0否)") private Boolean isDefault; /** * 状态(1正常 0停用) */ - @ApiModelProperty(value = "状态(1正常 0停用)") + @Schema(description = "状态(1正常 0停用)") private Boolean status; /** * 备注 */ - @ApiModelProperty(value = "备注") + @Schema(description = "备注") private String remark; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/DictTypePageVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/DictTypePageVo.java index 7164e86..325fbad 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/DictTypePageVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/DictTypePageVo.java @@ -1,8 +1,7 @@ package com.cpop.system.business.vo; import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.time.LocalDateTime; @@ -14,37 +13,37 @@ import java.time.LocalDateTime; * @since 2023-12-01 15:15 */ @Data -@ApiModel(value = "品牌参数") +@Schema(description = "品牌参数") public class DictTypePageVo { /** * 主键 */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") private String id; /** * 字典名 */ - @ApiModelProperty(value = "字典名") + @Schema(description = "字典名") private String dictName; /** * 字典类型 */ - @ApiModelProperty(value = "字典类型") + @Schema(description = "字典类型") private String dictType; /** * 状态 */ - @ApiModelProperty(value = "状态") + @Schema(description = "状态") private Boolean status; /** * 更新时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") - @ApiModelProperty(value = "更新时间") + @Schema(description = "更新时间") private LocalDateTime updateTime; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/DictTypeVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/DictTypeVo.java index ed90f2a..ede4d2f 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/DictTypeVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/DictTypeVo.java @@ -1,11 +1,8 @@ package com.cpop.system.business.vo; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; -import org.joda.time.LocalDateTime; /** * 字典类型参数 @@ -15,36 +12,36 @@ import org.joda.time.LocalDateTime; */ @Data @Accessors(chain = true) -@ApiModel(value = "字典类型参数") +@Schema(description = "字典类型参数") public class DictTypeVo { /** * 主键 */ - @ApiModelProperty(value = "主键") + @Schema(description = "主键") private String id; /** * 字典名 */ - @ApiModelProperty(value = "字典名") + @Schema(description = "字典名") private String dickName; /** * 字典类型 */ - @ApiModelProperty(value = "字典类型") + @Schema(description = "字典类型") private String dickType; /** * 状态(0正常 1停用) */ - @ApiModelProperty(value = "状态(0正常 1停用)") + @Schema(description = "状态(0正常 1停用)") private Boolean status; /** * 备注 */ - @ApiModelProperty(value = "备注") + @Schema(description = "备注") private String remark; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/LoginUserInfoVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/LoginUserInfoVo.java index 16d4a34..2546a11 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/LoginUserInfoVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/LoginUserInfoVo.java @@ -1,11 +1,10 @@ package com.cpop.system.business.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; -import java.util.Set; +import java.util.List; /** * 登录用户的基本信息 @@ -15,56 +14,50 @@ import java.util.Set; */ @Data @Accessors(chain = true) -@ApiModel +@Schema(description = "登录用户的基本信息") public class LoginUserInfoVo { + /** + * 员工id + */ + @Schema(description = "员工id") + private String id; + /** * 用户id */ - @ApiModelProperty("用户id") + @Schema(description = "用户id") private String userId; /** * 头像 */ - @ApiModelProperty("头像") + @Schema(description = "头像") private String avatar; /** * 登录用户名 */ - @ApiModelProperty("登录用户名") + @Schema(description = "登录用户名") private String username; /** * 真实姓名 */ - @ApiModelProperty("真实姓名") + @Schema(description = "真实姓名") private String realName; - /** - * 介绍 - */ - @ApiModelProperty("介绍") - private String desc; - /** * 用户首页路由 */ - @ApiModelProperty("用户首页路由") + @Schema(description = "用户首页路由") private String homePath; /** * 权限信息 */ - @ApiModelProperty("权限信息") - private Set permissions; - - /** - * 角色 - */ - @ApiModelProperty("角色") - private Set roles; + @Schema(description = "权限信息") + private List permissions; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuRouteVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuRouteVo.java index e7945c2..bb63bcc 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuRouteVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuRouteVo.java @@ -1,12 +1,10 @@ package com.cpop.system.business.vo; import com.mybatisflex.annotation.Column; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; -import java.io.Serializable; import java.util.List; /** @@ -17,100 +15,98 @@ import java.util.List; */ @Data @Accessors(chain = true) -@ApiModel(value = "Menu对象", description = "") -public class MenuRouteVo implements Serializable { - - private static final long serialVersionUID = 1L; - +@Schema(description = "Menu对象") +public class MenuRouteVo { + /** * 菜单ID */ - @ApiModelProperty("菜单ID") + @Schema(description = "菜单ID") private String id; /** * 父级菜单ID */ - @ApiModelProperty("父级菜单ID") + @Schema(description = "父级菜单ID") private String parentMenu; /** * 菜单名 */ - @ApiModelProperty("菜单名") + @Schema(description = "菜单名") private String name; /** * 菜单图标 */ - @ApiModelProperty("菜单图标") + @Schema(description = "菜单图标") private String icon; /** * 菜单路由,父菜单为空 */ - @ApiModelProperty("菜单路由,父菜单为空") + @Schema(description = "菜单路由,父菜单为空") private String component; /** * 标记菜单的状态 0:禁用 1:正常(根据权限正常显示) */ - @ApiModelProperty("标记菜单的状态 0:禁用 1:正常(根据权限正常显示)") + @Schema(description = "标记菜单的状态 0:禁用 1:正常(根据权限正常显示)") private Boolean status; /** * 用户类型,1管理员,2审计管理员,3安全管理员,4普通用户 */ - @ApiModelProperty("用户类型,1管理员,2审计管理员,3安全管理员,4普通用户") + @Schema(description = "用户类型,1管理员,2审计管理员,3安全管理员,4普通用户") private String type; /** * 权限 */ - @ApiModelProperty("权限") + @Schema(description = "权限") private String permission; /** * 重定向路径,一级菜单有值 */ - @ApiModelProperty("重定向路径,一级菜单有值") + @Schema(description = "重定向路径,一级菜单有值") private String redirect; /** * 排序,值越小越靠前,一级菜单有值 */ - @ApiModelProperty("排序,值越小越靠前,一级菜单有值") + @Schema(description = "排序,值越小越靠前,一级菜单有值") private Integer orderNo; /** * 子菜单集 */ @Column(ignore = true) - @ApiModelProperty("子菜单集") + @Schema(description = "子菜单集") private List children; /** * 路由地址 */ - @ApiModelProperty("路由地址") + @Schema(description = "路由地址") private String path; /** * 标题 */ - @ApiModelProperty("标题") + @Schema(description = "标题") private String title; /** * 隐藏菜单 */ - @ApiModelProperty("隐藏菜单") + @Schema(description = "隐藏菜单") private Boolean hideMenu; /** * 是否忽略KeepAlive缓存 */ - @ApiModelProperty("是否忽略KeepAlive缓存") + @Schema(description = "是否忽略KeepAlive缓存") private Boolean ignoreKeepAlive; //private Boolean keepalive; @@ -118,7 +114,7 @@ public class MenuRouteVo implements Serializable { * 内部定义类 */ @Column(ignore = true) - @ApiModelProperty("内部定义类") + @Schema(description = "内部定义类") private Meta meta; /** diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuVo.java index bf3d021..7eba577 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/MenuVo.java @@ -1,12 +1,10 @@ package com.cpop.system.business.vo; import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; -import java.io.Serializable; import java.time.LocalDateTime; import java.util.List; @@ -18,106 +16,104 @@ import java.util.List; */ @Data @Accessors(chain = true) -@ApiModel(description = "菜单返回对象") -public class MenuVo implements Serializable { - - private static final long serialVersionUID = 1L; +@Schema(description = "菜单返回对象") +public class MenuVo { /** * 菜单ID */ - @ApiModelProperty(value = "菜单ID") + @Schema(description = "菜单ID") private String id; /** * 父级菜单ID */ - @ApiModelProperty(value = "父级菜单ID") + @Schema(description = "父级菜单ID") private String parentMenu; /** * 菜单名称 */ - @ApiModelProperty(value = "菜单名称") + @Schema(description = "菜单名称") private String name; /** * 菜单图标 */ - @ApiModelProperty(value = "菜单图标") + @Schema(description = "菜单图标") private String icon; /** * 菜单路由,父菜单为空 */ - @ApiModelProperty(value = "菜单路由,父菜单为空") + @Schema(description = "菜单路由,父菜单为空") private String component; /** * 标记菜单的状态 0:禁用 1:启用(根据权限正常显示) */ - @ApiModelProperty(value = "标记菜单的状态 0:禁用 1:启用(根据权限正常显示)") + @Schema(description = "标记菜单的状态 0:禁用 1:启用(根据权限正常显示)") private Boolean status; /** * 权限 */ - @ApiModelProperty(value = "权限") + @Schema(description = "权限") private String permission; /** * 重定向路径,一级菜单有值 */ - @ApiModelProperty(value = "重定向路径,一级菜单有值") + @Schema(description = "重定向路径,一级菜单有值") private String redirect; /** * 排序,值越小越靠前,一级菜单有值 */ - @ApiModelProperty(value = "排序,值越小越靠前,一级菜单有值") + @Schema(description = "排序,值越小越靠前,一级菜单有值") private Integer orderNo; /** * 路由地址 */ - @ApiModelProperty(value = "路由地址") + @Schema(description = "路由地址") private String path; /** * 标题 */ - @ApiModelProperty(value = "标题") + @Schema(description = "标题") private String title; /** * 子菜单集 */ - @ApiModelProperty(value = "子菜单集") + @Schema(description = "子菜单集") private List children; /** * 更新时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") - @ApiModelProperty(value = "更新时间") + @Schema(description = "更新时间") private LocalDateTime updateTime; /** * 菜单类型,0:目录,1:菜单,2:按钮 */ - @ApiModelProperty(value = "菜单类型,0:目录,1:菜单,2:按钮") + @Schema(description = "菜单类型,0:目录,1:菜单,2:按钮") private Integer type; /** * 隐藏菜单 */ - @ApiModelProperty(value = "隐藏菜单") + @Schema(description = "隐藏菜单") private Boolean hideMenu; /** * 是否忽略KeepAlive缓存 */ - @ApiModelProperty(value = "是否忽略KeepAlive缓存") + @Schema(description = "是否忽略KeepAlive缓存") private Boolean ignoreKeepAlive; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/RolePageVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/RolePageVo.java index 8220956..8ebd497 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/RolePageVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/RolePageVo.java @@ -2,13 +2,10 @@ package com.cpop.system.business.vo; import com.fasterxml.jackson.annotation.JsonFormat; import com.mybatisflex.annotation.Column; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; -import java.io.Serializable; -import java.sql.Timestamp; import java.time.LocalDateTime; import java.util.List; @@ -20,58 +17,56 @@ import java.util.List; */ @Data @Accessors(chain = true) -@ApiModel(value = "Role分页返回对象") -public class RolePageVo implements Serializable { - - private static final long serialVersionUID = 1L; +@Schema(description = "角色分页返回对象") +public class RolePageVo { /** * 主键 */ - @ApiModelProperty("主键") + @Schema(description = "主键") private String id; /** * 角色名称 */ - @ApiModelProperty("角色名称") + @Schema(description = "角色名称") private String roleName; /** * 角色值 */ - @ApiModelProperty("角色值") + @Schema(description = "角色值") private String roleValue; /** * 状态 */ - @ApiModelProperty("状态") + @Schema(description = "状态") private Boolean status; /** * 备注 */ - @ApiModelProperty("备注") + @Schema(description = "备注") private String remark; /** * 排序 */ - @ApiModelProperty("排序") + @Schema(description = "排序") private Integer orderNo; /** * 更新时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") - @ApiModelProperty("更新时间") + @Schema(description = "更新时间") private LocalDateTime updateTime; /** * 角色所属菜单id集合 */ - @ApiModelProperty("角色所属菜单id集合") + @Schema(description = "角色所属菜单id集合") @Column(ignore = true) private List menuIds; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/RoleVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/RoleVo.java index 0d9690e..4a0aeb7 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/RoleVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/RoleVo.java @@ -1,7 +1,6 @@ package com.cpop.system.business.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -15,45 +14,43 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -@ApiModel(value = "SysRole对象", description = "角色信息") -public class RoleVo implements Serializable { - - private static final long serialVersionUID = 1L; - +@Schema(description = "角色信息") +public class RoleVo { + /** * 主键 */ - @ApiModelProperty("主键") + @Schema(description = "主键") private String id; /** * 角色名称 */ - @ApiModelProperty("角色名称") + @Schema(description = "角色名称") private String roleName; /** * 角色值 */ - @ApiModelProperty("角色值") + @Schema(description = "角色值") private String roleValue; /** * 状态 0:禁用 1:正常 */ - @ApiModelProperty("状态 0:禁用 1:正常") + @Schema(description = "状态 0:禁用 1:正常") private Boolean status; /** * 备注 */ - @ApiModelProperty("备注") + @Schema(description = "备注") private String remark; /** * 排序 */ - @ApiModelProperty("排序") + @Schema(description = "排序") private Integer orderNo; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/StoreListByBrandVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/StoreListByBrandVo.java index 5e7bf94..01bd407 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/StoreListByBrandVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/StoreListByBrandVo.java @@ -1,7 +1,6 @@ package com.cpop.system.business.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -12,24 +11,24 @@ import lombok.experimental.Accessors; */ @Data @Accessors(chain = true) -@ApiModel(value = "StoreList对象", description = "校区表") +@Schema(description = "校区列表对象") public class StoreListByBrandVo { /** * 主键 */ - @ApiModelProperty("主键") + @Schema(description = "主键") private String id; /** * 品牌id */ - @ApiModelProperty("品牌id") + @Schema(description = "品牌id") private String brandId; /** * 校区名 */ - @ApiModelProperty("校区名") + @Schema(description = "校区名") private String name; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/StorePageVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/StorePageVo.java index b536011..b5afe97 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/StorePageVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/StorePageVo.java @@ -1,8 +1,7 @@ package com.cpop.system.business.vo; import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; import java.io.Serializable; @@ -16,93 +15,63 @@ import java.time.LocalDateTime; */ @Data @Accessors(chain = true) -@ApiModel(value = "校区/店铺分页返回对象") +@Schema(description = "校区/店铺分页返回对象") public class StorePageVo implements Serializable { /** * 店铺/校区id */ - @ApiModelProperty("主键") + @Schema(description = "主键") private String id; - /** - * 云校区id - */ - @ApiModelProperty("云校区id") - private String storeCloudId; - - /** - * 品牌id - */ - @ApiModelProperty("品牌id") - private String brandId; - /** * 品牌名 */ - @ApiModelProperty("品牌名") + @Schema(description = "品牌名") private String brandName; /** * 店铺/校区名 */ - @ApiModelProperty("店铺/校区名") + @Schema(description = "店铺/校区名") private String storeName; - /** - * 数据来源 - */ - @ApiModelProperty("数据来源") - private SourceType sourceType; - /** * 创建时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") - @ApiModelProperty("创建时间") + @Schema(description = "创建时间") private LocalDateTime createTime; /** * 店铺/校区地址 */ - @ApiModelProperty("店铺/校区地址") + @Schema(description = "店铺/校区地址") private String storeAddr; /** * 负责人 */ - @ApiModelProperty("负责人") + @Schema(description = "负责人") private String personCharge; /** * 手机号 */ - @ApiModelProperty("手机号") + @Schema(description = "手机号") private String phone; /** * 到期日期 */ @JsonFormat(pattern = "yyyy-MM-dd") - @ApiModelProperty("到期日期") + @Schema(description = "到期日期") private LocalDate expireDate; - /** - * 是否有顾问 - */ - @ApiModelProperty("是否有顾问") - private Boolean haveCounselor; - - /** - * 是否激活 - */ - @ApiModelProperty("是否激活") - private Boolean haveActive; - /** * 微信商户号 */ - @ApiModelProperty("微信商户号") + @Schema(description = "微信商户号") private String wxMchId; } diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/StoreRenewPageVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/StoreRenewPageVo.java deleted file mode 100644 index bca722a..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/StoreRenewPageVo.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.cpop.system.business.vo; - -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import lombok.experimental.Accessors; - -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.LocalDateTime; - -/** - * @author DB - * @version 1.0.0 - * @since 2023-12-14 9:54 - */ -@Data -@Accessors(chain = true) -@ApiModel(value = "校区/店铺对象", description = "校区/店铺对象") -public class StoreRenewPageVo { - - /** - * 品牌名 - */ - @ApiModelProperty(value = "品牌名") - private String brandName; - /** - * 注册时间 - */ - @ApiModelProperty(value = "注册时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8") - private LocalDateTime createTime; - /** - * 到期日期 - */ - @ApiModelProperty(value = "到期日期") - private LocalDate expireDate; - /** - * 主键,主键 - */ - @ApiModelProperty(value = "主键") - private String id; - /** - * 营业执照地址 - */ - @ApiModelProperty(value = "营业执照地址") - private String licenseAddr; - /** - * 营业执照公司 - */ - @ApiModelProperty(value = "营业执照公司") - private String licenseName; - /** - * 营业执照法人 - */ - @ApiModelProperty(value = "营业执照法人") - private String licenseUserName; - /** - * 联系人 - */ - @ApiModelProperty(value = "联系人") - private String personChange; - /** - * 联系电话 - */ - @ApiModelProperty(value = "联系电话") - private String phone; - /** - * 校区名 - */ - @ApiModelProperty(value = "校区名") - private String storeName; - /** - * 续费时间 - */ - @ApiModelProperty(value = "续费时间") - private LocalDate renewDate; - - /** - * 续费金额 - */ - @ApiModelProperty(value = "续费金额") - private BigDecimal renewAmount; - /** - * 续费人 - */ - @ApiModelProperty(value = "续费人") - private String renewStaffName; - - /** - * 流失日期 - */ - @ApiModelProperty(value = "流失日期") - private LocalDate runOffDate; - - /** - * 流失原因 - */ - @ApiModelProperty(value = "流失原因") - private String runOffReason; - - /** - * 最后操作员工Id - */ - @ApiModelProperty(value = "最后操作员工Id") - private String lastUpdateUserId; - - /** - * 最后操作员工 - */ - @ApiModelProperty(value = "最后操作员工") - private String lastUpdateStaffName; -} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/StoreSignRenewPageVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/StoreSignRenewPageVo.java new file mode 100644 index 0000000..310eba5 --- /dev/null +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/StoreSignRenewPageVo.java @@ -0,0 +1,64 @@ +package com.cpop.system.business.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * @author DB + * @version 1.0.0 + * @since 2024-03-13 10:23 + */ +@Data +@Accessors(chain = true) +@Schema( description = "校区签约续费分页返回参数") +public class StoreSignRenewPageVo { + + /** + * 签约id + */ + @Schema(description = "签约id") + private String id; + + /** + * 校区id + */ + @Schema(description = "校区id") + private String storeId; + + /** + * 校区名称 + */ + @Schema(description = "校区名称") + private String storeName; + + /** + * 生效版本 + */ + @Schema(description = "生效版本") + private String takeEffectVersion; + + /** + * 生效时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @Schema(description = "生效时间") + private LocalDateTime takeEffectTime; + + /** + * 到期日期 + */ + @Schema(description = "到期日期") + private LocalDate expireDate; + + /** + * 校区创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @Schema(description = "校区创建时间") + private LocalDateTime createTime; +} diff --git a/Cpop-System/src/main/java/com/cpop/system/business/vo/SysFileVo.java b/Cpop-System/src/main/java/com/cpop/system/business/vo/SysFileVo.java index 3ad55d4..0bd97e8 100644 --- a/Cpop-System/src/main/java/com/cpop/system/business/vo/SysFileVo.java +++ b/Cpop-System/src/main/java/com/cpop/system/business/vo/SysFileVo.java @@ -1,7 +1,6 @@ package com.cpop.system.business.vo; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.experimental.Accessors; @@ -15,31 +14,31 @@ import java.io.Serializable; */ @Data @Accessors(chain = true) -@ApiModel(value = "SysFileVo对象", description = "文件上传下载返回对象") +@Schema(description = "文件上传下载返回对象") public class SysFileVo implements Serializable { /** * 路径 */ - @ApiModelProperty("路径") + @Schema(description = "路径") private String url; /** * 文件名 */ - @ApiModelProperty("文件名") + @Schema(description = "文件名") private String fileName; /** * 新文件名 */ - @ApiModelProperty("新文件名") + @Schema(description = "新文件名") private String newFileName; /** * 文件源 */ - @ApiModelProperty("文件源") + @Schema(description = "文件源") private String originalFilename; } diff --git a/Cpop-System/src/main/java/com/cpop/system/framework/config/tencentCos/TencentCosProperties.java b/Cpop-System/src/main/java/com/cpop/system/framework/config/tencentCos/TencentCosProperties.java new file mode 100644 index 0000000..f6f9a81 --- /dev/null +++ b/Cpop-System/src/main/java/com/cpop/system/framework/config/tencentCos/TencentCosProperties.java @@ -0,0 +1,40 @@ +package com.cpop.system.framework.config.tencentCos; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * @author DB + * @createTime 2023/10/31 15:46 + * @description 腾讯yun配置 + */ +@Data +@ConfigurationProperties(prefix = "tencent.cos") +public class TencentCosProperties { + + /** + * id + */ + private String secretId; + + /** + * 密钥 + */ + private String secretKey; + + /** + * 桶名 + */ + private String bucketName; + + /** + * 加速路径 + */ + private String cdnUrl; + + /** + * 地区 + */ + private String region; + +} diff --git a/Cpop-System/src/main/java/com/cpop/system/framework/handler/TencentCosHandler.java b/Cpop-System/src/main/java/com/cpop/system/framework/handler/TencentCosHandler.java new file mode 100644 index 0000000..f210dd4 --- /dev/null +++ b/Cpop-System/src/main/java/com/cpop/system/framework/handler/TencentCosHandler.java @@ -0,0 +1,202 @@ +package com.cpop.system.framework.handler; + +import com.alibaba.fastjson2.JSONObject; +import com.cpop.core.base.exception.UtilException; +import com.cpop.core.utils.file.FileTypeUtils; +import com.cpop.core.utils.uuid.IdUtils; +import com.cpop.system.business.dto.BizLicenseOcrDto; +import com.cpop.system.framework.config.tencentCos.TencentCosProperties; +import com.qcloud.cos.COSClient; +import com.qcloud.cos.ClientConfig; +import com.qcloud.cos.auth.BasicCOSCredentials; +import com.qcloud.cos.auth.COSCredentials; +import com.qcloud.cos.http.HttpProtocol; +import com.qcloud.cos.model.ObjectMetadata; +import com.qcloud.cos.model.PutObjectRequest; +import com.qcloud.cos.model.StorageClass; +import com.qcloud.cos.model.UploadResult; +import com.qcloud.cos.region.Region; +import com.qcloud.cos.transfer.TransferManager; +import com.qcloud.cos.transfer.TransferManagerConfiguration; +import com.qcloud.cos.transfer.Upload; +import com.tencentcloudapi.common.Credential; +import com.tencentcloudapi.common.exception.TencentCloudSDKException; +import com.tencentcloudapi.common.profile.ClientProfile; +import com.tencentcloudapi.common.profile.HttpProfile; +import com.tencentcloudapi.faceid.v20180301.models.DetectAuthResponse; +import com.tencentcloudapi.ocr.v20181119.OcrClient; +import com.tencentcloudapi.ocr.v20181119.models.BizLicenseOCRRequest; +import com.tencentcloudapi.ocr.v20181119.models.BizLicenseOCRResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; +import java.io.InputStream; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +/** + * @author DB + * @createTime 2023/10/31 15:03 + * @description 腾讯云SDK相关工具类 + */ +@Component +@EnableConfigurationProperties(TencentCosProperties.class) +public class TencentCosHandler { + + /** + * 腾讯云配置 + */ + @Autowired + private TencentCosProperties properties; + + private TransferManager transferManager; + + /** + * @descriptions 初始化创建TransferManager 实例,这个实例用来后续调用高级接口 + * @author DB + * @date 2023/11/01 10:34 + * @return: void + */ + public void createTransferManager(){ + // 创建一个 COSClient 实例,这是访问 COS 服务的基础实例。 + // 详细代码参见本页: 简单操作 -> 创建 COSClient + COSClient cosClient = createCosClient(); + // 自定义线程池大小,建议在客户端与 COS 网络充足(例如使用腾讯云的 CVM,同地域上传 COS)的情况下,设置成16或32即可,可较充分的利用网络资源 + // 对于使用公网传输且网络带宽质量不高的情况,建议减小该值,避免因网速过慢,造成请求超时。 + ExecutorService threadPool = Executors.newFixedThreadPool(32); + // 传入一个 threadPool, 若不传入线程池,默认 TransferManager 中会生成一个单线程的线程池。 + transferManager = new TransferManager(cosClient, threadPool); + // 设置高级接口的配置项 + // 分块上传阈值和分块大小分别为 5MB 和 1MB + TransferManagerConfiguration transferManagerConfiguration = new TransferManagerConfiguration(); + transferManagerConfiguration.setMultipartUploadThreshold(5 * 1024 * 1024); + transferManagerConfiguration.setMinimumUploadPartSize(1024 * 1024); + transferManager.setConfiguration(transferManagerConfiguration); + } + + /** + * @descriptions 创建 COSClient 实例,这个实例用来后续调用请求 + * @author DB + * @date 2023/10/31 16:47 + * @return: com.qcloud.cos.COSClient + */ + private COSClient createCosClient() { + // 设置用户身份信息。 + // SECRETID 和 SECRETKEY 请登录访问管理控制台 https://console.cloud.tencent.com/cam/capi 进行查看和管理 + // 用户的 SecretId,建议使用子账号密钥,授权遵循最小权限指引,降低使用风险。子账号密钥获取可参见 https://cloud.tencent.com/document/product/598/37140 + String secretId = properties.getSecretId(); + // 用户的 SecretKey,建议使用子账号密钥,授权遵循最小权限指引,降低使用风险。子账号密钥获取可参见 https://cloud.tencent.com/document/product/598/37140 + String secretKey = properties.getSecretKey(); + COSCredentials cred = new BasicCOSCredentials(secretId, secretKey); + // ClientConfig 中包含了后续请求 COS 的客户端设置: + ClientConfig clientConfig = new ClientConfig(); + // 设置 bucket 的地域 + // COS_REGION 请参见 https://cloud.tencent.com/document/product/436/6224 + clientConfig.setRegion(new Region(properties.getRegion())); + // 设置请求协议, http 或者 https + // 5.6.53 及更低的版本,建议设置使用 https 协议 + // 5.6.54 及更高版本,默认使用了 https + clientConfig.setHttpProtocol(HttpProtocol.https); + // 以下的设置,是可选的: + // 设置 socket 读取超时,默认 30s + clientConfig.setSocketTimeout(30 * 1000); + // 设置建立连接超时,默认 30s + clientConfig.setConnectionTimeout(30 * 1000); + // 如果需要的话,设置 http 代理,ip 以及 port + //clientConfig.setHttpProxyIp("httpProxyIp"); + //clientConfig.setHttpProxyPort(80); + // 生成 cos 客户端。 + return new COSClient(cred, clientConfig); + } + + /** + * @descriptions 关闭 TransferManager + * @author DB + * @date 2023/10/31 17:09 + * @param transferManager 管理器 + * @return: void + */ + public void shutdownTransferManager(TransferManager transferManager) { + // 指定参数为 true, 则同时会关闭 transferManager 内部的 COSClient 实例。 + // 指定参数为 false, 则不会关闭 transferManager 内部的 COSClient 实例。 + transferManager.shutdownNow(true); + } + + /** + * @descriptions cdn上传 + * @author DB + * @date 2023/10/31 17:21 + * @param file 文件 + * @return: com.qcloud.cos.model.UploadResult + */ + public UploadResult cdnUpload(MultipartFile file) { + createTransferManager(); + String fileType = FileTypeUtils.getInstance().getFileType(file.getOriginalFilename()); + try { + ObjectMetadata objectMetadata = new ObjectMetadata(); + // 上传的流如果能够获取准确的流长度,则推荐一定填写 content-length + // 如果确实没办法获取到,则下面这行可以省略,但同时高级接口也没办法使用分块上传了 + objectMetadata.setContentLength(file.getSize()); + objectMetadata.setContentType(file.getContentType()); + InputStream inputStream = file.getInputStream(); + PutObjectRequest putObjectRequest = new PutObjectRequest(properties.getBucketName(), IdUtils.fastSimpleUUID() + "." + fileType, inputStream, objectMetadata); + // 设置存储类型(如有需要,不需要请忽略此行代码), 默认是标准(Standard), 低频(standard_ia) + // 更多存储类型请参见 https://cloud.tencent.com/document/product/436/33417 + putObjectRequest.setStorageClass(StorageClass.Standard); + Upload upload = transferManager.upload(putObjectRequest); + UploadResult uploadResult = upload.waitForUploadResult(); + inputStream.close(); + return uploadResult; + } catch (IOException | InterruptedException e) { + throw new UtilException(e); + } finally { + shutdownTransferManager(transferManager); + } + } + + /** + * @descriptions 获取cdn路径 + * @author DB + * @date 2023/10/31 17:56 + * @return: java.lang.String + */ + public String getCdnUrl(){ + return properties.getCdnUrl(); + } + + /** + * 营业执照检测 + * @author DB + * @since 2024/3/1 + * @param base64Img 图片地址 + * @return BizLicenseOcr + */ + public BizLicenseOcrDto bizLicenseOcr(String base64Img) { + try{ + // 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey,此处还需注意密钥对的保密 + // 代码泄露可能会导致 SecretId 和 SecretKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议采用更安全的方式来使用密钥,请参见:https://cloud.tencent.com/document/product/1278/85305 + // 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取 + Credential cred = new Credential(properties.getSecretId(), properties.getSecretKey()); + // 实例化一个http选项,可选的,没有特殊需求可以跳过 + HttpProfile httpProfile = new HttpProfile(); + httpProfile.setEndpoint("ocr.tencentcloudapi.com"); + // 实例化一个client选项,可选的,没有特殊需求可以跳过 + ClientProfile clientProfile = new ClientProfile(); + clientProfile.setHttpProfile(httpProfile); + // 实例化要请求产品的client对象,clientProfile是可选的 + OcrClient client = new OcrClient(cred, properties.getRegion(), clientProfile); + // 实例化一个请求对象,每个接口都会对应一个request对象 + BizLicenseOCRRequest req = new BizLicenseOCRRequest(); + req.setImageBase64(base64Img); + // 返回的resp是一个BizLicenseOCRResponse的实例,与请求对象对应 + BizLicenseOCRResponse resp = client.BizLicenseOCR(req); + // 输出json格式的字符串回包 + return JSONObject.parseObject(DetectAuthResponse.toJsonString(resp), BizLicenseOcrDto.class); + } catch (TencentCloudSDKException e) { + throw new UtilException(e.getMessage()); + } + } +} diff --git a/Cpop-System/src/main/java/com/cpop/system/framework/utils/DictUtils.java b/Cpop-System/src/main/java/com/cpop/system/framework/utils/DictUtils.java index 4a850cc..40876ba 100644 --- a/Cpop-System/src/main/java/com/cpop/system/framework/utils/DictUtils.java +++ b/Cpop-System/src/main/java/com/cpop/system/framework/utils/DictUtils.java @@ -1,18 +1,19 @@ package com.cpop.system.framework.utils; +import cn.dev33.satoken.stp.StpUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson2.JSONObject; -import com.cpop.common.constant.Constants; -import com.cpop.common.utils.StringUtils; import com.cpop.core.base.enums.UserType; +import com.cpop.core.constant.Constants; import com.cpop.core.service.RedisService; import com.cpop.core.utils.SpringUtils; +import com.cpop.core.utils.StringUtils; import com.cpop.system.business.entity.DictData; -import org.springframework.data.redis.cache.RedisCache; import java.util.Collection; import java.util.Comparator; import java.util.List; +import java.util.Objects; import java.util.stream.Collectors; /** @@ -159,11 +160,7 @@ public class DictUtils { * @return 缓存键key */ public static String getCacheKey(String configKey) { - LoginUser loginUser = SecurityUtils.getInstance().getLoginUser(); - if (loginUser == null) { - return Constants.SYS_DICT_KEY + UserType.OAM_USER + ":" + configKey; - } else { - return Constants.SYS_DICT_KEY + loginUser.getUserType() + ":" + configKey; - } + UserType userType = (UserType) StpUtil.getSession().get("userType"); + return Constants.SYS_DICT_KEY + Objects.requireNonNullElse(userType, UserType.OAM_USER) + ":" + configKey; } } diff --git a/Cpop-System/src/main/java/com/cpop/system/framework/ws/config/WebSocketConfig.java b/Cpop-System/src/main/java/com/cpop/system/framework/ws/config/WebSocketConfig.java deleted file mode 100644 index 4941eb3..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/framework/ws/config/WebSocketConfig.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.cpop.system.framework.ws.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.socket.config.annotation.EnableWebSocket; -import org.springframework.web.socket.server.standard.ServerEndpointExporter; - -/** - * @author DB - * @createTime 2023/11/23 18:22 - * @description webSocket配置 - */ -@Configuration -//开启webSocket -@EnableWebSocket -public class WebSocketConfig { - - @Bean - public ServerEndpointExporter serverEndpointExporter() { - return new ServerEndpointExporter(); - } -} diff --git a/Cpop-System/src/main/java/com/cpop/system/framework/ws/server/WebSocketServer.java b/Cpop-System/src/main/java/com/cpop/system/framework/ws/server/WebSocketServer.java deleted file mode 100644 index bc194ee..0000000 --- a/Cpop-System/src/main/java/com/cpop/system/framework/ws/server/WebSocketServer.java +++ /dev/null @@ -1,147 +0,0 @@ -package com.cpop.system.framework.ws.server; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -import javax.websocket.*; -import javax.websocket.server.PathParam; -import javax.websocket.server.ServerEndpoint; -import java.io.IOException; -import java.util.concurrent.CopyOnWriteArraySet; -import java.util.concurrent.atomic.AtomicInteger; -import com.cpop.core.base.exception.ServiceException; - -/** - * @author DB - * @createTime 2023/11/23 18:24 - * @description 注解是一个类层次的注解,它的功能主要是将目前的类定义成一个websocket服务器端, - * 注解的值将被用于监听用户连接的终端访问URL地址,客户端可以通过这个URL来连接到WebSocket服务器端 - */ -@Component -@Slf4j -@ServerEndpoint("/websocket/{sid}") -public class WebSocketServer { - - /** - * 静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。 - */ - private static AtomicInteger onlineCount = new AtomicInteger(0); - /** - * concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。 - */ - private static CopyOnWriteArraySet webSocketSet = new CopyOnWriteArraySet(); - - /** - * 与某个客户端的连接会话,需要通过它来给客户端发送数据 - */ - private Session session; - - /** - * 接收sid - */ - private String sid = ""; - - /** - * 连接建立成功调用的方法 - */ - @OnOpen - public void onOpen(Session session, @PathParam("sid") String sid) { - this.session = session; - //加入set中 - webSocketSet.add(this); - this.sid = sid; - //在线数加1 - addOnlineCount(); - try { - sendMessage("conn_success"); - log.info("有新窗口开始监听:" + sid + ",当前在线人数为:" + getOnlineCount()); - } catch (IOException e) { - log.error("websocket IO Exception"); - } - } - - /** - * 连接关闭调用的方法 - */ - @OnClose - public void onClose() { - //从set中删除 - webSocketSet.remove(this); - //在线数减1 - subOnlineCount(); - //断开连接情况下,更新主板占用情况为释放 - log.info("释放的sid为:"+sid); - //这里写你 释放的时候,要处理的业务 - log.info("有一连接关闭!当前在线人数为" + getOnlineCount()); - - } - - /** - * 收到客户端消息后调用的方法 - * @ Param message 客户端发送过来的消息 - */ - @OnMessage - public void onMessage(String message, Session session) { - log.info("收到来自窗口" + sid + "的信息:" + message); - //群发消息 - for (WebSocketServer item : webSocketSet) { - try { - item.sendMessage(message); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - - /** - * @ Param session - * @ Param error - */ - @OnError - public void onError(Session session, Throwable error) { - log.error("发生错误"); - error.printStackTrace(); - } - - /** - * 实现服务器主动推送 - */ - public void sendMessage(String message) throws IOException { - this.session.getBasicRemote().sendText(message); - } - - /** - * 群发自定义消息 - */ - public static void sendInfo(String message, @PathParam("sid") String sid) { - log.info("推送消息到窗口" + sid + ",推送内容:" + message); - for (WebSocketServer item : webSocketSet) { - try { - //这里可以设定只推送给这个sid的,为null则全部推送 - if (sid == null) { - //item.sendMessage(message); - } else if (item.sid.equals(sid)) { - item.sendMessage(message); - } - } catch (IOException e) { - throw new ServiceException("发送webSocket消息失败!"); - } - } - } - - public static synchronized AtomicInteger getOnlineCount() { - return onlineCount; - } - - public static synchronized void addOnlineCount() { - WebSocketServer.onlineCount.incrementAndGet(); - } - - public static synchronized void subOnlineCount() { - WebSocketServer.onlineCount.decrementAndGet(); - } - - public static CopyOnWriteArraySet getWebSocketSet() { - return webSocketSet; - } -} diff --git a/Cpop-System/src/main/resources/application-system.yml b/Cpop-System/src/main/resources/application-system.yml deleted file mode 100644 index 8b13789..0000000 --- a/Cpop-System/src/main/resources/application-system.yml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Cpop-System/src/main/resources/mapper/StoreLicenseMapper.xml b/Cpop-System/src/main/resources/mapper/StoreLicenseMapper.xml deleted file mode 100644 index a093318..0000000 --- a/Cpop-System/src/main/resources/mapper/StoreLicenseMapper.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Cpop-System/src/main/resources/mapper/WxPayScoreDetailMapper.xml b/Cpop-System/src/main/resources/mapper/WxPayScoreDetailMapper.xml deleted file mode 100644 index bf38a77..0000000 --- a/Cpop-System/src/main/resources/mapper/WxPayScoreDetailMapper.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Cpop-System/src/main/resources/mapper/WxPayScoreMapper.xml b/Cpop-System/src/main/resources/mapper/WxPayScoreMapper.xml deleted file mode 100644 index 904d209..0000000 --- a/Cpop-System/src/main/resources/mapper/WxPayScoreMapper.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - -