Merge remote-tracking branch 'origin/develop' into develop
commit
787b0140e7
Binary file not shown.
|
Before Width: | Height: | Size: 238 KiB After Width: | Height: | Size: 204 KiB |
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
|||||||
cn.iocoder.yudao.framework.banner.config.YudaoBannerAutoConfiguration
|
|
||||||
@ -1 +0,0 @@
|
|||||||
cn.iocoder.yudao.framework.errorcode.config.YudaoErrorCodeAutoConfiguration
|
|
||||||
@ -1,82 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<parent>
|
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
|
||||||
<artifactId>yudao-framework</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<artifactId>yudao-spring-boot-starter-biz-sms</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
|
|
||||||
<name>${project.artifactId}</name>
|
|
||||||
<description>短信拓展,支持阿里云、腾讯云</description>
|
|
||||||
<url>https://github.com/YunaiV/ruoyi-vue-pro</url>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
|
||||||
<artifactId>yudao-common</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Spring 核心 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 监控相关 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.opentracing</groupId>
|
|
||||||
<artifactId>opentracing-util</artifactId> <!-- aliyun 短信需要,进行链路追踪 -->
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Test 测试相关 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
|
||||||
<artifactId>yudao-spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 工具类相关 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.guava</groupId>
|
|
||||||
<artifactId>guava</artifactId>
|
|
||||||
<optional>true</optional> <!-- 设置为可选,因为使用到 @VisibleForTesting 用于单元测试 -->
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-databind</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>jakarta.validation</groupId>
|
|
||||||
<artifactId>jakarta.validation-api</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- 三方云服务相关 -->
|
|
||||||
|
|
||||||
<!-- SMS SDK begin -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.aliyun</groupId>
|
|
||||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.aliyun</groupId>
|
|
||||||
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.tencentcloudapi</groupId>
|
|
||||||
<artifactId>tencentcloud-sdk-java-sms</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<!-- SMS SDK end -->
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package cn.iocoder.yudao.framework.sms.config;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.sms.core.client.SmsClientFactory;
|
|
||||||
import cn.iocoder.yudao.framework.sms.core.client.impl.SmsClientFactoryImpl;
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 短信配置类
|
|
||||||
*
|
|
||||||
* @author 芋道源码
|
|
||||||
*/
|
|
||||||
@AutoConfiguration
|
|
||||||
public class YudaoSmsAutoConfiguration {
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public SmsClientFactory smsClientFactory() {
|
|
||||||
return new SmsClientFactoryImpl();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1 +0,0 @@
|
|||||||
cn.iocoder.yudao.framework.sms.config.YudaoSmsAutoConfiguration
|
|
||||||
@ -1,38 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<artifactId>yudao-framework</artifactId>
|
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>yudao-spring-boot-starter-desensitize</artifactId>
|
|
||||||
<description>脱敏组件:支持 JSON 返回数据时,将邮箱、手机等字段进行脱敏</description>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
|
||||||
<artifactId>yudao-common</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- jackson -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-annotations</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.fasterxml.jackson.core</groupId>
|
|
||||||
<artifactId>jackson-databind</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<!-- Test 测试相关 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
|
||||||
<artifactId>yudao-spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package cn.iocoder.yudao.framework.flowable.core.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 流程常量信息
|
||||||
|
*/
|
||||||
|
public interface BpmnModelConstants {
|
||||||
|
|
||||||
|
String BPMN_FILE_SUFFIX = ".bpmn";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BPMN 中的命名空间
|
||||||
|
*
|
||||||
|
* 这个东西有可能导致无法切换工作流程的实现
|
||||||
|
*/
|
||||||
|
String NAMESPACE = "http://flowable.org/bpmn";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自定义属性 dataType
|
||||||
|
*/
|
||||||
|
String PROCESS_CUSTOM_DATA_TYPE = "dataType";
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,27 +1,23 @@
|
|||||||
package cn.iocoder.yudao.framework.desensitize.core;
|
package cn.iocoder.yudao.framework.desensitize.core;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||||
|
import cn.iocoder.yudao.framework.desensitize.core.annotation.Address;
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.regex.annotation.EmailDesensitize;
|
import cn.iocoder.yudao.framework.desensitize.core.regex.annotation.EmailDesensitize;
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.regex.annotation.RegexDesensitize;
|
import cn.iocoder.yudao.framework.desensitize.core.regex.annotation.RegexDesensitize;
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.annotation.Address;
|
import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.*;
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.BankCardDesensitize;
|
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.CarLicenseDesensitize;
|
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.ChineseNameDesensitize;
|
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.FixedPhoneDesensitize;
|
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.IdCardDesensitize;
|
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.PasswordDesensitize;
|
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.MobileDesensitize;
|
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.slider.annotation.SliderDesensitize;
|
|
||||||
import cn.iocoder.yudao.framework.test.core.ut.BaseMockitoUnitTest;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
|
import org.mockito.junit.jupiter.MockitoExtension;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link DesensitizeTest} 的单元测试
|
* {@link DesensitizeTest} 的单元测试
|
||||||
*/
|
*/
|
||||||
public class DesensitizeTest extends BaseMockitoUnitTest {
|
@ExtendWith(MockitoExtension.class)
|
||||||
|
public class DesensitizeTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test() {
|
public void test() {
|
||||||
@ -1,8 +1,8 @@
|
|||||||
package cn.iocoder.yudao.framework.desensitize.core.annotation;
|
package cn.iocoder.yudao.framework.desensitize.core.annotation;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.DesensitizeTest;
|
import cn.iocoder.yudao.framework.desensitize.core.DesensitizeTest;
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.base.annotation.DesensitizeBy;
|
|
||||||
import cn.iocoder.yudao.framework.desensitize.core.handler.AddressHandler;
|
import cn.iocoder.yudao.framework.desensitize.core.handler.AddressHandler;
|
||||||
|
import cn.iocoder.yudao.framework.desensitize.core.base.annotation.DesensitizeBy;
|
||||||
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
||||||
|
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.Documented;
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package cn.iocoder.yudao.module.bpm.api.listener;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.bpm.api.listener.dto.BpmResultListenerRespDTO;
|
||||||
|
|
||||||
|
// TODO @芋艿:后续改成支持 RPC
|
||||||
|
/**
|
||||||
|
* 业务流程实例的结果发生变化的监听器 Api
|
||||||
|
*
|
||||||
|
* @author HUIHUI
|
||||||
|
*/
|
||||||
|
public interface BpmResultListenerApi {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监听的流程定义 Key
|
||||||
|
*
|
||||||
|
* @return 返回监听的流程定义 Key
|
||||||
|
*/
|
||||||
|
String getProcessDefinitionKey();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理事件
|
||||||
|
*
|
||||||
|
* @param event 事件
|
||||||
|
*/
|
||||||
|
void onEvent(BpmResultListenerRespDTO event);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
package cn.iocoder.yudao.module.bpm.framework.bpm.listener;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
import cn.iocoder.yudao.module.bpm.api.listener.BpmResultListenerApi;
|
||||||
|
import cn.iocoder.yudao.module.bpm.api.listener.dto.BpmResultListenerRespDTO;
|
||||||
|
import cn.iocoder.yudao.module.bpm.framework.bpm.core.event.BpmProcessInstanceResultEvent;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.context.ApplicationListener;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
// TODO @芋艿:后续改成支持 RPC
|
||||||
|
/**
|
||||||
|
* 业务流程结果监听器实现类
|
||||||
|
*
|
||||||
|
* @author HUIHUI
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class BpmServiceResultListener implements ApplicationListener<BpmProcessInstanceResultEvent> {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private List<BpmResultListenerApi> bpmResultListenerApis;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final void onApplicationEvent(BpmProcessInstanceResultEvent event) {
|
||||||
|
bpmResultListenerApis.forEach(bpmResultListenerApi -> {
|
||||||
|
if (!StrUtil.equals(event.getProcessDefinitionKey(), bpmResultListenerApi.getProcessDefinitionKey())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
bpmResultListenerApi.onEvent(BeanUtils.toBean(event, BpmResultListenerRespDTO.class));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
### 合同金额排行榜
|
||||||
|
GET {{baseUrl}}/crm/bi-rank/get-contract-price-rank?deptId=100×[0]=2022-12-12 00:00:00×[1]=2024-12-12 23:59:59
|
||||||
|
Authorization: Bearer {{token}}
|
||||||
|
tenant-id: {{adminTenentId}}
|
||||||
|
|
||||||
|
### 回款金额排行榜
|
||||||
|
GET {{baseUrl}}/crm/bi-rank/get-receivable-price-rank?deptId=100×[0]=2022-12-12 00:00:00×[1]=2024-12-12 23:59:59
|
||||||
|
Authorization: Bearer {{token}}
|
||||||
|
tenant-id: {{adminTenentId}}
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
package cn.iocoder.yudao.module.crm.controller.admin.bi;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRanKRespVO;
|
||||||
|
import cn.iocoder.yudao.module.crm.controller.admin.bi.vo.CrmBiRankReqVO;
|
||||||
|
import cn.iocoder.yudao.module.crm.service.bi.CrmBiRankingService;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
|
import jakarta.validation.Valid;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - CRM BI 排行榜")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/crm/bi-rank")
|
||||||
|
@Validated
|
||||||
|
public class CrmBiRankController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CrmBiRankingService rankingService;
|
||||||
|
|
||||||
|
@GetMapping("/get-contract-price-rank")
|
||||||
|
@Operation(summary = "获得合同金额排行榜")
|
||||||
|
@PreAuthorize("@ss.hasPermission('crm:bi-rank:query')")
|
||||||
|
public CommonResult<List<CrmBiRanKRespVO>> getContractPriceRank(@Valid CrmBiRankReqVO rankingReqVO) {
|
||||||
|
return success(rankingService.getContractPriceRank(rankingReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get-receivable-price-rank")
|
||||||
|
@Operation(summary = "获得回款金额排行榜")
|
||||||
|
@PreAuthorize("@ss.hasPermission('crm:bi-rank:query')")
|
||||||
|
public CommonResult<List<CrmBiRanKRespVO>> getReceivablePriceRank(@Valid CrmBiRankReqVO rankingReqVO) {
|
||||||
|
return success(rankingService.getReceivablePriceRank(rankingReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
package cn.iocoder.yudao.module.crm.controller.admin.operatelog.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - CRM 跟进 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class CrmOperateLogV2RespVO {
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13563")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
private Integer userType;
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13563")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "修改客户")
|
||||||
|
private String subType;
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "13563")
|
||||||
|
private Long bizId;
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "将什么从什么改为了什么")
|
||||||
|
private String action;
|
||||||
|
|
||||||
|
@Schema(description = "编号", example = "{orderId: 1}")
|
||||||
|
private String extra;
|
||||||
|
|
||||||
|
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-01-01")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue