mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 11:52:08 +08:00
删除无效代码
This commit is contained in:
@@ -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 工单通知
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user