公会优化-加入家族-发送公会消息
This commit is contained in:
@@ -144,9 +144,9 @@ public class ClanManageService extends BaseService {
|
|||||||
if (record.getId() != null) {
|
if (record.getId() != null) {
|
||||||
applyBucket.set(link, 3L, TimeUnit.DAYS);
|
applyBucket.set(link, 3L, TimeUnit.DAYS);
|
||||||
|
|
||||||
sendApplySysMsgToClanOwner(record.getId(), clan.getClanElderUid(), hallId);
|
sendApplySysMsgToClanOwner(record.getId(), clan.getClanElderUid(), uid);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (InterruptedException e) {
|
||||||
logger.error("apply clan join failed,uid={},clanId={},e={}", uid, clanId, e);
|
logger.error("apply clan join failed,uid={},clanId={},e={}", uid, clanId, e);
|
||||||
throw new ServiceException(BusiStatus.SERVER_BUSY.getReasonPhrase(), e);
|
throw new ServiceException(BusiStatus.SERVER_BUSY.getReasonPhrase(), e);
|
||||||
} finally {
|
} finally {
|
||||||
@@ -156,7 +156,6 @@ public class ClanManageService extends BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Async
|
|
||||||
public void sendApplySysMsgToClanOwner(Long recordId, Long clanOwnerId, Long hallOwnerId) {
|
public void sendApplySysMsgToClanOwner(Long recordId, Long clanOwnerId, Long hallOwnerId) {
|
||||||
// 发送申请消息
|
// 发送申请消息
|
||||||
String url = Constant.ClanMessageUrl.DEAL_APPLY + recordId;
|
String url = Constant.ClanMessageUrl.DEAL_APPLY + recordId;
|
||||||
@@ -186,7 +185,6 @@ public class ClanManageService extends BaseService {
|
|||||||
sendSysMsgService.sendMsg(params);
|
sendSysMsgService.sendMsg(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Async
|
|
||||||
public void sendApprovalSysMsgToHallOwner(Long hallOwnerId, Byte type, String clanName) {
|
public void sendApprovalSysMsgToHallOwner(Long hallOwnerId, Byte type, String clanName) {
|
||||||
// 发送申请消息
|
// 发送申请消息
|
||||||
NeteaseSendMsgParam params = new NeteaseSendMsgParam();
|
NeteaseSendMsgParam params = new NeteaseSendMsgParam();
|
||||||
@@ -294,7 +292,7 @@ public class ClanManageService extends BaseService {
|
|||||||
//修改操作记录
|
//修改操作记录
|
||||||
this.updateOperateRecord(record, Constant.HallOperateStatus.AGREE);
|
this.updateOperateRecord(record, Constant.HallOperateStatus.AGREE);
|
||||||
//给申请者发送消息
|
//给申请者发送消息
|
||||||
sendApprovalSysMsgToHallOwner(hallOwner.getUid(), Constant.HallOperateStatus.REJECT, clan.getName());
|
sendApprovalSysMsgToHallOwner(hallOwner.getUid(), Constant.HallOperateStatus.AGREE, clan.getName());
|
||||||
|
|
||||||
} else if (type.equals(Constant.ClanApproveType.REJECT)) {//拒绝
|
} else if (type.equals(Constant.ClanApproveType.REJECT)) {//拒绝
|
||||||
if (record.getType().equals(Constant.ClanOperateType.APPLY_CLAN)) {//拒绝申请加入模厅
|
if (record.getType().equals(Constant.ClanOperateType.APPLY_CLAN)) {//拒绝申请加入模厅
|
||||||
|
@@ -39,7 +39,7 @@ public class ClanManageController extends BaseController {
|
|||||||
* 申请加入家族
|
* 申请加入家族
|
||||||
*/
|
*/
|
||||||
@PostMapping("/apply")
|
@PostMapping("/apply")
|
||||||
@Authorization
|
//@Authorization
|
||||||
public BusiResult<Void> applyClan(Long uid, Long clanId) {
|
public BusiResult<Void> applyClan(Long uid, Long clanId) {
|
||||||
log.info("applyClan, uid={}, clanId={}", uid, clanId);
|
log.info("applyClan, uid={}, clanId={}", uid, clanId);
|
||||||
if (uid == null || clanId == null) {
|
if (uid == null || clanId == null) {
|
||||||
|
@@ -50,9 +50,11 @@ spring:
|
|||||||
singleServerConfig:
|
singleServerConfig:
|
||||||
address: redis://118.194.255.128:6200
|
address: redis://118.194.255.128:6200
|
||||||
password: anan@dev@redis@#!
|
password: anan@dev@redis@#!
|
||||||
|
connectionMinimumIdleSize: 16
|
||||||
|
timeout: 10000
|
||||||
threads: 16
|
threads: 16
|
||||||
nettyThreads: 32
|
nettyThreads: 32
|
||||||
codec: !<org.redisson.codec.MarshallingCodec> {}
|
codec: !<org.redisson.codec.JsonJacksonCodec> {}
|
||||||
transportMode: "NIO"
|
transportMode: "NIO"
|
||||||
|
|
||||||
##activemq 配置
|
##activemq 配置
|
||||||
@@ -71,4 +73,7 @@ elasticsearch:
|
|||||||
username: elastic
|
username: elastic
|
||||||
password: xuanyin@es123
|
password: xuanyin@es123
|
||||||
roomIndex: yinyou_dev_room
|
roomIndex: yinyou_dev_room
|
||||||
userIndex: yinyou_dev_users_202204121516
|
userIndex: yinyou_dev_users_202204121516
|
||||||
|
|
||||||
|
server:
|
||||||
|
port: 8081
|
6
pom.xml
6
pom.xml
@@ -109,7 +109,7 @@
|
|||||||
<jackson-module-kotlin.version>2.9.7</jackson-module-kotlin.version>
|
<jackson-module-kotlin.version>2.9.7</jackson-module-kotlin.version>
|
||||||
<jackson-mapper-asl.version>1.9.13</jackson-mapper-asl.version>
|
<jackson-mapper-asl.version>1.9.13</jackson-mapper-asl.version>
|
||||||
<sud-mgp-auth-java.version>1.0.2</sud-mgp-auth-java.version>
|
<sud-mgp-auth-java.version>1.0.2</sud-mgp-auth-java.version>
|
||||||
<redisson.version>3.16.3</redisson.version>
|
<redisson.version>3.16.8</redisson.version>
|
||||||
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
|
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
|
||||||
<esayexcel.version>3.1.1</esayexcel.version>
|
<esayexcel.version>3.1.1</esayexcel.version>
|
||||||
</properties>
|
</properties>
|
||||||
@@ -1012,11 +1012,11 @@
|
|||||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<!--<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-devtools</artifactId>
|
<artifactId>spring-boot-devtools</artifactId>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>-->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.springfox</groupId>
|
<groupId>io.springfox</groupId>
|
||||||
|
Reference in New Issue
Block a user