Compare commits

...

10 Commits

Author SHA1 Message Date
曾文豪
0ccb88e02e publish icbc-sandbox-1.0.0
All checks were successful
/ local-deploy (push) Successful in 18s
2024-11-09 13:57:38 +08:00
曾文豪
3aca586bd4 publish icbc-sandbox-1.0.0 2024-11-09 13:54:55 +08:00
曾文豪
c2fe494ed9 publish 1.0.24 2024-04-13 10:51:03 +08:00
曾文豪
07de3f6ba7 feat:获取系统配置增加一个方法 2024-04-13 10:50:37 +08:00
曾文豪
1c521e5378 fix:修复token是否有效的判定条件 2024-04-13 10:45:57 +08:00
曾文豪
e98e98d659 publish 1.0.23 2024-02-28 09:36:58 +08:00
曾文豪
75d052bd0c perf:钉钉工作通知的内容完全自定义 2024-02-28 09:36:21 +08:00
曾文豪
3758826987 perf:更新一个文案 2024-02-23 16:17:17 +08:00
曾文豪
8a4cf8e439 publish 1.0.22 2024-01-31 17:34:25 +08:00
曾文豪
09203ac78d publish 1.0.21 2024-01-31 17:06:54 +08:00
22 changed files with 99 additions and 51 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -0,0 +1,25 @@
## 工作流触发时机
on:
push:
tags:
- '*'
jobs:
## 任务名称
local-deploy:
## 任务执行的服务器
runs-on: tiesheng-local
## 任务步骤
steps:
## 检出代码(固定配置)
- name: Check out repository code
uses: https://git.tieshengkeji.com/actions/checkout@v4
## maven打包
- name: Maven deploy
run: |
mvn deploy

27
pom.xml
View File

@@ -6,7 +6,7 @@
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
<packaging>pom</packaging>
<name>springboot-parent</name>
<description>杭州铁晟科技有限公司基础依赖</description>
@@ -57,55 +57,55 @@
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-database</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-login</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-web</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-util</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-platform</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-message</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-encrypt</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-annotation</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</dependency>
<dependency>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-poi</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</dependency>
<dependency>
@@ -130,6 +130,13 @@
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>gitea</id>
<url>https://git.tieshengkeji.com/api/packages/tieshengkeji/maven</url>
</repository>
</distributionManagement>
<build>
<pluginManagement>
<plugins>

View File

@@ -6,11 +6,11 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</parent>
<artifactId>springboot-ademo</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</parent>
<artifactId>springboot-annotation</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</parent>
<artifactId>springboot-database</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</parent>
<artifactId>springboot-encrypt</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</parent>
<artifactId>springboot-login</artifactId>

View File

