Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2fe494ed9 | ||
|
|
07de3f6ba7 | ||
|
|
1c521e5378 | ||
|
|
e98e98d659 | ||
|
|
75d052bd0c | ||
|
|
3758826987 | ||
|
|
8a4cf8e439 |
20
pom.xml
20
pom.xml
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</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.21</version>
|
||||
<version>1.0.24</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-login</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-web</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-util</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-platform</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-message</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-encrypt</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-annotation</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-poi</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-ademo</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-annotation</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-database</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-encrypt</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-login</artifactId>
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-message</artifactId>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-platform</artifactId>
|
||||
|
||||
@@ -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>>() {
|
||||
});
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-poi</artifactId>
|
||||
|
||||
BIN
springboot-util/.DS_Store
vendored
Normal file
BIN
springboot-util/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-util</artifactId>
|
||||
|
||||
BIN
springboot-util/src/main/.DS_Store
vendored
Normal file
BIN
springboot-util/src/main/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.tiesheng.springboot-parent</groupId>
|
||||
<artifactId>springboot-parent</artifactId>
|
||||
<version>1.0.21</version>
|
||||
<version>1.0.24</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>springboot-web</artifactId>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 刷新功能点
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user