refactor: 去掉冗余实现,清淅结构

pull/63/head
xiaoxiamo 6 months ago
parent 4c884afdb5
commit a707a9eb09

@ -14,7 +14,7 @@ import java.util.Objects;
* @date 2022/1/18
*/
@Service
public class ContentDeduplicationBuilder extends AbstractDeduplicationBuilder implements Builder {
public class ContentDeduplicationBuilder extends AbstractDeduplicationBuilder{
public ContentDeduplicationBuilder() {
deduplicationType = DeduplicationType.CONTENT.getCode();

@ -16,7 +16,7 @@ import java.util.Objects;
*/
@Service
public class FrequencyDeduplicationBuilder extends AbstractDeduplicationBuilder implements Builder {
public class FrequencyDeduplicationBuilder extends AbstractDeduplicationBuilder{
public FrequencyDeduplicationBuilder() {
deduplicationType = DeduplicationType.FREQUENCY.getCode();
}

@ -1,6 +1,5 @@
package com.java3y.austin.handler.handler.impl;
import cn.hutool.core.map.MapUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSON;
import com.alipay.api.AlipayClient;
@ -13,9 +12,7 @@ import com.java3y.austin.common.dto.account.AlipayMiniProgramAccount;
import com.java3y.austin.common.dto.model.AlipayMiniProgramContentModel;
import com.java3y.austin.common.enums.ChannelType;
import com.java3y.austin.handler.config.AlipayClientSingleton;
import com.java3y.austin.handler.domain.alipay.AlipayMiniProgramParam;
import com.java3y.austin.handler.handler.BaseHandler;
import com.java3y.austin.handler.handler.Handler;
import com.java3y.austin.support.utils.AccountUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -30,7 +27,7 @@ import java.util.stream.Collectors;
*/
@Component
@Slf4j
public class AlipayMiniProgramAccountHandler extends BaseHandler implements Handler {
public class AlipayMiniProgramAccountHandler extends BaseHandler{
@Autowired
private AccountUtils accountUtils;

@ -16,7 +16,6 @@ import com.java3y.austin.common.enums.SendMessageType;
import com.java3y.austin.handler.domain.dingding.DingDingRobotParam;
import com.java3y.austin.handler.domain.dingding.DingDingRobotResult;
import com.java3y.austin.handler.handler.BaseHandler;
import com.java3y.austin.handler.handler.Handler;
import com.java3y.austin.support.utils.AccountUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64;
@ -37,7 +36,7 @@ import java.util.List;
*/
@Slf4j
@Service
public class DingDingRobotHandler extends BaseHandler implements Handler {
public class DingDingRobotHandler extends BaseHandler{
@Autowired
private AccountUtils accountUtils;

@ -23,7 +23,6 @@ import com.java3y.austin.common.dto.model.DingDingWorkContentModel;
import com.java3y.austin.common.enums.ChannelType;
import com.java3y.austin.common.enums.SendMessageType;
import com.java3y.austin.handler.handler.BaseHandler;
import com.java3y.austin.handler.handler.Handler;
import com.java3y.austin.support.config.SupportThreadPoolConfig;
import com.java3y.austin.support.utils.AccessTokenUtils;
import com.java3y.austin.support.utils.AccountUtils;
@ -44,7 +43,7 @@ import org.springframework.stereotype.Service;
*/
@Slf4j
@Service
public class DingDingWorkNoticeHandler extends BaseHandler implements Handler {
public class DingDingWorkNoticeHandler extends BaseHandler{
private static final String DING_DING_RECALL_KEY_PREFIX = "DING_RECALL_";

@ -15,7 +15,6 @@ import com.java3y.austin.common.enums.ChannelType;
import com.java3y.austin.handler.enums.RateLimitStrategy;
import com.java3y.austin.handler.flowcontrol.FlowControlParam;
import com.java3y.austin.handler.handler.BaseHandler;
import com.java3y.austin.handler.handler.Handler;
import com.java3y.austin.support.utils.AccountUtils;
import com.java3y.austin.support.utils.AustinFileUtils;
import com.sun.mail.util.MailSSLSocketFactory;
@ -34,7 +33,7 @@ import java.util.List;
*/
@Component
@Slf4j
public class EmailHandler extends BaseHandler implements Handler {
public class EmailHandler extends BaseHandler{
@Autowired
private AccountUtils accountUtils;

@ -12,7 +12,6 @@ import com.java3y.austin.common.dto.model.EnterpriseWeChatContentModel;
import com.java3y.austin.common.enums.ChannelType;
import com.java3y.austin.common.enums.SendMessageType;
import com.java3y.austin.handler.handler.BaseHandler;
import com.java3y.austin.handler.handler.Handler;
import com.java3y.austin.support.config.SupportThreadPoolConfig;
import com.java3y.austin.support.utils.AccountUtils;
import com.java3y.austin.support.utils.LogUtils;
@ -41,7 +40,7 @@ import java.util.Map;
*/
@Component
@Slf4j
public class EnterpriseWeChatHandler extends BaseHandler implements Handler {
public class EnterpriseWeChatHandler extends BaseHandler{
private static final String WE_CHAT_RECALL_KEY_PREFIX = "WECHAT_RECALL_";
private static final String WE_CHAT_RECALL_BIZ_TYPE = "EnterpriseWeChatHandler#recall";

@ -15,7 +15,6 @@ import com.java3y.austin.common.enums.SendMessageType;
import com.java3y.austin.handler.domain.wechat.robot.EnterpriseWeChatRobotParam;
import com.java3y.austin.handler.domain.wechat.robot.EnterpriseWeChatRootResult;
import com.java3y.austin.handler.handler.BaseHandler;
import com.java3y.austin.handler.handler.Handler;
import com.java3y.austin.support.utils.AccountUtils;
import com.java3y.austin.support.utils.LogUtils;
import lombok.extern.slf4j.Slf4j;
@ -33,7 +32,7 @@ import java.util.List;
*/
@Slf4j
@Service
public class EnterpriseWeChatRobotHandler extends BaseHandler implements Handler {
public class EnterpriseWeChatRobotHandler extends BaseHandler{
@Autowired
private AccountUtils accountUtils;

@ -14,7 +14,6 @@ import com.java3y.austin.common.enums.SendMessageType;
import com.java3y.austin.handler.domain.feishu.FeiShuRobotParam;
import com.java3y.austin.handler.domain.feishu.FeiShuRobotResult;
import com.java3y.austin.handler.handler.BaseHandler;
import com.java3y.austin.handler.handler.Handler;
import com.java3y.austin.support.utils.AccountUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -30,7 +29,7 @@ import java.util.List;
*/
@Slf4j
@Service
public class FeiShuRobotHandler extends BaseHandler implements Handler {
public class FeiShuRobotHandler extends BaseHandler{
@Autowired
private AccountUtils accountUtils;

@ -11,7 +11,6 @@ import com.java3y.austin.common.domain.TaskInfo;
import com.java3y.austin.common.dto.model.MiniProgramContentModel;
import com.java3y.austin.common.enums.ChannelType;
import com.java3y.austin.handler.handler.BaseHandler;
import com.java3y.austin.handler.handler.Handler;
import com.java3y.austin.support.utils.AccountUtils;
import com.java3y.austin.support.utils.LogUtils;
import lombok.extern.slf4j.Slf4j;
@ -31,7 +30,7 @@ import java.util.Set;
*/
@Component
@Slf4j
public class MiniProgramAccountHandler extends BaseHandler implements Handler {
public class MiniProgramAccountHandler extends BaseHandler{
@Autowired
private AccountUtils accountUtils;
@Autowired

@ -9,7 +9,6 @@ import com.java3y.austin.common.domain.TaskInfo;
import com.java3y.austin.common.dto.model.OfficialAccountsContentModel;
import com.java3y.austin.common.enums.ChannelType;
import com.java3y.austin.handler.handler.BaseHandler;
import com.java3y.austin.handler.handler.Handler;
import com.java3y.austin.support.utils.AccountUtils;
import com.java3y.austin.support.utils.LogUtils;
import lombok.extern.slf4j.Slf4j;
@ -32,7 +31,7 @@ import java.util.Set;
*/
@Component
@Slf4j
public class OfficialAccountHandler extends BaseHandler implements Handler {
public class OfficialAccountHandler extends BaseHandler{
@Autowired
private AccountUtils accountUtils;

@ -18,7 +18,6 @@ import com.java3y.austin.handler.domain.push.getui.BatchSendPushParam;
import com.java3y.austin.handler.domain.push.getui.SendPushParam;
import com.java3y.austin.handler.domain.push.getui.SendPushResult;
import com.java3y.austin.handler.handler.BaseHandler;
import com.java3y.austin.handler.handler.Handler;
import com.java3y.austin.support.utils.AccessTokenUtils;
import com.java3y.austin.support.utils.AccountUtils;
import lombok.extern.slf4j.Slf4j;
@ -37,7 +36,7 @@ import java.util.Set;
*/
@Component
@Slf4j
public class PushHandler extends BaseHandler implements Handler {
public class PushHandler extends BaseHandler{
private static final String HEADER_TOKEN_NAME = "token";
@Autowired

@ -14,7 +14,6 @@ import com.java3y.austin.common.enums.ChannelType;
import com.java3y.austin.handler.domain.sms.MessageTypeSmsConfig;
import com.java3y.austin.handler.domain.sms.SmsParam;
import com.java3y.austin.handler.handler.BaseHandler;
import com.java3y.austin.handler.handler.Handler;
import com.java3y.austin.handler.script.SmsScript;
import com.java3y.austin.support.dao.SmsRecordDao;
import com.java3y.austin.support.domain.SmsRecord;
@ -37,7 +36,7 @@ import java.util.Random;
*/
@Component
@Slf4j
public class SmsHandler extends BaseHandler implements Handler {
public class SmsHandler extends BaseHandler{
/**
*

Loading…
Cancel
Save