删除无效代码

This commit is contained in:
zengqiao
2021-04-20 17:22:26 +08:00
parent a12c398816
commit 3e1544294b
3 changed files with 9 additions and 53 deletions

View File

@@ -1,14 +1,7 @@
package com.xiaojukeji.kafka.manager.notify;
import com.xiaojukeji.kafka.manager.common.entity.ao.account.Account;
import com.xiaojukeji.kafka.manager.common.entity.pojo.OrderDO;
import com.xiaojukeji.kafka.manager.common.events.OrderApplyEvent;
import com.xiaojukeji.kafka.manager.notify.common.NotifyConstant;
import com.xiaojukeji.kafka.manager.notify.notifyer.AbstractNotifyService;
import com.xiaojukeji.kafka.manager.notify.common.OrderNotifyTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
@@ -19,27 +12,10 @@ import org.springframework.stereotype.Service;
*/
@Service("orderApplyNotifyService")
public class OrderApplyNotifyService implements ApplicationListener<OrderApplyEvent> {
@Autowired
private AbstractNotifyService notifyService;
@Value("${notify.order.detail-url}")
private String orderDetailUrl;
@Async
@Override
public void onApplicationEvent(OrderApplyEvent orderApplyEvent) {
OrderDO orderDO = orderApplyEvent.getOrderDO();
String detailUrl = String.format(orderDetailUrl, orderDO.getId(), orderApplyEvent.getIdc());
for (Account account : NotifyConstant.accountList) {
notifyService.sendMsg(account.getUsername(),
OrderNotifyTemplate.getNotify2OrderHandlerMessage(
account.getChineseName(),
orderDO.getApplicant(),
orderDO.getTitle(),
detailUrl
)
);
}
// todo 工单通知
}
}

View File

@@ -1,18 +0,0 @@
package com.xiaojukeji.kafka.manager.notify.common;
import com.xiaojukeji.kafka.manager.common.bizenum.AccountRoleEnum;
import com.xiaojukeji.kafka.manager.common.entity.ao.account.Account;
import java.util.Arrays;
import java.util.List;
/**
* @author zengqiao
* @date 20/8/27
*/
public class NotifyConstant {
public static final List<Account> accountList = Arrays.asList(
new Account("xuzhengxi", "徐正熙", "", AccountRoleEnum.OP)
);
}