master
parent
8080a6864d
commit
96165ea8cc
|
|
@ -1,7 +1,8 @@
|
||||||
package com.njzscloud.dispose.config;
|
package com.njzscloud.dispose.config;
|
||||||
|
|
||||||
import com.njzscloud.common.security.util.SecurityUtil;
|
import com.njzscloud.common.security.util.SecurityUtil;
|
||||||
import com.njzscloud.dispose.wh.service.InOrderService;
|
import com.njzscloud.dispose.wh.service.PurchaseOrderService;
|
||||||
|
import com.njzscloud.dispose.wh.service.SalesOrderService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
|
|
@ -9,8 +10,7 @@ import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static com.njzscloud.dispose.event.SysMittEvent.COERCE_LOGOUT;
|
import static com.njzscloud.dispose.event.SysMittEvent.*;
|
||||||
import static com.njzscloud.dispose.event.SysMittEvent.WH_IN_ORDER;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author lzq
|
* @author lzq
|
||||||
|
|
@ -18,14 +18,19 @@ import static com.njzscloud.dispose.event.SysMittEvent.WH_IN_ORDER;
|
||||||
@Component
|
@Component
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class SpringReady {
|
public class SpringReady {
|
||||||
// 仓库管理 service
|
// 采购单
|
||||||
private final InOrderService inOrderService;
|
private final PurchaseOrderService purchaseOrderService;
|
||||||
|
|
||||||
|
// 销售单
|
||||||
|
private final SalesOrderService salesOrderService;
|
||||||
|
|
||||||
@EventListener(ApplicationReadyEvent.class)
|
@EventListener(ApplicationReadyEvent.class)
|
||||||
public void onApplicationReady() {
|
public void onApplicationReady() {
|
||||||
COERCE_LOGOUT.on((List<Long> ids) -> ids.forEach(SecurityUtil::removeToken));
|
COERCE_LOGOUT.on((List<Long> ids) -> ids.forEach(SecurityUtil::removeToken));
|
||||||
|
|
||||||
WH_IN_ORDER.on(inOrderService::add);
|
PURCHASE_ORDER.on(purchaseOrderService::add);
|
||||||
|
|
||||||
|
SALES_ORDER.on(salesOrderService::add);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,10 @@ public class SysMittEvent {
|
||||||
public static MittEvent<List<Long>> COERCE_LOGOUT = () -> {
|
public static MittEvent<List<Long>> COERCE_LOGOUT = () -> {
|
||||||
};
|
};
|
||||||
|
|
||||||
public static MittEvent<Long> WH_IN_ORDER = () -> {
|
public static MittEvent<Long> PURCHASE_ORDER = () -> {
|
||||||
|
};
|
||||||
|
|
||||||
|
public static MittEvent<Long> SALES_ORDER = () -> {
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue