mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-19 21:45:06 +08:00
【代码评审】SYSTEM:订阅消息
This commit is contained in:
@ -75,6 +75,7 @@ public class SocialClientApiImpl implements SocialClientApi {
|
||||
|
||||
public void sendSubscribeMessage(String templateTitle, Map<String, String> messages, Integer userType, Long userId,
|
||||
Integer socialType, String path) {
|
||||
// TODO @puhui999:建议是,先不拆小方法。因为逻辑的复杂度其实不高哈。合在一个方法里,因为咱写了 1.1 1.2 2. 这样的逻辑,也能一下子看懂。
|
||||
// 1.1 获得订阅模版
|
||||
SocialWxSubscribeTemplateRespDTO template = getTemplate(templateTitle, userType);
|
||||
if (template == null) {
|
||||
@ -104,6 +105,7 @@ public class SocialClientApiImpl implements SocialClientApi {
|
||||
.setTemplateId(template.getId()).setToUser(openId).setPage(path);
|
||||
}
|
||||
|
||||
// TODO @puhui999:建议下沉到 service 实现。
|
||||
/**
|
||||
* 获得小程序订阅消息模版
|
||||
*
|
||||
@ -120,6 +122,7 @@ public class SocialClientApiImpl implements SocialClientApi {
|
||||
return CollectionUtil.findOne(templateList, item -> ObjUtil.equal(item.getTitle(), templateTitle));
|
||||
}
|
||||
|
||||
// TODO @puhui999:建议下沉到 service 实现。
|
||||
/**
|
||||
* 获得用户 openId
|
||||
*
|
||||
|
Reference in New Issue
Block a user