Merge remote-tracking branch 'base-version/test' into dev

# Conflicts:
#	zt-framework/zt-common/src/main/java/com/zt/plat/framework/common/util/security/CryptoSignatureUtils.java
#	zt-module-system/zt-module-system-api/src/main/java/com/zt/plat/module/system/api/sms/dto/send/SmsSendSingleToUserReqDTO.java
#	zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/api/databus/DatabusDeptProviderApiImpl.java
#	zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/controller/admin/sms/SmsCallbackController.java
#	zt-module-system/zt-module-system-server/src/main/java/com/zt/plat/module/system/framework/sms/core/enums/SmsChannelEnum.java
This commit is contained in:
chenbowen
2026-01-13 11:00:28 +08:00
127 changed files with 7018 additions and 152 deletions

View File

@@ -1,19 +0,0 @@
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
## 创建目录,并使用它作为工作目录
RUN mkdir -p /zt-module-system-server
WORKDIR /zt-module-system-server
## 将后端项目的 Jar 文件,复制到镜像中
COPY ./target/zt-module-system-server.jar app.jar
## 设置 TZ 时区
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx1024m"
## 暴露后端项目的 48080 端口
EXPOSE 48081
## 启动后端项目
CMD java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar

View File

@@ -200,26 +200,14 @@
<artifactId>hutool-all</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.13.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -1,30 +0,0 @@
package com.zt.plat.module.system;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* 项目的启动类
*
* 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
* 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
* 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
*
* @author ZT
*/
@SpringBootApplication
public class SystemServerApplication {
public static void main(String[] args) {
// 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
// 如果你碰到 启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
// 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
SpringApplication.run(SystemServerApplication.class, args);
// 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
// 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
// 如果你碰到启动的问题,请认真阅读 http://172.16.46.63:30888/quick-start/ 文章
}
}

View File

@@ -2,15 +2,17 @@ package com.zt.plat.module.system.api.esp;
import com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConstants;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.object.ObjectUtils;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.system.api.dept.dto.DeptMsgRespDTO;
import com.zt.plat.module.system.api.dept.dto.DeptSaveReqDTO;
import com.zt.plat.module.system.api.esp.dto.EspDto;
import com.zt.plat.module.system.controller.admin.dept.vo.dept.DeptSaveReqVO;
import com.zt.plat.module.system.service.dept.IEspService;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Objects;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
@RestController
@Validated
@@ -18,16 +20,26 @@ public class EspApiImpl implements EspApi {
@Resource
private IEspService deptService;
private IEspService espService;
@Override
public CommonResult<List<EspDto>> pushMsg(DeptSaveReqDTO syncReqDTO)
public CommonResult<Long> createDept(DeptSaveReqDTO createReqVO) {
DeptSaveReqVO reqVO = BeanUtils.toBean(createReqVO, DeptSaveReqVO.class);
Long deptId = espService.createDept(reqVO);
return success(deptId);
}
@Override
public CommonResult<List<DeptMsgRespDTO>> selectDepMsg(DeptSaveReqDTO syncReqDTO)
{
if(Objects.isNull(syncReqDTO) || null == syncReqDTO.getId())
{
return CommonResult.error(GlobalErrorCodeConstants.BAD_REQUEST.getCode(),
"ID不能为空");
}
return CommonResult.success(deptService.pushMsg(syncReqDTO));
return espService.selectDepMsg(syncReqDTO);
}
}

View File

@@ -0,0 +1,84 @@
package com.zt.plat.module.system.api.msg;
import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.system.api.sms.dto.log.SmsLogRespDTO;
import com.zt.plat.module.system.api.sms.dto.send.SmsSendSingleToUserReqDTO;
import com.zt.plat.module.system.service.sms.SmsLogService;
import com.zt.plat.module.system.service.sms.SmsSendService;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
@RestController
@Validated
public class MsgSendApiImpl implements MsgSendApi {
@Resource
private SmsSendService smsSendService;
@Resource
private SmsLogService smsLogService;
@Override
public CommonResult<Long> sendTextMsg(SmsSendSingleToUserReqDTO reqDTO) {
return null;
}
@Override
public CommonResult<Long> sendImageMsg(SmsSendSingleToUserReqDTO reqDTO) {
return null;
}
@Override
public CommonResult<SmsLogRespDTO> getSmsLog(Long id) {
return success(BeanUtils.toBean(smsLogService.getSmsLog(id), SmsLogRespDTO.class));
}
@Override
public CommonResult<Long> sendVideoMsg(SmsSendSingleToUserReqDTO reqDTO) {
return null;
}
@Override
public CommonResult<Long> sendFileMsg(SmsSendSingleToUserReqDTO reqDTO) {
return null;
}
@Override
public CommonResult<SmsLogRespDTO> sendTextCardMsg(Long id) {
return null;
}
@Override
public CommonResult<Long> sendTextCardMsgPich01(SmsSendSingleToUserReqDTO reqDTO) {
return null;
}
@Override
public CommonResult<Long> sendNewsMsg(SmsSendSingleToUserReqDTO reqDTO) {
return null;
}
@Override
public CommonResult<SmsLogRespDTO> sendMpNewsMsg(Long id) {
return null;
}
@Override
public CommonResult<Long> sendMarkdownMsg(SmsSendSingleToUserReqDTO reqDTO) {
return null;
}
@Override
public CommonResult<Long> sendMiniProgramNoticeMsg(SmsSendSingleToUserReqDTO reqDTO) {
return null;
}
@Override
public CommonResult<SmsLogRespDTO> sendInteractiveTaskCardMsg(Long id) {
return null;
}
}

View File

@@ -123,7 +123,7 @@ public class DeptController {
@GetMapping("/top-level-list")
@Operation(summary = "获取当前用户可访问的顶级部门列表", description = "用于懒加载,返回当前用户所属部门的最顶层祖先部门,如果用户没有关联任何部门则返回空列表")
@PreAuthorize("@ss.hasPermission('system:dept:query')")
// @PreAuthorize("@ss.hasPermission('system:dept:query')")
public CommonResult<List<DeptRespVO>> getTopLevelDeptList() {
List<DeptDO> list = deptService.getTopLevelDeptList();
return success(BeanUtils.toBean(list, DeptRespVO.class));

View File

@@ -0,0 +1,18 @@
package com.zt.plat.module.system.controller.admin.sms;
import com.zt.plat.module.system.service.sms.SmsSendService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Tag(name = "管理后台 - 消息回调")
@RestController
@RequestMapping("/system/sms/callback")
public class MsgCallBackController {
@Resource
private SmsSendService smsSendService;
}

View File

@@ -7,14 +7,10 @@ import com.zt.plat.module.system.framework.sms.core.enums.SmsChannelEnum;
import com.zt.plat.module.system.service.sms.SmsSendService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import jakarta.annotation.security.PermitAll;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - 短信回调")
@@ -73,4 +69,13 @@ public class SmsCallbackController {
return success(true);
}
@PostMapping("/zle")
@PermitAll
@TenantIgnore
@Operation(summary = "中铝e办短信的回调")
public CommonResult<Boolean> receiveZleSmsStatus(@RequestBody String requestBody) throws Throwable {
smsSendService.receiveSmsStatus(SmsChannelEnum.ZLE.getCode(), requestBody);
return success(true);
}
}

View File

@@ -6,11 +6,10 @@ import com.zt.plat.framework.common.pojo.PageParam;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.framework.excel.core.util.ExcelUtils;
import com.zt.plat.module.system.controller.admin.sms.vo.template.SmsTemplatePageReqVO;
import com.zt.plat.module.system.controller.admin.sms.vo.template.SmsTemplateRespVO;
import com.zt.plat.module.system.controller.admin.sms.vo.template.SmsTemplateSaveReqVO;
import com.zt.plat.module.system.controller.admin.sms.vo.template.SmsTemplateSendReqVO;
import com.zt.plat.module.system.controller.admin.sms.vo.msg.TextMessage;
import com.zt.plat.module.system.controller.admin.sms.vo.template.*;
import com.zt.plat.module.system.dal.dataobject.sms.SmsTemplateDO;
import com.zt.plat.module.system.service.msg.ISendMsgService;
import com.zt.plat.module.system.service.sms.SmsSendService;
import com.zt.plat.module.system.service.sms.SmsTemplateService;
import io.swagger.v3.oas.annotations.Operation;
@@ -19,13 +18,13 @@ import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.List;
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
import static com.zt.plat.framework.common.exception.enums.GlobalErrorCodeConstants.BAD_REQUEST;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - 短信模板")
@@ -37,6 +36,8 @@ public class SmsTemplateController {
private SmsTemplateService smsTemplateService;
@Resource
private SmsSendService smsSendService;
@Resource
private ISendMsgService sendMsgService;
@PostMapping("/create")
@Operation(summary = "创建短信模板")
@@ -100,4 +101,18 @@ public class SmsTemplateController {
sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams()));
}
@PostMapping("/send-msg")
@Operation(summary = "发送消息")
@PreAuthorize("@ss.hasPermission('system:sms-template:send-msg')")
public CommonResult<Object> sendMsg(@Valid @RequestBody MsgTemplateSendReqVO sendReqVO,TextMessage textMessage) throws Exception{
String msgtype = textMessage.getMsgtype();
if (StringUtils.isBlank(msgtype)){
return CommonResult.error(BAD_REQUEST.getCode(), String.format("请求参数缺失:%s",msgtype));
}
//发送消息到MQ
CommonResult<Object> objectCommonResult = sendMsgService.sendTextMsg(sendReqVO,textMessage);
return success(objectCommonResult);
}
}

View File

@@ -0,0 +1,48 @@
package com.zt.plat.module.system.controller.admin.sms.vo.msg;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
/**
* 企业微信消息发送对象父类
*
* @author dongqiang.hao
*/
@Data
@Accessors(chain = true)
public class BaseMessage implements Serializable {
/**
* 指定接收消息的成员成员ID列表多个接收者用|分隔最多支持1000个。特殊情况指定为”@all”则向该企业应用的全部成员发送
*/
private String touser;
/**
* 指定接收消息的部门部门ID列表多个接收者用|分隔最多支持100个。当touser为”@all”时忽略本参数
*/
private String toparty;
/**
* 指定接收消息的标签标签ID列表多个接收者用|分隔最多支持100个。当touser为”@all”时忽略本参数
*/
private String totag;
/**
* 企业应用的id整型。企业内部开发可在应用的设置页面查看第三方服务商可通过接口 获取企业授权信息 获取该参数值
*/
private String agentid;
/**
* 消息类型
*/
private String msgtype;
/**
* 发送消息的自建应用类型
*/
private String appType;
/**
* 表示是否开启重复消息检查0表示否1表示是默认0
*/
private Integer enable_duplicate_check = 0;
/**
* 表示是否重复消息检查的时间间隔默认1800s最大不超过4小时
*/
private Integer duplicate_check_interval;
}

Some files were not shown because too many files have changed in this diff Show More