@@ -86,7 +86,7 @@ public class LoginController {
public ApiResp<String> uniqueIndex(@RequestBody UniqueIndexDTO dto) {
TokenBean tokenBean = tieshengLoginConfigurer.doLogin(new DoLoginInfo("web_unique_index",
dto.getNo(), dto.getPlatform(), dto.getInfo()));
if (tokenBean == null) {
if (tokenBean == null || StrUtil.isEmpty(tokenBean.getId())) {
throw new ApiException("登录失败");
}
return ApiResp.respOK(tokenBean.toToken());

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</parent>
<artifactId>springboot-message</artifactId>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</parent>
<artifactId>springboot-platform</artifactId>

View File

@@ -226,6 +226,8 @@ public class PlatformDingConfig {
/**
* 同步钉钉的通讯录
* <br />
* PS如果需要钉钉用户手机号需要开通权限企业员工手机号信息
*
* @param deptVo 为null时从第一级获取
* @param consumer 回调
@@ -264,18 +266,19 @@ public class PlatformDingConfig {
* @param content
* @param actionUrl
* @param userIds
* @return
*/
public void messageNotification(String service, String title, String content, String actionUrl, List<String> userIds) {
public DingResponse<String> messageNotification(String service, String title, String markdown, String actionUrl, List<String> userIds) {
if (CollUtil.isEmpty(userIds)) {
return;
return null;
}
DingConfigBean configBean = getConfigBean(service);
JSONObject actionCard = new JSONObject();
actionCard.set("title", title);
actionCard.set("markdown", "### " + title + "\n" + content);
actionCard.set("markdown", markdown);
actionCard.set("single_title", "点击查看");
actionCard.set("single_url", actionUrl);
@@ -287,7 +290,7 @@ public class PlatformDingConfig {
body.putOpt("agent_id", configBean.getAgentId());
body.putOpt("userid_list", CollUtil.join(userIds, ","));
body.putOpt("msg", msg);
doRequest(service, "https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2", body,
return doRequest(service, "https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2", body,
new TypeReference<DingResponse<String>>() {
});
}

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</parent>
<artifactId>springboot-poi</artifactId>

BIN
springboot-util/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</parent>
<artifactId>springboot-util</artifactId>

BIN
springboot-util/src/main/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -17,7 +17,6 @@ public class ApiResp<T> {
private int code;
private String message;
private Throwable exception;
private T data;
private long recordsTotal = 0;
private boolean encrypt = false;
@@ -182,11 +181,4 @@ public class ApiResp<T> {
this.encrypt = encrypt;
}
public Throwable getException() {
return exception;
}
public void setException(Throwable exception) {
this.exception = exception;
}
}

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.tiesheng.springboot-parent</groupId>
<artifactId>springboot-parent</artifactId>
<version>1.0.20</version>
<version>icbc-sandbox-1.0.0</version>
</parent>
<artifactId>springboot-web</artifactId>

View File

@@ -28,6 +28,28 @@ public class CoreConfigService extends TsServiceBase<CoreConfigSystemMapper, Cor
}
/**
* 获取(或创建)一个文本类型的配置
*
* @param configKey
* @param defaultValue
* @return
*/
public CoreConfigSystem getTextOrCreate(String configKey, String defaultValue) {
CoreConfigSystem oneByColumn = getOneByColumn("config_key", configKey);
if (oneByColumn == null) {
oneByColumn = new CoreConfigSystem();
oneByColumn.setId(configKey);
oneByColumn.setConfigKey(configKey);
oneByColumn.setConfigVal(defaultValue);
oneByColumn.setRemark(defaultValue);
oneByColumn.setConfigType(0);
save(oneByColumn);
}
return oneByColumn;
}
/**
* 刷新功能点
*

View File

@@ -1,6 +1,6 @@
package com.tiesheng.core.service;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import cn.hutool.core.util.StrUtil;
import com.tiesheng.core.mapper.CorePlatformUniqueMapper;
import com.tiesheng.core.pojos.dao.CorePlatformUnique;
import com.tiesheng.login.config.token.bean.TokenBean;
@@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.util.Objects;
/**
* @author hao
@@ -37,11 +38,22 @@ public class CorePlatformUniqueService extends TsServiceBase<CorePlatformUniqueM
platformUnique.setInfo(loginInfo.getInfo());
saveOrUpdate(platformUnique);
String oldUserId = platformUnique.getUserId();
TokenBean tokenBean = tieshengWebConfigurer.login(platformUnique);
if (tokenBean != null) {
// 添加登录日志
coreLogService.addLoginLog(platformUnique, tokenBean);
// 更新唯一值
if (!StrUtil.isEmpty(tokenBean.getId()) &&
!Objects.equals(oldUserId, tokenBean.getId())) {
platformUnique.setUserId(tokenBean.getId());
saveOrUpdate(platformUnique);
}
}
return tokenBean;
}
@@ -55,19 +67,5 @@ public class CorePlatformUniqueService extends TsServiceBase<CorePlatformUniqueM
tieshengWebConfigurer.onSignError(response);
}
/**
* 更新用户id
*
* @param uniqueId
* @param userId
* @return
*/
public boolean updateUserId(String uniqueId, String userId) {
return update(new UpdateWrapper<CorePlatformUnique>().eq("unique_id", uniqueId)
.set("user_id", userId)
.set("is_deleted", 0)
);
}
}

View File

@@ -115,6 +115,8 @@ public class FileUploadService {
* @param fileMd5
*/
public String chunkMerge(String fileMd5, String fileExt) {
// 0校验文件类型是否合法
tieshengWebConfigurer.uploadFileCheck(fileExt);
// 1获取文件块的目录
FileUploadPath folder = FileUploadPath.folder(fileMd5);

View File

@@ -35,8 +35,7 @@ public interface TieshengWebConfigurer {
*/
default ApiResp<String> addExceptionHandler(Exception e) {
ApiResp<String> apiResp = ApiResp.respCust(ApiRespEnum.ServerError);
apiResp.setException(e);
LogFactory.get().info(apiResp.getException());
LogFactory.get().info(e);
return apiResp;
}