mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 18:28:43 +08:00 
			
		
		
		
	【代码评审】SYSTEM:订阅消息
This commit is contained in:
		| @@ -57,6 +57,7 @@ public interface SocialClientApi { | ||||
|      */ | ||||
|     List<SocialWxSubscribeTemplateRespDTO> getSubscribeTemplateList(Integer userType); | ||||
|  | ||||
|     // TODO @puhui999:sendSubscribeMessage 两个方法,可以融合成一个么? | ||||
|     /** | ||||
|      * 发送微信小程序订阅消息 | ||||
|      * | ||||
|   | ||||
| @@ -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
	 YunaiV
					YunaiV