Compare commits
81 Commits
f392e43ae7
...
release-20
| Author | SHA1 | Date | |
|---|---|---|---|
| 37d92b9dea | |||
| 6d85686270 | |||
| 0656cabe4a | |||
| d3e09b1cb9 | |||
|
|
72a8a318cf | ||
|
|
943aa3842a | ||
|
|
25da381c4e | ||
|
|
0e06403528 | ||
| 88a0a5616b | |||
| 9a086b86cd | |||
| f5746394fa | |||
|
|
d4e2bed039 | ||
| 16a9bcfbd8 | |||
| 9674374fad | |||
|
|
8be8964eff | ||
|
|
2af46a38b1 | ||
|
|
e2e9b18503 | ||
| e1105dae89 | |||
|
|
f5a9d171e0 | ||
| a3752fe7b9 | |||
|
|
5ef97c4da7 | ||
|
|
d82d91aec5 | ||
|
|
a123ea05e8 | ||
|
|
7a429deb99 | ||
|
|
8530f424c9 | ||
|
|
667dc58dc1 | ||
|
|
884075d3f2 | ||
|
|
5857fe4171 | ||
|
|
9436ea8942 | ||
|
|
bd58fd716a | ||
|
|
0a2d1a1f32 | ||
| 7fc365ce4c | |||
| 54a61ec5d5 | |||
| c3e3139100 | |||
| 2536dc9528 | |||
| 81db304e16 | |||
|
|
4582db201a | ||
|
|
90928754d9 | ||
|
|
8ba9609276 | ||
| 2bccdd7177 | |||
| eddfc26a45 | |||
|
|
b2839ed1d5 | ||
|
|
a1ebf5b065 | ||
|
|
df88450bab | ||
| a8693e77cc | |||
| 0b6e90acb7 | |||
| c3bbf9073a | |||
|
|
64ad185fc4 | ||
| 28f13a5db3 | |||
| a6782b4fa1 | |||
|
|
5344c76cac | ||
| b92b1eaf2c | |||
|
|
7f941fab86 | ||
| bb7ddf9779 | |||
| 64f73ae06b | |||
| 213da81bc8 | |||
|
|
3cf4edd7a9 | ||
|
|
e4c72ce901 | ||
| 7bbb0c1026 | |||
| 5145ba52cb | |||
| 3c7331ffa0 | |||
| 5bc82c1f5c | |||
| 094b8774e3 | |||
| cd4d535d74 | |||
| add23214ac | |||
| 3e4256ada0 | |||
|
|
b31ed69e15 | ||
|
|
85a1032c55 | ||
|
|
3bf191ed3f | ||
| 6ad8d9730e | |||
| f03c5a9cf8 | |||
| 86ee8461b5 | |||
| 40b8931ee2 | |||
| 63fed8b70b | |||
| bd6dcedc0f | |||
|
|
08ca5c48f0 | ||
| 2b6da03ab6 | |||
|
|
9d9054a75d | ||
| e8b8ce0e9a | |||
| 04437369c1 | |||
| 3c2f46b008 |
5
doc/sql/executed/blade_menu_userNotice.sql
Normal file
5
doc/sql/executed/blade_menu_userNotice.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
--INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2020763647899787265, 2019338015981219841, 'userNotice', '用户通知', 'menu', '/common/commonUserNotice', 'iconfont iconicon_voipphone', 1, 1, 0, 1, '', '', 0);
|
||||
--INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2020763647899787266, 2020763647899787265, 'userNotice_add', '新增', 'add', '/common/commonUserNotice/add', 'plus', 1, 2, 1, 1, null, null, 0);
|
||||
--INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2020763647899787267, 2020763647899787265, 'userNotice_edit', '修改', 'edit', '/common/commonUserNotice/edit', 'form', 2, 2, 2, 1, null, null, 0);
|
||||
--INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2020763647899787268, 2020763647899787265, 'userNotice_delete', '删除', 'delete', '/common/notice/remove', 'delete', 3, 2, 3, 1, null, null, 0);
|
||||
--INSERT INTO blade_menu (id, parent_id, code, name, alias, path, source, sort, category, action, is_open, component, remark, is_deleted) VALUES (2020763647899787269, 2020763647899787265, 'userNotice_view', '查看', 'view', '/common/commonUserNotice/view', 'file-text', 4, 2, 2, 1, null, null, 0);
|
||||
1025
doc/sql/pending/20260209_increase.sql
Normal file
1025
doc/sql/pending/20260209_increase.sql
Normal file
File diff suppressed because it is too large
Load Diff
@@ -28,6 +28,7 @@ package org.springblade;
|
||||
import org.springblade.common.constant.CommonConstant;
|
||||
import org.springblade.core.launch.BladeApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.retry.annotation.EnableRetry;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
|
||||
|
||||
@@ -39,6 +40,7 @@ import org.springframework.session.data.redis.config.annotation.web.http.EnableR
|
||||
@EnableScheduling
|
||||
@EnableRedisHttpSession
|
||||
@SpringBootApplication
|
||||
@EnableRetry //重试机制
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package org.springblade.common.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
||||
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
@Configuration
|
||||
@EnableAsync
|
||||
public class AsyncConfiguration {
|
||||
|
||||
|
||||
// 通知类:短信、邮件、站内信
|
||||
@Bean("notificationExecutor")
|
||||
public ThreadPoolTaskExecutor notificationExecutor() {
|
||||
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
||||
executor.setCorePoolSize(6);
|
||||
executor.setMaxPoolSize(12);
|
||||
executor.setQueueCapacity(200);
|
||||
executor.setThreadNamePrefix("notify-");
|
||||
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
executor.initialize();
|
||||
return executor;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package org.springblade.common.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class MybatisPlusConfig {
|
||||
@Bean
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
|
||||
PaginationInnerInterceptor paginationInterceptor = new PaginationInnerInterceptor();
|
||||
paginationInterceptor.setDbType(DbType.POSTGRE_SQL);
|
||||
// 可选:设置最大单页限制(防止恶意请求)
|
||||
paginationInterceptor.setMaxLimit(1000L);
|
||||
interceptor.addInnerInterceptor(paginationInterceptor);
|
||||
|
||||
// 2. 乐观锁插件
|
||||
interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
|
||||
return interceptor;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.springblade.common.exception;
|
||||
|
||||
public class OptimisticLockException extends RuntimeException{
|
||||
public OptimisticLockException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
package org.springblade.job.processor;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.common.utils.date.DateUtil;
|
||||
import org.springblade.modules.market.eums.MarketBusinessModule;
|
||||
import org.springblade.modules.market.pojo.entity.MarketBenefitPackageEntity;
|
||||
import org.springblade.modules.market.pojo.entity.MarketBenefitPointEntity;
|
||||
import org.springblade.modules.market.pojo.entity.MarketBenefitPointLogEntity;
|
||||
import org.springblade.modules.market.pojo.entity.MarketPackageDailySettlementEntity;
|
||||
import org.springblade.modules.market.service.IMarketBenefitPackageService;
|
||||
import org.springblade.modules.market.service.IMarketBenefitPointLogService;
|
||||
import org.springblade.modules.market.service.IMarketBenefitPointService;
|
||||
import org.springblade.modules.market.service.IMarketPackageDailySettlementService;
|
||||
import org.springframework.stereotype.Component;
|
||||
import tech.powerjob.worker.core.processor.ProcessResult;
|
||||
import tech.powerjob.worker.core.processor.TaskContext;
|
||||
import tech.powerjob.worker.core.processor.sdk.BasicProcessor;
|
||||
import tech.powerjob.worker.log.OmsLogger;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
/**
|
||||
* 福利包每日发放福利积分到用户
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class BenefitPackageSendPointProcessor implements BasicProcessor {
|
||||
|
||||
private final IMarketBenefitPackageService userBenefitPackageService;
|
||||
private final IMarketPackageDailySettlementService userPackageDailySettlementService;
|
||||
private final IMarketBenefitPointService benefitPointService;
|
||||
private final IMarketBenefitPointLogService benefitPointLogService;
|
||||
|
||||
@Override
|
||||
public ProcessResult process(TaskContext context) {
|
||||
|
||||
OmsLogger omsLogger = context.getOmsLogger();
|
||||
try {
|
||||
omsLogger.info("开始执行定时任务-发放福利积分");
|
||||
benefitPackageSendPoint();
|
||||
omsLogger.info("结束执行定时任务-发放福利积分");
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("任务执行异常", e);
|
||||
omsLogger.error("任务执行异常: {}", e.getMessage());
|
||||
return new ProcessResult(false, "系统异常: " + e.getMessage());
|
||||
}
|
||||
|
||||
// 返回结果,该结果会被持久化到数据库,在前端页面直接查看,极为方便
|
||||
return new ProcessResult(true, "result is success");
|
||||
}
|
||||
|
||||
|
||||
public void benefitPackageSendPoint() {
|
||||
// 1. 查询待处理的结算任务
|
||||
List<MarketPackageDailySettlementEntity> settlementEntityList = userPackageDailySettlementService.list(
|
||||
Wrappers.lambdaQuery(MarketPackageDailySettlementEntity.class)
|
||||
.eq(MarketPackageDailySettlementEntity::getStatisticalDate, DateUtil.getToday())
|
||||
.eq(MarketPackageDailySettlementEntity::getIsComplete, 0)
|
||||
);
|
||||
|
||||
if (settlementEntityList.isEmpty()) {
|
||||
return; // 提前退出,避免无谓查询
|
||||
}
|
||||
|
||||
// 2. 查询所有状态为“进行中”的福利包
|
||||
List<MarketBenefitPackageEntity> userBenefitPackageList = userBenefitPackageService.list(
|
||||
Wrappers.lambdaQuery(MarketBenefitPackageEntity.class)
|
||||
.eq(MarketBenefitPackageEntity::getStatus, 2)
|
||||
);
|
||||
|
||||
// 3. 按用户分组(注意:这里创建的是新 List,但后续仍需包装)
|
||||
Map<Long, List<MarketBenefitPackageEntity>> benefitPackageMap = userBenefitPackageList.stream()
|
||||
.collect(Collectors.groupingBy(MarketBenefitPackageEntity::getUserId));
|
||||
|
||||
// 4. 处理每个结算任务
|
||||
for (MarketPackageDailySettlementEntity settlementEntity : settlementEntityList) {
|
||||
Long userId = settlementEntity.getUserId();
|
||||
List<MarketBenefitPackageEntity> originalList = benefitPackageMap.get(userId);
|
||||
|
||||
if (originalList.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 关键:创建可变副本,避免不可变列表问题
|
||||
List<MarketBenefitPackageEntity> benefitPackageList = new ArrayList<>(originalList);
|
||||
|
||||
// 获取用户积分账户
|
||||
MarketBenefitPointEntity benefitPoint = benefitPointService.getById(userId);
|
||||
if (benefitPoint == null) {
|
||||
log.warn("用户积分账户不存在,userId: {}", userId);
|
||||
continue;
|
||||
}
|
||||
|
||||
BigDecimal lastAmount = benefitPoint.getAmount();
|
||||
List<MarketBenefitPointLogEntity> pointLogList = new ArrayList<>();
|
||||
|
||||
// 处理每个福利包
|
||||
for (MarketBenefitPackageEntity pkg : benefitPackageList) {
|
||||
BigDecimal amountOut = pkg.getAmountOut();
|
||||
BigDecimal amountTotal = pkg.getAmountTotal();
|
||||
BigDecimal amountDay = pkg.getAmountDay();
|
||||
|
||||
// 修正:防止超额发放
|
||||
BigDecimal newAmountOut = amountOut.add(amountDay);
|
||||
if (newAmountOut.compareTo(amountTotal) > 0) {
|
||||
amountDay = amountTotal.subtract(amountOut); // 只发剩余部分
|
||||
newAmountOut = amountTotal;
|
||||
pkg.setStatus(3); // 完成
|
||||
}
|
||||
|
||||
// 处理天数
|
||||
int outDay = pkg.getOutDay() + 1;
|
||||
if (outDay >= pkg.getDayTotal()) {
|
||||
outDay = pkg.getDayTotal();
|
||||
pkg.setStatus(3); // 完成
|
||||
}
|
||||
|
||||
// 记录日志
|
||||
pointLogList.add(new MarketBenefitPointLogEntity()
|
||||
.setUserId(userId)
|
||||
.setAmount(amountDay)
|
||||
.setLastAmount(lastAmount)
|
||||
.setFee(BigDecimal.ZERO)
|
||||
.setSourceType(MarketBusinessModule.BENEFIT_PACKAGE.getCode())
|
||||
.setSourceId(pkg.getId())
|
||||
.setSourceDetail(JSONObject.toJSONString(pkg))
|
||||
.setIsComplete(0)
|
||||
.setStatisticalDate(new Date())
|
||||
.setRemark(pkg.getPackageName() + "每日福利积分产出")
|
||||
);
|
||||
|
||||
lastAmount = lastAmount.add(amountDay);
|
||||
|
||||
// 更新福利包状态
|
||||
pkg.setAmountOut(newAmountOut);
|
||||
pkg.setOutDay(outDay);
|
||||
}
|
||||
|
||||
// 批量保存日志
|
||||
if (!pointLogList.isEmpty()) {
|
||||
if (!benefitPointLogService.saveBatch(pointLogList)) {
|
||||
log.error("福利积分记录失败-批量保存日志, userId: " + userId);
|
||||
throw new RuntimeException("福利积分记录失败, userId: " + userId);
|
||||
}
|
||||
|
||||
// 标记日志为完成
|
||||
pointLogList.forEach(log -> log.setIsComplete(1));
|
||||
benefitPointLogService.updateBatchById(pointLogList);
|
||||
|
||||
// 累加总发放积分
|
||||
BigDecimal sendPoint = pointLogList.stream()
|
||||
.map(MarketBenefitPointLogEntity::getAmount)
|
||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
// 更新用户积分总额
|
||||
benefitPoint.setAmount(benefitPoint.getAmount().add(sendPoint));
|
||||
if (!benefitPointService.updateById(benefitPoint)) {
|
||||
log.error("更新用户积分失败-更新福利积分, userId: " + userId);
|
||||
throw new RuntimeException("更新用户积分失败, userId: " + userId);
|
||||
}
|
||||
|
||||
// 更新福利包(使用可变列表)
|
||||
if (!userBenefitPackageService.updateBatchById(benefitPackageList)) {
|
||||
log.error("更新福利包失败-更新福利包, userId: " + userId);
|
||||
throw new RuntimeException("更新福利包失败, userId: " + userId);
|
||||
}
|
||||
}
|
||||
|
||||
// 更新结算任务
|
||||
List<Long> packageIds = benefitPackageList.stream()
|
||||
.map(MarketBenefitPackageEntity::getId)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
settlementEntity.setIsComplete(1);
|
||||
settlementEntity.setPackageId(packageIds);
|
||||
userPackageDailySettlementService.updateById(settlementEntity);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package org.springblade.job.processor;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.common.utils.date.DateUtil;
|
||||
import org.springblade.modules.market.pojo.entity.MarketBenefitPackageEntity;
|
||||
import org.springblade.modules.market.pojo.entity.MarketPackageDailySettlementEntity;
|
||||
import org.springblade.modules.market.service.IMarketBenefitPackageService;
|
||||
import org.springblade.modules.market.service.IMarketPackageDailySettlementService;
|
||||
import org.springframework.stereotype.Component;
|
||||
import tech.powerjob.worker.core.processor.ProcessResult;
|
||||
import tech.powerjob.worker.core.processor.TaskContext;
|
||||
import tech.powerjob.worker.core.processor.sdk.BasicProcessor;
|
||||
import tech.powerjob.worker.log.OmsLogger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 福利包每日发放结算记录
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class InitBenefitPackageSettlementProcessor implements BasicProcessor {
|
||||
|
||||
private final IMarketBenefitPackageService userBenefitPackageService;
|
||||
private final IMarketPackageDailySettlementService userPackageDailySettlementService;
|
||||
|
||||
@Override
|
||||
public ProcessResult process(TaskContext context) {
|
||||
|
||||
OmsLogger omsLogger = context.getOmsLogger(); // PowerJob 内置日志,控制台可查
|
||||
|
||||
try {
|
||||
omsLogger.info("开始执行定时任务-初始化用户福利包每天结算记录...");
|
||||
initUserPackageDailySettlement();
|
||||
omsLogger.info("结束执行定时任务-初始化用户福利包每天结算记录");
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("任务执行异常", e);
|
||||
omsLogger.error("任务执行异常: {}", e.getMessage());
|
||||
return new ProcessResult(false, "系统异常: " + e.getMessage());
|
||||
}
|
||||
|
||||
// 返回结果,该结果会被持久化到数据库,在前端页面直接查看,极为方便
|
||||
return new ProcessResult(true, "result is success");
|
||||
}
|
||||
|
||||
public void initUserPackageDailySettlement() {
|
||||
|
||||
//用户福利包列表
|
||||
List<MarketBenefitPackageEntity> benefitPackageList = userBenefitPackageService.list(
|
||||
Wrappers.lambdaQuery(MarketBenefitPackageEntity.class)
|
||||
.eq(MarketBenefitPackageEntity::getStatus, 2)
|
||||
);
|
||||
|
||||
//用户福利包列表-map
|
||||
Map<Long, List<MarketBenefitPackageEntity>> benefitPackageMap = benefitPackageList.stream().collect(Collectors.groupingBy(MarketBenefitPackageEntity::getUserId));
|
||||
|
||||
//用户当天发放福利积分记录列表
|
||||
List<MarketPackageDailySettlementEntity> settlementEntityList = userPackageDailySettlementService.list(
|
||||
Wrappers.lambdaQuery(MarketPackageDailySettlementEntity.class)
|
||||
.eq(MarketPackageDailySettlementEntity::getStatisticalDate, DateUtil.getToday())
|
||||
);
|
||||
//用户当天发放福利积分记录列表-map
|
||||
Map<Long, List<MarketPackageDailySettlementEntity>> settlementEntityMap = settlementEntityList.stream().collect(Collectors.groupingBy(MarketPackageDailySettlementEntity::getUserId));
|
||||
|
||||
|
||||
List<MarketPackageDailySettlementEntity> userPackageSettlementList = new ArrayList<>();
|
||||
|
||||
benefitPackageMap.forEach((userId, packageList) -> {
|
||||
|
||||
if (!settlementEntityMap.containsKey(userId)){
|
||||
userPackageSettlementList.add(
|
||||
new MarketPackageDailySettlementEntity()
|
||||
.setUserId(userId)
|
||||
.setUserName(packageList.get(0).getUserName())
|
||||
.setAccount(packageList.get(0).getPhone())
|
||||
.setStatisticalDate(DateUtil.getToday())
|
||||
.setPackageId(List.of())
|
||||
.setIsComplete(0)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
userPackageDailySettlementService.saveBatch(userPackageSettlementList);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package org.springblade.job.processor;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserPointEntity;
|
||||
import org.springblade.modules.common.service.ICommonUserPointService;
|
||||
import org.springblade.modules.market.pojo.entity.MarketBenefitPointEntity;
|
||||
import org.springblade.modules.market.pojo.entity.MarketCashCouponEntity;
|
||||
import org.springblade.modules.market.pojo.entity.MarketInfoEntity;
|
||||
import org.springblade.modules.market.pojo.entity.MarketUserCommissionEntity;
|
||||
import org.springblade.modules.market.service.IMarketBenefitPointService;
|
||||
import org.springblade.modules.market.service.IMarketCashCouponService;
|
||||
import org.springblade.modules.market.service.IMarketInfoService;
|
||||
import org.springblade.modules.market.service.IMarketUserCommissionService;
|
||||
import org.springblade.modules.system.pojo.entity.User;
|
||||
import org.springblade.modules.system.service.IUserService;
|
||||
import org.springframework.stereotype.Component;
|
||||
import tech.powerjob.worker.core.processor.ProcessResult;
|
||||
import tech.powerjob.worker.core.processor.TaskContext;
|
||||
import tech.powerjob.worker.core.processor.sdk.BasicProcessor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class InitUserAssetsProcessor implements BasicProcessor {
|
||||
|
||||
private final IUserService userService;
|
||||
|
||||
private final IMarketInfoService marketInfoService;
|
||||
|
||||
private final ICommonUserPointService userPointService;
|
||||
|
||||
private final IMarketCashCouponService cashCouponService;
|
||||
|
||||
private final IMarketBenefitPointService benefitPointService;
|
||||
|
||||
private final IMarketUserCommissionService commissionService;
|
||||
|
||||
|
||||
@Override
|
||||
public ProcessResult process(TaskContext taskContext) throws Exception {
|
||||
List<User> userList = userService.list(Wrappers.<User>lambdaQuery().eq(User::getUserType, 2).eq(User::getIsDeleted, 0));
|
||||
userList.forEach(user -> {
|
||||
MarketInfoEntity marketInfo = marketInfoService.getById(user.getId());
|
||||
if (marketInfo == null) {
|
||||
marketInfo = new MarketInfoEntity();
|
||||
marketInfo.setId(user.getId());
|
||||
marketInfoService.save(marketInfo);
|
||||
}
|
||||
CommonUserPointEntity userPoint = userPointService.getById(user.getId());
|
||||
if (userPoint == null) {
|
||||
userPoint = new CommonUserPointEntity();
|
||||
userPoint.setId(user.getId());
|
||||
userPointService.save(userPoint);
|
||||
}
|
||||
MarketCashCouponEntity cashCoupon = cashCouponService.getById(user.getId());
|
||||
if (cashCoupon == null) {
|
||||
cashCoupon = new MarketCashCouponEntity();
|
||||
cashCoupon.setId(user.getId());
|
||||
cashCouponService.save(cashCoupon);
|
||||
}
|
||||
MarketBenefitPointEntity benefitPoint = benefitPointService.getById(user.getId());
|
||||
if (benefitPoint == null) {
|
||||
benefitPoint = new MarketBenefitPointEntity();
|
||||
benefitPoint.setId(user.getId());
|
||||
benefitPointService.save(benefitPoint);
|
||||
}
|
||||
MarketUserCommissionEntity commission = commissionService.getById(user.getId());
|
||||
if (commission == null) {
|
||||
commission = new MarketUserCommissionEntity();
|
||||
commission.setId(user.getId());
|
||||
commissionService.save(commission);
|
||||
}
|
||||
});
|
||||
return new ProcessResult(true, "result is success");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -40,11 +40,11 @@ public class APPCommonController {
|
||||
/**
|
||||
* 获取省市区列表
|
||||
*/
|
||||
@GetMapping("/find-region-list")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@GetMapping("/region-list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "获取省市区列表")
|
||||
public R<List<AppCommonRegionsInfoVO>> findRegionList(@RequestParam @Min(value = 0 , message = "父级id不能小于0") Long pid ,
|
||||
@RequestParam @Min(value = 1 , message = "只能选到省") @Max(value = 4 , message = "只能选到街道") Integer level) {
|
||||
public R<List<AppCommonRegionsInfoVO>> findRegionList(@RequestParam @Min(value = 0 , message = "请选择有效地区") Long pid ,
|
||||
@RequestParam @Min(value = 1 , message = "请选择省、市、区或街道") @Max(value = 4 , message = "请选择省、市、区或街道") Integer level) {
|
||||
return R.data(commonRegionsInfoService.findRegionList(pid , level));
|
||||
}
|
||||
|
||||
|
||||
@@ -4,9 +4,15 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.modules.api.vo.MallCategoryApiVO;
|
||||
import org.springblade.modules.api.vo.MallProductApiVO;
|
||||
import org.springblade.modules.api.vo.MallProductDetailApiVO;
|
||||
import org.springblade.modules.mall.convert.AppMallConvert;
|
||||
import org.springblade.modules.mall.pojo.entity.MallCategoryEntity;
|
||||
import org.springblade.modules.mall.service.IMallCategoryService;
|
||||
import org.springblade.modules.mall.service.IMallProductService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -19,16 +25,41 @@ import java.util.List;
|
||||
@Tag(name = "APP用户接口", description = "APP用户接口")
|
||||
public class APPMallController {
|
||||
|
||||
private final IMallProductService mallProductService;
|
||||
private final IMallProductService productService;
|
||||
|
||||
private final IMallCategoryService categoryService;
|
||||
|
||||
/**
|
||||
* 商品列表
|
||||
*/
|
||||
@GetMapping("/categories")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "列表")
|
||||
public R<List<MallCategoryApiVO>> categories() {
|
||||
List<MallCategoryEntity> list = categoryService.list();
|
||||
return R.data(AppMallConvert.INSTANCE.convertMallCategoryApiListVO(list));
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "列表")
|
||||
public R<List<MallProductApiVO>> list() {
|
||||
return R.data(mallProductService.apiVoList());
|
||||
public R<List<MallProductApiVO>> list(@RequestParam(required = false) Long categoryId) {
|
||||
return R.data(productService.apiVoList(categoryId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "详情", description = "传入vo")
|
||||
public R<MallProductDetailApiVO> detail(@Valid MallProductDetailApiVO vo) {
|
||||
return R.data(productService.apiDetailVO(vo.getId()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -10,16 +10,15 @@ import lombok.AllArgsConstructor;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.modules.api.request.CreateOrderRequest;
|
||||
import org.springblade.modules.api.request.PaymentRequest;
|
||||
import org.springblade.modules.api.request.*;
|
||||
import org.springblade.modules.api.response.CreateOrderResponse;
|
||||
import org.springblade.modules.api.response.PaymentResponse;
|
||||
import org.springblade.modules.api.vo.CommonUserOrderApiVO;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserAddressVO;
|
||||
import org.springblade.modules.common.service.ICommonUserOrderService;
|
||||
import org.springblade.modules.api.vo.*;
|
||||
import org.springblade.modules.common.service.*;
|
||||
import org.springblade.modules.system.service.IUserService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Hidden
|
||||
@@ -33,6 +32,16 @@ public class APPUserController {
|
||||
|
||||
private final ICommonUserOrderService orderService;
|
||||
|
||||
private final ICommonUserNoticeService userNoticeService;
|
||||
|
||||
private final ICommonUserAddressService addressService;
|
||||
|
||||
private final ICommonUserPointService pointService;
|
||||
|
||||
private final ICommonLotteryRecordService lotteryRecordService;
|
||||
|
||||
private final ICommonLotteryPrizeService lotteryPrizeService;
|
||||
|
||||
|
||||
/**
|
||||
* 是否修改过密码
|
||||
@@ -89,10 +98,120 @@ public class APPUserController {
|
||||
*/
|
||||
@GetMapping("/order-page")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "用户订单分页列表", description = "传入userAddress")
|
||||
@Operation(summary = "用户订单分页列表", description = "传入userAddress")
|
||||
public R<IPage<CommonUserOrderApiVO>> orderList(CommonUserOrderApiVO userOrder, Query query) {
|
||||
IPage<CommonUserOrderApiVO> pages = orderService.selectOrderApiPage(Condition.getPage(query), userOrder);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户订单列表
|
||||
*/
|
||||
@GetMapping("/order-detail")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "用户订单分页列表")
|
||||
public R<CommonUserOrderDetailApiVO> orderDetail(Long id) {
|
||||
return R.data(orderService.orderDetail(id));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/system-notice")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "APP系统消息列表")
|
||||
public R<List<CommonUserNoticeApiVO>> systemNotice() {
|
||||
return R.data(userNoticeService.appSystemNoticeList());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/user-notice")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "用户消息列表", description = "传入userNoticeVO")
|
||||
public R<IPage<CommonUserNoticeApiVO>> noticePage(Query query) {
|
||||
IPage<CommonUserNoticeApiVO> pages = userNoticeService.selectAppUserNoticeApiPage(Condition.getPage(query), new CommonUserNoticeApiVO());
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/notice-detail")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "用户读取消息")
|
||||
public R<CommonUserNoticeDetailApiVO> noticeDetail(Long id) {
|
||||
return R.data(userNoticeService.userNoticeDetail(id));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/unread")
|
||||
@ApiOperationSupport(order = 10)
|
||||
@Operation(summary = "用户未读消息数量")
|
||||
public R<Long> unreadNum() {
|
||||
return R.data(userNoticeService.appUnreadNoticeNum());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/user-address")
|
||||
@ApiOperationSupport(order = 11)
|
||||
@Operation(summary = "用户收货地址", description = "传入userAddressVO")
|
||||
public R<List<CommonUserAddressApiVO>> addressList(Query query) {
|
||||
return R.data(addressService.selectAddressList(Condition.getPage(query), new CommonUserAddressApiVO()));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/submit-address")
|
||||
@ApiOperationSupport(order = 12)
|
||||
@Operation(summary = "提交用户收货地址", description = "传入AddressSubmitRequest")
|
||||
public R<Boolean> submitAddress(@Valid @RequestBody AddressSubmitRequest request) {
|
||||
return R.status(addressService.submitAddress(request));
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping("/delete-address")
|
||||
@ApiOperationSupport(order = 13)
|
||||
@Operation(summary = "删除用户收货地址", description = "传入id")
|
||||
public R<Boolean> removeAddress(@Valid @RequestBody AddressRemoveRequest request) {
|
||||
return R.status(addressService.removeAddress(request.getIds()));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/user-points")
|
||||
@ApiOperationSupport(order = 14)
|
||||
@Operation(summary = "用户积分查询")
|
||||
public R<BigDecimal> userPoints() {
|
||||
return R.data(pointService.queryPoint());
|
||||
}
|
||||
|
||||
@GetMapping("/lottery-prizes")
|
||||
@ApiOperationSupport(order = 15)
|
||||
@Operation(summary = "奖品列表")
|
||||
public R<List<CommonLotteryPrizeApiVO>> lotteryPrizes() {
|
||||
return R.data(lotteryPrizeService.staticList());
|
||||
}
|
||||
|
||||
@GetMapping("/lottery-records")
|
||||
@ApiOperationSupport(order = 16)
|
||||
@Operation(summary = "抽奖记录")
|
||||
public R<IPage<CommonLotteryRecordApiVO>> lotteryRecords(Query query) {
|
||||
return R.data(lotteryRecordService.selectLotteryRecordApiPage(Condition.getPage(query), new CommonLotteryRecordApiVO()));
|
||||
}
|
||||
|
||||
@PostMapping("/lottery-draw")
|
||||
@ApiOperationSupport(order = 17)
|
||||
@Operation(summary = "用户抽奖", description = "传入LotteriesDrawRequest")
|
||||
public R<CommonLotteryPrizeApiVO> draw(@Valid @RequestBody LotteryDrawRequest request) {
|
||||
return R.data(lotteryPrizeService.draw(request));
|
||||
}
|
||||
|
||||
@GetMapping("/lottery-rules")
|
||||
@ApiOperationSupport(order = 18)
|
||||
@Operation(summary = "抽奖规则")
|
||||
public R<String> lotteryRules() {
|
||||
return R.data(lotteryPrizeService.rules());
|
||||
}
|
||||
|
||||
@GetMapping("/lottery-winners")
|
||||
@ApiOperationSupport(order = 19)
|
||||
@Operation(summary = "获奖名单")
|
||||
public R<List<CommonLotteryWinnerApiVO>> lotteryWinners() {
|
||||
return R.data(lotteryRecordService.lotteryWinners());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.secure.utils.AuthUtil;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.modules.api.request.AcquireBenefitPackageRequest;
|
||||
import org.springblade.modules.api.vo.*;
|
||||
import org.springblade.modules.common.service.ICommonUserNoticeService;
|
||||
import org.springblade.modules.market.manager.MarketUserManager;
|
||||
import org.springblade.modules.api.vo.MarketBenefitPackageVO;
|
||||
import org.springblade.modules.api.vo.MarketDirectInfoVO;
|
||||
import org.springblade.modules.userPackage.service.IUserMarketBenefitPackageService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springblade.modules.market.manager.MarketUserPointManager;
|
||||
import org.springblade.modules.market.service.IMarketBenefitPackageService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -28,11 +28,17 @@ import java.util.List;
|
||||
@Tag(name = "APP福利包接口", description = "APP福利包接口")
|
||||
public class MarketUserController {
|
||||
|
||||
private final IUserMarketBenefitPackageService userMarketBenefitPackageService;
|
||||
private final IMarketBenefitPackageService userMarketBenefitPackageService;
|
||||
|
||||
private final MarketUserManager marketUserManager;
|
||||
|
||||
@GetMapping("/find-user-benefit-pack-list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
private final ICommonUserNoticeService userNoticeService;
|
||||
|
||||
private final MarketUserPointManager marketUserPointManager;
|
||||
|
||||
|
||||
@GetMapping("/package-list")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "分页", description = "传入userMarketBenefitPackage")
|
||||
public R<IPage<MarketBenefitPackageVO>> findUserPackList(MarketBenefitPackageVO userMarketBenefitPackage, Query query) {
|
||||
IPage<MarketBenefitPackageVO> pages = userMarketBenefitPackageService.findUserPackList(Condition.getPage(query),userMarketBenefitPackage , AuthUtil.getUserId());
|
||||
@@ -40,24 +46,97 @@ public class MarketUserController {
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/find-user-market-direct-list")
|
||||
@GetMapping("/my-team")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "查直推")
|
||||
public R<List<MarketDirectInfoVO>> findMarketDirectList() {
|
||||
return R.data(marketUserManager.findUserPackList( AuthUtil.getUserId()));
|
||||
public R<List<MarketDirectInfoApiVO>> myTeam() {
|
||||
return R.data(marketUserManager.findUserPackList());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/find-user-market-parent")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@GetMapping("/my-invitor")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "查推荐人信息")
|
||||
public R<MarketDirectInfoVO> findMarketParent() {
|
||||
return R.data(marketUserManager.findMarketParent( AuthUtil.getUserId()));
|
||||
public R<MarketDirectInfoApiVO> myInvitor() {
|
||||
return R.data(marketUserManager.findMarketParent());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/system-notice")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "Market系统消息列表")
|
||||
public R<List<CommonUserNoticeApiVO>> systemNotice() {
|
||||
return R.data(userNoticeService.marketSystemNoticeList());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/user-notice")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "Market用户消息列表", description = "传入userNoticeVO")
|
||||
public R<IPage<CommonUserNoticeApiVO>> noticePage(Query query) {
|
||||
IPage<CommonUserNoticeApiVO> pages = userNoticeService.selectMarketUserNoticeApiPage(Condition.getPage(query), new CommonUserNoticeApiVO());
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/notice-detail")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "用户消息详情", description = "传入request")
|
||||
public R<CommonUserNoticeDetailApiVO> noticeDetail(Long id) {
|
||||
return R.data(userNoticeService.userNoticeDetail(id));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/unread")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "Market用户未读消息数量")
|
||||
public R<Long> unreadNum() {
|
||||
return R.data(userNoticeService.marketUnreadNoticeNum());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/benefit-package")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "福利包列表")
|
||||
public R<List<MarketPackageTemplateVO>> benefitPackageList() {
|
||||
return R.data(marketUserManager.benefitPackageList());
|
||||
}
|
||||
|
||||
@PostMapping("/acquire-benefit-package")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "兑换福利包", description = "传入acquireBenefitPackageRequest")
|
||||
public R<Boolean> acquireBenefitPackage(@RequestBody AcquireBenefitPackageRequest request) {
|
||||
return R.status(marketUserManager.acquireBenefitPackage(request));
|
||||
}
|
||||
|
||||
@GetMapping("/user-assets")
|
||||
@ApiOperationSupport(order = 10)
|
||||
@Operation(summary = "用户资产查询")
|
||||
public R<UserAssetsApiVO> userAssets() {
|
||||
return R.data(marketUserManager.userAssets());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/benefit-point-log")
|
||||
@ApiOperationSupport(order = 11)
|
||||
@Operation(summary = "福利积分流水")
|
||||
public R<IPage<MarketUserBenefitPointLogVO>> benefitPointLogList(Query query , MarketUserBenefitPointLogVO benefitPointLogVO) {
|
||||
return R.data(marketUserPointManager.benefitPointLogList(Condition.getPage(query) , benefitPointLogVO));
|
||||
}
|
||||
|
||||
@GetMapping("/cash-coupon-log")
|
||||
@ApiOperationSupport(order = 12)
|
||||
@Operation(summary = "现金券流水")
|
||||
public R<IPage<MarketUserCashCouponLogVO>> cashCouponLogList(Query query , MarketUserCashCouponLogVO cashCouponLogVO) {
|
||||
return R.data(marketUserPointManager.cashCouponLogList(Condition.getPage(query) , cashCouponLogVO));
|
||||
}
|
||||
|
||||
@GetMapping("/user-commission-log")
|
||||
@ApiOperationSupport(order = 13)
|
||||
@Operation(summary = "用户佣金流水")
|
||||
public R<IPage<MarketUserCommissionLogVO>> userCommissionLogList(Query query , MarketUserCommissionLogVO userCommissionLogVO) {
|
||||
return R.data(marketUserPointManager.userCommissionLogList(Condition.getPage(query) , userCommissionLogVO));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.springblade.modules.api.request;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class AcquireBenefitPackageRequest implements Serializable {
|
||||
|
||||
@NotNull(message = "请选择要兑换的福利包")
|
||||
private Long packId;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.springblade.modules.api.request;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AddressRemoveRequest implements Serializable {
|
||||
|
||||
@NotEmpty(message = "至少选择一条地址")
|
||||
private List<Long> ids;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package org.springblade.modules.api.request;
|
||||
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class AddressSubmitRequest implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
@NotNull(message = "请选择地区")
|
||||
private Integer regionsId;
|
||||
|
||||
@NotEmpty(message = "详细地址必填")
|
||||
private String detail;
|
||||
|
||||
@NotEmpty(message = "联系人必填")
|
||||
private String consignee;
|
||||
|
||||
@NotEmpty(message = "手机号必填")
|
||||
private String phone;
|
||||
|
||||
@NotNull(message = "是否默认必选")
|
||||
private Integer isDefault;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.springblade.modules.api.request;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class LotteryDrawRequest implements Serializable {
|
||||
|
||||
@NotNull(message = "无效积分")
|
||||
private BigDecimal amount;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class CommonLotteryPrizeApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String prizeName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class CommonLotteryRecordApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String prizeName;
|
||||
|
||||
private BigDecimal pointsUsed;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class CommonLotteryWinnerApiVO implements Serializable {
|
||||
|
||||
private String prizeName;
|
||||
|
||||
private String account;
|
||||
|
||||
private String username;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
@Data
|
||||
public class CommonUserAddressApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private Long regionsInfoId;
|
||||
|
||||
private String province;
|
||||
|
||||
private String city;
|
||||
|
||||
private String district;
|
||||
|
||||
private String street;
|
||||
|
||||
private String detail;
|
||||
|
||||
private String consignee;
|
||||
|
||||
private String phone;
|
||||
|
||||
private Integer isDefault;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
public class CommonUserNoticeApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String moduleType;
|
||||
/**
|
||||
* 是否已读 0-否 1-是
|
||||
*/
|
||||
private Integer hasRead;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
private String content;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
public class CommonUserNoticeDetailApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String moduleType;
|
||||
|
||||
private String title;
|
||||
|
||||
private String content;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
@@ -11,36 +11,18 @@ public class CommonUserOrderApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String consigneePhone;
|
||||
|
||||
private String consignee;
|
||||
|
||||
private String orderType;
|
||||
|
||||
private String itemCode;
|
||||
|
||||
private String itemName;
|
||||
|
||||
private String imageUrl;
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
private String deliveryAddress;
|
||||
|
||||
private String expressCompany;
|
||||
|
||||
private String expressNo;
|
||||
|
||||
private Integer orderStatus;
|
||||
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
private BigDecimal actualAmount;
|
||||
|
||||
private Integer paymentType;
|
||||
|
||||
private Date paymentTime;
|
||||
|
||||
private Integer paymentStatus;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class CommonUserOrderDetailApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String consigneePhone;
|
||||
|
||||
private String consignee;
|
||||
|
||||
private String orderType;
|
||||
|
||||
private String itemCode;
|
||||
|
||||
private String itemName;
|
||||
|
||||
private String imageUrl;
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
private String deliveryAddress;
|
||||
|
||||
private String expressCompany;
|
||||
|
||||
private String expressNo;
|
||||
|
||||
private Integer orderStatus;
|
||||
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
private BigDecimal actualAmount;
|
||||
|
||||
private Integer paymentType;
|
||||
|
||||
private Date paymentTime;
|
||||
|
||||
private Integer paymentStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springblade.core.tool.utils.StringPool;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class FullRegionInfoVO implements Serializable {
|
||||
|
||||
private Integer currentLevel = -1;
|
||||
|
||||
private String street = StringPool.EMPTY;
|
||||
|
||||
private String district = StringPool.EMPTY;
|
||||
|
||||
private String city = StringPool.EMPTY;
|
||||
|
||||
private String province = StringPool.EMPTY;
|
||||
|
||||
private Long streetId = -1L;
|
||||
|
||||
private Long districtId = -1L;
|
||||
|
||||
private Long cityId = -1L;
|
||||
|
||||
private Long provinceId = -1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class MallCategoryApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String categoryName;
|
||||
|
||||
private String imageUrl;
|
||||
}
|
||||
@@ -11,18 +11,14 @@ public class MallProductApiVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String serialNumber;
|
||||
|
||||
private String productName;
|
||||
|
||||
private List<String> mainImageUrls;
|
||||
|
||||
private List<String> detailImageUrls;
|
||||
|
||||
private String thumbImageUrl;
|
||||
|
||||
private BigDecimal originalPrice;
|
||||
|
||||
private BigDecimal retailPrice;
|
||||
|
||||
private Integer sales;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springblade.modules.mall.pojo.entity.MallProductEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class MallProductDetailApiVO implements Serializable {
|
||||
|
||||
@NotNull(message = "无效商品")
|
||||
private Long id;
|
||||
|
||||
private String serialNumber;
|
||||
|
||||
private String productName;
|
||||
|
||||
private List<String> mainImageUrls;
|
||||
|
||||
private List<String> detailImageUrls;
|
||||
|
||||
private String thumbImageUrl;
|
||||
|
||||
private BigDecimal originalPrice;
|
||||
|
||||
private BigDecimal retailPrice;
|
||||
|
||||
private Integer sales;
|
||||
|
||||
private Integer stock;
|
||||
|
||||
private List<MallProductEntity.Spec> specs;
|
||||
|
||||
private List<String> tags;
|
||||
|
||||
}
|
||||
@@ -28,6 +28,7 @@ package org.springblade.modules.api.vo;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -40,10 +41,12 @@ import java.util.Date;
|
||||
* @since 2026-02-05
|
||||
*/
|
||||
@Data
|
||||
public class MarketDirectInfoVO implements Serializable {
|
||||
private String phone;
|
||||
private String name;
|
||||
@Accessors(chain = true)
|
||||
public class MarketDirectInfoApiVO implements Serializable {
|
||||
|
||||
private String phone;
|
||||
|
||||
private String name;
|
||||
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 用户积分包信息表 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-05
|
||||
*/
|
||||
@Data
|
||||
public class MarketPackageTemplateVO implements Serializable {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String packageName;
|
||||
/**
|
||||
* 最大购买数量
|
||||
*/
|
||||
private Integer userLimit;
|
||||
/**
|
||||
* 全网最大兑换数量
|
||||
*/
|
||||
private Integer maxLimit;
|
||||
/**
|
||||
* 产出总天数
|
||||
*/
|
||||
private Integer dayLimit;
|
||||
/**
|
||||
* 总产出福利积分
|
||||
*/
|
||||
private BigDecimal benefitPointAmount;
|
||||
/**
|
||||
* 购买赠与福利值
|
||||
*/
|
||||
private BigDecimal benefitValueAmount;
|
||||
/**
|
||||
* 兑换包需要的福利积分
|
||||
*/
|
||||
private BigDecimal benefitPointPrice;
|
||||
/**
|
||||
* 兑换包需要的现金券
|
||||
*/
|
||||
private BigDecimal cashCouponPrice;
|
||||
/**
|
||||
* 已兑换数量
|
||||
*/
|
||||
private Integer exchangedQuantity;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户福利值流水表 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MarketUserBenefitPointLogVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 上一笔金额
|
||||
*/
|
||||
private BigDecimal lastAmount;
|
||||
/**
|
||||
* 手续费
|
||||
*/
|
||||
private BigDecimal fee;
|
||||
|
||||
|
||||
/**
|
||||
* 消费类型 1-收入 2-支出
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 统计时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date statisticalDate;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户福利值流水表 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MarketUserCashCouponLogVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 上一笔金额
|
||||
*/
|
||||
private BigDecimal lastAmount;
|
||||
/**
|
||||
* 手续费
|
||||
*/
|
||||
private BigDecimal fee;
|
||||
|
||||
|
||||
/**
|
||||
* 消费类型 1-收入 2-支出
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 统计时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date statisticalDate;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户福利值流水表 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class MarketUserCommissionLogVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 上一笔金额
|
||||
*/
|
||||
private BigDecimal lastAmount;
|
||||
/**
|
||||
* 手续费
|
||||
*/
|
||||
private BigDecimal fee;
|
||||
|
||||
|
||||
/**
|
||||
* 消费类型 1-收入 2-支出
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 统计时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date statisticalDate;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.springblade.modules.api.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class UserAssetsApiVO implements Serializable {
|
||||
|
||||
private BigDecimal withdrawableBalance; // 可提现余额
|
||||
|
||||
private BigDecimal benefitPoints; // 福利积分
|
||||
|
||||
private BigDecimal cashCouponAmount; // 现金券数量(或 List<CashCoupon>)
|
||||
|
||||
}
|
||||
@@ -105,6 +105,7 @@ public class AppRegisterTokenGranter extends PasswordTokenGranter {
|
||||
user.setUserType(UserType.of(request.getUserType()).getCategory());
|
||||
user.setTenantId(request.getTenantId());
|
||||
user.setAccount(request.getPhone());
|
||||
user.setPhone(request.getPhone());
|
||||
user.setName(StringUtil.random(10));
|
||||
user.setPassword(DigestUtil.encrypt(ParamCache.getValue(INIT_PASSWD_VALUE)));
|
||||
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.CommonLotteryPrizeEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonLotteryPrizeVO;
|
||||
import org.springblade.modules.common.wrapper.CommonLotteryPrizeWrapper;
|
||||
import org.springblade.modules.common.service.ICommonLotteryPrizeService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 奖品配置表 控制器
|
||||
*
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("blade-lotteryprize/lotteryPrize")
|
||||
@Tag(name = "奖品配置表", description = "奖品配置表接口")
|
||||
public class CommonLotteryPrizeController extends BladeController {
|
||||
|
||||
private final ICommonLotteryPrizeService lotteryPrizeService;
|
||||
|
||||
/**
|
||||
* 奖品配置表 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入lotteryPrize")
|
||||
public R<CommonLotteryPrizeVO> detail(CommonLotteryPrizeEntity lotteryPrize) {
|
||||
CommonLotteryPrizeEntity detail = lotteryPrizeService.getOne(Condition.getQueryWrapper(lotteryPrize));
|
||||
return R.data(CommonLotteryPrizeWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 奖品配置表 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入lotteryPrize")
|
||||
public R<IPage<CommonLotteryPrizeVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> lotteryPrize, Query query) {
|
||||
IPage<CommonLotteryPrizeEntity> pages = lotteryPrizeService.page(Condition.getPage(query), Condition.getQueryWrapper(lotteryPrize, CommonLotteryPrizeEntity.class));
|
||||
return R.data(CommonLotteryPrizeWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 奖品配置表 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入lotteryPrize")
|
||||
public R<IPage<CommonLotteryPrizeVO>> page(CommonLotteryPrizeVO lotteryPrize, Query query) {
|
||||
IPage<CommonLotteryPrizeVO> pages = lotteryPrizeService.selectLotteryPrizePage(Condition.getPage(query), lotteryPrize);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 奖品配置表 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入lotteryPrize")
|
||||
public R save(@Valid @RequestBody CommonLotteryPrizeEntity lotteryPrize) {
|
||||
return R.status(lotteryPrizeService.save(lotteryPrize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 奖品配置表 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入lotteryPrize")
|
||||
public R update(@Valid @RequestBody CommonLotteryPrizeEntity lotteryPrize) {
|
||||
return R.status(lotteryPrizeService.updateById(lotteryPrize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 奖品配置表 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入lotteryPrize")
|
||||
public R submit(@Valid @RequestBody CommonLotteryPrizeEntity lotteryPrize) {
|
||||
return R.status(lotteryPrizeService.saveOrUpdate(lotteryPrize));
|
||||
}
|
||||
|
||||
/**
|
||||
* 奖品配置表 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(lotteryPrizeService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.secure.BladeUser;
|
||||
import org.springblade.core.secure.annotation.IsAdmin;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.CommonLotteryRecordEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonLotteryRecordVO;
|
||||
import org.springblade.modules.common.excel.CommonLotteryRecordExcel;
|
||||
import org.springblade.modules.common.wrapper.CommonLotteryRecordWrapper;
|
||||
import org.springblade.modules.common.service.ICommonLotteryRecordService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springblade.core.excel.util.ExcelUtil;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 抽奖记录表 控制器
|
||||
*
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("blade-lotteryprize/lotteryRecord")
|
||||
@Tag(name = "抽奖记录表", description = "抽奖记录表接口")
|
||||
public class CommonLotteryRecordController extends BladeController {
|
||||
|
||||
private final ICommonLotteryRecordService lotteryRecordService;
|
||||
|
||||
/**
|
||||
* 抽奖记录表 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入lotteryRecord")
|
||||
public R<CommonLotteryRecordVO> detail(CommonLotteryRecordEntity lotteryRecord) {
|
||||
CommonLotteryRecordEntity detail = lotteryRecordService.getOne(Condition.getQueryWrapper(lotteryRecord));
|
||||
return R.data(CommonLotteryRecordWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 抽奖记录表 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入lotteryRecord")
|
||||
public R<IPage<CommonLotteryRecordVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> lotteryRecord, Query query) {
|
||||
IPage<CommonLotteryRecordEntity> pages = lotteryRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(lotteryRecord, CommonLotteryRecordEntity.class));
|
||||
return R.data(CommonLotteryRecordWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽奖记录表 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入lotteryRecord")
|
||||
public R<IPage<CommonLotteryRecordVO>> page(CommonLotteryRecordVO lotteryRecord, Query query) {
|
||||
IPage<CommonLotteryRecordVO> pages = lotteryRecordService.selectLotteryRecordPage(Condition.getPage(query), lotteryRecord);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽奖记录表 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入lotteryRecord")
|
||||
public R save(@Valid @RequestBody CommonLotteryRecordEntity lotteryRecord) {
|
||||
return R.status(lotteryRecordService.save(lotteryRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽奖记录表 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入lotteryRecord")
|
||||
public R update(@Valid @RequestBody CommonLotteryRecordEntity lotteryRecord) {
|
||||
return R.status(lotteryRecordService.updateById(lotteryRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽奖记录表 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入lotteryRecord")
|
||||
public R submit(@Valid @RequestBody CommonLotteryRecordEntity lotteryRecord) {
|
||||
return R.status(lotteryRecordService.saveOrUpdate(lotteryRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 抽奖记录表 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(lotteryRecordService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*/
|
||||
@IsAdmin
|
||||
@GetMapping("/export-lotteryRecord")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "导出数据", description = "传入lotteryRecord")
|
||||
public void exportLotteryRecord(@Parameter(hidden = true) @RequestParam Map<String, Object> lotteryRecord, BladeUser bladeUser, HttpServletResponse response) {
|
||||
QueryWrapper<CommonLotteryRecordEntity> queryWrapper = Condition.getQueryWrapper(lotteryRecord, CommonLotteryRecordEntity.class);
|
||||
//if (!AuthUtil.isAdministrator()) {
|
||||
// queryWrapper.lambda().eq(LotteryRecord::getTenantId, bladeUser.getTenantId());
|
||||
//}
|
||||
//queryWrapper.lambda().eq(LotteryRecordEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
|
||||
List<CommonLotteryRecordExcel> list = lotteryRecordService.exportLotteryRecord(queryWrapper);
|
||||
ExcelUtil.export(response, "抽奖记录表数据" + DateUtil.time(), "抽奖记录表数据表", list, CommonLotteryRecordExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -52,7 +52,7 @@ import org.springblade.core.boot.ctrl.BladeController;
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("blade-regionsinfo/regionsInfo")
|
||||
@RequestMapping("/common/region")
|
||||
@Tag(name = "地区详情表", description = "地区详情表接口")
|
||||
public class CommonRegionsInfoController extends BladeController {
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ import org.springblade.core.boot.ctrl.BladeController;
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("blade-useraddress/userAddress")
|
||||
@RequestMapping("/common/address")
|
||||
@Tag(name = "用户地址表", description = "用户地址表接口")
|
||||
public class CommonUserAddressController extends BladeController {
|
||||
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserNoticeEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserNoticeVO;
|
||||
import org.springblade.modules.common.wrapper.CommonUserNoticeWrapper;
|
||||
import org.springblade.modules.common.service.ICommonUserNoticeService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
|
||||
|
||||
/**
|
||||
* 用户通知 控制器
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-09
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/common/notice")
|
||||
@Tag(name = "用户通知", description = "用户通知接口")
|
||||
public class CommonUserNoticeController extends BladeController {
|
||||
|
||||
private final ICommonUserNoticeService userNoticeService;
|
||||
|
||||
/**
|
||||
* 用户通知 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入userNotice")
|
||||
public R<CommonUserNoticeVO> detail(CommonUserNoticeEntity userNotice) {
|
||||
CommonUserNoticeEntity detail = userNoticeService.getOne(Condition.getQueryWrapper(userNotice));
|
||||
return R.data(CommonUserNoticeWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 用户通知 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入userNotice")
|
||||
public R<IPage<CommonUserNoticeVO>> list(CommonUserNoticeEntity userNotice, Query query) {
|
||||
IPage<CommonUserNoticeEntity> pages = userNoticeService.page(Condition.getPage(query), Condition.getQueryWrapper(userNotice).orderByDesc("id"));
|
||||
return R.data(CommonUserNoticeWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户通知 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入userNotice")
|
||||
public R<IPage<CommonUserNoticeVO>> page(CommonUserNoticeVO userNotice, Query query) {
|
||||
IPage<CommonUserNoticeVO> pages = userNoticeService.selectUserNoticePage(Condition.getPage(query), userNotice);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户通知 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入userNotice")
|
||||
public R save(@Valid @RequestBody CommonUserNoticeVO userNotice) {
|
||||
return R.status(userNoticeService.saveUserNotice(userNotice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户通知 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入userNotice")
|
||||
public R update(@Valid @RequestBody CommonUserNoticeEntity userNotice) {
|
||||
return R.status(userNoticeService.updateById(userNotice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户通知 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入userNotice")
|
||||
public R submit(@Valid @RequestBody CommonUserNoticeEntity userNotice) {
|
||||
return R.status(userNoticeService.saveOrUpdate(userNotice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户通知 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(userNoticeService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -32,6 +32,7 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.redis.debounce.RedisDebounce;
|
||||
import org.springblade.core.secure.BladeUser;
|
||||
import org.springblade.core.secure.annotation.IsAdmin;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
@@ -61,7 +62,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("user-order/order")
|
||||
@RequestMapping("/common/order")
|
||||
@Tag(name = "用户订单", description = "用户订单接口")
|
||||
public class CommonUserOrderController extends BladeController {
|
||||
|
||||
@@ -157,4 +158,15 @@ public class CommonUserOrderController extends BladeController {
|
||||
ExcelUtil.export(response, "用户订单数据" + DateUtil.time(), "用户订单数据表", list, CommonUserOrderExcel.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户订单 确认收款
|
||||
*/
|
||||
@PostMapping("/confirm-payment")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "确认收款", description = "传入order")
|
||||
public R confirmPayment(@Valid @RequestBody CommonUserOrderEntity order) {
|
||||
return R.status(orderService.confirmPayment(order.getId()));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.secure.BladeUser;
|
||||
import org.springblade.core.secure.annotation.IsAdmin;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserPointEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserPointVO;
|
||||
import org.springblade.modules.common.wrapper.CommonUserPointWrapper;
|
||||
import org.springblade.modules.common.service.ICommonUserPointService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springblade.core.excel.util.ExcelUtil;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 用户商城积分表 控制器
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/common/user-point")
|
||||
@Tag(name = "用户商城积分表", description = "用户商城积分表接口")
|
||||
public class CommonUserPointController extends BladeController {
|
||||
|
||||
private final ICommonUserPointService commonUserPointService;
|
||||
|
||||
/**
|
||||
* 用户商城积分表 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入commonUserPoint")
|
||||
public R<CommonUserPointVO> detail(CommonUserPointEntity commonUserPoint) {
|
||||
CommonUserPointEntity detail = commonUserPointService.getOne(Condition.getQueryWrapper(commonUserPoint));
|
||||
return R.data(CommonUserPointWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 用户商城积分表 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入commonUserPoint")
|
||||
public R<IPage<CommonUserPointVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> commonUserPoint, Query query) {
|
||||
IPage<CommonUserPointEntity> pages = commonUserPointService.page(Condition.getPage(query), Condition.getQueryWrapper(commonUserPoint, CommonUserPointEntity.class));
|
||||
return R.data(CommonUserPointWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户商城积分表 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入commonUserPoint")
|
||||
public R<IPage<CommonUserPointVO>> page(CommonUserPointVO commonUserPoint, Query query) {
|
||||
IPage<CommonUserPointVO> pages = commonUserPointService.selectCommonUserPointPage(Condition.getPage(query), commonUserPoint);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户商城积分表 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入commonUserPoint")
|
||||
public R save(@Valid @RequestBody CommonUserPointEntity commonUserPoint) {
|
||||
return R.status(commonUserPointService.save(commonUserPoint));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户商城积分表 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入commonUserPoint")
|
||||
public R update(@Valid @RequestBody CommonUserPointEntity commonUserPoint) {
|
||||
return R.status(commonUserPointService.updateById(commonUserPoint));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户商城积分表 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入commonUserPoint")
|
||||
public R submit(@Valid @RequestBody CommonUserPointEntity commonUserPoint) {
|
||||
return R.status(commonUserPointService.saveOrUpdate(commonUserPoint));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户商城积分表 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(commonUserPointService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package org.springblade.modules.common.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import lombok.AllArgsConstructor;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springblade.core.secure.BladeUser;
|
||||
import org.springblade.core.secure.annotation.IsAdmin;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.mp.support.Query;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springblade.core.tool.utils.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserPointLogEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserPointLogVO;
|
||||
import org.springblade.modules.common.wrapper.CommonUserPointLogWrapper;
|
||||
import org.springblade.modules.common.service.ICommonUserPointLogService;
|
||||
import org.springblade.core.boot.ctrl.BladeController;
|
||||
import org.springblade.core.tool.utils.DateUtil;
|
||||
import org.springblade.core.excel.util.ExcelUtil;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 用户商城积分流水表 控制器
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/common/user-point-log")
|
||||
@Tag(name = "用户商城积分流水表", description = "用户商城积分流水表接口")
|
||||
public class CommonUserPointLogController extends BladeController {
|
||||
|
||||
private final ICommonUserPointLogService commonUserPointLogService;
|
||||
|
||||
/**
|
||||
* 用户商城积分流水表 详情
|
||||
*/
|
||||
@GetMapping("/detail")
|
||||
@ApiOperationSupport(order = 1)
|
||||
@Operation(summary = "详情", description = "传入commonUserPointLog")
|
||||
public R<CommonUserPointLogVO> detail(CommonUserPointLogEntity commonUserPointLog) {
|
||||
CommonUserPointLogEntity detail = commonUserPointLogService.getOne(Condition.getQueryWrapper(commonUserPointLog));
|
||||
return R.data(CommonUserPointLogWrapper.build().entityVO(detail));
|
||||
}
|
||||
/**
|
||||
* 用户商城积分流水表 分页
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@ApiOperationSupport(order = 2)
|
||||
@Operation(summary = "分页", description = "传入commonUserPointLog")
|
||||
public R<IPage<CommonUserPointLogVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> commonUserPointLog, Query query) {
|
||||
IPage<CommonUserPointLogEntity> pages = commonUserPointLogService.page(Condition.getPage(query), Condition.getQueryWrapper(commonUserPointLog, CommonUserPointLogEntity.class));
|
||||
return R.data(CommonUserPointLogWrapper.build().pageVO(pages));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户商城积分流水表 自定义分页
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@ApiOperationSupport(order = 3)
|
||||
@Operation(summary = "分页", description = "传入commonUserPointLog")
|
||||
public R<IPage<CommonUserPointLogVO>> page(CommonUserPointLogVO commonUserPointLog, Query query) {
|
||||
IPage<CommonUserPointLogVO> pages = commonUserPointLogService.selectCommonUserPointLogPage(Condition.getPage(query), commonUserPointLog);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户商城积分流水表 新增
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "新增", description = "传入commonUserPointLog")
|
||||
public R save(@Valid @RequestBody CommonUserPointLogEntity commonUserPointLog) {
|
||||
return R.status(commonUserPointLogService.save(commonUserPointLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户商城积分流水表 修改
|
||||
*/
|
||||
@PostMapping("/update")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "修改", description = "传入commonUserPointLog")
|
||||
public R update(@Valid @RequestBody CommonUserPointLogEntity commonUserPointLog) {
|
||||
return R.status(commonUserPointLogService.updateById(commonUserPointLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户商城积分流水表 新增或修改
|
||||
*/
|
||||
@PostMapping("/submit")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "新增或修改", description = "传入commonUserPointLog")
|
||||
public R submit(@Valid @RequestBody CommonUserPointLogEntity commonUserPointLog) {
|
||||
return R.status(commonUserPointLogService.saveOrUpdate(commonUserPointLog));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户商城积分流水表 删除
|
||||
*/
|
||||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(commonUserPointLogService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -3,10 +3,10 @@ package org.springblade.modules.common.convert;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import org.springblade.modules.api.request.AddressSubmitRequest;
|
||||
import org.springblade.modules.api.request.CreateOrderRequest;
|
||||
import org.springblade.modules.api.vo.CommonUserOrderApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.CommonRegionsInfoEntity;
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserOrderEntity;
|
||||
import org.springblade.modules.api.vo.*;
|
||||
import org.springblade.modules.common.pojo.entity.*;
|
||||
import org.springblade.modules.common.pojo.vo.AppCommonRegionsInfoVO;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserOrderVO;
|
||||
import org.springblade.modules.mall.pojo.entity.MallProductEntity;
|
||||
@@ -24,6 +24,13 @@ public interface AppCommonConvert {
|
||||
List<AppCommonRegionsInfoVO> convertRegionsInfoListVO(List<CommonRegionsInfoEntity> list);
|
||||
|
||||
@Mapping(target = "id", ignore = true)
|
||||
@Mapping(target = "createTime", ignore = true)
|
||||
@Mapping(target = "createUser", ignore = true)
|
||||
@Mapping(target = "createDept", ignore = true)
|
||||
@Mapping(target = "updateTime", ignore = true)
|
||||
@Mapping(target = "updateUser", ignore = true)
|
||||
@Mapping(target = "status", ignore = true)
|
||||
@Mapping(target = "isDeleted", ignore = true)
|
||||
@Mapping(target = "consigneePhone", source = "request.consigneePhone")
|
||||
@Mapping(target = "consignee", source = "request.consignee")
|
||||
@Mapping(target = "itemCode", source = "request.itemCode")
|
||||
@@ -33,12 +40,26 @@ public interface AppCommonConvert {
|
||||
@Mapping(target = "imageUrl", source = "product.thumbImageUrl")
|
||||
CommonUserOrderEntity convertMallProductToOrder(CreateOrderRequest request, MallProductEntity product);
|
||||
|
||||
CommonUserOrderVO convertUserOrderEntityToVO(CommonUserOrderEntity entity);
|
||||
CommonUserOrderApiVO convertUserOrderEntityToApi(CommonUserOrderEntity entity);
|
||||
|
||||
List<CommonUserOrderVO> convertUserOrderEntityListTOVOList(List<CommonUserOrderEntity> entityList);
|
||||
List<CommonUserOrderApiVO> convertUserOrderEntityListTOApiList(List<CommonUserOrderEntity> entityList);
|
||||
|
||||
CommonUserOrderDetailApiVO convertOrderDetailApiVO(CommonUserOrderEntity entity);
|
||||
|
||||
CommonUserOrderApiVO convertOrderApiVO(CommonUserOrderVO vo);
|
||||
|
||||
List<CommonUserOrderApiVO> convertOrderApiListVO(List<CommonUserOrderVO> voList);
|
||||
|
||||
CommonUserNoticeApiVO convertNoticeEntityToVO(CommonUserNoticeEntity commonUserNoticeEntity);
|
||||
|
||||
List<CommonUserNoticeApiVO> convertNoticeVOList(List<CommonUserNoticeEntity> list);
|
||||
|
||||
CommonUserNoticeDetailApiVO convertNoticeDetailVO(CommonUserNoticeEntity entity);
|
||||
|
||||
CommonUserAddressApiVO convertAddressToVoList(CommonUserAddressEntity entity);
|
||||
|
||||
List<CommonUserAddressApiVO> convertAddressListToVoList(List<CommonUserAddressEntity> list);
|
||||
|
||||
CommonUserAddressEntity convertRequestToPo(AddressSubmitRequest request);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package org.springblade.modules.common.eums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public enum BusinessModule {
|
||||
|
||||
SELF_OPERATED_MALL("自营商城", "self_mall"),
|
||||
ECOSYSTEM_PRODUCT("生态商品", "eco_product"),
|
||||
TRAVEL_GROUP("旅游团", "travel_group"),
|
||||
LOTTERY("幸运抽奖", "lottery");
|
||||
|
||||
@Getter
|
||||
private final String displayName;
|
||||
|
||||
@Getter
|
||||
private final String code;
|
||||
|
||||
|
||||
// ========================
|
||||
// 根据 code 查找(忽略大小写)
|
||||
// ========================
|
||||
public static BusinessModule fromCodeIgnoreCase(String code) {
|
||||
BusinessModule module = fromCodeIgnoreCaseOrNull(code);
|
||||
if (module == null) {
|
||||
throw new IllegalArgumentException("未知的业务模块 code: " + code);
|
||||
}
|
||||
return module;
|
||||
}
|
||||
|
||||
public static BusinessModule fromCodeIgnoreCaseOrNull(String code) {
|
||||
if (code == null || code.trim().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
String normalized = code.trim().toLowerCase();
|
||||
for (BusinessModule module : values()) {
|
||||
if (module.code.equals(normalized)) {
|
||||
return module;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package org.springblade.modules.common.eums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
|
||||
@Getter
|
||||
public enum NoticeType {
|
||||
|
||||
/**
|
||||
* 全局通知
|
||||
*/
|
||||
GLOBAL(0),
|
||||
|
||||
/**
|
||||
* APP系统通知
|
||||
*/
|
||||
APP_SYSTEM(1),
|
||||
|
||||
/**
|
||||
* Market系统通知
|
||||
*/
|
||||
MARKET_SYSTEM(2),
|
||||
|
||||
/**
|
||||
* APP用户通知
|
||||
*/
|
||||
APP_USER(3),
|
||||
|
||||
/**
|
||||
* Market用户通知
|
||||
*/
|
||||
MARKET_USER(4);
|
||||
|
||||
private final int code;
|
||||
|
||||
NoticeType(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据 code 值获取对应的枚举项
|
||||
*
|
||||
* @param code 通知类型代码
|
||||
* @return 对应的 NotificationType 枚举
|
||||
* @throws IllegalArgumentException 如果 code 无效
|
||||
*/
|
||||
public static NoticeType fromCode(int code) {
|
||||
for (NoticeType type : NoticeType.values()) {
|
||||
if (type.code == code) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid notification type code: " + code);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package org.springblade.modules.common.eums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Getter
|
||||
public enum OrderStatus {
|
||||
|
||||
PENDING_PAYMENT(0, "📌 订单 <id>%s</id> 尚未支付!请尽快完成付款,以免订单自动取消。"),
|
||||
PAID(1, "✅ 订单 <id>%s</id> 已支付成功!商家正在准备发货(或待您使用),请耐心等待。"),
|
||||
CANCELLED(2, "🗑️ 订单 <id>%s</id> 已取消。如有疑问,可联系客服了解详情。"),
|
||||
SHIPPED(3, "🚚 订单 <id>%s</id> 已发货!(或🎫 电子票已出票)请留意物流信息(或按时使用服务)。"),
|
||||
COMPLETED(4, "🎉 订单 <id>%s</id> 已完成!感谢您的信任,期待再次为您服务~"),
|
||||
CLOSED_TIMEOUT(5, "⏰ 订单 <id>%s</id> 因超时未支付已自动关闭。如需购买,请重新下单。"),
|
||||
REFUNDING(6, "🔄 订单 <id>%s</id> 的退款申请已受理,款项将在1-7个工作日内原路退回,请耐心等待。"),
|
||||
REFUNDED(7, "💸 订单 <id>%s</id> 的退款已成功!金额已退至您的原支付账户,请注意查收。");
|
||||
|
||||
private final int code;
|
||||
private final String userMessageTemplate;
|
||||
|
||||
OrderStatus(int code, String userMessageTemplate) {
|
||||
this.code = code;
|
||||
this.userMessageTemplate = userMessageTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据订单号生成面向用户的消息
|
||||
*/
|
||||
public String formatUserMessage(String orderId) {
|
||||
return userMessageTemplate.formatted(orderId);
|
||||
}
|
||||
|
||||
// ========== 静态工具方法 ==========
|
||||
|
||||
private static final Map<Integer, OrderStatus> BY_CODE = Stream.of(values())
|
||||
.collect(Collectors.toUnmodifiableMap(OrderStatus::getCode, Function.identity()));
|
||||
|
||||
/**
|
||||
* 根据状态码(int)获取对应的 OrderStatus 枚举
|
||||
*
|
||||
* @throws IllegalArgumentException 如果状态码无效
|
||||
*/
|
||||
public static OrderStatus fromCode(int code) {
|
||||
OrderStatus status = BY_CODE.get(code);
|
||||
if (status == null) {
|
||||
throw new IllegalArgumentException("无效的订单状态码: " + code);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 安全版本:根据状态码获取枚举,若无效则返回 null(适用于非严格场景)
|
||||
*/
|
||||
public static OrderStatus fromCodeOrNull(int code) {
|
||||
return BY_CODE.get(code);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.springblade.modules.common.eums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Getter
|
||||
public enum PaymentStatus {
|
||||
UNPAID(0, "未支付"),
|
||||
PAID(1, "已支付"),
|
||||
FAILED(2, "支付失败"),
|
||||
PROCESSING(3, "支付中(如跳转网银)");
|
||||
|
||||
private final int code;
|
||||
private final String description;
|
||||
|
||||
PaymentStatus(int code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
// ========== 静态映射:code -> enum ==========
|
||||
|
||||
private static final Map<Integer, PaymentStatus> BY_CODE = Stream.of(values())
|
||||
.collect(Collectors.toUnmodifiableMap(PaymentStatus::getCode, Function.identity()));
|
||||
|
||||
/**
|
||||
* 根据整型状态码获取对应的枚举(严格模式)
|
||||
*
|
||||
* @throws IllegalArgumentException 如果状态码无效
|
||||
*/
|
||||
public static PaymentStatus fromCode(int code) {
|
||||
PaymentStatus status = BY_CODE.get(code);
|
||||
if (status == null) {
|
||||
throw new IllegalArgumentException("无效的支付状态码: " + code);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* 安全版本:无效状态码返回 null
|
||||
*/
|
||||
public static PaymentStatus fromCodeOrNull(int code) {
|
||||
return BY_CODE.get(code);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package org.springblade.modules.common.eums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
@Getter
|
||||
public enum UserPointFlowType {
|
||||
|
||||
GRANT(1, "🎉 恭喜!您通过【订单 %s】成功获得 %s 积分,已存入您的账户,快去兑换好礼吧!") {
|
||||
@Override
|
||||
public String formatUserMessage(String orderId, String points) {
|
||||
return String.format(this.getUserMessageTemplate(), orderId, points);
|
||||
}
|
||||
},
|
||||
|
||||
SPEND(2, "🎰 您已使用 %s 积分 参与幸运大抽奖,祝您好运连连,大奖抱回家!") {
|
||||
@Override
|
||||
public String formatUserMessage(String orderId, String points) {
|
||||
// 注意:SPEND 不使用 orderId,但为了统一接口保留参数
|
||||
return String.format(this.getUserMessageTemplate(), points);
|
||||
}
|
||||
};
|
||||
|
||||
private final int code;
|
||||
private final String userMessageTemplate;
|
||||
|
||||
private UserPointFlowType(int code, String userMessageTemplate) {
|
||||
this.code = code;
|
||||
this.userMessageTemplate = userMessageTemplate;
|
||||
}
|
||||
|
||||
public abstract String formatUserMessage(String orderId, String points);
|
||||
|
||||
private static final Map<Integer, UserPointFlowType> BY_CODE = Stream.of(values())
|
||||
.collect(Collectors.toUnmodifiableMap(UserPointFlowType::getCode, Function.identity()));
|
||||
|
||||
public static UserPointFlowType fromCode(int code) {
|
||||
UserPointFlowType status = BY_CODE.get(code);
|
||||
if (status == null) {
|
||||
throw new IllegalArgumentException("无效的订单状态码: " + code);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
public static UserPointFlowType fromCodeOrNull(int code) {
|
||||
return BY_CODE.get(code);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.springblade.modules.common.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import org.springblade.modules.common.eums.BusinessModule;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public class GrantUserPointEvent {
|
||||
|
||||
private final Long orderId;
|
||||
|
||||
private final Long userId;
|
||||
|
||||
private final BigDecimal point;
|
||||
|
||||
private final BusinessModule businessModule;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package org.springblade.modules.common.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import org.springblade.modules.common.eums.BusinessModule;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public class PaymentSuccessEvent {
|
||||
|
||||
private final Long orderId;
|
||||
|
||||
private final Long userId;
|
||||
|
||||
private final BusinessModule businessModule;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.springblade.modules.common.event;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import org.springblade.modules.common.eums.BusinessModule;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class SpendUserPointEvent {
|
||||
|
||||
private Long userId;
|
||||
|
||||
private BigDecimal point;
|
||||
|
||||
private BusinessModule businessModule;
|
||||
|
||||
}
|
||||
@@ -23,12 +23,13 @@
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.userPackage.excel;
|
||||
package org.springblade.modules.common.excel;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.write.style.ColumnWidth;
|
||||
import cn.idev.excel.annotation.write.style.ContentRowHeight;
|
||||
@@ -38,16 +39,16 @@ import java.io.Serial;
|
||||
|
||||
|
||||
/**
|
||||
* 划拨积分记录 Excel实体类
|
||||
* 抽奖记录表 Excel实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-05
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
@Data
|
||||
@ColumnWidth(25)
|
||||
@HeadRowHeight(20)
|
||||
@ContentRowHeight(18)
|
||||
public class UserMarketBenefitPackageLogExcel implements Serializable {
|
||||
public class CommonLotteryRecordExcel implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -58,12 +59,6 @@ public class UserMarketBenefitPackageLogExcel implements Serializable {
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 统计日期
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("统计日期")
|
||||
private Date statisticalDate;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@@ -71,47 +66,17 @@ public class UserMarketBenefitPackageLogExcel implements Serializable {
|
||||
@ExcelProperty("用户id")
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户手机号
|
||||
* 中奖奖品ID(null 表示未中奖/谢谢参与)
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("用户手机号")
|
||||
private Long phone;
|
||||
@ExcelProperty("中奖奖品ID(null 表示未中奖/谢谢参与)")
|
||||
private Long prizeId;
|
||||
/**
|
||||
* 用户名
|
||||
* 消耗积分
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("用户名")
|
||||
private String userName;
|
||||
/**
|
||||
* 1-积分兑换 2-后台划拨
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("1-积分兑换 2-后台划拨")
|
||||
private Integer type;
|
||||
/**
|
||||
* 积分包id
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("积分包id")
|
||||
private Long userPackageId;
|
||||
/**
|
||||
* 积分包名称
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("积分包名称")
|
||||
private String packageName;
|
||||
/**
|
||||
* 积分包信息快照
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("积分包信息快照")
|
||||
private String packageDetail;
|
||||
/**
|
||||
* 赠送数量
|
||||
*/
|
||||
@ColumnWidth(20)
|
||||
@ExcelProperty("赠送数量")
|
||||
private Integer giveNumber;
|
||||
@ExcelProperty("消耗积分")
|
||||
private BigDecimal pointsUsed;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@@ -0,0 +1,77 @@
|
||||
package org.springblade.modules.common.listener;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springblade.modules.common.eums.NoticeType;
|
||||
import org.springblade.modules.common.eums.OrderStatus;
|
||||
import org.springblade.modules.common.eums.UserPointFlowType;
|
||||
import org.springblade.modules.common.event.GrantUserPointEvent;
|
||||
import org.springblade.modules.common.event.PaymentSuccessEvent;
|
||||
import org.springblade.modules.common.event.SpendUserPointEvent;
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserNoticeEntity;
|
||||
import org.springblade.modules.common.service.ICommonUserNoticeService;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.event.TransactionPhase;
|
||||
import org.springframework.transaction.event.TransactionalEventListener;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class NoticeListener {
|
||||
|
||||
private final ICommonUserNoticeService noticeService;
|
||||
|
||||
@Async
|
||||
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
|
||||
public void onPaymentSuccess(PaymentSuccessEvent event) {
|
||||
CommonUserNoticeEntity notice = new CommonUserNoticeEntity();
|
||||
notice.setUserId(event.getUserId());
|
||||
notice.setNoticeType(NoticeType.APP_USER.getCode());
|
||||
notice.setModuleType(event.getBusinessModule().getCode());
|
||||
notice.setTitle(event.getBusinessModule().getDisplayName());
|
||||
notice.setContent(OrderStatus.PAID.formatUserMessage(String.valueOf(event.getOrderId())));
|
||||
noticeService.save(notice);
|
||||
}
|
||||
|
||||
@TransactionalEventListener(phase = TransactionPhase.AFTER_ROLLBACK)
|
||||
public void onPaymentFailure(PaymentSuccessEvent event) {
|
||||
log.warn("支付事务回滚,orderId={}", event.getOrderId());
|
||||
}
|
||||
|
||||
|
||||
@Async
|
||||
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
|
||||
public void onGrantUserPoint(GrantUserPointEvent event) {
|
||||
CommonUserNoticeEntity notice = new CommonUserNoticeEntity();
|
||||
notice.setUserId(event.getUserId());
|
||||
notice.setNoticeType(NoticeType.APP_USER.getCode());
|
||||
notice.setModuleType(event.getBusinessModule().getCode());
|
||||
notice.setTitle(event.getBusinessModule().getDisplayName());
|
||||
notice.setContent(UserPointFlowType.GRANT.formatUserMessage(String.valueOf(event.getOrderId()), String.valueOf(event.getPoint())));
|
||||
noticeService.save(notice);
|
||||
}
|
||||
|
||||
@TransactionalEventListener(phase = TransactionPhase.AFTER_ROLLBACK)
|
||||
public void onGrantUserPointFailure(GrantUserPointEvent event) {
|
||||
log.warn("用户获取积分事务回滚,orderId={}", event.getOrderId());
|
||||
}
|
||||
|
||||
@Async
|
||||
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
|
||||
public void onSpendUserPoint(SpendUserPointEvent event) {
|
||||
CommonUserNoticeEntity notice = new CommonUserNoticeEntity();
|
||||
notice.setUserId(event.getUserId());
|
||||
notice.setNoticeType(NoticeType.APP_USER.getCode());
|
||||
notice.setModuleType(event.getBusinessModule().getCode());
|
||||
notice.setTitle(event.getBusinessModule().getDisplayName());
|
||||
notice.setContent(UserPointFlowType.SPEND.formatUserMessage(null, String.valueOf(event.getPoint())));
|
||||
noticeService.save(notice);
|
||||
}
|
||||
|
||||
@TransactionalEventListener(phase = TransactionPhase.AFTER_ROLLBACK)
|
||||
public void onSpendUserPointFailure(SpendUserPointEvent event) {
|
||||
log.warn("用户获取积分事务回滚,userId={}", event.getUserId());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.mapper;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonLotteryPrizeEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonLotteryPrizeVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 奖品配置表 Mapper 接口
|
||||
*
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
public interface CommonLotteryPrizeMapper extends BaseMapper<CommonLotteryPrizeEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param lotteryPrize 查询参数
|
||||
* @return List<LotteryPrizeVO>
|
||||
*/
|
||||
List<CommonLotteryPrizeVO> selectLotteryPrizePage(IPage page, CommonLotteryPrizeVO lotteryPrize);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.modules.common.mapper.CommonLotteryPrizeMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="lotteryPrizeResultMap" type="org.springblade.modules.common.pojo.entity.CommonLotteryPrizeEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="prize_name" property="prizeName"/>
|
||||
<result column="prize_type" property="prizeType"/>
|
||||
<result column="prize_value" property="prizeValue"/>
|
||||
<result column="probability" property="probability"/>
|
||||
<result column="stock" property="stock"/>
|
||||
<result column="daily_limit" property="dailyLimit"/>
|
||||
<result column="sort_order" property="sortOrder"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectLotteryPrizePage" resultMap="lotteryPrizeResultMap">
|
||||
select * from common_lottery_prize where is_deleted = 0
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -23,11 +23,12 @@
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.userPackage.mapper;
|
||||
package org.springblade.modules.common.mapper;
|
||||
|
||||
import org.springblade.modules.userPackage.pojo.entity.UserMarketBenefitPackageEntity;
|
||||
import org.springblade.modules.userPackage.pojo.vo.UserMarketBenefitPackageVO;
|
||||
import org.springblade.modules.userPackage.excel.UserMarketBenefitPackageExcel;
|
||||
import org.springblade.modules.api.vo.CommonLotteryRecordApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.CommonLotteryRecordEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonLotteryRecordVO;
|
||||
import org.springblade.modules.common.excel.CommonLotteryRecordExcel;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -35,29 +36,30 @@ import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户积分包信息表 Mapper 接口
|
||||
* 抽奖记录表 Mapper 接口
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-05
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
public interface UserMarketBenefitPackageMapper extends BaseMapper<UserMarketBenefitPackageEntity> {
|
||||
public interface CommonLotteryRecordMapper extends BaseMapper<CommonLotteryRecordEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param userMarketBenefitPackage 查询参数
|
||||
* @return List<UserMarketBenefitPackageVO>
|
||||
* @param vo 查询参数
|
||||
* @return List<LotteryRecordVO>
|
||||
*/
|
||||
List<UserMarketBenefitPackageVO> selectUserMarketBenefitPackagePage(IPage page, UserMarketBenefitPackageVO userMarketBenefitPackage);
|
||||
List<CommonLotteryRecordVO> selectLotteryRecordPage(IPage page, CommonLotteryRecordVO vo);
|
||||
|
||||
|
||||
/**
|
||||
* 获取导出数据
|
||||
*
|
||||
* @param queryWrapper 查询条件
|
||||
* @return List<UserMarketBenefitPackageExcel>
|
||||
* @return List<LotteryRecordExcel>
|
||||
*/
|
||||
List<UserMarketBenefitPackageExcel> exportUserMarketBenefitPackage(@Param("ew") Wrapper<UserMarketBenefitPackageEntity> queryWrapper);
|
||||
List<CommonLotteryRecordExcel> exportLotteryRecord(@Param("ew") Wrapper<CommonLotteryRecordEntity> queryWrapper);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.modules.common.mapper.CommonLotteryRecordMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="lotteryRecordResultMap" type="org.springblade.modules.common.pojo.entity.CommonLotteryRecordEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="prize_id" property="prizeId"/>
|
||||
<result column="points_used" property="pointsUsed"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectLotteryRecordPage" resultType="org.springblade.modules.common.pojo.vo.CommonLotteryRecordVO">
|
||||
select * from common_lottery_record where is_deleted = 0
|
||||
<if test="vo.userId!=null">
|
||||
and user_id = #{vo.userId}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="exportLotteryRecord" resultType="org.springblade.modules.common.excel.CommonLotteryRecordExcel">
|
||||
SELECT * FROM common_lottery_record ${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -6,7 +6,7 @@
|
||||
<resultMap id="userAddressResultMap" type="org.springblade.modules.common.pojo.entity.CommonUserAddressEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="regions_info_id" property="regionsInfoId"/>
|
||||
<result column="regions_id" property="regionsId"/>
|
||||
<result column="province" property="province"/>
|
||||
<result column="city" property="city"/>
|
||||
<result column="district" property="district"/>
|
||||
@@ -25,8 +25,17 @@
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectUserAddressPage" resultMap="userAddressResultMap">
|
||||
select * from user_address where is_deleted = 0
|
||||
<select id="selectUserAddressPage" resultType="org.springblade.modules.common.pojo.vo.CommonUserAddressVO">
|
||||
select
|
||||
cua.*,
|
||||
bu.account
|
||||
from blade_user bu
|
||||
left join common_user_address cua on cua.user_id = bu.id
|
||||
where bu.is_deleted = 0 and bu.user_type = 2 and cua.is_deleted = 0
|
||||
<if test="userAddress.account != null">
|
||||
and bu.account = #{userAddress.account}
|
||||
</if>
|
||||
order by cua.create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -23,41 +23,37 @@
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.userPackage.mapper;
|
||||
package org.springblade.modules.common.mapper;
|
||||
|
||||
import org.springblade.modules.userPackage.pojo.entity.UserMarketBenefitPackageLogEntity;
|
||||
import org.springblade.modules.userPackage.pojo.vo.UserMarketBenefitPackageLogVO;
|
||||
import org.springblade.modules.userPackage.excel.UserMarketBenefitPackageLogExcel;
|
||||
import org.springblade.modules.api.vo.CommonUserNoticeApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserNoticeEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserNoticeVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 划拨积分记录 Mapper 接口
|
||||
* 用户通知 Mapper 接口
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-05
|
||||
* @since 2026-02-09
|
||||
*/
|
||||
public interface UserMarketBenefitPackageLogMapper extends BaseMapper<UserMarketBenefitPackageLogEntity> {
|
||||
public interface CommonUserNoticeMapper extends BaseMapper<CommonUserNoticeEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param userMarketBenefitPackageLog 查询参数
|
||||
* @return List<UserMarketBenefitPackageLogVO>
|
||||
* @param userNotice 查询参数
|
||||
* @return List<UserNoticeVO>
|
||||
*/
|
||||
List<UserMarketBenefitPackageLogVO> selectUserMarketBenefitPackageLogPage(IPage page, UserMarketBenefitPackageLogVO userMarketBenefitPackageLog);
|
||||
List<CommonUserNoticeVO> selectUserNoticePage(IPage page, CommonUserNoticeVO userNotice);
|
||||
|
||||
List<CommonUserNoticeApiVO> selectAppSystemNoticeVOList();
|
||||
|
||||
/**
|
||||
* 获取导出数据
|
||||
*
|
||||
* @param queryWrapper 查询条件
|
||||
* @return List<UserMarketBenefitPackageLogExcel>
|
||||
*/
|
||||
List<UserMarketBenefitPackageLogExcel> exportUserMarketBenefitPackageLog(@Param("ew") Wrapper<UserMarketBenefitPackageLogEntity> queryWrapper);
|
||||
List<CommonUserNoticeApiVO> selectAppUserNoticeApiPage(IPage page, CommonUserNoticeApiVO vo, Long userId);
|
||||
|
||||
List<CommonUserNoticeApiVO> selectMarketSystemNoticeVOList();
|
||||
|
||||
List<CommonUserNoticeApiVO> selectMarketUserNoticeApiPage(IPage page, CommonUserNoticeApiVO vo, Long userId);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.modules.common.mapper.CommonUserNoticeMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="userNoticeResultMap" type="org.springblade.modules.common.pojo.entity.CommonUserNoticeEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="notice_type" property="noticeType"/>
|
||||
<result column="has_read" property="hasRead"/>
|
||||
<result column="title" property="title"/>
|
||||
<result column="content" property="content"/>
|
||||
<result column="remarks" property="remarks"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectUserNoticePage" resultMap="userNoticeResultMap">
|
||||
select *
|
||||
from user_notice
|
||||
where is_deleted = 0
|
||||
and notice_type in (0, 1, 2)
|
||||
</select>
|
||||
|
||||
<select id="selectAppSystemNoticeVOList" resultType="org.springblade.modules.api.vo.CommonUserNoticeApiVO">
|
||||
select id, module_type, has_read, title, content, create_time
|
||||
from user_notice
|
||||
where notice_type in (0, 1)
|
||||
and is_deleted = 0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectAppUserNoticeApiPage" resultType="org.springblade.modules.api.vo.CommonUserNoticeApiVO">
|
||||
select id, module_type, has_read, title, content, create_time
|
||||
from user_notice
|
||||
where user_id = #{userId}
|
||||
and notice_type = 3
|
||||
and is_deleted = 0
|
||||
order by has_read asc, create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectMarketSystemNoticeVOList" resultType="org.springblade.modules.api.vo.CommonUserNoticeApiVO">
|
||||
select id, module_type, has_read, title, content, create_time
|
||||
from user_notice
|
||||
where notice_type in (0, 2)
|
||||
and is_deleted = 0
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectMarketUserNoticeApiPage" resultType="org.springblade.modules.api.vo.CommonUserNoticeApiVO">
|
||||
select id, module_type, has_read, title, content, create_time
|
||||
from user_notice
|
||||
where user_id = #{userId}
|
||||
and notice_type = 4
|
||||
and is_deleted = 0
|
||||
order by has_read asc, create_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -51,6 +51,8 @@ public interface CommonUserOrderMapper extends BaseMapper<CommonUserOrderEntity>
|
||||
*/
|
||||
List<CommonUserOrderVO> selectOrderPage(IPage page, CommonUserOrderVO order);
|
||||
|
||||
List<CommonUserOrderEntity> selectOrderEntityPage(IPage page, CommonUserOrderEntity order);
|
||||
|
||||
|
||||
/**
|
||||
* 获取导出数据
|
||||
|
||||
@@ -34,6 +34,29 @@
|
||||
|
||||
|
||||
<select id="selectOrderPage" resultType="org.springblade.modules.common.pojo.vo.CommonUserOrderVO">
|
||||
select uo.*, bu.account as account
|
||||
from user_order uo
|
||||
left join blade_user bu on uo.user_id = bu.id
|
||||
where uo.is_deleted = 0
|
||||
<if test="order.id != null">
|
||||
and uo.id = #{order.id}
|
||||
</if>
|
||||
<if test="order.account != null">
|
||||
and bu.account = #{order.account}
|
||||
</if>
|
||||
<if test="order.paymentStatus !=null">
|
||||
and uo.payment_status = #{order.paymentStatus}
|
||||
</if>
|
||||
<if test="order.paymentType !=null">
|
||||
and uo.payment_type = #{order.paymentType}
|
||||
</if>
|
||||
<if test="order.orderStatus != null">
|
||||
and uo.order_status = #{order.orderStatus}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectOrderEntityPage" resultType="org.springblade.modules.common.pojo.entity.CommonUserOrderEntity">
|
||||
select * from user_order where is_deleted = 0 and user_id = #{order.userId}
|
||||
<if test="order.orderStatus !=null and order.orderStatus > 0 ">
|
||||
and order_status = #{order.orderStatus}
|
||||
@@ -42,7 +65,8 @@
|
||||
|
||||
|
||||
<select id="exportOrder" resultType="org.springblade.modules.common.excel.CommonUserOrderExcel">
|
||||
SELECT * FROM user_order ${ew.customSqlSegment}
|
||||
SELECT *
|
||||
FROM user_order ${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.springblade.modules.common.mapper;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserPointLogEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserPointLogVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户商城积分流水表 Mapper 接口
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
public interface CommonUserPointLogMapper extends BaseMapper<CommonUserPointLogEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param pointLog 查询参数
|
||||
* @return List<CommonUserPointLogVO>
|
||||
*/
|
||||
List<CommonUserPointLogVO> selectCommonUserPointLogPage(IPage page, CommonUserPointLogVO pointLog);
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.modules.common.mapper.CommonUserPointLogMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="commonUserPointLogResultMap" type="org.springblade.modules.common.pojo.entity.CommonUserPointLogEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="user_id" property="userId"/>
|
||||
<result column="amount" property="amount"/>
|
||||
<result column="last_amount" property="lastAmount"/>
|
||||
<result column="source_type" property="sourceType"/>
|
||||
<result column="source_id" property="sourceId"/>
|
||||
<result column="source_detail" property="sourceDetail"/>
|
||||
<result column="type" property="type"/>
|
||||
<result column="is_complete" property="isComplete"/>
|
||||
<result column="statistical_date" property="statisticalDate"/>
|
||||
<result column="remark" property="remark"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectCommonUserPointLogPage" resultType="org.springblade.modules.common.pojo.vo.CommonUserPointLogVO">
|
||||
select
|
||||
upl.*,
|
||||
bu.account
|
||||
from blade_user bu
|
||||
left join user_point_log upl on bu.id = upl.user_id
|
||||
where bu.is_deleted = 0 and upl.is_deleted = 0 and upl.is_complete = 1
|
||||
<if test="pointLog.account != null">
|
||||
and bu.account = #{pointLog.account}
|
||||
</if>
|
||||
order by upl.id desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,32 @@
|
||||
package org.springblade.modules.common.mapper;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserPointEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonUserPointVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户商城积分表 Mapper 接口
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
public interface CommonUserPointMapper extends BaseMapper<CommonUserPointEntity> {
|
||||
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param userPoint 查询参数
|
||||
* @return List<CommonUserPointVO>
|
||||
*/
|
||||
List<CommonUserPointVO> selectCommonUserPointPage(IPage page, CommonUserPointVO userPoint);
|
||||
|
||||
|
||||
int addUserPoint(Long userId, BigDecimal amount, Integer version);
|
||||
|
||||
int deductUserPoint(Long userId, BigDecimal amount, Integer version);
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.springblade.modules.common.mapper.CommonUserPointMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="commonUserPointResultMap" type="org.springblade.modules.common.pojo.entity.CommonUserPointEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="amount" property="amount"/>
|
||||
<result column="version" property="version"/>
|
||||
<result column="create_user" property="createUser"/>
|
||||
<result column="create_dept" property="createDept"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_user" property="updateUser"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="is_deleted" property="isDeleted"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<select id="selectCommonUserPointPage" resultType="org.springblade.modules.common.pojo.vo.CommonUserPointVO">
|
||||
select
|
||||
up.*,
|
||||
bu.account
|
||||
from blade_user bu
|
||||
left join user_point up on bu.id = up.id
|
||||
where bu.is_deleted = 0 and bu.user_type = 2 and up.is_deleted = 0
|
||||
<if test="userPoint.account != null">
|
||||
and bu.account = #{userPoint.account}
|
||||
</if>
|
||||
order by up.id desc
|
||||
</select>
|
||||
|
||||
<update id="addUserPoint">
|
||||
update
|
||||
user_point
|
||||
set amount = amount + #{amount} , version = version + 1
|
||||
where id = #{userId} and version = #{version}
|
||||
</update>
|
||||
|
||||
<update id="deductUserPoint">
|
||||
update
|
||||
user_point
|
||||
set amount = amount - #{amount} , version = version + 1
|
||||
where id = #{userId} and version = #{version} and amount >= #{amount}
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonLotteryPrizeEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 奖品配置表 数据传输对象实体类
|
||||
*
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonLotteryPrizeDTO extends CommonLotteryPrizeEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonLotteryRecordEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 抽奖记录表 数据传输对象实体类
|
||||
*
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonLotteryRecordDTO extends CommonLotteryRecordEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserNoticeEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 用户通知 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonUserNoticeDTO extends CommonUserNoticeEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserPointEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 用户商城积分表 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonUserPointDTO extends CommonUserPointEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.dto;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserPointLogEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 用户商城积分流水表 数据传输对象实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonUserPointLogDTO extends CommonUserPointLogEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 奖品配置表 实体类
|
||||
*
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
@Data
|
||||
@TableName("common_lottery_prize")
|
||||
@Schema(description = "LotteryPrize对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonLotteryPrizeEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 奖品名称
|
||||
*/
|
||||
@Schema(description = "奖品名称")
|
||||
private String prizeName;
|
||||
/**
|
||||
* 奖品类型
|
||||
*/
|
||||
@Schema(description = "奖品类型")
|
||||
private Integer prizeType;
|
||||
/**
|
||||
* 奖品内容
|
||||
*/
|
||||
@Schema(description = "奖品内容")
|
||||
private String prizeValue;
|
||||
/**
|
||||
* 中奖概率(如 0.05 = 5%)
|
||||
*/
|
||||
@Schema(description = "中奖概率(如 0.05 = 5%)")
|
||||
private BigDecimal probability;
|
||||
/**
|
||||
* 总库存(-1 表示无限)
|
||||
*/
|
||||
@Schema(description = "总库存(-1 表示无限)")
|
||||
private Integer stock;
|
||||
/**
|
||||
* 每日发放上限
|
||||
*/
|
||||
@Schema(description = "每日发放上限")
|
||||
private Integer dailyLimit;
|
||||
/**
|
||||
* 排序(用于前端展示顺序)
|
||||
*/
|
||||
@Schema(description = "排序(用于前端展示顺序)")
|
||||
private Integer sortOrder;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 抽奖记录表 实体类
|
||||
*
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
@Data
|
||||
@TableName("common_lottery_record")
|
||||
@Schema(description = "LotteryRecord对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonLotteryRecordEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(description = "用户id")
|
||||
private Long userId;
|
||||
/**
|
||||
* 中奖奖品ID(null 表示未中奖/谢谢参与)
|
||||
*/
|
||||
@Schema(description = "中奖奖品ID(null 表示未中奖/谢谢参与)")
|
||||
private Long prizeId;
|
||||
/**
|
||||
* 消耗积分
|
||||
*/
|
||||
@Schema(description = "消耗积分")
|
||||
private BigDecimal pointsUsed;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -29,6 +29,7 @@ import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import java.io.Serial;
|
||||
|
||||
@@ -39,9 +40,10 @@ import java.io.Serial;
|
||||
* @since 2026-02-05
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_address")
|
||||
@TableName("common_user_address")
|
||||
@Schema(description = "UserAddress对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
public class CommonUserAddressEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
@@ -56,7 +58,7 @@ public class CommonUserAddressEntity extends BaseEntity {
|
||||
* 地区信息id
|
||||
*/
|
||||
@Schema(description = "地区信息id")
|
||||
private Long regionsInfoId;
|
||||
private Long regionsId;
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.entity;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 用户通知 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-09
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_notice")
|
||||
@Schema(description = "UserNotice对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
public class CommonUserNoticeEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(description = "用户id")
|
||||
private Long userId;
|
||||
/**
|
||||
* 通知类型 0-系统通知 1-app通知 2-market通知
|
||||
*/
|
||||
@Schema(description = "通知类型 0-全局通知 1-APP系统通知 2-Market系统通知 3-APP用户通知 4-Market用户通知")
|
||||
private Integer noticeType;
|
||||
/**
|
||||
* 业务类型
|
||||
*/
|
||||
@Schema(description = "业务类型")
|
||||
private String moduleType;
|
||||
/**
|
||||
* 是否已读 0-否 1-是
|
||||
*/
|
||||
@Schema(description = "是否已读 0-否 1-是")
|
||||
private Integer hasRead;
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remarks;
|
||||
|
||||
}
|
||||
@@ -34,6 +34,9 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.Serial;
|
||||
|
||||
@@ -46,18 +49,12 @@ import java.io.Serial;
|
||||
@Data
|
||||
@TableName("user_order")
|
||||
@Schema(description = "Order对象")
|
||||
public class CommonUserOrderEntity implements Serializable {
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonUserOrderEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
@Schema(description = "主键")
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
@@ -149,40 +146,5 @@ public class CommonUserOrderEntity implements Serializable {
|
||||
*/
|
||||
@Schema(description = "支付凭证编号")
|
||||
private String paymentTrack;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Schema(description = "创建人")
|
||||
private Long createUser;
|
||||
/**
|
||||
* 创建部门
|
||||
*/
|
||||
@Schema(description = "创建部门")
|
||||
private Long createDept;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@Schema(description = "修改人")
|
||||
private Long updateUser;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@Schema(description = "修改时间")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Schema(description = "状态")
|
||||
private Integer status;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@Schema(description = "")
|
||||
private Integer isDeleted;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.springblade.modules.common.pojo.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 用户商城积分表 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_point")
|
||||
@Schema(description = "CommonUserPoint对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonUserPointEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 面额
|
||||
*/
|
||||
@Schema(description = "面额")
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@Version
|
||||
@Schema(description = "版本号")
|
||||
private Integer version;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package org.springblade.modules.common.pojo.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springblade.core.mp.base.BaseEntity;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 用户商城积分流水表 实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_point_log")
|
||||
@Schema(description = "CommonUserPointLog对象")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
public class CommonUserPointLogEntity extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(description = "用户id")
|
||||
private Long userId;
|
||||
/**
|
||||
* 金额
|
||||
*/
|
||||
@Schema(description = "金额")
|
||||
private BigDecimal amount;
|
||||
/**
|
||||
* 上一笔金额
|
||||
*/
|
||||
@Schema(description = "上一笔金额")
|
||||
private BigDecimal lastAmount;
|
||||
/**
|
||||
*
|
||||
* 来源类型
|
||||
*/
|
||||
@Schema(description = "来源类型")
|
||||
private String sourceType;
|
||||
/**
|
||||
* 来源id
|
||||
*/
|
||||
@Schema(description = "来源id")
|
||||
private Long sourceId;
|
||||
/**
|
||||
* 来源详情
|
||||
*/
|
||||
@Schema(description = "来源详情")
|
||||
private String sourceDetail;
|
||||
/**
|
||||
* 消费类型 1-收入 2-支出
|
||||
*/
|
||||
@Schema(description = "消费类型 1-收入 2-支出")
|
||||
private Integer type;
|
||||
/**
|
||||
* 是否完成 0-未完成 1-已完成
|
||||
*/
|
||||
@Schema(description = "是否完成 0-未完成 1-已完成")
|
||||
private Integer isComplete;
|
||||
/**
|
||||
* 统计时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(description = "统计时间")
|
||||
private Date statisticalDate;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.vo;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonLotteryPrizeEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 奖品配置表 视图实体类
|
||||
*
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonLotteryPrizeVO extends CommonLotteryPrizeEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.vo;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonLotteryRecordEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 抽奖记录表 视图实体类
|
||||
*
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonLotteryRecordVO extends CommonLotteryRecordEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -42,4 +42,6 @@ public class CommonUserAddressVO extends CommonUserAddressEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String account;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.vo;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserNoticeEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 用户通知 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonUserNoticeVO extends CommonUserNoticeEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
@@ -29,6 +29,9 @@ import org.springblade.modules.common.pojo.entity.CommonUserOrderEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户订单 视图实体类
|
||||
@@ -37,9 +40,50 @@ import java.io.Serial;
|
||||
* @since 2026-02-06
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonUserOrderVO extends CommonUserOrderEntity {
|
||||
public class CommonUserOrderVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
private String account;
|
||||
|
||||
private String consigneePhone;
|
||||
|
||||
private String consignee;
|
||||
|
||||
private String deliveryAddress;
|
||||
|
||||
private String orderType;
|
||||
|
||||
private String itemName;
|
||||
|
||||
private String imageUrl;
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
private String expressCompany;
|
||||
|
||||
private String expressNo;
|
||||
|
||||
private Integer orderStatus;
|
||||
|
||||
private BigDecimal totalAmount;
|
||||
|
||||
private BigDecimal actualAmount;
|
||||
|
||||
private Integer paymentType;
|
||||
|
||||
private Date paymentTime;
|
||||
|
||||
private Integer paymentStatus;
|
||||
|
||||
private Long createUser;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Long updateUser;
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.vo;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserPointLogEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 用户商城积分流水表 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonUserPointLogVO extends CommonUserPointLogEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String account;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.pojo.vo;
|
||||
|
||||
import org.springblade.modules.common.pojo.entity.CommonUserPointEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 用户商城积分表 视图实体类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CommonUserPointVO extends CommonUserPointEntity {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String account;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* BladeX Commercial License Agreement
|
||||
* Copyright (c) 2018-2099, https://bladex.cn. All rights reserved.
|
||||
* <p>
|
||||
* Use of this software is governed by the Commercial License Agreement
|
||||
* obtained after purchasing a license from BladeX.
|
||||
* <p>
|
||||
* 1. This software is for development use only under a valid license
|
||||
* from BladeX.
|
||||
* <p>
|
||||
* 2. Redistribution of this software's source code to any third party
|
||||
* without a commercial license is strictly prohibited.
|
||||
* <p>
|
||||
* 3. Licensees may copyright their own code but cannot use segments
|
||||
* from this software for such purposes. Copyright of this software
|
||||
* remains with BladeX.
|
||||
* <p>
|
||||
* Using this software signifies agreement to this License, and the software
|
||||
* must not be used for illegal purposes.
|
||||
* <p>
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY. The author is
|
||||
* not liable for any claims arising from secondary or illegal development.
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.common.service;
|
||||
|
||||
import org.springblade.modules.api.request.LotteryDrawRequest;
|
||||
import org.springblade.modules.api.vo.CommonLotteryPrizeApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.CommonLotteryPrizeEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonLotteryPrizeVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 奖品配置表 服务类
|
||||
*
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
public interface ICommonLotteryPrizeService extends BaseService<CommonLotteryPrizeEntity> {
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param lotteryPrize 查询参数
|
||||
* @return IPage<LotteryPrizeVO>
|
||||
*/
|
||||
IPage<CommonLotteryPrizeVO> selectLotteryPrizePage(IPage<CommonLotteryPrizeVO> page, CommonLotteryPrizeVO lotteryPrize);
|
||||
|
||||
CommonLotteryPrizeApiVO draw(LotteryDrawRequest request);
|
||||
|
||||
List<CommonLotteryPrizeApiVO> staticList();
|
||||
|
||||
String rules();
|
||||
}
|
||||
@@ -23,39 +23,49 @@
|
||||
* <p>
|
||||
* Author: Chill Zhuang (bladejava@qq.com)
|
||||
*/
|
||||
package org.springblade.modules.userPackage.service;
|
||||
package org.springblade.modules.common.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import org.springblade.modules.userPackage.pojo.entity.UserMarketBenefitPackageLogEntity;
|
||||
import org.springblade.modules.userPackage.pojo.vo.UserMarketBenefitPackageLogVO;
|
||||
import org.springblade.modules.userPackage.excel.UserMarketBenefitPackageLogExcel;
|
||||
import org.springblade.modules.api.vo.CommonLotteryRecordApiVO;
|
||||
import org.springblade.modules.api.vo.CommonLotteryWinnerApiVO;
|
||||
import org.springblade.modules.common.pojo.entity.CommonLotteryRecordEntity;
|
||||
import org.springblade.modules.common.pojo.vo.CommonLotteryRecordVO;
|
||||
import org.springblade.modules.common.excel.CommonLotteryRecordExcel;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 划拨积分记录 服务类
|
||||
* 抽奖记录表 服务类
|
||||
*
|
||||
* @author BladeX
|
||||
* @since 2026-02-05
|
||||
* @author RayLiu
|
||||
* @since 2026-02-14
|
||||
*/
|
||||
public interface IUserMarketBenefitPackageLogService extends BaseService<UserMarketBenefitPackageLogEntity> {
|
||||
public interface ICommonLotteryRecordService extends BaseService<CommonLotteryRecordEntity> {
|
||||
/**
|
||||
* 自定义分页
|
||||
*
|
||||
* @param page 分页参数
|
||||
* @param userMarketBenefitPackageLog 查询参数
|
||||
* @return IPage<UserMarketBenefitPackageLogVO>
|
||||
* @param lotteryRecord 查询参数
|
||||
* @return IPage<LotteryRecordVO>
|
||||
*/
|
||||
IPage<UserMarketBenefitPackageLogVO> selectUserMarketBenefitPackageLogPage(IPage<UserMarketBenefitPackageLogVO> page, UserMarketBenefitPackageLogVO userMarketBenefitPackageLog);
|
||||
IPage<CommonLotteryRecordVO> selectLotteryRecordPage(IPage<CommonLotteryRecordVO> page, CommonLotteryRecordVO lotteryRecord);
|
||||
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
*
|
||||
* @param queryWrapper 查询条件
|
||||
* @return List<UserMarketBenefitPackageLogExcel>
|
||||
* @return List<LotteryRecordExcel>
|
||||
*/
|
||||
List<UserMarketBenefitPackageLogExcel> exportUserMarketBenefitPackageLog(Wrapper<UserMarketBenefitPackageLogEntity> queryWrapper);
|
||||
List<CommonLotteryRecordExcel> exportLotteryRecord(Wrapper<CommonLotteryRecordEntity> queryWrapper);
|
||||
|
||||
IPage<CommonLotteryRecordApiVO> selectLotteryRecordApiPage(IPage<CommonLotteryRecordApiVO> page, CommonLotteryRecordApiVO vo);
|
||||
|
||||
Boolean addRecord(Long userId, BigDecimal amount);
|
||||
|
||||
List<CommonLotteryWinnerApiVO> lotteryWinners();
|
||||
|
||||
}
|
||||
@@ -27,6 +27,8 @@ package org.springblade.modules.common.service;
|
||||
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import org.springblade.modules.api.vo.FullRegionInfoVO;
|
||||
import org.springblade.modules.common.pojo.entity.CommonRegionsInfoEntity;
|
||||
import org.springblade.modules.common.pojo.vo.AppCommonRegionsInfoVO;
|
||||
import org.springblade.modules.common.pojo.vo.CommonRegionsInfoVO;
|
||||
@@ -51,4 +53,6 @@ public interface ICommonRegionsInfoService extends BaseService<CommonRegionsInfo
|
||||
IPage<CommonRegionsInfoVO> selectRegionsInfoPage(IPage<CommonRegionsInfoVO> page, CommonRegionsInfoVO regionsInfo);
|
||||
|
||||
List<AppCommonRegionsInfoVO> findRegionList(@Min(value = 0) Long pid, @Max(value = 4 ) @Min(value = 0) Integer level);
|
||||
|
||||
FullRegionInfoVO queryFullInfo( Long regionId);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user