极光IM推送,消息聊天室功能开发
This commit is contained in:
parent
98bc598067
commit
bb5612143d
|
|
@ -153,3 +153,8 @@ adapay:
|
|||
apiKey: 'api_live_93a2fb4f-a74a-416f-967d-68557bcde43f'
|
||||
mockApiKey: 'api_test_88bf2958-583d-41cd-a987-01fe767ff056'
|
||||
rsaPrivateKey: 'MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMTk5xzz3KXA+waawr1DbU/SaSXZN8tY/22qHON7AAsp+yJ1/JCt+sD6/mpIUGittBS4n69t/9R5+2uHtD5/tVH7hYpJpVixLQw8/lonLPbeLFLgTMBHKJwSytBZXC2delnewHO/Zg6WlTWkdQB7gr73m7/wu2Ss+FDwGq6Q8sXdAgMBAAECgYEAtl8LTr72DjWsjdaFMEcnFftf12XWjyx1Ev+xWGcSiESvT6EXem8bxun1Az7N89eI6HSFvDlX8Fe4MEZ3BjjGGXSEXh3BYg5jI9YY/x4NdPvCxxVf9gGmBo2uBjkPoqYE8IGfpxnF+C4CBEyI5FPjhQRYB7aPKL7hImoCFkaFG4UCQQDojfLHd2ON2sgZdeAML9jxNzf1CBsGVfDrI7GOj+enWG+lWjG5tav/essfDOlZ6rZslyquLQZAGQqZz06cVCMzAkEA2L6WuCiEop9gsnGk03UcO8u54jFC68+2IA4bJeqicFmqMgs73PzsnNZ7t31q51iGsKxvCm3hziTGHGGH9TZyrwJATda1XG5ptCF2uI7r3yhkxNhmsm10HjrF2O6pj747G5hORlpaKn7Ugz7mng4ETURyqwYuEv6fCPVYxwLMnSbMYQJBAMggMkoYH1+IiWA6TlZw64DKuvd/RKs3PpKac7auzw2tvNg4Ry3k2xR1dgYWZ3703miCzoRysOwGSGYsJ7ziaUECQQC1RqZ0UBtEbKSr9fRYxo/lg28ioTlxoMjSL2OumEyJk+2t0S3gPQq5Wz+ylcwnK3Md0kGTyYs5kkTWPyPm9V1F'
|
||||
|
||||
jim:
|
||||
appKey: ''
|
||||
masterSecret: ''
|
||||
maxRetryTimes: ''
|
||||
|
|
|
|||
|
|
@ -0,0 +1,45 @@
|
|||
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<parent>
|
||||
<artifactId>ghy</artifactId>
|
||||
<groupId>com.ghy</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ghy-message</artifactId>
|
||||
|
||||
<description>
|
||||
聊天室模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.ghy</groupId>
|
||||
<artifactId>ghy-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 极光 start https://github.com/jpush/jmessage-api-java-client/blob/master/README.md-->
|
||||
<dependency>
|
||||
<groupId>cn.jpush.api</groupId>
|
||||
<artifactId>jmessage-client</artifactId>
|
||||
<version>1.1.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.jpush.api</groupId>
|
||||
<artifactId>jiguang-common</artifactId>
|
||||
<version>1.1.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
</dependency>
|
||||
<!-- 极光 end -->
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
package com.ghy.message.config;
|
||||
|
||||
import cn.jmessage.api.JMessageClient;
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author clunt
|
||||
* 极光消息配置文件
|
||||
*/
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "jim")
|
||||
@Data
|
||||
public class JimConfig {
|
||||
|
||||
private String appKey;
|
||||
|
||||
private String masterSecret;
|
||||
|
||||
private String maxRetryTimes;
|
||||
|
||||
@Bean
|
||||
public JMessageClient jMessageClient(){
|
||||
return new JMessageClient(appKey,masterSecret,maxRetryTimes);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.ghy.message.domain;
|
||||
|
||||
import com.ghy.common.annotation.Excel;
|
||||
import com.ghy.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 聊天室信息
|
||||
*/
|
||||
@Data
|
||||
public class JimGroupInfo extends BaseEntity {
|
||||
|
||||
@Excel(name = "聊天室群组序列", cellType = Excel.ColumnType.NUMERIC)
|
||||
private Long id;
|
||||
|
||||
@Excel(name = "聊天室id,", cellType = Excel.ColumnType.STRING)
|
||||
private Long sid;
|
||||
|
||||
@Excel(name = "聊天室名称", cellType = Excel.ColumnType.STRING)
|
||||
private String groupName;
|
||||
|
||||
@Excel(name = "聊天室描述", cellType = Excel.ColumnType.STRING)
|
||||
private String groupDesc;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.ghy.message.domain;
|
||||
|
||||
import com.ghy.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author clunt
|
||||
* 极光推送群组聊天室用户
|
||||
*/
|
||||
@Data
|
||||
public class JimUser extends BaseEntity {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package com.ghy.message;
|
||||
|
||||
class GhyMessageApplicationTests {
|
||||
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.ghy.system.domain;
|
||||
|
||||
import com.ghy.common.annotation.Excel;
|
||||
import com.ghy.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author clunt
|
||||
* 系统消息(急报功能)
|
||||
*/
|
||||
@Data
|
||||
public class SysNews extends BaseEntity {
|
||||
|
||||
@Excel(name = "消息id", cellType = Excel.ColumnType.NUMERIC)
|
||||
private Long newsId;
|
||||
|
||||
@Excel(name = "消息主题", cellType = Excel.ColumnType.STRING)
|
||||
private String title;
|
||||
|
||||
@Excel(name = "消息内容", cellType = Excel.ColumnType.STRING)
|
||||
private String content;
|
||||
|
||||
@Excel(name = "发送人", cellType = Excel.ColumnType.NUMERIC)
|
||||
private Long from;
|
||||
|
||||
@Excel(name = "接收人", cellType = Excel.ColumnType.NUMERIC)
|
||||
private Long to;
|
||||
|
||||
@Excel(name = "状态", cellType = Excel.ColumnType.NUMERIC)
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.ghy.system.domain;
|
||||
|
||||
import com.ghy.common.annotation.Excel;
|
||||
import com.ghy.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 急报图片
|
||||
* @author clunt
|
||||
*/
|
||||
@Data
|
||||
public class SysNewsImg extends BaseEntity {
|
||||
|
||||
@Excel(name = "消息图片id", cellType = Excel.ColumnType.NUMERIC)
|
||||
private Long newsImgId;
|
||||
|
||||
@Excel(name = "图片地址", cellType = Excel.ColumnType.STRING)
|
||||
private String newsImgUrl;
|
||||
|
||||
@Excel(name = "图片状态", cellType = Excel.ColumnType.STRING)
|
||||
private Integer newsImgStatus;
|
||||
|
||||
}
|
||||
|
|
@ -25,6 +25,9 @@ public class Worker extends BaseEntity {
|
|||
@Excel(name = "师傅手机号", cellType = Excel.ColumnType.STRING)
|
||||
private String phone;
|
||||
|
||||
@Excel(name = "密码", cellType = Excel.ColumnType.STRING)
|
||||
private String password;
|
||||
|
||||
@Excel(name = "微信open_id", cellType = Excel.ColumnType.STRING)
|
||||
private String openId;
|
||||
|
||||
|
|
|
|||
15
pom.xml
15
pom.xml
|
|
@ -289,6 +289,20 @@
|
|||
<version>${ghy.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 财务模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ghy</groupId>
|
||||
<artifactId>ghy-custom</artifactId>
|
||||
<version>${ghy.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 财务模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ghy</groupId>
|
||||
<artifactId>ghy-payment</artifactId>
|
||||
<version>${ghy.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.ghy</groupId>
|
||||
|
|
@ -317,6 +331,7 @@
|
|||
<module>ghy-common</module>
|
||||
<module>ghy-custom</module>
|
||||
<module>ghy-worker</module>
|
||||
<module>ghy-message</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue