调整支付包;调整系统包
This commit is contained in:
parent
45385c0cdd
commit
5bbca4104c
@ -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.
|
||||
@ -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;
|
||||
|
||||
@ -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<Row> 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<Row> rowList;
|
||||
try {
|
||||
@ -768,9 +769,9 @@ public class CpopImportTests {
|
||||
//获取现有所有员工
|
||||
Map<String, StaffInfoVo> 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<Row> filterList = rowList.stream().filter(item -> StringUtils.isNotBlank(item.getString("storeId"))).collect(Collectors.toList());
|
||||
@ -857,9 +858,9 @@ public class CpopImportTests {
|
||||
//获取现有所有员工
|
||||
Map<String, StaffInfoVo> 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<Row> filterRecordRowList = recordRowList.stream()
|
||||
.filter(item -> StringUtils.isNotBlank(item.getString("phone")) && staffMap.get(item.getString("phone")) != null)
|
||||
@ -921,9 +922,9 @@ public class CpopImportTests {
|
||||
//获取现有所有员工
|
||||
Map<String, StaffInfoVo> 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<String, StaffInfoVo> 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<String, StaffInfoVo> 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<String, String> cloudToStore = SpringUtils.getBean(StoreExtendService.class).list().stream().collect(Collectors.toMap(StoreExtend::getStoreCloudId, StoreExtend::getStoreId));
|
||||
@ -1414,9 +1415,9 @@ public class CpopImportTests {
|
||||
//获取现有所有员工
|
||||
Map<String, StaffInfoVo> 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<TaskWorkOrder> taskWorkOrders = new ArrayList<>();
|
||||
@ -1511,9 +1512,9 @@ public class CpopImportTests {
|
||||
//获取现有所有员工
|
||||
Map<String, StaffInfoVo> 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<String, String> 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<Row> cpSysUser = DbChain.table("cp_sys_user")
|
||||
List<Row> cpSysUser = DbChain.table("cp_USER")
|
||||
.select("id","phone_number")
|
||||
.where("user_type = 'OAM_USER'")
|
||||
.and("is_delete = 0")
|
||||
.list();
|
||||
List<SysUser> entityList = RowUtil.toEntityList(cpSysUser, SysUser.class);
|
||||
List<User> 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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<TaskWorkOrderMapper, T
|
||||
QueryWrapper.create()
|
||||
.select(DUTY.SERVICE_STAFF_ID, DUTY.TECHNOLOGY_STAFF_ID, DUTY.DUTY_DATE)
|
||||
.from(DUTY)
|
||||
.where(DUTY.DUTY_DATE.eq(DateUtils.getDate())),
|
||||
.where(DUTY.DUTY_DATE.eq(LocalDate.now())),
|
||||
WorkOrderDutyVo.class);
|
||||
}
|
||||
|
||||
|
||||
@ -3,12 +3,9 @@ package com.cpop.oam.framework.strategy.cloud;
|
||||
import com.cpop.common.utils.bean.BeanUtils;
|
||||
import com.cpop.core.utils.SpringUtils;
|
||||
import com.cpop.oam.business.bo.CloudUnionCallbackBo;
|
||||
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.service.BrandService;
|
||||
import com.cpop.system.business.service.StoreLicenseService;
|
||||
import com.cpop.system.business.service.StoreService;
|
||||
import com.mybatisflex.core.row.Db;
|
||||
import com.mybatisflex.core.row.DbChain;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package com.cpop.pay.framewok.config.wxPay;
|
||||
|
||||
import com.cpop.common.utils.StringUtils;
|
||||
import com.cpop.core.utils.StringUtils;
|
||||
import com.github.binarywang.wxpay.config.WxPayConfig;
|
||||
import com.github.binarywang.wxpay.service.WxPayService;
|
||||
import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl;
|
||||
@ -26,25 +26,46 @@ public class WxPayConfiguration {
|
||||
|
||||
private WxPayProperties properties;
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public WxPayService wxService() {
|
||||
/**
|
||||
* 获取普通微信支付
|
||||
* @author DB
|
||||
* @since 2024/3/13
|
||||
* @return WxPayService
|
||||
*/
|
||||
@Bean("normalWxPayService")
|
||||
public WxPayService normalWxPayService() {
|
||||
WxPayConfig payConfig = new WxPayConfig();
|
||||
payConfig.setAppId(StringUtils.trimToNull(this.properties.getAppId()));
|
||||
payConfig.setMchId(StringUtils.trimToNull(this.properties.getMchId()));
|
||||
payConfig.setMchKey(StringUtils.trimToNull(this.properties.getMchKey()));
|
||||
//服务商模式微信支付
|
||||
payConfig.setApiV3Key(this.properties.getApiV3Key());
|
||||
payConfig.setCertSerialNo(this.properties.getCertSerialNo());
|
||||
payConfig.setKeyPath(this.properties.getKeyPath());
|
||||
payConfig.setPrivateKeyPath(this.properties.getPrivateKeyPath());
|
||||
payConfig.setPrivateCertPath(this.properties.getPrivateCertPath());
|
||||
//通知地址
|
||||
payConfig.setNotifyUrl(this.properties.getNotifyUrl());
|
||||
payConfig.setServiceId(this.properties.getServiceId());
|
||||
payConfig.setAppId(StringUtils.trimToNull(properties.getBackstageAppId()));
|
||||
payConfig.setMchId(StringUtils.trimToNull(properties.getBackstageMchId()));
|
||||
payConfig.setMchKey(StringUtils.trimToNull(properties.getBackstageMchKey()));
|
||||
payConfig.setKeyPath(properties.getBackstageKeyPath());
|
||||
payConfig.setNotifyUrl(properties.getBackstagePayNotifyUrl());
|
||||
// 可以指定是否使用沙箱环境
|
||||
payConfig.setUseSandboxEnv(false);
|
||||
WxPayService wxPayService = new WxPayServiceImpl();
|
||||
WxPayServiceImpl wxPayService = new WxPayServiceImpl();
|
||||
wxPayService.setConfig(payConfig);
|
||||
return wxPayService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取普通微信支付
|
||||
* @author DB
|
||||
* @since 2024/3/13
|
||||
* @return WxPayService
|
||||
*/
|
||||
@Bean("serviceWxPayService")
|
||||
public WxPayService serviceWxPayService() {
|
||||
WxPayConfig payConfig = new WxPayConfig();
|
||||
payConfig.setAppId(StringUtils.trimToNull(properties.getServiceAppId()));
|
||||
payConfig.setMchId(StringUtils.trimToNull(properties.getServiceMchId()));
|
||||
payConfig.setPrivateKeyPath(properties.getServicePrivateKeyPath());
|
||||
payConfig.setPrivateCertPath(properties.getServicePrivateCertPath());
|
||||
payConfig.setApiV3Key(StringUtils.trimToNull(properties.getServiceApiV3Key()));
|
||||
payConfig.setServiceId(properties.getServiceId());
|
||||
payConfig.setNotifyUrl(properties.getServicePayNotifyUrl());
|
||||
// 可以指定是否使用沙箱环境
|
||||
payConfig.setUseSandboxEnv(false);
|
||||
WxPayServiceImpl wxPayService = new WxPayServiceImpl();
|
||||
wxPayService.setConfig(payConfig);
|
||||
return wxPayService;
|
||||
}
|
||||
|
||||
@ -11,58 +11,64 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
@Data
|
||||
@ConfigurationProperties(prefix = "wx.pay")
|
||||
public class WxPayProperties {
|
||||
/**
|
||||
* 设置微信公众号或者小程序等的appid
|
||||
*/
|
||||
private String appId;
|
||||
|
||||
/**
|
||||
* 微信支付商户号
|
||||
* 后台appid
|
||||
*/
|
||||
private String mchId;
|
||||
private String backstageAppId;
|
||||
|
||||
/**
|
||||
* 微信支付商户密钥
|
||||
* 后台普通支付商户号
|
||||
*/
|
||||
private String mchKey;
|
||||
private String backstageMchId;
|
||||
|
||||
/**
|
||||
* apiclient_cert.p12文件的绝对路径,或者如果放在项目中,请以classpath:开头指定
|
||||
* 后台商户密钥
|
||||
*/
|
||||
private String keyPath;
|
||||
private String backstageMchKey;
|
||||
|
||||
/**
|
||||
* apiV3 秘钥值
|
||||
* 后台证书路径
|
||||
*/
|
||||
private String apiV3Key;
|
||||
private String backstageKeyPath;
|
||||
|
||||
/**
|
||||
* apiclient_key.pem证书文件的绝对路径或者以classpath:开头的类路径
|
||||
* 后台支付通知地址
|
||||
*/
|
||||
private String privateKeyPath;
|
||||
private String backstagePayNotifyUrl;
|
||||
|
||||
/**
|
||||
* apiclient_cert.pem证书文件的绝对路径或者以classpath:开头的类路径
|
||||
* 服务商appid
|
||||
*/
|
||||
private String privateCertPath;
|
||||
private String serviceAppId;
|
||||
|
||||
/**
|
||||
* apiV3 证书序列号值
|
||||
* 服务商商户号
|
||||
*/
|
||||
private String certSerialNo;
|
||||
private String serviceMchId;
|
||||
|
||||
/**
|
||||
* 支付通知地址
|
||||
* 服务商支付私钥路径
|
||||
*/
|
||||
private String notifyUrl;
|
||||
private String servicePrivateKeyPath;
|
||||
|
||||
/**
|
||||
* 退款通知
|
||||
* 服务商支付证书路径
|
||||
*/
|
||||
private String notifyRefund;
|
||||
private String servicePrivateCertPath;
|
||||
|
||||
/**
|
||||
* 分账账号
|
||||
* 服务商apiV3密钥
|
||||
*/
|
||||
private String serviceApiV3Key;
|
||||
|
||||
/**
|
||||
* 服务id
|
||||
*/
|
||||
private String serviceId;
|
||||
|
||||
/**
|
||||
* 分账服务商账号
|
||||
*/
|
||||
private String sharingAccount;
|
||||
|
||||
@ -72,37 +78,7 @@ public class WxPayProperties {
|
||||
private String sharingAccountName;
|
||||
|
||||
/**
|
||||
* 一次性支付
|
||||
* 服务商支付通知地址
|
||||
*/
|
||||
private String easyLearnOncePayNotifyUrl;
|
||||
|
||||
/**
|
||||
* 放心学联合支付通知地址
|
||||
*/
|
||||
private String easyLearnUnionPayNotifyUrl;
|
||||
|
||||
/**
|
||||
* 服务id
|
||||
*/
|
||||
private String serviceId;
|
||||
|
||||
/**
|
||||
* 服务商模式下的子商户公众账号ID
|
||||
*/
|
||||
private String serviceAppId;
|
||||
|
||||
/**
|
||||
* 先学后付用户签约计划通知地址
|
||||
*/
|
||||
private String learnNowPayLaterUserSignPlanNotifyUrl;
|
||||
|
||||
/**
|
||||
* 先学后付用户支付成功通知地址
|
||||
*/
|
||||
private String learnNowPayLaterServiceOrderNotifyUrl;
|
||||
|
||||
/**
|
||||
* 普通模式下的商户号
|
||||
*/
|
||||
private String easyLearnUnionPayNormalNotifyUrl;
|
||||
private String servicePayNotifyUrl;
|
||||
}
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package com.cpop.pay.framewok.core.dto.easyLearn;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.cpop.pay.framewok.core.dto.easyLearn;
|
||||
|
||||
import com.cpop.core.base.enums.OrderSource;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@ -43,9 +42,4 @@ public class LearnNowPayLaterPlanDto {
|
||||
*/
|
||||
private List<LearnNowPayLaterPlanDetailDto> planDetailList;
|
||||
|
||||
/**
|
||||
* 订单来源
|
||||
*/
|
||||
private OrderSource orderSource = OrderSource.EASY_LEARN;
|
||||
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
/**
|
||||
* 获取签约头
|
||||
|
||||
@ -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> T createOrder(String orderId,String openId, BigDecimal price, String body, String ipAddress,String notifyUrl) throws IOException {
|
||||
SortedMap<String, Object> parameters = new TreeMap<String, Object>();
|
||||
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 "<xml>\n" +
|
||||
" <return_code><![CDATA[FAIL]]></return_code>\n" +
|
||||
" <return_msg><![CDATA[]]></return_msg>\n" +
|
||||
"</xml>";
|
||||
}
|
||||
|
||||
public String success() {
|
||||
return "<xml>\n" +
|
||||
" <return_code><![CDATA[SUCCESS]]></return_code>\n" +
|
||||
" <return_msg><![CDATA[OK]]></return_msg>\n" +
|
||||
"</xml>";
|
||||
}
|
||||
}
|
||||
@ -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<String, Object> 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<String, Object> 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> T createSign2(String result, String key) throws IOException {
|
||||
SortedMap<String, Object> 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<String, Object> 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<String, Object> map) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("<xml>");
|
||||
for (String key : map.keySet()) {
|
||||
sb.append("<").append(key).append(">")
|
||||
.append(map.get(key))
|
||||
.append("</").append(key).append(">");
|
||||
}
|
||||
return sb.append("</xml>").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<Element> children) {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
if (!children.isEmpty()) {
|
||||
Iterator<Element> it = children.iterator();
|
||||
while (it.hasNext()) {
|
||||
Element e = (Element) it.next();
|
||||
String name = e.getName();
|
||||
String value = e.getTextNormalize();
|
||||
List<Element> list = e.getChildren();
|
||||
sb.append("<" + name + ">");
|
||||
if (!list.isEmpty()) {
|
||||
sb.append(getChildrenText(list));
|
||||
}
|
||||
sb.append(value);
|
||||
sb.append("</" + name + ">");
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -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<String, Object> mapReceiver = new HashMap<>(4);
|
||||
mapReceiver.put("type", "MERCHANT_ID");
|
||||
mapReceiver.put("account", wxPayProperties.getSharingAccount());
|
||||
mapReceiver.put("amount", ceil.longValue());
|
||||
mapReceiver.put("description","分账到服务商");
|
||||
List<Map<String, Object>> 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<String> phoneList = new ArrayList<String>();
|
||||
// 获取审核管理员手机号
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -19,10 +19,21 @@
|
||||
<groupId>com.cpop</groupId>
|
||||
<artifactId>Cpop-Core</artifactId>
|
||||
</dependency>
|
||||
<!--API工具包-->
|
||||
<dependency>
|
||||
<groupId>com.cpop</groupId>
|
||||
<artifactId>Cpop-Api</artifactId>
|
||||
</dependency>
|
||||
<!--腾讯云SDK-->
|
||||
<dependency>
|
||||
<groupId>com.tencentcloudapi</groupId>
|
||||
<artifactId>tencentcloud-sdk-java</artifactId>
|
||||
</dependency>
|
||||
<!-- 腾讯云Api-->
|
||||
<dependency>
|
||||
<groupId>com.qcloud</groupId>
|
||||
<artifactId>cos_api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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<String> menuIds;
|
||||
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
|
||||
@ -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<String> brandIds;
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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<java.lang.Void>
|
||||
* @return com.cpop.core.base.entity.R<java.lang.Void>
|
||||
*/
|
||||
@PostMapping("/insertSysBrand")
|
||||
@ApiOperation("新增系统品牌")
|
||||
public R<Void> 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<Void> 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<java.lang.Void>
|
||||
* @return com.cpop.core.base.entity.R<java.lang.Void>
|
||||
* @author DB
|
||||
* @since 2023/11/10 9:21
|
||||
*/
|
||||
@ApiOperation("修改系统品牌")
|
||||
@Operation(summary = "修改品牌")
|
||||
@PutMapping("/updateSysBrand")
|
||||
public R<Void> updateSysBrand(@RequestBody @ApiParam("系统-品牌") @Validated BrandBo bo) {
|
||||
public R<Void> 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<Void> 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<com.mybatisflex.core.paginate.Page<com.cpop.system.business.vo.BrandPageVo>>
|
||||
*/
|
||||
@ApiOperation("查询品牌分页列表")
|
||||
@Operation(summary = "查询品牌分页列表")
|
||||
@GetMapping("/getBrandPage")
|
||||
@PreAuthorize("@aps.hasPermission('brandStore:brand:list')")
|
||||
public R<Page<BrandPageVo>> getBrandPageList(String brandName) {
|
||||
Page<BrandPageVo> 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<java.lang.Void>
|
||||
* @return com.cpop.core.base.entity.R<java.lang.Void>
|
||||
*/
|
||||
@ApiOperation("根据品牌id删除品牌")
|
||||
@Operation(summary = "根据品牌id删除品牌")
|
||||
@DeleteMapping("/removeBrandById/{id}")
|
||||
@Deprecated(since = "1.1.0")
|
||||
public R<Void> removeBrandById(@PathVariable String id) {
|
||||
brandService.removeBrandById(id);
|
||||
return R.ok();
|
||||
return R.fail("根据品牌id删除品牌接口已废弃");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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<Page<DictData>>
|
||||
*/
|
||||
@GetMapping("/getDictDataPage")
|
||||
@ApiOperation("获取字典数据分页")
|
||||
public R<Page<DictDataPageVo>> getDictDataPage(@ApiParam("查询参数") DictDataPageBo bo) {
|
||||
@Operation(summary = "获取字典数据分页")
|
||||
public R<Page<DictDataPageVo>> getDictDataPage(DictDataPageBo bo) {
|
||||
Page<DictDataPageVo> page = dictDataService.getDictDataPage(bo);
|
||||
return R.ok(page);
|
||||
}
|
||||
@ -62,8 +62,8 @@ public class BackstageDictDataController {
|
||||
* @return DictData
|
||||
*/
|
||||
@GetMapping("/getDictDataInfo/{id}")
|
||||
@ApiOperation("根据主键获取字典数据详情")
|
||||
public R<DictDataVo> getDictDataInfo(@PathVariable @ApiParam("字典数据code") String id) {
|
||||
@Operation(summary = "根据主键获取字典数据详情")
|
||||
public R<DictDataVo> getDictDataInfo(@PathVariable @Parameter(description = "字典数据主键") String id) {
|
||||
DictDataVo vo = dictDataService.getDictDataInfo(id);
|
||||
return R.ok(vo);
|
||||
}
|
||||
@ -76,8 +76,8 @@ public class BackstageDictDataController {
|
||||
* @return R<DictDataVo>
|
||||
*/
|
||||
@GetMapping("/getDictDataByDictType/{dictType}")
|
||||
@ApiOperation("根据字典类型获取字典数据")
|
||||
public R<List<DictDataListVo>> getDictDataByDictType(@PathVariable @ApiParam("字典数据code") String dictType) {
|
||||
@Operation(summary = "根据字典类型获取字典数据")
|
||||
public R<List<DictDataListVo>> getDictDataByDictType(@PathVariable @Parameter(description = "字典数据类型") String dictType) {
|
||||
List<DictData> dataList = dictDataService.getDictDataByDictType(dictType);
|
||||
return R.ok(BeanUtils.mapToList(dataList, DictDataListVo.class));
|
||||
}
|
||||
@ -90,8 +90,8 @@ public class BackstageDictDataController {
|
||||
* @return R<Void>
|
||||
*/
|
||||
@PostMapping("/insertDictData")
|
||||
@ApiOperation("新增字典数据")
|
||||
public R<Void> insertDictData(@RequestBody @ApiParam("字典数据") @Validated DictDataBo bo) {
|
||||
@Operation(summary = "新增字典数据")
|
||||
public R<Void> insertDictData(@RequestBody @Parameter(description = "字典数据") @Validated DictDataBo bo) {
|
||||
dictDataService.insertDictData(bo);
|
||||
return R.ok();
|
||||
}
|
||||
@ -104,8 +104,8 @@ public class BackstageDictDataController {
|
||||
* @return R<Void>
|
||||
*/
|
||||
@PutMapping("/updateDictData")
|
||||
@ApiOperation("修改字典数据")
|
||||
public R<Void> updateDictData(@RequestBody @ApiParam("字典数据") @Validated DictDataBo bo) {
|
||||
@Operation(summary = "修改字典数据")
|
||||
public R<Void> updateDictData(@RequestBody @Parameter(description = "字典数据") @Validated DictDataBo bo) {
|
||||
dictDataService.updateDictData(bo);
|
||||
return R.ok();
|
||||
}
|
||||
@ -118,7 +118,7 @@ public class BackstageDictDataController {
|
||||
* @return R<Void>
|
||||
*/
|
||||
@DeleteMapping("/removeDictData/{id}")
|
||||
@ApiOperation("删除字典数据")
|
||||
@Operation(summary = "删除字典数据")
|
||||
public R<Void> removeDictData(@PathVariable String id) {
|
||||
dictDataService.removeDictData(id);
|
||||
return R.ok();
|
||||
|
||||
@ -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<Page < DictTypePageVo>>
|
||||
* @return R<Page<DictTypePageVo>>
|
||||
* @author DB
|
||||
* @since 2023/12/01
|
||||
*/
|
||||
@PreAuthorize("@aps.hasPermission('system:dict:list')")
|
||||
@GetMapping("/getDictTypePage")
|
||||
@ApiOperation("获取系统字典类型分页")
|
||||
public R<Page<DictTypePageVo>> getDictTypePage(@ApiParam(value = "字典名") String dictName) {
|
||||
@Operation(summary = "获取字典类型分页")
|
||||
public R<Page<DictTypePageVo>> getDictTypePage(@Parameter(description = "字典名") String dictName) {
|
||||
Page<DictTypePageVo> 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<DictTypeVo> getDictTypeInfo(@PathVariable @ApiParam("字典类型主键") String id) {
|
||||
@Operation(summary = "根据主键获取字典类型详情")
|
||||
public R<DictTypeVo> 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<Void> 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<Void> 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<Void> removeById(@PathVariable @ApiParam("字典类型主键") String id) {
|
||||
@Operation(summary = "根据主键删除字典类型")
|
||||
public R<Void> 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<Void> refreshCache() {
|
||||
dictTypeService.resetDictCache();
|
||||
@ -148,12 +147,11 @@ public class BackstageDictTypeController {
|
||||
* @since 2023/12/01
|
||||
* @return R<List<DictTypeVo>>
|
||||
*/
|
||||
@ApiOperation("获取字典选择框列表")
|
||||
@Operation(summary = "获取字典选择框列表")
|
||||
@GetMapping("/optionSelect")
|
||||
public R<List<DictTypeVo>> optionSelect() {
|
||||
LoginUser loginUser = SecurityUtils.getInstance().getLoginUser();
|
||||
List<DictTypeVo> 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);
|
||||
}
|
||||
|
||||
@ -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<Void> 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<LoginUserInfoVo>}
|
||||
**/
|
||||
@GetMapping("/getUserInfo")
|
||||
@ApiOperation("获取登录用户详情")
|
||||
@Operation(summary = "获取登录用户详情")
|
||||
public R<LoginUserInfoVo> 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<String>}
|
||||
**/
|
||||
@ApiOperation("获取权限码")
|
||||
@Operation(summary = "获取权限码")
|
||||
@GetMapping("/getPermCode")
|
||||
public R<Set<String>> getPermCode(){
|
||||
Set<String> list = loginService.getPermCode();
|
||||
@ -54,11 +72,10 @@ public class BackstageLoginController {
|
||||
|
||||
/**
|
||||
* @author LOST.yuan
|
||||
* @Description 获取菜单列表
|
||||
* @date 14:52 2022/9/7
|
||||
* @return {@link R<List<MenuRouteVo>>}
|
||||
* 获取菜单列表
|
||||
* @since 14:52 2022/9/7
|
||||
**/
|
||||
@ApiOperation("获取菜单列表")
|
||||
@Operation(summary = "获取菜单列表")
|
||||
@GetMapping("/getMenuList")
|
||||
public R<List<MenuRouteVo>> getMenuList(){
|
||||
List<MenuRouteVo> list = loginService.getSysMenuList();
|
||||
|
||||
@ -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<java.util.List<OamMenuVo>>
|
||||
* @return com.cpop.core.base.R<java.util.List<MenuVo>>
|
||||
*/
|
||||
@PreAuthorize("@aps.hasPermission('system:menu:list')")
|
||||
@ApiOperation("获取系统菜单树列表")
|
||||
@Operation(summary = "获取系统菜单树列表")
|
||||
@GetMapping("/getSysMenuTreeList")
|
||||
public R<List<MenuVo>> getSysMenuTreeList(MenuListBo bo) {
|
||||
List<MenuVo> 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<java.util.List<com.jambox.oam.business.vo.OamMenuVo>>
|
||||
* @since 2023/09/07 17:41
|
||||
* @return com.cpop.core.base.R<java.util.List<com.cpop.oam.business.vo.MenuVo>>
|
||||
*/
|
||||
@ApiOperation("获取目录与菜单树")
|
||||
@Operation(summary = "获取目录与菜单树")
|
||||
@GetMapping("/getDirectoryAndMenuTreeList")
|
||||
public R<List<MenuVo>> getDirectoryAndMenuTreeList() {
|
||||
List<MenuVo> 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<java.lang.Void>
|
||||
* @return com.cpop.core.base.R<java.lang.Void>
|
||||
*/
|
||||
@PreAuthorize("@aps.hasPermission('system:menu:insert')")
|
||||
@ApiOperation("新增系统菜单")
|
||||
@Operation(summary = "新增菜单")
|
||||
@PostMapping("/insertSysMenu")
|
||||
public R<Void> 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<Void> 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<Void> removeSysMenu(@PathVariable String id) {
|
||||
menuService.removeSysMenu(id);
|
||||
|
||||
@ -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<PageVo<SysRolePageVo>>
|
||||
*/
|
||||
@PreAuthorize("@aps.hasPermission('system:role:list')")
|
||||
@ApiOperation("查询系统角色分页列表")
|
||||
@Operation(summary = "查询角色分页列表")
|
||||
@GetMapping("/getSysRolePageList")
|
||||
public R<Page<RolePageVo>> getSysRolePageList(RolePageBo bo) {
|
||||
Page<RolePageVo> pageVo = roleService.getSysRolePageList(bo);
|
||||
Page<RolePageVo> 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<java.lang.Void>
|
||||
* @return com.cpop.core.base.entity.R<java.lang.Void>
|
||||
*/
|
||||
@PreAuthorize("@aps.hasPermission('system:role:insert')")
|
||||
@ApiOperation("新增角色")
|
||||
@Operation(summary = "新增角色")
|
||||
@PostMapping("/insertSysRole")
|
||||
public R<Void> insertSysRole(@RequestBody @Validated RoleBo bo) {
|
||||
roleService.insertSysRole(bo);
|
||||
@ -67,12 +64,11 @@ public class BackstageRoleController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 获取系统菜单树列表
|
||||
* @return: R<List<SysMenuVo>>
|
||||
* @Author: DB
|
||||
* @Date: 2023/5/10 14:39
|
||||
* 获取系统菜单树列表
|
||||
* @author DB
|
||||
* @since 2023/5/10 14:39
|
||||
**/
|
||||
@ApiOperation("获取菜单树列表")
|
||||
@Operation(summary = "获取菜单树列表")
|
||||
@GetMapping("/getSysMenuTreeList")
|
||||
public R<List<MenuVo>> 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<java.lang.Void>
|
||||
*/
|
||||
@PreAuthorize("@aps.hasPermission('system:role:update')")
|
||||
@ApiOperation("修改角色")
|
||||
@Operation(summary = "修改角色")
|
||||
@PutMapping("/updateSysRole")
|
||||
public R<Void> 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<Void>
|
||||
*/
|
||||
@PreAuthorize("@aps.hasPermission('system:role:remove')")
|
||||
@ApiOperation("删除系统角色表")
|
||||
@Operation(summary = "删除角色")
|
||||
@DeleteMapping("/removeSysRole/{id}")
|
||||
public R<Void> removeSysRole(@PathVariable String id) {
|
||||
roleService.removeSysRole(id);
|
||||
@ -109,14 +107,13 @@ public class BackstageRoleController {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 设置角色状态
|
||||
* 设置角色状态
|
||||
* @param bo 请求参数
|
||||
* @return: R<Void>
|
||||
* @Author: DB
|
||||
* @Date: 2023/5/9 14:13
|
||||
* @return R<Void>
|
||||
* @author DB
|
||||
* @since 2023/5/9 14:13
|
||||
**/
|
||||
@PreAuthorize("@aps.hasPermission('system:role:update')")
|
||||
@ApiOperation("设置角色状态")
|
||||
@Operation(description = "设置角色状态")
|
||||
@PutMapping("/setSysRoleStatus")
|
||||
public R<Void> setSysRoleStatus(@RequestBody @Validated RoleStatusBo bo) {
|
||||
roleService.setSysRoleStatus(bo);
|
||||
|
||||
@ -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<PageVo<CampusPageListVo>>
|
||||
* @param name 校区名
|
||||
* @return R<PageVo<StorePageVo>>
|
||||
* @author Administrator
|
||||
* @since 2023/6/7 0007 10:18
|
||||
*/
|
||||
@PreAuthorize("@aps.hasPermission('brandStore:store:list')")
|
||||
@ApiOperation("查询校区分页列表")
|
||||
@Operation(summary = "查询校区分页列表")
|
||||
@GetMapping("/getStorePage")
|
||||
public R<Page<StorePageVo>> getStorePage(StorePageBo bo) {
|
||||
Page<StorePageVo> pageVo = storeService.getStorePage(bo);
|
||||
public R<Page<StorePageVo>> getStorePage(@RequestParam(required = false) @Parameter(description = "校区名") String name) {
|
||||
Page<StorePageVo> 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<Void>
|
||||
*/
|
||||
@ApiOperation("校区续费")
|
||||
@Deprecated(since = "1.1.0")
|
||||
@Operation(summary = "校区续费")
|
||||
@PutMapping("/storeRenew")
|
||||
public R<Void> storeRenew(@RequestBody @Validated StoreRenewBo bo) {
|
||||
storeRenewService.storeRenew(bo);
|
||||
return R.ok();
|
||||
public R<Void> storeRenew() {
|
||||
return R.fail("校区续费接口已弃用");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -68,8 +64,9 @@ public class BackstageStoreController {
|
||||
* @param bo 请求参数
|
||||
* @return R<Void>
|
||||
*/
|
||||
@ApiOperation("更新校区")
|
||||
@Operation(summary = "更新校区")
|
||||
@PutMapping("/updateStore")
|
||||
@Deprecated(since = "1.1.0")
|
||||
public R<Void> updateStore(@RequestBody @Validated StoreBo bo) {
|
||||
storeService.updateStore(bo);
|
||||
return R.ok();
|
||||
|
||||
@ -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<StoreSign>
|
||||
* @since 2024/3/7
|
||||
* @return R<Page<StorePageVo>>
|
||||
*/
|
||||
@GetMapping("/getStoreRenewPage")
|
||||
@ApiOperation("分页查询校区续费")
|
||||
public R<Page<StoreRenewPageVo>> getStoreRenewPage(@ApiParam("分页信息") @Validated StoreRenewPageBo bo) {
|
||||
Page<StoreRenewPageVo> page = storeSignService.getStoreRenewPage(bo);
|
||||
@GetMapping("/getStoreSignRenewPage")
|
||||
@Operation(summary = "获取校区签约续费分页")
|
||||
public R<Page<StoreSignRenewPageVo>> getStoreSignRenewPage(StoreSignRenewPageBo bo) {
|
||||
Page<StoreSignRenewPageVo> page = storeSignService.getStoreSignRenewPage(bo);
|
||||
return R.ok(page);
|
||||
}
|
||||
|
||||
@ -56,29 +55,29 @@ public class BackstageStoreSignController {
|
||||
* @return R<Void>
|
||||
*/
|
||||
@PostMapping("/runOff")
|
||||
@ApiOperation("机构流失")
|
||||
public R<Void> runOff(@RequestBody @ApiParam("分页信息") @Validated StoreRunOffBo bo) {
|
||||
@Operation(summary = "机构流失")
|
||||
public R<Void> 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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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<SysFileVo> 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<com.qcloud.cos.model.UploadResult>
|
||||
* @return com.jambox.core.base.R<com.qcloud.cos.model.UploadResult>
|
||||
*/
|
||||
@ApiOperation("cdn加速上传")
|
||||
@Operation(summary = "cdn上传")
|
||||
@PostMapping("/cdnUpload")
|
||||
public R<SysFileVo> cdnUpload(MultipartFile file) {
|
||||
UploadResult uploadResult = tencentCosHandler.cdnUpload(file);
|
||||
|
||||
@ -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<SysFileVo>
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiOperation("小程序同步品牌和校区")
|
||||
@PostMapping("/miniSyncBrandAndStore")
|
||||
public R<Void> miniSyncBrandAndStore(@RequestBody SyncBrandAndStoreBo bo) {
|
||||
storeService.miniSyncBrandAndStore(bo);
|
||||
return R.ok();
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -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
|
||||
|
||||
@ -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是)
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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是)
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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是)
|
||||
|
||||
@ -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;
|
||||
|
||||
/**
|
||||
* 到期日期
|
||||
*/
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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<StoreLicense> {
|
||||
|
||||
}
|
||||
@ -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<WxPayScoreDetail> {
|
||||
|
||||
}
|
||||
@ -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<WxPayScore> {
|
||||
|
||||
}
|
||||
@ -14,30 +14,12 @@ import com.cpop.system.business.entity.Brand;
|
||||
public interface BrandService extends IService<Brand> {
|
||||
|
||||
/**
|
||||
* @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<com.cpop.system.business.vo.BrandPageVo>
|
||||
* @return com.mybatisflex.core.paginate.Page<com.cpop.system.business.vo.BrandPageVo>
|
||||
*/
|
||||
Page<BrandPageVo> getBrandPage(String brandName);
|
||||
|
||||
/**
|
||||
* @descriptions 根据品牌id删除品牌
|
||||
* @author DB
|
||||
* @date 2023/11/09 10:34
|
||||
* @param id 主键
|
||||
* @return: void
|
||||
*/
|
||||
void removeBrandById(String id);
|
||||
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import java.util.Set;
|
||||
|
||||
/**
|
||||
* 系统登陆
|
||||
* @author Lost
|
||||
*/
|
||||
public interface LoginService {
|
||||
|
||||
|
||||
@ -19,51 +19,48 @@ public interface MenuService extends IService<Menu> {
|
||||
|
||||
|
||||
/**
|
||||
* @descriptions 获取菜单路由
|
||||
* 获取菜单路由
|
||||
* @author DB
|
||||
* @date 2023/10/19 16:32
|
||||
* @return: java.util.List<com.cpop.system.business.vo.MenuRouteVo>
|
||||
* @since 2023/10/19 16:32
|
||||
*/
|
||||
List<MenuRouteVo> getSysMenuList();
|
||||
|
||||
/**
|
||||
* @descriptions 获取系统菜单树列表
|
||||
* 获取系统菜单树列表
|
||||
* @author DB
|
||||
* @date 2023/09/07 15:53
|
||||
* @since 2023/09/07 15:53
|
||||
* @param bo 请求参数
|
||||
* @return java.util.List<com.jambox.oam.business.vo.OamMenuVo>
|
||||
*/
|
||||
List<MenuVo> getSysMenuTreeList(MenuListBo bo);
|
||||
|
||||
/**
|
||||
* @descriptions 获取目录与菜单树
|
||||
* 获取目录与菜单树
|
||||
* @author DB
|
||||
* @date 2023/09/07 17:42
|
||||
* @return java.util.List<com.jambox.system.business.vo.SysMenuVo>
|
||||
* @since 2023/09/07 17:42
|
||||
*/
|
||||
List<MenuVo> 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);
|
||||
}
|
||||
|
||||
@ -17,48 +17,44 @@ import com.cpop.system.business.entity.Role;
|
||||
public interface RoleService extends IService<Role> {
|
||||
|
||||
/**
|
||||
* @descriptions
|
||||
* 查询角色分页列表
|
||||
* @author DB
|
||||
* @date 2023/10/19 17:13
|
||||
* @since 2023/09/10 16:51
|
||||
* @param bo 请求参数
|
||||
* @return: com.mybatisflex.core.paginate.Page<com.cpop.system.business.vo.RolePageVo>
|
||||
* @return R<PageVo<SysRolePageVo>>
|
||||
*/
|
||||
Page<RolePageVo> getSysRolePageList(RolePageBo bo);
|
||||
Page<RolePageVo> 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);
|
||||
|
||||
}
|
||||
|
||||
@ -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<StoreLicense> {
|
||||
|
||||
}
|
||||
@ -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<StoreRenew> {
|
||||
|
||||
/**
|
||||
* 校区续费
|
||||
* @author DB
|
||||
* @since 2024/1/11
|
||||
* @param bo 请求参数
|
||||
*/
|
||||
void storeRenew(StoreRenewBo bo);
|
||||
}
|
||||
|
||||
@ -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<Store> {
|
||||
|
||||
/**
|
||||
* @Author: DB
|
||||
* @description: 获取校区分页列表
|
||||
* @Date: 2023-11-23 15:40:30
|
||||
* @return {*}
|
||||
*/
|
||||
Page<StorePageVo> getStorePage(StorePageBo bo);
|
||||
|
||||
/**
|
||||
* 小程序同步品牌和校区
|
||||
* @author DB
|
||||
* @since 2023/12/21
|
||||
* @param bo 请求参数
|
||||
* 查询校区分页列表
|
||||
* @param name 请求参数
|
||||
* @return R<PageVo<CampusPageListVo>>
|
||||
* @author Administrator
|
||||
* @since 2023/6/7 0007 10:18
|
||||
*/
|
||||
void miniSyncBrandAndStore(SyncBrandAndStoreBo bo);
|
||||
Page<StorePageVo> getStorePage(String name);
|
||||
|
||||
/**
|
||||
* 更新校区
|
||||
|
||||
@ -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<StoreSign> {
|
||||
|
||||
/**
|
||||
* 分页查询校区续费
|
||||
* 获取校区签约续费分页
|
||||
* @author DB
|
||||
* @since 2023/12/14
|
||||
* @param bo 请求参数
|
||||
* @return Page<StoreSign>
|
||||
* @since 2024/3/7
|
||||
* @return Page<StorePageVo>
|
||||
*/
|
||||
Page<StoreRenewPageVo> getStoreRenewPage(StoreRenewPageBo bo);
|
||||
Page<StoreSignRenewPageVo> getStoreSignRenewPage(StoreSignRenewPageBo bo);
|
||||
|
||||
/**
|
||||
* 机构/店铺流失
|
||||
@ -44,5 +42,6 @@ public interface StoreSignService extends IService<StoreSign> {
|
||||
* @param bo 请求
|
||||
* @return List<StoreRenewDto>
|
||||
*/
|
||||
List<StoreRenewDto> getRenewXml(StoreRenewXmlBo bo);
|
||||
List<StoreRenewDto> getSignRenewXml(StoreSignRenewXmlBo bo);
|
||||
|
||||
}
|
||||
|
||||
@ -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<WxPayScoreDetail> {
|
||||
|
||||
}
|
||||
@ -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<WxPayScore> {
|
||||
|
||||
}
|
||||
@ -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<BrandMapper, Brand> 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<Row> 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<Store> stores = RowUtil.toEntityList(storeList, Store.class);
|
||||
stores.forEach(item->{
|
||||
item.setBrandId(brandId);
|
||||
item.setSourceType(SourceType.JAMBOX.toString());
|
||||
});
|
||||
SpringUtils.getBean(StoreService.class).saveBatch(stores);
|
||||
//保存拓展表
|
||||
List<Row> 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<Row> 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<String, String> 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<StoreLicense> 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<com.cpop.system.business.vo.BrandPageVo>
|
||||
* @since 2023/10/25 17:32
|
||||
* @param brandName 请求参数
|
||||
* @return com.mybatisflex.core.paginate.Page<com.cpop.system.business.vo.BrandPageVo>
|
||||
*/
|
||||
@Override
|
||||
public Page<BrandPageVo> 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<Store> 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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<DictDataMapper, DictData> i
|
||||
*/
|
||||
@Override
|
||||
public Page<DictDataPageVo> 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<DictDataMapper, DictData> 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<DictDataMapper, DictData> 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<DictData> dictDatas = getDictDataByDictType(dictData.getDictType());
|
||||
|
||||
@ -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<DictTypeMapper, DictType> 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<DictTypeMapper, DictType> 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());
|
||||
}
|
||||
|
||||
|
||||
@ -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<String> 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<String> permCodes = new HashSet<>();
|
||||
permCodes.add("*:*:*");
|
||||
permCodes.add("*.*.*");
|
||||
return permCodes;
|
||||
} else {
|
||||
List<Menu> 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();
|
||||
|
||||
@ -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<MenuMapper, Menu> implements MenuService {
|
||||
|
||||
/**
|
||||
* @descriptions 获取系统菜单树列表
|
||||
* 获取菜单路由
|
||||
* @author DB
|
||||
* @date 2023/10/19 14:39
|
||||
* @return: java.util.List<com.cpop.system.business.vo.MenuRouteVo>
|
||||
* @since 2023/10/19 16:32
|
||||
*/
|
||||
@Override
|
||||
public List<MenuRouteVo> 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<MenuRouteVo> 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<MenuMapper, Menu> 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<MenuVo> 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<MenuVo> getDirectoryAndMenuTreeList() {
|
||||
//只读取启用的菜单
|
||||
@ -122,7 +130,7 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements Me
|
||||
}
|
||||
//构建根节点
|
||||
List<MenuVo> 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<MenuMapper, Menu> 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<MenuMapper, Menu> 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<MenuMapper, Menu> 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<MenuMapper, Menu> 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<MenuMapper, Menu> 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<MenuMapper, Menu> 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<Menu> list, String id, List<String> removeIds) {
|
||||
//过滤出删除根菜单
|
||||
List<Menu> sonMenu = list.stream().filter(s -> null != s.getParentMenu()&& s.getParentMenu().equals(id)).collect(Collectors.toList());
|
||||
List<Menu> 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<MenuMapper, Menu> implements Me
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 构建菜单路由树
|
||||
* 构建菜单路由树
|
||||
* @param menus 菜单集合
|
||||
* @return: List<MenuRouteVo>
|
||||
* @Author: DB
|
||||
* @Date: 2023/5/11 9:21
|
||||
* @author DB
|
||||
* @since 2023/5/11 9:21
|
||||
**/
|
||||
private List<MenuRouteVo> buildMenuRouteTree(List<MenuRouteVo> menus) {
|
||||
if (menus.isEmpty()){
|
||||
@ -258,8 +282,7 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements Me
|
||||
item.setMeta(meta);
|
||||
});
|
||||
//构建根节点
|
||||
List<MenuRouteVo> tempList = menus.stream()
|
||||
.filter(s -> StringUtils.isBlank(s.getParentMenu())).collect(Collectors.toList());
|
||||
List<MenuRouteVo> tempList = menus.stream().filter(s -> StringUtils.isBlank(s.getParentMenu())).toList();
|
||||
List<MenuRouteVo> menuRoutes = new ArrayList<>();
|
||||
for (MenuRouteVo menu : tempList) {
|
||||
MenuRouteVo menuVo = recursionMenuRoute(menus, menu);
|
||||
@ -271,12 +294,11 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> 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<MenuRouteVo> list, MenuRouteVo menu) {
|
||||
// 得到子节点列表
|
||||
|
||||
@ -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<RoleMapper, Role> 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<com.cpop.system.business.vo.RolePageVo>
|
||||
* @return R<PageVo<SysRolePageVo>>
|
||||
*/
|
||||
@Override
|
||||
public Page<RolePageVo> getSysRolePageList(RolePageBo bo) {
|
||||
//获取当前用户
|
||||
LoginUser loginUser = SecurityUtils.getInstance().getLoginUser();
|
||||
public Page<RolePageVo> getSysRolePage(RolePageBo bo) {
|
||||
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
|
||||
Page<RolePageVo> page = this.mapper.paginateAs(pageDomain.getPageNum(), pageDomain.getPageSize(),
|
||||
QueryWrapper.create()
|
||||
@ -56,7 +55,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> 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<RoleMapper, Role> 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<RoleMapper, Role> 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<RoleMapper, Role> 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<RoleMapper, Role> 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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -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<StoreLicenseMapper, StoreLicense> implements StoreLicenseService {
|
||||
|
||||
}
|
||||
@ -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<StoreRenewMapper, StoreRenew> 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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<StoreMapper, Store> implements StoreService {
|
||||
|
||||
/**
|
||||
* @Author: DB
|
||||
* @description: 获取校区分页列表
|
||||
* @Date: 2023-11-23 15:35:05
|
||||
* @return {*}
|
||||
* 查询校区分页列表
|
||||
* @param name 请求参数
|
||||
* @return R<PageVo<CampusPageListVo>>
|
||||
* @author Administrator
|
||||
* @since 2023/6/7 0007 10:18
|
||||
*/
|
||||
@Override
|
||||
public Page<StorePageVo> getStorePage(StorePageBo bo) {
|
||||
public Page<StorePageVo> 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<StoreMapper, Store> 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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<StoreSignMapper, StoreSign> implements StoreSignService {
|
||||
|
||||
/**
|
||||
* 分页查询校区续费
|
||||
* 获取校区签约续费分页
|
||||
* @author DB
|
||||
* @since 2023/12/14
|
||||
* @param bo 请求参数
|
||||
* @return Page<StoreSign>
|
||||
* @since 2024/3/7
|
||||
* @return Page<StorePageVo>
|
||||
*/
|
||||
@Override
|
||||
public Page<StoreRenewPageVo> getStoreRenewPage(StoreRenewPageBo bo) {
|
||||
public Page<StoreSignRenewPageVo> 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<StoreSignMapper, StoreSign
|
||||
//已续费
|
||||
case 1:
|
||||
if (bo.getStartDate() != null && bo.getEndDate() != null) {
|
||||
queryWrapper.and(STORE_RENEW.RENEW_DATE.between(bo.getStartDate(), bo.getEndDate()));
|
||||
queryWrapper.and(dateFormat(STORE_RENEW.CREATE_TIME, "%Y-%m-%d").between(bo.getStartDate(), bo.getEndDate()));
|
||||
}
|
||||
return SpringUtils.getBean(StoreRenewService.class).getMapper().paginateAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()),
|
||||
queryWrapper
|
||||
return SpringUtils.getBean(StoreRenewService.class).getMapper().paginateAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()), queryWrapper
|
||||
.select(BRAND.BRAND_NAME)
|
||||
.select(STORE.CREATE_TIME.as(StoreRenewPageVo::getCreateTime), STORE.PERSON_CHARGE, STORE.PHONE, STORE.STORE_NAME)
|
||||
.select(STORE.CREATE_TIME.as(StoreSignRenewPageVo::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)
|
||||
.from(STORE_RENEW)
|
||||
.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"),
|
||||
StoreRenewPageVo.class);
|
||||
.leftJoin(STORE_SIGN).on(STORE_SIGN.STORE_ID.eq(STORE.ID)),
|
||||
StoreSignRenewPageVo.class);
|
||||
//已流失
|
||||
default:
|
||||
queryWrapper.and(STORE_SIGN.IS_LOSS.eq(true));
|
||||
}
|
||||
return this.mapper.paginateAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()),
|
||||
queryWrapper
|
||||
return this.mapper.paginateAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()), queryWrapper
|
||||
.select(BRAND.BRAND_NAME)
|
||||
.select(STORE.CREATE_TIME.as(StoreRenewPageVo::getCreateTime), STORE.PERSON_CHARGE, STORE.PHONE, STORE.STORE_NAME)
|
||||
.select(STORE_SIGN.EXPIRE_DATE, STORE_SIGN.ID, STORE_SIGN.RUN_OFF_DATE, STORE_SIGN.RUN_OFF_REASON, STORE_SIGN.UPDATE_USER_ID.as(StoreRenewPageVo::getLastUpdateUserId))
|
||||
.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.CREATE_TIME.as(StoreSignRenewPageVo::getCreateTime), STORE.PERSON_CHARGE_NAME, STORE.PERSON_CHARGE_PHONE, STORE.STORE_NAME)
|
||||
.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_SIGN.STORE_ID))
|
||||
.leftJoin(BRAND).on(BRAND.ID.eq(STORE.BRAND_ID))
|
||||
.leftJoin(STORE_LICENSE).on(STORE_LICENSE.STORE_ID.eq(STORE.ID))
|
||||
.leftJoin(STORE_RENEW).on(STORE_RENEW.STORE_ID.eq(STORE.ID))
|
||||
.leftJoin("cp_oam_staff").as("cos").on("`cos`.`id` = `cp_sys_store_renew`.`renew_staff_id`"),
|
||||
StoreRenewPageVo.class,
|
||||
//子查询
|
||||
item -> 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<StoreSignMapper, StoreSign
|
||||
* @return List<StoreRenewDto>
|
||||
*/
|
||||
@Override
|
||||
public List<StoreRenewDto> getRenewXml(StoreRenewXmlBo bo) {
|
||||
public List<StoreRenewDto> 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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<WxPayScoreDetailMapper, WxPayScoreDetail> implements WxPayScoreDetailService {
|
||||
|
||||
}
|
||||
@ -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<WxPayScoreMapper, WxPayScore> implements WxPayScoreService {
|
||||
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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<String> permissions;
|
||||
|
||||
/**
|
||||
* 角色
|
||||
*/
|
||||
@ApiModelProperty("角色")
|
||||
private Set<String> roles;
|
||||
@Schema(description = "权限信息")
|
||||
private List<String> permissions;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -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<MenuRouteVo> 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;
|
||||
|
||||
/**
|
||||
|
||||
@ -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<MenuVo> 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;
|
||||
|
||||
}
|
||||
|
||||
@ -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<String> menuIds;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user