【同步】BOOT 和 CLOUD 的功能

pull/128/MERGE
YunaiV 2024-07-27 15:41:35 +08:00
parent 7d79a49beb
commit c9a64030da
13 changed files with 33 additions and 21 deletions

View File

@ -181,7 +181,7 @@ public class ApiAccessLogFilter extends ApiRequestFilter {
// ========== 请求和响应的脱敏逻辑,移除类似 password、token 等敏感字段 ==========
private static String sanitizeMap(Map<String, ?> map, String[] sanitizeKeys) {
if (CollUtil.isNotEmpty(map)) {
if (CollUtil.isEmpty(map)) {
return null;
}
if (sanitizeKeys != null) {

View File

@ -7,7 +7,4 @@ package cn.iocoder.yudao.module.bpm.enums;
*/
public interface DictTypeConstants {
String TASK_ASSIGN_RULE_TYPE = "bpm_task_assign_rule_type"; // 任务分配规则类型
String TASK_ASSIGN_SCRIPT = "bpm_task_assign_script"; // 任务分配自定义脚本
}

View File

@ -1,6 +1,9 @@
package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.receivable;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import cn.iocoder.yudao.module.crm.controller.admin.contract.vo.contract.CrmContractRespVO;
import cn.iocoder.yudao.module.crm.enums.DictTypeConstants;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
@ -27,7 +30,8 @@ public class CrmReceivableRespVO {
private Long planId;
@Schema(description = "回款方式", example = "2")
@ExcelProperty("回款方式")
@ExcelProperty(value = "回款方式", converter = DictConvert.class)
@DictFormat(DictTypeConstants.CRM_RECEIVABLE_RETURN_TYPE)
private Integer returnType;
@Schema(description = "回款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "9000")
@ -39,7 +43,6 @@ public class CrmReceivableRespVO {
private LocalDateTime returnTime;
@Schema(description = "客户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("客户编号")
private Long customerId;
@Schema(description = "客户名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "test")
@ExcelProperty("客户名字")
@ -49,11 +52,9 @@ public class CrmReceivableRespVO {
@ExcelProperty("合同编号")
private Long contractId;
@Schema(description = "合同信息")
@ExcelProperty("合同信息")
private CrmContractRespVO contract;
@Schema(description = "负责人的用户编号", example = "25682")
@ExcelProperty("负责人的用户编号")
private Long ownerUserId;
@Schema(description = "负责人名字", example = "25682")
@ExcelProperty("负责人名字")
@ -67,7 +68,8 @@ public class CrmReceivableRespVO {
private String processInstanceId;
@Schema(description = "审批状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
@ExcelProperty("审批状态")
@ExcelProperty(value = "审批状态", converter = DictConvert.class)
@DictFormat(DictTypeConstants.CRM_AUDIT_STATUS)
private Integer auditStatus;
@Schema(description = "工作流编号", example = "备注")
@ -83,7 +85,6 @@ public class CrmReceivableRespVO {
private LocalDateTime updateTime;
@Schema(description = "创建人", example = "25682")
@ExcelProperty("创建人")
private String creator;
@Schema(description = "创建人名字", example = "test")
@ExcelProperty("创建人名字")

View File

@ -96,7 +96,7 @@ public class ConfigController {
@Operation(summary = "导出参数配置")
@PreAuthorize("@ss.hasPermission('infra:config:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportConfig(@Valid ConfigPageReqVO exportReqVO,
public void exportConfig(ConfigPageReqVO exportReqVO,
HttpServletResponse response) throws IOException {
exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<ConfigDO> list = configService.getConfigPage(exportReqVO).getList();

View File

@ -37,6 +37,7 @@ public class S3FileClient extends AbstractFileClient<S3FileClientConfig> {
.region(buildRegion()) // Region
.credentials(config.getAccessKey(), config.getAccessSecret()) // 认证密钥
.build();
enableVirtualStyleEndpoint();
}
/**
@ -86,6 +87,17 @@ public class S3FileClient extends AbstractFileClient<S3FileClientConfig> {
return null;
}
/**
* VirtualStyle
*/
private void enableVirtualStyleEndpoint() {
if (StrUtil.containsAll(config.getEndpoint(),
S3FileClientConfig.ENDPOINT_TENCENT, // 腾讯云 https://cloud.tencent.com/document/product/436/41284
S3FileClientConfig.ENDPOINT_VOLCES)) { // 火山云 https://www.volcengine.com/docs/6349/1288493
client.enableVirtualStyleEndpoint();
}
}
@Override
public String upload(byte[] content, String path, String type) throws Exception {
// 执行上传

View File

@ -19,6 +19,7 @@ public class S3FileClientConfig implements FileClientConfig {
public static final String ENDPOINT_QINIU = "qiniucs.com";
public static final String ENDPOINT_ALIYUN = "aliyuncs.com";
public static final String ENDPOINT_TENCENT = "myqcloud.com";
public static final String ENDPOINT_VOLCES = "volces.com"; // 火山云(字节)
/**
*

View File

@ -58,6 +58,6 @@ public interface ConfigService {
* @param reqVO
* @return
*/
PageResult<ConfigDO> getConfigPage(@Valid ConfigPageReqVO reqVO);
PageResult<ConfigDO> getConfigPage(ConfigPageReqVO reqVO);
}

View File

@ -23,7 +23,7 @@ CREATE TABLE IF NOT EXISTS "${table.tableName.toLowerCase()}" (
"${column.columnName}" ${dataType} DEFAULT '',
#elseif (${column.columnName} == 'deleted')
"deleted" bit NOT NULL DEFAULT FALSE,
#elseif (${column.columnName} == 'tenantId')
#elseif (${column.columnName} == 'tenant_id')
"tenant_id" bigint NOT NULL DEFAULT 0,
#else
"${column.columnName.toLowerCase()}" ${dataType}#if (${column.nullable} == false) NOT NULL#end,

View File

@ -306,8 +306,8 @@ export default {
await this.#[[$modal]]#.confirm('是否确认导出所有${table.classComment}数据项?');
try {
this.exportLoading = true;
const res = await ${simpleClassName}Api.export${simpleClassName}Excel(this.queryParams);
this.#[[$]]#download.excel(res.data, '${table.classComment}.xls');
const data = await ${simpleClassName}Api.export${simpleClassName}Excel(this.queryParams);
this.#[[$]]#download.excel(data, '${table.classComment}.xls');
} catch {
} finally {
this.exportLoading = false;

View File

@ -74,7 +74,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
class="!w-240px"
class="!w-220px"
/>
</el-form-item>
#end
@ -181,7 +181,7 @@
#end
#end
#end
<el-table-column label="操作" align="center">
<el-table-column label="操作" align="center" min-width="120px">
<template #default="scope">
<el-button
link

View File

@ -4,7 +4,8 @@ import { columns, searchFormSchema } from './${classNameVar}.data'
import { useI18n } from '@/hooks/web/useI18n'
import { useMessage } from '@/hooks/web/useMessage'
import { useModal } from '@/components/Modal'
import { useTable } from '@/components/Table'
import { IconEnum } from '@/enums/appEnum'
import { BasicTable, TableAction, useTable } from '@/components/Table'
import { delete${simpleClassName}, export${simpleClassName}, get${simpleClassName}Page } from '@/api/${table.moduleName}/${table.businessName}'
defineOptions({ name: '${table.className}' })

View File

@ -176,7 +176,7 @@ public interface TradeOrderConvert {
TradeOrderProperties tradeOrderProperties,
DeliveryExpressDO express) {
AppTradeOrderDetailRespVO orderVO = convert3(order, orderItems);
orderVO.setPayExpireTime(addTime(tradeOrderProperties.getPayExpireTime()));
orderVO.setPayExpireTime(order.getCreateTime().plus(tradeOrderProperties.getPayExpireTime()));
if (StrUtil.isNotEmpty(order.getPayChannelCode())) {
orderVO.setPayChannelName(DictFrameworkUtils.getDictDataLabel(DictTypeConstants.CHANNEL_CODE, order.getPayChannelCode()));
}

View File

@ -63,7 +63,7 @@ public interface BrokerageRecordMapper extends BaseMapperX<BrokerageRecordDO> {
.selectCount(BrokerageRecordDO::getId, UserBrokerageSummaryRespBO::getCount)
.selectSum(BrokerageRecordDO::getPrice)
.in(BrokerageRecordDO::getUserId, userIds)
.eq(BrokerageRecordDO::getBizId, bizType)
.eq(BrokerageRecordDO::getBizType, bizType)
.eq(BrokerageRecordDO::getStatus, status)
.groupBy(BrokerageRecordDO::getUserId)); // 按照 userId 聚合
return BeanUtil.copyToList(list, UserBrokerageSummaryRespBO.class);
@ -73,7 +73,7 @@ public interface BrokerageRecordMapper extends BaseMapperX<BrokerageRecordDO> {
// .selectCount(BrokerageRecordDO::getId, UserBrokerageSummaryBO::getCount)
// .selectSum(BrokerageRecordDO::getPrice)
// .in(BrokerageRecordDO::getUserId, userIds)
// .eq(BrokerageRecordDO::getBizId, bizType)
// .eq(BrokerageRecordDO::getBizType, bizType)
// .eq(BrokerageRecordDO::getStatus, status)
// .groupBy(BrokerageRecordDO::getUserId));
}